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

229 lines
1.3 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([[206,6,7,19,20],{"+NIl":function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(m,T){"use strict";function L(f,x){f.cmdState.push(x)}function S(f){return f.cmdState.length>0?f.cmdState[f.cmdState.length-1]:null}function g(f){var x=f.cmdState.pop();x&&x.closeBracket()}function _(f){for(var x=f.cmdState,v=x.length-1;v>=0;v--){var l=x[v];if(l.name=="DEFAULT")continue;return l}return{styleIdentifier:function(){return null}}}function d(f,x,v){return function(){this.name=f,this.bracketNo=0,this.style=x,this.styles=v,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};o.importmodule=d("importmodule","tag",["string","builtin"]),o.documentclass=d("documentclass","tag",["","atom"]),o.usepackage=d("usepackage","tag",["atom"]),o.begin=d("begin","tag",["atom"]),o.end=d("end","tag",["atom"]),o.label=d("label","tag",["atom"]),o.ref=d("ref","tag",["atom"]),o.eqref=d("eqref","tag",["atom"]),o.cite=d("cite","tag",["atom"]),o.bibitem=d("bibitem","tag",["atom"]),o.Bibitem=d("Bibitem","tag",["atom"]),o.RBibitem=d("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function i(f,x){f.f=x}function r(f,x){var v;if(f.match(/^\\[a-zA-Z@]+/)){var l=f.current().slice(1);return v=o.hasOwnProperty(l)?o[l]:o.DEFAULT,v=new v,L(x,v),i(x,p),v.style}if(f.match(/^\\[$&%#{}_]/))return"tag";if(f.match(/^\\[,;!\/\\]/))return"tag";if(f.match("\\["))return i(x,function(s,u){return h(s,u,"\\]")}),"keyword";if(f.match("\\("))return i(x,function(s,u){return h(s,u,"\\)")}),"keyword";if(f.match("$$"))return i(x,function(s,u){return h(s,u,"$$")}),"keyword";if(f.match("$"))return i(x,function(s,u){return h(s,u,"$")}),"keyword";var n=f.next();if(n=="%")return f.skipToEnd(),"comment";if(n=="}"||n=="]"){if(v=S(x),v)v.closeBracket(n),i(x,p);else return"error";return"bracket"}else return n=="{"||n=="["?(v=o.DEFAULT,v=new v,L(x,v),"bracket"):/\d/.test(n)?(f.eatWhile(/[\w.%]/),"atom"):(f.eatWhile(/[\w\-_]/),v=_(x),v.name=="begin"&&(v.argument=f.current()),v.styleIdentifier())}function h(f,x,v){if(f.eatSpace())return null;if(v&&f.match(v))return i(x,r),"keyword";if(f.match(/^\\[a-zA-Z@]+/))return"tag";if(f.match(/^[a-zA-Z]+/))return"variable-2";if(f.match(/^\\[$&%#{}_]/))return"tag";if(f.match(/^\\[,;!\/]/))return"tag";if(f.match(/^[\^_&]/))return"tag";if(f.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(f.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var l=f.next();return l=="{"||l=="}"||l=="["||l=="]"||l=="("||l==")"?"bracket":l=="%"?(f.skipToEnd(),"comment"):"error"}function p(f,x){var v=f.peek(),l;return v=="{"||v=="["?(l=S(x),l.openBracket(v),f.eat(v),i(x,r),"bracket"):/[ \t\r]/.test(v)?(f.eat(v),null):(i(x,r),g(x),r(f,x))}return{startState:function(){var f=T.inMathMode?function(x,v){return h(x,v)}:r;return{cmdState:[],f}},copyState:function(f){return{cmdState:f.cmdState.slice(),f:f.f}},token:function(f,x){return x.f(f,x)},blankLine:function(f){f.f=r,f.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"19Vz":function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){P.defineOption("placeholder","",function(d,o,i){var r=i&&i!=P.Init;if(o&&!r)d.on("blur",S),d.on("change",g),d.on("swapDoc",g),P.on(d.getInputField(),"compositionupdate",d.state.placeholderCompose=function(){L(d)}),g(d);else if(!o&&r){d.off("blur",S),d.off("change",g),d.off("swapDoc",g),P.off(d.getInputField(),"compositionupdate",d.state.placeholderCompose),m(d);var h=d.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}o&&!d.hasFocus()&&S(d)});function m(d){d.state.placeholder&&(d.state.placeholder.parentNode.removeChild(d.state.placeholder),d.state.placeholder=null)}function T(d){m(d);var o=d.state.placeholder=document.createElement("pre");o.style.cssText="height: 0; overflow: visible",o.style.direction=d.getOption("direction"),o.className="CodeMirror-placeholder CodeMirror-line-like";var i=d.getOption("placeholder");typeof i=="string"&&(i=document.createTextNode(i)),o.appendChild(i),d.display.lineSpace.insertBefore(o,d.display.lineSpace.firstChild)}function L(d){setTimeout(function(){var o=!1,i=d.getInputField();i.nodeName=="TEXTAREA"?o=!i.value:d.lineCount()==1&&(o=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),o?T(d):m(d)},20)}function S(d){_(d)&&T(d)}function g(d){var o=d.getWrapperElement(),i=_(d);o.className=o.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?T(d):m(d)}function _(d){return d.lineCount()===1&&d.getLine(0)===""}})},"1eCo":function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){"use strict";var m={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},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(L,S){var g=L.indentUnit,_={},d=S.htmlMode?m:T;for(var o in d)_[o]=d[o];for(var o in S)_[o]=S[o];var i,r;function h(C,F){function j(G){return F.tokenize=G,G(C,F)}var k=C.next();if(k=="<")return C.eat("!")?C.eat("[")?C.match("CDATA[")?j(x("atom","]]>")):null:C.match("--")?j(x("comment","-->")):C.match("DOCTYPE",!0,!0)?(C.eatWhile(/[\w\._\-]/),j(v(1))):null:C.eat("?")?(C.eatWhile(/[\w\._\-]/),F.tokenize=x("meta","?>"),"meta"):(i=C.eat("/")?"closeTag":"openTag",F.tokenize=p,"tag bracket");if(k=="&"){var X;return C.eat("#")?C.eat("x")?X=C.eatWhile(/[a-fA-F\d]/)&&C.eat(";"):X=C.eatWhile(/[\d]/)&&C.eat(";"):X=C.eatWhile(/[\w\.\-:]/)&&C.eat(";"),X?"atom":"error"}else return C.eatWhile(/[^&<]/),null}h.isInText=!0;function p(C,F){var j=C.next();if(j==">"||j=="/"&&C.eat(">"))return F.tokenize=h,i=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return i="equals",null;if(j=="<"){F.tokenize=h,F.state=u,F.tagName=F.tagStart=null;var k=F.tokenize(C,F);return k?k+" tag error":"tag error"}else return/[\'\"]/.test(j)?(F.tokenize=f(j),F.stringStartCol=C.column(),F.tokenize(C,F)):(C.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(C){var F=function(j,k){for(;!j.eol();)if(j.next()==C){k.tokenize=p;break}return"string"};return F.isInAttribute=!0,F}function x(C,F){return function(j,k){for(;!j.eol();){if(j.match(F)){k.tokenize=h;break}j.next()}return C}}function v(C){return function(F,j){for(var k;(k=F.next())!=null;){if(k=="<")return j.tokenize=v(C+1),j.tokenize(F,j);if(k==">")if(C==1){j.tokenize=h;break}else return j.tokenize=v(C-1),j.tokenize(F,j)}return"meta"}}function l(C,F,j){this.prev=C.context,this.tagName=F,this.indent=C.indented,this.startOfLine=j,(_.doNotIndent.hasOwnProperty(F)||C.context&&C.context.noIndent)&&(this.noIndent=!0)}function n(C){C.context&&(C.context=C.context.prev)}function s(C,F){for(var j;;){if(!C.context)return;if(j=C.context.tagName,!_.contextGrabbers.hasOwnProperty(j)||!_.contextGrabbers[j].hasOwnProperty(F))return;n(C)}}function u(C,F,j){return C=="openTag"?(j.tagStart=F.column(),w):C=="closeTag"?y:u}function w(C,F,j){return C=="word"?(j.tagName=F.current(),r="tag",D):_.allowMissingTagName&&C=="endTag"?(r="tag bracket",D(C,F,j)):(r="error",w)}function y(C,F,j){if(C=="word"){var k=F.current();return j.context&&j.context.tagName!=k&&_.implicitlyClosed.hasOwnProperty(j.context.tagName)&&n(j),j.context&&j.context.tagName==k||_.matchClosing===!1?(r="tag",a):(r="tag error",R)}else return _.allowMissingTagName&&C=="endTag"?(r="tag bracket",a(C,F,j)):(r="error",R)}function a(C,F,j){return C!="endTag"?(r="error",a):(n(j),u)}function R(C,F,j){return r="error",a(C,F,j)}function D(C,F,j){if(C=="word")return r="attribute",c;if(C=="endTag"||C=="selfcloseTag"){var k=j.tagName,X=j.tagStart;return j.tagName=j.tagStart=null,C=="selfcloseTag"||_.autoSelfClosers.hasOwnProperty(k)?s(j,k):(s(j,k),j.context=new l(j,k,X==j.indented)),u}return r="error",D}function c(C,F,j){return C=="equals"?b:(_.allowMissing||(r="error"),D(C,F,j))}function b(C,F,j){return C=="string"?E:C=="word"&&_.allowUnquoted?(r="string",D):(r="error",D(C,F,j))}function E(C,F,j){return C=="string"?E:D(C,F,j)}return{startState:function(C){var F={tokenize:h,state:u,indented:C||0,tagName:null,tagStart:null,context:null};return C!=null&&(F.baseIndent=C),F},token:function(C,F){if(!F.tagName&&C.sol()&&(F.indented=C.indentation()),C.eatSpace())return null;i=null;var j=F.tokenize(C,F);return(j||i)&&j!="comment"&&(r=null,F.state=F.state(i||j,C,F),r&&(j=r=="error"?j+" error":r)),j},indent:function(C,F,j){var k=C.context;if(C.tokenize.isInAttribute)return C.tagStart==C.indented?C.stringStartCol+1:C.indented+g;if(k&&k.noIndent)return P.Pass;if(C.tokenize!=p&&C.tokenize!=h)return j?j.match(/^(\s*)/)[0].length:0;if(C.tagName)return _.multilineTagIndentPastTag!==!1?C.tagStart+C.tagName.length+2:C.tagStart+g*(_.multilineTagIndentFactor||1);if(_.alignCDATA&&/<!\[CDATA\[/.test(F))return 0;var X=F&&/^<(\/)?([\w_:\.-]*)/.exec(F);if(X&&X[1])for(;k;)if(k.tagName==X[2]){k=k.prev;break}else if(_.implicitlyClosed.hasOwnProperty(k.tagName))k=k.prev;else break;else if(X)for(;k;){var G=_.contextGrabbers[k.tagName];if(G&&G.hasOwnProperty(X[2]))k=k.prev;else break}for(;k&&k.prev&&!k.startOfLine;)k=k.prev;return k?k.indent+g:C.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:_.htmlMode?"html":"xml",helperType:_.htmlMode?"html":"xml",skipAttribute:function(C){C.state==b&&(C.state=D)},xmlCurrentTag:function(C){return C.tagName?{name:C.tagName,close:C.type=="closeTag"}:null},xmlCurrentContext:function(C){for(var F=[],j=C.context;j;j=j.prev)j.tagName&&F.push(j.tagName);return F.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(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("MlIO"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.Hasher,S=m.x64,g=S.Word,_=S.WordArray,d=m.algo;function o(){return g.create.apply(g,arguments)}var i=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],r=[];(function(){for(var p=0;p<80;p++)r[p]=o()})();var h=d.SHA512=L.extend({_doReset:function(){this._hash=new _.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(p,f){for(var x=this._hash.words,v=x[0],l=x[1],n=x[2],s=x[3],u=x[4],w=x[5],y=x[6],a=x[7],R=v.high,D=v.low,c=l.high,b=l.low,E=n.high,C=n.low,F=s.high,j=s.low,k=u.high,X=u.low,G=w.high,H=w.low,K=y.high,B=y.low,U=a.high,W=a.low,Q=R,ie=D,ce=c,he=b,be=E,ne=C,le=F,ue=j,re=k,oe=X,q=G,se=H,J=K,ee=B,ge=U,te=W,Y=0;Y<80;Y++){var z,$,me=r[Y];if(Y<16)$=me.high=p[f+Y*2]|0,z=me.low=p[f+Y*2+1]|0;else{var pe=r[Y-15],xe=pe.high,Re=pe.low,ke=(xe>>>1|Re<<31)^(xe>>>8|Re<<24)^xe>>>7,Me=(Re>>>1|xe<<31)^(Re>>>8|xe<<24)^(Re>>>7|xe<<25),Pe=r[Y-2],je=Pe.high,Fe=Pe.low,We=(je>>>19|Fe<<13)^(je<<3|Fe>>>29)^je>>>6,Se=(Fe>>>19|je<<13)^(Fe<<3|je>>>29)^(Fe>>>6|je<<26),Xe=r[Y-7],Ye=Xe.high,Ie=Xe.low,He=r[Y-16],Ae=He.high,Te=He.low;z=Me+Ie,$=ke+Ye+(z>>>0<Me>>>0?1:0),z=z+Se,$=$+We+(z>>>0<Se>>>0?1:0),z=z+Te,$=$+Ae+(z>>>0<Te>>>0?1:0),me.high=$,me.low=z}var Ce=re&q^~re&J,ye=oe&se^~oe&ee,Ee=Q&ce^Q&be^ce&be,we=ie&he^ie&ne^he&ne,Oe=(Q>>>28|ie<<4)^(Q<<30|ie>>>2)^(Q<<25|ie>>>7),Le=(ie>>>28|Q<<4)^(ie<<30|Q>>>2)^(ie<<25|Q>>>7),Be=(re>>>14|oe<<18)^(re>>>18|oe<<14)^(re<<23|oe>>>9),ze=(oe>>>14|re<<18)^(oe>>>18|re<<14)^(oe<<23|re>>>9),nt=i[Y],Ze=nt.high,at=nt.low,pt=te+ze,dt=ge+Be+(pt>>>0<te>>>0?1:0),pt=pt+ye,dt=dt+Ce+(pt>>>0<ye>>>0?1:0),pt=pt+at,dt=dt+Ze+(pt>>>0<at>>>0?1:0),pt=pt+z,dt=dt+$+(pt>>>0<z>>>0?1:0),it=Le+we,Lt=Oe+Ee+(it>>>0<Le>>>0?1:0);ge=J,te=ee,J=q,ee=se,q=re,se=oe,oe=ue+pt|0,re=le+dt+(oe>>>0<ue>>>0?1:0)|0,le=be,ue=ne,be=ce,ne=he,ce=Q,he=ie,ie=pt+it|0,Q=dt+Lt+(ie>>>0<pt>>>0?1:0)|0}D=v.low=D+ie,v.high=R+Q+(D>>>0<ie>>>0?1:0),b=l.low=b+he,l.high=c+ce+(b>>>0<he>>>0?1:0),C=n.low=C+ne,n.high=E+be+(C>>>0<ne>>>0?1:0),j=s.low=j+ue,s.high=F+le+(j>>>0<ue>>>0?1:0),X=u.low=X+oe,u.high=k+re+(X>>>0<oe>>>0?1:0),H=w.low=H+se,w.high=G+q+(H>>>0<se>>>0?1:0),B=y.low=B+ee,y.high=K+J+(B>>>0<ee>>>0?1:0),W=a.low=W+te,a.high=U+ge+(W>>>0<te>>>0?1:0)},_doFinalize:function(){var p=this._data,f=p.words,x=this._nDataBytes*8,v=p.sigBytes*8;f[v>>>5]|=128<<24-v%32,f[(v+128>>>10<<5)+30]=Math.floor(x/4294967296),f[(v+128>>>10<<5)+31]=x,p.sigBytes=f.length*4,this._process();var l=this._hash.toX32();return l},clone:function(){var p=L.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});m.SHA512=L._createHelper(h),m.HmacSHA512=L._createHmacHelper(h)}(),P.SHA512})},"3y9D":function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,S=T.Hasher,g=m.algo,_=[],d=g.SHA1=S.extend({_doReset:function(){this._hash=new L.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,i){for(var r=this._hash.words,h=r[0],p=r[1],f=r[2],x=r[3],v=r[4],l=0;l<80;l++){if(l<16)_[l]=o[i+l]|0;else{var n=_[l-3]^_[l-8]^_[l-14]^_[l-16];_[l]=n<<1|n>>>31}var s=(h<<5|h>>>27)+v+_[l];l<20?s+=(p&f|~p&x)+1518500249:l<40?s+=(p^f^x)+1859775393:l<60?s+=(p&f|p&x|f&x)-1894007588:s+=(p^f^x)-899497514,v=x,x=f,f=p<<30|p>>>2,p=h,h=s}r[0]=r[0]+h|0,r[1]=r[1]+p|0,r[2]=r[2]+f|0,r[3]=r[3]+x|0,r[4]=r[4]+v|0},_doFinalize:function(){var o=this._data,i=o.words,r=this._nDataBytes*8,h=o.sigBytes*8;return i[h>>>5]|=128<<24-h%32,i[(h+64>>>9<<4)+14]=Math.floor(r/4294967296),i[(h+64>>>9<<4)+15]=r,o.sigBytes=i.length*4,this._process(),this._hash},clone:function(){var o=S.clone.call(this);return o._hash=this._hash.clone(),o}});m.SHA1=S._createHelper(d),m.HmacSHA1=S._createHmacHelper(d)}(),P.SHA1})},4:function(I,Z){},"5hvy":function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("MlIO"))})(this,function(P){return function(m){var T=P,L=T.lib,S=L.WordArray,g=L.Hasher,_=T.x64,d=_.Word,o=T.algo,i=[],r=[],h=[];(function(){for(var x=1,v=0,l=0;l<24;l++){i[x+5*v]=(l+1)*(l+2)/2%64;var n=v%5,s=(2*x+3*v)%5;x=n,v=s}for(var x=0;x<5;x++)for(var v=0;v<5;v++)r[x+5*v]=v+(2*x+3*v)%5*5;for(var u=1,w=0;w<24;w++){for(var y=0,a=0,R=0;R<7;R++){if(u&1){var D=(1<<R)-1;D<32?a^=1<<D:y^=1<<D-32}u&128?u=u<<1^113:u<<=1}h[w]=d.create(y,a)}})();var p=[];(function(){for(var x=0;x<25;x++)p[x]=d.create()})();var f=o.SHA3=g.extend({cfg:g.cfg.extend({outputLength:512}),_doReset:function(){for(var x=this._state=[],v=0;v<25;v++)x[v]=new d.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(x,v){for(var l=this._state,n=this.blockSize/2,s=0;s<n;s++){var u=x[v+2*s],w=x[v+2*s+1];u=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;var y=l[s];y.high^=w,y.low^=u}for(var a=0;a<24;a++){for(var R=0;R<5;R++){for(var D=0,c=0,b=0;b<5;b++){var y=l[R+5*b];D^=y.high,c^=y.low}var E=p[R];E.high=D,E.low=c}for(var R=0;R<5;R++)for(var C=p[(R+4)%5],F=p[(R+1)%5],j=F.high,k=F.low,D=C.high^(j<<1|k>>>31),c=C.low^(k<<1|j>>>31),b=0;b<5;b++){var y=l[R+5*b];y.high^=D,y.low^=c}for(var X=1;X<25;X++){var D,c,y=l[X],G=y.high,H=y.low,K=i[X];K<32?(D=G<<K|H>>>32-K,c=H<<K|G>>>32-K):(D=H<<K-32|G>>>64-K,c=G<<K-32|H>>>64-K);var B=p[r[X]];B.high=D,B.low=c}var U=p[0],W=l[0];U.high=W.high,U.low=W.low;for(var R=0;R<5;R++)for(var b=0;b<5;b++){var X=R+5*b,y=l[X],Q=p[X],ie=p[(R+1)%5+5*b],ce=p[(R+2)%5+5*b];y.high=Q.high^~ie.high&ce.high,y.low=Q.low^~ie.low&ce.low}var y=l[0],he=h[a];y.high^=he.high,y.low^=he.low}},_doFinalize:function(){var x=this._data,v=x.words,l=this._nDataBytes*8,n=x.sigBytes*8,s=this.blockSize*32;v[n>>>5]|=1<<24-n%32,v[(m.ceil((n+1)/s)*s>>>5)-1]|=128,x.sigBytes=v.length*4,this._process();for(var u=this._state,w=this.cfg.outputLength/8,y=w/8,a=[],R=0;R<y;R++){var D=u[R],c=D.high,b=D.low;c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,a.push(b),a.push(c)}return new S.init(a,w)},clone:function(){for(var x=g.clone.call(this),v=x._state=this._state.slice(0),l=0;l<25;l++)v[l]=v[l].clone();return x}});T.SHA3=g._createHelper(f),T.HmacSHA3=g._createHmacHelper(f)}(Math),P.SHA3})},"5nXd":function(I,Z,N){var P=N("MFOe"),m=P.slice,T=P.pluck,L=P.each,S=P.bind,g=P.create,_=P.isList,d=P.isFunction,o=P.isObject;I.exports={createStore:h};var i={version:"2.0.12",enabled:!1,get:function(p,f){var x=this.storage.read(this._namespacePrefix+p);return this._deserialize(x,f)},set:function(p,f){return f===void 0?this.remove(p):(this.storage.write(this._namespacePrefix+p,this._serialize(f)),f)},remove:function(p){this.storage.remove(this._namespacePrefix+p)},each:function(p){var f=this;this.storage.each(function(x,v){p.call(f,f._deserialize(x),(v||"").replace(f._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(p){return this._namespacePrefix=="__storejs_"+p+"_"},createStore:function(){return h.apply(this,arguments)},addPlugin:function(p){this._addPlugin(p)},namespace:function(p){return h(this.storage,this.plugins,p)}};function r(){var p=typeof console=="undefined"?null:console;if(!p)return;var f=p.warn?p.warn:p.log;f.apply(p,arguments)}function h(p,f,x){x||(x=""),p&&!_(p)&&(p=[p]),f&&!_(f)&&(f=[f]);var v=x?"__storejs_"+x+"_":"",l=x?new RegExp("^"+v):null,n=/^[a-zA-Z0-9_\-]*$/;if(!n.test(x))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var s={_namespacePrefix:v,_namespaceRegexp:l,_testStorage:function(w){try{var y="__storejs__test__";w.write(y,y);var a=w.read(y)===y;return w.remove(y),a}catch(R){return!1}},_assignPluginFnProp:function(w,y){var a=this[y];this[y]=function(){var D=m(arguments,0),c=this;function b(){return a?(L(arguments,function(C,F){D[F]=C}),a.apply(c,D)):void 0}var E=[b].concat(D);return w.apply(c,E)}},_serialize:function(w){return JSON.stringify(w)},_deserialize:function(w,y){if(!w)return y;var a="";try{a=JSON.parse(w)}catch(R){a=w}return a!==void 0?a:y},_addStorage:function(w){if(this.enabled)return;this._testStorage(w)&&(this.storage=w,this.enabled=!0)},_addPlugin:function(w){var y=this;if(_(w)){L(w,function(D){y._addPlugin(D)});return}var a=T(this.plugins,function(D){return w===D});if(a)return;if(this.plugins.push(w),!d(w))throw new Error("Plugins must be function values that return objects");var R=w.call(this);if(!o(R))throw new Error("Plugins must return an object of function properties");L(R,function(D,c){if(!d(D))throw new Error("Bad plugin property: "+c+" from plugin "+w.name+". Plugins should only return functions.");y._assignPluginFnProp(D,c)})},addStorage:function(w){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(w)}},u=g(s,i,{plugins:[]});return u.raw={},L(u,function(w,y){d(w)&&(u.raw[y]=S(u,w))}),L(p,function(w){u._addStorage(w)}),L(f,function(w){u._addPlugin(w)}),u}},"7Cbv":function(I,Z,N){"use strict";var P=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),m=new Uint8Array(16);function T(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(m)}var L=/^(?:[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 S(p){return typeof p=="string"&&L.test(p)}for(var g=S,_=[],d=0;d<256;++d)_.push((d+256).toString(16).substr(1));function o(p){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,x=(_[p[f+0]]+_[p[f+1]]+_[p[f+2]]+_[p[f+3]]+"-"+_[p[f+4]]+_[p[f+5]]+"-"+_[p[f+6]]+_[p[f+7]]+"-"+_[p[f+8]]+_[p[f+9]]+"-"+_[p[f+10]]+_[p[f+11]]+_[p[f+12]]+_[p[f+13]]+_[p[f+14]]+_[p[f+15]]).toLowerCase();if(!g(x))throw TypeError("Stringified UUID is invalid");return x}var i=o;function r(p,f,x){p=p||{};var v=p.random||(p.rng||T)();if(v[6]=v[6]&15|64,v[8]=v[8]&63|128,f){x=x||0;for(var l=0;l<16;++l)f[x+l]=v[l];return f}return i(v)}var h=Z.a=r},"7ahc":function(I,Z,N){"use strict";N.d(Z,"a",function(){return w});var P=N("k1fw"),m=N("0Owb"),T=N("+L6B"),L=N("2/Rp"),S=N("y8nQ"),g=N("Vl3Y"),_=N("tJVT"),d=N("OaEy"),o=N("2fM7"),i=N("cDcd"),r=N.n(i),h=N("VrN/"),p=N.n(h),f=N("p77/"),x=N.n(f),v=N("c5Ni"),l=N.n(v),n=o.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},u={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Z.b=function(y){var a=y.callback,R=y.onCancel,D=Object(i.useState)("python"),c=Object(_.a)(D,2),b=c[0],E=c[1];function C(j){E(u[j][1])}function F(j){a(j)}return r.a.createElement(g.a,Object(m.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:F}),r.a.createElement(g.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(o.a,{onChange:C},Object.keys(u).map(function(j){return r.a.createElement(n,{key:j,value:j},u[j][0])}))),r.a.createElement(g.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(w,{mode:b})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(L.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function w(y){var a=y.value,R=y.onChange,D=y.mode,c=y.options,b=c===void 0?{}:c,E=Object(i.useRef)(),C=Object(i.useState)(),F=Object(_.a)(C,2),j=F[0],k=F[1];return Object(i.useEffect)(function(){if(j){function X(G){var H=G.getValue();R&&R(H)}return j.on("change",X),function(){j.off("change",X)}}},[j,R]),Object(i.useEffect)(function(){j&&j.setOption("mode",D)},[j,D]),Object(i.useEffect)(function(){j&&((a!==j.getValue()||a==="")&&setTimeout(function(){j.setValue(a||" ")},300))},[j,a]),Object(i.useEffect)(function(){if(E.current&&!j){var X=p.a.fromTextArea(E.current,Object(P.a)({mode:D,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));k(X)}},[E.current,j]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:E}))}},"7ixt":function(I,Z,N){"use strict";N.d(Z,"a",function(){return T});var P={adjustX:1,adjustY:1},m=[0,0],T={left:{points:["cr","cl"],overflow:P,offset:[-4,0],targetOffset:m},right:{points:["cl","cr"],overflow:P,offset:[4,0],targetOffset:m},top:{points:["bc","tc"],overflow:P,offset:[0,-4],targetOffset:m},bottom:{points:["tc","bc"],overflow:P,offset:[0,4],targetOffset:m},topLeft:{points:["bl","tl"],overflow:P,offset:[0,-4],targetOffset:m},leftTop:{points:["tr","tl"],overflow:P,offset:[-4,0],targetOffset:m},topRight:{points:["br","tr"],overflow:P,offset:[0,-4],targetOffset:m},rightTop:{points:["tl","tr"],overflow:P,offset:[4,0],targetOffset:m},bottomRight:{points:["tr","br"],overflow:P,offset:[0,4],targetOffset:m},rightBottom:{points:["bl","br"],overflow:P,offset:[4,0],targetOffset:m},bottomLeft:{points:["tl","bl"],overflow:P,offset:[0,4],targetOffset:m},leftBottom:{points:["br","bl"],overflow:P,offset:[-4,0],targetOffset:m}},L=T},"815F":function(I,Z,N){"use strict";N.d(Z,"e",function(){return _}),N.d(Z,"c",function(){return o}),N.d(Z,"d",function(){return i}),N.d(Z,"a",function(){return h}),N.d(Z,"f",function(){return p}),N.d(Z,"b",function(){return f});var P=N("KQm4"),m=N("VTBJ"),T=N("Ff2n"),L=N("Zm9Q"),S=N("Kwbf"),g=N("OZM5");function _(x,v){return x!=null?x:v}function d(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=new Map;function l(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(u){var w=u.key,y=u.children;Object(S.a)(w!=null,"Tree node must have a certain key: [".concat(s).concat(w,"]"));var a=String(w);Object(S.a)(!v.has(a)||w===null||w===void 0,"Same 'key' exist in the Tree: ".concat(a)),v.set(a,!0),l(y,"".concat(s).concat(a," > "))})}l(x)}function o(x){function v(l){var n=Object(L.a)(l);return n.map(function(s){if(!Object(g.i)(s))return Object(S.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var u=s.key,w=s.props,y=w.children,a=Object(T.a)(w,["children"]),R=Object(m.a)({key:u},a),D=v(y);return D.length&&(R.children=D),R}).filter(function(s){return s})}return v(x)}function i(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=new Set(v===!0?[]:v),n=[];function s(u){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(y,a){var R=Object(g.h)(w?w.pos:"0",a),D=_(y.key,R),c=Object(m.a)(Object(m.a)({},y),{},{parent:w,pos:R,children:null,data:y,isStart:[].concat(Object(P.a)(w?w.isStart:[]),[a===0]),isEnd:[].concat(Object(P.a)(w?w.isEnd:[]),[a===u.length-1])});return n.push(c),v===!0||l.has(D)?c.children=s(y.children||[],c):c.children=[],c})}return s(x),n}function r(x,v,l){var n;l?typeof l=="string"?n=function(w){return w[l]}:typeof l=="function"&&(n=function(w){return l(w)}):n=function(w,y){return _(w.key,y)};function s(u,w,y){var a=u?u.children:x,R=u?Object(g.h)(y.pos,w):"0";if(u){var D=n(u,R),c={node:u,index:w,pos:R,key:D,parentPos:y.node?y.pos:null,level:y.level+1};v(c)}a&&a.forEach(function(b,E){s(b,E,{node:u,pos:R,level:y?y.level+1:-1})})}s(null)}function h(x){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=v.initWrapper,n=v.processEntity,s=v.onProcessFinished,u=arguments.length>2?arguments[2]:void 0,w={},y={},a={posEntities:w,keyEntities:y};return l&&(a=l(a)||a),r(x,function(R){var D=R.node,c=R.index,b=R.pos,E=R.key,C=R.parentPos,F=R.level,j={node:D,index:c,key:E,pos:b,level:F},k=_(E,b);w[b]=j,y[k]=j,j.parent=w[C],j.parent&&(j.parent.children=j.parent.children||[],j.parent.children.push(j)),n&&n(j,a)},u),s&&s(a),a}function p(x,v){var l=v.expandedKeys,n=v.selectedKeys,s=v.loadedKeys,u=v.loadingKeys,w=v.checkedKeys,y=v.halfCheckedKeys,a=v.dragOverNodeKey,R=v.dropPosition,D=v.keyEntities,c=D[x],b={eventKey:x,expanded:l.indexOf(x)!==-1,selected:n.indexOf(x)!==-1,loaded:s.indexOf(x)!==-1,loading:u.indexOf(x)!==-1,checked:w.indexOf(x)!==-1,halfChecked:y.indexOf(x)!==-1,pos:String(c?c.pos:""),dragOver:a===x&&R===0,dragOverGapTop:a===x&&R===-1,dragOverGapBottom:a===x&&R===1};return b}function f(x){var v=x.data,l=x.expanded,n=x.selected,s=x.checked,u=x.loaded,w=x.loading,y=x.halfChecked,a=x.dragOver,R=x.dragOverGapTop,D=x.dragOverGapBottom,c=x.pos,b=x.active,E=Object(m.a)(Object(m.a)({},v),{},{expanded:l,selected:n,checked:s,loaded:u,loading:w,halfChecked:y,dragOver:a,dragOverGapTop:R,dragOverGapBottom:D,pos:c,active:b});return"props"in E||Object.defineProperty(E,"props",{get:function(){return Object(S.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),x}}),E}},"8EBN":function(I,Z,N){(function(P){P(N("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 m=0;m<P.modeInfo.length;m++){var T=P.modeInfo[m];T.mimes&&(T.mime=T.mimes[0])}P.findModeByMIME=function(L){L=L.toLowerCase();for(var S=0;S<P.modeInfo.length;S++){var g=P.modeInfo[S];if(g.mime==L)return g;if(g.mimes){for(var _=0;_<g.mimes.length;_++)if(g.mimes[_]==L)return g}}if(/\+xml$/.test(L))return P.findModeByMIME("application/xml");if(/\+json$/.test(L))return P.findModeByMIME("application/json")},P.findModeByExtension=function(L){L=L.toLowerCase();for(var S=0;S<P.modeInfo.length;S++){var g=P.modeInfo[S];if(g.ext){for(var _=0;_<g.ext.length;_++)if(g.ext[_]==L)return g}}},P.findModeByFileName=function(L){for(var S=0;S<P.modeInfo.length;S++){var g=P.modeInfo[S];if(g.file&&g.file.test(L))return g}var _=L.lastIndexOf("."),d=_>-1&&L.substring(_+1,L.length);if(d)return P.findModeByExtension(d)},P.findModeByName=function(L){L=L.toLowerCase();for(var S=0;S<P.modeInfo.length;S++){var g=P.modeInfo[S];if(g.name.toLowerCase()==L)return g;if(g.alias){for(var _=0;_<g.alias.length;_++)if(g.alias[_].toLowerCase()==L)return g}}}})},"8hTe":function(I,Z,N){I.exports={button:"button___1wy9m"}},"9Bee":function(I,Z,N){"use strict";var P=N("DYRE"),m=N("zeV3"),T=N("+L6B"),L=N("2/Rp"),S=N("k1fw"),g=N("tJVT"),_=N("cDcd"),d=N.n(_),o=N("vg9a"),i=N("DlQD"),r=N.n(i),h=N("rUJ1");function p(ne,le){var ue=ne.match(/^(\s+)(?:```)/);if(ue===null)return le;var re=ue[1];return le.split(`
`).map(function(oe){var q=oe.match(/^\s+/);if(q===null)return oe;var se=Object(g.a)(q,1),J=se[0];return J.length>=re.length?oe.slice(re.length):oe}).join(`
`)}var f=[],x=["<ul>"],v=new r.a.Renderer,l=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function n(){f.length=0,x=["<ul>"]}var s={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function u(ne,le,ue,re){if(le>=ne.length||ne[le].level<=ue)return le;var oe=ne[le];re.push("<li><a href='#"+oe.anchor+"'>"+oe.text+"</a>"),le++;var q=[];return le=u(ne,le,oe.level,q),q.length>0&&(re.push("<ul>"),q.forEach(function(se){re.push(se)}),re.push("</ul>")),re.push("</li>"),le=u(ne,le,ue,re),le}function w(){return u(f,0,0,x),x.push("</ul>"),x.join("")}var y={heading:function(le){var ue=l.exec(le);if(ue)return{type:"heading",raw:ue[0],depth:ue[1].length,text:ue[2]}},fences:function(le){var ue=this.rules.block.fences.exec(le);if(ue){var re=ue[0],oe=p(re,ue[3]||""),q=ue[2]?ue[2].trim():ue[2];if(["latex","katex","math"].indexOf(q)>=0){var se=D(),J=oe;oe=se,c[se]={type:"block",expression:J}}return{type:"code",raw:re,lang:q,text:oe}}}},a=/(?:\${2})([^\n`]+?)(?:\${2})/gi,R=0,D=function(){return"__special_katext_id_".concat(R++,"__")},c={};function b(){return c}function E(){R=0,c={}}function C(ne){return ne=ne.replace(a,function(le,ue){var re=D();return c[re]={type:"inline",expression:ue},re}),ne}var F=v.listitem;v.listitem=function(ne){return F(C(ne))};var j=v.paragraph;v.paragraph=function(ne){return j(C(ne))};var k=v.tablecell;v.tablecell=function(ne,le){return k(C(ne),le)},v.code=function(ne,le,ue){var re=(le||"").match(/\S*/)[0];return re?["latex","katex","math"].indexOf(re)>=0?"<p class='editormd-tex'>".concat(ne,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(le,'">').concat(ue?ne:Object(h.escape)(ne,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(ue?ne:Object(h.escape)(ne,!0))+"</code></pre>"},v.heading=function(ne,le,ue){var re=this.options.headerPrefix+ue.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return f.push({anchor:re,level:le,text:ne}),"<h"+le+' id="'+re+'">'+ne+"</h"+le+">"},r.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),r.a.use({tokenizer:y,renderer:v});var X=r.a,G=N("SJMd"),H=N("ulZh"),K=N.n(H),B=N("m3rI"),U=N("Oy/b"),W=N("p5ED"),Q=N("8hTe"),ie=N.n(Q),ce=/<pre[^>]*>/g;function he(ne){var le=document.createElement("div");return le.innerHTML=ne,le.childNodes.length===0?"":le.childNodes[0].nodeValue}var be=Z.a=function(ne){var le=ne.value,ue=le===void 0?"":le,re=ne.edit,oe=re===void 0?!1:re,q=ne.className,se=ne.showTextOnly,J=ne.showLines,ee=ne.replaces,ge=ne.zoomImg,te=ne.hasMask,Y=ne.style,z=Y===void 0?{}:Y,$=ne.stylesPrev,me=$===void 0?{}:$,pe=String(ue),xe=Object(_.useRef)(),Re=Object(_.useRef)(),ke=Object(_.useState)(""),Me=Object(g.a)(ke,2),Pe=Me[0],je=Me[1],Fe=Object(_.useState)("office"),We=Object(g.a)(Fe,2),Se=We[0],Xe=We[1],Ye=Object(_.useMemo)(function(){try{var Ce=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ye=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ee=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;pe=pe.replace(Ce,"("+B.a.API_SERVER+"/api/attachments/").replace(ye,'"'+B.a.API_SERVER+"/api/attachments/").replace(Ee,'"'+B.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(Be){}var we=X(pe),Oe=b();if(pe.match(/\[TOC\]/)&&(we=we.replace("<p>[TOC]</p>",w()),n()),we=we.replace(/(__special_katext_id_\d+__)/g,function(Be,ze){var nt=Oe[ze],Ze=nt.type,at=nt.expression;return Object(U.renderToString)(he(at)||"",{displayMode:Ze==="block",throwOnError:!1,output:"html"})}),we=we.replace(/▁/g,"\u2581\u2581\u2581"),E(),se){var Le=document.createElement("div");return Le.innerHTML=we,Le.innerText}return setTimeout(function(){return Ae()},500),we},[pe]),Ie=Object(_.useRef)();s.WebkitLineClamp=J,J&&(z=Object(S.a)(Object(S.a)({},z),s));function He(Ce){var ye=Ce.target;if(ye.tagName.toUpperCase()==="IMG"){if(ge){var Ee=ye.getAttribute("src");je(Ee),Xe("image")}}else if(ye.tagName.toUpperCase()==="A"){var we=ye.getAttribute("href");if(we.indexOf("office")>-1)Ce.preventDefault(),je(we),Xe("office");else if(we.indexOf("application/pdf")>-1)Ce.preventDefault(),je(we),Xe("pdf");else if(we.indexOf("text/html")>-1)Ce.preventDefault(),je(we),Xe("html");else if(we.startsWith("#")){Ce.preventDefault();var Oe=document.getElementById(we.replace("#",""));Oe&&Oe.scrollIntoView(!0)}}}var Ae=function(){var ye,Ee=(ye=Ie.current)===null||ye===void 0?void 0:ye.querySelectorAll("video");Ee==null||Ee.forEach(function(we){if(we.oncontextmenu=function(){return!1},we.src.indexOf(".m3u8")>-1&&!we.canPlayType("application/vnd.apple.mpegurl")){if(K.a.isSupported()){var Oe=new K.a;Oe.loadSource(we.src),Oe.attachMedia(we)}}})};Object(_.useEffect)(function(){if(Ie.current&&Ye&&(Ye.match(ce)&&window.PR.prettyPrint()),Ie.current)return Ie.current.addEventListener("click",He),function(){Ie.current.removeEventListener("click",He),E(),n()}},[Ye,Ie.current,He]);var Te=function(ye){if(!oe)return;ye.target.nodeName==="IMG"?(xe.current.style.display="flex",xe.current.style.width=ye.target.clientWidth+"px",xe.current.style.height=ye.target.clientHeight+"px",xe.current.style.top=ye.target.offsetTop+"px",xe.current.style.left=ye.target.offsetLeft+"px",Re.current.src=ye.target.getAttribute("src")):xe.current.style.display="none"};return d.a.createElement("div",{style:{position:"relative"}},d.a.createElement("div",{ref:Ie,style:Object(S.a)({},z),className:"".concat(q||""," markdown-body ").concat(ie.a.mdBody),onMouseOver:Te,dangerouslySetInnerHTML:{__html:Ye}}),d.a.createElement("div",{ref:xe,className:ie.a.button},d.a.createElement(m.a,null,d.a.createElement(L.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),d.a.createElement(L.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),d.a.createElement("img",{ref:Re,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),d.a.createElement(W.a,{close:!0,data:Pe,type:Pe!=null&&Pe.length?Se:"",style:Object(S.a)({},me),onClose:function(){return je("")}}))}},"9OqN":function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.mode.CTR=function(){var m=P.lib.BlockCipherMode.extend(),T=m.Encryptor=m.extend({processBlock:function(L,S){var g=this._cipher,_=g.blockSize,d=this._iv,o=this._counter;d&&(o=this._counter=d.slice(0),this._iv=void 0);var i=o.slice(0);g.encryptBlock(i,0),o[_-1]=o[_-1]+1|0;for(var r=0;r<_;r++)L[S+r]^=i[r]}});return m.Decryptor=T,m}(),P.mode.CTR})},"9VGf":function(I,Z,N){"use strict";N.d(Z,"a",function(){return T});var P=N("cDcd"),m=N.n(P);function T(L,S){var g=Object(P.useRef)();Object(P.useEffect)(function(){g.current=L}),Object(P.useEffect)(function(){function _(){g.current()}if(S!==null){var d=setInterval(_,S);return function(){return clearInterval(d)}}},[S])}},ALsQ:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.mode.CFB=function(){var m=P.lib.BlockCipherMode.extend();m.Encryptor=m.extend({processBlock:function(L,S){var g=this._cipher,_=g.blockSize;T.call(this,L,S,_,g),this._prevBlock=L.slice(S,S+_)}}),m.Decryptor=m.extend({processBlock:function(L,S){var g=this._cipher,_=g.blockSize,d=L.slice(S,S+_);T.call(this,L,S,_,g),this._prevBlock=d}});function T(L,S,g,_){var d,o=this._iv;o?(d=o.slice(0),this._iv=void 0):d=this._prevBlock,_.encryptBlock(d,0);for(var i=0;i<g;i++)L[S+i]^=d[i]}return m}(),P.mode.CFB})},B7Ph:function(I,Z,N){"use strict";N.d(Z,"a",function(){return ie});var P=N("5NDa"),m=N("5rEg"),T=N("sRBo"),L=N("kaz8"),S=N("5Dmo"),g=N("3S7+"),_=N("14J3"),d=N("BMrR"),o=N("7Kak"),i=N("9yH6"),r=N("+L6B"),h=N("2/Rp"),p=N("2qtc"),f=N("kLXV"),x=N("miYZ"),v=N("tsqr"),l=N("k1fw"),n=N("9og8"),s=N("tJVT"),u=N("oBTY"),w=N("DZo9"),y=N("8z0m"),a=N("WmNS"),R=N.n(a),D=N("cDcd"),c=N.n(D),b=N("Bvq2"),E=N.n(b),C=N("nj2k"),F=N.n(C),j=N("mxV5"),k=N.n(j),X=N("KhGG"),G=N("ErOA"),H=N("7Cbv"),K=N("1vsH"),B=N("p5ED"),U=y.a.Dragger,W=function(he){for(var be=function(ge){return ge&&ge.substring(0,ge.lastIndexOf("."))},ne=Object(u.a)(he),le=0,ue=[],re=0;re<ne.length;re++){for(var oe="",q=0;q<ue.length;q++)if(be(ue[q][0].name)==be(ne[re].name)){le=1,oe=q;break}if(le==1)ue[oe].push(ne[re]),le=0;else if(le==0){var se=new Array;se.push(ne[re]),ue.push(se)}}var J=ue.map(function(ee){if(ee[0].name.includes(".in"))return ee.length===2?ee:[ee[0],{}];if(ee[0].name.includes(".out"))return ee.length===2?ee.reverse():[{},ee[0]]});return J},Q=function(he){var be=he.onClose,ne=he.onOK,le=he.visible,ue=he.wrapClassName,re=he.rootIdentifier,oe=he.multiple,q=oe===void 0?!1:oe,se=he.defaultMultipleValue,J=se===void 0?!0:se,ee=Object(D.useState)([]),ge=Object(s.a)(ee,2),te=ge[0],Y=ge[1],z=Object(D.useState)({}),$=Object(s.a)(z,2),me=$[0],pe=$[1],xe=Object(D.useState)(!1),Re=Object(s.a)(xe,2),ke=Re[0],Me=Re[1],Pe=Object(D.useState)(!0),je=Object(s.a)(Pe,2),Fe=je[0],We=je[1],Se=Object(D.useState)(null),Xe=Object(s.a)(Se,2),Ye=Xe[0],Ie=Xe[1],He=Object(D.useRef)([]),Ae=Object(D.useRef)(0),Te=function(){be()};Object(D.useEffect)(function(){Ce()},[]),Object(D.useEffect)(function(){le&&(He.current=[],Ae.current=0,Y([]),We(J))},[le]);var Ce=function(){var nt=Object(n.a)(R.a.mark(function Ze(){var at,pt;return R.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return it.prev=0,it.next=3,Object(G.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:at=it.sent,(at==null?void 0:at.status)===0&&(at!=null&&at.is_oss?(pt=JSON.parse(Object(X.a)(at.data)),pe(pt),Ie(!1)):Ie(!0)),it.next=9;break;case 7:it.prev=7,it.t0=it.catch(0);case 9:case"end":return it.stop()}},Ze,null,[[0,7]])}));return function(){return nt.apply(this,arguments)}}(),ye=function(Ze){return Ze&&Ze.substring(0,Ze.lastIndexOf("."))},Ee=function(Ze){var at,pt,dt=ye((at=Ze[0])===null||at===void 0?void 0:at.name)||ye((pt=Ze[1])===null||pt===void 0?void 0:pt.name),it=te.filter(function(Lt){return ye(Lt.name)!==dt});He.current=Object(u.a)(it),Y(Object(u.a)(it))},we=function(Ze){if(!Fe){var at=new FormData;at.append("file",Ze.file);var pt=Object(G.a)("/api/attachments/get_file_content.json",{method:"post",body:at},!0);pt.then(function(xt){if(xt.status===0){Ae.current=Ae.current+1;var er=He.current.map(function(Ke){if(Ke.name===Ze.name){var ot,bt=Object(l.a)({},Ke);return Ze!=null&&(ot=Ze.name)!==null&&ot!==void 0&&ot.includes(".in")?bt.input=xt==null?void 0:xt.content:bt.output=xt==null?void 0:xt.content,bt}return Ke});if(He.current=Object(u.a)(er),Y(Object(u.a)(er)),Ae.current>0&&Ae.current===te.length){Me(!1);var Ht=W(er);Ht=Ht.filter(function(Ke){var ot,bt;return!!((ot=Ke[0])!==null&&ot!==void 0&&ot.name&&(bt=Ke[1])!==null&&bt!==void 0&&bt.name)}),Ht=Ht.map(function(Ke){return Object(l.a)(Object(l.a)(Object(l.a)({},Ke[0]),Ke[1]),{},{is_file:!1})}),ne(Ht),be()}}else Me(!1),be()});return}if(Ye){var dt=new FormData;dt.append("file",Ze.file);var it=Object(G.a)("/api/attachments.json",{method:"post",body:dt},!0);it.then(function(xt){if(xt.filename){Ae.current=Ae.current+1;var er=He.current.map(function(Ke){if(Ke.name===(xt==null?void 0:xt.filename)){var ot,bt=Object(l.a)(Object(l.a)({},Ke),{},{is_oss:!Ye});return xt!=null&&(ot=xt.filename)!==null&&ot!==void 0&&ot.includes(".in")?(bt.in_object_key=xt==null?void 0:xt.object,bt.in_object_size=xt==null?void 0:xt.size,bt.input=xt==null?void 0:xt.filename,bt.in_file=Ze):(bt.out_object_key=xt==null?void 0:xt.object,bt.out_object_size=xt==null?void 0:xt.size,bt.output=xt==null?void 0:xt.filename,bt.out_file=Ze),bt}return Ke});if(He.current=Object(u.a)(er),Y(Object(u.a)(er)),Ae.current>0&&Ae.current===te.length){Me(!1);var Ht=W(er);Ht=Ht.filter(function(Ke){var ot,bt;return!!((ot=Ke[0])!==null&&ot!==void 0&&ot.name&&(bt=Ke[1])!==null&&bt!==void 0&&bt.name)}),Ht=Ht.map(function(Ke){return Object(l.a)(Object(l.a)(Object(l.a)({},Ke[0]),Ke[1]),{},{is_file:!0})}),ne(Ht),be()}}else Me(!1),be()});return}var Lt=new k.a({endpoint:me.end_point,region:me.region,accessKeyId:me.access_key_id,accessKeySecret:me.access_key_secret,bucket:me.bucket,stsToken:me.security_token}),Et=Ze.name,Qt={container_type:"TestSet",file_name:Et},Wt=Object(H.a)(),gt="testsets/".concat(re,"/").concat(Wt).concat(Et.indexOf(".")>-1?"."+Et.split(".").pop():"");re===null&&(gt="testsets/".concat(Wt).concat(Et.indexOf(".")>-1?"."+Et.split(".").pop():"")),Lt.multipartUpload(gt,new Blob([Ze.file],{type:Ze.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Et+""},url:me==null?void 0:me.callback_url,host:me==null?void 0:me.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(G.e)(Qt)}}).then(function(xt){if(xt.data.status===0){Ae.current=Ae.current+1;var er=He.current.map(function(Ke){var ot,bt;if(Ke.name===((ot=xt.data)===null||ot===void 0||((bt=ot.data)===null||bt===void 0)?void 0:bt.file_name)){var Ft,Bt,At,Dt=Object(l.a)(Object(l.a)({},Ke),{},{is_oss:!Ye});if((Ft=xt.data)!==null&&Ft!==void 0&&(Bt=Ft.data)!==null&&Bt!==void 0&&(At=Bt.file_name)!==null&&At!==void 0&&At.includes(".in")){var ct,Rt,rr,Yt,Nt,ar;Dt.in_object_key=(ct=xt.data)===null||ct===void 0||((Rt=ct.data)===null||Rt===void 0)?void 0:Rt.object,Dt.in_object_size=(rr=xt.data)===null||rr===void 0||((Yt=rr.data)===null||Yt===void 0)?void 0:Yt.size,Dt.input=(Nt=xt.data)===null||Nt===void 0||((ar=Nt.data)===null||ar===void 0)?void 0:ar.file_name,Dt.in_file=Ze}else{var Mt,Dr,$e,yt,Ur,xr;Dt.out_object_key=(Mt=xt.data)===null||Mt===void 0||((Dr=Mt.data)===null||Dr===void 0)?void 0:Dr.object,Dt.out_object_size=($e=xt.data)===null||$e===void 0||((yt=$e.data)===null||yt===void 0)?void 0:yt.size,Dt.output=(Ur=xt.data)===null||Ur===void 0||((xr=Ur.data)===null||xr===void 0)?void 0:xr.file_name,Dt.out_file=Ze}return Dt}return Ke});if(He.current=Object(u.a)(er),Y(Object(u.a)(er)),Ae.current>0&&Ae.current===te.length){Me(!1);var Ht=W(er);Ht=Ht.filter(function(Ke){var ot,bt;return!!((ot=Ke[0])!==null&&ot!==void 0&&ot.name&&(bt=Ke[1])!==null&&bt!==void 0&&bt.name)}),Ht=Ht.map(function(Ke){return Object(l.a)(Object(l.a)(Object(l.a)({},Ke[0]),Ke[1]),{},{is_file:!0})}),ne(Ht),be()}}})},Oe=function(Ze){return new Promise(function(at,pt){for(var dt=0,it=[],Lt=function(Wt){Ze[Wt].file.slice(0,1).arrayBuffer().then(function(){dt++,dt===Ze.length&&(it.length?(v.b.warn("".concat(it.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),pt()):at(Ze))}).catch(function(gt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",gt),dt++,it.push(Ze[Wt].name),dt===Ze.length&&(it.length?(v.b.warn("".concat(it.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),pt()):at(Ze))})},Et=0;Et<Ze.length;Et++)Lt(Et)})},Le=function(){var nt=Object(n.a)(R.a.mark(function Ze(){var at;return R.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:if(!(te.length===0)){dt.next=3;break}return v.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),dt.abrupt("return");case 3:return dt.next=5,Oe(te);case 5:if(Me(!0),at=W(te),!at.some(function(it){var Lt,Et;return!((Lt=it[0])!==null&&Lt!==void 0&&Lt.name&&(Et=it[1])!==null&&Et!==void 0&&Et.name)})){dt.next=10;break}return f.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:function(){var it=Object(n.a)(R.a.mark(function Et(){return R.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:te.map(function(){var gt=Object(n.a)(R.a.mark(function xt(er){return R.a.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:we(er);case 1:case"end":return Ke.stop()}},xt)}));return function(xt){return gt.apply(this,arguments)}}());case 1:case"end":return Wt.stop()}},Et)}));function Lt(){return it.apply(this,arguments)}return Lt}(),onCancel:function(){Me(!1)}}),dt.abrupt("return");case 10:te.map(function(){var it=Object(n.a)(R.a.mark(function Lt(Et){return R.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:we(Et);case 1:case"end":return Wt.stop()}},Lt)}));return function(Lt){return it.apply(this,arguments)}}());case 11:case"end":return dt.stop()}},Ze)}));return function(){return nt.apply(this,arguments)}}(),Be={name:"file",fileList:te,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(Ze){if(te!=null&&te.some(function(pt){return pt.name===Ze.name}))return v.b.info("".concat(Ze.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Ze.size/1024/1024>100)return v.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Ze.name))return v.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var at={name:Ze.name,uid:Ze.uid,file:Ze,percent:0};return te.push(at),He.current=Object(u.a)(te),Y(Object(u.a)(te)),!1}},ze=W(te);return console.log(te,ze,"fileList"),c.a.createElement(f.a,{visible:le,wrapClassName:ue,onOk:Le,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:ke},onCancel:Te,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},c.a.createElement("div",{className:E.a.wrap},te.length?c.a.createElement("div",null,c.a.createElement(d.a,{justify:"space-between",align:"middle",className:"mb20"},c.a.createElement("div",{style:{visibility:q?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",c.a.createElement(i.a.Group,{className:"ml10",value:Fe,onChange:function(Ze){return We(Ze.target.value)}},c.a.createElement(i.a,{value:!1},"\u6587\u672C"),c.a.createElement(i.a,{value:!0},"\u6587\u4EF6"))),c.a.createElement(y.a,Be,c.a.createElement(h.a,{className:E.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),c.a.createElement(ie,{data:ze,onRemove:Ee})):c.a.createElement("div",{className:E.a.noData},c.a.createElement("img",{src:F.a,alt:""}),c.a.createElement(y.a,Be,c.a.createElement(h.a,{className:E.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),c.a.createElement("div",{className:E.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",c.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",c.a.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",c.a.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",c.a.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",c.a.createElement("br",null))))},ie=function(he){var be=he.data,ne=be===void 0?[]:be,le=he.onRemove,ue=he.width,re=ue===void 0?"auto":ue,oe=he.showScore,q=oe===void 0?!1:oe,se=he.disabled,J=se===void 0?!1:se,ee=he.inputChange,ge=he.onEvaluatingChange,te=he.showEvaluatingSetting,Y=te===void 0?!1:te,z={value:"",filename:"",dataUrl:""},$=Object(D.useState)(Object(l.a)({},z)),me=Object(s.a)($,2),pe=me[0],xe=me[1],Re=function(je){var Fe=document.createElement("a");document.body.appendChild(Fe);var We=URL.createObjectURL(je.file);Fe.href=We,Fe.download=je.name,Fe.click(),URL.revokeObjectURL(We),document.body.removeChild(Fe)},ke=function(je,Fe){Object(K.y)(je,Fe)},Me=function(je,Fe){f.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:c.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){le(je,Fe)},onCancel:function(){}})};return ne.length?c.a.createElement("div",{style:{width:re}},c.a.createElement("div",{className:E.a.head},Y&&c.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",c.a.createElement(g.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},c.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),c.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),c.a.createElement("div",{style:{width:q?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),c.a.createElement("div",{style:{width:q?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),q&&c.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),Y&&c.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",c.a.createElement(g.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},c.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),Y&&c.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",c.a.createElement(g.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},c.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),c.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),ne.map(function(Pe,je){var Fe,We,Se,Xe;return c.a.createElement("div",{key:je,className:E.a.list},Y&&c.a.createElement("div",{style:{width:"10%"}},c.a.createElement(L.a,{checked:!!Pe.hidden,onChange:function(Ie){ge(Ie.target.checked?1:0,je,"hidden")}})),c.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",je+1),c.a.createElement("div",{className:E.a.info,style:{width:q?"25%":"35%"}},c.a.createElement("span",{title:Pe.input||((Fe=Pe[0])===null||Fe===void 0?void 0:Fe.name),onClick:Object(n.a)(R.a.mark(function Ye(){var Ie,He;return R.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(Pe.input?Pe.input_file_url?Ie=Pe.input_file_url:Ie=Pe.in_file:Ie=Pe[0],!(typeof Ie=="string")){Te.next=14;break}return Te.next=4,fetch(Ie,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return He=Te.sent,Te.t0=xe,Te.next=8,He.text();case 8:Te.t1=Te.sent,Te.t2=Ie,Te.t3={value:Te.t1,filename:"",dataUrl:Te.t2},(0,Te.t0)(Te.t3),Te.next=18;break;case 14:return Te.next=16,Object(K.H)(Ie.file);case 16:He=Te.sent,xe({value:He.text,filename:Ie.name,dataUrl:He.link});case 18:case"end":return Te.stop()}},Ye)}))},Pe.input||((We=Pe[0])===null||We===void 0?void 0:We.name))),c.a.createElement("div",{className:E.a.info,style:{width:q?"25%":"35%"}},c.a.createElement("span",{title:Pe.output||((Se=Pe[1])===null||Se===void 0?void 0:Se.name),onClick:Object(n.a)(R.a.mark(function Ye(){var Ie,He;return R.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(Pe.input?Pe.output_file_url?Ie=Pe.output_file_url:Ie=Pe.out_file:Ie=Pe[1],!(typeof Ie=="string")){Te.next=14;break}return Te.next=4,fetch(Ie,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return He=Te.sent,Te.t0=xe,Te.next=8,He.text();case 8:Te.t1=Te.sent,Te.t2=Ie,Te.t3={value:Te.t1,filename:"",dataUrl:Te.t2},(0,Te.t0)(Te.t3),Te.next=18;break;case 14:return Te.next=16,Object(K.H)(Ie.file);case 16:He=Te.sent,xe({value:He.text,filename:Ie.name,dataUrl:He.link});case 18:case"end":return Te.stop()}},Ye)}))},Pe.output||((Xe=Pe[1])===null||Xe===void 0?void 0:Xe.name))),q&&c.a.createElement("div",{style:{width:"20%"}},c.a.createElement(m.a,{disabled:J,style:{width:"70%"},onChange:function(Ie){return ee(Ie,je)},value:Pe.score}),c.a.createElement("span",null,"\xA0%")),Y&&c.a.createElement("div",{style:{width:"20%"}},c.a.createElement(L.a,{checked:Pe.is_invisible||!1,onChange:function(Ie){ge(Ie.target.checked,je,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),Y&&c.a.createElement("div",{style:{width:"20%"}},c.a.createElement(L.a,{checked:Pe.last_match_rule||!1,onChange:function(Ie){ge(Ie.target.checked,je,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),c.a.createElement("div",{onClick:function(){return Me(Pe,je)},style:{width:"10%"}},c.a.createElement("span",{className:E.a.del},"\u5220\u9664")))}),c.a.createElement(B.a,{close:!0,data:pe.dataUrl,filename:pe.filename,type:pe.dataUrl.length?"txt":"",onClose:function(){return xe(Object(l.a)({},z))},monacoEditor:{value:pe.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):c.a.createElement(c.a.Fragment,null)};Z.b=Q},Bd2K:function(I,Z,N){(function(P){P(N("VrN/"),N("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(o,i,r){if(r!=P.Init&&r&&o.removeKeyMap("autoCloseTags"),!i)return;var h={name:"autoCloseTags"};(typeof i!="object"||i.whenClosing!==!1)&&(h["'/'"]=function(p){return g(p)}),(typeof i!="object"||i.whenOpening!==!1)&&(h["'>'"]=function(p){return L(p)}),o.addKeyMap(h)});var m=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["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 L(o){if(o.getOption("disableInput"))return P.Pass;for(var i=o.listSelections(),r=[],h=o.getOption("autoCloseTags"),p=0;p<i.length;p++){if(!i[p].empty())return P.Pass;var f=i[p].head,x=o.getTokenAt(f),v=P.innerMode(o.getMode(),x.state),l=v.state,n=v.mode.xmlCurrentTag&&v.mode.xmlCurrentTag(l),s=n&&n.name;if(!s)return P.Pass;var u=v.mode.configuration=="html",w=typeof h=="object"&&h.dontCloseTags||u&&m,y=typeof h=="object"&&h.indentTags||u&&T;x.end>f.ch&&(s=s.slice(0,s.length-x.end+f.ch));var a=s.toLowerCase();if(!s||x.type=="string"&&(x.end!=f.ch||!/[\"\']/.test(x.string.charAt(x.string.length-1))||x.string.length==1)||x.type=="tag"&&n.close||x.string.indexOf("/")==f.ch-x.start-1||w&&_(w,a)>-1||d(o,v.mode.xmlCurrentContext&&v.mode.xmlCurrentContext(l)||[],s,f,!0))return P.Pass;var R=typeof h=="object"&&h.emptyTags;if(R&&_(R,s)>-1){r[p]={text:"/>",newPos:P.Pos(f.line,f.ch+2)};continue}var D=y&&_(y,a)>-1;r[p]={indent:D,text:">"+(D?`
`:"")+"</"+s+">",newPos:D?P.Pos(f.line+1,0):P.Pos(f.line,f.ch+1)}}for(var c=typeof h=="object"&&h.dontIndentOnAutoClose,p=i.length-1;p>=0;p--){var b=r[p];o.replaceRange(b.text,i[p].head,i[p].anchor,"+insert");var E=o.listSelections().slice(0);E[p]={head:b.newPos,anchor:b.newPos},o.setSelections(E),!c&&b.indent&&(o.indentLine(b.newPos.line,null,!0),o.indentLine(b.newPos.line+1,null,!0))}}function S(o,i){for(var r=o.listSelections(),h=[],p=i?"/":"</",f=o.getOption("autoCloseTags"),x=typeof f=="object"&&f.dontIndentOnSlash,v=0;v<r.length;v++){if(!r[v].empty())return P.Pass;var l=r[v].head,n=o.getTokenAt(l),s=P.innerMode(o.getMode(),n.state),u=s.state;if(i&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=l.ch-1))return P.Pass;var w,y=s.mode.name!="xml"&&o.getMode().name=="htmlmixed";if(y&&s.mode.name=="javascript")w=p+"script";else if(y&&s.mode.name=="css")w=p+"style";else{var a=s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(u);if(!a||a.length&&d(o,a,a[a.length-1],l))return P.Pass;w=p+a[a.length-1]}o.getLine(l.line).charAt(n.end)!=">"&&(w+=">"),h[v]=w}if(o.replaceSelections(h),r=o.listSelections(),!x)for(var v=0;v<r.length;v++)(v==r.length-1||r[v].head.line<r[v+1].head.line)&&o.indentLine(r[v].head.line)}function g(o){return o.getOption("disableInput")?P.Pass:S(o,!0)}P.commands.closeTag=function(o){return S(o)};function _(o,i){if(o.indexOf)return o.indexOf(i);for(var r=0,h=o.length;r<h;++r)if(o[r]==i)return r;return-1}function d(o,i,r,h,p){if(!P.scanForClosingTag)return!1;var f=Math.min(o.lastLine()+1,h.line+500),x=P.scanForClosingTag(o,h,null,f);if(!x||x.tag!=r)return!1;for(var v=p?1:0,l=i.length-1;l>=0&&i[l]==r;l--)++v;h=x.to;for(var l=1;l<v;l++){var n=P.scanForClosingTag(o,h,null,f);if(!n||n.tag!=r)return!1;h=n.to}return!0}})},BjJ7:function(I,Z,N){"use strict";N.d(Z,"d",function(){return m}),N.d(Z,"c",function(){return T}),N.d(Z,"e",function(){return L}),N.d(Z,"b",function(){return S}),N.d(Z,"a",function(){return _});var P=N("m3rI");function m(d){var o=!0;if(d.length>0){for(var i=0;i<d.length;i++)if(d[i].compile_success==0||!d[i].compile_success){o=!1;break}}else o=!1;return o}function T(d){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=[],r=0;r<d.length;r++){var h=d[r],p=o?"".concat(o,"/").concat(h.name):"".concat(h.name);i.push({title:h.name,isLeaf:!(h.type==="tree"),key:p})}return i}function L(d,o,i){for(var r=0;r<d.length;r++){var h=d[r];if(h.key===o){h.children=i;break}h.children&&L(h.children,o,i)}return d}function S(d,o,i){var r;return function(){var h=this,p=arguments,f=function(){r=null,i||d.apply(h,p)},x=i&&!r;clearTimeout(r),r=setTimeout(f,o),x&&d.apply(h,p)}}var g=!0,_=P.a.API_SERVER},Bvq2:function(I,Z,N){I.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(I,Z,N){},CrYA:function(I,Z,N){var P=N("MFOe"),m=P.Global;I.exports={name:"sessionStorage",read:L,write:S,each:g,remove:_,clearAll:d};function T(){return m.sessionStorage}function L(o){return T().getItem(o)}function S(o,i){return T().setItem(o,i)}function g(o){for(var i=T().length-1;i>=0;i--){var r=T().key(i);o(L(r),r)}}function _(o){return T().removeItem(o)}function d(){return T().clear()}},DlQD:function(I,Z,N){(function(P,m){I.exports=m()})(this,function(){"use strict";function P(Ae,Te){for(var Ce=0;Ce<Te.length;Ce++){var ye=Te[Ce];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(Ae,ye.key,ye)}}function m(Ae,Te,Ce){return Te&&P(Ae.prototype,Te),Ce&&P(Ae,Ce),Ae}function T(Ae,Te){if(!Ae)return;if(typeof Ae=="string")return L(Ae,Te);var Ce=Object.prototype.toString.call(Ae).slice(8,-1);if(Ce==="Object"&&Ae.constructor&&(Ce=Ae.constructor.name),Ce==="Map"||Ce==="Set")return Array.from(Ae);if(Ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ce))return L(Ae,Te)}function L(Ae,Te){(Te==null||Te>Ae.length)&&(Te=Ae.length);for(var Ce=0,ye=new Array(Te);Ce<Te;Ce++)ye[Ce]=Ae[Ce];return ye}function S(Ae,Te){var Ce;if(typeof Symbol=="undefined"||Ae[Symbol.iterator]==null){if(Array.isArray(Ae)||(Ce=T(Ae))||Te&&Ae&&typeof Ae.length=="number"){Ce&&(Ae=Ce);var ye=0;return function(){return ye>=Ae.length?{done:!0}:{done:!1,value:Ae[ye++]}}}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 Ce=Ae[Symbol.iterator](),Ce.next.bind(Ce)}function g(Ae,Te){return Te={exports:{}},Ae(Te,Te.exports),Te.exports}var _=g(function(Ae){function Te(){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 Ce(ye){Ae.exports.defaults=ye}Ae.exports={defaults:Te(),getDefaults:Te,changeDefaults:Ce}}),d=_.defaults,o=_.getDefaults,i=_.changeDefaults,r=/[&<>"']/,h=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,f=/[<>"']|&(?!#?\w+;)/g,x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},v=function(Te){return x[Te]};function l(Ae,Te){if(Te){if(r.test(Ae))return Ae.replace(h,v)}else if(p.test(Ae))return Ae.replace(f,v);return Ae}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Ae){return Ae.replace(n,function(Te,Ce){return Ce=Ce.toLowerCase(),Ce==="colon"?":":Ce.charAt(0)==="#"?Ce.charAt(1)==="x"?String.fromCharCode(parseInt(Ce.substring(2),16)):String.fromCharCode(+Ce.substring(1)):""})}var u=/(^|[^\[])\^/g;function w(Ae,Te){Ae=Ae.source||Ae,Te=Te||"";var Ce={replace:function(Ee,we){return we=we.source||we,we=we.replace(u,"$1"),Ae=Ae.replace(Ee,we),Ce},getRegex:function(){return new RegExp(Ae,Te)}};return Ce}var y=/[^\w:]/g,a=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(Ae,Te,Ce){if(Ae){var ye;try{ye=decodeURIComponent(s(Ce)).replace(y,"").toLowerCase()}catch(Ee){return null}if(ye.indexOf("javascript:")===0||ye.indexOf("vbscript:")===0||ye.indexOf("data:")===0)return null}Te&&!a.test(Ce)&&(Ce=C(Te,Ce));try{Ce=encodeURI(Ce).replace(/%25/g,"%")}catch(Ee){return null}return Ce}var D={},c=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(Ae,Te){D[" "+Ae]||(c.test(Ae)?D[" "+Ae]=Ae+"/":D[" "+Ae]=X(Ae,"/",!0)),Ae=D[" "+Ae];var Ce=Ae.indexOf(":")===-1;return Te.substring(0,2)==="//"?Ce?Te:Ae.replace(b,"$1")+Te:Te.charAt(0)==="/"?Ce?Te:Ae.replace(E,"$1")+Te:Ae+Te}var F={exec:function(){}};function j(Ae){for(var Te=1,Ce,ye;Te<arguments.length;Te++){Ce=arguments[Te];for(ye in Ce)Object.prototype.hasOwnProperty.call(Ce,ye)&&(Ae[ye]=Ce[ye])}return Ae}function k(Ae,Te){var Ce=Ae.replace(/\|/g,function(we,Oe,Le){for(var Be=!1,ze=Oe;--ze>=0&&Le[ze]==="\\";)Be=!Be;return Be?"|":" |"}),ye=Ce.split(/ \|/),Ee=0;if(ye.length>Te)ye.splice(Te);else for(;ye.length<Te;)ye.push("");for(;Ee<ye.length;Ee++)ye[Ee]=ye[Ee].trim().replace(/\\\|/g,"|");return ye}function X(Ae,Te,Ce){var ye=Ae.length;if(ye===0)return"";for(var Ee=0;Ee<ye;){var we=Ae.charAt(ye-Ee-1);if(we===Te&&!Ce)Ee++;else if(we!==Te&&Ce)Ee++;else break}return Ae.substr(0,ye-Ee)}function G(Ae,Te){if(Ae.indexOf(Te[1])===-1)return-1;for(var Ce=Ae.length,ye=0,Ee=0;Ee<Ce;Ee++)if(Ae[Ee]==="\\")Ee++;else if(Ae[Ee]===Te[0])ye++;else if(Ae[Ee]===Te[1]&&(ye--,ye<0))return Ee;return-1}function H(Ae){Ae&&Ae.sanitize&&!Ae.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var K={escape:l,unescape:s,edit:w,cleanUrl:R,resolveUrl:C,noopTest:F,merge:j,splitCells:k,rtrim:X,findClosingBracket:G,checkSanitizeDeprecation:H},B=_.defaults,U=K.rtrim,W=K.splitCells,Q=K.escape,ie=K.findClosingBracket;function ce(Ae,Te,Ce){var ye=Te.href,Ee=Te.title?Q(Te.title):null,we=Ae[1].replace(/\\([\[\]])/g,"$1");return Ae[0].charAt(0)!=="!"?{type:"link",raw:Ce,href:ye,title:Ee,text:we}:{type:"image",raw:Ce,href:ye,title:Ee,text:Q(we)}}function he(Ae,Te){var Ce=Ae.match(/^(\s+)(?:```)/);if(Ce===null)return Te;var ye=Ce[1];return Te.split(`
`).map(function(Ee){var we=Ee.match(/^\s+/);if(we===null)return Ee;var Oe=we[0];return Oe.length>=ye.length?Ee.slice(ye.length):Ee}).join(`
`)}var be=function(){function Ae(Ce){this.options=Ce||B}var Te=Ae.prototype;return Te.space=function(ye){var Ee=this.rules.block.newline.exec(ye);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:`
`}},Te.code=function(ye,Ee){var we=this.rules.block.code.exec(ye);if(we){var Oe=Ee[Ee.length-1];if(Oe&&Oe.type==="paragraph")return{raw:we[0],text:we[0].trimRight()};var Le=we[0].replace(/^ {4}/gm,"");return{type:"code",raw:we[0],codeBlockStyle:"indented",text:this.options.pedantic?Le:U(Le,`
`)}}},Te.fences=function(ye){var Ee=this.rules.block.fences.exec(ye);if(Ee){var we=Ee[0],Oe=he(we,Ee[3]||"");return{type:"code",raw:we,lang:Ee[2]?Ee[2].trim():Ee[2],text:Oe}}},Te.heading=function(ye){var Ee=this.rules.block.heading.exec(ye);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},Te.nptable=function(ye){var Ee=this.rules.block.nptable.exec(ye);if(Ee){var we={type:"table",header:W(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
`):[],raw:Ee[0]};if(we.header.length===we.align.length){var Oe=we.align.length,Le;for(Le=0;Le<Oe;Le++)/^ *-+: *$/.test(we.align[Le])?we.align[Le]="right":/^ *:-+: *$/.test(we.align[Le])?we.align[Le]="center":/^ *:-+ *$/.test(we.align[Le])?we.align[Le]="left":we.align[Le]=null;for(Oe=we.cells.length,Le=0;Le<Oe;Le++)we.cells[Le]=W(we.cells[Le],we.header.length);return we}}},Te.hr=function(ye){var Ee=this.rules.block.hr.exec(ye);if(Ee)return{type:"hr",raw:Ee[0]}},Te.blockquote=function(ye){var Ee=this.rules.block.blockquote.exec(ye);if(Ee){var we=Ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ee[0],text:we}}},Te.list=function(ye){var Ee=this.rules.block.list.exec(ye);if(Ee){for(var we=Ee[0],Oe=Ee[2],Le=Oe.length>1,Be=Oe[Oe.length-1]===")",ze={type:"list",raw:we,ordered:Le,start:Le?+Oe.slice(0,-1):"",loose:!1,items:[]},nt=Ee[0].match(this.rules.block.item),Ze=!1,at,pt,dt,it,Lt,Et,Qt,Wt=nt.length,gt=0;gt<Wt;gt++)at=nt[gt],we=at,pt=at.length,at=at.replace(/^ *([*+-]|\d+[.)]) */,""),~at.indexOf(`
`)&&(pt-=at.length,at=this.options.pedantic?at.replace(/^ {1,4}/gm,""):at.replace(new RegExp("^ {1,"+pt+"}","gm"),"")),gt!==Wt-1&&(dt=this.rules.block.bullet.exec(nt[gt+1])[0],(Le?dt.length===1||!Be&&dt[dt.length-1]===")":dt.length>1||this.options.smartLists&&dt!==Oe)&&(it=nt.slice(gt+1).join(`
`),ze.raw=ze.raw.substring(0,ze.raw.length-it.length),gt=Wt-1)),Lt=Ze||/\n\n(?!\s*$)/.test(at),gt!==Wt-1&&(Ze=at.charAt(at.length-1)===`
`,Lt||(Lt=Ze)),Lt&&(ze.loose=!0),Et=/^\[[ xX]\] /.test(at),Qt=void 0,Et&&(Qt=at[1]!==" ",at=at.replace(/^\[[ xX]\] +/,"")),ze.items.push({type:"list_item",raw:we,task:Et,checked:Qt,loose:Lt,text:at});return ze}},Te.html=function(ye){var Ee=this.rules.block.html.exec(ye);if(Ee)return{type:this.options.sanitize?"paragraph":"html",raw:Ee[0],pre:!this.options.sanitizer&&(Ee[1]==="pre"||Ee[1]==="script"||Ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):Q(Ee[0]):Ee[0]}},Te.def=function(ye){var Ee=this.rules.block.def.exec(ye);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var we=Ee[1].toLowerCase().replace(/\s+/g," ");return{tag:we,raw:Ee[0],href:Ee[2],title:Ee[3]}}},Te.table=function(ye){var Ee=this.rules.block.table.exec(ye);if(Ee){var we={type:"table",header:W(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
`):[]};if(we.header.length===we.align.length){we.raw=Ee[0];var Oe=we.align.length,Le;for(Le=0;Le<Oe;Le++)/^ *-+: *$/.test(we.align[Le])?we.align[Le]="right":/^ *:-+: *$/.test(we.align[Le])?we.align[Le]="center":/^ *:-+ *$/.test(we.align[Le])?we.align[Le]="left":we.align[Le]=null;for(Oe=we.cells.length,Le=0;Le<Oe;Le++)we.cells[Le]=W(we.cells[Le].replace(/^ *\| *| *\| *$/g,""),we.header.length);return we}}},Te.lheading=function(ye){var Ee=this.rules.block.lheading.exec(ye);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[2].charAt(0)==="="?1:2,text:Ee[1]}},Te.paragraph=function(ye){var Ee=this.rules.block.paragraph.exec(ye);if(Ee)return{type:"paragraph",raw:Ee[0],text:Ee[1].charAt(Ee[1].length-1)===`
`?Ee[1].slice(0,-1):Ee[1]}},Te.text=function(ye,Ee){var we=this.rules.block.text.exec(ye);if(we){var Oe=Ee[Ee.length-1];return Oe&&Oe.type==="text"?{raw:we[0],text:we[0]}:{type:"text",raw:we[0],text:we[0]}}},Te.escape=function(ye){var Ee=this.rules.inline.escape.exec(ye);if(Ee)return{type:"escape",raw:Ee[0],text:Q(Ee[1])}},Te.tag=function(ye,Ee,we){var Oe=this.rules.inline.tag.exec(ye);if(Oe)return!Ee&&/^<a /i.test(Oe[0])?Ee=!0:Ee&&/^<\/a>/i.test(Oe[0])&&(Ee=!1),!we&&/^<(pre|code|kbd|script)(\s|>)/i.test(Oe[0])?we=!0:we&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Oe[0])&&(we=!1),{type:this.options.sanitize?"text":"html",raw:Oe[0],inLink:Ee,inRawBlock:we,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):Q(Oe[0]):Oe[0]}},Te.link=function(ye){var Ee=this.rules.inline.link.exec(ye);if(Ee){var we=ie(Ee[2],"()");if(we>-1){var Oe=Ee[0].indexOf("!")===0?5:4,Le=Oe+Ee[1].length+we;Ee[2]=Ee[2].substring(0,we),Ee[0]=Ee[0].substring(0,Le).trim(),Ee[3]=""}var Be=Ee[2],ze="";if(this.options.pedantic){var nt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Be);nt?(Be=nt[1],ze=nt[3]):ze=""}else ze=Ee[3]?Ee[3].slice(1,-1):"";Be=Be.trim().replace(/^<([\s\S]*)>$/,"$1");var Ze=ce(Ee,{href:Be&&Be.replace(this.rules.inline._escapes,"$1"),title:ze&&ze.replace(this.rules.inline._escapes,"$1")},Ee[0]);return Ze}},Te.reflink=function(ye,Ee){var we;if((we=this.rules.inline.reflink.exec(ye))||(we=this.rules.inline.nolink.exec(ye))){var Oe=(we[2]||we[1]).replace(/\s+/g," ");if(Oe=Ee[Oe.toLowerCase()],!Oe||!Oe.href){var Le=we[0].charAt(0);return{type:"text",raw:Le,text:Le}}var Be=ce(we,Oe,we[0]);return Be}},Te.strong=function(ye,Ee,we){we===void 0&&(we="");var Oe=this.rules.inline.strong.start.exec(ye);if(Oe&&(!Oe[1]||Oe[1]&&(we===""||this.rules.inline.punctuation.exec(we)))){Ee=Ee.slice(-1*ye.length);var Le=Oe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Le.lastIndex=0;for(var Be;(Oe=Le.exec(Ee))!=null;)if(Be=this.rules.inline.strong.middle.exec(Ee.slice(0,Oe.index+3)),Be)return{type:"strong",raw:ye.slice(0,Be[0].length),text:ye.slice(2,Be[0].length-2)}}},Te.em=function(ye,Ee,we){we===void 0&&(we="");var Oe=this.rules.inline.em.start.exec(ye);if(Oe&&(!Oe[1]||Oe[1]&&(we===""||this.rules.inline.punctuation.exec(we)))){Ee=Ee.slice(-1*ye.length);var Le=Oe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Le.lastIndex=0;for(var Be;(Oe=Le.exec(Ee))!=null;)if(Be=this.rules.inline.em.middle.exec(Ee.slice(0,Oe.index+2)),Be)return{type:"em",raw:ye.slice(0,Be[0].length),text:ye.slice(1,Be[0].length-1)}}},Te.codespan=function(ye){var Ee=this.rules.inline.code.exec(ye);if(Ee){var we=Ee[2].replace(/\n/g," "),Oe=/[^ ]/.test(we),Le=we.startsWith(" ")&&we.endsWith(" ");return Oe&&Le&&(we=we.substring(1,we.length-1)),we=Q(we,!0),{type:"codespan",raw:Ee[0],text:we}}},Te.br=function(ye){var Ee=this.rules.inline.br.exec(ye);if(Ee)return{type:"br",raw:Ee[0]}},Te.del=function(ye){var Ee=this.rules.inline.del.exec(ye);if(Ee)return{type:"del",raw:Ee[0],text:Ee[1]}},Te.autolink=function(ye,Ee){var we=this.rules.inline.autolink.exec(ye);if(we){var Oe,Le;return we[2]==="@"?(Oe=Q(this.options.mangle?Ee(we[1]):we[1]),Le="mailto:"+Oe):(Oe=Q(we[1]),Le=Oe),{type:"link",raw:we[0],text:Oe,href:Le,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Te.url=function(ye,Ee){var we;if(we=this.rules.inline.url.exec(ye)){var Oe,Le;if(we[2]==="@")Oe=Q(this.options.mangle?Ee(we[0]):we[0]),Le="mailto:"+Oe;else{var Be;do Be=we[0],we[0]=this.rules.inline._backpedal.exec(we[0])[0];while(Be!==we[0]);Oe=Q(we[0]),we[1]==="www."?Le="http://"+Oe:Le=Oe}return{type:"link",raw:we[0],text:Oe,href:Le,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Te.inlineText=function(ye,Ee,we){var Oe=this.rules.inline.text.exec(ye);if(Oe){var Le;return Ee?Le=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):Q(Oe[0]):Oe[0]:Le=Q(this.options.smartypants?we(Oe[0]):Oe[0]),{type:"text",raw:Oe[0],text:Le}}},Ae}(),ne=K.noopTest,le=K.edit,ue=K.merge,re={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:ne,table:ne,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};re._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,re._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,re.def=le(re.def).replace("label",re._label).replace("title",re._title).getRegex(),re.bullet=/(?:[*+-]|\d{1,9}[.)])/,re.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,re.item=le(re.item,"gm").replace(/bull/g,re.bullet).getRegex(),re.list=le(re.list).replace(/bull/g,re.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+re.def.source+")").getRegex(),re._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",re._comment=/<!--(?!-?>)[\s\S]*?-->/,re.html=le(re.html,"i").replace("comment",re._comment).replace("tag",re._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),re.paragraph=le(re._paragraph).replace("hr",re.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",re._tag).getRegex(),re.blockquote=le(re.blockquote).replace("paragraph",re.paragraph).getRegex(),re.normal=ue({},re),re.gfm=ue({},re.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*|$)"}),re.gfm.nptable=le(re.gfm.nptable).replace("hr",re.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",re._tag).getRegex(),re.gfm.table=le(re.gfm.table).replace("hr",re.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",re._tag).getRegex(),re.pedantic=ue({},re.normal,{html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",re._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:ne,paragraph:le(re.normal._paragraph).replace("hr",re.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",re.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var oe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ne,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:ne,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};oe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",oe.punctuation=le(oe.punctuation).replace(/punctuation/g,oe._punctuation).getRegex(),oe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",oe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",oe.em.start=le(oe.em.start).replace(/punctuation/g,oe._punctuation).getRegex(),oe.em.middle=le(oe.em.middle).replace(/punctuation/g,oe._punctuation).replace(/overlapSkip/g,oe._overlapSkip).getRegex(),oe.em.endAst=le(oe.em.endAst,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.em.endUnd=le(oe.em.endUnd,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.start=le(oe.strong.start).replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.middle=le(oe.strong.middle).replace(/punctuation/g,oe._punctuation).replace(/blockSkip/g,oe._blockSkip).getRegex(),oe.strong.endAst=le(oe.strong.endAst,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.endUnd=le(oe.strong.endUnd,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.blockSkip=le(oe._blockSkip,"g").getRegex(),oe.overlapSkip=le(oe._overlapSkip,"g").getRegex(),oe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,oe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,oe._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])?)+(?![-_])/,oe.autolink=le(oe.autolink).replace("scheme",oe._scheme).replace("email",oe._email).getRegex(),oe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,oe.tag=le(oe.tag).replace("comment",re._comment).replace("attribute",oe._attribute).getRegex(),oe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,oe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,oe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,oe.link=le(oe.link).replace("label",oe._label).replace("href",oe._href).replace("title",oe._title).getRegex(),oe.reflink=le(oe.reflink).replace("label",oe._label).getRegex(),oe.reflinkSearch=le(oe.reflinkSearch,"g").replace("reflink",oe.reflink).replace("nolink",oe.nolink).getRegex(),oe.normal=ue({},oe),oe.pedantic=ue({},oe.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:le(/^!?\[(label)\]\((.*?)\)/).replace("label",oe._label).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oe._label).getRegex()}),oe.gfm=ue({},oe.normal,{escape:le(oe.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),oe.gfm.url=le(oe.gfm.url,"i").replace("email",oe.gfm._extended_email).getRegex(),oe.breaks=ue({},oe.gfm,{br:le(oe.br).replace("{2,}","*").getRegex(),text:le(oe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var q={block:re,inline:oe},se=_.defaults,J=q.block,ee=q.inline;function ge(Ae){return Ae.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function te(Ae){var Te="",Ce,ye,Ee=Ae.length;for(Ce=0;Ce<Ee;Ce++)ye=Ae.charCodeAt(Ce),Math.random()>.5&&(ye="x"+ye.toString(16)),Te+="&#"+ye+";";return Te}var Y=function(){function Ae(Ce){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ce||se,this.options.tokenizer=this.options.tokenizer||new be,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ye={block:J.normal,inline:ee.normal};this.options.pedantic?(ye.block=J.pedantic,ye.inline=ee.pedantic):this.options.gfm&&(ye.block=J.gfm,this.options.breaks?ye.inline=ee.breaks:ye.inline=ee.gfm),this.tokenizer.rules=ye}Ae.lex=function(ye,Ee){var we=new Ae(Ee);return we.lex(ye)};var Te=Ae.prototype;return Te.lex=function(ye){return ye=ye.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ye,this.tokens,!0),this.inline(this.tokens),this.tokens},Te.blockTokens=function(ye,Ee,we){Ee===void 0&&(Ee=[]),we===void 0&&(we=!0),ye=ye.replace(/^ +$/gm,"");for(var Oe,Le,Be,ze;ye;){if(Oe=this.tokenizer.space(ye)){ye=ye.substring(Oe.raw.length),Oe.type&&Ee.push(Oe);continue}if(Oe=this.tokenizer.code(ye,Ee)){ye=ye.substring(Oe.raw.length),Oe.type?Ee.push(Oe):(ze=Ee[Ee.length-1],ze.raw+=`
`+Oe.raw,ze.text+=`
`+Oe.text);continue}if(Oe=this.tokenizer.fences(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.heading(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.nptable(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.hr(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.blockquote(ye)){ye=ye.substring(Oe.raw.length),Oe.tokens=this.blockTokens(Oe.text,[],we),Ee.push(Oe);continue}if(Oe=this.tokenizer.list(ye)){for(ye=ye.substring(Oe.raw.length),Be=Oe.items.length,Le=0;Le<Be;Le++)Oe.items[Le].tokens=this.blockTokens(Oe.items[Le].text,[],!1);Ee.push(Oe);continue}if(Oe=this.tokenizer.html(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(we&&(Oe=this.tokenizer.def(ye))){ye=ye.substring(Oe.raw.length),this.tokens.links[Oe.tag]||(this.tokens.links[Oe.tag]={href:Oe.href,title:Oe.title});continue}if(Oe=this.tokenizer.table(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.lheading(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(we&&(Oe=this.tokenizer.paragraph(ye))){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.text(ye,Ee)){ye=ye.substring(Oe.raw.length),Oe.type?Ee.push(Oe):(ze=Ee[Ee.length-1],ze.raw+=`
`+Oe.raw,ze.text+=`
`+Oe.text);continue}if(ye){var nt="Infinite loop on byte: "+ye.charCodeAt(0);if(this.options.silent){console.error(nt);break}else throw new Error(nt)}}return Ee},Te.inline=function(ye){var Ee,we,Oe,Le,Be,ze,nt=ye.length;for(Ee=0;Ee<nt;Ee++){ze=ye[Ee];switch(ze.type){case"paragraph":case"text":case"heading":{ze.tokens=[],this.inlineTokens(ze.text,ze.tokens);break}case"table":{for(ze.tokens={header:[],cells:[]},Le=ze.header.length,we=0;we<Le;we++)ze.tokens.header[we]=[],this.inlineTokens(ze.header[we],ze.tokens.header[we]);for(Le=ze.cells.length,we=0;we<Le;we++)for(Be=ze.cells[we],ze.tokens.cells[we]=[],Oe=0;Oe<Be.length;Oe++)ze.tokens.cells[we][Oe]=[],this.inlineTokens(Be[Oe],ze.tokens.cells[we][Oe]);break}case"blockquote":{this.inline(ze.tokens);break}case"list":{for(Le=ze.items.length,we=0;we<Le;we++)this.inline(ze.items[we].tokens);break}}}return ye},Te.inlineTokens=function(ye,Ee,we,Oe,Le){Ee===void 0&&(Ee=[]),we===void 0&&(we=!1),Oe===void 0&&(Oe=!1),Le===void 0&&(Le="");var Be,ze=ye,nt;if(this.tokens.links){var Ze=Object.keys(this.tokens.links);if(Ze.length>0)for(;(nt=this.tokenizer.rules.inline.reflinkSearch.exec(ze))!=null;)Ze.includes(nt[0].slice(nt[0].lastIndexOf("[")+1,-1))&&(ze=ze.slice(0,nt.index)+"["+"a".repeat(nt[0].length-2)+"]"+ze.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(nt=this.tokenizer.rules.inline.blockSkip.exec(ze))!=null;)ze=ze.slice(0,nt.index)+"["+"a".repeat(nt[0].length-2)+"]"+ze.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ye;){if(Be=this.tokenizer.escape(ye)){ye=ye.substring(Be.raw.length),Ee.push(Be);continue}if(Be=this.tokenizer.tag(ye,we,Oe)){ye=ye.substring(Be.raw.length),we=Be.inLink,Oe=Be.inRawBlock,Ee.push(Be);continue}if(Be=this.tokenizer.link(ye)){ye=ye.substring(Be.raw.length),Be.type==="link"&&(Be.tokens=this.inlineTokens(Be.text,[],!0,Oe)),Ee.push(Be);continue}if(Be=this.tokenizer.reflink(ye,this.tokens.links)){ye=ye.substring(Be.raw.length),Be.type==="link"&&(Be.tokens=this.inlineTokens(Be.text,[],!0,Oe)),Ee.push(Be);continue}if(Be=this.tokenizer.strong(ye,ze,Le)){ye=ye.substring(Be.raw.length),Be.tokens=this.inlineTokens(Be.text,[],we,Oe),Ee.push(Be);continue}if(Be=this.tokenizer.em(ye,ze,Le)){ye=ye.substring(Be.raw.length),Be.tokens=this.inlineTokens(Be.text,[],we,Oe),Ee.push(Be);continue}if(Be=this.tokenizer.codespan(ye)){ye=ye.substring(Be.raw.length),Ee.push(Be);continue}if(Be=this.tokenizer.br(ye)){ye=ye.substring(Be.raw.length),Ee.push(Be);continue}if(Be=this.tokenizer.del(ye)){ye=ye.substring(Be.raw.length),Be.tokens=this.inlineTokens(Be.text,[],we,Oe),Ee.push(Be);continue}if(Be=this.tokenizer.autolink(ye,te)){ye=ye.substring(Be.raw.length),Ee.push(Be);continue}if(!we&&(Be=this.tokenizer.url(ye,te))){ye=ye.substring(Be.raw.length),Ee.push(Be);continue}if(Be=this.tokenizer.inlineText(ye,Oe,ge)){ye=ye.substring(Be.raw.length),Le=Be.raw.slice(-1),Ee.push(Be);continue}if(ye){var at="Infinite loop on byte: "+ye.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return Ee},m(Ae,null,[{key:"rules",get:function(){return{block:J,inline:ee}}}]),Ae}(),z=_.defaults,$=K.cleanUrl,me=K.escape,pe=function(){function Ae(Ce){this.options=Ce||z}var Te=Ae.prototype;return Te.code=function(ye,Ee,we){var Oe=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var Le=this.options.highlight(ye,Oe);Le!=null&&Le!==ye&&(we=!0,ye=Le)}return Oe?'<pre><code class="'+this.options.langPrefix+me(Oe,!0)+'">'+(we?ye:me(ye,!0))+`</code></pre>
`:"<pre><code>"+(we?ye:me(ye,!0))+`</code></pre>
`},Te.blockquote=function(ye){return`<blockquote>
`+ye+`</blockquote>
`},Te.html=function(ye){return ye},Te.heading=function(ye,Ee,we,Oe){return this.options.headerIds?"<h"+Ee+' id="'+this.options.headerPrefix+Oe.slug(we)+'">'+ye+"</h"+Ee+`>
`:"<h"+Ee+">"+ye+"</h"+Ee+`>
`},Te.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Te.list=function(ye,Ee,we){var Oe=Ee?"ol":"ul",Le=Ee&&we!==1?' start="'+we+'"':"";return"<"+Oe+Le+`>
`+ye+"</"+Oe+`>
`},Te.listitem=function(ye){return"<li>"+ye+`</li>
`},Te.checkbox=function(ye){return"<input "+(ye?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Te.paragraph=function(ye){return"<p>"+ye+`</p>
`},Te.table=function(ye,Ee){return Ee&&(Ee="<tbody>"+Ee+"</tbody>"),`<table>
<thead>
`+ye+`</thead>
`+Ee+`</table>
`},Te.tablerow=function(ye){return`<tr>
`+ye+`</tr>
`},Te.tablecell=function(ye,Ee){var we=Ee.header?"th":"td",Oe=Ee.align?"<"+we+' align="'+Ee.align+'">':"<"+we+">";return Oe+ye+"</"+we+`>
`},Te.strong=function(ye){return"<strong>"+ye+"</strong>"},Te.em=function(ye){return"<em>"+ye+"</em>"},Te.codespan=function(ye){return"<code>"+ye+"</code>"},Te.br=function(){return this.options.xhtml?"<br/>":"<br>"},Te.del=function(ye){return"<del>"+ye+"</del>"},Te.link=function(ye,Ee,we){if(ye=$(this.options.sanitize,this.options.baseUrl,ye),ye===null)return we;var Oe='<a href="'+me(ye)+'"';return Ee&&(Oe+=' title="'+Ee+'"'),Oe+=">"+we+"</a>",Oe},Te.image=function(ye,Ee,we){if(ye=$(this.options.sanitize,this.options.baseUrl,ye),ye===null)return we;var Oe='<img src="'+ye+'" alt="'+we+'"';return Ee&&(Oe+=' title="'+Ee+'"'),Oe+=this.options.xhtml?"/>":">",Oe},Te.text=function(ye){return ye},Ae}(),xe=function(){function Ae(){}var Te=Ae.prototype;return Te.strong=function(ye){return ye},Te.em=function(ye){return ye},Te.codespan=function(ye){return ye},Te.del=function(ye){return ye},Te.html=function(ye){return ye},Te.text=function(ye){return ye},Te.link=function(ye,Ee,we){return""+we},Te.image=function(ye,Ee,we){return""+we},Te.br=function(){return""},Ae}(),Re=function(){function Ae(){this.seen={}}var Te=Ae.prototype;return Te.slug=function(ye){var Ee=ye.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ee)){var we=Ee;do this.seen[we]++,Ee=we+"-"+this.seen[we];while(this.seen.hasOwnProperty(Ee))}return this.seen[Ee]=0,Ee},Ae}(),ke=_.defaults,Me=K.unescape,Pe=function(){function Ae(Ce){this.options=Ce||ke,this.options.renderer=this.options.renderer||new pe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new xe,this.slugger=new Re}Ae.parse=function(ye,Ee){var we=new Ae(Ee);return we.parse(ye)};var Te=Ae.prototype;return Te.parse=function(ye,Ee){Ee===void 0&&(Ee=!0);var we="",Oe,Le,Be,ze,nt,Ze,at,pt,dt,it,Lt,Et,Qt,Wt,gt,xt,er,Ht,Ke=ye.length;for(Oe=0;Oe<Ke;Oe++){it=ye[Oe];switch(it.type){case"space":continue;case"hr":{we+=this.renderer.hr();continue}case"heading":{we+=this.renderer.heading(this.parseInline(it.tokens),it.depth,Me(this.parseInline(it.tokens,this.textRenderer)),this.slugger);continue}case"code":{we+=this.renderer.code(it.text,it.lang,it.escaped);continue}case"table":{for(pt="",at="",ze=it.header.length,Le=0;Le<ze;Le++)at+=this.renderer.tablecell(this.parseInline(it.tokens.header[Le]),{header:!0,align:it.align[Le]});for(pt+=this.renderer.tablerow(at),dt="",ze=it.cells.length,Le=0;Le<ze;Le++){for(Ze=it.tokens.cells[Le],at="",nt=Ze.length,Be=0;Be<nt;Be++)at+=this.renderer.tablecell(this.parseInline(Ze[Be]),{header:!1,align:it.align[Be]});dt+=this.renderer.tablerow(at)}we+=this.renderer.table(pt,dt);continue}case"blockquote":{dt=this.parse(it.tokens),we+=this.renderer.blockquote(dt);continue}case"list":{for(Lt=it.ordered,Et=it.start,Qt=it.loose,ze=it.items.length,dt="",Le=0;Le<ze;Le++)gt=it.items[Le],xt=gt.checked,er=gt.task,Wt="",gt.task&&(Ht=this.renderer.checkbox(xt),Qt?gt.tokens.length>0&&gt.tokens[0].type==="text"?(gt.tokens[0].text=Ht+" "+gt.tokens[0].text,gt.tokens[0].tokens&&gt.tokens[0].tokens.length>0&&gt.tokens[0].tokens[0].type==="text"&&(gt.tokens[0].tokens[0].text=Ht+" "+gt.tokens[0].tokens[0].text)):gt.tokens.unshift({type:"text",text:Ht}):Wt+=Ht),Wt+=this.parse(gt.tokens,Qt),dt+=this.renderer.listitem(Wt,er,xt);we+=this.renderer.list(dt,Lt,Et);continue}case"html":{we+=this.renderer.html(it.text);continue}case"paragraph":{we+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(dt=it.tokens?this.parseInline(it.tokens):it.text;Oe+1<Ke&&ye[Oe+1].type==="text";)it=ye[++Oe],dt+=`
`+(it.tokens?this.parseInline(it.tokens):it.text);we+=Ee?this.renderer.paragraph(dt):dt;continue}default:{var ot='Token with "'+it.type+'" type was not found.';if(this.options.silent){console.error(ot);return}else throw new Error(ot)}}}return we},Te.parseInline=function(ye,Ee){Ee=Ee||this.renderer;var we="",Oe,Le,Be=ye.length;for(Oe=0;Oe<Be;Oe++){Le=ye[Oe];switch(Le.type){case"escape":{we+=Ee.text(Le.text);break}case"html":{we+=Ee.html(Le.text);break}case"link":{we+=Ee.link(Le.href,Le.title,this.parseInline(Le.tokens,Ee));break}case"image":{we+=Ee.image(Le.href,Le.title,Le.text);break}case"strong":{we+=Ee.strong(this.parseInline(Le.tokens,Ee));break}case"em":{we+=Ee.em(this.parseInline(Le.tokens,Ee));break}case"codespan":{we+=Ee.codespan(Le.text);break}case"br":{we+=Ee.br();break}case"del":{we+=Ee.del(this.parseInline(Le.tokens,Ee));break}case"text":{we+=Ee.text(Le.text);break}default:{var ze='Token with "'+Le.type+'" type was not found.';if(this.options.silent){console.error(ze);return}else throw new Error(ze)}}}return we},Ae}(),je=K.merge,Fe=K.checkSanitizeDeprecation,We=K.escape,Se=_.getDefaults,Xe=_.changeDefaults,Ye=_.defaults;function Ie(Ae,Te,Ce){if(typeof Ae=="undefined"||Ae===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ae!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ae)+", string expected");if(typeof Te=="function"&&(Ce=Te,Te=null),Te=je({},Ie.defaults,Te||{}),Fe(Te),Ce){var ye=Te.highlight,Ee;try{Ee=Y.lex(Ae,Te)}catch(Be){return Ce(Be)}var we=function(ze){var nt;if(!ze)try{nt=Pe.parse(Ee,Te)}catch(Ze){ze=Ze}return Te.highlight=ye,ze?Ce(ze):Ce(null,nt)};if(!ye||ye.length<3)return we();if(delete Te.highlight,!Ee.length)return we();var Oe=0;Ie.walkTokens(Ee,function(Be){Be.type==="code"&&(Oe++,setTimeout(function(){ye(Be.text,Be.lang,function(ze,nt){if(ze)return we(ze);nt!=null&&nt!==Be.text&&(Be.text=nt,Be.escaped=!0),Oe--,Oe===0&&we()})},0))}),Oe===0&&we();return}try{var Le=Y.lex(Ae,Te);return Te.walkTokens&&Ie.walkTokens(Le,Te.walkTokens),Pe.parse(Le,Te)}catch(Be){if(Be.message+=`
Please report this to https://github.com/markedjs/marked.`,Te.silent)return"<p>An error occurred:</p><pre>"+We(Be.message+"",!0)+"</pre>";throw Be}}Ie.options=Ie.setOptions=function(Ae){return je(Ie.defaults,Ae),Xe(Ie.defaults),Ie},Ie.getDefaults=Se,Ie.defaults=Ye,Ie.use=function(Ae){var Te=je({},Ae);if(Ae.renderer&&function(){var ye=Ie.defaults.renderer||new pe,Ee=function(Le){var Be=ye[Le];ye[Le]=function(){for(var ze=arguments.length,nt=new Array(ze),Ze=0;Ze<ze;Ze++)nt[Ze]=arguments[Ze];var at=Ae.renderer[Le].apply(ye,nt);return at===!1&&(at=Be.apply(ye,nt)),at}};for(var we in Ae.renderer)Ee(we);Te.renderer=ye}(),Ae.tokenizer&&function(){var ye=Ie.defaults.tokenizer||new be,Ee=function(Le){var Be=ye[Le];ye[Le]=function(){for(var ze=arguments.length,nt=new Array(ze),Ze=0;Ze<ze;Ze++)nt[Ze]=arguments[Ze];var at=Ae.tokenizer[Le].apply(ye,nt);return at===!1&&(at=Be.apply(ye,nt)),at}};for(var we in Ae.tokenizer)Ee(we);Te.tokenizer=ye}(),Ae.walkTokens){var Ce=Ie.defaults.walkTokens;Te.walkTokens=function(ye){Ae.walkTokens(ye),Ce&&Ce(ye)}}Ie.setOptions(Te)},Ie.walkTokens=function(Ae,Te){for(var Ce=S(Ae),ye;!(ye=Ce()).done;){var Ee=ye.value;Te(Ee);switch(Ee.type){case"table":{for(var we=S(Ee.tokens.header),Oe;!(Oe=we()).done;){var Le=Oe.value;Ie.walkTokens(Le,Te)}for(var Be=S(Ee.tokens.cells),ze;!(ze=Be()).done;)for(var nt=ze.value,Ze=S(nt),at;!(at=Ze()).done;){var pt=at.value;Ie.walkTokens(pt,Te)}break}case"list":{Ie.walkTokens(Ee.items,Te);break}default:Ee.tokens&&Ie.walkTokens(Ee.tokens,Te)}}},Ie.Parser=Pe,Ie.parser=Pe.parse,Ie.Renderer=pe,Ie.TextRenderer=xe,Ie.Lexer=Y,Ie.lexer=Y.lex,Ie.Tokenizer=be,Ie.Slugger=Re,Ie.parse=Ie;var He=Ie;return He})},"DlR+":function(I,Z,N){var P=N("MFOe"),m=P.Global,T=P.trim;I.exports={name:"cookieStorage",read:S,write:_,each:g,remove:d,clearAll:o};var L=m.document;function S(r){if(!r||!i(r))return null;var h="(?:^|.*;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(L.cookie.replace(new RegExp(h),"$1"))}function g(r){for(var h=L.cookie.split(/; ?/g),p=h.length-1;p>=0;p--){if(!T(h[p]))continue;var f=h[p].split("="),x=unescape(f[0]),v=unescape(f[1]);r(v,x)}}function _(r,h){if(!r)return;L.cookie=escape(r)+"="+escape(h)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function d(r){if(!r||!i(r))return;L.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function o(){g(function(r,h){d(h)})}function i(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(L.cookie)}},E4JC:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.StreamCipher,S=m.algo,g=[],_=[],d=[],o=S.Rabbit=L.extend({_doReset:function(){for(var r=this._key.words,h=this.cfg.iv,p=0;p<4;p++)r[p]=(r[p]<<8|r[p]>>>24)&16711935|(r[p]<<24|r[p]>>>8)&4278255360;var f=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],x=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 p=0;p<4;p++)i.call(this);for(var p=0;p<8;p++)x[p]^=f[p+4&7];if(h){var v=h.words,l=v[0],n=v[1],s=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,u=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,w=s>>>16|u&4294901760,y=u<<16|s&65535;x[0]^=s,x[1]^=w,x[2]^=u,x[3]^=y,x[4]^=s,x[5]^=w,x[6]^=u,x[7]^=y;for(var p=0;p<4;p++)i.call(this)}},_doProcessBlock:function(r,h){var p=this._X;i.call(this),g[0]=p[0]^p[5]>>>16^p[3]<<16,g[1]=p[2]^p[7]>>>16^p[5]<<16,g[2]=p[4]^p[1]>>>16^p[7]<<16,g[3]=p[6]^p[3]>>>16^p[1]<<16;for(var f=0;f<4;f++)g[f]=(g[f]<<8|g[f]>>>24)&16711935|(g[f]<<24|g[f]>>>8)&4278255360,r[h+f]^=g[f]},blockSize:128/32,ivSize:64/32});function i(){for(var r=this._X,h=this._C,p=0;p<8;p++)_[p]=h[p];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<_[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<_[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<_[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<_[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<_[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<_[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<_[6]>>>0?1:0)|0,this._b=h[7]>>>0<_[7]>>>0?1:0;for(var p=0;p<8;p++){var f=r[p]+h[p],x=f&65535,v=f>>>16,l=((x*x>>>17)+x*v>>>15)+v*v,n=((f&4294901760)*f|0)+((f&65535)*f|0);d[p]=l^n}r[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,r[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,r[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,r[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,r[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,r[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,r[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,r[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}m.Rabbit=L._createHelper(o)}(),P.Rabbit})},EHPI:function(I,Z,N){"use strict";var P=N("bbsP"),m=N("/wGt"),T=N("tJVT"),L=N("k1fw"),S=N("cDcd"),g=N.n(S),_=N("ZW9T"),d=N("ZD9Y"),o=N("M8RZ"),i=N("bCnd"),r=N("fcyK"),h=N.n(r),p={theme:Object(i.a)("cmCodeMode","vs-dark"),fontSize:Object(i.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(i.a)("cmTabToSpace",!0)},f;(function(l){l[l.set_font_size=0]="set_font_size",l[l.set_theme=1]="set_theme",l[l.on_tab_to_space=2]="on_tab_to_space",l[l.set_show_editor_setting=3]="set_show_editor_setting"})(f||(f={}));function x(l,n){switch(n.type){case f.set_show_editor_setting:return Object(L.a)(Object(L.a)({},l),{},{showEditorSetting:n.payload});case f.set_theme:return Object(L.a)(Object(L.a)({},l),{},{theme:n.payload});case f.set_font_size:return Object(L.a)(Object(L.a)({},l),{},{fontSize:n.payload});case f.on_tab_to_space:return Object(L.a)(Object(L.a)({},l),{},{tabToSpace:n.payload});default:throw new Error}}Z.a=function(l){var n=l.isLoading,s=l.value,u=l.onChange,w=l.language,y=l.ActionBarRender,a=y===void 0?function(K){return g.a.createElement(v,{onShowCodeSetting:K})}:y,R=Object(S.useReducer)(x,p),D=Object(T.a)(R,2),c=D[0],b=D[1],E=c.theme,C=c.fontSize,F=c.showEditorSetting,j=c.tabToSpace,k={onFontSizeChange:function(B){b({type:f.set_font_size,payload:B}),Object(i.b)("cmFontSize",B)},tabToSpace:j,cmFontSize:C,className:"oj",cmCodeMode:E,onTabToSpace:function(B){b({type:f.on_tab_to_space,payload:B}),Object(i.b)("cmTabToSpace",B)},onCodeModeChange:function(B){b({type:f.set_theme,payload:B}),Object(i.b)("cmCodeMode",B)}};function X(){b({type:f.set_show_editor_setting,payload:!1})}function G(){b({type:f.set_show_editor_setting,payload:!0})}var H={value:s,language:w,onChange:u,theme:E,height:"calc(100% - 56px)",options:{fontSize:C,insertSpaces:j}};return g.a.createElement(S.Fragment,null,g.a.createElement("div",{className:"code-panel-container"},a(G),!n&&g.a.createElement(_.b,H)),g.a.createElement(o.a,null,g.a.createElement(m.a,{className:"oj",title:null,placement:"right",closable:!1,visible:F,onClose:X},g.a.createElement(d.a,k))))};function v(l){var n=l.onShowCodeSetting;return g.a.createElement("div",{className:"action-bar"},g.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),g.a.createElement("a",{onClick:n},g.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){var m={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},T=P.Pos;P.defineOption("autoCloseBrackets",!1,function(x,v,l){l&&l!=P.Init&&(x.removeKeyMap(S),x.state.closeBrackets=null),v&&(g(L(v,"pairs")),x.state.closeBrackets=v,x.addKeyMap(S))});function L(x,v){return v=="pairs"&&typeof x=="string"?x:typeof x=="object"&&x[v]!=null?x[v]:m[v]}var S={Backspace:o,Enter:i};function g(x){for(var v=0;v<x.length;v++){var l=x.charAt(v),n="'"+l+"'";S[n]||(S[n]=_(l))}}g(m.pairs+"`");function _(x){return function(v){return h(v,x)}}function d(x){var v=x.state.closeBrackets;if(!v||v.override)return v;var l=x.getModeAt(x.getCursor());return l.closeBrackets||v}function o(x){var v=d(x);if(!v||x.getOption("disableInput"))return P.Pass;for(var l=L(v,"pairs"),n=x.listSelections(),s=0;s<n.length;s++){if(!n[s].empty())return P.Pass;var u=p(x,n[s].head);if(!u||l.indexOf(u)%2!=0)return P.Pass}for(var s=n.length-1;s>=0;s--){var w=n[s].head;x.replaceRange("",T(w.line,w.ch-1),T(w.line,w.ch+1),"+delete")}}function i(x){var v=d(x),l=v&&L(v,"explode");if(!l||x.getOption("disableInput"))return P.Pass;for(var n=x.listSelections(),s=0;s<n.length;s++){if(!n[s].empty())return P.Pass;var u=p(x,n[s].head);if(!u||l.indexOf(u)%2!=0)return P.Pass}x.operation(function(){var w=x.lineSeparator()||`
`;x.replaceSelection(w+w,null),x.execCommand("goCharLeft"),n=x.listSelections();for(var y=0;y<n.length;y++){var a=n[y].head.line;x.indentLine(a,null,!0),x.indentLine(a+1,null,!0)}})}function r(x){var v=P.cmpPos(x.anchor,x.head)>0;return{anchor:new T(x.anchor.line,x.anchor.ch+(v?-1:1)),head:new T(x.head.line,x.head.ch+(v?1:-1))}}function h(x,v){var l=d(x);if(!l||x.getOption("disableInput"))return P.Pass;var n=L(l,"pairs"),s=n.indexOf(v);if(s==-1)return P.Pass;for(var u=L(l,"closeBefore"),w=L(l,"triples"),y=n.charAt(s+1)==v,a=x.listSelections(),R=s%2==0,D,c=0;c<a.length;c++){var b=a[c],E=b.head,C,F=x.getRange(E,T(E.line,E.ch+1));if(R&&!b.empty())C="surround";else if((y||!R)&&F==v)y&&f(x,E)?C="both":w.indexOf(v)>=0&&x.getRange(E,T(E.line,E.ch+3))==v+v+v?C="skipThree":C="skip";else if(y&&E.ch>1&&w.indexOf(v)>=0&&x.getRange(T(E.line,E.ch-2),E)==v+v){if(E.ch>2&&/\bstring/.test(x.getTokenTypeAt(T(E.line,E.ch-2))))return P.Pass;C="addFour"}else if(y){var j=E.ch==0?" ":x.getRange(T(E.line,E.ch-1),E);if(!P.isWordChar(F)&&j!=v&&!P.isWordChar(j))C="both";else return P.Pass}else if(R&&(F.length===0||/\s/.test(F)||u.indexOf(F)>-1))C="both";else return P.Pass;if(!D)D=C;else if(D!=C)return P.Pass}var k=s%2?n.charAt(s-1):v,X=s%2?v:n.charAt(s+1);x.operation(function(){if(D=="skip")x.execCommand("goCharRight");else if(D=="skipThree")for(var G=0;G<3;G++)x.execCommand("goCharRight");else if(D=="surround"){for(var H=x.getSelections(),G=0;G<H.length;G++)H[G]=k+H[G]+X;x.replaceSelections(H,"around"),H=x.listSelections().slice();for(var G=0;G<H.length;G++)H[G]=r(H[G]);x.setSelections(H)}else D=="both"?(x.replaceSelection(k+X,null),x.triggerElectric(k+X),x.execCommand("goCharLeft")):D=="addFour"&&(x.replaceSelection(k+k+k+k,"before"),x.execCommand("goCharRight"))})}function p(x,v){var l=x.getRange(T(v.line,v.ch-1),T(v.line,v.ch+1));return l.length==2?l:null}function f(x,v){var l=x.getTokenAt(T(v.line,v.ch+1));return/\bstring/.test(l.type)&&l.start==v.ch&&(v.ch==0||!/\bstring/.test(x.getTokenTypeAt(v)))}})},ELcG:function(I,Z,N){(function(P,m){I.exports=Z=m(N("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(m){var T=P,L=T.lib,S=L.WordArray,g=L.Hasher,_=T.algo,d=S.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=S.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),i=S.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=S.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=S.create([0,1518500249,1859775393,2400959708,2840853838]),p=S.create([1352829926,1548603684,1836072691,2053994217,0]),f=_.RIPEMD160=g.extend({_doReset:function(){this._hash=S.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(w,y){for(var a=0;a<16;a++){var R=y+a,D=w[R];w[R]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}var c=this._hash.words,b=h.words,E=p.words,C=d.words,F=o.words,j=i.words,k=r.words,X,G,H,K,B,U,W,Q,ie,ce;U=X=c[0],W=G=c[1],Q=H=c[2],ie=K=c[3],ce=B=c[4];for(var he,a=0;a<80;a+=1)he=X+w[y+C[a]]|0,a<16?he+=x(G,H,K)+b[0]:a<32?he+=v(G,H,K)+b[1]:a<48?he+=l(G,H,K)+b[2]:a<64?he+=n(G,H,K)+b[3]:he+=s(G,H,K)+b[4],he=he|0,he=u(he,j[a]),he=he+B|0,X=B,B=K,K=u(H,10),H=G,G=he,he=U+w[y+F[a]]|0,a<16?he+=s(W,Q,ie)+E[0]:a<32?he+=n(W,Q,ie)+E[1]:a<48?he+=l(W,Q,ie)+E[2]:a<64?he+=v(W,Q,ie)+E[3]:he+=x(W,Q,ie)+E[4],he=he|0,he=u(he,k[a]),he=he+ce|0,U=ce,ce=ie,ie=u(Q,10),Q=W,W=he;he=c[1]+H+ie|0,c[1]=c[2]+K+ce|0,c[2]=c[3]+B+U|0,c[3]=c[4]+X+W|0,c[4]=c[0]+G+Q|0,c[0]=he},_doFinalize:function(){var w=this._data,y=w.words,a=this._nDataBytes*8,R=w.sigBytes*8;y[R>>>5]|=128<<24-R%32,y[(R+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,w.sigBytes=(y.length+1)*4,this._process();for(var D=this._hash,c=D.words,b=0;b<5;b++){var E=c[b];c[b]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return D},clone:function(){var w=g.clone.call(this);return w._hash=this._hash.clone(),w}});function x(w,y,a){return w^y^a}function v(w,y,a){return w&y|~w&a}function l(w,y,a){return(w|~y)^a}function n(w,y,a){return w&a|y&~a}function s(w,y,a){return w^(y|~a)}function u(w,y){return w<<y|w>>>32-y}T.RIPEMD160=g._createHelper(f),T.HmacRIPEMD160=g._createHmacHelper(f)}(Math),P.RIPEMD160})},ETIr:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,S=m.enc,g=S.Base64={stringify:function(d){var o=d.words,i=d.sigBytes,r=this._map;d.clamp();for(var h=[],p=0;p<i;p+=3)for(var f=o[p>>>2]>>>24-p%4*8&255,x=o[p+1>>>2]>>>24-(p+1)%4*8&255,v=o[p+2>>>2]>>>24-(p+2)%4*8&255,l=f<<16|x<<8|v,n=0;n<4&&p+n*.75<i;n++)h.push(r.charAt(l>>>6*(3-n)&63));var s=r.charAt(64);if(s)for(;h.length%4;)h.push(s);return h.join("")},parse:function(d){var o=d.length,i=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var h=0;h<i.length;h++)r[i.charCodeAt(h)]=h}var p=i.charAt(64);if(p){var f=d.indexOf(p);f!==-1&&(o=f)}return _(d,o,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function _(d,o,i){for(var r=[],h=0,p=0;p<o;p++)if(p%4){var f=i[d.charCodeAt(p-1)]<<p%4*2,x=i[d.charCodeAt(p)]>>>6-p%4*2,v=f|x;r[h>>>2]|=v<<24-h%4*8,h++}return L.create(r,h)}}(),P.enc.Base64})},"F+F2":function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var m=P,T=m.lib,L=T.WordArray,S=L.init,g=L.init=function(_){if(_ instanceof ArrayBuffer&&(_=new Uint8Array(_)),(_ instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&_ instanceof Uint8ClampedArray||_ instanceof Int16Array||_ instanceof Uint16Array||_ instanceof Int32Array||_ instanceof Uint32Array||_ instanceof Float32Array||_ instanceof Float64Array)&&(_=new Uint8Array(_.buffer,_.byteOffset,_.byteLength)),_ instanceof Uint8Array){for(var d=_.byteLength,o=[],i=0;i<d;i++)o[i>>>2]|=_[i]<<24-i%4*8;S.call(this,o,d)}else S.apply(this,arguments)};g.prototype=L}(),P.lib.WordArray})},GRuw:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("lPiR"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,S=m.algo,g=S.SHA256,_=S.SHA224=g.extend({_doReset:function(){this._hash=new L.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=g._doFinalize.call(this);return d.sigBytes-=4,d}});m.SHA224=g._createHelper(_),m.HmacSHA224=g._createHmacHelper(_)}(),P.SHA224})},GfqC:function(I,Z,N){"use strict";var P=N("cDcd"),m=N.n(P),T=N("TSYQ"),L=N.n(T);function S(K,B){var U="cannot "+K.method+" "+K.action+" "+B.status+"'",W=new Error(U);return W.status=B.status,W.method=K.method,W.url=K.action,W}function g(K){var B=K.responseText||K.response;if(!B)return B;try{return JSON.parse(B)}catch(U){return B}}function _(K){var B=new XMLHttpRequest;K.onProgress&&B.upload&&(B.upload.onprogress=function(ie){ie.total>0&&(ie.percent=ie.loaded/ie.total*100),K.onProgress(ie)});var U=new FormData;K.data&&Object.keys(K.data).forEach(function(Q){var ie=K.data[Q];if(Array.isArray(ie)){ie.forEach(function(ce){U.append(Q+"[]",ce)});return}U.append(Q,K.data[Q])}),K.file instanceof Blob?U.append(K.filename,K.file,K.file.name):U.append(K.filename,K.file),B.onerror=function(ie){K.onError(ie)},B.onload=function(){return B.status<200||B.status>=300?K.onError(S(K,B),g(B)):K.onSuccess(g(B),B)},B.open(K.method,K.action,!0),K.withCredentials&&"withCredentials"in B&&(B.withCredentials=!0);var W=K.headers||{};return W["X-Requested-With"]!==null&&B.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(W).forEach(function(Q){W[Q]!==null&&B.setRequestHeader(Q,W[Q])}),B.send(U),{abort:function(){B.abort()}}}var d=+new Date,o=0;function i(){return"rc-upload-"+d+"-"+ ++o}function r(K,B){return K.indexOf(B,K.length-B.length)!==-1}var h=function(K,B){if(K&&B){var U=Array.isArray(B)?B:B.split(","),W=K.name||"",Q=K.type||"",ie=Q.replace(/\/.*$/,"");return U.some(function(ce){var he=ce.trim();return he.charAt(0)==="."?r(W.toLowerCase(),he.toLowerCase()):/\/\*$/.test(he)?ie===he.replace(/\/.*$/,""):Q===he})}return!0};function p(K,B){var U=K.createReader(),W=[];function Q(){U.readEntries(function(ie){var ce=Array.prototype.slice.apply(ie);W=W.concat(ce);var he=!ce.length;he?B(W):Q()})}Q()}var f=function(B,U,W){var Q=function ie(ce,he){he=he||"",ce.isFile?ce.file(function(be){W(be)&&(ce.fullPath&&!be.webkitRelativePath&&(Object.defineProperties(be,{webkitRelativePath:{writable:!0}}),be.webkitRelativePath=ce.fullPath.replace(/^\//,""),Object.defineProperties(be,{webkitRelativePath:{writable:!1}})),U([be]))}):ce.isDirectory&&p(ce,function(be){be.forEach(function(ne){ie(ne,""+he+ce.name+"/")})})};B.forEach(function(ie){Q(ie.webkitGetAsEntry())})},x=f,v=Object.assign||function(K){for(var B=1;B<arguments.length;B++){var U=arguments[B];for(var W in U)Object.prototype.hasOwnProperty.call(U,W)&&(K[W]=U[W])}return K},l=function(){function K(B,U){var W=[],Q=!0,ie=!1,ce=void 0;try{for(var he=B[Symbol.iterator](),be;!(Q=(be=he.next()).done)&&!(W.push(be.value),U&&W.length===U);Q=!0);}catch(ne){ie=!0,ce=ne}finally{try{!Q&&he.return&&he.return()}finally{if(ie)throw ce}}return W}return function(B,U){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return K(B,U);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function K(B,U){for(var W=0;W<U.length;W++){var Q=U[W];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(B,Q.key,Q)}}return function(B,U,W){return U&&K(B.prototype,U),W&&K(B,W),B}}();function s(K,B,U){return B in K?Object.defineProperty(K,B,{value:U,enumerable:!0,configurable:!0,writable:!0}):K[B]=U,K}function u(K,B){var U={};for(var W in K){if(B.indexOf(W)>=0)continue;if(!Object.prototype.hasOwnProperty.call(K,W))continue;U[W]=K[W]}return U}function w(K,B){if(!(K instanceof B))throw new TypeError("Cannot call a class as a function")}function y(K,B){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:K}function a(K,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);K.prototype=Object.create(B&&B.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(K,B):K.__proto__=B)}var R=function(B){return Object.keys(B).reduce(function(U,W){return(W.substr(0,5)==="data-"||W.substr(0,5)==="aria-"||W==="role")&&(U[W]=B[W]),U},{})},D=function(K){a(B,K);function B(){var U,W,Q,ie;w(this,B);for(var ce=arguments.length,he=Array(ce),be=0;be<ce;be++)he[be]=arguments[be];return ie=(W=(Q=y(this,(U=B.__proto__||Object.getPrototypeOf(B)).call.apply(U,[this].concat(he))),Q),Q.state={uid:i()},Q.reqs={},Q.onChange=function(ne){var le=ne.target.files;Q.uploadFiles(le),Q.reset()},Q.onClick=function(ne){var le=Q.fileInput;if(!le)return;var ue=Q.props,re=ue.children,oe=ue.onClick;re&&re.type==="button"&&(le.parentNode.focus(),le.parentNode.querySelector("button").blur()),le.click(),oe&&oe(ne)},Q.onKeyDown=function(ne){ne.key==="Enter"&&Q.onClick()},Q.onFileDrop=function(ne){var le=Q.props.multiple;if(ne.preventDefault(),ne.type==="dragover")return;if(Q.props.directory)x(Array.prototype.slice.call(ne.dataTransfer.items),Q.uploadFiles,function(re){return h(re,Q.props.accept)});else{var ue=Array.prototype.slice.call(ne.dataTransfer.files).filter(function(re){return h(re,Q.props.accept)});le===!1&&(ue=ue.slice(0,1)),Q.uploadFiles(ue)}},Q.uploadFiles=function(ne){var le=Array.prototype.slice.call(ne);le.map(function(ue){return ue.uid=i(),ue}).forEach(function(ue){Q.upload(ue,le)})},Q.saveFileInput=function(ne){Q.fileInput=ne},W),y(Q,ie)}return n(B,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(W,Q){var ie=this,ce=this.props;if(!ce.beforeUpload)return setTimeout(function(){return ie.post(W)},0);var he=ce.beforeUpload(W,Q);he&&he.then?he.then(function(be){var ne=Object.prototype.toString.call(be);return ne==="[object File]"||ne==="[object Blob]"?ie.post(be):ie.post(W)}).catch(function(be){console.log(be)}):he!==!1&&setTimeout(function(){return ie.post(W)},0);return}},{key:"post",value:function(W){var Q=this;if(!this._isMounted)return;var ie=this.props,ce=ie.onStart,he=ie.onProgress,be=ie.transformFile,ne=be===void 0?function(le){return le}:be;new Promise(function(le){var ue=ie.action;return typeof ue=="function"&&(ue=ue(W)),le(ue)}).then(function(le){var ue=W.uid,re=ie.customRequest||_,oe=Promise.resolve(ne(W)).then(function(q){var se=ie.data;return typeof se=="function"&&(se=se(q)),Promise.all([q,se])}).catch(function(q){console.error(q)});oe.then(function(q){var se=l(q,2),J=se[0],ee=se[1],ge={action:le,filename:ie.name,data:ee,file:J,headers:ie.headers,withCredentials:ie.withCredentials,method:ie.method||"post",onProgress:he?function(te){he(te,W)}:null,onSuccess:function(Y,z){delete Q.reqs[ue],ie.onSuccess(Y,W,z)},onError:function(Y,z){delete Q.reqs[ue],ie.onError(Y,z,W)}};ce(W),Q.reqs[ue]=re(ge)})})}},{key:"reset",value:function(){this.setState({uid:i()})}},{key:"abort",value:function(W){var Q=this.reqs;if(W){var ie=W;W&&W.uid&&(ie=W.uid),Q[ie]&&Q[ie].abort&&Q[ie].abort(),delete Q[ie]}else Object.keys(Q).forEach(function(ce){Q[ce]&&Q[ce].abort&&Q[ce].abort(),delete Q[ce]})}},{key:"render",value:function(){var W,Q=this.props,ie=Q.component,ce=Q.prefixCls,he=Q.className,be=Q.disabled,ne=Q.id,le=Q.style,ue=Q.multiple,re=Q.accept,oe=Q.children,q=Q.directory,se=Q.openFileDialogOnClick,J=Q.onMouseEnter,ee=Q.onMouseLeave,ge=u(Q,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),te=L()((W={},s(W,ce,!0),s(W,ce+"-disabled",be),s(W,he,he),W)),Y=be?{}:{onClick:se?this.onClick:function(){},onKeyDown:se?this.onKeyDown:function(){},onMouseEnter:J,onMouseLeave:ee,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return m.a.createElement(ie,v({},Y,{className:te,role:"button",style:le}),m.a.createElement("input",v({},R(ge),{id:ne,type:"file",ref:this.saveFileInput,onClick:function($){return $.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:re,directory:q?"directory":null,webkitdirectory:q?"webkitdirectory":null,multiple:ue,onChange:this.onChange})),oe)}}]),B}(P.Component),c=D,b=Object.assign||function(K){for(var B=1;B<arguments.length;B++){var U=arguments[B];for(var W in U)Object.prototype.hasOwnProperty.call(U,W)&&(K[W]=U[W])}return K},E=function(){function K(B,U){for(var W=0;W<U.length;W++){var Q=U[W];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(B,Q.key,Q)}}return function(B,U,W){return U&&K(B.prototype,U),W&&K(B,W),B}}();function C(K,B){if(!(K instanceof B))throw new TypeError("Cannot call a class as a function")}function F(K,B){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:K}function j(K,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);K.prototype=Object.create(B&&B.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(K,B):K.__proto__=B)}function k(){}var X=function(K){j(B,K);function B(){var U,W,Q,ie;C(this,B);for(var ce=arguments.length,he=Array(ce),be=0;be<ce;be++)he[be]=arguments[be];return ie=(W=(Q=F(this,(U=B.__proto__||Object.getPrototypeOf(B)).call.apply(U,[this].concat(he))),Q),Q.saveUploader=function(ne){Q.uploader=ne},W),F(Q,ie)}return E(B,[{key:"abort",value:function(W){this.uploader.abort(W)}},{key:"render",value:function(){return m.a.createElement(c,b({},this.props,{ref:this.saveUploader}))}}]),B}(P.Component);X.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:k,onError:k,onSuccess:k,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var G=X,H=Z.a=G},Gytx:function(I,Z){I.exports=function(P,m,T,L){var S=T?T.call(L,P,m):void 0;if(S!==void 0)return!!S;if(P===m)return!0;if(typeof P!="object"||!P||typeof m!="object"||!m)return!1;var g=Object.keys(P),_=Object.keys(m);if(g.length!==_.length)return!1;for(var d=Object.prototype.hasOwnProperty.bind(m),o=0;o<g.length;o++){var i=g[o];if(!d(i))return!1;var r=P[i],h=m[i];if(S=T?T.call(L,r,h,i):void 0,S===!1||S===void 0&&r!==h)return!1}return!0}},HmJG:function(I,Z,N){},Ib8C:function(I,Z,N){(function(P){(function(m,T){I.exports=Z=T()})(this,function(){var m=m||function(T,L){var S;if(typeof window!="undefined"&&window.crypto&&(S=window.crypto),typeof self!="undefined"&&self.crypto&&(S=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(S=globalThis.crypto),!S&&typeof window!="undefined"&&window.msCrypto&&(S=window.msCrypto),!S&&typeof P!="undefined"&&P.crypto&&(S=P.crypto),!S&&!0)try{S=N(4)}catch(s){}var g=function(){if(S){if(typeof S.getRandomValues=="function")try{return S.getRandomValues(new Uint32Array(1))[0]}catch(s){}if(typeof S.randomBytes=="function")try{return S.randomBytes(4).readInt32LE()}catch(s){}}throw new Error("Native crypto module could not be used to get secure random number.")},_=Object.create||function(){function s(){}return function(u){var w;return s.prototype=u,w=new s,s.prototype=null,w}}(),d={},o=d.lib={},i=o.Base=function(){return{extend:function(s){var u=_(this);return s&&u.mixIn(s),(!u.hasOwnProperty("init")||this.init===u.init)&&(u.init=function(){u.$super.init.apply(this,arguments)}),u.init.prototype=u,u.$super=this,u},create:function(){var s=this.extend();return s.init.apply(s,arguments),s},init:function(){},mixIn:function(s){for(var u in s)s.hasOwnProperty(u)&&(this[u]=s[u]);s.hasOwnProperty("toString")&&(this.toString=s.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),r=o.WordArray=i.extend({init:function(s,u){s=this.words=s||[],u!=L?this.sigBytes=u:this.sigBytes=s.length*4},toString:function(s){return(s||p).stringify(this)},concat:function(s){var u=this.words,w=s.words,y=this.sigBytes,a=s.sigBytes;if(this.clamp(),y%4)for(var R=0;R<a;R++){var D=w[R>>>2]>>>24-R%4*8&255;u[y+R>>>2]|=D<<24-(y+R)%4*8}else for(var c=0;c<a;c+=4)u[y+c>>>2]=w[c>>>2];return this.sigBytes+=a,this},clamp:function(){var s=this.words,u=this.sigBytes;s[u>>>2]&=4294967295<<32-u%4*8,s.length=T.ceil(u/4)},clone:function(){var s=i.clone.call(this);return s.words=this.words.slice(0),s},random:function(s){for(var u=[],w=0;w<s;w+=4)u.push(g());return new r.init(u,s)}}),h=d.enc={},p=h.Hex={stringify:function(s){for(var u=s.words,w=s.sigBytes,y=[],a=0;a<w;a++){var R=u[a>>>2]>>>24-a%4*8&255;y.push((R>>>4).toString(16)),y.push((R&15).toString(16))}return y.join("")},parse:function(s){for(var u=s.length,w=[],y=0;y<u;y+=2)w[y>>>3]|=parseInt(s.substr(y,2),16)<<24-y%8*4;return new r.init(w,u/2)}},f=h.Latin1={stringify:function(s){for(var u=s.words,w=s.sigBytes,y=[],a=0;a<w;a++){var R=u[a>>>2]>>>24-a%4*8&255;y.push(String.fromCharCode(R))}return y.join("")},parse:function(s){for(var u=s.length,w=[],y=0;y<u;y++)w[y>>>2]|=(s.charCodeAt(y)&255)<<24-y%4*8;return new r.init(w,u)}},x=h.Utf8={stringify:function(s){try{return decodeURIComponent(escape(f.stringify(s)))}catch(u){throw new Error("Malformed UTF-8 data")}},parse:function(s){return f.parse(unescape(encodeURIComponent(s)))}},v=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(s){typeof s=="string"&&(s=x.parse(s)),this._data.concat(s),this._nDataBytes+=s.sigBytes},_process:function(s){var u,w=this._data,y=w.words,a=w.sigBytes,R=this.blockSize,D=R*4,c=a/D;s?c=T.ceil(c):c=T.max((c|0)-this._minBufferSize,0);var b=c*R,E=T.min(b*4,a);if(b){for(var C=0;C<b;C+=R)this._doProcessBlock(y,C);u=y.splice(0,b),w.sigBytes-=E}return new r.init(u,E)},clone:function(){var s=i.clone.call(this);return s._data=this._data.clone(),s},_minBufferSize:0}),l=o.Hasher=v.extend({cfg:i.extend(),init:function(s){this.cfg=this.cfg.extend(s),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(s){return this._append(s),this._process(),this},finalize:function(s){s&&this._append(s);var u=this._doFinalize();return u},blockSize:512/32,_createHelper:function(s){return function(u,w){return new s.init(w).finalize(u)}},_createHmacHelper:function(s){return function(u,w){return new n.HMAC.init(s,w).finalize(u)}}}),n=d.algo={};return d}(Math);return m})}).call(this,N("IyRk"))},J66h:function(I,Z,N){(function(P){var m,T;(function(L,S){I.exports=S(L)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof P!="undefined"?P:this,function(L){"use strict";L=L||{};var S=L.Base64,g="2.6.4",_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=function(k){for(var X={},G=0,H=k.length;G<H;G++)X[k.charAt(G)]=G;return X}(_),o=String.fromCharCode,i=function(k){if(k.length<2){var X=k.charCodeAt(0);return X<128?k:X<2048?o(192|X>>>6)+o(128|X&63):o(224|X>>>12&15)+o(128|X>>>6&63)+o(128|X&63)}else{var X=65536+(k.charCodeAt(0)-55296)*1024+(k.charCodeAt(1)-56320);return o(240|X>>>18&7)+o(128|X>>>12&63)+o(128|X>>>6&63)+o(128|X&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(k){return k.replace(r,i)},p=function(k){var X=[0,2,1][k.length%3],G=k.charCodeAt(0)<<16|(k.length>1?k.charCodeAt(1):0)<<8|(k.length>2?k.charCodeAt(2):0),H=[_.charAt(G>>>18),_.charAt(G>>>12&63),X>=2?"=":_.charAt(G>>>6&63),X>=1?"=":_.charAt(G&63)];return H.join("")},f=L.btoa&&typeof L.btoa=="function"?function(k){return L.btoa(k)}:function(k){if(k.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return k.replace(/[\s\S]{1,3}/g,p)},x=function(k){return f(h(String(k)))},v=function(k){return k.replace(/[+\/]/g,function(X){return X=="+"?"-":"_"}).replace(/=/g,"")},l=function(k,X){return X?v(x(k)):x(k)},n=function(k){return l(k,!0)},s;L.Uint8Array&&(s=function(k,X){for(var G="",H=0,K=k.length;H<K;H+=3){var B=k[H],U=k[H+1],W=k[H+2],Q=B<<16|U<<8|W;G+=_.charAt(Q>>>18)+_.charAt(Q>>>12&63)+(typeof U!="undefined"?_.charAt(Q>>>6&63):"=")+(typeof W!="undefined"?_.charAt(Q&63):"=")}return X?v(G):G});var u=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=function(k){switch(k.length){case 4:var X=(7&k.charCodeAt(0))<<18|(63&k.charCodeAt(1))<<12|(63&k.charCodeAt(2))<<6|63&k.charCodeAt(3),G=X-65536;return o((G>>>10)+55296)+o((G&1023)+56320);case 3:return o((15&k.charCodeAt(0))<<12|(63&k.charCodeAt(1))<<6|63&k.charCodeAt(2));default:return o((31&k.charCodeAt(0))<<6|63&k.charCodeAt(1))}},y=function(k){return k.replace(u,w)},a=function(k){var X=k.length,G=X%4,H=(X>0?d[k.charAt(0)]<<18:0)|(X>1?d[k.charAt(1)]<<12:0)|(X>2?d[k.charAt(2)]<<6:0)|(X>3?d[k.charAt(3)]:0),K=[o(H>>>16),o(H>>>8&255),o(H&255)];return K.length-=[0,0,2,1][G],K.join("")},R=L.atob&&typeof L.atob=="function"?function(k){return L.atob(k)}:function(k){return k.replace(/\S{1,4}/g,a)},D=function(k){return R(String(k).replace(/[^A-Za-z0-9\+\/]/g,""))},c=function(k){return y(R(k))},b=function(k){return String(k).replace(/[-_]/g,function(X){return X=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},E=function(k){return c(b(k))},C;L.Uint8Array&&(C=function(k){return Uint8Array.from(D(b(k)),function(X){return X.charCodeAt(0)})});var F=function(){var k=L.Base64;return L.Base64=S,k};if(L.Base64={VERSION:g,atob:D,btoa:f,fromBase64:E,toBase64:l,utob:h,encode:l,encodeURI:n,btou:y,decode:E,noConflict:F,fromUint8Array:s,toUint8Array:C},typeof Object.defineProperty=="function"){var j=function(k){return{value:k,enumerable:!1,writable:!0,configurable:!0}};L.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",j(function(){return E(this)})),Object.defineProperty(String.prototype,"toBase64",j(function(k){return l(this,k)})),Object.defineProperty(String.prototype,"toBase64URI",j(function(){return l(this,!0)}))}}return L.Meteor&&(Base64=L.Base64),I.exports?I.exports.Base64=L.Base64:!(m=[],T=function(){return L.Base64}.apply(Z,m),T!==void 0&&(I.exports=T)),{Base64:L.Base64}})}).call(this,N("IyRk"))},K3mO:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("3y9D"),N("WYAk"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.Base,S=T.WordArray,g=m.algo,_=g.MD5,d=g.EvpKDF=L.extend({cfg:L.extend({keySize:128/32,hasher:_,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,i){for(var r,h=this.cfg,p=h.hasher.create(),f=S.create(),x=f.words,v=h.keySize,l=h.iterations;x.length<v;){r&&p.update(r),r=p.update(o).finalize(i),p.reset();for(var n=1;n<l;n++)r=p.finalize(r),p.reset();f.concat(r)}return f.sigBytes=v*4,f}});m.EvpKDF=function(o,i,r){return d.create(r).compute(o,i)}}(),P.EvpKDF})},KhGG:function(I,Z,N){"use strict";N.d(Z,"a",function(){return a}),N.d(Z,"c",function(){return c});var P=N("0Owb"),m=N("miYZ"),T=N("tsqr"),L=N("oBTY"),S=N("tJVT"),g=N("PpiC"),_=N("k1fw"),d=N("9og8"),o=N("DZo9"),i=N("8z0m"),r=N("WmNS"),h=N.n(r),p=N("cDcd"),f=N.n(p),x=N("ErOA"),v=N("NFKh"),l=N.n(v),n=N("7Cbv"),s=N("9kvl"),u=N("mxV5"),w=N.n(u),y=i.a.Dragger,a=function(C){var F="bf3c199c2470cb477d907b1e0917c17b",j="5183666c72eec9e4",k=l.a.enc.Utf8.parse(F),X=l.a.enc.Utf8.parse(j),G=l.a.AES.decrypt(C,k,{iv:X,mode:l.a.mode.CBC});return G.toString(l.a.enc.Utf8)},R,D=function(){var E=Object(d.a)(h.a.mark(function C(F){var j,k,X,G,H,K,B,U,W,Q,ie;return h.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return B=F.identifier,U=F.oldFilename,W=F.newFilename,he.next=3,Object(x.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return Q=he.sent,Q.data=JSON.parse(a(Q.data)),ie=new w.a({endpoint:Q==null||((j=Q.data)===null||j===void 0)?void 0:j.end_point,region:Q==null||((k=Q.data)===null||k===void 0)?void 0:k.region,accessKeyId:Q==null||((X=Q.data)===null||X===void 0)?void 0:X.access_key_id,accessKeySecret:Q==null||((G=Q.data)===null||G===void 0)?void 0:G.access_key_secret,bucket:Q==null||((H=Q.data)===null||H===void 0)?void 0:H.bucket,stsToken:Q==null||((K=Q.data)===null||K===void 0)?void 0:K.security_token}),he.abrupt("return",new Promise(function(be,ne){console.log(11111,"".concat(B,"/").concat(U),"".concat(B,"/").concat(W),Q.data),ie.copy("/".concat(B,"/").concat(U),"/".concat(B,"/").concat(W)).then(function(le){console.log("\u62F7\u8D1D\u6210\u529F",le)}).catch(function(le){console.log(le);debugger})}));case 7:case"end":return he.stop()}},C)}));return function(F){return E.apply(this,arguments)}}(),c=function(){var E=Object(d.a)(h.a.mark(function C(F,j,k){var X,G,H,K,B,U,W,Q,ie,ce;return h.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return j.file_name=F.name,be.next=3,Object(x.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return W=be.sent,console.log("decrypt(res.data):",a(W.data)),W.data=JSON.parse(a(W.data)),Q=F.name.split("."),Q.pop(),ie=j.realFileName?Q:Object(n.a)(),ce=new w.a({endpoint:W==null||((X=W.data)===null||X===void 0)?void 0:X.end_point,region:W==null||((G=W.data)===null||G===void 0)?void 0:G.region,accessKeyId:W==null||((H=W.data)===null||H===void 0)?void 0:H.access_key_id,accessKeySecret:W==null||((K=W.data)===null||K===void 0)?void 0:K.access_key_secret,bucket:W==null||((B=W.data)===null||B===void 0)?void 0:B.bucket,stsToken:W==null||((U=W.data)===null||U===void 0)?void 0:U.security_token}),be.abrupt("return",new Promise(function(ne,le){var ue;ce.multipartUpload("".concat(ie),new Blob([F],{type:F.type}),Object(_.a)(Object(_.a)({timeout:200*1e3,partSize:102400},k),{},{callback:{url:W==null||((ue=W.data)===null||ue===void 0)?void 0:ue.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(x.e)(j)}})).then(function(re){var oe;F.response=(oe=re.data)===null||oe===void 0?void 0:oe.data,ne(re==null?void 0:re.data)}).catch(function(re){le(re),console.log("err:",re)})}));case 11:case"end":return be.stop()}},C)}));return function(F,j,k){return E.apply(this,arguments)}}(),b=function(C){var F=C.user,j=C.cancelUpload,k=Object(g.a)(C,["user","cancelUpload"]),X=Object(p.useState)([]),G=Object(S.a)(X,2),H=G[0],K=G[1],B=Object(p.useState)(),U=Object(S.a)(B,2),W=U[0],Q=U[1],ie={onRemove:function(be){K(Object(L.a)(H.filter(function(ne){return ne.name!==be.name}))),k.onChange(H.filter(function(ne){return ne.name!==be.name}))},disabled:k.disabled,multiple:!0,fileList:H==null?void 0:H.map(function(he){return he.file}),customRequest:function(){},beforeUpload:function(){var he=Object(d.a)(h.a.mark(function ne(le){var ue;return h.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(ue=k.maxSize||1024*1024*1024*1,!H.filter(function(q){return q.name===le.name}).length){oe.next=4;break}return T.b.info("".concat(le.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),oe.abrupt("return");case 4:if(!((le==null?void 0:le.size)>ue)){oe.next=7;break}return T.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(ue/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),oe.abrupt("return",!1);case 7:return H.push({name:le.name,file:le}),K(Object(L.a)(H)),k.onChange(H),oe.abrupt("return",!1);case 11:case"end":return oe.stop()}},ne)}));function be(ne){return he.apply(this,arguments)}return be}()},ce=function(){var he=Object(d.a)(h.a.mark(function be(ne,le){var ue,re,oe,q,se,J,ee,ge,te,Y;return h.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return le.file_name=ne.name,ee=ne.name,$.next=4,Object(x.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(ge=$.sent,ge.data=JSON.parse(a(ge.data)),!((ge==null?void 0:ge.status)!==0)){$.next=12;break}return H[H.findIndex(function(me){return me.name===ee})].status="error",H[H.findIndex(function(me){return me.name===ee})].file.status="error",k.onChange(H),T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),$.abrupt("return");case 12:return W=new w.a({endpoint:ge==null||((ue=ge.data)===null||ue===void 0)?void 0:ue.end_point,region:ge==null||((re=ge.data)===null||re===void 0)?void 0:re.region,accessKeyId:ge==null||((oe=ge.data)===null||oe===void 0)?void 0:oe.access_key_id,accessKeySecret:ge==null||((q=ge.data)===null||q===void 0)?void 0:q.access_key_secret,bucket:ge==null||((se=ge.data)===null||se===void 0)?void 0:se.bucket,stsToken:ge==null||((J=ge.data)===null||J===void 0)?void 0:J.security_token}),console.log(ne,"file"),Q(W),te=ne.name.split("."),te.pop(),Y=le.realFileName?te:Object(n.a)(),$.abrupt("return",new Promise(function(me,pe){try{var xe;W.multipartUpload("".concat(k.identifier,"/").concat(Y).concat(ee.indexOf(".")>-1?"."+ee.split(".").pop():""),new Blob([ne.file],{type:ne.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(ke,Me,Pe){try{console.log("\u8FDB\u5EA6",ke,Me,Pe);var je=H.findIndex(function(Fe){return Fe.name===ee});H[je].file.percent=ke*100,H[je].tempCheckpoint=Me,K(Object(L.a)(H))}catch(Fe){}},checkpoint:H[H.findIndex(function(Re){return Re.name===ee})].tempCheckpoint,callback:{customValue:{id:ee+""},url:ge==null||((xe=ge.data)===null||xe===void 0)?void 0:xe.callback_url,host:ge==null?void 0:ge.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(x.e)(le)}}).then(function(Re){var ke,Me=H.findIndex(function(Se){return Se.name===ee}),Pe="done";if(((ke=Re.data)===null||ke===void 0?void 0:ke.status)===0){var je;ne.response=(je=Re.data)===null||je===void 0?void 0:je.data;var Fe=H.findIndex(function(Se){return Se.name===ee});H[Fe].status="done",H[Fe].file.status="done"}else{var We;T.b.warn((We=Re.data)===null||We===void 0?void 0:We.message),Pe="error"}H[Me].status=Pe,H[Me].file.status=Pe,k.onChange(H),me(Re==null?void 0:Re.data)}).catch(function(Re){H[H.findIndex(function(ke){return ke.name===ee})].status="error",H[H.findIndex(function(ke){return ke.name===ee})].file.status="error",T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),K(Object(L.a)(H)),k.onChange(H),pe(Re),console.log("err:",Re)})}catch(Re){}}));case 19:case"end":return $.stop()}},be)}));return function(ne,le){return he.apply(this,arguments)}}();return Object(p.useEffect)(function(){H.every(function(he){return he==="done"||he==="error"})&&k.onComplete(H)},[H]),Object(p.useEffect)(function(){if(j){var he;(he=W)===null||he===void 0||he.cancel()}},[j]),Object(p.useEffect)(function(){k.uploading&&H.map(function(){var he=Object(d.a)(h.a.mark(function be(ne){var le,ue;return h.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(!((!ne.status||ne.status==="error")&&!j)){oe.next=6;break}return ne.status="uploading",ne.file.status="uploading",oe.next=5,ce(ne,{login:F==null||((le=F.userInfo)===null||le===void 0)?void 0:le.login,container_type:k.container_type,container_id:k.container_id,description:k.description,realFileName:k.realFileName});case 5:ue=oe.sent;case 6:case"end":return oe.stop()}},be)}));return function(be){return he.apply(this,arguments)}}())},[k.uploading]),f.a.createElement(y,Object(P.a)({},ie,{height:k.height,className:k.className}),f.a.createElement("p",{className:"ant-upload-hint"},k.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Z.b=Object(s.a)(function(E){var C=E.loading,F=E.globalSetting,j=E.user;return{globalSetting:F,loading:C.models.competitions,user:j}})(b)},KmYQ:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(m,T){var L=T*4;m.clamp(),m.sigBytes+=L-(m.sigBytes%L||L)},unpad:function(m){for(var T=m.words,L=m.sigBytes-1,L=m.sigBytes-1;L>=0;L--)if(T[L>>>2]>>>24-L%4*8&255){m.sigBytes=L+1;break}}},P.pad.ZeroPadding})},LdHM:function(I,Z,N){"use strict";N.d(Z,"b",function(){return u}),N.d(Z,"a",function(){return y});var P=N("1OyB"),m=N("vuIU"),T=N("Ji7U"),L=N("LK+K"),S=N("cDcd"),g=N("rePB"),_=N("Ff2n"),d=N("ODXe"),o=N("4IlW"),i=N("bX4T"),r=N("YrtM"),h=N("TSYQ"),p=N.n(h),f=N("+nKL"),x=N("8OUc"),v=function(W,Q){var ie=W.prefixCls,ce=W.id,he=W.flattenOptions,be=W.childrenAsData,ne=W.values,le=W.searchValue,ue=W.multiple,re=W.defaultActiveFirstOption,oe=W.height,q=W.itemHeight,se=W.notFoundContent,J=W.open,ee=W.menuItemSelectedIcon,ge=W.virtual,te=W.onSelect,Y=W.onToggleOpen,z=W.onActiveValue,$=W.onScroll,me=W.onMouseEnter,pe="".concat(ie,"-item"),xe=Object(r.a)(function(){return he},[J,he],function(He,Ae){return Ae[0]&&He[1]!==Ae[1]}),Re=S.useRef(null),ke=function(Ae){Ae.preventDefault()},Me=function(Ae){Re.current&&Re.current.scrollTo({index:Ae})},Pe=function(Ae){for(var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ce=xe.length,ye=0;ye<Ce;ye+=1){var Ee=(Ae+ye*Te+Ce)%Ce,we=xe[Ee],Oe=we.group,Le=we.data;if(!Oe&&!Le.disabled)return Ee}return-1},je=S.useState(function(){return Pe(0)}),Fe=Object(d.a)(je,2),We=Fe[0],Se=Fe[1],Xe=function(Ae){Se(Ae);var Te=xe[Ae];if(!Te){z(null,-1);return}z(Te.data.value,Ae)};S.useEffect(function(){Xe(re!==!1?Pe(0):-1)},[xe.length,le]),S.useEffect(function(){var He=setTimeout(function(){if(!ue&&J&&ne.size===1){var Ae=Array.from(ne)[0],Te=xe.findIndex(function(Ce){var ye=Ce.data;return ye.value===Ae});Xe(Te),Me(Te)}});return function(){return clearTimeout(He)}},[J]);var Ye=function(Ae){Ae!==void 0&&te(Ae,{selected:!ne.has(Ae)}),ue||Y(!1)};if(S.useImperativeHandle(Q,function(){return{onKeyDown:function(Ae){var Te=Ae.which;switch(Te){case o.a.UP:case o.a.DOWN:{var Ce=0;if(Te===o.a.UP?Ce=-1:Te===o.a.DOWN&&(Ce=1),Ce!==0){var ye=Pe(We+Ce,Ce);Me(ye),Xe(ye)}break}case o.a.ENTER:{var Ee=xe[We];Ee&&!Ee.data.disabled?Ye(Ee.data.value):Ye(void 0),J&&Ae.preventDefault();break}case o.a.ESC:Y(!1)}},onKeyUp:function(){},scrollTo:function(Ae){Me(Ae)}}}),xe.length===0)return S.createElement("div",{role:"listbox",id:"".concat(ce,"_list"),className:"".concat(pe,"-empty"),onMouseDown:ke},se);function Ie(He){var Ae=xe[He];if(!Ae)return null;var Te=Ae.data||{},Ce=Te.value,ye=Te.label,Ee=Te.children,we=Object(i.a)(Te,!0),Oe=be?Ee:ye;return Ae?S.createElement("div",Object.assign({"aria-label":typeof Oe=="string"?Oe:null},we,{key:He,role:"option",id:"".concat(ce,"_list_").concat(He),"aria-selected":ne.has(Ce)}),Ce):null}return S.createElement(S.Fragment,null,S.createElement("div",{role:"listbox",id:"".concat(ce,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ie(We-1),Ie(We),Ie(We+1)),S.createElement(f.a,{itemKey:"key",ref:Re,data:xe,height:oe,itemHeight:q,fullHeight:!1,onMouseDown:ke,onScroll:$,virtual:ge,onMouseEnter:me},function(He,Ae){var Te,Ce=He.group,ye=He.groupOption,Ee=He.data,we=Ee.label,Oe=Ee.key;if(Ce)return S.createElement("div",{className:p()(pe,"".concat(pe,"-group"))},we!==void 0?we:Oe);var Le=Ee.disabled,Be=Ee.value,ze=Ee.title,nt=Ee.children,Ze=Ee.style,at=Ee.className,pt=Object(_.a)(Ee,["disabled","value","title","children","style","className"]),dt=ne.has(Be),it="".concat(pe,"-option"),Lt=p()(pe,it,at,(Te={},Object(g.a)(Te,"".concat(it,"-grouped"),ye),Object(g.a)(Te,"".concat(it,"-active"),We===Ae&&!Le),Object(g.a)(Te,"".concat(it,"-disabled"),Le),Object(g.a)(Te,"".concat(it,"-selected"),dt),Te)),Et=be?nt:we,Qt=!ee||typeof ee=="function"||dt;return S.createElement("div",Object.assign({},pt,{"aria-selected":dt,className:Lt,title:ze,onMouseMove:function(){if(We===Ae||Le)return;Xe(Ae)},onClick:function(){Le||Ye(Be)},style:Ze}),S.createElement("div",{className:"".concat(it,"-content")},Et||Be),S.isValidElement(ee)||dt,Qt&&S.createElement(x.a,{className:"".concat(pe,"-option-state"),customizeIcon:ee,customizeIconProps:{isSelected:dt}},dt?"\u2713":null))}))},l=S.forwardRef(v);l.displayName="OptionList";var n=l,s=function(){return null};s.isSelectOption=!0;var u=s,w=function(){return null};w.isSelectOptGroup=!0;var y=w,a=N("VTBJ"),R=N("Zm9Q");function D(U){var W=U.key,Q=U.props,ie=Q.children,ce=Q.value,he=Object(_.a)(Q,["children","value"]);return Object(a.a)({key:W,value:ce!==void 0?ce:W,children:ie},he)}function c(U){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(U).map(function(Q,ie){if(!S.isValidElement(Q)||!Q.type)return null;var ce=Q.type.isSelectOptGroup,he=Q.key,be=Q.props,ne=be.children,le=Object(_.a)(be,["children"]);return W||!ce?D(Q):Object(a.a)(Object(a.a)({key:"__RC_SELECT_GRP__".concat(he===null?ie:he,"__"),label:he},le),{},{options:c(ne)})}).filter(function(Q){return Q})}var b=N("2Qr1"),E=N("qNPg"),C=N("U8pU"),F=N("Kwbf"),j=N("WKfj");function k(U){var W=U.mode,Q=U.options,ie=U.children,ce=U.backfill,he=U.allowClear,be=U.placeholder,ne=U.getInputElement,le=U.showSearch,ue=U.onSearch,re=U.defaultOpen,oe=U.autoFocus,q=U.labelInValue,se=U.value,J=U.inputValue,ee=U.optionLabelProp,ge=W==="multiple"||W==="tags",te=le!==void 0?le:ge||W==="combobox",Y=Q||c(ie);if(Object(F.a)(W!=="tags"||Y.every(function(pe){return!pe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var z=Y.some(function(pe){return pe.options?pe.options.some(function(xe){return typeof("value"in xe?xe.value:xe.key)=="number"}):typeof("value"in pe?pe.value:pe.key)=="number"});Object(F.a)(!z,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(F.a)(W!=="combobox"||!ee,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(F.a)(W==="combobox"||!ce,"`backfill` only works with `combobox` mode."),Object(F.a)(W==="combobox"||!ne,"`getInputElement` only work with `combobox` mode."),Object(F.b)(W!=="combobox"||!ne||!he||!be,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ue&&!te&&W!=="combobox"&&W!=="tags"&&Object(F.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(F.b)(!re||oe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),se!=null){var $=Object(j.d)(se);Object(F.a)(!q||$.every(function(pe){return Object(C.a)(pe)==="object"&&("key"in pe||"value"in pe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(F.a)(!ge||Array.isArray(se),"`value` should be array when `mode` is `multiple` or `tags`")}if(ie){var me=null;Object(R.a)(ie).some(function(pe){if(!S.isValidElement(pe)||!pe.type)return!1;var xe=pe.type;if(xe.isSelectOption)return!1;if(xe.isSelectOptGroup){var Re=Object(R.a)(pe.props.children).every(function(ke){return!S.isValidElement(ke)||!pe.type||ke.type.isSelectOption?!0:(me=ke.type,!1)});return!Re}return me=xe,!0}),me&&Object(F.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(me.displayName||me.name||me,"`.")),Object(F.a)(J===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var X=k,G=Object(E.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:c,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:X,fillOptionsWithMissingValue:b.a}),H=function(U){Object(T.a)(Q,U);var W=Object(L.a)(Q);function Q(){var ie;return Object(P.a)(this,Q),ie=W.apply(this,arguments),ie.selectRef=S.createRef(),ie.focus=function(){ie.selectRef.current.focus()},ie.blur=function(){ie.selectRef.current.blur()},ie}return Object(m.a)(Q,[{key:"render",value:function(){return S.createElement(G,Object.assign({ref:this.selectRef},this.props))}}]),Q}(S.Component);H.Option=u,H.OptGroup=y;var K=H,B=Z.c=K},M8RZ:function(I,Z,N){"use strict";N.d(Z,"a",function(){return o});var P=N("fWQN"),m=N("mtLc"),T=N("yKVA"),L=N("879j"),S=N("cDcd"),g=N.n(S),_=N("faye"),d=N.n(_),o=function(i){Object(T.a)(h,i);var r=Object(L.a)(h);function h(p){var f;Object(P.a)(this,h),f=r.call(this,p);var x=window.document;return f.node=x.createElement("div"),x.body.appendChild(f.node),f}return Object(m.a)(h,[{key:"render",value:function(){var f=this.props.children;return Object(_.createPortal)(f,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),h}(g.a.Component)},MFOe:function(I,Z,N){(function(P){var m=g(),T=_(),L=d(),S=typeof window!="undefined"?window:P;I.exports={assign:m,create:T,trim:L,bind:o,slice:i,each:r,map:h,pluck:p,isList:f,isFunction:x,isObject:v,Global:S};function g(){return Object.assign?Object.assign:function(n,s,u,w){for(var y=1;y<arguments.length;y++)r(Object(arguments[y]),function(a,R){n[R]=a});return n}}function _(){if(Object.create)return function(s,u,w,y){var a=i(arguments,1);return m.apply(this,[Object.create(s)].concat(a))};{function l(){}return function(s,u,w,y){var a=i(arguments,1);return l.prototype=s,m.apply(this,[new l].concat(a))}}}function d(){return String.prototype.trim?function(n){return String.prototype.trim.call(n)}:function(n){return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function o(l,n){return function(){return n.apply(l,Array.prototype.slice.call(arguments,0))}}function i(l,n){return Array.prototype.slice.call(l,n||0)}function r(l,n){p(l,function(s,u){return n(s,u),!1})}function h(l,n){var s=f(l)?[]:{};return p(l,function(u,w){return s[w]=n(u,w),!1}),s}function p(l,n){if(f(l)){for(var s=0;s<l.length;s++)if(n(l[s],s))return l[s]}else for(var u in l)if(l.hasOwnProperty(u)&&n(l[u],u))return l[u]}function f(l){return l!=null&&typeof l!="function"&&typeof l.length=="number"}function x(l){return l&&{}.toString.call(l)==="[object Function]"}function v(l){return l&&{}.toString.call(l)==="[object Object]"}}).call(this,N("IyRk"))},MlIO:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(m){var T=P,L=T.lib,S=L.Base,g=L.WordArray,_=T.x64={},d=_.Word=S.extend({init:function(i,r){this.high=i,this.low=r}}),o=_.WordArray=S.extend({init:function(i,r){i=this.words=i||[],r!=m?this.sigBytes=r:this.sigBytes=i.length*8},toX32:function(){for(var i=this.words,r=i.length,h=[],p=0;p<r;p++){var f=i[p];h.push(f.high),h.push(f.low)}return g.create(h,this.sigBytes)},clone:function(){for(var i=S.clone.call(this),r=i.words=this.words.slice(0),h=r.length,p=0;p<h;p++)r[p]=r[p].clone();return i}})}(),P})},NFKh:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("MlIO"),N("F+F2"),N("qM6L"),N("ETIr"),N("wbyO"),N("cv67"),N("3y9D"),N("lPiR"),N("GRuw"),N("1uat"),N("uGsb"),N("5hvy"),N("ELcG"),N("WYAk"),N("e7zE"),N("K3mO"),N("OLod"),N("ALsQ"),N("9OqN"),N("qu8F"),N("S6kV"),N("gb/T"),N("qBft"),N("oRuE"),N("jO9C"),N("KmYQ"),N("uGxW"),N("bQjk"),N("wZgz"),N("pA7S"),N("w7YG"),N("E4JC"),N("PVpz"))})(this,function(P){return P})},NvD2:function(I,Z,N){"use strict";N.d(Z,"a",function(){return g});var P=N("Kwbf");function m(_,d){var o=new Set;return _.forEach(function(i){d.has(i)||o.add(i)}),o}function T(_){var d=_||{},o=d.disabled,i=d.disableCheckbox,r=d.checkable;return!!(o||i)||r===!1}function L(_,d,o,i){for(var r=new Set(_),h=new Set,p=0;p<=o;p+=1){var f=d.get(p)||new Set;f.forEach(function(n){var s=n.key,u=n.node,w=n.children,y=w===void 0?[]:w;r.has(s)&&!i(u)&&y.filter(function(a){return!i(a.node)}).forEach(function(a){r.add(a.key)})})}for(var x=new Set,v=o;v>=0;v-=1){var l=d.get(v)||new Set;l.forEach(function(n){var s=n.parent,u=n.node;if(i(u)||!n.parent||x.has(n.parent.key))return;if(i(n.parent.node)){x.add(s.key);return}var w=!0,y=!1;(s.children||[]).filter(function(a){return!i(a.node)}).forEach(function(a){var R=a.key,D=r.has(R);w&&!D&&(w=!1),!y&&(D||h.has(R))&&(y=!0)}),w&&r.add(s.key),y&&h.add(s.key),x.add(s.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(m(h,r))}}function S(_,d,o,i,r){for(var h=new Set(_),p=new Set(d),f=0;f<=i;f+=1){var x=o.get(f)||new Set;x.forEach(function(s){var u=s.key,w=s.node,y=s.children,a=y===void 0?[]:y;!h.has(u)&&!p.has(u)&&!r(w)&&a.filter(function(R){return!r(R.node)}).forEach(function(R){h.delete(R.key)})})}p=new Set;for(var v=new Set,l=i;l>=0;l-=1){var n=o.get(l)||new Set;n.forEach(function(s){var u=s.parent,w=s.node;if(r(w)||!s.parent||v.has(s.parent.key))return;if(r(s.parent.node)){v.add(u.key);return}var y=!0,a=!1;(u.children||[]).filter(function(R){return!r(R.node)}).forEach(function(R){var D=R.key,c=h.has(D);y&&!c&&(y=!1),!a&&(c||p.has(D))&&(a=!0)}),y||h.delete(u.key),a&&p.add(u.key),v.add(u.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(m(p,h))}}function g(_,d,o,i){var r=[],h;i?h=i:h=T;var p=new Set(_.filter(function(l){var n=!!o[l];return n||r.push(l),n})),f=new Map,x=0;Object.keys(o).forEach(function(l){var n=o[l],s=n.level,u=f.get(s);u||(u=new Set,f.set(s,u)),u.add(n),x=Math.max(x,s)}),Object(P.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(l){return"'".concat(l,"'")}).join(", ")));var v;return d===!0?v=L(p,f,x,h):v=S(p,d.halfCheckedKeys,f,x,h),v}},OLES:function(I,Z,N){"use strict";var P=N("U8pU"),m=N("VTBJ"),T=N("Ff2n"),L=N("cDcd"),S=N("uciX"),g=N("7ixt"),_=function(p){var f=p.overlay,x=p.prefixCls,v=p.id,l=p.overlayInnerStyle;return L.createElement("div",{className:"".concat(x,"-inner"),id:v,role:"tooltip",style:l},typeof f=="function"?f():f)},d=_,o=function(p,f){var x=p.overlayClassName,v=p.trigger,l=v===void 0?["hover"]:v,n=p.mouseEnterDelay,s=n===void 0?0:n,u=p.mouseLeaveDelay,w=u===void 0?.1:u,y=p.overlayStyle,a=p.prefixCls,R=a===void 0?"rc-tooltip":a,D=p.children,c=p.onVisibleChange,b=p.afterVisibleChange,E=p.transitionName,C=p.animation,F=p.placement,j=F===void 0?"right":F,k=p.align,X=k===void 0?{}:k,G=p.destroyTooltipOnHide,H=G===void 0?!1:G,K=p.defaultVisible,B=p.getTooltipContainer,U=p.overlayInnerStyle,W=Object(T.a)(p,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Q=Object(L.useRef)(null);Object(L.useImperativeHandle)(f,function(){return Q.current});var ie=Object(m.a)({},W);"visible"in p&&(ie.popupVisible=p.visible);var ce=function(){var ue=p.arrowContent,re=ue===void 0?null:ue,oe=p.overlay,q=p.id;return[L.createElement("div",{className:"".concat(R,"-arrow"),key:"arrow"},re),L.createElement(d,{key:"content",prefixCls:R,id:q,overlay:oe,overlayInnerStyle:U})]},he=!1,be=!1;if(typeof H=="boolean")he=H;else if(H&&Object(P.a)(H)==="object"){var ne=H.keepParent;he=ne===!0,be=ne===!1}return L.createElement(S.a,Object.assign({popupClassName:x,prefixCls:R,popup:ce,action:l,builtinPlacements:g.a,popupPlacement:j,ref:Q,popupAlign:X,getPopupContainer:B,onPopupVisibleChange:c,afterPopupVisibleChange:b,popupTransitionName:E,popupAnimation:C,defaultPopupVisible:K,destroyPopupOnHide:he,autoDestroy:be,mouseLeaveDelay:w,popupStyle:y,mouseEnterDelay:s},ie),D)},i=Object(L.forwardRef)(o),r=Z.a=i},OLod:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("K3mO"))})(this,function(P){P.lib.Cipher||function(m){var T=P,L=T.lib,S=L.Base,g=L.WordArray,_=L.BufferedBlockAlgorithm,d=T.enc,o=d.Utf8,i=d.Base64,r=T.algo,h=r.EvpKDF,p=L.Cipher=_.extend({cfg:S.extend(),createEncryptor:function(E,C){return this.create(this._ENC_XFORM_MODE,E,C)},createDecryptor:function(E,C){return this.create(this._DEC_XFORM_MODE,E,C)},init:function(E,C,F){this.cfg=this.cfg.extend(F),this._xformMode=E,this._key=C,this.reset()},reset:function(){_.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var C=this._doFinalize();return C},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function E(C){return typeof C=="string"?b:R}return function(C){return{encrypt:function(F,j,k){return E(j).encrypt(C,F,j,k)},decrypt:function(F,j,k){return E(j).decrypt(C,F,j,k)}}}}()}),f=L.StreamCipher=p.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),x=T.mode={},v=L.BlockCipherMode=S.extend({createEncryptor:function(E,C){return this.Encryptor.create(E,C)},createDecryptor:function(E,C){return this.Decryptor.create(E,C)},init:function(E,C){this._cipher=E,this._iv=C}}),l=x.CBC=function(){var E=v.extend();E.Encryptor=E.extend({processBlock:function(F,j){var k=this._cipher,X=k.blockSize;C.call(this,F,j,X),k.encryptBlock(F,j),this._prevBlock=F.slice(j,j+X)}}),E.Decryptor=E.extend({processBlock:function(F,j){var k=this._cipher,X=k.blockSize,G=F.slice(j,j+X);k.decryptBlock(F,j),C.call(this,F,j,X),this._prevBlock=G}});function C(F,j,k){var X,G=this._iv;G?(X=G,this._iv=m):X=this._prevBlock;for(var H=0;H<k;H++)F[j+H]^=X[H]}return E}(),n=T.pad={},s=n.Pkcs7={pad:function(E,C){for(var F=C*4,j=F-E.sigBytes%F,k=j<<24|j<<16|j<<8|j,X=[],G=0;G<j;G+=4)X.push(k);var H=g.create(X,j);E.concat(H)},unpad:function(E){var C=E.words[E.sigBytes-1>>>2]&255;E.sigBytes-=C}},u=L.BlockCipher=p.extend({cfg:p.cfg.extend({mode:l,padding:s}),reset:function(){var E;p.reset.call(this);var C=this.cfg,F=C.iv,j=C.mode;this._xformMode==this._ENC_XFORM_MODE?E=j.createEncryptor:(E=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,F&&F.words):(this._mode=E.call(j,this,F&&F.words),this._mode.__creator=E)},_doProcessBlock:function(E,C){this._mode.processBlock(E,C)},_doFinalize:function(){var E,C=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(C.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),C.unpad(E)),E},blockSize:128/32}),w=L.CipherParams=S.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),y=T.format={},a=y.OpenSSL={stringify:function(E){var C,F=E.ciphertext,j=E.salt;return j?C=g.create([1398893684,1701076831]).concat(j).concat(F):C=F,C.toString(i)},parse:function(E){var C,F=i.parse(E),j=F.words;return j[0]==1398893684&&j[1]==1701076831&&(C=g.create(j.slice(2,4)),j.splice(0,4),F.sigBytes-=16),w.create({ciphertext:F,salt:C})}},R=L.SerializableCipher=S.extend({cfg:S.extend({format:a}),encrypt:function(E,C,F,j){j=this.cfg.extend(j);var k=E.createEncryptor(F,j),X=k.finalize(C),G=k.cfg;return w.create({ciphertext:X,key:F,iv:G.iv,algorithm:E,mode:G.mode,padding:G.padding,blockSize:E.blockSize,formatter:j.format})},decrypt:function(E,C,F,j){j=this.cfg.extend(j),C=this._parse(C,j.format);var k=E.createDecryptor(F,j).finalize(C.ciphertext);return k},_parse:function(E,C){return typeof E=="string"?C.parse(E,this):E}}),D=T.kdf={},c=D.OpenSSL={execute:function(E,C,F,j){j||(j=g.random(64/8));var k=h.create({keySize:C+F}).compute(E,j),X=g.create(k.words.slice(C),F*4);return k.sigBytes=C*4,w.create({key:k,iv:X,salt:j})}},b=L.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:c}),encrypt:function(E,C,F,j){j=this.cfg.extend(j);var k=j.kdf.execute(F,E.keySize,E.ivSize);j.iv=k.iv;var X=R.encrypt.call(this,E,C,k.key,j);return X.mixIn(k),X},decrypt:function(E,C,F,j){j=this.cfg.extend(j),C=this._parse(C,j.format);var k=j.kdf.execute(F,E.keySize,E.ivSize,C.salt);j.iv=k.iv;var X=R.decrypt.call(this,E,C,k.key,j);return X}})}()})},OZM5:function(I,Z,N){"use strict";N.d(Z,"b",function(){return i}),N.d(Z,"a",function(){return r}),N.d(Z,"k",function(){return h}),N.d(Z,"h",function(){return p}),N.d(Z,"i",function(){return f}),N.d(Z,"g",function(){return x}),N.d(Z,"c",function(){return v}),N.d(Z,"d",function(){return l}),N.d(Z,"j",function(){return u}),N.d(Z,"e",function(){return w}),N.d(Z,"f",function(){return y});var P=N("KQm4"),m=N("U8pU"),T=N("Ff2n"),L=N("cDcd"),S=N.n(L),g=N("Kwbf"),_=N("WaYH"),d=.25,o=2;function i(a,R){var D=a.slice(),c=D.indexOf(R);return c>=0&&D.splice(c,1),D}function r(a,R){var D=a.slice();return D.indexOf(R)===-1&&D.push(R),D}function h(a){return a.split("-")}function p(a,R){return"".concat(a,"-").concat(R)}function f(a){return a&&a.type&&a.type.isTreeNode}function x(a,R){var D=[a],c=R[a];function b(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];E.forEach(function(C){var F=C.key,j=C.children;D.push(F),b(j)})}return b(c.children),D}function v(a,R){var D=a.clientY,c=R.selectHandle.getBoundingClientRect(),b=c.top,E=c.bottom,C=c.height,F=Math.max(C*d,o);return D<=b+F?-1:D>=E-F?1:0}function l(a,R){if(!a)return;var D=R.multiple;return D?a.slice():a.length?[a[0]]:a}var n=function(R){return R};function s(a,R){if(!a)return[];var D=R||{},c=D.processProps,b=c===void 0?n:c,E=Array.isArray(a)?a:[a];return E.map(function(C){var F=C.children,j=Object(T.a)(C,["children"]),k=s(F,R);return S.a.createElement(_.a,Object.assign({},b(j)),k)})}function u(a){if(!a)return null;var R;if(Array.isArray(a))R={checkedKeys:a,halfCheckedKeys:void 0};else if(Object(m.a)(a)==="object")R={checkedKeys:a.checked||void 0,halfCheckedKeys:a.halfChecked||void 0};else return Object(g.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function w(a,R){var D=new Set;function c(b){if(D.has(b))return;var E=R[b];if(!E)return;D.add(b);var C=E.parent,F=E.node;if(F.disabled)return;C&&c(C.key)}return(a||[]).forEach(function(b){c(b)}),Object(P.a)(D)}function y(a){var R={};return Object.keys(a).forEach(function(D){(D.startsWith("data-")||D.startsWith("aria-"))&&(R[D]=a[D])}),R}},Ot1p:function(I,Z,N){"use strict";var P=N("2qtc"),m=N("kLXV"),T=N("rAM+"),L=N("miYZ"),S=N("tsqr"),g=N("9og8"),_=N("tJVT"),d=N("jrin"),o=N("WmNS"),i=N.n(o),r=N("cDcd"),h=N.n(r),p=N("VrN/"),f=N.n(p),x=N("bdgK"),v=N("p77/"),l=N("Bd2K"),n=N("ELLl"),s=N("19Vz"),u=N("lZu9"),w=N("+NIl"),y=N("kSUc"),a=N("9Bee"),R=function(Le){var Be=Le.value,ze=Be===void 0?"":Be,nt=Le.className,Ze=Le.showTextOnly,at=Le.showLines,pt=Le.style,dt=pt===void 0?{}:pt,it=Object(r.useMemo)(function(){return""},[ze]);return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:it}}))},D=N("0Owb"),c=N("dejd"),b=N("C+DQ"),E=N("1vsH"),C=N("m3rI"),F=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function j(Le){var Be=Le.onActionCallback,ze=Le.title,nt=Le.icon,Ze=Le.actionName,at=Le.className,pt=at===void 0?"":at,dt=Le.children;function it(){Be(Ze)}return h.a.createElement("a",{title:ze,className:pt,onClick:it},h.a.createElement("i",{className:"md-iconfont ".concat(nt)}),dt)}var k=function(Le){var Be=Le.watch,ze=Le.showNullButton,nt=Le.onActionCallback,Ze=Le.fullScreen,at=Le.insertTemp,pt=Le.hidetoolBar,dt=Le.uuid,it=Le.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(E.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(E.G)("_educoder_session"),"&key=").concat(dt,"&api=").concat(encodeURIComponent(C.a.PROXY_SERVER)));var Lt=[].concat(F,[{title:"".concat(Be?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Be?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!pt&&Lt.map(function(Et,Qt){return h.a.createElement("li",{key:Qt},Et.actionName?h.a.createElement(j,Object(D.a)({},Et,{onActionCallback:nt})):h.a.createElement("span",{className:"v-line"}))}),ze?h.a.createElement("li",null,h.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:nt},h.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,at&&h.a.createElement("li",null,h.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(at),onActionCallback:nt},h.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(j,{icon:"".concat(Ze?"icon-shrink":"icon-enlarge"),title:Ze?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:nt})))},X=N("M8RZ"),G=N("+L6B"),H=N("2/Rp"),K=N("y8nQ"),B=N("Vl3Y"),U=N("5NDa"),W=N("5rEg"),Q={labelCol:{span:4},wrapperCol:{span:20}},ie=function(Le){var Be=Le.callback,ze=Le.onCancel;function nt(Ze){Be(Ze)}return h.a.createElement(B.a,Object(D.a)({},Q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:nt}),h.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},h.a.createElement(W.a,null)),h.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},h.a.createElement(W.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))},ce=N("7ahc"),he=N("HmJG"),be=N("BjJ7"),ne=B.a.useForm,le={width:280,marginRight:10},ue={labelCol:{span:5},wrapperCol:{span:19}},re=function(Le){var Be=Le.callback,ze=Le.onCancel,nt=ne(),Ze=Object(_.a)(nt,1),at=Ze[0];function pt(Lt){Be(Lt)}function dt(Lt,Et){if(Lt.status===-1){S.b.error(Lt.message);return}at.setFieldsValue({src:"/api/attachments/".concat(Lt.id),type:Et.type})}function it(Lt){var Et=Lt.target.files[0];q(Et,dt)}return h.a.createElement(B.a,Object(D.a)({form:at},ue,{className:"upload-image-panel",onFinish:pt}),h.a.createElement(B.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(B.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},h.a.createElement(W.a,{style:le})),h.a.createElement(oe,{onFileChange:it}))),h.a.createElement(B.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},h.a.createElement(W.a,{style:{width:264}})),h.a.createElement(B.a.Item,{style:{textAlign:"right"}},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))};function oe(Le){var Be=Le.onFileChange;return h.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",h.a.createElement("input",{type:"file",onChange:Be}))}function q(Le,Be){if(!Le)throw new String("\u6CA1\u6709\u6587\u4EF6");var ze=new FormData;ze.append("editormd-image-file",Le),ze.append("file_param_name","editormd-image-file"),ze.append("byxhr","true");var nt=new window.XMLHttpRequest;nt.withCredentials=!0,nt.addEventListener("load",function(Ze){Be(JSON.parse(Ze.target.responseText),Le)},!1),nt.addEventListener("error",function(Ze){console.error(Ze)},!1),nt.open("POST","".concat(be.a,"/api/attachments.json")),nt.send(ze)}var se=N("giR+"),J=N("fyUT"),ee=N("7Kak"),ge=N("9yH6"),te=ge.a.Group,Y={margin:"0 8px"},z=function(Le){var Be=Le.callback,ze=Le.onCancel;function nt(Ze){Be(Ze)}return h.a.createElement(B.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:nt},h.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},h.a.createElement("span",{style:Y},"\u5355\u5143\u683C\u6570\uFF1A"),h.a.createElement("span",{style:Y},"\u884C\u6570"),h.a.createElement(B.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},h.a.createElement(J.a,null)),h.a.createElement("span",{style:Y},"\u5217\u6570"),h.a.createElement(B.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},h.a.createElement(J.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},h.a.createElement("span",{style:Y},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),h.a.createElement(B.a.Item,{name:"align"},h.a.createElement(te,null,h.a.createElement(ge.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement(ge.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement(ge.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement(ge.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:ze},"\u53D6\u6D88")))},$=N("ErOA"),me=N("7Cbv"),pe="link",xe="upload-image",Re="code-block",ke="add-table",Me="------------",Pe={default:Me,left:":".concat(Me),center:":".concat(Me,":"),right:"".concat(Me,":")},je=N("9VGf"),Fe,We;function Se(){}var Xe=0,Ye=1e4,Ie="\u2581",He=`
**\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 Ae(Le){return/^\d+$/.test(Le)?"".concat(Le,"px"):Le}var Te=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ce=Te?"Cmd":"Ctrl",ye=["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"],Ee=(Fe={},Object(d.a)(Fe,Ce+"-B","bold"),Object(d.a)(Fe,Ce+"-I","italic"),Fe),we=(We={},Object(d.a)(We,pe,"\u6DFB\u52A0\u94FE\u63A5"),Object(d.a)(We,Re,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(d.a)(We,xe,"\u6DFB\u52A0\u6587\u4EF6"),Object(d.a)(We,ke,"\u6DFB\u52A0\u8868\u683C"),We),Oe=Z.a=function(Le){var Be=Le.defaultValue,ze=Be===void 0?"":Be,nt=Le.onChange,Ze=Le.width,at=Ze===void 0?"100%":Ze,pt=Le.height,dt=pt===void 0?400:pt,it=Le.miniToolbar,Lt=it===void 0?!1:it,Et=Le.isFocus,Qt=Et===void 0?!1:Et,Wt=Le.watch,gt=Le.insertTemp,xt=Le.mode,er=xt===void 0?"markdown":xt,Ht=Le.id,Ke=Ht===void 0?"markdown-editor-id":Ht,ot=Le.showResizeBar,bt=ot===void 0?!1:ot,Ft=Le.noStorage,Bt=Ft===void 0?!1:Ft,At=Le.showNullButton,Dt=At===void 0?!1:At,ct=Le.hidetoolBar,Rt=ct===void 0?!1:ct,rr=Le.fullScreen,Yt=rr===void 0?!1:rr,Nt=Le.onBlur,ar=Le.onCMBeforeChange,Mt=Le.onFullScreen,Dr=Le.className,$e=Dr===void 0?"":Dr,yt=Le.disablePaste,Ur=yt===void 0?!1:yt,xr=Le.placeholder,Br=xr===void 0?"":xr,Mr=Le.values,on=Mr===void 0?"":Mr,Ct=Object(r.useState)(null),vr=Object(_.a)(Ct,2),Ve=vr[0],$t=vr[1],St=Object(r.useState)(ze),Er=Object(_.a)(St,2),yr=Er[0],wr=Er[1],sn=Object(r.useState)(Wt),Rr=Object(_.a)(sn,2),ur=Rr[0],Jr=Rr[1],sr=Object(r.useState)(Yt),ln=Object(_.a)(sr,2),Nr=ln[0],On=ln[1],aa=Object(r.useState)(""),An=Object(_.a)(aa,2),pr=An[0],un=An[1],ia=Object(r.useState)(0),cn=Object(_.a)(ia,2),tr=cn[0],Kt=cn[1],cr=Object(r.useState)(dt),Tr=Object(_.a)(cr,2),yn=Tr[0],Dn=Tr[1],wa=Object(r.useState)(!1),dn=Object(_.a)(wa,2),Xa=dn[0],Nn=dn[1],Rn=Object(r.useRef)(Object(me.a)()),fn=Object(r.useRef)(!1),Ln=Object(r.useRef)(),bn=Object(r.useRef)(),xn=Object(r.useRef)(),Zr=Object(r.useRef)(),Kn=Object(r.useRef)(),Ta=function(){var vt=Object(g.a)(i.a.mark(function kt(){var _t,jt;return i.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.next=2,Object($.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Rn.current}});case 2:jt=Qe.sent,jt!=null&&(_t=jt.attachments)!==null&&_t!==void 0&&_t.length&&(console.log("cm:",Ve,bn),jt.attachments.map(function(et){et.content_type.indexOf("image")>-1?Ve.replaceSelection("![,](/api/attachments/".concat(et.id,"?type=").concat(et.content_type,")")):et.content_type.indexOf("video")>-1?Ve.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):et.content_type.indexOf("pdf")>-1?Ve.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(et.id,"?type=").concat(et.content_type,'&disposition=inline" target="_blank">').concat(et.name,"</a>")):Ve.replaceSelection("[".concat(et.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(et.id,"?type=").concat(et.content_type,")"))}));case 4:case"end":return Qe.stop()}},kt)}));return function(){return vt.apply(this,arguments)}}();Object(r.useEffect)(function(){wr(on),Ve==null||Ve.setValue(on)},[on]),Object(r.useEffect)(function(){Mt==null||Mt(Nr)},[Nr]),Object(r.useEffect)(function(){if(bn.current){var vt=f.a.fromTextArea(bn.current,{mode:er,lineNumbers:!Lt,lineWrapping:!0,value:ze,autoCloseTags:!0,autoCloseBrackets:!0});Qt&&vt.focus();function kt(_t,jt){if(Ur){jt.preventDefault();return}var tt=jt.clipboardData;if(tt){var Qe=tt.types.toString(),et=tt.items;if(Qe==="Files"||tt.types.indexOf("Files")>-1){if(jt.preventDefault(),er=="stex")return;try{var ft,wt=et[1];((ft=et[0])===null||ft===void 0?void 0:ft.kind)==="file"&&(wt=et[0]);var qe=wt.getAsFile(),Pt=qe.name.split(".").pop();q(qe,function(st){if(st.id){var Gt,Vt,ir;(qe==null||((Gt=qe.type)===null||Gt===void 0)?void 0:Gt.indexOf("image"))>-1?vt.replaceSelection("![,](/api/attachments/".concat(st.id,"?type=").concat(st.content_type,")")):(qe==null||((Vt=qe.type)===null||Vt===void 0)?void 0:Vt.indexOf("video"))>-1?vt.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(st.id,'"></video>')):(qe==null||((ir=qe.type)===null||ir===void 0)?void 0:ir.indexOf("pdf"))>-1?vt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(st.id,"?type=").concat(qe.type,'&disposition=inline" target="_blank">').concat(qe.name,"</a>")):ye.includes(Pt)?vt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(st.id,'?type=office&disposition=inline" target="_blank">').concat(qe.name,"</a>")):vt.replaceSelection("[".concat(qe.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(st.id,"?type=").concat(st.content_type,")"))}else(st==null?void 0:st.status)===401&&(document.location.href="/user/login")})}catch(st){S.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return vt.on("paste",kt),vt.on("dragleave",function(_t,jt){xn.current.classList.remove("mouse-hover-md")}),vt.on("dragover",function(_t,jt){xn.current.classList.add("mouse-hover-md")}),vt.on("drop",function(_t,jt){xn.current.classList.add("mouse-hover-md");var tt;if(tt=jt.dataTransfer.files,tt.length>0){jt.preventDefault(),jt.stopPropagation();for(var Qe=function(wt){var qe=tt[wt],Pt=qe.name.split(".").pop();q(qe,function(st){if(st.id){var Gt,Vt,ir;(qe==null||((Gt=qe.type)===null||Gt===void 0)?void 0:Gt.indexOf("image"))>-1?vt.replaceSelection("![,](/api/attachments/".concat(st.id,"?type=").concat(st.content_type,")")):(qe==null||((Vt=qe.type)===null||Vt===void 0)?void 0:Vt.indexOf("video"))>-1?vt.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(st.id,'"></video>')):(qe==null||((ir=qe.type)===null||ir===void 0)?void 0:ir.indexOf("pdf"))>-1?vt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(st.id,"?type=").concat(qe.type,'&disposition=inline" target="_blank">').concat(qe.name,"</a>")):ye.includes(Pt)?vt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(st.id,'?type=office&disposition=inline" target="_blank">').concat(qe.name,"</a>")):vt.replaceSelection("[".concat(qe.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(st.id,"?type=").concat(st.content_type,")"))}else(st==null?void 0:st.status)===401&&(document.location.href="/user/login")})},et=0;et<tt.length;et++)Qe(et)}}),$t(vt),function(){vt.off("paste",kt)}}},[]);var Lr=Object(r.useCallback)(function(){if(xn.current)try{}catch(vt){console.log(vt,"---- to set md editor body height")}},[yn,xn,Nr]);Object(r.useEffect)(function(){function vt(){var _t=new x.default(function(jt){var tt=Object(T.a)(jt),Qe;try{for(tt.s();!(Qe=tt.n()).done;){var et=Qe.value;(et.target.offsetHeight>0||et.target.offsetWidth>0)&&(Lr(),Ve.setSize("100%","100%"),Ve.refresh())}}catch(ft){tt.e(ft)}finally{tt.f()}});return _t.observe(bn.current.parentElement),_t}if(Ve){var kt=vt();return function(){kt.unobserve(bn.current.parentElement)}}},[Ve,Lr]),Object(r.useEffect)(function(){if(Ve){for(var vt=[],kt=function(){var et=jt[_t];tt=Object(_.a)(et,2);var ft=tt[0],wt=tt[1],qe=Object(d.a)({},ft,function(){Gn(wt)});vt.push(qe),Ve.addKeyMap(qe)},_t=0,jt=Object.entries(Ee);_t<jt.length;_t++){var tt;kt()}return Ln.current=setInterval(function(){fn.current&&Ta()},4e3),function(){clearInterval(Ln.current);var Qe=Object(T.a)(vt),et;try{for(Qe.s();!(et=Qe.n()).done;){var ft=et.value;Ve.removeKeyMap(ft)}}catch(wt){Qe.e(wt)}finally{Qe.f()}}}},[Ve]),Object(r.useEffect)(function(){Yt!==Nr&&On(Yt)},[Yt]),Object(je.a)(function(){if(!Bt&&tr>0){var vt=new Date().getTime(),kt=window.sessionStorage.getItem(Ke);vt>=tr+Ye&&(!kt||kt!==yr)&&(window.sessionStorage.setItem(Ke,yr),Nn(!0))}},Ye),Object(r.useEffect)(function(){Jr(Wt)},[Ve,Wt]),Object(r.useEffect)(function(){Ve&&(Qt&&Ve.focus())},[Ve,Qt]),Object(r.useEffect)(function(){if(ur&&Ve){var vt=Ve.getScrollerElement();function kt(_t){var jt=_t.target;if(Kn.current){var tt=jt.scrollTop/jt.scrollHeight;Kn.current.scrollTop=Kn.current.scrollHeight*tt}}return vt.addEventListener("scroll",kt),function(){vt.removeEventListener("scroll",kt)}}},[Ve,ur]),Object(r.useEffect)(function(){if(Ve&&ar){function vt(kt,_t){ar(kt,_t)}return Ve.on("beforeChange",vt),function(){Ve.off("beforeChange",vt)}}},[Ve,ar]),Object(r.useEffect)(function(){if(Ve&&Nt){function vt(){Nt(Ve.getValue())}return Ve.on("blur",vt),function(){Ve.off("blur",vt)}}},[Ve,Nt]),Object(r.useEffect)(function(){if(Ve){function vt(kt){var _t=kt.getValue();wr(_t),Kt(new Date().getTime()),kt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),nt&&nt(_t)}return Ve.on("change",vt),function(){Ve.off("change",vt)}}},[Ve,nt]),Object(r.useEffect)(function(){Ve&&(ze==null?(Ve.setValue(""),wr("")):ze!==Ve.getValue()&&(Ve.setValue(ze),wr(ze),Ve.setCursor(Ve.lineCount(),0)))},[Ve,ze]);var Gn=Object(r.useCallback)(function(vt){var kt=Ve.getCursor(),_t=Ve.getSelection(),jt=_t.split(`
`);switch(vt){case"bold":return Ve.replaceSelection("**"+_t+"**"),_t===""&&Ve.setCursor(kt.line,kt.ch+2),Ve.focus();case"italic":return Ve.replaceSelection("*"+_t+"*"),_t===""&&Ve.setCursor(kt.line,kt.ch+1),Ve.focus();case"code":return Ve.replaceSelection("`"+_t+"`"),_t===""&&Ve.setCursor(kt.line,kt.ch+1),Ve.focus();case"inline-latex":return Ve.replaceSelection("`$$"+_t+"$$`"),_t===""&&Ve.setCursor(kt.line,kt.ch+3),Ve.focus();case"latex":return Ve.replaceSelection("```latex\n"+_t+"\n```"),Ve.setCursor(kt.line+1,_t.length+1),Ve.focus();case"line-break":return Ve.replaceSelection(`<br/>
`),Ve.focus();case"list-ul":return _t===""?Ve.replaceSelection("- "+_t):Ve.replaceSelection(jt.map(function(tt){return tt===""?"":"- ".concat(tt)}).join(`
`)),Ve.focus();case"list-ol":return _t===""?Ve.replaceSelection("1. "+_t):Ve.replaceSelection(jt.map(function(tt,Qe){return tt===""?"":"".concat(Qe+1,". ").concat(tt)}).join(`
`)),Ve.focus();case"add-null-ch":return _t===""&&Ve.setCursor(kt.line,kt.ch+1),Ve.replaceSelection(Ie),Ve.focus();case"inster-template-1":return _t===""&&Ve.setCursor(kt.line,kt.ch),Ve.replaceSelection(He),Ve.focus();case"eraser":return Ve.setValue(""),Ve.focus();case"trigger-watch":return Jr(!ur),Ve.focus();case"trigger-full-screen":return On(!Nr),Ve.focus();case pe:un(pe);return;case Re:un(Re);return;case xe:un(xe);return;case ke:un(ke);return;default:throw new Error}},[Ve,ur,Nr]),kn=Object(r.useCallback)(function(vt){un("");switch(pr){case pe:var kt=vt.title,_t=vt.link;return Ve.replaceSelection("[".concat(kt,"](").concat(_t,")")),Ve.focus();case Re:var jt=vt.language,tt=vt.content;return Ve.replaceSelection(["```"+jt,tt,"```"].join(`
`)),Ve.focus();case xe:var Qe=vt.src,et=vt.alt;return et?Ve.replaceSelection("![ ".concat(et," ]( ").concat(Qe,' "').concat(et,'" )')):Ve.replaceSelection("![,](".concat(Qe,")")),Ve.focus();case ke:for(var ft=vt.row,wt=vt.col,qe=vt.align,Pt=`
`,st=0;st<ft;st++){for(var Gt=[],Vt=[],ir=0;ir<wt;ir++)st===1&&Vt.push(Pe[qe]),Gt.push(" ");st===1&&(Pt+="| ".concat(Vt.join(" | "),` |
`)),Pt+="| ".concat(Gt.join(wt===1?"":" | "),` |
`)}return Ve.replaceSelection(Pt+`
`),Ve.focus();default:throw new Error}},[Ve,pr]),oa=Object(r.useMemo)(function(){switch(pr){case pe:return h.a.createElement(ie,{callback:kn,onCancel:Pn});case Re:return h.a.createElement(ce.b,{callback:kn,onCancel:Pn});case xe:return h.a.createElement(re,{callback:kn,onCancel:Pn});case ke:return h.a.createElement(z,{callback:kn,onCancel:Pn});default:return null}},[pr]);function Pn(){un("")}Object(r.useEffect)(function(){if(Zr.current){var vt=Zr.current,kt=!1,_t=0;function jt(et){kt=!0,_t=et.pageY}function tt(){kt=!1}function Qe(et){if(kt){var ft=et.pageY-_t;ft<0&&(ft=0),ft>300&&(ft=300);var wt=dt+ft+"px";Dn(wt)}}return vt.addEventListener("mousedown",jt),document.addEventListener("mousemove",Qe),document.addEventListener("mouseup",tt),function(){vt.removeEventListener("mousedown",jt),document.removeEventListener("mousemove",Qe),document.removeEventListener("mouseup",tt)}}},[Ve,Zr]),Object(r.useEffect)(function(){Dn(dt)},[dt]);var hn=Ae(at),sa=Ae(yn),Qr={width:hn,height:sa},la=Object(r.useMemo)(function(){if(tr){var vt=new Date(tr),kt=vt.getHours(),_t=vt.getMinutes(),jt=vt.getSeconds();return kt=kt<10?"0"+kt:kt,_t=_t<10?"0"+_t:_t,jt=jt<10?"0"+jt:jt,"".concat(kt,":").concat(_t,":").concat(jt)}return 0},[tr]);function _a(){window.sessionStorage.removeItem(Ke),Nn(!1),Kt(0)}function Fn(){Nn(!1),Kt(0),Ve.setValue(window.sessionStorage.getItem(Ke))}function Va(vt,kt){var _t=Ve.getValue();_t=_t.replace(vt,kt),wr(_t),Ve==null||Ve.setValue(_t)}return h.a.createElement(r.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:xn},h.a.createElement("div",{className:"markdown-editor-container ".concat($e," ").concat(ur?"on-preview":""," ").concat(Lt?"mini":""," ").concat(Nr?"full-screen":""),style:Qr},h.a.createElement(k,{insertTemp:gt,watch:ur,fullScreen:Nr,showNullButton:Dt,onActionCallback:Gn,hidetoolBar:Rt,uuid:Rn.current,setOpenPhones:function(){fn.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:bn,placeholder:Br})),ur?h.a.createElement("div",{ref:Kn,className:"preview-container"},er==="stex"&&h.a.createElement(R,{value:yr}),er!=="stex"&&h.a.createElement(a.a,{edit:!0,value:yr,replaces:Va})):null))),bt?h.a.createElement("a",{ref:Zr,className:"editor-resize"}):null,h.a.createElement(X.a,null,we[pr]?h.a.createElement(m.a,{centered:!0,title:we[pr],visible:!0,onCancel:Pn,footer:null,className:"markdown-popup-form"},oa):null))}},"P/tu":function(I,Z,N){"use strict";var P=N("ozfa"),m=N("MJZm"),T=N("0Owb"),L=N("9og8"),S=N("tJVT"),g=N("PpiC"),_=N("WmNS"),d=N.n(_),o=N("cDcd"),i=N.n(o),r=N("WCUW"),h=N("spXi"),p=N.n(h),f=function(v){var l=v.value,n=v.onChange,s=v.defaultValue,u=v.disabled,w=Object(g.a)(v,["value","onChange","defaultValue","disabled"]),y=Object(o.useState)([]),a=Object(S.a)(y,2),R=a[0],D=a[1],c=Object(o.useState)("1"),b=Object(S.a)(c,2),E=b[0],C=b[1];Object(o.useEffect)(function(){F()},[]);var F=function(){var X=Object(L.a)(d.a.mark(function G(){var H,K;return d.a.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.next=2,Object(r.A)({});case 2:H=U.sent,H!=null&&H.data&&(K=[{title:i.a.createElement("div",{title:"\u6839\u76EE\u5F55",className:p.a.name},"\u6839\u76EE\u5F55"),value:0,key:0,icon:i.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:j(H.data||[])}],D(K),C("2"));case 4:case"end":return U.stop()}},G)}));return function(){return X.apply(this,arguments)}}(),j=function(G){function H(K){var B=K.children,U=Array.isArray(B)&&B.length>0,W=K==null?void 0:K.group_id;return{title:i.a.createElement("div",{title:K==null?void 0:K.name,className:p.a.name},K==null?void 0:K.name),value:W,key:W,icon:i.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:U?B==null?void 0:B.map(function(Q){return H(Q)}):[]}}return G==null?void 0:G.map(function(K){return H(K)})},k=s?{defaultExpandedKeys:[0]}:{selectedKeys:l,defaultExpandedKeys:l};return i.a.createElement("div",{className:p.a.customTree},i.a.createElement(m.a,Object(T.a)({key:E},k,{showIcon:!0,treeData:R,onSelect:n,disabled:u},w)))};Z.a=f},PD8m:function(I,Z){I.exports={name:"memoryStorage",read:P,write:m,each:T,remove:L,clearAll:S};var N={};function P(g){return N[g]}function m(g,_){N[g]=_}function T(g){for(var _ in N)N.hasOwnProperty(_)&&g(N[_],_)}function L(g){delete N[g]}function S(g){N={}}},PHyj:function(I,Z,N){"use strict";N.r(Z),N.d(Z,"Types",function(){return gt});var P=N("P2fV"),m=N("NJEC"),T=N("CiB2"),L=N("DYRE"),S=N("zeV3"),g=N("7Kak"),_=N("9yH6"),d=N("sRBo"),o=N("kaz8"),i=N("giR+"),r=N("fyUT"),h=N("6UJt"),p=N("DFOY"),f=N("OaEy"),x=N("2fM7"),v=N("rAM+"),l=N("T2oS"),n=N("W9HT"),s=N("+L6B"),u=N("2/Rp"),w=N("oBTY"),y=N("miYZ"),a=N("tsqr"),R=N("9og8"),D=N("y8nQ"),c=N("Vl3Y"),b=N("tJVT"),E=N("k1fw"),C=N("fu2T"),F=N("gK9i"),j=N("2qtc"),k=N("kLXV"),X=N("5NDa"),G=N("5rEg"),H=N("WmNS"),K=N.n(H),B=N("cDcd"),U=N.n(B),W=N("uMZB"),Q=N.n(W),ie=N("jrin"),ce,he=x.a.Option,be;(function(Ke){Ke[Ke.language=0]="language",Ke[Ke.difficult=1]="difficult",Ke[Ke.category=2]="category",Ke[Ke.openOrNot=3]="openOrNot"})(be||(be={}));var ne=(ce={},Object(ie.a)(ce,be.language,[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}]),Object(ie.a)(ce,be.difficult,[{title:"\u7B80\u5355",key:1},{title:"\u4E2D\u7B49",key:2},{title:"\u56F0\u96BE",key:3}]),Object(ie.a)(ce,be.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(ie.a)(ce,be.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),ce);function le(Ke){return ne[Ke].map(function(ot){return U.a.createElement(he,{key:ot.title,value:ot.key}," ",ot.title," ")})}function ue(Ke,ot){Ke.map(function(bt){var Ft=bt.id,Bt=bt.name,At=bt.sub_disciplines,Dt={value:Ft,label:Bt};ot.push(Dt),At&&At.length>0&&(Dt.children=[],ue(At,Dt.children))})}function re(Ke,ot){for(var bt=[],Ft=0;Ft<Ke.length;Ft++){var Bt,At=Ke[Ft];if(((Bt=At.sub_disciplines)===null||Bt===void 0?void 0:Bt.length)>0){bt[0]=At.id;for(var Dt=0;Dt<At.sub_disciplines.length;Dt++){var ct=At.sub_disciplines[Dt];if(ct.id===ot)return bt[1]=ct.id,[bt,ct.tag_disciplines||ct.sub_disciplines||[]]}}}return[bt,[]]}var oe=N("Ty5D"),q=N("J66h"),se=N("GIiI"),J=N("2BaD"),ee=N("Ot1p"),ge=N("ErOA");function te(){return Object(ge.c)("problems/new.json")}function Y(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"question";return Object(ge.c)("disciplines.json",{source:Ke})}function z(Ke){return Object(ge.c)("problems/".concat(Ke,"/edit.json"))}function $(Ke,ot){return Object(ge.g)("problems/".concat(Ke,".json"),ot)}function me(Ke){return Object(ge.f)("problems.json",Ke)}function pe(Ke,ot){return Object(ge.f)("exercises/".concat(Ke,"/exercise_questions.json"),ot)}function xe(Ke,ot){return Object(ge.g)("exercise_questions/".concat(Ke,".json"),ot)}function Re(Ke){return Object(ge.f)("problems/".concat(Ke,"/publish.json"))}function ke(Ke){return Object(ge.f)("problems/".concat(Ke,"/cancel_publish.json"))}function Me(Ke){return Object(ge.c)("problems/".concat(Ke,"/start.json"))}function Pe(Ke,ot){return Object(ge.f)("tag_disciplines.json",{name:ot,sub_discipline_id:Ke})}var je=N("V0Rq"),Fe=N("cDPC"),We=N("EHPI"),Se=N("bbsP"),Xe=N("/wGt"),Ye=N("ZW9T"),Ie=N("ZD9Y"),He=N("M8RZ"),Ae=N("bCnd"),Te=N("b8wu"),Ce=N.n(Te),ye=N("LvDl"),Ee={theme:Object(Ae.a)("cmCodeMode","vs-dark"),fontSize:Object(Ae.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(Ae.a)("cmTabToSpace",!0)},we;(function(Ke){Ke[Ke.set_font_size=0]="set_font_size",Ke[Ke.set_theme=1]="set_theme",Ke[Ke.on_tab_to_space=2]="on_tab_to_space",Ke[Ke.set_show_editor_setting=3]="set_show_editor_setting"})(we||(we={}));function Oe(Ke,ot){switch(ot.type){case we.set_show_editor_setting:return Object(E.a)(Object(E.a)({},Ke),{},{showEditorSetting:ot.payload});case we.set_theme:return Object(E.a)(Object(E.a)({},Ke),{},{theme:ot.payload});case we.set_font_size:return Object(E.a)(Object(E.a)({},Ke),{},{fontSize:ot.payload});case we.on_tab_to_space:return Object(E.a)(Object(E.a)({},Ke),{},{tabToSpace:ot.payload});default:throw new Error}}var Le=function(Ke){var ot,bt=Ke.isLoading,Ft=Ke.value,Bt=Ft===void 0?[]:Ft,At=Ke.onChange,Dt=Object(B.useReducer)(Oe,Ee),ct=Object(b.a)(Dt,2),Rt=ct[0],rr=ct[1],Yt=Rt.theme,Nt=Rt.fontSize,ar=Rt.showEditorSetting,Mt=Rt.tabToSpace,Dr=Object(B.useState)("c"),$e=Object(b.a)(Dr,2),yt=$e[0],Ur=$e[1],xr=Object(B.useRef)([]);Object(B.useEffect)(function(){Bt!=null&&Bt.length&&(xr.current=Object(ye.cloneDeep)(Bt))},[Bt]);var Br={onFontSizeChange:function($t){rr({type:we.set_font_size,payload:$t}),Object(Ae.b)("cmFontSize",$t)},tabToSpace:Mt,cmFontSize:Nt,className:"oj",cmCodeMode:Yt,onTabToSpace:function($t){rr({type:we.on_tab_to_space,payload:$t}),Object(Ae.b)("cmTabToSpace",$t)},onCodeModeChange:function($t){rr({type:we.set_theme,payload:$t}),Object(Ae.b)("cmCodeMode",$t)}};function Mr(){rr({type:we.set_show_editor_setting,payload:!1})}function on(){rr({type:we.set_show_editor_setting,payload:!0})}function Ct(Ve){var $t,St=($t=xr.current)===null||$t===void 0?void 0:$t.map(function(Er){return Er.language===yt&&(Er.code=Ve),Er});xr.current=Object(ye.cloneDeep)(St),At(St)}var vr={key:yt,value:Bt==null||((ot=Bt.find(function(Ve){return Ve.language===yt}))===null||ot===void 0)?void 0:ot.code,language:yt,onChange:Ct,theme:Yt,height:"calc(100% - 56px)",options:{fontSize:Nt,insertSpaces:Mt}};return U.a.createElement(B.Fragment,null,U.a.createElement("div",{className:Ce.a["code-panel-container"]},U.a.createElement(Be,{languageItems:Bt,onLanguage:function($t){return Ur($t)},language:yt,onShowCodeSetting:on}),!bt&&U.a.createElement(Ye.b,vr)),U.a.createElement(He.a,null,U.a.createElement(Xe.a,{className:"oj",title:null,placement:"right",closable:!1,visible:ar,onClose:Mr},U.a.createElement(Ie.a,Br))))};function Be(Ke){var ot=Ke.languageItems,bt=Ke.language,Ft=Ke.onShowCodeSetting,Bt=Ke.onLanguage;return U.a.createElement("div",{className:Ce.a["action-oj-bar"]},U.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),ot==null?void 0:ot.map(function(At){return U.a.createElement("div",{className:bt===(At==null?void 0:At.language)?Ce.a.active:"",onClick:function(){return Bt(At==null?void 0:At.language)},key:At==null?void 0:At.language},At==null?void 0:At.language)}),U.a.createElement("a",{onClick:Ft},U.a.createElement("i",{className:"iconfont icon-shezhi"})))}var ze=N("m3rI"),nt=N("u2Z1"),Ze=N("P/tu"),at=N("B7Ph"),pt=N("vCeJ"),dt=N("hQp1"),it=G.a.TextArea,Lt=k.a.confirm,Et=F.a.Panel;function Qt(){return new Date().getTime()}var Wt={loading:!0,user:null,disciplines:[],dicts:null,status:0,data:void 0,lastedUpdateTime:0},gt;(function(Ke){Ke[Ke.SET_INITAL_DATA=0]="SET_INITAL_DATA",Ke[Ke.SET_LOADING=1]="SET_LOADING",Ke[Ke.SET_STATUS=2]="SET_STATUS"})(gt||(gt={}));function xt(Ke,ot){switch(ot.type){case gt.SET_INITAL_DATA:return Object(E.a)(Object(E.a)({},Ke),ot.payload);case gt.SET_LOADING:return Object(E.a)(Object(E.a)({},Ke),{},{loading:ot.payload});case gt.SET_STATUS:return Object(E.a)(Object(E.a)({},Ke),{},{status:ot.payload});default:throw new Error}}var er=Z.default=function(){var Ke,ot,bt=Object(oe.h)(),Ft=Object(oe.g)(),Bt=Object(oe.i)(),At=Bt.id,Dt=c.a.useForm(),ct=Object(b.a)(Dt,1),Rt=ct[0],rr=Object(B.useState)(),Yt=Object(b.a)(rr,2),Nt=Yt[0],ar=Yt[1],Mt=Object(B.useState)([]),Dr=Object(b.a)(Mt,2),$e=Dr[0],yt=Dr[1],Ur=Object(B.useState)([]),xr=Object(b.a)(Ur,2),Br=xr[0],Mr=xr[1],on=Object(B.useReducer)(xt,Wt),Ct=Object(b.a)(on,2),vr=Ct[0],Ve=Ct[1],$t=vr.loading,St=vr.data,Er=vr.user,yr=vr.disciplines,wr=vr.dicts,sn=vr.status,Rr=St==null?void 0:St.hack_sets,ur=St==null||((Ke=St.hack)===null||Ke===void 0)?void 0:Ke.test_set_average,Jr=bt.query,sr=Jr.callback_url,ln=Jr.express_id,Nr=Jr.score,On=Jr.question_id,aa=Jr.type,An=Object(B.useState)([]),pr=Object(b.a)(An,2),un=pr[0],ia=pr[1],cn=Object(B.useState)(!1),tr=Object(b.a)(cn,2),Kt=tr[0],cr=tr[1],Tr=Object(B.useState)(!1),yn=Object(b.a)(Tr,2),Dn=yn[0],wa=yn[1],dn=aa==="1",Xa=Object(B.useMemo)(function(){var tt=[];return yr&&ue(yr,tt),tt},[yr]),Nn=Object(B.useCallback)(Object(R.a)(K.a.mark(function tt(){var Qe,et,ft,wt,qe,Pt,st,Gt,Vt,ir,dr,Xr,fr,zt,ua,En,qr,zn,jn,ca,pn,mn,Xn,In,Vn,Un,Ya,It,Jt,Bn,da,gn,en,wn,fa,$a,Sa,Ja,Za,Ca,tn,Vr,Qa,Yn,Tn,xi,Ei,Oa,vn,$n,Aa,Da=arguments;return K.a.wrap(function(kr){for(;;)switch(kr.prev=kr.next){case 0:if(Qe=Da.length>0&&Da[0]!==void 0?Da[0]:0,et=yr,!(et.length===0)){kr.next=7;break}return kr.next=5,Y("new_question");case 5:ft=kr.sent,et=ft.disciplines;case 7:if(!At){kr.next=15;break}return wt={disciplines:et},kr.next=11,z(At);case 11:qe=kr.sent,qe.message?qe.status==="401"&&(document.location.href="/user/login"):(Pt=qe.category,st=qe.user,Gt=qe.code,Vt=qe.language,ir=qe.hack_sets,dr=qe.description,Xr=qe.difficult,fr=qe.name,zt=qe.open_or_not,ua=qe.sub_discipline_id,En=qe.tag_discipline_id,qr=qe.time_limit,zn=qe.test_set_average,jn=qe.test_set_score,ca=qe.status,pn=qe.tag_discipline_ids,mn=qe.item_banks_group_id,Xn=qe.is_file,In=Xn===void 0?!1:Xn,Vn=qe.hide_actual_output,Un=qe.code_compile_score,Ya=qe.languages,It=qe.is_my,Jt=qe.codes,Bn=re(et,ua),da=Object(b.a)(Bn,2),gn=da[0],en=da[1],cr(Vn),wn=In?[{input:"",output:"",score:100,position:1}]:ir,In?(Mr(ir),Rt.setFieldsValue({hack_sets:wn})):Mr([]),fa=bt.query.lastedUpdateTime,$a=Jt==null?void 0:Jt.map(function(rn){return Object(E.a)(Object(E.a)({},rn),{},{code:q.Base64.decode(rn==null?void 0:rn.code)})}),wt=Object(E.a)(Object(E.a)({},wt),{},{loading:!1,user:st,dicts:en,status:ca,lastedUpdateTime:Qe||(fa||0),data:{hack_codes:{language:Vt,code:q.Base64.decode(Gt)},hack:{category:Pt,difficult:Xr,name:fr,description:dr,open_or_not:zt,time_limit:qr,test_set_average:zn,test_set_score:jn,sub_discipline_id:gn,tag_discipline_ids:pn,languages:Ya,score:Nr||1,item_banks_group_ids:mn,is_file:In,is_my:It,code_compile_score:Un},hack_sets:wn,tags:pn,codes:$a}}),parseInt(Un)>0&&wa(!0),Ve({type:gt.SET_INITAL_DATA,payload:wt}),ar({hack:{category:Pt,difficult:Xr,name:fr,description:dr,open_or_not:zt,time_limit:qr,test_set_average:zn,test_set_score:jn,sub_discipline_id:gn,tag_discipline_ids:pn,score:Nr||1,item_banks_group_ids:mn,is_file:In},codes:$a}),Rn(gn==null?void 0:gn[0],gn==null?void 0:gn[1],et)),kr.next=25;break;case 15:return kr.next=17,te();case 17:Za=kr.sent,Ca=Za.user,tn=bt.query,Vr=tn.difficult,Qa=tn.sub_discipline_id,Yn=tn.tag_discipline_id,Tn=tn.tagIds,xi=tn.banksIds,Ei=re(et,parseInt(Qa,10)),Oa=Object(b.a)(Ei,2),vn=Oa[0],$n=Oa[1],Aa=[Number(xi)],Ve({type:gt.SET_INITAL_DATA,payload:{loading:!1,user:Ca,disciplines:et,status:0,dicts:$n,data:{hack_codes:{language:"C",code:""},hack:{category:null,difficult:parseInt(Vr,10),time_limit:3,description:"",test_set_score:!0,test_set_average:!0,open_or_not:!0,sub_discipline_id:vn,tag_discipline_id:Tn&&(Tn==null||((Sa=Tn.split(","))===null||Sa===void 0)?void 0:Sa.map(function(rn){return Number(rn)})),name:"",item_banks_group_ids:Aa,is_file:!1},tags:Yn?Yn==null?void 0:Yn.split(",").map(function(rn){return parseInt(rn,10)}):[],hack_sets:[{input:"",output:"",score:100,position:1}]}}}),ar({hack:{category:null,difficult:parseInt(Vr,10),time_limit:3,description:"",test_set_average:!0,open_or_not:!0,sub_discipline_id:vn,tag_discipline_id:Tn&&(Tn==null||((Ja=Tn.split(","))===null||Ja===void 0)?void 0:Ja.map(function(rn){return Number(rn)})),name:"",item_banks_group_id:Aa,is_file:!1}}),Rn(vn==null?void 0:vn[0],vn==null?void 0:vn[1],et);case 25:case"end":return kr.stop()}},tt)})),[At,yr]);Object(B.useEffect)(function(){try{Nn()}catch(tt){console.log(tt,"----")}},[]),Object(B.useEffect)(function(){function tt(){return Qe.apply(this,arguments)}function Qe(){return Qe=Object(R.a)(K.a.mark(function et(){var ft;return K.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.next=2,Object(ge.c)("item_banks_groups/mine.json");case 2:ft=qe.sent,ia(ft);case 4:case"end":return qe.stop()}},et)})),Qe.apply(this,arguments)}tt()},[]);var Rn=function(Qe,et,ft){var wt,qe,Pt,st=ft==null||((wt=ft.find(function(Gt){return Gt.id===Qe}))===null||wt===void 0||((qe=wt.sub_disciplines)===null||qe===void 0||((Pt=qe.find(function(Gt){return Gt.id===et}))===null||Pt===void 0)))?void 0:Pt.tag_disciplines};function fn(tt,Qe,et){return Ln.apply(this,arguments)}function Ln(){return Ln=Object(R.a)(K.a.mark(function tt(Qe,et,ft){var wt,qe,Pt,st,Gt,Vt,ir,dr,Xr,fr,zt,ua,En,qr,zn,jn,ca,pn,mn,Xn,In,Vn,Un;return K.a.wrap(function(It){for(;;)switch(It.prev=It.next){case 0:wt=Object(E.a)({},Qe),qe=wt.hack_sets,Pt=wt.hack_codes,st=wt.hack,Gt=wt.tags,Vt=wt.codes,st.hide_actual_output=Kt,ir=[],dr=[],Xr=0,fr=st!=null&&st.is_file?Br.map(function(Jt,Bn){return Object(E.a)(Object(E.a)({},Jt),{},{position:Bn+1})}):qe.map(function(Jt){return Object(E.a)(Object(E.a)({},Jt),{},{is_file:!1})}),zt=Object(v.a)(fr);try{for(zt.s();!(ua=zt.n()).done;)En=ua.value,Xr+=En.score,En.id&&En.id>=0?ir.push(En):dr.push(En)}catch(Jt){zt.e(Jt)}finally{zt.f()}if(fr!=null&&fr.length){It.next=11;break}return a.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),It.abrupt("return");case 11:if(Xr+=parseInt(st.code_compile_score||0),!(Xr!==100&&!st.test_set_score)){It.next=15;break}return a.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),It.abrupt("return");case 15:if(!(fr!=null&&fr.some(function(Jt){return!Jt.output}))){It.next=18;break}return a.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),It.abrupt("return");case 18:if(qr={},dn?Vt==null||Vt.forEach(function(Jt){qr[Jt.language]=Jt!=null&&Jt.code?q.Base64.encode(Jt==null?void 0:Jt.code):""}):Pt.code=q.Base64.encode(Pt==null?void 0:Pt.code),st.sub_discipline_id=st.sub_discipline_id[1],Ve({type:gt.SET_LOADING,payload:!0}),sr||(st.score=st.difficult*100),!At){It.next=49;break}return It.next=26,$(At,{hack:st,hack_codes:Pt,hack_sets:dr,update_hack_sets:ir,tags:Gt,is_cover:ft,languages:st.languages,codes:qr});case 26:if(!sr){It.next=45;break}return It.next=29,Re(At);case 29:if(!sr.includes("paperlibrary")){It.next=35;break}return It.next=32,Object(pt.f)({id:ln,question_id:On,item_type:dt.a.Program,name:st.name,question_score:st.score,difficulty:st.difficult,sub_discipline_id:st.sub_discipline_id,tag_discipline_ids:st.tag_discipline_ids,item_banks_group_ids:st.item_banks_group_ids});case 32:return zn=It.sent,zn.status===0&&Ft.replace(sr),It.abrupt("return");case 35:return It.next=37,xe(On,{question_type:6,question_score:st.score,question_title:st.name,description:st.description,sub_discipline_id:st.sub_discipline_id,tag_discipline_ids:st.tag_discipline_ids,item_banks_group_ids:st.item_banks_group_ids,identifier:At});case 37:if(jn=It.sent,ca=jn.status,!(ca===0)){It.next=43;break}if(!(et==="start")){It.next=42;break}return It.abrupt("return");case 42:Ft.replace(sr);case 43:It.next=46;break;case 45:Nn(Qt());case 46:Ve({type:gt.SET_LOADING,payload:!1}),It.next=79;break;case 49:return It.next=51,me({hack:st,hack_codes:Pt,hack_sets:fr,tags:Gt,examination_bank_id:ln||null});case 51:if(pn=It.sent,mn=pn.identifier,Xn=pn.exam_identifier,Ve({type:gt.SET_LOADING,payload:!1}),!(et==="start")){It.next=57;break}return It.abrupt("return");case 57:if(!mn){It.next=79;break}if(sr){It.next=62;break}Ft.replace("/problems/".concat(mn,"/edit?lastedUpdateTime=").concat(Qt())),It.next=79;break;case 62:return It.next=64,Re(mn);case 64:if(At){It.next=78;break}if(!sr.includes("paperlibrary")){It.next=71;break}return It.next=68,Object(pt.f)({id:ln,item_type:dt.a.Program,name:st.name,question_score:st.score,difficulty:st.difficult,sub_discipline_id:st.sub_discipline_id,tag_discipline_ids:st.tag_discipline_ids,identifier:Xn});case 68:return In=It.sent,In.status===0&&Ft.replace(sr),It.abrupt("return");case 71:return It.next=73,pe(parseInt(ln,10),{question_type:6,question_score:st.score,question_title:st.name,identifier:mn,tag_discipline_ids:st.tag_discipline_ids});case 73:Vn=It.sent,Un=Vn.status,Un===0&&Ft.replace(sr),It.next=79;break;case 78:Ft.replace(sr);case 79:case"end":return It.stop()}},tt)})),Ln.apply(this,arguments)}function bn(){Rt.submit(),setTimeout(Object(R.a)(K.a.mark(function tt(){var Qe;return K.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return ft.next=2,Re(At);case 2:Qe=ft.sent,Qe.status===0?(a.b.success("\u53D1\u5E03\u6210\u529F"),Ve({type:gt.SET_STATUS,payload:1})):a.b.info(Qe.message);case 4:case"end":return ft.stop()}},tt)})),400)}function xn(){return Zr.apply(this,arguments)}function Zr(){return Zr=Object(R.a)(K.a.mark(function tt(){var Qe;return K.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return ft.next=2,ke(At);case 2:Qe=ft.sent,Qe.status===0?(a.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F"),Ve({type:gt.SET_STATUS,payload:0})):a.b.info(Qe.message);case 4:case"end":return ft.stop()}},tt)})),Zr.apply(this,arguments)}function Kn(){sn===0?Lt({title:"\u63D0\u793A",content:U.a.createElement(B.Fragment,null," ",U.a.createElement("div",null,"\u53D1\u5E03\u540E\u5373\u53EF\u5E94\u7528\u5230\u81EA\u5DF1\u7BA1\u7406\u7684\u8BFE\u5802")," ",U.a.createElement("div",null," \u662F\u5426\u786E\u8BA4\u53D1\u5E03?")," "),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){bn()}}):Lt({title:"\u63D0\u793A",content:U.a.createElement("p",null,"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){xn()}})}function Ta(){return Lr.apply(this,arguments)}function Lr(){return Lr=Object(R.a)(K.a.mark(function tt(){return K.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return et.t0=fn,et.next=3,Rt.getFieldValue();case 3:et.t1=et.sent,(0,et.t0)(et.t1,"start"),setTimeout(Object(R.a)(K.a.mark(function ft(){var wt,qe;return K.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return st.next=2,Me(At);case 2:wt=st.sent,qe=wt.identifier,dn?window.location.href="/myproblems/".concat(qe,"?type=1"):window.location.href="/myproblems/".concat(qe);case 5:case"end":return st.stop()}},ft)})),400);case 6:case"end":return et.stop()}},tt)})),Lr.apply(this,arguments)}function Gn(){if(sr)Ft.replace(sr);else if(dn){var tt,Qe=(tt=localStorage.getItem("program_homework"))===null||tt===void 0?void 0:tt.split(",");Ft.push("/classrooms/".concat(Qe==null?void 0:Qe[0],"/program_homework/").concat(Qe==null?void 0:Qe[1],"/detail"))}else Ft.replace("/problemset")}var kn=function(Qe){var et=parseInt(Rt.getFieldValue("hack").code_compile_score)||0,ft=Math.floor((100-et)/Qe.length),wt=ft+(100-et)%Qe.length;Qe=Qe.map(function(qe,Pt){return Pt===Qe.length-1?Object(E.a)(Object(E.a)({},qe),{},{score:wt}):Object(E.a)(Object(E.a)({},qe),{},{score:ft})}),Mr(Qe)};function oa(tt){tt.target.value||kn(Br),Ve({type:gt.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},St),{},{hack:Object(E.a)(Object(E.a)({},St.hack),{},{test_set_score:tt.target.value})})}})}function Pn(tt){Ve({type:gt.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},St),{},{hack:Object(E.a)(Object(E.a)({},St.hack),{},{is_file:tt.target.value})})}})}function hn(tt){cr(tt.target.checked)}function sa(tt){var Qe=tt.target.value;Qe&&kn(Br),Ve({type:gt.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},St),{},{hack:Object(E.a)(Object(E.a)({},St.hack),{},{test_set_average:Qe})})}})}function Qr(){var tt=Rt.getFieldValue("hack_sets"),Qe=parseInt(Rt.getFieldValue("hack").code_compile_score)||0,et=tt.length+1,ft=Math.floor((100-Qe)/et),wt=(100-Qe)%et;tt.map(function(qe,Pt){return ur&&(qe.score=ft),qe.position=Pt+1,qe}),tt.push({input:"",output:"",position:et,score:ur?ft+wt:0}),Rt.setFieldsValue({hack_sets:tt}),Ve({type:gt.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},St),{},{hack_sets:tt})}})}function la(){var tt=Rt.getFieldValue("hack_sets"),Qe=parseInt(Rt.getFieldValue("hack").code_compile_score)||0,et=tt.length,ft=Math.floor((100-Qe)/et),wt=(100-Qe)%et;tt.map(function(qe,Pt){return ur&&(qe.score=ft,Pt===tt.length-1&&(qe.score=ft+wt)),qe.position=Pt+1,qe}),Rt.setFieldsValue({hack_sets:tt}),Ve({type:gt.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},St),{},{hack_sets:tt})}})}Object(B.useEffect)(function(){if(ur){var tt=parseInt(Rt.getFieldValue("hack").code_compile_score)||0,Qe=Rr==null?void 0:Rr.length,et=Math.floor((100-tt)/Qe),ft=(100-tt)%Qe;Rr==null||Rr.map(function(wt,qe){return wt.score=et,wt.position=qe+1,qe===Qe-1&&(wt.score=et+ft),wt}),Ve({type:gt.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},St),{},{hack_sets:Rr})}}),Rt.setFieldsValue({hack_sets:Rr})}},[ur]);function _a(tt){var Qe=Rt.getFieldValue("hack_sets"),et=parseInt(Rt.getFieldValue("hack").code_compile_score)||0,ft=(Qe==null?void 0:Qe.length)-1,wt=Math.floor((100-et)/ft),qe=(100-et)%ft;Qe.splice(tt,1),Qe==null||Qe.map(function(Pt,st){return ur&&(Pt.score=wt,st===ft-1&&(Pt.score=wt+qe)),Pt.position=st+1,Pt}),Ve({type:gt.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},St),{},{hack_sets:Qe})}}),Rt.setFieldsValue({hack_sets:Qe})}function Fn(tt){Ve({type:gt.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},St),{},{hack_codes:Object(E.a)(Object(E.a)({},St.hack_codes),{},{language:tt})})}})}var Va=function(Qe){var et;if(Qe!=null&&(et=Qe.hack)!==null&&et!==void 0&&et.sub_discipline_id){var ft,wt,qe,Pt,st,Gt=Qe==null||((ft=Qe.hack)===null||ft===void 0)?void 0:ft.sub_discipline_id,Vt=Object(b.a)(Gt,2),ir=Vt[0],dr=Vt[1],Xr=yr==null||((wt=yr.find(function(zt){return zt.id===ir}))===null||wt===void 0||((qe=wt.sub_disciplines)===null||qe===void 0||((Pt=qe.find(function(zt){return zt.id===dr}))===null||Pt===void 0)))?void 0:Pt.tag_disciplines,fr=Object(E.a)(Object(E.a)({},Rt.getFieldsValue()),{},{hack:Object(E.a)(Object(E.a)({},(st=Rt.getFieldsValue())===null||st===void 0?void 0:st.hack),{},{tag_discipline_ids:[]})});Rt.setFieldsValue(fr),ar(fr)}else ar(Object(E.a)({},Rt.getFieldsValue()))},vt=function(Qe){yt([].concat(Object(w.a)($e),[Object(E.a)({},Qe)]))};Object(B.useEffect)(function(){var tt,Qe;if(St!=null&&(tt=St.hack)!==null&&tt!==void 0&&(Qe=tt.sub_discipline_id)!==null&&Qe!==void 0&&Qe[1]){var et,ft;kt(St==null||((et=St.hack)===null||et===void 0||((ft=et.sub_discipline_id)===null||ft===void 0))?void 0:ft[1])}},[St==null||((ot=St.hack)===null||ot===void 0)?void 0:ot.sub_discipline_id]);var kt=function(){var tt=Object(R.a)(K.a.mark(function Qe(et){var ft;return K.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.next=2,Object(je.I)({sub_discipline_id:et});case 2:ft=qe.sent,yt(ft.tag_disciplines);case 4:case"end":return qe.stop()}},Qe)}));return function(et){return tt.apply(this,arguments)}}();function _t(tt){var Qe=tt[1],et=re(yr,Qe),ft=Object(b.a)(et,2),wt=ft[1];Rt.setFieldsValue({tags:[]}),Ve({type:gt.SET_INITAL_DATA,payload:{dicts:wt,data:Object(E.a)(Object(E.a)({},St),{},{hack:Object(E.a)(Object(E.a)({},St.hack),{},{sub_discipline_id:tt}),tags:[]})}})}var jt=function(Qe){var et,ft,wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(wt)return function(){Ve({type:gt.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},St),{},{hack:Object(E.a)(Object(E.a)({},St.hack),{},{is_file:!0})})}}),Rt.setFieldsValue({hack:{is_file:!0}})};var qe=Qe==null?void 0:Qe.map(function(dr){return{input:dr.input,output:dr.output,score:0,position:1}}),Pt=(et=Rt.getFieldValue("hack_sets"))===null||et===void 0||((ft=et.filter(function(dr){return dr.input||dr.output}))===null||ft===void 0)?void 0:ft.concat(qe),st=parseInt(Rt.getFieldValue("hack").code_compile_score)||0,Gt=Pt==null?void 0:Pt.length,Vt=Math.floor((100-st)/Gt),ir=(100-st)%Gt;Pt==null||Pt.map(function(dr,Xr){return ur&&(dr.score=Vt,Xr===Gt-1&&(dr.score=Vt+ir)),dr.position=Xr+1,dr}),Ve({type:gt.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},St),{},{hack_sets:Pt,hack:Object(E.a)(Object(E.a)({},St.hack),{},{is_file:!1})})}}),Rt.setFieldsValue({hack_sets:Pt,hack:{is_file:!1}})};return U.a.createElement(n.a,{spinning:$t,delay:500},St?U.a.createElement(B.Fragment,null,U.a.createElement("header",{className:Q.a.header},U.a.createElement("div",null,U.a.createElement("img",{src:"".concat(ze.a.IMG_SERVER,"/images/").concat(Er==null?void 0:Er.image_url),alt:"user",width:30}),U.a.createElement("span",null,Er==null?void 0:Er.name)),U.a.createElement("h2",null," ",St==null?void 0:St.hack.name," "),At?U.a.createElement("a",{className:Q.a.btn_back,onClick:Gn}," ",U.a.createElement(se.a,null),"\u9000\u51FA"):null),U.a.createElement(c.a,{form:Rt,initialValues:St,layout:"vertical",className:Q.a["oj-form-container"],onValuesChange:Va,onFinish:function(Qe,et){var ft;if(bt!=null&&(ft=bt.query)!==null&&ft!==void 0&&ft.exercise&&!sr.includes("paperlibrary")){k.a.confirm({title:"\u4FDD\u5B58\u63D0\u793A",content:"\u6B64\u9898\u76EE\u5DF2\u5B58\u5728\u8BD5\u9898\u5E93\u4E2D\uFF0C\u662F\u5426\u5C06\u4FEE\u6539\u540E\u7684\u8BD5\u9898\u8986\u76D6\u8BD5\u9898\u5E93\u7684\u539F\u9898\uFF1F",okText:"\u8986\u76D6\u539F\u9898",cancelText:"\u4E0D\u8986\u76D6",onOk:function(){return fn(Qe,et,1)},onCancel:function(){return fn(Qe,et,0)}});return}fn(Qe,et)}},U.a.createElement(Fe.a,{leftChild:U.a.createElement(Ht,{onAddTestCases:la,form:Rt,handleAddKnowledgeFinish:vt,MyGroup:un,formValue:Nt,knowledgeOptions:$e,onChangeLanguage:Fn,onChangeSubDiscipline:_t,onRemoveTestCase:_a,onAddTestCase:Qr,dicts:wr,categorys:Xa,callback_url:sr,hack:St.hack,onChangeScore:oa,onChangehide:hn,onChangeAverage:sa,onChangeFile:Pn,uploadData:Br,setUploadData:Mr,handleUploadRatio:kn,ischecked:Kt,isshows:Dn,isProgram:dn,addUploadFnc:jt}),rightChild:dn?U.a.createElement(c.a.Item,{name:"codes",style:{marginBottom:0}},U.a.createElement(Le,null)):U.a.createElement(c.a.Item,{name:["hack_codes","code"],style:{marginBottom:0}},U.a.createElement(We.a,{language:St.hack_codes.language}))}),U.a.createElement("div",{className:Q.a.footer},At?U.a.createElement(B.Fragment,null,dn&&U.a.createElement(u.a,{onClick:Gn,type:"primary",ghost:!0},"\u9000\u51FA\u7F16\u8F91"),sr||dn?null:U.a.createElement(u.a,{type:sn?"default":"primary",onClick:Kn},sn?"\u64A4\u9500\u53D1\u5E03":"\u7ACB\u5373\u53D1\u5E03"),U.a.createElement(u.a,{loading:$t,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"),U.a.createElement(u.a,{type:"primary",onClick:Ta},sn?"\u5F00\u59CB\u6311\u6218":"\u6A21\u62DF\u6311\u6218")):U.a.createElement(B.Fragment,null,U.a.createElement(u.a,{onClick:Gn},"\u53D6\u6D88"),U.a.createElement(u.a,{loading:$t,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"))))):null)};function Ht(Ke){var ot,bt,Ft,Bt,At=Ke.form,Dt=Ke.onAddTestCases,ct=Ke.handleAddKnowledgeFinish,Rt=Ke.ischecked,rr=Ke.MyGroup,Yt=Ke.formValue,Nt=Ke.knowledgeOptions,ar=Ke.categorys,Mt=Ke.hack,Dr=Ke.callback_url,$e=Ke.onChangeAverage,yt=Ke.onChangeScore,Ur=Ke.onChangehide,xr=Ke.onChangeFile,Br=Ke.onAddTestCase,Mr=Ke.onRemoveTestCase,on=Ke.onChangeSubDiscipline,Ct=Ke.onChangeLanguage,vr=Ke.uploadData,Ve=Ke.setUploadData,$t=Ke.handleUploadRatio,St=Ke.isshows,Er=Ke.isProgram,yr=Ke.addUploadFnc,wr=((ot=location)===null||ot===void 0||((bt=ot.search)===null||bt===void 0)?void 0:bt.includes("select"))||!1,sn=Object(B.useState)(St),Rr=Object(b.a)(sn,2),ur=Rr[0],Jr=Rr[1],sr=Mt.test_set_average,ln=Mt.test_set_score,Nr=Object(B.useState)(!1),On=Object(b.a)(Nr,2),aa=On[0],An=On[1],pr=function(Kt,cr){var Tr=Object(w.a)(vr);Tr.splice(cr,1),sr?$t(Tr):Ve(Tr)},un=function(Kt,cr){console.log(Kt,cr);var Tr=vr.map(function(yn,Dn){return Dn===cr?Object(E.a)(Object(E.a)({},yn),{},{score:Kt.target.value?Number(Kt.target.value):0}):yn});Ve(Tr)},ia=function(Kt){if(!(Kt!=null&&Kt.length))return;if(Kt!=null&&Kt[0].is_file){yr(Kt,!0)();var cr=vr.concat(Kt);Mt.test_set_average?$t(cr):Ve(cr)}Kt!=null&&Kt[0].is_file||yr(Kt)};function cn(tr){tr.stopPropagation()}return U.a.createElement("div",{className:Q.a["oj-left-panel"]},U.a.createElement("div",{className:Q.a["oj-form-info"]},U.a.createElement("div",{className:Q.a.field},U.a.createElement(c.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficult"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},U.a.createElement(x.a,{disabled:wr},le(be.difficult))),U.a.createElement(c.a.Item,{label:"\u8BFE\u7A0B(\u5408\u7406\u7684\u8BFE\u7A0B\u5206\u7C7B\u6709\u5229\u4E8E\u5FEB\u901F\u68C0\u7D22)",name:["hack","sub_discipline_id"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"}]},U.a.createElement(p.a,{disabled:wr,allowClear:!1,options:ar,placeholder:"\u8BF7\u9009\u62E9",onChange:on}))),U.a.createElement("div",{className:Q.a.field},Dr&&U.a.createElement(c.a.Item,{label:"\u5206\u6570",name:["hack","score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u6570"}],extra:U.a.createElement("span",{style:{position:"absolute",left:100,top:5}},"\u5206")},U.a.createElement(r.a,{disabled:wr,min:1,max:100})),U.a.createElement(c.a.Item,{label:U.a.createElement("div",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236 ",U.a.createElement("span",{className:"c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)")),name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],extra:U.a.createElement("span",{style:{position:"absolute",left:100,top:5}},"\u79D2")},U.a.createElement(r.a,{min:3})),Er?U.a.createElement(c.a.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",name:["hack","languages"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},U.a.createElement(o.a.Group,null,U.a.createElement(o.a,{value:"c"},"C"),U.a.createElement(o.a,{value:"c++"},"C++"),U.a.createElement(o.a,{value:"java"},"Java"),U.a.createElement(o.a,{value:"python"},"Python"))):U.a.createElement(c.a.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",name:["hack_codes","language"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},U.a.createElement(x.a,{onChange:Ct},le(be.language)))),U.a.createElement(c.a.Item,{label:U.a.createElement("span",null,"\u77E5\u8BC6\u70B9\uFF1A",U.a.createElement("span",{className:"c-grey-999"},"\uFF08\u6240\u6709\u81EA\u5EFA\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u88ABEduCoder\u5E73\u53F0\u5BA1\u6838\u901A\u8FC7\u4E3A\u5B98\u65B9\u77E5\u8BC6\u70B9\u540E\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09")),name:["hack","tag_discipline_ids"]},U.a.createElement(nt.a,{selectvalues:(Mt==null?void 0:Mt.tag_discipline_id)||(Mt==null?void 0:Mt.tag_discipline_ids),disabled:wr,subId:Yt==null||((Ft=Yt.hack)===null||Ft===void 0||((Bt=Ft.sub_discipline_id)===null||Bt===void 0))?void 0:Bt[1],knowledgeOptions:Nt,onAddKnowledgeFinish:ct})),U.a.createElement(c.a.Item,{label:"\u52A0\u5165\u6587\u4EF6\u5939\u76EE\u5F55",name:["hack","item_banks_group_ids"],labelCol:{span:24},wrapperCol:{span:24}},U.a.createElement(Ze.a,{disabled:wr})),U.a.createElement(c.a.Item,{label:"\u4EFB\u52A1\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},U.a.createElement(G.a,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",suffix:U.a.createElement("span",null,60-Mt.name.length)})),U.a.createElement(c.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},U.a.createElement(ee.a,{miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),U.a.createElement("div",{className:"tst-case-info"},U.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," \u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Mt.is_file&&U.a.createElement(u.a,{type:"primary",ghost:!0,onClick:Br},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),U.a.createElement(c.a.Item,{name:["hack","test_set_score"]},U.a.createElement(_.a.Group,{onChange:yt},U.a.createElement(_.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",U.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")),U.a.createElement(_.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",U.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")))),U.a.createElement(o.a,{style:{marginBottom:"5px"},checked:Rt,onChange:Ur},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),U.a.createElement(c.a.Item,{className:Q.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},U.a.createElement(_.a.Group,{onChange:xr},U.a.createElement(S.a,{direction:"horizontal"},U.a.createElement(_.a,{value:!1},"\u6587\u672C"),U.a.createElement(_.a,{value:!0},"\u6587\u4EF6")))),!Mt.test_set_score&&U.a.createElement(c.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},U.a.createElement(_.a.Group,{onChange:$e},U.a.createElement(_.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),U.a.createElement(_.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),!Mt.test_set_score&&U.a.createElement("div",{style:{marginBottom:"20px",marginTop:"-10px"}},U.a.createElement("div",{style:{display:"flex",height:"30px",marginBottom:"10px"}},U.a.createElement(o.a,{checked:ur,style:{display:"flex",alignItems:"center"},className:Q.a.checkboxs,onChange:function(Kt){Jr(Kt.target.checked),At.setFieldsValue({hack:{code_compile_score:0}}),Mt.test_set_average&&(Mt.is_file?$t(vr):Dt())}},"\u542F\u7528\u7F16\u8BD1\u901A\u8FC7\u5373\u53EF\u5F97\u5206"),ur&&U.a.createElement("span",{style:{display:"flex"}},U.a.createElement(c.a.Item,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7F16\u8BD1\u5F97\u5206"}],name:["hack","code_compile_score"]},U.a.createElement(r.a,{onChange:function(){Mt.test_set_average&&(Mt.is_file?$t(vr):Dt())},parser:function(Kt){return isNaN(parseInt(Kt))?"":parseInt(Kt)},min:0,max:100,style:{width:"90px",margin:"5px 0px"}}))," ",U.a.createElement("span",{style:{display:"flex",alignItems:"center",marginLeft:"5px"}},"%"))),U.a.createElement("span",{style:{color:"#999",fontSize:"12px",marginLeft:"-8px"}},"\uFF08\u8BF7\u6CE8\u610F\u8BE5\u5B9E\u8BAD\u9898\u662F\u5426\u6709\u7F16\u8BD1\u8FC7\u7A0B\uFF0C\u82E5\u6CA1\u6709\u5219\u65E0\u6CD5\u83B7\u5F97\u7F16\u8BD1\u5F97\u5206\uFF09")),U.a.createElement("div",{className:Q.a.upBtn},U.a.createElement(u.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return An(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),(Mt==null?void 0:Mt.is_file)&&U.a.createElement(at.a,{disabled:Mt==null?void 0:Mt.test_set_average,inputChange:un,showScore:!Mt.test_set_score,data:vr,onRemove:pr})),!Mt.is_file&&U.a.createElement(c.a.List,{name:"hack_sets"},function(tr,Kt){return Object(T.a)(Kt),U.a.createElement(F.a,{accordion:!0},tr.map(function(cr,Tr){return U.a.createElement(Et,{key:"".concat(cr.key,"--").concat(Tr),header:U.a.createElement("a",{className:Q.a["test-case-name"]},U.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Tr+1,"\b"),ln?null:U.a.createElement(U.a.Fragment,null,U.a.createElement(c.a.Item,{name:[cr.name,"score"],fieldKey:[cr.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(Tr+1,"\u8BC4\u5206")}]},U.a.createElement(r.a,{onClick:cn,min:0,max:100,disabled:sr})),U.a.createElement("span",null,"%"))),extra:Tr>0?U.a.createElement("div",{onClick:cn},U.a.createElement(m.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Tr+1),onConfirm:function(){Mr(Tr)}},U.a.createElement(J.a,{className:Q.a["btn-remove-case"]}))):null},U.a.createElement(c.a.Item,{label:"\u8F93\u5165",name:[cr.name,"input"],fieldKey:[cr.fieldKey,"input"]},U.a.createElement(it,null)),U.a.createElement(c.a.Item,{label:"\u8F93\u51FA",name:[cr.name,"output"],fieldKey:[cr.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},U.a.createElement(it,null)))}))}))),U.a.createElement(at.b,{rootIdentifier:null,visible:aa,onClose:function(){return An(!1)},onOK:ia,multiple:!0,defaultMultipleValue:Mt==null?void 0:Mt.is_file}))}},PVpz:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.StreamCipher,S=m.algo,g=[],_=[],d=[],o=S.RabbitLegacy=L.extend({_doReset:function(){var r=this._key.words,h=this.cfg.iv,p=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],f=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 x=0;x<4;x++)i.call(this);for(var x=0;x<8;x++)f[x]^=p[x+4&7];if(h){var v=h.words,l=v[0],n=v[1],s=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,u=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,w=s>>>16|u&4294901760,y=u<<16|s&65535;f[0]^=s,f[1]^=w,f[2]^=u,f[3]^=y,f[4]^=s,f[5]^=w,f[6]^=u,f[7]^=y;for(var x=0;x<4;x++)i.call(this)}},_doProcessBlock:function(r,h){var p=this._X;i.call(this),g[0]=p[0]^p[5]>>>16^p[3]<<16,g[1]=p[2]^p[7]>>>16^p[5]<<16,g[2]=p[4]^p[1]>>>16^p[7]<<16,g[3]=p[6]^p[3]>>>16^p[1]<<16;for(var f=0;f<4;f++)g[f]=(g[f]<<8|g[f]>>>24)&16711935|(g[f]<<24|g[f]>>>8)&4278255360,r[h+f]^=g[f]},blockSize:128/32,ivSize:64/32});function i(){for(var r=this._X,h=this._C,p=0;p<8;p++)_[p]=h[p];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<_[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<_[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<_[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<_[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<_[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<_[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<_[6]>>>0?1:0)|0,this._b=h[7]>>>0<_[7]>>>0?1:0;for(var p=0;p<8;p++){var f=r[p]+h[p],x=f&65535,v=f>>>16,l=((x*x>>>17)+x*v>>>15)+v*v,n=((f&4294901760)*f|0)+((f&65535)*f|0);d[p]=l^n}r[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,r[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,r[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,r[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,r[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,r[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,r[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,r[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}m.RabbitLegacy=L._createHelper(o)}(),P.RabbitLegacy})},RELg:function(I,Z,N){var P=N("MFOe"),m=P.Global;I.exports={name:"oldIE-userDataStorage",write:_,read:d,each:o,remove:i,clearAll:r};var T="storejs",L=m.document,S=f(),g=(m.navigator?m.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function _(x,v){if(g)return;var l=p(x);S(function(n){n.setAttribute(l,v),n.save(T)})}function d(x){if(g)return;var v=p(x),l=null;return S(function(n){l=n.getAttribute(v)}),l}function o(x){S(function(v){for(var l=v.XMLDocument.documentElement.attributes,n=l.length-1;n>=0;n--){var s=l[n];x(v.getAttribute(s.name),s.name)}})}function i(x){var v=p(x);S(function(l){l.removeAttribute(v),l.save(T)})}function r(){S(function(x){var v=x.XMLDocument.documentElement.attributes;x.load(T);for(var l=v.length-1;l>=0;l--)x.removeAttribute(v[l].name);x.save(T)})}var h=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function p(x){return x.replace(/^\d/,"___$&").replace(h,"___")}function f(){if(!L||!L.documentElement||!L.documentElement.addBehavior)return null;var x="script",v,l,n;try{l=new ActiveXObject("htmlfile"),l.open(),l.write("<"+x+">document.w=window</"+x+'><iframe src="/favicon.ico"></iframe>'),l.close(),v=l.w.frames[0].document,n=v.createElement("div")}catch(s){n=L.createElement("div"),v=L.body}return function(s){var u=[].slice.call(arguments,0);u.unshift(n),v.appendChild(n),n.addBehavior("#default#userData"),n.load(T),s.apply(this,u),v.removeChild(n);return}}},RxwV:function(I,Z,N){"use strict";var P=N("cDcd"),m=N("uciX"),T=N("2W6z"),L=N.n(T),S=N("4IlW"),g=N("uK0f"),_=N.n(g);function d(le,ue){if(le===ue)return!0;if(!le||!ue)return!1;var re=le.length;if(ue.length!==re)return!1;for(var oe=0;oe<re;oe++)if(le[oe]!==ue[oe])return!1;return!0}function o(le){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(re){return typeof re}:o=function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},o(le)}function i(le,ue){if(!(le instanceof ue))throw new TypeError("Cannot call a class as a function")}function r(le,ue){for(var re=0;re<ue.length;re++){var oe=ue[re];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(le,oe.key,oe)}}function h(le,ue,re){return ue&&r(le.prototype,ue),re&&r(le,re),le}function p(le,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(ue&&ue.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),ue&&f(le,ue)}function f(le,ue){return f=Object.setPrototypeOf||function(oe,q){return oe.__proto__=q,oe},f(le,ue)}function x(le){var ue=n();return function(){var re=s(le),oe;if(ue){var q=s(this).constructor;oe=Reflect.construct(re,arguments,q)}else oe=re.apply(this,arguments);return v(this,oe)}}function v(le,ue){return ue&&(o(ue)==="object"||typeof ue=="function")?ue:l(le)}function l(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}function n(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(le){return!1}}function s(le){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(re){return re.__proto__||Object.getPrototypeOf(re)},s(le)}var u=function(){var le=function(ue){p(oe,ue);var re=x(oe);function oe(){var q;return i(this,oe),q=re.apply(this,arguments),q.menuItems={},q.saveMenuItem=function(se){return function(J){q.menuItems[se]=J}},q}return h(oe,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(se){!se.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(se){var J=this.props,ee=J.fieldNames,ge=J.defaultFieldNames;return ee[se]||ge[se]}},{key:"getOption",value:function(se,J){var ee=this.props,ge=ee.prefixCls,te=ee.expandTrigger,Y=ee.expandIcon,z=ee.loadingIcon,$=this.props.onSelect.bind(this,se,J),me=this.props.onItemDoubleClick.bind(this,se,J),pe={onClick:$,onDoubleClick:me},xe="".concat(ge,"-menu-item"),Re=null,ke=se[this.getFieldName("children")]&&se[this.getFieldName("children")].length>0;(ke||se.isLeaf===!1)&&(xe+=" ".concat(ge,"-menu-item-expand"),se.loading||(Re=P.createElement("span",{className:"".concat(ge,"-menu-item-expand-icon")},Y))),te==="hover"&&(ke||se.isLeaf===!1)&&(pe={onMouseEnter:this.delayOnSelect.bind(this,$),onMouseLeave:this.delayOnSelect.bind(this),onClick:$}),this.isActiveOption(se,J)&&(xe+=" ".concat(ge,"-menu-item-active"),pe.ref=this.saveMenuItem(J)),se.disabled&&(xe+=" ".concat(ge,"-menu-item-disabled"));var Me=null;se.loading&&(xe+=" ".concat(ge,"-menu-item-loading"),Me=z||null);var Pe="";return"title"in se?Pe=se.title:typeof se[this.getFieldName("label")]=="string"&&(Pe=se[this.getFieldName("label")]),P.createElement("li",Object.assign({key:se[this.getFieldName("value")],className:xe,title:Pe},pe,{role:"menuitem",onMouseDown:function(Fe){return Fe.preventDefault()}}),se[this.getFieldName("label")],Re,Me)}},{key:"getActiveOptions",value:function(se){var J=this,ee=this.props.options,ge=se||this.props.activeValue;return _()(ee,function(te,Y){return te[J.getFieldName("value")]===ge[Y]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var se=this,J=this.props.options,ee=this.getActiveOptions().map(function(ge){return ge[se.getFieldName("children")]}).filter(function(ge){return!!ge});return ee.unshift(J),ee}},{key:"delayOnSelect",value:function(se){for(var J=this,ee=arguments.length,ge=new Array(ee>1?ee-1:0),te=1;te<ee;te++)ge[te-1]=arguments[te];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof se=="function"&&(this.delayTimer=window.setTimeout(function(){se(ge),J.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var se=this.getShowOptions().length,J=0;J<se;J++){var ee=this.menuItems[J];ee&&ee.parentElement&&(ee.parentElement.scrollTop=ee.offsetTop)}}},{key:"isActiveOption",value:function(se,J){var ee=this.props.activeValue,ge=ee===void 0?[]:ee;return ge[J]===se[this.getFieldName("value")]}},{key:"render",value:function(){var se=this,J=this.props,ee=J.prefixCls,ge=J.dropdownMenuColumnStyle;return P.createElement("div",null,this.getShowOptions().map(function(te,Y){return P.createElement("ul",{className:"".concat(ee,"-menu"),key:Y,style:ge},te.map(function(z){return se.getOption(z,Y)}))}))}}]),oe}(P.Component);return le.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},le}(),w=u,y={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},a=y;function R(le){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(re){return typeof re}:R=function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},R(le)}function D(le,ue){if(le==null)return{};var re=c(le,ue),oe,q;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(le);for(q=0;q<se.length;q++){if(oe=se[q],ue.indexOf(oe)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(le,oe))continue;re[oe]=le[oe]}}return re}function c(le,ue){if(le==null)return{};var re={},oe=Object.keys(le),q,se;for(se=0;se<oe.length;se++){if(q=oe[se],ue.indexOf(q)>=0)continue;re[q]=le[q]}return re}function b(le){return j(le)||F(le)||C(le)||E()}function E(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C(le,ue){if(!le)return;if(typeof le=="string")return k(le,ue);var re=Object.prototype.toString.call(le).slice(8,-1);if(re==="Object"&&le.constructor&&(re=le.constructor.name),re==="Map"||re==="Set")return Array.from(le);if(re==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(re))return k(le,ue)}function F(le){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(le))return Array.from(le)}function j(le){if(Array.isArray(le))return k(le)}function k(le,ue){(ue==null||ue>le.length)&&(ue=le.length);for(var re=0,oe=new Array(ue);re<ue;re++)oe[re]=le[re];return oe}function X(le,ue){if(!(le instanceof ue))throw new TypeError("Cannot call a class as a function")}function G(le,ue){for(var re=0;re<ue.length;re++){var oe=ue[re];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(le,oe.key,oe)}}function H(le,ue,re){return ue&&G(le.prototype,ue),re&&G(le,re),le}function K(le,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(ue&&ue.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),ue&&B(le,ue)}function B(le,ue){return B=Object.setPrototypeOf||function(oe,q){return oe.__proto__=q,oe},B(le,ue)}function U(le){var ue=ie();return function(){var re=ce(le),oe;if(ue){var q=ce(this).constructor;oe=Reflect.construct(re,arguments,q)}else oe=re.apply(this,arguments);return W(this,oe)}}function W(le,ue){return ue&&(R(ue)==="object"||typeof ue=="function")?ue:Q(le)}function Q(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}function ie(){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(le){return!1}}function ce(le){return ce=Object.setPrototypeOf?Object.getPrototypeOf:function(re){return re.__proto__||Object.getPrototypeOf(re)},ce(le)}var he=function(){var le=function(ue){K(oe,ue);var re=U(oe);function oe(q){var se;X(this,oe),se=re.call(this,q),se.setPopupVisible=function(ee){var ge=se.state.value;"popupVisible"in se.props||se.setState({popupVisible:ee}),ee&&!se.state.popupVisible&&se.setState({activeValue:ge}),se.props.onPopupVisibleChange(ee)},se.handleChange=function(ee,ge,te){var Y=ge.visible;(te.type!=="keydown"||te.keyCode===S.a.ENTER)&&(se.props.onChange(ee.map(function(z){return z[se.getFieldName("value")]}),ee),se.setPopupVisible(Y))},se.handlePopupVisibleChange=function(ee){se.setPopupVisible(ee)},se.handleMenuSelect=function(ee,ge,te){var Y=se.trigger.getRootDomNode();Y&&Y.focus&&Y.focus();var z=se.props,$=z.changeOnSelect,me=z.loadData,pe=z.expandTrigger;if(!ee||ee.disabled)return;var xe=se.state.activeValue;xe=xe.slice(0,ge+1),xe[ge]=ee[se.getFieldName("value")];var Re=se.getActiveOptions(xe);if(ee.isLeaf===!1&&!ee[se.getFieldName("children")]&&me){$&&se.handleChange(Re,{visible:!0},te),se.setState({activeValue:xe}),me(Re);return}var ke={};!ee[se.getFieldName("children")]||!ee[se.getFieldName("children")].length?(se.handleChange(Re,{visible:!1},te),ke.value=xe):$&&(te.type==="click"||te.type==="keydown")&&(pe==="hover"?se.handleChange(Re,{visible:!1},te):se.handleChange(Re,{visible:!0},te),ke.value=xe),ke.activeValue=xe,("value"in se.props||te.type==="keydown"&&te.keyCode!==S.a.ENTER)&&delete ke.value,se.setState(ke)},se.handleItemDoubleClick=function(){var ee=se.props.changeOnSelect;ee&&se.setPopupVisible(!1)},se.handleKeyDown=function(ee){var ge=se.props.children;if(ge&&ge.props.onKeyDown){ge.props.onKeyDown(ee);return}var te=b(se.state.activeValue),Y=te.length-1<0?0:te.length-1,z=se.getCurrentLevelOptions(),$=z.map(function(Re){return Re[se.getFieldName("value")]}).indexOf(te[Y]);if(ee.keyCode!==S.a.DOWN&&ee.keyCode!==S.a.UP&&ee.keyCode!==S.a.LEFT&&ee.keyCode!==S.a.RIGHT&&ee.keyCode!==S.a.ENTER&&ee.keyCode!==S.a.SPACE&&ee.keyCode!==S.a.BACKSPACE&&ee.keyCode!==S.a.ESC&&ee.keyCode!==S.a.TAB)return;if(!se.state.popupVisible&&ee.keyCode!==S.a.BACKSPACE&&ee.keyCode!==S.a.LEFT&&ee.keyCode!==S.a.RIGHT&&ee.keyCode!==S.a.ESC&&ee.keyCode!==S.a.TAB){se.setPopupVisible(!0);return}if(ee.keyCode===S.a.DOWN||ee.keyCode===S.a.UP){ee.preventDefault();var me=$;me!==-1?ee.keyCode===S.a.DOWN?(me+=1,me=me>=z.length?0:me):(me-=1,me=me<0?z.length-1:me):me=0,te[Y]=z[me][se.getFieldName("value")]}else if(ee.keyCode===S.a.LEFT||ee.keyCode===S.a.BACKSPACE)ee.preventDefault(),te.splice(te.length-1,1);else if(ee.keyCode===S.a.RIGHT)ee.preventDefault(),z[$]&&z[$][se.getFieldName("children")]&&te.push(z[$][se.getFieldName("children")][0][se.getFieldName("value")]);else if(ee.keyCode===S.a.ESC||ee.keyCode===S.a.TAB){se.setPopupVisible(!1);return}(!te||te.length===0)&&se.setPopupVisible(!1);var pe=se.getActiveOptions(te),xe=pe[pe.length-1];se.handleMenuSelect(xe,pe.length-1,ee),se.props.onKeyDown&&se.props.onKeyDown(ee)},se.saveTrigger=function(ee){se.trigger=ee};var J=[];return"value"in q?J=q.value||[]:"defaultValue"in q&&(J=q.defaultValue||[]),L()(!("filedNames"in q),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),se.state={popupVisible:q.popupVisible,activeValue:J,value:J,prevProps:q},se.defaultFieldNames={label:"label",value:"value",children:"children"},se}return H(oe,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(se){var J=this.defaultFieldNames,ee=this.props,ge=ee.fieldNames,te=ee.filedNames;return"filedNames"in this.props?te[se]||J[se]:ge[se]||J[se]}},{key:"getFieldNames",value:function(){var se=this.props,J=se.fieldNames,ee=se.filedNames;return"filedNames"in this.props?ee:J}},{key:"getCurrentLevelOptions",value:function(){var se=this,J=this.props.options,ee=J===void 0?[]:J,ge=this.state.activeValue,te=ge===void 0?[]:ge,Y=_()(ee,function(z,$){return z[se.getFieldName("value")]===te[$]},{childrenKeyName:this.getFieldName("children")});return Y[Y.length-2]?Y[Y.length-2][this.getFieldName("children")]:b(ee).filter(function(z){return!z.disabled})}},{key:"getActiveOptions",value:function(se){var J=this;return _()(this.props.options||[],function(ee,ge){return ee[J.getFieldName("value")]===se[ge]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var se=this.props,J=se.prefixCls,ee=se.transitionName,ge=se.popupClassName,te=se.options,Y=te===void 0?[]:te,z=se.disabled,$=se.builtinPlacements,me=se.popupPlacement,pe=se.children,xe=se.dropdownRender,Re=D(se,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),ke=P.createElement("div",null),Me="";Y&&Y.length>0?ke=P.createElement(w,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Me=" ".concat(J,"-menus-empty");var Pe=ke;return xe&&(Pe=xe(ke)),P.createElement(m.a,Object.assign({ref:this.saveTrigger},Re,{popupPlacement:me,builtinPlacements:$,popupTransitionName:ee,action:z?[]:["click"],popupVisible:z?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(J,"-menus"),popupClassName:ge+Me,popup:Pe}),P.cloneElement(pe,{onKeyDown:this.handleKeyDown,tabIndex:z?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(se,J){var ee=J.prevProps,ge=ee===void 0?{}:ee,te={prevProps:se};return"value"in se&&!d(ge.value,se.value)&&(te.value=se.value||[],"loadData"in se||(te.activeValue=se.value||[])),"popupVisible"in se&&(te.popupVisible=se.popupVisible),te}}]),oe}(P.Component);return le.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:a,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},le}(),be=he,ne=Z.a=be},S6kV:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.mode.OFB=function(){var m=P.lib.BlockCipherMode.extend(),T=m.Encryptor=m.extend({processBlock:function(L,S){var g=this._cipher,_=g.blockSize,d=this._iv,o=this._keystream;d&&(o=this._keystream=d.slice(0),this._iv=void 0),g.encryptBlock(o,0);for(var i=0;i<_;i++)L[S+i]^=o[i]}});return m.Decryptor=T,m}(),P.mode.OFB})},SJMd:function(I,Z){/**
* @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 N,P,m,T=!1,L,S;window.PR_SHOULD_USE_CONTINUATION=!0;var g,_;(function(){var d=window,o=["break,continue,do,else,for,if,return,while"],i=[o,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],r=[i,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],h=[r,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],p=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],f=[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"],x="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",v=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],l="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[o,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],s=[o,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[o,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],w=[h,f,p,v,l,n,s,u],y=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,a="str",R="kwd",D="com",c="typ",b="lit",E="pun",C="pln",F="tag",j="dec",k="src",X="atn",G="atv",H="nocode",K="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(te){for(var Y=0,z=!1,$=!1,me=0,pe=te.length;me<pe;++me){var xe=te[me];if(xe.ignoreCase)$=!0;else if(/[a-z]/i.test(xe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){z=!0,$=!1;break}}var Re={b:8,t:9,n:10,v:11,f:12,r:13};function ke(We){var Se=We.charCodeAt(0);if(Se!==92)return Se;var Xe=We.charAt(1);return Se=Re[Xe],Se||("0"<=Xe&&Xe<="7"?parseInt(We.substring(1),8):Xe==="u"||Xe==="x"?parseInt(We.substring(2),16):We.charCodeAt(1))}function Me(We){if(We<32)return(We<16?"\\x0":"\\x")+We.toString(16);var Se=String.fromCharCode(We);return Se==="\\"||Se==="-"||Se==="]"||Se==="^"?"\\"+Se:Se}function Pe(We){var Se=We.substring(1,We.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Xe=[],Ye=Se[0]==="^",Ie=["["];Ye&&Ie.push("^");for(var He=Ye?1:0,Ae=Se.length;He<Ae;++He){var Te=Se[He];if(/\\[bdsw]/i.test(Te))Ie.push(Te);else{var Ce=ke(Te),ye;He+2<Ae&&Se[He+1]==="-"?(ye=ke(Se[He+2]),He+=2):ye=Ce,Xe.push([Ce,ye]),ye<65||Ce>122||(ye<65||Ce>90||Xe.push([Math.max(65,Ce)|32,Math.min(ye,90)|32]),ye<97||Ce>122||Xe.push([Math.max(97,Ce)&~32,Math.min(ye,122)&~32]))}}Xe.sort(function(Le,Be){return Le[0]-Be[0]||Be[1]-Le[1]});for(var Ee=[],we=[],He=0;He<Xe.length;++He){var Oe=Xe[He];Oe[0]<=we[1]+1?we[1]=Math.max(we[1],Oe[1]):Ee.push(we=Oe)}for(var He=0;He<Ee.length;++He){var Oe=Ee[He];Ie.push(Me(Oe[0])),Oe[1]>Oe[0]&&(Oe[1]+1>Oe[0]&&Ie.push("-"),Ie.push(Me(Oe[1])))}return Ie.push("]"),Ie.join("")}function je(We){for(var Se=We.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Xe=Se.length,Ye=[],Ie=0,He=0;Ie<Xe;++Ie){var Ae=Se[Ie];if(Ae==="(")++He;else if(Ae.charAt(0)==="\\"){var Te=+Ae.substring(1);Te&&(Te<=He?Ye[Te]=-1:Se[Ie]=Me(Te))}}for(var Ie=1;Ie<Ye.length;++Ie)Ye[Ie]===-1&&(Ye[Ie]=++Y);for(var Ie=0,He=0;Ie<Xe;++Ie){var Ae=Se[Ie];if(Ae==="(")++He,Ye[He]||(Se[Ie]="(?:");else if(Ae.charAt(0)==="\\"){var Te=+Ae.substring(1);Te&&Te<=He&&(Se[Ie]="\\"+Ye[Te])}}for(var Ie=0;Ie<Xe;++Ie)Se[Ie]==="^"&&Se[Ie+1]!=="^"&&(Se[Ie]="");if(We.ignoreCase&&z)for(var Ie=0;Ie<Xe;++Ie){var Ae=Se[Ie],Ce=Ae.charAt(0);Ae.length>=2&&Ce==="["?Se[Ie]=Pe(Ae):Ce!=="\\"&&(Se[Ie]=Ae.replace(/[a-zA-Z]/g,function(we){var Oe=we.charCodeAt(0);return"["+String.fromCharCode(Oe&~32,Oe|32)+"]"}))}return Se.join("")}for(var Fe=[],me=0,pe=te.length;me<pe;++me){var xe=te[me];if(xe.global||xe.multiline)throw new Error(""+xe);Fe.push("(?:"+je(xe)+")")}return new RegExp(Fe.join("|"),$?"gi":"g")}function U(te,Y){var z=/(?:^|\s)nocode(?:\s|$)/,$=[],me=0,pe=[],xe=0;function Re(ke){var Me=ke.nodeType;if(Me==1){if(z.test(ke.className))return;for(var Pe=ke.firstChild;Pe;Pe=Pe.nextSibling)Re(Pe);var je=ke.nodeName.toLowerCase();(je==="br"||je==="li")&&($[xe]=`
`,pe[xe<<1]=me++,pe[xe++<<1|1]=ke)}else if(Me==3||Me==4){var Fe=ke.nodeValue;Fe.length&&(Y?Fe=Fe.replace(/\r\n?/g,`
`):Fe=Fe.replace(/[ \t\r\n]+/g," "),$[xe]=Fe,pe[xe<<1]=me,me+=Fe.length,pe[xe++<<1|1]=ke)}}return Re(te),{sourceCode:$.join("").replace(/\n$/,""),spans:pe}}function W(te,Y,z,$,me){if(!z)return;var pe={sourceNode:te,pre:1,langExtension:null,numberLines:null,sourceCode:z,spans:null,basePos:Y,decorations:null};$(pe),me.push.apply(me,pe.decorations)}var Q=/\S/;function ie(te){for(var Y=void 0,z=te.firstChild;z;z=z.nextSibling){var $=z.nodeType;Y=$===1?Y?te:z:$===3&&Q.test(z.nodeValue)?te:Y}return Y===te?void 0:Y}function ce(te,Y){var z={},$;(function(){for(var xe=te.concat(Y),Re=[],ke={},Me=0,Pe=xe.length;Me<Pe;++Me){var je=xe[Me],Fe=je[3];if(Fe)for(var We=Fe.length;--We>=0;)z[Fe.charAt(We)]=je;var Se=je[1],Xe=""+Se;ke.hasOwnProperty(Xe)||(Re.push(Se),ke[Xe]=null)}Re.push(/[\0-\uffff]/),$=B(Re)})();var me=Y.length,pe=function(xe){for(var Re=xe.sourceCode,ke=xe.basePos,Me=xe.sourceNode,Pe=[ke,C],je=0,Fe=Re.match($)||[],We={},Se=0,Xe=Fe.length;Se<Xe;++Se){var Ye=Fe[Se],Ie=We[Ye],He=void 0,Ae;if(typeof Ie=="string")Ae=!1;else{var Te=z[Ye.charAt(0)];if(Te)He=Ye.match(Te[1]),Ie=Te[0];else{for(var Ce=0;Ce<me;++Ce)if(Te=Y[Ce],He=Ye.match(Te[1]),He){Ie=Te[0];break}He||(Ie=C)}Ae=Ie.length>=5&&Ie.substring(0,5)==="lang-",Ae&&!(He&&typeof He[1]=="string")&&(Ae=!1,Ie=k),Ae||(We[Ye]=Ie)}var ye=je;if(je+=Ye.length,!Ae)Pe.push(ke+ye,Ie);else{var Ee=He[1],we=Ye.indexOf(Ee),Oe=we+Ee.length;He[2]&&(Oe=Ye.length-He[2].length,we=Oe-Ee.length);var Le=Ie.substring(5);W(Me,ke+ye,Ye.substring(0,we),pe,Pe),W(Me,ke+ye+we,Ee,oe(Le,Ee),Pe),W(Me,ke+ye+Oe,Ye.substring(Oe),pe,Pe)}}xe.decorations=Pe};return pe}function he(te){var Y=[],z=[];te.tripleQuotedStrings?Y.push([a,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):te.multiLineStrings?Y.push([a,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Y.push([a,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),te.verbatimStrings&&z.push([a,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=te.hashComments;$&&(te.cStyleComments?($>1?Y.push([D,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Y.push([D,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),z.push([a,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Y.push([D,/^#[^\r\n]*/,null,"#"])),te.cStyleComments&&(z.push([D,/^\/\/[^\r\n]*/,null]),z.push([D,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var me=te.regexLiterals;if(me){var pe=me>1?"":`
\r`,xe=pe?".":"[\\S\\s]",Re="/(?=[^/*"+pe+"])(?:[^/\\x5B\\x5C"+pe+"]|\\x5C"+xe+"|\\x5B(?:[^\\x5C\\x5D"+pe+"]|\\x5C"+xe+")*(?:\\x5D|$))+/";z.push(["lang-regex",RegExp("^"+K+"("+Re+")")])}var ke=te.types;ke&&z.push([c,ke]);var Me=(""+te.keywords).replace(/^ | $/g,"");Me.length&&z.push([R,new RegExp("^(?:"+Me.replace(/[\s,]+/g,"|")+")\\b"),null]),Y.push([C,/^\s+/,null,` \r
\xA0`]);var Pe="^.[^\\s\\w.$@'\"`/\\\\]*";return te.regexLiterals&&(Pe+="(?!s*/)"),z.push([b,/^@[a-z_$][a-z_$@0-9]*/i,null],[c,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[C,/^[a-z_$][a-z_$@0-9]*/i,null],[b,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[C,/^\\[\s\S]?/,null],[E,new RegExp(Pe),null]),ce(Y,z)}var be=he({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ne(te,Y,z){for(var $=/(?:^|\s)nocode(?:\s|$)/,me=/\r\n?|\n/,pe=te.ownerDocument,xe=pe.createElement("li");te.firstChild;)xe.appendChild(te.firstChild);var Re=[xe];function ke(Se){var Xe=Se.nodeType;if(Xe==1&&!$.test(Se.className))if(Se.nodeName==="br")Me(Se),Se.parentNode&&Se.parentNode.removeChild(Se);else for(var Ye=Se.firstChild;Ye;Ye=Ye.nextSibling)ke(Ye);else if((Xe==3||Xe==4)&&z){var Ie=Se.nodeValue,He=Ie.match(me);if(He){var Ae=Ie.substring(0,He.index);Se.nodeValue=Ae;var Te=Ie.substring(He.index+He[0].length);if(Te){var Ce=Se.parentNode;Ce.insertBefore(pe.createTextNode(Te),Se.nextSibling)}Me(Se),Ae||Se.parentNode.removeChild(Se)}}}function Me(Se){for(;!Se.nextSibling;)if(Se=Se.parentNode,!Se)return;function Xe(He,Ae){var Te=Ae?He.cloneNode(!1):He,Ce=He.parentNode;if(Ce){var ye=Xe(Ce,1),Ee=He.nextSibling;ye.appendChild(Te);for(var we=Ee;we;we=Ee)Ee=we.nextSibling,ye.appendChild(we)}return Te}for(var Ye=Xe(Se.nextSibling,0),Ie;(Ie=Ye.parentNode)&&Ie.nodeType===1;)Ye=Ie;Re.push(Ye)}for(var Pe=0;Pe<Re.length;++Pe)ke(Re[Pe]);Y===(Y|0)&&Re[0].setAttribute("value",Y);var je=pe.createElement("ol");je.className="linenums";for(var Fe=Math.max(0,Y-1|0)||0,Pe=0,We=Re.length;Pe<We;++Pe)xe=Re[Pe],xe.className="L"+(Pe+Fe)%10,xe.firstChild||xe.appendChild(pe.createTextNode("\xA0")),je.appendChild(xe);te.appendChild(je)}function le(te){var Y=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Y=Y&&+Y[1]<=8;var z=/\n/g,$=te.sourceCode,me=$.length,pe=0,xe=te.spans,Re=xe.length,ke=0,Me=te.decorations,Pe=Me.length,je=0;Me[Pe]=me;var Fe,We;for(We=Fe=0;We<Pe;)Me[We]!==Me[We+2]?(Me[Fe++]=Me[We++],Me[Fe++]=Me[We++]):We+=2;for(Pe=Fe,We=Fe=0;We<Pe;){for(var Se=Me[We],Xe=Me[We+1],Ye=We+2;Ye+2<=Pe&&Me[Ye+1]===Xe;)Ye+=2;Me[Fe++]=Se,Me[Fe++]=Xe,We=Ye}Pe=Me.length=Fe;var Ie=te.sourceNode,He="";Ie&&(He=Ie.style.display,Ie.style.display="none");try{for(var Ae=null;ke<Re;){var Te=xe[ke],Ce=xe[ke+2]||me,ye=Me[je+2]||me,Ye=Math.min(Ce,ye),Ee=xe[ke+1],we;if(Ee.nodeType!==1&&(we=$.substring(pe,Ye))){Y&&(we=we.replace(z,"\r")),Ee.nodeValue=we;var Oe=Ee.ownerDocument,Le=Oe.createElement("span");Le.className=Me[je+1];var Be=Ee.parentNode;Be.replaceChild(Le,Ee),Le.appendChild(Ee),pe<Ce&&(xe[ke+1]=Ee=Oe.createTextNode($.substring(Ye,Ce)),Be.insertBefore(Ee,Le.nextSibling))}pe=Ye,pe>=Ce&&(ke+=2),pe>=ye&&(je+=2)}}finally{Ie&&(Ie.style.display=He)}}var ue={};function re(te,Y){for(var z=Y.length;--z>=0;){var $=Y[z];ue.hasOwnProperty($)?d.console&&console.warn("cannot override language handler %s",$):ue[$]=te}}function oe(te,Y){return te&&ue.hasOwnProperty(te)||(te=/^\s*</.test(Y)?"default-markup":"default-code"),ue[te]}re(be,["default-code"]),re(ce([],[[C,/^[^<?]+/],[j,/^<!\w[^>]*(?:>|$)/],[D,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["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"]),re(ce([[C,/^[\s]+/,null,` \r
`],[G,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[F,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[X,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["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"]),re(ce([],[[G,/^[\s\S]+/]]),["uq.val"]),re(he({keywords:h,hashComments:!0,cStyleComments:!0,types:y}),["c","cc","cpp","cxx","cyc","m"]),re(he({keywords:"null,true,false"}),["json"]),re(he({keywords:f,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:y}),["cs"]),re(he({keywords:p,cStyleComments:!0}),["java"]),re(he({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),re(he({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),re(he({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),re(he({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),re(he({keywords:v,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),re(he({keywords:x,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),re(ce([],[[a,/^[\s\S]+/]]),["regex"]);function q(te){var Y=te.langExtension;try{var z=U(te.sourceNode,te.pre),$=z.sourceCode;te.sourceCode=$,te.spans=z.spans,te.basePos=0,oe(Y,$)(te),le(te)}catch(me){d.console&&console.log(me&&me.stack||me)}}function se(te,Y,z){var $=z||!1,me=Y||null,pe=document.createElement("div");pe.innerHTML="<pre>"+te+"</pre>",pe=pe.firstChild,$&&ne(pe,$,!0);var xe={langExtension:me,numberLines:$,sourceNode:pe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return q(xe),pe.innerHTML}function J(te,Y){var z=Y||document.body,$=z.ownerDocument||document;function me(Te){return z.getElementsByTagName(Te)}for(var pe=[me("pre"),me("code"),me("xmp")],xe=[],Re=0;Re<pe.length;++Re)for(var ke=0,Me=pe[Re].length;ke<Me;++ke)xe.push(pe[Re][ke]);pe=null;var Pe=Date;Pe.now||(Pe={now:function(){return+new Date}});var je=0,Fe=/\blang(?:uage)?-([\w.]+)(?!\S)/,We=/\bprettyprint\b/,Se=/\bprettyprinted\b/,Xe=/pre|xmp/i,Ye=/^code$/i,Ie=/^(?:pre|code|xmp)$/i,He={};function Ae(){for(var Te=d.PR_SHOULD_USE_CONTINUATION?Pe.now()+250:Infinity;je<xe.length&&Pe.now()<Te;je++){for(var Ce=xe[je],ye=He,Ee=Ce;Ee=Ee.previousSibling;){var we=Ee.nodeType,Oe=(we===7||we===8)&&Ee.nodeValue;if(Oe?!/^\??prettify\b/.test(Oe):we!==3||/\S/.test(Ee.nodeValue))break;if(Oe){ye={},Oe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Wt,gt,xt){ye[gt]=xt});break}}var Le=Ce.className;if((ye!==He||We.test(Le))&&!Se.test(Le)){for(var Be=!1,ze=Ce.parentNode;ze;ze=ze.parentNode){var nt=ze.tagName;if(Ie.test(nt)&&ze.className&&We.test(ze.className)){Be=!0;break}}if(!Be){Ce.className+=" prettyprinted";var Ze=ye.lang;if(!Ze){Ze=Le.match(Fe);var at;!Ze&&(at=ie(Ce))&&Ye.test(at.tagName)&&(Ze=at.className.match(Fe)),Ze&&(Ze=Ze[1])}var pt;if(Xe.test(Ce.tagName))pt=1;else{var dt=Ce.currentStyle,it=$.defaultView,Lt=dt?dt.whiteSpace:it&&it.getComputedStyle?it.getComputedStyle(Ce,null).getPropertyValue("white-space"):0;pt=Lt&&Lt.substring(0,3)==="pre"}var Et=ye.linenums;(Et=Et==="true"||+Et)||(Et=Le.match(/\blinenums\b(?::(\d+))?/),Et=Et?Et[1]&&Et[1].length?+Et[1]:!0:!1),Et&&ne(Ce,Et,pt);var Qt={langExtension:Ze,sourceNode:Ce,numberLines:Et,pre:pt,sourceCode:null,basePos:null,spans:null,decorations:null};q(Qt)}}}je<xe.length?d.setTimeout(Ae,250):typeof te=="function"&&te()}Ae()}var ee=d.PR={createSimpleLexer:ce,registerLangHandler:re,sourceDecorator:he,PR_ATTRIB_NAME:X,PR_ATTRIB_VALUE:G,PR_COMMENT:D,PR_DECLARATION:j,PR_KEYWORD:R,PR_LITERAL:b,PR_NOCODE:H,PR_PLAIN:C,PR_PUNCTUATION:E,PR_SOURCE:k,PR_STRING:a,PR_TAG:F,PR_TYPE:c,prettyPrintOne:T?d.prettyPrintOne=se:g=se,prettyPrint:_=T?d.prettyPrint=J:_=J},ge=d.define;typeof ge=="function"&&ge.amd&&ge("google-code-prettify",[],function(){return ee})})()},T1X5:function(I,Z){I.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAALdklEQVR4Xu2dC2wc1RVAzx1nDXFiO4SEhqxtxS0JHzX94TS0FEKLALX8WkKbqrRVKQrh15Zfq0IqIaSGSOXb8ktANFJbKqUFWigEAUohfFRQDC1KxS8UR/7wDbZ3TRxix3urN951No7Xnt15M7Mbz0hRImXevffds/PmzXv33StU0KWqTlcfh6mwkCHmq8M8B5oUZosyS6EeOCD7x/Rsl/kjkFJhu8AHGWiXDNuoYqsoW5K1vCkimUpxg5SzoW+r1gylOUGErygci9IC1Fi2uR+hVeA5VZ6tquOpuSL9lnVYE1d2wNo+0jnVylLNcKYKx6EcaK23XgQJH4vyjDg8OCDc3zxd3vXSLKx7ygJYW5seOGUmZ6GcJ8IShaqwHDCeHoEhVTYh3LO7mweam+XjqO2KFNjWPp09VblUlQuAmVE7YwL93SKs2SncMr9WPojK1kiAdWzXpCa40oHlCtOi6nwpegV2ZOBuGeSGxlnSVYoMP21CBfZmnx5SneFagXPzZnJ+7I+y7S6FdQMO1xxWK++HZUgowNzpeIoVKqwCDgqrcyHp6RFlZbKetWF8HgQOrD2liwTuAHdKvj9frVVTuHDuNGkNspOBAWtt1cShC1ilcLlqecz6gnSkkS3CkMBN77zBypYWGQxCXyDAuvq1KTPIeuCYIIyuAJnPOwmWJWuk3bat1oF1pfWMjLKuAqbptn05Wl63I5ybrJOHbCqyCqw9ratEucqMDjaNrGBZqsLqpjpZaasPVhyrqlVdKe5Wcafr8TXKA6KsS9azXESG/DrHN7CODp0qdaxXON2vMftze4F/aJpljY2y008/fQFr69EZCYeH3ZX0+JrQA2ZHYDDDac0HSe+ENxe4oWRg2SfriRhWca53t3HSnFTqk1YSMPedleZv8TBYHKzc3WZ4TNbxrVLeaSUB6+zV38cTjNJgjUBT1jXMkB8XK6VoYNmp+9XFKorv39cDKlxX7JS/KGDZj+K/x99Z1n5+6gjfLObj2jOw7HLTv+MVDGuwcoK6nQSf97qM5QmYWcj9xHyensRrg9YpjRL4/HtbOd7LgrEnYF1p/U1G+XnQVk9m+Y5wfbJOfjGRDyYEZvazHOFfk2WLZCKHBfX/Zmsmo3ypqV42j6djXGBmp7gzzQuTYPMxKA7Fym1tqGPxeDvX4wLr7NULVdzd4vgKyQOiXNQwQ+4spK4gMBMwc0CG1/bDGIyQXF+ymp5dDkcUCuwpCKwzpXcqbrxgfIXsAYU1TfVy4VhqxwRm4gZJ8L/9IBQtZFdbU7eLQT41VtzjmMDaU3qzwKXW1MeCivaAwi1N9XLZ6Ib7AHPDpzO0hRmR+/L78Ict8J93IT1QdN+sN6irhs/NgR8uhM8eYl28J4EmwninQ/PosPB9gHWmdZUqoS3u/uUVuPEFKMcDWg5wxWL4zlGefGz9JhGuaxgVD7IXsOwpEhMvHsrBBPNknf9IecLKed9Au+vUyJ607t3dJPNPzewFrCOl3wPutf5TKSDwio3wdF7k3imfhMNnugGZkV2q8Ho3PPbWHhOOb4IbT4zMpHMa6+XPOe17A+vVjQhfC8u0E+/d884ysH69JCzNE+v51aY90Mw7beM5E7cJ5A7ln40zZOTnMgLMnHxMDNEZ5mG6RSbcNHv9tAV+sDCQLpck9I9b4Hd5UfKbIwrgM4cKB6toyJ0EHQHWkdJLgFtL6l2JjfKB/WwRfP/TJQoKoNmf/gu/zVuGjQqY6ZrjcEmyVm43/x4B1pnSxxVOCqDvBUXGwLx5W+CJhno5eQSYe1q/jw/DPgAeA/MGDOHjqloONtkN3CesI6XfAB7x2NzabV6B3fca3LoZ+ndbU+0KmpaAn7TA0iP2lVtOQ2LWulMb62WDC6wzrdfp8CGGUC+vwL56L3wU0ArI9Gp4cowZYLkBE2F1Q51cPfyEpXUTyvGh0gK8ArvgUXgxoGwZX5gDa79eAU+Y8HRjnSyR7K5yXwAZZibk7xXYjkHY2Abmb5uXGRJPnAfTqisAGPQ31FErnWldoMrrNh3hVZZXYF7l2byv3IZEd4YoHC4dfbqUDPfZ7KxXWTEwr57K3udwtnT06i8RVhfZ1MrtMbAi3ahcJe1pXSPKiiKbWrk9BlacG1VYa95hG1QZY55UnLBS7vYK7JXtwxuc/ZYnHTWJ4U3Ko2ZVxKTDvMMelY60bs7mISzF577aeAV25l/h7Y98qSrYeO50ePDblQHMzevYmVITDjAvGHeMLzUGVpzXBbZJR0p7gBnFNbVzt1dgr+aGRMtLUzVThofEI8cYEh9/C1ZuGu7n7BrYsMxOn31K6TXAdkTx0WwM9wrMZydLaj6UgTtegje64UefgaPnlCTGdqN+A8z8biPJAFrOwGx72pK8oRiYJU+GJMYFFg+JIXnbghp3SOyO6sCD1yFxxwBs3BbA4m91dvE3YcGV4YjoqYhp/YpH4aWAtlfMZGJNJMsGxRMentZXwIdzFBuYxbszhBbuh3MFLE25IQKtwSxNmRCBs8cIEQjB/UWrcJem4sXfvf32Qhdc8jjcdjIsThbt00AbuIu/8fZK5QDDbK/EG5gVBMxsYMYhApUDzA0RqIQgnEBfDKOEl/E7bDgIx9hb7mFuMTA3qH44zM04o9wDSWNgbsRUXiBpmYdq2wZmhr1C16sfwu0vwsVHw5EHF74vgin/nlDtcjgMEeb5sPw1zFJ/DKEePxp9GMIdFiM4bhTVCUyvT9gR4zxhx4T4Ub3PcSMDrKtPL85kuK3UX1wp7fyccTaHGE5uBhP5ZPMqx1nimAf6ojgy+/J7cP6G0rMILJ4Lt51iExeUG7CCR2bd6X3Ih9KNTj95OmZOhce+u38Do9ChdBdYyGkfcq4uJRPO9ARc9kU4Y8F+DgwKp30IO7GKXVfbkVZmQ+L4iVWyH9Ghpi6y42Z7UsoJ2ISpi0y3o0gOZs/d/iWVCzDPycFMl+P0e/7B+5XgOf2eO/mIE1z69bff9sUluMw+ZXdKnELWr+NLal90ClmjJU7SXJKvbTQqLUmzO2OM06DbAFCUjJLToBstcaGBonxt42Z/hQay77K4lIcNFBPIsFLKI6cjLpYTBjGub7RRLMeYGpejChyY3XJUxty44Ftg0OwXfMsbGs/IKHFJRXvsgiupmLMxLlpqkVbQRUtzpsZlgf1Dk7DKAme/z+LC2z6YhV54210g7tCpUkdc2r5IcJGUts/Z2NajMxIODyscW6Tdk/J2A2sww2nNB0lvqQ7wXTQj+6StVzi9VCMmQzszDGqaZY2NstNPf30DM8qfVJ0yP8VdKkRUP8GPC4JvayYYyXqWi8iQX21WgI2a8pvs3Fbl+u1khO1VhdVNo0pK+bHHumO70mo+rk1VlVBKWvnpfMBtux3h3GSdPGRTj3VgectY64FjbBpbQbKedxIsS9ZIXrEtO9YHAsyYZhaMD13AKoXLJ0uVdbNFInDTO2+wsqVFLOdPHQYeGLCR91pKFwlu8e4WO7+xspXSqnDRRKXp/VofODBjoNm57kqxQoVVUeW18uuocdr3iLIyWc/a8UrS29IfCrCcsSawpzrDtYI7/T/AVicikrNLYd2AwzWFqpoHYVeowHIdMHGPmuBKB5aHWX7YhgNNRG4G7pZBbhirMLYNHePJiARYziA3LFy5VJULKuAzoFuENTuFW0bXVg4aUr78SIHlDMmemjkL5TwRloRZh3OCX/OQKpsQ7tndzQP55XnDhFR2wPINMidBq5WlmuFMFY4Lu2qgqYYnyjPi8OCAcH+uWGhUgEbrLYsnrJAz3OwGaU5AOQ6HL2cLItRYdl6/m8AfnlPl2ao6njKlCy3rsCaurIGN7qX7edDHYSosZIj56jDPgSaF2aLM0uH8+6YaWG4GugsYEOhVYbvABxlolwzbqGKrKFuStbwZxnTcFrH/A8wNv8JI/KKJAAAAAElFTkSuQmCC"},"VrN/":function(I,Z,N){(function(P,m){I.exports=m()})(this,function(){"use strict";var P=navigator.userAgent,m=navigator.platform,T=/gecko\/\d/i.test(P),L=/MSIE \d/.test(P),S=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(P),g=/Edge\/(\d+)/.exec(P),_=L||S||g,d=_&&(L?document.documentMode||6:+(g||S)[1]),o=!g&&/WebKit\//.test(P),i=o&&/Qt\/\d+\.\d+/.test(P),r=!g&&/Chrome\//.test(P),h=/Opera\//.test(P),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(P),x=/PhantomJS/.test(P),v=!g&&/AppleWebKit/.test(P)&&/Mobile\/\w+/.test(P),l=/Android/.test(P),n=v||l||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(P),s=v||/Mac/.test(m),u=/\bCrOS\b/.test(P),w=/win/i.test(m),y=h&&P.match(/Version\/(\d*\.\d*)/);y&&(y=Number(y[1])),y&&y>=15&&(h=!1,o=!0);var a=s&&(i||h&&(y==null||y<12.11)),R=T||_&&d>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var c=function(e,t){var A=e.className,O=D(t).exec(A);if(O){var M=A.slice(O.index+O[0].length);e.className=A.slice(0,O.index)+(M?O[1]+M:"")}};function b(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function E(e,t){return b(e).appendChild(t)}function C(e,t,A,O){var M=document.createElement(e);if(A&&(M.className=A),O&&(M.style.cssText=O),typeof t=="string")M.appendChild(document.createTextNode(t));else if(t)for(var V=0;V<t.length;++V)M.appendChild(t[V]);return M}function F(e,t,A,O){var M=C(e,t,A,O);return M.setAttribute("role","presentation"),M}var j;document.createRange?j=function(e,t,A,O){var M=document.createRange();return M.setEnd(O||e,A),M.setStart(e,t),M}:j=function(e,t,A){var O=document.body.createTextRange();try{O.moveToElementText(e.parentNode)}catch(M){return O}return O.collapse(!0),O.moveEnd("character",A),O.moveStart("character",t),O};function k(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 X(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function G(e,t){var A=e.className;D(t).test(A)||(e.className+=(A?" ":"")+t)}function H(e,t){for(var A=e.split(" "),O=0;O<A.length;O++)A[O]&&!D(A[O]).test(t)&&(t+=" "+A[O]);return t}var K=function(e){e.select()};v?K=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:_&&(K=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 U(e,t,A){t||(t={});for(var O in e)e.hasOwnProperty(O)&&(A!==!1||!t.hasOwnProperty(O))&&(t[O]=e[O]);return t}function W(e,t,A,O,M){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var V=O||0,ae=M||0;;){var de=e.indexOf(" ",V);if(de<0||de>=t)return ae+(t-V);ae+=de-V,ae+=A-ae%A,V=de+1}}var Q=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};Q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Q.prototype.set=function(e,t){this.f=t;var A=+new Date+e;(!this.id||A<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=A)};function ie(e,t){for(var A=0;A<e.length;++A)if(e[A]==t)return A;return-1}var ce=50,he={toString:function(){return"CodeMirror.Pass"}},be={scroll:!1},ne={origin:"*mouse"},le={origin:"+move"};function ue(e,t,A){for(var O=0,M=0;;){var V=e.indexOf(" ",O);V==-1&&(V=e.length);var ae=V-O;if(V==e.length||M+ae>=t)return O+Math.min(ae,t-M);if(M+=V-O,M+=A-M%A,O=V+1,M>=t)return O}}var re=[""];function oe(e){for(;re.length<=e;)re.push(q(re)+" ");return re[e]}function q(e){return e[e.length-1]}function se(e,t){for(var A=[],O=0;O<e.length;O++)A[O]=t(e[O],O);return A}function J(e,t,A){for(var O=0,M=A(t);O<e.length&&A(e[O])<=M;)O++;e.splice(O,0,t)}function ee(){}function ge(e,t){var A;return Object.create?A=Object.create(e):(ee.prototype=e,A=new ee),t&&U(t,A),A}var te=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Y(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function z(e,t){return t?t.source.indexOf("\\w")>-1&&Y(e)?!0:t.test(e):Y(e)}function $(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var me=/[\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 pe(e){return e.charCodeAt(0)>=768&&me.test(e)}function xe(e,t,A){for(;(A<0?t>0:t<e.length)&&pe(e.charAt(t));)t+=A;return t}function Re(e,t,A){for(var O=t>A?-1:1;;){if(t==A)return t;var M=(t+A)/2,V=O<0?Math.ceil(M):Math.floor(M);if(V==t)return e(V)?t:A;e(V)?A=V:t=V+O}}function ke(e,t,A,O){if(!e)return O(t,A,"ltr",0);for(var M=!1,V=0;V<e.length;++V){var ae=e[V];(ae.from<A&&ae.to>t||t==A&&ae.to==t)&&(O(Math.max(ae.from,t),Math.min(ae.to,A),ae.level==1?"rtl":"ltr",V),M=!0)}M||O(t,A,"ltr")}var Me=null;function Pe(e,t,A){var O;Me=null;for(var M=0;M<e.length;++M){var V=e[M];if(V.from<t&&V.to>t)return M;V.to==t&&(V.from!=V.to&&A=="before"?O=M:Me=M),V.from==t&&(V.from!=V.to&&A!="before"?O=M:Me=M)}return O!=null?O:Me}var je=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function A(ve){return ve<=247?e.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?t.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var O=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,M=/[stwN]/,V=/[LRr]/,ae=/[Lb1n]/,de=/[1n]/;function fe(ve,_e,De){this.level=ve,this.from=_e,this.to=De}return function(ve,_e){var De=_e=="ltr"?"L":"R";if(ve.length==0||_e=="ltr"&&!O.test(ve))return!1;for(var Ue=ve.length,Ne=[],Ge=0;Ge<Ue;++Ge)Ne.push(A(ve.charCodeAt(Ge)));for(var Je=0,rt=De;Je<Ue;++Je){var lt=Ne[Je];lt=="m"?Ne[Je]=rt:rt=lt}for(var ht=0,ut=De;ht<Ue;++ht){var mt=Ne[ht];mt=="1"&&ut=="r"?Ne[ht]="n":V.test(mt)&&(ut=mt,mt=="r"&&(Ne[ht]="R"))}for(var Ot=1,Tt=Ne[0];Ot<Ue-1;++Ot){var Ut=Ne[Ot];Ut=="+"&&Tt=="1"&&Ne[Ot+1]=="1"?Ne[Ot]="1":Ut==","&&Tt==Ne[Ot+1]&&(Tt=="1"||Tt=="n")&&(Ne[Ot]=Tt),Tt=Ut}for(var qt=0;qt<Ue;++qt){var Cr=Ne[qt];if(Cr==",")Ne[qt]="N";else if(Cr=="%"){var or=void 0;for(or=qt+1;or<Ue&&Ne[or]=="%";++or);for(var $r=qt&&Ne[qt-1]=="!"||or<Ue&&Ne[or]=="1"?"1":"N",Kr=qt;Kr<or;++Kr)Ne[Kr]=$r;qt=or-1}}for(var mr=0,Gr=De;mr<Ue;++mr){var Ar=Ne[mr];Gr=="L"&&Ar=="1"?Ne[mr]="L":V.test(Ar)&&(Gr=Ar)}for(var br=0;br<Ue;++br)if(M.test(Ne[br])){var gr=void 0;for(gr=br+1;gr<Ue&&M.test(Ne[gr]);++gr);for(var lr=(br?Ne[br-1]:De)=="L",zr=(gr<Ue?Ne[gr]:De)=="L",Ga=lr==zr?lr?"L":"R":De,na=br;na<gr;++na)Ne[na]=Ga;br=gr-1}for(var Ir=[],Mn,Or=0;Or<Ue;)if(ae.test(Ne[Or])){var Eo=Or;for(++Or;Or<Ue&&ae.test(Ne[Or]);++Or);Ir.push(new fe(0,Eo,Or))}else{var Hn=Or,xa=Ir.length,Ea=_e=="rtl"?1:0;for(++Or;Or<Ue&&Ne[Or]!="L";++Or);for(var jr=Hn;jr<Or;)if(de.test(Ne[jr])){Hn<jr&&(Ir.splice(xa,0,new fe(1,Hn,jr)),xa+=Ea);var za=jr;for(++jr;jr<Or&&de.test(Ne[jr]);++jr);Ir.splice(xa,0,new fe(2,za,jr)),xa+=Ea,Hn=jr}else++jr;Hn<Or&&Ir.splice(xa,0,new fe(1,Hn,Or))}return _e=="ltr"&&(Ir[0].level==1&&(Mn=ve.match(/^\s+/))&&(Ir[0].from=Mn[0].length,Ir.unshift(new fe(0,0,Mn[0].length))),q(Ir).level==1&&(Mn=ve.match(/\s+$/))&&(q(Ir).to-=Mn[0].length,Ir.push(new fe(0,Ue-Mn[0].length,Ue)))),_e=="rtl"?Ir.reverse():Ir}}();function Fe(e,t){var A=e.order;return A==null&&(A=e.order=je(e.text,t)),A}var We=[],Se=function(e,t,A){if(e.addEventListener)e.addEventListener(t,A,!1);else if(e.attachEvent)e.attachEvent("on"+t,A);else{var O=e._handlers||(e._handlers={});O[t]=(O[t]||We).concat(A)}};function Xe(e,t){return e._handlers&&e._handlers[t]||We}function Ye(e,t,A){if(e.removeEventListener)e.removeEventListener(t,A,!1);else if(e.detachEvent)e.detachEvent("on"+t,A);else{var O=e._handlers,M=O&&O[t];if(M){var V=ie(M,A);V>-1&&(O[t]=M.slice(0,V).concat(M.slice(V+1)))}}}function Ie(e,t){var A=Xe(e,t);if(!A.length)return;for(var O=Array.prototype.slice.call(arguments,2),M=0;M<A.length;++M)A[M].apply(null,O)}function He(e,t,A){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ie(e,A||t.type,e,t),we(t)||t.codemirrorIgnore}function Ae(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var A=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),O=0;O<t.length;++O)ie(A,t[O])==-1&&A.push(t[O])}function Te(e,t){return Xe(e,t).length>0}function Ce(e){e.prototype.on=function(t,A){Se(this,t,A)},e.prototype.off=function(t,A){Ye(this,t,A)}}function ye(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Oe(e){ye(e),Ee(e)}function Le(e){return e.target||e.srcElement}function Be(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var ze=function(){if(_&&d<9)return!1;var e=C("div");return"draggable"in e||"dragDrop"in e}(),nt;function Ze(e){if(nt==null){var t=C("span","\u200B");E(e,C("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(nt=t.offsetWidth<=1&&t.offsetHeight>2&&!(_&&d<8))}var A=nt?C("span","\u200B"):C("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return A.setAttribute("cm-text",""),A}var at;function pt(e){if(at!=null)return at;var t=E(e,document.createTextNode("A\u062EA")),A=j(t,0,1).getBoundingClientRect(),O=j(t,1,2).getBoundingClientRect();return b(e),!A||A.left==A.right?!1:at=O.right-A.right<3}var dt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,A=[],O=e.length;t<=O;){var M=e.indexOf(`
`,t);M==-1&&(M=e.length);var V=e.slice(t,e.charAt(M-1)=="\r"?M-1:M),ae=V.indexOf("\r");ae!=-1?(A.push(V.slice(0,ae)),t+=ae+1):(A.push(V),t=M+1)}return A}:function(e){return e.split(/\r\n?|\n/)},it=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(A){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Lt=function(){var e=C("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Et=null;function Qt(e){if(Et!=null)return Et;var t=E(e,C("span","x")),A=t.getBoundingClientRect(),O=j(t,0,1).getBoundingClientRect();return Et=Math.abs(A.left-O.left)>1}var Wt={},gt={};function xt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wt[e]=t}function er(e,t){gt[e]=t}function Ht(e){if(typeof e=="string"&&gt.hasOwnProperty(e))e=gt[e];else if(e&&typeof e.name=="string"&&gt.hasOwnProperty(e.name)){var t=gt[e.name];typeof t=="string"&&(t={name:t}),e=ge(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ht("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ht("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Ke(e,t){t=Ht(t);var A=Wt[t.name];if(!A)return Ke(e,"text/plain");var O=A(e,t);if(ot.hasOwnProperty(t.name)){var M=ot[t.name];for(var V in M){if(!M.hasOwnProperty(V))continue;O.hasOwnProperty(V)&&(O["_"+V]=O[V]),O[V]=M[V]}}if(O.name=t.name,t.helperType&&(O.helperType=t.helperType),t.modeProps)for(var ae in t.modeProps)O[ae]=t.modeProps[ae];return O}var ot={};function bt(e,t){var A=ot.hasOwnProperty(e)?ot[e]:ot[e]={};U(t,A)}function Ft(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var A={};for(var O in t){var M=t[O];M instanceof Array&&(M=M.concat([])),A[O]=M}return A}function Bt(e,t){for(var A;e.innerMode&&!(A=e.innerMode(t),!A||A.mode==e);)t=A.state,e=A.mode;return A||{mode:e,state:t}}function At(e,t,A){return e.startState?e.startState(t,A):!0}var Dt=function(e,t,A){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=A};Dt.prototype.eol=function(){return this.pos>=this.string.length},Dt.prototype.sol=function(){return this.pos==this.lineStart},Dt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Dt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Dt.prototype.eat=function(e){var t=this.string.charAt(this.pos),A;if(typeof e=="string"?A=t==e:A=t&&(e.test?e.test(t):e(t)),A)return++this.pos,t},Dt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Dt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Dt.prototype.skipToEnd=function(){this.pos=this.string.length},Dt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Dt.prototype.backUp=function(e){this.pos-=e},Dt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=W(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},Dt.prototype.indentation=function(){return W(this.string,null,this.tabSize)-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},Dt.prototype.match=function(e,t,A){if(typeof e=="string"){var O=function(ae){return A?ae.toLowerCase():ae},M=this.string.substr(this.pos,e.length);if(O(M)==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)}},Dt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Dt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Dt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Dt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ct(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 A=e;!A.lines;)for(var O=0;;++O){var M=A.children[O],V=M.chunkSize();if(t<V){A=M;break}t-=V}return A.lines[t]}function Rt(e,t,A){var O=[],M=t.line;return e.iter(t.line,A.line+1,function(V){var ae=V.text;M==A.line&&(ae=ae.slice(0,A.ch)),M==t.line&&(ae=ae.slice(t.ch)),O.push(ae),++M}),O}function rr(e,t,A){var O=[];return e.iter(t,A,function(M){O.push(M.text)}),O}function Yt(e,t){var A=t-e.height;if(A)for(var O=e;O;O=O.parent)O.height+=A}function Nt(e){if(e.parent==null)return null;for(var t=e.parent,A=ie(t.lines,e),O=t.parent;O;t=O,O=O.parent)for(var M=0;!(O.children[M]==t);++M)A+=O.children[M].chunkSize();return A+t.first}function ar(e,t){var A=e.first;e:do{for(var O=0;O<e.children.length;++O){var M=e.children[O],V=M.height;if(t<V){e=M;continue e}t-=V,A+=M.chunkSize()}return A}while(!e.lines);for(var ae=0;ae<e.lines.length;++ae){var de=e.lines[ae],fe=de.height;if(t<fe)break;t-=fe}return A+ae}function Mt(e,t){return t>=e.first&&t<e.first+e.size}function Dr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function $e(e,t,A){if(A===void 0&&(A=null),!(this instanceof $e))return new $e(e,t,A);this.line=e,this.ch=t,this.sticky=A}function yt(e,t){return e.line-t.line||e.ch-t.ch}function Ur(e,t){return e.sticky==t.sticky&&yt(e,t)==0}function xr(e){return $e(e.line,e.ch)}function Br(e,t){return yt(e,t)<0?t:e}function Mr(e,t){return yt(e,t)<0?e:t}function on(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ct(e,t){if(t.line<e.first)return $e(e.first,0);var A=e.first+e.size-1;return t.line>A?$e(A,ct(e,A).text.length):vr(t,ct(e,t.line).text.length)}function vr(e,t){var A=e.ch;return A==null||A>t?$e(e.line,t):A<0?$e(e.line,0):e}function Ve(e,t){for(var A=[],O=0;O<t.length;O++)A[O]=Ct(e,t[O]);return A}var $t=function(e,t){this.state=e,this.lookAhead=t},St=function(e,t,A,O){this.state=t,this.doc=e,this.line=A,this.maxLookAhead=O||0,this.baseTokens=null,this.baseTokenPos=1};St.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},St.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}},St.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},St.fromSaved=function(e,t,A){return t instanceof $t?new St(e,Ft(e.mode,t.state),A,t.lookAhead):new St(e,Ft(e.mode,t),A)},St.prototype.save=function(e){var t=e!==!1?Ft(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new $t(t,this.maxLookAhead):t};function Er(e,t,A,O){var M=[e.state.modeGen],V={};Nr(e,t.text,e.doc.mode,A,function(ve,_e){return M.push(ve,_e)},V,O);for(var ae=A.state,de=function(ve){A.baseTokens=M;var _e=e.state.overlays[ve],De=1,Ue=0;A.state=!0,Nr(e,t.text,_e.mode,A,function(Ne,Ge){for(var Je=De;Ue<Ne;){var rt=M[De];rt>Ne&&M.splice(De,1,Ne,M[De+1],rt),De+=2,Ue=Math.min(Ne,rt)}if(!Ge)return;if(_e.opaque)M.splice(Je,De-Je,Ne,"overlay "+Ge),De=Je+2;else for(;Je<De;Je+=2){var lt=M[Je+1];M[Je+1]=(lt?lt+" ":"")+"overlay "+Ge}},V),A.state=ae,A.baseTokens=null,A.baseTokenPos=1},fe=0;fe<e.state.overlays.length;++fe)de(fe);return{styles:M,classes:V.bgClass||V.textClass?V:null}}function yr(e,t,A){if(!t.styles||t.styles[0]!=e.state.modeGen){var O=wr(e,Nt(t)),M=t.text.length>e.options.maxHighlightLength&&Ft(e.doc.mode,O.state),V=Er(e,t,O);M&&(O.state=M),t.stateAfter=O.save(!M),t.styles=V.styles,V.classes?t.styleClasses=V.classes:t.styleClasses&&(t.styleClasses=null),A===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function wr(e,t,A){var O=e.doc,M=e.display;if(!O.mode.startState)return new St(O,!0,t);var V=On(e,t,A),ae=V>O.first&&ct(O,V-1).stateAfter,de=ae?St.fromSaved(O,ae,V):new St(O,At(O.mode),V);return O.iter(V,t,function(fe){sn(e,fe.text,de);var ve=de.line;fe.stateAfter=ve==t-1||ve%5==0||ve>=M.viewFrom&&ve<M.viewTo?de.save():null,de.nextLine()}),A&&(O.modeFrontier=de.line),de}function sn(e,t,A,O){var M=e.doc.mode,V=new Dt(t,e.options.tabSize,A);for(V.start=V.pos=O||0,t==""&&Rr(M,A.state);!V.eol();)ur(M,V,A.state),V.start=V.pos}function Rr(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var A=Bt(e,t);if(A.mode.blankLine)return A.mode.blankLine(A.state)}function ur(e,t,A,O){for(var M=0;M<10;M++){O&&(O[0]=Bt(e,A).mode);var V=e.token(t,A);if(t.pos>t.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var Jr=function(e,t,A){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=A};function sr(e,t,A,O){var M=e.doc,V=M.mode,ae;t=Ct(M,t);var de=ct(M,t.line),fe=wr(e,t.line,A),ve=new Dt(de.text,e.options.tabSize,fe),_e;for(O&&(_e=[]);(O||ve.pos<t.ch)&&!ve.eol();)ve.start=ve.pos,ae=ur(V,ve,fe.state),O&&_e.push(new Jr(ve,ae,Ft(M.mode,fe.state)));return O?_e:new Jr(ve,ae,fe.state)}function ln(e,t){if(e)for(;;){var A=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!A)break;e=e.slice(0,A.index)+e.slice(A.index+A[0].length);var O=A[1]?"bgClass":"textClass";t[O]==null?t[O]=A[2]:new RegExp("(?:^|\\s)"+A[2]+"(?:$|\\s)").test(t[O])||(t[O]+=" "+A[2])}return e}function Nr(e,t,A,O,M,V,ae){var de=A.flattenSpans;de==null&&(de=e.options.flattenSpans);var fe=0,ve=null,_e=new Dt(t,e.options.tabSize,O),De,Ue=e.options.addModeClass&&[null];for(t==""&&ln(Rr(A,O.state),V);!_e.eol();){if(_e.pos>e.options.maxHighlightLength?(de=!1,ae&&sn(e,t,O,_e.pos),_e.pos=t.length,De=null):De=ln(ur(A,_e,O.state,Ue),V),Ue){var Ne=Ue[0].name;Ne&&(De="m-"+(De?Ne+" "+De:Ne))}if(!de||ve!=De){for(;fe<_e.start;)fe=Math.min(_e.start,fe+5e3),M(fe,ve);ve=De}_e.start=_e.pos}for(;fe<_e.pos;){var Ge=Math.min(_e.pos,fe+5e3);M(Ge,ve),fe=Ge}}function On(e,t,A){for(var O,M,V=e.doc,ae=A?-1:t-(e.doc.mode.innerMode?1e3:100),de=t;de>ae;--de){if(de<=V.first)return V.first;var fe=ct(V,de-1),ve=fe.stateAfter;if(ve&&(!A||de+(ve instanceof $t?ve.lookAhead:0)<=V.modeFrontier))return de;var _e=W(fe.text,null,e.options.tabSize);(M==null||O>_e)&&(M=de-1,O=_e)}return M}function aa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var A=e.first,O=t-1;O>A;O--){var M=ct(e,O).stateAfter;if(M&&(!(M instanceof $t)||O+M.lookAhead<t)){A=O+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,A)}var An=!1,pr=!1;function un(){An=!0}function ia(){pr=!0}function cn(e,t,A){this.marker=e,this.from=t,this.to=A}function tr(e,t){if(e)for(var A=0;A<e.length;++A){var O=e[A];if(O.marker==t)return O}}function Kt(e,t){for(var A,O=0;O<e.length;++O)e[O]!=t&&(A||(A=[])).push(e[O]);return A}function cr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Tr(e,t,A){var O;if(e)for(var M=0;M<e.length;++M){var V=e[M],ae=V.marker,de=V.from==null||(ae.inclusiveLeft?V.from<=t:V.from<t);if(de||V.from==t&&ae.type=="bookmark"&&(!A||!V.marker.insertLeft)){var fe=V.to==null||(ae.inclusiveRight?V.to>=t:V.to>t);(O||(O=[])).push(new cn(ae,V.from,fe?null:V.to))}}return O}function yn(e,t,A){var O;if(e)for(var M=0;M<e.length;++M){var V=e[M],ae=V.marker,de=V.to==null||(ae.inclusiveRight?V.to>=t:V.to>t);if(de||V.from==t&&ae.type=="bookmark"&&(!A||V.marker.insertLeft)){var fe=V.from==null||(ae.inclusiveLeft?V.from<=t:V.from<t);(O||(O=[])).push(new cn(ae,fe?null:V.from-t,V.to==null?null:V.to-t))}}return O}function Dn(e,t){if(t.full)return null;var A=Mt(e,t.from.line)&&ct(e,t.from.line).markedSpans,O=Mt(e,t.to.line)&&ct(e,t.to.line).markedSpans;if(!A&&!O)return null;var M=t.from.ch,V=t.to.ch,ae=yt(t.from,t.to)==0,de=Tr(A,M,ae),fe=yn(O,V,ae),ve=t.text.length==1,_e=q(t.text).length+(ve?M:0);if(de)for(var De=0;De<de.length;++De){var Ue=de[De];if(Ue.to==null){var Ne=tr(fe,Ue.marker);Ne?ve&&(Ue.to=Ne.to==null?null:Ne.to+_e):Ue.to=M}}if(fe)for(var Ge=0;Ge<fe.length;++Ge){var Je=fe[Ge];if(Je.to!=null&&(Je.to+=_e),Je.from==null){var rt=tr(de,Je.marker);rt||(Je.from=_e,ve&&(de||(de=[])).push(Je))}else Je.from+=_e,ve&&(de||(de=[])).push(Je)}de&&(de=wa(de)),fe&&fe!=de&&(fe=wa(fe));var lt=[de];if(!ve){var ht=t.text.length-2,ut;if(ht>0&&de)for(var mt=0;mt<de.length;++mt)de[mt].to==null&&(ut||(ut=[])).push(new cn(de[mt].marker,null,null));for(var Ot=0;Ot<ht;++Ot)lt.push(ut);lt.push(fe)}return lt}function wa(e){for(var t=0;t<e.length;++t){var A=e[t];A.from!=null&&A.from==A.to&&A.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function dn(e,t,A){var O=null;if(e.iter(t.line,A.line+1,function(Ne){if(Ne.markedSpans)for(var Ge=0;Ge<Ne.markedSpans.length;++Ge){var Je=Ne.markedSpans[Ge].marker;Je.readOnly&&(!O||ie(O,Je)==-1)&&(O||(O=[])).push(Je)}}),!O)return null;for(var M=[{from:t,to:A}],V=0;V<O.length;++V)for(var ae=O[V],de=ae.find(0),fe=0;fe<M.length;++fe){var ve=M[fe];if(yt(ve.to,de.from)<0||yt(ve.from,de.to)>0)continue;var _e=[fe,1],De=yt(ve.from,de.from),Ue=yt(ve.to,de.to);(De<0||!ae.inclusiveLeft&&!De)&&_e.push({from:ve.from,to:de.from}),(Ue>0||!ae.inclusiveRight&&!Ue)&&_e.push({from:de.to,to:ve.to}),M.splice.apply(M,_e),fe+=_e.length-3}return M}function Xa(e){var t=e.markedSpans;if(!t)return;for(var A=0;A<t.length;++A)t[A].marker.detachLine(e);e.markedSpans=null}function Nn(e,t){if(!t)return;for(var A=0;A<t.length;++A)t[A].marker.attachLine(e);e.markedSpans=t}function Rn(e){return e.inclusiveLeft?-1:0}function fn(e){return e.inclusiveRight?1:0}function Ln(e,t){var A=e.lines.length-t.lines.length;if(A!=0)return A;var O=e.find(),M=t.find(),V=yt(O.from,M.from)||Rn(e)-Rn(t);if(V)return-V;var ae=yt(O.to,M.to)||fn(e)-fn(t);return ae||t.id-e.id}function bn(e,t){var A=pr&&e.markedSpans,O;if(A)for(var M=void 0,V=0;V<A.length;++V)M=A[V],M.marker.collapsed&&(t?M.from:M.to)==null&&(!O||Ln(O,M.marker)<0)&&(O=M.marker);return O}function xn(e){return bn(e,!0)}function Zr(e){return bn(e,!1)}function Kn(e,t){var A=pr&&e.markedSpans,O;if(A)for(var M=0;M<A.length;++M){var V=A[M];V.marker.collapsed&&(V.from==null||V.from<t)&&(V.to==null||V.to>t)&&(!O||Ln(O,V.marker)<0)&&(O=V.marker)}return O}function Ta(e,t,A,O,M){var V=ct(e,t),ae=pr&&V.markedSpans;if(ae)for(var de=0;de<ae.length;++de){var fe=ae[de];if(!fe.marker.collapsed)continue;var ve=fe.marker.find(0),_e=yt(ve.from,A)||Rn(fe.marker)-Rn(M),De=yt(ve.to,O)||fn(fe.marker)-fn(M);if(_e>=0&&De<=0||_e<=0&&De>=0)continue;if(_e<=0&&(fe.marker.inclusiveRight&&M.inclusiveLeft?yt(ve.to,A)>=0:yt(ve.to,A)>0)||_e>=0&&(fe.marker.inclusiveRight&&M.inclusiveLeft?yt(ve.from,O)<=0:yt(ve.from,O)<0))return!0}}function Lr(e){for(var t;t=xn(e);)e=t.find(-1,!0).line;return e}function Gn(e){for(var t;t=Zr(e);)e=t.find(1,!0).line;return e}function kn(e){for(var t,A;t=Zr(e);)e=t.find(1,!0).line,(A||(A=[])).push(e);return A}function oa(e,t){var A=ct(e,t),O=Lr(A);return A==O?t:Nt(O)}function Pn(e,t){if(t>e.lastLine())return t;var A=ct(e,t),O;if(!hn(e,A))return t;for(;O=Zr(A);)A=O.find(1,!0).line;return Nt(A)+1}function hn(e,t){var A=pr&&t.markedSpans;if(A)for(var O=void 0,M=0;M<A.length;++M){if(O=A[M],!O.marker.collapsed)continue;if(O.from==null)return!0;if(O.marker.widgetNode)continue;if(O.from==0&&O.marker.inclusiveLeft&&sa(e,t,O))return!0}}function sa(e,t,A){if(A.to==null){var O=A.marker.find(1,!0);return sa(e,O.line,tr(O.line.markedSpans,A.marker))}if(A.marker.inclusiveRight&&A.to==t.text.length)return!0;for(var M=void 0,V=0;V<t.markedSpans.length;++V)if(M=t.markedSpans[V],M.marker.collapsed&&!M.marker.widgetNode&&M.from==A.to&&(M.to==null||M.to!=A.from)&&(M.marker.inclusiveLeft||A.marker.inclusiveRight)&&sa(e,t,M))return!0}function Qr(e){e=Lr(e);for(var t=0,A=e.parent,O=0;O<A.lines.length;++O){var M=A.lines[O];if(M==e)break;t+=M.height}for(var V=A.parent;V;A=V,V=A.parent)for(var ae=0;ae<V.children.length;++ae){var de=V.children[ae];if(de==A)break;t+=de.height}return t}function la(e){if(e.height==0)return 0;for(var t=e.text.length,A,O=e;A=xn(O);){var M=A.find(0,!0);O=M.from.line,t+=M.from.ch-M.to.ch}for(O=e;A=Zr(O);){var V=A.find(0,!0);t-=O.text.length-V.from.ch,O=V.to.line,t+=O.text.length-V.to.ch}return t}function _a(e){var t=e.display,A=e.doc;t.maxLine=ct(A,A.first),t.maxLineLength=la(t.maxLine),t.maxLineChanged=!0,A.iter(function(O){var M=la(O);M>t.maxLineLength&&(t.maxLineLength=M,t.maxLine=O)})}var Fn=function(e,t,A){this.text=e,Nn(this,t),this.height=A?A(this):1};Fn.prototype.lineNo=function(){return Nt(this)},Ce(Fn);function Va(e,t,A,O){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Xa(e),Nn(e,A);var M=O?O(e):1;M!=e.height&&Yt(e,M)}function vt(e){e.parent=null,Xa(e)}var kt={},_t={};function jt(e,t){if(!e||/^\s*$/.test(e))return null;var A=t.addModeClass?_t:kt;return A[e]||(A[e]=e.replace(/\S+/g,"cm-$&"))}function tt(e,t){var A=F("span",null,null,o?"padding-right: .1px":null),O={pre:F("pre",[A],"CodeMirror-line"),content:A,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var M=0;M<=(t.rest?t.rest.length:0);M++){var V=M?t.rest[M-1]:t.line,ae=void 0;O.pos=0,O.addToken=et,pt(e.display.measure)&&(ae=Fe(V,e.doc.direction))&&(O.addToken=wt(O.addToken,ae)),O.map=[];var de=t!=e.display.externalMeasured&&Nt(V);Pt(V,O,yr(e,V,de)),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(Ze(e.display.measure))),M==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(o){var fe=O.content.lastChild;(/\bcm-tab\b/.test(fe.className)||fe.querySelector&&fe.querySelector(".cm-tab"))&&(O.content.className="cm-tab-wrap-hack")}return Ie(e,"renderLine",e,t.line,O.pre),O.pre.className&&(O.textClass=H(O.pre.className,O.textClass||"")),O}function Qe(e){var t=C("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function et(e,t,A,O,M,V,ae){if(!t)return;var de=e.splitSpaces?ft(t,e.trailingSpace):t,fe=e.cm.state.specialChars,ve=!1,_e;if(!fe.test(t))e.col+=t.length,_e=document.createTextNode(de),e.map.push(e.pos,e.pos+t.length,_e),_&&d<9&&(ve=!0),e.pos+=t.length;else{_e=document.createDocumentFragment();for(var De=0;;){fe.lastIndex=De;var Ue=fe.exec(t),Ne=Ue?Ue.index-De:t.length-De;if(Ne){var Ge=document.createTextNode(de.slice(De,De+Ne));_&&d<9?_e.appendChild(C("span",[Ge])):_e.appendChild(Ge),e.map.push(e.pos,e.pos+Ne,Ge),e.col+=Ne,e.pos+=Ne}if(!Ue)break;De+=Ne+1;var Je=void 0;if(Ue[0]==" "){var rt=e.cm.options.tabSize,lt=rt-e.col%rt;Je=_e.appendChild(C("span",oe(lt),"cm-tab")),Je.setAttribute("role","presentation"),Je.setAttribute("cm-text"," "),e.col+=lt}else Ue[0]=="\r"||Ue[0]==`
`?(Je=_e.appendChild(C("span",Ue[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Je.setAttribute("cm-text",Ue[0]),e.col+=1):(Je=e.cm.options.specialCharPlaceholder(Ue[0]),Je.setAttribute("cm-text",Ue[0]),_&&d<9?_e.appendChild(C("span",[Je])):_e.appendChild(Je),e.col+=1);e.map.push(e.pos,e.pos+1,Je),e.pos++}}if(e.trailingSpace=de.charCodeAt(t.length-1)==32,A||O||M||ve||V||ae){var ht=A||"";O&&(ht+=O),M&&(ht+=M);var ut=C("span",[_e],ht,V);if(ae)for(var mt in ae)ae.hasOwnProperty(mt)&&mt!="style"&&mt!="class"&&ut.setAttribute(mt,ae[mt]);return e.content.appendChild(ut)}e.content.appendChild(_e)}function ft(e,t){if(e.length>1&&!/ /.test(e))return e;for(var A=t,O="",M=0;M<e.length;M++){var V=e.charAt(M);V==" "&&A&&(M==e.length-1||e.charCodeAt(M+1)==32)&&(V="\xA0"),O+=V,A=V==" "}return O}function wt(e,t){return function(A,O,M,V,ae,de,fe){M=M?M+" cm-force-border":"cm-force-border";for(var ve=A.pos,_e=ve+O.length;;){for(var De=void 0,Ue=0;Ue<t.length&&!(De=t[Ue],De.to>ve&&De.from<=ve);Ue++);if(De.to>=_e)return e(A,O,M,V,ae,de,fe);e(A,O.slice(0,De.to-ve),M,V,null,de,fe),V=null,O=O.slice(De.to-ve),ve=De.to}}}function qe(e,t,A,O){var M=!O&&A.widgetNode;M&&e.map.push(e.pos,e.pos+t,M),!O&&e.cm.display.input.needsContentAttribute&&(M||(M=e.content.appendChild(document.createElement("span"))),M.setAttribute("cm-marker",A.id)),M&&(e.cm.display.input.setUneditable(M),e.content.appendChild(M)),e.pos+=t,e.trailingSpace=!1}function Pt(e,t,A){var O=e.markedSpans,M=e.text,V=0;if(!O){for(var ae=1;ae<A.length;ae+=2)t.addToken(t,M.slice(V,V=A[ae]),jt(A[ae+1],t.cm.options));return}for(var de=M.length,fe=0,ve=1,_e="",De,Ue,Ne=0,Ge,Je,rt,lt,ht;;){if(Ne==fe){Ge=Je=rt=Ue="",ht=null,lt=null,Ne=Infinity;for(var ut=[],mt=void 0,Ot=0;Ot<O.length;++Ot){var Tt=O[Ot],Ut=Tt.marker;if(Ut.type=="bookmark"&&Tt.from==fe&&Ut.widgetNode)ut.push(Ut);else if(Tt.from<=fe&&(Tt.to==null||Tt.to>fe||Ut.collapsed&&Tt.to==fe&&Tt.from==fe)){if(Tt.to!=null&&Tt.to!=fe&&Ne>Tt.to&&(Ne=Tt.to,Je=""),Ut.className&&(Ge+=" "+Ut.className),Ut.css&&(Ue=(Ue?Ue+";":"")+Ut.css),Ut.startStyle&&Tt.from==fe&&(rt+=" "+Ut.startStyle),Ut.endStyle&&Tt.to==Ne&&(mt||(mt=[])).push(Ut.endStyle,Tt.to),Ut.title&&((ht||(ht={})).title=Ut.title),Ut.attributes)for(var qt in Ut.attributes)(ht||(ht={}))[qt]=Ut.attributes[qt];Ut.collapsed&&(!lt||Ln(lt.marker,Ut)<0)&&(lt=Tt)}else Tt.from>fe&&Ne>Tt.from&&(Ne=Tt.from)}if(mt)for(var Cr=0;Cr<mt.length;Cr+=2)mt[Cr+1]==Ne&&(Je+=" "+mt[Cr]);if(!lt||lt.from==fe)for(var or=0;or<ut.length;++or)qe(t,0,ut[or]);if(lt&&(lt.from||0)==fe){if(qe(t,(lt.to==null?de+1:lt.to)-fe,lt.marker,lt.from==null),lt.to==null)return;lt.to==fe&&(lt=!1)}}if(fe>=de)break;for(var $r=Math.min(de,Ne);;){if(_e){var Kr=fe+_e.length;if(!lt){var mr=Kr>$r?_e.slice(0,$r-fe):_e;t.addToken(t,mr,De?De+Ge:Ge,rt,fe+mr.length==Ne?Je:"",Ue,ht)}if(Kr>=$r){_e=_e.slice($r-fe),fe=$r;break}fe=Kr,rt=""}_e=M.slice(V,V=A[ve++]),De=jt(A[ve++],t.cm.options)}}}function st(e,t,A){this.line=t,this.rest=kn(t),this.size=this.rest?Nt(q(this.rest))-A+1:1,this.node=this.text=null,this.hidden=hn(e,t)}function Gt(e,t,A){for(var O=[],M,V=t;V<A;V=M){var ae=new st(e.doc,ct(e.doc,V),V);M=V+ae.size,O.push(ae)}return O}var Vt=null;function ir(e){Vt?Vt.ops.push(e):e.ownsGroup=Vt={ops:[e],delayedCallbacks:[]}}function dr(e){var t=e.delayedCallbacks,A=0;do{for(;A<t.length;A++)t[A].call(null);for(var O=0;O<e.ops.length;O++){var M=e.ops[O];if(M.cursorActivityHandlers)for(;M.cursorActivityCalled<M.cursorActivityHandlers.length;)M.cursorActivityHandlers[M.cursorActivityCalled++].call(null,M.cm)}}while(A<t.length)}function Xr(e,t){var A=e.ownsGroup;if(!A)return;try{dr(A)}finally{Vt=null,t(A)}}var fr=null;function zt(e,t){var A=Xe(e,t);if(!A.length)return;var O=Array.prototype.slice.call(arguments,2),M;Vt?M=Vt.delayedCallbacks:fr?M=fr:(M=fr=[],setTimeout(ua,0));for(var V=function(de){M.push(function(){return A[de].apply(null,O)})},ae=0;ae<A.length;++ae)V(ae)}function ua(){var e=fr;fr=null;for(var t=0;t<e.length;++t)e[t]()}function En(e,t,A,O){for(var M=0;M<t.changes.length;M++){var V=t.changes[M];V=="text"?ca(e,t):V=="gutter"?mn(e,t,A,O):V=="class"?pn(e,t):V=="widget"&&Xn(e,t,O)}t.changes=null}function qr(e){return e.node==e.text&&(e.node=C("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),_&&d<8&&(e.node.style.zIndex=2)),e.node}function zn(e,t){var A=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(A&&(A+=" CodeMirror-linebackground"),t.background)A?t.background.className=A:(t.background.parentNode.removeChild(t.background),t.background=null);else if(A){var O=qr(t);t.background=O.insertBefore(C("div",null,A),O.firstChild),e.display.input.setUneditable(t.background)}}function jn(e,t){var A=e.display.externalMeasured;return A&&A.line==t.line?(e.display.externalMeasured=null,t.measure=A.measure,A.built):tt(e,t)}function ca(e,t){var A=t.text.className,O=jn(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,pn(e,t)):A&&(t.text.className=A)}function pn(e,t){zn(e,t),t.line.wrapClass?qr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var A=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=A||""}function mn(e,t,A,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 M=qr(t);t.gutterBackground=C("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),M.insertBefore(t.gutterBackground,t.text)}var V=t.line.gutterMarkers;if(e.options.lineNumbers||V){var ae=qr(t),de=t.gutter=C("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px");if(e.display.input.setUneditable(de),ae.insertBefore(de,t.text),t.line.gutterClass&&(de.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(t.lineNumber=de.appendChild(C("div",Dr(e.options,A),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+O.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var fe=0;fe<e.display.gutterSpecs.length;++fe){var ve=e.display.gutterSpecs[fe].className,_e=V.hasOwnProperty(ve)&&V[ve];_e&&de.appendChild(C("div",[_e],"CodeMirror-gutter-elt","left: "+O.gutterLeft[ve]+"px; width: "+O.gutterWidth[ve]+"px"))}}}function Xn(e,t,A){t.alignable&&(t.alignable=null);for(var O=D("CodeMirror-linewidget"),M=t.node.firstChild,V=void 0;M;M=V)V=M.nextSibling,O.test(M.className)&&t.node.removeChild(M);Vn(e,t,A)}function In(e,t,A,O){var M=jn(e,t);return t.text=t.node=M.pre,M.bgClass&&(t.bgClass=M.bgClass),M.textClass&&(t.textClass=M.textClass),pn(e,t),mn(e,t,A,O),Vn(e,t,O),t.node}function Vn(e,t,A){if(Un(e,t.line,t,A,!0),t.rest)for(var O=0;O<t.rest.length;O++)Un(e,t.rest[O],t,A,!1)}function Un(e,t,A,O,M){if(!t.widgets)return;for(var V=qr(A),ae=0,de=t.widgets;ae<de.length;++ae){var fe=de[ae],ve=C("div",[fe.node],"CodeMirror-linewidget"+(fe.className?" "+fe.className:""));fe.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),Ya(fe,ve,A,O),e.display.input.setUneditable(ve),M&&fe.above?V.insertBefore(ve,A.gutter||A.text):V.appendChild(ve),zt(fe,"redraw")}}function Ya(e,t,A,O){if(e.noHScroll){(A.alignable||(A.alignable=[])).push(t);var M=O.wrapperWidth;t.style.left=O.fixedPos+"px",e.coverGutter||(M-=O.gutterTotalWidth,t.style.paddingLeft=O.gutterTotalWidth+"px"),t.style.width=M+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-O.gutterTotalWidth+"px"))}function It(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!k(document.body,e.node)){var A="position: relative;";e.coverGutter&&(A+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(A+="width: "+t.display.wrapper.clientWidth+"px;"),E(t.display.measure,C("div",[e.node],null,A))}return e.height=e.node.parentNode.offsetHeight}function Jt(e,t){for(var A=Le(t);A!=e.wrapper;A=A.parentNode)if(!A||A.nodeType==1&&A.getAttribute("cm-ignore-events")=="true"||A.parentNode==e.sizer&&A!=e.mover)return!0}function Bn(e){return e.lineSpace.offsetTop}function da(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function gn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=E(e.measure,C("pre","x","CodeMirror-line-like")),A=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,O={left:parseInt(A.paddingLeft),right:parseInt(A.paddingRight)};return!isNaN(O.left)&&!isNaN(O.right)&&(e.cachedPaddingH=O),O}function en(e){return ce-e.display.nativeBarWidth}function wn(e){return e.display.scroller.clientWidth-en(e)-e.display.barWidth}function fa(e){return e.display.scroller.clientHeight-en(e)-e.display.barHeight}function $a(e,t,A){var O=e.options.lineWrapping,M=O&&wn(e);if(!t.measure.heights||O&&t.measure.width!=M){var V=t.measure.heights=[];if(O){t.measure.width=M;for(var ae=t.text.firstChild.getClientRects(),de=0;de<ae.length-1;de++){var fe=ae[de],ve=ae[de+1];Math.abs(fe.bottom-ve.bottom)>2&&V.push((fe.bottom+ve.top)/2-A.top)}}V.push(A.bottom-A.top)}}function Sa(e,t,A){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 M=0;M<e.rest.length;M++)if(Nt(e.rest[M])>A)return{map:e.measure.maps[M],cache:e.measure.caches[M],before:!0}}function Ja(e,t){t=Lr(t);var A=Nt(t),O=e.display.externalMeasured=new st(e.doc,t,A);O.lineN=A;var M=O.built=tt(e,O);return O.text=M.pre,E(e.display.lineMeasure,M.pre),O}function Za(e,t,A,O){return Vr(e,tn(e,t),A,O)}function Ca(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ma(e,t)];var A=e.display.externalMeasured;if(A&&t>=A.lineN&&t<A.lineN+A.size)return A}function tn(e,t){var A=Nt(t),O=Ca(e,A);O&&!O.text?O=null:O&&O.changes&&(En(e,O,A,Vi(e)),e.curOp.forceUpdate=!0),O||(O=Ja(e,t));var M=Sa(O,t,A);return{line:t,view:O,rect:null,map:M.map,cache:M.cache,before:M.before,hasHeights:!1}}function Vr(e,t,A,O,M){t.before&&(A=-1);var V=A+(O||""),ae;return t.cache.hasOwnProperty(V)?ae=t.cache[V]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||($a(e,t.view,t.rect),t.hasHeights=!0),ae=xi(e,t,A,O),ae.bogus||(t.cache[V]=ae)),{left:ae.left,right:ae.right,top:M?ae.rtop:ae.top,bottom:M?ae.rbottom:ae.bottom}}var Qa={left:0,right:0,top:0,bottom:0};function Yn(e,t,A){for(var O,M,V,ae,de,fe,ve=0;ve<e.length;ve+=3)if(de=e[ve],fe=e[ve+1],t<de?(M=0,V=1,ae="left"):t<fe?(M=t-de,V=M+1):(ve==e.length-3||t==fe&&e[ve+3]>t)&&(V=fe-de,M=V-1,t>=fe&&(ae="right")),M!=null){if(O=e[ve+2],de==fe&&A==(O.insertLeft?"left":"right")&&(ae=A),A=="left"&&M==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)O=e[(ve-=3)+2],ae="left";if(A=="right"&&M==fe-de)for(;ve<e.length-3&&e[ve+3]==e[ve+4]&&!e[ve+5].insertLeft;)O=e[(ve+=3)+2],ae="right";break}return{node:O,start:M,end:V,collapse:ae,coverStart:de,coverEnd:fe}}function Tn(e,t){var A=Qa;if(t=="left")for(var O=0;O<e.length&&!((A=e[O]).left!=A.right);O++);else for(var M=e.length-1;M>=0&&!((A=e[M]).left!=A.right);M--);return A}function xi(e,t,A,O){var M=Yn(t.map,A,O),V=M.node,ae=M.start,de=M.end,fe=M.collapse,ve;if(V.nodeType==3){for(var _e=0;_e<4;_e++){for(;ae&&pe(t.line.text.charAt(M.coverStart+ae));)--ae;for(;M.coverStart+de<M.coverEnd&&pe(t.line.text.charAt(M.coverStart+de));)++de;if(_&&d<9&&ae==0&&de==M.coverEnd-M.coverStart?ve=V.parentNode.getBoundingClientRect():ve=Tn(j(V,ae,de).getClientRects(),O),ve.left||ve.right||ae==0)break;de=ae,ae=ae-1,fe="right"}_&&d<11&&(ve=Ei(e.display.measure,ve))}else{ae>0&&(fe=O="right");var De;e.options.lineWrapping&&(De=V.getClientRects()).length>1?ve=De[O=="right"?De.length-1:0]:ve=V.getBoundingClientRect()}if(_&&d<9&&!ae&&(!ve||!ve.left&&!ve.right)){var Ue=V.parentNode.getClientRects()[0];Ue?ve={left:Ue.left,right:Ue.left+La(e.display),top:Ue.top,bottom:Ue.bottom}:ve=Qa}for(var Ne=ve.top-t.rect.top,Ge=ve.bottom-t.rect.top,Je=(Ne+Ge)/2,rt=t.view.measure.heights,lt=0;lt<rt.length-1&&!(Je<rt[lt]);lt++);var ht=lt?rt[lt-1]:0,ut=rt[lt],mt={left:(fe=="right"?ve.right:ve.left)-t.rect.left,right:(fe=="left"?ve.left:ve.right)-t.rect.left,top:ht,bottom:ut};return!ve.left&&!ve.right&&(mt.bogus=!0),e.options.singleCursorHeightPerLine||(mt.rtop=Ne,mt.rbottom=Ge),mt}function Ei(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Qt(e))return t;var A=screen.logicalXDPI/screen.deviceXDPI,O=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*A,right:t.right*A,top:t.top*O,bottom:t.bottom*O}}function Oa(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 vn(e){e.display.externalMeasure=null,b(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Oa(e.display.view[t])}function $n(e){vn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Aa(){return r&&l?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Da(){return r&&l?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function wi(e){var t=0;if(e.widgets)for(var A=0;A<e.widgets.length;++A)e.widgets[A].above&&(t+=It(e.widgets[A]));return t}function kr(e,t,A,O,M){if(!M){var V=wi(t);A.top+=V,A.bottom+=V}if(O=="line")return A;O||(O="local");var ae=Qr(t);if(O=="local"?ae+=Bn(e.display):ae-=e.display.viewOffset,O=="page"||O=="window"){var de=e.display.lineSpace.getBoundingClientRect();ae+=de.top+(O=="window"?0:Da());var fe=de.left+(O=="window"?0:Aa());A.left+=fe,A.right+=fe}return A.top+=ae,A.bottom+=ae,A}function rn(e,t,A){if(A=="div")return t;var O=t.left,M=t.top;if(A=="page")O-=Aa(),M-=Da();else if(A=="local"||!A){var V=e.display.sizer.getBoundingClientRect();O+=V.left,M+=V.top}var ae=e.display.lineSpace.getBoundingClientRect();return{left:O-ae.left,top:M-ae.top}}function Ki(e,t,A,O,M){return O||(O=ct(e.doc,t.line)),kr(e,O,Za(e,O,t.ch,M),A)}function _n(e,t,A,O,M,V){O=O||ct(e.doc,t.line),M||(M=tn(e,O));function ae(Ge,Je){var rt=Vr(e,M,Ge,Je?"right":"left",V);return Je?rt.left=rt.right:rt.right=rt.left,kr(e,O,rt,A)}var de=Fe(O,e.doc.direction),fe=t.ch,ve=t.sticky;if(fe>=O.text.length?(fe=O.text.length,ve="before"):fe<=0&&(fe=0,ve="after"),!de)return ae(ve=="before"?fe-1:fe,ve=="before");function _e(Ge,Je,rt){var lt=de[Je],ht=lt.level==1;return ae(rt?Ge-1:Ge,ht!=rt)}var De=Pe(de,fe,ve),Ue=Me,Ne=_e(fe,De,ve=="before");return Ue!=null&&(Ne.other=_e(fe,Ue,ve!="before")),Ne}function To(e,t){var A=0;t=Ct(e.doc,t),e.options.lineWrapping||(A=La(e.display)*t.ch);var O=ct(e.doc,t.line),M=Qr(O)+Bn(e.display);return{left:A,right:A,top:M,bottom:M+O.height}}function Gi(e,t,A,O,M){var V=$e(e,t,A);return V.xRel=M,O&&(V.outside=O),V}function zi(e,t,A){var O=e.doc;if(A+=e.display.viewOffset,A<0)return Gi(O.first,0,null,-1,-1);var M=ar(O,A),V=O.first+O.size-1;if(M>V)return Gi(O.first+O.size-1,ct(O,V).text.length,null,1,1);t<0&&(t=0);for(var ae=ct(O,M);;){var de=Ks(e,ae,M,t,A),fe=Kn(ae,de.ch+(de.xRel>0||de.outside>0?1:0));if(!fe)return de;var ve=fe.find(1);if(ve.line==M)return ve;ae=ct(O,M=ve.line)}}function _o(e,t,A,O){O-=wi(t);var M=t.text.length,V=Re(function(ae){return Vr(e,A,ae-1).bottom<=O},M,0);return M=Re(function(ae){return Vr(e,A,ae).top>O},V,M),{begin:V,end:M}}function So(e,t,A,O){A||(A=tn(e,t));var M=kr(e,t,Vr(e,A,O),"line").top;return _o(e,t,A,M)}function Xi(e,t,A,O){return e.bottom<=A?!1:e.top>A?!0:(O?e.left:e.right)>t}function Ks(e,t,A,O,M){M-=Qr(t);var V=tn(e,t),ae=wi(t),de=0,fe=t.text.length,ve=!0,_e=Fe(t,e.doc.direction);if(_e){var De=(e.options.lineWrapping?zs:Gs)(e,t,A,V,_e,O,M);ve=De.level!=1,de=ve?De.from:De.to-1,fe=ve?De.to:De.from-1}var Ue=null,Ne=null,Ge=Re(function(Ot){var Tt=Vr(e,V,Ot);return Tt.top+=ae,Tt.bottom+=ae,Xi(Tt,O,M,!1)?(Tt.top<=M&&Tt.left<=O&&(Ue=Ot,Ne=Tt),!0):!1},de,fe),Je,rt,lt=!1;if(Ne){var ht=O-Ne.left<Ne.right-O,ut=ht==ve;Ge=Ue+(ut?0:1),rt=ut?"after":"before",Je=ht?Ne.left:Ne.right}else{!ve&&(Ge==fe||Ge==de)&&Ge++,rt=Ge==0?"after":Ge==t.text.length?"before":Vr(e,V,Ge-(ve?1:0)).bottom+ae<=M==ve?"after":"before";var mt=_n(e,$e(A,Ge,rt),"line",t,V);Je=mt.left,lt=M<mt.top?-1:M>=mt.bottom?1:0}return Ge=xe(t.text,Ge,1),Gi(A,Ge,rt,lt,O-Je)}function Gs(e,t,A,O,M,V,ae){var de=Re(function(De){var Ue=M[De],Ne=Ue.level!=1;return Xi(_n(e,$e(A,Ne?Ue.to:Ue.from,Ne?"before":"after"),"line",t,O),V,ae,!0)},0,M.length-1),fe=M[de];if(de>0){var ve=fe.level!=1,_e=_n(e,$e(A,ve?fe.from:fe.to,ve?"after":"before"),"line",t,O);Xi(_e,V,ae,!0)&&_e.top>ae&&(fe=M[de-1])}return fe}function zs(e,t,A,O,M,V,ae){var de=_o(e,t,O,ae),fe=de.begin,ve=de.end;/\s/.test(t.text.charAt(ve-1))&&ve--;for(var _e=null,De=null,Ue=0;Ue<M.length;Ue++){var Ne=M[Ue];if(Ne.from>=ve||Ne.to<=fe)continue;var Ge=Ne.level!=1,Je=Vr(e,O,Ge?Math.min(ve,Ne.to)-1:Math.max(fe,Ne.from)).right,rt=Je<V?V-Je+1e9:Je-V;(!_e||De>rt)&&(_e=Ne,De=rt)}return _e||(_e=M[M.length-1]),_e.from<fe&&(_e={from:fe,to:_e.to,level:_e.level}),_e.to>ve&&(_e={from:_e.from,to:ve,level:_e.level}),_e}var ha;function Ra(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ha==null){ha=C("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ha.appendChild(document.createTextNode("x")),ha.appendChild(C("br"));ha.appendChild(document.createTextNode("x"))}E(e.measure,ha);var A=ha.offsetHeight/50;return A>3&&(e.cachedTextHeight=A),b(e.measure),A||1}function La(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=C("span","xxxxxxxxxx"),A=C("pre",[t],"CodeMirror-line-like");E(e.measure,A);var O=t.getBoundingClientRect(),M=(O.right-O.left)/10;return M>2&&(e.cachedCharWidth=M),M||10}function Vi(e){for(var t=e.display,A={},O={},M=t.gutters.clientLeft,V=t.gutters.firstChild,ae=0;V;V=V.nextSibling,++ae){var de=e.display.gutterSpecs[ae].className;A[de]=V.offsetLeft+V.clientLeft+M,O[de]=V.clientWidth}return{fixedPos:Yi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:A,gutterWidth:O,wrapperWidth:t.wrapper.clientWidth}}function Yi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Co(e){var t=Ra(e.display),A=e.options.lineWrapping,O=A&&Math.max(5,e.display.scroller.clientWidth/La(e.display)-3);return function(M){if(hn(e.doc,M))return 0;var V=0;if(M.widgets)for(var ae=0;ae<M.widgets.length;ae++)M.widgets[ae].height&&(V+=M.widgets[ae].height);return A?V+(Math.ceil(M.text.length/O)||1)*t:V+t}}function $i(e){var t=e.doc,A=Co(e);t.iter(function(O){var M=A(O);M!=O.height&&Yt(O,M)})}function pa(e,t,A,O){var M=e.display;if(!A&&Le(t).getAttribute("cm-not-content")=="true")return null;var V,ae,de=M.lineSpace.getBoundingClientRect();try{V=t.clientX-de.left,ae=t.clientY-de.top}catch(De){return null}var fe=zi(e,V,ae),ve;if(O&&fe.xRel>0&&(ve=ct(e.doc,fe.line).text).length==fe.ch){var _e=W(ve,ve.length,e.options.tabSize)-ve.length;fe=$e(fe.line,Math.max(0,Math.round((V-gn(e.display).left)/La(e.display))-_e))}return fe}function ma(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var A=e.display.view,O=0;O<A.length;O++)if(t-=A[O].size,t<0)return O}function Wr(e,t,A,O){t==null&&(t=e.doc.first),A==null&&(A=e.doc.first+e.doc.size),O||(O=0);var M=e.display;if(O&&A<M.viewTo&&(M.updateLineNumbers==null||M.updateLineNumbers>t)&&(M.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=M.viewTo)pr&&oa(e.doc,t)<M.viewTo&&Zn(e);else if(A<=M.viewFrom)pr&&Pn(e.doc,A+O)>M.viewFrom?Zn(e):(M.viewFrom+=O,M.viewTo+=O);else if(t<=M.viewFrom&&A>=M.viewTo)Zn(e);else if(t<=M.viewFrom){var V=Ti(e,A,A+O,1);V?(M.view=M.view.slice(V.index),M.viewFrom=V.lineN,M.viewTo+=O):Zn(e)}else if(A>=M.viewTo){var ae=Ti(e,t,t,-1);ae?(M.view=M.view.slice(0,ae.index),M.viewTo=ae.lineN):Zn(e)}else{var de=Ti(e,t,t,-1),fe=Ti(e,A,A+O,1);de&&fe?(M.view=M.view.slice(0,de.index).concat(Gt(e,de.lineN,fe.lineN)).concat(M.view.slice(fe.index)),M.viewTo+=O):Zn(e)}var ve=M.externalMeasured;ve&&(A<ve.lineN?ve.lineN+=O:t<ve.lineN+ve.size&&(M.externalMeasured=null))}function Jn(e,t,A){e.curOp.viewChanged=!0;var O=e.display,M=e.display.externalMeasured;if(M&&t>=M.lineN&&t<M.lineN+M.size&&(O.externalMeasured=null),t<O.viewFrom||t>=O.viewTo)return;var V=O.view[ma(e,t)];if(V.node==null)return;var ae=V.changes||(V.changes=[]);ie(ae,A)==-1&&ae.push(A)}function Zn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ti(e,t,A,O){var M=ma(e,t),V,ae=e.display.view;if(!pr||A==e.doc.first+e.doc.size)return{index:M,lineN:A};for(var de=e.display.viewFrom,fe=0;fe<M;fe++)de+=ae[fe].size;if(de!=t){if(O>0){if(M==ae.length-1)return null;V=de+ae[M].size-t,M++}else V=de-t;t+=V,A+=V}for(;oa(e.doc,A)!=A;){if(M==(O<0?0:ae.length-1))return null;A+=O*ae[M-(O<0?1:0)].size,M+=O}return{index:M,lineN:A}}function Xs(e,t,A){var O=e.display,M=O.view;M.length==0||t>=O.viewTo||A<=O.viewFrom?(O.view=Gt(e,t,A),O.viewFrom=t):(O.viewFrom>t?O.view=Gt(e,t,O.viewFrom).concat(O.view):O.viewFrom<t&&(O.view=O.view.slice(ma(e,t))),O.viewFrom=t,O.viewTo<A?O.view=O.view.concat(Gt(e,O.viewTo,A)):O.viewTo>A&&(O.view=O.view.slice(0,ma(e,A)))),O.viewTo=A}function Oo(e){for(var t=e.display.view,A=0,O=0;O<t.length;O++){var M=t[O];!M.hidden&&(!M.node||M.changes)&&++A}return A}function qa(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ao(e,t){t===void 0&&(t=!0);for(var A=e.doc,O={},M=O.cursors=document.createDocumentFragment(),V=O.selection=document.createDocumentFragment(),ae=0;ae<A.sel.ranges.length;ae++){if(!t&&ae==A.sel.primIndex)continue;var de=A.sel.ranges[ae];if(de.from().line>=e.display.viewTo||de.to().line<e.display.viewFrom)continue;var fe=de.empty();(fe||e.options.showCursorWhenSelecting)&&Do(e,de.head,M),fe||Vs(e,de,V)}return O}function Do(e,t,A){var O=_n(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),M=A.appendChild(C("div","\xA0","CodeMirror-cursor"));if(M.style.left=O.left+"px",M.style.top=O.top+"px",M.style.height=Math.max(0,O.bottom-O.top)*e.options.cursorHeight+"px",O.other){var V=A.appendChild(C("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 _i(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,A){var O=e.display,M=e.doc,V=document.createDocumentFragment(),ae=gn(e.display),de=ae.left,fe=Math.max(O.sizerWidth,wn(e)-O.sizer.offsetLeft)-ae.right,ve=M.direction=="ltr";function _e(ut,mt,Ot,Tt){mt<0&&(mt=0),mt=Math.round(mt),Tt=Math.round(Tt),V.appendChild(C("div",null,"CodeMirror-selected","position: absolute; left: "+ut+`px;
top: `+mt+"px; width: "+(Ot==null?fe-ut:Ot)+`px;
height: `+(Tt-mt)+"px"))}function De(ut,mt,Ot){var Tt=ct(M,ut),Ut=Tt.text.length,qt,Cr;function or(mr,Gr){return Ki(e,$e(ut,mr),"div",Tt,Gr)}function $r(mr,Gr,Ar){var br=So(e,Tt,null,mr),gr=Gr=="ltr"==(Ar=="after")?"left":"right",lr=Ar=="after"?br.begin:br.end-(/\s/.test(Tt.text.charAt(br.end-1))?2:1);return or(lr,gr)[gr]}var Kr=Fe(Tt,M.direction);return ke(Kr,mt||0,Ot==null?Ut:Ot,function(mr,Gr,Ar,br){var gr=Ar=="ltr",lr=or(mr,gr?"left":"right"),zr=or(Gr-1,gr?"right":"left"),Ga=mt==null&&mr==0,na=Ot==null&&Gr==Ut,Ir=br==0,Mn=!Kr||br==Kr.length-1;if(zr.top-lr.top<=3){var Or=(ve?Ga:na)&&Ir,Eo=(ve?na:Ga)&&Mn,Hn=Or?de:(gr?lr:zr).left,xa=Eo?fe:(gr?zr:lr).right;_e(Hn,lr.top,xa-Hn,lr.bottom)}else{var Ea,jr,za,wo;gr?(Ea=ve&&Ga&&Ir?de:lr.left,jr=ve?fe:$r(mr,Ar,"before"),za=ve?de:$r(Gr,Ar,"after"),wo=ve&&na&&Mn?fe:zr.right):(Ea=ve?$r(mr,Ar,"before"):de,jr=!ve&&Ga&&Ir?fe:lr.right,za=!ve&&na&&Mn?de:zr.left,wo=ve?$r(Gr,Ar,"after"):fe),_e(Ea,lr.top,jr-Ea,lr.bottom),lr.bottom<zr.top&&_e(de,lr.bottom,null,zr.top),_e(za,zr.top,wo-za,zr.bottom)}(!qt||_i(lr,qt)<0)&&(qt=lr),_i(zr,qt)<0&&(qt=zr),(!Cr||_i(lr,Cr)<0)&&(Cr=lr),_i(zr,Cr)<0&&(Cr=zr)}),{start:qt,end:Cr}}var Ue=t.from(),Ne=t.to();if(Ue.line==Ne.line)De(Ue.line,Ue.ch,Ne.ch);else{var Ge=ct(M,Ue.line),Je=ct(M,Ne.line),rt=Lr(Ge)==Lr(Je),lt=De(Ue.line,Ue.ch,rt?Ge.text.length+1:null).end,ht=De(Ne.line,rt?0:null,Ne.ch).start;rt&&(lt.top<ht.top-2?(_e(lt.right,lt.top,null,lt.bottom),_e(de,ht.top,ht.left,ht.bottom)):_e(lt.right,lt.top,ht.left-lt.right,lt.bottom)),lt.bottom<ht.top&&_e(de,lt.bottom,null,ht.top)}A.appendChild(V)}function Ji(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var A=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||ka(e),t.cursorDiv.style.visibility=(A=!A)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Ro(e){e.state.focused||(e.display.input.focus(),Zi(e))}function Lo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ka(e))},100)}function Zi(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ie(e,"focus",e,t),e.state.focused=!0,G(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),o&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ji(e)}function ka(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ie(e,"blur",e,t),e.state.focused=!1,c(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Si(e){for(var t=e.display,A=t.lineDiv.offsetTop,O=0;O<t.view.length;O++){var M=t.view[O],V=e.options.lineWrapping,ae=void 0,de=0;if(M.hidden)continue;if(_&&d<8){var fe=M.node.offsetTop+M.node.offsetHeight;ae=fe-A,A=fe}else{var ve=M.node.getBoundingClientRect();ae=ve.bottom-ve.top,!V&&M.text.firstChild&&(de=M.text.firstChild.getBoundingClientRect().right-ve.left-1)}var _e=M.line.height-ae;if((_e>.005||_e<-.005)&&(Yt(M.line,ae),ko(M.line),M.rest))for(var De=0;De<M.rest.length;De++)ko(M.rest[De]);if(de>e.display.sizerWidth){var Ue=Math.ceil(de/La(e.display));Ue>e.display.maxLineLength&&(e.display.maxLineLength=Ue,e.display.maxLine=M.line,e.display.maxLineChanged=!0)}}}function ko(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var A=e.widgets[t],O=A.node.parentNode;O&&(A.height=O.offsetHeight)}}function Ci(e,t,A){var O=A&&A.top!=null?Math.max(0,A.top):e.scroller.scrollTop;O=Math.floor(O-Bn(e));var M=A&&A.bottom!=null?A.bottom:O+e.wrapper.clientHeight,V=ar(t,O),ae=ar(t,M);if(A&&A.ensure){var de=A.ensure.from.line,fe=A.ensure.to.line;de<V?(V=de,ae=ar(t,Qr(ct(t,de))+e.wrapper.clientHeight)):Math.min(fe,t.lastLine())>=ae&&(V=ar(t,Qr(ct(t,fe))-e.wrapper.clientHeight),ae=fe)}return{from:V,to:Math.max(ae,V+1)}}function Ys(e,t){if(He(e,"scrollCursorIntoView"))return;var A=e.display,O=A.sizer.getBoundingClientRect(),M=null;if(t.top+O.top<0?M=!0:t.bottom+O.top>(window.innerHeight||document.documentElement.clientHeight)&&(M=!1),M!=null&&!x){var V=C("div","\u200B",null,`position: absolute;
top: `+(t.top-A.viewOffset-Bn(e.display))+`px;
height: `+(t.bottom-t.top+en(e)+A.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(V),V.scrollIntoView(M),e.display.lineSpace.removeChild(V)}}function $s(e,t,A,O){O==null&&(O=0);var M;!e.options.lineWrapping&&t==A&&(t=t.ch?$e(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,A=t.sticky=="before"?$e(t.line,t.ch+1,"before"):t);for(var V=0;V<5;V++){var ae=!1,de=_n(e,t),fe=!A||A==t?de:_n(e,A);M={left:Math.min(de.left,fe.left),top:Math.min(de.top,fe.top)-O,right:Math.max(de.left,fe.left),bottom:Math.max(de.bottom,fe.bottom)+O};var ve=Qi(e,M),_e=e.doc.scrollTop,De=e.doc.scrollLeft;if(ve.scrollTop!=null&&(ti(e,ve.scrollTop),Math.abs(e.doc.scrollTop-_e)>1&&(ae=!0)),ve.scrollLeft!=null&&(ga(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-De)>1&&(ae=!0)),!ae)break}return M}function Js(e,t){var A=Qi(e,t);A.scrollTop!=null&&ti(e,A.scrollTop),A.scrollLeft!=null&&ga(e,A.scrollLeft)}function Qi(e,t){var A=e.display,O=Ra(e.display);t.top<0&&(t.top=0);var M=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:A.scroller.scrollTop,V=fa(e),ae={};t.bottom-t.top>V&&(t.bottom=t.top+V);var de=e.doc.height+da(A),fe=t.top<O,ve=t.bottom>de-O;if(t.top<M)ae.scrollTop=fe?0:t.top;else if(t.bottom>M+V){var _e=Math.min(t.top,(ve?de:t.bottom)-V);_e!=M&&(ae.scrollTop=_e)}var De=e.options.fixedGutter?0:A.gutters.offsetWidth,Ue=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:A.scroller.scrollLeft-De,Ne=wn(e)-A.gutters.offsetWidth,Ge=t.right-t.left>Ne;return Ge&&(t.right=t.left+Ne),t.left<10?ae.scrollLeft=0:t.left<Ue?ae.scrollLeft=Math.max(0,t.left+De-(Ge?0:10)):t.right>Ne+Ue-3&&(ae.scrollLeft=t.right+(Ge?0:10)-Ne),ae}function qi(e,t){if(t==null)return;Oi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Pa(e){Oi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ei(e,t,A){(t!=null||A!=null)&&Oi(e),t!=null&&(e.curOp.scrollLeft=t),A!=null&&(e.curOp.scrollTop=A)}function Zs(e,t){Oi(e),e.curOp.scrollToPos=t}function Oi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var A=To(e,t.from),O=To(e,t.to);Po(e,A,O,t.margin)}}function Po(e,t,A,O){var M=Qi(e,{left:Math.min(t.left,A.left),top:Math.min(t.top,A.top)-O,right:Math.max(t.right,A.right),bottom:Math.max(t.bottom,A.bottom)+O});ei(e,M.scrollLeft,M.scrollTop)}function ti(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;T||to(e,{top:t}),Io(e,t,!0),T&&to(e),ai(e,100)}function Io(e,t,A){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!A)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function ga(e,t,A,O){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(A?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!O)return;e.doc.scrollLeft=t,Uo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ri(e){var t=e.display,A=t.gutters.offsetWidth,O=Math.round(e.doc.height+da(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?A:0,docHeight:O,scrollHeight:O+en(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:A}}var va=function(e,t,A){this.cm=A;var O=this.vert=C("div",[C("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),M=this.horiz=C("div",[C("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");O.tabIndex=M.tabIndex=-1,e(O),e(M),Se(O,"scroll",function(){O.clientHeight&&t(O.scrollTop,"vertical")}),Se(M,"scroll",function(){M.clientWidth&&t(M.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_&&d<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};va.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,A=e.scrollHeight>e.clientHeight+1,O=e.nativeBarWidth;if(A){this.vert.style.display="block",this.vert.style.bottom=t?O+"px":"0";var M=e.viewHeight-(t?O:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+M)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=A?O+"px":"0",this.horiz.style.left=e.barLeft+"px";var V=e.viewWidth-e.barLeft-(A?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:A?O:0,bottom:t?O:0}},va.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},va.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},va.prototype.zeroWidthHack=function(){var e=s&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Q,this.disableVert=new Q},va.prototype.enableZeroWidthBar=function(e,t,A){e.style.pointerEvents="auto";function O(){var M=e.getBoundingClientRect(),V=A=="vert"?document.elementFromPoint(M.right-1,(M.top+M.bottom)/2):document.elementFromPoint((M.right+M.left)/2,M.bottom-1);V!=e?e.style.pointerEvents="none":t.set(1e3,O)}t.set(1e3,O)},va.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ni=function(){};ni.prototype.update=function(){return{bottom:0,right:0}},ni.prototype.setScrollLeft=function(){},ni.prototype.setScrollTop=function(){},ni.prototype.clear=function(){};function Ia(e,t){t||(t=ri(e));var A=e.display.barWidth,O=e.display.barHeight;Mo(e,t);for(var M=0;M<4&&A!=e.display.barWidth||O!=e.display.barHeight;M++)A!=e.display.barWidth&&e.options.lineWrapping&&Si(e),Mo(e,ri(e)),A=e.display.barWidth,O=e.display.barHeight}function Mo(e,t){var A=e.display,O=A.scrollbars.update(t);A.sizer.style.paddingRight=(A.barWidth=O.right)+"px",A.sizer.style.paddingBottom=(A.barHeight=O.bottom)+"px",A.heightForcer.style.borderBottom=O.bottom+"px solid transparent",O.right&&O.bottom?(A.scrollbarFiller.style.display="block",A.scrollbarFiller.style.height=O.bottom+"px",A.scrollbarFiller.style.width=O.right+"px"):A.scrollbarFiller.style.display="",O.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(A.gutterFiller.style.display="block",A.gutterFiller.style.height=O.bottom+"px",A.gutterFiller.style.width=t.gutterWidth+"px"):A.gutterFiller.style.display=""}var No={native:va,null:ni};function Fo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&c(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new No[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Se(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,A){A=="horizontal"?ga(e,t):ti(e,t)},e),e.display.scrollbars.addClass&&G(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function ya(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Qs},ir(e.curOp)}function ba(e){var t=e.curOp;t&&Xr(t,function(A){for(var O=0;O<A.ops.length;O++)A.ops[O].cm.curOp=null;el(A)})}function el(e){for(var t=e.ops,A=0;A<t.length;A++)tl(t[A]);for(var O=0;O<t.length;O++)rl(t[O]);for(var M=0;M<t.length;M++)nl(t[M]);for(var V=0;V<t.length;V++)al(t[V]);for(var ae=0;ae<t.length;ae++)il(t[ae])}function tl(e){var t=e.cm,A=t.display;sl(t),e.updateMaxLine&&_a(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<A.viewFrom||e.scrollToPos.to.line>=A.viewTo)||A.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function rl(e){e.updatedDisplay=e.mustUpdate&&eo(e.cm,e.update)}function nl(e){var t=e.cm,A=t.display;e.updatedDisplay&&Si(t),e.barMeasure=ri(t),A.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Za(t,A.maxLine,A.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(A.scroller.clientWidth,A.sizer.offsetLeft+e.adjustWidthTo+en(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,A.sizer.offsetLeft+e.adjustWidthTo-wn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=A.input.prepareSelection())}function al(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ga(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var A=e.focus&&e.focus==X();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,A),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ia(t,e.barMeasure),e.updatedDisplay&&no(t,e.barMeasure),e.selectionChanged&&Ji(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),A&&Ro(e.cm)}function il(e){var t=e.cm,A=t.display,O=t.doc;if(e.updatedDisplay&&jo(t,e.update),A.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(A.wheelStartX=A.wheelStartY=null),e.scrollTop!=null&&Io(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ga(t,e.scrollLeft,!0,!0),e.scrollToPos){var M=$s(t,Ct(O,e.scrollToPos.from),Ct(O,e.scrollToPos.to),e.scrollToPos.margin);Ys(t,M)}var V=e.maybeHiddenMarkers,ae=e.maybeUnhiddenMarkers;if(V)for(var de=0;de<V.length;++de)V[de].lines.length||Ie(V[de],"hide");if(ae)for(var fe=0;fe<ae.length;++fe)ae[fe].lines.length&&Ie(ae[fe],"unhide");A.wrapper.offsetHeight&&(O.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ie(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Yr(e,t){if(e.curOp)return t();ya(e);try{return t()}finally{ba(e)}}function _r(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ya(e);try{return t.apply(e,arguments)}finally{ba(e)}}}function Fr(e){return function(){if(this.curOp)return e.apply(this,arguments);ya(this);try{return e.apply(this,arguments)}finally{ba(this)}}}function Sr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ya(t);try{return e.apply(this,arguments)}finally{ba(t)}}}function ai(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(ol,e))}function ol(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var A=+new Date+e.options.workTime,O=wr(e,t.highlightFrontier),M=[];t.iter(O.line,Math.min(t.first+t.size,e.display.viewTo+500),function(V){if(O.line>=e.display.viewFrom){var ae=V.styles,de=V.text.length>e.options.maxHighlightLength?Ft(t.mode,O.state):null,fe=Er(e,V,O,!0);de&&(O.state=de),V.styles=fe.styles;var ve=V.styleClasses,_e=fe.classes;_e?V.styleClasses=_e:ve&&(V.styleClasses=null);for(var De=!ae||ae.length!=V.styles.length||ve!=_e&&(!ve||!_e||ve.bgClass!=_e.bgClass||ve.textClass!=_e.textClass),Ue=0;!De&&Ue<ae.length;++Ue)De=ae[Ue]!=V.styles[Ue];De&&M.push(O.line),V.stateAfter=O.save(),O.nextLine()}else V.text.length<=e.options.maxHighlightLength&&sn(e,V.text,O),V.stateAfter=O.line%5==0?O.save():null,O.nextLine();if(+new Date>A)return ai(e,e.options.workDelay),!0}),t.highlightFrontier=O.line,t.modeFrontier=Math.max(t.modeFrontier,O.line),M.length&&Yr(e,function(){for(var V=0;V<M.length;V++)Jn(e,M[V],"text")})}var Ai=function(e,t,A){var O=e.display;this.viewport=t,this.visible=Ci(O,e.doc,t),this.editorIsHidden=!O.wrapper.offsetWidth,this.wrapperHeight=O.wrapper.clientHeight,this.wrapperWidth=O.wrapper.clientWidth,this.oldDisplayWidth=wn(e),this.force=A,this.dims=Vi(e),this.events=[]};Ai.prototype.signal=function(e,t){Te(e,t)&&this.events.push(arguments)},Ai.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ie.apply(null,this.events[e])};function sl(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=en(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=en(e)+"px",t.scrollbarsClipped=!0)}function ll(e){if(e.hasFocus())return null;var t=X();if(!t||!k(e.display.lineDiv,t))return null;var A={activeElt:t};if(window.getSelection){var O=window.getSelection();O.anchorNode&&O.extend&&k(e.display.lineDiv,O.anchorNode)&&(A.anchorNode=O.anchorNode,A.anchorOffset=O.anchorOffset,A.focusNode=O.focusNode,A.focusOffset=O.focusOffset)}return A}function ul(e){if(!e||!e.activeElt||e.activeElt==X())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&k(document.body,e.anchorNode)&&k(document.body,e.focusNode)){var t=window.getSelection(),A=document.createRange();A.setEnd(e.anchorNode,e.anchorOffset),A.collapse(!1),t.removeAllRanges(),t.addRange(A),t.extend(e.focusNode,e.focusOffset)}}function eo(e,t){var A=e.display,O=e.doc;if(t.editorIsHidden)return Zn(e),!1;if(!t.force&&t.visible.from>=A.viewFrom&&t.visible.to<=A.viewTo&&(A.updateLineNumbers==null||A.updateLineNumbers>=A.viewTo)&&A.renderedView==A.view&&Oo(e)==0)return!1;Bo(e)&&(Zn(e),t.dims=Vi(e));var M=O.first+O.size,V=Math.max(t.visible.from-e.options.viewportMargin,O.first),ae=Math.min(M,t.visible.to+e.options.viewportMargin);A.viewFrom<V&&V-A.viewFrom<20&&(V=Math.max(O.first,A.viewFrom)),A.viewTo>ae&&A.viewTo-ae<20&&(ae=Math.min(M,A.viewTo)),pr&&(V=oa(e.doc,V),ae=Pn(e.doc,ae));var de=V!=A.viewFrom||ae!=A.viewTo||A.lastWrapHeight!=t.wrapperHeight||A.lastWrapWidth!=t.wrapperWidth;Xs(e,V,ae),A.viewOffset=Qr(ct(e.doc,A.viewFrom)),e.display.mover.style.top=A.viewOffset+"px";var fe=Oo(e);if(!de&&fe==0&&!t.force&&A.renderedView==A.view&&(A.updateLineNumbers==null||A.updateLineNumbers>=A.viewTo))return!1;var ve=ll(e);return fe>4&&(A.lineDiv.style.display="none"),cl(e,A.updateLineNumbers,t.dims),fe>4&&(A.lineDiv.style.display=""),A.renderedView=A.view,ul(ve),b(A.cursorDiv),b(A.selectionDiv),A.gutters.style.height=A.sizer.style.minHeight=0,de&&(A.lastWrapHeight=t.wrapperHeight,A.lastWrapWidth=t.wrapperWidth,ai(e,400)),A.updateLineNumbers=null,!0}function jo(e,t){for(var A=t.viewport,O=!0;;O=!1){if(!O||!e.options.lineWrapping||t.oldDisplayWidth==wn(e)){if(A&&A.top!=null&&(A={top:Math.min(e.doc.height+da(e.display)-fa(e),A.top)}),t.visible=Ci(e.display,e.doc,A),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else O&&(t.visible=Ci(e.display,e.doc,A));if(!eo(e,t))break;Si(e);var M=ri(e);qa(e),Ia(e,M),no(e,M),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 to(e,t){var A=new Ai(e,t);if(eo(e,A)){Si(e),jo(e,A);var O=ri(e);qa(e),Ia(e,O),no(e,O),A.finish()}}function cl(e,t,A){var O=e.display,M=e.options.lineNumbers,V=O.lineDiv,ae=V.firstChild;function de(Ge){var Je=Ge.nextSibling;return o&&s&&e.display.currentWheelTarget==Ge?Ge.style.display="none":Ge.parentNode.removeChild(Ge),Je}for(var fe=O.view,ve=O.viewFrom,_e=0;_e<fe.length;_e++){var De=fe[_e];if(!De.hidden)if(!De.node||De.node.parentNode!=V){var Ue=In(e,De,ve,A);V.insertBefore(Ue,ae)}else{for(;ae!=De.node;)ae=de(ae);var Ne=M&&t!=null&&t<=ve&&De.lineNumber;De.changes&&(ie(De.changes,"gutter")>-1&&(Ne=!1),En(e,De,ve,A)),Ne&&(b(De.lineNumber),De.lineNumber.appendChild(document.createTextNode(Dr(e.options,ve)))),ae=De.node.nextSibling}ve+=De.size}for(;ae;)ae=de(ae)}function ro(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function no(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+en(e)+"px"}function Uo(e){var t=e.display,A=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var O=Yi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,M=t.gutters.offsetWidth,V=O+"px",ae=0;ae<A.length;ae++)if(!A[ae].hidden){e.options.fixedGutter&&(A[ae].gutter&&(A[ae].gutter.style.left=V),A[ae].gutterBackground&&(A[ae].gutterBackground.style.left=V));var de=A[ae].alignable;if(de)for(var fe=0;fe<de.length;fe++)de[fe].style.left=V}e.options.fixedGutter&&(t.gutters.style.left=O+M+"px")}function Bo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,A=Dr(e.options,t.first+t.size-1),O=e.display;if(A.length!=O.lineNumChars){var M=O.measure.appendChild(C("div",[C("div",A)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=M.firstChild.offsetWidth,ae=M.offsetWidth-V;return O.lineGutter.style.width="",O.lineNumInnerWidth=Math.max(V,O.lineGutter.offsetWidth-ae)+1,O.lineNumWidth=O.lineNumInnerWidth+ae,O.lineNumChars=O.lineNumInnerWidth?A.length:-1,O.lineGutter.style.width=O.lineNumWidth+"px",ro(e.display),!0}return!1}function ao(e,t){for(var A=[],O=!1,M=0;M<e.length;M++){var V=e[M],ae=null;if(typeof V!="string"&&(ae=V.style,V=V.className),V=="CodeMirror-linenumbers")if(t)O=!0;else continue;A.push({className:V,style:ae})}return t&&!O&&A.push({className:"CodeMirror-linenumbers",style:null}),A}function Wo(e){var t=e.gutters,A=e.gutterSpecs;b(t),e.lineGutter=null;for(var O=0;O<A.length;++O){var M=A[O],V=M.className,ae=M.style,de=t.appendChild(C("div",null,"CodeMirror-gutter "+V));ae&&(de.style.cssText=ae),V=="CodeMirror-linenumbers"&&(e.lineGutter=de,de.style.width=(e.lineNumWidth||1)+"px")}t.style.display=A.length?"":"none",ro(e)}function ii(e){Wo(e.display),Wr(e),Uo(e)}function dl(e,t,A,O){var M=this;this.input=A,M.scrollbarFiller=C("div",null,"CodeMirror-scrollbar-filler"),M.scrollbarFiller.setAttribute("cm-not-content","true"),M.gutterFiller=C("div",null,"CodeMirror-gutter-filler"),M.gutterFiller.setAttribute("cm-not-content","true"),M.lineDiv=F("div",null,"CodeMirror-code"),M.selectionDiv=C("div",null,null,"position: relative; z-index: 1"),M.cursorDiv=C("div",null,"CodeMirror-cursors"),M.measure=C("div",null,"CodeMirror-measure"),M.lineMeasure=C("div",null,"CodeMirror-measure"),M.lineSpace=F("div",[M.measure,M.lineMeasure,M.selectionDiv,M.cursorDiv,M.lineDiv],null,"position: relative; outline: none");var V=F("div",[M.lineSpace],"CodeMirror-lines");M.mover=C("div",[V],null,"position: relative"),M.sizer=C("div",[M.mover],"CodeMirror-sizer"),M.sizerWidth=null,M.heightForcer=C("div",null,null,"position: absolute; height: "+ce+"px; width: 1px;"),M.gutters=C("div",null,"CodeMirror-gutters"),M.lineGutter=null,M.scroller=C("div",[M.sizer,M.heightForcer,M.gutters],"CodeMirror-scroll"),M.scroller.setAttribute("tabIndex","-1"),M.wrapper=C("div",[M.scrollbarFiller,M.gutterFiller,M.scroller],"CodeMirror"),_&&d<8&&(M.gutters.style.zIndex=-1,M.scroller.style.paddingRight=0),!o&&!(T&&n)&&(M.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(M.wrapper):e(M.wrapper)),M.viewFrom=M.viewTo=t.first,M.reportedViewFrom=M.reportedViewTo=t.first,M.view=[],M.renderedView=null,M.externalMeasured=null,M.viewOffset=0,M.lastWrapHeight=M.lastWrapWidth=0,M.updateLineNumbers=null,M.nativeBarWidth=M.barHeight=M.barWidth=0,M.scrollbarsClipped=!1,M.lineNumWidth=M.lineNumInnerWidth=M.lineNumChars=null,M.alignWidgets=!1,M.cachedCharWidth=M.cachedTextHeight=M.cachedPaddingH=null,M.maxLine=null,M.maxLineLength=0,M.maxLineChanged=!1,M.wheelDX=M.wheelDY=M.wheelStartX=M.wheelStartY=null,M.shift=!1,M.selForContextMenu=null,M.activeTouch=null,M.gutterSpecs=ao(O.gutters,O.lineNumbers),Wo(M),A.init(M)}var Di=0,nn=null;_?nn=-.53:T?nn=15:r?nn=-.7:p&&(nn=-1/3);function Ho(e){var t=e.wheelDeltaX,A=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),A==null&&e.detail&&e.axis==e.VERTICAL_AXIS?A=e.detail:A==null&&(A=e.wheelDelta),{x:t,y:A}}function fl(e){var t=Ho(e);return t.x*=nn,t.y*=nn,t}function Ko(e,t){var A=Ho(t),O=A.x,M=A.y,V=e.display,ae=V.scroller,de=ae.scrollWidth>ae.clientWidth,fe=ae.scrollHeight>ae.clientHeight;if(!(O&&de||M&&fe))return;if(M&&s&&o){e:for(var ve=t.target,_e=V.view;ve!=ae;ve=ve.parentNode)for(var De=0;De<_e.length;De++)if(_e[De].node==ve){e.display.currentWheelTarget=ve;break e}}if(O&&!T&&!h&&nn!=null){M&&fe&&ti(e,Math.max(0,ae.scrollTop+M*nn)),ga(e,Math.max(0,ae.scrollLeft+O*nn)),(!M||M&&fe)&&ye(t),V.wheelStartX=null;return}if(M&&nn!=null){var Ue=M*nn,Ne=e.doc.scrollTop,Ge=Ne+V.wrapper.clientHeight;Ue<0?Ne=Math.max(0,Ne+Ue-50):Ge=Math.min(e.doc.height,Ge+Ue+50),to(e,{top:Ne,bottom:Ge})}Di<20&&(V.wheelStartX==null?(V.wheelStartX=ae.scrollLeft,V.wheelStartY=ae.scrollTop,V.wheelDX=O,V.wheelDY=M,setTimeout(function(){if(V.wheelStartX==null)return;var Je=ae.scrollLeft-V.wheelStartX,rt=ae.scrollTop-V.wheelStartY,lt=rt&&V.wheelDY&&rt/V.wheelDY||Je&&V.wheelDX&&Je/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!lt)return;nn=(nn*Di+lt)/(Di+1),++Di},200)):(V.wheelDX+=O,V.wheelDY+=M))}var an=function(e,t){this.ranges=e,this.primIndex=t};an.prototype.primary=function(){return this.ranges[this.primIndex]},an.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 A=this.ranges[t],O=e.ranges[t];if(!Ur(A.anchor,O.anchor)||!Ur(A.head,O.head))return!1}return!0},an.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Xt(xr(this.ranges[t].anchor),xr(this.ranges[t].head));return new an(e,this.primIndex)},an.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},an.prototype.contains=function(e,t){t||(t=e);for(var A=0;A<this.ranges.length;A++){var O=this.ranges[A];if(yt(t,O.from())>=0&&yt(e,O.to())<=0)return A}return-1};var Xt=function(e,t){this.anchor=e,this.head=t};Xt.prototype.from=function(){return Mr(this.anchor,this.head)},Xt.prototype.to=function(){return Br(this.anchor,this.head)},Xt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Sn(e,t,A){var O=e&&e.options.selectionsMayTouch,M=t[A];t.sort(function(Ue,Ne){return yt(Ue.from(),Ne.from())}),A=ie(t,M);for(var V=1;V<t.length;V++){var ae=t[V],de=t[V-1],fe=yt(de.to(),ae.from());if(O&&!ae.empty()?fe>0:fe>=0){var ve=Mr(de.from(),ae.from()),_e=Br(de.to(),ae.to()),De=de.empty()?ae.from()==ae.head:de.from()==de.head;V<=A&&--A,t.splice(--V,2,new Xt(De?_e:ve,De?ve:_e))}}return new an(t,A)}function Qn(e,t){return new an([new Xt(e,t||e)],0)}function qn(e){return e.text?$e(e.from.line+e.text.length-1,q(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Go(e,t){if(yt(e,t.from)<0)return e;if(yt(e,t.to)<=0)return qn(t);var A=e.line+t.text.length-(t.to.line-t.from.line)-1,O=e.ch;return e.line==t.to.line&&(O+=qn(t).ch-t.to.ch),$e(A,O)}function io(e,t){for(var A=[],O=0;O<e.sel.ranges.length;O++){var M=e.sel.ranges[O];A.push(new Xt(Go(M.anchor,t),Go(M.head,t)))}return Sn(e.cm,A,e.sel.primIndex)}function zo(e,t,A){return e.line==t.line?$e(A.line,e.ch-t.ch+A.ch):$e(A.line+(e.line-t.line),e.ch)}function hl(e,t,A){for(var O=[],M=$e(e.first,0),V=M,ae=0;ae<t.length;ae++){var de=t[ae],fe=zo(de.from,M,V),ve=zo(qn(de),M,V);if(M=de.to,V=ve,A=="around"){var _e=e.sel.ranges[ae],De=yt(_e.head,_e.anchor)<0;O[ae]=new Xt(De?ve:fe,De?fe:ve)}else O[ae]=new Xt(fe,fe)}return new an(O,e.sel.primIndex)}function oo(e){e.doc.mode=Ke(e.options,e.doc.modeOption),oi(e)}function oi(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,ai(e,100),e.state.modeGen++,e.curOp&&Wr(e)}function Xo(e,t){return t.from.ch==0&&t.to.ch==0&&q(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function so(e,t,A,O){function M(ht){return A?A[ht]:null}function V(ht,ut,mt){Va(ht,ut,mt,O),zt(ht,"change",ht,t)}function ae(ht,ut){for(var mt=[],Ot=ht;Ot<ut;++Ot)mt.push(new Fn(ve[Ot],M(Ot),O));return mt}var de=t.from,fe=t.to,ve=t.text,_e=ct(e,de.line),De=ct(e,fe.line),Ue=q(ve),Ne=M(ve.length-1),Ge=fe.line-de.line;if(t.full)e.insert(0,ae(0,ve.length)),e.remove(ve.length,e.size-ve.length);else if(Xo(e,t)){var Je=ae(0,ve.length-1);V(De,De.text,Ne),Ge&&e.remove(de.line,Ge),Je.length&&e.insert(de.line,Je)}else if(_e==De)if(ve.length==1)V(_e,_e.text.slice(0,de.ch)+Ue+_e.text.slice(fe.ch),Ne);else{var rt=ae(1,ve.length-1);rt.push(new Fn(Ue+_e.text.slice(fe.ch),Ne,O)),V(_e,_e.text.slice(0,de.ch)+ve[0],M(0)),e.insert(de.line+1,rt)}else if(ve.length==1)V(_e,_e.text.slice(0,de.ch)+ve[0]+De.text.slice(fe.ch),M(0)),e.remove(de.line+1,Ge);else{V(_e,_e.text.slice(0,de.ch)+ve[0],M(0)),V(De,Ue+De.text.slice(fe.ch),Ne);var lt=ae(1,ve.length-1);Ge>1&&e.remove(de.line+1,Ge-1),e.insert(de.line+1,lt)}zt(e,"change",e,t)}function ea(e,t,A){function O(M,V,ae){if(M.linked)for(var de=0;de<M.linked.length;++de){var fe=M.linked[de];if(fe.doc==V)continue;var ve=ae&&fe.sharedHist;if(A&&!ve)continue;t(fe.doc,ve),O(fe.doc,M,ve)}}O(e,null,!0)}function Vo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,$i(e),oo(e),Yo(e),e.options.lineWrapping||_a(e),e.options.mode=t.modeOption,Wr(e)}function Yo(e){(e.doc.direction=="rtl"?G:c)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Yr(e,function(){Yo(e),Wr(e)})}function Ri(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 lo(e,t){var A={from:xr(t.from),to:qn(t),text:Rt(e,t.from,t.to)};return Zo(e,A,t.from.line,t.to.line+1),ea(e,function(O){return Zo(O,A,t.from.line,t.to.line+1)},!0),A}function $o(e){for(;e.length;){var t=q(e);if(t.ranges)e.pop();else break}}function ml(e,t){if(t)return $o(e.done),q(e.done);if(e.done.length&&!q(e.done).ranges)return q(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),q(e.done)}function Jo(e,t,A,O){var M=e.history;M.undone.length=0;var V=+new Date,ae,de;if((M.lastOp==O||M.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&M.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(ae=ml(M,M.lastOp==O)))de=q(ae.changes),yt(t.from,t.to)==0&&yt(t.from,de.to)==0?de.to=qn(t):ae.changes.push(lo(e,t));else{var fe=q(M.done);for((!fe||!fe.ranges)&&Li(e.sel,M.done),ae={changes:[lo(e,t)],generation:M.generation},M.done.push(ae);M.done.length>M.undoDepth;)M.done.shift(),M.done[0].ranges||M.done.shift()}M.done.push(A),M.generation=++M.maxGeneration,M.lastModTime=M.lastSelTime=V,M.lastOp=M.lastSelOp=O,M.lastOrigin=M.lastSelOrigin=t.origin,de||Ie(e,"historyAdded")}function gl(e,t,A,O){var M=t.charAt(0);return M=="*"||M=="+"&&A.ranges.length==O.ranges.length&&A.somethingSelected()==O.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,t,A,O){var M=e.history,V=O&&O.origin;A==M.lastSelOp||V&&M.lastSelOrigin==V&&(M.lastModTime==M.lastSelTime&&M.lastOrigin==V||gl(e,V,q(M.done),t))?M.done[M.done.length-1]=t:Li(t,M.done),M.lastSelTime=+new Date,M.lastSelOrigin=V,M.lastSelOp=A,O&&O.clearRedo!==!1&&$o(M.undone)}function Li(e,t){var A=q(t);A&&A.ranges&&A.equals(e)||t.push(e)}function Zo(e,t,A,O){var M=t["spans_"+e.id],V=0;e.iter(Math.max(e.first,A),Math.min(e.first+e.size,O),function(ae){ae.markedSpans&&((M||(M=t["spans_"+e.id]={}))[V]=ae.markedSpans),++V})}function yl(e){if(!e)return null;for(var t,A=0;A<e.length;++A)e[A].marker.explicitlyCleared?t||(t=e.slice(0,A)):t&&t.push(e[A]);return t?t.length?t:null:e}function bl(e,t){var A=t["spans_"+e.id];if(!A)return null;for(var O=[],M=0;M<t.text.length;++M)O.push(yl(A[M]));return O}function Qo(e,t){var A=bl(e,t),O=Dn(e,t);if(!A)return O;if(!O)return A;for(var M=0;M<A.length;++M){var V=A[M],ae=O[M];if(V&&ae){e:for(var de=0;de<ae.length;++de){for(var fe=ae[de],ve=0;ve<V.length;++ve)if(V[ve].marker==fe.marker)continue e;V.push(fe)}}else ae&&(A[M]=ae)}return A}function Ma(e,t,A){for(var O=[],M=0;M<e.length;++M){var V=e[M];if(V.ranges){O.push(A?an.prototype.deepCopy.call(V):V);continue}var ae=V.changes,de=[];O.push({changes:de});for(var fe=0;fe<ae.length;++fe){var ve=ae[fe],_e=void 0;if(de.push({from:ve.from,to:ve.to,text:ve.text}),t)for(var De in ve)(_e=De.match(/^spans_(\d+)$/))&&(ie(t,Number(_e[1]))>-1&&(q(de)[De]=ve[De],delete ve[De]))}}return O}function uo(e,t,A,O){if(O){var M=e.anchor;if(A){var V=yt(t,M)<0;V!=yt(A,M)<0?(M=t,t=A):V!=yt(t,A)<0&&(t=A)}return new Xt(M,t)}else return new Xt(A||t,t)}function ki(e,t,A,O,M){M==null&&(M=e.cm&&(e.cm.display.shift||e.extend)),Pr(e,new an([uo(e.sel.primary(),t,A,M)],0),O)}function qo(e,t,A){for(var O=[],M=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)O[V]=uo(e.sel.ranges[V],t[V],null,M);var ae=Sn(e.cm,O,e.sel.primIndex);Pr(e,ae,A)}function co(e,t,A,O){var M=e.sel.ranges.slice(0);M[t]=A,Pr(e,Sn(e.cm,M,e.sel.primIndex),O)}function es(e,t,A,O){Pr(e,Qn(t,A),O)}function xl(e,t,A){var O={ranges:t.ranges,update:function(M){this.ranges=[];for(var V=0;V<M.length;V++)this.ranges[V]=new Xt(Ct(e,M[V].anchor),Ct(e,M[V].head))},origin:A&&A.origin};return Ie(e,"beforeSelectionChange",e,O),e.cm&&Ie(e.cm,"beforeSelectionChange",e.cm,O),O.ranges!=t.ranges?Sn(e.cm,O.ranges,O.ranges.length-1):t}function ts(e,t,A){var O=e.history.done,M=q(O);M&&M.ranges?(O[O.length-1]=t,Pi(e,t,A)):Pr(e,t,A)}function Pr(e,t,A){Pi(e,t,A),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,A)}function Pi(e,t,A){(Te(e,"beforeSelectionChange")||e.cm&&Te(e.cm,"beforeSelectionChange"))&&(t=xl(e,t,A));var O=A&&A.bias||(yt(t.primary().head,e.sel.primary().head)<0?-1:1);rs(e,as(e,t,O,!0)),!(A&&A.scroll===!1)&&e.cm&&Pa(e.cm)}function rs(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ae(e.cm)),zt(e,"cursorActivity",e)}function ns(e){rs(e,as(e,e.sel,null,!1))}function as(e,t,A,O){for(var M,V=0;V<t.ranges.length;V++){var ae=t.ranges[V],de=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],fe=Ii(e,ae.anchor,de&&de.anchor,A,O),ve=Ii(e,ae.head,de&&de.head,A,O);(M||fe!=ae.anchor||ve!=ae.head)&&(M||(M=t.ranges.slice(0,V)),M[V]=new Xt(fe,ve))}return M?Sn(e.cm,M,t.primIndex):t}function Na(e,t,A,O,M){var V=ct(e,t.line);if(V.markedSpans)for(var ae=0;ae<V.markedSpans.length;++ae){var de=V.markedSpans[ae],fe=de.marker,ve="selectLeft"in fe?!fe.selectLeft:fe.inclusiveLeft,_e="selectRight"in fe?!fe.selectRight:fe.inclusiveRight;if((de.from==null||(ve?de.from<=t.ch:de.from<t.ch))&&(de.to==null||(_e?de.to>=t.ch:de.to>t.ch))){if(M&&(Ie(fe,"beforeCursorEnter"),fe.explicitlyCleared))if(V.markedSpans){--ae;continue}else break;if(!fe.atomic)continue;if(A){var De=fe.find(O<0?1:-1),Ue=void 0;if((O<0?_e:ve)&&(De=is(e,De,-O,De&&De.line==t.line?V:null)),De&&De.line==t.line&&(Ue=yt(De,A))&&(O<0?Ue<0:Ue>0))return Na(e,De,t,O,M)}var Ne=fe.find(O<0?-1:1);return(O<0?ve:_e)&&(Ne=is(e,Ne,O,Ne.line==t.line?V:null)),Ne?Na(e,Ne,t,O,M):null}}return t}function Ii(e,t,A,O,M){var V=O||1,ae=Na(e,t,A,V,M)||!M&&Na(e,t,A,V,!0)||Na(e,t,A,-V,M)||!M&&Na(e,t,A,-V,!0);return ae||(e.cantEdit=!0,$e(e.first,0))}function is(e,t,A,O){return A<0&&t.ch==0?t.line>e.first?Ct(e,$e(t.line-1)):null:A>0&&t.ch==(O||ct(e,t.line)).text.length?t.line<e.first+e.size-1?$e(t.line+1,0):null:new $e(t.line,t.ch+A)}function os(e){e.setSelection($e(e.firstLine(),0),$e(e.lastLine()),be)}function ss(e,t,A){var O={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return O.canceled=!0}};return A&&(O.update=function(M,V,ae,de){M&&(O.from=Ct(e,M)),V&&(O.to=Ct(e,V)),ae&&(O.text=ae),de!==void 0&&(O.origin=de)}),Ie(e,"beforeChange",e,O),e.cm&&Ie(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 Fa(e,t,A){if(e.cm){if(!e.cm.curOp)return _r(e.cm,Fa)(e,t,A);if(e.cm.state.suppressEdits)return}if((Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"))&&(t=ss(e,t,!0),!t))return;var O=An&&!A&&dn(e,t.from,t.to);if(O)for(var M=O.length-1;M>=0;--M)ls(e,{from:O[M].from,to:O[M].to,text:M?[""]:t.text,origin:t.origin});else ls(e,t)}function ls(e,t){if(t.text.length==1&&t.text[0]==""&&yt(t.from,t.to)==0)return;var A=io(e,t);Jo(e,t,A,e.cm?e.cm.curOp.id:NaN),si(e,t,A,Dn(e,t));var O=[];ea(e,function(M,V){!V&&ie(O,M.history)==-1&&(fs(M.history,t),O.push(M.history)),si(M,t,null,Dn(M,t))})}function Mi(e,t,A){var O=e.cm&&e.cm.state.suppressEdits;if(O&&!A)return;for(var M=e.history,V,ae=e.sel,de=t=="undo"?M.done:M.undone,fe=t=="undo"?M.undone:M.done,ve=0;ve<de.length&&!(V=de[ve],A?V.ranges&&!V.equals(e.sel):!V.ranges);ve++);if(ve==de.length)return;for(M.lastOrigin=M.lastSelOrigin=null;;)if(V=de.pop(),V.ranges){if(Li(V,fe),A&&!V.equals(e.sel)){Pr(e,V,{clearRedo:!1});return}ae=V}else if(O){de.push(V);return}else break;var _e=[];Li(ae,fe),fe.push({changes:_e,generation:M.generation}),M.generation=V.generation||++M.maxGeneration;for(var De=Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"),Ue=function(Je){var rt=V.changes[Je];if(rt.origin=t,De&&!ss(e,rt,!1))return de.length=0,{};_e.push(lo(e,rt));var lt=Je?io(e,rt):q(de);si(e,rt,lt,Qo(e,rt)),!Je&&e.cm&&e.cm.scrollIntoView({from:rt.from,to:qn(rt)});var ht=[];ea(e,function(ut,mt){!mt&&ie(ht,ut.history)==-1&&(fs(ut.history,rt),ht.push(ut.history)),si(ut,rt,null,Qo(ut,rt))})},Ne=V.changes.length-1;Ne>=0;--Ne){var Ge=Ue(Ne);if(Ge)return Ge.v}}function us(e,t){if(t==0)return;if(e.first+=t,e.sel=new an(se(e.sel.ranges,function(M){return new Xt($e(M.anchor.line+t,M.anchor.ch),$e(M.head.line+t,M.head.ch))}),e.sel.primIndex),e.cm){Wr(e.cm,e.first,e.first-t,t);for(var A=e.cm.display,O=A.viewFrom;O<A.viewTo;O++)Jn(e.cm,O,"gutter")}}function si(e,t,A,O){if(e.cm&&!e.cm.curOp)return _r(e.cm,si)(e,t,A,O);if(t.to.line<e.first){us(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 M=t.text.length-1-(e.first-t.from.line);us(e,M),t={from:$e(e.first,0),to:$e(t.to.line+M,t.to.ch),text:[q(t.text)],origin:t.origin}}var V=e.lastLine();t.to.line>V&&(t={from:t.from,to:$e(V,ct(e,V).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Rt(e,t.from,t.to),A||(A=io(e,t)),e.cm?El(e.cm,t,O):so(e,t,O),Pi(e,A,be),e.cantEdit&&Ii(e,$e(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,A){var O=e.doc,M=e.display,V=t.from,ae=t.to,de=!1,fe=V.line;e.options.lineWrapping||(fe=Nt(Lr(ct(O,V.line))),O.iter(fe,ae.line+1,function(Ne){if(Ne==M.maxLine)return de=!0,!0})),O.sel.contains(t.from,t.to)>-1&&Ae(e),so(O,t,A,Co(e)),e.options.lineWrapping||(O.iter(fe,V.line+t.text.length,function(Ne){var Ge=la(Ne);Ge>M.maxLineLength&&(M.maxLine=Ne,M.maxLineLength=Ge,M.maxLineChanged=!0,de=!1)}),de&&(e.curOp.updateMaxLine=!0)),aa(O,V.line),ai(e,400);var ve=t.text.length-(ae.line-V.line)-1;t.full?Wr(e):V.line==ae.line&&t.text.length==1&&!Xo(e.doc,t)?Jn(e,V.line,"text"):Wr(e,V.line,ae.line+1,ve);var _e=Te(e,"changes"),De=Te(e,"change");if(De||_e){var Ue={from:V,to:ae,text:t.text,removed:t.removed,origin:t.origin};De&&zt(e,"change",e,Ue),_e&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ue)}e.display.selForContextMenu=null}function ja(e,t,A,O,M){var V;O||(O=A),yt(O,A)<0&&(V=[O,A],A=V[0],O=V[1]),typeof t=="string"&&(t=e.splitLines(t)),Fa(e,{from:A,to:O,text:t,origin:M})}function cs(e,t,A,O){A<e.line?e.line+=O:t<e.line&&(e.line=t,e.ch=0)}function ds(e,t,A,O){for(var M=0;M<e.length;++M){var V=e[M],ae=!0;if(V.ranges){V.copied||(V=e[M]=V.deepCopy(),V.copied=!0);for(var de=0;de<V.ranges.length;de++)cs(V.ranges[de].anchor,t,A,O),cs(V.ranges[de].head,t,A,O);continue}for(var fe=0;fe<V.changes.length;++fe){var ve=V.changes[fe];if(A<ve.from.line)ve.from=$e(ve.from.line+O,ve.from.ch),ve.to=$e(ve.to.line+O,ve.to.ch);else if(t<=ve.to.line){ae=!1;break}}ae||(e.splice(0,M+1),M=0)}}function fs(e,t){var A=t.from.line,O=t.to.line,M=t.text.length-(O-A)-1;ds(e.done,A,O,M),ds(e.undone,A,O,M)}function li(e,t,A,O){var M=t,V=t;return typeof t=="number"?V=ct(e,on(e,t)):M=Nt(t),M==null?null:(O(V,M)&&e.cm&&Jn(e.cm,M,A),V)}function ui(e){this.lines=e,this.parent=null;for(var t=0,A=0;A<e.length;++A)e[A].parent=this,t+=e[A].height;this.height=t}ui.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var A=e,O=e+t;A<O;++A){var M=this.lines[A];this.height-=M.height,vt(M),zt(M,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,A){this.height+=A,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,A){for(var O=e+t;e<O;++e)if(A(this.lines[e]))return!0}};function ci(e){this.children=e;for(var t=0,A=0,O=0;O<e.length;++O){var M=e[O];t+=M.chunkSize(),A+=M.height,M.parent=this}this.size=t,this.height=A,this.parent=null}ci.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var A=0;A<this.children.length;++A){var O=this.children[A],M=O.chunkSize();if(e<M){var V=Math.min(t,M-e),ae=O.height;if(O.removeInner(e,V),this.height-=ae-O.height,M==V&&(this.children.splice(A--,1),O.parent=null),(t-=V)==0)break;e=0}else e-=M}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ui))){var de=[];this.collapse(de),this.children=[new ui(de)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,A){this.size+=t.length,this.height+=A;for(var O=0;O<this.children.length;++O){var M=this.children[O],V=M.chunkSize();if(e<=V){if(M.insertInner(e,t,A),M.lines&&M.lines.length>50){for(var ae=M.lines.length%25+25,de=ae;de<M.lines.length;){var fe=new ui(M.lines.slice(de,de+=25));M.height-=fe.height,this.children.splice(++O,0,fe),fe.parent=this}M.lines=M.lines.slice(0,ae),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),A=new ci(t);if(e.parent){e.size-=A.size,e.height-=A.height;var M=ie(e.parent.children,e);e.parent.children.splice(M+1,0,A)}else{var O=new ci(e.children);O.parent=e,e.children=[O,A],e=O}A.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,A){for(var O=0;O<this.children.length;++O){var M=this.children[O],V=M.chunkSize();if(e<V){var ae=Math.min(t,V-e);if(M.iterN(e,ae,A))return!0;if((t-=ae)==0)break;e=0}else e-=V}}};var di=function(e,t,A){if(A)for(var O in A)A.hasOwnProperty(O)&&(this[O]=A[O]);this.doc=e,this.node=t};di.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,A=this.line,O=Nt(A);if(O==null||!t)return;for(var M=0;M<t.length;++M)t[M]==this&&t.splice(M--,1);t.length||(A.widgets=null);var V=It(this);Yt(A,Math.max(0,A.height-V)),e&&(Yr(e,function(){hs(e,A,-V),Jn(e,O,"widget")}),zt(e,"lineWidgetCleared",e,this,O))},di.prototype.changed=function(){var e=this,t=this.height,A=this.doc.cm,O=this.line;this.height=null;var M=It(this)-t;if(!M)return;hn(this.doc,O)||Yt(O,O.height+M),A&&Yr(A,function(){A.curOp.forceUpdate=!0,hs(A,O,M),zt(A,"lineWidgetChanged",A,e,Nt(O))})},Ce(di);function hs(e,t,A){Qr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&qi(e,A)}function wl(e,t,A,O){var M=new di(e,A,O),V=e.cm;return V&&M.noHScroll&&(V.display.alignWidgets=!0),li(e,t,"widget",function(ae){var de=ae.widgets||(ae.widgets=[]);if(M.insertAt==null?de.push(M):de.splice(Math.min(de.length-1,Math.max(0,M.insertAt)),0,M),M.line=ae,V&&!hn(e,ae)){var fe=Qr(ae)<e.scrollTop;Yt(ae,ae.height+It(M)),fe&&qi(V,M.height),V.curOp.forceUpdate=!0}return!0}),V&&zt(V,"lineWidgetAdded",V,M,typeof t=="number"?t:Nt(t)),M}var ps=0,ta=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ps};ta.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&ya(e),Te(this,"clear")){var A=this.find();A&&zt(this,"clear",A.from,A.to)}for(var O=null,M=null,V=0;V<this.lines.length;++V){var ae=this.lines[V],de=tr(ae.markedSpans,this);e&&!this.collapsed?Jn(e,Nt(ae),"text"):e&&(de.to!=null&&(M=Nt(ae)),de.from!=null&&(O=Nt(ae))),ae.markedSpans=Kt(ae.markedSpans,de),de.from==null&&this.collapsed&&!hn(this.doc,ae)&&e&&Yt(ae,Ra(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var fe=0;fe<this.lines.length;++fe){var ve=Lr(this.lines[fe]),_e=la(ve);_e>e.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=_e,e.display.maxLineChanged=!0)}O!=null&&e&&this.collapsed&&Wr(e,O,M+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ns(e.doc)),e&&zt(e,"markerCleared",e,this,O,M),t&&ba(e),this.parent&&this.parent.clear()},ta.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var A,O,M=0;M<this.lines.length;++M){var V=this.lines[M],ae=tr(V.markedSpans,this);if(ae.from!=null&&(A=$e(t?V:Nt(V),ae.from),e==-1))return A;if(ae.to!=null&&(O=$e(t?V:Nt(V),ae.to),e==1))return O}return A&&{from:A,to:O}},ta.prototype.changed=function(){var e=this,t=this.find(-1,!0),A=this,O=this.doc.cm;if(!t||!O)return;Yr(O,function(){var M=t.line,V=Nt(t.line),ae=Ca(O,V);if(ae&&(Oa(ae),O.curOp.selectionChanged=O.curOp.forceUpdate=!0),O.curOp.updateMaxLine=!0,!hn(A.doc,M)&&A.height!=null){var de=A.height;A.height=null;var fe=It(A)-de;fe&&Yt(M,M.height+fe)}zt(O,"markerChanged",O,e)})},ta.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ie(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ta.prototype.detachLine=function(e){if(this.lines.splice(ie(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ce(ta);function Ua(e,t,A,O,M){if(O&&O.shared)return Tl(e,t,A,O,M);if(e.cm&&!e.cm.curOp)return _r(e.cm,Ua)(e,t,A,O,M);var V=new ta(e,M),ae=yt(t,A);if(O&&U(O,V,!1),ae>0||ae==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=F("span",[V.replacedWith],"CodeMirror-widget"),O.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),O.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(Ta(e,t.line,t,A,V)||t.line!=A.line&&Ta(e,A.line,t,A,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");ia()}V.addToHistory&&Jo(e,{from:t,to:A,origin:"markText"},e.sel,NaN);var de=t.line,fe=e.cm,ve;if(e.iter(de,A.line+1,function(De){fe&&V.collapsed&&!fe.options.lineWrapping&&Lr(De)==fe.display.maxLine&&(ve=!0),V.collapsed&&de!=t.line&&Yt(De,0),cr(De,new cn(V,de==t.line?t.ch:null,de==A.line?A.ch:null)),++de}),V.collapsed&&e.iter(t.line,A.line+1,function(De){hn(e,De)&&Yt(De,0)}),V.clearOnEnter&&Se(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(un(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++ps,V.atomic=!0),fe){if(ve&&(fe.curOp.updateMaxLine=!0),V.collapsed)Wr(fe,t.line,A.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var _e=t.line;_e<=A.line;_e++)Jn(fe,_e,"text");V.atomic&&ns(fe.doc),zt(fe,"markerAdded",fe,V)}return V}var fi=function(e,t){this.markers=e,this.primary=t;for(var A=0;A<e.length;++A)e[A].parent=this};fi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();zt(this,"clear")},fi.prototype.find=function(e,t){return this.primary.find(e,t)},Ce(fi);function Tl(e,t,A,O,M){O=U(O),O.shared=!1;var V=[Ua(e,t,A,O,M)],ae=V[0],de=O.widgetNode;return ea(e,function(fe){de&&(O.widgetNode=de.cloneNode(!0)),V.push(Ua(fe,Ct(fe,t),Ct(fe,A),O,M));for(var ve=0;ve<fe.linked.length;++ve)if(fe.linked[ve].isParent)return;ae=q(V)}),new fi(V,ae)}function ms(e){return e.findMarks($e(e.first,0),e.clipPos($e(e.lastLine())),function(t){return t.parent})}function _l(e,t){for(var A=0;A<t.length;A++){var O=t[A],M=O.find(),V=e.clipPos(M.from),ae=e.clipPos(M.to);if(yt(V,ae)){var de=Ua(e,V,ae,O.primary,O.primary.type);O.markers.push(de),de.parent=O}}}function Sl(e){for(var t=function(O){var M=e[O],V=[M.primary.doc];ea(M.primary.doc,function(fe){return V.push(fe)});for(var ae=0;ae<M.markers.length;ae++){var de=M.markers[ae];ie(V,de.doc)==-1&&(de.parent=null,M.markers.splice(ae--,1))}},A=0;A<e.length;A++)t(A)}var Cl=0,Hr=function(e,t,A,O,M){if(!(this instanceof Hr))return new Hr(e,t,A,O,M);A==null&&(A=0),ci.call(this,[new ui([new Fn("",null)])]),this.first=A,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=A;var V=$e(A,0);this.sel=Qn(V),this.history=new Ri(null),this.id=++Cl,this.modeOption=t,this.lineSep=O,this.direction=M=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),so(this,{from:V,to:V,text:e}),Pr(this,Qn(V),be)};Hr.prototype=ge(ci.prototype,{constructor:Hr,iter:function(e,t,A){A?this.iterN(e-this.first,t-e,A):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var A=0,O=0;O<t.length;++O)A+=t[O].height;this.insertInner(e-this.first,t,A)},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:Sr(function(e){var t=$e(this.first,0),A=this.first+this.size-1;Fa(this,{from:t,to:$e(A,ct(this,A).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ei(this.cm,0,0),Pr(this,Qn(t),be)}),replaceRange:function(e,t,A,O){t=Ct(this,t),A=A?Ct(this,A):t,ja(this,e,t,A,O)},getRange:function(e,t,A){var O=Rt(this,Ct(this,e),Ct(this,t));return A===!1?O:O.join(A||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Mt(this,e))return ct(this,e)},getLineNumber:function(e){return Nt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ct(this,e)),Lr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ct(this,e)},getCursor:function(e){var t=this.sel.primary(),A;return e==null||e=="head"?A=t.head:e=="anchor"?A=t.anchor:e=="end"||e=="to"||e===!1?A=t.to():A=t.from(),A},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Sr(function(e,t,A){es(this,Ct(this,typeof e=="number"?$e(e,t||0):e),null,A)}),setSelection:Sr(function(e,t,A){es(this,Ct(this,e),Ct(this,t||e),A)}),extendSelection:Sr(function(e,t,A){ki(this,Ct(this,e),t&&Ct(this,t),A)}),extendSelections:Sr(function(e,t){qo(this,Ve(this,e),t)}),extendSelectionsBy:Sr(function(e,t){var A=se(this.sel.ranges,e);qo(this,Ve(this,A),t)}),setSelections:Sr(function(e,t,A){if(!e.length)return;for(var O=[],M=0;M<e.length;M++)O[M]=new Xt(Ct(this,e[M].anchor),Ct(this,e[M].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Pr(this,Sn(this.cm,O,t),A)}),addSelection:Sr(function(e,t,A){var O=this.sel.ranges.slice(0);O.push(new Xt(Ct(this,e),Ct(this,t||e))),Pr(this,Sn(this.cm,O,O.length-1),A)}),getSelection:function(e){for(var t=this.sel.ranges,A,O=0;O<t.length;O++){var M=Rt(this,t[O].from(),t[O].to());A=A?A.concat(M):M}return e===!1?A:A.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],A=this.sel.ranges,O=0;O<A.length;O++){var M=Rt(this,A[O].from(),A[O].to());e!==!1&&(M=M.join(e||this.lineSeparator())),t[O]=M}return t},replaceSelection:function(e,t,A){for(var O=[],M=0;M<this.sel.ranges.length;M++)O[M]=e;this.replaceSelections(O,t,A||"+input")},replaceSelections:Sr(function(e,t,A){for(var O=[],M=this.sel,V=0;V<M.ranges.length;V++){var ae=M.ranges[V];O[V]={from:ae.from(),to:ae.to(),text:this.splitLines(e[V]),origin:A}}for(var de=t&&t!="end"&&hl(this,O,t),fe=O.length-1;fe>=0;fe--)Fa(this,O[fe]);de?ts(this,de):this.cm&&Pa(this.cm)}),undo:Sr(function(){Mi(this,"undo")}),redo:Sr(function(){Mi(this,"redo")}),undoSelection:Sr(function(){Mi(this,"undo",!0)}),redoSelection:Sr(function(){Mi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,A=0,O=0;O<e.done.length;O++)e.done[O].ranges||++t;for(var M=0;M<e.undone.length;M++)e.undone[M].ranges||++A;return{undo:t,redo:A}},clearHistory:function(){var e=this;this.history=new Ri(this.history.maxGeneration),ea(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:Ma(this.history.done),undone:Ma(this.history.undone)}},setHistory:function(e){var t=this.history=new Ri(this.history.maxGeneration);t.done=Ma(e.done.slice(0),null,!0),t.undone=Ma(e.undone.slice(0),null,!0)},setGutterMarker:Sr(function(e,t,A){return li(this,e,"gutter",function(O){var M=O.gutterMarkers||(O.gutterMarkers={});return M[t]=A,!A&&$(M)&&(O.gutterMarkers=null),!0})}),clearGutter:Sr(function(e){var t=this;this.iter(function(A){A.gutterMarkers&&A.gutterMarkers[e]&&li(t,A,"gutter",function(){return A.gutterMarkers[e]=null,$(A.gutterMarkers)&&(A.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Mt(this,e))return null;if(t=e,e=ct(this,e),!e)return null}else if(t=Nt(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:Sr(function(e,t,A){return li(this,e,t=="gutter"?"gutter":"class",function(O){var M=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!O[M])O[M]=A;else{if(D(A).test(O[M]))return!1;O[M]+=" "+A}return!0})}),removeLineClass:Sr(function(e,t,A){return li(this,e,t=="gutter"?"gutter":"class",function(O){var M=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",V=O[M];if(V)if(A==null)O[M]=null;else{var ae=V.match(D(A));if(!ae)return!1;var de=ae.index+ae[0].length;O[M]=V.slice(0,ae.index)+(!ae.index||de==V.length?"":" ")+V.slice(de)||null}else return!1;return!0})}),addLineWidget:Sr(function(e,t,A){return wl(this,e,t,A)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,A){return Ua(this,Ct(this,e),Ct(this,t),A,A&&A.type||"range")},setBookmark:function(e,t){var A={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Ct(this,e),Ua(this,e,e,A,"bookmark")},findMarksAt:function(e){e=Ct(this,e);var t=[],A=ct(this,e.line).markedSpans;if(A)for(var O=0;O<A.length;++O){var M=A[O];(M.from==null||M.from<=e.ch)&&(M.to==null||M.to>=e.ch)&&t.push(M.marker.parent||M.marker)}return t},findMarks:function(e,t,A){e=Ct(this,e),t=Ct(this,t);var O=[],M=e.line;return this.iter(e.line,t.line+1,function(V){var ae=V.markedSpans;if(ae)for(var de=0;de<ae.length;de++){var fe=ae[de];!(fe.to!=null&&M==e.line&&e.ch>=fe.to||fe.from==null&&M!=e.line||fe.from!=null&&M==t.line&&fe.from>=t.ch)&&(!A||A(fe.marker))&&O.push(fe.marker.parent||fe.marker)}++M}),O},getAllMarks:function(){var e=[];return this.iter(function(t){var A=t.markedSpans;if(A)for(var O=0;O<A.length;++O)A[O].from!=null&&e.push(A[O].marker)}),e},posFromIndex:function(e){var t,A=this.first,O=this.lineSeparator().length;return this.iter(function(M){var V=M.text.length+O;if(V>e)return t=e,!0;e-=V,++A}),Ct(this,$e(A,t))},indexFromPos:function(e){e=Ct(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var A=this.lineSeparator().length;return this.iter(this.first,e.line,function(O){t+=O.text.length+A}),t},copy:function(e){var t=new Hr(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,A=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<A&&(A=e.to);var O=new Hr(rr(this,t,A),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}],_l(O,ms(this)),O},unlinkDoc:function(e){if(e instanceof nr&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var A=this.linked[t];if(A.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Sl(ms(this));break}if(e.history==this.history){var O=[e.id];ea(e,function(M){return O.push(M.id)},!0),e.history=new Ri(null),e.history.done=Ma(this.history.done,O),e.history.undone=Ma(this.history.undone,O)}},iterLinkedDocs:function(e){ea(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):dt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Sr(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)})}),Hr.prototype.eachLine=Hr.prototype.iter;var gs=0;function Ol(e){var t=this;if(vs(t),He(t,e)||Jt(t.display,e))return;ye(e),_&&(gs=+new Date);var A=pa(t,e,!0),O=e.dataTransfer.files;if(!A||t.isReadOnly())return;if(O&&O.length&&window.FileReader&&window.File)for(var M=O.length,V=Array(M),ae=0,de=function(){++ae==M&&_r(t,function(){A=Ct(t.doc,A);var Ne={from:A,to:A,text:t.doc.splitLines(V.filter(function(Ge){return Ge!=null}).join(t.doc.lineSeparator())),origin:"paste"};Fa(t.doc,Ne),ts(t.doc,Qn(Ct(t.doc,A),Ct(t.doc,qn(Ne))))})()},fe=function(Ne,Ge){if(t.options.allowDropFileTypes&&ie(t.options.allowDropFileTypes,Ne.type)==-1){de();return}var Je=new FileReader;Je.onerror=function(){return de()},Je.onload=function(){var rt=Je.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(rt)){de();return}V[Ge]=rt,de()},Je.readAsText(Ne)},ve=0;ve<O.length;ve++)fe(O[ve],ve);else{if(t.state.draggingText&&t.doc.sel.contains(A)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var _e=e.dataTransfer.getData("Text");if(_e){var De;if(t.state.draggingText&&!t.state.draggingText.copy&&(De=t.listSelections()),Pi(t.doc,Qn(A,A)),De)for(var Ue=0;Ue<De.length;++Ue)ja(t.doc,"",De[Ue].anchor,De[Ue].head,"drag");t.replaceSelection(_e,"around","paste"),t.display.input.focus()}}catch(Ne){}}}function Al(e,t){if(_&&(!e.state.draggingText||+new Date-gs<100)){Oe(t);return}if(He(e,t)||Jt(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p){var A=C("img",null,null,"position: fixed; left: 0; top: 0;");A.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(A.width=A.height=1,e.display.wrapper.appendChild(A),A._top=A.offsetTop),t.dataTransfer.setDragImage(A,0,0),h&&A.parentNode.removeChild(A)}}function Dl(e,t){var A=pa(e,t);if(!A)return;var O=document.createDocumentFragment();Do(e,A,O),e.display.dragCursor||(e.display.dragCursor=C("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,O)}function vs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ys(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),A=[],O=0;O<t.length;O++){var M=t[O].CodeMirror;M&&A.push(M)}A.length&&A[0].operation(function(){for(var V=0;V<A.length;V++)e(A[V])})}var bs=!1;function Rl(){if(bs)return;Ll(),bs=!0}function Ll(){var e;Se(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ys(kl)},100))}),Se(window,"blur",function(){return ys(ka)})}function kl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var ra={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"},hi=0;hi<10;hi++)ra[hi+48]=ra[hi+96]=String(hi);for(var Ni=65;Ni<=90;Ni++)ra[Ni]=String.fromCharCode(Ni);for(var pi=1;pi<=12;pi++)ra[pi+111]=ra[pi+63235]="F"+pi;var Wn={};Wn.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"},Wn.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"},Wn.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"},Wn.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"]},Wn.default=s?Wn.macDefault:Wn.pcDefault;function Pl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var A,O,M,V,ae=0;ae<t.length-1;ae++){var de=t[ae];if(/^(cmd|meta|m)$/i.test(de))V=!0;else if(/^a(lt)?$/i.test(de))A=!0;else if(/^(c|ctrl|control)$/i.test(de))O=!0;else if(/^s(hift)?$/i.test(de))M=!0;else throw new Error("Unrecognized modifier name: "+de)}return A&&(e="Alt-"+e),O&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),M&&(e="Shift-"+e),e}function Il(e){var t={};for(var A in e)if(e.hasOwnProperty(A)){var O=e[A];if(/^(name|fallthrough|(de|at)tach)$/.test(A))continue;if(O=="..."){delete e[A];continue}for(var M=se(A.split(" "),Pl),V=0;V<M.length;V++){var ae=void 0,de=void 0;V==M.length-1?(de=M.join(" "),ae=O):(de=M.slice(0,V+1).join(" "),ae="...");var fe=t[de];if(!fe)t[de]=ae;else if(fe!=ae)throw new Error("Inconsistent bindings for "+de)}delete e[A]}for(var ve in t)e[ve]=t[ve];return e}function Ba(e,t,A,O){t=Fi(t);var M=t.call?t.call(e,O):t[e];if(M===!1)return"nothing";if(M==="...")return"multi";if(M!=null&&A(M))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ba(e,t.fallthrough,A,O);for(var V=0;V<t.fallthrough.length;V++){var ae=Ba(e,t.fallthrough[V],A,O);if(ae)return ae}}}function xs(e){var t=typeof e=="string"?e:ra[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Es(e,t,A){var O=e;return t.altKey&&O!="Alt"&&(e="Alt-"+e),(a?t.metaKey:t.ctrlKey)&&O!="Ctrl"&&(e="Ctrl-"+e),(a?t.ctrlKey:t.metaKey)&&O!="Mod"&&(e="Cmd-"+e),!A&&t.shiftKey&&O!="Shift"&&(e="Shift-"+e),e}function ws(e,t){if(h&&e.keyCode==34&&e.char)return!1;var A=ra[e.keyCode];return A==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(A=e.code),Es(A,e,t))}function Fi(e){return typeof e=="string"?Wn[e]:e}function Wa(e,t){for(var A=e.doc.sel.ranges,O=[],M=0;M<A.length;M++){for(var V=t(A[M]);O.length&&yt(V.from,q(O).to)<=0;){var ae=O.pop();if(yt(ae.from,V.from)<0){V.from=ae.from;break}}O.push(V)}Yr(e,function(){for(var de=O.length-1;de>=0;de--)ja(e.doc,"",O[de].from,O[de].to,"+delete");Pa(e)})}function fo(e,t,A){var O=xe(e.text,t+A,A);return O<0||O>e.text.length?null:O}function ho(e,t,A){var O=fo(e,t.ch,A);return O==null?null:new $e(t.line,O,A<0?"after":"before")}function po(e,t,A,O,M){if(e){t.doc.direction=="rtl"&&(M=-M);var V=Fe(A,t.doc.direction);if(V){var ae=M<0?q(V):V[0],de=M<0==(ae.level==1),fe=de?"after":"before",ve;if(ae.level>0||t.doc.direction=="rtl"){var _e=tn(t,A);ve=M<0?A.text.length-1:0;var De=Vr(t,_e,ve).top;ve=Re(function(Ue){return Vr(t,_e,Ue).top==De},M<0==(ae.level==1)?ae.from:ae.to-1,ve),fe=="before"&&(ve=fo(A,ve,1))}else ve=M<0?ae.to:ae.from;return new $e(O,ve,fe)}}return new $e(O,M<0?A.text.length:0,M<0?"before":"after")}function Ml(e,t,A,O){var M=Fe(t,e.doc.direction);if(!M)return ho(t,A,O);A.ch>=t.text.length?(A.ch=t.text.length,A.sticky="before"):A.ch<=0&&(A.ch=0,A.sticky="after");var V=Pe(M,A.ch,A.sticky),ae=M[V];if(e.doc.direction=="ltr"&&ae.level%2==0&&(O>0?ae.to>A.ch:ae.from<A.ch))return ho(t,A,O);var de=function(lt,ht){return fo(t,lt instanceof $e?lt.ch:lt,ht)},fe,ve=function(lt){return e.options.lineWrapping?(fe=fe||tn(e,t),So(e,t,fe,lt)):{begin:0,end:t.text.length}},_e=ve(A.sticky=="before"?de(A,-1):A.ch);if(e.doc.direction=="rtl"||ae.level==1){var De=ae.level==1==O<0,Ue=de(A,De?1:-1);if(Ue!=null&&(De?Ue<=ae.to&&Ue<=_e.end:Ue>=ae.from&&Ue>=_e.begin)){var Ne=De?"before":"after";return new $e(A.line,Ue,Ne)}}var Ge=function(lt,ht,ut){for(var mt=function(qt,Cr){return Cr?new $e(A.line,de(qt,1),"before"):new $e(A.line,qt,"after")};lt>=0&&lt<M.length;lt+=ht){var Ot=M[lt],Tt=ht>0==(Ot.level!=1),Ut=Tt?ut.begin:de(ut.end,-1);if(Ot.from<=Ut&&Ut<Ot.to)return mt(Ut,Tt);if(Ut=Tt?Ot.from:de(Ot.to,-1),ut.begin<=Ut&&Ut<ut.end)return mt(Ut,Tt)}},Je=Ge(V+O,O,_e);if(Je)return Je;var rt=O>0?_e.end:de(_e.begin,-1);return rt!=null&&!(O>0&&rt==t.text.length)&&(Je=Ge(O>0?0:M.length-1,O,ve(rt)),Je)?Je:null}var mi={selectAll:os,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),be)},killLine:function(e){return Wa(e,function(t){if(t.empty()){var A=ct(e.doc,t.head.line).text.length;return t.head.ch==A&&t.head.line<e.lastLine()?{from:t.head,to:$e(t.head.line+1,0)}:{from:t.head,to:$e(t.head.line,A)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Wa(e,function(t){return{from:$e(t.from().line,0),to:Ct(e.doc,$e(t.to().line+1,0))}})},delLineLeft:function(e){return Wa(e,function(t){return{from:$e(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Wa(e,function(t){var A=e.charCoords(t.head,"div").top+5,O=e.coordsChar({left:0,top:A},"div");return{from:O,to:t.from()}})},delWrappedLineRight:function(e){return Wa(e,function(t){var A=e.charCoords(t.head,"div").top+5,O=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:A},"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($e(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection($e(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Ts(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return _s(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 A=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:A},"div")},le)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var A=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:A},"div")},le)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var A=e.cursorCoords(t.head,"div").top+5,O=e.coordsChar({left:0,top:A},"div");return O.ch<e.getLine(O.line).search(/\S/)?_s(e,t.head):O},le)},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=[],A=e.listSelections(),O=e.options.tabSize,M=0;M<A.length;M++){var V=A[M].from(),ae=W(e.getLine(V.line),V.ch,O);t.push(oe(O-ae%O))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Yr(e,function(){for(var t=e.listSelections(),A=[],O=0;O<t.length;O++){if(!t[O].empty())continue;var M=t[O].head,V=ct(e.doc,M.line).text;if(V){if(M.ch==V.length&&(M=new $e(M.line,M.ch-1)),M.ch>0)M=new $e(M.line,M.ch+1),e.replaceRange(V.charAt(M.ch-1)+V.charAt(M.ch-2),$e(M.line,M.ch-2),M,"+transpose");else if(M.line>e.doc.first){var ae=ct(e.doc,M.line-1).text;ae&&(M=new $e(M.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+ae.charAt(ae.length-1),$e(M.line-1,ae.length-1),M,"+transpose"))}}A.push(new Xt(M,M))}e.setSelections(A)})},newlineAndIndent:function(e){return Yr(e,function(){for(var t=e.listSelections(),A=t.length-1;A>=0;A--)e.replaceRange(e.doc.lineSeparator(),t[A].anchor,t[A].head,"+input");t=e.listSelections();for(var O=0;O<t.length;O++)e.indentLine(t[O].from().line,null,!0);Pa(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Ts(e,t){var A=ct(e.doc,t),O=Lr(A);return O!=A&&(t=Nt(O)),po(!0,e,O,t,1)}function Nl(e,t){var A=ct(e.doc,t),O=Gn(A);return O!=A&&(t=Nt(O)),po(!0,e,A,t,-1)}function _s(e,t){var A=Ts(e,t.line),O=ct(e.doc,A.line),M=Fe(O,e.doc.direction);if(!M||M[0].level==0){var V=Math.max(A.ch,O.text.search(/\S/)),ae=t.line==A.line&&t.ch<=V&&t.ch;return $e(A.line,ae?0:V,A.sticky)}return A}function ji(e,t,A){if(typeof t=="string"&&(t=mi[t],!t))return!1;e.display.input.ensurePolled();var O=e.display.shift,M=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),A&&(e.display.shift=!1),M=t(e)!=he}finally{e.display.shift=O,e.state.suppressEdits=!1}return M}function Fl(e,t,A){for(var O=0;O<e.state.keyMaps.length;O++){var M=Ba(t,e.state.keyMaps[O],A,e);if(M)return M}return e.options.extraKeys&&Ba(t,e.options.extraKeys,A,e)||Ba(t,e.options.keyMap,A,e)}var jl=new Q;function gi(e,t,A,O){var M=e.state.keySeq;if(M){if(xs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==M&&(e.state.keySeq=null,e.display.input.reset())}),Ss(e,M+" "+t,A,O))return!0}return Ss(e,t,A,O)}function Ss(e,t,A,O){var M=Fl(e,t,O);return M=="multi"&&(e.state.keySeq=t),M=="handled"&&zt(e,"keyHandled",e,t,A),(M=="handled"||M=="multi")&&(ye(A),Ji(e)),!!M}function Cs(e,t){var A=ws(t,!0);return A?t.shiftKey&&!e.state.keySeq?gi(e,"Shift-"+A,t,function(O){return ji(e,O,!0)})||gi(e,A,t,function(O){if(typeof O=="string"?/^go[A-Z]/.test(O):O.motion)return ji(e,O)}):gi(e,A,t,function(O){return ji(e,O)}):!1}function Ul(e,t,A){return gi(e,"'"+A+"'",t,function(O){return ji(e,O,!0)})}var mo=null;function Os(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=X(),He(t,e))return;_&&d<11&&e.keyCode==27&&(e.returnValue=!1);var A=e.keyCode;t.display.shift=A==16||e.shiftKey;var O=Cs(t,e);h&&(mo=O?A:null,!O&&A==88&&!Lt&&(s?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),T&&!s&&!O&&A==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),A==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bl(t)}function Bl(e){var t=e.display.lineDiv;G(t,"CodeMirror-crosshair");function A(O){(O.keyCode==18||!O.altKey)&&(c(t,"CodeMirror-crosshair"),Ye(document,"keyup",A),Ye(document,"mouseover",A))}Se(document,"keyup",A),Se(document,"mouseover",A)}function As(e){e.keyCode==16&&(this.doc.sel.shift=!1),He(this,e)}function Ds(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Jt(t.display,e)||He(t,e)||e.ctrlKey&&!e.altKey||s&&e.metaKey)return;var A=e.keyCode,O=e.charCode;if(h&&A==mo){mo=null,ye(e);return}if(h&&(!e.which||e.which<10)&&Cs(t,e))return;var M=String.fromCharCode(O==null?A:O);if(M=="\b")return;if(Ul(t,e,M))return;t.display.input.onKeyPress(e)}var Wl=400,go=function(e,t,A){this.time=e,this.pos=t,this.button=A};go.prototype.compare=function(e,t,A){return this.time+Wl>e&&yt(t,this.pos)==0&&A==this.button};var vi,yi;function Hl(e,t){var A=+new Date;return yi&&yi.compare(A,e,t)?(vi=yi=null,"triple"):vi&&vi.compare(A,e,t)?(yi=new go(A,e,t),vi=null,"double"):(vi=new go(A,e,t),yi=null,"single")}function Rs(e){var t=this,A=t.display;if(He(t,e)||A.activeTouch&&A.input.supportsTouch())return;if(A.input.ensurePolled(),A.shift=e.shiftKey,Jt(A,e)){o||(A.scroller.draggable=!1,setTimeout(function(){return A.scroller.draggable=!0},100));return}if(vo(t,e))return;var O=pa(t,e),M=Be(e),V=O?Hl(O,M):"single";if(window.focus(),M==1&&t.state.selectingText&&t.state.selectingText(e),O&&Kl(t,M,O,V,e))return;M==1?O?zl(t,O,V,e):Le(e)==A.scroller&&ye(e):M==2?(O&&ki(t.doc,O),setTimeout(function(){return A.input.focus()},20)):M==3&&(R?t.display.input.onContextMenu(e):Lo(t))}function Kl(e,t,A,O,M){var V="Click";return O=="double"?V="Double"+V:O=="triple"&&(V="Triple"+V),V=(t==1?"Left":t==2?"Middle":"Right")+V,gi(e,Es(V,M),M,function(ae){if(typeof ae=="string"&&(ae=mi[ae]),!ae)return!1;var de=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),de=ae(e,A)!=he}finally{e.state.suppressEdits=!1}return de})}function Gl(e,t,A){var O=e.getOption("configureMouse"),M=O?O(e,t,A):{};if(M.unit==null){var V=u?A.shiftKey&&A.metaKey:A.altKey;M.unit=V?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(M.extend==null||e.doc.extend)&&(M.extend=e.doc.extend||A.shiftKey),M.addNew==null&&(M.addNew=s?A.metaKey:A.ctrlKey),M.moveOnDrag==null&&(M.moveOnDrag=!(s?A.altKey:A.ctrlKey)),M}function zl(e,t,A,O){_?setTimeout(B(Ro,e),0):e.curOp.focus=X();var M=Gl(e,A,O),V=e.doc.sel,ae;e.options.dragDrop&&ze&&!e.isReadOnly()&&A=="single"&&(ae=V.contains(t))>-1&&(yt((ae=V.ranges[ae]).from(),t)<0||t.xRel>0)&&(yt(ae.to(),t)>0||t.xRel<0)?Xl(e,O,t,M):Vl(e,O,t,M)}function Xl(e,t,A,O){var M=e.display,V=!1,ae=_r(e,function(ve){o&&(M.scroller.draggable=!1),e.state.draggingText=!1,Ye(M.wrapper.ownerDocument,"mouseup",ae),Ye(M.wrapper.ownerDocument,"mousemove",de),Ye(M.scroller,"dragstart",fe),Ye(M.scroller,"drop",ae),V||(ye(ve),O.addNew||ki(e.doc,A,null,null,O.extend),o&&!p||_&&d==9?setTimeout(function(){M.wrapper.ownerDocument.body.focus({preventScroll:!0}),M.input.focus()},20):M.input.focus())}),de=function(ve){V=V||Math.abs(t.clientX-ve.clientX)+Math.abs(t.clientY-ve.clientY)>=10},fe=function(){return V=!0};o&&(M.scroller.draggable=!0),e.state.draggingText=ae,ae.copy=!O.moveOnDrag,M.scroller.dragDrop&&M.scroller.dragDrop(),Se(M.wrapper.ownerDocument,"mouseup",ae),Se(M.wrapper.ownerDocument,"mousemove",de),Se(M.scroller,"dragstart",fe),Se(M.scroller,"drop",ae),Lo(e),setTimeout(function(){return M.input.focus()},20)}function Ls(e,t,A){if(A=="char")return new Xt(t,t);if(A=="word")return e.findWordAt(t);if(A=="line")return new Xt($e(t.line,0),Ct(e.doc,$e(t.line+1,0)));var O=A(e,t);return new Xt(O.from,O.to)}function Vl(e,t,A,O){var M=e.display,V=e.doc;ye(t);var ae,de,fe=V.sel,ve=fe.ranges;if(O.addNew&&!O.extend?(de=V.sel.contains(A),de>-1?ae=ve[de]:ae=new Xt(A,A)):(ae=V.sel.primary(),de=V.sel.primIndex),O.unit=="rectangle")O.addNew||(ae=new Xt(A,A)),A=pa(e,t,!0,!0),de=-1;else{var _e=Ls(e,A,O.unit);O.extend?ae=uo(ae,_e.anchor,_e.head,O.extend):ae=_e}O.addNew?de==-1?(de=ve.length,Pr(V,Sn(e,ve.concat([ae]),de),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[de].empty()&&O.unit=="char"&&!O.extend?(Pr(V,Sn(e,ve.slice(0,de).concat(ve.slice(de+1)),0),{scroll:!1,origin:"*mouse"}),fe=V.sel):co(V,de,ae,ne):(de=0,Pr(V,new an([ae],0),ne),fe=V.sel);var De=A;function Ue(ut){if(yt(De,ut)==0)return;if(De=ut,O.unit=="rectangle"){for(var mt=[],Ot=e.options.tabSize,Tt=W(ct(V,A.line).text,A.ch,Ot),Ut=W(ct(V,ut.line).text,ut.ch,Ot),qt=Math.min(Tt,Ut),Cr=Math.max(Tt,Ut),or=Math.min(A.line,ut.line),$r=Math.min(e.lastLine(),Math.max(A.line,ut.line));or<=$r;or++){var Kr=ct(V,or).text,mr=ue(Kr,qt,Ot);qt==Cr?mt.push(new Xt($e(or,mr),$e(or,mr))):Kr.length>mr&&mt.push(new Xt($e(or,mr),$e(or,ue(Kr,Cr,Ot))))}mt.length||mt.push(new Xt(A,A)),Pr(V,Sn(e,fe.ranges.slice(0,de).concat(mt),de),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ut)}else{var Gr=ae,Ar=Ls(e,ut,O.unit),br=Gr.anchor,gr;yt(Ar.anchor,br)>0?(gr=Ar.head,br=Mr(Gr.from(),Ar.anchor)):(gr=Ar.anchor,br=Br(Gr.to(),Ar.head));var lr=fe.ranges.slice(0);lr[de]=Yl(e,new Xt(Ct(V,br),gr)),Pr(V,Sn(e,lr,de),ne)}}var Ne=M.wrapper.getBoundingClientRect(),Ge=0;function Je(ut){var mt=++Ge,Ot=pa(e,ut,!0,O.unit=="rectangle");if(!Ot)return;if(yt(Ot,De)!=0){e.curOp.focus=X(),Ue(Ot);var Tt=Ci(M,V);(Ot.line>=Tt.to||Ot.line<Tt.from)&&setTimeout(_r(e,function(){Ge==mt&&Je(ut)}),150)}else{var Ut=ut.clientY<Ne.top?-20:ut.clientY>Ne.bottom?20:0;Ut&&setTimeout(_r(e,function(){if(Ge!=mt)return;M.scroller.scrollTop+=Ut,Je(ut)}),50)}}function rt(ut){e.state.selectingText=!1,Ge=Infinity,ut&&(ye(ut),M.input.focus()),Ye(M.wrapper.ownerDocument,"mousemove",lt),Ye(M.wrapper.ownerDocument,"mouseup",ht),V.history.lastSelOrigin=null}var lt=_r(e,function(ut){ut.buttons===0||!Be(ut)?rt(ut):Je(ut)}),ht=_r(e,rt);e.state.selectingText=ht,Se(M.wrapper.ownerDocument,"mousemove",lt),Se(M.wrapper.ownerDocument,"mouseup",ht)}function Yl(e,t){var A=t.anchor,O=t.head,M=ct(e.doc,A.line);if(yt(A,O)==0&&A.sticky==O.sticky)return t;var V=Fe(M);if(!V)return t;var ae=Pe(V,A.ch,A.sticky),de=V[ae];if(de.from!=A.ch&&de.to!=A.ch)return t;var fe=ae+(de.from==A.ch==(de.level!=1)?0:1);if(fe==0||fe==V.length)return t;var ve;if(O.line!=A.line)ve=(O.line-A.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var _e=Pe(V,O.ch,O.sticky),De=_e-ae||(O.ch-A.ch)*(de.level==1?-1:1);_e==fe-1||_e==fe?ve=De<0:ve=De>0}var Ue=V[fe+(ve?-1:0)],Ne=ve==(Ue.level==1),Ge=Ne?Ue.from:Ue.to,Je=Ne?"after":"before";return A.ch==Ge&&A.sticky==Je?t:new Xt(new $e(A.line,Ge,Je),O)}function ks(e,t,A,O){var M,V;if(t.touches)M=t.touches[0].clientX,V=t.touches[0].clientY;else try{M=t.clientX,V=t.clientY}catch(Ue){return!1}if(M>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;O&&ye(t);var ae=e.display,de=ae.lineDiv.getBoundingClientRect();if(V>de.bottom||!Te(e,A))return we(t);V-=de.top-ae.viewOffset;for(var fe=0;fe<e.display.gutterSpecs.length;++fe){var ve=ae.gutters.childNodes[fe];if(ve&&ve.getBoundingClientRect().right>=M){var _e=ar(e.doc,V),De=e.display.gutterSpecs[fe];return Ie(e,A,e,_e,De.className,t),we(t)}}}function vo(e,t){return ks(e,t,"gutterClick",!0)}function Ps(e,t){if(Jt(e.display,t)||$l(e,t))return;if(He(e,t,"contextmenu"))return;R||e.display.input.onContextMenu(t)}function $l(e,t){return Te(e,"gutterContextMenu")?ks(e,t,"gutterContextMenu",!1):!1}function Is(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),$n(e)}var Ha={toString:function(){return"CodeMirror.Init"}},Ms={},Ui={};function Jl(e){var t=e.optionHandlers;function A(O,M,V,ae){e.defaults[O]=M,V&&(t[O]=ae?function(de,fe,ve){ve!=Ha&&V(de,fe,ve)}:V)}e.defineOption=A,e.Init=Ha,A("value","",function(O,M){return O.setValue(M)},!0),A("mode",null,function(O,M){O.doc.modeOption=M,oo(O)},!0),A("indentUnit",2,oo,!0),A("indentWithTabs",!1),A("smartIndent",!0),A("tabSize",4,function(O){oi(O),$n(O),Wr(O)},!0),A("lineSeparator",null,function(O,M){if(O.doc.lineSep=M,!M)return;var V=[],ae=O.doc.first;O.doc.iter(function(fe){for(var ve=0;;){var _e=fe.text.indexOf(M,ve);if(_e==-1)break;ve=_e+M.length,V.push($e(ae,_e))}ae++});for(var de=V.length-1;de>=0;de--)ja(O.doc,M,V[de],$e(V[de].line,V[de].ch+M.length))}),A("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(O,M,V){O.state.specialChars=new RegExp(M.source+(M.test(" ")?"":"| "),"g"),V!=Ha&&O.refresh()}),A("specialCharPlaceholder",Qe,function(O){return O.refresh()},!0),A("electricChars",!0),A("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),A("spellcheck",!1,function(O,M){return O.getInputField().spellcheck=M},!0),A("autocorrect",!1,function(O,M){return O.getInputField().autocorrect=M},!0),A("autocapitalize",!1,function(O,M){return O.getInputField().autocapitalize=M},!0),A("rtlMoveVisually",!w),A("wholeLineUpdateBefore",!0),A("theme","default",function(O){Is(O),ii(O)},!0),A("keyMap","default",function(O,M,V){var ae=Fi(M),de=V!=Ha&&Fi(V);de&&de.detach&&de.detach(O,ae),ae.attach&&ae.attach(O,de||null)}),A("extraKeys",null),A("configureMouse",null),A("lineWrapping",!1,Ql,!0),A("gutters",[],function(O,M){O.display.gutterSpecs=ao(M,O.options.lineNumbers),ii(O)},!0),A("fixedGutter",!0,function(O,M){O.display.gutters.style.left=M?Yi(O.display)+"px":"0",O.refresh()},!0),A("coverGutterNextToScrollbar",!1,function(O){return Ia(O)},!0),A("scrollbarStyle","native",function(O){Fo(O),Ia(O),O.display.scrollbars.setScrollTop(O.doc.scrollTop),O.display.scrollbars.setScrollLeft(O.doc.scrollLeft)},!0),A("lineNumbers",!1,function(O,M){O.display.gutterSpecs=ao(O.options.gutters,M),ii(O)},!0),A("firstLineNumber",1,ii,!0),A("lineNumberFormatter",function(O){return O},ii,!0),A("showCursorWhenSelecting",!1,qa,!0),A("resetSelectionOnContextMenu",!0),A("lineWiseCopyCut",!0),A("pasteLinesPerSelection",!0),A("selectionsMayTouch",!1),A("readOnly",!1,function(O,M){M=="nocursor"&&(ka(O),O.display.input.blur()),O.display.input.readOnlyChanged(M)}),A("screenReaderLabel",null,function(O,M){M=M===""?null:M,O.display.input.screenReaderLabelChanged(M)}),A("disableInput",!1,function(O,M){M||O.display.input.reset()},!0),A("dragDrop",!0,Zl),A("allowDropFileTypes",null),A("cursorBlinkRate",530),A("cursorScrollMargin",0),A("cursorHeight",1,qa,!0),A("singleCursorHeightPerLine",!0,qa,!0),A("workTime",100),A("workDelay",100),A("flattenSpans",!0,oi,!0),A("addModeClass",!1,oi,!0),A("pollInterval",100),A("undoDepth",200,function(O,M){return O.doc.history.undoDepth=M}),A("historyEventDelay",1250),A("viewportMargin",10,function(O){return O.refresh()},!0),A("maxHighlightLength",1e4,oi,!0),A("moveInputWithCursor",!0,function(O,M){M||O.display.input.resetPosition()}),A("tabindex",null,function(O,M){return O.display.input.getField().tabIndex=M||""}),A("autofocus",null),A("direction","ltr",function(O,M){return O.doc.setDirection(M)},!0),A("phrases",null)}function Zl(e,t,A){var O=A&&A!=Ha;if(!t!=!O){var M=e.display.dragFunctions,V=t?Se:Ye;V(e.display.scroller,"dragstart",M.start),V(e.display.scroller,"dragenter",M.enter),V(e.display.scroller,"dragover",M.over),V(e.display.scroller,"dragleave",M.leave),V(e.display.scroller,"drop",M.drop)}}function Ql(e){e.options.lineWrapping?(G(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(c(e.display.wrapper,"CodeMirror-wrap"),_a(e)),$i(e),Wr(e),$n(e),setTimeout(function(){return Ia(e)},100)}function nr(e,t){var A=this;if(!(this instanceof nr))return new nr(e,t);this.options=t=t?U(t):{},U(Ms,t,!1);var O=t.value;typeof O=="string"?O=new Hr(O,t.mode,null,t.lineSeparator,t.direction):t.mode&&(O.modeOption=t.mode),this.doc=O;var M=new nr.inputStyles[t.inputStyle](this),V=this.display=new dl(e,O,M,t);V.wrapper.CodeMirror=this,Is(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fo(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Q,keySeq:null,specialChars:null},t.autofocus&&!n&&V.input.focus(),_&&d<11&&setTimeout(function(){return A.display.input.reset(!0)},20),ql(this),Rl(),ya(this),this.curOp.forceUpdate=!0,Vo(this,O),t.autofocus&&!n||this.hasFocus()?setTimeout(function(){A.hasFocus()&&!A.state.focused&&Zi(A)},20):ka(this);for(var ae in Ui)Ui.hasOwnProperty(ae)&&Ui[ae](this,t[ae],Ha);Bo(this),t.finishInit&&t.finishInit(this);for(var de=0;de<yo.length;++de)yo[de](this);ba(this),o&&t.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}nr.defaults=Ms,nr.optionHandlers=Ui;function ql(e){var t=e.display;Se(t.scroller,"mousedown",_r(e,Rs)),_&&d<11?Se(t.scroller,"dblclick",_r(e,function(fe){if(He(e,fe))return;var ve=pa(e,fe);if(!ve||vo(e,fe)||Jt(e.display,fe))return;ye(fe);var _e=e.findWordAt(ve);ki(e.doc,_e.anchor,_e.head)})):Se(t.scroller,"dblclick",function(fe){return He(e,fe)||ye(fe)}),Se(t.scroller,"contextmenu",function(fe){return Ps(e,fe)}),Se(t.input.getField(),"contextmenu",function(fe){t.scroller.contains(fe.target)||Ps(e,fe)});var A,O={end:0};function M(){t.activeTouch&&(A=setTimeout(function(){return t.activeTouch=null},1e3),O=t.activeTouch,O.end=+new Date)}function V(fe){if(fe.touches.length!=1)return!1;var ve=fe.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function ae(fe,ve){if(ve.left==null)return!0;var _e=ve.left-fe.left,De=ve.top-fe.top;return _e*_e+De*De>20*20}Se(t.scroller,"touchstart",function(fe){if(!He(e,fe)&&!V(fe)&&!vo(e,fe)){t.input.ensurePolled(),clearTimeout(A);var ve=+new Date;t.activeTouch={start:ve,moved:!1,prev:ve-O.end<=300?O:null},fe.touches.length==1&&(t.activeTouch.left=fe.touches[0].pageX,t.activeTouch.top=fe.touches[0].pageY)}}),Se(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Se(t.scroller,"touchend",function(fe){var ve=t.activeTouch;if(ve&&!Jt(t,fe)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var _e=e.coordsChar(t.activeTouch,"page"),De;!ve.prev||ae(ve,ve.prev)?De=new Xt(_e,_e):!ve.prev.prev||ae(ve,ve.prev.prev)?De=e.findWordAt(_e):De=new Xt($e(_e.line,0),Ct(e.doc,$e(_e.line+1,0))),e.setSelection(De.anchor,De.head),e.focus(),ye(fe)}M()}),Se(t.scroller,"touchcancel",M),Se(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ti(e,t.scroller.scrollTop),ga(e,t.scroller.scrollLeft,!0),Ie(e,"scroll",e))}),Se(t.scroller,"mousewheel",function(fe){return Ko(e,fe)}),Se(t.scroller,"DOMMouseScroll",function(fe){return Ko(e,fe)}),Se(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(fe){He(e,fe)||Oe(fe)},over:function(fe){He(e,fe)||(Dl(e,fe),Oe(fe))},start:function(fe){return Al(e,fe)},drop:_r(e,Ol),leave:function(fe){He(e,fe)||vs(e)}};var de=t.input.getField();Se(de,"keyup",function(fe){return As.call(e,fe)}),Se(de,"keydown",_r(e,Os)),Se(de,"keypress",_r(e,Ds)),Se(de,"focus",function(fe){return Zi(e,fe)}),Se(de,"blur",function(fe){return ka(e,fe)})}var yo=[];nr.defineInitHook=function(e){return yo.push(e)};function bi(e,t,A,O){var M=e.doc,V;A==null&&(A="add"),A=="smart"&&(M.mode.indent?V=wr(e,t).state:A="prev");var ae=e.options.tabSize,de=ct(M,t),fe=W(de.text,null,ae);de.stateAfter&&(de.stateAfter=null);var ve=de.text.match(/^\s*/)[0],_e;if(!O&&!/\S/.test(de.text))_e=0,A="not";else if(A=="smart"&&(_e=M.mode.indent(V,de.text.slice(ve.length),de.text),_e==he||_e>150)){if(!O)return;A="prev"}A=="prev"?t>M.first?_e=W(ct(M,t-1).text,null,ae):_e=0:A=="add"?_e=fe+e.options.indentUnit:A=="subtract"?_e=fe-e.options.indentUnit:typeof A=="number"&&(_e=fe+A),_e=Math.max(0,_e);var De="",Ue=0;if(e.options.indentWithTabs)for(var Ne=Math.floor(_e/ae);Ne;--Ne)Ue+=ae,De+=" ";if(Ue<_e&&(De+=oe(_e-Ue)),De!=ve)return ja(M,De,$e(t,0),$e(t,ve.length),"+input"),de.stateAfter=null,!0;for(var Ge=0;Ge<M.sel.ranges.length;Ge++){var Je=M.sel.ranges[Ge];if(Je.head.line==t&&Je.head.ch<ve.length){var rt=$e(t,ve.length);co(M,Ge,new Xt(rt,rt));break}}}var Cn=null;function Bi(e){Cn=e}function bo(e,t,A,O,M){var V=e.doc;e.display.shift=!1,O||(O=V.sel);var ae=+new Date-200,de=M=="paste"||e.state.pasteIncoming>ae,fe=dt(t),ve=null;if(de&&O.ranges.length>1)if(Cn&&Cn.text.join(`
`)==t){if(O.ranges.length%Cn.text.length==0){ve=[];for(var _e=0;_e<Cn.text.length;_e++)ve.push(V.splitLines(Cn.text[_e]))}}else fe.length==O.ranges.length&&e.options.pasteLinesPerSelection&&(ve=se(fe,function(lt){return[lt]}));for(var De=e.curOp.updateInput,Ue=O.ranges.length-1;Ue>=0;Ue--){var Ne=O.ranges[Ue],Ge=Ne.from(),Je=Ne.to();Ne.empty()&&(A&&A>0?Ge=$e(Ge.line,Ge.ch-A):e.state.overwrite&&!de?Je=$e(Je.line,Math.min(ct(V,Je.line).text.length,Je.ch+q(fe).length)):de&&Cn&&Cn.lineWise&&Cn.text.join(`
`)==fe.join(`
`)&&(Ge=Je=$e(Ge.line,0)));var rt={from:Ge,to:Je,text:ve?ve[Ue%ve.length]:fe,origin:M||(de?"paste":e.state.cutIncoming>ae?"cut":"+input")};Fa(e.doc,rt),zt(e,"inputRead",e,rt)}t&&!de&&Fs(e,t),Pa(e),e.curOp.updateInput<2&&(e.curOp.updateInput=De),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ns(e,t){var A=e.clipboardData&&e.clipboardData.getData("Text");if(A)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Yr(t,function(){return bo(t,A,0,null,"paste")}),!0}function Fs(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var A=e.doc.sel,O=A.ranges.length-1;O>=0;O--){var M=A.ranges[O];if(M.head.ch>100||O&&A.ranges[O-1].head.line==M.head.line)continue;var V=e.getModeAt(M.head),ae=!1;if(V.electricChars){for(var de=0;de<V.electricChars.length;de++)if(t.indexOf(V.electricChars.charAt(de))>-1){ae=bi(e,M.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(ct(e.doc,M.head.line).text.slice(0,M.head.ch))&&(ae=bi(e,M.head.line,"smart")));ae&&zt(e,"electricInput",e,M.head.line)}}function js(e){for(var t=[],A=[],O=0;O<e.doc.sel.ranges.length;O++){var M=e.doc.sel.ranges[O].head.line,V={anchor:$e(M,0),head:$e(M+1,0)};A.push(V),t.push(e.getRange(V.anchor,V.head))}return{text:t,ranges:A}}function Us(e,t,A,O){e.setAttribute("autocorrect",A?"":"off"),e.setAttribute("autocapitalize",O?"":"off"),e.setAttribute("spellcheck",!!t)}function Bs(){var e=C("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=C("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return o?e.style.width="1000px":e.setAttribute("wrap","off"),v&&(e.style.border="1px solid black"),Us(e),t}function eu(e){var t=e.optionHandlers,A=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(O,M){var V=this.options,ae=V[O];if(V[O]==M&&O!="mode")return;V[O]=M,t.hasOwnProperty(O)&&_r(this,t[O])(this,M,ae),Ie(this,"optionChange",this,O)},getOption:function(O){return this.options[O]},getDoc:function(){return this.doc},addKeyMap:function(O,M){this.state.keyMaps[M?"push":"unshift"](Fi(O))},removeKeyMap:function(O){for(var M=this.state.keyMaps,V=0;V<M.length;++V)if(M[V]==O||M[V].name==O)return M.splice(V,1),!0},addOverlay:Fr(function(O,M){var V=O.token?O:e.getMode(this.options,O);if(V.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:V,modeSpec:O,opaque:M&&M.opaque,priority:M&&M.priority||0},function(ae){return ae.priority}),this.state.modeGen++,Wr(this)}),removeOverlay:Fr(function(O){for(var M=this.state.overlays,V=0;V<M.length;++V){var ae=M[V].modeSpec;if(ae==O||typeof O=="string"&&ae.name==O){M.splice(V,1),this.state.modeGen++,Wr(this);return}}}),indentLine:Fr(function(O,M,V){typeof M!="string"&&typeof M!="number"&&(M==null?M=this.options.smartIndent?"smart":"prev":M=M?"add":"subtract"),Mt(this.doc,O)&&bi(this,O,M,V)}),indentSelection:Fr(function(O){for(var M=this.doc.sel.ranges,V=-1,ae=0;ae<M.length;ae++){var de=M[ae];if(de.empty())de.head.line>V&&(bi(this,de.head.line,O,!0),V=de.head.line,ae==this.doc.sel.primIndex&&Pa(this));else{var fe=de.from(),ve=de.to(),_e=Math.max(V,fe.line);V=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var De=_e;De<V;++De)bi(this,De,O);var Ue=this.doc.sel.ranges;fe.ch==0&&M.length==Ue.length&&Ue[ae].from().ch>0&&co(this.doc,ae,new Xt(fe,Ue[ae].to()),be)}}}),getTokenAt:function(O,M){return sr(this,O,M)},getLineTokens:function(O,M){return sr(this,$e(O),M,!0)},getTokenTypeAt:function(O){O=Ct(this.doc,O);var M=yr(this,ct(this.doc,O.line)),V=0,ae=(M.length-1)/2,de=O.ch,fe;if(de==0)fe=M[2];else for(;;){var ve=V+ae>>1;if((ve?M[ve*2-1]:0)>=de)ae=ve;else if(M[ve*2+1]<de)V=ve+1;else{fe=M[ve*2+2];break}}var _e=fe?fe.indexOf("overlay "):-1;return _e<0?fe:_e==0?null:fe.slice(0,_e-1)},getModeAt:function(O){var M=this.doc.mode;return M.innerMode?e.innerMode(M,this.getTokenAt(O).state).mode:M},getHelper:function(O,M){return this.getHelpers(O,M)[0]},getHelpers:function(O,M){var V=[];if(!A.hasOwnProperty(M))return V;var ae=A[M],de=this.getModeAt(O);if(typeof de[M]=="string")ae[de[M]]&&V.push(ae[de[M]]);else if(de[M])for(var fe=0;fe<de[M].length;fe++){var ve=ae[de[M][fe]];ve&&V.push(ve)}else de.helperType&&ae[de.helperType]?V.push(ae[de.helperType]):ae[de.name]&&V.push(ae[de.name]);for(var _e=0;_e<ae._global.length;_e++){var De=ae._global[_e];De.pred(de,this)&&ie(V,De.val)==-1&&V.push(De.val)}return V},getStateAfter:function(O,M){var V=this.doc;return O=on(V,O==null?V.first+V.size-1:O),wr(this,O+1,M).state},cursorCoords:function(O,M){var V,ae=this.doc.sel.primary();return O==null?V=ae.head:typeof O=="object"?V=Ct(this.doc,O):V=O?ae.from():ae.to(),_n(this,V,M||"page")},charCoords:function(O,M){return Ki(this,Ct(this.doc,O),M||"page")},coordsChar:function(O,M){return O=rn(this,O,M||"page"),zi(this,O.left,O.top)},lineAtHeight:function(O,M){return O=rn(this,{top:O,left:0},M||"page").top,ar(this.doc,O+this.display.viewOffset)},heightAtLine:function(O,M,V){var ae=!1,de;if(typeof O=="number"){var fe=this.doc.first+this.doc.size-1;O<this.doc.first?O=this.doc.first:O>fe&&(O=fe,ae=!0),de=ct(this.doc,O)}else de=O;return kr(this,de,{top:0,left:0},M||"page",V||ae).top+(ae?this.doc.height-Qr(de):0)},defaultTextHeight:function(){return Ra(this.display)},defaultCharWidth:function(){return La(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(O,M,V,ae,de){var fe=this.display;O=_n(this,Ct(this.doc,O));var ve=O.bottom,_e=O.left;if(M.style.position="absolute",M.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(M),fe.sizer.appendChild(M),ae=="over")ve=O.top;else if(ae=="above"||ae=="near"){var De=Math.max(fe.wrapper.clientHeight,this.doc.height),Ue=Math.max(fe.sizer.clientWidth,fe.lineSpace.clientWidth);(ae=="above"||O.bottom+M.offsetHeight>De)&&O.top>M.offsetHeight?ve=O.top-M.offsetHeight:O.bottom+M.offsetHeight<=De&&(ve=O.bottom),_e+M.offsetWidth>Ue&&(_e=Ue-M.offsetWidth)}M.style.top=ve+"px",M.style.left=M.style.right="",de=="right"?(_e=fe.sizer.clientWidth-M.offsetWidth,M.style.right="0px"):(de=="left"?_e=0:de=="middle"&&(_e=(fe.sizer.clientWidth-M.offsetWidth)/2),M.style.left=_e+"px"),V&&Js(this,{left:_e,top:ve,right:_e+M.offsetWidth,bottom:ve+M.offsetHeight})},triggerOnKeyDown:Fr(Os),triggerOnKeyPress:Fr(Ds),triggerOnKeyUp:As,triggerOnMouseDown:Fr(Rs),execCommand:function(O){if(mi.hasOwnProperty(O))return mi[O].call(null,this)},triggerElectric:Fr(function(O){Fs(this,O)}),findPosH:function(O,M,V,ae){var de=1;M<0&&(de=-1,M=-M);for(var fe=Ct(this.doc,O),ve=0;ve<M&&!(fe=xo(this.doc,fe,de,V,ae),fe.hitSide);++ve);return fe},moveH:Fr(function(O,M){var V=this;this.extendSelectionsBy(function(ae){return V.display.shift||V.doc.extend||ae.empty()?xo(V.doc,ae.head,O,M,V.options.rtlMoveVisually):O<0?ae.from():ae.to()},le)}),deleteH:Fr(function(O,M){var V=this.doc.sel,ae=this.doc;V.somethingSelected()?ae.replaceSelection("",null,"+delete"):Wa(this,function(de){var fe=xo(ae,de.head,O,M,!1);return O<0?{from:fe,to:de.head}:{from:de.head,to:fe}})}),findPosV:function(O,M,V,ae){var de=1,fe=ae;M<0&&(de=-1,M=-M);for(var ve=Ct(this.doc,O),_e=0;_e<M;++_e){var De=_n(this,ve,"div");if(fe==null?fe=De.left:De.left=fe,ve=Ws(this,De,de,V),ve.hitSide)break}return ve},moveV:Fr(function(O,M){var V=this,ae=this.doc,de=[],fe=!this.display.shift&&!ae.extend&&ae.sel.somethingSelected();if(ae.extendSelectionsBy(function(_e){if(fe)return O<0?_e.from():_e.to();var De=_n(V,_e.head,"div");_e.goalColumn!=null&&(De.left=_e.goalColumn),de.push(De.left);var Ue=Ws(V,De,O,M);return M=="page"&&_e==ae.sel.primary()&&qi(V,Ki(V,Ue,"div").top-De.top),Ue},le),de.length)for(var ve=0;ve<ae.sel.ranges.length;ve++)ae.sel.ranges[ve].goalColumn=de[ve]}),findWordAt:function(O){var M=this.doc,V=ct(M,O.line).text,ae=O.ch,de=O.ch;if(V){var fe=this.getHelper(O,"wordChars");(O.sticky=="before"||de==V.length)&&ae?--ae:++de;for(var ve=V.charAt(ae),_e=z(ve,fe)?function(De){return z(De,fe)}:/\s/.test(ve)?function(De){return/\s/.test(De)}:function(De){return!/\s/.test(De)&&!z(De)};ae>0&&_e(V.charAt(ae-1));)--ae;for(;de<V.length&&_e(V.charAt(de));)++de}return new Xt($e(O.line,ae),$e(O.line,de))},toggleOverwrite:function(O){if(O!=null&&O==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?G(this.display.cursorDiv,"CodeMirror-overwrite"):c(this.display.cursorDiv,"CodeMirror-overwrite"),Ie(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==X()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Fr(function(O,M){ei(this,O,M)}),getScrollInfo:function(){var O=this.display.scroller;return{left:O.scrollLeft,top:O.scrollTop,height:O.scrollHeight-en(this)-this.display.barHeight,width:O.scrollWidth-en(this)-this.display.barWidth,clientHeight:fa(this),clientWidth:wn(this)}},scrollIntoView:Fr(function(O,M){O==null?(O={from:this.doc.sel.primary().head,to:null},M==null&&(M=this.options.cursorScrollMargin)):typeof O=="number"?O={from:$e(O,0),to:null}:O.from==null&&(O={from:O,to:null}),O.to||(O.to=O.from),O.margin=M||0,O.from.line!=null?Zs(this,O):Po(this,O.from,O.to,O.margin)}),setSize:Fr(function(O,M){var V=this,ae=function(fe){return typeof fe=="number"||/^\d+$/.test(String(fe))?fe+"px":fe};O!=null&&(this.display.wrapper.style.width=ae(O)),M!=null&&(this.display.wrapper.style.height=ae(M)),this.options.lineWrapping&&vn(this);var de=this.display.viewFrom;this.doc.iter(de,this.display.viewTo,function(fe){if(fe.widgets){for(var ve=0;ve<fe.widgets.length;ve++)if(fe.widgets[ve].noHScroll){Jn(V,de,"widget");break}}++de}),this.curOp.forceUpdate=!0,Ie(this,"refresh",this)}),operation:function(O){return Yr(this,O)},startOperation:function(){return ya(this)},endOperation:function(){return ba(this)},refresh:Fr(function(){var O=this.display.cachedTextHeight;Wr(this),this.curOp.forceUpdate=!0,$n(this),ei(this,this.doc.scrollLeft,this.doc.scrollTop),ro(this.display),(O==null||Math.abs(O-Ra(this.display))>.5||this.options.lineWrapping)&&$i(this),Ie(this,"refresh",this)}),swapDoc:Fr(function(O){var M=this.doc;return M.cm=null,this.state.selectingText&&this.state.selectingText(),Vo(this,O),$n(this),this.display.input.reset(),ei(this,O.scrollLeft,O.scrollTop),this.curOp.forceScroll=!0,zt(this,"swapDoc",this,M),M}),phrase:function(O){var M=this.options.phrases;return M&&Object.prototype.hasOwnProperty.call(M,O)?M[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}},Ce(e),e.registerHelper=function(O,M,V){A.hasOwnProperty(O)||(A[O]=e[O]={_global:[]}),A[O][M]=V},e.registerGlobalHelper=function(O,M,V,ae){e.registerHelper(O,M,ae),A[O]._global.push({pred:V,val:ae})}}function xo(e,t,A,O,M){var V=t,ae=A,de=ct(e,t.line),fe=M&&e.direction=="rtl"?-A:A;function ve(){var ht=t.line+fe;return ht<e.first||ht>=e.first+e.size?!1:(t=new $e(ht,t.ch,t.sticky),de=ct(e,ht))}function _e(ht){var ut;if(O=="codepoint"){var mt=de.text.charCodeAt(t.ch+(O>0?0:-1));isNaN(mt)?ut=null:ut=new $e(t.line,Math.max(0,Math.min(de.text.length,t.ch+A*(mt>=55296&&mt<56320?2:1))),-A)}else M?ut=Ml(e.cm,de,t,A):ut=ho(de,t,A);if(ut==null)if(!ht&&ve())t=po(M,e.cm,de,t.line,fe);else return!1;else t=ut;return!0}if(O=="char"||O=="codepoint")_e();else if(O=="column")_e(!0);else if(O=="word"||O=="group")for(var De=null,Ue=O=="group",Ne=e.cm&&e.cm.getHelper(t,"wordChars"),Ge=!0;!(A<0&&!_e(!Ge));Ge=!1){var Je=de.text.charAt(t.ch)||`
`,rt=z(Je,Ne)?"w":Ue&&Je==`
`?"n":!Ue||/\s/.test(Je)?null:"p";if(Ue&&!Ge&&!rt&&(rt="s"),De&&De!=rt){A<0&&(A=1,_e(),t.sticky="after");break}if(rt&&(De=rt),A>0&&!_e(!Ge))break}var lt=Ii(e,t,V,ae,!0);return Ur(V,lt)&&(lt.hitSide=!0),lt}function Ws(e,t,A,O){var M=e.doc,V=t.left,ae;if(O=="page"){var de=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),fe=Math.max(de-.5*Ra(e.display),3);ae=(A>0?t.bottom:t.top)+A*fe}else O=="line"&&(ae=A>0?t.bottom+3:t.top-3);for(var ve;!(ve=zi(e,V,ae),!ve.outside);){if(A<0?ae<=0:ae>=M.height){ve.hitSide=!0;break}ae+=A*5}return ve}var Zt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Zt.prototype.init=function(e){var t=this,A=this,O=A.cm,M=A.div=e.lineDiv;Us(M,O.options.spellcheck,O.options.autocorrect,O.options.autocapitalize);function V(de){for(var fe=de.target;fe;fe=fe.parentNode){if(fe==M)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(fe.className))break}return!1}Se(M,"paste",function(de){if(!V(de)||He(O,de)||Ns(de,O))return;d<=11&&setTimeout(_r(O,function(){return t.updateFromDOM()}),20)}),Se(M,"compositionstart",function(de){t.composing={data:de.data,done:!1}}),Se(M,"compositionupdate",function(de){t.composing||(t.composing={data:de.data,done:!1})}),Se(M,"compositionend",function(de){t.composing&&(de.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Se(M,"touchstart",function(){return A.forceCompositionEnd()}),Se(M,"input",function(){t.composing||t.readFromDOMSoon()});function ae(de){if(!V(de)||He(O,de))return;if(O.somethingSelected())Bi({lineWise:!1,text:O.getSelections()}),de.type=="cut"&&O.replaceSelection("",null,"cut");else if(O.options.lineWiseCopyCut){var fe=js(O);Bi({lineWise:!0,text:fe.text}),de.type=="cut"&&O.operation(function(){O.setSelections(fe.ranges,0,be),O.replaceSelection("",null,"cut")})}else return;if(de.clipboardData){de.clipboardData.clearData();var ve=Cn.text.join(`
`);if(de.clipboardData.setData("Text",ve),de.clipboardData.getData("Text")==ve){de.preventDefault();return}}var _e=Bs(),De=_e.firstChild;O.display.lineSpace.insertBefore(_e,O.display.lineSpace.firstChild),De.value=Cn.text.join(`
`);var Ue=document.activeElement;K(De),setTimeout(function(){O.display.lineSpace.removeChild(_e),Ue.focus(),Ue==M&&A.showPrimarySelection()},50)}Se(M,"copy",ae),Se(M,"cut",ae)},Zt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Zt.prototype.prepareSelection=function(){var e=Ao(this.cm,!1);return e.focus=document.activeElement==this.div,e},Zt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Zt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Zt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,A=t.doc.sel.primary(),O=A.from(),M=A.to();if(t.display.viewTo==t.display.viewFrom||O.line>=t.display.viewTo||M.line<t.display.viewFrom){e.removeAllRanges();return}var V=Wi(t,e.anchorNode,e.anchorOffset),ae=Wi(t,e.focusNode,e.focusOffset);if(V&&!V.bad&&ae&&!ae.bad&&yt(Mr(V,ae),O)==0&&yt(Br(V,ae),M)==0)return;var de=t.display.view,fe=O.line>=t.display.viewFrom&&Hs(t,O)||{node:de[0].measure.map[2],offset:0},ve=M.line<t.display.viewTo&&Hs(t,M);if(!ve){var _e=de[de.length-1].measure,De=_e.maps?_e.maps[_e.maps.length-1]:_e.map;ve={node:De[De.length-1],offset:De[De.length-2]-De[De.length-3]}}if(!fe||!ve){e.removeAllRanges();return}var Ue=e.rangeCount&&e.getRangeAt(0),Ne;try{Ne=j(fe.node,fe.offset,ve.offset,ve.node)}catch(Ge){}Ne&&(!T&&t.state.focused?(e.collapse(fe.node,fe.offset),Ne.collapsed||(e.removeAllRanges(),e.addRange(Ne))):(e.removeAllRanges(),e.addRange(Ne)),Ue&&e.anchorNode==null?e.addRange(Ue):T&&this.startGracePeriod()),this.rememberSelection()},Zt.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)},Zt.prototype.showMultipleSelections=function(e){E(this.cm.display.cursorDiv,e.cursors),E(this.cm.display.selectionDiv,e.selection)},Zt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Zt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return k(this.div,t)},Zt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Zt.prototype.blur=function(){this.div.blur()},Zt.prototype.getField=function(){return this.div},Zt.prototype.supportsTouch=function(){return!0},Zt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Yr(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)},Zt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Zt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(l&&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 A=Wi(t,e.anchorNode,e.anchorOffset),O=Wi(t,e.focusNode,e.focusOffset);A&&O&&Yr(t,function(){Pr(t.doc,Qn(A,O),be),(A.bad||O.bad)&&(t.curOp.selectionChanged=!0)})},Zt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,A=e.doc.sel.primary(),O=A.from(),M=A.to();if(O.ch==0&&O.line>e.firstLine()&&(O=$e(O.line-1,ct(e.doc,O.line-1).length)),M.ch==ct(e.doc,M.line).text.length&&M.line<e.lastLine()&&(M=$e(M.line+1,0)),O.line<t.viewFrom||M.line>t.viewTo-1)return!1;var V,ae,de;O.line==t.viewFrom||(V=ma(e,O.line))==0?(ae=Nt(t.view[0].line),de=t.view[0].node):(ae=Nt(t.view[V].line),de=t.view[V-1].node.nextSibling);var fe=ma(e,M.line),ve,_e;if(fe==t.view.length-1?(ve=t.viewTo-1,_e=t.lineDiv.lastChild):(ve=Nt(t.view[fe+1].line)-1,_e=t.view[fe+1].node.previousSibling),!de)return!1;for(var De=e.doc.splitLines(ru(e,de,_e,ae,ve)),Ue=Rt(e.doc,$e(ae,0),$e(ve,ct(e.doc,ve).text.length));De.length>1&&Ue.length>1;)if(q(De)==q(Ue))De.pop(),Ue.pop(),ve--;else if(De[0]==Ue[0])De.shift(),Ue.shift(),ae++;else break;for(var Ne=0,Ge=0,Je=De[0],rt=Ue[0],lt=Math.min(Je.length,rt.length);Ne<lt&&Je.charCodeAt(Ne)==rt.charCodeAt(Ne);)++Ne;for(var ht=q(De),ut=q(Ue),mt=Math.min(ht.length-(De.length==1?Ne:0),ut.length-(Ue.length==1?Ne:0));Ge<mt&&ht.charCodeAt(ht.length-Ge-1)==ut.charCodeAt(ut.length-Ge-1);)++Ge;if(De.length==1&&Ue.length==1&&ae==O.line)for(;Ne&&Ne>O.ch&&ht.charCodeAt(ht.length-Ge-1)==ut.charCodeAt(ut.length-Ge-1);)Ne--,Ge++;De[De.length-1]=ht.slice(0,ht.length-Ge).replace(/^\u200b+/,""),De[0]=De[0].slice(Ne).replace(/\u200b+$/,"");var Ot=$e(ae,Ne),Tt=$e(ve,Ue.length?q(Ue).length-Ge:0);if(De.length>1||De[0]||yt(Ot,Tt))return ja(e.doc,De,Ot,Tt,"+input"),!0},Zt.prototype.ensurePolled=function(){this.forceCompositionEnd()},Zt.prototype.reset=function(){this.forceCompositionEnd()},Zt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Zt.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)},Zt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Yr(this.cm,function(){return Wr(e.cm)})},Zt.prototype.setUneditable=function(e){e.contentEditable="false"},Zt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||_r(this.cm,bo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Zt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Zt.prototype.onContextMenu=function(){},Zt.prototype.resetPosition=function(){},Zt.prototype.needsContentAttribute=!0;function Hs(e,t){var A=Ca(e,t.line);if(!A||A.hidden)return null;var O=ct(e.doc,t.line),M=Sa(A,O,t.line),V=Fe(O,e.doc.direction),ae="left";if(V){var de=Pe(V,t.ch);ae=de%2?"right":"left"}var fe=Yn(M.map,t.ch,ae);return fe.offset=fe.collapse=="right"?fe.end:fe.start,fe}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Ka(e,t){return t&&(e.bad=!0),e}function ru(e,t,A,O,M){var V="",ae=!1,de=e.doc.lineSeparator(),fe=!1;function ve(Ne){return function(Ge){return Ge.id==Ne}}function _e(){ae&&(V+=de,fe&&(V+=de),ae=fe=!1)}function De(Ne){Ne&&(_e(),V+=Ne)}function Ue(Ne){if(Ne.nodeType==1){var Ge=Ne.getAttribute("cm-text");if(Ge){De(Ge);return}var Je=Ne.getAttribute("cm-marker"),rt;if(Je){var lt=e.findMarks($e(O,0),$e(M+1,0),ve(+Je));lt.length&&(rt=lt[0].find(0))&&De(Rt(e.doc,rt.from,rt.to).join(de));return}if(Ne.getAttribute("contenteditable")=="false")return;var ht=/^(pre|div|p|li|table|br)$/i.test(Ne.nodeName);if(!/^br$/i.test(Ne.nodeName)&&Ne.textContent.length==0)return;ht&&_e();for(var ut=0;ut<Ne.childNodes.length;ut++)Ue(Ne.childNodes[ut]);/^(pre|p)$/i.test(Ne.nodeName)&&(fe=!0),ht&&(ae=!0)}else Ne.nodeType==3&&De(Ne.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Ue(t),t==A);)t=t.nextSibling,fe=!1;return V}function Wi(e,t,A){var O;if(t==e.display.lineDiv){if(O=e.display.lineDiv.childNodes[A],!O)return Ka(e.clipPos($e(e.display.viewTo-1)),!0);t=null,A=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 M=0;M<e.display.view.length;M++){var V=e.display.view[M];if(V.node==O)return nu(V,t,A)}}function nu(e,t,A){var O=e.text.firstChild,M=!1;if(!t||!k(O,t))return Ka($e(Nt(e.line),0),!0);if(t==O&&(M=!0,t=O.childNodes[A],A=0,!t)){var V=e.rest?q(e.rest):e.line;return Ka($e(Nt(V),V.text.length),M)}var ae=t.nodeType==3?t:null,de=t;for(!ae&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(ae=t.firstChild,A&&(A=ae.nodeValue.length));de.parentNode!=O;)de=de.parentNode;var fe=e.measure,ve=fe.maps;function _e(rt,lt,ht){for(var ut=-1;ut<(ve?ve.length:0);ut++)for(var mt=ut<0?fe.map:ve[ut],Ot=0;Ot<mt.length;Ot+=3){var Tt=mt[Ot+2];if(Tt==rt||Tt==lt){var Ut=Nt(ut<0?e.line:e.rest[ut]),qt=mt[Ot]+ht;return(ht<0||Tt!=rt)&&(qt=mt[Ot+(ht?1:0)]),$e(Ut,qt)}}}var De=_e(ae,de,A);if(De)return Ka(De,M);for(var Ue=de.nextSibling,Ne=ae?ae.nodeValue.length-A:0;Ue;Ue=Ue.nextSibling){if(De=_e(Ue,Ue.firstChild,0),De)return Ka($e(De.line,De.ch-Ne),M);Ne+=Ue.textContent.length}for(var Ge=de.previousSibling,Je=A;Ge;Ge=Ge.previousSibling){if(De=_e(Ge,Ge.firstChild,-1),De)return Ka($e(De.line,De.ch+Je),M);Je+=Ge.textContent.length}}var hr=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Q,this.hasSelection=!1,this.composing=null};hr.prototype.init=function(e){var t=this,A=this,O=this.cm;this.createField(e);var M=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(M.style.width="0px"),Se(M,"input",function(){_&&d>=9&&t.hasSelection&&(t.hasSelection=null),A.poll()}),Se(M,"paste",function(ae){if(He(O,ae)||Ns(ae,O))return;O.state.pasteIncoming=+new Date,A.fastPoll()});function V(ae){if(He(O,ae))return;if(O.somethingSelected())Bi({lineWise:!1,text:O.getSelections()});else if(O.options.lineWiseCopyCut){var de=js(O);Bi({lineWise:!0,text:de.text}),ae.type=="cut"?O.setSelections(de.ranges,null,be):(A.prevInput="",M.value=de.text.join(`
`),K(M))}else return;ae.type=="cut"&&(O.state.cutIncoming=+new Date)}Se(M,"cut",V),Se(M,"copy",V),Se(e.scroller,"paste",function(ae){if(Jt(e,ae)||He(O,ae))return;if(!M.dispatchEvent){O.state.pasteIncoming=+new Date,A.focus();return}var de=new Event("paste");de.clipboardData=ae.clipboardData,M.dispatchEvent(de)}),Se(e.lineSpace,"selectstart",function(ae){Jt(e,ae)||ye(ae)}),Se(M,"compositionstart",function(){var ae=O.getCursor("from");A.composing&&A.composing.range.clear(),A.composing={start:ae,range:O.markText(ae,O.getCursor("to"),{className:"CodeMirror-composing"})}}),Se(M,"compositionend",function(){A.composing&&(A.poll(),A.composing.range.clear(),A.composing=null)})},hr.prototype.createField=function(e){this.wrapper=Bs(),this.textarea=this.wrapper.firstChild},hr.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},hr.prototype.prepareSelection=function(){var e=this.cm,t=e.display,A=e.doc,O=Ao(e);if(e.options.moveInputWithCursor){var M=_n(e,A.sel.primary().head,"div"),V=t.wrapper.getBoundingClientRect(),ae=t.lineDiv.getBoundingClientRect();O.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,M.top+ae.top-V.top)),O.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,M.left+ae.left-V.left))}return O},hr.prototype.showSelection=function(e){var t=this.cm,A=t.display;E(A.cursorDiv,e.cursors),E(A.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},hr.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var A=t.getSelection();this.textarea.value=A,t.state.focused&&K(this.textarea),_&&d>=9&&(this.hasSelection=A)}else e||(this.prevInput=this.textarea.value="",_&&d>=9&&(this.hasSelection=null))},hr.prototype.getField=function(){return this.textarea},hr.prototype.supportsTouch=function(){return!1},hr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||X()!=this.textarea))try{this.textarea.focus()}catch(e){}},hr.prototype.blur=function(){this.textarea.blur()},hr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},hr.prototype.receivedFocus=function(){this.slowPoll()},hr.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()})},hr.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function A(){var O=t.poll();!O&&!e?(e=!0,t.polling.set(60,A)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,A)},hr.prototype.poll=function(){var e=this,t=this.cm,A=this.textarea,O=this.prevInput;if(this.contextMenuPending||!t.state.focused||it(A)&&!O&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var M=A.value;if(M==O&&!t.somethingSelected())return!1;if(_&&d>=9&&this.hasSelection===M||s&&/[\uf700-\uf7ff]/.test(M))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var V=M.charCodeAt(0);if(V==8203&&!O&&(O="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var ae=0,de=Math.min(O.length,M.length);ae<de&&O.charCodeAt(ae)==M.charCodeAt(ae);)++ae;return Yr(t,function(){bo(t,M.slice(ae),O.length-ae,null,e.composing?"*compose":null),M.length>1e3||M.indexOf(`
`)>-1?A.value=e.prevInput="":e.prevInput=M,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},hr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},hr.prototype.onKeyPress=function(){_&&d>=9&&(this.hasSelection=null),this.fastPoll()},hr.prototype.onContextMenu=function(e){var t=this,A=t.cm,O=A.display,M=t.textarea;t.contextMenuPending&&t.contextMenuPending();var V=pa(A,e),ae=O.scroller.scrollTop;if(!V||h)return;var de=A.options.resetSelectionOnContextMenu;de&&A.doc.sel.contains(V)==-1&&_r(A,Pr)(A.doc,Qn(V),be);var fe=M.style.cssText,ve=t.wrapper.style.cssText,_e=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",M.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-_e.top-5)+"px; left: "+(e.clientX-_e.left-5)+`px;
z-index: 1000; background: `+(_?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var De;o&&(De=window.scrollY),O.input.focus(),o&&window.scrollTo(null,De),O.input.reset(),A.somethingSelected()||(M.value=t.prevInput=" "),t.contextMenuPending=Ne,O.selForContextMenu=A.doc.sel,clearTimeout(O.detectingSelectAll);function Ue(){if(M.selectionStart!=null){var Je=A.somethingSelected(),rt="\u200B"+(Je?M.value:"");M.value="\u21DA",M.value=rt,t.prevInput=Je?"":"\u200B",M.selectionStart=1,M.selectionEnd=rt.length,O.selForContextMenu=A.doc.sel}}function Ne(){if(t.contextMenuPending!=Ne)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=ve,M.style.cssText=fe,_&&d<9&&O.scrollbars.setScrollTop(O.scroller.scrollTop=ae),M.selectionStart!=null){(!_||_&&d<9)&&Ue();var Je=0,rt=function(){O.selForContextMenu==A.doc.sel&&M.selectionStart==0&&M.selectionEnd>0&&t.prevInput=="\u200B"?_r(A,os)(A):Je++<10?O.detectingSelectAll=setTimeout(rt,500):(O.selForContextMenu=null,O.input.reset())};O.detectingSelectAll=setTimeout(rt,200)}}if(_&&d>=9&&Ue(),R){Oe(e);var Ge=function(){Ye(window,"mouseup",Ge),setTimeout(Ne,20)};Se(window,"mouseup",Ge)}else setTimeout(Ne,50)},hr.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},hr.prototype.setUneditable=function(){},hr.prototype.needsContentAttribute=!1;function au(e,t){if(t=t?U(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 A=X();t.autofocus=A==e||e.getAttribute("autofocus")!=null&&A==document.body}function O(){e.value=de.getValue()}var M;if(e.form&&(Se(e.form,"submit",O),!t.leaveSubmitMethodAlone)){var V=e.form;M=V.submit;try{var ae=V.submit=function(){O(),V.submit=M,V.submit(),V.submit=ae}}catch(fe){}}t.finishInit=function(fe){fe.save=O,fe.getTextArea=function(){return e},fe.toTextArea=function(){fe.toTextArea=isNaN,O(),e.parentNode.removeChild(fe.getWrapperElement()),e.style.display="",e.form&&(Ye(e.form,"submit",O),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=M))}},e.style.display="none";var de=nr(function(fe){return e.parentNode.insertBefore(fe,e.nextSibling)},t);return de}function iu(e){e.off=Ye,e.on=Se,e.wheelEventPixels=fl,e.Doc=Hr,e.splitLines=dt,e.countColumn=W,e.findColumn=ue,e.isWordChar=Y,e.Pass=he,e.signal=Ie,e.Line=Fn,e.changeEnd=qn,e.scrollbarModel=No,e.Pos=$e,e.cmpPos=yt,e.modes=Wt,e.mimeModes=gt,e.resolveMode=Ht,e.getMode=Ke,e.modeExtensions=ot,e.extendMode=bt,e.copyState=Ft,e.startState=At,e.innerMode=Bt,e.commands=mi,e.keyMap=Wn,e.keyName=ws,e.isModifierKey=xs,e.lookupKey=Ba,e.normalizeKeyMap=Il,e.StringStream=Dt,e.SharedTextMarker=fi,e.TextMarker=ta,e.LineWidget=di,e.e_preventDefault=ye,e.e_stopPropagation=Ee,e.e_stop=Oe,e.addClass=G,e.contains=k,e.rmClass=c,e.keyNames=ra}Jl(nr),eu(nr);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Hi in Hr.prototype)Hr.prototype.hasOwnProperty(Hi)&&ie(ou,Hi)<0&&(nr.prototype[Hi]=function(e){return function(){return e.apply(this.doc,arguments)}}(Hr.prototype[Hi]));return Ce(Hr),nr.inputStyles={textarea:hr,contenteditable:Zt},nr.defineMode=function(e){!nr.defaults.mode&&e!="null"&&(nr.defaults.mode=e),xt.apply(this,arguments)},nr.defineMIME=er,nr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),nr.defineMIME("text/plain","null"),nr.defineExtension=function(e,t){nr.prototype[e]=t},nr.defineDocExtension=function(e,t){Hr.prototype[e]=t},nr.fromTextArea=au,iu(nr),nr.version="5.58.2",nr})},WYAk:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){(function(){var m=P,T=m.lib,L=T.Base,S=m.enc,g=S.Utf8,_=m.algo,d=_.HMAC=L.extend({init:function(o,i){o=this._hasher=new o.init,typeof i=="string"&&(i=g.parse(i));var r=o.blockSize,h=r*4;i.sigBytes>h&&(i=o.finalize(i)),i.clamp();for(var p=this._oKey=i.clone(),f=this._iKey=i.clone(),x=p.words,v=f.words,l=0;l<r;l++)x[l]^=1549556828,v[l]^=909522486;p.sigBytes=f.sigBytes=h,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var i=this._hasher,r=i.finalize(o);i.reset();var h=i.finalize(this._oKey.clone().concat(r));return h}})})()})},WaYH:function(I,Z,N){"use strict";var P=N("rePB"),m=N("Ff2n"),T=N("VTBJ"),L=N("1OyB"),S=N("vuIU"),g=N("JX7q"),_=N("Ji7U"),d=N("LK+K"),o=N("cDcd"),i=N("TSYQ"),r=N.n(i),h=N("sboe"),p=N("OZM5"),f=function(R){var D=R.prefixCls,c=R.level,b=R.isStart,E=R.isEnd;if(!c)return null;for(var C="".concat(D,"-indent-unit"),F=[],j=0;j<c;j+=1){var k;F.push(o.createElement("span",{key:j,className:r()(C,(k={},Object(P.a)(k,"".concat(C,"-start"),b[j+1]),Object(P.a)(k,"".concat(C,"-end"),E[j+1]),Object(P.a)(k,"".concat(C,"-end-first-level"),!j&&E[0]),k))}))}return o.createElement("span",{"aria-hidden":"true",className:"".concat(D,"-indent")},F)},x=f,v=N("815F"),l="open",n="close",s="---",u=function(a){Object(_.a)(D,a);var R=Object(d.a)(D);function D(){var c;return Object(L.a)(this,D),c=R.apply(this,arguments),c.state={dragNodeHighlight:!1},c.onSelectorClick=function(b){var E=c.props.context.onNodeClick;E(b,Object(v.b)(c.props)),c.isSelectable()?c.onSelect(b):c.onCheck(b)},c.onSelectorDoubleClick=function(b){var E=c.props.context.onNodeDoubleClick;E(b,Object(v.b)(c.props))},c.onSelect=function(b){if(c.isDisabled())return;var E=c.props.context.onNodeSelect;b.preventDefault(),E(b,Object(v.b)(c.props))},c.onCheck=function(b){if(c.isDisabled())return;var E=c.props,C=E.disableCheckbox,F=E.checked,j=c.props.context.onNodeCheck;if(!c.isCheckable()||C)return;b.preventDefault();var k=!F;j(b,Object(v.b)(c.props),k)},c.onMouseEnter=function(b){var E=c.props.context.onNodeMouseEnter;E(b,Object(v.b)(c.props))},c.onMouseLeave=function(b){var E=c.props.context.onNodeMouseLeave;E(b,Object(v.b)(c.props))},c.onContextMenu=function(b){var E=c.props.context.onNodeContextMenu;E(b,Object(v.b)(c.props))},c.onDragStart=function(b){var E=c.props.context.onNodeDragStart;b.stopPropagation(),c.setState({dragNodeHighlight:!0}),E(b,Object(g.a)(c));try{b.dataTransfer.setData("text/plain","")}catch(C){}},c.onDragEnter=function(b){var E=c.props.context.onNodeDragEnter;b.preventDefault(),b.stopPropagation(),E(b,Object(g.a)(c))},c.onDragOver=function(b){var E=c.props.context.onNodeDragOver;b.preventDefault(),b.stopPropagation(),E(b,Object(g.a)(c))},c.onDragLeave=function(b){var E=c.props.context.onNodeDragLeave;b.stopPropagation(),E(b,Object(g.a)(c))},c.onDragEnd=function(b){var E=c.props.context.onNodeDragEnd;b.stopPropagation(),c.setState({dragNodeHighlight:!1}),E(b,Object(g.a)(c))},c.onDrop=function(b){var E=c.props.context.onNodeDrop;b.preventDefault(),b.stopPropagation(),c.setState({dragNodeHighlight:!1}),E(b,Object(g.a)(c))},c.onExpand=function(b){var E=c.props.context.onNodeExpand;E(b,Object(v.b)(c.props))},c.setSelectHandle=function(b){c.selectHandle=b},c.getNodeState=function(){var b=c.props.expanded;return c.isLeaf()?null:b?l:n},c.hasChildren=function(){var b=c.props.eventKey,E=c.props.context.keyEntities,C=E[b]||{},F=C.children;return!!(F||[]).length},c.isLeaf=function(){var b=c.props,E=b.isLeaf,C=b.loaded,F=c.props.context.loadData,j=c.hasChildren();return E===!1?!1:E||!F&&!j||F&&C&&!j},c.isDisabled=function(){var b=c.props.disabled,E=c.props.context.disabled;return!!(E||b)},c.isCheckable=function(){var b=c.props.checkable,E=c.props.context.checkable;return!E||b===!1?!1:E},c.syncLoadData=function(b){var E=b.expanded,C=b.loading,F=b.loaded,j=c.props.context,k=j.loadData,X=j.onNodeLoad;if(C)return;k&&E&&!c.isLeaf()&&(!c.hasChildren()&&!F&&X(Object(v.b)(c.props)))},c.renderSwitcher=function(){var b=c.props,E=b.expanded,C=b.switcherIcon,F=c.props.context,j=F.prefixCls,k=F.switcherIcon,X=C||k;if(c.isLeaf())return o.createElement("span",{className:r()("".concat(j,"-switcher"),"".concat(j,"-switcher-noop"))},typeof X=="function"?X(Object(T.a)(Object(T.a)({},c.props),{},{isLeaf:!0})):X);var G=r()("".concat(j,"-switcher"),"".concat(j,"-switcher_").concat(E?l:n));return o.createElement("span",{onClick:c.onExpand,className:G},typeof X=="function"?X(Object(T.a)(Object(T.a)({},c.props),{},{isLeaf:!1})):X)},c.renderCheckbox=function(){var b=c.props,E=b.checked,C=b.halfChecked,F=b.disableCheckbox,j=c.props.context.prefixCls,k=c.isDisabled(),X=c.isCheckable();if(!X)return null;var G=typeof X!="boolean"?X:null;return o.createElement("span",{className:r()("".concat(j,"-checkbox"),E&&"".concat(j,"-checkbox-checked"),!E&&C&&"".concat(j,"-checkbox-indeterminate"),(k||F)&&"".concat(j,"-checkbox-disabled")),onClick:c.onCheck},G)},c.renderIcon=function(){var b=c.props.loading,E=c.props.context.prefixCls;return o.createElement("span",{className:r()("".concat(E,"-iconEle"),"".concat(E,"-icon__").concat(c.getNodeState()||"docu"),b&&"".concat(E,"-icon_loading"))})},c.renderSelector=function(){var b=c.state.dragNodeHighlight,E=c.props,C=E.title,F=E.selected,j=E.icon,k=E.loading,X=E.data,G=c.props.context,H=G.prefixCls,K=G.showIcon,B=G.icon,U=G.draggable,W=G.loadData,Q=G.titleRender,ie=c.isDisabled(),ce="".concat(H,"-node-content-wrapper"),he;if(K){var be=j||B;he=be?o.createElement("span",{className:r()("".concat(H,"-iconEle"),"".concat(H,"-icon__customize"))},typeof be=="function"?be(c.props):be):c.renderIcon()}else W&&k&&(he=c.renderIcon());var ne;typeof C=="function"?ne=C(X):Q?ne=Q(X):ne=C;var le=o.createElement("span",{className:"".concat(H,"-title")},ne);return o.createElement("span",{ref:c.setSelectHandle,title:typeof C=="string"?C:"",className:r()("".concat(ce),"".concat(ce,"-").concat(c.getNodeState()||"normal"),!ie&&(F||b)&&"".concat(H,"-node-selected"),!ie&&U&&"draggable"),draggable:!ie&&U||void 0,"aria-grabbed":!ie&&U||void 0,onMouseEnter:c.onMouseEnter,onMouseLeave:c.onMouseLeave,onContextMenu:c.onContextMenu,onClick:c.onSelectorClick,onDoubleClick:c.onSelectorDoubleClick,onDragStart:U?c.onDragStart:void 0},he,le)},c}return Object(S.a)(D,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var b=this.props.selectable,E=this.props.context.selectable;return typeof b=="boolean"?b:E}},{key:"render",value:function(){var b,E=this.props,C=E.eventKey,F=E.className,j=E.style,k=E.dragOver,X=E.dragOverGapTop,G=E.dragOverGapBottom,H=E.isLeaf,K=E.isStart,B=E.isEnd,U=E.expanded,W=E.selected,Q=E.checked,ie=E.halfChecked,ce=E.loading,he=E.domRef,be=E.active,ne=E.onMouseMove,le=Object(m.a)(E,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ue=this.props.context,re=ue.prefixCls,oe=ue.filterTreeNode,q=ue.draggable,se=ue.keyEntities,J=this.isDisabled(),ee=Object(p.f)(le),ge=se[C]||{},te=ge.level,Y=B[B.length-1];return o.createElement("div",Object.assign({ref:he,className:r()(F,"".concat(re,"-treenode"),(b={},Object(P.a)(b,"".concat(re,"-treenode-disabled"),J),Object(P.a)(b,"".concat(re,"-treenode-switcher-").concat(U?"open":"close"),!H),Object(P.a)(b,"".concat(re,"-treenode-checkbox-checked"),Q),Object(P.a)(b,"".concat(re,"-treenode-checkbox-indeterminate"),ie),Object(P.a)(b,"".concat(re,"-treenode-selected"),W),Object(P.a)(b,"".concat(re,"-treenode-loading"),ce),Object(P.a)(b,"".concat(re,"-treenode-active"),be),Object(P.a)(b,"".concat(re,"-treenode-leaf-last"),Y),Object(P.a)(b,"drag-over",!J&&k),Object(P.a)(b,"drag-over-gap-top",!J&&X),Object(P.a)(b,"drag-over-gap-bottom",!J&&G),Object(P.a)(b,"filter-node",oe&&oe(Object(v.b)(this.props))),b)),style:j,onDragEnter:q?this.onDragEnter:void 0,onDragOver:q?this.onDragOver:void 0,onDragLeave:q?this.onDragLeave:void 0,onDrop:q?this.onDrop:void 0,onDragEnd:q?this.onDragEnd:void 0,onMouseMove:ne},ee),o.createElement(x,{prefixCls:re,level:te,isStart:K,isEnd:B}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),D}(o.Component),w=function(R){return o.createElement(h.a.Consumer,null,function(D){return o.createElement(u,Object.assign({},R,{context:D}))})};w.displayName="TreeNode",w.defaultProps={title:s},w.isTreeNode=1;var y=Z.a=w},XIdC:function(I,Z,N){"use strict";var P=N("rePB"),m=N("ODXe"),T=N("Ff2n"),L=N("cDcd"),S=N.n(L),g=N("TSYQ"),_=N.n(g),d=N("6cGi"),o=N("4IlW"),i=L.forwardRef(function(r,h){var p,f=r.prefixCls,x=f===void 0?"rc-switch":f,v=r.className,l=r.checked,n=r.defaultChecked,s=r.disabled,u=r.loadingIcon,w=r.checkedChildren,y=r.unCheckedChildren,a=r.onClick,R=r.onChange,D=r.onKeyDown,c=Object(T.a)(r,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),b=Object(d.a)(!1,{value:l,defaultValue:n}),E=Object(m.a)(b,2),C=E[0],F=E[1];function j(H,K){var B=C;return s||(B=H,F(B),R==null||R(B,K)),B}function k(H){H.which===o.a.LEFT?j(!1,H):H.which===o.a.RIGHT&&j(!0,H),D==null||D(H)}function X(H){var K=j(!C,H);a==null||a(K,H)}var G=_()(x,v,(p={},Object(P.a)(p,"".concat(x,"-checked"),C),Object(P.a)(p,"".concat(x,"-disabled"),s),p));return L.createElement("button",Object.assign({},c,{type:"button",role:"switch","aria-checked":C,disabled:s,className:G,ref:h,onKeyDown:k,onClick:X}),u,L.createElement("span",{className:"".concat(x,"-inner")},C?w:y))});i.displayName="Switch",Z.a=i},Y1PL:function(I,Z,N){"use strict";N.r(Z),N.d(Z,"ResizableTextArea",function(){return ie});var P=N("wx14"),m=N("1OyB"),T=N("vuIU"),L=N("Ji7U"),S=N("LK+K"),g=N("cDcd"),_=N("VTBJ"),d=N("rePB"),o=N("Zm9Q"),i=N("Kwbf"),r=N("c+Xe"),h=N("m+aA"),p=N("bdgK"),f=new Map;function x(be){be.forEach(function(ne){var le,ue=ne.target;(le=f.get(ue))===null||le===void 0||le.forEach(function(re){return re(ue)})})}var v=new p.default(x),l=null,n=null;function s(be,ne){f.has(be)||(f.set(be,new Set),v.observe(be)),f.get(be).add(ne)}function u(be,ne){f.has(be)&&(f.get(be).delete(ne),f.get(be).size||(v.unobserve(be),f.delete(be)))}var w=function(be){Object(L.a)(le,be);var ne=Object(S.a)(le);function le(){return Object(m.a)(this,le),ne.apply(this,arguments)}return Object(T.a)(le,[{key:"render",value:function(){return this.props.children}}]),le}(g.Component),y=g.createContext(null);function a(be){var ne=be.children,le=be.onBatchResize,ue=g.useRef(0),re=g.useRef([]),oe=g.useContext(y),q=g.useCallback(function(se,J,ee){ue.current+=1;var ge=ue.current;re.current.push({size:se,element:J,data:ee}),Promise.resolve().then(function(){ge===ue.current&&(le==null||le(re.current),re.current=[])}),oe==null||oe(se,J,ee)},[le,oe]);return g.createElement(y.Provider,{value:q},ne)}function R(be){var ne=be.children,le=be.disabled,ue=g.useRef(null),re=g.useRef(null),oe=g.useContext(y),q=g.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),se=g.isValidElement(ne)&&Object(r.c)(ne),J=se?ne.ref:null,ee=g.useMemo(function(){return Object(r.a)(J,ue)},[J,ue]),ge=g.useRef(be);ge.current=be;var te=g.useCallback(function(Y){var z=ge.current,$=z.onResize,me=z.data,pe=Y.getBoundingClientRect(),xe=pe.width,Re=pe.height,ke=Y.offsetWidth,Me=Y.offsetHeight,Pe=Math.floor(xe),je=Math.floor(Re);if(q.current.width!==Pe||q.current.height!==je||q.current.offsetWidth!==ke||q.current.offsetHeight!==Me){var Fe={width:Pe,height:je,offsetWidth:ke,offsetHeight:Me};q.current=Fe;var We=ke===Math.round(xe)?xe:ke,Se=Me===Math.round(Re)?Re:Me,Xe=Object(_.a)(Object(_.a)({},Fe),{},{offsetWidth:We,offsetHeight:Se});oe==null||oe(Xe,Y,me),$&&Promise.resolve().then(function(){$(Xe,Y)})}},[]);return g.useEffect(function(){var Y=Object(h.a)(ue.current)||Object(h.a)(re.current);return Y&&!le&&s(Y,te),function(){return u(Y,te)}},[ue.current,le]),g.createElement(w,{ref:re},se?g.cloneElement(ne,{ref:ee}):ne)}var D="rc-observer-key";function c(be){var ne=be.children,le=Object(o.a)(ne);return le.map(function(ue,re){var oe=(ue==null?void 0:ue.key)||"".concat(D,"-").concat(re);return g.createElement(R,Object(P.a)({},be,{key:oe}),ue)})}c.Collection=a;var b=c,E=N("bT9E"),C=N("TSYQ"),F=N.n(C),j=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,k=["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"],X={},G;function H(be){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,le=be.getAttribute("id")||be.getAttribute("data-reactid")||be.getAttribute("name");if(ne&&X[le])return X[le];var ue=window.getComputedStyle(be),re=ue.getPropertyValue("box-sizing")||ue.getPropertyValue("-moz-box-sizing")||ue.getPropertyValue("-webkit-box-sizing"),oe=parseFloat(ue.getPropertyValue("padding-bottom"))+parseFloat(ue.getPropertyValue("padding-top")),q=parseFloat(ue.getPropertyValue("border-bottom-width"))+parseFloat(ue.getPropertyValue("border-top-width")),se=k.map(function(ee){return"".concat(ee,":").concat(ue.getPropertyValue(ee))}).join(";"),J={sizingStyle:se,paddingSize:oe,borderSize:q,boxSizing:re};return ne&&le&&(X[le]=J),J}function K(be){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;G||(G=document.createElement("textarea"),G.setAttribute("tab-index","-1"),G.setAttribute("aria-hidden","true"),document.body.appendChild(G)),be.getAttribute("wrap")?G.setAttribute("wrap",be.getAttribute("wrap")):G.removeAttribute("wrap");var re=H(be,ne),oe=re.paddingSize,q=re.borderSize,se=re.boxSizing,J=re.sizingStyle;G.setAttribute("style","".concat(J,";").concat(j)),G.value=be.value||be.placeholder||"";var ee=Number.MIN_SAFE_INTEGER,ge=Number.MAX_SAFE_INTEGER,te=G.scrollHeight,Y;if(se==="border-box"?te+=q:se==="content-box"&&(te-=oe),le!==null||ue!==null){G.value=" ";var z=G.scrollHeight-oe;le!==null&&(ee=z*le,se==="border-box"&&(ee=ee+oe+q),te=Math.max(ee,te)),ue!==null&&(ge=z*ue,se==="border-box"&&(ge=ge+oe+q),Y=te>ge?"":"hidden",te=Math.min(ge,te))}return{height:te,minHeight:ee,maxHeight:ge,overflowY:Y,resize:"none"}}var B=N("Gytx"),U=N.n(B),W;(function(be){be[be.NONE=0]="NONE",be[be.RESIZING=1]="RESIZING",be[be.RESIZED=2]="RESIZED"})(W||(W={}));var Q=function(be){Object(L.a)(le,be);var ne=Object(S.a)(le);function le(ue){var re;return Object(m.a)(this,le),re=ne.call(this,ue),re.nextFrameActionId=void 0,re.resizeFrameId=void 0,re.textArea=void 0,re.saveTextArea=function(oe){re.textArea=oe},re.handleResize=function(oe){var q=re.state.resizeStatus,se=re.props,J=se.autoSize,ee=se.onResize;if(q!==W.NONE)return;typeof ee=="function"&&ee(oe),J&&re.resizeOnNextFrame()},re.resizeOnNextFrame=function(){cancelAnimationFrame(re.nextFrameActionId),re.nextFrameActionId=requestAnimationFrame(re.resizeTextarea)},re.resizeTextarea=function(){var oe=re.props.autoSize;if(!oe||!re.textArea)return;var q=oe.minRows,se=oe.maxRows,J=K(re.textArea,!1,q,se);re.setState({textareaStyles:J,resizeStatus:W.RESIZING},function(){cancelAnimationFrame(re.resizeFrameId),re.resizeFrameId=requestAnimationFrame(function(){re.setState({resizeStatus:W.RESIZED},function(){re.resizeFrameId=requestAnimationFrame(function(){re.setState({resizeStatus:W.NONE}),re.fixFirefoxAutoScroll()})})})})},re.renderTextArea=function(){var oe=re.props,q=oe.prefixCls,se=q===void 0?"rc-textarea":q,J=oe.autoSize,ee=oe.onResize,ge=oe.className,te=oe.disabled,Y=re.state,z=Y.textareaStyles,$=Y.resizeStatus,me=Object(E.a)(re.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),pe=F()(se,ge,Object(d.a)({},"".concat(se,"-disabled"),te));"value"in me&&(me.value=me.value||"");var xe=Object(_.a)(Object(_.a)(Object(_.a)({},re.props.style),z),$===W.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return g.createElement(b,{onResize:re.handleResize,disabled:!(J||ee)},g.createElement("textarea",Object(P.a)({},me,{className:pe,style:xe,ref:re.saveTextArea})))},re.state={textareaStyles:{},resizeStatus:W.NONE},re}return Object(T.a)(le,[{key:"componentDidUpdate",value:function(re){(re.value!==this.props.value||!U()(re.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 re=this.textArea.selectionStart,oe=this.textArea.selectionEnd;this.textArea.setSelectionRange(re,oe)}}catch(q){}}},{key:"render",value:function(){return this.renderTextArea()}}]),le}(g.Component),ie=Q,ce=function(be){Object(L.a)(le,be);var ne=Object(S.a)(le);function le(ue){var re;Object(m.a)(this,le),re=ne.call(this,ue),re.resizableTextArea=void 0,re.focus=function(){re.resizableTextArea.textArea.focus()},re.saveTextArea=function(q){re.resizableTextArea=q},re.handleChange=function(q){var se=re.props.onChange;re.setValue(q.target.value,function(){re.resizableTextArea.resizeTextarea()}),se&&se(q)},re.handleKeyDown=function(q){var se=re.props,J=se.onPressEnter,ee=se.onKeyDown;q.keyCode===13&&J&&J(q),ee&&ee(q)};var oe=typeof ue.value=="undefined"||ue.value===null?ue.defaultValue:ue.value;return re.state={value:oe},re}return Object(T.a)(le,[{key:"setValue",value:function(re,oe){"value"in this.props||this.setState({value:re},oe)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return g.createElement(ie,Object(P.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(re){return"value"in re?{value:re.value}:null}}]),le}(g.Component),he=Z.default=ce},ZD9Y:function(I,Z,N){"use strict";var P=N("BoS7"),m=N("Sdc0"),T=N("OaEy"),L=N("2fM7"),S=N("cDcd"),g=N.n(S),_=N("lOMy"),d=N.n(_),o=L.a.Option;Z.a=function(i){var r=i.onFontSizeChange,h=i.cmFontSize,p=i.cmCodeMode,f=i.onCodeModeChange,x=i.onTabToSpace,v=i.className,l=v===void 0?"":v,n=i.tabToSpace,s=i.children;return g.a.createElement("div",{className:"tpi-code-setting ".concat(l)},g.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),g.a.createElement("section",null,g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),g.a.createElement(L.a,{bordered:!1,size:"small",value:p,onChange:f},g.a.createElement(o,{value:"vs"},"\u767D\u8272\u80CC\u666F"),g.a.createElement(o,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),g.a.createElement(L.a,{bordered:!1,size:"small",value:h,onChange:r},g.a.createElement(o,{value:12},"12px"),g.a.createElement(o,{value:14},"14px"),g.a.createElement(o,{value:16},"16px"),g.a.createElement(o,{value:18},"18px"),g.a.createElement(o,{value:20},"20px"),g.a.createElement(o,{value:22},"22px"))),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"Tab\u8F6C\u6362"),g.a.createElement(m.a,{checked:n,onChange:x}))),g.a.createElement("h3",null,"\u5FEB\u6377\u952E"),g.a.createElement("section",null,g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),g.a.createElement("span",null,"Ctrl + S")),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),g.a.createElement("span",null,"F1 / Alt + F1")),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),g.a.createElement("span",null,"Ctrl + ]/[")),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),g.a.createElement("span",null,"Ctrl + Shift + \\")),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),g.a.createElement("span",null,"Home")),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),g.a.createElement("span",null,"End"))),s)}},ZpRC:function(I,Z,N){"use strict";function P(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function m(r,h){return(!h||r!=="hidden")&&r!=="visible"&&r!=="clip"}function T(r,h){if(r.clientHeight<r.scrollHeight||r.clientWidth<r.scrollWidth){var p=getComputedStyle(r,null);return m(p.overflowY,h)||m(p.overflowX,h)||function(f){var x=function(v){if(!v.ownerDocument||!v.ownerDocument.defaultView)return null;try{return v.ownerDocument.defaultView.frameElement}catch(l){return null}}(f);return!!x&&(x.clientHeight<f.scrollHeight||x.clientWidth<f.scrollWidth)}(r)}return!1}function L(r,h,p,f,x,v,l,n){return v<r&&l>h||v>r&&l<h?0:v<=r&&n<=p||l>=h&&n>=p?v-r-f:l>h&&n<p||v<r&&n>p?l-h+x:0}var S=function(r,h){var p=window,f=h.scrollMode,x=h.block,v=h.inline,l=h.boundary,n=h.skipOverflowHiddenElements,s=typeof l=="function"?l:function(z){return z!==l};if(!P(r))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,w=[],y=r;P(y)&&s(y);){if((y=y.parentElement)===u){w.push(y);break}y!=null&&y===document.body&&T(y)&&!T(document.documentElement)||y!=null&&T(y,n)&&w.push(y)}for(var a=p.visualViewport?p.visualViewport.width:innerWidth,R=p.visualViewport?p.visualViewport.height:innerHeight,D=window.scrollX||pageXOffset,c=window.scrollY||pageYOffset,b=r.getBoundingClientRect(),E=b.height,C=b.width,F=b.top,j=b.right,k=b.bottom,X=b.left,G=x==="start"||x==="nearest"?F:x==="end"?k:F+E/2,H=v==="center"?X+C/2:v==="end"?j:X,K=[],B=0;B<w.length;B++){var U=w[B],W=U.getBoundingClientRect(),Q=W.height,ie=W.width,ce=W.top,he=W.right,be=W.bottom,ne=W.left;if(f==="if-needed"&&F>=0&&X>=0&&k<=R&&j<=a&&F>=ce&&k<=be&&X>=ne&&j<=he)return K;var le=getComputedStyle(U),ue=parseInt(le.borderLeftWidth,10),re=parseInt(le.borderTopWidth,10),oe=parseInt(le.borderRightWidth,10),q=parseInt(le.borderBottomWidth,10),se=0,J=0,ee="offsetWidth"in U?U.offsetWidth-U.clientWidth-ue-oe:0,ge="offsetHeight"in U?U.offsetHeight-U.clientHeight-re-q:0;if(u===U)se=x==="start"?G:x==="end"?G-R:x==="nearest"?L(c,c+R,R,re,q,c+G,c+G+E,E):G-R/2,J=v==="start"?H:v==="center"?H-a/2:v==="end"?H-a:L(D,D+a,a,ue,oe,D+H,D+H+C,C),se=Math.max(0,se+c),J=Math.max(0,J+D);else{se=x==="start"?G-ce-re:x==="end"?G-be+q+ge:x==="nearest"?L(ce,be,Q,re,q+ge,G,G+E,E):G-(ce+Q/2)+ge/2,J=v==="start"?H-ne-ue:v==="center"?H-(ne+ie/2)+ee/2:v==="end"?H-he+oe+ee:L(ne,he,ie,ue,oe+ee,H,H+C,C);var te=U.scrollLeft,Y=U.scrollTop;G+=Y-(se=Math.max(0,Math.min(Y+se,U.scrollHeight-Q+ge))),H+=te-(J=Math.max(0,Math.min(te+J,U.scrollWidth-ie+ee)))}K.push({el:U,top:se,left:J})}return K};function g(r){return r===Object(r)&&Object.keys(r).length!==0}function _(r,h){h===void 0&&(h="auto");var p="scrollBehavior"in document.body.style;r.forEach(function(f){var x=f.el,v=f.top,l=f.left;x.scroll&&p?x.scroll({top:v,left:l,behavior:h}):(x.scrollTop=v,x.scrollLeft=l)})}function d(r){return r===!1?{block:"end",inline:"nearest"}:g(r)?r:{block:"start",inline:"nearest"}}function o(r,h){var p=!r.ownerDocument.documentElement.contains(r);if(g(h)&&typeof h.behavior=="function")return h.behavior(p?[]:S(r,h));if(p)return;var f=d(h);return _(S(r,f),f.behavior)}var i=Z.a=o},Zss7:function(I,Z,N){var P;(function(m){var T=/^\s+/,L=/\s+$/,S=0,g=m.round,_=m.min,d=m.max,o=m.random;function i(q,se){if(q=q||"",se=se||{},q instanceof i)return q;if(!(this instanceof i))return new i(q,se);var J=r(q);this._originalInput=q,this._r=J.r,this._g=J.g,this._b=J.b,this._a=J.a,this._roundA=g(100*this._a)/100,this._format=se.format||J.format,this._gradientType=se.gradientType,this._r<1&&(this._r=g(this._r)),this._g<1&&(this._g=g(this._g)),this._b<1&&(this._b=g(this._b)),this._ok=J.ok,this._tc_id=S++}i.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var q=this.toRgb();return(q.r*299+q.g*587+q.b*114)/1e3},getLuminance:function(){var q=this.toRgb(),se,J,ee,ge,te,Y;return se=q.r/255,J=q.g/255,ee=q.b/255,se<=.03928?ge=se/12.92:ge=m.pow((se+.055)/1.055,2.4),J<=.03928?te=J/12.92:te=m.pow((J+.055)/1.055,2.4),ee<=.03928?Y=ee/12.92:Y=m.pow((ee+.055)/1.055,2.4),.2126*ge+.7152*te+.0722*Y},setAlpha:function(q){return this._a=K(q),this._roundA=g(100*this._a)/100,this},toHsv:function(){var q=x(this._r,this._g,this._b);return{h:q.h*360,s:q.s,v:q.v,a:this._a}},toHsvString:function(){var q=x(this._r,this._g,this._b),se=g(q.h*360),J=g(q.s*100),ee=g(q.v*100);return this._a==1?"hsv("+se+", "+J+"%, "+ee+"%)":"hsva("+se+", "+J+"%, "+ee+"%, "+this._roundA+")"},toHsl:function(){var q=p(this._r,this._g,this._b);return{h:q.h*360,s:q.s,l:q.l,a:this._a}},toHslString:function(){var q=p(this._r,this._g,this._b),se=g(q.h*360),J=g(q.s*100),ee=g(q.l*100);return this._a==1?"hsl("+se+", "+J+"%, "+ee+"%)":"hsla("+se+", "+J+"%, "+ee+"%, "+this._roundA+")"},toHex:function(q){return l(this._r,this._g,this._b,q)},toHexString:function(q){return"#"+this.toHex(q)},toHex8:function(q){return n(this._r,this._g,this._b,this._a,q)},toHex8String:function(q){return"#"+this.toHex8(q)},toRgb:function(){return{r:g(this._r),g:g(this._g),b:g(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+g(this._r)+", "+g(this._g)+", "+g(this._b)+")":"rgba("+g(this._r)+", "+g(this._g)+", "+g(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:g(B(this._r,255)*100)+"%",g:g(B(this._g,255)*100)+"%",b:g(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+g(B(this._r,255)*100)+"%, "+g(B(this._g,255)*100)+"%, "+g(B(this._b,255)*100)+"%)":"rgba("+g(B(this._r,255)*100)+"%, "+g(B(this._g,255)*100)+"%, "+g(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:G[l(this._r,this._g,this._b,!0)]||!1},toFilter:function(q){var se="#"+s(this._r,this._g,this._b,this._a),J=se,ee=this._gradientType?"GradientType = 1, ":"";if(q){var ge=i(q);J="#"+s(ge._r,ge._g,ge._b,ge._a)}return"progid:DXImageTransform.Microsoft.gradient("+ee+"startColorstr="+se+",endColorstr="+J+")"},toString:function(q){var se=!!q;q=q||this._format;var J=!1,ee=this._a<1&&this._a>=0,ge=!se&&ee&&(q==="hex"||q==="hex6"||q==="hex3"||q==="hex4"||q==="hex8"||q==="name");return ge?q==="name"&&this._a===0?this.toName():this.toRgbString():(q==="rgb"&&(J=this.toRgbString()),q==="prgb"&&(J=this.toPercentageRgbString()),(q==="hex"||q==="hex6")&&(J=this.toHexString()),q==="hex3"&&(J=this.toHexString(!0)),q==="hex4"&&(J=this.toHex8String(!0)),q==="hex8"&&(J=this.toHex8String()),q==="name"&&(J=this.toName()),q==="hsl"&&(J=this.toHslString()),q==="hsv"&&(J=this.toHsvString()),J||this.toHexString())},clone:function(){return i(this.toString())},_applyModification:function(q,se){var J=q.apply(null,[this].concat([].slice.call(se)));return this._r=J._r,this._g=J._g,this._b=J._b,this.setAlpha(J._a),this},lighten:function(){return this._applyModification(a,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(D,arguments)},desaturate:function(){return this._applyModification(u,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(c,arguments)},_applyCombination:function(q,se){return q.apply(null,[this].concat([].slice.call(se)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(k,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},i.fromRatio=function(q,se){if(typeof q=="object"){var J={};for(var ee in q)q.hasOwnProperty(ee)&&(ee==="a"?J[ee]=q[ee]:J[ee]=he(q[ee]));q=J}return i(q,se)};function r(q){var se={r:0,g:0,b:0},J=1,ee=null,ge=null,te=null,Y=!1,z=!1;return typeof q=="string"&&(q=re(q)),typeof q=="object"&&(ue(q.r)&&ue(q.g)&&ue(q.b)?(se=h(q.r,q.g,q.b),Y=!0,z=String(q.r).substr(-1)==="%"?"prgb":"rgb"):ue(q.h)&&ue(q.s)&&ue(q.v)?(ee=he(q.s),ge=he(q.v),se=v(q.h,ee,ge),Y=!0,z="hsv"):ue(q.h)&&ue(q.s)&&ue(q.l)&&(ee=he(q.s),te=he(q.l),se=f(q.h,ee,te),Y=!0,z="hsl"),q.hasOwnProperty("a")&&(J=q.a)),J=K(J),{ok:Y,format:q.format||z,r:_(255,d(se.r,0)),g:_(255,d(se.g,0)),b:_(255,d(se.b,0)),a:J}}function h(q,se,J){return{r:B(q,255)*255,g:B(se,255)*255,b:B(J,255)*255}}function p(q,se,J){q=B(q,255),se=B(se,255),J=B(J,255);var ee=d(q,se,J),ge=_(q,se,J),te,Y,z=(ee+ge)/2;if(ee==ge)te=Y=0;else{var $=ee-ge;Y=z>.5?$/(2-ee-ge):$/(ee+ge);switch(ee){case q:te=(se-J)/$+(se<J?6:0);break;case se:te=(J-q)/$+2;break;case J:te=(q-se)/$+4;break}te/=6}return{h:te,s:Y,l:z}}function f(q,se,J){var ee,ge,te;q=B(q,360),se=B(se,100),J=B(J,100);function Y(me,pe,xe){return xe<0&&(xe+=1),xe>1&&(xe-=1),xe<1/6?me+(pe-me)*6*xe:xe<1/2?pe:xe<2/3?me+(pe-me)*(2/3-xe)*6:me}if(se===0)ee=ge=te=J;else{var z=J<.5?J*(1+se):J+se-J*se,$=2*J-z;ee=Y($,z,q+1/3),ge=Y($,z,q),te=Y($,z,q-1/3)}return{r:ee*255,g:ge*255,b:te*255}}function x(q,se,J){q=B(q,255),se=B(se,255),J=B(J,255);var ee=d(q,se,J),ge=_(q,se,J),te,Y,z=ee,$=ee-ge;if(Y=ee===0?0:$/ee,ee==ge)te=0;else{switch(ee){case q:te=(se-J)/$+(se<J?6:0);break;case se:te=(J-q)/$+2;break;case J:te=(q-se)/$+4;break}te/=6}return{h:te,s:Y,v:z}}function v(q,se,J){q=B(q,360)*6,se=B(se,100),J=B(J,100);var ee=m.floor(q),ge=q-ee,te=J*(1-se),Y=J*(1-ge*se),z=J*(1-(1-ge)*se),$=ee%6,me=[J,Y,te,te,z,J][$],pe=[z,J,J,Y,te,te][$],xe=[te,te,z,J,J,Y][$];return{r:me*255,g:pe*255,b:xe*255}}function l(q,se,J,ee){var ge=[ce(g(q).toString(16)),ce(g(se).toString(16)),ce(g(J).toString(16))];return ee&&ge[0].charAt(0)==ge[0].charAt(1)&&ge[1].charAt(0)==ge[1].charAt(1)&&ge[2].charAt(0)==ge[2].charAt(1)?ge[0].charAt(0)+ge[1].charAt(0)+ge[2].charAt(0):ge.join("")}function n(q,se,J,ee,ge){var te=[ce(g(q).toString(16)),ce(g(se).toString(16)),ce(g(J).toString(16)),ce(be(ee))];return ge&&te[0].charAt(0)==te[0].charAt(1)&&te[1].charAt(0)==te[1].charAt(1)&&te[2].charAt(0)==te[2].charAt(1)&&te[3].charAt(0)==te[3].charAt(1)?te[0].charAt(0)+te[1].charAt(0)+te[2].charAt(0)+te[3].charAt(0):te.join("")}function s(q,se,J,ee){var ge=[ce(be(ee)),ce(g(q).toString(16)),ce(g(se).toString(16)),ce(g(J).toString(16))];return ge.join("")}i.equals=function(q,se){return!q||!se?!1:i(q).toRgbString()==i(se).toRgbString()},i.random=function(){return i.fromRatio({r:o(),g:o(),b:o()})};function u(q,se){se=se===0?0:se||10;var J=i(q).toHsl();return J.s-=se/100,J.s=U(J.s),i(J)}function w(q,se){se=se===0?0:se||10;var J=i(q).toHsl();return J.s+=se/100,J.s=U(J.s),i(J)}function y(q){return i(q).desaturate(100)}function a(q,se){se=se===0?0:se||10;var J=i(q).toHsl();return J.l+=se/100,J.l=U(J.l),i(J)}function R(q,se){se=se===0?0:se||10;var J=i(q).toRgb();return J.r=d(0,_(255,J.r-g(255*-(se/100)))),J.g=d(0,_(255,J.g-g(255*-(se/100)))),J.b=d(0,_(255,J.b-g(255*-(se/100)))),i(J)}function D(q,se){se=se===0?0:se||10;var J=i(q).toHsl();return J.l-=se/100,J.l=U(J.l),i(J)}function c(q,se){var J=i(q).toHsl(),ee=(J.h+se)%360;return J.h=ee<0?360+ee:ee,i(J)}function b(q){var se=i(q).toHsl();return se.h=(se.h+180)%360,i(se)}function E(q){var se=i(q).toHsl(),J=se.h;return[i(q),i({h:(J+120)%360,s:se.s,l:se.l}),i({h:(J+240)%360,s:se.s,l:se.l})]}function C(q){var se=i(q).toHsl(),J=se.h;return[i(q),i({h:(J+90)%360,s:se.s,l:se.l}),i({h:(J+180)%360,s:se.s,l:se.l}),i({h:(J+270)%360,s:se.s,l:se.l})]}function F(q){var se=i(q).toHsl(),J=se.h;return[i(q),i({h:(J+72)%360,s:se.s,l:se.l}),i({h:(J+216)%360,s:se.s,l:se.l})]}function j(q,se,J){se=se||6,J=J||30;var ee=i(q).toHsl(),ge=360/J,te=[i(q)];for(ee.h=(ee.h-(ge*se>>1)+720)%360;--se;)ee.h=(ee.h+ge)%360,te.push(i(ee));return te}function k(q,se){se=se||6;for(var J=i(q).toHsv(),ee=J.h,ge=J.s,te=J.v,Y=[],z=1/se;se--;)Y.push(i({h:ee,s:ge,v:te})),te=(te+z)%1;return Y}i.mix=function(q,se,J){J=J===0?0:J||50;var ee=i(q).toRgb(),ge=i(se).toRgb(),te=J/100,Y={r:(ge.r-ee.r)*te+ee.r,g:(ge.g-ee.g)*te+ee.g,b:(ge.b-ee.b)*te+ee.b,a:(ge.a-ee.a)*te+ee.a};return i(Y)},i.readability=function(q,se){var J=i(q),ee=i(se);return(m.max(J.getLuminance(),ee.getLuminance())+.05)/(m.min(J.getLuminance(),ee.getLuminance())+.05)},i.isReadable=function(q,se,J){var ee=i.readability(q,se),ge,te;te=!1,ge=oe(J);switch(ge.level+ge.size){case"AAsmall":case"AAAlarge":te=ee>=4.5;break;case"AAlarge":te=ee>=3;break;case"AAAsmall":te=ee>=7;break}return te},i.mostReadable=function(q,se,J){var ee=null,ge=0,te,Y,z,$;J=J||{},Y=J.includeFallbackColors,z=J.level,$=J.size;for(var me=0;me<se.length;me++)te=i.readability(q,se[me]),te>ge&&(ge=te,ee=i(se[me]));return i.isReadable(q,ee,{level:z,size:$})||!Y?ee:(J.includeFallbackColors=!1,i.mostReadable(q,["#fff","#000"],J))};var X=i.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},G=i.hexNames=H(X);function H(q){var se={};for(var J in q)q.hasOwnProperty(J)&&(se[q[J]]=J);return se}function K(q){return q=parseFloat(q),(isNaN(q)||q<0||q>1)&&(q=1),q}function B(q,se){Q(q)&&(q="100%");var J=ie(q);return q=_(se,d(0,parseFloat(q))),J&&(q=parseInt(q*se,10)/100),m.abs(q-se)<1e-6?1:q%se/parseFloat(se)}function U(q){return _(1,d(0,q))}function W(q){return parseInt(q,16)}function Q(q){return typeof q=="string"&&q.indexOf(".")!=-1&&parseFloat(q)===1}function ie(q){return typeof q=="string"&&q.indexOf("%")!=-1}function ce(q){return q.length==1?"0"+q:""+q}function he(q){return q<=1&&(q=q*100+"%"),q}function be(q){return m.round(parseFloat(q)*255).toString(16)}function ne(q){return W(q)/255}var le=function(){var q="[-\\+]?\\d+%?",se="[-\\+]?\\d*\\.\\d+%?",J="(?:"+se+")|(?:"+q+")",ee="[\\s|\\(]+("+J+")[,|\\s]+("+J+")[,|\\s]+("+J+")\\s*\\)?",ge="[\\s|\\(]+("+J+")[,|\\s]+("+J+")[,|\\s]+("+J+")[,|\\s]+("+J+")\\s*\\)?";return{CSS_UNIT:new RegExp(J),rgb:new RegExp("rgb"+ee),rgba:new RegExp("rgba"+ge),hsl:new RegExp("hsl"+ee),hsla:new RegExp("hsla"+ge),hsv:new RegExp("hsv"+ee),hsva:new RegExp("hsva"+ge),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 ue(q){return!!le.CSS_UNIT.exec(q)}function re(q){q=q.replace(T,"").replace(L,"").toLowerCase();var se=!1;if(X[q])q=X[q],se=!0;else if(q=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var J;return(J=le.rgb.exec(q))?{r:J[1],g:J[2],b:J[3]}:(J=le.rgba.exec(q))?{r:J[1],g:J[2],b:J[3],a:J[4]}:(J=le.hsl.exec(q))?{h:J[1],s:J[2],l:J[3]}:(J=le.hsla.exec(q))?{h:J[1],s:J[2],l:J[3],a:J[4]}:(J=le.hsv.exec(q))?{h:J[1],s:J[2],v:J[3]}:(J=le.hsva.exec(q))?{h:J[1],s:J[2],v:J[3],a:J[4]}:(J=le.hex8.exec(q))?{r:W(J[1]),g:W(J[2]),b:W(J[3]),a:ne(J[4]),format:se?"name":"hex8"}:(J=le.hex6.exec(q))?{r:W(J[1]),g:W(J[2]),b:W(J[3]),format:se?"name":"hex"}:(J=le.hex4.exec(q))?{r:W(J[1]+""+J[1]),g:W(J[2]+""+J[2]),b:W(J[3]+""+J[3]),a:ne(J[4]+""+J[4]),format:se?"name":"hex8"}:(J=le.hex3.exec(q))?{r:W(J[1]+""+J[1]),g:W(J[2]+""+J[2]),b:W(J[3]+""+J[3]),format:se?"name":"hex"}:!1}function oe(q){var se,J;return q=q||{level:"AA",size:"small"},se=(q.level||"AA").toUpperCase(),J=(q.size||"small").toLowerCase(),se!=="AA"&&se!=="AAA"&&(se="AA"),J!=="small"&&J!=="large"&&(J="small"),{level:se,size:J}}I.exports?I.exports=i:!(P=function(){return i}.call(Z,N,Z,I),P!==void 0&&(I.exports=P))})(Math)},b8wu:function(I,Z,N){I.exports={"code-panel-container":"code-panel-container___pVbpU","action-oj-bar":"action-oj-bar___1NMjh",active:"active___2NiTj"}},bCnd:function(I,Z,N){"use strict";N.d(Z,"b",function(){return L}),N.d(Z,"a",function(){return S});var P=N("je13"),m=N.n(P),T=!1;function L(g,_){var d=m.a.get("__ec");d||(d={}),d[g]=_,m.a.set("__ec",d)}function S(g,_){var d=m.a.get("__ec");return d?d[g]===void 0?_:d[g]:_}},bQjk:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return function(m){var T=P,L=T.lib,S=L.CipherParams,g=T.enc,_=g.Hex,d=T.format,o=d.Hex={stringify:function(i){return i.ciphertext.toString(_)},parse:function(i){var r=_.parse(i);return S.create({ciphertext:r})}}}(),P.format.Hex})},bT9E:function(I,Z,N){"use strict";N.d(Z,"a",function(){return m});var P=N("VTBJ");function m(T,L){var S=Object(P.a)({},T);return Array.isArray(L)&&L.forEach(function(g){delete S[g]}),S}},c5Ni:function(I,Z,N){},cDPC:function(I,Z,N){"use strict";var P=N("tJVT"),m=N("cDcd"),T=N.n(m),L=N("i3hx"),S=N.n(L);Z.a=function(g){var _=g.defaultX,d=_===void 0?"40%":_,o=g.leftChild,i=g.rightChild,r=g.className,h=g.hideResize,p=h===void 0?!1:h,f=Object(m.useState)(d),x=Object(P.a)(f,2),v=x[0],l=x[1],n=Object(m.useRef)();function s(){n.current=!0}Object(m.useEffect)(function(){function y(R){n.current&&l(R.pageX)}function a(){n.current=!1}return window.addEventListener("mousemove",y),window.addEventListener("mouseup",a),function(){window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",a)}},[]);var u=typeof v=="number"&&v!==.01?"".concat(v,"px"):d,w="calc(100% - ".concat(p?"0px":"4px"," - ").concat(u,")");return T.a.createElement("div",{className:"split-panel-container ".concat(r)},T.a.createElement("section",{style:{width:u,display:v===.01?"none":""}},o),T.a.createElement("section",{className:"resize-x-bar",onMouseDown:s},T.a.createElement("a",{className:"btn-resize"},T.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},T.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"})))),T.a.createElement("section",{style:{width:w}},i))}},cv67:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(m){var T=P,L=T.lib,S=L.WordArray,g=L.Hasher,_=T.algo,d=[];(function(){for(var f=0;f<64;f++)d[f]=m.abs(m.sin(f+1))*4294967296|0})();var o=_.MD5=g.extend({_doReset:function(){this._hash=new S.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(f,x){for(var v=0;v<16;v++){var l=x+v,n=f[l];f[l]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var s=this._hash.words,u=f[x+0],w=f[x+1],y=f[x+2],a=f[x+3],R=f[x+4],D=f[x+5],c=f[x+6],b=f[x+7],E=f[x+8],C=f[x+9],F=f[x+10],j=f[x+11],k=f[x+12],X=f[x+13],G=f[x+14],H=f[x+15],K=s[0],B=s[1],U=s[2],W=s[3];K=i(K,B,U,W,u,7,d[0]),W=i(W,K,B,U,w,12,d[1]),U=i(U,W,K,B,y,17,d[2]),B=i(B,U,W,K,a,22,d[3]),K=i(K,B,U,W,R,7,d[4]),W=i(W,K,B,U,D,12,d[5]),U=i(U,W,K,B,c,17,d[6]),B=i(B,U,W,K,b,22,d[7]),K=i(K,B,U,W,E,7,d[8]),W=i(W,K,B,U,C,12,d[9]),U=i(U,W,K,B,F,17,d[10]),B=i(B,U,W,K,j,22,d[11]),K=i(K,B,U,W,k,7,d[12]),W=i(W,K,B,U,X,12,d[13]),U=i(U,W,K,B,G,17,d[14]),B=i(B,U,W,K,H,22,d[15]),K=r(K,B,U,W,w,5,d[16]),W=r(W,K,B,U,c,9,d[17]),U=r(U,W,K,B,j,14,d[18]),B=r(B,U,W,K,u,20,d[19]),K=r(K,B,U,W,D,5,d[20]),W=r(W,K,B,U,F,9,d[21]),U=r(U,W,K,B,H,14,d[22]),B=r(B,U,W,K,R,20,d[23]),K=r(K,B,U,W,C,5,d[24]),W=r(W,K,B,U,G,9,d[25]),U=r(U,W,K,B,a,14,d[26]),B=r(B,U,W,K,E,20,d[27]),K=r(K,B,U,W,X,5,d[28]),W=r(W,K,B,U,y,9,d[29]),U=r(U,W,K,B,b,14,d[30]),B=r(B,U,W,K,k,20,d[31]),K=h(K,B,U,W,D,4,d[32]),W=h(W,K,B,U,E,11,d[33]),U=h(U,W,K,B,j,16,d[34]),B=h(B,U,W,K,G,23,d[35]),K=h(K,B,U,W,w,4,d[36]),W=h(W,K,B,U,R,11,d[37]),U=h(U,W,K,B,b,16,d[38]),B=h(B,U,W,K,F,23,d[39]),K=h(K,B,U,W,X,4,d[40]),W=h(W,K,B,U,u,11,d[41]),U=h(U,W,K,B,a,16,d[42]),B=h(B,U,W,K,c,23,d[43]),K=h(K,B,U,W,C,4,d[44]),W=h(W,K,B,U,k,11,d[45]),U=h(U,W,K,B,H,16,d[46]),B=h(B,U,W,K,y,23,d[47]),K=p(K,B,U,W,u,6,d[48]),W=p(W,K,B,U,b,10,d[49]),U=p(U,W,K,B,G,15,d[50]),B=p(B,U,W,K,D,21,d[51]),K=p(K,B,U,W,k,6,d[52]),W=p(W,K,B,U,a,10,d[53]),U=p(U,W,K,B,F,15,d[54]),B=p(B,U,W,K,w,21,d[55]),K=p(K,B,U,W,E,6,d[56]),W=p(W,K,B,U,H,10,d[57]),U=p(U,W,K,B,c,15,d[58]),B=p(B,U,W,K,X,21,d[59]),K=p(K,B,U,W,R,6,d[60]),W=p(W,K,B,U,j,10,d[61]),U=p(U,W,K,B,y,15,d[62]),B=p(B,U,W,K,C,21,d[63]),s[0]=s[0]+K|0,s[1]=s[1]+B|0,s[2]=s[2]+U|0,s[3]=s[3]+W|0},_doFinalize:function(){var f=this._data,x=f.words,v=this._nDataBytes*8,l=f.sigBytes*8;x[l>>>5]|=128<<24-l%32;var n=m.floor(v/4294967296),s=v;x[(l+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,x[(l+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,f.sigBytes=(x.length+1)*4,this._process();for(var u=this._hash,w=u.words,y=0;y<4;y++){var a=w[y];w[y]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360}return u},clone:function(){var f=g.clone.call(this);return f._hash=this._hash.clone(),f}});function i(f,x,v,l,n,s,u){var w=f+(x&v|~x&l)+n+u;return(w<<s|w>>>32-s)+x}function r(f,x,v,l,n,s,u){var w=f+(x&l|v&~l)+n+u;return(w<<s|w>>>32-s)+x}function h(f,x,v,l,n,s,u){var w=f+(x^v^l)+n+u;return(w<<s|w>>>32-s)+x}function p(f,x,v,l,n,s,u){var w=f+(v^(x|~l))+n+u;return(w<<s|w>>>32-s)+x}T.MD5=g._createHelper(o),T.HmacMD5=g._createHmacHelper(o)}(Math),P.MD5})},dejd:function(I,Z,N){},dmUQ:function(I,Z,N){"use strict";var P=N("Ff2n"),m=N("rePB"),T=N("1OyB"),L=N("vuIU"),S=N("Ji7U"),g=N("md7G"),_=N("foSv"),d=N("cDcd"),o=N.n(d),i=N("TSYQ"),r=N.n(i),h=N("4IlW");function p(E,C){var F=Object.keys(E);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(E);C&&(j=j.filter(function(k){return Object.getOwnPropertyDescriptor(E,k).enumerable})),F.push.apply(F,j)}return F}function f(E){for(var C=1;C<arguments.length;C++){var F=arguments[C]!=null?arguments[C]:{};C%2?p(Object(F),!0).forEach(function(j){Object(m.a)(E,j,F[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(F)):p(Object(F)).forEach(function(j){Object.defineProperty(E,j,Object.getOwnPropertyDescriptor(F,j))})}return E}function x(E){var C=v();return function(){var j=Object(_.a)(E),k;if(C){var X=Object(_.a)(this).constructor;k=Reflect.construct(j,arguments,X)}else k=j.apply(this,arguments);return Object(g.a)(this,k)}}function v(){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(E){return!1}}function l(){}function n(E){E.preventDefault()}var s=function(C){return C.replace(/[^\w.-]+/g,"")},u=200,w=600,y=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,a=function(C){return C!=null},R=function(C,F){return F===C||typeof F=="number"&&typeof C=="number"&&isNaN(F)&&isNaN(C)},D=function(E){Object(S.a)(F,E);var C=x(F);function F(j){var k;Object(T.a)(this,F),k=C.call(this,j),k.onKeyDown=function(H){var K=k.props,B=K.onKeyDown,U=K.onPressEnter;if(H.keyCode===h.a.UP){var W=k.getRatio(H);k.up(H,W,null),k.stop()}else if(H.keyCode===h.a.DOWN){var Q=k.getRatio(H);k.down(H,Q,null),k.stop()}else H.keyCode===h.a.ENTER&&U&&U(H);if(k.recordCursorPosition(),k.lastKeyCode=H.keyCode,B){for(var ie=arguments.length,ce=new Array(ie>1?ie-1:0),he=1;he<ie;he++)ce[he-1]=arguments[he];B.apply(void 0,[H].concat(ce))}},k.onKeyUp=function(H){var K=k.props.onKeyUp;if(k.stop(),k.recordCursorPosition(),K){for(var B=arguments.length,U=new Array(B>1?B-1:0),W=1;W<B;W++)U[W-1]=arguments[W];K.apply(void 0,[H].concat(U))}},k.onChange=function(H){var K=k.props.onChange;k.state.focused&&(k.inputting=!0),k.rawInput=k.props.parser(k.getValueFromEvent(H)),k.setState({inputValue:k.rawInput}),K(k.toNumber(k.rawInput))},k.onMouseUp=function(){var H=k.props.onMouseUp;k.recordCursorPosition(),H&&H.apply(void 0,arguments)},k.onFocus=function(){var H;k.setState({focused:!0}),(H=k.props).onFocus.apply(H,arguments)},k.onBlur=function(){var H=k.props.onBlur;k.inputting=!1,k.setState({focused:!1});var K=k.getCurrentValidValue(k.state.inputValue),B=k.setValue(K,l);if(H){var U=k.input.value,W=k.getInputDisplayValue({focus:!1,value:B});k.input.value=W&&Number(W),H.apply(void 0,arguments),k.input.value=U}},k.getRatio=function(H){var K=1;return H.metaKey||H.ctrlKey?K=.1:H.shiftKey&&(K=10),K},k.getFullNum=function(H){return isNaN(H)?H:/e/i.test(String(H))?Number(H).toFixed(18).replace(/\.?0+$/,""):H},k.getPrecision=function(H){if(a(k.props.precision))return k.props.precision;var K=String(H);if(K.indexOf("e-")>=0)return parseInt(K.slice(K.indexOf("e-")+2),10);var B=0;return K.indexOf(".")>=0&&(B=K.length-K.indexOf(".")-1),B},k.getInputDisplayValue=function(H){var K=H||k.state,B=K.focused,U=K.inputValue,W=K.value,Q;B?Q=U:Q=k.toPrecisionAsStep(W),Q==null&&(Q="");var ie=k.formatWrapper(Q);return a(k.props.decimalSeparator)&&(ie=ie.toString().replace(".",k.props.decimalSeparator)),ie},k.recordCursorPosition=function(){try{k.cursorStart=k.input.selectionStart,k.cursorEnd=k.input.selectionEnd,k.currentValue=k.input.value,k.cursorBefore=k.input.value.substring(0,k.cursorStart),k.cursorAfter=k.input.value.substring(k.cursorEnd)}catch(H){}},k.restoreByAfter=function(H){if(H===void 0)return!1;var K=k.input.value,B=K.lastIndexOf(H);if(B===-1)return!1;var U=k.cursorBefore.length;return k.lastKeyCode===h.a.DELETE&&k.cursorBefore.charAt(U-1)===H[0]?(k.fixCaret(U,U),!0):B+H.length===K.length?(k.fixCaret(B,B),!0):!1},k.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(K,B){var U=H.substring(B);return k.restoreByAfter(U)})},k.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},k.stop=function(){k.autoStepTimer&&clearTimeout(k.autoStepTimer)},k.down=function(H,K,B){k.pressingUpOrDown=!0,k.step("down",H,K,B)},k.up=function(H,K,B){k.pressingUpOrDown=!0,k.step("up",H,K,B)},k.saveInput=function(H){k.input=H};var X=j.value;X===void 0&&(X=j.defaultValue),k.state={focused:j.autoFocus};var G=k.getValidValue(k.toNumber(X));return k.state=f(f({},k.state),{},{inputValue:k.toPrecisionAsStep(G),value:G}),k}return Object(L.a)(F,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(k){var X=this.props,G=X.value,H=X.onChange,K=X.max,B=X.min,U=this.state.focused;if(k){if(!R(k.value,G)||!R(k.max,K)||!R(k.min,B)){var W=U?G:this.getValidValue(G),Q;this.pressingUpOrDown?Q=W:this.inputting?Q=this.rawInput:Q=this.toPrecisionAsStep(W),this.setState({value:W,inputValue:Q})}var ie="value"in this.props?G:this.state.value;"max"in this.props&&k.max!==K&&typeof ie=="number"&&ie>K&&H&&H(K),"min"in this.props&&k.min!==B&&typeof ie=="number"&&ie<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 ce=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===h.a.BACKSPACE?ce=this.cursorStart-1:this.lastKeyCode===h.a.DELETE&&(ce=this.cursorStart):ce=this.input.value.length,this.fixCaret(ce,ce)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case h.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case h.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(he){}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(k){var X=k;return X===""?X="":this.isNotCompleteNumber(parseFloat(X))?X=this.state.value:X=this.getValidValue(X),this.toNumber(X)}},{key:"getValueFromEvent",value:function(k){var X=k.target.value.trim().replace(/。/g,".");return a(this.props.decimalSeparator)&&(X=X.replace(this.props.decimalSeparator,".")),X}},{key:"getValidValue",value:function(k){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,H=parseFloat(k);return isNaN(H)?k:(H<X&&(H=X),H>G&&(H=G),H)}},{key:"setValue",value:function(k,X){var G=this.props.precision,H=this.isNotCompleteNumber(parseFloat(k))?null:parseFloat(k),K=this.state.value,B=K===void 0?null:K,U=this.state.inputValue,W=U===void 0?null:U,Q=typeof H=="number"?H.toFixed(G):"".concat(H),ie=H!==B||Q!=="".concat(W);return"value"in this.props?(W=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:W},X)):this.setState({value:H,inputValue:this.toPrecisionAsStep(k)},X),ie&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(k){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=this.props,H=G.precision,K=G.step;if(a(H))return H;var B=this.getPrecision(X),U=this.getPrecision(K),W=this.getPrecision(k);return k?Math.max(W,B+U):B+U}},{key:"getPrecisionFactor",value:function(k){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=this.getMaxPrecision(k,X);return Math.pow(10,G)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(k){return this.props.formatter?this.props.formatter(k):k}},{key:"toPrecisionAsStep",value:function(k){if(this.isNotCompleteNumber(k)||k==="")return k;var X=Math.abs(this.getMaxPrecision(k));return isNaN(X)?k.toString():Number(k).toFixed(X)}},{key:"toNumber",value:function(k){var X=this.props.precision,G=this.state.focused,H=k&&k.length>16&&G;return this.isNotCompleteNumber(k)||H?k:a(X)?Math.round(k*Math.pow(10,X))/Math.pow(10,X):Number(k)}},{key:"upStep",value:function(k,X){var G=this.props.step,H=this.getPrecisionFactor(k,X),K=Math.abs(this.getMaxPrecision(k,X)),B=((H*k+H*G*X)/H).toFixed(K);return this.toNumber(B)}},{key:"downStep",value:function(k,X){var G=this.props.step,H=this.getPrecisionFactor(k,X),K=Math.abs(this.getMaxPrecision(k,X)),B=((H*k-H*G*X)/H).toFixed(K);return this.toNumber(B)}},{key:"step",value:function(k,X){var G=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,K=arguments.length>3?arguments[3]:void 0;this.stop(),X&&(X.persist(),X.preventDefault());var B=this.props;if(B.disabled)return;var U=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(U))return;var W=this["".concat(k,"Step")](U,H),Q=W>B.max||W<B.min;if(W>B.max?W=B.max:W<B.min&&(W=B.min),this.setValue(W,null),this.setState({focused:!0},function(){G.pressingUpOrDown=!1}),Q)return;this.autoStepTimer=setTimeout(function(){G[k](X,H,!0)},K?u:w)}},{key:"fixCaret",value:function(k,X){if(k===void 0||X===void 0||!this.input||!this.input.value)return;try{var G=this.input.selectionStart,H=this.input.selectionEnd;(k!==G||X!==H)&&this.input.setSelectionRange(k,X)}catch(K){}}},{key:"render",value:function(){var k,X=this.props,G=X.prefixCls,H=X.disabled,K=X.readOnly,B=X.useTouch,U=X.autoComplete,W=X.upHandler,Q=X.downHandler,ie=X.className,ce=X.max,he=X.min,be=X.style,ne=X.title,le=X.onMouseEnter,ue=X.onMouseLeave,re=X.onMouseOver,oe=X.onMouseOut,q=X.required,se=X.onClick,J=X.tabIndex,ee=X.type,ge=X.placeholder,te=X.id,Y=X.inputMode,z=X.pattern,$=X.step,me=X.maxLength,pe=X.autoFocus,xe=X.name,Re=X.onPaste,ke=X.onInput,Me=Object(P.a)(X,["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"]),Pe=this.state,je=Pe.value,Fe=Pe.focused,We=r()(G,(k={},Object(m.a)(k,ie,!!ie),Object(m.a)(k,"".concat(G,"-disabled"),H),Object(m.a)(k,"".concat(G,"-focused"),Fe),k)),Se={};Object.keys(Me).forEach(function(Oe){(Oe.substr(0,5)==="data-"||Oe.substr(0,5)==="aria-"||Oe==="role")&&(Se[Oe]=Me[Oe])});var Xe=!K&&!H,Ye=this.getInputDisplayValue(null),Ie=(je||je===0)&&(isNaN(je)||Number(je)>=ce),He=(je||je===0)&&(isNaN(je)||Number(je)<=he),Ae=Ie||H||K,Te=He||H||K,Ce=r()("".concat(G,"-handler"),"".concat(G,"-handler-up"),Object(m.a)({},"".concat(G,"-handler-up-disabled"),Ae)),ye=r()("".concat(G,"-handler"),"".concat(G,"-handler-down"),Object(m.a)({},"".concat(G,"-handler-down-disabled"),Te)),Ee=B?{onTouchStart:Ae?l:this.up,onTouchEnd:this.stop}:{onMouseDown:Ae?l:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},we=B?{onTouchStart:Te?l:this.down,onTouchEnd:this.stop}:{onMouseDown:Te?l:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return o.a.createElement("div",{className:We,style:be,title:ne,onMouseEnter:le,onMouseLeave:ue,onMouseOver:re,onMouseOut:oe,onFocus:function(){return null},onBlur:function(){return null}},o.a.createElement("div",{className:"".concat(G,"-handler-wrap")},o.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":Ae,className:Ce}),W||o.a.createElement("span",{unselectable:"on",className:"".concat(G,"-handler-up-inner"),onClick:n})),o.a.createElement("span",Object.assign({unselectable:"on"},we,{role:"button","aria-label":"Decrease Value","aria-disabled":Te,className:ye}),Q||o.a.createElement("span",{unselectable:"on",className:"".concat(G,"-handler-down-inner"),onClick:n}))),o.a.createElement("div",{className:"".concat(G,"-input-wrap")},o.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":he,"aria-valuemax":ce,"aria-valuenow":je,required:q,type:ee,placeholder:ge,onPaste:Re,onClick:se,onMouseUp:this.onMouseUp,className:"".concat(G,"-input"),tabIndex:J,autoComplete:U,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Xe?this.onKeyDown:l,onKeyUp:Xe?this.onKeyUp:l,autoFocus:pe,maxLength:me,readOnly:K,disabled:H,max:ce,min:he,step:$,name:xe,title:ne,id:te,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ye),pattern:z,inputMode:Y,onInput:ke},Se))))}}]),F}(o.a.Component);D.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:y,min:-y,step:1,style:{},onChange:l,onKeyDown:l,onPressEnter:l,onFocus:l,onBlur:l,parser:s,required:!1,autoComplete:"off"};var c=D,b=Z.a=c},e7zE:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("3y9D"),N("WYAk"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.Base,S=T.WordArray,g=m.algo,_=g.SHA1,d=g.HMAC,o=g.PBKDF2=L.extend({cfg:L.extend({keySize:128/32,hasher:_,iterations:1}),init:function(i){this.cfg=this.cfg.extend(i)},compute:function(i,r){for(var h=this.cfg,p=d.create(h.hasher,i),f=S.create(),x=S.create([1]),v=f.words,l=x.words,n=h.keySize,s=h.iterations;v.length<n;){var u=p.update(r).finalize(x);p.reset();for(var w=u.words,y=w.length,a=u,R=1;R<s;R++){a=p.finalize(a),p.reset();for(var D=a.words,c=0;c<y;c++)w[c]^=D[c]}f.concat(u),l[0]++}return f.sigBytes=n*4,f}});m.PBKDF2=function(i,r,h){return o.create(h).compute(i,r)}}(),P.PBKDF2})},fAei:function(I,Z,N){"use strict";N.d(Z,"a",function(){return u.a});var P=N("rePB"),m=N("VTBJ"),T=N("KQm4"),L=N("1OyB"),S=N("vuIU"),g=N("Ji7U"),_=N("LK+K"),d=N("cDcd"),o=N("4IlW"),i=N("Kwbf"),r=N("TSYQ"),h=N.n(r),p=N("sboe"),f=N("OZM5"),x=N("815F"),v=N("ODXe"),l=N("Ff2n"),n=N("+nKL"),s=N("8XRh"),u=N("WaYH"),w=function(he,be){var ne=he.className,le=he.style,ue=he.motion,re=he.motionNodes,oe=he.motionType,q=he.onMotionStart,se=he.onMotionEnd,J=he.active,ee=he.treeNodeRequiredProps,ge=Object(l.a)(he,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),te=d.useState(!0),Y=Object(v.a)(te,2),z=Y[0],$=Y[1],me=d.useContext(p.a),pe=me.prefixCls,xe=d.useRef(!1),Re=function(){xe.current||se(),xe.current=!0};return Object(d.useEffect)(function(){re&&oe==="hide"&&z&&$(!1)},[re]),Object(d.useEffect)(function(){return re&&q(),function(){re&&Re()}},[]),re?d.createElement(s.default,Object.assign({ref:be,visible:z},ue,{motionAppear:oe==="show",onAppearEnd:Re,onLeaveEnd:Re}),function(ke,Me){var Pe=ke.className,je=ke.style;return d.createElement("div",{ref:Me,className:h()("".concat(pe,"-treenode-motion"),Pe),style:je},re.map(function(Fe){var We=Fe.data,Se=We.key,Xe=Object(l.a)(We,["key"]),Ye=Fe.isStart,Ie=Fe.isEnd;delete Xe.children;var He=Object(x.f)(Se,ee);return d.createElement(u.a,Object.assign({},Xe,He,{active:J,data:Fe.data,key:Se,isStart:Ye,isEnd:Ie}))}))}):d.createElement(u.a,Object.assign({domRef:be,className:ne,style:le},ge,{active:J}))};w.displayName="MotionTreeNode";var y=d.forwardRef(w),a=y;function R(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],be=ce.length,ne=he.length;if(Math.abs(be-ne)!==1)return{add:!1,key:null};function le(ue,re){var oe=new Map;ue.forEach(function(se){oe.set(se,!0)});var q=re.filter(function(se){return!oe.has(se)});return q.length===1?q[0]:null}return be<ne?{add:!0,key:le(ce,he)}:{add:!1,key:le(he,ce)}}function D(ce,he,be){var ne=ce.findIndex(function(oe){var q=oe.data;return q.key===be}),le=ce[ne+1],ue=he.findIndex(function(oe){var q=oe.data;return q.key===be});if(le){var re=he.findIndex(function(oe){var q=oe.data;return q.key===le.data.key});return he.slice(ue+1,re)}return he.slice(ue+1)}var c={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},b=function(){},E="RC_TREE_MOTION_".concat(Math.random()),C={key:E},F={key:E,level:0,index:0,pos:"0",node:C},j={parent:null,children:[],pos:F.pos,data:C,isStart:[],isEnd:[]};function k(ce,he,be,ne){return he===!1||!be?ce:ce.slice(0,Math.ceil(be/ne)+1)}function X(ce){var he=ce.data.key,be=ce.pos;return Object(x.e)(he,be)}function G(ce){for(var he=String(ce.data.key),be=ce;be.parent;)be=be.parent,he="".concat(be.data.key," > ").concat(he);return he}var H=function(he,be){var ne=he.prefixCls,le=he.data,ue=he.selectable,re=he.checkable,oe=he.expandedKeys,q=he.selectedKeys,se=he.checkedKeys,J=he.loadedKeys,ee=he.loadingKeys,ge=he.halfCheckedKeys,te=he.keyEntities,Y=he.disabled,z=he.dragging,$=he.dragOverNodeKey,me=he.dropPosition,pe=he.motion,xe=he.height,Re=he.itemHeight,ke=he.virtual,Me=he.focusable,Pe=he.activeItem,je=he.focused,Fe=he.tabIndex,We=he.onKeyDown,Se=he.onFocus,Xe=he.onBlur,Ye=he.onActiveChange,Ie=he.onListChangeStart,He=he.onListChangeEnd,Ae=Object(l.a)(he,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),Te=d.useRef(null);d.useImperativeHandle(be,function(){return{scrollTo:function(bt){Te.current.scrollTo(bt)}}});var Ce=d.useState(oe),ye=Object(v.a)(Ce,2),Ee=ye[0],we=ye[1],Oe=d.useState(le),Le=Object(v.a)(Oe,2),Be=Le[0],ze=Le[1],nt=d.useState(le),Ze=Object(v.a)(nt,2),at=Ze[0],pt=Ze[1],dt=d.useState([]),it=Object(v.a)(dt,2),Lt=it[0],Et=it[1],Qt=d.useState(null),Wt=Object(v.a)(Qt,2),gt=Wt[0],xt=Wt[1];function er(){ze(le),pt(le),Et([]),xt(null),He()}d.useEffect(function(){we(oe);var ot=R(Ee,oe);if(ot.key!==null)if(ot.add){var bt=Be.findIndex(function(Rt){var rr=Rt.data.key;return rr===ot.key}),Ft=k(D(Be,le,ot.key),ke,xe,Re),Bt=Be.slice();Bt.splice(bt+1,0,j),pt(Bt),Et(Ft),xt("show")}else{var At=le.findIndex(function(Rt){var rr=Rt.data.key;return rr===ot.key}),Dt=k(D(le,Be,ot.key),ke,xe,Re),ct=le.slice();ct.splice(At+1,0,j),pt(ct),Et(Dt),xt("hide")}else Be!==le&&(ze(le),pt(le))},[oe,le]),d.useEffect(function(){z||er()},[z]);var Ht=pe?at:le,Ke={expandedKeys:oe,selectedKeys:q,loadedKeys:J,loadingKeys:ee,checkedKeys:se,halfCheckedKeys:ge,dragOverNodeKey:$,dropPosition:me,keyEntities:te};return d.createElement(d.Fragment,null,je&&Pe&&d.createElement("span",{style:c,"aria-live":"assertive"},G(Pe)),d.createElement("div",{role:"tree"},d.createElement("input",{style:c,disabled:Me===!1||Y,tabIndex:Me!==!1?Fe:null,onKeyDown:We,onFocus:Se,onBlur:Xe,value:"",onChange:b})),d.createElement(n.a,Object.assign({},Ae,{data:Ht,itemKey:X,height:xe,fullHeight:!1,virtual:ke,itemHeight:Re,prefixCls:"".concat(ne,"-list"),ref:Te}),function(ot){var bt=ot.pos,Ft=ot.data,Bt=Ft.key,At=Object(l.a)(Ft,["key"]),Dt=ot.isStart,ct=ot.isEnd,Rt=Object(x.e)(Bt,bt);delete At.children;var rr=Object(x.f)(Rt,Ke);return d.createElement(a,Object.assign({},At,rr,{active:Pe&&Bt===Pe.data.key,pos:bt,data:ot.data,isStart:Dt,isEnd:ct,motion:pe,motionNodes:Bt===E?Lt:null,motionType:gt,onMotionStart:Ie,onMotionEnd:er,treeNodeRequiredProps:Ke,onMouseMove:function(){Ye(null)}}))}))},K=d.forwardRef(H);K.displayName="NodeList";var B=K,U=N("NvD2"),W=function(ce){Object(g.a)(be,ce);var he=Object(_.a)(be);function be(){var ne;return Object(L.a)(this,be),ne=he.apply(this,arguments),ne.destroyed=!1,ne.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},ne.listRef=d.createRef(),ne.onNodeDragStart=function(le,ue){var re=ne.state,oe=re.expandedKeys,q=re.keyEntities,se=ne.props.onDragStart,J=ue.props.eventKey;ne.dragNode=ue;var ee=Object(f.b)(oe,J);ne.setState({dragging:!0,dragNodesKeys:Object(f.g)(J,q)}),ne.setExpandedKeys(ee),se&&se({event:le,node:Object(x.b)(ue.props)})},ne.onNodeDragEnter=function(le,ue){var re=ne.state,oe=re.expandedKeys,q=re.keyEntities,se=re.dragNodesKeys,J=ne.props.onDragEnter,ee=ue.props,ge=ee.pos,te=ee.eventKey;if(!ne.dragNode||se.indexOf(te)!==-1)return;var Y=Object(f.c)(le,ue);if(ne.dragNode.props.eventKey===te&&Y===0){ne.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){ne.setState({dragOverNodeKey:te,dropPosition:Y}),ne.delayedDragEnterLogic||(ne.delayedDragEnterLogic={}),Object.keys(ne.delayedDragEnterLogic).forEach(function(z){clearTimeout(ne.delayedDragEnterLogic[z])}),ne.delayedDragEnterLogic[ge]=window.setTimeout(function(){if(!ne.state.dragging)return;var z=Object(T.a)(oe),$=q[te];$&&($.children||[]).length&&(z=Object(f.a)(oe,te)),"expandedKeys"in ne.props||ne.setExpandedKeys(z),J&&J({event:le,node:Object(x.b)(ue.props),expandedKeys:z})},400)},0)},ne.onNodeDragOver=function(le,ue){var re=ne.state.dragNodesKeys,oe=ne.props.onDragOver,q=ue.props.eventKey;if(re.indexOf(q)!==-1)return;if(ne.dragNode&&q===ne.state.dragOverNodeKey){var se=Object(f.c)(le,ue);if(se===ne.state.dropPosition)return;ne.setState({dropPosition:se})}oe&&oe({event:le,node:Object(x.b)(ue.props)})},ne.onNodeDragLeave=function(le,ue){var re=ne.props.onDragLeave;ne.setState({dragOverNodeKey:""}),re&&re({event:le,node:Object(x.b)(ue.props)})},ne.onNodeDragEnd=function(le,ue){var re=ne.props.onDragEnd;ne.setState({dragOverNodeKey:""}),ne.cleanDragState(),re&&re({event:le,node:Object(x.b)(ue.props)}),ne.dragNode=null},ne.onNodeDrop=function(le,ue){var re=ne.state,oe=re.dragNodesKeys,q=oe===void 0?[]:oe,se=re.dropPosition,J=ne.props.onDrop,ee=ue.props,ge=ee.eventKey,te=ee.pos;if(ne.setState({dragOverNodeKey:""}),ne.cleanDragState(),q.indexOf(ge)!==-1){Object(i.a)(!1,"Can not drop to dragNode(include it's children node)");return}var Y=Object(f.k)(te),z={event:le,node:Object(x.b)(ue.props),dragNode:ne.dragNode?Object(x.b)(ne.dragNode.props):null,dragNodesKeys:q.slice(),dropPosition:se+Number(Y[Y.length-1]),dropToGap:!1};se!==0&&(z.dropToGap=!0),J&&J(z),ne.dragNode=null},ne.cleanDragState=function(){var le=ne.state.dragging;le&&ne.setState({dragging:!1})},ne.onNodeClick=function(le,ue){var re=ne.props.onClick;re&&re(le,ue)},ne.onNodeDoubleClick=function(le,ue){var re=ne.props.onDoubleClick;re&&re(le,ue)},ne.onNodeSelect=function(le,ue){var re=ne.state.selectedKeys,oe=ne.state.keyEntities,q=ne.props,se=q.onSelect,J=q.multiple,ee=ue.selected,ge=ue.key,te=!ee;te?J?re=Object(f.a)(re,ge):re=[ge]:re=Object(f.b)(re,ge);var Y=re.map(function(z){var $=oe[z];return $?$.node:null}).filter(function(z){return z});ne.setUncontrolledState({selectedKeys:re}),se&&se(re,{event:"select",selected:te,node:ue,selectedNodes:Y,nativeEvent:le.nativeEvent})},ne.onNodeCheck=function(le,ue,re){var oe=ne.state,q=oe.keyEntities,se=oe.checkedKeys,J=oe.halfCheckedKeys,ee=ne.props,ge=ee.checkStrictly,te=ee.onCheck,Y=ue.key,z,$={event:"check",node:ue,checked:re,nativeEvent:le.nativeEvent};if(ge){var me=re?Object(f.a)(se,Y):Object(f.b)(se,Y),pe=Object(f.b)(J,Y);z={checked:me,halfChecked:pe},$.checkedNodes=me.map(function(je){return q[je]}).filter(function(je){return je}).map(function(je){return je.node}),ne.setUncontrolledState({checkedKeys:me})}else{var xe=Object(U.a)([].concat(Object(T.a)(se),[Y]),!0,q),Re=xe.checkedKeys,ke=xe.halfCheckedKeys;if(!re){var Me=new Set(Re);Me.delete(Y);var Pe=Object(U.a)(Array.from(Me),{checked:!1,halfCheckedKeys:ke},q);Re=Pe.checkedKeys,ke=Pe.halfCheckedKeys}z=Re,$.checkedNodes=[],$.checkedNodesPositions=[],$.halfCheckedKeys=ke,Re.forEach(function(je){var Fe=q[je];if(!Fe)return;var We=Fe.node,Se=Fe.pos;$.checkedNodes.push(We),$.checkedNodesPositions.push({node:We,pos:Se})}),ne.setUncontrolledState({checkedKeys:Re},!1,{halfCheckedKeys:ke})}te&&te(z,$)},ne.onNodeLoad=function(le){return new Promise(function(ue){ne.setState(function(re){var oe=re.loadedKeys,q=oe===void 0?[]:oe,se=re.loadingKeys,J=se===void 0?[]:se,ee=ne.props,ge=ee.loadData,te=ee.onLoad,Y=le.key;if(!ge||q.indexOf(Y)!==-1||J.indexOf(Y)!==-1)return{};var z=ge(le);return z.then(function(){var $=ne.state,me=$.loadedKeys,pe=$.loadingKeys,xe=Object(f.a)(me,Y),Re=Object(f.b)(pe,Y);te&&te(xe,{event:"load",node:le}),ne.setUncontrolledState({loadedKeys:xe}),ne.setState({loadingKeys:Re}),ue()}),{loadingKeys:Object(f.a)(J,Y)}})})},ne.onNodeMouseEnter=function(le,ue){var re=ne.props.onMouseEnter;re&&re({event:le,node:ue})},ne.onNodeMouseLeave=function(le,ue){var re=ne.props.onMouseLeave;re&&re({event:le,node:ue})},ne.onNodeContextMenu=function(le,ue){var re=ne.props.onRightClick;re&&(le.preventDefault(),re({event:le,node:ue}))},ne.onFocus=function(){var le=ne.props.onFocus;ne.setState({focused:!0}),le&&le.apply(void 0,arguments)},ne.onBlur=function(){var le=ne.props.onBlur;ne.setState({focused:!1}),ne.onActiveChange(null),le&&le.apply(void 0,arguments)},ne.getTreeNodeRequiredProps=function(){var le=ne.state,ue=le.expandedKeys,re=le.selectedKeys,oe=le.loadedKeys,q=le.loadingKeys,se=le.checkedKeys,J=le.halfCheckedKeys,ee=le.dragOverNodeKey,ge=le.dropPosition,te=le.keyEntities;return{expandedKeys:ue||[],selectedKeys:re||[],loadedKeys:oe||[],loadingKeys:q||[],checkedKeys:se||[],halfCheckedKeys:J||[],dragOverNodeKey:ee,dropPosition:ge,keyEntities:te}},ne.setExpandedKeys=function(le){var ue=ne.state.treeData,re=Object(x.d)(ue,le);ne.setUncontrolledState({expandedKeys:le,flattenNodes:re},!0)},ne.onNodeExpand=function(le,ue){var re=ne.state.expandedKeys,oe=ne.state.listChanging,q=ne.props,se=q.onExpand,J=q.loadData,ee=ue.key,ge=ue.expanded;if(oe)return;var te=re.indexOf(ee),Y=!ge;if(Object(i.a)(ge&&te!==-1||!ge&&te===-1,"Expand state not sync with index check"),Y?re=Object(f.a)(re,ee):re=Object(f.b)(re,ee),ne.setExpandedKeys(re),se&&se(re,{node:ue,expanded:Y,nativeEvent:le.nativeEvent}),Y&&J){var z=ne.onNodeLoad(ue);z&&z.then(function(){var $=Object(x.d)(ne.state.treeData,re);ne.setUncontrolledState({flattenNodes:$})})}},ne.onListChangeStart=function(){ne.setUncontrolledState({listChanging:!0})},ne.onListChangeEnd=function(){setTimeout(function(){ne.setUncontrolledState({listChanging:!1})})},ne.onActiveChange=function(le){var ue=ne.state.activeKey,re=ne.props.onActiveChange;if(ue===le)return;ne.setState({activeKey:le}),le!==null&&ne.scrollTo({key:le}),re&&re(le)},ne.getActiveItem=function(){var le=ne.state,ue=le.activeKey,re=le.flattenNodes;return ue===null?null:re.find(function(oe){var q=oe.data.key;return q===ue})||null},ne.offsetActiveKey=function(le){var ue=ne.state,re=ue.flattenNodes,oe=ue.activeKey,q=re.findIndex(function(ee){var ge=ee.data.key;return ge===oe});q===-1&&le<0&&(q=re.length),q=(q+le+re.length)%re.length;var se=re[q];if(se){var J=se.data.key;ne.onActiveChange(J)}else ne.onActiveChange(null)},ne.onKeyDown=function(le){var ue=ne.state,re=ue.activeKey,oe=ue.expandedKeys,q=ue.checkedKeys,se=ne.props,J=se.onKeyDown,ee=se.checkable,ge=se.selectable;switch(le.which){case o.a.UP:{ne.offsetActiveKey(-1),le.preventDefault();break}case o.a.DOWN:{ne.offsetActiveKey(1),le.preventDefault();break}}var te=ne.getActiveItem();if(te&&te.data){var Y=ne.getTreeNodeRequiredProps(),z=te.data.isLeaf===!1||!!(te.data.children||[]).length,$=Object(x.b)(Object(m.a)(Object(m.a)({},Object(x.f)(re,Y)),{},{data:te.data,active:!0}));switch(le.which){case o.a.LEFT:{z&&oe.includes(re)?ne.onNodeExpand({},$):te.parent&&ne.onActiveChange(te.parent.data.key),le.preventDefault();break}case o.a.RIGHT:{z&&!oe.includes(re)?ne.onNodeExpand({},$):te.children&&te.children.length&&ne.onActiveChange(te.children[0].data.key),le.preventDefault();break}case o.a.ENTER:case o.a.SPACE:{ee&&!$.disabled&&$.checkable!==!1&&!$.disableCheckbox?ne.onNodeCheck({},$,!q.includes(re)):!ee&&ge&&!$.disabled&&$.selectable!==!1&&ne.onNodeSelect({},$);break}}}J&&J(le)},ne.setUncontrolledState=function(le){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(ne.destroyed)return;var oe=!1,q=!0,se={};Object.keys(le).forEach(function(J){if(J in ne.props){q=!1;return}oe=!0,se[J]=le[J]}),oe&&(!ue||q)&&ne.setState(Object(m.a)(Object(m.a)({},se),re))},ne.scrollTo=function(le){ne.listRef.current.scrollTo(le)},ne}return Object(S.a)(be,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var le,ue=this.state,re=ue.focused,oe=ue.flattenNodes,q=ue.keyEntities,se=ue.dragging,J=ue.activeKey,ee=this.props,ge=ee.prefixCls,te=ee.className,Y=ee.style,z=ee.showLine,$=ee.focusable,me=ee.tabIndex,pe=me===void 0?0:me,xe=ee.selectable,Re=ee.showIcon,ke=ee.icon,Me=ee.switcherIcon,Pe=ee.draggable,je=ee.checkable,Fe=ee.checkStrictly,We=ee.disabled,Se=ee.motion,Xe=ee.loadData,Ye=ee.filterTreeNode,Ie=ee.height,He=ee.itemHeight,Ae=ee.virtual,Te=ee.titleRender,Ce=ee.onContextMenu,ye=Object(f.f)(this.props);return d.createElement(p.a.Provider,{value:{prefixCls:ge,selectable:xe,showIcon:Re,icon:ke,switcherIcon:Me,draggable:Pe,checkable:je,checkStrictly:Fe,disabled:We,keyEntities:q,loadData:Xe,filterTreeNode:Ye,titleRender:Te,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},d.createElement("div",{className:h()(ge,te,(le={},Object(P.a)(le,"".concat(ge,"-show-line"),z),Object(P.a)(le,"".concat(ge,"-focused"),re),Object(P.a)(le,"".concat(ge,"-active-focused"),J!==null),le))},d.createElement(B,Object.assign({ref:this.listRef,prefixCls:ge,style:Y,data:oe,disabled:We,selectable:xe,checkable:!!je,motion:Se,dragging:se,height:Ie,itemHeight:He,virtual:Ae,focusable:$,focused:re,tabIndex:pe,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ce},this.getTreeNodeRequiredProps(),ye))))}}],[{key:"getDerivedStateFromProps",value:function(le,ue){var re=ue.prevProps,oe={prevProps:le};function q(ke){return!re&&ke in le||re&&re[ke]!==le[ke]}var se;if(q("treeData")?se=le.treeData:q("children")&&(Object(i.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),se=Object(x.c)(le.children)),se){oe.treeData=se;var J=Object(x.a)(se);oe.keyEntities=Object(m.a)(Object(P.a)({},E,F),J.keyEntities)}var ee=oe.keyEntities||ue.keyEntities;if(q("expandedKeys")||re&&q("autoExpandParent"))oe.expandedKeys=le.autoExpandParent||!re&&le.defaultExpandParent?Object(f.e)(le.expandedKeys,ee):le.expandedKeys;else if(!re&&le.defaultExpandAll){var ge=Object(m.a)({},ee);delete ge[E],oe.expandedKeys=Object.keys(ge).map(function(ke){return ge[ke].key})}else!re&&le.defaultExpandedKeys&&(oe.expandedKeys=le.autoExpandParent||le.defaultExpandParent?Object(f.e)(le.defaultExpandedKeys,ee):le.defaultExpandedKeys);if(oe.expandedKeys||delete oe.expandedKeys,se||oe.expandedKeys){var te=Object(x.d)(se||ue.treeData,oe.expandedKeys||ue.expandedKeys);oe.flattenNodes=te}if(le.selectable&&(q("selectedKeys")?oe.selectedKeys=Object(f.d)(le.selectedKeys,le):!re&&le.defaultSelectedKeys&&(oe.selectedKeys=Object(f.d)(le.defaultSelectedKeys,le))),le.checkable){var Y;if(q("checkedKeys")?Y=Object(f.j)(le.checkedKeys)||{}:!re&&le.defaultCheckedKeys?Y=Object(f.j)(le.defaultCheckedKeys)||{}:se&&(Y=Object(f.j)(le.checkedKeys)||{checkedKeys:ue.checkedKeys,halfCheckedKeys:ue.halfCheckedKeys}),Y){var z=Y,$=z.checkedKeys,me=$===void 0?[]:$,pe=z.halfCheckedKeys,xe=pe===void 0?[]:pe;if(!le.checkStrictly){var Re=Object(U.a)(me,!0,ee);me=Re.checkedKeys,xe=Re.halfCheckedKeys}oe.checkedKeys=me,oe.halfCheckedKeys=xe}}return q("loadedKeys")&&(oe.loadedKeys=le.loadedKeys),oe}}]),be}(d.Component);W.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},W.TreeNode=u.a;var Q=W,ie=Z.b=Q},fcSX:function(I,Z,N){"use strict";var P=N("Ff2n"),m=N("1OyB"),T=N("vuIU"),L=N("Ji7U"),S=N("md7G"),g=N("foSv"),_=N("1W/9"),d=N("cDcd"),o=N("rePB"),i=N("JX7q"),r=N("TSYQ"),h=N.n(r),p=N("qx4F"),f=N("4IlW");function x(H){return Array.isArray(H)?H:[H]}var v={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},l=Object.keys(v).filter(function(H){if(typeof document=="undefined")return!1;var K=document.getElementsByTagName("html")[0];return H in(K?K.style:{})})[0],n=v[l];function s(H,K,B,U){H.addEventListener?H.addEventListener(K,B,U):H.attachEvent&&H.attachEvent("on".concat(K),B)}function u(H,K,B,U){H.removeEventListener?H.removeEventListener(K,B,U):H.attachEvent&&H.detachEvent("on".concat(K),B)}function w(H,K){var B=typeof H=="function"?H(K):H;return Array.isArray(B)?B.length===2?B:[B[0],B[1]]:[B]}var y=function(K){return!isNaN(parseFloat(K))&&isFinite(K)},a=!(typeof window!="undefined"&&window.document&&window.document.createElement),R=function H(K,B,U,W){if(!B||B===document||B instanceof Document)return!1;if(B===K.parentNode)return!0;var Q=Math.max(Math.abs(U),Math.abs(W))===Math.abs(W),ie=Math.max(Math.abs(U),Math.abs(W))===Math.abs(U),ce=B.scrollHeight-B.clientHeight,he=B.scrollWidth-B.clientWidth,be=document.defaultView.getComputedStyle(B),ne=be.overflowY==="auto"||be.overflowY==="scroll",le=be.overflowX==="auto"||be.overflowX==="scroll",ue=ce&&ne,re=he&&le;return Q&&(!ue||ue&&(B.scrollTop>=ce&&W<0||B.scrollTop<=0&&W>0))||ie&&(!re||re&&(B.scrollLeft>=he&&U<0||B.scrollLeft<=0&&U>0))?H(K,B.parentNode,U,W):!1};function D(H){var K=c();return function(){var U=Object(g.a)(H),W;if(K){var Q=Object(g.a)(this).constructor;W=Reflect.construct(U,arguments,Q)}else W=U.apply(this,arguments);return Object(S.a)(this,W)}}function c(){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 b={},E=function(H){Object(L.a)(B,H);var K=D(B);function B(U){var W;return Object(m.a)(this,B),W=K.call(this,U),W.domFocus=function(){W.dom&&W.dom.focus()},W.removeStartHandler=function(Q){if(Q.touches.length>1)return;W.startPos={x:Q.touches[0].clientX,y:Q.touches[0].clientY}},W.removeMoveHandler=function(Q){if(Q.changedTouches.length>1)return;var ie=Q.currentTarget,ce=Q.changedTouches[0].clientX-W.startPos.x,he=Q.changedTouches[0].clientY-W.startPos.y;(ie===W.maskDom||ie===W.handlerDom||ie===W.contentDom&&R(ie,Q.target,ce,he))&&Q.cancelable&&Q.preventDefault()},W.transitionEnd=function(Q){var ie=Q.target;u(ie,n,W.transitionEnd),ie.style.transition=""},W.onKeyDown=function(Q){if(Q.keyCode===f.a.ESC){var ie=W.props.onClose;Q.stopPropagation(),ie&&ie(Q)}},W.onWrapperTransitionEnd=function(Q){var ie=W.props,ce=ie.open,he=ie.afterVisibleChange;Q.target===W.contentWrapper&&Q.propertyName.match(/transform$/)&&(W.dom.style.transition="",!ce&&W.getCurrentDrawerSome()&&(document.body.style.overflowX="",W.maskDom&&(W.maskDom.style.left="",W.maskDom.style.width="")),he&&he(!!ce))},W.openLevelTransition=function(){var Q=W.props,ie=Q.open,ce=Q.width,he=Q.height,be=W.getHorizontalBoolAndPlacementName(),ne=be.isHorizontal,le=be.placementName,ue=W.contentDom?W.contentDom.getBoundingClientRect()[ne?"width":"height"]:0,re=(ne?ce:he)||ue;W.setLevelAndScrolling(ie,le,re)},W.setLevelTransform=function(Q,ie,ce,he){var be=W.props,ne=be.placement,le=be.levelMove,ue=be.duration,re=be.ease,oe=be.showMask;W.levelDom.forEach(function(q){q.style.transition="transform ".concat(ue," ").concat(re),s(q,n,W.transitionEnd);var se=Q?ce:0;if(le){var J=w(le,{target:q,open:Q});se=Q?J[0]:J[1]||0}var ee=typeof se=="number"?"".concat(se,"px"):se,ge=ne==="left"||ne==="top"?ee:"-".concat(ee);ge=oe&&ne==="right"&&he?"calc(".concat(ge," + ").concat(he,"px)"):ge,q.style.transform=se?"".concat(ie,"(").concat(ge,")"):""})},W.setLevelAndScrolling=function(Q,ie,ce){var he=W.props.onChange;if(!a){var be=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(p.a)(!0):0;W.setLevelTransform(Q,ie,ce,be),W.toggleScrollingToDrawerAndBody(be)}he&&he(Q)},W.toggleScrollingToDrawerAndBody=function(Q){var ie=W.props,ce=ie.getOpenCount,he=ie.getContainer,be=ie.showMask,ne=ie.open,le=he&&he(),ue=ce&&ce();if(le&&le.parentNode===document.body&&be){var re=["touchstart"],oe=[document.body,W.maskDom,W.handlerDom,W.contentDom];ne&&document.body.style.overflow!=="hidden"?(Q&&W.addScrollingEffect(Q),ue===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",oe.forEach(function(q,se){if(!q)return;s(q,re[se]||"touchmove",se?W.removeMoveHandler:W.removeStartHandler,W.passive)})):W.getCurrentDrawerSome()&&(ue||(document.body.style.overflow=""),document.body.style.touchAction="",Q&&W.remScrollingEffect(Q),oe.forEach(function(q,se){if(!q)return;u(q,re[se]||"touchmove",se?W.removeMoveHandler:W.removeStartHandler,W.passive)}))}},W.addScrollingEffect=function(Q){var ie=W.props,ce=ie.placement,he=ie.duration,be=ie.ease,ne=ie.getOpenCount,le=ie.switchScrollingEffect,ue=ne&&ne();ue===1&&le();var re="width ".concat(he," ").concat(be),oe="transform ".concat(he," ").concat(be);W.dom.style.transition="none";switch(ce){case"right":W.dom.style.transform="translateX(-".concat(Q,"px)");break;case"top":case"bottom":W.dom.style.width="calc(100% - ".concat(Q,"px)"),W.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(oe,",").concat(re),W.dom.style.width="",W.dom.style.transform="")})},W.remScrollingEffect=function(Q){var ie=W.props,ce=ie.placement,he=ie.duration,be=ie.ease,ne=ie.getOpenCount,le=ie.switchScrollingEffect,ue=ne&&ne();ue||le(!0),l&&(document.body.style.overflowX="hidden"),W.dom.style.transition="none";var re,oe="width ".concat(he," ").concat(be),q="transform ".concat(he," ").concat(be);switch(ce){case"left":{W.dom.style.width="100%",oe="width 0s ".concat(be," ").concat(he);break}case"right":{W.dom.style.transform="translateX(".concat(Q,"px)"),W.dom.style.width="100%",oe="width 0s ".concat(be," ").concat(he),W.maskDom&&(W.maskDom.style.left="-".concat(Q,"px"),W.maskDom.style.width="calc(100% + ".concat(Q,"px)"));break}case"top":case"bottom":{W.dom.style.width="calc(100% + ".concat(Q,"px)"),W.dom.style.height="100%",W.dom.style.transform="translateZ(0)",re="height 0s ".concat(be," ").concat(he);break}default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(q,",").concat(re?"".concat(re,","):"").concat(oe),W.dom.style.transform="",W.dom.style.width="",W.dom.style.height="")})},W.getCurrentDrawerSome=function(){return!Object.keys(b).some(function(Q){return b[Q]})},W.getLevelDom=function(Q){var ie=Q.level,ce=Q.getContainer;if(a)return;var he=ce&&ce(),be=he?he.parentNode:null;if(W.levelDom=[],ie==="all"){var ne=be?Array.prototype.slice.call(be.children):[];ne.forEach(function(le){le.nodeName!=="SCRIPT"&&le.nodeName!=="STYLE"&&le.nodeName!=="LINK"&&le!==he&&W.levelDom.push(le)})}else ie&&x(ie).forEach(function(le){document.querySelectorAll(le).forEach(function(ue){W.levelDom.push(ue)})})},W.getHorizontalBoolAndPlacementName=function(){var Q=W.props.placement,ie=Q==="left"||Q==="right",ce="translate".concat(ie?"X":"Y");return{isHorizontal:ie,placementName:ce}},W.state={_self:Object(i.a)(W)},W}return Object(T.a)(B,[{key:"componentDidMount",value:function(){var W=this;if(!a){var Q=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Q=!0,null}}))}catch(ne){}this.passive=Q?{passive:!1}:!1}var ie=this.props,ce=ie.open,he=ie.getContainer,be=he&&he();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ce&&(be&&be.parentNode===document.body&&(b[this.drawerId]=ce),this.openLevelTransition(),this.forceUpdate(function(){W.domFocus()}))}},{key:"componentDidUpdate",value:function(W){var Q=this.props,ie=Q.open,ce=Q.getContainer,he=ce&&ce();ie!==W.open&&(ie&&this.domFocus(),he&&he.parentNode===document.body&&(b[this.drawerId]=!!ie),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var W=this.props,Q=W.getOpenCount,ie=W.open,ce=W.switchScrollingEffect,he=typeof Q=="function"&&Q();delete b[this.drawerId],ie&&(this.setLevelTransform(!1),document.body.style.touchAction=""),he||(document.body.style.overflow="",ce(!0))}},{key:"render",value:function(){var W,Q=this,ie=this.props,ce=ie.className,he=ie.children,be=ie.style,ne=ie.width,le=ie.height,ue=ie.defaultOpen,re=ie.open,oe=ie.prefixCls,q=ie.placement,se=ie.level,J=ie.levelMove,ee=ie.ease,ge=ie.duration,te=ie.getContainer,Y=ie.handler,z=ie.onChange,$=ie.afterVisibleChange,me=ie.showMask,pe=ie.maskClosable,xe=ie.maskStyle,Re=ie.onClose,ke=ie.onHandleClick,Me=ie.keyboard,Pe=ie.getOpenCount,je=ie.switchScrollingEffect,Fe=Object(P.a)(ie,["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"]),We=this.dom?re:!1,Se=h()(oe,(W={},Object(o.a)(W,"".concat(oe,"-").concat(q),!0),Object(o.a)(W,"".concat(oe,"-open"),We),Object(o.a)(W,ce||"",!!ce),Object(o.a)(W,"no-mask",!me),W)),Xe=this.getHorizontalBoolAndPlacementName(),Ye=Xe.placementName,Ie=q==="left"||q==="top"?"-100%":"100%",He=We?"":"".concat(Ye,"(").concat(Ie,")"),Ae=Y&&d.cloneElement(Y,{onClick:function(Ce){Y.props.onClick&&Y.props.onClick(),ke&&ke(Ce)},ref:function(Ce){Q.handlerDom=Ce}});return d.createElement("div",Object.assign({},Fe,{tabIndex:-1,className:Se,style:be,ref:function(Ce){Q.dom=Ce},onKeyDown:We&&Me?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),me&&d.createElement("div",{className:"".concat(oe,"-mask"),onClick:pe?Re:void 0,style:xe,ref:function(Ce){Q.maskDom=Ce}}),d.createElement("div",{className:"".concat(oe,"-content-wrapper"),style:{transform:He,msTransform:He,width:y(ne)?"".concat(ne,"px"):ne,height:y(le)?"".concat(le,"px"):le},ref:function(Ce){Q.contentWrapper=Ce}},d.createElement("div",{className:"".concat(oe,"-content"),ref:function(Ce){Q.contentDom=Ce},onTouchStart:We&&me?this.removeStartHandler:void 0,onTouchMove:We&&me?this.removeMoveHandler:void 0},he),Ae))}}],[{key:"getDerivedStateFromProps",value:function(W,Q){var ie=Q.prevProps,ce=Q._self,he={prevProps:W};if(ie!==void 0){var be=W.placement,ne=W.level;be!==ie.placement&&(ce.contentDom=null),ne!==ie.level&&ce.getLevelDom(W)}return he}}]),B}(d.Component);E.defaultProps={switchScrollingEffect:function(){}};var C=E;function F(H){var K=j();return function(){var U=Object(g.a)(H),W;if(K){var Q=Object(g.a)(this).constructor;W=Reflect.construct(U,arguments,Q)}else W=U.apply(this,arguments);return Object(S.a)(this,W)}}function j(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(H){return!1}}var k=function(H){Object(L.a)(B,H);var K=F(B);function B(U){var W;Object(m.a)(this,B),W=K.call(this,U),W.onHandleClick=function(ie){var ce=W.props,he=ce.onHandleClick,be=ce.open;if(he&&he(ie),typeof be=="undefined"){var ne=W.state.open;W.setState({open:!ne})}},W.onClose=function(ie){var ce=W.props,he=ce.onClose,be=ce.open;he&&he(ie),typeof be=="undefined"&&W.setState({open:!1})};var Q=typeof U.open!="undefined"?U.open:!!U.defaultOpen;return W.state={open:Q},"onMaskClick"in U&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),W}return Object(T.a)(B,[{key:"render",value:function(){var W=this,Q=this.props,ie=Q.defaultOpen,ce=Q.getContainer,he=Q.wrapperClassName,be=Q.forceRender,ne=Q.handler,le=Object(P.a)(Q,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),ue=this.state.open;if(!ce)return d.createElement("div",{className:he,ref:function(q){W.dom=q}},d.createElement(C,Object.assign({},le,{open:ue,handler:ne,getContainer:function(){return W.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var re=!!ne||be;return d.createElement(_.a,{visible:ue,forceRender:re,getContainer:ce,wrapperClassName:he},function(oe){var q=oe.visible,se=oe.afterClose,J=Object(P.a)(oe,["visible","afterClose"]);return d.createElement(C,Object.assign({},le,J,{open:q!==void 0?q:ue,afterVisibleChange:se!==void 0?se:le.afterVisibleChange,handler:ne,onClose:W.onClose,onHandleClick:W.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(W,Q){var ie=Q.prevProps,ce={prevProps:W};return typeof ie!="undefined"&&W.open!==ie.open&&(ce.open=W.open),ce}}]),B}(d.Component);k.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:d.createElement("div",{className:"drawer-handle"},d.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var X=k,G=Z.a=X},fcyK:function(I,Z,N){},gRFJ:function(I,Z,N){I.exports=[N("rdUC"),N("ynwM"),N("RELg"),N("DlR+"),N("CrYA"),N("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(I){return I<10?"0"+I:I}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(I){return rx_escapable.lastIndex=0,rx_escapable.test(I)?'"'+I.replace(rx_escapable,function(Z){var N=meta[Z];return typeof N=="string"?N:"\\u"+("0000"+Z.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+I+'"'}function str(I,Z){var N,P,m,T,L=gap,S,g=Z[I];g&&typeof g=="object"&&typeof g.toJSON=="function"&&(g=g.toJSON(I)),typeof rep=="function"&&(g=rep.call(Z,I,g));switch(typeof g){case"string":return quote(g);case"number":return isFinite(g)?String(g):"null";case"boolean":case"null":return String(g);case"object":if(!g)return"null";if(gap+=indent,S=[],Object.prototype.toString.apply(g)==="[object Array]"){for(T=g.length,N=0;N<T;N+=1)S[N]=str(N,g)||"null";return m=S.length===0?"[]":gap?`[
`+gap+S.join(`,
`+gap)+`
`+L+"]":"["+S.join(",")+"]",gap=L,m}if(rep&&typeof rep=="object")for(T=rep.length,N=0;N<T;N+=1)typeof rep[N]=="string"&&(P=rep[N],m=str(P,g),m&&S.push(quote(P)+(gap?": ":":")+m));else for(P in g)Object.prototype.hasOwnProperty.call(g,P)&&(m=str(P,g),m&&S.push(quote(P)+(gap?": ":":")+m));return m=S.length===0?"{}":gap?`{
`+gap+S.join(`,
`+gap)+`
`+L+"}":"{"+S.join(",")+"}",gap=L,m}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(I,Z,N){var P;if(gap="",indent="",typeof N=="number")for(P=0;P<N;P+=1)indent+=" ";else typeof N=="string"&&(indent=N);if(rep=Z,Z&&typeof Z!="function"&&(typeof Z!="object"||typeof Z.length!="number"))throw new Error("JSON.stringify");return str("",{"":I})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(I,Z){var N,P,m=I[Z];if(m&&typeof m=="object")for(N in m)Object.prototype.hasOwnProperty.call(m,N)&&(P=walk(m,N),P!==void 0?m[N]=P:delete m[N]);return reviver.call(I,Z,m)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(I){return"\\u"+("0000"+I.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(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.mode.ECB=function(){var m=P.lib.BlockCipherMode.extend();return m.Encryptor=m.extend({processBlock:function(T,L){this._cipher.encryptBlock(T,L)}}),m.Decryptor=m.extend({processBlock:function(T,L){this._cipher.decryptBlock(T,L)}}),m}(),P.mode.ECB})},h78n:function(I,Z,N){"use strict";N.d(Z,"a",function(){return k});var P=N("cDcd"),m=N.n(P),T=N("TSYQ"),L=N.n(T),S={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},g=function(H){var K=H.map(function(){return Object(P.useRef)()}),B=Object(P.useRef)();return Object(P.useEffect)(function(){var U=Date.now(),W=!1;Object.keys(K).forEach(function(Q){var ie=K[Q].current;if(!ie)return;W=!0;var ce=ie.style;ce.transitionDuration=".3s, .3s, .3s, .06s",B.current&&U-B.current<100&&(ce.transitionDuration="0s, 0s")}),W&&(B.current=Date.now())}),[K]};function _(){return _=Object.assign||function(G){for(var H=1;H<arguments.length;H++){var K=arguments[H];for(var B in K)Object.prototype.hasOwnProperty.call(K,B)&&(G[B]=K[B])}return G},_.apply(this,arguments)}function d(G,H){return p(G)||h(G,H)||i(G,H)||o()}function o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(G,H){if(!G)return;if(typeof G=="string")return r(G,H);var K=Object.prototype.toString.call(G).slice(8,-1);if(K==="Object"&&G.constructor&&(K=G.constructor.name),K==="Map"||K==="Set")return Array.from(G);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return r(G,H)}function r(G,H){(H==null||H>G.length)&&(H=G.length);for(var K=0,B=new Array(H);K<H;K++)B[K]=G[K];return B}function h(G,H){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(G)))return;var K=[],B=!0,U=!1,W=void 0;try{for(var Q=G[Symbol.iterator](),ie;!(B=(ie=Q.next()).done)&&!(K.push(ie.value),H&&K.length===H);B=!0);}catch(ce){U=!0,W=ce}finally{try{!B&&Q.return!=null&&Q.return()}finally{if(U)throw W}}return K}function p(G){if(Array.isArray(G))return G}function f(G,H){if(G==null)return{};var K=x(G,H),B,U;if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(G);for(U=0;U<W.length;U++){if(B=W[U],H.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(G,B))continue;K[B]=G[B]}}return K}function x(G,H){if(G==null)return{};var K={},B=Object.keys(G),U,W;for(W=0;W<B.length;W++){if(U=B[W],H.indexOf(U)>=0)continue;K[U]=G[U]}return K}var v=function(H){var K=H.className,B=H.percent,U=H.prefixCls,W=H.strokeColor,Q=H.strokeLinecap,ie=H.strokeWidth,ce=H.style,he=H.trailColor,be=H.trailWidth,ne=H.transition,le=f(H,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete le.gapPosition;var ue=Array.isArray(B)?B:[B],re=Array.isArray(W)?W:[W],oe=g(ue),q=d(oe,1),se=q[0],J=ie/2,ee=100-ie/2,ge="M ".concat(Q==="round"?J:0,",").concat(J,`
L `).concat(Q==="round"?ee:100,",").concat(J),te="0 0 100 ".concat(ie),Y=0;return m.a.createElement("svg",_({className:L()("".concat(U,"-line"),K),viewBox:te,preserveAspectRatio:"none",style:ce},le),m.a.createElement("path",{className:"".concat(U,"-line-trail"),d:ge,strokeLinecap:Q,stroke:he,strokeWidth:be||ie,fillOpacity:"0"}),ue.map(function(z,$){var me={strokeDasharray:"".concat(z,"px, 100px"),strokeDashoffset:"-".concat(Y,"px"),transition:ne||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},pe=re[$]||re[re.length-1];return Y+=z,m.a.createElement("path",{key:$,className:"".concat(U,"-line-path"),d:ge,strokeLinecap:Q,stroke:pe,strokeWidth:ie,fillOpacity:"0",ref:se[$],style:me})}))};v.defaultProps=S;var l=v;function n(){return n=Object.assign||function(G){for(var H=1;H<arguments.length;H++){var K=arguments[H];for(var B in K)Object.prototype.hasOwnProperty.call(K,B)&&(G[B]=K[B])}return G},n.apply(this,arguments)}function s(G,H){return R(G)||a(G,H)||w(G,H)||u()}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(G,H){if(!G)return;if(typeof G=="string")return y(G,H);var K=Object.prototype.toString.call(G).slice(8,-1);if(K==="Object"&&G.constructor&&(K=G.constructor.name),K==="Map"||K==="Set")return Array.from(G);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return y(G,H)}function y(G,H){(H==null||H>G.length)&&(H=G.length);for(var K=0,B=new Array(H);K<H;K++)B[K]=G[K];return B}function a(G,H){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(G)))return;var K=[],B=!0,U=!1,W=void 0;try{for(var Q=G[Symbol.iterator](),ie;!(B=(ie=Q.next()).done)&&!(K.push(ie.value),H&&K.length===H);B=!0);}catch(ce){U=!0,W=ce}finally{try{!B&&Q.return!=null&&Q.return()}finally{if(U)throw W}}return K}function R(G){if(Array.isArray(G))return G}function D(G,H){if(G==null)return{};var K=c(G,H),B,U;if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(G);for(U=0;U<W.length;U++){if(B=W[U],H.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(G,B))continue;K[B]=G[B]}}return K}function c(G,H){if(G==null)return{};var K={},B=Object.keys(G),U,W;for(W=0;W<B.length;W++){if(U=B[W],H.indexOf(U)>=0)continue;K[U]=G[U]}return K}var b=0;function E(G){return+G.replace("%","")}function C(G){return Array.isArray(G)?G:[G]}function F(G,H,K,B){var U=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,W=arguments.length>5?arguments[5]:void 0,Q=50-B/2,ie=0,ce=-Q,he=0,be=-2*Q;switch(W){case"left":ie=-Q,ce=0,he=2*Q,be=0;break;case"right":ie=Q,ce=0,he=-2*Q,be=0;break;case"bottom":ce=Q,be=2*Q;break;default:}var ne="M 50,50 m ".concat(ie,",").concat(ce,`
a `).concat(Q,",").concat(Q," 0 1 1 ").concat(he,",").concat(-be,`
a `).concat(Q,",").concat(Q," 0 1 1 ").concat(-he,",").concat(be),le=Math.PI*2*Q,ue={stroke:K,strokeDasharray:"".concat(H/100*(le-U),"px ").concat(le,"px"),strokeDashoffset:"-".concat(U/2+G/100*(le-U),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ne,pathStyle:ue}}var j=function(H){var K=H.prefixCls,B=H.strokeWidth,U=H.trailWidth,W=H.gapDegree,Q=H.gapPosition,ie=H.trailColor,ce=H.strokeLinecap,he=H.style,be=H.className,ne=H.strokeColor,le=H.percent,ue=D(H,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),re=Object(P.useMemo)(function(){return b+=1,b},[]),oe=F(0,100,ie,B,W,Q),q=oe.pathString,se=oe.pathStyle,J=C(le),ee=C(ne),ge=ee.find(function(me){return Object.prototype.toString.call(me)==="[object Object]"}),te=g(J),Y=s(te,1),z=Y[0],$=function(){var pe=0;return J.map(function(xe,Re){var ke=ee[Re]||ee[ee.length-1],Me=Object.prototype.toString.call(ke)==="[object Object]"?"url(#".concat(K,"-gradient-").concat(re,")"):"",Pe=F(pe,xe,ke,B,W,Q);return pe+=xe,m.a.createElement("path",{key:Re,className:"".concat(K,"-circle-path"),d:Pe.pathString,stroke:Me,strokeLinecap:ce,strokeWidth:B,opacity:xe===0?0:1,fillOpacity:"0",style:Pe.pathStyle,ref:z[Re]})})};return m.a.createElement("svg",n({className:L()("".concat(K,"-circle"),be),viewBox:"0 0 100 100",style:he},ue),ge&&m.a.createElement("defs",null,m.a.createElement("linearGradient",{id:"".concat(K,"-gradient-").concat(re),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(ge).sort(function(me,pe){return E(me)-E(pe)}).map(function(me,pe){return m.a.createElement("stop",{key:pe,offset:me,stopColor:ge[me]})}))),m.a.createElement("path",{className:"".concat(K,"-circle-trail"),d:q,stroke:ie,strokeLinecap:ce,strokeWidth:U||B,fillOpacity:"0",style:se}),$().reverse())};j.defaultProps=S;var k=j,X={Line:l,Circle:k}},hQp1:function(I,Z,N){"use strict";N.d(Z,"a",function(){return m});var P;(function(T){T.FirstPage="firstPage",T.PrevPage="prevPage",T.NextPage="nextPage"})(P||(P={}));var m;(function(T){T[T.Single=0]="Single",T[T.Multiple=1]="Multiple",T[T.Judge=2]="Judge",T[T.Fill=3]="Fill",T[T.Subjective=4]="Subjective",T[T.Shixun=5]="Shixun",T[T.Program=6]="Program",T[T.Combine=7]="Combine"})(m||(m={}))},i3hx:function(I,Z,N){},i58Z:function(I,Z,N){I.exports={wrap:"wrap___Yg2Z9",addKnowledge:"addKnowledge___2FlI0",disabled:"disabled___1_wxN"}},jO9C:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.Iso97971={pad:function(m,T){m.concat(P.lib.WordArray.create([2147483648],1)),P.pad.ZeroPadding.pad(m,T)},unpad:function(m){P.pad.ZeroPadding.unpad(m),m.sigBytes--}},P.pad.Iso97971})},je13:function(I,Z,N){var P=N("5nXd"),m=N("gRFJ"),T=[N("uQRt")];I.exports=P.createStore(m,T)},kSUc:function(I,Z,N){},lOMy:function(I,Z,N){},lPiR:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(m){var T=P,L=T.lib,S=L.WordArray,g=L.Hasher,_=T.algo,d=[],o=[];(function(){function h(v){for(var l=m.sqrt(v),n=2;n<=l;n++)if(!(v%n))return!1;return!0}function p(v){return(v-(v|0))*4294967296|0}for(var f=2,x=0;x<64;)h(f)&&(x<8&&(d[x]=p(m.pow(f,1/2))),o[x]=p(m.pow(f,1/3)),x++),f++})();var i=[],r=_.SHA256=g.extend({_doReset:function(){this._hash=new S.init(d.slice(0))},_doProcessBlock:function(h,p){for(var f=this._hash.words,x=f[0],v=f[1],l=f[2],n=f[3],s=f[4],u=f[5],w=f[6],y=f[7],a=0;a<64;a++){if(a<16)i[a]=h[p+a]|0;else{var R=i[a-15],D=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,c=i[a-2],b=(c<<15|c>>>17)^(c<<13|c>>>19)^c>>>10;i[a]=D+i[a-7]+b+i[a-16]}var E=s&u^~s&w,C=x&v^x&l^v&l,F=(x<<30|x>>>2)^(x<<19|x>>>13)^(x<<10|x>>>22),j=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),k=y+j+E+o[a]+i[a],X=F+C;y=w,w=u,u=s,s=n+k|0,n=l,l=v,v=x,x=k+X|0}f[0]=f[0]+x|0,f[1]=f[1]+v|0,f[2]=f[2]+l|0,f[3]=f[3]+n|0,f[4]=f[4]+s|0,f[5]=f[5]+u|0,f[6]=f[6]+w|0,f[7]=f[7]+y|0},_doFinalize:function(){var h=this._data,p=h.words,f=this._nDataBytes*8,x=h.sigBytes*8;return p[x>>>5]|=128<<24-x%32,p[(x+64>>>9<<4)+14]=m.floor(f/4294967296),p[(x+64>>>9<<4)+15]=f,h.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var h=g.clone.call(this);return h._hash=this._hash.clone(),h}});T.SHA256=g._createHelper(r),T.HmacSHA256=g._createHmacHelper(r)}(Math),P.SHA256})},lZu9:function(I,Z,N){(function(P){P(N("VrN/"),N("1eCo"),N("8EBN"))})(function(P){"use strict";P.defineMode("markdown",function(m,T){var L=P.getMode(m,"text/html"),S=L.name=="null";function g(B){if(P.findModeByName){var U=P.findModeByName(B);U&&(B=U.mime||U.mimes[0])}var W=P.getMode(m,B);return W.name=="null"?null:W}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.tokenTypeOverrides={});var _={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var d in _)_.hasOwnProperty(d)&&T.tokenTypeOverrides[d]&&(_[d]=T.tokenTypeOverrides[d]);var o=/^([*\-_])(?:\s*\1){2,}\s*$/,i=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,h=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,x=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,v=/^\s*\[[^\]]+?\]:.*$/,l=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 s(B,U,W){return U.f=U.inline=W,W(B,U)}function u(B,U,W){return U.f=U.block=W,W(B,U)}function w(B){return!B||!/\S/.test(B.string)}function y(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==R){var U=S;if(!U){var W=P.innerMode(L,B.htmlState);U=W.mode.name=="xml"&&W.state.tagStart===null&&!W.state.context&&W.state.tokenize.isInText}U&&(B.f=E,B.block=a,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function a(B,U){var W=B.column()===U.indentation,Q=w(U.prevLine.stream),ie=U.indentedCode,ce=U.prevLine.hr,he=U.list!==!1,be=(U.listStack[U.listStack.length-1]||0)+3;U.indentedCode=!1;var ne=U.indentation;if(U.indentationDiff===null&&(U.indentationDiff=U.indentation,he)){for(U.list=null;ne<U.listStack[U.listStack.length-1];)U.listStack.pop(),U.listStack.length?U.indentation=U.listStack[U.listStack.length-1]:U.list=!1;U.list!==!1&&(U.indentationDiff=ne-U.listStack[U.listStack.length-1])}var le=!Q&&!ce&&!U.prevLine.header&&(!he||!ie)&&!U.prevLine.fencedCodeEnd,ue=(U.list===!1||ce||Q)&&U.indentation<=be&&B.match(o),re=null;if(U.indentationDiff>=4&&(ie||U.prevLine.fencedCodeEnd||U.prevLine.header||Q))return B.skipToEnd(),U.indentedCode=!0,_.code;if(B.eatSpace())return null;if(W&&U.indentation<=be&&(re=B.match(h))&&re[1].length<=6)return U.quote=0,U.header=re[1].length,U.thisLine.header=!0,T.highlightFormatting&&(U.formatting="header"),U.f=U.inline,c(U);if(U.indentation<=be&&B.eat(">"))return U.quote=W?1:U.quote+1,T.highlightFormatting&&(U.formatting="quote"),B.eatSpace(),c(U);if(!ue&&!U.setext&&W&&U.indentation<=be&&(re=B.match(i))){var oe=re[1]?"ol":"ul";return U.indentation=ne+B.current().length,U.list=!0,U.quote=0,U.listStack.push(U.indentation),U.em=!1,U.strong=!1,U.code=!1,U.strikethrough=!1,T.taskLists&&B.match(r,!1)&&(U.taskList=!0),U.f=U.inline,T.highlightFormatting&&(U.formatting=["list","list-"+oe]),c(U)}else{if(W&&U.indentation<=be&&(re=B.match(x,!0)))return U.quote=0,U.fencedEndRE=new RegExp(re[1]+"+ *$"),U.localMode=T.fencedCodeBlockHighlighting&&g(re[2]||T.fencedCodeBlockDefaultMode),U.localMode&&(U.localState=P.startState(U.localMode)),U.f=U.block=D,T.highlightFormatting&&(U.formatting="code-block"),U.code=-1,c(U);if(U.setext||(!le||!he)&&!U.quote&&U.list===!1&&!U.code&&!ue&&!v.test(B.string)&&(re=B.lookAhead(1))&&(re=re.match(p)))return U.setext?(U.header=U.setext,U.setext=0,B.skipToEnd(),T.highlightFormatting&&(U.formatting="header")):(U.header=re[0].charAt(0)=="="?1:2,U.setext=U.header),U.thisLine.header=!0,U.f=U.inline,c(U);if(ue)return B.skipToEnd(),U.hr=!0,U.thisLine.hr=!0,_.hr;if(B.peek()==="[")return s(B,U,X)}return s(B,U,U.inline)}function R(B,U){var W=L.token(B,U.htmlState);if(!S){var Q=P.innerMode(L,U.htmlState);(Q.mode.name=="xml"&&Q.state.tagStart===null&&!Q.state.context&&Q.state.tokenize.isInText||U.md_inside&&B.current().indexOf(">")>-1)&&(U.f=E,U.block=a,U.htmlState=null)}return W}function D(B,U){var W=U.listStack[U.listStack.length-1]||0,Q=U.indentation<W,ie=W+3;if(U.fencedEndRE&&U.indentation<=ie&&(Q||B.match(U.fencedEndRE))){T.highlightFormatting&&(U.formatting="code-block");var ce;return Q||(ce=c(U)),U.localMode=U.localState=null,U.block=a,U.f=E,U.fencedEndRE=null,U.code=0,U.thisLine.fencedCodeEnd=!0,Q?u(B,U,U.block):ce}else return U.localMode?U.localMode.token(B,U.localState):(B.skipToEnd(),_.code)}function c(B){var U=[];if(B.formatting){U.push(_.formatting),typeof B.formatting=="string"&&(B.formatting=[B.formatting]);for(var W=0;W<B.formatting.length;W++)U.push(_.formatting+"-"+B.formatting[W]),B.formatting[W]==="header"&&U.push(_.formatting+"-"+B.formatting[W]+"-"+B.header),B.formatting[W]==="quote"&&(!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=B.quote?U.push(_.formatting+"-"+B.formatting[W]+"-"+B.quote):U.push("error"))}if(B.taskOpen)return U.push("meta"),U.length?U.join(" "):null;if(B.taskClosed)return U.push("property"),U.length?U.join(" "):null;if(B.linkHref?U.push(_.linkHref,"url"):(B.strong&&U.push(_.strong),B.em&&U.push(_.em),B.strikethrough&&U.push(_.strikethrough),B.emoji&&U.push(_.emoji),B.linkText&&U.push(_.linkText),B.code&&U.push(_.code),B.image&&U.push(_.image),B.imageAltText&&U.push(_.imageAltText,"link"),B.imageMarker&&U.push(_.imageMarker)),B.header&&U.push(_.header,_.header+"-"+B.header),B.quote&&(U.push(_.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=B.quote?U.push(_.quote+"-"+B.quote):U.push(_.quote+"-"+T.maxBlockquoteDepth)),B.list!==!1){var Q=(B.listStack.length-1)%3;Q?Q===1?U.push(_.list2):U.push(_.list3):U.push(_.list1)}return B.trailingSpaceNewLine?U.push("trailing-space-new-line"):B.trailingSpace&&U.push("trailing-space-"+(B.trailingSpace%2?"a":"b")),U.length?U.join(" "):null}function b(B,U){return B.match(f,!0)?c(U):void 0}function E(B,U){var W=U.text(B,U);if(typeof W!="undefined")return W;if(U.list)return U.list=null,c(U);if(U.taskList){var Q=B.match(r,!0)[1]===" ";return Q?U.taskOpen=!0:U.taskClosed=!0,T.highlightFormatting&&(U.formatting="task"),U.taskList=!1,c(U)}if(U.taskOpen=!1,U.taskClosed=!1,U.header&&B.match(/^#+$/,!0))return T.highlightFormatting&&(U.formatting="header"),c(U);var ie=B.next();if(U.linkTitle){U.linkTitle=!1;var ce=ie;ie==="("&&(ce=")"),ce=(ce+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var he="^\\s*(?:[^"+ce+"\\\\]+|\\\\\\\\|\\\\.)"+ce;if(B.match(new RegExp(he),!0))return _.linkHref}if(ie==="`"){var be=U.formatting;T.highlightFormatting&&(U.formatting="code"),B.eatWhile("`");var ne=B.current().length;if(U.code==0&&(!U.quote||ne==1))return U.code=ne,c(U);if(ne==U.code){var le=c(U);return U.code=0,le}else return U.formatting=be,c(U)}else if(U.code)return c(U);if(ie==="\\"&&(B.next(),T.highlightFormatting)){var ue=c(U),re=_.formatting+"-escape";return ue?ue+" "+re:re}if(ie==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return U.imageMarker=!0,U.image=!0,T.highlightFormatting&&(U.formatting="image"),c(U);if(ie==="["&&U.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return U.imageMarker=!1,U.imageAltText=!0,T.highlightFormatting&&(U.formatting="image"),c(U);if(ie==="]"&&U.imageAltText){T.highlightFormatting&&(U.formatting="image");var ue=c(U);return U.imageAltText=!1,U.image=!1,U.inline=U.f=F,ue}if(ie==="["&&!U.image)return U.linkText&&B.match(/^.*?\]/)||(U.linkText=!0,T.highlightFormatting&&(U.formatting="link")),c(U);if(ie==="]"&&U.linkText){T.highlightFormatting&&(U.formatting="link");var ue=c(U);return U.linkText=!1,U.inline=U.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?F:E,ue}if(ie==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){U.f=U.inline=C,T.highlightFormatting&&(U.formatting="link");var ue=c(U);return ue?ue+=" ":ue="",ue+_.linkInline}if(ie==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){U.f=U.inline=C,T.highlightFormatting&&(U.formatting="link");var ue=c(U);return ue?ue+=" ":ue="",ue+_.linkEmail}if(T.xml&&ie==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var oe=B.string.indexOf(">",B.pos);if(oe!=-1){var q=B.string.substring(B.start,oe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(q)&&(U.md_inside=!0)}return B.backUp(1),U.htmlState=P.startState(L),u(B,U,R)}if(T.xml&&ie==="<"&&B.match(/^\/\w*?>/))return U.md_inside=!1,"tag";if(ie==="*"||ie==="_"){for(var se=1,J=B.pos==1?" ":B.string.charAt(B.pos-2);se<3&&B.eat(ie);)se++;var ee=B.peek()||" ",ge=!/\s/.test(ee)&&(!l.test(ee)||/\s/.test(J)||l.test(J)),te=!/\s/.test(J)&&(!l.test(J)||/\s/.test(ee)||l.test(ee)),Y=null,z=null;if(se%2&&(!U.em&&ge&&(ie==="*"||!te||l.test(J))?Y=!0:U.em==ie&&te&&(ie==="*"||!ge||l.test(ee))&&(Y=!1)),se>1&&(!U.strong&&ge&&(ie==="*"||!te||l.test(J))?z=!0:U.strong==ie&&te&&(ie==="*"||!ge||l.test(ee))&&(z=!1)),z!=null||Y!=null){T.highlightFormatting&&(U.formatting=Y==null?"strong":z==null?"em":"strong em"),Y===!0&&(U.em=ie),z===!0&&(U.strong=ie);var le=c(U);return Y===!1&&(U.em=!1),z===!1&&(U.strong=!1),le}}else if(ie===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return c(U);B.backUp(1)}if(T.strikethrough){if(ie==="~"&&B.eatWhile(ie)){if(U.strikethrough){T.highlightFormatting&&(U.formatting="strikethrough");var le=c(U);return U.strikethrough=!1,le}else if(B.match(/^[^\s]/,!1))return U.strikethrough=!0,T.highlightFormatting&&(U.formatting="strikethrough"),c(U)}else if(ie===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return c(U);B.backUp(2)}}if(T.emoji&&ie===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){U.emoji=!0,T.highlightFormatting&&(U.formatting="emoji");var $=c(U);return U.emoji=!1,$}return ie===" "&&(B.match(/^ +$/,!1)?U.trailingSpace++:U.trailingSpace&&(U.trailingSpaceNewLine=!0)),c(U)}function C(B,U){var W=B.next();if(W===">"){U.f=U.inline=E,T.highlightFormatting&&(U.formatting="link");var Q=c(U);return Q?Q+=" ":Q="",Q+_.linkInline}return B.match(/^[^>]+/,!0),_.linkInline}function F(B,U){if(B.eatSpace())return null;var W=B.next();return W==="("||W==="["?(U.f=U.inline=k(W==="("?")":"]"),T.highlightFormatting&&(U.formatting="link-string"),U.linkHref=!0,c(U)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function k(B){return function(U,W){var Q=U.next();if(Q===B){W.f=W.inline=E,T.highlightFormatting&&(W.formatting="link-string");var ie=c(W);return W.linkHref=!1,ie}return U.match(j[B]),W.linkHref=!0,c(W)}}function X(B,U){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(U.f=G,B.next(),T.highlightFormatting&&(U.formatting="link"),U.linkText=!0,c(U)):s(B,U,E)}function G(B,U){if(B.match(/^\]:/,!0)){U.f=U.inline=H,T.highlightFormatting&&(U.formatting="link");var W=c(U);return U.linkText=!1,W}return B.match(/^([^\]\\]|\\.)+/,!0),_.linkText}function H(B,U){return B.eatSpace()?null:(B.match(/^[^\s]+/,!0),B.peek()===void 0?U.linkTitle=!0:B.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),U.f=U.inline=E,_.linkHref+" url")}var K={startState:function(){return{f:a,prevLine:{stream:null},thisLine:{stream:null},block:a,htmlState:null,indentation:0,inline:E,text:b,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(L,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,U){if(U.formatting=!1,B!=U.thisLine.stream){if(U.header=0,U.hr=!1,B.match(/^\s*$/,!0))return y(U),null;if(U.prevLine=U.thisLine,U.thisLine={stream:B},U.taskList=!1,U.trailingSpace=0,U.trailingSpaceNewLine=!1,!U.localState&&(U.f=U.block,U.f!=R)){var W=B.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(U.indentation=W,U.indentationDiff=null,W>0)return null}}return U.f(B,U)},innerMode:function(B){return B.block==R?{state:B.htmlState,mode:L}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:K}},indent:function(B,U,W){return B.block==R&&L.indent?L.indent(B.htmlState,U,W):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,U,W):P.Pass},blankLine:y,getType:c,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return K},"xml"),P.defineMIME("text/markdown","markdown"),P.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(I){if(!0)module.exports=I();else var Z})(function(){var define,module,exports;return function(){function I(Z,N,P){function m(S,g){if(!N[S]){if(!Z[S]){var _=typeof require=="function"&&require;if(!g&&_)return require(S,!0);if(T)return T(S,!0);var d=new Error("Cannot find module '"+S+"'");throw d.code="MODULE_NOT_FOUND",d}var o=N[S]={exports:{}};Z[S][0].call(o.exports,function(i){var r=Z[S][1][i];return m(r||i)},o,o.exports,I,Z,N,P)}return N[S].exports}for(var T=typeof require=="function"&&require,L=0;L<P.length;L++)m(P[L]);return m}return I}()({1:[function(I,Z,N){"use strict";var P=I("./browser/client");P.Buffer=I("buffer").Buffer,P.urllib=I("../shims/xhr"),P.version=I("./browser/version").version,Z.exports=P},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(I,Z,N){(function(P,m){"use strict";var T=I("babel-runtime/core-js/promise"),L=o(T),S=I("babel-runtime/regenerator"),g=o(S),_=I("babel-runtime/core-js/object/assign"),d=o(_);function o(X){return X&&X.__esModule?X:{default:X}}var i=I("debug")("ali-oss"),r=I("copy-to"),h=I("xml2js"),p=I("agentkeepalive"),f=I("merge-descriptors"),x=I("url"),v=I("is-type-of"),l=I("platform"),n=I("utility"),s=I("urllib"),u=I("./version"),w=I("bowser"),y=I("../common/signUtils"),a=I("../common/utils/isIP"),R=a.isIP,D=I("../common/client/initOptions"),c=I("../common/utils/createRequest"),b=c.createRequest,E=new p;function C(){var X=l.name,G=l.version;X&&X.toLowerCase&&X.toLowerCase()==="ie"&&G.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function F(){return location&&location.protocol==="https:"}function j(X,G){if(C(),!(this instanceof j))return new j(X,G);X&&X.inited?this.options=X:this.options=j.initOptions(X),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=s,this.agent=this.options.agent||E),this.ctx=G,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}Z.exports=j,j.initOptions=function(G){G.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var H=(0,d.default)({secure:F(),useFetch:!1},G);return D(H)};var k=j.prototype;k.debug=i,f(k,I("./object")),f(k,I("../common/bucket/getBucketWebsite")),f(k,I("../common/bucket/putBucketWebsite")),f(k,I("../common/bucket/deleteBucketWebsite")),f(k,I("../common/bucket/getBucketLifecycle")),f(k,I("../common/bucket/putBucketLifecycle")),f(k,I("../common/bucket/deleteBucketLifecycle")),f(k,I("../common/bucket/putBucketVersioning")),f(k,I("../common/bucket/getBucketVersioning")),f(k,I("./managed-upload")),f(k,I("../common/multipart")),f(k,I("../common/parallel")),k.signature=function(G){return this.debug("authorization stringToSign: %s",G,"info"),y.computeSignature(this.options.accessKeySecret,G)},k.authorization=function(G,H,K,B){var U=y.buildCanonicalString(G.toUpperCase(),H,{headers:B,parameters:K});return y.authorization(this.options.accessKeyId,this.options.accessKeySecret,U)},k.request=function(G){var H,K,B,U,W,Q;return g.default.async(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return H=b.call(this,G),this.options.useFetch||(H.params.mode="disable-fetch"),K=void 0,B=void 0,U=!!G.stream,ce.prev=5,ce.next=8,g.default.awrap(this.urllib.request(H.url,H.params));case 8:K=ce.sent,this.debug("response %s %s, got %s, headers: %j",G.method,H.url,K.status,K.headers,"info"),ce.next=15;break;case 12:ce.prev=12,ce.t0=ce.catch(5),B=ce.t0;case 15:if(W=void 0,!(K&&G.successStatuses&&G.successStatuses.indexOf(K.status)===-1)){ce.next=28;break}return ce.next=19,g.default.awrap(this.requestError(K));case 19:if(W=ce.sent,!(W.code==="RequestTimeTooSkewed"&&!U)){ce.next=25;break}return this.options.amendTimeSkewed=+new Date(W.serverTime)-new Date,ce.next=24,g.default.awrap(this.request(G));case 24:return ce.abrupt("return",ce.sent);case 25:W.params=G,ce.next=32;break;case 28:if(!B){ce.next=32;break}return ce.next=31,g.default.awrap(this.requestError(B));case 31:W=ce.sent;case 32:if(!W){ce.next=34;break}throw W;case 34:if(!G.xmlResponse){ce.next=39;break}return ce.next=37,g.default.awrap(this.parseXML(K.data));case 37:Q=ce.sent,K.data=Q;case 39:return ce.abrupt("return",K);case 40:case"end":return ce.stop()}},null,this,[[5,12]])},k._getResource=function(G){var H="/";return G.bucket&&(H+=G.bucket+"/"),G.object&&(H+=G.object),H},k._isIP=R,k._escape=function(G){return n.encodeURIComponent(G).replace(/%2F/g,"/")},k._getReqUrl=function(G){var H={};r(this.options.endpoint).to(H);var K=this._isIP(H.hostname),B=this.options.cname;G.bucket&&!B&&!K&&(H.host=G.bucket+"."+H.host);var U="/";G.bucket&&K&&(U+=G.bucket+"/"),G.object&&(U+=this._escape(G.object).replace(/\+/g,"%2B")),H.pathname=U;var W={};if(G.query&&f(W,G.query),G.subres){var Q={};v.string(G.subres)?Q[G.subres]="":v.array(G.subres)?G.subres.forEach(function(ie){Q[ie]=""}):Q=G.subres,f(W,Q)}return H.query=W,x.format(H)},k._getUserAgent=function(){var G=m&&m.browser?"js":"nodejs",H="aliyun-sdk-"+G+"/"+u.version,K=l.description;return!K&&m&&(K="Node.js "+m.version.slice(1)+" on "+m.platform+" "+m.arch),this._checkUserAgent(H+" "+K)},k._checkUserAgent=function(G){var H=G.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return H},k.checkBrowserAndVersion=function(G,H){return w.name===G&&w.version.split(".")[0]===H},k.parseXML=function(G){return new L.default(function(H,K){P.isBuffer(G)&&(G=G.toString()),h.parseString(G,{explicitRoot:!1,explicitArray:!1},function(B,U){B?K(B):H(U)})})},k.requestError=function(G){var H,K,B,U;return g.default.async(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(H=null,!(!G.data||!G.data.length)){Q.next=5;break}G.status===-1||G.status===-2?(H=new Error(G.message),H.name=G.name,H.status=G.status,H.code=G.name):(G.status===404?(H=new Error("Object not exists"),H.name="NoSuchKeyError",H.status=404,H.code="NoSuchKey"):G.status===412?(H=new Error("Pre condition failed"),H.name="PreconditionFailedError",H.status=412,H.code="PreconditionFailed"):(H=new Error("Unknow error, status: "+G.status),H.name="UnknowError",H.status=G.status),H.requestId=G.headers["x-oss-request-id"],H.host=""),Q.next=33;break;case 5:return K=String(G.data),this.debug("request response error data: %s",K,"error"),B=void 0,Q.prev=8,Q.next=11,g.default.awrap(this.parseXML(K));case 11:if(Q.t0=Q.sent,Q.t0){Q.next=14;break}Q.t0={};case 14:B=Q.t0,Q.next=24;break;case 17:return Q.prev=17,Q.t1=Q.catch(8),this.debug(K,"error"),Q.t1.message+=`
raw xml: `+K,Q.t1.status=G.status,Q.t1.requestId=G.headers["x-oss-request-id"],Q.abrupt("return",Q.t1);case 24:U=B.Message||"unknow request error, status: "+G.status,B.Condition&&(U+=" (condition: "+B.Condition+")"),H=new Error(U),H.name=B.Code?B.Code+"Error":"UnknowError",H.status=G.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"),Q.abrupt("return",H);case 35:case"end":return Q.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:I("../../node_modules/is-buffer/index.js")},I("_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(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/core-js/array/from"),T=d(m),L=I("babel-runtime/core-js/promise"),S=d(L),g=I("babel-runtime/regenerator"),_=d(g);function d(y){return y&&y.__esModule?y:{default:y}}var o=I("is-type-of"),i=I("util"),r=I("path"),h=I("mime"),p=I("copy-to"),f=I("../common/utils/isBlob"),x=f.isBlob,v=I("../common/utils/isFile"),l=v.isFile,n=N;n.multipartUpload=function(a,R,D){var c,b,E,C,F,j,k,X,G;return _.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:if(this.resetCancelFlag(),D=D||{},!(D.checkpoint&&D.checkpoint.uploadId)){K.next=6;break}return K.next=5,_.default.awrap(this._resumeMultipart(D.checkpoint,D));case 5:return K.abrupt("return",K.sent);case 6:return c=100*1024,D.mime||(l(R)?D.mime=h.getType(r.extname(R.name)):x(R)?D.mime=R.type:D.mime=h.getType(r.extname(R))),D.headers=D.headers||{},this._convertMetaToHeaders(D.meta,D.headers),K.next=12,_.default.awrap(this._getFileSize(R));case 12:if(b=K.sent,!(b<c)){K.next=25;break}return E=this._createStream(R,0,b),D.contentLength=b,K.next=18,_.default.awrap(this.putStream(a,E,D));case 18:if(C=K.sent,!(D&&D.progress)){K.next=22;break}return K.next=22,_.default.awrap(D.progress(1));case 22:return F={res:C.res,bucket:this.options.bucket,name:a,etag:C.res.headers.etag},(D.headers&&D.headers["x-oss-callback"]||D.callback)&&(F.data=C.data),K.abrupt("return",F);case 25:if(!(D.partSize&&!(parseInt(D.partSize,10)===D.partSize))){K.next=27;break}throw new Error("partSize must be int number");case 27:if(!(D.partSize&&D.partSize<c)){K.next=29;break}throw new Error("partSize must not be smaller than "+c);case 29:return K.next=31,_.default.awrap(this.initMultipartUpload(a,D));case 31:if(j=K.sent,k=j.uploadId,X=this._getPartSize(b,D.partSize),G={file:R,name:a,fileSize:b,partSize:X,uploadId:k,doneParts:[]},!(D&&D.progress)){K.next=38;break}return K.next=38,_.default.awrap(D.progress(0,G,j.res));case 38:return K.next=40,_.default.awrap(this._resumeMultipart(G,D));case 40:return K.abrupt("return",K.sent);case 41:case"end":return K.stop()}},null,this)},n._resumeMultipart=function(a,R){var D,c,b,E,C,F,j,k,X,G,H,K,B,U,W,Q,ie,ce;return _.default.async(function(be){for(;;)switch(be.prev=be.next){case 0:if(D=this,!this.isCancel()){be.next=3;break}throw this._makeCancelEvent();case 3:return c=a.file,b=a.fileSize,E=a.partSize,C=a.uploadId,F=a.doneParts,j=a.name,k=[],F.length>0&&p(F).to(k),X=this._divideParts(b,E),G=X.length,H=!1,K=function(le,ue){var re=this;return new S.default(function(q,se){var J,ee,ge,te;return _.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(z.prev=0,le.isCancel()){z.next=18;break}return J=X[ue-1],ee={stream:le._createStream(c,J.start,J.end),size:J.end-J.start},z.next=6,_.default.awrap(le._uploadPart(j,C,ue,ee));case 6:if(ge=z.sent,!(!le.isCancel()&&!H)){z.next=15;break}if(a.doneParts.push({number:ue,etag:ge.res.headers.etag}),!R.progress){z.next=12;break}return z.next=12,_.default.awrap(R.progress(F.length/G,a,ge.res));case 12:q({number:ue,etag:ge.res.headers.etag}),z.next=16;break;case 15:q();case 16:z.next=19;break;case 18:q();case 19:z.next=30;break;case 21:z.prev=21,z.t0=z.catch(0),te=new Error,te.name=z.t0.name,te.message=z.t0.message,te.stack=z.t0.stack,te.partNum=ue,p(z.t0).to(te),se(te);case 30:case"end":return z.stop()}},null,re,[[0,21]])})},B=(0,T.default)(new Array(G),function(ne,le){return le+1}),U=k.map(function(ne){return ne.number}),W=B.filter(function(ne){return U.indexOf(ne)<0}),Q=5,ie=R.parallel||Q,be.next=17,_.default.awrap(this._parallel(W,ie,function(ne){return new S.default(function(le,ue){K(D,ne).then(function(re){re&&k.push(re),le()}).catch(function(re){ue(re)})})}));case 17:if(ce=be.sent,H=!0,!this.isCancel()){be.next=22;break}throw K=null,this._makeCancelEvent();case 22:if(!(ce&&ce.length>0)){be.next=25;break}throw ce[0].message="Failed to upload some parts with error: "+ce[0].toString()+" part_num: "+ce[0].partNum,ce[0];case 25:return be.next=27,_.default.awrap(this.completeMultipartUpload(j,C,k,R));case 27:return be.abrupt("return",be.sent);case 28:case"end":return be.stop()}},null,this)},n._getFileSize=function(a){return _.default.async(function(D){for(;;)switch(D.prev=D.next){case 0:if(!o.buffer(a)){D.next=4;break}return D.abrupt("return",a.length);case 4:if(!(x(a)||l(a))){D.next=6;break}return D.abrupt("return",a.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return D.stop()}},null,this)};var s=I("stream"),u=s.Readable;function w(y,a){if(!(this instanceof w))return new w(y,a);u.call(this,a),this.file=y,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}i.inherits(w,u),w.prototype.readFileAndPush=function(a){if(this.fileBuffer)for(var R=!0;R&&this.fileBuffer&&this.start<this.fileBuffer.length;){var D=this.start,c=D+a;c=c>this.fileBuffer.length?this.fileBuffer.length:c,this.start=c,R=this.push(this.fileBuffer.slice(D,c))}},w.prototype._read=function(a){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var R=16*1024;a=a||R;var D=this;this.reader.onload=function(b){D.fileBuffer=P.from(new Uint8Array(b.target.result)),D.file=null,D.readFileAndPush(a)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(a)},n._createStream=function(a,R,D){if(x(a)||l(a))return new w(a.slice(R,D));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(a,R){var D=10*1e3,c=1024*1024;return R?Math.max(Math.ceil(a/D),R):c},n._divideParts=function(a,R){for(var D=Math.ceil(a/R),c=[],b=0;b<D;b++){var E=R*b,C=Math.min(E+R,a);c.push({start:E,end:C})}return c}}).call(this,I("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(I,Z,N){"use strict";var P=I("babel-runtime/core-js/promise"),m=o(P),T=I("babel-runtime/core-js/object/keys"),L=o(T),S=I("babel-runtime/core-js/object/assign"),g=o(S),_=I("babel-runtime/regenerator"),d=o(_);function o(D){return D&&D.__esModule?D:{default:D}}var i=I("utility"),r=I("fs"),h=I("is-type-of"),p=I("url"),f=I("copy-to"),x=I("path"),v=I("mime"),l=I("../common/callback"),n=I("../common/signUtils"),s=I("merge-descriptors"),u=I("../common/utils/isBlob"),w=u.isBlob,y=I("../common/utils/isFile"),a=y.isFile,R=N;R.append=function(c,b,E){var C;return d.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return E=E||{},E.position===void 0&&(E.position="0"),E.subres={append:"",position:E.position},E.method="POST",j.next=6,d.default.awrap(this.put(c,b,E));case 6:return C=j.sent,C.nextAppendPosition=C.res.headers["x-oss-next-append-position"],j.abrupt("return",C);case 9:case"end":return j.stop()}},null,this)},R.put=function(c,b,E){var C,F,j,k,X,G,H;return d.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(C=void 0,E=E||{},c=this._objectName(c),!h.buffer(b)){B.next=7;break}C=b,B.next=33;break;case 7:if(!(w(b)||a(b))){B.next=32;break}return E.mime||(a(b)?E.mime=v.getType(x.extname(b.name)):E.mime=b.type),F=this._createStream(b,0,b.size),B.next=12,d.default.awrap(this._getFileSize(b));case 12:return E.contentLength=B.sent,B.prev=13,B.next=16,d.default.awrap(this.putStream(c,F,E));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,d.default.awrap(this.put(c,b,E));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 E.headers=E.headers||{},this._convertMetaToHeaders(E.meta,E.headers),k=E.method||"PUT",X=this._objectRequestParams(k,c,E),l.encodeCallback(X,E),X.mime=E.mime,X.content=C,X.successStatuses=[200],B.next=43,d.default.awrap(this.request(X));case 43:return G=B.sent,H={name:c,url:this._objectUrl(c),res:G.res},X.headers&&X.headers["x-oss-callback"]&&(H.data=JSON.parse(G.data.toString())),B.abrupt("return",H);case 47:case"end":return B.stop()}},null,this,[[13,20]])},R.putStream=function(c,b,E){var C,F,j,k;return d.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:return E=E||{},E.headers=E.headers||{},c=this._objectName(c),E.contentLength?E.headers["Content-Length"]=E.contentLength:E.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(E.meta,E.headers),C=E.method||"PUT",F=this._objectRequestParams(C,c,E),l.encodeCallback(F,E),F.mime=E.mime,F.stream=b,F.successStatuses=[200],G.next=13,d.default.awrap(this.request(F));case 13:return j=G.sent,k={name:c,url:this._objectUrl(c),res:j.res},F.headers&&F.headers["x-oss-callback"]&&(k.data=JSON.parse(j.data.toString())),G.abrupt("return",k);case 17:case"end":return G.stop()}},null,this)},s(R,I("../common/object/copyObject")),s(R,I("../common/object/getObjectTagging")),s(R,I("../common/object/putObjectTagging")),s(R,I("../common/object/deleteObjectTagging")),s(R,I("../common/image")),s(R,I("../common/object/getBucketVersions")),s(R,I("../common/object/getACL")),s(R,I("../common/object/putACL")),s(R,I("../common/object/head")),s(R,I("../common/object/delete")),s(R,I("../common/object/get")),s(R,I("../common/object/putSymlink")),s(R,I("../common/object/getSymlink")),s(R,I("../common/object/deleteMulti")),s(R,I("../common/object/getObjectMeta")),R.putMeta=function(c,b,E){var C;return d.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,d.default.awrap(this.copy(c,c,{meta:b||{},timeout:E&&E.timeout,ctx:E&&E.ctx}));case 2:return C=j.sent,j.abrupt("return",C);case 4:case"end":return j.stop()}},null,this)},R.list=function(c,b){var E,C,F,j,k;return d.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:return E=this._objectRequestParams("GET","",b),E.query=c,E.xmlResponse=!0,E.successStatuses=[200],G.next=6,d.default.awrap(this.request(E));case 6:return C=G.sent,F=C.data.Contents,j=this,F&&(Array.isArray(F)||(F=[F]),F=F.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}}})),k=C.data.CommonPrefixes||null,k&&(Array.isArray(k)||(k=[k]),k=k.map(function(H){return H.Prefix})),G.abrupt("return",{res:C.res,objects:F,prefixes:k,nextMarker:C.data.NextMarker||null,isTruncated:C.data.IsTruncated==="true"});case 13:case"end":return G.stop()}},null,this)},R.restore=function(c,b){var E,C;return d.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return b=b||{},b.subres=(0,g.default)({restore:""},b.subres),b.versionId&&(b.subres.versionId=b.versionId),E=this._objectRequestParams("POST",c,b),E.successStatuses=[202],j.next=7,d.default.awrap(this.request(E));case 7:return C=j.sent,j.abrupt("return",{res:C.res});case 9:case"end":return j.stop()}},null,this)},R.signatureUrl=function(c,b){b=b||{},c=this._objectName(c),b.method=b.method||"GET";var E=i.timestamp()+(b.expires||1800),C={bucket:this.options.bucket,object:c},F=this._getResource(C);this.options.stsToken&&(b["security-token"]=this.options.stsToken);var j=n._signatureForURL(this.options.accessKeySecret,b,F,E),k=p.parse(this._getReqUrl(C));return k.query={OSSAccessKeyId:this.options.accessKeyId,Expires:E,Signature:j.Signature},f(j.subResource).to(k.query),k.format()},R.getObjectUrl=function(c,b){return b?b[b.length-1]!=="/"&&(b+="/"):b=this.options.endpoint.format(),b+this._escape(this._objectName(c))},R._objectUrl=function(c){return this._getReqUrl({bucket:this.options.bucket,object:c})},R.generateObjectUrl=function(D,c){if(c)c[c.length-1]!=="/"&&(c+="/");else{c=this.options.endpoint.format();var b=p.parse(c),E=this.options.bucket;b.hostname=E+"."+b.hostname,b.host=E+"."+b.host,c=b.format()}return c+this._escape(this._objectName(D))},R._objectRequestParams=function(c,b,E){if(!this.options.bucket)throw new Error("Please create a bucket first");E=E||{},b=this._objectName(b);var C={object:b,bucket:this.options.bucket,method:c,subres:E&&E.subres,timeout:E&&E.timeout,ctx:E&&E.ctx};return E.headers&&(C.headers={},f(E.headers).to(C.headers)),C},R._objectName=function(c){return c.replace(/^\/+/,"")},R._convertMetaToHeaders=function(c,b){if(!c)return;(0,L.default)(c).forEach(function(E){b["x-oss-meta-"+E]=c[E]})},R._deleteFileSafe=function(c){var b=this;return new m.default(function(E){r.exists(c,function(C){C?r.unlink(c,function(F){F&&b.debug("unlink %j error: %s",c,F,"error"),E()}):E()})})}},{"../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(I,Z,N){"use strict";N.version="6.10.0"},{}],6:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(_){return _&&_.__esModule?_:{default:_}}var L=I("../utils/checkBucketName"),S=L.checkBucketName,g=N;g.deleteBucketLifecycle=function(d,o){var i,r;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return S(d),i=this._bucketRequestParams("DELETE",d,"lifecycle",o),i.successStatuses=[204],p.next=5,m.default.awrap(this.request(i));case 5:return r=p.sent,p.abrupt("return",{res:r.res});case 7:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(_){return _&&_.__esModule?_:{default:_}}var L=I("../utils/checkBucketName"),S=L.checkBucketName,g=N;g.deleteBucketWebsite=function(d,o){var i,r;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return S(d),i=this._bucketRequestParams("DELETE",d,"website",o),i.successStatuses=[204],p.next=5,m.default.awrap(this.request(i));case 5:return r=p.sent,p.abrupt("return",{res:r.res});case 7:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(r){return r&&r.__esModule?r:{default:r}}var L=I("../utils/checkBucketName"),S=L.checkBucketName,g=I("../utils/isArray"),_=g.isArray,d=I("../utils/formatObjKey"),o=d.formatObjKey,i=N;i.getBucketLifecycle=function(h,p){var f,x,v;return m.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return S(h),f=this._bucketRequestParams("GET",h,"lifecycle",p),f.successStatuses=[200],f.xmlResponse=!0,n.next=6,m.default.awrap(this.request(f));case 6:return x=n.sent,v=x.data.Rule||null,v&&(_(v)||(v=[v]),v=v.map(function(s){return s.ID&&(s.id=s.ID,delete s.ID),s.Tag&&!_(s.Tag)&&(s.Tag=[s.Tag]),o(s,"firstLowerCase")})),n.abrupt("return",{rules:v,res:x.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(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(_){return _&&_.__esModule?_:{default:_}}var L=I("../utils/checkBucketName"),S=L.checkBucketName,g=N;g.getBucketVersioning=function(d,o){var i,r,h;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return S(d),i=this._bucketRequestParams("GET",d,"versioning",o),i.xmlResponse=!0,i.successStatuses=[200],f.next=6,m.default.awrap(this.request(i));case 6:return r=f.sent,h=r.data.Status,f.abrupt("return",{status:r.status,versionStatus:h,res:r.res});case 9:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(o){return o&&o.__esModule?o:{default:o}}var L=I("../utils/checkBucketName"),S=L.checkBucketName,g=I("../utils/isObject"),_=g.isObject,d=N;d.getBucketWebsite=function(i,r){var h,p,f;return m.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return S(i),h=this._bucketRequestParams("GET",i,"website",r),h.successStatuses=[200],h.xmlResponse=!0,v.next=6,m.default.awrap(this.request(h));case 6:return p=v.sent,f=[],p.data.RoutingRules&&p.data.RoutingRules.RoutingRule&&(_(p.data.RoutingRules.RoutingRule)?f=[p.data.RoutingRules.RoutingRule]:f=p.data.RoutingRules.RoutingRule),v.abrupt("return",{index:p.data.IndexDocument&&p.data.IndexDocument.Suffix||"",supportSubDir:p.data.IndexDocument&&p.data.IndexDocument.SupportSubDir||"false",type:p.data.IndexDocument&&p.data.IndexDocument.Type,routingRules:f,error:p.data.ErrorDocument&&p.data.ErrorDocument.Key||null,res:p.res});case 10:case"end":return v.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(a){return a&&a.__esModule?a:{default:a}}var L=I("../utils/checkBucketName"),S=L.checkBucketName,g=I("../utils/isArray"),_=g.isArray,d=I("../utils/deepCopy"),o=d.deepCopy,i=I("../utils/isObject"),r=i.isObject,h=I("../utils/obj2xml"),p=h.obj2xml,f=I("../utils/checkObjectTag"),x=f.checkObjectTag,v=I("../utils/getStrBytesCount"),l=v.getStrBytesCount,n=N;n.putBucketLifecycle=function(R,D,c){var b,E,C,F,j;return m.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(S(R),_(D)){X.next=3;break}throw new Error("rules must be Array");case 3:return b=this._bucketRequestParams("PUT",R,"lifecycle",c),E=[],C={LifecycleConfiguration:{Rule:E}},D.forEach(function(G){s(G),y(G),G.id&&(G.ID=G.id,delete G.id),E.push(G)}),F=p(C,{headers:!0,firstUpperCase:!0}),b.content=F,b.mime="xml",b.successStatuses=[200],X.next=13,m.default.awrap(this.request(b));case 13:return j=X.sent,X.abrupt("return",{res:j.res});case 15:case"end":return X.stop()}},null,this)};function s(a){a.days&&(a.expiration={days:a.days}),a.date&&(a.expiration={createdBeforeDate:a.date})}function u(a,R){var D=a.days,c=a.createdBeforeDate;if(!D&&!c)throw new Error(R+" must includes days or createdBeforeDate");if(D&&!/^[1-9][0-9]*$/.test(D))throw new Error("days must be a positive integer");if(c&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(c))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function w(a){if(!_(a)&&!r(a))throw new Error("tag must be Object or Array");a=r(a)?[a]:a;var R={},D=o(a);D.forEach(function(c){R[c.key]=c.value}),x(R)}function y(a){if(a.id&&l(a.id)>255)throw new Error("ID is composed of 255 bytes at most");if(a.prefix===""||a.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(a.status))throw new Error("Status must be Enabled or Disabled");if(a.transition){if(!["IA","Archive"].includes(a.transition.storageClass))throw new Error("StorageClass must be IA or Archive");u(a.transition,"Transition")}if(a.expiration){if(!a.expiration.expiredObjectDeleteMarker)u(a.expiration,"Expiration");else if(a.expiration.days||a.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(a.abortMultipartUpload&&u(a.abortMultipartUpload,"AbortMultipartUpload"),!a.expiration&&!a.abortMultipartUpload&&!a.transition&&!a.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(a.tag){if(a.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");w(a.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(o){return o&&o.__esModule?o:{default:o}}var L=I("../utils/checkBucketName"),S=L.checkBucketName,g=I("../utils/obj2xml"),_=g.obj2xml,d=N;d.putBucketVersioning=function(i,r){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,f,x;return m.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:if(S(i),["Enabled","Suspended"].includes(r)){l.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return p=this._bucketRequestParams("PUT",i,"versioning",h),f={VersioningConfiguration:{Status:r}},p.mime="xml",p.content=_(f,{headers:!0}),l.next=9,m.default.awrap(this.request(p));case 9:return x=l.sent,l.abrupt("return",{res:x.res,status:x.status});case 11:case"end":return l.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(r){return r&&r.__esModule?r:{default:r}}var L=I("../utils/checkBucketName"),S=L.checkBucketName,g=I("../utils/obj2xml"),_=g.obj2xml,d=I("../utils/isArray"),o=d.isArray,i=N;i.putBucketWebsite=function(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=arguments[2],x,v,l,n,s;return m.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:if(S(h),x=this._bucketRequestParams("PUT",h,"website",f),v={Suffix:p.index||"index.html"},l={IndexDocument:v},n={WebsiteConfiguration:l},p.supportSubDir&&(v.SupportSubDir=p.supportSubDir),p.type&&(v.Type=p.type),p.error&&(l.ErrorDocument={Key:p.error}),!(p.routingRules!==void 0)){w.next=12;break}if(o(p.routingRules)){w.next=11;break}throw new Error("RoutingRules must be Array");case 11:l.RoutingRules={RoutingRule:p.routingRules};case 12:return n=_(n),x.content=n,x.mime="xml",x.successStatuses=[200],w.next=18,m.default.awrap(this.request(x));case 18:return s=w.sent,w.abrupt("return",{res:s.res});case 20:case"end":return w.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/core-js/object/keys"),T=g(m),L=I("babel-runtime/core-js/json/stringify"),S=g(L);function g(_){return _&&_.__esModule?_:{default:_}}N.encodeCallback=function(d,o){if(d.headers=d.headers||{},!Object.prototype.hasOwnProperty.call(d.headers,"x-oss-callback")&&o.callback){var i={callbackUrl:encodeURI(o.callback.url),callbackBody:o.callback.body};o.callback.host&&(i.callbackHost=o.callback.host),o.callback.contentType&&(i.callbackBodyType=o.callback.contentType);var r=P.from((0,S.default)(i)).toString("base64");if(d.headers["x-oss-callback"]=r,o.callback.customValue){var h={};(0,T.default)(o.callback.customValue).forEach(function(p){h["x:"+p]=o.callback.customValue[p]}),d.headers["x-oss-callback-var"]=P.from((0,S.default)(h)).toString("base64")}}}}).call(this,I("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/assign"),m=T(P);function T(i){return i&&i.__esModule?i:{default:i}}var L=I("humanize-ms"),S=I("url"),g=I("../utils/checkBucketName"),_=g.checkBucketName;function d(i,r){var h=S.parse(i);if(h.protocol||(h=S.parse("http"+(r?"s":"")+"://"+i)),h.protocol!=="http:"&&h.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return h}function o(i,r,h){var p=h?"https://":"http://",f=r?"-internal.aliyuncs.com":".aliyuncs.com",x="vpc100-oss-cn-";return i.substr(0,x.length)===x&&(f=".aliyuncs.com"),S.parse(p+i+f)}Z.exports=function(i){if(!i||!i.accessKeyId||!i.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");i.bucket&&_(i.bucket);var r=(0,m.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},i);if(r.accessKeyId=r.accessKeyId.trim(),r.accessKeySecret=r.accessKeySecret.trim(),r.timeout&&(r.timeout=L(r.timeout)),r.endpoint)r.endpoint=d(r.endpoint,r.secure);else if(r.region)r.endpoint=o(r.region,r.internal,r.secure);else throw new Error("require options.endpoint or options.region");return r.inited=!0,r}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(I,Z,N){"use strict";var P=I("merge-descriptors"),m=N;P(m,I("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(r){return r&&r.__esModule?r:{default:r}}var L=I("../utils/checkBucketName"),S=L.checkBucketName,g=I("querystring"),_=I("js-base64"),d=_.Base64.encode,o=N;o.processObjectSave=function(h,p,f,x){var v,l,n,s;return m.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return i(h,"sourceObject"),i(p,"targetObject"),i(f,"process"),p=this._objectName(p),x&&S(x),v=this._objectRequestParams("POST",h,{subres:"x-oss-process"}),l=x?",b_"+d(x):"",p=d(p),n={"x-oss-process":f+"|sys/saveas,o_"+p+l},v.content=g.stringify(n),w.next=12,m.default.awrap(this.request(v));case 12:return s=w.sent,w.abrupt("return",{res:s.res,status:s.res.status});case 14:case"end":return w.stop()}},null,this)};function i(r,h){if(!r)throw new Error(h+" is required");if(typeof r!="string")throw new Error(h+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(o){return o&&o.__esModule?o:{default:o}}var L=I("copy-to"),S=I("./callback"),g=I("./utils/deepCopy"),_=g.deepCopy,d=N;d.listUploads=function(i,r){var h,p,f,x;return m.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return r=r||{},h={},L(r).to(h),h.subres="uploads",p=this._objectRequestParams("GET","",h),p.query=i,p.xmlResponse=!0,p.successStatuses=[200],l.next=10,m.default.awrap(this.request(p));case 10:return f=l.sent,x=f.data.Upload||[],Array.isArray(x)||(x=[x]),x=x.map(function(n){return{name:n.Key,uploadId:n.UploadId,initiated:n.Initiated}}),l.abrupt("return",{res:f.res,uploads:x,bucket:f.data.Bucket,nextKeyMarker:f.data.NextKeyMarker,nextUploadIdMarker:f.data.NextUploadIdMarker,isTruncated:f.data.IsTruncated==="true"});case 15:case"end":return l.stop()}},null,this)},d.listParts=function(i,r,h,p){var f,x,v;return m.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return p=p||{},f={},L(p).to(f),f.subres={uploadId:r},x=this._objectRequestParams("GET",i,f),x.query=h,x.xmlResponse=!0,x.successStatuses=[200],n.next=10,m.default.awrap(this.request(x));case 10:return v=n.sent,n.abrupt("return",{res:v.res,uploadId:v.data.UploadId,bucket:v.data.Bucket,name:v.data.Key,partNumberMarker:v.data.PartNumberMarker,nextPartNumberMarker:v.data.NextPartNumberMarker,maxParts:v.data.MaxParts,isTruncated:v.data.IsTruncated,parts:v.data.Part||[]});case 12:case"end":return n.stop()}},null,this)},d.abortMultipartUpload=function(i,r,h){var p,f,x;return m.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return this._stop(),h=h||{},p={},L(h).to(p),p.subres={uploadId:r},f=this._objectRequestParams("DELETE",i,p),f.successStatuses=[204],l.next=9,m.default.awrap(this.request(f));case 9:return x=l.sent,l.abrupt("return",{res:x.res});case 11:case"end":return l.stop()}},null,this)},d.initMultipartUpload=function(i,r){var h,p,f;return m.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return r=r||{},h={},L(r).to(h),h.headers=h.headers||{},this._convertMetaToHeaders(r.meta,h.headers),h.subres="uploads",p=this._objectRequestParams("POST",i,h),p.mime=r.mime,p.xmlResponse=!0,p.successStatuses=[200],v.next=12,m.default.awrap(this.request(p));case 12:return f=v.sent,v.abrupt("return",{res:f.res,bucket:f.data.Bucket,name:f.data.Key,uploadId:f.data.UploadId});case 14:case"end":return v.stop()}},null,this)},d.uploadPart=function(i,r,h,p,f,x,v){var l;return m.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return l={stream:this._createStream(p,f,x),size:x-f},s.next=3,m.default.awrap(this._uploadPart(i,r,h,l,v));case 3:return s.abrupt("return",s.sent);case 4:case"end":return s.stop()}},null,this)},d.completeMultipartUpload=function(i,r,h,p){var f,x,v,l,n,s,u,w;return m.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:for(f=h.concat().sort(function(R,D){return R.number-D.number}).filter(function(R,D,c){return!D||R.number!==c[D-1].number}),x=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,v=0;v<f.length;v++)l=f[v],x+=`<Part>
`,x+="<PartNumber>"+l.number+`</PartNumber>
`,x+="<ETag>"+l.etag+`</ETag>
`,x+=`</Part>
`;return x+="</CompleteMultipartUpload>",p=p||{},n={},n=_(p),n.headers&&delete n.headers["x-oss-server-side-encryption"],n.subres={uploadId:r},s=this._objectRequestParams("POST",i,n),S.encodeCallback(s,n),s.mime="xml",s.content=x,s.headers&&s.headers["x-oss-callback"]||(s.xmlResponse=!0),s.successStatuses=[200],a.next=17,m.default.awrap(this.request(s));case 17:return u=a.sent,w={res:u.res,bucket:s.bucket,name:i,etag:u.res.headers.etag},s.headers&&s.headers["x-oss-callback"]&&(w.data=JSON.parse(u.data.toString())),a.abrupt("return",w);case 21:case"end":return a.stop()}},null,this)},d._uploadPart=function(i,r,h,p,f){var x,v,l;return m.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return f=f||{},x={},L(f).to(x),x.headers={"Content-Length":p.size},x.subres={partNumber:h,uploadId:r},v=this._objectRequestParams("PUT",i,x),v.mime=x.mime,v.stream=p.stream,v.successStatuses=[200],s.next=11,m.default.awrap(this.request(v));case 11:if(l=s.sent,l.res.headers.etag){s.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 14:return p.stream=null,v.stream=null,s.abrupt("return",{name:i,etag:l.res.headers.etag,res:l.res});case 17:case"end":return s.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/keys"),L=_(T),S=I("babel-runtime/helpers/typeof"),g=_(S);function _(r){return r&&r.__esModule?r:{default:r}}var d=I("../utils/checkBucketName"),o=d.checkBucketName,i=N;i.copy=function(h,p,f,x){var v,l,n;return m.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return(typeof f=="undefined"?"undefined":(0,g.default)(f))==="object"&&(x=f),x=x||{},x.headers=x.headers||{},(0,L.default)(x.headers).forEach(function(w){x.headers["x-oss-copy-source-"+w.toLowerCase()]=x.headers[w]}),x.meta&&(x.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(x.meta,x.headers),p=this._getSourceName(p,f),x.versionId&&(p=p+"?versionId="+x.versionId),x.headers["x-oss-copy-source"]=p,v=this._objectRequestParams("PUT",h,x),v.xmlResponse=!0,v.successStatuses=[200,304],u.next=14,m.default.awrap(this.request(v));case 14:return l=u.sent,n=l.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),u.abrupt("return",{data:n,res:l.res});case 18:case"end":return u.stop()}},null,this)},i._getSourceName=function(h,p){return typeof p=="string"?h=this._objectName(h):h[0]!=="/"?p=this.options.bucket:(p=h.replace(/\/(.+?)(\/.*)/,"$1"),h=h.replace(/(\/.+?\/)(.*)/,"$2")),o(p),h=encodeURI(h),h="/"+p+"/"+h,h}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/assign"),L=S(T);function S(_){return _&&_.__esModule?_:{default:_}}var g=N;g.delete=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o.subres=(0,L.default)({},o.subres),o.versionId&&(o.subres.versionId=o.versionId),i=this._objectRequestParams("DELETE",d,o),i.successStatuses=[204],p.next=6,m.default.awrap(this.request(i));case 6:return r=p.sent,p.abrupt("return",{res:r.res});case 8:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/assign"),L=S(T);function S(i){return i&&i.__esModule?i:{default:i}}var g=I("utility"),_=I("../utils/obj2xml"),d=_.obj2xml,o=N;o.deleteMulti=function(r){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p,f,x,v,l,n,s,u,w,y,a,R;return m.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:if(p=[],!(!r||!r.length)){c.next=3;break}throw new Error("names is required");case 3:for(f=0;f<r.length;f++)x={},typeof r[f]=="string"?x.Key=g.escape(this._objectName(r[f])):(v=r[f],l=v.key,n=v.versionId,x.Key=g.escape(this._objectName(l)),x.VersionId=n),p.push(x);return s={Delete:{Quiet:!!h.quiet,Object:p}},u=d(s,{headers:!0}),h.subres=(0,L.default)({delete:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),w=this._objectRequestParams("POST","",h),w.mime="xml",w.content=u,w.xmlResponse=!0,w.successStatuses=[200],c.next=15,m.default.awrap(this.request(w));case 15:return y=c.sent,a=y.data,R=a&&a.Deleted||null,R&&(Array.isArray(R)||(R=[R])),c.abrupt("return",{res:y.res,deleted:R||[]});case 20:case"end":return c.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/assign"),L=S(T);function S(_){return _&&_.__esModule?_:{default:_}}var g=N;g.deleteObjectTagging=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o.subres=(0,L.default)({tagging:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),d=this._objectName(d),i=this._objectRequestParams("DELETE",d,o),i.successStatuses=[204],p.next=7,m.default.awrap(this.request(i));case 7:return r=p.sent,p.abrupt("return",{status:r.status,res:r.res});case 9:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/assign"),L=S(T);function S(o){return o&&o.__esModule?o:{default:o}}var g=I("fs"),_=I("is-type-of"),d=N;d.get=function(i,r){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,f,x,v;return m.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return p=null,f=!1,_.writableStream(r)?p=r:_.string(r)?(p=g.createWriteStream(r),f=!0):h=r,h=h||{},h.subres=(0,L.default)({},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.process&&(h.subres["x-oss-process"]=h.process),x=void 0,n.prev=8,v=this._objectRequestParams("GET",i,h),v.writeStream=p,v.successStatuses=[200,206,304],n.next=14,m.default.awrap(this.request(v));case 14:x=n.sent,f&&p.destroy(),n.next=25;break;case 18:if(n.prev=18,n.t0=n.catch(8),!f){n.next=24;break}return p.destroy(),n.next=24,m.default.awrap(this._deleteFileSafe(r));case 24:throw n.t0;case 25:return n.abrupt("return",{res:x.res,content:x.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(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/assign"),L=S(T);function S(_){return _&&_.__esModule?_:{default:_}}var g=N;g.getACL=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o.subres=(0,L.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),d=this._objectName(d),i=this._objectRequestParams("GET",d,o),i.successStatuses=[200],i.xmlResponse=!0,p.next=8,m.default.awrap(this.request(i));case 8:return r=p.sent,p.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 p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=_(P),T=I("babel-runtime/regenerator"),L=_(T),S=I("babel-runtime/core-js/object/assign"),g=_(S);function _(v){return v&&v.__esModule?v:{default:v}}var d=N,o=I("../utils/isObject"),i=o.isObject,r=I("../utils/isArray"),h=r.isArray;d.getBucketVersions=p,d.listObjectVersions=p;function p(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,s,u,w,y,a;return L.default.async(function(D){for(;;)switch(D.prev=D.next){case 0:if(!(v.versionIdMarker&&v.keyMarker===void 0)){D.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return l.subres=(0,g.default)({versions:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),n=this._objectRequestParams("GET","",l),n.xmlResponse=!0,n.successStatuses=[200],n.query=x(v),D.next=10,L.default.awrap(this.request(n));case 10:return s=D.sent,u=s.data.Version||[],w=s.data.DeleteMarker||[],y=this,u&&(Array.isArray(u)||(u=[u]),u=u.map(function(c){return{name:c.Key,url:y._objectUrl(c.Key),lastModified:c.LastModified,isLatest:c.IsLatest==="true",versionId:c.VersionId,etag:c.ETag,type:c.Type,size:Number(c.Size),storageClass:c.StorageClass,owner:{id:c.Owner.ID,displayName:c.Owner.DisplayName}}})),w&&(h(w)||(w=[w]),w=w.map(function(c){return{name:c.Key,lastModified:c.LastModified,versionId:c.VersionId,owner:{id:c.Owner.ID,displayName:c.Owner.DisplayName}}})),a=s.data.CommonPrefixes||null,a&&(h(a)||(a=[a]),a=a.map(function(c){return c.Prefix})),D.abrupt("return",{res:s.res,objects:u,deleteMarker:w,prefixes:a,nextMarker:s.data.NextMarker||null,NextVersionIdMarker:s.data.NextVersionIdMarker||null,isTruncated:s.data.IsTruncated==="true"});case 19:case"end":return D.stop()}},null,this)}function f(v){return v.replace(/([A-Z])/g,"-$1").toLowerCase()}function x(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l={};return i(v)&&(0,m.default)(v).forEach(function(n){l[f(n)]=v[n]}),l}},{"../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(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/assign"),L=S(T);function S(_){return _&&_.__esModule?_:{default:_}}var g=N;g.getObjectMeta=function(d,o){var i,r;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o=o||{},d=this._objectName(d),o.subres=(0,L.default)({objectMeta:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),i=this._objectRequestParams("HEAD",d,o),i.successStatuses=[200],p.next=8,m.default.awrap(this.request(i));case 8:return r=p.sent,p.abrupt("return",{status:r.status,res:r.res});case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/assign"),L=S(T);function S(o){return o&&o.__esModule?o:{default:o}}var g=N,_=I("../utils/isObject"),d=_.isObject;g.getObjectTagging=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,p,f,x,v;return m.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return r.subres=(0,L.default)({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),i=this._objectName(i),h=this._objectRequestParams("GET",i,r),h.successStatuses=[200],n.next=7,m.default.awrap(this.request(h));case 7:return p=n.sent,n.next=10,m.default.awrap(this.parseXML(p.data));case 10:return f=n.sent,x=f.TagSet.Tag,x=x&&d(x)?[x]:x||[],v={},x.forEach(function(s){v[s.Key]=s.Value}),n.abrupt("return",{status:p.status,res:p.res,tag:v});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(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/assign"),L=S(T);function S(_){return _&&_.__esModule?_:{default:_}}var g=N;g.getSymlink=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,h;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return o.subres=(0,L.default)({symlink:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),d=this._objectName(d),i=this._objectRequestParams("GET",d,o),i.successStatuses=[200],f.next=7,m.default.awrap(this.request(i));case 7:return r=f.sent,h=r.res.headers["x-oss-symlink-target"],f.abrupt("return",{targetName:decodeURIComponent(h),res:r.res});case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/keys"),L=_(T),S=I("babel-runtime/core-js/object/assign"),g=_(S);function _(o){return o&&o.__esModule?o:{default:o}}var d=N;d.head=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,p,f;return m.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return r.subres=(0,g.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),h=this._objectRequestParams("HEAD",i,r),h.successStatuses=[200,304],v.next=6,m.default.awrap(this.request(h));case 6:return p=v.sent,f={meta:null,res:p.res,status:p.status},p.status===200&&(0,L.default)(p.headers).forEach(function(l){l.indexOf("x-oss-meta-")===0&&(f.meta||(f.meta={}),f.meta[l.substring(11)]=p.headers[l])}),v.abrupt("return",f);case 10:case"end":return v.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/assign"),L=S(T);function S(_){return _&&_.__esModule?_:{default:_}}var g=N;g.putACL=function(d,o,i){var r,h;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return i=i||{},i.subres=(0,L.default)({acl:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.headers=i.headers||{},i.headers["x-oss-object-acl"]=o,d=this._objectName(d),r=this._objectRequestParams("PUT",d,i),r.successStatuses=[200],f.next=10,m.default.awrap(this.request(r));case 10:return h=f.sent,f.abrupt("return",{res:h.res});case 12:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/keys"),L=_(T),S=I("babel-runtime/core-js/object/assign"),g=_(S);function _(p){return p&&p.__esModule?p:{default:p}}var d=I("../utils/obj2xml"),o=d.obj2xml,i=I("../utils/checkObjectTag"),r=i.checkObjectTag,h=N;h.putObjectTagging=function(f,x){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l,n,s;return m.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return r(x),v.subres=(0,g.default)({tagging:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),f=this._objectName(f),l=this._objectRequestParams("PUT",f,v),l.successStatuses=[200],x=(0,L.default)(x).map(function(y){return{Key:y,Value:x[y]}}),n={Tagging:{TagSet:{Tag:x}}},l.mime="xml",l.content=o(n),w.next=12,m.default.awrap(this.request(l));case 12:return s=w.sent,w.abrupt("return",{res:s.res,status:s.status});case 14:case"end":return w.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(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/assign"),L=S(T);function S(_){return _&&_.__esModule?_:{default:_}}var g=N;g.putSymlink=function(d,o,i){var r,h;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return i=i||{},i.headers=i.headers||{},o=this._escape(this._objectName(o)),this._convertMetaToHeaders(i.meta,i.headers),i.headers["x-oss-symlink-target"]=o,i.subres=(0,L.default)({symlink:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.storageClass&&(i.headers["x-oss-storage-class"]=i.storageClass),d=this._objectName(d),r=this._objectRequestParams("PUT",d,i),r.successStatuses=[200],f.next=13,m.default.awrap(this.request(r));case 13:return h=f.sent,f.abrupt("return",{res:h.res});case 15:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/promise"),L=S(T);function S(_){return _&&_.__esModule?_:{default:_}}var g=N;g._parallelNode=function(d,o,i,r){var h,p,f,x,v,l,n,s;return m.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:h=this,p=[],f=[],x=d.length/o,v=d.length%o,l=v===0?x:(d.length-v)/o+1,n=1,s=0;case 8:if(!(s<d.length)){w.next=26;break}if(!h.isCancel()){w.next=11;break}return w.abrupt("break",26);case 11:if(r?f.push(i(h,d[s],r)):f.push(i(h,d[s])),!(f.length===o||n===l&&s===d.length-1)){w.next=23;break}return w.prev=13,n+=1,w.next=17,m.default.awrap(L.default.all(f));case 17:w.next=22;break;case 19:w.prev=19,w.t0=w.catch(13),p.push(w.t0);case 22:f=[];case 23:s++,w.next=8;break;case 26:return w.abrupt("return",p);case 27:case"end":return w.stop()}},null,this,[[13,19]])},g._parallel=function(d,o,i){var r=this;return new L.default(function(h){var p=[];if(o<=0||!d){h(p);return}function f(a){return function(){if(a===null)throw new Error("Callback was already called.");var R=a;a=null;for(var D=arguments.length,c=Array(D),b=0;b<D;b++)c[b]=arguments[b];R.apply(this,c)}}function x(a){var R=-1,D=a.length;return function(){return++R<D&&!r.isCancel()?{value:a[R],key:R}:null}}var v=x(d),l=!1,n=0,s=!1;function u(a,R){n-=1,a?(l=!0,p.push(a),h(p)):R==={}||l&&n<=0?(l=!0,h(p)):s||(r.isCancel()?h(p):y())}function w(a,R){i(a).then(function(D){R(null,D)}).catch(function(D){R(D)})}function y(){for(s=!0;n<o&&!l&&!r.isCancel();){var a=v();if(a===null||p.length>0){l=!0,n<=0&&h(p);return}n+=1,w(a.value,f(u))}s=!1}y()})},g.cancel=function(d){this.options.cancelFlag=!0,d&&this.abortMultipartUpload(d.name,d.uploadId,d.options)},g.isCancel=function(){return this.options.cancelFlag},g.resetCancelFlag=function(){this.options.cancelFlag=!1},g._stop=function(){this.options.cancelFlag=!0},g._makeCancelEvent=function(){var d={status:0,name:"cancel"};return d}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/core-js/json/stringify"),T=g(m),L=I("babel-runtime/core-js/object/keys"),S=g(L);function g(o){return o&&o.__esModule?o:{default:o}}var _=I("./../../shims/crypto/crypto.js"),d=I("is-type-of");N.buildCanonicalizedResource=function(i,r){var h=""+i,p="?";if(d.string(r)&&r.trim()!=="")h+=p+r;else if(d.array(r))r.sort(),h+=p+r.join("&");else if(r){var f=function(l,n){return l[0]>n[0]?1:l[0]<n[0]?-1:0},x=function(l){h+=p+l,r[l]&&(h+="="+r[l]),p="&"};(0,S.default)(r).sort(f).forEach(x)}return h},N.buildCanonicalString=function(i,r,h,p){h=h||{};var f=h.headers||{},x="x-oss-",v=[],l={},n=[i.toUpperCase(),f["Content-Md5"]||"",f["Content-Type"]||f["Content-Type".toLowerCase()],p||f["x-oss-date"]];return(0,S.default)(f).forEach(function(s){var u=s.toLowerCase();u.indexOf(x)===0&&(l[u]=String(f[s]).trim())}),(0,S.default)(l).sort().forEach(function(s){v.push(s+":"+l[s])}),n=n.concat(v),n.push(this.buildCanonicalizedResource(r,h.parameters)),n.join(`
`)},N.computeSignature=function(i,r){var h=_.createHmac("sha1",i);return h.update(P.from(r,"utf8")).digest("base64")},N.authorization=function(i,r,h){return"OSS "+i+":"+this.computeSignature(r,h)},N._signatureForURL=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=arguments[2],p=arguments[3],f={},x=r.subResource,v=x===void 0?{}:x;if(r.process){var l="x-oss-process";v[l]=r.process}if(r.trafficLimit){var n="x-oss-traffic-limit";v[n]=r.trafficLimit}if(r.response&&(0,S.default)(r.response).forEach(function(y){var a="response-"+y.toLowerCase();v[a]=r.response[y]}),(0,S.default)(r).forEach(function(y){var a=y.toLowerCase(),R=r[y];a.indexOf("x-oss-")===0?f[a]=R:(a.indexOf("content-md5")===0||a.indexOf("content-type")===0)&&(f[y]=R)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(v["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var s={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(s.callbackHost=r.callback.host),r.callback.contentType&&(s.callbackBodyType=r.callback.contentType),v.callback=P.from((0,T.default)(s)).toString("base64"),r.callback.customValue){var u={};(0,S.default)(r.callback.customValue).forEach(function(y){u["x:"+y]=r.callback.customValue[y]}),v["callback-var"]=P.from((0,T.default)(u)).toString("base64")}}var w=this.buildCanonicalString(r.method,h,{headers:f,parameters:v},p.toString());return{Signature:this.computeSignature(i,w),subResource:v}}}).call(this,I("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(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.checkBucketName=void 0,N.checkBucketName=function(P,m){var T=m?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!T.test(P))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/entries"),m=T(P);function T(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(N,"__esModule",{value:!0}),N.checkObjectTag=void 0;var L=I("./checkValid"),S=L.checkValid,g=I("./isObject"),_=g.isObject,d=[{validator:function(h){if(typeof h!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],o={key:[].concat(d,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(d,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function i(r){if(!_(r))throw new Error("tag must be Object");var h=(0,m.default)(r);if(h.length>10)throw new Error("maximum of 10 tags for a object");var p=["key","value"];h.forEach(function(f){f.forEach(function(x,v){S(x,o[p[v]])})})}N.checkObjectTag=i},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.checkValid=void 0;function P(m,T){T.forEach(function(L){if(L.validator)L.validator(m);else if(L.pattern&&!L.pattern.test(m))throw new Error(L.msg)})}N.checkValid=P},{}],38:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/core-js/object/assign"),T=L(m);function L(f){return f&&f.__esModule?f:{default:f}}Object.defineProperty(N,"__esModule",{value:!0}),N.createRequest=void 0;var S=I("./../../../shims/crypto/crypto.js"),g=I("debug")("ali-oss"),_=I("mime"),d=I("dateformat"),o=I("copy-to"),i=I("path");function r(f,x){return f[x]||f[x.toLowerCase()]}function h(f,x){delete f[x],delete f[x.toLowerCase()]}function p(f){var x=new Date;this.options.amendTimeSkewed&&(x=+new Date+this.options.amendTimeSkewed);var v={"x-oss-date":d(x,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(v["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,T.default)(v,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(v["x-oss-security-token"]=this.options.stsToken),o(f.headers).to(v),r(v,"Content-Type")||(f.mime&&f.mime.indexOf("/")>0?v["Content-Type"]=f.mime:v["Content-Type"]=_.getType(f.mime||i.extname(f.object||""))),r(v,"Content-Type")||h(v,"Content-Type"),f.content&&(v["Content-Md5"]=S.createHash("md5").update(P.from(f.content,"utf8")).digest("base64"),v["Content-Length"]||(v["Content-Length"]=f.content.length));var l=this._getResource(f);v.authorization=this.authorization(f.method,l,f.subres,v);var n=this._getReqUrl(f);g("request %s %s, with headers %j, !!stream: %s",f.method,n,v,!!f.stream);var s=f.timeout||this.options.timeout,u={method:f.method,content:f.content,stream:f.stream,headers:v,timeout:s,writeStream:f.writeStream,customResponse:f.customResponse,ctx:f.ctx||this.ctx};return this.agent&&(u.agent=this.agent),this.httpsAgent&&(u.httpsAgent=this.httpsAgent),{url:n,params:u}}N.createRequest=p}).call(this,I("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(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=S(P),T=I("babel-runtime/helpers/typeof"),L=S(T);function S(g){return g&&g.__esModule?g:{default:g}}Object.defineProperty(N,"__esModule",{value:!0}),N.deepCopy=void 0,N.deepCopy=function(g){if(g===null||(typeof g=="undefined"?"undefined":(0,L.default)(g))!=="object")return g;var _=Array.isArray(g)?[]:{};return(0,m.default)(g).forEach(function(d){_[d]=N.deepCopy(g[d])}),_}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=S(P),T=I("babel-runtime/helpers/typeof"),L=S(T);function S(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(N,"__esModule",{value:!0}),N.formatObjKey=void 0;function g(d,o){if(d===null||(typeof d=="undefined"?"undefined":(0,L.default)(d))!=="object")return d;var i=void 0;if(Array.isArray(d)){i=[];for(var r=0;r<d.length;r++)i.push(g(d[r],o))}else i={},(0,m.default)(d).forEach(function(h){i[_(h,o)]=g(d[h],o)});return i}N.formatObjKey=g;function _(d,o){return o==="firstUpperCase"?d=d.replace(/^./,function(i){return i.toUpperCase()}):o==="firstLowerCase"&&(d=d.replace(/^./,function(i){return i.toLowerCase()})),d}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.getStrBytesCount=void 0;function P(m){for(var T=0,L=0;L<m.length;L++){var S=m.charAt(L);/^[\u00-\uff]$/.test(S)?T+=1:T+=2}return T}N.getStrBytesCount=P},{}],42:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.isArray=void 0,N.isArray=function(P){return Object.prototype.toString.call(P)==="[object Array]"}},{}],43:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.isBlob=void 0;function P(m){return typeof Blob!="undefined"&&m instanceof Blob}N.isBlob=P},{}],44:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.isFile=void 0,N.isFile=function(P){return typeof File!="undefined"&&P instanceof File}},{}],45:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.isIP=void 0,N.isIP=function(P){var m=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,T=/^\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 m.test(P)||T.test(P)}},{}],46:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.isObject=void 0,N.isObject=function(P){return Object.prototype.toString.call(P)==="[object Object]"}},{}],47:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=T(P);function T(_){return _&&_.__esModule?_:{default:_}}Object.defineProperty(N,"__esModule",{value:!0}),N.obj2xml=void 0;var L=I("./formatObjKey");function S(_){return Object.prototype.toString.call(_).replace(/(.*? |])/g,"").toLowerCase()}function g(_,d){var o="";return d&&d.headers&&(o=`<?xml version="1.0" encoding="UTF-8"?>
`),d&&d.firstUpperCase&&(_=L.formatObjKey(_,"firstUpperCase")),S(_)==="object"?(0,m.default)(_).forEach(function(i){S(_[i])==="string"||S(_[i])==="number"?o+="<"+i+">"+_[i]+"</"+i+">":S(_[i])==="object"?o+="<"+i+">"+g(_[i])+"</"+i+">":S(_[i])==="array"?o+=_[i].map(function(r){return"<"+i+">"+g(r)+"</"+i+">"}).join(""):o+="<"+i+">"+_[i].toString()+"</"+i+">"}):o+=_.toString(),o}N.obj2xml=g},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(I,Z,N){Z.exports=P,Z.exports.HttpsAgent=P;function P(){}},{}],49:[function(I,Z,N){Z.exports=I("./register")().Promise},{"./register":51}],50:[function(I,Z,N){"use strict";var P="@@any-promise/REGISTRATION",m=null;Z.exports=function(T,L){return function(g,_){g=g||null,_=_||{};var d=_.global!==!1;if(m===null&&d&&(m=T[P]||null),m!==null&&g!==null&&m.implementation!==g)throw new Error('any-promise already defined as "'+m.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return m===null&&(g!==null&&typeof _.Promise!="undefined"?m={Promise:_.Promise,implementation:g}:m=L(g),d&&(T[P]=m)),m}}},{}],51:[function(I,Z,N){"use strict";Z.exports=I("./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(I,Z,N){Z.exports={default:I("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(I,Z,N){"use strict";N.__esModule=!0;var P=I("../core-js/symbol/iterator"),m=g(P),T=I("../core-js/symbol"),L=g(T),S=typeof L.default=="function"&&typeof m.default=="symbol"?function(_){return typeof _}:function(_){return _&&typeof L.default=="function"&&_.constructor===L.default&&_!==L.default.prototype?"symbol":typeof _};function g(_){return _&&_.__esModule?_:{default:_}}N.default=typeof L.default=="function"&&S(m.default)==="symbol"?function(_){return typeof _=="undefined"?"undefined":S(_)}:function(_){return _&&typeof L.default=="function"&&_.constructor===L.default&&_!==L.default.prototype?"symbol":typeof _=="undefined"?"undefined":S(_)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(I,Z,N){Z.exports=I("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(I,Z,N){"use strict";N.byteLength=d,N.toByteArray=i,N.fromByteArray=p;for(var P=[],m=[],T=typeof Uint8Array!="undefined"?Uint8Array:Array,L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=0,g=L.length;S<g;++S)P[S]=L[S],m[L.charCodeAt(S)]=S;m["-".charCodeAt(0)]=62,m["_".charCodeAt(0)]=63;function _(f){var x=f.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=f.indexOf("=");v===-1&&(v=x);var l=v===x?0:4-v%4;return[v,l]}function d(f){var x=_(f),v=x[0],l=x[1];return(v+l)*3/4-l}function o(f,x,v){return(x+v)*3/4-v}function i(f){var x,v=_(f),l=v[0],n=v[1],s=new T(o(f,l,n)),u=0,w=n>0?l-4:l,y;for(y=0;y<w;y+=4)x=m[f.charCodeAt(y)]<<18|m[f.charCodeAt(y+1)]<<12|m[f.charCodeAt(y+2)]<<6|m[f.charCodeAt(y+3)],s[u++]=x>>16&255,s[u++]=x>>8&255,s[u++]=x&255;return n===2&&(x=m[f.charCodeAt(y)]<<2|m[f.charCodeAt(y+1)]>>4,s[u++]=x&255),n===1&&(x=m[f.charCodeAt(y)]<<10|m[f.charCodeAt(y+1)]<<4|m[f.charCodeAt(y+2)]>>2,s[u++]=x>>8&255,s[u++]=x&255),s}function r(f){return P[f>>18&63]+P[f>>12&63]+P[f>>6&63]+P[f&63]}function h(f,x,v){for(var l,n=[],s=x;s<v;s+=3)l=(f[s]<<16&16711680)+(f[s+1]<<8&65280)+(f[s+2]&255),n.push(r(l));return n.join("")}function p(f){for(var x,v=f.length,l=v%3,n=[],s=16383,u=0,w=v-l;u<w;u+=s)n.push(h(f,u,u+s>w?w:u+s));return l===1?(x=f[v-1],n.push(P[x>>2]+P[x<<4&63]+"==")):l===2&&(x=(f[v-2]<<8)+f[v-1],n.push(P[x>>10]+P[x>>4&63]+P[x<<2&63]+"=")),n.join("")}},{}],70:[function(I,Z,N){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(P,m,T){typeof Z!="undefined"&&Z.exports?Z.exports=T():typeof define=="function"&&define.amd?define(m,T):P[m]=T()}(this,"bowser",function(){var P=!0;function m(o){function i(K){var B=o.match(K);return B&&B.length>1&&B[1]||""}function r(K){var B=o.match(K);return B&&B.length>1&&B[2]||""}var h=i(/(ipod|iphone|ipad)/i).toLowerCase(),p=/like android/i.test(o),f=!p&&/android/i.test(o),x=/nexus\s*[0-6]\s*/i.test(o),v=!x&&/nexus\s*[0-9]+/i.test(o),l=/CrOS/.test(o),n=/silk/i.test(o),s=/sailfish/i.test(o),u=/tizen/i.test(o),w=/(web|hpw)(o|0)s/i.test(o),y=/windows phone/i.test(o),a=/SamsungBrowser/i.test(o),R=!y&&/windows/i.test(o),D=!h&&!n&&/macintosh/i.test(o),c=!f&&!s&&!u&&!w&&/linux/i.test(o),b=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),E=i(/version\/(\d+(\.\d+)?)/i),C=/tablet/i.test(o)&&!/tablet pc/i.test(o),F=!C&&/[^-]mobi/i.test(o),j=/xbox/i.test(o),k;/opera/i.test(o)?k={name:"Opera",opera:P,version:E||i(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(o)?k={name:"Opera",opera:P,version:i(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||E}:/SamsungBrowser/i.test(o)?k={name:"Samsung Internet for Android",samsungBrowser:P,version:E||i(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(o)?k={name:"NAVER Whale browser",whale:P,version:i(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(o)?k={name:"MZ Browser",mzbrowser:P,version:i(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(o)?k={name:"Opera Coast",coast:P,version:E||i(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(o)?k={name:"Focus",focus:P,version:i(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(o)?k={name:"Yandex Browser",yandexbrowser:P,version:E||i(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(o)?k={name:"UC Browser",ucbrowser:P,version:i(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(o)?k={name:"Maxthon",maxthon:P,version:i(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(o)?k={name:"Epiphany",epiphany:P,version:i(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(o)?k={name:"Puffin",puffin:P,version:i(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(o)?k={name:"Sleipnir",sleipnir:P,version:i(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(o)?k={name:"K-Meleon",kMeleon:P,version:i(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:y?(k={name:"Windows Phone",osname:"Windows Phone",windowsphone:P},b?(k.msedge=P,k.version=b):(k.msie=P,k.version=i(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(o)?k={name:"Internet Explorer",msie:P,version:i(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:l?k={name:"Chrome",osname:"Chrome OS",chromeos:P,chromeBook:P,chrome:P,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(o)?k={name:"Microsoft Edge",msedge:P,version:b}:/vivaldi/i.test(o)?k={name:"Vivaldi",vivaldi:P,version:i(/vivaldi\/(\d+(\.\d+)?)/i)||E}:s?k={name:"Sailfish",osname:"Sailfish OS",sailfish:P,version:i(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(o)?k={name:"SeaMonkey",seamonkey:P,version:i(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(o)?(k={name:"Firefox",firefox:P,version:i(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(o)&&(k.firefoxos=P,k.osname="Firefox OS")):n?k={name:"Amazon Silk",silk:P,version:i(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(o)?k={name:"PhantomJS",phantom:P,version:i(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(o)?k={name:"SlimerJS",slimer:P,version:i(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(o)||/rim\stablet/i.test(o)?k={name:"BlackBerry",osname:"BlackBerry OS",blackberry:P,version:E||i(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:w?(k={name:"WebOS",osname:"WebOS",webos:P,version:E||i(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(o)&&(k.touchpad=P)):/bada/i.test(o)?k={name:"Bada",osname:"Bada",bada:P,version:i(/dolfin\/(\d+(\.\d+)?)/i)}:u?k={name:"Tizen",osname:"Tizen",tizen:P,version:i(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||E}:/qupzilla/i.test(o)?k={name:"QupZilla",qupzilla:P,version:i(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||E}:/chromium/i.test(o)?k={name:"Chromium",chromium:P,version:i(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||E}:/chrome|crios|crmo/i.test(o)?k={name:"Chrome",chrome:P,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:f?k={name:"Android",version:E}:/safari|applewebkit/i.test(o)?(k={name:"Safari",safari:P},E&&(k.version=E)):h?(k={name:h=="iphone"?"iPhone":h=="ipad"?"iPad":"iPod"},E&&(k.version=E)):/googlebot/i.test(o)?k={name:"Googlebot",googlebot:P,version:i(/googlebot\/(\d+(\.\d+))/i)||E}:k={name:i(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!k.msedge&&/(apple)?webkit/i.test(o)?(/(apple)?webkit\/537\.36/i.test(o)?(k.name=k.name||"Blink",k.blink=P):(k.name=k.name||"Webkit",k.webkit=P),!k.version&&E&&(k.version=E)):!k.opera&&/gecko\//i.test(o)&&(k.name=k.name||"Gecko",k.gecko=P,k.version=k.version||i(/gecko\/(\d+(\.\d+)?)/i)),!k.windowsphone&&(f||k.silk)?(k.android=P,k.osname="Android"):!k.windowsphone&&h?(k[h]=P,k.ios=P,k.osname="iOS"):D?(k.mac=P,k.osname="macOS"):j?(k.xbox=P,k.osname="Xbox"):R?(k.windows=P,k.osname="Windows"):c&&(k.linux=P,k.osname="Linux");function X(K){switch(K){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var G="";k.windows?G=X(i(/Windows ((NT|XP)( \d\d?.\d)?)/i)):k.windowsphone?G=i(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):k.mac?(G=i(/Mac OS X (\d+([_\.\s]\d+)*)/i),G=G.replace(/[_\s]/g,".")):h?(G=i(/os (\d+([_\s]\d+)*) like mac os x/i),G=G.replace(/[_\s]/g,".")):f?G=i(/android[ \/-](\d+(\.\d+)*)/i):k.webos?G=i(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):k.blackberry?G=i(/rim\stablet\sos\s(\d+(\.\d+)*)/i):k.bada?G=i(/bada\/(\d+(\.\d+)*)/i):k.tizen&&(G=i(/tizen[\/\s](\d+(\.\d+)*)/i)),G&&(k.osversion=G);var H=!k.windows&&G.split(".")[0];return C||v||h=="ipad"||f&&(H==3||H>=4&&!F)||k.silk?k.tablet=P:(F||h=="iphone"||h=="ipod"||f||x||k.blackberry||k.webos||k.bada)&&(k.mobile=P),k.msedge||k.msie&&k.version>=10||k.yandexbrowser&&k.version>=15||k.vivaldi&&k.version>=1||k.chrome&&k.version>=20||k.samsungBrowser&&k.version>=4||k.whale&&g([k.version,"1.0"])===1||k.mzbrowser&&g([k.version,"6.0"])===1||k.focus&&g([k.version,"1.0"])===1||k.firefox&&k.version>=20||k.safari&&k.version>=6||k.opera&&k.version>=10||k.ios&&k.osversion&&k.osversion.split(".")[0]>=6||k.blackberry&&k.version>=10.1||k.chromium&&k.version>=20?k.a=P:k.msie&&k.version<10||k.chrome&&k.version<20||k.firefox&&k.version<20||k.safari&&k.version<6||k.opera&&k.version<10||k.ios&&k.osversion&&k.osversion.split(".")[0]<6||k.chromium&&k.version<20?k.c=P:k.x=P,k}var T=m(typeof navigator!="undefined"&&navigator.userAgent||"");T.test=function(o){for(var i=0;i<o.length;++i){var r=o[i];if(typeof r=="string"&&r in T)return!0}return!1};function L(o){return o.split(".").length}function S(o,i){var r=[],h;if(Array.prototype.map)return Array.prototype.map.call(o,i);for(h=0;h<o.length;h++)r.push(i(o[h]));return r}function g(o){for(var i=Math.max(L(o[0]),L(o[1])),r=S(o,function(h){var p=i-L(h);return h=h+new Array(p+1).join(".0"),S(h.split("."),function(f){return new Array(20-f.length).join("0")+f}).reverse()});--i>=0;){if(r[0][i]>r[1][i])return 1;if(r[0][i]===r[1][i]){if(i===0)return 0}else return-1}}function _(o,i,r){var h=T;typeof i=="string"&&(r=i,i=void 0),i===void 0&&(i=!1),r&&(h=m(r));var p=""+h.version;for(var f in o)if(o.hasOwnProperty(f)&&h[f]){if(typeof o[f]!="string")throw new Error("Browser version in the minVersion map should be a string: "+f+": "+String(o));return g([p,o[f]])<0}return i}function d(o,i,r){return!_(o,i,r)}return T.isUnsupportedBrowser=_,T.compareVersions=g,T.check=d,T._detect=m,T.detect=m,T})},{}],71:[function(I,Z,N){},{}],72:[function(I,Z,N){var P=I("buffer").Buffer,m=P.isEncoding||function(d){switch(d&&d.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T(d){if(d&&!m(d))throw new Error("Unknown encoding: "+d)}var L=N.StringDecoder=function(d){this.encoding=(d||"utf8").toLowerCase().replace(/[-_]/,""),T(d);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=g;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=_;break;default:this.write=S;return}this.charBuffer=new P(6),this.charReceived=0,this.charLength=0};L.prototype.write=function(d){for(var o="";this.charLength;){var i=d.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:d.length;if(d.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";d=d.slice(i,d.length),o=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var h=o.charCodeAt(o.length-1);if(h>=55296&&h<=56319){this.charLength+=this.surrogateSize,o="";continue}if(this.charReceived=this.charLength=0,d.length===0)return o;break}this.detectIncompleteChar(d);var r=d.length;this.charLength&&(d.copy(this.charBuffer,0,d.length-this.charReceived,r),r-=this.charReceived),o+=d.toString(this.encoding,0,r);var r=o.length-1,h=o.charCodeAt(r);if(h>=55296&&h<=56319){var p=this.surrogateSize;return this.charLength+=p,this.charReceived+=p,this.charBuffer.copy(this.charBuffer,p,0,p),d.copy(this.charBuffer,0,0,p),o.substring(0,r)}return o},L.prototype.detectIncompleteChar=function(d){for(var o=d.length>=3?3:d.length;o>0;o--){var i=d[d.length-o];if(o==1&&i>>5==6){this.charLength=2;break}if(o<=2&&i>>4==14){this.charLength=3;break}if(o<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=o},L.prototype.end=function(d){var o="";if(d&&d.length&&(o=this.write(d)),this.charReceived){var i=this.charReceived,r=this.charBuffer,h=this.encoding;o+=r.slice(0,i).toString(h)}return o};function S(d){return d.toString(this.encoding)}function g(d){this.charReceived=d.length%2,this.charLength=this.charReceived?2:0}function _(d){this.charReceived=d.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(I,Z,N){(function(P,m){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var T=I("base64-js"),L=I("ieee754"),S=I("isarray");N.Buffer=m,N.SlowBuffer=n,N.INSPECT_MAX_BYTES=50,m.TYPED_ARRAY_SUPPORT=P.TYPED_ARRAY_SUPPORT!==void 0?P.TYPED_ARRAY_SUPPORT:g(),N.kMaxLength=_();function g(){try{var te=new Uint8Array(1);return te.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},te.foo()===42&&typeof te.subarray=="function"&&te.subarray(1,1).byteLength===0}catch(Y){return!1}}function _(){return m.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(te,Y){if(_()<Y)throw new RangeError("Invalid typed array length");return m.TYPED_ARRAY_SUPPORT?(te=new Uint8Array(Y),te.__proto__=m.prototype):(te===null&&(te=new m(Y)),te.length=Y),te}function m(te,Y,z){if(!m.TYPED_ARRAY_SUPPORT&&!(this instanceof m))return new m(te,Y,z);if(typeof te=="number"){if(typeof Y=="string")throw new Error("If encoding is specified then the first argument must be a string");return h(this,te)}return o(this,te,Y,z)}m.poolSize=8192,m._augment=function(te){return te.__proto__=m.prototype,te};function o(te,Y,z,$){if(typeof Y=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Y instanceof ArrayBuffer?x(te,Y,z,$):typeof Y=="string"?p(te,Y,z):v(te,Y)}m.from=function(te,Y,z){return o(null,te,Y,z)},m.TYPED_ARRAY_SUPPORT&&(m.prototype.__proto__=Uint8Array.prototype,m.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&m[Symbol.species]===m&&Object.defineProperty(m,Symbol.species,{value:null,configurable:!0}));function i(te){if(typeof te!="number")throw new TypeError('"size" argument must be a number');if(te<0)throw new RangeError('"size" argument must not be negative')}function r(te,Y,z,$){return i(Y),Y<=0?d(te,Y):z!==void 0?typeof $=="string"?d(te,Y).fill(z,$):d(te,Y).fill(z):d(te,Y)}m.alloc=function(te,Y,z){return r(null,te,Y,z)};function h(te,Y){if(i(Y),te=d(te,Y<0?0:l(Y)|0),!m.TYPED_ARRAY_SUPPORT)for(var z=0;z<Y;++z)te[z]=0;return te}m.allocUnsafe=function(te){return h(null,te)},m.allocUnsafeSlow=function(te){return h(null,te)};function p(te,Y,z){if((typeof z!="string"||z==="")&&(z="utf8"),!m.isEncoding(z))throw new TypeError('"encoding" must be a valid string encoding');var $=s(Y,z)|0;te=d(te,$);var me=te.write(Y,z);return me!==$&&(te=te.slice(0,me)),te}function f(te,Y){var z=Y.length<0?0:l(Y.length)|0;te=d(te,z);for(var $=0;$<z;$+=1)te[$]=Y[$]&255;return te}function x(te,Y,z,$){if(Y.byteLength,z<0||Y.byteLength<z)throw new RangeError("'offset' is out of bounds");if(Y.byteLength<z+($||0))throw new RangeError("'length' is out of bounds");return z===void 0&&$===void 0?Y=new Uint8Array(Y):$===void 0?Y=new Uint8Array(Y,z):Y=new Uint8Array(Y,z,$),m.TYPED_ARRAY_SUPPORT?(te=Y,te.__proto__=m.prototype):te=f(te,Y),te}function v(te,Y){if(m.isBuffer(Y)){var z=l(Y.length)|0;return te=d(te,z),te.length===0||Y.copy(te,0,0,z),te}if(Y){if(typeof ArrayBuffer!="undefined"&&Y.buffer instanceof ArrayBuffer||"length"in Y)return typeof Y.length!="number"||ge(Y.length)?d(te,0):f(te,Y);if(Y.type==="Buffer"&&S(Y.data))return f(te,Y.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function l(te){if(te>=_())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_().toString(16)+" bytes");return te|0}function n(te){return+te!=te&&(te=0),m.alloc(+te)}m.isBuffer=function(Y){return!!(Y!=null&&Y._isBuffer)},m.compare=function(Y,z){if(!m.isBuffer(Y)||!m.isBuffer(z))throw new TypeError("Arguments must be Buffers");if(Y===z)return 0;for(var $=Y.length,me=z.length,pe=0,xe=Math.min($,me);pe<xe;++pe)if(Y[pe]!==z[pe]){$=Y[pe],me=z[pe];break}return $<me?-1:me<$?1:0},m.isEncoding=function(Y){switch(String(Y).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}},m.concat=function(Y,z){if(!S(Y))throw new TypeError('"list" argument must be an Array of Buffers');if(Y.length===0)return m.alloc(0);var $;if(z===void 0)for(z=0,$=0;$<Y.length;++$)z+=Y[$].length;var me=m.allocUnsafe(z),pe=0;for($=0;$<Y.length;++$){var xe=Y[$];if(!m.isBuffer(xe))throw new TypeError('"list" argument must be an Array of Buffers');xe.copy(me,pe),pe+=xe.length}return me};function s(te,Y){if(m.isBuffer(te))return te.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(te)||te instanceof ArrayBuffer))return te.byteLength;typeof te!="string"&&(te=""+te);var z=te.length;if(z===0)return 0;for(var $=!1;;)switch(Y){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":case void 0:return oe(te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z*2;case"hex":return z>>>1;case"base64":return J(te).length;default:if($)return oe(te).length;Y=(""+Y).toLowerCase(),$=!0}}m.byteLength=s;function u(te,Y,z){var $=!1;if((Y===void 0||Y<0)&&(Y=0),Y>this.length)return"";if((z===void 0||z>this.length)&&(z=this.length),z<=0)return"";if(z>>>=0,Y>>>=0,z<=Y)return"";for(te||(te="utf8");;)switch(te){case"hex":return K(this,Y,z);case"utf8":case"utf-8":return j(this,Y,z);case"ascii":return G(this,Y,z);case"latin1":case"binary":return H(this,Y,z);case"base64":return F(this,Y,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,Y,z);default:if($)throw new TypeError("Unknown encoding: "+te);te=(te+"").toLowerCase(),$=!0}}m.prototype._isBuffer=!0;function w(te,Y,z){var $=te[Y];te[Y]=te[z],te[z]=$}m.prototype.swap16=function(){var Y=this.length;if(Y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var z=0;z<Y;z+=2)w(this,z,z+1);return this},m.prototype.swap32=function(){var Y=this.length;if(Y%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var z=0;z<Y;z+=4)w(this,z,z+3),w(this,z+1,z+2);return this},m.prototype.swap64=function(){var Y=this.length;if(Y%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var z=0;z<Y;z+=8)w(this,z,z+7),w(this,z+1,z+6),w(this,z+2,z+5),w(this,z+3,z+4);return this},m.prototype.toString=function(){var Y=this.length|0;return Y===0?"":arguments.length===0?j(this,0,Y):u.apply(this,arguments)},m.prototype.equals=function(Y){if(!m.isBuffer(Y))throw new TypeError("Argument must be a Buffer");return this===Y?!0:m.compare(this,Y)===0},m.prototype.inspect=function(){var Y="",z=N.INSPECT_MAX_BYTES;return this.length>0&&(Y=this.toString("hex",0,z).match(/.{2}/g).join(" "),this.length>z&&(Y+=" ... ")),"<Buffer "+Y+">"},m.prototype.compare=function(Y,z,$,me,pe){if(!m.isBuffer(Y))throw new TypeError("Argument must be a Buffer");if(z===void 0&&(z=0),$===void 0&&($=Y?Y.length:0),me===void 0&&(me=0),pe===void 0&&(pe=this.length),z<0||$>Y.length||me<0||pe>this.length)throw new RangeError("out of range index");if(me>=pe&&z>=$)return 0;if(me>=pe)return-1;if(z>=$)return 1;if(z>>>=0,$>>>=0,me>>>=0,pe>>>=0,this===Y)return 0;for(var xe=pe-me,Re=$-z,ke=Math.min(xe,Re),Me=this.slice(me,pe),Pe=Y.slice(z,$),je=0;je<ke;++je)if(Me[je]!==Pe[je]){xe=Me[je],Re=Pe[je];break}return xe<Re?-1:Re<xe?1:0};function y(te,Y,z,$,me){if(te.length===0)return-1;if(typeof z=="string"?($=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),z=+z,isNaN(z)&&(z=me?0:te.length-1),z<0&&(z=te.length+z),z>=te.length){if(me)return-1;z=te.length-1}else if(z<0)if(me)z=0;else return-1;if(typeof Y=="string"&&(Y=m.from(Y,$)),m.isBuffer(Y))return Y.length===0?-1:a(te,Y,z,$,me);if(typeof Y=="number")return Y=Y&255,m.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call(te,Y,z):Uint8Array.prototype.lastIndexOf.call(te,Y,z):a(te,[Y],z,$,me);throw new TypeError("val must be string, number or Buffer")}function a(te,Y,z,$,me){var pe=1,xe=te.length,Re=Y.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(te.length<2||Y.length<2)return-1;pe=2,xe/=2,Re/=2,z/=2}function ke(We,Se){return pe===1?We[Se]:We.readUInt16BE(Se*pe)}var Me;if(me){var Pe=-1;for(Me=z;Me<xe;Me++)if(ke(te,Me)===ke(Y,Pe===-1?0:Me-Pe)){if(Pe===-1&&(Pe=Me),Me-Pe+1===Re)return Pe*pe}else Pe!==-1&&(Me-=Me-Pe),Pe=-1}else for(z+Re>xe&&(z=xe-Re),Me=z;Me>=0;Me--){for(var je=!0,Fe=0;Fe<Re;Fe++)if(ke(te,Me+Fe)!==ke(Y,Fe)){je=!1;break}if(je)return Me}return-1}m.prototype.includes=function(Y,z,$){return this.indexOf(Y,z,$)!==-1},m.prototype.indexOf=function(Y,z,$){return y(this,Y,z,$,!0)},m.prototype.lastIndexOf=function(Y,z,$){return y(this,Y,z,$,!1)};function R(te,Y,z,$){z=Number(z)||0;var me=te.length-z;$?($=Number($),$>me&&($=me)):$=me;var pe=Y.length;if(pe%2!==0)throw new TypeError("Invalid hex string");$>pe/2&&($=pe/2);for(var xe=0;xe<$;++xe){var Re=parseInt(Y.substr(xe*2,2),16);if(isNaN(Re))return xe;te[z+xe]=Re}return xe}function D(te,Y,z,$){return ee(oe(Y,te.length-z),te,z,$)}function c(te,Y,z,$){return ee(q(Y),te,z,$)}function b(te,Y,z,$){return c(te,Y,z,$)}function E(te,Y,z,$){return ee(J(Y),te,z,$)}function C(te,Y,z,$){return ee(se(Y,te.length-z),te,z,$)}m.prototype.write=function(Y,z,$,me){if(z===void 0)me="utf8",$=this.length,z=0;else if($===void 0&&typeof z=="string")me=z,$=this.length,z=0;else if(isFinite(z))z=z|0,isFinite($)?($=$|0,me===void 0&&(me="utf8")):(me=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-z;if(($===void 0||$>pe)&&($=pe),Y.length>0&&($<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");me||(me="utf8");for(var xe=!1;;)switch(me){case"hex":return R(this,Y,z,$);case"utf8":case"utf-8":return D(this,Y,z,$);case"ascii":return c(this,Y,z,$);case"latin1":case"binary":return b(this,Y,z,$);case"base64":return E(this,Y,z,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,Y,z,$);default:if(xe)throw new TypeError("Unknown encoding: "+me);me=(""+me).toLowerCase(),xe=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(te,Y,z){return Y===0&&z===te.length?T.fromByteArray(te):T.fromByteArray(te.slice(Y,z))}function j(te,Y,z){z=Math.min(te.length,z);for(var $=[],me=Y;me<z;){var pe=te[me],xe=null,Re=pe>239?4:pe>223?3:pe>191?2:1;if(me+Re<=z){var ke,Me,Pe,je;switch(Re){case 1:pe<128&&(xe=pe);break;case 2:ke=te[me+1],(ke&192)===128&&(je=(pe&31)<<6|ke&63,je>127&&(xe=je));break;case 3:ke=te[me+1],Me=te[me+2],(ke&192)===128&&(Me&192)===128&&(je=(pe&15)<<12|(ke&63)<<6|Me&63,je>2047&&(je<55296||je>57343)&&(xe=je));break;case 4:ke=te[me+1],Me=te[me+2],Pe=te[me+3],(ke&192)===128&&(Me&192)===128&&(Pe&192)===128&&(je=(pe&15)<<18|(ke&63)<<12|(Me&63)<<6|Pe&63,je>65535&&je<1114112&&(xe=je))}}xe===null?(xe=65533,Re=1):xe>65535&&(xe-=65536,$.push(xe>>>10&1023|55296),xe=56320|xe&1023),$.push(xe),me+=Re}return X($)}var k=4096;function X(te){var Y=te.length;if(Y<=k)return String.fromCharCode.apply(String,te);for(var z="",$=0;$<Y;)z+=String.fromCharCode.apply(String,te.slice($,$+=k));return z}function G(te,Y,z){var $="";z=Math.min(te.length,z);for(var me=Y;me<z;++me)$+=String.fromCharCode(te[me]&127);return $}function H(te,Y,z){var $="";z=Math.min(te.length,z);for(var me=Y;me<z;++me)$+=String.fromCharCode(te[me]);return $}function K(te,Y,z){var $=te.length;(!Y||Y<0)&&(Y=0),(!z||z<0||z>$)&&(z=$);for(var me="",pe=Y;pe<z;++pe)me+=re(te[pe]);return me}function B(te,Y,z){for(var $=te.slice(Y,z),me="",pe=0;pe<$.length;pe+=2)me+=String.fromCharCode($[pe]+$[pe+1]*256);return me}m.prototype.slice=function(Y,z){var $=this.length;Y=~~Y,z=z===void 0?$:~~z,Y<0?(Y+=$,Y<0&&(Y=0)):Y>$&&(Y=$),z<0?(z+=$,z<0&&(z=0)):z>$&&(z=$),z<Y&&(z=Y);var me;if(m.TYPED_ARRAY_SUPPORT)me=this.subarray(Y,z),me.__proto__=m.prototype;else{var pe=z-Y;me=new m(pe,void 0);for(var xe=0;xe<pe;++xe)me[xe]=this[xe+Y]}return me};function U(te,Y,z){if(te%1!==0||te<0)throw new RangeError("offset is not uint");if(te+Y>z)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUIntLE=function(Y,z,$){Y=Y|0,z=z|0,$||U(Y,z,this.length);for(var me=this[Y],pe=1,xe=0;++xe<z&&(pe*=256);)me+=this[Y+xe]*pe;return me},m.prototype.readUIntBE=function(Y,z,$){Y=Y|0,z=z|0,$||U(Y,z,this.length);for(var me=this[Y+--z],pe=1;z>0&&(pe*=256);)me+=this[Y+--z]*pe;return me},m.prototype.readUInt8=function(Y,z){return z||U(Y,1,this.length),this[Y]},m.prototype.readUInt16LE=function(Y,z){return z||U(Y,2,this.length),this[Y]|this[Y+1]<<8},m.prototype.readUInt16BE=function(Y,z){return z||U(Y,2,this.length),this[Y]<<8|this[Y+1]},m.prototype.readUInt32LE=function(Y,z){return z||U(Y,4,this.length),(this[Y]|this[Y+1]<<8|this[Y+2]<<16)+this[Y+3]*16777216},m.prototype.readUInt32BE=function(Y,z){return z||U(Y,4,this.length),this[Y]*16777216+(this[Y+1]<<16|this[Y+2]<<8|this[Y+3])},m.prototype.readIntLE=function(Y,z,$){Y=Y|0,z=z|0,$||U(Y,z,this.length);for(var me=this[Y],pe=1,xe=0;++xe<z&&(pe*=256);)me+=this[Y+xe]*pe;return pe*=128,me>=pe&&(me-=Math.pow(2,8*z)),me},m.prototype.readIntBE=function(Y,z,$){Y=Y|0,z=z|0,$||U(Y,z,this.length);for(var me=z,pe=1,xe=this[Y+--me];me>0&&(pe*=256);)xe+=this[Y+--me]*pe;return pe*=128,xe>=pe&&(xe-=Math.pow(2,8*z)),xe},m.prototype.readInt8=function(Y,z){return z||U(Y,1,this.length),this[Y]&128?(255-this[Y]+1)*-1:this[Y]},m.prototype.readInt16LE=function(Y,z){z||U(Y,2,this.length);var $=this[Y]|this[Y+1]<<8;return $&32768?$|4294901760:$},m.prototype.readInt16BE=function(Y,z){z||U(Y,2,this.length);var $=this[Y+1]|this[Y]<<8;return $&32768?$|4294901760:$},m.prototype.readInt32LE=function(Y,z){return z||U(Y,4,this.length),this[Y]|this[Y+1]<<8|this[Y+2]<<16|this[Y+3]<<24},m.prototype.readInt32BE=function(Y,z){return z||U(Y,4,this.length),this[Y]<<24|this[Y+1]<<16|this[Y+2]<<8|this[Y+3]},m.prototype.readFloatLE=function(Y,z){return z||U(Y,4,this.length),L.read(this,Y,!0,23,4)},m.prototype.readFloatBE=function(Y,z){return z||U(Y,4,this.length),L.read(this,Y,!1,23,4)},m.prototype.readDoubleLE=function(Y,z){return z||U(Y,8,this.length),L.read(this,Y,!0,52,8)},m.prototype.readDoubleBE=function(Y,z){return z||U(Y,8,this.length),L.read(this,Y,!1,52,8)};function W(te,Y,z,$,me,pe){if(!m.isBuffer(te))throw new TypeError('"buffer" argument must be a Buffer instance');if(Y>me||Y<pe)throw new RangeError('"value" argument is out of bounds');if(z+$>te.length)throw new RangeError("Index out of range")}m.prototype.writeUIntLE=function(Y,z,$,me){if(Y=+Y,z=z|0,$=$|0,!me){var pe=Math.pow(2,8*$)-1;W(this,Y,z,$,pe,0)}var xe=1,Re=0;for(this[z]=Y&255;++Re<$&&(xe*=256);)this[z+Re]=Y/xe&255;return z+$},m.prototype.writeUIntBE=function(Y,z,$,me){if(Y=+Y,z=z|0,$=$|0,!me){var pe=Math.pow(2,8*$)-1;W(this,Y,z,$,pe,0)}var xe=$-1,Re=1;for(this[z+xe]=Y&255;--xe>=0&&(Re*=256);)this[z+xe]=Y/Re&255;return z+$},m.prototype.writeUInt8=function(Y,z,$){return Y=+Y,z=z|0,$||W(this,Y,z,1,255,0),m.TYPED_ARRAY_SUPPORT||(Y=Math.floor(Y)),this[z]=Y&255,z+1};function Q(te,Y,z,$){Y<0&&(Y=65535+Y+1);for(var me=0,pe=Math.min(te.length-z,2);me<pe;++me)te[z+me]=(Y&255<<8*($?me:1-me))>>>($?me:1-me)*8}m.prototype.writeUInt16LE=function(Y,z,$){return Y=+Y,z=z|0,$||W(this,Y,z,2,65535,0),m.TYPED_ARRAY_SUPPORT?(this[z]=Y&255,this[z+1]=Y>>>8):Q(this,Y,z,!0),z+2},m.prototype.writeUInt16BE=function(Y,z,$){return Y=+Y,z=z|0,$||W(this,Y,z,2,65535,0),m.TYPED_ARRAY_SUPPORT?(this[z]=Y>>>8,this[z+1]=Y&255):Q(this,Y,z,!1),z+2};function ie(te,Y,z,$){Y<0&&(Y=4294967295+Y+1);for(var me=0,pe=Math.min(te.length-z,4);me<pe;++me)te[z+me]=Y>>>($?me:3-me)*8&255}m.prototype.writeUInt32LE=function(Y,z,$){return Y=+Y,z=z|0,$||W(this,Y,z,4,4294967295,0),m.TYPED_ARRAY_SUPPORT?(this[z+3]=Y>>>24,this[z+2]=Y>>>16,this[z+1]=Y>>>8,this[z]=Y&255):ie(this,Y,z,!0),z+4},m.prototype.writeUInt32BE=function(Y,z,$){return Y=+Y,z=z|0,$||W(this,Y,z,4,4294967295,0),m.TYPED_ARRAY_SUPPORT?(this[z]=Y>>>24,this[z+1]=Y>>>16,this[z+2]=Y>>>8,this[z+3]=Y&255):ie(this,Y,z,!1),z+4},m.prototype.writeIntLE=function(Y,z,$,me){if(Y=+Y,z=z|0,!me){var pe=Math.pow(2,8*$-1);W(this,Y,z,$,pe-1,-pe)}var xe=0,Re=1,ke=0;for(this[z]=Y&255;++xe<$&&(Re*=256);)Y<0&&ke===0&&this[z+xe-1]!==0&&(ke=1),this[z+xe]=(Y/Re>>0)-ke&255;return z+$},m.prototype.writeIntBE=function(Y,z,$,me){if(Y=+Y,z=z|0,!me){var pe=Math.pow(2,8*$-1);W(this,Y,z,$,pe-1,-pe)}var xe=$-1,Re=1,ke=0;for(this[z+xe]=Y&255;--xe>=0&&(Re*=256);)Y<0&&ke===0&&this[z+xe+1]!==0&&(ke=1),this[z+xe]=(Y/Re>>0)-ke&255;return z+$},m.prototype.writeInt8=function(Y,z,$){return Y=+Y,z=z|0,$||W(this,Y,z,1,127,-128),m.TYPED_ARRAY_SUPPORT||(Y=Math.floor(Y)),Y<0&&(Y=255+Y+1),this[z]=Y&255,z+1},m.prototype.writeInt16LE=function(Y,z,$){return Y=+Y,z=z|0,$||W(this,Y,z,2,32767,-32768),m.TYPED_ARRAY_SUPPORT?(this[z]=Y&255,this[z+1]=Y>>>8):Q(this,Y,z,!0),z+2},m.prototype.writeInt16BE=function(Y,z,$){return Y=+Y,z=z|0,$||W(this,Y,z,2,32767,-32768),m.TYPED_ARRAY_SUPPORT?(this[z]=Y>>>8,this[z+1]=Y&255):Q(this,Y,z,!1),z+2},m.prototype.writeInt32LE=function(Y,z,$){return Y=+Y,z=z|0,$||W(this,Y,z,4,2147483647,-2147483648),m.TYPED_ARRAY_SUPPORT?(this[z]=Y&255,this[z+1]=Y>>>8,this[z+2]=Y>>>16,this[z+3]=Y>>>24):ie(this,Y,z,!0),z+4},m.prototype.writeInt32BE=function(Y,z,$){return Y=+Y,z=z|0,$||W(this,Y,z,4,2147483647,-2147483648),Y<0&&(Y=4294967295+Y+1),m.TYPED_ARRAY_SUPPORT?(this[z]=Y>>>24,this[z+1]=Y>>>16,this[z+2]=Y>>>8,this[z+3]=Y&255):ie(this,Y,z,!1),z+4};function ce(te,Y,z,$,me,pe){if(z+$>te.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function he(te,Y,z,$,me){return me||ce(te,Y,z,4,34028234663852886e22,-34028234663852886e22),L.write(te,Y,z,$,23,4),z+4}m.prototype.writeFloatLE=function(Y,z,$){return he(this,Y,z,!0,$)},m.prototype.writeFloatBE=function(Y,z,$){return he(this,Y,z,!1,$)};function be(te,Y,z,$,me){return me||ce(te,Y,z,8,17976931348623157e292,-17976931348623157e292),L.write(te,Y,z,$,52,8),z+8}m.prototype.writeDoubleLE=function(Y,z,$){return be(this,Y,z,!0,$)},m.prototype.writeDoubleBE=function(Y,z,$){return be(this,Y,z,!1,$)},m.prototype.copy=function(Y,z,$,me){if($||($=0),!me&&me!==0&&(me=this.length),z>=Y.length&&(z=Y.length),z||(z=0),me>0&&me<$&&(me=$),me===$)return 0;if(Y.length===0||this.length===0)return 0;if(z<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(me<0)throw new RangeError("sourceEnd out of bounds");me>this.length&&(me=this.length),Y.length-z<me-$&&(me=Y.length-z+$);var pe=me-$,xe;if(this===Y&&$<z&&z<me)for(xe=pe-1;xe>=0;--xe)Y[xe+z]=this[xe+$];else if(pe<1e3||!m.TYPED_ARRAY_SUPPORT)for(xe=0;xe<pe;++xe)Y[xe+z]=this[xe+$];else Uint8Array.prototype.set.call(Y,this.subarray($,$+pe),z);return pe},m.prototype.fill=function(Y,z,$,me){if(typeof Y=="string"){if(typeof z=="string"?(me=z,z=0,$=this.length):typeof $=="string"&&(me=$,$=this.length),Y.length===1){var pe=Y.charCodeAt(0);pe<256&&(Y=pe)}if(me!==void 0&&typeof me!="string")throw new TypeError("encoding must be a string");if(typeof me=="string"&&!m.isEncoding(me))throw new TypeError("Unknown encoding: "+me)}else typeof Y=="number"&&(Y=Y&255);if(z<0||this.length<z||this.length<$)throw new RangeError("Out of range index");if($<=z)return this;z=z>>>0,$=$===void 0?this.length:$>>>0,Y||(Y=0);var xe;if(typeof Y=="number")for(xe=z;xe<$;++xe)this[xe]=Y;else{var Re=m.isBuffer(Y)?Y:oe(new m(Y,me).toString()),ke=Re.length;for(xe=0;xe<$-z;++xe)this[xe+z]=Re[xe%ke]}return this};var ne=/[^+\/0-9A-Za-z-_]/g;function le(te){if(te=ue(te).replace(ne,""),te.length<2)return"";for(;te.length%4!==0;)te=te+"=";return te}function ue(te){return te.trim?te.trim():te.replace(/^\s+|\s+$/g,"")}function re(te){return te<16?"0"+te.toString(16):te.toString(16)}function oe(te,Y){Y=Y||Infinity;for(var z,$=te.length,me=null,pe=[],xe=0;xe<$;++xe){if(z=te.charCodeAt(xe),z>55295&&z<57344){if(!me){if(z>56319){(Y-=3)>-1&&pe.push(239,191,189);continue}else if(xe+1===$){(Y-=3)>-1&&pe.push(239,191,189);continue}me=z;continue}if(z<56320){(Y-=3)>-1&&pe.push(239,191,189),me=z;continue}z=(me-55296<<10|z-56320)+65536}else me&&((Y-=3)>-1&&pe.push(239,191,189));if(me=null,z<128){if((Y-=1)<0)break;pe.push(z)}else if(z<2048){if((Y-=2)<0)break;pe.push(z>>6|192,z&63|128)}else if(z<65536){if((Y-=3)<0)break;pe.push(z>>12|224,z>>6&63|128,z&63|128)}else if(z<1114112){if((Y-=4)<0)break;pe.push(z>>18|240,z>>12&63|128,z>>6&63|128,z&63|128)}else throw new Error("Invalid code point")}return pe}function q(te){for(var Y=[],z=0;z<te.length;++z)Y.push(te.charCodeAt(z)&255);return Y}function se(te,Y){for(var z,$,me,pe=[],xe=0;xe<te.length&&!((Y-=2)<0);++xe)z=te.charCodeAt(xe),$=z>>8,me=z%256,pe.push(me),pe.push($);return pe}function J(te){return T.toByteArray(le(te))}function ee(te,Y,z,$){for(var me=0;me<$&&!(me+z>=Y.length||me>=te.length);++me)Y[me+z]=te[me];return me}function ge(te){return te!==te}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},I("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(I,Z,N){Z.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(I,Z,N){Z.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(I,Z,N){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var P=Array.prototype.slice;Z.exports=m;function m(L,S){if(!(this instanceof m))return new m(L,S);this.src=L,this._withAccess=S}m.prototype.withAccess=function(L){return this._withAccess=L!==!1,this},m.prototype.pick=function(L){return Array.isArray(L)||(L=P.call(arguments)),L.length&&(this.keys=L),this},m.prototype.to=function(L){if(L=L||{},!this.src)return L;var S=this.keys||Object.keys(this.src);if(!this._withAccess){for(var g=0;g<S.length;g++){if(_=S[g],L[_]!==void 0)continue;L[_]=this.src[_]}return L}for(var g=0;g<S.length;g++){var _=S[g];if(!T(L,_))continue;var d=this.src.__lookupGetter__(_),o=this.src.__lookupSetter__(_);d&&L.__defineGetter__(_,d),o&&L.__defineSetter__(_,o),!d&&!o&&(L[_]=this.src[_])}return L},m.prototype.toCover=function(L){for(var S=this.keys||Object.keys(this.src),g=0;g<S.length;g++){var _=S[g];delete L[_];var d=this.src.__lookupGetter__(_),o=this.src.__lookupSetter__(_);d&&L.__defineGetter__(_,d),o&&L.__defineSetter__(_,o),!d&&!o&&(L[_]=this.src[_])}},m.prototype.override=m.prototype.toCover,m.prototype.and=function(L){var S={};return this.to(S),this.src=L,this.to(S),this.src=S,this};function T(L,S){return L[S]===void 0&&L.__lookupGetter__(S)===void 0&&L.__lookupSetter__(S)===void 0}},{}],77:[function(I,Z,N){I("../../modules/es6.string.iterator"),I("../../modules/es6.array.from"),Z.exports=I("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(I,Z,N){var P=I("../../modules/_core"),m=P.JSON||(P.JSON={stringify:JSON.stringify});Z.exports=function(L){return m.stringify.apply(m,arguments)}},{"../../modules/_core":99}],79:[function(I,Z,N){I("../../modules/es6.object.assign"),Z.exports=I("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(I,Z,N){I("../../modules/es6.object.create");var P=I("../../modules/_core").Object;Z.exports=function(T,L){return P.create(T,L)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(I,Z,N){I("../../modules/es6.object.define-property");var P=I("../../modules/_core").Object;Z.exports=function(T,L,S){return P.defineProperty(T,L,S)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(I,Z,N){I("../../modules/es7.object.entries"),Z.exports=I("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(I,Z,N){I("../../modules/es6.object.get-own-property-names");var P=I("../../modules/_core").Object;Z.exports=function(T){return P.getOwnPropertyNames(T)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(I,Z,N){I("../../modules/es6.object.get-prototype-of"),Z.exports=I("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(I,Z,N){I("../../modules/es6.object.keys"),Z.exports=I("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(I,Z,N){I("../modules/es6.object.to-string"),I("../modules/es6.string.iterator"),I("../modules/web.dom.iterable"),I("../modules/es6.promise"),I("../modules/es7.promise.finally"),I("../modules/es7.promise.try"),Z.exports=I("../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(I,Z,N){I("../modules/web.immediate"),Z.exports=I("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(I,Z,N){I("../../modules/es6.string.from-code-point"),Z.exports=I("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(I,Z,N){I("../../modules/es6.function.has-instance"),Z.exports=I("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(I,Z,N){I("../../modules/es6.symbol"),I("../../modules/es6.object.to-string"),I("../../modules/es7.symbol.async-iterator"),I("../../modules/es7.symbol.observable"),Z.exports=I("../../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(I,Z,N){I("../../modules/es6.string.iterator"),I("../../modules/web.dom.iterable"),Z.exports=I("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(I,Z,N){Z.exports=function(P){if(typeof P!="function")throw TypeError(P+" is not a function!");return P}},{}],93:[function(I,Z,N){Z.exports=function(){}},{}],94:[function(I,Z,N){Z.exports=function(P,m,T,L){if(!(P instanceof m)||L!==void 0&&L in P)throw TypeError(T+": incorrect invocation!");return P}},{}],95:[function(I,Z,N){var P=I("./_is-object");Z.exports=function(m){if(!P(m))throw TypeError(m+" is not an object!");return m}},{"./_is-object":119}],96:[function(I,Z,N){var P=I("./_to-iobject"),m=I("./_to-length"),T=I("./_to-absolute-index");Z.exports=function(L){return function(S,g,_){var d=P(S),o=m(d.length),i=T(_,o),r;if(L&&g!=g){for(;o>i;)if(r=d[i++],r!=r)return!0}else for(;o>i;i++)if((L||i in d)&&d[i]===g)return L||i||0;return!L&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(I,Z,N){var P=I("./_cof"),m=I("./_wks")("toStringTag"),T=P(function(){return arguments}())=="Arguments",L=function(S,g){try{return S[g]}catch(_){}};Z.exports=function(S){var g,_,d;return S===void 0?"Undefined":S===null?"Null":typeof(_=L(g=Object(S),m))=="string"?_:T?P(g):(d=P(g))=="Object"&&typeof g.callee=="function"?"Arguments":d}},{"./_cof":98,"./_wks":166}],98:[function(I,Z,N){var P={}.toString;Z.exports=function(m){return P.call(m).slice(8,-1)}},{}],99:[function(I,Z,N){var P=Z.exports={version:"2.6.11"};typeof __e=="number"&&(__e=P)},{}],100:[function(I,Z,N){"use strict";var P=I("./_object-dp"),m=I("./_property-desc");Z.exports=function(T,L,S){L in T?P.f(T,L,m(0,S)):T[L]=S}},{"./_object-dp":132,"./_property-desc":146}],101:[function(I,Z,N){var P=I("./_a-function");Z.exports=function(m,T,L){if(P(m),T===void 0)return m;switch(L){case 1:return function(S){return m.call(T,S)};case 2:return function(S,g){return m.call(T,S,g)};case 3:return function(S,g,_){return m.call(T,S,g,_)}}return function(){return m.apply(T,arguments)}}},{"./_a-function":92}],102:[function(I,Z,N){Z.exports=function(P){if(P==null)throw TypeError("Can't call method on "+P);return P}},{}],103:[function(I,Z,N){Z.exports=!I("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(I,Z,N){var P=I("./_is-object"),m=I("./_global").document,T=P(m)&&P(m.createElement);Z.exports=function(L){return T?m.createElement(L):{}}},{"./_global":110,"./_is-object":119}],105:[function(I,Z,N){Z.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(I,Z,N){var P=I("./_object-keys"),m=I("./_object-gops"),T=I("./_object-pie");Z.exports=function(L){var S=P(L),g=m.f;if(g)for(var _=g(L),d=T.f,o=0,i;_.length>o;)d.call(L,i=_[o++])&&S.push(i);return S}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(I,Z,N){var P=I("./_global"),m=I("./_core"),T=I("./_ctx"),L=I("./_hide"),S=I("./_has"),g="prototype",_=function(d,o,i){var r=d&_.F,h=d&_.G,p=d&_.S,f=d&_.P,x=d&_.B,v=d&_.W,l=h?m:m[o]||(m[o]={}),n=l[g],s=h?P:p?P[o]:(P[o]||{})[g],u,w,y;h&&(i=o);for(u in i){if(w=!r&&s&&s[u]!==void 0,w&&S(l,u))continue;y=w?s[u]:i[u],l[u]=h&&typeof s[u]!="function"?i[u]:x&&w?T(y,P):v&&s[u]==y?function(a){var R=function(D,c,b){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(D);case 2:return new a(D,c)}return new a(D,c,b)}return a.apply(this,arguments)};return R[g]=a[g],R}(y):f&&typeof y=="function"?T(Function.call,y):y,f&&((l.virtual||(l.virtual={}))[u]=y,d&_.R&&n&&!n[u]&&L(n,u,y))}};_.F=1,_.G=2,_.S=4,_.P=8,_.B=16,_.W=32,_.U=64,_.R=128,Z.exports=_},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(I,Z,N){Z.exports=function(P){try{return!!P()}catch(m){return!0}}},{}],109:[function(I,Z,N){var P=I("./_ctx"),m=I("./_iter-call"),T=I("./_is-array-iter"),L=I("./_an-object"),S=I("./_to-length"),g=I("./core.get-iterator-method"),_={},d={},N=Z.exports=function(o,i,r,h,p){var f=p?function(){return o}:g(o),x=P(r,h,i?2:1),v=0,l,n,s,u;if(typeof f!="function")throw TypeError(o+" is not iterable!");if(T(f)){for(l=S(o.length);l>v;v++)if(u=i?x(L(n=o[v])[0],n[1]):x(o[v]),u===_||u===d)return u}else for(s=f.call(o);!(n=s.next()).done;)if(u=m(s,x,n.value,i),u===_||u===d)return u};N.BREAK=_,N.RETURN=d},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(I,Z,N){var P=Z.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(I,Z,N){var P={}.hasOwnProperty;Z.exports=function(m,T){return P.call(m,T)}},{}],112:[function(I,Z,N){var P=I("./_object-dp"),m=I("./_property-desc");Z.exports=I("./_descriptors")?function(T,L,S){return P.f(T,L,m(1,S))}:function(T,L,S){return T[L]=S,T}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(I,Z,N){var P=I("./_global").document;Z.exports=P&&P.documentElement},{"./_global":110}],114:[function(I,Z,N){Z.exports=!I("./_descriptors")&&!I("./_fails")(function(){return Object.defineProperty(I("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(I,Z,N){Z.exports=function(P,m,T){var L=T===void 0;switch(m.length){case 0:return L?P():P.call(T);case 1:return L?P(m[0]):P.call(T,m[0]);case 2:return L?P(m[0],m[1]):P.call(T,m[0],m[1]);case 3:return L?P(m[0],m[1],m[2]):P.call(T,m[0],m[1],m[2]);case 4:return L?P(m[0],m[1],m[2],m[3]):P.call(T,m[0],m[1],m[2],m[3])}return P.apply(T,m)}},{}],116:[function(I,Z,N){var P=I("./_cof");Z.exports=Object("z").propertyIsEnumerable(0)?Object:function(m){return P(m)=="String"?m.split(""):Object(m)}},{"./_cof":98}],117:[function(I,Z,N){var P=I("./_iterators"),m=I("./_wks")("iterator"),T=Array.prototype;Z.exports=function(L){return L!==void 0&&(P.Array===L||T[m]===L)}},{"./_iterators":125,"./_wks":166}],118:[function(I,Z,N){var P=I("./_cof");Z.exports=Array.isArray||function(T){return P(T)=="Array"}},{"./_cof":98}],119:[function(I,Z,N){Z.exports=function(P){return typeof P=="object"?P!==null:typeof P=="function"}},{}],120:[function(I,Z,N){var P=I("./_an-object");Z.exports=function(m,T,L,S){try{return S?T(P(L)[0],L[1]):T(L)}catch(_){var g=m.return;throw g!==void 0&&P(g.call(m)),_}}},{"./_an-object":95}],121:[function(I,Z,N){"use strict";var P=I("./_object-create"),m=I("./_property-desc"),T=I("./_set-to-string-tag"),L={};I("./_hide")(L,I("./_wks")("iterator"),function(){return this}),Z.exports=function(S,g,_){S.prototype=P(L,{next:m(1,_)}),T(S,g+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(I,Z,N){"use strict";var P=I("./_library"),m=I("./_export"),T=I("./_redefine"),L=I("./_hide"),S=I("./_iterators"),g=I("./_iter-create"),_=I("./_set-to-string-tag"),d=I("./_object-gpo"),o=I("./_wks")("iterator"),i=!([].keys&&"next"in[].keys()),r="@@iterator",h="keys",p="values",f=function(){return this};Z.exports=function(x,v,l,n,s,u,w){g(l,v,n);var y=function(G){if(!i&&G in c)return c[G];switch(G){case h:return function(){return new l(this,G)};case p:return function(){return new l(this,G)}}return function(){return new l(this,G)}},a=v+" Iterator",R=s==p,D=!1,c=x.prototype,b=c[o]||c[r]||s&&c[s],E=b||y(s),C=s?R?y("entries"):E:void 0,F=v=="Array"&&c.entries||b,j,k,X;if(F&&(X=d(F.call(new x)),X!==Object.prototype&&X.next&&(_(X,a,!0),!P&&typeof X[o]!="function"&&L(X,o,f))),R&&b&&b.name!==p&&(D=!0,E=function(){return b.call(this)}),(!P||w)&&(i||D||!c[o])&&L(c,o,E),S[v]=E,S[a]=f,s)if(j={values:R?E:y(p),keys:u?E:y(h),entries:C},w)for(k in j)k in c||T(c,k,j[k]);else m(m.P+m.F*(i||D),v,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(I,Z,N){var P=I("./_wks")("iterator"),m=!1;try{var T=[7][P]();T.return=function(){m=!0},Array.from(T,function(){throw 2})}catch(L){}Z.exports=function(L,S){if(!S&&!m)return!1;var g=!1;try{var _=[7],d=_[P]();d.next=function(){return{done:g=!0}},_[P]=function(){return d},L(_)}catch(o){}return g}},{"./_wks":166}],124:[function(I,Z,N){Z.exports=function(P,m){return{value:m,done:!!P}}},{}],125:[function(I,Z,N){Z.exports={}},{}],126:[function(I,Z,N){Z.exports=!0},{}],127:[function(I,Z,N){var P=I("./_uid")("meta"),m=I("./_is-object"),T=I("./_has"),L=I("./_object-dp").f,S=0,g=Object.isExtensible||function(){return!0},_=!I("./_fails")(function(){return g(Object.preventExtensions({}))}),d=function(p){L(p,P,{value:{i:"O"+ ++S,w:{}}})},o=function(p,f){if(!m(p))return typeof p=="symbol"?p:(typeof p=="string"?"S":"P")+p;if(!T(p,P)){if(!g(p))return"F";if(!f)return"E";d(p)}return p[P].i},i=function(p,f){if(!T(p,P)){if(!g(p))return!0;if(!f)return!1;d(p)}return p[P].w},r=function(p){return _&&h.NEED&&g(p)&&!T(p,P)&&d(p),p},h=Z.exports={KEY:P,NEED:!1,fastKey:o,getWeak:i,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(I,Z,N){var P=I("./_global"),m=I("./_task").set,T=P.MutationObserver||P.WebKitMutationObserver,L=P.process,S=P.Promise,g=I("./_cof")(L)=="process";Z.exports=function(){var _,d,o,i=function(){var f,x;for(g&&(f=L.domain)&&f.exit();_;){x=_.fn,_=_.next;try{x()}catch(v){throw _?o():d=void 0,v}}d=void 0,f&&f.enter()};if(g)o=function(){L.nextTick(i)};else if(T&&!(P.navigator&&P.navigator.standalone)){var r=!0,h=document.createTextNode("");new T(i).observe(h,{characterData:!0}),o=function(){h.data=r=!r}}else if(S&&S.resolve){var p=S.resolve(void 0);o=function(){p.then(i)}}else o=function(){m.call(P,i)};return function(f){var x={fn:f,next:void 0};d&&(d.next=x),_||(_=x,o()),d=x}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(I,Z,N){"use strict";var P=I("./_a-function");function m(T){var L,S;this.promise=new T(function(g,_){if(L!==void 0||S!==void 0)throw TypeError("Bad Promise constructor");L=g,S=_}),this.resolve=P(L),this.reject=P(S)}Z.exports.f=function(T){return new m(T)}},{"./_a-function":92}],130:[function(I,Z,N){"use strict";var P=I("./_descriptors"),m=I("./_object-keys"),T=I("./_object-gops"),L=I("./_object-pie"),S=I("./_to-object"),g=I("./_iobject"),_=Object.assign;Z.exports=!_||I("./_fails")(function(){var d={},o={},i=Symbol(),r="abcdefghijklmnopqrst";return d[i]=7,r.split("").forEach(function(h){o[h]=h}),_({},d)[i]!=7||Object.keys(_({},o)).join("")!=r})?function(o,i){for(var r=S(o),h=arguments.length,p=1,f=T.f,x=L.f;h>p;)for(var v=g(arguments[p++]),l=f?m(v).concat(f(v)):m(v),n=l.length,s=0,u;n>s;)u=l[s++],(!P||x.call(v,u))&&(r[u]=v[u]);return r}:_},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(I,Z,N){var P=I("./_an-object"),m=I("./_object-dps"),T=I("./_enum-bug-keys"),L=I("./_shared-key")("IE_PROTO"),S=function(){},g="prototype",_=function(){var d=I("./_dom-create")("iframe"),o=T.length,i="<",r=">",h;for(d.style.display="none",I("./_html").appendChild(d),d.src="javascript:",h=d.contentWindow.document,h.open(),h.write(i+"script"+r+"document.F=Object"+i+"/script"+r),h.close(),_=h.F;o--;)delete _[g][T[o]];return _()};Z.exports=Object.create||function(o,i){var r;return o!==null?(S[g]=P(o),r=new S,S[g]=null,r[L]=o):r=_(),i===void 0?r:m(r,i)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(I,Z,N){var P=I("./_an-object"),m=I("./_ie8-dom-define"),T=I("./_to-primitive"),L=Object.defineProperty;N.f=I("./_descriptors")?Object.defineProperty:function(g,_,d){if(P(g),_=T(_,!0),P(d),m)try{return L(g,_,d)}catch(o){}if("get"in d||"set"in d)throw TypeError("Accessors not supported!");return"value"in d&&(g[_]=d.value),g}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(I,Z,N){var P=I("./_object-dp"),m=I("./_an-object"),T=I("./_object-keys");Z.exports=I("./_descriptors")?Object.defineProperties:function(S,g){m(S);for(var _=T(g),d=_.length,o=0,i;d>o;)P.f(S,i=_[o++],g[i]);return S}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(I,Z,N){var P=I("./_object-pie"),m=I("./_property-desc"),T=I("./_to-iobject"),L=I("./_to-primitive"),S=I("./_has"),g=I("./_ie8-dom-define"),_=Object.getOwnPropertyDescriptor;N.f=I("./_descriptors")?_:function(o,i){if(o=T(o),i=L(i,!0),g)try{return _(o,i)}catch(r){}if(S(o,i))return m(!P.f.call(o,i),o[i])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(I,Z,N){var P=I("./_to-iobject"),m=I("./_object-gopn").f,T={}.toString,L=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],S=function(g){try{return m(g)}catch(_){return L.slice()}};Z.exports.f=function(_){return L&&T.call(_)=="[object Window]"?S(_):m(P(_))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(I,Z,N){var P=I("./_object-keys-internal"),m=I("./_enum-bug-keys").concat("length","prototype");N.f=Object.getOwnPropertyNames||function(L){return P(L,m)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(I,Z,N){N.f=Object.getOwnPropertySymbols},{}],138:[function(I,Z,N){var P=I("./_has"),m=I("./_to-object"),T=I("./_shared-key")("IE_PROTO"),L=Object.prototype;Z.exports=Object.getPrototypeOf||function(S){return S=m(S),P(S,T)?S[T]:typeof S.constructor=="function"&&S instanceof S.constructor?S.constructor.prototype:S instanceof Object?L:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(I,Z,N){var P=I("./_has"),m=I("./_to-iobject"),T=I("./_array-includes")(!1),L=I("./_shared-key")("IE_PROTO");Z.exports=function(S,g){var _=m(S),d=0,o=[],i;for(i in _)i!=L&&(P(_,i)&&o.push(i));for(;g.length>d;)P(_,i=g[d++])&&(~T(o,i)||o.push(i));return o}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(I,Z,N){var P=I("./_object-keys-internal"),m=I("./_enum-bug-keys");Z.exports=Object.keys||function(L){return P(L,m)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(I,Z,N){N.f={}.propertyIsEnumerable},{}],142:[function(I,Z,N){var P=I("./_export"),m=I("./_core"),T=I("./_fails");Z.exports=function(L,S){var g=(m.Object||{})[L]||Object[L],_={};_[L]=S(g),P(P.S+P.F*T(function(){g(1)}),"Object",_)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(I,Z,N){var P=I("./_descriptors"),m=I("./_object-keys"),T=I("./_to-iobject"),L=I("./_object-pie").f;Z.exports=function(S){return function(g){for(var _=T(g),d=m(_),o=d.length,i=0,r=[],h;o>i;)h=d[i++],(!P||L.call(_,h))&&r.push(S?[h,_[h]]:_[h]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(I,Z,N){Z.exports=function(P){try{return{e:!1,v:P()}}catch(m){return{e:!0,v:m}}}},{}],145:[function(I,Z,N){var P=I("./_an-object"),m=I("./_is-object"),T=I("./_new-promise-capability");Z.exports=function(L,S){if(P(L),m(S)&&S.constructor===L)return S;var g=T.f(L),_=g.resolve;return _(S),g.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(I,Z,N){Z.exports=function(P,m){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:m}}},{}],147:[function(I,Z,N){var P=I("./_hide");Z.exports=function(m,T,L){for(var S in T)L&&m[S]?m[S]=T[S]:P(m,S,T[S]);return m}},{"./_hide":112}],148:[function(I,Z,N){Z.exports=I("./_hide")},{"./_hide":112}],149:[function(I,Z,N){"use strict";var P=I("./_global"),m=I("./_core"),T=I("./_object-dp"),L=I("./_descriptors"),S=I("./_wks")("species");Z.exports=function(g){var _=typeof m[g]=="function"?m[g]:P[g];L&&_&&!_[S]&&T.f(_,S,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(I,Z,N){var P=I("./_object-dp").f,m=I("./_has"),T=I("./_wks")("toStringTag");Z.exports=function(L,S,g){L&&!m(L=g?L:L.prototype,T)&&P(L,T,{configurable:!0,value:S})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(I,Z,N){var P=I("./_shared")("keys"),m=I("./_uid");Z.exports=function(T){return P[T]||(P[T]=m(T))}},{"./_shared":152,"./_uid":162}],152:[function(I,Z,N){var P=I("./_core"),m=I("./_global"),T="__core-js_shared__",L=m[T]||(m[T]={});(Z.exports=function(S,g){return L[S]||(L[S]=g!==void 0?g:{})})("versions",[]).push({version:P.version,mode:I("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(I,Z,N){var P=I("./_an-object"),m=I("./_a-function"),T=I("./_wks")("species");Z.exports=function(L,S){var g=P(L).constructor,_;return g===void 0||(_=P(g)[T])==null?S:m(_)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(I,Z,N){var P=I("./_to-integer"),m=I("./_defined");Z.exports=function(T){return function(L,S){var g=String(m(L)),_=P(S),d=g.length,o,i;return _<0||_>=d?T?"":void 0:(o=g.charCodeAt(_),o<55296||o>56319||_+1===d||(i=g.charCodeAt(_+1))<56320||i>57343?T?g.charAt(_):o:T?g.slice(_,_+2):(o-55296<<10)+(i-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(I,Z,N){var P=I("./_ctx"),m=I("./_invoke"),T=I("./_html"),L=I("./_dom-create"),S=I("./_global"),g=S.process,_=S.setImmediate,d=S.clearImmediate,o=S.MessageChannel,i=S.Dispatch,r=0,h={},p="onreadystatechange",f,x,v,l=function(){var s=+this;if(h.hasOwnProperty(s)){var u=h[s];delete h[s],u()}},n=function(s){l.call(s.data)};(!_||!d)&&(_=function(u){for(var w=[],y=1;arguments.length>y;)w.push(arguments[y++]);return h[++r]=function(){m(typeof u=="function"?u:Function(u),w)},f(r),r},d=function(u){delete h[u]},I("./_cof")(g)=="process"?f=function(s){g.nextTick(P(l,s,1))}:i&&i.now?f=function(s){i.now(P(l,s,1))}:o?(x=new o,v=x.port2,x.port1.onmessage=n,f=P(v.postMessage,v,1)):S.addEventListener&&typeof postMessage=="function"&&!S.importScripts?(f=function(s){S.postMessage(s+"","*")},S.addEventListener("message",n,!1)):p in L("script")?f=function(s){T.appendChild(L("script"))[p]=function(){T.removeChild(this),l.call(s)}}:f=function(s){setTimeout(P(l,s,1),0)}),Z.exports={set:_,clear:d}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(I,Z,N){var P=I("./_to-integer"),m=Math.max,T=Math.min;Z.exports=function(L,S){return L=P(L),L<0?m(L+S,0):T(L,S)}},{"./_to-integer":157}],157:[function(I,Z,N){var P=Math.ceil,m=Math.floor;Z.exports=function(T){return isNaN(T=+T)?0:(T>0?m:P)(T)}},{}],158:[function(I,Z,N){var P=I("./_iobject"),m=I("./_defined");Z.exports=function(T){return P(m(T))}},{"./_defined":102,"./_iobject":116}],159:[function(I,Z,N){var P=I("./_to-integer"),m=Math.min;Z.exports=function(T){return T>0?m(P(T),9007199254740991):0}},{"./_to-integer":157}],160:[function(I,Z,N){var P=I("./_defined");Z.exports=function(m){return Object(P(m))}},{"./_defined":102}],161:[function(I,Z,N){var P=I("./_is-object");Z.exports=function(m,T){if(!P(m))return m;var L,S;if(T&&typeof(L=m.toString)=="function"&&!P(S=L.call(m)))return S;if(typeof(L=m.valueOf)=="function"&&!P(S=L.call(m)))return S;if(!T&&typeof(L=m.toString)=="function"&&!P(S=L.call(m)))return S;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(I,Z,N){var P=0,m=Math.random();Z.exports=function(T){return"Symbol(".concat(T===void 0?"":T,")_",(++P+m).toString(36))}},{}],163:[function(I,Z,N){var P=I("./_global"),m=P.navigator;Z.exports=m&&m.userAgent||""},{"./_global":110}],164:[function(I,Z,N){var P=I("./_global"),m=I("./_core"),T=I("./_library"),L=I("./_wks-ext"),S=I("./_object-dp").f;Z.exports=function(g){var _=m.Symbol||(m.Symbol=T?{}:P.Symbol||{});g.charAt(0)!="_"&&!(g in _)&&S(_,g,{value:L.f(g)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(I,Z,N){N.f=I("./_wks")},{"./_wks":166}],166:[function(I,Z,N){var P=I("./_shared")("wks"),m=I("./_uid"),T=I("./_global").Symbol,L=typeof T=="function",S=Z.exports=function(g){return P[g]||(P[g]=L&&T[g]||(L?T:m)("Symbol."+g))};S.store=P},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(I,Z,N){var P=I("./_classof"),m=I("./_wks")("iterator"),T=I("./_iterators");Z.exports=I("./_core").getIteratorMethod=function(L){if(L!=null)return L[m]||L["@@iterator"]||T[P(L)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(I,Z,N){"use strict";var P=I("./_ctx"),m=I("./_export"),T=I("./_to-object"),L=I("./_iter-call"),S=I("./_is-array-iter"),g=I("./_to-length"),_=I("./_create-property"),d=I("./core.get-iterator-method");m(m.S+m.F*!I("./_iter-detect")(function(o){Array.from(o)}),"Array",{from:function(i){var r=T(i),h=typeof this=="function"?this:Array,p=arguments.length,f=p>1?arguments[1]:void 0,x=f!==void 0,v=0,l=d(r),n,s,u,w;if(x&&(f=P(f,p>2?arguments[2]:void 0,2)),l!=null&&!(h==Array&&S(l)))for(w=l.call(r),s=new h;!(u=w.next()).done;v++)_(s,v,x?L(w,f,[u.value,v],!0):u.value);else for(n=g(r.length),s=new h(n);n>v;v++)_(s,v,x?f(r[v],v):r[v]);return s.length=v,s}})},{"./_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(I,Z,N){"use strict";var P=I("./_add-to-unscopables"),m=I("./_iter-step"),T=I("./_iterators"),L=I("./_to-iobject");Z.exports=I("./_iter-define")(Array,"Array",function(S,g){this._t=L(S),this._i=0,this._k=g},function(){var S=this._t,g=this._k,_=this._i++;return!S||_>=S.length?(this._t=void 0,m(1)):g=="keys"?m(0,_):g=="values"?m(0,S[_]):m(0,[_,S[_]])},"values"),T.Arguments=T.Array,P("keys"),P("values"),P("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(I,Z,N){"use strict";var P=I("./_is-object"),m=I("./_object-gpo"),T=I("./_wks")("hasInstance"),L=Function.prototype;T in L||I("./_object-dp").f(L,T,{value:function(S){if(typeof this!="function"||!P(S))return!1;if(!P(this.prototype))return S instanceof this;for(;S=m(S);)if(this.prototype===S)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(I,Z,N){var P=I("./_export");P(P.S+P.F,"Object",{assign:I("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(I,Z,N){var P=I("./_export");P(P.S,"Object",{create:I("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(I,Z,N){var P=I("./_export");P(P.S+P.F*!I("./_descriptors"),"Object",{defineProperty:I("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(I,Z,N){I("./_object-sap")("getOwnPropertyNames",function(){return I("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(I,Z,N){var P=I("./_to-object"),m=I("./_object-gpo");I("./_object-sap")("getPrototypeOf",function(){return function(L){return m(P(L))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(I,Z,N){var P=I("./_to-object"),m=I("./_object-keys");I("./_object-sap")("keys",function(){return function(L){return m(P(L))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(I,Z,N){arguments[4][71][0].apply(N,arguments)},{dup:71}],178:[function(I,Z,N){"use strict";var P=I("./_library"),m=I("./_global"),T=I("./_ctx"),L=I("./_classof"),S=I("./_export"),g=I("./_is-object"),_=I("./_a-function"),d=I("./_an-instance"),o=I("./_for-of"),i=I("./_species-constructor"),r=I("./_task").set,h=I("./_microtask")(),p=I("./_new-promise-capability"),f=I("./_perform"),x=I("./_user-agent"),v=I("./_promise-resolve"),l="Promise",n=m.TypeError,s=m.process,u=s&&s.versions,w=u&&u.v8||"",y=m[l],a=L(s)=="process",R=function(){},D,c,b,E,C=c=p.f,F=!!function(){try{var U=y.resolve(1),W=(U.constructor={})[I("./_wks")("species")]=function(Q){Q(R,R)};return(a||typeof PromiseRejectionEvent=="function")&&U.then(R)instanceof W&&w.indexOf("6.6")!==0&&x.indexOf("Chrome/66")===-1}catch(Q){}}(),j=function(U){var W;return g(U)&&typeof(W=U.then)=="function"?W:!1},k=function(U,W){if(U._n)return;U._n=!0;var Q=U._c;h(function(){for(var ie=U._v,ce=U._s==1,he=0,be=function(ne){var le=ce?ne.ok:ne.fail,ue=ne.resolve,re=ne.reject,oe=ne.domain,q,se,J;try{le?(ce||(U._h==2&&H(U),U._h=1),le===!0?q=ie:(oe&&oe.enter(),q=le(ie),oe&&(oe.exit(),J=!0)),q===ne.promise?re(n("Promise-chain cycle")):(se=j(q))?se.call(q,ue,re):ue(q)):re(ie)}catch(ee){oe&&!J&&oe.exit(),re(ee)}};Q.length>he;)be(Q[he++]);U._c=[],U._n=!1,W&&!U._h&&X(U)})},X=function(U){r.call(m,function(){var W=U._v,Q=G(U),ie,ce,he;if(Q&&(ie=f(function(){a?s.emit("unhandledRejection",W,U):(ce=m.onunhandledrejection)?ce({promise:U,reason:W}):(he=m.console)&&he.error&&he.error("Unhandled promise rejection",W)}),U._h=a||G(U)?2:1),U._a=void 0,Q&&ie.e)throw ie.v})},G=function(U){return U._h!==1&&(U._a||U._c).length===0},H=function(U){r.call(m,function(){var W;a?s.emit("rejectionHandled",U):(W=m.onrejectionhandled)&&W({promise:U,reason:U._v})})},K=function(U){var W=this;if(W._d)return;W._d=!0,W=W._w||W,W._v=U,W._s=2,W._a||(W._a=W._c.slice()),k(W,!0)},B=function(U){var W=this,Q;if(W._d)return;W._d=!0,W=W._w||W;try{if(W===U)throw n("Promise can't be resolved itself");(Q=j(U))?h(function(){var ie={_w:W,_d:!1};try{Q.call(U,T(B,ie,1),T(K,ie,1))}catch(ce){K.call(ie,ce)}}):(W._v=U,W._s=1,k(W,!1))}catch(ie){K.call({_w:W,_d:!1},ie)}};F||(y=function(W){d(this,y,l,"_h"),_(W),D.call(this);try{W(T(B,this,1),T(K,this,1))}catch(Q){K.call(this,Q)}},D=function(W){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},D.prototype=I("./_redefine-all")(y.prototype,{then:function(W,Q){var ie=C(i(this,y));return ie.ok=typeof W=="function"?W:!0,ie.fail=typeof Q=="function"&&Q,ie.domain=a?s.domain:void 0,this._c.push(ie),this._a&&this._a.push(ie),this._s&&k(this,!1),ie.promise},catch:function(U){return this.then(void 0,U)}}),b=function(){var U=new D;this.promise=U,this.resolve=T(B,U,1),this.reject=T(K,U,1)},p.f=C=function(U){return U===y||U===E?new b(U):c(U)}),S(S.G+S.W+S.F*!F,{Promise:y}),I("./_set-to-string-tag")(y,l),I("./_set-species")(l),E=I("./_core")[l],S(S.S+S.F*!F,l,{reject:function(W){var Q=C(this),ie=Q.reject;return ie(W),Q.promise}}),S(S.S+S.F*(P||!F),l,{resolve:function(W){return v(P&&this===E?y:this,W)}}),S(S.S+S.F*!(F&&I("./_iter-detect")(function(U){y.all(U).catch(R)})),l,{all:function(W){var Q=this,ie=C(Q),ce=ie.resolve,he=ie.reject,be=f(function(){var ne=[],le=0,ue=1;o(W,!1,function(re){var oe=le++,q=!1;ne.push(void 0),ue++,Q.resolve(re).then(function(se){if(q)return;q=!0,ne[oe]=se,--ue||ce(ne)},he)}),--ue||ce(ne)});return be.e&&he(be.v),ie.promise},race:function(W){var Q=this,ie=C(Q),ce=ie.reject,he=f(function(){o(W,!1,function(be){Q.resolve(be).then(ie.resolve,ce)})});return he.e&&ce(he.v),ie.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(I,Z,N){var P=I("./_export"),m=I("./_to-absolute-index"),T=String.fromCharCode,L=String.fromCodePoint;P(P.S+P.F*(!!L&&L.length!=1),"String",{fromCodePoint:function(g){for(var _=[],d=arguments.length,o=0,i;d>o;){if(i=+arguments[o++],m(i,1114111)!==i)throw RangeError(i+" is not a valid code point");_.push(i<65536?T(i):T(((i-=65536)>>10)+55296,i%1024+56320))}return _.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(I,Z,N){"use strict";var P=I("./_string-at")(!0);I("./_iter-define")(String,"String",function(m){this._t=String(m),this._i=0},function(){var m=this._t,T=this._i,L;return T>=m.length?{value:void 0,done:!0}:(L=P(m,T),this._i+=L.length,{value:L,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(I,Z,N){"use strict";var P=I("./_global"),m=I("./_has"),T=I("./_descriptors"),L=I("./_export"),S=I("./_redefine"),g=I("./_meta").KEY,_=I("./_fails"),d=I("./_shared"),o=I("./_set-to-string-tag"),i=I("./_uid"),r=I("./_wks"),h=I("./_wks-ext"),p=I("./_wks-define"),f=I("./_enum-keys"),x=I("./_is-array"),v=I("./_an-object"),l=I("./_is-object"),n=I("./_to-object"),s=I("./_to-iobject"),u=I("./_to-primitive"),w=I("./_property-desc"),y=I("./_object-create"),a=I("./_object-gopn-ext"),R=I("./_object-gopd"),D=I("./_object-gops"),c=I("./_object-dp"),b=I("./_object-keys"),E=R.f,C=c.f,F=a.f,j=P.Symbol,k=P.JSON,X=k&&k.stringify,G="prototype",H=r("_hidden"),K=r("toPrimitive"),B={}.propertyIsEnumerable,U=d("symbol-registry"),W=d("symbols"),Q=d("op-symbols"),ie=Object[G],ce=typeof j=="function"&&!!D.f,he=P.QObject,be=!he||!he[G]||!he[G].findChild,ne=T&&_(function(){return y(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a!=7})?function(pe,xe,Re){var ke=E(ie,xe);ke&&delete ie[xe],C(pe,xe,Re),ke&&pe!==ie&&C(ie,xe,ke)}:C,le=function(pe){var xe=W[pe]=y(j[G]);return xe._k=pe,xe},ue=ce&&typeof j.iterator=="symbol"?function(pe){return typeof pe=="symbol"}:function(pe){return pe instanceof j},re=function(xe,Re,ke){return xe===ie&&re(Q,Re,ke),v(xe),Re=u(Re,!0),v(ke),m(W,Re)?(ke.enumerable?(m(xe,H)&&xe[H][Re]&&(xe[H][Re]=!1),ke=y(ke,{enumerable:w(0,!1)})):(m(xe,H)||C(xe,H,w(1,{})),xe[H][Re]=!0),ne(xe,Re,ke)):C(xe,Re,ke)},oe=function(xe,Re){v(xe);for(var ke=f(Re=s(Re)),Me=0,Pe=ke.length,je;Pe>Me;)re(xe,je=ke[Me++],Re[je]);return xe},q=function(xe,Re){return Re===void 0?y(xe):oe(y(xe),Re)},se=function(xe){var Re=B.call(this,xe=u(xe,!0));return this===ie&&m(W,xe)&&!m(Q,xe)?!1:Re||!m(this,xe)||!m(W,xe)||m(this,H)&&this[H][xe]?Re:!0},J=function(xe,Re){if(xe=s(xe),Re=u(Re,!0),xe===ie&&m(W,Re)&&!m(Q,Re))return;var ke=E(xe,Re);return ke&&m(W,Re)&&!(m(xe,H)&&xe[H][Re])&&(ke.enumerable=!0),ke},ee=function(xe){for(var Re=F(s(xe)),ke=[],Me=0,Pe;Re.length>Me;)!m(W,Pe=Re[Me++])&&Pe!=H&&Pe!=g&&ke.push(Pe);return ke},ge=function(xe){for(var Re=xe===ie,ke=F(Re?Q:s(xe)),Me=[],Pe=0,je;ke.length>Pe;)m(W,je=ke[Pe++])&&(Re?m(ie,je):!0)&&Me.push(W[je]);return Me};ce||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var xe=i(arguments.length>0?arguments[0]:void 0),Re=function(ke){this===ie&&Re.call(Q,ke),m(this,H)&&m(this[H],xe)&&(this[H][xe]=!1),ne(this,xe,w(1,ke))};return T&&be&&ne(ie,xe,{configurable:!0,set:Re}),le(xe)},S(j[G],"toString",function(){return this._k}),R.f=J,c.f=re,I("./_object-gopn").f=a.f=ee,I("./_object-pie").f=se,D.f=ge,T&&!I("./_library")&&S(ie,"propertyIsEnumerable",se,!0),h.f=function(pe){return le(r(pe))}),L(L.G+L.W+L.F*!ce,{Symbol:j});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Y=0;te.length>Y;)r(te[Y++]);for(var z=b(r.store),$=0;z.length>$;)p(z[$++]);L(L.S+L.F*!ce,"Symbol",{for:function(pe){return m(U,pe+="")?U[pe]:U[pe]=j(pe)},keyFor:function(xe){if(!ue(xe))throw TypeError(xe+" is not a symbol!");for(var Re in U)if(U[Re]===xe)return Re},useSetter:function(){be=!0},useSimple:function(){be=!1}}),L(L.S+L.F*!ce,"Object",{create:q,defineProperty:re,defineProperties:oe,getOwnPropertyDescriptor:J,getOwnPropertyNames:ee,getOwnPropertySymbols:ge});var me=_(function(){D.f(1)});L(L.S+L.F*me,"Object",{getOwnPropertySymbols:function(xe){return D.f(n(xe))}}),k&&L(L.S+L.F*(!ce||_(function(){var pe=j();return X([pe])!="[null]"||X({a:pe})!="{}"||X(Object(pe))!="{}"})),"JSON",{stringify:function(xe){for(var Re=[xe],ke=1,Me,Pe;arguments.length>ke;)Re.push(arguments[ke++]);return Pe=Me=Re[1],!l(Me)&&xe===void 0||ue(xe)?void 0:(x(Me)||(Me=function(je,Fe){if(typeof Pe=="function"&&(Fe=Pe.call(this,je,Fe)),!ue(Fe))return Fe}),Re[1]=Me,X.apply(k,Re))}}),j[G][K]||I("./_hide")(j[G],K,j[G].valueOf),o(j,"Symbol"),o(Math,"Math",!0),o(P.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(I,Z,N){var P=I("./_export"),m=I("./_object-to-array")(!0);P(P.S,"Object",{entries:function(L){return m(L)}})},{"./_export":107,"./_object-to-array":143}],183:[function(I,Z,N){"use strict";var P=I("./_export"),m=I("./_core"),T=I("./_global"),L=I("./_species-constructor"),S=I("./_promise-resolve");P(P.P+P.R,"Promise",{finally:function(g){var _=L(this,m.Promise||T.Promise),d=typeof g=="function";return this.then(d?function(o){return S(_,g()).then(function(){return o})}:g,d?function(o){return S(_,g()).then(function(){throw o})}:g)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(I,Z,N){"use strict";var P=I("./_export"),m=I("./_new-promise-capability"),T=I("./_perform");P(P.S,"Promise",{try:function(L){var S=m.f(this),g=T(L);return(g.e?S.reject:S.resolve)(g.v),S.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(I,Z,N){I("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(I,Z,N){I("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(I,Z,N){I("./es6.array.iterator");for(var P=I("./_global"),m=I("./_hide"),T=I("./_iterators"),L=I("./_wks")("toStringTag"),S="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(","),g=0;g<S.length;g++){var _=S[g],d=P[_],o=d&&d.prototype;o&&!o[L]&&m(o,L,_),T[_]=T.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(I,Z,N){var P=I("./_export"),m=I("./_task");P(P.G+P.B,{setImmediate:m.set,clearImmediate:m.clear})},{"./_export":107,"./_task":155}],189:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/helpers/typeof"),T=L(m);function L(u){return u&&u.__esModule?u:{default:u}}function S(u){return Array.isArray?Array.isArray(u):s(u)==="[object Array]"}N.isArray=S;function g(u){return typeof u=="boolean"}N.isBoolean=g;function _(u){return u===null}N.isNull=_;function d(u){return u==null}N.isNullOrUndefined=d;function o(u){return typeof u=="number"}N.isNumber=o;function i(u){return typeof u=="string"}N.isString=i;function r(u){return(typeof u=="undefined"?"undefined":(0,T.default)(u))==="symbol"}N.isSymbol=r;function h(u){return u===void 0}N.isUndefined=h;function p(u){return s(u)==="[object RegExp]"}N.isRegExp=p;function f(u){return(typeof u=="undefined"?"undefined":(0,T.default)(u))==="object"&&u!==null}N.isObject=f;function x(u){return s(u)==="[object Date]"}N.isDate=x;function v(u){return s(u)==="[object Error]"||u instanceof Error}N.isError=v;function l(u){return typeof u=="function"}N.isFunction=l;function n(u){return u===null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||(typeof u=="undefined"?"undefined":(0,T.default)(u))==="symbol"||typeof u=="undefined"}N.isPrimitive=n,N.isBuffer=P.isBuffer;function s(u){return Object.prototype.toString.call(u)}}).call(this,{isBuffer:I("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(I,Z,N){"use strict";var P=I("babel-runtime/helpers/typeof"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(L){"use strict";var S=function(){var i=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,r=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,h=/[^-+\dA-Z]/g;return function(p,f,x,v){if(arguments.length===1&&o(p)==="string"&&!/\d/.test(p)&&(f=p,p=void 0),p=p||new Date,p instanceof Date||(p=new Date(p)),isNaN(p))throw TypeError("Invalid date");f=String(S.masks[f]||f||S.masks.default);var l=f.slice(0,4);(l==="UTC:"||l==="GMT:")&&(f=f.slice(4),x=!0,l==="GMT:"&&(v=!0));var n=x?"getUTC":"get",s=p[n+"Date"](),u=p[n+"Day"](),w=p[n+"Month"](),y=p[n+"FullYear"](),a=p[n+"Hours"](),R=p[n+"Minutes"](),D=p[n+"Seconds"](),c=p[n+"Milliseconds"](),b=x?0:p.getTimezoneOffset(),E=_(p),C=d(p),F={d:s,dd:g(s),ddd:S.i18n.dayNames[u],dddd:S.i18n.dayNames[u+7],m:w+1,mm:g(w+1),mmm:S.i18n.monthNames[w],mmmm:S.i18n.monthNames[w+12],yy:String(y).slice(2),yyyy:y,h:a%12||12,hh:g(a%12||12),H:a,HH:g(a),M:R,MM:g(R),s:D,ss:g(D),l:g(c,3),L:g(Math.round(c/10)),t:a<12?"a":"p",tt:a<12?"am":"pm",T:a<12?"A":"P",TT:a<12?"AM":"PM",Z:v?"GMT":x?"UTC":(String(p).match(r)||[""]).pop().replace(h,""),o:(b>0?"-":"+")+g(Math.floor(Math.abs(b)/60)*100+Math.abs(b)%60,4),S:["th","st","nd","rd"][s%10>3?0:(s%100-s%10!=10)*s%10],W:E,N:C};return f.replace(i,function(j){return j in F?F[j]:j.slice(1,j.length-1)})}}();S.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"},S.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 g(i,r){for(i=String(i),r=r||2;i.length<r;)i="0"+i;return i}function _(i){var r=new Date(i.getFullYear(),i.getMonth(),i.getDate());r.setDate(r.getDate()-(r.getDay()+6)%7+3);var h=new Date(r.getFullYear(),0,4);h.setDate(h.getDate()-(h.getDay()+6)%7+3);var p=r.getTimezoneOffset()-h.getTimezoneOffset();r.setHours(r.getHours()-p);var f=(r-h)/(864e5*7);return 1+Math.floor(f)}function d(i){var r=i.getDay();return r===0&&(r=7),r}function o(i){return i===null?"null":i===void 0?"undefined":(typeof i=="undefined"?"undefined":(0,m.default)(i))!=="object"?typeof i=="undefined"?"undefined":(0,m.default)(i):Array.isArray(i)?"array":{}.toString.call(i).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return S}):(typeof N=="undefined"?"undefined":(0,m.default)(N))==="object"?Z.exports=S:L.dateFormat=S})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(I,Z,N){/*!
* 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=/["'&<>]/;Z.exports=m;function m(T){var L=""+T,S=P.exec(L);if(!S)return L;var g,_="",d=0,o=0;for(d=S.index;d<L.length;d++){switch(L.charCodeAt(d)){case 34:g="&quot;";break;case 38:g="&amp;";break;case 39:g="&#39;";break;case 60:g="&lt;";break;case 62:g="&gt;";break;default:continue}o!==d&&(_+=L.substring(o,d)),o=d+1,_+=g}return o!==d?_+L.substring(o,d):_}},{}],192:[function(I,Z,N){function P(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Z.exports=P,P.EventEmitter=P,P.prototype._events=void 0,P.prototype._maxListeners=void 0,P.defaultMaxListeners=10,P.prototype.setMaxListeners=function(g){if(!T(g)||g<0||isNaN(g))throw TypeError("n must be a positive number");return this._maxListeners=g,this},P.prototype.emit=function(g){var _,d,o,i,r,h;if(this._events||(this._events={}),g==="error"&&(!this._events.error||L(this._events.error)&&!this._events.error.length)){if(_=arguments[1],_ instanceof Error)throw _;var p=new Error('Uncaught, unspecified "error" event. ('+_+")");throw p.context=_,p}if(d=this._events[g],S(d))return!1;if(m(d))switch(arguments.length){case 1:d.call(this);break;case 2:d.call(this,arguments[1]);break;case 3:d.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),d.apply(this,i)}else if(L(d))for(i=Array.prototype.slice.call(arguments,1),h=d.slice(),o=h.length,r=0;r<o;r++)h[r].apply(this,i);return!0},P.prototype.addListener=function(g,_){var d;if(!m(_))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",g,m(_.listener)?_.listener:_),this._events[g]?L(this._events[g])?this._events[g].push(_):this._events[g]=[this._events[g],_]:this._events[g]=_,L(this._events[g])&&!this._events[g].warned&&(S(this._maxListeners)?d=P.defaultMaxListeners:d=this._maxListeners,d&&d>0&&this._events[g].length>d&&(this._events[g].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[g].length),typeof console.trace=="function"&&console.trace())),this},P.prototype.on=P.prototype.addListener,P.prototype.once=function(g,_){if(!m(_))throw TypeError("listener must be a function");var d=!1;function o(){this.removeListener(g,o),d||(d=!0,_.apply(this,arguments))}return o.listener=_,this.on(g,o),this},P.prototype.removeListener=function(g,_){var d,o,i,r;if(!m(_))throw TypeError("listener must be a function");if(!this._events||!this._events[g])return this;if(d=this._events[g],i=d.length,o=-1,d===_||m(d.listener)&&d.listener===_)delete this._events[g],this._events.removeListener&&this.emit("removeListener",g,_);else if(L(d)){for(r=i;r-- >0;)if(d[r]===_||d[r].listener&&d[r].listener===_){o=r;break}if(o<0)return this;d.length===1?(d.length=0,delete this._events[g]):d.splice(o,1),this._events.removeListener&&this.emit("removeListener",g,_)}return this},P.prototype.removeAllListeners=function(g){var _,d;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[g]&&delete this._events[g],this;if(arguments.length===0){for(_ in this._events){if(_==="removeListener")continue;this.removeAllListeners(_)}return this.removeAllListeners("removeListener"),this._events={},this}if(d=this._events[g],m(d))this.removeListener(g,d);else if(d)for(;d.length;)this.removeListener(g,d[d.length-1]);return delete this._events[g],this},P.prototype.listeners=function(g){var _;return!this._events||!this._events[g]?_=[]:m(this._events[g])?_=[this._events[g]]:_=this._events[g].slice(),_},P.prototype.listenerCount=function(g){if(this._events){var _=this._events[g];if(m(_))return 1;if(_)return _.length}return 0},P.listenerCount=function(g,_){return g.listenerCount(_)};function m(g){return typeof g=="function"}function T(g){return typeof g=="number"}function L(g){return typeof g=="object"&&g!==null}function S(g){return g===void 0}},{}],193:[function(I,Z,N){var P=I("http"),m=Z.exports;for(var T in P)P.hasOwnProperty(T)&&(m[T]=P[T]);m.request=function(L,S){return L||(L={}),L.scheme="https",L.protocol="https:",P.request.call(this,L,S)}},{http:231}],194:[function(I,Z,N){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var P=I("util"),m=I("ms");Z.exports=function(T){if(typeof T=="number")return T;var L=m(T);if(L===void 0){var S=new Error(P.format("humanize-ms(%j) result undefined",T));console.warn(S.stack)}return L}},{ms:204,util:243}],195:[function(I,Z,N){N.read=function(P,m,T,L,S){var g,_,d=S*8-L-1,o=(1<<d)-1,i=o>>1,r=-7,h=T?S-1:0,p=T?-1:1,f=P[m+h];for(h+=p,g=f&(1<<-r)-1,f>>=-r,r+=d;r>0;g=g*256+P[m+h],h+=p,r-=8);for(_=g&(1<<-r)-1,g>>=-r,r+=L;r>0;_=_*256+P[m+h],h+=p,r-=8);if(g===0)g=1-i;else{if(g===o)return _?NaN:(f?-1:1)*Infinity;_=_+Math.pow(2,L),g=g-i}return(f?-1:1)*_*Math.pow(2,g-L)},N.write=function(P,m,T,L,S,g){var _,d,o,i=g*8-S-1,r=(1<<i)-1,h=r>>1,p=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=L?0:g-1,x=L?1:-1,v=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===Infinity?(d=isNaN(m)?1:0,_=r):(_=Math.floor(Math.log(m)/Math.LN2),m*(o=Math.pow(2,-_))<1&&(_--,o*=2),_+h>=1?m+=p/o:m+=p*Math.pow(2,1-h),m*o>=2&&(_++,o/=2),_+h>=r?(d=0,_=r):_+h>=1?(d=(m*o-1)*Math.pow(2,S),_=_+h):(d=m*Math.pow(2,h-1)*Math.pow(2,S),_=0));S>=8;P[T+f]=d&255,f+=x,d/=256,S-=8);for(_=_<<S|d,i+=S;i>0;P[T+f]=_&255,f+=x,_/=256,i-=8);P[T+f-x]|=v*128}},{}],196:[function(I,Z,N){typeof Object.create=="function"?Z.exports=function(m,T){T&&(m.super_=T,m.prototype=Object.create(T.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(m,T){if(T){m.super_=T;var L=function(){};L.prototype=T.prototype,m.prototype=new L,m.prototype.constructor=m}}},{}],197:[function(I,Z,N){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/Z.exports=function(T){return T!=null&&(P(T)||m(T)||!!T._isBuffer)};function P(T){return!!T.constructor&&typeof T.constructor.isBuffer=="function"&&T.constructor.isBuffer(T)}function m(T){return typeof T.readFloatLE=="function"&&typeof T.slice=="function"&&P(T.slice(0,0))}},{}],198:[function(I,Z,N){var P={}.toString;Z.exports=Array.isArray||function(m){return P.call(m)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(I,Z){typeof exports=="object"&&typeof module!="undefined"?module.exports=Z(I):typeof define=="function"&&define.amd?define(Z):Z(I)})(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(I){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(I){for(var Z={},N=0,P=I.length;N<P;N++)Z[I.charAt(N)]=N;return Z}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(I){if(I.length<2){var Z=I.charCodeAt(0);return Z<128?I:Z<2048?fromCharCode(192|Z>>>6)+fromCharCode(128|Z&63):fromCharCode(224|Z>>>12&15)+fromCharCode(128|Z>>>6&63)+fromCharCode(128|Z&63)}else{var Z=65536+(I.charCodeAt(0)-55296)*1024+(I.charCodeAt(1)-56320);return fromCharCode(240|Z>>>18&7)+fromCharCode(128|Z>>>12&63)+fromCharCode(128|Z>>>6&63)+fromCharCode(128|Z&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(I){return I.replace(re_utob,cb_utob)},cb_encode=function(I){var Z=[0,2,1][I.length%3],N=I.charCodeAt(0)<<16|(I.length>1?I.charCodeAt(1):0)<<8|(I.length>2?I.charCodeAt(2):0),P=[b64chars.charAt(N>>>18),b64chars.charAt(N>>>12&63),Z>=2?"=":b64chars.charAt(N>>>6&63),Z>=1?"=":b64chars.charAt(N&63)];return P.join("")},btoa=global.btoa?function(I){return global.btoa(I)}:function(I){return I.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(I){var Z=Object.prototype.toString.call(I)==="[object Uint8Array]";return Z?I.toString("base64"):btoa(utob(String(I)))},encode=function(I,Z){return Z?_encode(String(I)).replace(/[+\/]/g,function(N){return N=="+"?"-":"_"}).replace(/=/g,""):_encode(I)},encodeURI=function(I){return encode(I,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(I){switch(I.length){case 4:var Z=(7&I.charCodeAt(0))<<18|(63&I.charCodeAt(1))<<12|(63&I.charCodeAt(2))<<6|63&I.charCodeAt(3),N=Z-65536;return fromCharCode((N>>>10)+55296)+fromCharCode((N&1023)+56320);case 3:return fromCharCode((15&I.charCodeAt(0))<<12|(63&I.charCodeAt(1))<<6|63&I.charCodeAt(2));default:return fromCharCode((31&I.charCodeAt(0))<<6|63&I.charCodeAt(1))}},btou=function(I){return I.replace(re_btou,cb_btou)},cb_decode=function(I){var Z=I.length,N=Z%4,P=(Z>0?b64tab[I.charAt(0)]<<18:0)|(Z>1?b64tab[I.charAt(1)]<<12:0)|(Z>2?b64tab[I.charAt(2)]<<6:0)|(Z>3?b64tab[I.charAt(3)]:0),m=[fromCharCode(P>>>16),fromCharCode(P>>>8&255),fromCharCode(P&255)];return m.length-=[0,0,2,1][N],m.join("")},_atob=global.atob?function(I){return global.atob(I)}:function(I){return I.replace(/\S{1,4}/g,cb_decode)},atob=function(I){return _atob(String(I).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(I){return(I.constructor===buffer.constructor?I:buffer.from(I,"base64")).toString()}:function(I){return(I.constructor===buffer.constructor?I:new buffer(I,"base64")).toString()}:function(I){return btou(_atob(I))},decode=function(I){return _decode(String(I).replace(/[-_]/g,function(Z){return Z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var I=global.Base64;return global.Base64=_Base64,I};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(I){return{value:I,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(I){return encode(this,I)})),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(I,Z,N){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";Z.exports=m;var P=Object.prototype.hasOwnProperty;function m(T,L,S){if(!T)throw new TypeError("argument dest is required");if(!L)throw new TypeError("argument src is required");return S===void 0&&(S=!0),Object.getOwnPropertyNames(L).forEach(function(_){if(!S&&P.call(T,_))return;var d=Object.getOwnPropertyDescriptor(L,_);Object.defineProperty(T,_,d)}),T}},{}],201:[function(I,Z,N){"use strict";function P(){this._types=Object.create(null),this._extensions=Object.create(null);for(var m=0;m<arguments.length;m++)this.define(arguments[m]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}P.prototype.define=function(m,T){for(var L in m){var S=m[L].map(function(d){return d.toLowerCase()});L=L.toLowerCase();for(var g=0;g<S.length;g++){var _=S[g];if(_[0]=="*")continue;if(!T&&_ in this._types)throw new Error('Attempt to change mapping for "'+_+'" extension from "'+this._types[_]+'" to "'+L+'". Pass `force=true` to allow this, otherwise remove "'+_+'" from the list of extensions for "'+L+'".');this._types[_]=L}if(T||!this._extensions[L]){var _=S[0];this._extensions[L]=_[0]!="*"?_:_.substr(1)}}},P.prototype.getType=function(m){m=String(m);var T=m.replace(/^.*[/\\]/,"").toLowerCase(),L=T.replace(/^.*\./,"").toLowerCase(),S=T.length<m.length,g=L.length<T.length-1;return(g||!S)&&this._types[L]||null},P.prototype.getExtension=function(m){return m=/^\s*([^;\s]*)/.test(m)&&RegExp.$1,m&&this._extensions[m.toLowerCase()]||null},Z.exports=P},{}],202:[function(I,Z,N){"use strict";var P=I("./Mime");Z.exports=new P(I("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(I,Z,N){Z.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(I,Z,N){var P=1e3,m=P*60,T=m*60,L=T*24,S=L*7,g=L*365.25;Z.exports=function(r,h){h=h||{};var p=typeof r;if(p==="string"&&r.length>0)return _(r);if(p==="number"&&isFinite(r))return h.long?o(r):d(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function _(r){if(r=String(r),r.length>100)return;var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(!h)return;var p=parseFloat(h[1]),f=(h[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return p*g;case"weeks":case"week":case"w":return p*S;case"days":case"day":case"d":return p*L;case"hours":case"hour":case"hrs":case"hr":case"h":return p*T;case"minutes":case"minute":case"mins":case"min":case"m":return p*m;case"seconds":case"second":case"secs":case"sec":case"s":return p*P;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}function d(r){var h=Math.abs(r);return h>=L?Math.round(r/L)+"d":h>=T?Math.round(r/T)+"h":h>=m?Math.round(r/m)+"m":h>=P?Math.round(r/P)+"s":r+"ms"}function o(r){var h=Math.abs(r);return h>=L?i(r,h,L,"day"):h>=T?i(r,h,T,"hour"):h>=m?i(r,h,m,"minute"):h>=P?i(r,h,P,"second"):r+" ms"}function i(r,h,p,f){var x=h>=p*1.5;return Math.round(r/p)+" "+f+(x?"s":"")}},{}],205:[function(I,Z,N){(function(P){function m(g,_){for(var d=0,o=g.length-1;o>=0;o--){var i=g[o];i==="."?g.splice(o,1):i===".."?(g.splice(o,1),d++):d&&(g.splice(o,1),d--)}if(_)for(;d--;d)g.unshift("..");return g}N.resolve=function(){for(var g="",_=!1,d=arguments.length-1;d>=-1&&!_;d--){var o=d>=0?arguments[d]:P.cwd();if(typeof o!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!o)continue;g=o+"/"+g,_=o.charAt(0)==="/"}return g=m(L(g.split("/"),function(i){return!!i}),!_).join("/"),(_?"/":"")+g||"."},N.normalize=function(g){var _=N.isAbsolute(g),d=S(g,-1)==="/";return g=m(L(g.split("/"),function(o){return!!o}),!_).join("/"),!g&&!_&&(g="."),g&&d&&(g+="/"),(_?"/":"")+g},N.isAbsolute=function(g){return g.charAt(0)==="/"},N.join=function(){var g=Array.prototype.slice.call(arguments,0);return N.normalize(L(g,function(_,d){if(typeof _!="string")throw new TypeError("Arguments to path.join must be strings");return _}).join("/"))},N.relative=function(g,_){g=N.resolve(g).substr(1),_=N.resolve(_).substr(1);function d(x){for(var v=0;v<x.length&&!(x[v]!=="");v++);for(var l=x.length-1;l>=0&&!(x[l]!=="");l--);return v>l?[]:x.slice(v,l-v+1)}for(var o=d(g.split("/")),i=d(_.split("/")),r=Math.min(o.length,i.length),h=r,p=0;p<r;p++)if(o[p]!==i[p]){h=p;break}for(var f=[],p=h;p<o.length;p++)f.push("..");return f=f.concat(i.slice(h)),f.join("/")},N.sep="/",N.delimiter=":",N.dirname=function(g){if(typeof g!="string"&&(g=g+""),g.length===0)return".";for(var _=g.charCodeAt(0),d=_===47,o=-1,i=!0,r=g.length-1;r>=1;--r)if(_=g.charCodeAt(r),_===47){if(!i){o=r;break}}else i=!1;return o===-1?d?"/":".":d&&o===1?"/":g.slice(0,o)};function T(g){typeof g!="string"&&(g=g+"");var _=0,d=-1,o=!0,i;for(i=g.length-1;i>=0;--i)if(g.charCodeAt(i)===47){if(!o){_=i+1;break}}else d===-1&&(o=!1,d=i+1);return d===-1?"":g.slice(_,d)}N.basename=function(g,_){var d=T(g);return _&&d.substr(-1*_.length)===_&&(d=d.substr(0,d.length-_.length)),d},N.extname=function(g){typeof g!="string"&&(g=g+"");for(var _=-1,d=0,o=-1,i=!0,r=0,h=g.length-1;h>=0;--h){var p=g.charCodeAt(h);if(p===47){if(!i){d=h+1;break}continue}o===-1&&(i=!1,o=h+1),p===46?_===-1?_=h:r!==1&&(r=1):_!==-1&&(r=-1)}return _===-1||o===-1||r===0||r===1&&_===o-1&&_===d+1?"":g.slice(_,o)};function L(g,_){if(g.filter)return g.filter(_);for(var d=[],o=0;o<g.length;o++)_(g[o],o,g)&&d.push(g[o]);return d}var S="ab".substr(-1)==="b"?function(g,_,d){return g.substr(_,d)}:function(g,_,d){return _<0&&(_=g.length+_),g.substr(_,d)}}).call(this,I("_process"))},{_process:208}],206:[function(I,Z,N){(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 m={function:!0,object:!0},T=m[typeof window]&&window||this,L=T,S=m[typeof N]&&N,g=m[typeof Z]&&Z&&!Z.nodeType&&Z,_=S&&g&&typeof P=="object"&&P;_&&(_.global===_||_.window===_||_.self===_)&&(T=_);var d=Math.pow(2,53)-1,o=/\bOpera/,i=this,r=Object.prototype,h=r.hasOwnProperty,p=r.toString;function f(c){return c=String(c),c.charAt(0).toUpperCase()+c.slice(1)}function x(c,b,E){var C={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return b&&E&&/^Win/i.test(c)&&!/^Windows Phone /i.test(c)&&(C=C[/[\d.]+$/.exec(c)])&&(c="Windows "+C),c=String(c),b&&E&&(c=c.replace(RegExp(b,"i"),E)),c=l(c.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]),c}function v(c,b){var E=-1,C=c?c.length:0;if(typeof C=="number"&&C>-1&&C<=d)for(;++E<C;)b(c[E],E,c);else n(c,b)}function l(c){return c=a(c),/^(?:webOS|i(?:OS|P))/.test(c)?c:f(c)}function n(c,b){for(var E in c)h.call(c,E)&&b(c[E],E,c)}function s(c){return c==null?f(c):p.call(c).slice(8,-1)}function u(c,b){var E=c!=null?typeof c[b]:"number";return!/^(?:boolean|number|string|undefined)$/.test(E)&&(E=="object"?!!c[b]:!0)}function w(c){return String(c).replace(/([ -])(?!$)/g,"$1?")}function y(c,b){var E=null;return v(c,function(C,F){E=b(E,C,F,c)}),E}function a(c){return String(c).replace(/^ +| +$/g,"")}function R(c){var b=T,E=c&&typeof c=="object"&&s(c)!="String";E&&(b=c,c=null);var C=b.navigator||{},F=C.userAgent||"";c||(c=F);var j=E||i==L,k=E?!!C.likeChrome:/\bChrome\b/.test(c)&&!/internal|\n/i.test(p.toString()),X="Object",G=E?X:"ScriptBridgingProxyObject",H=E?X:"Environment",K=E&&b.java?"JavaPackage":s(b.java),B=E?X:"RuntimeObject",U=/\bJava/.test(K)&&b.java,W=U&&s(b.environment)==H,Q=U?"a":"\u03B1",ie=U?"b":"\u03B2",ce=b.document||{},he=b.operamini||b.opera,be=o.test(be=E&&he?he["[[Class]]"]:s(he))?be:he=null,ne,le=c,ue=[],re=null,oe=c==F,q=oe&&he&&typeof he.version=="function"&&he.version(),se,J=z([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ee=me(["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"]),ge=xe([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),te=$({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}}),Y=pe(["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 z(Pe){return y(Pe,function(je,Fe){return je||RegExp("\\b"+(Fe.pattern||w(Fe))+"\\b","i").exec(c)&&(Fe.label||Fe)})}function $(Pe){return y(Pe,function(je,Fe,We){return je||(Fe[ge]||Fe[/^[a-z]+(?: +[a-z]+\b)*/i.exec(ge)]||RegExp("\\b"+w(We)+"(?:\\b|\\w*\\d)","i").exec(c))&&We})}function me(Pe){return y(Pe,function(je,Fe){return je||RegExp("\\b"+(Fe.pattern||w(Fe))+"\\b","i").exec(c)&&(Fe.label||Fe)})}function pe(Pe){return y(Pe,function(je,Fe){var We=Fe.pattern||w(Fe);return!je&&(je=RegExp("\\b"+We+"(?:/[\\d.]+|[ \\w.]*)","i").exec(c))&&(je=x(je,We,Fe.label||Fe)),je})}function xe(Pe){return y(Pe,function(je,Fe){var We=Fe.pattern||w(Fe);return!je&&(je=RegExp("\\b"+We+" *\\d+[.\\w_]*","i").exec(c)||RegExp("\\b"+We+" *\\w+-[\\w]*","i").exec(c)||RegExp("\\b"+We+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(c))&&((je=String(Fe.label&&!RegExp(We,"i").test(Fe.label)?Fe.label:je).split("/"))[1]&&!/[\d.]+/.test(je[0])&&(je[0]+=" "+je[1]),Fe=Fe.label||Fe,je=l(je[0].replace(RegExp(We,"i"),Fe).replace(RegExp("; *(?:"+Fe+"[_-])?","i")," ").replace(RegExp("("+Fe+")[-_.]?(\\w)","i"),"$1 $2"))),je})}function Re(Pe){return y(Pe,function(je,Fe){return je||(RegExp(Fe+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(c)||0)[1]||null})}function ke(){return this.description||""}if(J&&(J=[J]),te&&!ge&&(ge=xe([te])),(ne=/\bGoogle TV\b/.exec(ge))&&(ge=ne[0]),/\bSimulator\b/i.test(c)&&(ge=(ge?ge+" ":"")+"Simulator"),ee=="Opera Mini"&&/\bOPiOS\b/.test(c)&&ue.push("running in Turbo/Uncompressed mode"),ee=="IE"&&/\blike iPhone OS\b/.test(c)?(ne=R(c.replace(/like iPhone OS/,"")),te=ne.manufacturer,ge=ne.product):/^iP/.test(ge)?(ee||(ee="Safari"),Y="iOS"+((ne=/ OS ([\d_]+)/i.exec(c))?" "+ne[1].replace(/_/g,"."):"")):ee=="Konqueror"&&!/buntu/i.test(Y)?Y="Kubuntu":te&&te!="Google"&&(/Chrome/.test(ee)&&!/\bMobile Safari\b/i.test(c)||/\bVita\b/.test(ge))||/\bAndroid\b/.test(Y)&&/^Chrome/.test(ee)&&/\bVersion\//i.test(c)?(ee="Android Browser",Y=/\bAndroid\b/.test(Y)?Y:"Android"):ee=="Silk"?(/\bMobi/i.test(c)||(Y="Android",ue.unshift("desktop mode")),/Accelerated *= *true/i.test(c)&&ue.unshift("accelerated")):ee=="PaleMoon"&&(ne=/\bFirefox\/([\d.]+)\b/.exec(c))?ue.push("identifying as Firefox "+ne[1]):ee=="Firefox"&&(ne=/\b(Mobile|Tablet|TV)\b/i.exec(c))?(Y||(Y="Firefox OS"),ge||(ge=ne[1])):!ee||(ne=!/\bMinefield\b/i.test(c)&&/\b(?:Firefox|Safari)\b/.exec(ee))?(ee&&!ge&&/[\/,]|^[^(]+?\)/.test(c.slice(c.indexOf(ne+"/")+8))&&(ee=null),(ne=ge||te||Y)&&(ge||te||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Y))&&(ee=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Y)?Y:ne)+" Browser")):ee=="Electron"&&(ne=(/\bChrome\/([\d.]+)\b/.exec(c)||0)[1])&&ue.push("Chromium "+ne),q||(q=Re(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",w(ee),"(?:Firefox|Minefield|NetFront)"])),(ne=J=="iCab"&&parseFloat(q)>3&&"WebKit"||/\bOpera\b/.test(ee)&&(/\bOPR\b/.test(c)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(c)&&!/^(?:Trident|EdgeHTML)$/.test(J)&&"WebKit"||!J&&/\bMSIE\b/i.test(c)&&(Y=="Mac OS"?"Tasman":"Trident")||J=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ee)&&"NetFront")&&(J=[ne]),ee=="IE"&&(ne=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(c)||0)[1])?(ee+=" Mobile",Y="Windows Phone "+(/\+$/.test(ne)?ne:ne+".x"),ue.unshift("desktop mode")):/\bWPDesktop\b/i.test(c)?(ee="IE Mobile",Y="Windows Phone 8.x",ue.unshift("desktop mode"),q||(q=(/\brv:([\d.]+)/.exec(c)||0)[1])):ee!="IE"&&J=="Trident"&&(ne=/\brv:([\d.]+)/.exec(c))&&(ee&&ue.push("identifying as "+ee+(q?" "+q:"")),ee="IE",q=ne[1]),oe){if(u(b,"global"))if(U&&(ne=U.lang.System,le=ne.getProperty("os.arch"),Y=Y||ne.getProperty("os.name")+" "+ne.getProperty("os.version")),W){try{q=b.require("ringo/engine").version.join("."),ee="RingoJS"}catch(Pe){(ne=b.system)&&ne.global.system==b.system&&(ee="Narwhal",Y||(Y=ne[0].os||null))}ee||(ee="Rhino")}else typeof b.process=="object"&&!b.process.browser&&(ne=b.process)&&(typeof ne.versions=="object"&&(typeof ne.versions.electron=="string"?(ue.push("Node "+ne.versions.node),ee="Electron",q=ne.versions.electron):typeof ne.versions.nw=="string"&&(ue.push("Chromium "+q,"Node "+ne.versions.node),ee="NW.js",q=ne.versions.nw)),ee||(ee="Node.js",le=ne.arch,Y=ne.platform,q=/[\d.]+/.exec(ne.version),q=q?q[0]:null));else s(ne=b.runtime)==G?(ee="Adobe AIR",Y=ne.flash.system.Capabilities.os):s(ne=b.phantom)==B?(ee="PhantomJS",q=(ne=ne.version||null)&&ne.major+"."+ne.minor+"."+ne.patch):typeof ce.documentMode=="number"&&(ne=/\bTrident\/(\d+)/i.exec(c))?(q=[q,ce.documentMode],(ne=+ne[1]+4)!=q[1]&&(ue.push("IE "+q[1]+" mode"),J&&(J[1]=""),q[1]=ne),q=ee=="IE"?String(q[1].toFixed(1)):q[0]):typeof ce.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ee)&&(ue.push("masking as "+ee+" "+q),ee="IE",q="11.0",J=["Trident"],Y="Windows");Y=Y&&l(Y)}if(q&&(ne=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(q)||/(?:alpha|beta)(?: ?\d)?/i.exec(c+";"+(oe&&C.appMinorVersion))||/\bMinefield\b/i.test(c)&&"a")&&(re=/b/i.test(ne)?"beta":"alpha",q=q.replace(RegExp(ne+"\\+?$"),"")+(re=="beta"?ie:Q)+(/\d+\+?/.exec(ne)||"")),ee=="Fennec"||ee=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Y))ee="Firefox Mobile";else if(ee=="Maxthon"&&q)q=q.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(ge))ge=="Xbox 360"&&(Y=null),ge=="Xbox 360"&&/\bIEMobile\b/.test(c)&&ue.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ee)||ee&&!ge&&!/Browser|Mobi/.test(ee))&&(Y=="Windows CE"||/Mobi/i.test(c)))ee+=" Mobile";else if(ee=="IE"&&oe)try{b.external===null&&ue.unshift("platform preview")}catch(Pe){ue.unshift("embedded")}else(/\bBlackBerry\b/.test(ge)||/\bBB10\b/.test(c))&&(ne=(RegExp(ge.replace(/ +/g," *")+"/([.\\d]+)","i").exec(c)||0)[1]||q)?(ne=[ne,/BB10/.test(c)],Y=(ne[1]?(ge=null,te="BlackBerry"):"Device Software")+" "+ne[0],q=null):this!=n&&ge!="Wii"&&(oe&&he||/Opera/.test(ee)&&/\b(?:MSIE|Firefox)\b/i.test(c)||ee=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Y)||ee=="IE"&&(Y&&!/^Win/.test(Y)&&q>5.5||/\bWindows XP\b/.test(Y)&&q>8||q==8&&!/\bTrident\b/.test(c)))&&!o.test(ne=R.call(n,c.replace(o,"")+";"))&&ne.name&&(ne="ing as "+ne.name+((ne=ne.version)?" "+ne:""),o.test(ee)?(/\bIE\b/.test(ne)&&Y=="Mac OS"&&(Y=null),ne="identify"+ne):(ne="mask"+ne,be?ee=l(be.replace(/([a-z])([A-Z])/g,"$1 $2")):ee="Opera",/\bIE\b/.test(ne)&&(Y=null),oe||(q=null)),J=["Presto"],ue.push(ne));(ne=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(c)||0)[1])&&(ne=[parseFloat(ne.replace(/\.(\d)$/,".0$1")),ne],ee=="Safari"&&ne[1].slice(-1)=="+"?(ee="WebKit Nightly",re="alpha",q=ne[1].slice(0,-1)):(q==ne[1]||q==(ne[2]=(/\bSafari\/([\d.]+\+?)/i.exec(c)||0)[1]))&&(q=null),ne[1]=(/\bChrome\/([\d.]+)/i.exec(c)||0)[1],ne[0]==537.36&&ne[2]==537.36&&parseFloat(ne[1])>=28&&J=="WebKit"&&(J=["Blink"]),!oe||!k&&!ne[1]?(J&&(J[1]="like Safari"),ne=(ne=ne[0],ne<400?1:ne<500?2:ne<526?3:ne<533?4:ne<534?"4+":ne<535?5:ne<537?6:ne<538?7:ne<601?8:"8")):(J&&(J[1]="like Chrome"),ne=ne[1]||(ne=ne[0],ne<530?1:ne<532?2:ne<532.05?3:ne<533?4:ne<534.03?5:ne<534.07?6:ne<534.1?7:ne<534.13?8:ne<534.16?9:ne<534.24?10:ne<534.3?11:ne<535.01?12:ne<535.02?"13+":ne<535.07?15:ne<535.11?16:ne<535.19?17:ne<536.05?18:ne<536.1?19:ne<537.01?20:ne<537.11?"21+":ne<537.13?23:ne<537.18?24:ne<537.24?25:ne<537.36?26:J!="Blink"?"27":"28")),J&&(J[1]+=" "+(ne+=typeof ne=="number"?".x":/[.+]/.test(ne)?"":"+")),ee=="Safari"&&(!q||parseInt(q)>45)&&(q=ne)),ee=="Opera"&&(ne=/\bzbov|zvav$/.exec(Y))?(ee+=" ",ue.unshift("desktop mode"),ne=="zvav"?(ee+="Mini",q=null):ee+="Mobile",Y=Y.replace(RegExp(" *"+ne+"$"),"")):ee=="Safari"&&/\bChrome\b/.exec(J&&J[1])&&(ue.unshift("desktop mode"),ee="Chrome Mobile",q=null,/\bOS X\b/.test(Y)?(te="Apple",Y="iOS 4.3+"):Y=null),q&&q.indexOf(ne=/[\d.]+$/.exec(Y))==0&&c.indexOf("/"+ne+"-")>-1&&(Y=a(Y.replace(ne,""))),J&&!/\b(?:Avant|Nook)\b/.test(ee)&&(/Browser|Lunascape|Maxthon/.test(ee)||ee!="Safari"&&/^iOS/.test(Y)&&/\bSafari\b/.test(J[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ee)&&J[1])&&((ne=J[J.length-1])&&ue.push(ne)),ue.length&&(ue=["("+ue.join("; ")+")"]),te&&ge&&ge.indexOf(te)<0&&ue.push("on "+te),ge&&ue.push((/^on /.test(ue[ue.length-1])?"":"on ")+ge),Y&&(ne=/ ([\d.+]+)$/.exec(Y),se=ne&&Y.charAt(Y.length-ne[0].length-1)=="/",Y={architecture:32,family:ne&&!se?Y.replace(ne[0],""):Y,version:ne?ne[1]:null,toString:function(){var Pe=this.version;return this.family+(Pe&&!se?" "+Pe:"")+(this.architecture==64?" 64-bit":"")}}),(ne=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(le))&&!/\bi686\b/i.test(le)?(Y&&(Y.architecture=64,Y.family=Y.family.replace(RegExp(" *"+ne),"")),ee&&(/\bWOW64\b/i.test(c)||oe&&/\w(?:86|32)$/.test(C.cpuClass||C.platform)&&!/\bWin64; x64\b/i.test(c))&&ue.unshift("32-bit")):Y&&/^OS X/.test(Y.family)&&ee=="Chrome"&&parseFloat(q)>=39&&(Y.architecture=64),c||(c=null);var Me={};return Me.description=c,Me.layout=J&&J[0],Me.manufacturer=te,Me.name=ee,Me.prerelease=re,Me.product=ge,Me.ua=c,Me.version=ee&&q,Me.os=Y||{architecture:null,family:null,version:null,toString:function(){return"null"}},Me.parse=R,Me.toString=ke,Me.version&&ue.unshift(q),Me.name&&ue.unshift(ee),Y&&ee&&!(Y==String(Y).split(" ")[0]&&(Y==ee.split(" ")[0]||ge))&&ue.push(ge?"("+Y+")":"on "+Y),ue.length&&(Me.description=ue.join(" ")),Me}var D=R();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(T.platform=D,define(function(){return D})):S&&g?n(D,function(c,b){S[b]=c}):T.platform=D}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(I,Z,N){(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?Z.exports={nextTick:m}:Z.exports=P;function m(T,L,S,g){if(typeof T!="function")throw new TypeError('"callback" argument must be a function');var _=arguments.length,d,o;switch(_){case 0:case 1:return P.nextTick(T);case 2:return P.nextTick(function(){T.call(null,L)});case 3:return P.nextTick(function(){T.call(null,L,S)});case 4:return P.nextTick(function(){T.call(null,L,S,g)});default:for(d=new Array(_-1),o=0;o<d.length;)d[o++]=arguments[o];return P.nextTick(function(){T.apply(null,d)})}}}).call(this,I("_process"))},{_process:208}],208:[function(I,Z,N){var P=Z.exports={},m,T;function L(){throw new Error("setTimeout has not been defined")}function S(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?m=setTimeout:m=L}catch(v){m=L}try{typeof clearTimeout=="function"?T=clearTimeout:T=S}catch(v){T=S}})();function g(v){if(m===setTimeout)return setTimeout(v,0);if((m===L||!m)&&setTimeout)return m=setTimeout,setTimeout(v,0);try{return m(v,0)}catch(l){try{return m.call(null,v,0)}catch(n){return m.call(this,v,0)}}}function _(v){if(T===clearTimeout)return clearTimeout(v);if((T===S||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(v);try{return T(v)}catch(l){try{return T.call(null,v)}catch(n){return T.call(this,v)}}}var d=[],o=!1,i,r=-1;function h(){if(!o||!i)return;o=!1,i.length?d=i.concat(d):r=-1,d.length&&p()}function p(){if(o)return;var v=g(h);o=!0;for(var l=d.length;l;){for(i=d,d=[];++r<l;)i&&i[r].run();r=-1,l=d.length}i=null,o=!1,_(v)}P.nextTick=function(v){var l=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)l[n-1]=arguments[n];d.push(new f(v,l)),d.length===1&&!o&&g(p)};function f(v,l){this.fun=v,this.array=l}f.prototype.run=function(){this.fun.apply(null,this.array)},P.title="browser",P.browser=!0,P.env={},P.argv=[],P.version="",P.versions={};function x(){}P.on=x,P.addListener=x,P.once=x,P.off=x,P.removeListener=x,P.removeAllListeners=x,P.emit=x,P.prependListener=x,P.prependOnceListener=x,P.listeners=function(v){return[]},P.binding=function(v){throw new Error("process.binding is not supported")},P.cwd=function(){return"/"},P.chdir=function(v){throw new Error("process.chdir is not supported")},P.umask=function(){return 0}},{}],209:[function(I,Z,N){(function(P){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(m){var T=typeof N=="object"&&N&&!N.nodeType&&N,L=typeof Z=="object"&&Z&&!Z.nodeType&&Z,S=typeof P=="object"&&P;(S.global===S||S.window===S||S.self===S)&&(m=S);var g,_=2147483647,d=36,o=1,i=26,r=38,h=700,p=72,f=128,x="-",v=/^xn--/,l=/[^\x20-\x7E]/,n=/[\x2E\u3002\uFF0E\uFF61]/g,s={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},u=d-o,w=Math.floor,y=String.fromCharCode,a;function R(K){throw new RangeError(s[K])}function D(K,B){for(var U=K.length,W=[];U--;)W[U]=B(K[U]);return W}function c(K,B){var U=K.split("@"),W="";U.length>1&&(W=U[0]+"@",K=U[1]),K=K.replace(n,".");var Q=K.split("."),ie=D(Q,B).join(".");return W+ie}function b(K){for(var B=[],U=0,W=K.length,Q,ie;U<W;)Q=K.charCodeAt(U++),Q>=55296&&Q<=56319&&U<W?(ie=K.charCodeAt(U++),(ie&64512)==56320?B.push(((Q&1023)<<10)+(ie&1023)+65536):(B.push(Q),U--)):B.push(Q);return B}function E(K){return D(K,function(B){var U="";return B>65535&&(B-=65536,U+=y(B>>>10&1023|55296),B=56320|B&1023),U+=y(B),U}).join("")}function C(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:d}function F(K,B){return K+22+75*(K<26)-((B!=0)<<5)}function j(K,B,U){var W=0;for(K=U?w(K/h):K>>1,K+=w(K/B);K>u*i>>1;W+=d)K=w(K/u);return w(W+(u+1)*K/(K+r))}function k(K){var B=[],U=K.length,W,Q=0,ie=f,ce=p,he,be,ne,le,ue,re,oe,q,se;for(he=K.lastIndexOf(x),he<0&&(he=0),be=0;be<he;++be)K.charCodeAt(be)>=128&&R("not-basic"),B.push(K.charCodeAt(be));for(ne=he>0?he+1:0;ne<U;){for(le=Q,ue=1,re=d;!(ne>=U&&R("invalid-input"),oe=C(K.charCodeAt(ne++)),(oe>=d||oe>w((_-Q)/ue))&&R("overflow"),Q+=oe*ue,q=re<=ce?o:re>=ce+i?i:re-ce,oe<q);re+=d)se=d-q,ue>w(_/se)&&R("overflow"),ue*=se;W=B.length+1,ce=j(Q-le,W,le==0),w(Q/W)>_-ie&&R("overflow"),ie+=w(Q/W),Q%=W,B.splice(Q++,0,ie)}return E(B)}function X(K){var B,U,W,Q,ie,ce,he,be,ne,le,ue,re=[],oe,q,se,J;for(K=b(K),oe=K.length,B=f,U=0,ie=p,ce=0;ce<oe;++ce)ue=K[ce],ue<128&&re.push(y(ue));for(W=Q=re.length,Q&&re.push(x);W<oe;){for(he=_,ce=0;ce<oe;++ce)ue=K[ce],ue>=B&&ue<he&&(he=ue);for(q=W+1,he-B>w((_-U)/q)&&R("overflow"),U+=(he-B)*q,B=he,ce=0;ce<oe;++ce)if(ue=K[ce],ue<B&&++U>_&&R("overflow"),ue==B){for(be=U,ne=d;!(le=ne<=ie?o:ne>=ie+i?i:ne-ie,be<le);ne+=d)J=be-le,se=d-le,re.push(y(F(le+J%se,0))),be=w(J/se);re.push(y(F(be,0))),ie=j(U,q,W==Q),U=0,++W}++U,++B}return re.join("")}function G(K){return c(K,function(B){return v.test(B)?k(B.slice(4).toLowerCase()):B})}function H(K){return c(K,function(B){return l.test(B)?"xn--"+X(B):B})}if(g={version:"1.4.1",ucs2:{decode:b,encode:E},decode:k,encode:X,toASCII:H,toUnicode:G},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return g});else if(T&&L)if(Z.exports==T)L.exports=g;else for(a in g)g.hasOwnProperty(a)&&(T[a]=g[a]);else m.punycode=g})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(I,Z,N){"use strict";function P(T,L){return Object.prototype.hasOwnProperty.call(T,L)}Z.exports=function(T,L,S,g){L=L||"&",S=S||"=";var _={};if(typeof T!="string"||T.length===0)return _;var d=/\+/g;T=T.split(L);var o=1e3;g&&typeof g.maxKeys=="number"&&(o=g.maxKeys);var i=T.length;o>0&&i>o&&(i=o);for(var r=0;r<i;++r){var h=T[r].replace(d,"%20"),p=h.indexOf(S),f,x,v,l;p>=0?(f=h.substr(0,p),x=h.substr(p+1)):(f=h,x=""),v=decodeURIComponent(f),l=decodeURIComponent(x),P(_,v)?m(_[v])?_[v].push(l):_[v]=[_[v],l]:_[v]=l}return _};var m=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"}},{}],211:[function(I,Z,N){"use strict";var P=function(S){switch(typeof S){case"string":return S;case"boolean":return S?"true":"false";case"number":return isFinite(S)?S:"";default:return""}};Z.exports=function(S,g,_,d){return g=g||"&",_=_||"=",S===null&&(S=void 0),typeof S=="object"?T(L(S),function(o){var i=encodeURIComponent(P(o))+_;return m(S[o])?T(S[o],function(r){return i+encodeURIComponent(P(r))}).join(g):i+encodeURIComponent(P(S[o]))}).join(g):d?encodeURIComponent(P(d))+_+encodeURIComponent(P(S)):""};var m=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"};function T(S,g){if(S.map)return S.map(g);for(var _=[],d=0;d<S.length;d++)_.push(g(S[d],d));return _}var L=Object.keys||function(S){var g=[];for(var _ in S)Object.prototype.hasOwnProperty.call(S,_)&&g.push(_);return g}},{}],212:[function(I,Z,N){"use strict";N.decode=N.parse=I("./decode"),N.encode=N.stringify=I("./encode")},{"./decode":210,"./encode":211}],213:[function(I,Z,N){Z.exports=I("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=S(P),T=I("babel-runtime/core-js/object/keys"),L=S(T);function S(l){return l&&l.__esModule?l:{default:l}}var g=I("process-nextick-args"),_=L.default||function(l){var n=[];for(var s in l)n.push(s);return n};Z.exports=f;var d=(0,m.default)(I("core-util-is"));d.inherits=I("inherits");var o=I("./_stream_readable"),i=I("./_stream_writable");d.inherits(f,o);for(var r=_(i.prototype),h=0;h<r.length;h++){var p=r[h];f.prototype[p]||(f.prototype[p]=i.prototype[p])}function f(l){if(!(this instanceof f))return new f(l);o.call(this,l),i.call(this,l),l&&l.readable===!1&&(this.readable=!1),l&&l.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,l&&l.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",x)}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function x(){if(this.allowHalfOpen||this._writableState.ended)return;g.nextTick(v,this)}function v(l){l.end()}Object.defineProperty(f.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}}),f.prototype._destroy=function(l,n){this.push(null),this.end(),g.nextTick(n,l)}},{"./_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(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(_){return _&&_.__esModule?_:{default:_}}Z.exports=g;var L=I("./_stream_transform"),S=(0,m.default)(I("core-util-is"));S.inherits=I("inherits"),S.inherits(g,L);function g(_){if(!(this instanceof g))return new g(_);L.call(this,_)}g.prototype._transform=function(_,d,o){o(null,_)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(I,Z,N){(function(P,m){"use strict";var T=I("babel-runtime/core-js/object/get-prototype-of"),L=_(T),S=I("babel-runtime/core-js/object/create"),g=_(S);function _(J){return J&&J.__esModule?J:{default:J}}var d=I("process-nextick-args");Z.exports=b;var o=I("isarray"),i;b.ReadableState=c;var r=I("events").EventEmitter,h=function(ee,ge){return ee.listeners(ge).length},p=I("./internal/streams/stream"),f=I("safe-buffer").Buffer,x=m.Uint8Array||function(){};function v(J){return f.from(J)}function l(J){return f.isBuffer(J)||J instanceof x}var n=(0,g.default)(I("core-util-is"));n.inherits=I("inherits");var s=I("util"),u=void 0;s&&s.debuglog?u=s.debuglog("stream"):u=function(){};var w=I("./internal/streams/BufferList"),y=I("./internal/streams/destroy"),a;n.inherits(b,p);var R=["error","close","destroy","pause","resume"];function D(J,ee,ge){if(typeof J.prependListener=="function")return J.prependListener(ee,ge);!J._events||!J._events[ee]?J.on(ee,ge):o(J._events[ee])?J._events[ee].unshift(ge):J._events[ee]=[ge,J._events[ee]]}function c(J,ee){i=i||I("./_stream_duplex"),J=J||{};var ge=ee instanceof i;this.objectMode=!!J.objectMode,ge&&(this.objectMode=this.objectMode||!!J.readableObjectMode);var te=J.highWaterMark,Y=J.readableHighWaterMark,z=this.objectMode?16:16*1024;te||te===0?this.highWaterMark=te:ge&&(Y||Y===0)?this.highWaterMark=Y:this.highWaterMark=z,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new w,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=J.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,J.encoding&&(a||(a=I("string_decoder/").StringDecoder),this.decoder=new a(J.encoding),this.encoding=J.encoding)}function b(J){if(i=i||I("./_stream_duplex"),!(this instanceof b))return new b(J);this._readableState=new c(J,this),this.readable=!0,J&&(typeof J.read=="function"&&(this._read=J.read),typeof J.destroy=="function"&&(this._destroy=J.destroy)),p.call(this)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ee){if(!this._readableState)return;this._readableState.destroyed=ee}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(J,ee){this.push(null),ee(J)},b.prototype.push=function(J,ee){var ge=this._readableState,te;return ge.objectMode?te=!0:typeof J=="string"&&(ee=ee||ge.defaultEncoding,ee!==ge.encoding&&(J=f.from(J,ee),ee=""),te=!0),E(this,J,ee,!1,te)},b.prototype.unshift=function(J){return E(this,J,null,!0,!1)};function E(J,ee,ge,te,Y){var z=J._readableState;if(ee===null)z.reading=!1,H(J,z);else{var $;Y||($=F(z,ee)),$?J.emit("error",$):z.objectMode||ee&&ee.length>0?(typeof ee!="string"&&!z.objectMode&&(0,L.default)(ee)!==f.prototype&&(ee=v(ee)),te?z.endEmitted?J.emit("error",new Error("stream.unshift() after end event")):C(J,z,ee,!0):z.ended?J.emit("error",new Error("stream.push() after EOF")):(z.reading=!1,z.decoder&&!ge?(ee=z.decoder.write(ee),z.objectMode||ee.length!==0?C(J,z,ee,!1):U(J,z)):C(J,z,ee,!1))):te||(z.reading=!1)}return j(z)}function C(J,ee,ge,te){ee.flowing&&ee.length===0&&!ee.sync?(J.emit("data",ge),J.read(0)):(ee.length+=ee.objectMode?1:ge.length,te?ee.buffer.unshift(ge):ee.buffer.push(ge),ee.needReadable&&K(J)),U(J,ee)}function F(J,ee){var ge;return!l(ee)&&typeof ee!="string"&&ee!==void 0&&!J.objectMode&&(ge=new TypeError("Invalid non-string/buffer chunk")),ge}function j(J){return!J.ended&&(J.needReadable||J.length<J.highWaterMark||J.length===0)}b.prototype.isPaused=function(){return this._readableState.flowing===!1},b.prototype.setEncoding=function(J){return a||(a=I("string_decoder/").StringDecoder),this._readableState.decoder=new a(J),this._readableState.encoding=J,this};var k=8388608;function X(J){return J>=k?J=k:(J--,J|=J>>>1,J|=J>>>2,J|=J>>>4,J|=J>>>8,J|=J>>>16,J++),J}function G(J,ee){return J<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:J!==J?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(J>ee.highWaterMark&&(ee.highWaterMark=X(J)),J<=ee.length?J:ee.ended?ee.length:(ee.needReadable=!0,0))}b.prototype.read=function(J){u("read",J),J=parseInt(J,10);var ee=this._readableState,ge=J;if(J!==0&&(ee.emittedReadable=!1),J===0&&ee.needReadable&&(ee.length>=ee.highWaterMark||ee.ended))return u("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?oe(this):K(this),null;if(J=G(J,ee),J===0&&ee.ended)return ee.length===0&&oe(this),null;var te=ee.needReadable;u("need readable",te),(ee.length===0||ee.length-J<ee.highWaterMark)&&(te=!0,u("length less than watermark",te)),ee.ended||ee.reading?(te=!1,u("reading or ended",te)):te&&(u("do read"),ee.reading=!0,ee.sync=!0,ee.length===0&&(ee.needReadable=!0),this._read(ee.highWaterMark),ee.sync=!1,ee.reading||(J=G(ge,ee)));var Y;return J>0?Y=ne(J,ee):Y=null,Y===null?(ee.needReadable=!0,J=0):ee.length-=J,ee.length===0&&(ee.ended||(ee.needReadable=!0),ge!==J&&ee.ended&&oe(this)),Y!==null&&this.emit("data",Y),Y};function H(J,ee){if(ee.ended)return;if(ee.decoder){var ge=ee.decoder.end();ge&&ge.length&&(ee.buffer.push(ge),ee.length+=ee.objectMode?1:ge.length)}ee.ended=!0,K(J)}function K(J){var ee=J._readableState;ee.needReadable=!1,ee.emittedReadable||(u("emitReadable",ee.flowing),ee.emittedReadable=!0,ee.sync?d.nextTick(B,J):B(J))}function B(J){u("emit readable"),J.emit("readable"),be(J)}function U(J,ee){ee.readingMore||(ee.readingMore=!0,d.nextTick(W,J,ee))}function W(J,ee){for(var ge=ee.length;!ee.reading&&!ee.flowing&&!ee.ended&&ee.length<ee.highWaterMark&&!(u("maybeReadMore read 0"),J.read(0),ge===ee.length);)ge=ee.length;ee.readingMore=!1}b.prototype._read=function(J){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(J,ee){var ge=this,te=this._readableState;switch(te.pipesCount){case 0:te.pipes=J;break;case 1:te.pipes=[te.pipes,J];break;default:te.pipes.push(J);break}te.pipesCount+=1,u("pipe count=%d opts=%j",te.pipesCount,ee);var Y=(!ee||ee.end!==!1)&&J!==P.stdout&&J!==P.stderr,z=Y?me:We;te.endEmitted?d.nextTick(z):ge.once("end",z),J.on("unpipe",$);function $(Se,Xe){u("onunpipe"),Se===ge&&(Xe&&Xe.hasUnpiped===!1&&(Xe.hasUnpiped=!0,Re()))}function me(){u("onend"),J.end()}var pe=Q(ge);J.on("drain",pe);var xe=!1;function Re(){u("cleanup"),J.removeListener("close",je),J.removeListener("finish",Fe),J.removeListener("drain",pe),J.removeListener("error",Pe),J.removeListener("unpipe",$),ge.removeListener("end",me),ge.removeListener("end",We),ge.removeListener("data",Me),xe=!0,te.awaitDrain&&(!J._writableState||J._writableState.needDrain)&&pe()}var ke=!1;ge.on("data",Me);function Me(Se){u("ondata"),ke=!1;var Xe=J.write(Se);Xe===!1&&!ke&&((te.pipesCount===1&&te.pipes===J||te.pipesCount>1&&se(te.pipes,J)!==-1)&&!xe&&(u("false write response, pause",ge._readableState.awaitDrain),ge._readableState.awaitDrain++,ke=!0),ge.pause())}function Pe(Se){u("onerror",Se),We(),J.removeListener("error",Pe),h(J,"error")===0&&J.emit("error",Se)}D(J,"error",Pe);function je(){J.removeListener("finish",Fe),We()}J.once("close",je);function Fe(){u("onfinish"),J.removeListener("close",je),We()}J.once("finish",Fe);function We(){u("unpipe"),ge.unpipe(J)}return J.emit("pipe",ge),te.flowing||(u("pipe resume"),ge.resume()),J};function Q(J){return function(){var ee=J._readableState;u("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&h(J,"data")&&(ee.flowing=!0,be(J))}}b.prototype.unpipe=function(J){var ee=this._readableState,ge={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return J&&J!==ee.pipes?this:(J||(J=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,J&&J.emit("unpipe",this,ge),this);if(!J){var te=ee.pipes,Y=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var z=0;z<Y;z++)te[z].emit("unpipe",this,ge);return this}var $=se(ee.pipes,J);return $===-1?this:(ee.pipes.splice($,1),ee.pipesCount-=1,ee.pipesCount===1&&(ee.pipes=ee.pipes[0]),J.emit("unpipe",this,ge),this)},b.prototype.on=function(J,ee){var ge=p.prototype.on.call(this,J,ee);if(J==="data")this._readableState.flowing!==!1&&this.resume();else if(J==="readable"){var te=this._readableState;!te.endEmitted&&!te.readableListening&&(te.readableListening=te.needReadable=!0,te.emittedReadable=!1,te.reading?te.length&&K(this):d.nextTick(ie,this))}return ge},b.prototype.addListener=b.prototype.on;function ie(J){u("readable nexttick read 0"),J.read(0)}b.prototype.resume=function(){var J=this._readableState;return J.flowing||(u("resume"),J.flowing=!0,ce(this,J)),this};function ce(J,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,d.nextTick(he,J,ee))}function he(J,ee){ee.reading||(u("resume read 0"),J.read(0)),ee.resumeScheduled=!1,ee.awaitDrain=0,J.emit("resume"),be(J),ee.flowing&&!ee.reading&&J.read(0)}b.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function be(J){var ee=J._readableState;for(u("flow",ee.flowing);ee.flowing&&J.read()!==null;);}b.prototype.wrap=function(J){var ee=this,ge=this._readableState,te=!1;J.on("end",function(){if(u("wrapped end"),ge.decoder&&!ge.ended){var $=ge.decoder.end();$&&$.length&&ee.push($)}ee.push(null)}),J.on("data",function($){if(u("wrapped data"),ge.decoder&&($=ge.decoder.write($)),ge.objectMode&&$==null)return;if(!ge.objectMode&&(!$||!$.length))return;var me=ee.push($);me||(te=!0,J.pause())});for(var Y in J)this[Y]===void 0&&typeof J[Y]=="function"&&(this[Y]=function($){return function(){return J[$].apply(J,arguments)}}(Y));for(var z=0;z<R.length;z++)J.on(R[z],this.emit.bind(this,R[z]));return this._read=function($){u("wrapped _read",$),te&&(te=!1,J.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=ne;function ne(J,ee){if(ee.length===0)return null;var ge;return ee.objectMode?ge=ee.buffer.shift():!J||J>=ee.length?(ee.decoder?ge=ee.buffer.join(""):ee.buffer.length===1?ge=ee.buffer.head.data:ge=ee.buffer.concat(ee.length),ee.buffer.clear()):ge=le(J,ee.buffer,ee.decoder),ge}function le(J,ee,ge){var te;return J<ee.head.data.length?(te=ee.head.data.slice(0,J),ee.head.data=ee.head.data.slice(J)):J===ee.head.data.length?te=ee.shift():te=ge?ue(J,ee):re(J,ee),te}function ue(J,ee){var ge=ee.head,te=1,Y=ge.data;for(J-=Y.length;ge=ge.next;){var z=ge.data,$=J>z.length?z.length:J;if($===z.length?Y+=z:Y+=z.slice(0,J),J-=$,J===0){$===z.length?(++te,ge.next?ee.head=ge.next:ee.head=ee.tail=null):(ee.head=ge,ge.data=z.slice($));break}++te}return ee.length-=te,Y}function re(J,ee){var ge=f.allocUnsafe(J),te=ee.head,Y=1;for(te.data.copy(ge),J-=te.data.length;te=te.next;){var z=te.data,$=J>z.length?z.length:J;if(z.copy(ge,ge.length-J,0,$),J-=$,J===0){$===z.length?(++Y,te.next?ee.head=te.next:ee.head=ee.tail=null):(ee.head=te,te.data=z.slice($));break}++Y}return ee.length-=Y,ge}function oe(J){var ee=J._readableState;if(ee.length>0)throw new Error('"endReadable()" called on non-empty stream');ee.endEmitted||(ee.ended=!0,d.nextTick(q,ee,J))}function q(J,ee){!J.endEmitted&&J.length===0&&(J.endEmitted=!0,ee.readable=!1,ee.emit("end"))}function se(J,ee){for(var ge=0,te=J.length;ge<te;ge++)if(J[ge]===ee)return ge;return-1}}).call(this,I("_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(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(i){return i&&i.__esModule?i:{default:i}}Z.exports=_;var L=I("./_stream_duplex"),S=(0,m.default)(I("core-util-is"));S.inherits=I("inherits"),S.inherits(_,L);function g(i,r){var h=this._transformState;h.transforming=!1;var p=h.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));h.writechunk=null,h.writecb=null,r!=null&&this.push(r),p(i);var f=this._readableState;f.reading=!1,(f.needReadable||f.length<f.highWaterMark)&&this._read(f.highWaterMark)}function _(i){if(!(this instanceof _))return new _(i);L.call(this,i),this._transformState={afterTransform:g.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,i&&(typeof i.transform=="function"&&(this._transform=i.transform),typeof i.flush=="function"&&(this._flush=i.flush)),this.on("prefinish",d)}function d(){var i=this;typeof this._flush=="function"?this._flush(function(r,h){o(i,r,h)}):o(this,null,null)}_.prototype.push=function(i,r){return this._transformState.needTransform=!1,L.prototype.push.call(this,i,r)},_.prototype._transform=function(i,r,h){throw new Error("_transform() is not implemented")},_.prototype._write=function(i,r,h){var p=this._transformState;if(p.writecb=h,p.writechunk=i,p.writeencoding=r,!p.transforming){var f=this._readableState;(p.needTransform||f.needReadable||f.length<f.highWaterMark)&&this._read(f.highWaterMark)}},_.prototype._read=function(i){var r=this._transformState;r.writechunk!==null&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0},_.prototype._destroy=function(i,r){var h=this;L.prototype._destroy.call(this,i,function(p){r(p),h.emit("close")})};function o(i,r,h){if(r)return i.emit("error",r);if(h!=null&&i.push(h),i._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(i._transformState.transforming)throw new Error("Calling transform done when still transforming");return i.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(I,Z,N){(function(P,m){"use strict";var T=I("babel-runtime/core-js/object/define-property"),L=p(T),S=I("babel-runtime/core-js/symbol/has-instance"),g=p(S),_=I("babel-runtime/core-js/symbol"),d=p(_),o=I("babel-runtime/core-js/object/create"),i=p(o),r=I("babel-runtime/core-js/set-immediate"),h=p(r);function p(re){return re&&re.__esModule?re:{default:re}}var f=I("process-nextick-args");Z.exports=F;function x(re,oe,q){this.chunk=re,this.encoding=oe,this.callback=q,this.next=null}function v(re){var oe=this;this.next=null,this.entry=null,this.finish=function(){ue(oe,re)}}var l=!P.browser&&["v0.10","v0.9."].indexOf(P.version.slice(0,5))>-1?h.default:f.nextTick,n;F.WritableState=E;var s=(0,i.default)(I("core-util-is"));s.inherits=I("inherits");var u={deprecate:I("util-deprecate")},w=I("./internal/streams/stream"),y=I("safe-buffer").Buffer,a=m.Uint8Array||function(){};function R(re){return y.from(re)}function D(re){return y.isBuffer(re)||re instanceof a}var c=I("./internal/streams/destroy");s.inherits(F,w);function b(){}function E(re,oe){n=n||I("./_stream_duplex"),re=re||{};var q=oe instanceof n;this.objectMode=!!re.objectMode,q&&(this.objectMode=this.objectMode||!!re.writableObjectMode);var se=re.highWaterMark,J=re.writableHighWaterMark,ee=this.objectMode?16:16*1024;se||se===0?this.highWaterMark=se:q&&(J||J===0)?this.highWaterMark=J:this.highWaterMark=ee,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 ge=re.decodeStrings===!1;this.decodeStrings=!ge,this.defaultEncoding=re.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(te){U(oe,te)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(this)}E.prototype.getBuffer=function(){for(var oe=this.bufferedRequest,q=[];oe;)q.push(oe),oe=oe.next;return q},function(){try{Object.defineProperty(E.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(re){}}();var C;typeof d.default=="function"&&g.default&&typeof Function.prototype[g.default]=="function"?(C=Function.prototype[g.default],(0,L.default)(F,g.default,{value:function(oe){return C.call(this,oe)?!0:this!==F?!1:oe&&oe._writableState instanceof E}})):C=function(oe){return oe instanceof this};function F(re){if(n=n||I("./_stream_duplex"),!C.call(F,this)&&!(this instanceof n))return new F(re);this._writableState=new E(re,this),this.writable=!0,re&&(typeof re.write=="function"&&(this._write=re.write),typeof re.writev=="function"&&(this._writev=re.writev),typeof re.destroy=="function"&&(this._destroy=re.destroy),typeof re.final=="function"&&(this._final=re.final)),w.call(this)}F.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j(re,oe){var q=new Error("write after end");re.emit("error",q),f.nextTick(oe,q)}function k(re,oe,q,se){var J=!0,ee=!1;return q===null?ee=new TypeError("May not write null values to stream"):typeof q!="string"&&q!==void 0&&!oe.objectMode&&(ee=new TypeError("Invalid non-string/buffer chunk")),ee&&(re.emit("error",ee),f.nextTick(se,ee),J=!1),J}F.prototype.write=function(re,oe,q){var se=this._writableState,J=!1,ee=!se.objectMode&&D(re);return ee&&!y.isBuffer(re)&&(re=R(re)),typeof oe=="function"&&(q=oe,oe=null),ee?oe="buffer":oe||(oe=se.defaultEncoding),typeof q!="function"&&(q=b),se.ended?j(this,q):(ee||k(this,se,re,q))&&(se.pendingcb++,J=G(this,se,ee,re,oe,q)),J},F.prototype.cork=function(){var re=this._writableState;re.corked++},F.prototype.uncork=function(){var re=this._writableState;re.corked&&(re.corked--,!re.writing&&!re.corked&&!re.finished&&!re.bufferProcessing&&re.bufferedRequest&&ie(this,re))},F.prototype.setDefaultEncoding=function(oe){if(typeof oe=="string"&&(oe=oe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((oe+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+oe);return this._writableState.defaultEncoding=oe,this};function X(re,oe,q){return!re.objectMode&&re.decodeStrings!==!1&&typeof oe=="string"&&(oe=y.from(oe,q)),oe}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(re,oe,q,se,J,ee){if(!q){var ge=X(oe,se,J);se!==ge&&(q=!0,J="buffer",se=ge)}var te=oe.objectMode?1:se.length;oe.length+=te;var Y=oe.length<oe.highWaterMark;if(Y||(oe.needDrain=!0),oe.writing||oe.corked){var z=oe.lastBufferedRequest;oe.lastBufferedRequest={chunk:se,encoding:J,isBuf:q,callback:ee,next:null},z?z.next=oe.lastBufferedRequest:oe.bufferedRequest=oe.lastBufferedRequest,oe.bufferedRequestCount+=1}else H(re,oe,!1,te,se,J,ee);return Y}function H(re,oe,q,se,J,ee,ge){oe.writelen=se,oe.writecb=ge,oe.writing=!0,oe.sync=!0,q?re._writev(J,oe.onwrite):re._write(J,ee,oe.onwrite),oe.sync=!1}function K(re,oe,q,se,J){--oe.pendingcb,q?(f.nextTick(J,se),f.nextTick(ne,re,oe),re._writableState.errorEmitted=!0,re.emit("error",se)):(J(se),re._writableState.errorEmitted=!0,re.emit("error",se),ne(re,oe))}function B(re){re.writing=!1,re.writecb=null,re.length-=re.writelen,re.writelen=0}function U(re,oe){var q=re._writableState,se=q.sync,J=q.writecb;if(B(q),oe)K(re,q,se,oe,J);else{var ee=ce(q);!ee&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&ie(re,q),se?l(W,re,q,ee,J):W(re,q,ee,J)}}function W(re,oe,q,se){q||Q(re,oe),oe.pendingcb--,se(),ne(re,oe)}function Q(re,oe){oe.length===0&&oe.needDrain&&(oe.needDrain=!1,re.emit("drain"))}function ie(re,oe){oe.bufferProcessing=!0;var q=oe.bufferedRequest;if(re._writev&&q&&q.next){var se=oe.bufferedRequestCount,J=new Array(se),ee=oe.corkedRequestsFree;ee.entry=q;for(var ge=0,te=!0;q;)J[ge]=q,q.isBuf||(te=!1),q=q.next,ge+=1;J.allBuffers=te,H(re,oe,!0,oe.length,J,"",ee.finish),oe.pendingcb++,oe.lastBufferedRequest=null,ee.next?(oe.corkedRequestsFree=ee.next,ee.next=null):oe.corkedRequestsFree=new v(oe),oe.bufferedRequestCount=0}else{for(;q;){var Y=q.chunk,z=q.encoding,$=q.callback,me=oe.objectMode?1:Y.length;if(H(re,oe,!1,me,Y,z,$),q=q.next,oe.bufferedRequestCount--,oe.writing)break}q===null&&(oe.lastBufferedRequest=null)}oe.bufferedRequest=q,oe.bufferProcessing=!1}F.prototype._write=function(re,oe,q){q(new Error("_write() is not implemented"))},F.prototype._writev=null,F.prototype.end=function(re,oe,q){var se=this._writableState;typeof re=="function"?(q=re,re=null,oe=null):typeof oe=="function"&&(q=oe,oe=null),re!=null&&this.write(re,oe),se.corked&&(se.corked=1,this.uncork()),!se.ending&&!se.finished&&le(this,se,q)};function ce(re){return re.ending&&re.length===0&&re.bufferedRequest===null&&!re.finished&&!re.writing}function he(re,oe){re._final(function(q){oe.pendingcb--,q&&re.emit("error",q),oe.prefinished=!0,re.emit("prefinish"),ne(re,oe)})}function be(re,oe){!oe.prefinished&&!oe.finalCalled&&(typeof re._final=="function"?(oe.pendingcb++,oe.finalCalled=!0,f.nextTick(he,re,oe)):(oe.prefinished=!0,re.emit("prefinish")))}function ne(re,oe){var q=ce(oe);return q&&(be(re,oe),oe.pendingcb===0&&(oe.finished=!0,re.emit("finish"))),q}function le(re,oe,q){oe.ending=!0,ne(re,oe),q&&(oe.finished?f.nextTick(q):re.once("finish",q)),oe.ended=!0,re.writable=!1}function ue(re,oe,q){var se=re.entry;for(re.entry=null;se;){var J=se.callback;oe.pendingcb--,J(q),se=se.next}oe.corkedRequestsFree?oe.corkedRequestsFree.next=re:oe.corkedRequestsFree=re}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(oe){if(!this._writableState)return;this._writableState.destroyed=oe}}),F.prototype.destroy=c.destroy,F.prototype._undestroy=c.undestroy,F.prototype._destroy=function(re,oe){this.end(),oe(re)}}).call(this,I("_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(I,Z,N){"use strict";function P(S,g){if(!(S instanceof g))throw new TypeError("Cannot call a class as a function")}var m=I("safe-buffer").Buffer,T=I("util");function L(S,g,_){S.copy(g,_)}Z.exports=function(){function S(){P(this,S),this.head=null,this.tail=null,this.length=0}return S.prototype.push=function(_){var d={data:_,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length},S.prototype.unshift=function(_){var d={data:_,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length},S.prototype.shift=function(){if(this.length===0)return;var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_},S.prototype.clear=function(){this.head=this.tail=null,this.length=0},S.prototype.join=function(_){if(this.length===0)return"";for(var d=this.head,o=""+d.data;d=d.next;)o+=_+d.data;return o},S.prototype.concat=function(_){if(this.length===0)return m.alloc(0);if(this.length===1)return this.head.data;for(var d=m.allocUnsafe(_>>>0),o=this.head,i=0;o;)L(o.data,d,i),i+=o.data.length,o=o.next;return d},S}(),T&&T.inspect&&T.inspect.custom&&(Z.exports.prototype[T.inspect.custom]=function(){var S=T.inspect({length:this.length});return this.constructor.name+" "+S})},{"safe-buffer":228,util:71}],220:[function(I,Z,N){"use strict";var P=I("process-nextick-args");function m(S,g){var _=this,d=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return d||o?(g?g(S):S&&(!this._writableState||!this._writableState.errorEmitted)&&P.nextTick(L,this,S),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(S||null,function(i){!g&&i?(P.nextTick(L,_,i),_._writableState&&(_._writableState.errorEmitted=!0)):g&&g(i)}),this)}function T(){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 L(S,g){S.emit("error",g)}Z.exports={destroy:m,undestroy:T}},{"process-nextick-args":207}],221:[function(I,Z,N){"use strict";Z.exports=I("events").EventEmitter},{events:192}],222:[function(I,Z,N){Z.exports=I("./readable").PassThrough},{"./readable":223}],223:[function(I,Z,N){N=Z.exports=I("./lib/_stream_readable.js"),N.Stream=N,N.Readable=N,N.Writable=I("./lib/_stream_writable.js"),N.Duplex=I("./lib/_stream_duplex.js"),N.Transform=I("./lib/_stream_transform.js"),N.PassThrough=I("./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(I,Z,N){Z.exports=I("./readable").Transform},{"./readable":223}],225:[function(I,Z,N){Z.exports=I("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(I,Z,N){var P=function(){return this}()||Function("return this")(),m=P.regeneratorRuntime&&Object.getOwnPropertyNames(P).indexOf("regeneratorRuntime")>=0,T=m&&P.regeneratorRuntime;if(P.regeneratorRuntime=void 0,Z.exports=I("./runtime"),m)P.regeneratorRuntime=T;else try{delete P.regeneratorRuntime}catch(L){P.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(I,Z,N){!function(P){"use strict";var m=Object.prototype,T=m.hasOwnProperty,L,S=typeof Symbol=="function"?Symbol:{},g=S.iterator||"@@iterator",_=S.asyncIterator||"@@asyncIterator",d=S.toStringTag||"@@toStringTag",o=typeof Z=="object",i=P.regeneratorRuntime;if(i){o&&(Z.exports=i);return}i=P.regeneratorRuntime=o?Z.exports:{};function r(G,H,K,B){var U=H&&H.prototype instanceof n?H:n,W=Object.create(U.prototype),Q=new j(B||[]);return W._invoke=b(G,K,Q),W}i.wrap=r;function h(G,H,K){try{return{type:"normal",arg:G.call(H,K)}}catch(B){return{type:"throw",arg:B}}}var p="suspendedStart",f="suspendedYield",x="executing",v="completed",l={};function n(){}function s(){}function u(){}var w={};w[g]=function(){return this};var y=Object.getPrototypeOf,a=y&&y(y(k([])));a&&a!==m&&T.call(a,g)&&(w=a);var R=u.prototype=n.prototype=Object.create(w);s.prototype=R.constructor=u,u.constructor=s,u[d]=s.displayName="GeneratorFunction";function D(G){["next","throw","return"].forEach(function(H){G[H]=function(K){return this._invoke(H,K)}})}i.isGeneratorFunction=function(G){var H=typeof G=="function"&&G.constructor;return H?H===s||(H.displayName||H.name)==="GeneratorFunction":!1},i.mark=function(G){return Object.setPrototypeOf?Object.setPrototypeOf(G,u):(G.__proto__=u,d in G||(G[d]="GeneratorFunction")),G.prototype=Object.create(R),G},i.awrap=function(G){return{__await:G}};function c(G){function H(U,W,Q,ie){var ce=h(G[U],G,W);if(ce.type==="throw")ie(ce.arg);else{var he=ce.arg,be=he.value;return be&&typeof be=="object"&&T.call(be,"__await")?Promise.resolve(be.__await).then(function(ne){H("next",ne,Q,ie)},function(ne){H("throw",ne,Q,ie)}):Promise.resolve(be).then(function(ne){he.value=ne,Q(he)},ie)}}var K;function B(U,W){function Q(){return new Promise(function(ie,ce){H(U,W,ie,ce)})}return K=K?K.then(Q,Q):Q()}this._invoke=B}D(c.prototype),c.prototype[_]=function(){return this},i.AsyncIterator=c,i.async=function(G,H,K,B){var U=new c(r(G,H,K,B));return i.isGeneratorFunction(H)?U:U.next().then(function(W){return W.done?W.value:U.next()})};function b(G,H,K){var B=p;return function(W,Q){if(B===x)throw new Error("Generator is already running");if(B===v){if(W==="throw")throw Q;return X()}for(K.method=W,K.arg=Q;;){var ie=K.delegate;if(ie){var ce=E(ie,K);if(ce){if(ce===l)continue;return ce}}if(K.method==="next")K.sent=K._sent=K.arg;else if(K.method==="throw"){if(B===p)throw B=v,K.arg;K.dispatchException(K.arg)}else K.method==="return"&&K.abrupt("return",K.arg);B=x;var he=h(G,H,K);if(he.type==="normal"){if(B=K.done?v:f,he.arg===l)continue;return{value:he.arg,done:K.done}}else he.type==="throw"&&(B=v,K.method="throw",K.arg=he.arg)}}}function E(G,H){var K=G.iterator[H.method];if(K===L){if(H.delegate=null,H.method==="throw"){if(G.iterator.return&&(H.method="return",H.arg=L,E(G,H),H.method==="throw"))return l;H.method="throw",H.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var B=h(K,G.iterator,H.arg);if(B.type==="throw")return H.method="throw",H.arg=B.arg,H.delegate=null,l;var U=B.arg;if(!U)return H.method="throw",H.arg=new TypeError("iterator result is not an object"),H.delegate=null,l;if(U.done)H[G.resultName]=U.value,H.next=G.nextLoc,H.method!=="return"&&(H.method="next",H.arg=L);else return U;return H.delegate=null,l}D(R),R[d]="Generator",R[g]=function(){return this},R.toString=function(){return"[object Generator]"};function C(G){var H={tryLoc:G[0]};1 in G&&(H.catchLoc=G[1]),2 in G&&(H.finallyLoc=G[2],H.afterLoc=G[3]),this.tryEntries.push(H)}function F(G){var H=G.completion||{};H.type="normal",delete H.arg,G.completion=H}function j(G){this.tryEntries=[{tryLoc:"root"}],G.forEach(C,this),this.reset(!0)}i.keys=function(G){var H=[];for(var K in G)H.push(K);return H.reverse(),function B(){for(;H.length;){var U=H.pop();if(U in G)return B.value=U,B.done=!1,B}return B.done=!0,B}};function k(G){if(G){var H=G[g];if(H)return H.call(G);if(typeof G.next=="function")return G;if(!isNaN(G.length)){var K=-1,B=function U(){for(;++K<G.length;)if(T.call(G,K))return U.value=G[K],U.done=!1,U;return U.value=L,U.done=!0,U};return B.next=B}}return{next:X}}i.values=k;function X(){return{value:L,done:!0}}j.prototype={constructor:j,reset:function(G){if(this.prev=0,this.next=0,this.sent=this._sent=L,this.done=!1,this.delegate=null,this.method="next",this.arg=L,this.tryEntries.forEach(F),!G)for(var H in this)H.charAt(0)==="t"&&T.call(this,H)&&!isNaN(+H.slice(1))&&(this[H]=L)},stop:function(){this.done=!0;var G=this.tryEntries[0],H=G.completion;if(H.type==="throw")throw H.arg;return this.rval},dispatchException:function(G){if(this.done)throw G;var H=this;function K(ce,he){return W.type="throw",W.arg=G,H.next=ce,he&&(H.method="next",H.arg=L),!!he}for(var B=this.tryEntries.length-1;B>=0;--B){var U=this.tryEntries[B],W=U.completion;if(U.tryLoc==="root")return K("end");if(U.tryLoc<=this.prev){var Q=T.call(U,"catchLoc"),ie=T.call(U,"finallyLoc");if(Q&&ie){if(this.prev<U.catchLoc)return K(U.catchLoc,!0);if(this.prev<U.finallyLoc)return K(U.finallyLoc)}else if(Q){if(this.prev<U.catchLoc)return K(U.catchLoc,!0)}else if(ie){if(this.prev<U.finallyLoc)return K(U.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(G,H){for(var K=this.tryEntries.length-1;K>=0;--K){var B=this.tryEntries[K];if(B.tryLoc<=this.prev&&T.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var U=B;break}}U&&(G==="break"||G==="continue")&&U.tryLoc<=H&&H<=U.finallyLoc&&(U=null);var W=U?U.completion:{};return W.type=G,W.arg=H,U?(this.method="next",this.next=U.finallyLoc,l):this.complete(W)},complete:function(G,H){if(G.type==="throw")throw G.arg;return G.type==="break"||G.type==="continue"?this.next=G.arg:G.type==="return"?(this.rval=this.arg=G.arg,this.method="return",this.next="end"):G.type==="normal"&&H&&(this.next=H),l},finish:function(G){for(var H=this.tryEntries.length-1;H>=0;--H){var K=this.tryEntries[H];if(K.finallyLoc===G)return this.complete(K.completion,K.afterLoc),F(K),l}},catch:function(G){for(var H=this.tryEntries.length-1;H>=0;--H){var K=this.tryEntries[H];if(K.tryLoc===G){var B=K.completion;if(B.type==="throw"){var U=B.arg;F(K)}return U}}throw new Error("illegal catch attempt")},delegateYield:function(G,H,K){return this.delegate={iterator:k(G),resultName:H,nextLoc:K},this.method==="next"&&(this.arg=L),l}}}(function(){return this}()||Function("return this")())},{}],228:[function(I,Z,N){var P=I("buffer"),m=P.Buffer;function T(S,g){for(var _ in S)g[_]=S[_]}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?Z.exports=P:(T(P,N),N.Buffer=L);function L(S,g,_){return m(S,g,_)}T(m,L),L.from=function(S,g,_){if(typeof S=="number")throw new TypeError("Argument must not be a number");return m(S,g,_)},L.alloc=function(S,g,_){if(typeof S!="number")throw new TypeError("Argument must be a number");var d=m(S);return g!==void 0?typeof _=="string"?d.fill(g,_):d.fill(g):d.fill(0),d},L.allocUnsafe=function(S){if(typeof S!="number")throw new TypeError("Argument must be a number");return m(S)},L.allocUnsafeSlow=function(S){if(typeof S!="number")throw new TypeError("Argument must be a number");return P.SlowBuffer(S)}},{buffer:73}],229:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/core-js/string/from-code-point"),T=f(m),L=I("babel-runtime/core-js/json/stringify"),S=f(L),g=I("babel-runtime/helpers/typeof"),_=f(g),d=I("babel-runtime/core-js/object/define-property"),o=f(d),i=I("babel-runtime/core-js/object/keys"),r=f(i),h=I("babel-runtime/core-js/object/create"),p=f(h);function f(x){return x&&x.__esModule?x:{default:x}}(function(x){x.parser=function(z,$){return new l(z,$)},x.SAXParser=l,x.SAXStream=R,x.createStream=a,x.MAX_BUFFER_LENGTH=64*1024;var v=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];x.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function l(z,$){if(!(this instanceof l))return new l(z,$);var me=this;s(me),me.q=me.c="",me.bufferCheckPosition=x.MAX_BUFFER_LENGTH,me.opt=$||{},me.opt.lowercase=me.opt.lowercase||me.opt.lowercasetags,me.looseCase=me.opt.lowercase?"toLowerCase":"toUpperCase",me.tags=[],me.closed=me.closedRoot=me.sawRoot=!1,me.tag=me.error=null,me.strict=!!z,me.noscript=!!(z||me.opt.noscript),me.state=W.BEGIN,me.strictEntities=me.opt.strictEntities,me.ENTITIES=me.strictEntities?(0,p.default)(x.XML_ENTITIES):(0,p.default)(x.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,p.default)(C)),me.trackPosition=me.opt.position!==!1,me.trackPosition&&(me.position=me.line=me.column=0),ie(me,"onready")}p.default||(Object.create=function(z){function $(){}$.prototype=z;var me=new $;return me}),r.default||(Object.keys=function(z){var $=[];for(var me in z)z.hasOwnProperty(me)&&$.push(me);return $});function n(z){for(var $=Math.max(x.MAX_BUFFER_LENGTH,10),me=0,pe=0,xe=v.length;pe<xe;pe++){var Re=z[v[pe]].length;if(Re>$)switch(v[pe]){case"textNode":he(z);break;case"cdata":ce(z,"oncdata",z.cdata),z.cdata="";break;case"script":ce(z,"onscript",z.script),z.script="";break;default:ne(z,"Max buffer length exceeded: "+v[pe])}me=Math.max(me,Re)}var ke=x.MAX_BUFFER_LENGTH-me;z.bufferCheckPosition=ke+z.position}function s(z){for(var $=0,me=v.length;$<me;$++)z[v[$]]=""}function u(z){he(z),z.cdata!==""&&(ce(z,"oncdata",z.cdata),z.cdata=""),z.script!==""&&(ce(z,"onscript",z.script),z.script="")}l.prototype={end:function(){le(this)},write:Y,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){u(this)}};var w;try{w=I("stream").Stream}catch(z){w=function(){}}var y=x.EVENTS.filter(function(z){return z!=="error"&&z!=="end"});function a(z,$){return new R(z,$)}function R(z,$){if(!(this instanceof R))return new R(z,$);w.apply(this),this._parser=new l(z,$),this.writable=!0,this.readable=!0;var me=this;this._parser.onend=function(){me.emit("end")},this._parser.onerror=function(pe){me.emit("error",pe),me._parser.error=null},this._decoder=null,y.forEach(function(pe){(0,o.default)(me,"on"+pe,{get:function(){return me._parser["on"+pe]},set:function(Re){if(!Re)return me.removeAllListeners(pe),me._parser["on"+pe]=Re,Re;me.on(pe,Re)},enumerable:!0,configurable:!1})})}R.prototype=(0,p.default)(w.prototype,{constructor:{value:R}}),R.prototype.write=function(z){if(typeof P=="function"&&typeof P.isBuffer=="function"&&P.isBuffer(z)){if(!this._decoder){var $=I("string_decoder").StringDecoder;this._decoder=new $("utf8")}z=this._decoder.write(z)}return this._parser.write(z.toString()),this.emit("data",z),!0},R.prototype.end=function(z){return z&&z.length&&this.write(z),this._parser.end(),!0},R.prototype.on=function(z,$){var me=this;return!me._parser["on"+z]&&y.indexOf(z)!==-1&&(me._parser["on"+z]=function(){var pe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);pe.splice(0,0,z),me.emit.apply(me,pe)}),w.prototype.on.call(me,z,$)};var D="[CDATA[",c="DOCTYPE",b="http://www.w3.org/XML/1998/namespace",E="http://www.w3.org/2000/xmlns/",C={xml:b,xmlns:E},F=/[:_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-]/,k=/[#:_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]/,X=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function G(z){return z===" "||z===`
`||z==="\r"||z===" "}function H(z){return z==='"'||z==="'"}function K(z){return z===">"||G(z)}function B(z,$){return z.test($)}function U(z,$){return!B(z,$)}var W=0;x.STATE={BEGIN:W++,BEGIN_WHITESPACE:W++,TEXT:W++,TEXT_ENTITY:W++,OPEN_WAKA:W++,SGML_DECL:W++,SGML_DECL_QUOTED:W++,DOCTYPE:W++,DOCTYPE_QUOTED:W++,DOCTYPE_DTD:W++,DOCTYPE_DTD_QUOTED:W++,COMMENT_STARTING:W++,COMMENT:W++,COMMENT_ENDING:W++,COMMENT_ENDED:W++,CDATA:W++,CDATA_ENDING:W++,CDATA_ENDING_2:W++,PROC_INST:W++,PROC_INST_BODY:W++,PROC_INST_ENDING:W++,OPEN_TAG:W++,OPEN_TAG_SLASH:W++,ATTRIB:W++,ATTRIB_NAME:W++,ATTRIB_NAME_SAW_WHITE:W++,ATTRIB_VALUE:W++,ATTRIB_VALUE_QUOTED:W++,ATTRIB_VALUE_CLOSED:W++,ATTRIB_VALUE_UNQUOTED:W++,ATTRIB_VALUE_ENTITY_Q:W++,ATTRIB_VALUE_ENTITY_U:W++,CLOSE_TAG:W++,CLOSE_TAG_SAW_WHITE:W++,SCRIPT:W++,SCRIPT_ENDING:W++},x.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},x.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)(x.ENTITIES).forEach(function(z){var $=x.ENTITIES[z],me=typeof $=="number"?String.fromCharCode($):$;x.ENTITIES[z]=me});for(var Q in x.STATE)x.STATE[x.STATE[Q]]=Q;W=x.STATE;function ie(z,$,me){z[$]&&z[$](me)}function ce(z,$,me){z.textNode&&he(z),ie(z,$,me)}function he(z){z.textNode=be(z.opt,z.textNode),z.textNode&&ie(z,"ontext",z.textNode),z.textNode=""}function be(z,$){return z.trim&&($=$.trim()),z.normalize&&($=$.replace(/\s+/g," ")),$}function ne(z,$){return he(z),z.trackPosition&&($+=`
Line: `+z.line+`
Column: `+z.column+`
Char: `+z.c),$=new Error($),z.error=$,ie(z,"onerror",$),z}function le(z){return z.sawRoot&&!z.closedRoot&&ue(z,"Unclosed root tag"),z.state!==W.BEGIN&&z.state!==W.BEGIN_WHITESPACE&&z.state!==W.TEXT&&ne(z,"Unexpected end"),he(z),z.c="",z.closed=!0,ie(z,"onend"),l.call(z,z.strict,z.opt),z}function ue(z,$){if((typeof z=="undefined"?"undefined":(0,_.default)(z))!=="object"||!(z instanceof l))throw new Error("bad call to strictFail");z.strict&&ne(z,$)}function re(z){z.strict||(z.tagName=z.tagName[z.looseCase]());var $=z.tags[z.tags.length-1]||z,me=z.tag={name:z.tagName,attributes:{}};z.opt.xmlns&&(me.ns=$.ns),z.attribList.length=0,ce(z,"onopentagstart",me)}function oe(z,$){var me=z.indexOf(":"),pe=me<0?["",z]:z.split(":"),xe=pe[0],Re=pe[1];return $&&z==="xmlns"&&(xe="xmlns",Re=""),{prefix:xe,local:Re}}function q(z){if(z.strict||(z.attribName=z.attribName[z.looseCase]()),z.attribList.indexOf(z.attribName)!==-1||z.tag.attributes.hasOwnProperty(z.attribName)){z.attribName=z.attribValue="";return}if(z.opt.xmlns){var $=oe(z.attribName,!0),me=$.prefix,pe=$.local;if(me==="xmlns")if(pe==="xml"&&z.attribValue!==b)ue(z,"xml: prefix must be bound to "+b+`
Actual: `+z.attribValue);else if(pe==="xmlns"&&z.attribValue!==E)ue(z,"xmlns: prefix must be bound to "+E+`
Actual: `+z.attribValue);else{var xe=z.tag,Re=z.tags[z.tags.length-1]||z;xe.ns===Re.ns&&(xe.ns=(0,p.default)(Re.ns)),xe.ns[pe]=z.attribValue}z.attribList.push([z.attribName,z.attribValue])}else z.tag.attributes[z.attribName]=z.attribValue,ce(z,"onattribute",{name:z.attribName,value:z.attribValue});z.attribName=z.attribValue=""}function se(z,$){if(z.opt.xmlns){var me=z.tag,pe=oe(z.tagName);me.prefix=pe.prefix,me.local=pe.local,me.uri=me.ns[pe.prefix]||"",me.prefix&&!me.uri&&(ue(z,"Unbound namespace prefix: "+(0,S.default)(z.tagName)),me.uri=pe.prefix);var xe=z.tags[z.tags.length-1]||z;me.ns&&xe.ns!==me.ns&&(0,r.default)(me.ns).forEach(function(Ie){ce(z,"onopennamespace",{prefix:Ie,uri:me.ns[Ie]})});for(var Re=0,ke=z.attribList.length;Re<ke;Re++){var Me=z.attribList[Re],Pe=Me[0],je=Me[1],Fe=oe(Pe,!0),We=Fe.prefix,Se=Fe.local,Xe=We===""?"":me.ns[We]||"",Ye={name:Pe,value:je,prefix:We,local:Se,uri:Xe};We&&We!=="xmlns"&&!Xe&&(ue(z,"Unbound namespace prefix: "+(0,S.default)(We)),Ye.uri=We),z.tag.attributes[Pe]=Ye,ce(z,"onattribute",Ye)}z.attribList.length=0}z.tag.isSelfClosing=!!$,z.sawRoot=!0,z.tags.push(z.tag),ce(z,"onopentag",z.tag),$||(!z.noscript&&z.tagName.toLowerCase()==="script"?z.state=W.SCRIPT:z.state=W.TEXT,z.tag=null,z.tagName=""),z.attribName=z.attribValue="",z.attribList.length=0}function J(z){if(!z.tagName){ue(z,"Weird empty close tag."),z.textNode+="</>",z.state=W.TEXT;return}if(z.script){if(z.tagName!=="script"){z.script+="</"+z.tagName+">",z.tagName="",z.state=W.SCRIPT;return}ce(z,"onscript",z.script),z.script=""}var $=z.tags.length,me=z.tagName;z.strict||(me=me[z.looseCase]());for(var pe=me;$--;){var xe=z.tags[$];if(xe.name!==pe)ue(z,"Unexpected close tag");else break}if($<0){ue(z,"Unmatched closing tag: "+z.tagName),z.textNode+="</"+z.tagName+">",z.state=W.TEXT;return}z.tagName=me;for(var Re=z.tags.length;Re-- >$;){var ke=z.tag=z.tags.pop();z.tagName=z.tag.name,ce(z,"onclosetag",z.tagName);var Me={};for(var Pe in ke.ns)Me[Pe]=ke.ns[Pe];var je=z.tags[z.tags.length-1]||z;z.opt.xmlns&&ke.ns!==je.ns&&(0,r.default)(ke.ns).forEach(function(Fe){var We=ke.ns[Fe];ce(z,"onclosenamespace",{prefix:Fe,uri:We})})}$===0&&(z.closedRoot=!0),z.tagName=z.attribValue=z.attribName="",z.attribList.length=0,z.state=W.TEXT}function ee(z){var $=z.entity,me=$.toLowerCase(),pe,xe="";return z.ENTITIES[$]?z.ENTITIES[$]:z.ENTITIES[me]?z.ENTITIES[me]:($=me,$.charAt(0)==="#"&&($.charAt(1)==="x"?($=$.slice(2),pe=parseInt($,16),xe=pe.toString(16)):($=$.slice(1),pe=parseInt($,10),xe=pe.toString(10))),$=$.replace(/^0+/,""),isNaN(pe)||xe.toLowerCase()!==$?(ue(z,"Invalid character entity"),"&"+z.entity+";"):(0,T.default)(pe))}function ge(z,$){$==="<"?(z.state=W.OPEN_WAKA,z.startTagPosition=z.position):G($)||(ue(z,"Non-whitespace before first tag."),z.textNode=$,z.state=W.TEXT)}function te(z,$){var me="";return $<z.length&&(me=z.charAt($)),me}function Y(z){var $=this;if(this.error)throw this.error;if($.closed)return ne($,"Cannot write after close. Assign an onready handler.");if(z===null)return le($);(typeof z=="undefined"?"undefined":(0,_.default)(z))==="object"&&(z=z.toString());for(var me=0,pe="";!(pe=te(z,me++),$.c=pe,!pe);){$.trackPosition&&($.position++,pe===`
`?($.line++,$.column=0):$.column++);switch($.state){case W.BEGIN:if($.state=W.BEGIN_WHITESPACE,pe==="\uFEFF")continue;ge($,pe);continue;case W.BEGIN_WHITESPACE:ge($,pe);continue;case W.TEXT:if($.sawRoot&&!$.closedRoot){for(var xe=me-1;pe&&pe!=="<"&&pe!=="&";)pe=te(z,me++),pe&&$.trackPosition&&($.position++,pe===`
`?($.line++,$.column=0):$.column++);$.textNode+=z.substring(xe,me-1)}pe==="<"&&!($.sawRoot&&$.closedRoot&&!$.strict)?($.state=W.OPEN_WAKA,$.startTagPosition=$.position):(!G(pe)&&(!$.sawRoot||$.closedRoot)&&ue($,"Text data outside of root node."),pe==="&"?$.state=W.TEXT_ENTITY:$.textNode+=pe);continue;case W.SCRIPT:pe==="<"?$.state=W.SCRIPT_ENDING:$.script+=pe;continue;case W.SCRIPT_ENDING:pe==="/"?$.state=W.CLOSE_TAG:($.script+="<"+pe,$.state=W.SCRIPT);continue;case W.OPEN_WAKA:if(pe==="!")$.state=W.SGML_DECL,$.sgmlDecl="";else if(!G(pe))if(B(F,pe))$.state=W.OPEN_TAG,$.tagName=pe;else if(pe==="/")$.state=W.CLOSE_TAG,$.tagName="";else if(pe==="?")$.state=W.PROC_INST,$.procInstName=$.procInstBody="";else{if(ue($,"Unencoded <"),$.startTagPosition+1<$.position){var Re=$.position-$.startTagPosition;pe=new Array(Re).join(" ")+pe}$.textNode+="<"+pe,$.state=W.TEXT}continue;case W.SGML_DECL:($.sgmlDecl+pe).toUpperCase()===D?(ce($,"onopencdata"),$.state=W.CDATA,$.sgmlDecl="",$.cdata=""):$.sgmlDecl+pe==="--"?($.state=W.COMMENT,$.comment="",$.sgmlDecl=""):($.sgmlDecl+pe).toUpperCase()===c?($.state=W.DOCTYPE,($.doctype||$.sawRoot)&&ue($,"Inappropriately located doctype declaration"),$.doctype="",$.sgmlDecl=""):pe===">"?(ce($,"onsgmldeclaration",$.sgmlDecl),$.sgmlDecl="",$.state=W.TEXT):(H(pe)&&($.state=W.SGML_DECL_QUOTED),$.sgmlDecl+=pe);continue;case W.SGML_DECL_QUOTED:pe===$.q&&($.state=W.SGML_DECL,$.q=""),$.sgmlDecl+=pe;continue;case W.DOCTYPE:pe===">"?($.state=W.TEXT,ce($,"ondoctype",$.doctype),$.doctype=!0):($.doctype+=pe,pe==="["?$.state=W.DOCTYPE_DTD:H(pe)&&($.state=W.DOCTYPE_QUOTED,$.q=pe));continue;case W.DOCTYPE_QUOTED:$.doctype+=pe,pe===$.q&&($.q="",$.state=W.DOCTYPE);continue;case W.DOCTYPE_DTD:$.doctype+=pe,pe==="]"?$.state=W.DOCTYPE:H(pe)&&($.state=W.DOCTYPE_DTD_QUOTED,$.q=pe);continue;case W.DOCTYPE_DTD_QUOTED:$.doctype+=pe,pe===$.q&&($.state=W.DOCTYPE_DTD,$.q="");continue;case W.COMMENT:pe==="-"?$.state=W.COMMENT_ENDING:$.comment+=pe;continue;case W.COMMENT_ENDING:pe==="-"?($.state=W.COMMENT_ENDED,$.comment=be($.opt,$.comment),$.comment&&ce($,"oncomment",$.comment),$.comment=""):($.comment+="-"+pe,$.state=W.COMMENT);continue;case W.COMMENT_ENDED:pe!==">"?(ue($,"Malformed comment"),$.comment+="--"+pe,$.state=W.COMMENT):$.state=W.TEXT;continue;case W.CDATA:pe==="]"?$.state=W.CDATA_ENDING:$.cdata+=pe;continue;case W.CDATA_ENDING:pe==="]"?$.state=W.CDATA_ENDING_2:($.cdata+="]"+pe,$.state=W.CDATA);continue;case W.CDATA_ENDING_2:pe===">"?($.cdata&&ce($,"oncdata",$.cdata),ce($,"onclosecdata"),$.cdata="",$.state=W.TEXT):pe==="]"?$.cdata+="]":($.cdata+="]]"+pe,$.state=W.CDATA);continue;case W.PROC_INST:pe==="?"?$.state=W.PROC_INST_ENDING:G(pe)?$.state=W.PROC_INST_BODY:$.procInstName+=pe;continue;case W.PROC_INST_BODY:if(!$.procInstBody&&G(pe))continue;pe==="?"?$.state=W.PROC_INST_ENDING:$.procInstBody+=pe;continue;case W.PROC_INST_ENDING:pe===">"?(ce($,"onprocessinginstruction",{name:$.procInstName,body:$.procInstBody}),$.procInstName=$.procInstBody="",$.state=W.TEXT):($.procInstBody+="?"+pe,$.state=W.PROC_INST_BODY);continue;case W.OPEN_TAG:B(j,pe)?$.tagName+=pe:(re($),pe===">"?se($):pe==="/"?$.state=W.OPEN_TAG_SLASH:(G(pe)||ue($,"Invalid character in tag name"),$.state=W.ATTRIB));continue;case W.OPEN_TAG_SLASH:pe===">"?(se($,!0),J($)):(ue($,"Forward-slash in opening tag not followed by >"),$.state=W.ATTRIB);continue;case W.ATTRIB:if(G(pe))continue;pe===">"?se($):pe==="/"?$.state=W.OPEN_TAG_SLASH:B(F,pe)?($.attribName=pe,$.attribValue="",$.state=W.ATTRIB_NAME):ue($,"Invalid attribute name");continue;case W.ATTRIB_NAME:pe==="="?$.state=W.ATTRIB_VALUE:pe===">"?(ue($,"Attribute without value"),$.attribValue=$.attribName,q($),se($)):G(pe)?$.state=W.ATTRIB_NAME_SAW_WHITE:B(j,pe)?$.attribName+=pe:ue($,"Invalid attribute name");continue;case W.ATTRIB_NAME_SAW_WHITE:if(pe==="=")$.state=W.ATTRIB_VALUE;else{if(G(pe))continue;ue($,"Attribute without value"),$.tag.attributes[$.attribName]="",$.attribValue="",ce($,"onattribute",{name:$.attribName,value:""}),$.attribName="",pe===">"?se($):B(F,pe)?($.attribName=pe,$.state=W.ATTRIB_NAME):(ue($,"Invalid attribute name"),$.state=W.ATTRIB)}continue;case W.ATTRIB_VALUE:if(G(pe))continue;H(pe)?($.q=pe,$.state=W.ATTRIB_VALUE_QUOTED):(ue($,"Unquoted attribute value"),$.state=W.ATTRIB_VALUE_UNQUOTED,$.attribValue=pe);continue;case W.ATTRIB_VALUE_QUOTED:if(pe!==$.q){pe==="&"?$.state=W.ATTRIB_VALUE_ENTITY_Q:$.attribValue+=pe;continue}q($),$.q="",$.state=W.ATTRIB_VALUE_CLOSED;continue;case W.ATTRIB_VALUE_CLOSED:G(pe)?$.state=W.ATTRIB:pe===">"?se($):pe==="/"?$.state=W.OPEN_TAG_SLASH:B(F,pe)?(ue($,"No whitespace between attributes"),$.attribName=pe,$.attribValue="",$.state=W.ATTRIB_NAME):ue($,"Invalid attribute name");continue;case W.ATTRIB_VALUE_UNQUOTED:if(!K(pe)){pe==="&"?$.state=W.ATTRIB_VALUE_ENTITY_U:$.attribValue+=pe;continue}q($),pe===">"?se($):$.state=W.ATTRIB;continue;case W.CLOSE_TAG:if($.tagName)pe===">"?J($):B(j,pe)?$.tagName+=pe:$.script?($.script+="</"+$.tagName,$.tagName="",$.state=W.SCRIPT):(G(pe)||ue($,"Invalid tagname in closing tag"),$.state=W.CLOSE_TAG_SAW_WHITE);else{if(G(pe))continue;U(F,pe)?$.script?($.script+="</"+pe,$.state=W.SCRIPT):ue($,"Invalid tagname in closing tag."):$.tagName=pe}continue;case W.CLOSE_TAG_SAW_WHITE:if(G(pe))continue;pe===">"?J($):ue($,"Invalid characters in closing tag");continue;case W.TEXT_ENTITY:case W.ATTRIB_VALUE_ENTITY_Q:case W.ATTRIB_VALUE_ENTITY_U:var ke,Me;switch($.state){case W.TEXT_ENTITY:ke=W.TEXT,Me="textNode";break;case W.ATTRIB_VALUE_ENTITY_Q:ke=W.ATTRIB_VALUE_QUOTED,Me="attribValue";break;case W.ATTRIB_VALUE_ENTITY_U:ke=W.ATTRIB_VALUE_UNQUOTED,Me="attribValue";break}pe===";"?($[Me]+=ee($),$.entity="",$.state=ke):B($.entity.length?X:k,pe)?$.entity+=pe:(ue($,"Invalid character in entity name"),$[Me]+="&"+$.entity+pe,$.entity="",$.state=ke);continue;default:throw new Error($,"Unknown state: "+$.state)}}return $.position>=$.bufferCheckPosition&&n($),$}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */T.default||function(){var z=String.fromCharCode,$=Math.floor,me=function(){var xe=16384,Re=[],ke,Me,Pe=-1,je=arguments.length;if(!je)return"";for(var Fe="";++Pe<je;){var We=Number(arguments[Pe]);if(!isFinite(We)||We<0||We>1114111||$(We)!==We)throw RangeError("Invalid code point: "+We);We<=65535?Re.push(We):(We-=65536,ke=(We>>10)+55296,Me=We%1024+56320,Re.push(ke,Me)),(Pe+1===je||Re.length>xe)&&(Fe+=z.apply(null,Re),Re.length=0)}return Fe};o.default?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me}()})(typeof N=="undefined"?(void 0).sax={}:N)}).call(this,I("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(I,Z,N){Z.exports=T;var P=I("events").EventEmitter,m=I("inherits");m(T,P),T.Readable=I("readable-stream/readable.js"),T.Writable=I("readable-stream/writable.js"),T.Duplex=I("readable-stream/duplex.js"),T.Transform=I("readable-stream/transform.js"),T.PassThrough=I("readable-stream/passthrough.js"),T.Stream=T;function T(){P.call(this)}T.prototype.pipe=function(L,S){var g=this;function _(f){L.writable&&(L.write(f)===!1&&g.pause&&g.pause())}g.on("data",_);function d(){g.readable&&g.resume&&g.resume()}L.on("drain",d),!L._isStdio&&(!S||S.end!==!1)&&(g.on("end",i),g.on("close",r));var o=!1;function i(){if(o)return;o=!0,L.end()}function r(){if(o)return;o=!0,typeof L.destroy=="function"&&L.destroy()}function h(f){if(p(),P.listenerCount(this,"error")===0)throw f}g.on("error",h),L.on("error",h);function p(){g.removeListener("data",_),L.removeListener("drain",d),g.removeListener("end",i),g.removeListener("close",r),g.removeListener("error",h),L.removeListener("error",h),g.removeListener("end",p),g.removeListener("close",p),L.removeListener("close",p)}return g.on("end",p),g.on("close",p),L.on("close",p),L.emit("pipe",g),L}},{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(I,Z,N){(function(P){var m=I("./lib/request"),T=I("./lib/response"),L=I("xtend"),S=I("builtin-status-codes"),g=I("url"),_=N;_.request=function(d,o){typeof d=="string"?d=g.parse(d):d=L(d);var i=P.location.protocol.search(/^https?:$/)===-1?"http:":"",r=d.protocol||i,h=d.hostname||d.host,p=d.port,f=d.path||"/";h&&h.indexOf(":")!==-1&&(h="["+h+"]"),d.url=(h?r+"//"+h:"")+(p?":"+p:"")+f,d.method=(d.method||"GET").toUpperCase(),d.headers=d.headers||{};var x=new m(d);return o&&x.on("response",o),x},_.get=function(o,i){var r=_.request(o,i);return r.end(),r},_.ClientRequest=m,_.IncomingMessage=T.IncomingMessage,_.Agent=function(){},_.Agent.defaultMaxSockets=4,_.globalAgent=new _.Agent,_.STATUS_CODES=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(I,Z,N){(function(P){"use strict";N.fetch=_(P.fetch)&&_(P.ReadableStream),N.writableStream=_(P.WritableStream),N.abortController=_(P.AbortController),N.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),N.blobConstructor=!0}catch(d){}var m;function T(){if(m!==void 0)return m;if(P.XMLHttpRequest){m=new P.XMLHttpRequest;try{m.open("GET",P.XDomainRequest?"/":"https://example.com")}catch(d){m=null}}else m=null;return m}function L(d){var o=T();if(!o)return!1;try{return o.responseType=d,o.responseType===d}catch(i){}return!1}var S=typeof P.ArrayBuffer!="undefined",g=S&&_(P.ArrayBuffer.prototype.slice);N.arraybuffer=N.fetch||S&&L("arraybuffer"),N.msstream=!N.fetch&&g&&L("ms-stream"),N.mozchunkedarraybuffer=!N.fetch&&S&&L("moz-chunked-arraybuffer"),N.overrideMimeType=N.fetch||(T()?_(T().overrideMimeType):!1),N.vbArray=_(P.VBArray);function _(d){return typeof d=="function"}m=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(I,Z,N){(function(P,m,T){"use strict";var L=I("babel-runtime/core-js/object/keys"),S=g(L);function g(n){return n&&n.__esModule?n:{default:n}}var _=I("./capability"),d=I("inherits"),o=I("./response"),i=I("readable-stream"),r=I("to-arraybuffer"),h=o.IncomingMessage,p=o.readyStates;function f(n,s){return _.fetch&&s?"fetch":_.mozchunkedarraybuffer?"moz-chunked-arraybuffer":_.msstream?"ms-stream":_.arraybuffer&&n?"arraybuffer":_.vbArray&&n?"text:vbarray":"text"}var x=Z.exports=function(n){var s=this;i.Writable.call(s),s._opts=n,s._body=[],s._headers={},n.auth&&s.setHeader("Authorization","Basic "+new T(n.auth).toString("base64")),(0,S.default)(n.headers).forEach(function(y){s.setHeader(y,n.headers[y])});var u,w=!0;if(n.mode==="disable-fetch"||"requestTimeout"in n&&!_.abortController)w=!1,u=!0;else if(n.mode==="prefer-streaming")u=!1;else if(n.mode==="allow-wrong-content-type")u=!_.overrideMimeType;else if(!n.mode||n.mode==="default"||n.mode==="prefer-fast")u=!0;else throw new Error("Invalid value for opts.mode");s._mode=f(u,w),s._fetchTimer=null,s.on("finish",function(){s._onFinish()})};d(x,i.Writable),x.prototype.setHeader=function(n,s){var u=this,w=n.toLowerCase();if(l.indexOf(w)!==-1)return;u._headers[w]={name:n,value:s}},x.prototype.getHeader=function(n){var s=this._headers[n.toLowerCase()];return s?s.value:null},x.prototype.removeHeader=function(n){var s=this;delete s._headers[n.toLowerCase()]},x.prototype._onFinish=function(){var n=this;if(n._destroyed)return;var s=n._opts,u=n._headers,w=null;s.method!=="GET"&&s.method!=="HEAD"&&(_.arraybuffer?w=r(T.concat(n._body)):_.blobConstructor?w=new m.Blob(n._body.map(function(b){return r(b)}),{type:(u["content-type"]||{}).value||""}):w=T.concat(n._body).toString());var y=[];if((0,S.default)(u).forEach(function(b){var E=u[b].name,C=u[b].value;Array.isArray(C)?C.forEach(function(F){y.push([E,F])}):y.push([E,C])}),n._mode==="fetch"){var a=null,R=null;if(_.abortController){var D=new AbortController;a=D.signal,n._fetchAbortController=D,"requestTimeout"in s&&s.requestTimeout!==0&&(n._fetchTimer=m.setTimeout(function(){n.emit("requestTimeout"),n._fetchAbortController&&n._fetchAbortController.abort()},s.requestTimeout))}m.fetch(n._opts.url,{method:n._opts.method,headers:y,body:w||void 0,mode:"cors",credentials:s.withCredentials?"include":"same-origin",signal:a}).then(function(b){n._fetchResponse=b,n._connect()},function(b){m.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",b)})}else{var c=n._xhr=new m.XMLHttpRequest;try{c.open(n._opts.method,n._opts.url,!0)}catch(b){P.nextTick(function(){n.emit("error",b)});return}"responseType"in c&&(c.responseType=n._mode.split(":")[0]),"withCredentials"in c&&(c.withCredentials=!!s.withCredentials),n._mode==="text"&&"overrideMimeType"in c&&c.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in s&&(c.timeout=s.requestTimeout,c.ontimeout=function(){n.emit("requestTimeout")}),y.forEach(function(b){c.setRequestHeader(b[0],b[1])}),n._response=null,c.onreadystatechange=function(){switch(c.readyState){case p.LOADING:case p.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(c.onprogress=function(){n._onXHRProgress()}),c.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{c.send(w)}catch(b){P.nextTick(function(){n.emit("error",b)});return}}};function v(n){try{var s=n.status;return s!==null&&s!==0}catch(u){return!1}}x.prototype._onXHRProgress=function(){var n=this;if(!v(n._xhr)||n._destroyed)return;n._response||n._connect(),n._response._onXHRProgress()},x.prototype._connect=function(){var n=this;if(n._destroyed)return;n._response=new h(n._xhr,n._fetchResponse,n._mode,n._fetchTimer),n._response.on("error",function(s){n.emit("error",s)}),n.emit("response",n._response)},x.prototype._write=function(n,s,u){var w=this;w._body.push(n),u()},x.prototype.abort=x.prototype.destroy=function(){var n=this;n._destroyed=!0,m.clearTimeout(n._fetchTimer),n._response&&(n._response._destroyed=!0),n._xhr?n._xhr.abort():n._fetchAbortController&&n._fetchAbortController.abort()},x.prototype.end=function(n,s,u){var w=this;typeof n=="function"&&(u=n,n=void 0),i.Writable.prototype.end.call(w,n,s,u)},x.prototype.flushHeaders=function(){},x.prototype.setTimeout=function(){},x.prototype.setNoDelay=function(){},x.prototype.setSocketKeepAlive=function(){};var l=["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,I("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},I("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(I,Z,N){(function(P,m,T){"use strict";var L=I("babel-runtime/core-js/promise"),S=g(L);function g(h){return h&&h.__esModule?h:{default:h}}var _=I("./capability"),d=I("inherits"),o=I("readable-stream"),i=N.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=N.IncomingMessage=function(h,p,f,x){var v=this;if(o.Readable.call(v),v._mode=f,v.headers={},v.rawHeaders=[],v.trailers={},v.rawTrailers=[],v.on("end",function(){P.nextTick(function(){v.emit("close")})}),f==="fetch"){var l=function a(){s.read().then(function(R){if(v._destroyed)return;if(R.done){m.clearTimeout(x),v.push(null);return}v.push(new T(R.value)),a()}).catch(function(R){m.clearTimeout(x),v._destroyed||v.emit("error",R)})};if(v._fetchResponse=p,v.url=p.url,v.statusCode=p.status,v.statusMessage=p.statusText,p.headers.forEach(function(a,R){v.headers[R.toLowerCase()]=a,v.rawHeaders.push(R,a)}),_.writableStream){var n=new WritableStream({write:function(R){return new S.default(function(D,c){v._destroyed?c():v.push(new T(R))?D():v._resumeFetch=D})},close:function(){m.clearTimeout(x),v._destroyed||v.push(null)},abort:function(R){v._destroyed||v.emit("error",R)}});try{p.body.pipeTo(n).catch(function(a){m.clearTimeout(x),v._destroyed||v.emit("error",a)});return}catch(a){}}var s=p.body.getReader();l()}else{v._xhr=h,v._pos=0,v.url=h.responseURL,v.statusCode=h.status,v.statusMessage=h.statusText;var u=h.getAllResponseHeaders().split(/\r?\n/);if(u.forEach(function(a){var R=a.match(/^([^:]+):\s*(.*)/);if(R){var D=R[1].toLowerCase();D==="set-cookie"?(v.headers[D]===void 0&&(v.headers[D]=[]),v.headers[D].push(R[2])):v.headers[D]!==void 0?v.headers[D]+=", "+R[2]:v.headers[D]=R[2],v.rawHeaders.push(R[1],R[2])}}),v._charset="x-user-defined",!_.overrideMimeType){var w=v.rawHeaders["mime-type"];if(w){var y=w.match(/;\s*charset=([^;])(;|$)/);y&&(v._charset=y[1].toLowerCase())}v._charset||(v._charset="utf-8")}}};d(r,o.Readable),r.prototype._read=function(){var h=this,p=h._resumeFetch;p&&(h._resumeFetch=null,p())},r.prototype._onXHRProgress=function(){var h=this,p=h._xhr,f=null;switch(h._mode){case"text:vbarray":if(p.readyState!==i.DONE)break;try{f=new m.VBArray(p.responseBody).toArray()}catch(s){}if(f!==null){h.push(new T(f));break}case"text":try{f=p.responseText}catch(s){h._mode="text:vbarray";break}if(f.length>h._pos){var x=f.substr(h._pos);if(h._charset==="x-user-defined"){for(var v=new T(x.length),l=0;l<x.length;l++)v[l]=x.charCodeAt(l)&255;h.push(v)}else h.push(x,h._charset);h._pos=f.length}break;case"arraybuffer":if(p.readyState!==i.DONE||!p.response)break;f=p.response,h.push(new T(new Uint8Array(f)));break;case"moz-chunked-arraybuffer":if(f=p.response,p.readyState!==i.LOADING||!f)break;h.push(new T(new Uint8Array(f)));break;case"ms-stream":if(f=p.response,p.readyState!==i.LOADING)break;var n=new m.MSStreamReader;n.onprogress=function(){n.result.byteLength>h._pos&&(h.push(new T(new Uint8Array(n.result.slice(h._pos)))),h._pos=n.result.byteLength)},n.onload=function(){h.push(null)},n.readAsArrayBuffer(f);break}h._xhr.readyState===i.DONE&&h._mode!=="ms-stream"&&h.push(null)}}).call(this,I("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},I("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(I,Z,N){"use strict";var P=I("safe-buffer").Buffer,m=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 T(n){if(!n)return"utf8";for(var s;;)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(s)return;n=(""+n).toLowerCase(),s=!0}}function L(n){var s=T(n);if(typeof s!="string"&&(P.isEncoding===m||!m(n)))throw new Error("Unknown encoding: "+n);return s||n}N.StringDecoder=S;function S(n){this.encoding=L(n);var s;switch(this.encoding){case"utf16le":this.text=h,this.end=p,s=4;break;case"utf8":this.fillLast=o,s=4;break;case"base64":this.text=f,this.end=x,s=3;break;default:this.write=v,this.end=l;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=P.allocUnsafe(s)}S.prototype.write=function(n){if(n.length===0)return"";var s,u;if(this.lastNeed){if(s=this.fillLast(n),s===void 0)return"";u=this.lastNeed,this.lastNeed=0}else u=0;return u<n.length?s?s+this.text(n,u):this.text(n,u):s||""},S.prototype.end=r,S.prototype.text=i,S.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 g(n){return n<=127?0:n>>5===6?2:n>>4===14?3:n>>3===30?4:n>>6===2?-1:-2}function _(n,s,u){var w=s.length-1;if(w<u)return 0;var y=g(s[w]);return y>=0?(y>0&&(n.lastNeed=y-1),y):--w<u||y===-2?0:(y=g(s[w]),y>=0?(y>0&&(n.lastNeed=y-2),y):--w<u||y===-2?0:(y=g(s[w]),y>=0?(y>0&&(y===2?y=0:n.lastNeed=y-3),y):0))}function d(n,s,u){if((s[0]&192)!==128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&s.length>1){if((s[1]&192)!==128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&s.length>2&&(s[2]&192)!==128)return n.lastNeed=2,"\uFFFD"}}function o(n){var s=this.lastTotal-this.lastNeed,u=d(this,n,s);if(u!==void 0)return u;if(this.lastNeed<=n.length)return n.copy(this.lastChar,s,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,s,0,n.length),this.lastNeed-=n.length}function i(n,s){var u=_(this,n,s);if(!this.lastNeed)return n.toString("utf8",s);this.lastTotal=u;var w=n.length-(u-this.lastNeed);return n.copy(this.lastChar,0,w),n.toString("utf8",s,w)}function r(n){var s=n&&n.length?this.write(n):"";return this.lastNeed?s+"\uFFFD":s}function h(n,s){if((n.length-s)%2===0){var u=n.toString("utf16le",s);if(u){var w=u.charCodeAt(u.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],u.slice(0,-1)}return u}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",s,n.length-1)}function p(n){var s=n&&n.length?this.write(n):"";if(this.lastNeed){var u=this.lastTotal-this.lastNeed;return s+this.lastChar.toString("utf16le",0,u)}return s}function f(n,s){var u=(n.length-s)%3;return u===0?n.toString("base64",s):(this.lastNeed=3-u,this.lastTotal=3,u===1?this.lastChar[0]=n[n.length-1]:(this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1]),n.toString("base64",s,n.length-u))}function x(n){var s=n&&n.length?this.write(n):"";return this.lastNeed?s+this.lastChar.toString("base64",0,3-this.lastNeed):s}function v(n){return n.toString(this.encoding)}function l(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(I,Z,N){(function(P,m){var T=I("process/browser.js").nextTick,L=Function.prototype.apply,S=Array.prototype.slice,g={},_=0;N.setTimeout=function(){return new d(L.call(setTimeout,window,arguments),clearTimeout)},N.setInterval=function(){return new d(L.call(setInterval,window,arguments),clearInterval)},N.clearTimeout=N.clearInterval=function(o){o.close()};function d(o,i){this._id=o,this._clearFn=i}d.prototype.unref=d.prototype.ref=function(){},d.prototype.close=function(){this._clearFn.call(window,this._id)},N.enroll=function(o,i){clearTimeout(o._idleTimeoutId),o._idleTimeout=i},N.unenroll=function(o){clearTimeout(o._idleTimeoutId),o._idleTimeout=-1},N._unrefActive=N.active=function(o){clearTimeout(o._idleTimeoutId);var i=o._idleTimeout;i>=0&&(o._idleTimeoutId=setTimeout(function(){o._onTimeout&&o._onTimeout()},i))},N.setImmediate=typeof P=="function"?P:function(o){var i=_++,r=arguments.length<2?!1:S.call(arguments,1);return g[i]=!0,T(function(){g[i]&&(r?o.apply(null,r):o.call(null),N.clearImmediate(i))}),i},N.clearImmediate=typeof m=="function"?m:function(o){delete g[o]}}).call(this,I("timers").setImmediate,I("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(I,Z,N){var P=I("buffer").Buffer;Z.exports=function(m){if(m instanceof Uint8Array){if(m.byteOffset===0&&m.byteLength===m.buffer.byteLength)return m.buffer;if(typeof m.buffer.slice=="function")return m.buffer.slice(m.byteOffset,m.byteOffset+m.byteLength)}if(P.isBuffer(m)){for(var T=new Uint8Array(m.length),L=m.length,S=0;S<L;S++)T[S]=m[S];return T.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(I,Z,N){"use strict";var P=I("punycode"),m=I("./util");N.parse=s,N.resolve=w,N.resolveObject=y,N.format=u,N.Url=T;function T(){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 L=/^([a-z0-9.+-]+:)/i,S=/:[0-9]*$/,g=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,_=["<",">",'"',"`"," ","\r",`
`," "],d=["{","}","|","\\","^","`"].concat(_),o=["'"].concat(d),i=["%","/","?",";","#"].concat(o),r=["/","?","#"],h=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},l={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},n=I("querystring");function s(a,R,D){if(a&&m.isObject(a)&&a instanceof T)return a;var c=new T;return c.parse(a,R,D),c}T.prototype.parse=function(a,R,D){if(!m.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var c=a.indexOf("?"),b=c!==-1&&c<a.indexOf("#")?"?":"#",E=a.split(b),C=/\\/g;E[0]=E[0].replace(C,"/"),a=E.join(b);var F=a;if(F=F.trim(),!D&&a.split("#").length===1){var j=g.exec(F);if(j)return this.path=F,this.href=F,this.pathname=j[1],j[2]?(this.search=j[2],R?this.query=n.parse(this.search.substr(1)):this.query=this.search.substr(1)):R&&(this.search="",this.query={}),this}var k=L.exec(F);if(k){k=k[0];var X=k.toLowerCase();this.protocol=X,F=F.substr(k.length)}if(D||k||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var G=F.substr(0,2)==="//";G&&!(k&&v[k])&&(F=F.substr(2),this.slashes=!0)}if(!v[k]&&(G||k&&!l[k])){for(var H=-1,K=0;K<r.length;K++){var B=F.indexOf(r[K]);B!==-1&&(H===-1||B<H)&&(H=B)}var U,W;H===-1?W=F.lastIndexOf("@"):W=F.lastIndexOf("@",H),W!==-1&&(U=F.slice(0,W),F=F.slice(W+1),this.auth=decodeURIComponent(U)),H=-1;for(var K=0;K<i.length;K++){var B=F.indexOf(i[K]);B!==-1&&(H===-1||B<H)&&(H=B)}H===-1&&(H=F.length),this.host=F.slice(0,H),F=F.slice(H),this.parseHost(),this.hostname=this.hostname||"";var Q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Q)for(var ie=this.hostname.split(/\./),K=0,ce=ie.length;K<ce;K++){var he=ie[K];if(!he)continue;if(!he.match(p)){for(var be="",ne=0,le=he.length;ne<le;ne++)he.charCodeAt(ne)>127?be+="x":be+=he[ne];if(!be.match(p)){var ue=ie.slice(0,K),re=ie.slice(K+1),oe=he.match(f);oe&&(ue.push(oe[1]),re.unshift(oe[2])),re.length&&(F="/"+re.join(".")+F),this.hostname=ue.join(".");break}}}this.hostname.length>h?this.hostname="":this.hostname=this.hostname.toLowerCase(),Q||(this.hostname=P.toASCII(this.hostname));var q=this.port?":"+this.port:"",se=this.hostname||"";this.host=se+q,this.href+=this.host,Q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!x[X])for(var K=0,ce=o.length;K<ce;K++){var J=o[K];if(F.indexOf(J)===-1)continue;var ee=encodeURIComponent(J);ee===J&&(ee=escape(J)),F=F.split(J).join(ee)}var ge=F.indexOf("#");ge!==-1&&(this.hash=F.substr(ge),F=F.slice(0,ge));var te=F.indexOf("?");if(te!==-1?(this.search=F.substr(te),this.query=F.substr(te+1),R&&(this.query=n.parse(this.query)),F=F.slice(0,te)):R&&(this.search="",this.query={}),F&&(this.pathname=F),l[X]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var q=this.pathname||"",Y=this.search||"";this.path=q+Y}return this.href=this.format(),this};function u(a){return m.isString(a)&&(a=s(a)),a instanceof T?a.format():T.prototype.format.call(a)}T.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var R=this.protocol||"",D=this.pathname||"",c=this.hash||"",b=!1,E="";this.host?b=a+this.host:this.hostname&&(b=a+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(b+=":"+this.port)),this.query&&m.isObject(this.query)&&Object.keys(this.query).length&&(E=n.stringify(this.query));var C=this.search||E&&"?"+E||"";return R&&R.substr(-1)!==":"&&(R+=":"),this.slashes||(!R||l[R])&&b!==!1?(b="//"+(b||""),D&&D.charAt(0)!=="/"&&(D="/"+D)):b||(b=""),c&&c.charAt(0)!=="#"&&(c="#"+c),C&&C.charAt(0)!=="?"&&(C="?"+C),D=D.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),C=C.replace("#","%23"),R+b+D+C+c};function w(a,R){return s(a,!1,!0).resolve(R)}T.prototype.resolve=function(a){return this.resolveObject(s(a,!1,!0)).format()};function y(a,R){return a?s(a,!1,!0).resolveObject(R):R}T.prototype.resolveObject=function(a){if(m.isString(a)){var R=new T;R.parse(a,!1,!0),a=R}for(var D=new T,c=Object.keys(this),b=0;b<c.length;b++){var E=c[b];D[E]=this[E]}if(D.hash=a.hash,a.href==="")return D.href=D.format(),D;if(a.slashes&&!a.protocol){for(var C=Object.keys(a),F=0;F<C.length;F++){var j=C[F];j!=="protocol"&&(D[j]=a[j])}return l[D.protocol]&&D.hostname&&!D.pathname&&(D.path=D.pathname="/"),D.href=D.format(),D}if(a.protocol&&a.protocol!==D.protocol){if(!l[a.protocol]){for(var k=Object.keys(a),X=0;X<k.length;X++){var G=k[X];D[G]=a[G]}return D.href=D.format(),D}if(D.protocol=a.protocol,!a.host&&!v[a.protocol]){for(var ce=(a.pathname||"").split("/");ce.length&&!(a.host=ce.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),ce[0]!==""&&ce.unshift(""),ce.length<2&&ce.unshift(""),D.pathname=ce.join("/")}else D.pathname=a.pathname;if(D.search=a.search,D.query=a.query,D.host=a.host||"",D.auth=a.auth,D.hostname=a.hostname||a.host,D.port=a.port,D.pathname||D.search){var H=D.pathname||"",K=D.search||"";D.path=H+K}return D.slashes=D.slashes||a.slashes,D.href=D.format(),D}var B=D.pathname&&D.pathname.charAt(0)==="/",U=a.host||a.pathname&&a.pathname.charAt(0)==="/",W=U||B||D.host&&a.pathname,Q=W,ie=D.pathname&&D.pathname.split("/")||[],ce=a.pathname&&a.pathname.split("/")||[],he=D.protocol&&!l[D.protocol];if(he&&(D.hostname="",D.port=null,D.host&&(ie[0]===""?ie[0]=D.host:ie.unshift(D.host)),D.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(ce[0]===""?ce[0]=a.host:ce.unshift(a.host)),a.host=null),W=W&&(ce[0]===""||ie[0]==="")),U)D.host=a.host||a.host===""?a.host:D.host,D.hostname=a.hostname||a.hostname===""?a.hostname:D.hostname,D.search=a.search,D.query=a.query,ie=ce;else if(ce.length)ie||(ie=[]),ie.pop(),ie=ie.concat(ce),D.search=a.search,D.query=a.query;else if(!m.isNullOrUndefined(a.search)){if(he){D.hostname=D.host=ie.shift();var be=D.host&&D.host.indexOf("@")>0?D.host.split("@"):!1;be&&(D.auth=be.shift(),D.host=D.hostname=be.shift())}return D.search=a.search,D.query=a.query,(!m.isNull(D.pathname)||!m.isNull(D.search))&&(D.path=(D.pathname?D.pathname:"")+(D.search?D.search:"")),D.href=D.format(),D}if(!ie.length)return D.pathname=null,D.search?D.path="/"+D.search:D.path=null,D.href=D.format(),D;for(var ne=ie.slice(-1)[0],le=(D.host||a.host||ie.length>1)&&(ne==="."||ne==="..")||ne==="",ue=0,re=ie.length;re>=0;re--)ne=ie[re],ne==="."?ie.splice(re,1):ne===".."?(ie.splice(re,1),ue++):ue&&(ie.splice(re,1),ue--);if(!W&&!Q)for(;ue--;ue)ie.unshift("..");W&&ie[0]!==""&&(!ie[0]||ie[0].charAt(0)!=="/")&&ie.unshift(""),le&&ie.join("/").substr(-1)!=="/"&&ie.push("");var oe=ie[0]===""||ie[0]&&ie[0].charAt(0)==="/";if(he){D.hostname=D.host=oe?"":ie.length?ie.shift():"";var be=D.host&&D.host.indexOf("@")>0?D.host.split("@"):!1;be&&(D.auth=be.shift(),D.host=D.hostname=be.shift())}return W=W||D.host&&ie.length,W&&!oe&&ie.unshift(""),ie.length?D.pathname=ie.join("/"):(D.pathname=null,D.path=null),(!m.isNull(D.pathname)||!m.isNull(D.search))&&(D.path=(D.pathname?D.pathname:"")+(D.search?D.search:"")),D.auth=a.auth||D.auth,D.slashes=D.slashes||a.slashes,D.href=D.format(),D},T.prototype.parseHost=function(){var a=this.host,R=S.exec(a);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),a=a.substr(0,a.length-R.length)),a&&(this.hostname=a)}},{"./util":239,punycode:209,querystring:212}],239:[function(I,Z,N){"use strict";Z.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(I,Z,N){(function(P){Z.exports=m;function m(L,S){if(T("noDeprecation"))return L;var g=!1;function _(){if(!g){if(T("throwDeprecation"))throw new Error(S);T("traceDeprecation")?console.trace(S):console.warn(S),g=!0}return L.apply(this,arguments)}return _}function T(L){try{if(!P.localStorage)return!1}catch(g){return!1}var S=P.localStorage[L];return S==null?!1:String(S).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(I,Z,N){typeof Object.create=="function"?Z.exports=function(m,T){m.super_=T,m.prototype=Object.create(T.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}})}:Z.exports=function(m,T){m.super_=T;var L=function(){};L.prototype=T.prototype,m.prototype=new L,m.prototype.constructor=m}},{}],242:[function(I,Z,N){Z.exports=function(m){return m&&typeof m=="object"&&typeof m.copy=="function"&&typeof m.fill=="function"&&typeof m.readUInt8=="function"}},{}],243:[function(I,Z,N){(function(P,m){var T=/%[sdj%]/g;N.format=function(H){if(!w(H)){for(var K=[],B=0;B<arguments.length;B++)K.push(g(arguments[B]));return K.join(" ")}for(var B=1,U=arguments,W=U.length,Q=String(H).replace(T,function(ce){if(ce==="%%")return"%";if(B>=W)return ce;switch(ce){case"%s":return String(U[B++]);case"%d":return Number(U[B++]);case"%j":try{return JSON.stringify(U[B++])}catch(he){return"[Circular]"}default:return ce}}),ie=U[B];B<W;ie=U[++B])n(ie)||!D(ie)?Q+=" "+ie:Q+=" "+g(ie);return Q},N.deprecate=function(H,K){if(a(m.process))return function(){return N.deprecate(H,K).apply(this,arguments)};if(P.noDeprecation===!0)return H;var B=!1;function U(){if(!B){if(P.throwDeprecation)throw new Error(K);P.traceDeprecation?console.trace(K):console.error(K),B=!0}return H.apply(this,arguments)}return U};var L={},S;N.debuglog=function(H){if(a(S)&&(S=P.env.NODE_DEBUG||""),H=H.toUpperCase(),!L[H])if(new RegExp("\\b"+H+"\\b","i").test(S)){var K=P.pid;L[H]=function(){var B=N.format.apply(N,arguments);console.error("%s %d: %s",H,K,B)}}else L[H]=function(){};return L[H]};function g(H,K){var B={seen:[],stylize:d};return arguments.length>=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),l(K)?B.showHidden=K:K&&N._extend(B,K),a(B.showHidden)&&(B.showHidden=!1),a(B.depth)&&(B.depth=2),a(B.colors)&&(B.colors=!1),a(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=_),i(B,H,B.depth)}N.inspect=g,g.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]},g.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function _(H,K){var B=g.styles[K];return B?"["+g.colors[B][0]+"m"+H+"["+g.colors[B][1]+"m":H}function d(H,K){return H}function o(H){var K={};return H.forEach(function(B,U){K[B]=!0}),K}function i(H,K,B){if(H.customInspect&&K&&E(K.inspect)&&K.inspect!==N.inspect&&!(K.constructor&&K.constructor.prototype===K)){var U=K.inspect(B,H);return w(U)||(U=i(H,U,B)),U}var W=r(H,K);if(W)return W;var Q=Object.keys(K),ie=o(Q);if(H.showHidden&&(Q=Object.getOwnPropertyNames(K)),b(K)&&(Q.indexOf("message")>=0||Q.indexOf("description")>=0))return h(K);if(Q.length===0){if(E(K)){var ce=K.name?": "+K.name:"";return H.stylize("[Function"+ce+"]","special")}if(R(K))return H.stylize(RegExp.prototype.toString.call(K),"regexp");if(c(K))return H.stylize(Date.prototype.toString.call(K),"date");if(b(K))return h(K)}var he="",be=!1,ne=["{","}"];if(v(K)&&(be=!0,ne=["[","]"]),E(K)){var le=K.name?": "+K.name:"";he=" [Function"+le+"]"}if(R(K)&&(he=" "+RegExp.prototype.toString.call(K)),c(K)&&(he=" "+Date.prototype.toUTCString.call(K)),b(K)&&(he=" "+h(K)),Q.length===0&&(!be||K.length==0))return ne[0]+he+ne[1];if(B<0)return R(K)?H.stylize(RegExp.prototype.toString.call(K),"regexp"):H.stylize("[Object]","special");H.seen.push(K);var ue;return be?ue=p(H,K,B,ie,Q):ue=Q.map(function(re){return f(H,K,B,ie,re,be)}),H.seen.pop(),x(ue,he,ne)}function r(H,K){if(a(K))return H.stylize("undefined","undefined");if(w(K)){var B="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return H.stylize(B,"string")}if(u(K))return H.stylize(""+K,"number");if(l(K))return H.stylize(""+K,"boolean");if(n(K))return H.stylize("null","null")}function h(H){return"["+Error.prototype.toString.call(H)+"]"}function p(H,K,B,U,W){for(var Q=[],ie=0,ce=K.length;ie<ce;++ie)G(K,String(ie))?Q.push(f(H,K,B,U,String(ie),!0)):Q.push("");return W.forEach(function(he){he.match(/^\d+$/)||Q.push(f(H,K,B,U,he,!0))}),Q}function f(H,K,B,U,W,Q){var ie,ce,he;if(he=Object.getOwnPropertyDescriptor(K,W)||{value:K[W]},he.get?he.set?ce=H.stylize("[Getter/Setter]","special"):ce=H.stylize("[Getter]","special"):he.set&&(ce=H.stylize("[Setter]","special")),G(U,W)||(ie="["+W+"]"),ce||(H.seen.indexOf(he.value)<0?(n(B)?ce=i(H,he.value,null):ce=i(H,he.value,B-1),ce.indexOf(`
`)>-1&&(Q?ce=ce.split(`
`).map(function(be){return" "+be}).join(`
`).substr(2):ce=`
`+ce.split(`
`).map(function(be){return" "+be}).join(`
`))):ce=H.stylize("[Circular]","special")),a(ie)){if(Q&&W.match(/^\d+$/))return ce;ie=JSON.stringify(""+W),ie.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ie=ie.substr(1,ie.length-2),ie=H.stylize(ie,"name")):(ie=ie.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ie=H.stylize(ie,"string"))}return ie+": "+ce}function x(H,K,B){var U=0,W=H.reduce(function(Q,ie){return U++,ie.indexOf(`
`)>=0&&U++,Q+ie.replace(/\u001b\[\d\d?m/g,"").length+1},0);return W>60?B[0]+(K===""?"":K+`
`)+" "+H.join(`,
`)+" "+B[1]:B[0]+K+" "+H.join(", ")+" "+B[1]}function v(H){return Array.isArray(H)}N.isArray=v;function l(H){return typeof H=="boolean"}N.isBoolean=l;function n(H){return H===null}N.isNull=n;function s(H){return H==null}N.isNullOrUndefined=s;function u(H){return typeof H=="number"}N.isNumber=u;function w(H){return typeof H=="string"}N.isString=w;function y(H){return typeof H=="symbol"}N.isSymbol=y;function a(H){return H===void 0}N.isUndefined=a;function R(H){return D(H)&&F(H)==="[object RegExp]"}N.isRegExp=R;function D(H){return typeof H=="object"&&H!==null}N.isObject=D;function c(H){return D(H)&&F(H)==="[object Date]"}N.isDate=c;function b(H){return D(H)&&(F(H)==="[object Error]"||H instanceof Error)}N.isError=b;function E(H){return typeof H=="function"}N.isFunction=E;function C(H){return H===null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||typeof H=="symbol"||typeof H=="undefined"}N.isPrimitive=C,N.isBuffer=I("./support/isBuffer");function F(H){return Object.prototype.toString.call(H)}function j(H){return H<10?"0"+H.toString(10):H.toString(10)}var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function X(){var H=new Date,K=[j(H.getHours()),j(H.getMinutes()),j(H.getSeconds())].join(":");return[H.getDate(),k[H.getMonth()],K].join(" ")}N.log=function(){console.log("%s - %s",X(),N.format.apply(N,arguments))},N.inherits=I("inherits"),N._extend=function(H,K){if(!K||!D(K))return H;for(var B=Object.keys(K),U=B.length;U--;)H[B[U]]=K[B[U]];return H};function G(H,K){return Object.prototype.hasOwnProperty.call(H,K)}}).call(this,I("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(I,Z,N){"use strict";(function(){"use strict";N.stripBOM=function(P){return P[0]==="\uFEFF"?P.substring(1):P}}).call(void 0)},{}],245:[function(I,Z,N){"use strict";var P=I("babel-runtime/helpers/typeof"),m=S(P),T=I("babel-runtime/core-js/object/keys"),L=S(T);function S(g){return g&&g.__esModule?g:{default:g}}(function(){"use strict";var g,_,d,o,i,r={}.hasOwnProperty;g=I("xmlbuilder"),_=I("./defaults").defaults,o=function(p){return typeof p=="string"&&(p.indexOf("&")>=0||p.indexOf(">")>=0||p.indexOf("<")>=0)},i=function(p){return"<![CDATA["+d(p)+"]]>"},d=function(p){return p.replace("]]>","]]]]><![CDATA[>")},N.Builder=function(){function h(p){var f,x,v;this.options={},x=_["0.2"];for(f in x){if(!r.call(x,f))continue;v=x[f],this.options[f]=v}for(f in p){if(!r.call(p,f))continue;v=p[f],this.options[f]=v}}return h.prototype.buildObject=function(p){var f,x,v,l,n;return f=this.options.attrkey,x=this.options.charkey,(0,L.default)(p).length===1&&this.options.rootName===_["0.2"].rootName?(n=(0,L.default)(p)[0],p=p[n]):n=this.options.rootName,v=function(s){return function(u,w){var y,a,R,D,c,b;if((typeof w=="undefined"?"undefined":(0,m.default)(w))!=="object")s.options.cdata&&o(w)?u.raw(i(w)):u.txt(w);else if(Array.isArray(w))for(D in w){if(!r.call(w,D))continue;a=w[D];for(c in a)R=a[c],u=v(u.ele(c),R).up()}else for(c in w){if(!r.call(w,c))continue;if(a=w[c],c===f){if((typeof a=="undefined"?"undefined":(0,m.default)(a))==="object")for(y in a)b=a[y],u=u.att(y,b)}else if(c===x)s.options.cdata&&o(a)?u=u.raw(i(a)):u=u.txt(a);else if(Array.isArray(a))for(D in a){if(!r.call(a,D))continue;R=a[D],typeof R=="string"?s.options.cdata&&o(R)?u=u.ele(c).raw(i(R)).up():u=u.ele(c,R).up():u=v(u.ele(c),R).up()}else(typeof a=="undefined"?"undefined":(0,m.default)(a))==="object"?u=v(u.ele(c),a).up():typeof a=="string"&&s.options.cdata&&o(a)?u=u.ele(c).raw(i(a)).up():(a==null&&(a=""),u=u.ele(c,a.toString()).up())}return u}}(this),l=g.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),v(l,p).end(this.options.renderOpts)},h}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(I,Z,N){"use strict";(function(){N.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(I,Z,N){"use strict";var P=I("babel-runtime/core-js/promise"),m=o(P),T=I("babel-runtime/core-js/object/get-own-property-names"),L=o(T),S=I("babel-runtime/core-js/object/keys"),g=o(S),_=I("babel-runtime/helpers/typeof"),d=o(_);function o(i){return i&&i.__esModule?i:{default:i}}(function(){"use strict";var i,r,h,p,f,x,v,l,n=function(y,a){return function(){return y.apply(a,arguments)}},s=function(y,a){for(var R in a)u.call(a,R)&&(y[R]=a[R]);function D(){this.constructor=y}return D.prototype=a.prototype,y.prototype=new D,y.__super__=a.prototype,y},u={}.hasOwnProperty;v=I("sax"),h=I("events"),i=I("./bom"),x=I("./processors"),l=I("timers").setImmediate,r=I("./defaults").defaults,p=function(y){return(typeof y=="undefined"?"undefined":(0,d.default)(y))==="object"&&y!=null&&(0,g.default)(y).length===0},f=function(y,a,R){var D,c,b;for(D=0,c=y.length;D<c;D++)b=y[D],a=b(a,R);return a},N.Parser=function(w){s(y,w);function y(a){this.parseStringPromise=n(this.parseStringPromise,this),this.parseString=n(this.parseString,this),this.reset=n(this.reset,this),this.assignOrPush=n(this.assignOrPush,this),this.processAsync=n(this.processAsync,this);var R,D,c;if(!(this instanceof N.Parser))return new N.Parser(a);this.options={},D=r["0.2"];for(R in D){if(!u.call(D,R))continue;c=D[R],this.options[R]=c}for(R in a){if(!u.call(a,R))continue;c=a[R],this.options[R]=c}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(x.normalize)),this.reset()}return y.prototype.processAsync=function(){var a,R;try{return this.remaining.length<=this.options.chunkSize?(a=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(a),this.saxParser.close()):(a=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(a),l(this.processAsync))}catch(D){if(R=D,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(R)}},y.prototype.assignOrPush=function(a,R,D){return R in a?(a[R]instanceof Array||(a[R]=[a[R]]),a[R].push(D)):this.options.explicitArray?a[R]=[D]:a[R]=D},y.prototype.reset=function(){var a,R,D,c;return this.removeAllListeners(),this.saxParser=v.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(b){return function(E){if(b.saxParser.resume(),!b.saxParser.errThrown)return b.saxParser.errThrown=!0,b.emit("error",E)}}(this),this.saxParser.onend=function(b){return function(){if(!b.saxParser.ended)return b.saxParser.ended=!0,b.emit("end",b.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,c=[],a=this.options.attrkey,R=this.options.charkey,this.saxParser.onopentag=function(b){return function(E){var C,F,j,k,X;if(j={},j[R]="",!b.options.ignoreAttrs){X=E.attributes;for(C in X){if(!u.call(X,C))continue;!(a in j)&&!b.options.mergeAttrs&&(j[a]={}),F=b.options.attrValueProcessors?f(b.options.attrValueProcessors,E.attributes[C],C):E.attributes[C],k=b.options.attrNameProcessors?f(b.options.attrNameProcessors,C):C,b.options.mergeAttrs?b.assignOrPush(j,k,F):j[a][k]=F}}return j["#name"]=b.options.tagNameProcessors?f(b.options.tagNameProcessors,E.name):E.name,b.options.xmlns&&(j[b.options.xmlnskey]={uri:E.uri,local:E.local}),c.push(j)}}(this),this.saxParser.onclosetag=function(b){return function(){var E,C,F,j,k,X,G,H,K,B;if(X=c.pop(),k=X["#name"],(!b.options.explicitChildren||!b.options.preserveChildrenOrder)&&delete X["#name"],X.cdata===!0&&(E=X.cdata,delete X.cdata),K=c[c.length-1],X[R].match(/^\s*$/)&&!E?(C=X[R],delete X[R]):(b.options.trim&&(X[R]=X[R].trim()),b.options.normalize&&(X[R]=X[R].replace(/\s{2,}/g," ").trim()),X[R]=b.options.valueProcessors?f(b.options.valueProcessors,X[R],k):X[R],(0,g.default)(X).length===1&&R in X&&!b.EXPLICIT_CHARKEY&&(X=X[R])),p(X)&&(X=b.options.emptyTag!==""?b.options.emptyTag:C),b.options.validator!=null&&(B="/"+function(){var U,W,Q;for(Q=[],U=0,W=c.length;U<W;U++)j=c[U],Q.push(j["#name"]);return Q}().concat(k).join("/"),function(){var U;try{return X=b.options.validator(B,K&&K[k],X)}catch(W){return U=W,b.emit("error",U)}}()),b.options.explicitChildren&&!b.options.mergeAttrs&&(typeof X=="undefined"?"undefined":(0,d.default)(X))==="object"){if(!b.options.preserveChildrenOrder)j={},b.options.attrkey in X&&(j[b.options.attrkey]=X[b.options.attrkey],delete X[b.options.attrkey]),!b.options.charsAsChildren&&b.options.charkey in X&&(j[b.options.charkey]=X[b.options.charkey],delete X[b.options.charkey]),(0,L.default)(X).length>0&&(j[b.options.childkey]=X),X=j;else if(K){K[b.options.childkey]=K[b.options.childkey]||[],G={};for(F in X){if(!u.call(X,F))continue;G[F]=X[F]}K[b.options.childkey].push(G),delete X["#name"],(0,g.default)(X).length===1&&R in X&&!b.EXPLICIT_CHARKEY&&(X=X[R])}}return c.length>0?b.assignOrPush(K,k,X):(b.options.explicitRoot&&(H=X,X={},X[k]=H),b.resultObject=X,b.saxParser.ended=!0,b.emit("end",b.resultObject))}}(this),D=function(b){return function(E){var C,F;if(F=c[c.length-1],F)return F[R]+=E,b.options.explicitChildren&&b.options.preserveChildrenOrder&&b.options.charsAsChildren&&(b.options.includeWhiteChars||E.replace(/\\n/g,"").trim()!=="")&&(F[b.options.childkey]=F[b.options.childkey]||[],C={"#name":"__text__"},C[R]=E,b.options.normalize&&(C[R]=C[R].replace(/\s{2,}/g," ").trim()),F[b.options.childkey].push(C)),F}}(this),this.saxParser.ontext=D,this.saxParser.oncdata=function(b){return function(E){var C;if(C=D(E),C)return C.cdata=!0}}(this)},y.prototype.parseString=function(a,R){var D;R!=null&&typeof R=="function"&&(this.on("end",function(c){return this.reset(),R(null,c)}),this.on("error",function(c){return this.reset(),R(c)}));try{return a=a.toString(),a.trim()===""?(this.emit("end",null),!0):(a=i.stripBOM(a),this.options.async?(this.remaining=a,l(this.processAsync),this.saxParser):this.saxParser.write(a).close())}catch(c){if(D=c,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw D}else return this.emit("error",D),this.saxParser.errThrown=!0}},y.prototype.parseStringPromise=function(a){return new m.default(function(R){return function(D,c){return R.parseString(a,function(b,E){return b?c(b):D(E)})}}(this))},y}(h),N.parseString=function(w,y,a){var R,D,c;return a!=null?(typeof a=="function"&&(R=a),(typeof y=="undefined"?"undefined":(0,d.default)(y))==="object"&&(D=y)):(typeof y=="function"&&(R=y),D={}),c=new N.Parser(D),c.parseString(w,R)},N.parseStringPromise=function(w,y){var a,R;return(typeof y=="undefined"?"undefined":(0,d.default)(y))==="object"&&(a=y),R=new N.Parser(a),R.parseStringPromise(w)}}).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(I,Z,N){"use strict";(function(){"use strict";var P;P=new RegExp(/(?!xmlns)^.*:/),N.normalize=function(m){return m.toLowerCase()},N.firstCharLowerCase=function(m){return m.charAt(0).toLowerCase()+m.slice(1)},N.stripPrefix=function(m){return m.replace(P,"")},N.parseNumbers=function(m){return isNaN(m)||(m=m%1===0?parseInt(m,10):parseFloat(m)),m},N.parseBooleans=function(m){return/^(?:true|false)$/i.test(m)&&(m=m.toLowerCase()==="true"),m}}).call(void 0)},{}],249:[function(I,Z,N){"use strict";(function(){"use strict";var P,m,T,L,S=function(d,o){for(var i in o)g.call(o,i)&&(d[i]=o[i]);function r(){this.constructor=d}return r.prototype=o.prototype,d.prototype=new r,d.__super__=o.prototype,d},g={}.hasOwnProperty;m=I("./defaults"),P=I("./builder"),T=I("./parser"),L=I("./processors"),N.defaults=m.defaults,N.processors=L,N.ValidationError=function(_){S(d,_);function d(o){this.message=o}return d}(Error),N.Builder=P.Builder,N.Parser=T.Parser,N.parseString=T.parseString,N.parseStringPromise=T.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(I,Z,N){"use strict";(function(){Z.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(I,Z,N){"use strict";(function(){Z.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(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/get-prototype-of"),m=_(P),T=I("babel-runtime/helpers/typeof"),L=_(T),S=I("babel-runtime/core-js/object/assign"),g=_(S);function _(d){return d&&d.__esModule?d:{default:d}}(function(){var d,o,i,r,h,p,f,x=[].slice,v={}.hasOwnProperty;d=function(){var n,s,u,w,y,a;if(a=arguments[0],y=2<=arguments.length?x.call(arguments,1):[],h(g.default))g.default.apply(null,arguments);else for(n=0,u=y.length;n<u;n++)if(w=y[n],w!=null)for(s in w){if(!v.call(w,s))continue;a[s]=w[s]}return a},h=function(n){return!!n&&Object.prototype.toString.call(n)==="[object Function]"},p=function(n){var s;return!!n&&((s=typeof n=="undefined"?"undefined":(0,L.default)(n))==="function"||s==="object")},i=function(n){return h(Array.isArray)?Array.isArray(n):Object.prototype.toString.call(n)==="[object Array]"},r=function(n){var s;if(i(n))return!n.length;for(s in n){if(!v.call(n,s))continue;return!1}return!0},f=function(n){var s,u;return p(n)&&(u=(0,m.default)(n))&&(s=u.constructor)&&typeof s=="function"&&s instanceof s&&Function.prototype.toString.call(s)===Function.prototype.toString.call(Object)},o=function(n){return h(n.valueOf)?n.valueOf():n},Z.exports.assign=d,Z.exports.isFunction=h,Z.exports.isObject=p,Z.exports.isArray=i,Z.exports.isEmpty=r,Z.exports.isPlainObject=f,Z.exports.getValue=o}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(I,Z,N){"use strict";(function(){Z.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,S,g;L=I("./NodeType"),g=I("./XMLNode"),Z.exports=S=function(){function _(d,o,i){if(this.parent=d,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),o==null)throw new Error("Missing attribute name. "+this.debugInfo(o));this.name=this.stringify.name(o),this.value=this.stringify.attValue(i),this.type=L.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(_.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(_.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(_.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(_.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(_.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(_.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(_.prototype,"specified",{get:function(){return!0}}),_.prototype.clone=function(){return(0,m.default)(this)},_.prototype.toString=function(d){return this.options.writer.attribute(this,this.options.writer.filterOptions(d))},_.prototype.debugInfo=function(d){return d=d||this.name,d==null?"parent: <"+this.parent.name+">":"attribute: {"+d+"}, parent: <"+this.parent.name+">"},_.prototype.isEqualNode=function(d){return d.namespaceURI!==this.namespaceURI||(d.prefix!==this.prefix||d.localName!==this.localName)?!1:!(d.value!==this.value)},_}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,S,g,_=function(i,r){for(var h in r)d.call(r,h)&&(i[h]=r[h]);function p(){this.constructor=i}return p.prototype=r.prototype,i.prototype=new p,i.__super__=r.prototype,i},d={}.hasOwnProperty;L=I("./NodeType"),g=I("./XMLCharacterData"),Z.exports=S=function(o){_(i,o);function i(r,h){if(i.__super__.constructor.call(this,r),h==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=L.CData,this.value=this.stringify.cdata(h)}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},i}(g)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,S,g=function(o,i){for(var r in i)_.call(i,r)&&(o[r]=i[r]);function h(){this.constructor=o}return h.prototype=i.prototype,o.prototype=new h,o.__super__=i.prototype,o},_={}.hasOwnProperty;S=I("./XMLNode"),Z.exports=L=function(d){g(o,d);function o(i){o.__super__.constructor.call(this,i),this.value=""}return Object.defineProperty(o.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(o.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(o.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),o.prototype.clone=function(){return(0,m.default)(this)},o.prototype.substringData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.appendData=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.insertData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.deleteData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceData=function(i,r,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(i){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?!(i.data!==this.data):!1},o}(S)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,S,g,_=function(i,r){for(var h in r)d.call(r,h)&&(i[h]=r[h]);function p(){this.constructor=i}return p.prototype=r.prototype,i.prototype=new p,i.__super__=r.prototype,i},d={}.hasOwnProperty;L=I("./NodeType"),S=I("./XMLCharacterData"),Z.exports=g=function(o){_(i,o);function i(r,h){if(i.__super__.constructor.call(this,r),h==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=L.Comment,this.value=this.stringify.comment(h)}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},i}(S)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=S(P),T=I("babel-runtime/core-js/object/create"),L=S(T);function S(g){return g&&g.__esModule?g:{default:g}}(function(){var g,_,d;_=I("./XMLDOMErrorHandler"),d=I("./XMLDOMStringList"),Z.exports=g=function(){function o(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new _,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=i=(0,L.default)(this.defaultParams)}return Object.defineProperty(o.prototype,"parameterNames",{get:function(){return new d((0,m.default)(this.defaultParams))}}),o.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},o.prototype.canSetParameter=function(i,r){return!0},o.prototype.setParameter=function(i,r){return r!=null?this.params[i]=r:delete this.params[i]},o}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(I,Z,N){"use strict";(function(){var P;Z.exports=P=function(){function m(){}return m.prototype.handleError=function(T){throw new Error(T)},m}()}).call(void 0)},{}],260:[function(I,Z,N){"use strict";(function(){var P;Z.exports=P=function(){function m(){}return m.prototype.hasFeature=function(T,L){return!0},m.prototype.createDocumentType=function(T,L,S){throw new Error("This DOM method is not implemented.")},m.prototype.createDocument=function(T,L,S){throw new Error("This DOM method is not implemented.")},m.prototype.createHTMLDocument=function(T){throw new Error("This DOM method is not implemented.")},m.prototype.getFeature=function(T,L){throw new Error("This DOM method is not implemented.")},m}()}).call(void 0)},{}],261:[function(I,Z,N){"use strict";(function(){var P;Z.exports=P=function(){function m(T){this.arr=T||[]}return Object.defineProperty(m.prototype,"length",{get:function(){return this.arr.length}}),m.prototype.item=function(T){return this.arr[T]||null},m.prototype.contains=function(T){return this.arr.indexOf(T)!==-1},m}()}).call(void 0)},{}],262:[function(I,Z,N){"use strict";(function(){var P,m,T,L=function(_,d){for(var o in d)S.call(d,o)&&(_[o]=d[o]);function i(){this.constructor=_}return i.prototype=d.prototype,_.prototype=new i,_.__super__=d.prototype,_},S={}.hasOwnProperty;T=I("./XMLNode"),P=I("./NodeType"),Z.exports=m=function(g){L(_,g);function _(d,o,i,r,h,p){if(_.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(i==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(o));if(!r)throw new Error("Missing DTD attribute type. "+this.debugInfo(o));if(!h)throw new Error("Missing DTD attribute default. "+this.debugInfo(o));if(h.indexOf("#")!==0&&(h="#"+h),!h.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o));if(p&&!h.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o));this.elementName=this.stringify.name(o),this.type=P.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(r),p&&(this.defaultValue=this.stringify.dtdAttDefault(p)),this.defaultValueType=h}return _.prototype.toString=function(d){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(d))},_}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(I,Z,N){"use strict";(function(){var P,m,T,L=function(_,d){for(var o in d)S.call(d,o)&&(_[o]=d[o]);function i(){this.constructor=_}return i.prototype=d.prototype,_.prototype=new i,_.__super__=d.prototype,_},S={}.hasOwnProperty;T=I("./XMLNode"),P=I("./NodeType"),Z.exports=m=function(g){L(_,g);function _(d,o,i){if(_.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(o),this.type=P.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return _.prototype.toString=function(d){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(d))},_}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(I,Z,N){"use strict";(function(){var P,m,T,L,S=function(d,o){for(var i in o)g.call(o,i)&&(d[i]=o[i]);function r(){this.constructor=d}return r.prototype=o.prototype,d.prototype=new r,d.__super__=o.prototype,d},g={}.hasOwnProperty;L=I("./Utility").isObject,T=I("./XMLNode"),P=I("./NodeType"),Z.exports=m=function(_){S(d,_);function d(o,i,r,h){if(d.__super__.constructor.call(this,o),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(h==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!i,this.name=this.stringify.name(r),this.type=P.EntityDeclaration,!L(h))this.value=this.stringify.dtdEntityValue(h),this.internal=!0;else{if(!h.pubID&&!h.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(h.pubID&&!h.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,h.pubID!=null&&(this.pubID=this.stringify.dtdPubID(h.pubID)),h.sysID!=null&&(this.sysID=this.stringify.dtdSysID(h.sysID)),h.nData!=null&&(this.nData=this.stringify.dtdNData(h.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}}return Object.defineProperty(d.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(d.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(d.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(d.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"xmlVersion",{get:function(){return null}}),d.prototype.toString=function(o){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(o))},d}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(I,Z,N){"use strict";(function(){var P,m,T,L=function(_,d){for(var o in d)S.call(d,o)&&(_[o]=d[o]);function i(){this.constructor=_}return i.prototype=d.prototype,_.prototype=new i,_.__super__=d.prototype,_},S={}.hasOwnProperty;T=I("./XMLNode"),P=I("./NodeType"),Z.exports=m=function(g){L(_,g);function _(d,o,i){if(_.__super__.constructor.call(this,d),o==null)throw new Error("Missing DTD notation name. "+this.debugInfo(o));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o));this.name=this.stringify.name(o),this.type=P.NotationDeclaration,i.pubID!=null&&(this.pubID=this.stringify.dtdPubID(i.pubID)),i.sysID!=null&&(this.sysID=this.stringify.dtdSysID(i.sysID))}return Object.defineProperty(_.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(_.prototype,"systemId",{get:function(){return this.sysID}}),_.prototype.toString=function(d){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(d))},_}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(I,Z,N){"use strict";(function(){var P,m,T,L,S=function(d,o){for(var i in o)g.call(o,i)&&(d[i]=o[i]);function r(){this.constructor=d}return r.prototype=o.prototype,d.prototype=new r,d.__super__=o.prototype,d},g={}.hasOwnProperty;L=I("./Utility").isObject,T=I("./XMLNode"),P=I("./NodeType"),Z.exports=m=function(_){S(d,_);function d(o,i,r,h){var p;d.__super__.constructor.call(this,o),L(i)&&(p=i,i=p.version,r=p.encoding,h=p.standalone),i||(i="1.0"),this.type=P.Declaration,this.version=this.stringify.xmlVersion(i),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),h!=null&&(this.standalone=this.stringify.xmlStandalone(h))}return d.prototype.toString=function(o){return this.options.writer.declaration(this,this.options.writer.filterOptions(o))},d}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(I,Z,N){"use strict";(function(){var P,m,T,L,S,g,_,d,o,i=function(p,f){for(var x in f)r.call(f,x)&&(p[x]=f[x]);function v(){this.constructor=p}return v.prototype=f.prototype,p.prototype=new v,p.__super__=f.prototype,p},r={}.hasOwnProperty;o=I("./Utility").isObject,d=I("./XMLNode"),P=I("./NodeType"),m=I("./XMLDTDAttList"),L=I("./XMLDTDEntity"),T=I("./XMLDTDElement"),S=I("./XMLDTDNotation"),_=I("./XMLNamedNodeMap"),Z.exports=g=function(h){i(p,h);function p(f,x,v){var l,n,s,u,w,y;if(p.__super__.constructor.call(this,f),this.type=P.DocType,f.children){for(u=f.children,n=0,s=u.length;n<s;n++)if(l=u[n],l.type===P.Element){this.name=l.name;break}}this.documentObject=f,o(x)&&(w=x,x=w.pubID,v=w.sysID),v==null&&(y=[x,v],v=y[0],x=y[1]),x!=null&&(this.pubID=this.stringify.dtdPubID(x)),v!=null&&(this.sysID=this.stringify.dtdSysID(v))}return Object.defineProperty(p.prototype,"entities",{get:function(){var x,v,l,n,s;for(n={},s=this.children,v=0,l=s.length;v<l;v++)x=s[v],x.type===P.EntityDeclaration&&!x.pe&&(n[x.name]=x);return new _(n)}}),Object.defineProperty(p.prototype,"notations",{get:function(){var x,v,l,n,s;for(n={},s=this.children,v=0,l=s.length;v<l;v++)x=s[v],x.type===P.NotationDeclaration&&(n[x.name]=x);return new _(n)}}),Object.defineProperty(p.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(p.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(p.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),p.prototype.element=function(f,x){var v;return v=new T(this,f,x),this.children.push(v),this},p.prototype.attList=function(f,x,v,l,n){var s;return s=new m(this,f,x,v,l,n),this.children.push(s),this},p.prototype.entity=function(f,x){var v;return v=new L(this,!1,f,x),this.children.push(v),this},p.prototype.pEntity=function(f,x){var v;return v=new L(this,!0,f,x),this.children.push(v),this},p.prototype.notation=function(f,x){var v;return v=new S(this,f,x),this.children.push(v),this},p.prototype.toString=function(f){return this.options.writer.docType(this,this.options.writer.filterOptions(f))},p.prototype.ele=function(f,x){return this.element(f,x)},p.prototype.att=function(f,x,v,l,n){return this.attList(f,x,v,l,n)},p.prototype.ent=function(f,x){return this.entity(f,x)},p.prototype.pent=function(f,x){return this.pEntity(f,x)},p.prototype.not=function(f,x){return this.notation(f,x)},p.prototype.up=function(){return this.root()||this.documentObject},p.prototype.isEqualNode=function(f){return p.__super__.isEqualNode.apply(this,arguments).isEqualNode(f)?f.name!==this.name||f.publicId!==this.publicId?!1:!(f.systemId!==this.systemId):!1},p}(d)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(I,Z,N){"use strict";(function(){var P,m,T,L,S,g,_,d,o=function(h,p){for(var f in p)i.call(p,f)&&(h[f]=p[f]);function x(){this.constructor=h}return x.prototype=p.prototype,h.prototype=new x,h.__super__=p.prototype,h},i={}.hasOwnProperty;d=I("./Utility").isPlainObject,T=I("./XMLDOMImplementation"),m=I("./XMLDOMConfiguration"),S=I("./XMLNode"),P=I("./NodeType"),_=I("./XMLStringifier"),g=I("./XMLStringWriter"),Z.exports=L=function(r){o(h,r);function h(p){h.__super__.constructor.call(this,null),this.name="#document",this.type=P.Document,this.documentURI=null,this.domConfig=new m,p||(p={}),p.writer||(p.writer=new g),this.options=p,this.stringify=new _(p)}return Object.defineProperty(h.prototype,"implementation",{value:new T}),Object.defineProperty(h.prototype,"doctype",{get:function(){var f,x,v,l;for(l=this.children,x=0,v=l.length;x<v;x++)if(f=l[x],f.type===P.DocType)return f;return null}}),Object.defineProperty(h.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(h.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(h.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(h.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].encoding:null}}),Object.defineProperty(h.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(h.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(h.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(h.prototype,"origin",{get:function(){return null}}),Object.defineProperty(h.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(h.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(h.prototype,"contentType",{get:function(){return null}}),h.prototype.end=function(p){var f;return f={},p?d(p)&&(f=p,p=this.options.writer):p=this.options.writer,p.document(this,p.filterOptions(f))},h.prototype.toString=function(p){return this.options.writer.document(this,this.options.writer.filterOptions(p))},h.prototype.createElement=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createTextNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createComment=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createCDATASection=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createProcessingInstruction=function(p,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createAttribute=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createEntityReference=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.importNode=function(p,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createElementNS=function(p,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createAttributeNS=function(p,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagNameNS=function(p,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementById=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.adoptNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.renameNode=function(p,f,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByClassName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createEvent=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createNodeIterator=function(p,f,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createTreeWalker=function(p,f,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},h}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(I,Z,N){"use strict";(function(){var P,m,T,L,S,g,_,d,o,i,r,h,p,f,x,v,l,n,s,u,w,y,a,R,D={}.hasOwnProperty;R=I("./Utility"),y=R.isObject,w=R.isFunction,a=R.isPlainObject,u=R.getValue,P=I("./NodeType"),h=I("./XMLDocument"),f=I("./XMLElement"),L=I("./XMLCData"),S=I("./XMLComment"),v=I("./XMLRaw"),s=I("./XMLText"),x=I("./XMLProcessingInstruction"),i=I("./XMLDeclaration"),r=I("./XMLDocType"),g=I("./XMLDTDAttList"),d=I("./XMLDTDEntity"),_=I("./XMLDTDElement"),o=I("./XMLDTDNotation"),T=I("./XMLAttribute"),n=I("./XMLStringifier"),l=I("./XMLStringWriter"),m=I("./WriterState"),Z.exports=p=function(){function c(b,E,C){var F;this.name="?xml",this.type=P.Document,b||(b={}),F={},b.writer?a(b.writer)&&(F=b.writer,b.writer=new l):b.writer=new l,this.options=b,this.writer=b.writer,this.writerOptions=this.writer.filterOptions(F),this.stringify=new n(b),this.onDataCallback=E||function(){},this.onEndCallback=C||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return c.prototype.createChildNode=function(b){var E,C,F,j,k,X,G,H;switch(b.type){case P.CData:this.cdata(b.value);break;case P.Comment:this.comment(b.value);break;case P.Element:F={},G=b.attribs;for(C in G){if(!D.call(G,C))continue;E=G[C],F[C]=E.value}this.node(b.name,F);break;case P.Dummy:this.dummy();break;case P.Raw:this.raw(b.value);break;case P.Text:this.text(b.value);break;case P.ProcessingInstruction:this.instruction(b.target,b.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+b.constructor.name)}for(H=b.children,k=0,X=H.length;k<X;k++)j=H[k],this.createChildNode(j),j.type===P.Element&&this.up();return this},c.prototype.dummy=function(){return this},c.prototype.node=function(b,E,C){var F;if(b==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(b));return this.openCurrent(),b=u(b),E==null&&(E={}),E=u(E),y(E)||(F=[E,C],C=F[0],E=F[1]),this.currentNode=new f(this,b,E),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,C!=null&&this.text(C),this},c.prototype.element=function(b,E,C){var F,j,k,X,G,H;if(this.currentNode&&this.currentNode.type===P.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(b)||y(b)||w(b))for(X=this.options.noValidation,this.options.noValidation=!0,H=new h(this.options).element("TEMP_ROOT"),H.element(b),this.options.noValidation=X,G=H.children,j=0,k=G.length;j<k;j++)F=G[j],this.createChildNode(F),F.type===P.Element&&this.up();else this.node(b,E,C);return this},c.prototype.attribute=function(b,E){var C,F;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(b));if(b!=null&&(b=u(b)),y(b))for(C in b){if(!D.call(b,C))continue;F=b[C],this.attribute(C,F)}else w(E)&&(E=E.apply()),this.options.keepNullAttributes&&E==null?this.currentNode.attribs[b]=new T(this,b,""):E!=null&&(this.currentNode.attribs[b]=new T(this,b,E));return this},c.prototype.text=function(b){var E;return this.openCurrent(),E=new s(this,b),this.onData(this.writer.text(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.cdata=function(b){var E;return this.openCurrent(),E=new L(this,b),this.onData(this.writer.cdata(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.comment=function(b){var E;return this.openCurrent(),E=new S(this,b),this.onData(this.writer.comment(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.raw=function(b){var E;return this.openCurrent(),E=new v(this,b),this.onData(this.writer.raw(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.instruction=function(b,E){var C,F,j,k,X;if(this.openCurrent(),b!=null&&(b=u(b)),E!=null&&(E=u(E)),Array.isArray(b))for(C=0,k=b.length;C<k;C++)F=b[C],this.instruction(F);else if(y(b))for(F in b){if(!D.call(b,F))continue;j=b[F],this.instruction(F,j)}else w(E)&&(E=E.apply()),X=new x(this,b,E),this.onData(this.writer.processingInstruction(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},c.prototype.declaration=function(b,E,C){var F;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return F=new i(this,b,E,C),this.onData(this.writer.declaration(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.doctype=function(b,E,C){if(this.openCurrent(),b==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,E,C),this.currentNode.rootNodeName=b,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},c.prototype.dtdElement=function(b,E){var C;return this.openCurrent(),C=new _(this,b,E),this.onData(this.writer.dtdElement(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.attList=function(b,E,C,F,j){var k;return this.openCurrent(),k=new g(this,b,E,C,F,j),this.onData(this.writer.dtdAttList(k,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.entity=function(b,E){var C;return this.openCurrent(),C=new d(this,!1,b,E),this.onData(this.writer.dtdEntity(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.pEntity=function(b,E){var C;return this.openCurrent(),C=new d(this,!0,b,E),this.onData(this.writer.dtdEntity(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.notation=function(b,E){var C;return this.openCurrent(),C=new o(this,b,E),this.onData(this.writer.dtdNotation(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.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},c.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},c.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},c.prototype.openNode=function(b){var E,C,F,j;if(!b.isOpen){if(!this.root&&this.currentLevel===0&&b.type===P.Element&&(this.root=b),C="",b.type===P.Element){this.writerOptions.state=m.OpenTag,C=this.writer.indent(b,this.writerOptions,this.currentLevel)+"<"+b.name,j=b.attribs;for(F in j){if(!D.call(j,F))continue;E=j[F],C+=this.writer.attribute(E,this.writerOptions,this.currentLevel)}C+=(b.children?">":"/>")+this.writer.endline(b,this.writerOptions,this.currentLevel),this.writerOptions.state=m.InsideTag}else this.writerOptions.state=m.OpenTag,C=this.writer.indent(b,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+b.rootNodeName,b.pubID&&b.sysID?C+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(C+=' SYSTEM "'+b.sysID+'"'),b.children?(C+=" [",this.writerOptions.state=m.InsideTag):(this.writerOptions.state=m.CloseTag,C+=">"),C+=this.writer.endline(b,this.writerOptions,this.currentLevel);return this.onData(C,this.currentLevel),b.isOpen=!0}},c.prototype.closeNode=function(b){var E;if(!b.isClosed)return E="",this.writerOptions.state=m.CloseTag,b.type===P.Element?E=this.writer.indent(b,this.writerOptions,this.currentLevel)+"</"+b.name+">"+this.writer.endline(b,this.writerOptions,this.currentLevel):E=this.writer.indent(b,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(b,this.writerOptions,this.currentLevel),this.writerOptions.state=m.None,this.onData(E,this.currentLevel),b.isClosed=!0},c.prototype.onData=function(b,E){return this.documentStarted=!0,this.onDataCallback(b,E+1)},c.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},c.prototype.debugInfo=function(b){return b==null?"":"node: <"+b+">"},c.prototype.ele=function(){return this.element.apply(this,arguments)},c.prototype.nod=function(b,E,C){return this.node(b,E,C)},c.prototype.txt=function(b){return this.text(b)},c.prototype.dat=function(b){return this.cdata(b)},c.prototype.com=function(b){return this.comment(b)},c.prototype.ins=function(b,E){return this.instruction(b,E)},c.prototype.dec=function(b,E,C){return this.declaration(b,E,C)},c.prototype.dtd=function(b,E,C){return this.doctype(b,E,C)},c.prototype.e=function(b,E,C){return this.element(b,E,C)},c.prototype.n=function(b,E,C){return this.node(b,E,C)},c.prototype.t=function(b){return this.text(b)},c.prototype.d=function(b){return this.cdata(b)},c.prototype.c=function(b){return this.comment(b)},c.prototype.r=function(b){return this.raw(b)},c.prototype.i=function(b,E){return this.instruction(b,E)},c.prototype.att=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},c.prototype.a=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},c.prototype.ent=function(b,E){return this.entity(b,E)},c.prototype.pent=function(b,E){return this.pEntity(b,E)},c.prototype.not=function(b,E){return this.notation(b,E)},c}()}).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(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,S,g,_=function(i,r){for(var h in r)d.call(r,h)&&(i[h]=r[h]);function p(){this.constructor=i}return p.prototype=r.prototype,i.prototype=new p,i.__super__=r.prototype,i},d={}.hasOwnProperty;g=I("./XMLNode"),L=I("./NodeType"),Z.exports=S=function(o){_(i,o);function i(r){i.__super__.constructor.call(this,r),this.type=L.Dummy}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return""},i}(g)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,S,g,_,d,o,i,r,h,p=function(v,l){for(var n in l)f.call(l,n)&&(v[n]=l[n]);function s(){this.constructor=v}return s.prototype=l.prototype,v.prototype=new s,v.__super__=l.prototype,v},f={}.hasOwnProperty;h=I("./Utility"),r=h.isObject,i=h.isFunction,o=h.getValue,d=I("./XMLNode"),L=I("./NodeType"),S=I("./XMLAttribute"),_=I("./XMLNamedNodeMap"),Z.exports=g=function(x){p(v,x);function v(l,n,s){var u,w,y,a;if(v.__super__.constructor.call(this,l),n==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=L.Element,this.attribs={},this.schemaTypeInfo=null,s!=null&&this.attribute(s),l.type===L.Document&&(this.isRoot=!0,this.documentObject=l,l.rootObject=this,l.children)){for(a=l.children,w=0,y=a.length;w<y;w++)if(u=a[w],u.type===L.DocType){u.name=this.name;break}}}return Object.defineProperty(v.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(v.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(v.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(v.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(v.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(v.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(v.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(v.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new _(this.attribs)),this.attributeMap}}),v.prototype.clone=function(){var l,n,s,u;s=(0,m.default)(this),s.isRoot&&(s.documentObject=null),s.attribs={},u=this.attribs;for(n in u){if(!f.call(u,n))continue;l=u[n],s.attribs[n]=l.clone()}return s.children=[],this.children.forEach(function(w){var y;return y=w.clone(),y.parent=s,s.children.push(y)}),s},v.prototype.attribute=function(l,n){var s,u;if(l!=null&&(l=o(l)),r(l))for(s in l){if(!f.call(l,s))continue;u=l[s],this.attribute(s,u)}else i(n)&&(n=n.apply()),this.options.keepNullAttributes&&n==null?this.attribs[l]=new S(this,l,""):n!=null&&(this.attribs[l]=new S(this,l,n));return this},v.prototype.removeAttribute=function(l){var n,s,u;if(l==null)throw new Error("Missing attribute name. "+this.debugInfo());if(l=o(l),Array.isArray(l))for(s=0,u=l.length;s<u;s++)n=l[s],delete this.attribs[n];else delete this.attribs[l];return this},v.prototype.toString=function(l){return this.options.writer.element(this,this.options.writer.filterOptions(l))},v.prototype.att=function(l,n){return this.attribute(l,n)},v.prototype.a=function(l,n){return this.attribute(l,n)},v.prototype.getAttribute=function(l){return this.attribs.hasOwnProperty(l)?this.attribs[l].value:null},v.prototype.setAttribute=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getAttributeNode=function(l){return this.attribs.hasOwnProperty(l)?this.attribs[l]:null},v.prototype.setAttributeNode=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.removeAttributeNode=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getElementsByTagName=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getAttributeNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.setAttributeNS=function(l,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.removeAttributeNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getAttributeNodeNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.setAttributeNodeNS=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getElementsByTagNameNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.hasAttribute=function(l){return this.attribs.hasOwnProperty(l)},v.prototype.hasAttributeNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.setIdAttribute=function(l,n){return this.attribs.hasOwnProperty(l)?this.attribs[l].isId:n},v.prototype.setIdAttributeNS=function(l,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.setIdAttributeNode=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getElementsByTagName=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getElementsByTagNameNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getElementsByClassName=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.isEqualNode=function(l){var n,s,u;if(!v.__super__.isEqualNode.apply(this,arguments).isEqualNode(l))return!1;if(l.namespaceURI!==this.namespaceURI)return!1;if(l.prefix!==this.prefix)return!1;if(l.localName!==this.localName)return!1;if(l.attribs.length!==this.attribs.length)return!1;for(n=s=0,u=this.attribs.length-1;0<=u?s<=u:s>=u;n=0<=u?++s:--s)if(!this.attribs[n].isEqualNode(l.attribs[n]))return!1;return!0},v}(d)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L;Z.exports=L=function(){function S(g){this.nodes=g}return Object.defineProperty(S.prototype,"length",{get:function(){return(0,m.default)(this.nodes).length||0}}),S.prototype.clone=function(){return this.nodes=null},S.prototype.getNamedItem=function(g){return this.nodes[g]},S.prototype.setNamedItem=function(g){var _;return _=this.nodes[g.nodeName],this.nodes[g.nodeName]=g,_||null},S.prototype.removeNamedItem=function(g){var _;return _=this.nodes[g],delete this.nodes[g],_||null},S.prototype.item=function(g){return this.nodes[(0,m.default)(this.nodes)[g]]||null},S.prototype.getNamedItemNS=function(g,_){throw new Error("This DOM method is not implemented.")},S.prototype.setNamedItemNS=function(g){throw new Error("This DOM method is not implemented.")},S.prototype.removeNamedItemNS=function(g,_){throw new Error("This DOM method is not implemented.")},S}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(I,Z,N){"use strict";(function(){var P,m,T,L,S,g,_,d,o,i,r,h,p,f,x,v,l,n,s,u={}.hasOwnProperty;s=I("./Utility"),n=s.isObject,l=s.isFunction,v=s.isEmpty,x=s.getValue,d=null,T=null,L=null,S=null,g=null,p=null,f=null,h=null,_=null,m=null,r=null,o=null,P=null,Z.exports=i=function(){function w(y){this.parent=y,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,d||(d=I("./XMLElement"),T=I("./XMLCData"),L=I("./XMLComment"),S=I("./XMLDeclaration"),g=I("./XMLDocType"),p=I("./XMLRaw"),f=I("./XMLText"),h=I("./XMLProcessingInstruction"),_=I("./XMLDummy"),m=I("./NodeType"),r=I("./XMLNodeList"),o=I("./XMLNamedNodeMap"),P=I("./DocumentPosition"))}return Object.defineProperty(w.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(w.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(w.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(w.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(w.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new r(this.children)),this.childNodeList}}),Object.defineProperty(w.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(w.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(w.prototype,"previousSibling",{get:function(){var a;return a=this.parent.children.indexOf(this),this.parent.children[a-1]||null}}),Object.defineProperty(w.prototype,"nextSibling",{get:function(){var a;return a=this.parent.children.indexOf(this),this.parent.children[a+1]||null}}),Object.defineProperty(w.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(w.prototype,"textContent",{get:function(){var a,R,D,c,b;if(this.nodeType===m.Element||this.nodeType===m.DocumentFragment){for(b="",c=this.children,R=0,D=c.length;R<D;R++)a=c[R],a.textContent&&(b+=a.textContent);return b}else return null},set:function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),w.prototype.setParent=function(y){var a,R,D,c,b;for(this.parent=y,y&&(this.options=y.options,this.stringify=y.stringify),c=this.children,b=[],R=0,D=c.length;R<D;R++)a=c[R],b.push(a.setParent(this));return b},w.prototype.element=function(y,a,R){var D,c,b,E,C,F,j,k,X,G,H;if(F=null,a===null&&R==null&&(X=[{},null],a=X[0],R=X[1]),a==null&&(a={}),a=x(a),n(a)||(G=[a,R],R=G[0],a=G[1]),y!=null&&(y=x(y)),Array.isArray(y))for(b=0,j=y.length;b<j;b++)c=y[b],F=this.element(c);else if(l(y))F=this.element(y.apply());else if(n(y))for(C in y){if(!u.call(y,C))continue;if(H=y[C],l(H)&&(H=H.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&C.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(C.substr(this.stringify.convertAttKey.length),H);else if(!this.options.separateArrayItems&&Array.isArray(H)&&v(H))F=this.dummy();else if(n(H)&&v(H))F=this.element(C);else if(!this.options.keepNullNodes&&H==null)F=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(H))for(E=0,k=H.length;E<k;E++)c=H[E],D={},D[C]=c,F=this.element(D);else n(H)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&C.indexOf(this.stringify.convertTextKey)===0?F=this.element(H):(F=this.element(C),F.element(H)):F=this.element(C,H)}else!this.options.keepNullNodes&&R===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&y.indexOf(this.stringify.convertTextKey)===0?F=this.text(R):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&y.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(R):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&y.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(R):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&y.indexOf(this.stringify.convertRawKey)===0?F=this.raw(R):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&y.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(y.substr(this.stringify.convertPIKey.length),R):F=this.node(y,a,R);if(F==null)throw new Error("Could not create any elements with: "+y+". "+this.debugInfo());return F},w.prototype.insertBefore=function(y,a,R){var D,c,b,E,C;if(y!=null?y.type:void 0)return b=y,E=a,b.setParent(this),E?(c=children.indexOf(E),C=children.splice(c),children.push(b),Array.prototype.push.apply(children,C)):children.push(b),b;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(y));return c=this.parent.children.indexOf(this),C=this.parent.children.splice(c),D=this.parent.element(y,a,R),Array.prototype.push.apply(this.parent.children,C),D},w.prototype.insertAfter=function(y,a,R){var D,c,b;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(y));return c=this.parent.children.indexOf(this),b=this.parent.children.splice(c+1),D=this.parent.element(y,a,R),Array.prototype.push.apply(this.parent.children,b),D},w.prototype.remove=function(){var y,a;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return y=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[y,y-y+1].concat(a=[])),this.parent},w.prototype.node=function(y,a,R){var D,c;return y!=null&&(y=x(y)),a||(a={}),a=x(a),n(a)||(c=[a,R],R=c[0],a=c[1]),D=new d(this,y,a),R!=null&&D.text(R),this.children.push(D),D},w.prototype.text=function(y){var a;return n(y)&&this.element(y),a=new f(this,y),this.children.push(a),this},w.prototype.cdata=function(y){var a;return a=new T(this,y),this.children.push(a),this},w.prototype.comment=function(y){var a;return a=new L(this,y),this.children.push(a),this},w.prototype.commentBefore=function(y){var a,R,D;return R=this.parent.children.indexOf(this),D=this.parent.children.splice(R),a=this.parent.comment(y),Array.prototype.push.apply(this.parent.children,D),this},w.prototype.commentAfter=function(y){var a,R,D;return R=this.parent.children.indexOf(this),D=this.parent.children.splice(R+1),a=this.parent.comment(y),Array.prototype.push.apply(this.parent.children,D),this},w.prototype.raw=function(y){var a;return a=new p(this,y),this.children.push(a),this},w.prototype.dummy=function(){var y;return y=new _(this),y},w.prototype.instruction=function(y,a){var R,D,c,b,E;if(y!=null&&(y=x(y)),a!=null&&(a=x(a)),Array.isArray(y))for(b=0,E=y.length;b<E;b++)R=y[b],this.instruction(R);else if(n(y))for(R in y){if(!u.call(y,R))continue;D=y[R],this.instruction(R,D)}else l(a)&&(a=a.apply()),c=new h(this,y,a),this.children.push(c);return this},w.prototype.instructionBefore=function(y,a){var R,D,c;return D=this.parent.children.indexOf(this),c=this.parent.children.splice(D),R=this.parent.instruction(y,a),Array.prototype.push.apply(this.parent.children,c),this},w.prototype.instructionAfter=function(y,a){var R,D,c;return D=this.parent.children.indexOf(this),c=this.parent.children.splice(D+1),R=this.parent.instruction(y,a),Array.prototype.push.apply(this.parent.children,c),this},w.prototype.declaration=function(y,a,R){var D,c;return D=this.document(),c=new S(D,y,a,R),D.children.length===0?D.children.unshift(c):D.children[0].type===m.Declaration?D.children[0]=c:D.children.unshift(c),D.root()||D},w.prototype.dtd=function(y,a){var R,D,c,b,E,C,F,j,k,X;for(D=this.document(),c=new g(D,y,a),k=D.children,b=E=0,F=k.length;E<F;b=++E)if(R=k[b],R.type===m.DocType)return D.children[b]=c,c;for(X=D.children,b=C=0,j=X.length;C<j;b=++C)if(R=X[b],R.isRoot)return D.children.splice(b,0,c),c;return D.children.push(c),c},w.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},w.prototype.root=function(){var y;for(y=this;y;){if(y.type===m.Document)return y.rootObject;if(y.isRoot)return y;y=y.parent}},w.prototype.document=function(){var y;for(y=this;y;){if(y.type===m.Document)return y;y=y.parent}},w.prototype.end=function(y){return this.document().end(y)},w.prototype.prev=function(){var y;if(y=this.parent.children.indexOf(this),y<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[y-1]},w.prototype.next=function(){var y;if(y=this.parent.children.indexOf(this),y===-1||y===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[y+1]},w.prototype.importDocument=function(y){var a;return a=y.root().clone(),a.parent=this,a.isRoot=!1,this.children.push(a),this},w.prototype.debugInfo=function(y){var a,R;return y=y||this.name,y==null&&!((a=this.parent)!=null?a.name:void 0)?"":y==null?"parent: <"+this.parent.name+">":((R=this.parent)!=null?R.name:void 0)?"node: <"+y+">, parent: <"+this.parent.name+">":"node: <"+y+">"},w.prototype.ele=function(y,a,R){return this.element(y,a,R)},w.prototype.nod=function(y,a,R){return this.node(y,a,R)},w.prototype.txt=function(y){return this.text(y)},w.prototype.dat=function(y){return this.cdata(y)},w.prototype.com=function(y){return this.comment(y)},w.prototype.ins=function(y,a){return this.instruction(y,a)},w.prototype.doc=function(){return this.document()},w.prototype.dec=function(y,a,R){return this.declaration(y,a,R)},w.prototype.e=function(y,a,R){return this.element(y,a,R)},w.prototype.n=function(y,a,R){return this.node(y,a,R)},w.prototype.t=function(y){return this.text(y)},w.prototype.d=function(y){return this.cdata(y)},w.prototype.c=function(y){return this.comment(y)},w.prototype.r=function(y){return this.raw(y)},w.prototype.i=function(y,a){return this.instruction(y,a)},w.prototype.u=function(){return this.up()},w.prototype.importXMLBuilder=function(y){return this.importDocument(y)},w.prototype.replaceChild=function(y,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.removeChild=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendChild=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.hasChildNodes=function(){return this.children.length!==0},w.prototype.cloneNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isSupported=function(y,a){return!0},w.prototype.hasAttributes=function(){return this.attribs.length!==0},w.prototype.compareDocumentPosition=function(y){var a,R;return a=this,a===y?0:this.document()!==y.document()?(R=P.Disconnected|P.ImplementationSpecific,Math.random()<.5?R|=P.Preceding:R|=P.Following,R):a.isAncestor(y)?P.Contains|P.Preceding:a.isDescendant(y)?P.Contains|P.Following:a.isPreceding(y)?P.Preceding:P.Following},w.prototype.isSameNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupPrefix=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isDefaultNamespace=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupNamespaceURI=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(y){var a,R,D;if(y.nodeType!==this.nodeType)return!1;if(y.children.length!==this.children.length)return!1;for(a=R=0,D=this.children.length-1;0<=D?R<=D:R>=D;a=0<=D?++R:--R)if(!this.children[a].isEqualNode(y.children[a]))return!1;return!0},w.prototype.getFeature=function(y,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.setUserData=function(y,a,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getUserData=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.contains=function(y){return y?y===this||this.isDescendant(y):!1},w.prototype.isDescendant=function(y){var a,R,D,c,b;for(b=this.children,D=0,c=b.length;D<c;D++){if(a=b[D],y===a)return!0;if(R=a.isDescendant(y),R)return!0}return!1},w.prototype.isAncestor=function(y){return y.isDescendant(this)},w.prototype.isPreceding=function(y){var a,R;return a=this.treePosition(y),R=this.treePosition(this),a===-1||R===-1?!1:a<R},w.prototype.isFollowing=function(y){var a,R;return a=this.treePosition(y),R=this.treePosition(this),a===-1||R===-1?!1:a>R},w.prototype.treePosition=function(y){var a,R;return R=0,a=!1,this.foreachTreeNode(this.document(),function(D){if(R++,!a&&D===y)return a=!0}),a?R:-1},w.prototype.foreachTreeNode=function(y,a){var R,D,c,b,E;for(y||(y=this.document()),b=y.children,D=0,c=b.length;D<c;D++){if(R=b[D],E=a(R))return E;if(E=this.foreachTreeNode(R,a),E)return E}},w}()}).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(I,Z,N){"use strict";(function(){var P;Z.exports=P=function(){function m(T){this.nodes=T}return Object.defineProperty(m.prototype,"length",{get:function(){return this.nodes.length||0}}),m.prototype.clone=function(){return this.nodes=null},m.prototype.item=function(T){return this.nodes[T]||null},m}()}).call(void 0)},{}],275:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,S,g,_=function(i,r){for(var h in r)d.call(r,h)&&(i[h]=r[h]);function p(){this.constructor=i}return p.prototype=r.prototype,i.prototype=new p,i.__super__=r.prototype,i},d={}.hasOwnProperty;L=I("./NodeType"),S=I("./XMLCharacterData"),Z.exports=g=function(o){_(i,o);function i(r,h,p){if(i.__super__.constructor.call(this,r),h==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=L.ProcessingInstruction,this.target=this.stringify.insTarget(h),this.name=this.target,p&&(this.value=this.stringify.insValue(p))}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))},i.prototype.isEqualNode=function(r){return i.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)?!(r.target!==this.target):!1},i}(S)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,S,g,_=function(i,r){for(var h in r)d.call(r,h)&&(i[h]=r[h]);function p(){this.constructor=i}return p.prototype=r.prototype,i.prototype=new p,i.__super__=r.prototype,i},d={}.hasOwnProperty;L=I("./NodeType"),S=I("./XMLNode"),Z.exports=g=function(o){_(i,o);function i(r,h){if(i.__super__.constructor.call(this,r),h==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=L.Raw,this.value=this.stringify.raw(h)}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))},i}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(I,Z,N){"use strict";(function(){var P,m,T,L,S=function(d,o){for(var i in o)g.call(o,i)&&(d[i]=o[i]);function r(){this.constructor=d}return r.prototype=o.prototype,d.prototype=new r,d.__super__=o.prototype,d},g={}.hasOwnProperty;P=I("./NodeType"),L=I("./XMLWriterBase"),m=I("./WriterState"),Z.exports=T=function(_){S(d,_);function d(o,i){this.stream=o,d.__super__.constructor.call(this,i)}return d.prototype.endline=function(o,i,r){return o.isLastRootNode&&i.state===m.CloseTag?"":d.__super__.endline.call(this,o,i,r)},d.prototype.document=function(o,i){var r,h,p,f,x,v,l,n,s;for(l=o.children,h=p=0,x=l.length;p<x;h=++p)r=l[h],r.isLastRootNode=h===o.children.length-1;for(i=this.filterOptions(i),n=o.children,s=[],f=0,v=n.length;f<v;f++)r=n[f],s.push(this.writeChildNode(r,i,0));return s},d.prototype.attribute=function(o,i,r){return this.stream.write(d.__super__.attribute.call(this,o,i,r))},d.prototype.cdata=function(o,i,r){return this.stream.write(d.__super__.cdata.call(this,o,i,r))},d.prototype.comment=function(o,i,r){return this.stream.write(d.__super__.comment.call(this,o,i,r))},d.prototype.declaration=function(o,i,r){return this.stream.write(d.__super__.declaration.call(this,o,i,r))},d.prototype.docType=function(o,i,r){var h,p,f,x;if(r||(r=0),this.openNode(o,i,r),i.state=m.OpenTag,this.stream.write(this.indent(o,i,r)),this.stream.write("<!DOCTYPE "+o.root().name),o.pubID&&o.sysID?this.stream.write(' PUBLIC "'+o.pubID+'" "'+o.sysID+'"'):o.sysID&&this.stream.write(' SYSTEM "'+o.sysID+'"'),o.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(o,i,r)),i.state=m.InsideTag,x=o.children,p=0,f=x.length;p<f;p++)h=x[p],this.writeChildNode(h,i,r+1);i.state=m.CloseTag,this.stream.write("]")}return i.state=m.CloseTag,this.stream.write(i.spaceBeforeSlash+">"),this.stream.write(this.endline(o,i,r)),i.state=m.None,this.closeNode(o,i,r)},d.prototype.element=function(o,i,r){var h,p,f,x,v,l,n,s,u,w;r||(r=0),this.openNode(o,i,r),i.state=m.OpenTag,this.stream.write(this.indent(o,i,r)+"<"+o.name),u=o.attribs;for(n in u){if(!g.call(u,n))continue;h=u[n],this.attribute(h,i,r)}if(f=o.children.length,x=f===0?null:o.children[0],f===0||o.children.every(function(y){return(y.type===P.Text||y.type===P.Raw)&&y.value===""}))i.allowEmpty?(this.stream.write(">"),i.state=m.CloseTag,this.stream.write("</"+o.name+">")):(i.state=m.CloseTag,this.stream.write(i.spaceBeforeSlash+"/>"));else if(i.pretty&&f===1&&(x.type===P.Text||x.type===P.Raw)&&x.value!=null)this.stream.write(">"),i.state=m.InsideTag,i.suppressPrettyCount++,s=!0,this.writeChildNode(x,i,r+1),i.suppressPrettyCount--,s=!1,i.state=m.CloseTag,this.stream.write("</"+o.name+">");else{for(this.stream.write(">"+this.endline(o,i,r)),i.state=m.InsideTag,w=o.children,v=0,l=w.length;v<l;v++)p=w[v],this.writeChildNode(p,i,r+1);i.state=m.CloseTag,this.stream.write(this.indent(o,i,r)+"</"+o.name+">")}return this.stream.write(this.endline(o,i,r)),i.state=m.None,this.closeNode(o,i,r)},d.prototype.processingInstruction=function(o,i,r){return this.stream.write(d.__super__.processingInstruction.call(this,o,i,r))},d.prototype.raw=function(o,i,r){return this.stream.write(d.__super__.raw.call(this,o,i,r))},d.prototype.text=function(o,i,r){return this.stream.write(d.__super__.text.call(this,o,i,r))},d.prototype.dtdAttList=function(o,i,r){return this.stream.write(d.__super__.dtdAttList.call(this,o,i,r))},d.prototype.dtdElement=function(o,i,r){return this.stream.write(d.__super__.dtdElement.call(this,o,i,r))},d.prototype.dtdEntity=function(o,i,r){return this.stream.write(d.__super__.dtdEntity.call(this,o,i,r))},d.prototype.dtdNotation=function(o,i,r){return this.stream.write(d.__super__.dtdNotation.call(this,o,i,r))},d}(L)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(I,Z,N){"use strict";(function(){var P,m,T=function(g,_){for(var d in _)L.call(_,d)&&(g[d]=_[d]);function o(){this.constructor=g}return o.prototype=_.prototype,g.prototype=new o,g.__super__=_.prototype,g},L={}.hasOwnProperty;m=I("./XMLWriterBase"),Z.exports=P=function(S){T(g,S);function g(_){g.__super__.constructor.call(this,_)}return g.prototype.document=function(_,d){var o,i,r,h,p;for(d=this.filterOptions(d),h="",p=_.children,i=0,r=p.length;i<r;i++)o=p[i],h+=this.writeChildNode(o,d,0);return d.pretty&&h.slice(-d.newline.length)===d.newline&&(h=h.slice(0,-d.newline.length)),h},g}(m)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(I,Z,N){"use strict";(function(){var P,m=function(S,g){return function(){return S.apply(g,arguments)}},T={}.hasOwnProperty;Z.exports=P=function(){function L(S){this.assertLegalName=m(this.assertLegalName,this),this.assertLegalChar=m(this.assertLegalChar,this);var g,_,d;S||(S={}),this.options=S,this.options.version||(this.options.version="1.0"),_=S.stringify||{};for(g in _){if(!T.call(_,g))continue;d=_[g],this[g]=d}}return L.prototype.name=function(S){return this.options.noValidation?S:this.assertLegalName(""+S||"")},L.prototype.text=function(S){return this.options.noValidation?S:this.assertLegalChar(this.textEscape(""+S||""))},L.prototype.cdata=function(S){return this.options.noValidation?S:(S=""+S||"",S=S.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(S))},L.prototype.comment=function(S){if(this.options.noValidation)return S;if(S=""+S||"",S.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+S);return this.assertLegalChar(S)},L.prototype.raw=function(S){return this.options.noValidation?S:""+S||""},L.prototype.attValue=function(S){return this.options.noValidation?S:this.assertLegalChar(this.attEscape(S=""+S||""))},L.prototype.insTarget=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},L.prototype.insValue=function(S){if(this.options.noValidation)return S;if(S=""+S||"",S.match(/\?>/))throw new Error("Invalid processing instruction value: "+S);return this.assertLegalChar(S)},L.prototype.xmlVersion=function(S){if(this.options.noValidation)return S;if(S=""+S||"",!S.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+S);return S},L.prototype.xmlEncoding=function(S){if(this.options.noValidation)return S;if(S=""+S||"",!S.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+S);return this.assertLegalChar(S)},L.prototype.xmlStandalone=function(S){return this.options.noValidation?S:S?"yes":"no"},L.prototype.dtdPubID=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},L.prototype.dtdSysID=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},L.prototype.dtdElementValue=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},L.prototype.dtdAttType=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},L.prototype.dtdAttDefault=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},L.prototype.dtdEntityValue=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},L.prototype.dtdNData=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},L.prototype.convertAttKey="@",L.prototype.convertPIKey="?",L.prototype.convertTextKey="#text",L.prototype.convertCDataKey="#cdata",L.prototype.convertCommentKey="#comment",L.prototype.convertRawKey="#raw",L.prototype.assertLegalChar=function(S){var g,_;if(this.options.noValidation)return S;if(g="",this.options.version==="1.0"){if(g=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=S.match(g))throw new Error("Invalid character in string: "+S+" at index "+_.index)}else if(this.options.version==="1.1"&&(g=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=S.match(g)))throw new Error("Invalid character in string: "+S+" at index "+_.index);return S},L.prototype.assertLegalName=function(S){var g;if(this.options.noValidation)return S;if(this.assertLegalChar(S),g=/^([: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])*$/,!S.match(g))throw new Error("Invalid character in name");return S},L.prototype.textEscape=function(S){var g;return this.options.noValidation?S:(g=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,S.replace(g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},L.prototype.attEscape=function(S){var g;return this.options.noValidation?S:(g=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,S.replace(g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},L}()}).call(void 0)},{}],280:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,S,g,_=function(i,r){for(var h in r)d.call(r,h)&&(i[h]=r[h]);function p(){this.constructor=i}return p.prototype=r.prototype,i.prototype=new p,i.__super__=r.prototype,i},d={}.hasOwnProperty;L=I("./NodeType"),S=I("./XMLCharacterData"),Z.exports=g=function(o){_(i,o);function i(r,h){if(i.__super__.constructor.call(this,r),h==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=L.Text,this.value=this.stringify.text(h)}return Object.defineProperty(i.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"wholeText",{get:function(){var h,p,f;for(f="",p=this.previousSibling;p;)f=p.data+f,p=p.previousSibling;for(f+=this.data,h=this.nextSibling;h;)f=f+h.data,h=h.nextSibling;return f}}),i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))},i.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},i}(S)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(I,Z,N){"use strict";(function(){var P,m,T,L,S,g,_,d,o,i,r,h,p,f,x,v,l,n={}.hasOwnProperty;l=I("./Utility").assign,P=I("./NodeType"),o=I("./XMLDeclaration"),i=I("./XMLDocType"),T=I("./XMLCData"),L=I("./XMLComment"),h=I("./XMLElement"),f=I("./XMLRaw"),x=I("./XMLText"),p=I("./XMLProcessingInstruction"),r=I("./XMLDummy"),S=I("./XMLDTDAttList"),g=I("./XMLDTDElement"),_=I("./XMLDTDEntity"),d=I("./XMLDTDNotation"),m=I("./WriterState"),Z.exports=v=function(){function s(u){var w,y,a;u||(u={}),this.options=u,y=u.writer||{};for(w in y){if(!n.call(y,w))continue;a=y[w],this["_"+w]=this[w],this[w]=a}}return s.prototype.filterOptions=function(u){var w,y,a,R,D,c,b,E;return u||(u={}),u=l({},this.options,u),w={writer:this},w.pretty=u.pretty||!1,w.allowEmpty=u.allowEmpty||!1,w.indent=(y=u.indent)!=null?y:" ",w.newline=(a=u.newline)!=null?a:`
`,w.offset=(R=u.offset)!=null?R:0,w.dontPrettyTextNodes=(D=(c=u.dontPrettyTextNodes)!=null?c:u.dontprettytextnodes)!=null?D:0,w.spaceBeforeSlash=(b=(E=u.spaceBeforeSlash)!=null?E:u.spacebeforeslash)!=null?b:"",w.spaceBeforeSlash===!0&&(w.spaceBeforeSlash=" "),w.suppressPrettyCount=0,w.user={},w.state=m.None,w},s.prototype.indent=function(u,w,y){var a;return!w.pretty||w.suppressPrettyCount?"":w.pretty&&(a=(y||0)+w.offset+1,a>0)?new Array(a).join(w.indent):""},s.prototype.endline=function(u,w,y){return!w.pretty||w.suppressPrettyCount?"":w.newline},s.prototype.attribute=function(u,w,y){var a;return this.openAttribute(u,w,y),a=" "+u.name+'="'+u.value+'"',this.closeAttribute(u,w,y),a},s.prototype.cdata=function(u,w,y){var a;return this.openNode(u,w,y),w.state=m.OpenTag,a=this.indent(u,w,y)+"<![CDATA[",w.state=m.InsideTag,a+=u.value,w.state=m.CloseTag,a+="]]>"+this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),a},s.prototype.comment=function(u,w,y){var a;return this.openNode(u,w,y),w.state=m.OpenTag,a=this.indent(u,w,y)+"<!-- ",w.state=m.InsideTag,a+=u.value,w.state=m.CloseTag,a+=" -->"+this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),a},s.prototype.declaration=function(u,w,y){var a;return this.openNode(u,w,y),w.state=m.OpenTag,a=this.indent(u,w,y)+"<?xml",w.state=m.InsideTag,a+=' version="'+u.version+'"',u.encoding!=null&&(a+=' encoding="'+u.encoding+'"'),u.standalone!=null&&(a+=' standalone="'+u.standalone+'"'),w.state=m.CloseTag,a+=w.spaceBeforeSlash+"?>",a+=this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),a},s.prototype.docType=function(u,w,y){var a,R,D,c,b;if(y||(y=0),this.openNode(u,w,y),w.state=m.OpenTag,c=this.indent(u,w,y),c+="<!DOCTYPE "+u.root().name,u.pubID&&u.sysID?c+=' PUBLIC "'+u.pubID+'" "'+u.sysID+'"':u.sysID&&(c+=' SYSTEM "'+u.sysID+'"'),u.children.length>0){for(c+=" [",c+=this.endline(u,w,y),w.state=m.InsideTag,b=u.children,R=0,D=b.length;R<D;R++)a=b[R],c+=this.writeChildNode(a,w,y+1);w.state=m.CloseTag,c+="]"}return w.state=m.CloseTag,c+=w.spaceBeforeSlash+">",c+=this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),c},s.prototype.element=function(u,w,y){var a,R,D,c,b,E,C,F,j,k,X,G,H,K;y||(y=0),k=!1,X="",this.openNode(u,w,y),w.state=m.OpenTag,X+=this.indent(u,w,y)+"<"+u.name,G=u.attribs;for(j in G){if(!n.call(G,j))continue;a=G[j],X+=this.attribute(a,w,y)}if(D=u.children.length,c=D===0?null:u.children[0],D===0||u.children.every(function(B){return(B.type===P.Text||B.type===P.Raw)&&B.value===""}))w.allowEmpty?(X+=">",w.state=m.CloseTag,X+="</"+u.name+">"+this.endline(u,w,y)):(w.state=m.CloseTag,X+=w.spaceBeforeSlash+"/>"+this.endline(u,w,y));else if(w.pretty&&D===1&&(c.type===P.Text||c.type===P.Raw)&&c.value!=null)X+=">",w.state=m.InsideTag,w.suppressPrettyCount++,k=!0,X+=this.writeChildNode(c,w,y+1),w.suppressPrettyCount--,k=!1,w.state=m.CloseTag,X+="</"+u.name+">"+this.endline(u,w,y);else{if(w.dontPrettyTextNodes){for(H=u.children,b=0,C=H.length;b<C;b++)if(R=H[b],(R.type===P.Text||R.type===P.Raw)&&R.value!=null){w.suppressPrettyCount++,k=!0;break}}for(X+=">"+this.endline(u,w,y),w.state=m.InsideTag,K=u.children,E=0,F=K.length;E<F;E++)R=K[E],X+=this.writeChildNode(R,w,y+1);w.state=m.CloseTag,X+=this.indent(u,w,y)+"</"+u.name+">",k&&w.suppressPrettyCount--,X+=this.endline(u,w,y),w.state=m.None}return this.closeNode(u,w,y),X},s.prototype.writeChildNode=function(u,w,y){switch(u.type){case P.CData:return this.cdata(u,w,y);case P.Comment:return this.comment(u,w,y);case P.Element:return this.element(u,w,y);case P.Raw:return this.raw(u,w,y);case P.Text:return this.text(u,w,y);case P.ProcessingInstruction:return this.processingInstruction(u,w,y);case P.Dummy:return"";case P.Declaration:return this.declaration(u,w,y);case P.DocType:return this.docType(u,w,y);case P.AttributeDeclaration:return this.dtdAttList(u,w,y);case P.ElementDeclaration:return this.dtdElement(u,w,y);case P.EntityDeclaration:return this.dtdEntity(u,w,y);case P.NotationDeclaration:return this.dtdNotation(u,w,y);default:throw new Error("Unknown XML node type: "+u.constructor.name)}},s.prototype.processingInstruction=function(u,w,y){var a;return this.openNode(u,w,y),w.state=m.OpenTag,a=this.indent(u,w,y)+"<?",w.state=m.InsideTag,a+=u.target,u.value&&(a+=" "+u.value),w.state=m.CloseTag,a+=w.spaceBeforeSlash+"?>",a+=this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),a},s.prototype.raw=function(u,w,y){var a;return this.openNode(u,w,y),w.state=m.OpenTag,a=this.indent(u,w,y),w.state=m.InsideTag,a+=u.value,w.state=m.CloseTag,a+=this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),a},s.prototype.text=function(u,w,y){var a;return this.openNode(u,w,y),w.state=m.OpenTag,a=this.indent(u,w,y),w.state=m.InsideTag,a+=u.value,w.state=m.CloseTag,a+=this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),a},s.prototype.dtdAttList=function(u,w,y){var a;return this.openNode(u,w,y),w.state=m.OpenTag,a=this.indent(u,w,y)+"<!ATTLIST",w.state=m.InsideTag,a+=" "+u.elementName+" "+u.attributeName+" "+u.attributeType,u.defaultValueType!=="#DEFAULT"&&(a+=" "+u.defaultValueType),u.defaultValue&&(a+=' "'+u.defaultValue+'"'),w.state=m.CloseTag,a+=w.spaceBeforeSlash+">"+this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),a},s.prototype.dtdElement=function(u,w,y){var a;return this.openNode(u,w,y),w.state=m.OpenTag,a=this.indent(u,w,y)+"<!ELEMENT",w.state=m.InsideTag,a+=" "+u.name+" "+u.value,w.state=m.CloseTag,a+=w.spaceBeforeSlash+">"+this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),a},s.prototype.dtdEntity=function(u,w,y){var a;return this.openNode(u,w,y),w.state=m.OpenTag,a=this.indent(u,w,y)+"<!ENTITY",w.state=m.InsideTag,u.pe&&(a+=" %"),a+=" "+u.name,u.value?a+=' "'+u.value+'"':(u.pubID&&u.sysID?a+=' PUBLIC "'+u.pubID+'" "'+u.sysID+'"':u.sysID&&(a+=' SYSTEM "'+u.sysID+'"'),u.nData&&(a+=" NDATA "+u.nData)),w.state=m.CloseTag,a+=w.spaceBeforeSlash+">"+this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),a},s.prototype.dtdNotation=function(u,w,y){var a;return this.openNode(u,w,y),w.state=m.OpenTag,a=this.indent(u,w,y)+"<!NOTATION",w.state=m.InsideTag,a+=" "+u.name,u.pubID&&u.sysID?a+=' PUBLIC "'+u.pubID+'" "'+u.sysID+'"':u.pubID?a+=' PUBLIC "'+u.pubID+'"':u.sysID&&(a+=' SYSTEM "'+u.sysID+'"'),w.state=m.CloseTag,a+=w.spaceBeforeSlash+">"+this.endline(u,w,y),w.state=m.None,this.closeNode(u,w,y),a},s.prototype.openNode=function(u,w,y){},s.prototype.closeNode=function(u,w,y){},s.prototype.openAttribute=function(u,w,y){},s.prototype.closeAttribute=function(u,w,y){},s}()}).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(I,Z,N){"use strict";(function(){var P,m,T,L,S,g,_,d,o,i;i=I("./Utility"),d=i.assign,o=i.isFunction,T=I("./XMLDOMImplementation"),L=I("./XMLDocument"),S=I("./XMLDocumentCB"),_=I("./XMLStringWriter"),g=I("./XMLStreamWriter"),P=I("./NodeType"),m=I("./WriterState"),Z.exports.create=function(r,h,p,f){var x,v;if(r==null)throw new Error("Root element needs a name.");return f=d({},h,p,f),x=new L(f),v=x.element(r),f.headless||(x.declaration(f),(f.pubID!=null||f.sysID!=null)&&x.dtd(f)),v},Z.exports.begin=function(r,h,p){var f;return o(r)&&(f=[r,h],h=f[0],p=f[1],r={}),h?new S(r,h,p):new L(r)},Z.exports.stringWriter=function(r){return new _(r)},Z.exports.streamWriter=function(r,h){return new g(r,h)},Z.exports.implementation=new T,Z.exports.nodeType=P,Z.exports.writerState=m}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(I,Z,N){Z.exports=m;var P=Object.prototype.hasOwnProperty;function m(){for(var T={},L=0;L<arguments.length;L++){var S=arguments[L];for(var g in S)P.call(S,g)&&(T[g]=S[g])}return T}},{}],284:[function(I,Z,N){"use strict";var P=I("buffer").Buffer,m=I("./sha"),T=I("./md5"),L={sha1:m,md5:T},S=64,g=P.alloc(S);g.fill(0);function _(i,r,h){P.isBuffer(r)||(r=P.from(r)),P.isBuffer(h)||(h=P.from(h)),r.length>S?r=i(r):r.length<S&&(r=P.concat([r,g],S));for(var p=P.alloc(S),f=P.alloc(S),x=0;x<S;x++)p[x]=r[x]^54,f[x]=r[x]^92;var v=i(P.concat([p,h]));return i(P.concat([f,v]))}function d(i,r){i=i||"sha1";var h=L[i],p=[],f=0;return h||o("algorithm:",i,"is not yet supported"),{update:function(v){return P.isBuffer(v)||(v=P.from(v)),p.push(v),f+=v.length,this},digest:function(v){var l=P.concat(p),n=r?_(h,r,l):h(l);return p=null,v?n.toString(v):n}}}function o(){var i=[].slice.call(arguments).join(" ");throw new Error([i,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}N.createHash=function(i){return d(i)},N.createHmac=function(i,r){return d(i,r)},N.createCredentials=function(){o("sorry,createCredentials is not implemented yet")},N.createCipher=function(){o("sorry,createCipher is not implemented yet")},N.createCipheriv=function(){o("sorry,createCipheriv is not implemented yet")},N.createDecipher=function(){o("sorry,createDecipher is not implemented yet")},N.createDecipheriv=function(){o("sorry,createDecipheriv is not implemented yet")},N.createSign=function(){o("sorry,createSign is not implemented yet")},N.createVerify=function(){o("sorry,createVerify is not implemented yet")},N.createDiffieHellman=function(){o("sorry,createDiffieHellman is not implemented yet")},N.pbkdf2=function(){o("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(I,Z,N){"use strict";var P=I("buffer").Buffer,m=4,T=P.alloc(m);T.fill(0);var L=8;function S(d,o){if(d.length%m!==0){var i=d.length+(m-d.length%m);d=P.concat([d,T],i)}for(var r=[],h=o?d.readInt32BE:d.readInt32LE,p=0;p<d.length;p+=m)r.push(h.call(d,p));return r}function g(d,o,i){for(var r=P.alloc(o),h=i?r.writeInt32BE:r.writeInt32LE,p=0;p<d.length;p++)h.call(r,d[p],p*4,!0);return r}function _(d,o,i,r){P.isBuffer(d)||(d=P.from(d));var h=o(S(d,r),d.length*L);return g(h,i,r)}Z.exports={hash:_}},{buffer:73}],286:[function(I,Z,N){"use strict";var P=I("./helpers");function m(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function T(r,h){r[h>>5]|=128<<h%32,r[(h+64>>>9<<4)+14]=h;for(var p=1732584193,f=-271733879,x=-1732584194,v=271733878,l=0;l<r.length;l+=16){var n=p,s=f,u=x,w=v;p=S(p,f,x,v,r[l+0],7,-680876936),v=S(v,p,f,x,r[l+1],12,-389564586),x=S(x,v,p,f,r[l+2],17,606105819),f=S(f,x,v,p,r[l+3],22,-1044525330),p=S(p,f,x,v,r[l+4],7,-176418897),v=S(v,p,f,x,r[l+5],12,1200080426),x=S(x,v,p,f,r[l+6],17,-1473231341),f=S(f,x,v,p,r[l+7],22,-45705983),p=S(p,f,x,v,r[l+8],7,1770035416),v=S(v,p,f,x,r[l+9],12,-1958414417),x=S(x,v,p,f,r[l+10],17,-42063),f=S(f,x,v,p,r[l+11],22,-1990404162),p=S(p,f,x,v,r[l+12],7,1804603682),v=S(v,p,f,x,r[l+13],12,-40341101),x=S(x,v,p,f,r[l+14],17,-1502002290),f=S(f,x,v,p,r[l+15],22,1236535329),p=g(p,f,x,v,r[l+1],5,-165796510),v=g(v,p,f,x,r[l+6],9,-1069501632),x=g(x,v,p,f,r[l+11],14,643717713),f=g(f,x,v,p,r[l+0],20,-373897302),p=g(p,f,x,v,r[l+5],5,-701558691),v=g(v,p,f,x,r[l+10],9,38016083),x=g(x,v,p,f,r[l+15],14,-660478335),f=g(f,x,v,p,r[l+4],20,-405537848),p=g(p,f,x,v,r[l+9],5,568446438),v=g(v,p,f,x,r[l+14],9,-1019803690),x=g(x,v,p,f,r[l+3],14,-187363961),f=g(f,x,v,p,r[l+8],20,1163531501),p=g(p,f,x,v,r[l+13],5,-1444681467),v=g(v,p,f,x,r[l+2],9,-51403784),x=g(x,v,p,f,r[l+7],14,1735328473),f=g(f,x,v,p,r[l+12],20,-1926607734),p=_(p,f,x,v,r[l+5],4,-378558),v=_(v,p,f,x,r[l+8],11,-2022574463),x=_(x,v,p,f,r[l+11],16,1839030562),f=_(f,x,v,p,r[l+14],23,-35309556),p=_(p,f,x,v,r[l+1],4,-1530992060),v=_(v,p,f,x,r[l+4],11,1272893353),x=_(x,v,p,f,r[l+7],16,-155497632),f=_(f,x,v,p,r[l+10],23,-1094730640),p=_(p,f,x,v,r[l+13],4,681279174),v=_(v,p,f,x,r[l+0],11,-358537222),x=_(x,v,p,f,r[l+3],16,-722521979),f=_(f,x,v,p,r[l+6],23,76029189),p=_(p,f,x,v,r[l+9],4,-640364487),v=_(v,p,f,x,r[l+12],11,-421815835),x=_(x,v,p,f,r[l+15],16,530742520),f=_(f,x,v,p,r[l+2],23,-995338651),p=d(p,f,x,v,r[l+0],6,-198630844),v=d(v,p,f,x,r[l+7],10,1126891415),x=d(x,v,p,f,r[l+14],15,-1416354905),f=d(f,x,v,p,r[l+5],21,-57434055),p=d(p,f,x,v,r[l+12],6,1700485571),v=d(v,p,f,x,r[l+3],10,-1894986606),x=d(x,v,p,f,r[l+10],15,-1051523),f=d(f,x,v,p,r[l+1],21,-2054922799),p=d(p,f,x,v,r[l+8],6,1873313359),v=d(v,p,f,x,r[l+15],10,-30611744),x=d(x,v,p,f,r[l+6],15,-1560198380),f=d(f,x,v,p,r[l+13],21,1309151649),p=d(p,f,x,v,r[l+4],6,-145523070),v=d(v,p,f,x,r[l+11],10,-1120210379),x=d(x,v,p,f,r[l+2],15,718787259),f=d(f,x,v,p,r[l+9],21,-343485551),p=o(p,n),f=o(f,s),x=o(x,u),v=o(v,w)}return Array(p,f,x,v)}function L(r,h,p,f,x,v){return o(i(o(o(h,r),o(f,v)),x),p)}function S(r,h,p,f,x,v,l){return L(h&p|~h&f,r,h,x,v,l)}function g(r,h,p,f,x,v,l){return L(h&f|p&~f,r,h,x,v,l)}function _(r,h,p,f,x,v,l){return L(h^p^f,r,h,x,v,l)}function d(r,h,p,f,x,v,l){return L(p^(h|~f),r,h,x,v,l)}function o(r,h){var p=(r&65535)+(h&65535),f=(r>>16)+(h>>16)+(p>>16);return f<<16|p&65535}function i(r,h){return r<<h|r>>>32-h}Z.exports=function(h){return P.hash(h,T,16)}},{"./helpers":285}],287:[function(I,Z,N){"use strict";var P=I("./helpers");function m(_,d){_[d>>5]|=128<<24-d%32,_[(d+64>>9<<4)+15]=d;for(var o=Array(80),i=1732584193,r=-271733879,h=-1732584194,p=271733878,f=-1009589776,x=0;x<_.length;x+=16){for(var v=i,l=r,n=h,s=p,u=f,w=0;w<80;w++){w<16?o[w]=_[x+w]:o[w]=g(o[w-3]^o[w-8]^o[w-14]^o[w-16],1);var y=S(S(g(i,5),T(w,r,h,p)),S(S(f,o[w]),L(w)));f=p,p=h,h=g(r,30),r=i,i=y}i=S(i,v),r=S(r,l),h=S(h,n),p=S(p,s),f=S(f,u)}return Array(i,r,h,p,f)}function T(_,d,o,i){return _<20?d&o|~d&i:_<40?d^o^i:_<60?d&o|d&i|o&i:d^o^i}function L(_){return _<20?1518500249:_<40?1859775393:_<60?-1894007588:-899497514}function S(_,d){var o=(_&65535)+(d&65535),i=(_>>16)+(d>>16)+(o>>16);return i<<16|o&65535}function g(_,d){return _<<d|_>>>32-d}Z.exports=function(d){return P.hash(d,m,20,!0)}},{"./helpers":285}],288:[function(I,Z,N){"use strict";Z.exports=function(){return function(){}}},{}],289:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/helpers/typeof"),T=L(m);function L(i){return i&&i.__esModule?i:{default:i}}var S=I("stream"),g=S.Stream,_=I("../lib/common/utils/isArray"),d=_.isArray;Z.exports.string=function(r){return typeof r=="string"},Z.exports.array=d,Z.exports.buffer=P.isBuffer;function o(i){return i instanceof g}Z.exports.writableStream=function(r){return o(r)&&typeof r._write=="function"&&(0,T.default)(r._writableState)==="object"}}).call(this,{isBuffer:I("../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(I,Z,N){"use strict";N.encodeURIComponent=function(P){try{return encodeURIComponent(P)}catch(m){return P}},N.escape=I("escape-html"),N.timestamp=function(m){if(m){var T=m;return typeof T=="string"&&(T=Number(T)),String(m).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(I,Z,N){(function(P,m){"use strict";var T=I("babel-runtime/core-js/json/stringify"),L=_(T),S=I("babel-runtime/helpers/typeof"),g=_(S);function _(w){return w&&w.__esModule?w:{default:w}}var d=I("util"),o=I("url"),i=I("http"),r=I("https"),h=I("debug")("urllib"),p=I("humanize-ms"),f,x=0,v=Math.pow(2,31)-10,l=/^https?:\/\//i;function n(w,y){return w===void 0?y:w}function s(w,y){return function(a,R,D){if(a)return y(a);w({data:R,status:D.statusCode,headers:D.headers,res:D})}}N.TIMEOUTS=[p("300s"),p("300s")];var u=["json","text"];N.request=function(y,a,R){return arguments.length===2&&typeof a=="function"&&(R=a,a=null),typeof R=="function"?N.requestWithCallback(y,a,R):(f||(f=I("any-promise")),new f(function(D,c){N.requestWithCallback(y,a,s(D,c))}))},N.requestWithCallback=function(y,a,R){if(!y||typeof y!="string"&&(typeof y=="undefined"?"undefined":(0,g.default)(y))!=="object"){var D=d.format("expect request url to be a string or a http request options, but got %j",y);throw new Error(D)}arguments.length===2&&typeof a=="function"&&(R=a,a=null),a=a||{},x>=v&&(x=0);var c=++x;a.requestUrls=a.requestUrls||[];var b={requestId:c,url:y,args:a,ctx:a.ctx};a.emitter&&a.emitter.emit("request",b),a.timeout=a.timeout||N.TIMEOUTS,a.maxRedirects=a.maxRedirects||10,a.streaming=a.streaming||a.customResponse;var E=Date.now(),C;typeof y=="string"?(l.test(y)||(y="http://"+y),C=o.parse(y)):C=y;var F=(a.type||a.method||C.method||"GET").toUpperCase(),j=C.port||80,k=i,X=n(a.agent,N.agent),G=a.fixJSONCtlChars;C.protocol==="https:"&&(k=r,X=n(a.httpsAgent,N.httpsAgent),C.port||(j=443));var H={host:C.hostname||C.host||"localhost",path:C.path||"/",method:F,port:j,agent:X,headers:a.headers||{},lookup:a.lookup};Array.isArray(a.timeout)?H.requestTimeout=a.timeout[a.timeout.length-1]:typeof a.timeout!="undefined"&&(H.requestTimeout=a.timeout);for(var K=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B<K.length;B++){var U=K[B];a.hasOwnProperty(U)&&(H[U]=a[U])}H.rejectUnauthorized===!1&&!H.hasOwnProperty("secureOptions")&&(H.secureOptions=I("constants").SSL_OP_NO_TLSv1_2);var W=a.auth||C.auth;W&&(H.auth=W);var Q=a.content||a.data,ie=F==="GET"||F==="HEAD"||a.dataAsQueryString;if(!a.content&&(Q&&!(typeof Q=="string"||m.isBuffer(Q))))if(ie)Q=a.nestedQuerystring?qs.stringify(Q):querystring.stringify(Q);else{var ce=H.headers["Content-Type"]||H.headers["content-type"];ce||(a.contentType==="json"?ce="application/json":ce="application/x-www-form-urlencoded",H.headers["Content-Type"]=ce),parseContentType(ce).type==="application/json"?Q=(0,L.default)(Q):Q=a.nestedQuerystring?qs.stringify(Q):querystring.stringify(Q)}ie&&Q&&(H.path+=(C.query?"&":"?")+Q,Q=null);var he=0;if(Q){var be=Q.length;m.isBuffer(Q)||(be=m.byteLength(Q)),he=H.headers["Content-Length"]=be}a.dataType==="json"&&(H.headers.Accept="application/json"),typeof a.beforeRequest=="function"&&a.beforeRequest(H);var ne=null,le=null,ue=null,re=!1,oe=!1,q=0,se=-1,J=!1,ee="",ge="",te=null;a.timing&&(te={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function Y(){ne&&(clearTimeout(ne),ne=null)}function z(){le&&(clearTimeout(le),le=null)}function $(Se,Xe,Ye){if(z(),!R){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),c,P.pid,H.method,y),Se&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),c,P.pid,Se.name,Se.message,Se.stack);return}var Ie=R;R=null;var He={};if(Ye&&(se=Ye.statusCode,He=Ye.headers),se===401&&He["www-authenticate"]&&(!a.headers||!a.headers.Authorization)&&a.digestAuth){var Ae=He["www-authenticate"];if(Ae.indexOf("Digest ")>=0)return h("Request#%d %s: got digest auth header WWW-Authenticate: %s",c,y,Ae),a.headers=a.headers||{},a.headers.Authorization=digestAuthHeader(H.method,H.path,Ae,a.digestAuth),h("Request#%d %s: auth with digest header: %s",c,y,a.headers.Authorization),Ye.headers["set-cookie"]&&(a.headers.Cookie=Ye.headers["set-cookie"].join(";")),N.requestWithCallback(y,a,Ie)}var Te=Date.now()-E;te&&(te.contentDownload=Te),h("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Te,q,se,H.method,H.host,H.path,oe,te);var Ce={status:se,statusCode:se,headers:He,size:q,aborted:J,rt:Te,keepAliveSocket:oe,data:Xe,requestUrls:a.requestUrls,timing:te,remoteAddress:ee,remotePort:ge};if(Se){var ye="";X&&typeof X.getCurrentStatus=="function"&&(ye=", agent status: "+(0,L.default)(X.getCurrentStatus())),Se.message+=", "+H.method+" "+y+" "+se+" (connected: "+re+", keepalive socket: "+oe+ye+`)
headers: `+(0,L.default)(He),Se.data=Xe,Se.path=H.path,Se.status=se,Se.headers=He,Se.res=Ce}Ie(Se,Xe,a.streaming?Ye:Ce),a.emitter&&(b.url=y,b.socket=Fe&&Fe.connection,b.options=H,b.size=he,a.emitter.emit("response",{requestId:c,error:Se,ctx:a.ctx,req:b,res:Ce}))}function me(Se){var Xe=null;if(a.followRedirect&&statuses.redirect[Se.statusCode]){a._followRedirectCount=(a._followRedirectCount||0)+1;var Ye=Se.headers.location;if(!Ye)Xe=new Error("Got statusCode "+Se.statusCode+" but cannot resolve next location from headers"),Xe.name="FollowRedirectError";else if(a._followRedirectCount>a.maxRedirects)Xe=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+y),Xe.name="MaxRedirectError";else{var Ie=a.formatRedirectUrl?a.formatRedirectUrl(y,Ye):o.resolve(y,Ye);h("Request#%d %s: `redirected` from %s to %s",c,H.path,y,Ie),z(),a.headers&&a.headers.Host&&l.test(Ye)&&(a.headers.Host=null);var He=R;return R=null,N.requestWithCallback(Ie,a,He),{redirect:!0,error:null}}}return{redirect:!1,error:Xe}}!H.headers["User-Agent"]&&!H.headers["user-agent"]&&(H.headers["User-Agent"]=navigator.userAgent),a.gzip&&(!H.headers["Accept-Encoding"]&&!H.headers["accept-encoding"]&&(H.headers["Accept-Encoding"]="gzip"));function pe(Se,Xe,Ye){var Ie=Se.headers["content-encoding"];return Ye(null,Xe,Ie)}var xe=a.writeStream;h("Request#%d %s %s with headers %j, options.path: %s",c,F,y,H.headers,H.path),a.requestUrls.push(y);function Re(Se){if(te&&(te.waiting=Date.now()-E),h("Request#%d %s `req response` event emit: status %d, headers: %j",c,y,Se.statusCode,Se.headers),a.streaming){var Xe=me(Se);if(Xe.redirect){Se.resume();return}return Xe.error?(Se.resume(),$(Xe.error,null,Se)):$(null,null,Se)}if(Se.on("close",function(){h("Request#%d %s: `res close` event emit, total size %d",c,y,q)}),Se.on("error",function(){h("Request#%d %s: `res error` event emit, total size %d",c,y,q)}),Se.on("aborted",function(){J=!0,h("Request#%d %s: `res aborted` event emit, total size %d",c,y,q)}),xe){var Xe=me(Se);if(Xe.redirect){Se.resume();return}return Xe.error?(Se.resume(),xe.end(),$(Xe.error,null,Se)):(a.consumeWriteStream===!1?Se.on("end",$.bind(null,null,null,Se)):isNode010||isNode012?first([[xe,"close"],[Se,"aborted"]],function(He,Ae,Te){h("Request#%d %s: writeStream or res %s event emitted",c,y,Te),$(ue||null,null,Se)}):xe.on("close",function(){h("Request#%d %s: writeStream close event emitted",c,y),$(ue||null,null,Se)}),Se.pipe(xe))}var Ye=[];Se.on("data",function(Ie){h("Request#%d %s: `res data` event emit, size %d",c,y,Ie.length),q+=Ie.length,Ye.push(Ie)}),Se.on("end",function(){var Ie=m.concat(Ye,q);if(h("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",c,y,q,Se._dumped),ue)return $(ue,Ie,Se);var He=me(Se);if(He.error)return $(He.error,Ie,Se);if(He.redirect)return;pe(Se,Ie,function(Ae,Te,Ce){if(Ae)return $(Ae,Ie,Se);if(!Ce&&u.indexOf(a.dataType)>=0){try{Te=decodeBodyByCharset(Te,Se)}catch(Ee){return h("decodeBodyByCharset error: %s",Ee),$(null,Te,Se)}if(a.dataType==="json")if(q===0)Te=null;else{var ye=parseJSON(Te,G);ye.error?Ae=ye.error:Te=ye.data}}J&&h("Request#%d %s: Remote socket was terminated before `response.end()` was called",c,y),$(Ae,Te,Se)})})}var ke,Me;Array.isArray(a.timeout)?(ke=p(a.timeout[0]),Me=p(a.timeout[1])):ke=Me=p(a.timeout),h("ConnectTimeout: %d, ResponseTimeout: %d",ke,Me);function Pe(){h("Connect timer ticking, timeout: %d",ke),ne=setTimeout(function(){ne=null,se===-1&&(se=-2);var Se="Connect timeout for "+ke+"ms",Xe="ConnectionTimeoutError";Fe.socket||(Xe="SocketAssignTimeoutError",Se+=", working sockets is full"),ue=new Error(Se),ue.name=Xe,ue.requestId=c,h("ConnectTimeout: Request#%d %s %s: %s, connected: %s",c,y,ue.name,Se,re),We()},ke)}function je(){h("Response timer ticking, timeout: %d",Me),le=setTimeout(function(){le=null;var Se="Response timeout for "+Me+"ms",Xe="ResponseTimeoutError";ue=new Error(Se),ue.name=Xe,ue.requestId=c,h("ResponseTimeout: Request#%d %s %s: %s, connected: %s",c,y,ue.name,Se,re),We()},Me)}var Fe;H.mode=a.mode?a.mode:"";try{Fe=k.request(H,Re)}catch(Se){return $(Se)}typeof window=="undefined"?Pe():Fe.on("requestTimeout",function(){se===-1&&(se=-2);var Se="Connect timeout for "+ke+"ms",Xe="ConnectionTimeoutError";ue=new Error(Se),ue.name=Xe,ue.requestId=c,We()});function We(){h("Request#%d %s abort, connected: %s",c,y,re),Fe.socket||(ue.noSocket=!0,$(ue)),Fe.abort()}return te&&Fe.on("finish",function(){te.requestSent=Date.now()-E}),Fe.once("socket",function(Se){te&&(te.queuing=Date.now()-E),isNode010&&Se.socket&&(Se=Se.socket);var Xe=Se.readyState;if(Xe==="opening"){Se.once("lookup",function(Ye,Ie,He){h("Request#%d %s lookup: %s, %s, %s",c,y,Ye,Ie,He),te&&(te.dnslookup=Date.now()-E),Ie&&(ee=Ie)}),Se.once("connect",function(){te&&(te.connected=Date.now()-E),Y(),je(),h("Request#%d %s new socket connected",c,y),re=!0,ee||(ee=Se.remoteAddress),ge=Se.remotePort});return}h("Request#%d %s reuse socket connected, readyState: %s",c,y,Xe),re=!0,oe=!0,ee||(ee=Se.remoteAddress),ge=Se.remotePort,Y(),je()}),Fe.on("error",function(Se){(Se.name==="Error"||Se.name==="TypeError")&&(Se.name=re?"ResponseError":"RequestError"),Se.message+=' (req "error")',h("Request#%d %s `req error` event emit, %s: %s",c,y,Se.name,Se.message),$(ue||Se)}),xe&&xe.once("error",function(Se){Se.message+=' (writeStream "error")',ue=Se,h("Request#%d %s `writeStream error` event emit, %s: %s",c,y,Se.name,Se.message),We()}),a.stream?(a.stream.pipe(Fe),a.stream.once("error",function(Se){Se.message+=' (stream "error")',ue=Se,h("Request#%d %s `readStream error` event emit, %s: %s",c,y,Se.name,Se.message),We()})):Fe.end(Q),Fe.requestId=c,Fe}}).call(this,I("_process"),I("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"))},nj2k:function(I,Z,N){I.exports=N.p+"static/nodata.c3b0b86c.svg"},oRuE:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.Iso10126={pad:function(m,T){var L=T*4,S=L-m.sigBytes%L;m.concat(P.lib.WordArray.random(S-1)).concat(P.lib.WordArray.create([S<<24],1))},unpad:function(m){var T=m.words[m.sigBytes-1>>>2]&255;m.sigBytes-=T}},P.pad.Iso10126})},osHv:function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){"use strict";var m=P.Pos;function T(l,n){return l.line-n.line||l.ch-n.ch}var L="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",S=L+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+L+"]["+S+"]*)","g");function _(l,n,s,u){this.line=n,this.ch=s,this.cm=l,this.text=l.getLine(n),this.min=u?Math.max(u.from,l.firstLine()):l.firstLine(),this.max=u?Math.min(u.to-1,l.lastLine()):l.lastLine()}function d(l,n){var s=l.cm.getTokenTypeAt(m(l.line,n));return s&&/\btag\b/.test(s)}function o(l){return l.line>=l.max?void 0:(l.ch=0,l.text=l.cm.getLine(++l.line),!0)}function i(l){return l.line<=l.min?void 0:(l.text=l.cm.getLine(--l.line),l.ch=l.text.length,!0)}function r(l){for(;;){var n=l.text.indexOf(">",l.ch);if(n==-1){if(o(l))continue;return}if(!d(l,n+1)){l.ch=n+1;continue}var s=l.text.lastIndexOf("/",n),u=s>-1&&!/\S/.test(l.text.slice(s+1,n));return l.ch=n+1,u?"selfClose":"regular"}}function h(l){for(;;){var n=l.ch?l.text.lastIndexOf("<",l.ch-1):-1;if(n==-1){if(i(l))continue;return}if(!d(l,n+1)){l.ch=n;continue}g.lastIndex=n,l.ch=n;var s=g.exec(l.text);if(s&&s.index==n)return s}}function p(l){for(;;){g.lastIndex=l.ch;var n=g.exec(l.text);if(!n){if(o(l))continue;return}if(!d(l,n.index+1)){l.ch=n.index+1;continue}return l.ch=n.index+n[0].length,n}}function f(l){for(;;){var n=l.ch?l.text.lastIndexOf(">",l.ch-1):-1;if(n==-1){if(i(l))continue;return}if(!d(l,n+1)){l.ch=n;continue}var s=l.text.lastIndexOf("/",n),u=s>-1&&!/\S/.test(l.text.slice(s+1,n));return l.ch=n+1,u?"selfClose":"regular"}}function x(l,n){for(var s=[];;){var u=p(l),w,y=l.line,a=l.ch-(u?u[0].length:0);if(!u||!(w=r(l)))return;if(w=="selfClose")continue;if(u[1]){for(var R=s.length-1;R>=0;--R)if(s[R]==u[2]){s.length=R;break}if(R<0&&(!n||n==u[2]))return{tag:u[2],from:m(y,a),to:m(l.line,l.ch)}}else s.push(u[2])}}function v(l,n){for(var s=[];;){var u=f(l);if(!u)return;if(u=="selfClose"){h(l);continue}var w=l.line,y=l.ch,a=h(l);if(!a)return;if(a[1])s.push(a[2]);else{for(var R=s.length-1;R>=0;--R)if(s[R]==a[2]){s.length=R;break}if(R<0&&(!n||n==a[2]))return{tag:a[2],from:m(l.line,l.ch),to:m(w,y)}}}}P.registerHelper("fold","xml",function(l,n){for(var s=new _(l,n.line,0);;){var u=p(s);if(!u||s.line!=n.line)return;var w=r(s);if(!w)return;if(!u[1]&&w!="selfClose"){var y=m(s.line,s.ch),a=x(s,u[2]);return a&&T(a.from,y)>0?{from:y,to:a.from}:null}}}),P.findMatchingTag=function(l,n,s){var u=new _(l,n.line,n.ch,s);if(u.text.indexOf(">")==-1&&u.text.indexOf("<")==-1)return;var w=r(u),y=w&&m(u.line,u.ch),a=w&&h(u);if(!w||!a||T(u,n)>0)return;var R={from:m(u.line,u.ch),to:y,tag:a[2]};return w=="selfClose"?{open:R,close:null,at:"open"}:a[1]?{open:v(u,a[2]),close:R,at:"close"}:(u=new _(l,y.line,y.ch,s),{open:R,close:x(u,a[2]),at:"open"})},P.findEnclosingTag=function(l,n,s,u){for(var w=new _(l,n.line,n.ch,s);;){var y=v(w,u);if(!y)break;var a=new _(l,n.line,n.ch,s),R=x(a,y.tag);if(R)return{open:y,close:R}}},P.scanForClosingTag=function(l,n,s,u){var w=new _(l,n.line,n.ch,u?{from:0,to:u}:null);return x(w,s)}})},p5ED:function(I,Z,N){"use strict";var P=N("+L6B"),m=N("2/Rp"),T=N("5Dmo"),L=N("3S7+"),S=N("k1fw"),g=N("tJVT"),_=N("cDcd"),d=N.n(_),o=N("vHTk"),i=N.n(o),r=N("yEEn"),h=N("ZW9T"),p=N("1vsH");Z.a=function(f){var x=f.name,v=f.data,l=f.theme,n=f.type,s=f.filename,u=f.monacoEditor,w=f.className,y=f.style,a=f.close,R=f.onClose,D=f.hasMask,c=Object(_.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),b=Object(g.a)(c,2),E=b[0],C=b[1],F=Object(_.useState)(""),j=Object(g.a)(F,2),k=j[0],X=j[1],G,H=1024*1024,K=10*H,B=Object(_.useRef)();n==="office"&&(G=Object(p.V)(v).filesize,G>K&&(n="other")),s&&(u.filename=s),Object(_.useEffect)(function(){var Q,ie,ce=(Q=document.cookie)===null||Q===void 0||((ie=Q.replace(/\s/g,""))===null||ie===void 0)?void 0:ie.split(";");ce==null||ce.map(function(he){var be=he.split("=");be[0]==="_educoder_session"&&X(be[1])})},[]);var U=function(){if(v.startsWith("http")||v.startsWith("/")){W();return}Object(p.z)(s||"educoder",v,s)},W=function(){Object(p.x)(s||x,v)};return console.log("data:",v,"fileanme:",s," name:",x),d.a.createElement("div",{style:Object(S.a)({},y||{}),className:"".concat(D&&i.a.bgBlack," ").concat(n?i.a.wrp:"hide")},a&&d.a.createElement("div",{className:i.a.close,ref:B},d.a.createElement(L.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return B.current}},d.a.createElement("span",{onClick:W},d.a.createElement("i",{className:"icon-quxiaozhiding"}))),d.a.createElement(L.a,{title:"\u5173\u95ED",getPopupContainer:function(){return B.current}},d.a.createElement("span",{className:"",onClick:R},d.a.createElement("i",{className:"icon-guanbi1"})))),d.a.createElement("div",{className:"".concat(i.a[w]," ").concat(w," ").concat(i.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&d.a.createElement(h.b,u)),n==="audio"&&d.a.createElement("audio",{src:"".concat(v!=null&&v.startsWith("/")||(v==null?void 0:v.indexOf("https://"))>-1?v:"data:audio/mp3;base64,").concat(v),autoPlay:!0}),n==="video"&&d.a.createElement(d.a.Fragment,null,v!=null&&v.startsWith("/")?d.a.createElement("video",{controls:!0,src:"".concat(v),autoPlay:!0}):d.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(v),autoPlay:!0})),n==="html"&&d.a.createElement("iframe",{src:v+"&disposition=inline"}),n==="pdf"&&d.a.createElement("embed",{className:i.a.embed,src:v}),n==="image"&&d.a.createElement(d.a.Fragment,null,d.a.createElement("img",{src:"".concat(v!=null&&v.startsWith("/")||(v==null?void 0:v.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(v)})),n==="other"&&d.a.createElement("div",null,d.a.createElement(m.a,{type:"primary",size:"large",onClick:U},d.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&d.a.createElement(m.a,{type:"primary",size:"large",onClick:U},d.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(I,Z,N){},pA7S:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,S=T.BlockCipher,g=m.algo,_=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],d=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],o=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],i=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],r=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=g.DES=S.extend({_doReset:function(){for(var v=this._key,l=v.words,n=[],s=0;s<56;s++){var u=_[s]-1;n[s]=l[u>>>5]>>>31-u%32&1}for(var w=this._subKeys=[],y=0;y<16;y++){for(var a=w[y]=[],R=o[y],s=0;s<24;s++)a[s/6|0]|=n[(d[s]-1+R)%28]<<31-s%6,a[4+(s/6|0)]|=n[28+(d[s+24]-1+R)%28]<<31-s%6;a[0]=a[0]<<1|a[0]>>>31;for(var s=1;s<7;s++)a[s]=a[s]>>>(s-1)*4+3;a[7]=a[7]<<5|a[7]>>>27}for(var D=this._invSubKeys=[],s=0;s<16;s++)D[s]=w[15-s]},encryptBlock:function(v,l){this._doCryptBlock(v,l,this._subKeys)},decryptBlock:function(v,l){this._doCryptBlock(v,l,this._invSubKeys)},_doCryptBlock:function(v,l,n){this._lBlock=v[l],this._rBlock=v[l+1],p.call(this,4,252645135),p.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),p.call(this,1,1431655765);for(var s=0;s<16;s++){for(var u=n[s],w=this._lBlock,y=this._rBlock,a=0,R=0;R<8;R++)a|=i[R][((y^u[R])&r[R])>>>0];this._lBlock=y,this._rBlock=w^a}var D=this._lBlock;this._lBlock=this._rBlock,this._rBlock=D,p.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),v[l]=this._lBlock,v[l+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(v,l){var n=(this._lBlock>>>v^this._rBlock)&l;this._rBlock^=n,this._lBlock^=n<<v}function f(v,l){var n=(this._rBlock>>>v^this._lBlock)&l;this._lBlock^=n,this._rBlock^=n<<v}m.DES=S._createHelper(h);var x=g.TripleDES=S.extend({_doReset:function(){var v=this._key,l=v.words;if(l.length!==2&&l.length!==4&&l.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var n=l.slice(0,2),s=l.length<4?l.slice(0,2):l.slice(2,4),u=l.length<6?l.slice(0,2):l.slice(4,6);this._des1=h.createEncryptor(L.create(n)),this._des2=h.createEncryptor(L.create(s)),this._des3=h.createEncryptor(L.create(u))},encryptBlock:function(v,l){this._des1.encryptBlock(v,l),this._des2.decryptBlock(v,l),this._des3.encryptBlock(v,l)},decryptBlock:function(v,l){this._des3.decryptBlock(v,l),this._des2.encryptBlock(v,l),this._des1.decryptBlock(v,l)},keySize:192/32,ivSize:64/32,blockSize:64/32});m.TripleDES=S._createHelper(x)}(),P.TripleDES})},qBft:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.AnsiX923={pad:function(m,T){var L=m.sigBytes,S=T*4,g=S-L%S,_=L+g-1;m.clamp(),m.words[_>>>2]|=g<<24-_%4*8,m.sigBytes+=g},unpad:function(m){var T=m.words[m.sigBytes-1>>>2]&255;m.sigBytes-=T}},P.pad.Ansix923})},qM6L:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,S=m.enc,g=S.Utf16=S.Utf16BE={stringify:function(d){for(var o=d.words,i=d.sigBytes,r=[],h=0;h<i;h+=2){var p=o[h>>>2]>>>16-h%4*8&65535;r.push(String.fromCharCode(p))}return r.join("")},parse:function(d){for(var o=d.length,i=[],r=0;r<o;r++)i[r>>>1]|=d.charCodeAt(r)<<16-r%2*16;return L.create(i,o*2)}};S.Utf16LE={stringify:function(d){for(var o=d.words,i=d.sigBytes,r=[],h=0;h<i;h+=2){var p=_(o[h>>>2]>>>16-h%4*8&65535);r.push(String.fromCharCode(p))}return r.join("")},parse:function(d){for(var o=d.length,i=[],r=0;r<o;r++)i[r>>>1]|=_(d.charCodeAt(r)<<16-r%2*16);return L.create(i,o*2)}};function _(d){return d<<8&4278255360|d>>>8&16711935}}(),P.enc.Utf16})},qu8F:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("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 m=P.lib.BlockCipherMode.extend();function T(g){if((g>>24&255)===255){var _=g>>16&255,d=g>>8&255,o=g&255;_===255?(_=0,d===255?(d=0,o===255?o=0:++o):++d):++_,g=0,g+=_<<16,g+=d<<8,g+=o}else g+=1<<24;return g}function L(g){return(g[0]=T(g[0]))===0&&(g[1]=T(g[1])),g}var S=m.Encryptor=m.extend({processBlock:function(g,_){var d=this._cipher,o=d.blockSize,i=this._iv,r=this._counter;i&&(r=this._counter=i.slice(0),this._iv=void 0),L(r);var h=r.slice(0);d.encryptBlock(h,0);for(var p=0;p<o;p++)g[_+p]^=h[p]}});return m.Decryptor=S,m}(),P.mode.CTRGladman})},rUJ1:function(I,Z){const N=/[&<>"']/,P=/[&<>"']/g,m=/[<>"']|&(?!#?\w+;)/,T=/[<>"']|&(?!#?\w+;)/g,L={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},S=D=>L[D];function g(D,c){if(c){if(N.test(D))return D.replace(P,S)}else if(m.test(D))return D.replace(T,S);return D}const _=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function d(D){return D.replace(_,(c,b)=>(b=b.toLowerCase(),b==="colon"?":":b.charAt(0)==="#"?b.charAt(1)==="x"?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""))}const o=/(^|[^\[])\^/g;function i(D,c){D=D.source||D,c=c||"";const b={replace:(E,C)=>(C=C.source||C,C=C.replace(o,"$1"),D=D.replace(E,C),b),getRegex:()=>new RegExp(D,c)};return b}const r=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(D,c,b){if(D){let E;try{E=decodeURIComponent(d(b)).replace(r,"").toLowerCase()}catch(C){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}c&&!h.test(b)&&(b=n(c,b));try{b=encodeURI(b).replace(/%25/g,"%")}catch(E){return null}return b}const f={},x=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(D,c){f[" "+D]||(x.test(D)?f[" "+D]=D+"/":f[" "+D]=y(D,"/",!0)),D=f[" "+D];const b=D.indexOf(":")===-1;return c.substring(0,2)==="//"?b?c:D.replace(v,"$1")+c:c.charAt(0)==="/"?b?c:D.replace(l,"$1")+c:D+c}const s={exec:function(){}};function u(D){let c=1,b,E;for(;c<arguments.length;c++){b=arguments[c];for(E in b)Object.prototype.hasOwnProperty.call(b,E)&&(D[E]=b[E])}return D}function w(D,c){const b=D.replace(/\|/g,(F,j,k)=>{let X=!1,G=j;for(;--G>=0&&k[G]==="\\";)X=!X;return X?"|":" |"}),E=b.split(/ \|/);let C=0;if(E.length>c)E.splice(c);else for(;E.length<c;)E.push("");for(;C<E.length;C++)E[C]=E[C].trim().replace(/\\\|/g,"|");return E}function y(D,c,b){const E=D.length;if(E===0)return"";let C=0;for(;C<E;){const F=D.charAt(E-C-1);if(F===c&&!b)C++;else if(F!==c&&b)C++;else break}return D.substr(0,E-C)}function a(D,c){if(D.indexOf(c[1])===-1)return-1;const b=D.length;let E=0,C=0;for(;C<b;C++)if(D[C]==="\\")C++;else if(D[C]===c[0])E++;else if(D[C]===c[1]&&(E--,E<0))return C;return-1}function R(D){D&&D.sanitize&&!D.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")}I.exports={escape:g,unescape:d,edit:i,cleanUrl:p,resolveUrl:n,noopTest:s,merge:u,splitCells:w,rtrim:y,findClosingBracket:a,checkSanitizeDeprecation:R}},rdUC:function(I,Z,N){var P=N("MFOe"),m=P.Global;I.exports={name:"localStorage",read:L,write:S,each:g,remove:_,clearAll:d};function T(){return m.localStorage}function L(o){return T().getItem(o)}function S(o,i){return T().setItem(o,i)}function g(o){for(var i=T().length-1;i>=0;i--){var r=T().key(i);o(L(r),r)}}function _(o){return T().removeItem(o)}function d(){return T().clear()}},sboe:function(I,Z,N){"use strict";N.d(Z,"a",function(){return T});var P=N("cDcd"),m=N.n(P),T=P.createContext(null)},spXi:function(I,Z,N){I.exports={flex_box_center:"flex_box_center___2B_Y7",flex_space_between:"flex_space_between___2olzC",flex_box_vertical_center:"flex_box_vertical_center___2Z4dV",flex_box_center_end:"flex_box_center_end___3FiwX",flex_box_column:"flex_box_column___8kyK-",customTree:"customTree___1KOYx",name:"name___3pqs4"}},u2Z1:function(I,Z,N){"use strict";N.d(Z,"a",function(){return y});var P=N("miYZ"),m=N("tsqr"),T=N("9og8"),L=N("5NDa"),S=N("5rEg"),g=N("2qtc"),_=N("kLXV"),d=N("oBTY"),o=N("tJVT"),i=N("OaEy"),r=N("2fM7"),h=N("WmNS"),p=N.n(h),f=N("cDcd"),x=N.n(f),v=N("ErOA"),l=N("i58Z"),n=N.n(l),s=N("T1X5"),u=N.n(s),w=r.a.Option,y=function(R){var D=R.subId,c=R.value,b=R.selectvalues,E=R.disabled,C=R.knowledgeOptions,F=C===void 0?[]:C,j=R.onChange,k=j===void 0?function(){}:j,X=R.onAddKnowledgeFinish,G=X===void 0?function(){}:X,H=Object(f.useRef)(),K=Object(f.useState)([]),B=Object(o.a)(K,2),U=B[0],W=B[1];c=c||[];var Q=function(he,be){he?(W([be.key]),k([be.key])):(W([]),k([]))};Object(f.useEffect)(function(){(b==null?void 0:b.length)>0&&(W(Object(d.a)(b)),k(Object(d.a)(b)))},[F]),Object(f.useEffect)(function(){var ce;((ce=c)===null||ce===void 0?void 0:ce.length)>0&&k(Object(d.a)(c))},[F]);var ie=function(he){he.preventDefault(),H.current="",_.a.confirm({centered:!0,width:700,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",className:"custom-modal-divider",content:x.a.createElement("div",{className:"font14"},x.a.createElement("div",{style:{display:"flex",marginTop:"48px",marginBottom:"36px"}},x.a.createElement("img",{src:u.a,style:{width:"108px",height:"108px",marginRight:"29px"}}),"\u60A8\u586B\u5199\u7684\u77E5\u8BC6\u70B9\u6682\u65F6\u4EC5\u5BF9\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u901A\u8FC7\u540E\u5C06\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF1B",x.a.createElement("br",null),"\u5E73\u53F0\u5BA1\u6838\u8FC7\u7A0B\u4E2D\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF08\u5305\u62EC\u4F46\u4E0D\u9650\u4E8E\u9519\u8BEF\u3001\u975E\u6CD5\u3001\u4E0D\u96C5\u3001\u4E0D\u5339\u914D\u5F53\u524D\u8BFE\u7A0B\u7B49\u60C5\u5F62\uFF09\uFF0C\u5220\u9664\u540E\u53EF\u80FD\u5F71\u54CD\u60A8\u7684\u8BD5\u9898\u7684\u6B63\u5E38\u4F7F\u7528\u3002",x.a.createElement("br",null),"\u8BF7\u8BA4\u771F\u586B\u5199\u4E0E\u6559\u5B66\u5185\u5BB9\u76F8\u5173\u7684\u771F\u5B9E\u77E5\u8BC6\u70B9 ",x.a.createElement("br",null)),x.a.createElement(S.a,{className:"mt5",maxLength:20,style:{marginBottom:"42px"},placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0",defaultValue:H.current,onChange:function(ne){H.current=ne.target.value}})),onOk:function(){return new Promise(function(){var ne=Object(T.a)(p.a.mark(function le(ue,re){var oe,q;return p.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:if(H.current){J.next=3;break}return m.b.warn("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"),J.abrupt("return",re());case 3:if(!(H.current.length>20)){J.next=6;break}return m.b.warn("\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0"),J.abrupt("return",re());case 6:return J.next=8,Object(v.a)("/api/tag_disciplines.json",{method:"post",body:{name:H.current,sub_discipline_id:D}});case 8:return oe=J.sent,(oe==null?void 0:oe.status)===0&&(G({id:oe.tag_discipline_id,name:H.current,type:"personal"}),q=[],q.push(oe.tag_discipline_id),k([].concat(q)),W([oe.tag_discipline_id]),k([].concat(q))),J.abrupt("return",ue());case 11:case"end":return J.stop()}},le)}));return function(le,ue){return ne.apply(this,arguments)}}())}})};return x.a.createElement("div",{className:n.a.wrap},x.a.createElement(r.a,{disabled:!D||E,className:"mr5",style:{width:"242px"},onChange:Q,showSearch:!0,allowClear:!0,value:F==null?void 0:F.filter(function(ce){return(U==null?void 0:U.includes(ce==null?void 0:ce.id))||(U==null?void 0:U.includes((ce==null?void 0:ce.id)+""))}).map(function(ce){return ce.name})},F==null?void 0:F.map(function(ce){return x.a.createElement(w,{key:ce.id,value:ce.name},x.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},x.a.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.name),x.a.createElement("span",null,ce.type==="personal"?"\uFF08\u81EA\u7528\uFF09":"")))})),x.a.createElement("button",{disabled:!D,className:"".concat(n.a.addKnowledge," ").concat(D?"":n.a.disabled),onClick:ie},"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))}},uGsb:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("MlIO"),N("1uat"))})(this,function(P){return function(){var m=P,T=m.x64,L=T.Word,S=T.WordArray,g=m.algo,_=g.SHA512,d=g.SHA384=_.extend({_doReset:function(){this._hash=new S.init([new L.init(3418070365,3238371032),new L.init(1654270250,914150663),new L.init(2438529370,812702999),new L.init(355462360,4144912697),new L.init(1731405415,4290775857),new L.init(2394180231,1750603025),new L.init(3675008525,1694076839),new L.init(1203062813,3204075428)])},_doFinalize:function(){var o=_._doFinalize.call(this);return o.sigBytes-=16,o}});m.SHA384=_._createHelper(d),m.HmacSHA384=_._createHmacHelper(d)}(),P.SHA384})},uGxW:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.NoPadding={pad:function(){},unpad:function(){}},P.pad.NoPadding})},uK0f:function(I,Z,N){(function(P,m){I.exports=m()})(this,function(){"use strict";function P(m,T,L){L=L||{},L.childrenKeyName=L.childrenKeyName||"children";var S=m||[],g=[],_=0;do{var d=S.filter(function(o){return T(o,_)})[0];if(!d)break;g.push(d),S=d[L.childrenKeyName]||[],_+=1}while(S.length>0);return g}return P})},uMZB:function(I,Z,N){I.exports={header:"header___3a50V",checkboxs:"checkboxs___3TnBC",field:"field___SHW6f","oj-form-container":"oj-form-container___36KBv","oj-left-panel":"oj-left-panel___3Fdj5","oj-form-info":"oj-form-info___dilPb",footer:"footer___1Ie9U","test-case-name":"test-case-name___356US","btn-remove-case":"btn-remove-case___1Z5cd","icon-tag":"icon-tag___3zUaP",btn_back:"btn_back___2UBbR",testJi:"testJi___1dyLk",upBtn:"upBtn___1I0SJ"}},uQRt:function(I,Z,N){I.exports=P;function P(){return N("gaXo"),{}}},ulZh:function(I,Z,N){typeof window!="undefined"&&function(m,T){I.exports=T()}(this,function(){return function(P){var m={};function T(L){if(m[L])return m[L].exports;var S=m[L]={i:L,l:!1,exports:{}};return P[L].call(S.exports,S,S.exports,T),S.l=!0,S.exports}return T.m=P,T.c=m,T.d=function(L,S,g){T.o(L,S)||Object.defineProperty(L,S,{enumerable:!0,get:g})},T.r=function(L){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(L,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(L,"__esModule",{value:!0})},T.t=function(L,S){if(S&1&&(L=T(L)),S&8)return L;if(S&4&&typeof L=="object"&&L&&L.__esModule)return L;var g=Object.create(null);if(T.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:L}),S&2&&typeof L!="string")for(var _ in L)T.d(g,_,function(d){return L[d]}.bind(null,_));return g},T.n=function(L){var S=L&&L.__esModule?function(){return L.default}:function(){return L};return T.d(S,"a",S),S},T.o=function(L,S){return Object.prototype.hasOwnProperty.call(L,S)},T.p="/dist/",T(T.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(P,m,T){"use strict";var L=Object.prototype.hasOwnProperty,S="~";function g(){}Object.create&&(g.prototype=Object.create(null),new g().__proto__||(S=!1));function _(r,h,p){this.fn=r,this.context=h,this.once=p||!1}function d(r,h,p,f,x){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new _(p,f||r,x),l=S?S+h:h;return r._events[l]?r._events[l].fn?r._events[l]=[r._events[l],v]:r._events[l].push(v):(r._events[l]=v,r._eventsCount++),r}function o(r,h){--r._eventsCount===0?r._events=new g:delete r._events[h]}function i(){this._events=new g,this._eventsCount=0}i.prototype.eventNames=function(){var h=[],p,f;if(this._eventsCount===0)return h;for(f in p=this._events)L.call(p,f)&&h.push(S?f.slice(1):f);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},i.prototype.listeners=function(h){var p=S?S+h:h,f=this._events[p];if(!f)return[];if(f.fn)return[f.fn];for(var x=0,v=f.length,l=new Array(v);x<v;x++)l[x]=f[x].fn;return l},i.prototype.listenerCount=function(h){var p=S?S+h:h,f=this._events[p];return f?f.fn?1:f.length:0},i.prototype.emit=function(h,p,f,x,v,l){var n=S?S+h:h;if(!this._events[n])return!1;var s=this._events[n],u=arguments.length,w,y;if(s.fn){s.once&&this.removeListener(h,s.fn,void 0,!0);switch(u){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,p),!0;case 3:return s.fn.call(s.context,p,f),!0;case 4:return s.fn.call(s.context,p,f,x),!0;case 5:return s.fn.call(s.context,p,f,x,v),!0;case 6:return s.fn.call(s.context,p,f,x,v,l),!0}for(y=1,w=new Array(u-1);y<u;y++)w[y-1]=arguments[y];s.fn.apply(s.context,w)}else{var a=s.length,R;for(y=0;y<a;y++){s[y].once&&this.removeListener(h,s[y].fn,void 0,!0);switch(u){case 1:s[y].fn.call(s[y].context);break;case 2:s[y].fn.call(s[y].context,p);break;case 3:s[y].fn.call(s[y].context,p,f);break;case 4:s[y].fn.call(s[y].context,p,f,x);break;default:if(!w)for(R=1,w=new Array(u-1);R<u;R++)w[R-1]=arguments[R];s[y].fn.apply(s[y].context,w)}}}return!0},i.prototype.on=function(h,p,f){return d(this,h,p,f,!1)},i.prototype.once=function(h,p,f){return d(this,h,p,f,!0)},i.prototype.removeListener=function(h,p,f,x){var v=S?S+h:h;if(!this._events[v])return this;if(!p)return o(this,v),this;var l=this._events[v];if(l.fn)l.fn===p&&(!x||l.once)&&(!f||l.context===f)&&o(this,v);else{for(var n=0,s=[],u=l.length;n<u;n++)(l[n].fn!==p||x&&!l[n].once||f&&l[n].context!==f)&&s.push(l[n]);s.length?this._events[v]=s.length===1?s[0]:s:o(this,v)}return this},i.prototype.removeAllListeners=function(h){var p;return h?(p=S?S+h:h,this._events[p]&&o(this,p)):(this._events=new g,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=S,i.EventEmitter=i,P.exports=i},"./node_modules/url-toolkit/src/url-toolkit.js":function(P,m,T){(function(L){var S=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,g=/^([^\/?#]*)([^]*)$/,_=/(?:\/|^)\.(?=\/)/g,d=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(i,r,h){if(h=h||{},i=i.trim(),r=r.trim(),!r){if(!h.alwaysNormalize)return i;var p=o.parseURL(i);if(!p)throw new Error("Error trying to parse base URL.");return p.path=o.normalizePath(p.path),o.buildURLFromParts(p)}var f=o.parseURL(r);if(!f)throw new Error("Error trying to parse relative URL.");if(f.scheme)return h.alwaysNormalize?(f.path=o.normalizePath(f.path),o.buildURLFromParts(f)):r;var x=o.parseURL(i);if(!x)throw new Error("Error trying to parse base URL.");if(!x.netLoc&&x.path&&x.path[0]!=="/"){var v=g.exec(x.path);x.netLoc=v[1],x.path=v[2]}x.netLoc&&!x.path&&(x.path="/");var l={scheme:x.scheme,netLoc:f.netLoc,path:null,params:f.params,query:f.query,fragment:f.fragment};if(!f.netLoc&&(l.netLoc=x.netLoc,f.path[0]!=="/"))if(!f.path)l.path=x.path,f.params||(l.params=x.params,f.query||(l.query=x.query));else{var n=x.path,s=n.substring(0,n.lastIndexOf("/")+1)+f.path;l.path=o.normalizePath(s)}return l.path===null&&(l.path=h.alwaysNormalize?o.normalizePath(f.path):f.path),o.buildURLFromParts(l)},parseURL:function(i){var r=S.exec(i);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(i){for(i=i.split("").reverse().join("").replace(_,"");i.length!==(i=i.replace(d,"")).length;);return i.split("").reverse().join("")},buildURLFromParts:function(i){return i.scheme+i.netLoc+i.path+i.params+i.query+i.fragment}};P.exports=o})(this)},"./node_modules/webworkify-webpack/index.js":function(P,m,T){function L(h){var p={};function f(v){if(p[v])return p[v].exports;var l=p[v]={i:v,l:!1,exports:{}};return h[v].call(l.exports,l,l.exports,f),l.l=!0,l.exports}f.m=h,f.c=p,f.i=function(v){return v},f.d=function(v,l,n){f.o(v,l)||Object.defineProperty(v,l,{configurable:!1,enumerable:!0,get:n})},f.r=function(v){Object.defineProperty(v,"__esModule",{value:!0})},f.n=function(v){var l=v&&v.__esModule?function(){return v.default}:function(){return v};return f.d(l,"a",l),l},f.o=function(v,l){return Object.prototype.hasOwnProperty.call(v,l)},f.p="/",f.oe=function(v){throw console.error(v),v};var x=f(f.s=ENTRY_MODULE);return x.default||x}var S="[\\.|\\-|\\+|\\w|/|@]+",g="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+S+").*?\\)";function _(h){return(h+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function d(h){return!isNaN(1*h)}function o(h,p,f){var x={};x[f]=[];var v=p.toString(),l=v.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return x;for(var n=l[1],s=new RegExp("(\\\\n|\\W)"+_(n)+g,"g"),u;u=s.exec(v);){if(u[3]==="dll-reference")continue;x[f].push(u[3])}for(s=new RegExp("\\("+_(n)+'\\("(dll-reference\\s('+S+'))"\\)\\)'+g,"g");u=s.exec(v);)h[u[2]]||(x[f].push(u[1]),h[u[2]]=T(u[1]).m),x[u[2]]=x[u[2]]||[],x[u[2]].push(u[4]);for(var w=Object.keys(x),y=0;y<w.length;y++)for(var a=0;a<x[w[y]].length;a++)d(x[w[y]][a])&&(x[w[y]][a]=1*x[w[y]][a]);return x}function i(h){var p=Object.keys(h);return p.reduce(function(f,x){return f||h[x].length>0},!1)}function r(h,p){for(var f={main:[p]},x={main:[]},v={main:{}};i(f);)for(var l=Object.keys(f),n=0;n<l.length;n++){var s=l[n],u=f[s],w=u.pop();if(v[s]=v[s]||{},v[s][w]||!h[s][w])continue;v[s][w]=!0,x[s]=x[s]||[],x[s].push(w);for(var y=o(h,h[s][w],s),a=Object.keys(y),R=0;R<a.length;R++)f[a[R]]=f[a[R]]||[],f[a[R]]=f[a[R]].concat(y[a[R]])}return x}P.exports=function(h,p){p=p||{};var f={main:T.m},x=p.all?{main:Object.keys(f.main)}:r(f,h),v="";Object.keys(x).filter(function(w){return w!=="main"}).forEach(function(w){for(var y=0;x[w][y];)y++;x[w].push(y),f[w][y]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",v=v+"var "+w+" = ("+L.toString().replace("ENTRY_MODULE",JSON.stringify(y))+")({"+x[w].map(function(a){return""+JSON.stringify(a)+": "+f[w][a].toString()}).join(",")+`});
`}),v=v+"new (("+L.toString().replace("ENTRY_MODULE",JSON.stringify(h))+")({"+x.main.map(function(w){return""+JSON.stringify(w)+": "+f.main[w].toString()}).join(",")+"}))(self);";var l=new window.Blob([v],{type:"text/javascript"});if(p.bare)return l;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,s=n.createObjectURL(l),u=new window.Worker(s);return u.objectURL=s,u}},"./src/config.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"hlsDefaultConfig",function(){return R}),T.d(m,"mergeConfig",function(){return c}),T.d(m,"enableStreamingMode",function(){return b});var L=T("./src/controller/abr-controller.ts"),S=T("./src/controller/audio-stream-controller.ts"),g=T("./src/controller/audio-track-controller.ts"),_=T("./src/controller/subtitle-stream-controller.ts"),d=T("./src/controller/subtitle-track-controller.ts"),o=T("./src/controller/buffer-controller.ts"),i=T("./src/controller/timeline-controller.ts"),r=T("./src/controller/cap-level-controller.ts"),h=T("./src/controller/fps-controller.ts"),p=T("./src/controller/eme-controller.ts"),f=T("./src/controller/cmcd-controller.ts"),x=T("./src/utils/xhr-loader.ts"),v=T("./src/utils/fetch-loader.ts"),l=T("./src/utils/cues.ts"),n=T("./src/utils/mediakeys-helper.ts"),s=T("./src/utils/logger.ts");function u(){return u=Object.assign||function(E){for(var C=1;C<arguments.length;C++){var F=arguments[C];for(var j in F)Object.prototype.hasOwnProperty.call(F,j)&&(E[j]=F[j])}return E},u.apply(this,arguments)}function w(E,C){var F=Object.keys(E);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(E);C&&(j=j.filter(function(k){return Object.getOwnPropertyDescriptor(E,k).enumerable})),F.push.apply(F,j)}return F}function y(E){for(var C=1;C<arguments.length;C++){var F=arguments[C]!=null?arguments[C]:{};C%2?w(Object(F),!0).forEach(function(j){a(E,j,F[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(F)):w(Object(F)).forEach(function(j){Object.defineProperty(E,j,Object.getOwnPropertyDescriptor(F,j))})}return E}function a(E,C,F){return C in E?Object.defineProperty(E,C,{value:F,enumerable:!0,configurable:!0,writable:!0}):E[C]=F,E}var R=y(y({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:x.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:L.default,bufferController:o.default,capLevelController:r.default,fpsController:h.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},D()),{},{subtitleStreamController:_.SubtitleStreamController,subtitleTrackController:d.default,timelineController:i.TimelineController,audioStreamController:S.default,audioTrackController:g.default,emeController:p.default,cmcdController:f.default});function D(){return{cueHandler:l.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 c(E,C){if((C.liveSyncDurationCount||C.liveMaxLatencyDurationCount)&&(C.liveSyncDuration||C.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(C.liveMaxLatencyDurationCount!==void 0&&(C.liveSyncDurationCount===void 0||C.liveMaxLatencyDurationCount<=C.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(C.liveMaxLatencyDuration!==void 0&&(C.liveSyncDuration===void 0||C.liveMaxLatencyDuration<=C.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return u({},E,C)}function b(E){var C=E.loader;if(C!==v.default&&C!==x.default)s.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),E.progressive=!1;else{var F=Object(v.fetchSupported)();F&&(E.loader=v.default,E.progressive=!0,E.enableSoftwareAES=!0,s.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/polyfills/number.ts"),S=T("./src/utils/ewma-bandwidth-estimator.ts"),g=T("./src/events.ts"),_=T("./src/utils/buffer-helper.ts"),d=T("./src/errors.ts"),o=T("./src/types/loader.ts"),i=T("./src/utils/logger.ts");function r(f,x){for(var v=0;v<x.length;v++){var l=x[v];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,l.key,l)}}function h(f,x,v){return x&&r(f.prototype,x),v&&r(f,v),f}var p=function(){function f(v){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=v;var l=v.config;this.bwEstimator=new S.default(l.abrEwmaSlowVoD,l.abrEwmaFastVoD,l.abrEwmaDefaultEstimate),this.registerListeners()}var x=f.prototype;return x.registerListeners=function(){var l=this.hls;l.on(g.Events.FRAG_LOADING,this.onFragLoading,this),l.on(g.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(g.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.on(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(g.Events.ERROR,this.onError,this)},x.unregisterListeners=function(){var l=this.hls;l.off(g.Events.FRAG_LOADING,this.onFragLoading,this),l.off(g.Events.FRAG_LOADED,this.onFragLoaded,this),l.off(g.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.off(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(g.Events.ERROR,this.onError,this)},x.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},x.onFragLoading=function(l,n){var s=n.frag;if(s.type===o.PlaylistLevelType.MAIN&&!this.timer){var u;this.fragCurrent=s,this.partCurrent=(u=n.part)!=null?u:null,this.timer=self.setInterval(this.onCheck,100)}},x.onLevelLoaded=function(l,n){var s=this.hls.config;n.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)},x._abandonRulesCheck=function(){var l=this.fragCurrent,n=this.partCurrent,s=this.hls,u=s.autoLevelEnabled,w=s.config,y=s.media;if(!l||!y)return;var a=n?n.stats:l.stats,R=n?n.duration:l.duration;if(a.aborted){i.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!u||y.paused||!y.playbackRate||!y.readyState)return;var D=performance.now()-a.loading.start,c=Math.abs(y.playbackRate);if(D<=500*R/c)return;var b=s.levels,E=s.minAutoLevel,C=b[l.level],F=a.total||Math.max(a.loaded,Math.round(R*C.maxBitrate/8)),j=Math.max(1,a.bwEstimate?a.bwEstimate/8:a.loaded*1e3/D),k=(F-a.loaded)/j,X=y.currentTime,G=(_.BufferHelper.bufferInfo(y,X,w.maxBufferHole).end-X)/c;if(G>=2*R/c||k<=G)return;var H=Number.POSITIVE_INFINITY,K;for(K=l.level-1;K>E;K--){var B=b[K].maxBitrate;if(H=R*B/(8*.8*j),H<G)break}if(H>=k)return;var U=this.bwEstimator.getEstimate();i.logger.warn("Fragment "+l.sn+(n?" part "+n.index:"")+" of level "+l.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+K+`
Current BW estimate: `+(Object(L.isFiniteNumber)(U)?(U/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+k.toFixed(3)+` s
Estimated load time for the next fragment: `+H.toFixed(3)+` s
Time to underbuffer: `+G.toFixed(3)+" s"),s.nextLoadLevel=K,this.bwEstimator.sample(D,a.loaded),this.clearTimer(),l.loader&&(this.fragCurrent=this.partCurrent=null,l.loader.abort()),s.trigger(g.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:l,part:n,stats:a})},x.onFragLoaded=function(l,n){var s=n.frag,u=n.part;if(s.type===o.PlaylistLevelType.MAIN&&Object(L.isFiniteNumber)(s.sn)){var w=u?u.stats:s.stats,y=u?u.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var a=this.hls.levels[s.level],R=(a.loaded?a.loaded.bytes:0)+w.loaded,D=(a.loaded?a.loaded.duration:0)+y;a.loaded={bytes:R,duration:D},a.realBitrate=Math.round(8*R/D)}if(s.bitrateTest){var c={stats:w,frag:s,part:u,id:s.type};this.onFragBuffered(g.Events.FRAG_BUFFERED,c),s.bitrateTest=!1}}},x.onFragBuffered=function(l,n){var s=n.frag,u=n.part,w=u?u.stats:s.stats;if(w.aborted)return;if(s.type!==o.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var y=w.parsing.end-w.loading.start;this.bwEstimator.sample(y,w.loaded),w.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=y/1e3:this.bitrateTestDelay=0},x.onError=function(l,n){switch(n.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},x.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},x.getNextABRAutoLevel=function(){var l=this.fragCurrent,n=this.partCurrent,s=this.hls,u=s.maxAutoLevel,w=s.config,y=s.minAutoLevel,a=s.media,R=n?n.duration:l?l.duration:0,D=a?a.currentTime:0,c=a&&a.playbackRate!==0?Math.abs(a.playbackRate):1,b=this.bwEstimator?this.bwEstimator.getEstimate():w.abrEwmaDefaultEstimate,E=(_.BufferHelper.bufferInfo(a,D,w.maxBufferHole).end-D)/c,C=this.findBestLevel(b,y,u,E,w.abrBandWidthFactor,w.abrBandWidthUpFactor);if(C>=0)return C;i.logger.trace((E?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var F=R?Math.min(R,w.maxStarvationDelay):w.maxStarvationDelay,j=w.abrBandWidthFactor,k=w.abrBandWidthUpFactor;if(!E){var X=this.bitrateTestDelay;if(X){var G=R?Math.min(R,w.maxLoadingDelay):w.maxLoadingDelay;F=G-X,i.logger.trace("bitrate test took "+Math.round(1e3*X)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*F)+" ms"),j=k=1}}return C=this.findBestLevel(b,y,u,E+F,j,k),Math.max(C,0)},x.findBestLevel=function(l,n,s,u,w,y){for(var a,R=this.fragCurrent,D=this.partCurrent,c=this.lastLoadedFragLevel,b=this.hls.levels,E=b[c],C=!!(E!=null&&(a=E.details)!==null&&a!==void 0&&a.live),F=E==null?void 0:E.codecSet,j=D?D.duration:R?R.duration:0,k=s;k>=n;k--){var X=b[k];if(!X||F&&X.codecSet!==F)continue;var G=X.details,H=(D?G==null?void 0:G.partTarget:G==null?void 0:G.averagetargetduration)||j,K=void 0;k<=c?K=w*l:K=y*l;var B=b[k].maxBitrate,U=B*H/K;if(i.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+k+"/"+Math.round(K)+"/"+B+"/"+H+"/"+u+"/"+U),K>B&&(!U||C&&!this.bitrateTestDelay||U<u))return k}return-1},h(f,[{key:"nextAutoLevel",get:function(){var l=this._nextAutoLevel,n=this.bwEstimator;if(l!==-1&&(!n||!n.canEstimate()))return l;var s=this.getNextABRAutoLevel();return l!==-1&&(s=Math.min(l,s)),s},set:function(l){this._nextAutoLevel=l}}]),f}();m.default=p},"./src/controller/audio-stream-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/polyfills/number.ts"),S=T("./src/controller/base-stream-controller.ts"),g=T("./src/events.ts"),_=T("./src/utils/buffer-helper.ts"),d=T("./src/controller/fragment-tracker.ts"),o=T("./src/types/level.ts"),i=T("./src/types/loader.ts"),r=T("./src/loader/fragment.ts"),h=T("./src/demux/chunk-cache.ts"),p=T("./src/demux/transmuxer-interface.ts"),f=T("./src/types/transmuxer.ts"),x=T("./src/controller/fragment-finders.ts"),v=T("./src/utils/discontinuities.ts"),l=T("./src/errors.ts"),n=T("./src/utils/logger.ts");function s(){return s=Object.assign||function(R){for(var D=1;D<arguments.length;D++){var c=arguments[D];for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(R[b]=c[b])}return R},s.apply(this,arguments)}function u(R,D){R.prototype=Object.create(D.prototype),R.prototype.constructor=R,w(R,D)}function w(R,D){return w=Object.setPrototypeOf||function(b,E){return b.__proto__=E,b},w(R,D)}var y=100,a=function(R){u(D,R);function D(b,E){var C;return C=R.call(this,b,E,"[audio-stream-controller]")||this,C.videoBuffer=null,C.videoTrackCC=-1,C.waitingVideoCC=-1,C.audioSwitch=!1,C.trackId=-1,C.waitingData=null,C.mainDetails=null,C.bufferFlushed=!1,C._registerListeners(),C}var c=D.prototype;return c.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},c._registerListeners=function(){var E=this.hls;E.on(g.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(g.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),E.on(g.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(g.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.on(g.Events.ERROR,this.onError,this),E.on(g.Events.BUFFER_RESET,this.onBufferReset,this),E.on(g.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(g.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(g.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.on(g.Events.FRAG_BUFFERED,this.onFragBuffered,this)},c._unregisterListeners=function(){var E=this.hls;E.off(g.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(g.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),E.off(g.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(g.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.off(g.Events.ERROR,this.onError,this),E.off(g.Events.BUFFER_RESET,this.onBufferReset,this),E.off(g.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(g.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(g.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.off(g.Events.FRAG_BUFFERED,this.onFragBuffered,this)},c.onInitPtsFound=function(E,C){var F=C.frag,j=C.id,k=C.initPTS;if(j==="main"){var X=F.cc;this.initPTS[F.cc]=k,this.log("InitPTS for cc: "+X+" found from main: "+k),this.videoTrackCC=X,this.state===S.State.WAITING_INIT_PTS&&this.tick()}},c.startLoad=function(E){if(!this.levels){this.startPosition=E,this.state=S.State.STOPPED;return}var C=this.lastCurrentTime;this.stopLoad(),this.setInterval(y),this.fragLoadError=0,C>0&&E===-1?(this.log("Override startPosition with lastCurrentTime @"+C.toFixed(3)),this.state=S.State.IDLE):(this.loadedmetadata=!1,this.state=S.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()},c.doTick=function(){switch(this.state){case S.State.IDLE:this.doTickIdle();break;case S.State.WAITING_TRACK:{var E,C=this.levels,F=this.trackId,j=C==null||((E=C[F])===null||E===void 0)?void 0:E.details;if(j){if(this.waitForCdnTuneIn(j))break;this.state=S.State.WAITING_INIT_PTS}break}case S.State.FRAG_LOADING_WAITING_RETRY:{var k,X=performance.now(),G=this.retryDate;(!G||X>=G||(k=this.media)!==null&&k!==void 0&&k.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=S.State.IDLE);break}case S.State.WAITING_INIT_PTS:{var H=this.waitingData;if(H){var K=H.frag,B=H.part,U=H.cache,W=H.complete;if(this.initPTS[K.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=S.State.FRAG_LOADING;var Q=U.flush(),ie={frag:K,part:B,payload:Q,networkDetails:null};this._handleFragmentLoadProgress(ie),W&&R.prototype._handleFragmentLoadComplete.call(this,ie)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+K.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ce=this.getLoadPosition(),he=_.BufferHelper.bufferInfo(this.mediaBuffer,ce,this.config.maxBufferHole),be=Object(x.fragmentWithinToleranceTest)(he.end,this.config.maxFragLookUpTolerance,K);be<0&&(n.logger.log("Waiting fragment cc ("+K.cc+") @ "+K.start+" cancelled because another fragment at "+he.end+" is needed"),this.clearWaitingFragment())}}else this.state=S.State.IDLE}}this.onTickEnd()},c.clearWaitingFragment=function(){var E=this.waitingData;E&&(this.fragmentTracker.removeFragment(E.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=S.State.IDLE)},c.onTickEnd=function(){var E=this.media;if(!E||!E.readyState)return;var C=this.mediaBuffer?this.mediaBuffer:E,F=C.buffered;!this.loadedmetadata&&F.length&&(this.loadedmetadata=!0),this.lastCurrentTime=E.currentTime},c.doTickIdle=function(){var E,C,F=this.hls,j=this.levels,k=this.media,X=this.trackId,G=F.config;if(!j||!j[X])return;if(!k&&(this.startFragRequested||!G.startFragPrefetch))return;var H=j[X],K=H.details;if(!K||K.live&&this.levelLastLoaded!==X||this.waitForCdnTuneIn(K)){this.state=S.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,i.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,i.PlaylistLevelType.AUDIO);if(B===null)return;var U=B.len,W=this.getMaxBufferLength(),Q=this.audioSwitch;if(U>=W&&!Q)return;if(!Q&&this._streamEnded(B,K)){F.trigger(g.Events.BUFFER_EOS,{type:"audio"}),this.state=S.State.ENDED;return}var ie=K.fragments,ce=ie[0].start,he=B.end;if(Q){var be=this.getLoadPosition();he=be,K.PTSKnown&&be<ce&&((B.end>ce||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),k.currentTime=ce+.05))}var ne=this.getNextFragment(he,K);if(!ne){this.bufferFlushed=!0;return}((E=ne.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((C=ne.decryptdata)!==null&&C!==void 0&&C.key)?this.loadKey(ne,K):this.loadFragment(ne,K,he)},c.getMaxBufferLength=function(){var E=R.prototype.getMaxBufferLength.call(this),C=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,i.PlaylistLevelType.MAIN);return C===null?E:Math.max(E,C.len)},c.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},c.onAudioTracksUpdated=function(E,C){var F=C.audioTracks;this.resetTransmuxer(),this.levels=F.map(function(j){return new o.Level(j)})},c.onAudioTrackSwitching=function(E,C){var F=!!C.url;this.trackId=C.id;var j=this.fragCurrent;j!=null&&j.loader&&j.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),F?this.setInterval(y):this.resetTransmuxer(),F?(this.audioSwitch=!0,this.state=S.State.IDLE):this.state=S.State.STOPPED,this.tick()},c.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},c.onLevelLoaded=function(E,C){this.mainDetails=C.details},c.onAudioTrackLoaded=function(E,C){var F,j=this.levels,k=C.details,X=C.id;if(!j){this.warn("Audio tracks were reset while loading level "+X);return}this.log("Track "+X+" loaded ["+k.startSN+","+k.endSN+"],duration:"+k.totalduration);var G=j[X],H=0;if(k.live||(F=G.details)!==null&&F!==void 0&&F.live){var K=this.mainDetails;if(k.fragments[0]||(k.deltaUpdateFailed=!0),k.deltaUpdateFailed||!K)return;!G.details&&k.hasProgramDateTime&&K.hasProgramDateTime?(Object(v.alignMediaPlaylistByPDT)(k,K),H=k.fragments[0].start):H=this.alignPlaylists(k,G.details)}G.details=k,this.levelLastLoaded=X,!this.startFragRequested&&(this.mainDetails||!k.live)&&this.setStartPosition(G.details,H),this.state===S.State.WAITING_TRACK&&!this.waitForCdnTuneIn(k)&&(this.state=S.State.IDLE),this.tick()},c._handleFragmentLoadProgress=function(E){var C,F=E.frag,j=E.part,k=E.payload,X=this.config,G=this.trackId,H=this.levels;if(!H){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+F.sn+" of level "+F.level+" will not be buffered");return}var K=H[G];console.assert(K,"Audio track is defined on fragment load progress");var B=K.details;console.assert(B,"Audio track details are defined on fragment load progress");var U=X.defaultAudioCodec||K.audioCodec||"mp4a.40.2",W=this.transmuxer;W||(W=this.transmuxer=new p.default(this.hls,i.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Q=this.initPTS[F.cc],ie=(C=F.initSegment)===null||C===void 0?void 0:C.data;if(Q!==void 0){var ce=!1,he=j?j.index:-1,be=he!==-1,ne=new f.ChunkMetadata(F.level,F.sn,F.stats.chunkCount,k.byteLength,he,be);W.push(k,ie,U,"",F,j,B.totalduration,ce,ne,Q)}else{n.logger.log("Unknown video PTS for cc "+F.cc+", waiting for video PTS before demuxing audio frag "+F.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+G);var le=this.waitingData=this.waitingData||{frag:F,part:j,cache:new h.default,complete:!1},ue=le.cache;ue.push(new Uint8Array(k)),this.waitingVideoCC=this.videoTrackCC,this.state=S.State.WAITING_INIT_PTS}},c._handleFragmentLoadComplete=function(E){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,E)},c.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},c.onBufferCreated=function(E,C){var F=C.tracks.audio;F&&(this.mediaBuffer=F.buffer),C.tracks.video&&(this.videoBuffer=C.tracks.video.buffer)},c.onFragBuffered=function(E,C){var F=C.frag,j=C.part;if(F.type!==i.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(F)){this.warn("Fragment "+F.sn+(j?" p: "+j.index:"")+" of level "+F.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}F.sn!=="initSegment"&&(this.fragPrevious=F,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(g.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(F,j)},c.onError=function(E,C){switch(C.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(i.PlaylistLevelType.AUDIO,C);break;case l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case l.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==S.State.ERROR&&this.state!==S.State.STOPPED&&(this.state=C.fatal?S.State.ERROR:S.State.IDLE,this.warn(C.details+" while loading frag, switching to "+this.state+" state"));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(C.parent==="audio"&&(this.state===S.State.PARSING||this.state===S.State.PARSED)){var F=!0,j=this.getFwdBufferInfo(this.mediaBuffer,i.PlaylistLevelType.AUDIO);j&&j.len>.5&&(F=!this.reduceMaxBufferLength(j.len)),F&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},c.onBufferFlushed=function(E,C){var F=C.type;F===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},c._handleTransmuxComplete=function(E){var C,F="audio",j=this.hls,k=E.remuxResult,X=E.chunkMeta,G=this.getCurrentContext(X);if(!G){this.warn("The loading context changed while buffering fragment "+X.sn+" of level "+X.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(X.level);return}var H=G.frag,K=G.part,B=k.audio,U=k.text,W=k.id3,Q=k.initSegment;if(this.fragContextChanged(H))return;if(this.state=S.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),Q!=null&&Q.tracks&&(this._bufferInitSegment(Q.tracks,H,X),j.trigger(g.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:F,tracks:Q.tracks})),B){var ie=B.startPTS,ce=B.endPTS,he=B.startDTS,be=B.endDTS;K&&(K.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:ie,endPTS:ce,startDTS:he,endDTS:be}),H.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,ie,ce,he,be),this.bufferFragmentData(B,H,K,X)}if(W!=null&&(C=W.samples)!==null&&C!==void 0&&C.length){var ne=s({frag:H,id:F},W);j.trigger(g.Events.FRAG_PARSING_METADATA,ne)}if(U){var le=s({frag:H,id:F},U);j.trigger(g.Events.FRAG_PARSING_USERDATA,le)}},c._bufferInitSegment=function(E,C,F){if(this.state!==S.State.PARSING)return;E.video&&delete E.video;var j=E.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(g.Events.BUFFER_CODECS,E);var k=j.initSegment;if(k!=null&&k.byteLength){var X={type:"audio",frag:C,part:null,chunkMeta:F,parent:C.type,data:k};this.hls.trigger(g.Events.BUFFER_APPENDING,X)}this.tick()},c.loadFragment=function(E,C,F){var j=this.fragmentTracker.getState(E);this.fragCurrent=E,(this.audioSwitch||j===d.FragmentState.NOT_LOADED||j===d.FragmentState.PARTIAL)&&(E.sn==="initSegment"?this._loadInitSegment(E):C.live&&!Object(L.isFiniteNumber)(this.initPTS[E.cc])?(this.log("Waiting for video PTS in continuity counter "+E.cc+" of live stream before loading audio fragment "+E.sn+" of level "+this.trackId),this.state=S.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,E,C,F)))},c.completeAudioSwitch=function(){var E=this.hls,C=this.media,F=this.trackId;C&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,E.trigger(g.Events.AUDIO_TRACK_SWITCHED,{id:F})},D}(S.default);m.default=a},"./src/controller/audio-track-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts"),S=T("./src/errors.ts"),g=T("./src/controller/base-playlist-controller.ts"),_=T("./src/types/loader.ts");function d(p,f){for(var x=0;x<f.length;x++){var v=f[x];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}function o(p,f,x){return f&&d(p.prototype,f),x&&d(p,x),p}function i(p,f){p.prototype=Object.create(f.prototype),p.prototype.constructor=p,r(p,f)}function r(p,f){return r=Object.setPrototypeOf||function(v,l){return v.__proto__=l,v},r(p,f)}var h=function(p){i(f,p);function f(v){var l;return l=p.call(this,v,"[audio-track-controller]")||this,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.trackName="",l.selectDefaultTrack=!0,l.registerListeners(),l}var x=f.prototype;return x.registerListeners=function(){var l=this.hls;l.on(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(L.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(L.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(L.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(L.Events.ERROR,this.onError,this)},x.unregisterListeners=function(){var l=this.hls;l.off(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(L.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(L.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(L.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(L.Events.ERROR,this.onError,this)},x.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,p.prototype.destroy.call(this)},x.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},x.onManifestParsed=function(l,n){this.tracks=n.audioTracks||[]},x.onAudioTrackLoaded=function(l,n){var s=n.id,u=n.details,w=this.tracksInGroup[s];if(!w){this.warn("Invalid audio track id "+s);return}var y=w.details;w.details=n.details,this.log("audioTrack "+s+" loaded ["+u.startSN+"-"+u.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,n,y))},x.onLevelLoading=function(l,n){this.switchLevel(n.level)},x.onLevelSwitching=function(l,n){this.switchLevel(n.level)},x.switchLevel=function(l){var n=this.hls.levels[l];if(!(n!=null&&n.audioGroupIds))return;var s=n.audioGroupIds[n.urlId];if(this.groupId!==s){this.groupId=s;var u=this.tracks.filter(function(y){return!s||y.groupId===s});this.selectDefaultTrack&&!u.some(function(y){return y.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=u;var w={audioTracks:u};this.log("Updating audio tracks, "+u.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(L.Events.AUDIO_TRACKS_UPDATED,w),this.selectInitialTrack()}},x.onError=function(l,n){if(p.prototype.onError.call(this,l,n),n.fatal||!n.context)return;n.context.type===_.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},x.setAudioTrack=function(l){var n=this.tracksInGroup;if(l<0||l>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=n[this.trackId];this.log("Now switching to audio-track index "+l);var u=n[l],w=u.id,y=u.groupId,a=y===void 0?"":y,R=u.name,D=u.type,c=u.url;if(this.trackId=l,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(L.Events.AUDIO_TRACK_SWITCHING,{id:w,groupId:a,name:R,type:D,url:c}),u.details&&!u.details.live)return;var b=this.switchParams(u.url,s==null?void 0:s.details);this.loadPlaylist(b)},x.selectInitialTrack=function(){var l=this.tracksInGroup;console.assert(l.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,s=this.findTrackId(n)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},x.findTrackId=function(l){for(var n=this.tracksInGroup,s=0;s<n.length;s++){var u=n[s];if((!this.selectDefaultTrack||u.default)&&(!l||l===u.name))return u.id}return-1},x.loadPlaylist=function(l){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var s=n.id,u=n.groupId,w=n.url;if(l)try{w=l.addDirectives(w)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("loading audio-track playlist for id: "+s),this.clearTimer(),this.hls.trigger(L.Events.AUDIO_TRACK_LOADING,{url:w,id:s,groupId:u,deliveryDirectives:l||null})}},o(f,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1,this.setAudioTrack(l)}}]),f}(g.default);m.default=h},"./src/controller/base-playlist-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return o});var L=T("./src/polyfills/number.ts"),S=T("./src/types/level.ts"),g=T("./src/controller/level-helper.ts"),_=T("./src/utils/logger.ts"),d=T("./src/errors.ts"),o=function(){function i(h,p){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=_.logger.log.bind(_.logger,p+":"),this.warn=_.logger.warn.bind(_.logger,p+":"),this.hls=h}var r=i.prototype;return r.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},r.onError=function(p,f){f.fatal&&f.type===d.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(p,f){var x=f==null?void 0:f.renditionReports;if(x)for(var v=0;v<x.length;v++){var l=x[v],n=""+l.URI;if(n===p.substr(-n.length)){var s=parseInt(l["LAST-MSN"]),u=parseInt(l["LAST-PART"]);if(f&&this.hls.config.lowLatencyMode){var w=Math.min(f.age-f.partTarget,f.targetduration);u!==void 0&&w>f.partTarget&&(u+=1)}if(Object(L.isFiniteNumber)(s))return new S.HlsUrlParameters(s,Object(L.isFiniteNumber)(u)?u:void 0,S.HlsSkip.No)}}},r.loadPlaylist=function(p){},r.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},r.playlistLoaded=function(p,f,x){var v=this,l=f.details,n=f.stats,s=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(l.advancedDateTime=Date.now()-s,l.live||x!=null&&x.live){if(l.reloaded(x),x&&this.log("live playlist "+p+" "+(l.advanced?"REFRESHED "+l.lastPartSn+"-"+l.lastPartIndex:"MISSED")),x&&l.fragments.length>0&&Object(g.mergeDetails)(x,l),!this.canLoad||!l.live)return;var u,w=void 0,y=void 0;if(l.canBlockReload&&l.endSN&&l.advanced){var a=this.hls.config.lowLatencyMode,R=l.lastPartSn,D=l.endSN,c=l.lastPartIndex,b=c!==-1,E=R===D,C=a?0:c;b?(w=E?D+1:R,y=E?C:c+1):w=D+1;var F=l.age,j=F+l.ageHeader,k=Math.min(j-l.partTarget,l.targetduration*1.5);if(k>0){if(x&&k>x.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+x.tuneInGoal+" to: "+k+" with playlist age: "+l.age),k=0;else{var X=Math.floor(k/l.targetduration);if(w+=X,y!==void 0){var G=Math.round(k%l.targetduration/l.partTarget);y+=G}this.log("CDN Tune-in age: "+l.ageHeader+"s last advanced "+F.toFixed(2)+"s goal: "+k+" skip sn "+X+" to part "+y)}l.tuneInGoal=k}if(u=this.getDeliveryDirectives(l,f.deliveryDirectives,w,y),a||!E){this.loadPlaylist(u);return}}else u=this.getDeliveryDirectives(l,f.deliveryDirectives,w,y);var H=Object(g.computeReloadInterval)(l,n);w!==void 0&&l.canBlockReload&&(H-=l.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return v.loadPlaylist(u)},H)}else this.clearTimer()},r.getDeliveryDirectives=function(p,f,x,v){var l=Object(S.getSkipValue)(p,x);return f!=null&&f.skip&&p.deltaUpdateFailed&&(x=f.msn,v=f.part,l=S.HlsSkip.No),new S.HlsUrlParameters(x,v,l)},r.retryLoadingOrFail=function(p){var f=this,x=this.hls.config,v=this.retryCount<x.levelLoadingMaxRetry;if(v){var l;if(this.retryCount++,p.details.indexOf("LoadTimeOut")>-1&&(l=p.context)!==null&&l!==void 0&&l.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*x.levelLoadingRetryDelay,x.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return f.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return v},i}()},"./src/controller/base-stream-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"State",function(){return D}),T.d(m,"default",function(){return c});var L=T("./src/polyfills/number.ts"),S=T("./src/task-loop.ts"),g=T("./src/controller/fragment-tracker.ts"),_=T("./src/utils/buffer-helper.ts"),d=T("./src/utils/logger.ts"),o=T("./src/events.ts"),i=T("./src/errors.ts"),r=T("./src/types/transmuxer.ts"),h=T("./src/utils/mp4-tools.ts"),p=T("./src/utils/discontinuities.ts"),f=T("./src/controller/fragment-finders.ts"),x=T("./src/controller/level-helper.ts"),v=T("./src/loader/fragment-loader.ts"),l=T("./src/crypt/decrypter.ts"),n=T("./src/utils/time-ranges.ts"),s=T("./src/types/loader.ts");function u(b,E){for(var C=0;C<E.length;C++){var F=E[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(b,F.key,F)}}function w(b,E,C){return E&&u(b.prototype,E),C&&u(b,C),b}function y(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function a(b,E){b.prototype=Object.create(E.prototype),b.prototype.constructor=b,R(b,E)}function R(b,E){return R=Object.setPrototypeOf||function(F,j){return F.__proto__=j,F},R(b,E)}var D={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"},c=function(b){a(E,b);function E(F,j,k){var X;return X=b.call(this)||this,X.hls=void 0,X.fragPrevious=null,X.fragCurrent=null,X.fragmentTracker=void 0,X.transmuxer=null,X._state=D.STOPPED,X.media=void 0,X.mediaBuffer=void 0,X.config=void 0,X.bitrateTest=!1,X.lastCurrentTime=0,X.nextLoadPosition=0,X.startPosition=0,X.loadedmetadata=!1,X.fragLoadError=0,X.retryDate=0,X.levels=null,X.fragmentLoader=void 0,X.levelLastLoaded=null,X.startFragRequested=!1,X.decrypter=void 0,X.initPTS=[],X.onvseeking=null,X.onvended=null,X.logPrefix="",X.log=void 0,X.warn=void 0,X.logPrefix=k,X.log=d.logger.log.bind(d.logger,k+":"),X.warn=d.logger.warn.bind(d.logger,k+":"),X.hls=F,X.fragmentLoader=new v.default(F.config),X.fragmentTracker=j,X.config=F.config,X.decrypter=new l.default(F,F.config),F.on(o.Events.KEY_LOADED,X.onKeyLoaded,y(X)),X}var C=E.prototype;return C.doTick=function(){this.onTickEnd()},C.onTickEnd=function(){},C.startLoad=function(j){},C.stopLoad=function(){this.fragmentLoader.abort();var j=this.fragCurrent;j&&this.fragmentTracker.removeFragment(j),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=D.STOPPED},C._streamEnded=function(j,k){var X=this.fragCurrent,G=this.fragmentTracker;if(!k.live&&X&&X.sn===k.endSN&&!j.nextStart){var H=G.getState(X);return H===g.FragmentState.PARTIAL||H===g.FragmentState.OK}return!1},C.onMediaAttached=function(j,k){var X=this.media=this.mediaBuffer=k.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),X.addEventListener("seeking",this.onvseeking),X.addEventListener("ended",this.onvended);var G=this.config;this.levels&&G.autoStartLoad&&this.state===D.STOPPED&&this.startLoad(G.startPosition)},C.onMediaDetaching=function(){var j=this.media;j!=null&&j.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),j&&(j.removeEventListener("seeking",this.onvseeking),j.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},C.onMediaSeeking=function(){var j=this.config,k=this.fragCurrent,X=this.media,G=this.mediaBuffer,H=this.state,K=X?X.currentTime:0,B=_.BufferHelper.bufferInfo(G||X,K,j.maxBufferHole);if(this.log("media seeking to "+(Object(L.isFiniteNumber)(K)?K.toFixed(3):K)+", state: "+H),H===D.ENDED)this.resetLoadingState();else if(k&&!B.len){var U=j.maxFragLookUpTolerance,W=k.start-U,Q=k.start+k.duration+U,ie=K>Q;(K<W||ie)&&(ie&&k.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),k.loader.abort()),this.resetLoadingState())}X&&(this.lastCurrentTime=K),!this.loadedmetadata&&!B.len&&(this.nextLoadPosition=this.startPosition=K),this.tickImmediate()},C.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},C.onKeyLoaded=function(j,k){if(this.state!==D.KEY_LOADING||k.frag!==this.fragCurrent||!this.levels)return;this.state=D.IDLE;var X=this.levels[k.frag.level].details;X&&this.loadFragment(k.frag,X,k.frag.start)},C.onHandlerDestroying=function(){this.stopLoad(),b.prototype.onHandlerDestroying.call(this)},C.onHandlerDestroyed=function(){this.state=D.STOPPED,this.hls.off(o.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,b.prototype.onHandlerDestroyed.call(this)},C.loadKey=function(j,k){this.log("Loading key for "+j.sn+" of ["+k.startSN+"-"+k.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level),this.state=D.KEY_LOADING,this.fragCurrent=j,this.hls.trigger(o.Events.KEY_LOADING,{frag:j})},C.loadFragment=function(j,k,X){this._loadFragForPlayback(j,k,X)},C._loadFragForPlayback=function(j,k,X){var G=this,H=function(B){if(G.fragContextChanged(j)){G.warn("Fragment "+j.sn+(B.part?" p: "+B.part.index:"")+" of level "+j.level+" was dropped during download."),G.fragmentTracker.removeFragment(j);return}j.stats.chunkCount++,G._handleFragmentLoadProgress(B)};this._doFragLoad(j,k,X,H).then(function(K){if(!K)return;G.fragLoadError=0;var B=G.state;if(G.fragContextChanged(j)){(B===D.FRAG_LOADING||B===D.BACKTRACKING||!G.fragCurrent&&B===D.PARSING)&&(G.fragmentTracker.removeFragment(j),G.state=D.IDLE);return}if("payload"in K&&(G.log("Loaded fragment "+j.sn+" of level "+j.level),G.hls.trigger(o.Events.FRAG_LOADED,K),G.state===D.BACKTRACKING)){G.fragmentTracker.backtrack(j,K),G.resetFragmentLoading(j);return}G._handleFragmentLoadComplete(K)}).catch(function(K){G.warn(K),G.resetFragmentLoading(j)})},C.flushMainBuffer=function(j,k,X){if(X===void 0&&(X=null),!(j-k))return;var G={startOffset:j,endOffset:k,type:X};this.fragLoadError=0,this.hls.trigger(o.Events.BUFFER_FLUSHING,G)},C._loadInitSegment=function(j){var k=this;this._doFragLoad(j).then(function(X){if(!X||k.fragContextChanged(j)||!k.levels)throw new Error("init load aborted");return X}).then(function(X){var G=k.hls,H=X.payload,K=j.decryptdata;if(H&&H.byteLength>0&&K&&K.key&&K.iv&&K.method==="AES-128"){var B=self.performance.now();return k.decrypter.webCryptoDecrypt(new Uint8Array(H),K.key.buffer,K.iv.buffer).then(function(U){var W=self.performance.now();return G.trigger(o.Events.FRAG_DECRYPTED,{frag:j,payload:U,stats:{tstart:B,tdecrypt:W}}),X.payload=U,X})}return X}).then(function(X){var G=k.fragCurrent,H=k.hls,K=k.levels;if(!K)throw new Error("init load aborted, missing levels");var B=K[j.level].details;console.assert(B,"Level details are defined when init segment is loaded");var U=j.stats;k.state=D.IDLE,k.fragLoadError=0,j.data=new Uint8Array(X.payload),U.parsing.start=U.buffering.start=self.performance.now(),U.parsing.end=U.buffering.end=self.performance.now(),X.frag===G&&H.trigger(o.Events.FRAG_BUFFERED,{stats:U,frag:G,part:null,id:j.type}),k.tick()}).catch(function(X){k.warn(X),k.resetFragmentLoading(j)})},C.fragContextChanged=function(j){var k=this.fragCurrent;return!j||!k||j.level!==k.level||j.sn!==k.sn||j.urlId!==k.urlId},C.fragBufferedComplete=function(j,k){var X=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+j.type+" sn: "+j.sn+(k?" part: "+k.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level+" "+n.default.toString(_.BufferHelper.getBuffered(X))),this.state=D.IDLE,this.tick()},C._handleFragmentLoadComplete=function(j){var k=this.transmuxer;if(!k)return;var X=j.frag,G=j.part,H=j.partsLoaded,K=!H||H.length===0||H.some(function(U){return!U}),B=new r.ChunkMetadata(X.level,X.sn,X.stats.chunkCount+1,0,G?G.index:-1,!K);k.flush(B)},C._handleFragmentLoadProgress=function(j){},C._doFragLoad=function(j,k,X,G){var H=this;if(X===void 0&&(X=null),!this.levels)throw new Error("frag load aborted, missing levels");if(X=Math.max(j.start,X||0),this.config.lowLatencyMode&&k){var K=k.partList;if(K&&G){X>j.end&&k.fragmentHint&&(j=k.fragmentHint);var B=this.getNextPart(K,j,X);if(B>-1){var U=K[B];return this.log("Loading part sn: "+j.sn+" p: "+U.index+" cc: "+j.cc+" of playlist ["+k.startSN+"-"+k.endSN+"] parts [0-"+B+"-"+(K.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(X.toFixed(3))),this.nextLoadPosition=U.start+U.duration,this.state=D.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:j,part:K[B],targetBufferTime:X}),this.doFragPartsLoad(j,K,B,G).catch(function(W){return H.handleFragLoadError(W)})}else if(!j.url||this.loadedEndOfParts(K,X))return Promise.resolve(null)}}return this.log("Loading fragment "+j.sn+" cc: "+j.cc+" "+(k?"of ["+k.startSN+"-"+k.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(X.toFixed(3))),Object(L.isFiniteNumber)(j.sn)&&!this.bitrateTest&&(this.nextLoadPosition=j.start+j.duration),this.state=D.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:j,targetBufferTime:X}),this.fragmentLoader.load(j,G).catch(function(W){return H.handleFragLoadError(W)})},C.doFragPartsLoad=function(j,k,X,G){var H=this;return new Promise(function(K,B){var U=[],W=function Q(ie){var ce=k[ie];H.fragmentLoader.loadPart(j,ce,G).then(function(he){U[ce.index]=he;var be=he.part;H.hls.trigger(o.Events.FRAG_LOADED,he);var ne=k[ie+1];if(ne&&ne.fragment===j)Q(ie+1);else return K({frag:j,part:be,partsLoaded:U})}).catch(B)};W(X)})},C.handleFragLoadError=function(j){var k=j.data;return k&&k.details===i.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(k.frag,k.part):this.hls.trigger(o.Events.ERROR,k),null},C._handleTransmuxerFlush=function(j){var k=this.getCurrentContext(j);if(!k||this.state!==D.PARSING){this.fragCurrent||(this.state=D.IDLE);return}var X=k.frag,G=k.part,H=k.level,K=self.performance.now();X.stats.parsing.end=K,G&&(G.stats.parsing.end=K),this.updateLevelTiming(X,G,H,j.partial)},C.getCurrentContext=function(j){var k=this.levels,X=j.level,G=j.sn,H=j.part;if(!k||!k[X])return this.warn("Levels object was unset while buffering fragment "+G+" of level "+X+". The current chunk will not be buffered."),null;var K=k[X],B=H>-1?Object(x.getPartWith)(K,G,H):null,U=B?B.fragment:Object(x.getFragmentWithSN)(K,G,this.fragCurrent);return U?{frag:U,part:B,level:K}:null},C.bufferFragmentData=function(j,k,X,G){if(!j||this.state!==D.PARSING)return;var H=j.data1,K=j.data2,B=H;if(H&&K&&(B=Object(h.appendUint8Array)(H,K)),!B||!B.length)return;var U={type:j.type,frag:k,part:X,chunkMeta:G,parent:k.type,data:B};this.hls.trigger(o.Events.BUFFER_APPENDING,U),j.dropped&&j.independent&&!X&&this.flushBufferGap(k)},C.flushBufferGap=function(j){var k=this.media;if(!k)return;if(!_.BufferHelper.isBuffered(k,k.currentTime)){this.flushMainBuffer(0,j.start);return}var X=k.currentTime,G=_.BufferHelper.bufferInfo(k,X,0),H=j.duration,K=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),B=Math.max(Math.min(j.start-K,G.end-K),X+K);j.start-B>K&&this.flushMainBuffer(B,j.start)},C.getFwdBufferInfo=function(j,k){var X=this.config,G=this.getLoadPosition();if(!Object(L.isFiniteNumber)(G))return null;var H=_.BufferHelper.bufferInfo(j,G,X.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var K=this.fragmentTracker.getBufferedFrag(G,k);if(K&&H.nextStart<K.end)return _.BufferHelper.bufferInfo(j,G,Math.max(H.nextStart,X.maxBufferHole))}return H},C.getMaxBufferLength=function(j){var k=this.config,X;return j?X=Math.max(8*k.maxBufferSize/j,k.maxBufferLength):X=k.maxBufferLength,Math.min(X,k.maxMaxBufferLength)},C.reduceMaxBufferLength=function(j){var k=this.config,X=j||k.maxBufferLength;return k.maxMaxBufferLength>=X?(k.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+k.maxMaxBufferLength+"s"),!0):!1},C.getNextFragment=function(j,k){var X,G,H=k.fragments,K=H.length;if(!K)return null;var B=this.config,U=H[0].start,W;if(k.live){var Q=B.initialLiveManifestSize;if(K<Q)return this.warn("Not enough fragments to start playback (have: "+K+", need: "+Q+")"),null;!k.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(W=this.getInitialLiveFragment(k,H),this.startPosition=W?this.hls.liveSyncPosition||W.start:j)}else j<=U&&(W=H[0]);if(!W){var ie=B.lowLatencyMode?k.partEnd:k.fragmentEnd;W=this.getFragmentAtPosition(j,ie,k)}return(X=W)!==null&&X!==void 0&&X.initSegment&&!((G=W)!==null&&G!==void 0&&G.initSegment.data)&&!this.bitrateTest&&(W=W.initSegment),W},C.getNextPart=function(j,k,X){for(var G=-1,H=!1,K=!0,B=0,U=j.length;B<U;B++){var W=j[B];if(K=K&&!W.independent,G>-1&&X<W.start)break;var Q=W.loaded;!Q&&(H||W.independent||K)&&W.fragment===k&&(G=B),H=Q}return G},C.loadedEndOfParts=function(j,k){var X=j[j.length-1];return X&&k>X.start&&X.loaded},C.getInitialLiveFragment=function(j,k){var X=this.fragPrevious,G=null;if(X){if(j.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+X.programDateTime),G=Object(f.findFragmentByPDT)(k,X.endProgramDateTime,this.config.maxFragLookUpTolerance)),!G){var H=X.sn+1;if(H>=j.startSN&&H<=j.endSN){var K=k[H-j.startSN];X.cc===K.cc&&(G=K,this.log("Live playlist, switching playlist, load frag with next SN: "+G.sn))}G||(G=Object(f.findFragWithCC)(k,X.cc),G&&this.log("Live playlist, switching playlist, load frag with same CC: "+G.sn))}}else{var B=this.hls.liveSyncPosition;B!==null&&(G=this.getFragmentAtPosition(B,this.bitrateTest?j.fragmentEnd:j.edge,j))}return G},C.getFragmentAtPosition=function(j,k,X){var G=this.config,H=this.fragPrevious,K=X.fragments,B=X.endSN,U=X.fragmentHint,W=G.maxFragLookUpTolerance,Q=!!(G.lowLatencyMode&&X.partList&&U);Q&&U&&!this.bitrateTest&&(K=K.concat(U),B=U.sn);var ie;if(j<k){var ce=j>k-W?0:W;ie=Object(f.findFragmentByPTS)(H,K,j,ce)}else ie=K[K.length-1];if(ie){var he=ie.sn-X.startSN,be=H&&ie.level===H.level,ne=K[he+1],le=this.fragmentTracker.getState(ie);if(le===g.FragmentState.BACKTRACKED){ie=null;for(var ue=he;K[ue]&&this.fragmentTracker.getState(K[ue])===g.FragmentState.BACKTRACKED;)H?ie=K[ue--]:ie=K[--ue];ie||(ie=ne)}else H&&ie.sn===H.sn&&!Q&&(be&&(ie.sn<B&&this.fragmentTracker.getState(ne)!==g.FragmentState.OK?(this.log("SN "+ie.sn+" just loaded, load next one: "+ne.sn),ie=ne):ie=null))}return ie},C.synchronizeToLiveEdge=function(j){var k=this.config,X=this.media;if(!X)return;var G=this.hls.liveSyncPosition,H=X.currentTime,K=j.fragments[0].start,B=j.edge,U=H>=K-k.maxFragLookUpTolerance&&H<=B;if(G!==null&&X.duration>G&&(H<G||!U)){var W=k.liveMaxLatencyDuration!==void 0?k.liveMaxLatencyDuration:k.liveMaxLatencyDurationCount*j.targetduration;(!U&&X.readyState<4||H<B-W)&&(this.loadedmetadata||(this.nextLoadPosition=G),X.readyState&&(this.warn("Playback: "+H.toFixed(3)+" is located too far from the end of live sliding playlist: "+B+", reset currentTime to : "+G.toFixed(3)),X.currentTime=G))}},C.alignPlaylists=function(j,k){var X=this.levels,G=this.levelLastLoaded,H=this.fragPrevious,K=G!==null?X[G]:null,B=j.fragments.length;if(!B)return this.warn("No fragments in live playlist"),0;var U=j.fragments[0].start,W=!k,Q=j.alignedSliding&&Object(L.isFiniteNumber)(U);if(W||!Q&&!U){Object(p.alignStream)(H,K,j);var ie=j.fragments[0].start;return this.log("Live playlist sliding: "+ie.toFixed(2)+" start-sn: "+(k?k.startSN:"na")+"->"+j.startSN+" prev-sn: "+(H?H.sn:"na")+" fragments: "+B),ie}return U},C.waitForCdnTuneIn=function(j){var k=3;return j.live&&j.canBlockReload&&j.tuneInGoal>Math.max(j.partHoldBack,j.partTarget*k)},C.setStartPosition=function(j,k){var X=this.startPosition;if(X<k&&(X=-1),X===-1||this.lastCurrentTime===-1){var G=j.startTimeOffset;Object(L.isFiniteNumber)(G)?(X=k+G,G<0&&(X+=j.totalduration),X=Math.min(Math.max(k,X),k+j.totalduration),this.log("Start time offset "+G+" found in playlist, adjust startPosition to "+X),this.startPosition=X):j.live?X=this.hls.liveSyncPosition||k:this.startPosition=X=0,this.lastCurrentTime=X}this.nextLoadPosition=X},C.getLoadPosition=function(){var j=this.media,k=0;return this.loadedmetadata&&j?k=j.currentTime:this.nextLoadPosition&&(k=this.nextLoadPosition),k},C.handleFragLoadAborted=function(j,k){this.transmuxer&&j.sn!=="initSegment"&&j.stats.aborted&&(this.warn("Fragment "+j.sn+(k?" part"+k.index:"")+" of level "+j.level+" was aborted"),this.resetFragmentLoading(j))},C.resetFragmentLoading=function(j){(!this.fragCurrent||!this.fragContextChanged(j))&&(this.state=D.IDLE)},C.onFragmentOrKeyLoadError=function(j,k){if(k.fatal)return;var X=k.frag;if(!X||X.type!==j)return;var G=this.fragCurrent;console.assert(G&&X.sn===G.sn&&X.level===G.level&&X.urlId===G.urlId,"Frag load error must match current frag to retry");var H=this.config;if(this.fragLoadError+1<=H.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(X.level))return;var K=Math.min(Math.pow(2,this.fragLoadError)*H.fragLoadingRetryDelay,H.fragLoadingMaxRetryTimeout);this.warn("Fragment "+X.sn+" of "+j+" "+X.level+" failed to load, retrying in "+K+"ms"),this.retryDate=self.performance.now()+K,this.fragLoadError++,this.state=D.FRAG_LOADING_WAITING_RETRY}else k.levelRetry?(j===s.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=D.IDLE):(d.logger.error(k.details+" reaches max retry, redispatch as fatal ..."),k.fatal=!0,this.hls.stopLoad(),this.state=D.ERROR)},C.afterBufferFlushed=function(j,k,X){if(!j)return;var G=_.BufferHelper.getBuffered(j);this.fragmentTracker.detectEvictedFragments(k,G,X),this.state===D.ENDED&&this.resetLoadingState()},C.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=D.IDLE},C.resetLiveStartWhenNotLoaded=function(j){if(!this.loadedmetadata){this.startFragRequested=!1;var k=this.levels?this.levels[j].details:null;if(k!=null&&k.live)return this.startPosition=-1,this.setStartPosition(k,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},C.updateLevelTiming=function(j,k,X,G){var H=this,K=X.details;console.assert(!!K,"level.details must be defined");var B=Object.keys(j.elementaryStreams).reduce(function(U,W){var Q=j.elementaryStreams[W];if(Q){var ie=Q.endPTS-Q.startPTS;if(ie<=0)return H.warn("Could not parse fragment "+j.sn+" "+W+" duration reliably ("+ie+") resetting transmuxer to fallback to playlist timing"),H.resetTransmuxer(),U||!1;var ce=G?0:Object(x.updateFragPTSDTS)(K,j,Q.startPTS,Q.endPTS,Q.startDTS,Q.endDTS);return H.hls.trigger(o.Events.LEVEL_PTS_UPDATED,{details:K,level:X,drift:ce,type:W,frag:j,start:Q.startPTS,end:Q.endPTS}),!0}return U},!1);B?(this.state=D.PARSED,this.hls.trigger(o.Events.FRAG_PARSED,{frag:j,part:k})):this.resetLoadingState()},C.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},w(E,[{key:"state",get:function(){return this._state},set:function(j){var k=this._state;k!==j&&(this._state=j,this.log(k+"->"+j))}}]),E}(S.default)},"./src/controller/buffer-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return f});var L=T("./src/polyfills/number.ts"),S=T("./src/events.ts"),g=T("./src/utils/logger.ts"),_=T("./src/errors.ts"),d=T("./src/utils/buffer-helper.ts"),o=T("./src/utils/mediasource-helper.ts"),i=T("./src/loader/fragment.ts"),r=T("./src/controller/buffer-operation-queue.ts"),h=Object(o.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function x(l){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 s=n.hls,u=n.media,w=n.mediaSource;g.logger.log("[buffer-controller]: Media source opened"),u&&(n.updateMediaElementDuration(),s.trigger(S.Events.MEDIA_ATTACHED,{media:u})),w&&w.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){g.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){g.logger.log("[buffer-controller]: Media source ended")},this.hls=l,this._initSourceBuffer(),this.registerListeners()}var v=x.prototype;return v.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},v.destroy=function(){this.unregisterListeners(),this.details=null},v.registerListeners=function(){var n=this.hls;n.on(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(S.Events.BUFFER_RESET,this.onBufferReset,this),n.on(S.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(S.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(S.Events.BUFFER_EOS,this.onBufferEos,this),n.on(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(S.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(S.Events.FRAG_PARSED,this.onFragParsed,this),n.on(S.Events.FRAG_CHANGED,this.onFragChanged,this)},v.unregisterListeners=function(){var n=this.hls;n.off(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(S.Events.BUFFER_RESET,this.onBufferReset,this),n.off(S.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(S.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(S.Events.BUFFER_EOS,this.onBufferEos,this),n.off(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(S.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(S.Events.FRAG_PARSED,this.onFragParsed,this),n.off(S.Events.FRAG_CHANGED,this.onFragChanged,this)},v._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},v.onManifestParsed=function(n,s){var u=2;(s.audio&&!s.video||!s.altAudio)&&(u=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=u,this.details=null,g.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},v.onMediaAttaching=function(n,s){var u=this.media=s.media;if(u&&h){var w=this.mediaSource=new h;w.addEventListener("sourceopen",this._onMediaSourceOpen),w.addEventListener("sourceended",this._onMediaSourceEnded),w.addEventListener("sourceclose",this._onMediaSourceClose),u.src=self.URL.createObjectURL(w),this._objectUrl=u.src}},v.onMediaDetaching=function(){var n=this.media,s=this.mediaSource,u=this._objectUrl;if(s){if(g.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(w){g.logger.warn("[buffer-controller]: onMediaDetaching: "+w.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(u&&self.URL.revokeObjectURL(u),n.src===u?(n.removeAttribute("src"),n.load()):g.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(S.Events.MEDIA_DETACHED,void 0)},v.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(s){var u=n.sourceBuffer[s];try{u&&(n.removeBufferListeners(s),n.mediaSource&&n.mediaSource.removeSourceBuffer(u),n.sourceBuffer[s]=void 0)}catch(w){g.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",w)}}),this._initSourceBuffer()},v.onBufferCodecs=function(n,s){var u=this,w=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(y){if(w){var a=u.tracks[y];if(a&&typeof a.buffer.changeType=="function"){var R=s[y],D=R.codec,c=R.levelCodec,b=R.container,E=(a.levelCodec||a.codec).replace(p,"$1"),C=(c||D).replace(p,"$1");if(E!==C){var F=b+";codecs="+(c||D);u.appendChangeType(y,F)}}}else u.pendingTracks[y]=s[y]}),w)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},v.appendChangeType=function(n,s){var u=this,w=this.operationQueue,y={execute:function(){var R=u.sourceBuffer[n];R&&(g.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+s),R.changeType(s)),w.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(R){g.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",R)}};w.append(y,n)},v.onBufferAppending=function(n,s){var u=this,w=this.hls,y=this.operationQueue,a=this.tracks,R=s.data,D=s.type,c=s.frag,b=s.part,E=s.chunkMeta,C=E.buffering[D],F=self.performance.now();C.start=F;var j=c.stats.buffering,k=b?b.stats.buffering:null;j.start===0&&(j.start=F),k&&k.start===0&&(k.start=F);var X=a.audio,G=D==="audio"&&E.id===1&&(X==null?void 0:X.container)==="audio/mpeg",H={execute:function(){if(C.executeStart=self.performance.now(),G){var B=u.sourceBuffer[D];if(B){var U=c.start-B.timestampOffset;Math.abs(U)>=.1&&(g.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+c.start+" (delta: "+U+") sn: "+c.sn+")"),B.timestampOffset=c.start)}}u.appendExecutor(R,D)},onStart:function(){},onComplete:function(){var B=self.performance.now();C.executeEnd=C.end=B,j.first===0&&(j.first=B),k&&k.first===0&&(k.first=B);var U=u.sourceBuffer,W={};for(var Q in U)W[Q]=d.BufferHelper.getBuffered(U[Q]);u.appendError=0,u.hls.trigger(S.Events.BUFFER_APPENDED,{type:D,frag:c,part:b,chunkMeta:E,parent:c.type,timeRanges:W})},onError:function(B){g.logger.error("[buffer-controller]: Error encountered while trying to append to the "+D+" SourceBuffer",B);var U={type:_.ErrorTypes.MEDIA_ERROR,parent:c.type,details:_.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?U.details=_.ErrorDetails.BUFFER_FULL_ERROR:(u.appendError++,U.details=_.ErrorDetails.BUFFER_APPEND_ERROR,u.appendError>w.config.appendErrorMaxRetry&&(g.logger.error("[buffer-controller]: Failed "+w.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),U.fatal=!0)),w.trigger(S.Events.ERROR,U)}};y.append(H,D)},v.onBufferFlushing=function(n,s){var u=this,w=this.operationQueue,y=function(R){return{execute:u.removeExecutor.bind(u,R,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){u.hls.trigger(S.Events.BUFFER_FLUSHED,{type:R})},onError:function(c){g.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",c)}}};s.type?w.append(y(s.type),s.type):this.getSourceBufferTypes().forEach(function(a){w.append(y(a),a)})},v.onFragParsed=function(n,s){var u=this,w=s.frag,y=s.part,a=[],R=y?y.elementaryStreams:w.elementaryStreams;R[i.ElementaryStreamTypes.AUDIOVIDEO]?a.push("audiovideo"):(R[i.ElementaryStreamTypes.AUDIO]&&a.push("audio"),R[i.ElementaryStreamTypes.VIDEO]&&a.push("video"));var D=function(){var b=self.performance.now();w.stats.buffering.end=b,y&&(y.stats.buffering.end=b);var E=y?y.stats:w.stats;u.hls.trigger(S.Events.FRAG_BUFFERED,{frag:w,part:y,stats:E,id:w.type})};a.length===0&&g.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+w.type+" level: "+w.level+" sn: "+w.sn),this.blockBuffers(D,a)},v.onFragChanged=function(n,s){this.flushBackBuffer()},v.onBufferEos=function(n,s){var u=this,w=this.getSourceBufferTypes().reduce(function(y,a){var R=u.sourceBuffer[a];return(!s.type||s.type===a)&&(R&&!R.ended&&(R.ended=!0,g.logger.log("[buffer-controller]: "+a+" sourceBuffer now EOS"))),y&&!!(!R||R.ended)},!0);w&&this.blockBuffers(function(){var y=u.mediaSource;if(!y||y.readyState!=="open")return;y.endOfStream()})},v.onLevelUpdated=function(n,s){var u=s.details;if(!u.fragments.length)return;this.details=u,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},v.flushBackBuffer=function(){var n=this.hls,s=this.details,u=this.media,w=this.sourceBuffer;if(!u||s===null)return;var y=this.getSourceBufferTypes();if(!y.length)return;var a=s.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(L.isFiniteNumber)(a)||a<0)return;var R=u.currentTime,D=s.levelTargetDuration,c=Math.max(a,D),b=Math.floor(R/D)*D-c;y.forEach(function(E){var C=w[E];if(C){var F=d.BufferHelper.getBuffered(C);F.length>0&&b>F.start(0)&&(n.trigger(S.Events.BACK_BUFFER_REACHED,{bufferEnd:b}),s.live&&n.trigger(S.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:b}),n.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:b,type:E}))}})},v.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,s=this.hls,u=this.media,w=this.mediaSource,y=n.fragments[0].start+n.totalduration,a=u.duration,R=Object(L.isFiniteNumber)(w.duration)?w.duration:0;n.live&&s.config.liveDurationInfinity?(g.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),w.duration=Infinity,this.updateSeekableRange(n)):(y>R&&y>a||!Object(L.isFiniteNumber)(a))&&(g.logger.log("[buffer-controller]: Updating Media Source duration to "+y.toFixed(3)),w.duration=y)},v.updateSeekableRange=function(n){var s=this.mediaSource,u=n.fragments,w=u.length;if(w&&n.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var y=Math.max(0,u[0].start),a=Math.max(y,y+n.totalduration);s.setLiveSeekableRange(y,a)}},v.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,s=this.operationQueue,u=this.pendingTracks,w=Object.keys(u).length;if(w&&!n||w===2){this.createSourceBuffers(u),this.pendingTracks={};var y=this.getSourceBufferTypes();if(y.length===0){this.hls.trigger(S.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}y.forEach(function(a){s.executeNext(a)})}},v.createSourceBuffers=function(n){var s=this.sourceBuffer,u=this.mediaSource;if(!u)throw Error("createSourceBuffers called when mediaSource was null");var w=0;for(var y in n)if(!s[y]){var a=n[y];if(!a)throw Error("source buffer exists for track "+y+", however track does not");var R=a.levelCodec||a.codec,D=a.container+";codecs="+R;g.logger.log("[buffer-controller]: creating sourceBuffer("+D+")");try{var c=s[y]=u.addSourceBuffer(D),b=y;this.addBufferListener(b,"updatestart",this._onSBUpdateStart),this.addBufferListener(b,"updateend",this._onSBUpdateEnd),this.addBufferListener(b,"error",this._onSBUpdateError),this.tracks[y]={buffer:c,codec:R,container:a.container,levelCodec:a.levelCodec,id:a.id},w++}catch(E){g.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+E.message),this.hls.trigger(S.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:E,mimeType:D})}}w&&this.hls.trigger(S.Events.BUFFER_CREATED,{tracks:this.tracks})},v._onSBUpdateStart=function(n){var s=this.operationQueue,u=s.current(n);u.onStart()},v._onSBUpdateEnd=function(n){var s=this.operationQueue,u=s.current(n);u.onComplete(),s.shiftAndExecuteNext(n)},v._onSBUpdateError=function(n,s){g.logger.error("[buffer-controller]: "+n+" SourceBuffer error",s),this.hls.trigger(S.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var u=this.operationQueue.current(n);u&&u.onError(s)},v.removeExecutor=function(n,s,u){var w=this.media,y=this.mediaSource,a=this.operationQueue,R=this.sourceBuffer,D=R[n];if(!w||!y||!D){g.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),a.shiftAndExecuteNext(n);return}var c=Object(L.isFiniteNumber)(w.duration)?w.duration:Infinity,b=Object(L.isFiniteNumber)(y.duration)?y.duration:Infinity,E=Math.max(0,s),C=Math.min(u,c,b);C>E?(g.logger.log("[buffer-controller]: Removing ["+E+","+C+"] from the "+n+" SourceBuffer"),console.assert(!D.updating,n+" sourceBuffer must not be updating"),D.remove(E,C)):a.shiftAndExecuteNext(n)},v.appendExecutor=function(n,s){var u=this.operationQueue,w=this.sourceBuffer,y=w[s];if(!y){g.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),u.shiftAndExecuteNext(s);return}y.ended=!1,console.assert(!y.updating,s+" sourceBuffer must not be updating"),y.appendBuffer(n)},v.blockBuffers=function(n,s){var u=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){g.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var w=this.operationQueue,y=s.map(function(a){return w.appendBlocker(a)});Promise.all(y).then(function(){n(),s.forEach(function(a){var R=u.sourceBuffer[a];(!R||!R.updating)&&w.shiftAndExecuteNext(a)})})},v.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},v.addBufferListener=function(n,s,u){var w=this.sourceBuffer[n];if(!w)return;var y=u.bind(this,n);this.listeners[n].push({event:s,listener:y}),w.addEventListener(s,y)},v.removeBufferListeners=function(n){var s=this.sourceBuffer[n];if(!s)return;this.listeners[n].forEach(function(u){s.removeEventListener(u.event,u.listener)})},x}()},"./src/controller/buffer-operation-queue.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return S});var L=T("./src/utils/logger.ts"),S=function(){function g(d){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=d}var _=g.prototype;return _.append=function(o,i){var r=this.queues[i];r.push(o),r.length===1&&this.buffers[i]&&this.executeNext(i)},_.insertAbort=function(o,i){var r=this.queues[i];r.unshift(o),this.executeNext(i)},_.appendBlocker=function(o){var i,r=new Promise(function(p){i=p}),h={execute:i,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(h,o),r},_.executeNext=function(o){var i=this.buffers,r=this.queues,h=i[o],p=r[o];if(p.length){var f=p[0];try{f.execute()}catch(x){L.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),f.onError(x),(!h||!h.updating)&&(p.shift(),this.executeNext(o))}}},_.shiftAndExecuteNext=function(o){this.queues[o].shift(),this.executeNext(o)},_.current=function(o){return this.queues[o][0]},g}()},"./src/controller/cap-level-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts");function S(d,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(d,r.key,r)}}function g(d,o,i){return o&&S(d.prototype,o),i&&S(d,i),d}var _=function(){function d(i){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=i,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var o=d.prototype;return o.setStreamController=function(r){this.streamController=r},o.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},o.registerListeners=function(){var r=this.hls;r.on(L.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.on(L.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(L.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.unregisterListener=function(){var r=this.hls;r.off(L.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.off(L.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(L.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.onFpsDropLevelCapping=function(r,h){d.isLevelAllowed(h.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(h.droppedLevel)},o.onMediaAttaching=function(r,h){this.media=h.media instanceof HTMLVideoElement?h.media:null},o.onManifestParsed=function(r,h){var p=this.hls;this.restrictedLevels=[],this.firstLevel=h.firstLevel,p.config.capLevelToPlayerSize&&h.video&&this.startCapping()},o.onBufferCodecs=function(r,h){var p=this.hls;p.config.capLevelToPlayerSize&&h.video&&this.startCapping()},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var h=this.hls;h.autoLevelCapping=this.getMaxLevel(r.length-1),h.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=h.autoLevelCapping}}},o.getMaxLevel=function(r){var h=this,p=this.hls.levels;if(!p.length)return-1;var f=p.filter(function(x,v){return d.isLevelAllowed(v,h.restrictedLevels)&&v<=r});return this.clientRect=null,d.getMaxLevelByMediaSize(f,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,h={width:0,height:0};if(r){var p=r.getBoundingClientRect();h.width=p.width,h.height=p.height,!h.width&&!h.height&&(h.width=p.right-p.left||r.width||0,h.height=p.bottom-p.top||r.height||0)}return this.clientRect=h,h},d.isLevelAllowed=function(r,h){return h===void 0&&(h=[]),h.indexOf(r)===-1},d.getMaxLevelByMediaSize=function(r,h,p){if(!r||!r.length)return-1;for(var f=function(s,u){return u?s.width!==u.width||s.height!==u.height:!0},x=r.length-1,v=0;v<r.length;v+=1){var l=r[v];if((l.width>=h||l.height>=p)&&f(l,r[v+1])){x=v;break}}return x},g(d,[{key:"mediaWidth",get:function(){return this.getDimensions().width*d.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*d.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(h){}return r}}]),d}();m.default=_},"./src/controller/cmcd-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return f});var L=T("./src/events.ts"),S=T("./src/types/cmcd.ts"),g=T("./src/utils/buffer-helper.ts"),_=T("./src/utils/logger.ts");function d(x,v){for(var l=0;l<v.length;l++){var n=v[l];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(x,n.key,n)}}function o(x,v,l){return v&&d(x.prototype,v),l&&d(x,l),x}function i(x,v){var l=typeof Symbol!="undefined"&&x[Symbol.iterator]||x["@@iterator"];if(l)return(l=l.call(x)).next.bind(l);if(Array.isArray(x)||(l=r(x))||v&&x&&typeof x.length=="number"){l&&(x=l);var n=0;return function(){return n>=x.length?{done:!0}:{done:!1,value:x[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(x,v){if(!x)return;if(typeof x=="string")return h(x,v);var l=Object.prototype.toString.call(x).slice(8,-1);if(l==="Object"&&x.constructor&&(l=x.constructor.name),l==="Map"||l==="Set")return Array.from(x);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return h(x,v)}function h(x,v){(v==null||v>x.length)&&(v=x.length);for(var l=0,n=new Array(v);l<v;l++)n[l]=x[l];return n}function p(){return p=Object.assign||function(x){for(var v=1;v<arguments.length;v++){var l=arguments[v];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(x[n]=l[n])}return x},p.apply(this,arguments)}var f=function(){function x(l){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(w){try{n.apply(w,{ot:S.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(y){_.logger.warn("Could not generate manifest CMCD data.",y)}},this.applyFragmentData=function(w){try{var y=w.frag,a=n.hls.levels[y.level],R=n.getObjectType(y),D={d:y.duration*1e3,ot:R};(R===S.CMCDObjectType.VIDEO||R===S.CMCDObjectType.AUDIO||R==S.CMCDObjectType.MUXED)&&(D.br=a.bitrate/1e3,D.tb=n.getTopBandwidth(R),D.bl=n.getBufferLength(R)),n.apply(w,D)}catch(c){_.logger.warn("Could not generate segment CMCD data.",c)}},this.hls=l;var s=this.config=l.config,u=s.cmcd;u!=null&&(s.pLoader=this.createPlaylistLoader(),s.fLoader=this.createFragmentLoader(),this.sid=u.sessionId||x.uuid(),this.cid=u.contentId,this.useHeaders=u.useHeaders===!0,this.registerListeners())}var v=x.prototype;return v.registerListeners=function(){var n=this.hls;n.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(L.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(L.Events.BUFFER_CREATED,this.onBufferCreated,this)},v.unregisterListeners=function(){var n=this.hls;n.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(L.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(L.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},v.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},v.onMediaAttached=function(n,s){this.media=s.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},v.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},v.onBufferCreated=function(n,s){var u,w;this.audioBuffer=(u=s.tracks.audio)===null||u===void 0?void 0:u.buffer,this.videoBuffer=(w=s.tracks.video)===null||w===void 0?void 0:w.buffer},v.createData=function(){var n;return{v:S.CMCDVersion,sf:S.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}},v.apply=function(n,s){s===void 0&&(s={}),p(s,this.createData());var u=s.ot===S.CMCDObjectType.INIT||s.ot===S.CMCDObjectType.VIDEO||s.ot===S.CMCDObjectType.MUXED;if(this.starved&&u&&(s.bs=!0,s.su=!0,this.starved=!1),s.su==null&&(s.su=this.buffering),this.useHeaders){var w=x.toHeaders(s);if(!Object.keys(w).length)return;n.headers||(n.headers={}),p(n.headers,w)}else{var y=x.toQuery(s);if(!y)return;n.url=x.appendQueryToUri(n.url,y)}},v.getObjectType=function(n){var s=n.type;return s==="subtitle"?S.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?S.CMCDObjectType.INIT:s==="audio"?S.CMCDObjectType.AUDIO:s==="main"?this.hls.audioTracks.length?S.CMCDObjectType.VIDEO:S.CMCDObjectType.MUXED:void 0},v.getTopBandwidth=function(n){for(var s=0,u=n===S.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,w=i(u),y;!(y=w()).done;){var a=y.value;a.bitrate>s&&(s=a.bitrate)}return s>0?s:NaN},v.getBufferLength=function(n){var s=this.hls.media,u=n===S.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!u||!s)return NaN;var w=g.BufferHelper.bufferInfo(u,s.currentTime,this.config.maxBufferHole);return w.len*1e3},v.createPlaylistLoader=function(){var n=this.config.pLoader,s=this.applyPlaylistData,u=n||this.config.loader;return function(){function w(a){this.loader=void 0,this.loader=new u(a)}var y=w.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(R,D,c){s(R),this.loader.load(R,D,c)},o(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},v.createFragmentLoader=function(){var n=this.config.fLoader,s=this.applyFragmentData,u=n||this.config.loader;return function(){function w(a){this.loader=void 0,this.loader=new u(a)}var y=w.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(R,D,c){s(R),this.loader.load(R,D,c)},o(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},x.uuid=function(){var n=URL.createObjectURL(new Blob),s=n.toString();return URL.revokeObjectURL(n),s.substr(s.lastIndexOf("/")+1)},x.serialize=function(n){for(var s=[],u=function(G){return!Number.isNaN(G)&&G!=null&&G!==""&&G!==!1},w=function(G){return Math.round(G)},y=function(G){return w(G/100)*100},a=function(G){return encodeURIComponent(G)},R={br:w,d:w,bl:y,dl:y,mtp:y,nor:a,rtp:y,tb:w},D=Object.keys(n||{}).sort(),c=i(D),b;!(b=c()).done;){var E=b.value,C=n[E];if(!u(C))continue;if(E==="v"&&C===1)continue;if(E=="pr"&&C===1)continue;var F=R[E];F&&(C=F(C));var j=typeof C,k=void 0;E==="ot"||E==="sf"||E==="st"?k=E+"="+C:j==="boolean"?k=E:j==="number"?k=E+"="+C:k=E+"="+JSON.stringify(C),s.push(k)}return s.join(",")},x.toHeaders=function(n){for(var s=Object.keys(n),u={},w=["Object","Request","Session","Status"],y=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},R=0,D=s;R<D.length;R++){var c=D[R],b=a[c]!=null?a[c]:1;y[b][c]=n[c]}for(var E=0;E<y.length;E++){var C=x.serialize(y[E]);C&&(u["CMCD-"+w[E]]=C)}return u},x.toQuery=function(n){return"CMCD="+encodeURIComponent(x.serialize(n))},x.appendQueryToUri=function(n,s){if(!s)return n;var u=n.includes("?")?"&":"?";return""+n+u+s},x}()},"./src/controller/eme-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts"),S=T("./src/errors.ts"),g=T("./src/utils/logger.ts"),_=T("./src/utils/mediakeys-helper.ts");function d(f,x){for(var v=0;v<x.length;v++){var l=x[v];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,l.key,l)}}function o(f,x,v){return x&&d(f.prototype,x),v&&d(f,v),f}var i=3,r=function(x,v,l){var n={audioCapabilities:[],videoCapabilities:[]};return x.forEach(function(s){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+s+'"',robustness:l.audioRobustness||""})}),v.forEach(function(s){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+s+'"',robustness:l.videoRobustness||""})}),[n]},h=function(x,v,l,n){switch(x){case _.KeySystems.WIDEVINE:return r(v,l,n);default:throw new Error("Unknown key-system: "+x)}},p=function(){function f(v){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=v,this._config=v.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 x=f.prototype;return x.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},x._registerListeners=function(){this.hls.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(L.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(L.Events.MANIFEST_PARSED,this.onManifestParsed,this)},x._unregisterListeners=function(){this.hls.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(L.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(L.Events.MANIFEST_PARSED,this.onManifestParsed,this)},x.getLicenseServerUrl=function(l){switch(l){case _.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+l+'"')},x._attemptKeySystemAccess=function(l,n,s){var u=this,w=h(l,n,s,this._drmSystemOptions);g.logger.log("Requesting encrypted media key-system access");var y=this.requestMediaKeySystemAccess(l,w);this.mediaKeysPromise=y.then(function(a){return u._onMediaKeySystemAccessObtained(l,a)}),y.catch(function(a){g.logger.error('Failed to obtain key-system "'+l+'" access:',a)})},x._onMediaKeySystemAccessObtained=function(l,n){var s=this;g.logger.log('Access for key-system "'+l+'" obtained');var u={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:l};this._mediaKeysList.push(u);var w=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(y){return u.mediaKeys=y,g.logger.log('Media-keys created for key-system "'+l+'"'),s._onMediaKeysCreated(),y});return w.catch(function(y){g.logger.error("Failed to create media-keys:",y)}),w},x._onMediaKeysCreated=function(){var l=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),l._onNewMediaKeySession(n.mediaKeysSession))})},x._onNewMediaKeySession=function(l){var n=this;g.logger.log("New key-system session "+l.sessionId),l.addEventListener("message",function(s){n._onKeySessionMessage(l,s.message)},!1)},x._onKeySessionMessage=function(l,n){g.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(s){g.logger.log("Received license data (length: "+(s&&s.byteLength)+"), updating key-session"),l.update(s)})},x.onMediaEncrypted=function(l){var n=this;if(g.logger.log('Media is encrypted using "'+l.initDataType+'" init data type'),!this.mediaKeysPromise){g.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var s=function(w){if(!n._media)return;n._attemptSetMediaKeys(w),n._generateRequestWithPreferredKeySession(l.initDataType,l.initData)};this.mediaKeysPromise.then(s).catch(s)},x._attemptSetMediaKeys=function(l){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){g.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}g.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},x._generateRequestWithPreferredKeySession=function(l,n){var s=this,u=this._mediaKeysList[0];if(!u){g.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(u.mediaKeysSessionInitialized){g.logger.warn("Key-Session already initialized but requested again");return}var w=u.mediaKeysSession;if(!w){g.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){g.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}g.logger.log('Generating key-session request for "'+l+'" init data type'),u.mediaKeysSessionInitialized=!0,w.generateRequest(l,n).then(function(){g.logger.debug("Key-session generation succeeded")}).catch(function(y){g.logger.error("Error generating key-session request:",y),s.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},x._createLicenseXhr=function(l,n,s){var u=new XMLHttpRequest;u.responseType="arraybuffer",u.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,u,l,n,s);var w=this._licenseXhrSetup;if(w)try{w.call(this.hls,u,l),w=void 0}catch(y){g.logger.error(y)}try{u.readyState||u.open("POST",l,!0),w&&w.call(this.hls,u,l)}catch(y){throw new Error("issue setting up KeySystem license XHR "+y)}return u},x._onLicenseRequestReadyStageChange=function(l,n,s,u){switch(l.readyState){case 4:if(l.status===200){this._requestLicenseFailureCount=0,g.logger.log("License request succeeded");var w=l.response,y=this._licenseResponseCallback;if(y)try{w=y.call(this.hls,l,n)}catch(R){g.logger.error(R)}u(w)}else{if(g.logger.error("License Request XHR failed ("+n+"). Status: "+l.status+" ("+l.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>i){this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var a=i-this._requestLicenseFailureCount+1;g.logger.warn("Retrying license request, "+a+" attempts left"),this._requestLicense(s,u)}break}},x._generateLicenseRequestChallenge=function(l,n){switch(l.mediaKeySystemDomain){case _.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+l.mediaKeySystemDomain)},x._requestLicense=function(l,n){g.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){g.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var u=this.getLicenseServerUrl(s.mediaKeySystemDomain),w=this._createLicenseXhr(u,l,n);g.logger.log("Sending license request to URL: "+u);var y=this._generateLicenseRequestChallenge(s,l);w.send(y)}catch(a){g.logger.error("Failure requesting DRM license: "+a),this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},x.onMediaAttached=function(l,n){if(!this._emeEnabled)return;var s=n.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},x.onMediaDetached=function(){var l=this._media,n=this._mediaKeysList;if(!l)return;l.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return l.setMediaKeys(null)}).catch(function(){})},x.onManifestParsed=function(l,n){if(!this._emeEnabled)return;var s=n.levels.map(function(w){return w.audioCodec}).filter(function(w){return!!w}),u=n.levels.map(function(w){return w.videoCodec}).filter(function(w){return!!w});this._attemptKeySystemAccess(_.KeySystems.WIDEVINE,s,u)},o(f,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),f}();m.default=p},"./src/controller/fps-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts"),S=T("./src/utils/logger.ts"),g=function(){function _(o){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=o,this.registerListeners()}var d=_.prototype;return d.setStreamController=function(i){this.streamController=i},d.registerListeners=function(){this.hls.on(L.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},d.unregisterListeners=function(){this.hls.off(L.Events.MEDIA_ATTACHING,this.onMediaAttaching)},d.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},d.onMediaAttaching=function(i,r){var h=this.hls.config;if(h.capLevelOnFPSDrop){var p=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=p,p&&typeof p.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),h.fpsDroppedMonitoringPeriod)}},d.checkFPS=function(i,r,h){var p=performance.now();if(r){if(this.lastTime){var f=p-this.lastTime,x=h-this.lastDroppedFrames,v=r-this.lastDecodedFrames,l=1e3*x/f,n=this.hls;if(n.trigger(L.Events.FPS_DROP,{currentDropped:x,currentDecoded:v,totalDroppedFrames:h}),l>0&&x>n.config.fpsDroppedMonitoringThreshold*v){var s=n.currentLevel;S.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=s)&&(s=s-1,n.trigger(L.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:n.currentLevel}),n.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=h,this.lastDecodedFrames=r}},d.checkFPSInterval=function(){var i=this.media;if(i)if(this.isVideoPlaybackQualityAvailable){var r=i.getVideoPlaybackQuality();this.checkFPS(i,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(i,i.webkitDecodedFrameCount,i.webkitDroppedFrameCount)},_}();m.default=g},"./src/controller/fragment-finders.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"findFragmentByPDT",function(){return g}),T.d(m,"findFragmentByPTS",function(){return _}),T.d(m,"fragmentWithinToleranceTest",function(){return d}),T.d(m,"pdtWithinToleranceTest",function(){return o}),T.d(m,"findFragWithCC",function(){return i});var L=T("./src/polyfills/number.ts"),S=T("./src/utils/binary-search.ts");function g(r,h,p){if(h===null||!Array.isArray(r)||!r.length||!Object(L.isFiniteNumber)(h))return null;var f=r[0].programDateTime;if(h<(f||0))return null;var x=r[r.length-1].endProgramDateTime;if(h>=(x||0))return null;p=p||0;for(var v=0;v<r.length;++v){var l=r[v];if(o(h,p,l))return l}return null}function _(r,h,p,f){p===void 0&&(p=0),f===void 0&&(f=0);var x=null;if(r?x=h[r.sn-h[0].sn+1]||null:p===0&&h[0].start===0&&(x=h[0]),x&&d(p,f,x)===0)return x;var v=S.default.search(h,d.bind(null,p,f));return v||x}function d(r,h,p){r===void 0&&(r=0),h===void 0&&(h=0);var f=Math.min(h,p.duration+(p.deltaPTS?p.deltaPTS:0));return p.start+p.duration-f<=r?1:p.start-f>r&&p.start?-1:0}function o(r,h,p){var f=Math.min(h,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,x=p.endProgramDateTime||0;return x-f>r}function i(r,h){return S.default.search(r,function(p){return p.cc<h?1:p.cc>h?-1:0})}},"./src/controller/fragment-tracker.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"FragmentState",function(){return g}),T.d(m,"FragmentTracker",function(){return _});var L=T("./src/events.ts"),S=T("./src/types/loader.ts"),g;(function(i){i.NOT_LOADED="NOT_LOADED",i.BACKTRACKED="BACKTRACKED",i.APPENDING="APPENDING",i.PARTIAL="PARTIAL",i.OK="OK"})(g||(g={}));var _=function(){function i(h){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=h,this._registerListeners()}var r=i.prototype;return r._registerListeners=function(){var p=this.hls;p.on(L.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(L.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(L.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var p=this.hls;p.off(L.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(L.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(L.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(p,f){if(f===S.PlaylistLevelType.MAIN){var x=this.activeFragment,v=this.activeParts;if(!x)return null;if(v)for(var l=v.length;l--;){var n=v[l],s=n?n.end:x.appendedPTS;if(n.start<=p&&s!==void 0&&p<=s)return l>9&&(this.activeParts=v.slice(l-9)),n}else if(x.start<=p&&x.appendedPTS!==void 0&&p<=x.appendedPTS)return x}return this.getBufferedFrag(p,f)},r.getBufferedFrag=function(p,f){for(var x=this.fragments,v=Object.keys(x),l=v.length;l--;){var n=x[v[l]];if((n==null?void 0:n.body.type)===f&&n.buffered){var s=n.body;if(s.start<=p&&p<=s.end)return s}}return null},r.detectEvictedFragments=function(p,f,x){var v=this;Object.keys(this.fragments).forEach(function(l){var n=v.fragments[l];if(!n)return;if(!n.buffered){n.body.type===x&&v.removeFragment(n.body);return}var s=n.range[p];if(!s)return;s.time.some(function(u){var w=!v.isTimeBuffered(u.startPTS,u.endPTS,f);return w&&v.removeFragment(n.body),w})})},r.detectPartialFragments=function(p){var f=this,x=this.timeRanges,v=p.frag,l=p.part;if(!x||v.sn==="initSegment")return;var n=o(v),s=this.fragments[n];if(!s)return;Object.keys(x).forEach(function(u){var w=v.elementaryStreams[u];if(!w)return;var y=x[u],a=l!==null||w.partial===!0;s.range[u]=f.getBufferedTimes(v,l,a,y)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},r.fragBuffered=function(p){var f=o(p),x=this.fragments[f];x&&(x.backtrack=x.loaded=null,x.buffered=!0)},r.getBufferedTimes=function(p,f,x,v){for(var l={time:[],partial:x},n=f?f.start:p.start,s=f?f.end:p.end,u=p.minEndPTS||s,w=p.maxStartPTS||n,y=0;y<v.length;y++){var a=v.start(y)-this.bufferPadding,R=v.end(y)+this.bufferPadding;if(w>=a&&u<=R){l.time.push({startPTS:Math.max(n,v.start(y)),endPTS:Math.min(s,v.end(y))});break}else if(n<R&&s>a)l.partial=!0,l.time.push({startPTS:Math.max(n,v.start(y)),endPTS:Math.min(s,v.end(y))});else if(s<=a)break}return l},r.getPartialFragment=function(p){var f=null,x,v,l,n=0,s=this.bufferPadding,u=this.fragments;return Object.keys(u).forEach(function(w){var y=u[w];if(!y)return;d(y)&&(v=y.body.start-s,l=y.body.end+s,p>=v&&p<=l&&(x=Math.min(p-v,l-p),n<=x&&(f=y.body,n=x)))}),f},r.getState=function(p){var f=o(p),x=this.fragments[f];return x?x.buffered?d(x)?g.PARTIAL:g.OK:x.backtrack?g.BACKTRACKED:g.APPENDING:g.NOT_LOADED},r.backtrack=function(p,f){var x=o(p),v=this.fragments[x];if(!v||v.backtrack)return null;var l=v.backtrack=f||v.loaded;return v.loaded=null,l},r.getBacktrackData=function(p){var f=o(p),x=this.fragments[f];if(x){var v,l=x.backtrack;if(l!=null&&(v=l.payload)!==null&&v!==void 0&&v.byteLength)return l;this.removeFragment(p)}return null},r.isTimeBuffered=function(p,f,x){for(var v,l,n=0;n<x.length;n++){if(v=x.start(n)-this.bufferPadding,l=x.end(n)+this.bufferPadding,p>=v&&f<=l)return!0;if(f<=v)return!1}return!1},r.onFragLoaded=function(p,f){var x=f.frag,v=f.part;if(x.sn==="initSegment"||x.bitrateTest||v)return;var l=o(x);this.fragments[l]={body:x,loaded:f,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(p,f){var x=this,v=f.frag,l=f.part,n=f.timeRanges;if(v.type===S.PlaylistLevelType.MAIN)if(this.activeFragment=v,l){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(l)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(u){var w=n[u];if(x.detectEvictedFragments(u,w),!l)for(var y=0;y<w.length;y++)v.appendedPTS=Math.max(w.end(y),v.appendedPTS||0)})},r.onFragBuffered=function(p,f){this.detectPartialFragments(f)},r.hasFragment=function(p){var f=o(p);return!!this.fragments[f]},r.removeFragmentsInRange=function(p,f,x){var v=this;Object.keys(this.fragments).forEach(function(l){var n=v.fragments[l];if(!n)return;if(n.buffered){var s=n.body;s.type===x&&s.start<f&&s.end>p&&v.removeFragment(s)}})},r.removeFragment=function(p){var f=o(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[f]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},i}();function d(i){var r,h;return i.buffered&&(((r=i.range.video)===null||r===void 0?void 0:r.partial)||((h=i.range.audio)===null||h===void 0?void 0:h.partial))}function o(i){return i.type+"_"+i.level+"_"+i.urlId+"_"+i.sn}},"./src/controller/gap-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"STALL_MINIMUM_DURATION_MS",function(){return d}),T.d(m,"MAX_START_GAP_JUMP",function(){return o}),T.d(m,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return i}),T.d(m,"SKIP_BUFFER_RANGE_START",function(){return r}),T.d(m,"default",function(){return h});var L=T("./src/utils/buffer-helper.ts"),S=T("./src/errors.ts"),g=T("./src/events.ts"),_=T("./src/utils/logger.ts"),d=250,o=2,i=.1,r=.05,h=function(){function p(x,v,l,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=x,this.media=v,this.fragmentTracker=l,this.hls=n}var f=p.prototype;return f.destroy=function(){this.hls=this.fragmentTracker=this.media=null},f.poll=function(v){var l=this.config,n=this.media,s=this.stalled,u=n.currentTime,w=n.seeking,y=this.seeking&&!w,a=!this.seeking&&w;if(this.seeking=w,u!==v){if(this.moved=!0,s!==null){if(this.stallReported){var R=self.performance.now()-s;_.logger.warn("playback not stuck anymore @"+u+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((a||y)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!L.BufferHelper.getBuffered(n).length)return;var D=L.BufferHelper.bufferInfo(n,u,0),c=D.len>0,b=D.nextStart||0;if(!c&&!b)return;if(w){var E=D.len>o,C=!b||b-u>o&&!this.fragmentTracker.getPartialFragment(u);if(E||C)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var F,j=Math.max(b,D.start||0)-u,k=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,X=k==null||((F=k.details)===null||F===void 0)?void 0:F.live,G=X?k.details.targetduration*2:o;if(j>0&&j<=G){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(s===null){this.stalled=H;return}var K=H-s;!w&&K>=d&&this._reportStall(D.len);var B=L.BufferHelper.bufferInfo(n,u,l.maxBufferHole);this._tryFixBufferStall(B,K)},f._tryFixBufferStall=function(v,l){var n=this.config,s=this.fragmentTracker,u=this.media,w=u.currentTime,y=s.getPartialFragment(w);if(y){var a=this._trySkipBufferHole(y);if(a)return}v.len>n.maxBufferHole&&l>n.highBufferWatchdogPeriod*1e3&&(_.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},f._reportStall=function(v){var l=this.hls,n=this.media,s=this.stallReported;s||(this.stallReported=!0,_.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+v+")"),l.trigger(g.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:v}))},f._trySkipBufferHole=function(v){for(var l=this.config,n=this.hls,s=this.media,u=s.currentTime,w=0,y=L.BufferHelper.getBuffered(s),a=0;a<y.length;a++){var R=y.start(a);if(u+l.maxBufferHole>=w&&u<R){var D=Math.max(R+r,s.currentTime+i);return _.logger.warn("skipping hole, adjusting currentTime from "+u+" to "+D),this.moved=!0,this.stalled=null,s.currentTime=D,v&&n.trigger(g.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+u+" to "+D,frag:v}),D}w=y.end(a)}return 0},f._tryNudgeBuffer=function(){var v=this.config,l=this.hls,n=this.media,s=n.currentTime,u=(this.nudgeRetry||0)+1;if(this.nudgeRetry=u,u<v.nudgeMaxRetry){var w=s+u*v.nudgeOffset;_.logger.warn("Nudging 'currentTime' from "+s+" to "+w),n.currentTime=w,l.trigger(g.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else _.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+v.nudgeMaxRetry+" nudges"),l.trigger(g.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},p}()},"./src/controller/id3-track-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts"),S=T("./src/utils/texttrack-utils.ts"),g=T("./src/demux/id3.ts"),_=.25,d=function(){function o(r){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=r,this._registerListeners()}var i=o.prototype;return i.destroy=function(){this._unregisterListeners()},i._registerListeners=function(){var h=this.hls;h.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.on(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.on(L.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),h.on(L.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},i._unregisterListeners=function(){var h=this.hls;h.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.off(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.off(L.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),h.off(L.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},i.onMediaAttached=function(h,p){this.media=p.media},i.onMediaDetaching=function(){if(!this.id3Track)return;Object(S.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},i.getID3Track=function(h){if(!this.media)return;for(var p=0;p<h.length;p++){var f=h[p];if(f.kind==="metadata"&&f.label==="id3")return Object(S.sendAddTrackEvent)(f,this.media),f}return this.media.addTextTrack("metadata","id3")},i.onFragParsingMetadata=function(h,p){if(!this.media)return;var f=p.frag,x=p.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var v=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,l=0;l<x.length;l++){var n=g.getID3Frames(x[l].data);if(n){var s=x[l].pts,u=l<x.length-1?x[l+1].pts:f.end,w=u-s;w<=0&&(u=s+_);for(var y=0;y<n.length;y++){var a=n[y];if(!g.isTimeStampFrame(a)){var R=new v(s,u,"");R.value=a,this.id3Track.addCue(R)}}}}},i.onBufferFlushing=function(h,p){var f=p.startOffset,x=p.endOffset,v=p.type;if(!v||v==="audio"){var l=this.id3Track;l&&Object(S.removeCuesInRange)(l,f,x)}},o}();m.default=d},"./src/controller/latency-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return o});var L=T("./src/errors.ts"),S=T("./src/events.ts"),g=T("./src/utils/logger.ts");function _(i,r){for(var h=0;h<r.length;h++){var p=r[h];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}function d(i,r,h){return r&&_(i.prototype,r),h&&_(i,h),i}var o=function(){function i(h){var p=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return p.timeupdate()},this.hls=h,this.config=h.config,this.registerListeners()}var r=i.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(S.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(S.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(S.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(S.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(S.Events.ERROR,this.onError)},r.onMediaAttached=function(p,f){this.media=f.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(p,f){var x=f.details;this.levelDetails=x,x.advanced&&this.timeupdate(),!x.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(p,f){if(f.details!==L.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,g.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},r.timeupdate=function(){var p=this.media,f=this.levelDetails;if(!p||!f)return;this.currentTime=p.currentTime;var x=this.computeLatency();if(x===null)return;this._latency=x;var v=this.config,l=v.lowLatencyMode,n=v.maxLiveSyncPlaybackRate;if(!l||n===1)return;var s=this.targetLatency;if(s===null)return;var u=x-s,w=Math.min(this.maxLatency,s+f.targetduration),y=u<w;if(f.live&&y&&u>.05&&this.forwardBufferLength>1){var a=Math.min(2,Math.max(1,n)),R=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;p.playbackRate=Math.min(a,Math.max(1,R))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},r.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},r.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},d(i,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,f=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:f?p.liveMaxLatencyDurationCount*f.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var f=p.holdBack,x=p.partHoldBack,v=p.targetduration,l=this.config,n=l.liveSyncDuration,s=l.liveSyncDurationCount,u=l.lowLatencyMode,w=this.hls.userConfig,y=u&&x||f;(w.liveSyncDuration||w.liveSyncDurationCount||y===0)&&(y=n!==void 0?n:s*v);var a=v,R=1;return y+Math.min(this.stallCount*R,a)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),f=this.targetLatency,x=this.levelDetails;if(p===null||f===null||x===null)return null;var v=x.edge,l=p-f-this.edgeStalled,n=v-x.totalduration,s=v-(this.config.lowLatencyMode&&x.partTarget||x.targetduration);return Math.min(Math.max(n,l),s)}},{key:"drift",get:function(){var p=this.levelDetails;return p===null?1:p.drift}},{key:"edgeStalled",get:function(){var p=this.levelDetails;if(p===null)return 0;var f=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-f,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,f=this.levelDetails;if(!p||!f)return 0;var x=p.buffered.length;return x?p.buffered.end(x-1):f.edge-this.currentTime}}]),i}()},"./src/controller/level-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return l});var L=T("./src/types/level.ts"),S=T("./src/events.ts"),g=T("./src/errors.ts"),_=T("./src/utils/codecs.ts"),d=T("./src/controller/level-helper.ts"),o=T("./src/controller/base-playlist-controller.ts"),i=T("./src/types/loader.ts");function r(){return r=Object.assign||function(n){for(var s=1;s<arguments.length;s++){var u=arguments[s];for(var w in u)Object.prototype.hasOwnProperty.call(u,w)&&(n[w]=u[w])}return n},r.apply(this,arguments)}function h(n,s){for(var u=0;u<s.length;u++){var w=s[u];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(n,w.key,w)}}function p(n,s,u){return s&&h(n.prototype,s),u&&h(n,u),n}function f(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,x(n,s)}function x(n,s){return x=Object.setPrototypeOf||function(w,y){return w.__proto__=y,w},x(n,s)}var v=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),l=function(n){f(s,n);function s(w){var y;return y=n.call(this,w,"[level-controller]")||this,y._levels=[],y._firstLevel=-1,y._startLevel=void 0,y.currentLevelIndex=-1,y.manualLevelIndex=-1,y.onParsedComplete=void 0,y._registerListeners(),y}var u=s.prototype;return u._registerListeners=function(){var y=this.hls;y.on(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),y.on(S.Events.ERROR,this.onError,this)},u._unregisterListeners=function(){var y=this.hls;y.off(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),y.off(S.Events.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},u.startLoad=function(){var y=this._levels;y.forEach(function(a){a.loadError=0}),n.prototype.startLoad.call(this)},u.onManifestLoaded=function(y,a){var R=[],D=[],c=[],b,E={},C,F=!1,j=!1,k=!1;if(a.levels.forEach(function(K){var B=K.attrs;F=F||!!(K.width&&K.height),j=j||!!K.videoCodec,k=k||!!K.audioCodec,v&&K.audioCodec&&K.audioCodec.indexOf("mp4a.40.34")!==-1&&(K.audioCodec=void 0);var U=K.bitrate+"-"+K.attrs.RESOLUTION+"-"+K.attrs.CODECS;C=E[U],C?C.url.push(K.url):(C=new L.Level(K),E[U]=C,R.push(C)),B&&(B.AUDIO&&Object(d.addGroupId)(C,"audio",B.AUDIO),B.SUBTITLES&&Object(d.addGroupId)(C,"text",B.SUBTITLES))}),(F||j)&&k&&(R=R.filter(function(K){var B=K.videoCodec,U=K.width,W=K.height;return!!B||!!(U&&W)})),R=R.filter(function(K){var B=K.audioCodec,U=K.videoCodec;return(!B||Object(_.isCodecSupportedInMp4)(B,"audio"))&&(!U||Object(_.isCodecSupportedInMp4)(U,"video"))}),a.audioTracks&&(D=a.audioTracks.filter(function(K){return!K.audioCodec||Object(_.isCodecSupportedInMp4)(K.audioCodec,"audio")}),Object(d.assignTrackIdsByGroup)(D)),a.subtitles&&(c=a.subtitles,Object(d.assignTrackIdsByGroup)(c)),R.length>0){b=R[0].bitrate,R.sort(function(K,B){return K.bitrate-B.bitrate}),this._levels=R;for(var X=0;X<R.length;X++)if(R[X].bitrate===b){this._firstLevel=X,this.log("manifest loaded, "+R.length+" level(s) found, first bitrate: "+b);break}var G=k&&!j,H={levels:R,audioTracks:D,subtitleTracks:c,firstLevel:this._firstLevel,stats:a.stats,audio:k,video:j,altAudio:!G&&D.some(function(K){return!!K.url})};this.hls.trigger(S.Events.MANIFEST_PARSED,H),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(S.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:a.url,reason:"no level with compatible codecs found in manifest"})},u.onError=function(y,a){if(n.prototype.onError.call(this,y,a),a.fatal)return;var R=a.context,D=this._levels[this.currentLevelIndex];if(R&&(R.type===i.PlaylistContextType.AUDIO_TRACK&&D.audioGroupIds&&R.groupId===D.audioGroupIds[D.urlId]||R.type===i.PlaylistContextType.SUBTITLE_TRACK&&D.textGroupIds&&R.groupId===D.textGroupIds[D.urlId])){this.redundantFailover(this.currentLevelIndex);return}var c=!1,b=!0,E;switch(a.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:if(a.frag){var C=this._levels[a.frag.level];C?(C.fragmentError++,C.fragmentError>this.hls.config.fragLoadingMaxRetry&&(E=a.frag.level)):E=a.frag.level}break;case g.ErrorDetails.LEVEL_LOAD_ERROR:case g.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(b=!1),E=R.level),c=!0;break;case g.ErrorDetails.REMUX_ALLOC_ERROR:E=a.level,c=!0;break}E!==void 0&&this.recoverLevel(a,E,c,b)},u.recoverLevel=function(y,a,R,D){var c=y.details,b=this._levels[a];if(b.loadError++,R){var E=this.retryLoadingOrFail(y);if(E)y.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(D){var C=b.url.length;if(C>1&&b.loadError<C)y.levelRetry=!0,this.redundantFailover(a);else if(this.manualLevelIndex===-1){var F=a===0?this._levels.length-1:a-1;this.currentLevelIndex!==F&&this._levels[F].loadError===0&&(this.warn(c+": switch to "+F),y.levelRetry=!0,this.hls.nextAutoLevel=F)}}},u.redundantFailover=function(y){var a=this._levels[y],R=a.url.length;if(R>1){var D=(a.urlId+1)%R;this.warn("Switching to redundant URL-id "+D),this._levels.forEach(function(c){c.urlId=D}),this.level=y}},u.onFragLoaded=function(y,a){var R=a.frag;if(R!==void 0&&R.type===i.PlaylistLevelType.MAIN){var D=this._levels[R.level];D!==void 0&&(D.fragmentError=0,D.loadError=0)}},u.onLevelLoaded=function(y,a){var R,D=a.level,c=a.details,b=this._levels[D];if(!b){var E;this.warn("Invalid level index "+D),(E=a.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(c.deltaUpdateFailed=!0);return}D===this.currentLevelIndex?(b.fragmentError===0&&(b.loadError=0,this.retryCount=0),this.playlistLoaded(D,a,b.details)):(R=a.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(c.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(y,a){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var D=-1,c=this.hls.audioTracks[a.id].groupId,b=0;b<R.audioGroupIds.length;b++)if(R.audioGroupIds[b]===c){D=b;break}D!==R.urlId&&(R.urlId=D,this.startLoad())}},u.loadPlaylist=function(y){var a=this.currentLevelIndex,R=this._levels[a];if(this.canLoad&&R&&R.url.length>0){var D=R.urlId,c=R.url[D];if(y)try{c=y.addDirectives(c)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("Attempt loading level index "+a+(y?" at sn "+y.msn+" part "+y.part:"")+" with URL-id "+D+" "+c),this.clearTimer(),this.hls.trigger(S.Events.LEVEL_LOADING,{url:c,level:a,id:D,deliveryDirectives:y||null})}},u.removeLevel=function(y,a){var R=function(b,E){return E!==a},D=this._levels.filter(function(c,b){return b!==y?!0:c.url.length>1&&a!==void 0?(c.url=c.url.filter(R),c.audioGroupIds&&(c.audioGroupIds=c.audioGroupIds.filter(R)),c.textGroupIds&&(c.textGroupIds=c.textGroupIds.filter(R)),c.urlId=0,!0):!1}).map(function(c,b){var E=c.details;return E!=null&&E.fragments&&E.fragments.forEach(function(C){C.level=b}),c});this._levels=D,this.hls.trigger(S.Events.LEVELS_UPDATED,{levels:D})},p(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(y){var a,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===y&&(a=R[y])!==null&&a!==void 0&&a.details)return;if(y<0||y>=R.length){var D=y<0;if(this.hls.trigger(S.Events.ERROR,{type:g.ErrorTypes.OTHER_ERROR,details:g.ErrorDetails.LEVEL_SWITCH_ERROR,level:y,fatal:D,reason:"invalid level idx"}),D)return;y=Math.min(y,R.length-1)}this.clearTimer();var c=this.currentLevelIndex,b=R[c],E=R[y];this.log("switching to level "+y+" from "+c),this.currentLevelIndex=y;var C=r({},E,{level:y,maxBitrate:E.maxBitrate,uri:E.uri,urlId:E.urlId});delete C._urlId,this.hls.trigger(S.Events.LEVEL_SWITCHING,C);var F=E.details;if(!F||F.live){var j=this.switchParams(E.uri,b==null?void 0:b.details);this.loadPlaylist(j)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(y){this.manualLevelIndex=y,this._startLevel===void 0&&(this._startLevel=y),y!==-1&&(this.level=y)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(y){this._firstLevel=y}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var y=this.hls.config.startLevel;return y!==void 0?y:this._firstLevel}else return this._startLevel},set:function(y){this._startLevel=y}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(y){this.level=y,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=y)}}]),s}(o.default)},"./src/controller/level-helper.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"addGroupId",function(){return g}),T.d(m,"assignTrackIdsByGroup",function(){return _}),T.d(m,"updatePTS",function(){return d}),T.d(m,"updateFragPTSDTS",function(){return i}),T.d(m,"mergeDetails",function(){return r}),T.d(m,"mapPartIntersection",function(){return h}),T.d(m,"mapFragmentIntersection",function(){return p}),T.d(m,"adjustSliding",function(){return f}),T.d(m,"addSliding",function(){return x}),T.d(m,"computeReloadInterval",function(){return v}),T.d(m,"getFragmentWithSN",function(){return l}),T.d(m,"getPartWith",function(){return n});var L=T("./src/polyfills/number.ts"),S=T("./src/utils/logger.ts");function g(s,u,w){switch(u){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(w);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(w);break}}function _(s){var u={};s.forEach(function(w){var y=w.groupId||"";w.id=u[y]=u[y]||0,u[y]++})}function d(s,u,w){var y=s[u],a=s[w];o(y,a)}function o(s,u){var w=u.startPTS;if(Object(L.isFiniteNumber)(w)){var y=0,a;u.sn>s.sn?(y=w-s.start,a=s):(y=s.start-w,a=u),a.duration!==y&&(a.duration=y)}else if(u.sn>s.sn){var R=s.cc===u.cc;R&&s.minEndPTS?u.start=s.start+(s.minEndPTS-s.start):u.start=s.start+s.duration}else u.start=Math.max(s.start-u.duration,0)}function i(s,u,w,y,a,R){var D=y-w;D<=0&&(S.logger.warn("Fragment should have a positive duration",u),y=w+u.duration,R=a+u.duration);var c=w,b=y,E=u.startPTS,C=u.endPTS;if(Object(L.isFiniteNumber)(E)){var F=Math.abs(E-w);Object(L.isFiniteNumber)(u.deltaPTS)?u.deltaPTS=Math.max(F,u.deltaPTS):u.deltaPTS=F,c=Math.max(w,E),w=Math.min(w,E),a=Math.min(a,u.startDTS),b=Math.min(y,C),y=Math.max(y,C),R=Math.max(R,u.endDTS)}u.duration=y-w;var j=w-u.start;u.appendedPTS=y,u.start=u.startPTS=w,u.maxStartPTS=c,u.startDTS=a,u.endPTS=y,u.minEndPTS=b,u.endDTS=R;var k=u.sn;if(!s||k<s.startSN||k>s.endSN)return 0;var X,G=k-s.startSN,H=s.fragments;for(H[G]=u,X=G;X>0;X--)o(H[X],H[X-1]);for(X=G;X<H.length-1;X++)o(H[X],H[X+1]);return s.fragmentHint&&o(H[H.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,j}function r(s,u){for(var w=null,y=s.fragments,a=y.length-1;a>=0;a--){var R=y[a].initSegment;if(R){w=R;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var D=0,c;if(p(s,u,function(X,G){X.relurl&&(D=X.cc-G.cc),Object(L.isFiniteNumber)(X.startPTS)&&Object(L.isFiniteNumber)(X.endPTS)&&(G.start=G.startPTS=X.startPTS,G.startDTS=X.startDTS,G.appendedPTS=X.appendedPTS,G.maxStartPTS=X.maxStartPTS,G.endPTS=X.endPTS,G.endDTS=X.endDTS,G.minEndPTS=X.minEndPTS,G.duration=X.endPTS-X.startPTS,G.duration&&(c=G),u.PTSKnown=u.alignedSliding=!0),G.elementaryStreams=X.elementaryStreams,G.loader=X.loader,G.stats=X.stats,G.urlId=X.urlId,X.initSegment&&(G.initSegment=X.initSegment,w=X.initSegment)}),w){var b=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments;b.forEach(function(X){var G;(!X.initSegment||X.initSegment.relurl===((G=w)===null||G===void 0?void 0:G.relurl))&&(X.initSegment=w)})}if(u.skippedSegments&&(u.deltaUpdateFailed=u.fragments.some(function(X){return!X}),u.deltaUpdateFailed)){S.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var E=u.skippedSegments;E--;)u.fragments.shift();u.startSN=u.fragments[0].sn,u.startCC=u.fragments[0].cc}var C=u.fragments;if(D){S.logger.warn("discontinuity sliding from playlist, take drift into account");for(var F=0;F<C.length;F++)C[F].cc+=D}u.skippedSegments&&(u.startCC=u.fragments[0].cc),h(s.partList,u.partList,function(X,G){G.elementaryStreams=X.elementaryStreams,G.stats=X.stats}),c?i(u,c,c.startPTS,c.endPTS,c.startDTS,c.endDTS):f(s,u),C.length&&(u.totalduration=u.edge-C[0].start),u.driftStartTime=s.driftStartTime,u.driftStart=s.driftStart;var j=u.advancedDateTime;if(u.advanced&&j){var k=u.edge;u.driftStart||(u.driftStartTime=j,u.driftStart=k),u.driftEndTime=j,u.driftEnd=k}else u.driftEndTime=s.driftEndTime,u.driftEnd=s.driftEnd,u.advancedDateTime=s.advancedDateTime}function h(s,u,w){if(s&&u)for(var y=0,a=0,R=s.length;a<=R;a++){var D=s[a],c=u[a+y];D&&c&&D.index===c.index&&D.fragment.sn===c.fragment.sn?w(D,c):y--}}function p(s,u,w){for(var y=u.skippedSegments,a=Math.max(s.startSN,u.startSN)-u.startSN,R=(s.fragmentHint?1:0)+(y?u.endSN:Math.min(s.endSN,u.endSN))-u.startSN,D=u.startSN-s.startSN,c=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments,b=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,E=a;E<=R;E++){var C=b[D+E],F=c[E];y&&!F&&E<y&&(F=u.fragments[E]=C),C&&F&&w(C,F)}}function f(s,u){var w=u.startSN+u.skippedSegments-s.startSN,y=s.fragments;if(w<0||w>=y.length)return;x(u,y[w].start)}function x(s,u){if(u){for(var w=s.fragments,y=s.skippedSegments;y<w.length;y++)w[y].start+=u;s.fragmentHint&&(s.fragmentHint.start+=u)}}function v(s,u){var w=1e3*s.levelTargetDuration,y=w/2,a=s.age,R=a>0&&a<w*3,D=u.loading.end-u.loading.start,c,b=s.availabilityDelay;if(s.updated===!1)if(R){var E=333*s.misses;c=Math.max(Math.min(y,D*2),E),s.availabilityDelay=(s.availabilityDelay||0)+c}else c=y;else R?(b=Math.min(b||w/2,a),s.availabilityDelay=b,c=b+w-a):c=w-D;return Math.round(c)}function l(s,u,w){if(!s||!s.details)return null;var y=s.details,a=y.fragments[u-y.startSN];return a||(a=y.fragmentHint,a&&a.sn===u?a:u<y.startSN&&w&&w.sn===u?w:null)}function n(s,u,w){if(!s||!s.details)return null;var y=s.details.partList;if(y)for(var a=y.length;a--;){var R=y[a];if(R.index===w&&R.fragment.sn===u)return R}return null}},"./src/controller/stream-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return y});var L=T("./src/polyfills/number.ts"),S=T("./src/controller/base-stream-controller.ts"),g=T("./src/is-supported.ts"),_=T("./src/events.ts"),d=T("./src/utils/buffer-helper.ts"),o=T("./src/controller/fragment-tracker.ts"),i=T("./src/types/loader.ts"),r=T("./src/loader/fragment.ts"),h=T("./src/demux/transmuxer-interface.ts"),p=T("./src/types/transmuxer.ts"),f=T("./src/controller/gap-controller.ts"),x=T("./src/errors.ts"),v=T("./src/utils/logger.ts");function l(a,R){for(var D=0;D<R.length;D++){var c=R[D];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}}function n(a,R,D){return R&&l(a.prototype,R),D&&l(a,D),a}function s(a,R){a.prototype=Object.create(R.prototype),a.prototype.constructor=a,u(a,R)}function u(a,R){return u=Object.setPrototypeOf||function(c,b){return c.__proto__=b,c},u(a,R)}var w=100,y=function(a){s(R,a);function R(c,b){var E;return E=a.call(this,c,b,"[stream-controller]")||this,E.audioCodecSwap=!1,E.gapController=null,E.level=-1,E._forceStartLoad=!1,E.altAudio=!1,E.audioOnly=!1,E.fragPlaying=null,E.onvplaying=null,E.onvseeked=null,E.fragLastKbps=0,E.stalled=!1,E.couldBacktrack=!1,E.audioCodecSwitch=!1,E.videoBuffer=null,E._registerListeners(),E}var D=R.prototype;return D._registerListeners=function(){var b=this.hls;b.on(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.on(_.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.on(_.Events.LEVEL_LOADING,this.onLevelLoading,this),b.on(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(_.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.on(_.Events.ERROR,this.onError,this),b.on(_.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.on(_.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(_.Events.BUFFER_CREATED,this.onBufferCreated,this),b.on(_.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.on(_.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.on(_.Events.FRAG_BUFFERED,this.onFragBuffered,this)},D._unregisterListeners=function(){var b=this.hls;b.off(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.off(_.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.off(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(_.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.off(_.Events.ERROR,this.onError,this),b.off(_.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.off(_.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(_.Events.BUFFER_CREATED,this.onBufferCreated,this),b.off(_.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.off(_.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.off(_.Events.FRAG_BUFFERED,this.onFragBuffered,this)},D.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},D.startLoad=function(b){if(this.levels){var E=this.lastCurrentTime,C=this.hls;if(this.stopLoad(),this.setInterval(w),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var F=C.startLevel;F===-1&&(C.config.testBandwidth?(F=0,this.bitrateTest=!0):F=C.nextAutoLevel),this.level=C.nextLoadLevel=F,this.loadedmetadata=!1}E>0&&b===-1&&(this.log("Override startPosition with lastCurrentTime @"+E.toFixed(3)),b=E),this.state=S.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=b,this.tick()}else this._forceStartLoad=!0,this.state=S.State.STOPPED},D.stopLoad=function(){this._forceStartLoad=!1,a.prototype.stopLoad.call(this)},D.doTick=function(){switch(this.state){case S.State.IDLE:this.doTickIdle();break;case S.State.WAITING_LEVEL:{var b,E=this.levels,C=this.level,F=E==null||((b=E[C])===null||b===void 0)?void 0:b.details;if(F&&(!F.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(F))break;this.state=S.State.IDLE;break}break}case S.State.FRAG_LOADING_WAITING_RETRY:{var j,k=self.performance.now(),X=this.retryDate;(!X||k>=X||(j=this.media)!==null&&j!==void 0&&j.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=S.State.IDLE)}break;default:break}this.onTickEnd()},D.onTickEnd=function(){a.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},D.doTickIdle=function(){var b,E,C=this.hls,F=this.levelLastLoaded,j=this.levels,k=this.media,X=C.config,G=C.nextLoadLevel;if(F===null||!k&&(this.startFragRequested||!X.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!j||!j[G])return;var H=j[G];this.level=C.nextLoadLevel=G;var K=H.details;if(!K||this.state===S.State.WAITING_LEVEL||K.live&&this.levelLastLoaded!==G){this.state=S.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:k,i.PlaylistLevelType.MAIN);if(B===null)return;var U=B.len,W=this.getMaxBufferLength(H.maxBitrate);if(U>=W)return;if(this._streamEnded(B,K)){var Q={};this.altAudio&&(Q.type="video"),this.hls.trigger(_.Events.BUFFER_EOS,Q),this.state=S.State.ENDED;return}var ie=B.end,ce=this.getNextFragment(ie,K);if(this.couldBacktrack&&!this.fragPrevious&&ce&&ce.sn!=="initSegment"){var he=ce.sn-K.startSN;he>1&&(ce=K.fragments[he-1],this.fragmentTracker.removeFragment(ce))}if(ce&&this.fragmentTracker.getState(ce)===o.FragmentState.OK&&this.nextLoadPosition>ie){var be=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(k,be,i.PlaylistLevelType.MAIN),ce=this.getNextFragment(this.nextLoadPosition,K)}if(!ce)return;ce.initSegment&&!ce.initSegment.data&&!this.bitrateTest&&(ce=ce.initSegment),((b=ce.decryptdata)===null||b===void 0?void 0:b.keyFormat)==="identity"&&!((E=ce.decryptdata)!==null&&E!==void 0&&E.key)?this.loadKey(ce,K):this.loadFragment(ce,K,ie)},D.loadFragment=function(b,E,C){var F,j=this.fragmentTracker.getState(b);if(this.fragCurrent=b,j===o.FragmentState.BACKTRACKED){var k=this.fragmentTracker.getBacktrackData(b);if(k){this._handleFragmentLoadProgress(k),this._handleFragmentLoadComplete(k);return}else j=o.FragmentState.NOT_LOADED}j===o.FragmentState.NOT_LOADED||j===o.FragmentState.PARTIAL?b.sn==="initSegment"?this._loadInitSegment(b):this.bitrateTest?(b.bitrateTest=!0,this.log("Fragment "+b.sn+" of level "+b.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(b)):(this.startFragRequested=!0,a.prototype.loadFragment.call(this,b,E,C)):j===o.FragmentState.APPENDING?this.reduceMaxBufferLength(b.duration)&&this.fragmentTracker.removeFragment(b):((F=this.media)===null||F===void 0?void 0:F.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},D.getAppendedFrag=function(b){var E=this.fragmentTracker.getAppendedFrag(b,i.PlaylistLevelType.MAIN);return E&&"fragment"in E?E.fragment:E},D.getBufferedFrag=function(b){return this.fragmentTracker.getBufferedFrag(b,i.PlaylistLevelType.MAIN)},D.followingBufferedFrag=function(b){return b?this.getBufferedFrag(b.end+.5):null},D.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},D.nextLevelSwitch=function(){var b=this.levels,E=this.media;if(E!=null&&E.readyState){var C,F=this.getAppendedFrag(E.currentTime);if(F&&F.start>1&&this.flushMainBuffer(0,F.start-1),!E.paused&&b){var j=this.hls.nextLoadLevel,k=b[j],X=this.fragLastKbps;X&&this.fragCurrent?C=this.fragCurrent.duration*k.maxBitrate/(1e3*X)+1:C=0}else C=0;var G=this.getBufferedFrag(E.currentTime+C);if(G){var H=this.followingBufferedFrag(G);if(H){this.abortCurrentFrag();var K=H.maxStartPTS?H.maxStartPTS:H.start,B=H.duration,U=Math.max(G.end,K+Math.min(Math.max(B-this.config.maxFragLookUpTolerance,B*.5),B*.75));this.flushMainBuffer(U,Number.POSITIVE_INFINITY)}}}},D.abortCurrentFrag=function(){var b=this.fragCurrent;this.fragCurrent=null,b!=null&&b.loader&&b.loader.abort(),this.state===S.State.KEY_LOADING&&(this.state=S.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},D.flushMainBuffer=function(b,E){a.prototype.flushMainBuffer.call(this,b,E,this.altAudio?"video":null)},D.onMediaAttached=function(b,E){a.prototype.onMediaAttached.call(this,b,E);var C=E.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),C.addEventListener("playing",this.onvplaying),C.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,C,this.fragmentTracker,this.hls)},D.onMediaDetaching=function(){var b=this.media;b&&(b.removeEventListener("playing",this.onvplaying),b.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),a.prototype.onMediaDetaching.call(this)},D.onMediaPlaying=function(){this.tick()},D.onMediaSeeked=function(){var b=this.media,E=b?b.currentTime:null;Object(L.isFiniteNumber)(E)&&this.log("Media seeked to "+E.toFixed(3)),this.tick()},D.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(_.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},D.onManifestParsed=function(b,E){var C=!1,F=!1,j;E.levels.forEach(function(k){j=k.audioCodec,j&&(j.indexOf("mp4a.40.2")!==-1&&(C=!0),j.indexOf("mp4a.40.5")!==-1&&(F=!0))}),this.audioCodecSwitch=C&&F&&!Object(g.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=E.levels,this.startFragRequested=!1},D.onLevelLoading=function(b,E){var C=this.levels;if(!C||this.state!==S.State.IDLE)return;var F=C[E.level];(!F.details||F.details.live&&this.levelLastLoaded!==E.level||this.waitForCdnTuneIn(F.details))&&(this.state=S.State.WAITING_LEVEL)},D.onLevelLoaded=function(b,E){var C,F=this.levels,j=E.level,k=E.details,X=k.totalduration;if(!F){this.warn("Levels were reset while loading level "+j);return}this.log("Level "+j+" loaded ["+k.startSN+","+k.endSN+"], cc ["+k.startCC+", "+k.endCC+"] duration:"+X);var G=this.fragCurrent;G&&(this.state===S.State.FRAG_LOADING||this.state===S.State.FRAG_LOADING_WAITING_RETRY)&&(G.level!==E.level&&G.loader&&(this.state=S.State.IDLE,G.loader.abort()));var H=F[j],K=0;if(k.live||(C=H.details)!==null&&C!==void 0&&C.live){if(k.fragments[0]||(k.deltaUpdateFailed=!0),k.deltaUpdateFailed)return;K=this.alignPlaylists(k,H.details)}if(H.details=k,this.levelLastLoaded=j,this.hls.trigger(_.Events.LEVEL_UPDATED,{details:k,level:j}),this.state===S.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(k))return;this.state=S.State.IDLE}this.startFragRequested?k.live&&this.synchronizeToLiveEdge(k):this.setStartPosition(k,K),this.tick()},D._handleFragmentLoadProgress=function(b){var E,C=b.frag,F=b.part,j=b.payload,k=this.levels;if(!k){this.warn("Levels were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var X=k[C.level],G=X.details;if(!G){this.warn("Dropping fragment "+C.sn+" of level "+C.level+" after level details were reset");return}var H=X.videoCodec,K=G.PTSKnown||!G.live,B=(E=C.initSegment)===null||E===void 0?void 0:E.data,U=this._getAudioCodec(X),W=this.transmuxer=this.transmuxer||new h.default(this.hls,i.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Q=F?F.index:-1,ie=Q!==-1,ce=new p.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,j.byteLength,Q,ie),he=this.initPTS[C.cc];W.push(j,B,U,H,C,F,G.totalduration,K,ce,he)},D.onAudioTrackSwitching=function(b,E){var C=this.altAudio,F=!!E.url,j=E.id;if(!F){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var k=this.fragCurrent;k!=null&&k.loader&&(this.log("Switching to main audio track, cancel main fragment load"),k.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var X=this.hls;C&&X.trigger(_.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),X.trigger(_.Events.AUDIO_TRACK_SWITCHED,{id:j})}},D.onAudioTrackSwitched=function(b,E){var C=E.id,F=!!this.hls.audioTracks[C].url;if(F){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=F,this.tick()},D.onBufferCreated=function(b,E){var C=E.tracks,F,j,k=!1;for(var X in C){var G=C[X];if(G.id==="main"){if(j=X,F=G,X==="video"){var H=C[X];H&&(this.videoBuffer=H.buffer)}}else k=!0}k&&F?(this.log("Alternate track found, use "+j+".buffered to schedule main fragment loading"),this.mediaBuffer=F.buffer):this.mediaBuffer=this.media},D.onFragBuffered=function(b,E){var C=E.frag,F=E.part;if(C&&C.type!==i.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(F?" p: "+F.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state),this.state===S.State.PARSED&&(this.state=S.State.IDLE);return}var j=F?F.stats:C.stats;this.fragLastKbps=Math.round(8*j.total/(j.buffering.end-j.loading.first)),C.sn!=="initSegment"&&(this.fragPrevious=C),this.fragBufferedComplete(C,F)},D.onError=function(b,E){switch(E.details){case x.ErrorDetails.FRAG_LOAD_ERROR:case x.ErrorDetails.FRAG_LOAD_TIMEOUT:case x.ErrorDetails.KEY_LOAD_ERROR:case x.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(i.PlaylistLevelType.MAIN,E);break;case x.ErrorDetails.LEVEL_LOAD_ERROR:case x.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==S.State.ERROR&&(E.fatal?(this.warn(""+E.details),this.state=S.State.ERROR):!E.levelRetry&&this.state===S.State.WAITING_LEVEL&&(this.state=S.State.IDLE));break;case x.ErrorDetails.BUFFER_FULL_ERROR:if(E.parent==="main"&&(this.state===S.State.PARSING||this.state===S.State.PARSED)){var C=!0,F=this.getFwdBufferInfo(this.media,i.PlaylistLevelType.MAIN);F&&F.len>.5&&(C=!this.reduceMaxBufferLength(F.len)),C&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},D.checkBuffer=function(){var b=this.media,E=this.gapController;if(!b||!E||!b.readyState)return;var C=d.BufferHelper.getBuffered(b);!this.loadedmetadata&&C.length?(this.loadedmetadata=!0,this.seekToStartPos()):E.poll(this.lastCurrentTime),this.lastCurrentTime=b.currentTime},D.onFragLoadEmergencyAborted=function(){this.state=S.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},D.onBufferFlushed=function(b,E){var C=E.type;if(C!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var F=(C===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(F,C,i.PlaylistLevelType.MAIN)}},D.onLevelsUpdated=function(b,E){this.levels=E.levels},D.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},D.seekToStartPos=function(){var b=this.media,E=b.currentTime,C=this.startPosition;if(C>=0&&E<C){if(b.seeking){v.logger.log("could not seek to "+C+", already seeking at "+E);return}var F=d.BufferHelper.getBuffered(b),j=F.length?F.start(0):0,k=j-C;k>0&&(k<this.config.maxBufferHole||k<this.config.maxFragLookUpTolerance)&&(v.logger.log("adjusting start position by "+k+" to match buffer start"),C+=k,this.startPosition=C),this.log("seek to target start position "+C+" from current time "+E),b.currentTime=C}},D._getAudioCodec=function(b){var E=this.config.defaultAudioCodec||b.audioCodec;return this.audioCodecSwap&&E&&(this.log("Swapping audio codec"),E.indexOf("mp4a.40.5")!==-1?E="mp4a.40.2":E="mp4a.40.5"),E},D._loadBitrateTestFrag=function(b){var E=this;this._doFragLoad(b).then(function(C){var F=E.hls;if(!C||F.nextLoadLevel||E.fragContextChanged(b))return;E.fragLoadError=0,E.state=S.State.IDLE,E.startFragRequested=!1,E.bitrateTest=!1;var j=b.stats;j.parsing.start=j.parsing.end=j.buffering.start=j.buffering.end=self.performance.now(),F.trigger(_.Events.FRAG_LOADED,C)})},D._handleTransmuxComplete=function(b){var E,C="main",F=this.hls,j=b.remuxResult,k=b.chunkMeta,X=this.getCurrentContext(k);if(!X){this.warn("The loading context changed while buffering fragment "+k.sn+" of level "+k.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(k.level);return}var G=X.frag,H=X.part,K=X.level,B=j.video,U=j.text,W=j.id3,Q=j.initSegment,ie=this.altAudio?void 0:j.audio;if(this.fragContextChanged(G))return;if(this.state=S.State.PARSING,Q){Q.tracks&&(this._bufferInitSegment(K,Q.tracks,G,k),F.trigger(_.Events.FRAG_PARSING_INIT_SEGMENT,{frag:G,id:C,tracks:Q.tracks}));var ce=Q.initPTS,he=Q.timescale;Object(L.isFiniteNumber)(ce)&&(this.initPTS[G.cc]=ce,F.trigger(_.Events.INIT_PTS_FOUND,{frag:G,id:C,initPTS:ce,timescale:he}))}if(B&&j.independent!==!1){if(K.details){var be=B.startPTS,ne=B.endPTS,le=B.startDTS,ue=B.endDTS;if(H)H.elementaryStreams[B.type]={startPTS:be,endPTS:ne,startDTS:le,endDTS:ue};else if(B.firstKeyFrame&&B.independent&&(this.couldBacktrack=!0),B.dropped&&B.independent){var re=this.getLoadPosition()+this.config.maxBufferHole;if(re<be){this.backtrack(G);return}G.setElementaryStreamInfo(B.type,G.start,ne,G.start,ue,!0)}G.setElementaryStreamInfo(B.type,be,ne,le,ue),this.bufferFragmentData(B,G,H,k)}}else if(j.independent===!1){this.backtrack(G);return}if(ie){var oe=ie.startPTS,q=ie.endPTS,se=ie.startDTS,J=ie.endDTS;H&&(H.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:q,startDTS:se,endDTS:J}),G.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,oe,q,se,J),this.bufferFragmentData(ie,G,H,k)}if(W!=null&&(E=W.samples)!==null&&E!==void 0&&E.length){var ee={frag:G,id:C,samples:W.samples};F.trigger(_.Events.FRAG_PARSING_METADATA,ee)}if(U){var ge={frag:G,id:C,samples:U.samples};F.trigger(_.Events.FRAG_PARSING_USERDATA,ge)}},D._bufferInitSegment=function(b,E,C,F){var j=this;if(this.state!==S.State.PARSING)return;this.audioOnly=!!E.audio&&!E.video,this.altAudio&&!this.audioOnly&&delete E.audio;var k=E.audio,X=E.video,G=E.audiovideo;if(k){var H=b.audioCodec,K=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(H&&(H.indexOf("mp4a.40.5")!==-1?H="mp4a.40.2":H="mp4a.40.5"),k.metadata.channelCount!==1&&K.indexOf("firefox")===-1&&(H="mp4a.40.5")),K.indexOf("android")!==-1&&k.container!=="audio/mpeg"&&(H="mp4a.40.2",this.log("Android: force audio codec to "+H)),b.audioCodec&&b.audioCodec!==H&&this.log('Swapping manifest audio codec "'+b.audioCodec+'" for "'+H+'"'),k.levelCodec=H,k.id="main",this.log("Init audio buffer, container:"+k.container+", codecs[selected/level/parsed]=["+(H||"")+"/"+(b.audioCodec||"")+"/"+k.codec+"]")}X&&(X.levelCodec=b.videoCodec,X.id="main",this.log("Init video buffer, container:"+X.container+", codecs[level/parsed]=["+(b.videoCodec||"")+"/"+X.codec+"]")),G&&this.log("Init audiovideo buffer, container:"+G.container+", codecs[level/parsed]=["+(b.attrs.CODECS||"")+"/"+G.codec+"]"),this.hls.trigger(_.Events.BUFFER_CODECS,E),Object.keys(E).forEach(function(B){var U=E[B],W=U.initSegment;W!=null&&W.byteLength&&j.hls.trigger(_.Events.BUFFER_APPENDING,{type:B,data:W,frag:C,part:null,chunkMeta:F,parent:C.type})}),this.tick()},D.backtrack=function(b){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(b);var E=this.fragmentTracker.backtrack(b);this.fragPrevious=null,this.nextLoadPosition=b.start,E?this.resetFragmentLoading(b):this.state=S.State.BACKTRACKING},D.checkFragmentChanged=function(){var b=this.media,E=null;if(b&&b.readyState>1&&b.seeking===!1){var C=b.currentTime;if(d.BufferHelper.isBuffered(b,C)?E=this.getAppendedFrag(C):d.BufferHelper.isBuffered(b,C+.1)&&(E=this.getAppendedFrag(C+.1)),E){var F=this.fragPlaying,j=E.level;(!F||E.sn!==F.sn||F.level!==j||E.urlId!==F.urlId)&&(this.hls.trigger(_.Events.FRAG_CHANGED,{frag:E}),(!F||F.level!==j)&&this.hls.trigger(_.Events.LEVEL_SWITCHED,{level:j}),this.fragPlaying=E)}}},n(R,[{key:"nextLevel",get:function(){var b=this.nextBufferedFrag;return b?b.level:-1}},{key:"currentLevel",get:function(){var b=this.media;if(b){var E=this.getAppendedFrag(b.currentTime);if(E)return E.level}return-1}},{key:"nextBufferedFrag",get:function(){var b=this.media;if(b){var E=this.getAppendedFrag(b.currentTime);return this.followingBufferedFrag(E)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(S.default)},"./src/controller/subtitle-stream-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"SubtitleStreamController",function(){return s});var L=T("./src/events.ts"),S=T("./src/utils/logger.ts"),g=T("./src/utils/buffer-helper.ts"),_=T("./src/controller/fragment-finders.ts"),d=T("./src/utils/discontinuities.ts"),o=T("./src/controller/level-helper.ts"),i=T("./src/controller/fragment-tracker.ts"),r=T("./src/controller/base-stream-controller.ts"),h=T("./src/types/loader.ts"),p=T("./src/types/level.ts");function f(u,w){for(var y=0;y<w.length;y++){var a=w[y];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,a.key,a)}}function x(u,w,y){return w&&f(u.prototype,w),y&&f(u,y),u}function v(u,w){u.prototype=Object.create(w.prototype),u.prototype.constructor=u,l(u,w)}function l(u,w){return l=Object.setPrototypeOf||function(a,R){return a.__proto__=R,a},l(u,w)}var n=500,s=function(u){v(w,u);function w(a,R){var D;return D=u.call(this,a,R,"[subtitle-stream-controller]")||this,D.levels=[],D.currentTrackId=-1,D.tracksBuffered=[],D.mainDetails=null,D._registerListeners(),D}var y=w.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var R=this.hls;R.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.on(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.on(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.on(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.on(L.Events.ERROR,this.onError,this),R.on(L.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.on(L.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.on(L.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.on(L.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.on(L.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y._unregisterListeners=function(){var R=this.hls;R.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.off(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.off(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.off(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.off(L.Events.ERROR,this.onError,this),R.off(L.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.off(L.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.off(L.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.off(L.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.off(L.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y.startLoad=function(){this.stopLoad(),this.state=r.State.IDLE,this.setInterval(n),this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},y.onLevelLoaded=function(R,D){this.mainDetails=D.details},y.onSubtitleFragProcessed=function(R,D){var c=D.frag,b=D.success;if(this.fragPrevious=c,this.state=r.State.IDLE,!b)return;var E=this.tracksBuffered[this.currentTrackId];if(!E)return;for(var C,F=c.start,j=0;j<E.length;j++)if(F>=E[j].start&&F<=E[j].end){C=E[j];break}var k=c.start+c.duration;C?C.end=k:(C={start:F,end:k},E.push(C)),this.fragmentTracker.fragBuffered(c)},y.onBufferFlushing=function(R,D){var c=D.startOffset,b=D.endOffset;if(c===0&&b!==Number.POSITIVE_INFINITY){var E=this.currentTrackId,C=this.levels;if(!C.length||!C[E]||!C[E].details)return;var F=C[E].details,j=F.targetduration,k=b-j;if(k<=0)return;D.endOffsetSubtitles=Math.max(0,k),this.tracksBuffered.forEach(function(X){for(var G=0;G<X.length;){if(X[G].end<=k){X.shift();continue}else if(X[G].start<k)X[G].start=k;else break;G++}}),this.fragmentTracker.removeFragmentsInRange(c,k,h.PlaylistLevelType.SUBTITLE)}},y.onError=function(R,D){var c,b=D.frag;if(!b||b.type!==h.PlaylistLevelType.SUBTITLE)return;(c=this.fragCurrent)!==null&&c!==void 0&&c.loader&&this.fragCurrent.loader.abort(),this.state=r.State.IDLE},y.onSubtitleTracksUpdated=function(R,D){var c=this,b=D.subtitleTracks;this.tracksBuffered=[],this.levels=b.map(function(E){return new p.Level(E)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(E){c.tracksBuffered[E.id]=[]}),this.mediaBuffer=null},y.onSubtitleTrackSwitch=function(R,D){if(this.currentTrackId=D.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var c=this.levels[this.currentTrackId];c!=null&&c.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,c&&this.setInterval(n)},y.onSubtitleTrackLoaded=function(R,D){var c,b=D.details,E=D.id,C=this.currentTrackId,F=this.levels;if(!F.length)return;var j=F[C];if(E>=F.length||E!==C||!j)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,b.live||(c=j.details)!==null&&c!==void 0&&c.live){var k=this.mainDetails;if(b.deltaUpdateFailed||!k)return;var X=k.fragments[0];if(!j.details)b.hasProgramDateTime&&k.hasProgramDateTime?Object(d.alignMediaPlaylistByPDT)(b,k):X&&Object(o.addSliding)(b,X.start);else{var G=this.alignPlaylists(b,j.details);G===0&&X&&Object(o.addSliding)(b,X.start)}}if(j.details=b,this.levelLastLoaded=E,this.tick(),b.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var H=Object(_.findFragmentByPTS)(null,b.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),j.details=void 0)}},y._handleFragmentLoadComplete=function(R){var D=R.frag,c=R.payload,b=D.decryptdata,E=this.hls;if(this.fragContextChanged(D))return;if(c&&c.byteLength>0&&b&&b.key&&b.iv&&b.method==="AES-128"){var C=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(c),b.key.buffer,b.iv.buffer).then(function(F){var j=performance.now();E.trigger(L.Events.FRAG_DECRYPTED,{frag:D,payload:F,stats:{tstart:C,tdecrypt:j}})})}},y.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var R,D=this.currentTrackId,c=this.levels;if(!c.length||!c[D]||!c[D].details)return;var b=c[D].details,E=b.targetduration,C=this.config,F=this.media,j=g.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,F.currentTime-E,C.maxBufferHole),k=j.end,X=j.len,G=this.getMaxBufferLength()+E;if(X>G)return;console.assert(b,"Subtitle track details are defined on idle subtitle stream controller tick");var H=b.fragments,K=H.length,B=b.edge,U,W=this.fragPrevious;if(k<B){var Q=C.maxFragLookUpTolerance;W&&b.hasProgramDateTime&&(U=Object(_.findFragmentByPDT)(H,W.endProgramDateTime,Q)),U||(U=Object(_.findFragmentByPTS)(W,H,k,Q),!U&&W&&W.start<H[0].start&&(U=H[0]))}else U=H[K-1];(R=U)!==null&&R!==void 0&&R.encrypted?(S.logger.log("Loading key for "+U.sn),this.state=r.State.KEY_LOADING,this.hls.trigger(L.Events.KEY_LOADING,{frag:U})):U&&this.fragmentTracker.getState(U)===i.FragmentState.NOT_LOADED&&this.loadFragment(U,b,k)}},y.loadFragment=function(R,D,c){this.fragCurrent=R,u.prototype.loadFragment.call(this,R,D,c)},x(w,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),w}(r.default)},"./src/controller/subtitle-track-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts"),S=T("./src/utils/texttrack-utils.ts"),g=T("./src/controller/base-playlist-controller.ts"),_=T("./src/types/loader.ts");function d(f,x){for(var v=0;v<x.length;v++){var l=x[v];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,l.key,l)}}function o(f,x,v){return x&&d(f.prototype,x),v&&d(f,v),f}function i(f,x){f.prototype=Object.create(x.prototype),f.prototype.constructor=f,r(f,x)}function r(f,x){return r=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},r(f,x)}var h=function(f){i(x,f);function x(l){var n;return n=f.call(this,l,"[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 v=x.prototype;return v.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,f.prototype.destroy.call(this)},v.registerListeners=function(){var n=this.hls;n.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(L.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(L.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(L.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(L.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){var n=this.hls;n.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(L.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(L.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(L.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(L.Events.ERROR,this.onError,this)},v.onMediaAttached=function(n,s){if(this.media=s.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)},v.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},v.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var n=p(this.media.textTracks);n.forEach(function(s){Object(S.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},v.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},v.onManifestParsed=function(n,s){this.tracks=s.subtitleTracks},v.onSubtitleTrackLoaded=function(n,s){var u=s.id,w=s.details,y=this.trackId,a=this.tracksInGroup[y];if(!a){this.warn("Invalid subtitle track id "+u);return}var R=a.details;a.details=s.details,this.log("subtitle track "+u+" loaded ["+w.startSN+"-"+w.endSN+"]"),u===this.trackId&&(this.retryCount=0,this.playlistLoaded(u,s,R))},v.onLevelLoading=function(n,s){this.switchLevel(s.level)},v.onLevelSwitching=function(n,s){this.switchLevel(s.level)},v.switchLevel=function(n){var s=this.hls.levels[n];if(!(s!=null&&s.textGroupIds))return;var u=s.textGroupIds[s.urlId];if(this.groupId!==u){var w=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,y=this.tracks.filter(function(D){return!u||D.groupId===u});this.tracksInGroup=y;var a=this.findTrackId(w==null?void 0:w.name)||this.findTrackId();this.groupId=u;var R={subtitleTracks:y};this.log("Updating subtitle tracks, "+y.length+' track(s) found in "'+u+'" group-id'),this.hls.trigger(L.Events.SUBTITLE_TRACKS_UPDATED,R),a!==-1&&this.setSubtitleTrack(a,w)}},v.findTrackId=function(n){for(var s=this.tracksInGroup,u=0;u<s.length;u++){var w=s[u];if((!this.selectDefaultTrack||w.default)&&(!n||n===w.name))return w.id}return-1},v.onError=function(n,s){if(f.prototype.onError.call(this,n,s),s.fatal||!s.context)return;s.context.type===_.PlaylistContextType.SUBTITLE_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},v.loadPlaylist=function(n){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var u=s.id,w=s.groupId,y=s.url;if(n)try{y=n.addDirectives(y)}catch(a){this.warn("Could not construct new URL with HLS Delivery Directives: "+a)}this.log("Loading subtitle playlist for id "+u),this.hls.trigger(L.Events.SUBTITLE_TRACK_LOADING,{url:y,id:u,groupId:w,deliveryDirectives:n||null})}},v.toggleTrackModes=function(n){var s=this,u=this.media,w=this.subtitleDisplay,y=this.trackId;if(!u)return;var a=p(u.textTracks),R=a.filter(function(b){return b.groupId===s.groupId});if(n===-1)[].slice.call(a).forEach(function(b){b.mode="disabled"});else{var D=R[y];D&&(D.mode="disabled")}var c=R[n];c&&(c.mode=w?"showing":"hidden")},v.setSubtitleTrack=function(n,s){var u,w=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(u=w[n])!==null&&u!==void 0&&u.details)||n<-1||n>=w.length)return;this.clearTimer();var y=w[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,y){var a=y.id,R=y.groupId,D=R===void 0?"":R,c=y.name,b=y.type,E=y.url;this.hls.trigger(L.Events.SUBTITLE_TRACK_SWITCH,{id:a,groupId:D,name:c,type:b,url:E});var C=this.switchParams(y.url,s==null?void 0:s.details);this.loadPlaylist(C)}else this.hls.trigger(L.Events.SUBTITLE_TRACK_SWITCH,{id:n})},v.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,s=p(this.media.textTracks),u=0;u<s.length;u++)if(s[u].mode==="hidden")n=u;else if(s[u].mode==="showing"){n=u;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},o(x,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,s)}}]),x}(g.default);function p(f){for(var x=[],v=0;v<f.length;v++){var l=f[v];l.kind==="subtitles"&&l.label&&x.push(f[v])}return x}m.default=h},"./src/controller/timeline-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"TimelineController",function(){return p});var L=T("./src/polyfills/number.ts"),S=T("./src/events.ts"),g=T("./src/utils/cea-608-parser.ts"),_=T("./src/utils/output-filter.ts"),d=T("./src/utils/webvtt-parser.ts"),o=T("./src/utils/texttrack-utils.ts"),i=T("./src/utils/imsc1-ttml-parser.ts"),r=T("./src/types/loader.ts"),h=T("./src/utils/logger.ts"),p=function(){function l(s){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=v(),this.captionsProperties=void 0,this.hls=s,this.config=s.config,this.Cues=s.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var u=new _.default(this,"textTrack1"),w=new _.default(this,"textTrack2"),y=new _.default(this,"textTrack3"),a=new _.default(this,"textTrack4");this.cea608Parser1=new g.default(1,u,w),this.cea608Parser2=new g.default(3,y,a)}s.on(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(S.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(S.Events.FRAG_LOADING,this.onFragLoading,this),s.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(S.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(S.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(S.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=l.prototype;return n.destroy=function(){var u=this.hls;u.off(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),u.off(S.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),u.off(S.Events.FRAG_LOADING,this.onFragLoading,this),u.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(S.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),u.off(S.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),u.off(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.off(S.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),u.off(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(u,w,y,a,R){for(var D=!1,c=R.length;c--;){var b=R[c],E=x(b[0],b[1],w,y);if(E>=0&&(b[0]=Math.min(b[0],w),b[1]=Math.max(b[1],y),D=!0,E/(y-w)>.5))return}if(D||R.push([w,y]),this.config.renderTextTracksNatively){var C=this.captionsTracks[u];this.Cues.newCue(C,w,y,a)}else{var F=this.Cues.newCue(null,w,y,a);this.hls.trigger(S.Events.CUES_PARSED,{type:"captions",cues:F,track:u})}},n.onInitPtsFound=function(u,w){var y=this,a=w.frag,R=w.id,D=w.initPTS,c=w.timescale,b=this.unparsedVttFrags;R==="main"&&(this.initPTS[a.cc]=D,this.timescale[a.cc]=c),b.length&&(this.unparsedVttFrags=[],b.forEach(function(E){y.onFragLoaded(S.Events.FRAG_LOADED,E)}))},n.getExistingTrack=function(u){var w=this.media;if(w)for(var y=0;y<w.textTracks.length;y++){var a=w.textTracks[y];if(a[u])return a}return null},n.createCaptionsTrack=function(u){this.config.renderTextTracksNatively?this.createNativeTrack(u):this.createNonNativeTrack(u)},n.createNativeTrack=function(u){if(this.captionsTracks[u])return;var w=this.captionsProperties,y=this.captionsTracks,a=this.media,R=w[u],D=R.label,c=R.languageCode,b=this.getExistingTrack(u);if(b)y[u]=b,Object(o.clearCurrentCues)(y[u]),Object(o.sendAddTrackEvent)(y[u],a);else{var E=this.createTextTrack("captions",D,c);E&&(E[u]=!0,y[u]=E)}},n.createNonNativeTrack=function(u){if(this.nonNativeCaptionsTracks[u])return;var w=this.captionsProperties[u];if(!w)return;var y=w.label,a={_id:u,label:y,kind:"captions",default:w.media?!!w.media.default:!1,closedCaptions:w.media};this.nonNativeCaptionsTracks[u]=a,this.hls.trigger(S.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[a]})},n.createTextTrack=function(u,w,y){var a=this.media;return a?a.addTextTrack(u,w,y):void 0},n.onMediaAttaching=function(u,w){this.media=w.media,this._cleanTracks()},n.onMediaDetaching=function(){var u=this.captionsTracks;Object.keys(u).forEach(function(w){Object(o.clearCurrentCues)(u[w]),delete u[w]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=v(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},n._cleanTracks=function(){var u=this.media;if(!u)return;var w=u.textTracks;if(w)for(var y=0;y<w.length;y++)Object(o.clearCurrentCues)(w[y])},n.onSubtitleTracksUpdated=function(u,w){var y=this;this.textTracks=[];var a=w.subtitleTracks||[],R=a.some(function(E){return E.textCodec===i.IMSC1_CODEC});if(this.config.enableWebVTT||R&&this.config.enableIMSC1){var D=this.tracks&&a&&this.tracks.length===a.length;if(this.tracks=a||[],this.config.renderTextTracksNatively){var c=this.media?this.media.textTracks:[];this.tracks.forEach(function(E,C){var F;if(C<c.length){for(var j=null,k=0;k<c.length;k++)if(f(c[k],E)){j=c[k];break}j&&(F=j)}F?Object(o.clearCurrentCues)(F):(F=y.createTextTrack("subtitles",E.name,E.lang),F&&(F.mode="disabled")),F&&(F.groupId=E.groupId,y.textTracks.push(F))})}else if(!D&&this.tracks&&this.tracks.length){var b=this.tracks.map(function(E){return{label:E.name,kind:E.type.toLowerCase(),default:E.default,subtitleTrack:E}});this.hls.trigger(S.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:b})}}},n.onManifestLoaded=function(u,w){var y=this;this.config.enableCEA708Captions&&w.captions&&w.captions.forEach(function(a){var R=/(?:CC|SERVICE)([1-4])/.exec(a.instreamId);if(!R)return;var D="textTrack"+R[1],c=y.captionsProperties[D];if(!c)return;c.label=a.name,a.lang&&(c.languageCode=a.lang),c.media=a})},n.onFragLoading=function(u,w){var y=this.cea608Parser1,a=this.cea608Parser2,R=this.lastSn,D=this.lastPartIndex;if(!this.enabled||!(y&&a))return;if(w.frag.type===r.PlaylistLevelType.MAIN){var c,b,E=w.frag.sn,C=(c=w==null||((b=w.part)===null||b===void 0)?void 0:b.index)!=null?c:-1;E===R+1||E===R&&C===D+1||(y.reset(),a.reset()),this.lastSn=E,this.lastPartIndex=C}},n.onFragLoaded=function(u,w){var y=w.frag,a=w.payload,R=this.initPTS,D=this.unparsedVttFrags;if(y.type===r.PlaylistLevelType.SUBTITLE)if(a.byteLength){if(!Object(L.isFiniteNumber)(R[y.cc])){D.push(w),R.length&&this.hls.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Missing initial subtitle PTS")});return}var c=y.decryptdata;if(c==null||c.key==null||c.method!=="AES-128"){var b=this.tracks[y.level],E=this.vttCCs;E[y.cc]||(E[y.cc]={start:y.start,prevCC:this.prevCC,new:!0},this.prevCC=y.cc),b&&b.textCodec===i.IMSC1_CODEC?this._parseIMSC1(y,a):this._parseVTTs(y,a,E)}}else this.hls.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(u,w){var y=this,a=this.hls;Object(i.parseIMSC1)(w,this.initPTS[u.cc],this.timescale[u.cc],function(R){y._appendCues(R,u.level),a.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(R){h.logger.log("Failed to parse IMSC1: "+R),a.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:R})})},n._parseVTTs=function(u,w,y){var a=this,R=this.hls;Object(d.parseWebVTT)(w,this.initPTS[u.cc],this.timescale[u.cc],y,u.cc,u.start,function(D){a._appendCues(D,u.level),R.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(D){a._fallbackToIMSC1(u,w),h.logger.log("Failed to parse VTT cue: "+D),R.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:D})})},n._fallbackToIMSC1=function(u,w){var y=this,a=this.tracks[u.level];a.textCodec||Object(i.parseIMSC1)(w,this.initPTS[u.cc],this.timescale[u.cc],function(){a.textCodec=i.IMSC1_CODEC,y._parseIMSC1(u,w)},function(){a.textCodec="wvtt"})},n._appendCues=function(u,w){var y=this.hls;if(this.config.renderTextTracksNatively){var a=this.textTracks[w];if(a.mode==="disabled")return;u.forEach(function(c){return Object(o.addCueToTrack)(a,c)})}else{var R=this.tracks[w],D=R.default?"default":"subtitles"+w;y.trigger(S.Events.CUES_PARSED,{type:"subtitles",cues:u,track:D})}},n.onFragDecrypted=function(u,w){var y=w.frag;if(y.type===r.PlaylistLevelType.SUBTITLE){if(!Object(L.isFiniteNumber)(this.initPTS[y.cc])){this.unparsedVttFrags.push(w);return}this.onFragLoaded(S.Events.FRAG_LOADED,w)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(u,w){var y=this.cea608Parser1,a=this.cea608Parser2;if(!this.enabled||!(y&&a))return;for(var R=0;R<w.samples.length;R++){var D=w.samples[R].bytes;if(D){var c=this.extractCea608Data(D);y.addData(w.samples[R].pts,c[0]),a.addData(w.samples[R].pts,c[1])}}},n.onBufferFlushing=function(u,w){var y=w.startOffset,a=w.endOffset,R=w.endOffsetSubtitles,D=w.type,c=this.media;if(!c||c.currentTime<a)return;if(!D||D==="video"){var b=this.captionsTracks;Object.keys(b).forEach(function(C){return Object(o.removeCuesInRange)(b[C],y,a)})}if(this.config.renderTextTracksNatively&&(y===0&&R!==void 0)){var E=this.textTracks;Object.keys(E).forEach(function(C){return Object(o.removeCuesInRange)(E[C],y,R)})}},n.extractCea608Data=function(u){for(var w=u[0]&31,y=2,a=[[],[]],R=0;R<w;R++){var D=u[y++],c=127&u[y++],b=127&u[y++],E=(4&D)!==0,C=3&D;if(c===0&&b===0)continue;E&&((C===0||C===1)&&(a[C].push(c),a[C].push(b)))}return a},l}();function f(l,n){return l&&l.label===n.name&&!(l.textTrack1||l.textTrack2)}function x(l,n,s,u){return Math.min(n,u)-Math.max(l,s)}function v(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return L});var L=function(){function S(_,d){this.subtle=void 0,this.aesIV=void 0,this.subtle=_,this.aesIV=d}var g=S.prototype;return g.decrypt=function(d,o){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},o,d)},S}()},"./src/crypt/aes-decryptor.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"removePadding",function(){return S}),T.d(m,"default",function(){return g});var L=T("./src/utils/typed-array.ts");function S(_){var d=_.byteLength,o=d&&new DataView(_.buffer).getUint8(d-1);return o?Object(L.sliceUint8)(_,0,d-o):_}var g=function(){function _(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var d=_.prototype;return d.uint8ArrayToUint32Array_=function(i){for(var r=new DataView(i),h=new Uint32Array(4),p=0;p<4;p++)h[p]=r.getUint32(p*4);return h},d.initTable=function(){var i=this.sBox,r=this.invSBox,h=this.subMix,p=h[0],f=h[1],x=h[2],v=h[3],l=this.invSubMix,n=l[0],s=l[1],u=l[2],w=l[3],y=new Uint32Array(256),a=0,R=0,D=0;for(D=0;D<256;D++)D<128?y[D]=D<<1:y[D]=D<<1^283;for(D=0;D<256;D++){var c=R^R<<1^R<<2^R<<3^R<<4;c=c>>>8^c&255^99,i[a]=c,r[c]=a;var b=y[a],E=y[b],C=y[E],F=y[c]*257^c*16843008;p[a]=F<<24|F>>>8,f[a]=F<<16|F>>>16,x[a]=F<<8|F>>>24,v[a]=F,F=C*16843009^E*65537^b*257^a*16843008,n[c]=F<<24|F>>>8,s[c]=F<<16|F>>>16,u[c]=F<<8|F>>>24,w[c]=F,a?(a=b^y[y[y[C^b]]],R^=y[y[R]]):a=R=1}},d.expandKey=function(i){for(var r=this.uint8ArrayToUint32Array_(i),h=!0,p=0;p<r.length&&h;)h=r[p]===this.key[p],p++;if(h)return;this.key=r;var f=this.keySize=r.length;if(f!==4&&f!==6&&f!==8)throw new Error("Invalid aes key size="+f);var x=this.ksRows=(f+6+1)*4,v,l,n=this.keySchedule=new Uint32Array(x),s=this.invKeySchedule=new Uint32Array(x),u=this.sBox,w=this.rcon,y=this.invSubMix,a=y[0],R=y[1],D=y[2],c=y[3],b,E;for(v=0;v<x;v++){if(v<f){b=n[v]=r[v];continue}E=b,v%f===0?(E=E<<8|E>>>24,E=u[E>>>24]<<24|u[E>>>16&255]<<16|u[E>>>8&255]<<8|u[E&255],E^=w[v/f|0]<<24):f>6&&v%f===4&&(E=u[E>>>24]<<24|u[E>>>16&255]<<16|u[E>>>8&255]<<8|u[E&255]),n[v]=b=(n[v-f]^E)>>>0}for(l=0;l<x;l++)v=x-l,l&3?E=n[v]:E=n[v-4],l<4||v<=4?s[l]=E:s[l]=a[u[E>>>24]]^R[u[E>>>16&255]]^D[u[E>>>8&255]]^c[u[E&255]],s[l]=s[l]>>>0},d.networkToHostOrderSwap=function(i){return i<<24|(i&65280)<<8|(i&16711680)>>8|i>>>24},d.decrypt=function(i,r,h){for(var p=this.keySize+6,f=this.invKeySchedule,x=this.invSBox,v=this.invSubMix,l=v[0],n=v[1],s=v[2],u=v[3],w=this.uint8ArrayToUint32Array_(h),y=w[0],a=w[1],R=w[2],D=w[3],c=new Int32Array(i),b=new Int32Array(c.length),E,C,F,j,k,X,G,H,K,B,U,W,Q,ie,ce=this.networkToHostOrderSwap;r<c.length;){for(K=ce(c[r]),B=ce(c[r+1]),U=ce(c[r+2]),W=ce(c[r+3]),k=K^f[0],X=W^f[1],G=U^f[2],H=B^f[3],Q=4,ie=1;ie<p;ie++)E=l[k>>>24]^n[X>>16&255]^s[G>>8&255]^u[H&255]^f[Q],C=l[X>>>24]^n[G>>16&255]^s[H>>8&255]^u[k&255]^f[Q+1],F=l[G>>>24]^n[H>>16&255]^s[k>>8&255]^u[X&255]^f[Q+2],j=l[H>>>24]^n[k>>16&255]^s[X>>8&255]^u[G&255]^f[Q+3],k=E,X=C,G=F,H=j,Q=Q+4;E=x[k>>>24]<<24^x[X>>16&255]<<16^x[G>>8&255]<<8^x[H&255]^f[Q],C=x[X>>>24]<<24^x[G>>16&255]<<16^x[H>>8&255]<<8^x[k&255]^f[Q+1],F=x[G>>>24]<<24^x[H>>16&255]<<16^x[k>>8&255]<<8^x[X&255]^f[Q+2],j=x[H>>>24]<<24^x[k>>16&255]<<16^x[X>>8&255]<<8^x[G&255]^f[Q+3],b[r]=ce(E^y),b[r+1]=ce(j^a),b[r+2]=ce(F^R),b[r+3]=ce(C^D),y=K,a=B,R=U,D=W,r=r+4}return b.buffer},_}()},"./src/crypt/decrypter.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return r});var L=T("./src/crypt/aes-crypto.ts"),S=T("./src/crypt/fast-aes-key.ts"),g=T("./src/crypt/aes-decryptor.ts"),_=T("./src/utils/logger.ts"),d=T("./src/utils/mp4-tools.ts"),o=T("./src/utils/typed-array.ts"),i=16,r=function(){function h(f,x,v){var l=v===void 0?{}:v,n=l.removePKCS7Padding,s=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=f,this.config=x,this.removePKCS7Padding=s,s)try{var u=self.crypto;u&&(this.subtle=u.subtle||u.webkitSubtle)}catch(w){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var p=h.prototype;return p.destroy=function(){this.observer=null},p.isSync=function(){return this.config.enableSoftwareAES},p.flush=function(){var x=this.currentResult;if(!x){this.reset();return}var v=new Uint8Array(x);return this.reset(),this.removePKCS7Padding?Object(g.removePadding)(v):v},p.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},p.decrypt=function(x,v,l,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(x),v,l);var s=this.flush();s&&n(s.buffer)}else this.webCryptoDecrypt(new Uint8Array(x),v,l).then(n)},p.softwareDecrypt=function(x,v,l){var n=this.currentIV,s=this.currentResult,u=this.remainderData;this.logOnce("JS AES decrypt"),u&&(x=Object(d.appendUint8Array)(u,x),this.remainderData=null);var w=this.getValidChunk(x);if(!w.length)return null;n&&(l=n);var y=this.softwareDecrypter;y||(y=this.softwareDecrypter=new g.default),y.expandKey(v);var a=s;return this.currentResult=y.decrypt(w.buffer,0,l),this.currentIV=Object(o.sliceUint8)(w,-16).buffer,a||null},p.webCryptoDecrypt=function(x,v,l){var n=this,s=this.subtle;return(this.key!==v||!this.fastAesKey)&&(this.key=v,this.fastAesKey=new S.default(s,v)),this.fastAesKey.expandKey().then(function(u){if(!s)return Promise.reject(new Error("web crypto not initialized"));var w=new L.default(s,l);return w.decrypt(x.buffer,u)}).catch(function(u){return n.onWebCryptoError(u,x,v,l)})},p.onWebCryptoError=function(x,v,l,n){return _.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",x),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(v,l,n)},p.getValidChunk=function(x){var v=x,l=x.length-x.length%i;return l!==x.length&&(v=Object(o.sliceUint8)(x,0,l),this.remainderData=Object(o.sliceUint8)(x,l)),v},p.logOnce=function(x){if(!this.logEnabled)return;_.logger.log("[decrypter.ts]: "+x),this.logEnabled=!1},h}()},"./src/crypt/fast-aes-key.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return L});var L=function(){function S(_,d){this.subtle=void 0,this.key=void 0,this.subtle=_,this.key=d}var g=S.prototype;return g.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},S}()},"./src/demux/aacdemuxer.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/demux/base-audio-demuxer.ts"),S=T("./src/demux/adts.ts"),g=T("./src/utils/logger.ts"),_=T("./src/demux/id3.ts");function d(r,h){r.prototype=Object.create(h.prototype),r.prototype.constructor=r,o(r,h)}function o(r,h){return o=Object.setPrototypeOf||function(f,x){return f.__proto__=x,f},o(r,h)}var i=function(r){d(h,r);function h(f,x){var v;return v=r.call(this)||this,v.observer=void 0,v.config=void 0,v.observer=f,v.config=x,v}var p=h.prototype;return p.resetInitSegment=function(x,v,l){r.prototype.resetInitSegment.call(this,x,v,l),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:x,duration:l,inputTimeScale:9e4,dropped:0}},h.probe=function(x){if(!x)return!1;for(var v=_.getID3Data(x,0)||[],l=v.length,n=x.length;l<n;l++)if(S.probe(x,l))return g.logger.log("ADTS sync word found !"),!0;return!1},p.canParse=function(x,v){return S.canParse(x,v)},p.appendFrame=function(x,v,l){S.initTrackConfig(x,this.observer,v,l,x.manifestCodec);var n=S.appendFrame(x,v,l,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},h}(L.default);i.minProbeByteLength=9,m.default=i},"./src/demux/adts.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"getAudioConfig",function(){return _}),T.d(m,"isHeaderPattern",function(){return d}),T.d(m,"getHeaderLength",function(){return o}),T.d(m,"getFullFrameLength",function(){return i}),T.d(m,"canGetFrameLength",function(){return r}),T.d(m,"isHeader",function(){return h}),T.d(m,"canParse",function(){return p}),T.d(m,"probe",function(){return f}),T.d(m,"initTrackConfig",function(){return x}),T.d(m,"getFrameDuration",function(){return v}),T.d(m,"parseFrameHeader",function(){return l}),T.d(m,"appendFrame",function(){return n});var L=T("./src/utils/logger.ts"),S=T("./src/errors.ts"),g=T("./src/events.ts");function _(s,u,w,y){var a,R,D,c,b=navigator.userAgent.toLowerCase(),E=y,C=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];a=((u[w+2]&192)>>>6)+1;var F=(u[w+2]&60)>>>2;if(F>C.length-1){s.trigger(g.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+F});return}return D=(u[w+2]&1)<<2,D|=(u[w+3]&192)>>>6,L.logger.log("manifest codec:"+y+", ADTS type:"+a+", samplingIndex:"+F),/firefox/i.test(b)?F>=6?(a=5,c=new Array(4),R=F-3):(a=2,c=new Array(2),R=F):b.indexOf("android")!==-1?(a=2,c=new Array(2),R=F):(a=5,c=new Array(4),y&&(y.indexOf("mp4a.40.29")!==-1||y.indexOf("mp4a.40.5")!==-1)||!y&&F>=6?R=F-3:((y&&y.indexOf("mp4a.40.2")!==-1&&(F>=6&&D===1||/vivaldi/i.test(b))||!y&&D===1)&&(a=2,c=new Array(2)),R=F)),c[0]=a<<3,c[0]|=(F&14)>>1,c[1]|=(F&1)<<7,c[1]|=D<<3,a===5&&(c[1]|=(R&14)>>1,c[2]=(R&1)<<7,c[2]|=2<<2,c[3]=0),{config:c,samplerate:C[F],channelCount:D,codec:"mp4a.40."+a,manifestCodec:E}}function d(s,u){return s[u]===255&&(s[u+1]&246)===240}function o(s,u){return s[u+1]&1?7:9}function i(s,u){return(s[u+3]&3)<<11|s[u+4]<<3|(s[u+5]&224)>>>5}function r(s,u){return u+5<s.length}function h(s,u){return u+1<s.length&&d(s,u)}function p(s,u){return r(s,u)&&d(s,u)&&i(s,u)<=s.length-u}function f(s,u){if(h(s,u)){var w=o(s,u);if(u+w>=s.length)return!1;var y=i(s,u);if(y<=w)return!1;var a=u+y;return a===s.length||h(s,a)}return!1}function x(s,u,w,y,a){if(!s.samplerate){var R=_(u,w,y,a);if(!R)return;s.config=R.config,s.samplerate=R.samplerate,s.channelCount=R.channelCount,s.codec=R.codec,s.manifestCodec=R.manifestCodec,L.logger.log("parsed codec:"+s.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function v(s){return 1024*9e4/s}function l(s,u,w,y,a){var R=o(s,u),D=i(s,u);if(D-=R,D>0){var c=w+y*a;return{headerLength:R,frameLength:D,stamp:c}}}function n(s,u,w,y,a){var R=v(s.samplerate),D=l(u,w,y,a,R);if(D){var c=D.frameLength,b=D.headerLength,E=D.stamp,C=b+c,F=Math.max(0,w+C-u.length),j;F?(j=new Uint8Array(C-b),j.set(u.subarray(w+b,u.length),0)):j=u.subarray(w+b,w+C);var k={unit:j,pts:E};return F||s.samples.push(k),{sample:k,length:C,missing:F}}}},"./src/demux/base-audio-demuxer.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"initPTSFn",function(){return i});var L=T("./src/polyfills/number.ts"),S=T("./src/demux/id3.ts"),g=T("./src/demux/dummy-demuxed-track.ts"),_=T("./src/utils/mp4-tools.ts"),d=T("./src/utils/typed-array.ts"),o=function(){function r(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var h=r.prototype;return h.resetInitSegment=function(f,x,v){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},h.resetTimeStamp=function(){},h.resetContiguity=function(){},h.canParse=function(f,x){return!1},h.appendFrame=function(f,x,v){},h.demux=function(f,x){this.cachedData&&(f=Object(_.appendUint8Array)(this.cachedData,f),this.cachedData=null);var v=S.getID3Data(f,0),l=v?v.length:0,n,s,u=this._audioTrack,w=this._id3Track,y=v?S.getTimeStamp(v):void 0,a=f.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=i(y,x)),v&&v.length>0&&w.samples.push({pts:this.initPTS,dts:this.initPTS,data:v}),s=this.initPTS;l<a;){if(this.canParse(f,l)){var R=this.appendFrame(u,f,l);R?(this.frameIndex++,s=R.sample.pts,l+=R.length,n=l):l=a}else S.canParse(f,l)?(v=S.getID3Data(f,l),w.samples.push({pts:s,dts:s,data:v}),l+=v.length,n=l):l++;if(l===a&&n!==a){var D=Object(d.sliceUint8)(f,n);this.cachedData?this.cachedData=Object(_.appendUint8Array)(this.cachedData,D):this.cachedData=D}}return{audioTrack:u,avcTrack:Object(g.dummyTrack)(),id3Track:w,textTrack:Object(g.dummyTrack)()}},h.demuxSampleAes=function(f,x,v){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},h.flush=function(f){var x=this.cachedData;return x&&(this.cachedData=null,this.demux(x,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(g.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(g.dummyTrack)()}},h.destroy=function(){},r}(),i=function(h,p){return Object(L.isFiniteNumber)(h)?h*90:p*9e4};m.default=o},"./src/demux/chunk-cache.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return L});var L=function(){function g(){this.chunks=[],this.dataLength=0}var _=g.prototype;return _.push=function(o){this.chunks.push(o),this.dataLength+=o.length},_.flush=function(){var o=this.chunks,i=this.dataLength,r;if(o.length)o.length===1?r=o[0]:r=S(o,i);else return new Uint8Array(0);return this.reset(),r},_.reset=function(){this.chunks.length=0,this.dataLength=0},g}();function S(g,_){for(var d=new Uint8Array(_),o=0,i=0;i<g.length;i++){var r=g[i];d.set(r,o),o+=r.length}return d}},"./src/demux/dummy-demuxed-track.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"dummyTrack",function(){return L});function L(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/utils/logger.ts"),S=function(){function g(d){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=d,this.bytesAvailable=d.byteLength,this.word=0,this.bitsAvailable=0}var _=g.prototype;return _.loadWord=function(){var o=this.data,i=this.bytesAvailable,r=o.byteLength-i,h=new Uint8Array(4),p=Math.min(4,i);if(p===0)throw new Error("no bytes available");h.set(o.subarray(r,r+p)),this.word=new DataView(h.buffer).getUint32(0),this.bitsAvailable=p*8,this.bytesAvailable-=p},_.skipBits=function(o){var i;this.bitsAvailable>o?(this.word<<=o,this.bitsAvailable-=o):(o-=this.bitsAvailable,i=o>>3,o-=i>>3,this.bytesAvailable-=i,this.loadWord(),this.word<<=o,this.bitsAvailable-=o)},_.readBits=function(o){var i=Math.min(this.bitsAvailable,o),r=this.word>>>32-i;return o>32&&L.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=i,this.bitsAvailable>0?this.word<<=i:this.bytesAvailable>0&&this.loadWord(),i=o-i,i>0&&this.bitsAvailable?r<<i|this.readBits(i):r},_.skipLZ=function(){var o;for(o=0;o<this.bitsAvailable;++o)if((this.word&2147483648>>>o)!==0)return this.word<<=o,this.bitsAvailable-=o,o;return this.loadWord(),o+this.skipLZ()},_.skipUEG=function(){this.skipBits(1+this.skipLZ())},_.skipEG=function(){this.skipBits(1+this.skipLZ())},_.readUEG=function(){var o=this.skipLZ();return this.readBits(o+1)-1},_.readEG=function(){var o=this.readUEG();return 1&o?1+o>>>1:-1*(o>>>1)},_.readBoolean=function(){return this.readBits(1)===1},_.readUByte=function(){return this.readBits(8)},_.readUShort=function(){return this.readBits(16)},_.readUInt=function(){return this.readBits(32)},_.skipScalingList=function(o){for(var i=8,r=8,h,p=0;p<o;p++)r!==0&&(h=this.readEG(),r=(i+h+256)%256),i=r===0?i:r},_.readSPS=function(){var o=0,i=0,r=0,h=0,p,f,x,v=this.readUByte.bind(this),l=this.readBits.bind(this),n=this.readUEG.bind(this),s=this.readBoolean.bind(this),u=this.skipBits.bind(this),w=this.skipEG.bind(this),y=this.skipUEG.bind(this),a=this.skipScalingList.bind(this);v();var R=v();if(l(5),u(3),v(),y(),R===100||R===110||R===122||R===244||R===44||R===83||R===86||R===118||R===128){var D=n();if(D===3&&u(1),y(),y(),u(1),s())for(f=D!==3?8:12,x=0;x<f;x++)s()&&(x<6?a(16):a(64))}y();var c=n();if(c===0)n();else if(c===1)for(u(1),w(),w(),p=n(),x=0;x<p;x++)w();y(),u(1);var b=n(),E=n(),C=l(1);C===0&&u(1),u(1),s()&&(o=n(),i=n(),r=n(),h=n());var F=[1,1];if(s()&&s()){var j=v();switch(j){case 1:F=[1,1];break;case 2:F=[12,11];break;case 3:F=[10,11];break;case 4:F=[16,11];break;case 5:F=[40,33];break;case 6:F=[24,11];break;case 7:F=[20,11];break;case 8:F=[32,11];break;case 9:F=[80,33];break;case 10:F=[18,11];break;case 11:F=[15,11];break;case 12:F=[64,33];break;case 13:F=[160,99];break;case 14:F=[4,3];break;case 15:F=[3,2];break;case 16:F=[2,1];break;case 255:{F=[v()<<8|v(),v()<<8|v()];break}}}return{width:Math.ceil((b+1)*16-o*2-i*2),height:(2-C)*(E+1)*16-(C?2:4)*(r+h),pixelRatio:F}},_.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},g}();m.default=S},"./src/demux/id3.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"isHeader",function(){return L}),T.d(m,"isFooter",function(){return S}),T.d(m,"getID3Data",function(){return g}),T.d(m,"canParse",function(){return d}),T.d(m,"getTimeStamp",function(){return o}),T.d(m,"isTimeStampFrame",function(){return i}),T.d(m,"getID3Frames",function(){return h}),T.d(m,"decodeFrame",function(){return p}),T.d(m,"utf8ArrayToStr",function(){return n}),T.d(m,"testables",function(){return s});var L=function(a,R){return R+10<=a.length&&(a[R]===73&&a[R+1]===68&&a[R+2]===51&&(a[R+3]<255&&a[R+4]<255&&(a[R+6]<128&&a[R+7]<128&&a[R+8]<128&&a[R+9]<128)))},S=function(a,R){return R+10<=a.length&&(a[R]===51&&a[R+1]===68&&a[R+2]===73&&(a[R+3]<255&&a[R+4]<255&&(a[R+6]<128&&a[R+7]<128&&a[R+8]<128&&a[R+9]<128)))},g=function(a,R){for(var D=R,c=0;L(a,R);){c+=10;var b=_(a,R+6);c+=b,S(a,R+10)&&(c+=10),R+=c}return c>0?a.subarray(D,D+c):void 0},_=function(a,R){var D=0;return D=(a[R]&127)<<21,D|=(a[R+1]&127)<<14,D|=(a[R+2]&127)<<7,D|=a[R+3]&127,D},d=function(a,R){return L(a,R)&&_(a,R+6)+10<=a.length-R},o=function(a){for(var R=h(a),D=0;D<R.length;D++){var c=R[D];if(i(c))return l(c)}return},i=function(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"},r=function(a){var R=String.fromCharCode(a[0],a[1],a[2],a[3]),D=_(a,4),c=10;return{type:R,size:D,data:a.subarray(c,c+D)}},h=function(a){for(var R=0,D=[];L(a,R);){var c=_(a,R+6);R+=10;for(var b=R+c;R+8<b;){var E=r(a.subarray(R)),C=p(E);C&&D.push(C),R+=E.size+10}S(a,R)&&(R+=10)}return D},p=function(a){return a.type==="PRIV"?f(a):a.type[0]==="W"?v(a):x(a)},f=function(a){if(a.size<2)return;var R=n(a.data,!0),D=new Uint8Array(a.data.subarray(R.length+1));return{key:a.type,info:R,data:D.buffer}},x=function(a){if(a.size<2)return;if(a.type==="TXXX"){var R=1,D=n(a.data.subarray(R),!0);R+=D.length+1;var c=n(a.data.subarray(R));return{key:a.type,info:D,data:c}}var b=n(a.data.subarray(1));return{key:a.type,data:b}},v=function(a){if(a.type==="WXXX"){if(a.size<2)return;var R=1,D=n(a.data.subarray(R),!0);R+=D.length+1;var c=n(a.data.subarray(R));return{key:a.type,info:D,data:c}}var b=n(a.data);return{key:a.type,data:b}},l=function(a){if(a.data.byteLength===8){var R=new Uint8Array(a.data),D=R[3]&1,c=(R[4]<<23)+(R[5]<<15)+(R[6]<<7)+R[7];return c/=45,D&&(c+=4772185884e-2),Math.round(c)}return},n=function(a,R){R===void 0&&(R=!1);var D=w();if(D){var c=D.decode(a);if(R){var b=c.indexOf("\0");return b!==-1?c.substring(0,b):c}return c.replace(/\0/g,"")}for(var E=a.length,C,F,j,k="",X=0;X<E;){if(C=a[X++],C===0&&R)return k;if(C===0||C===3)continue;switch(C>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:k+=String.fromCharCode(C);break;case 12:case 13:F=a[X++],k+=String.fromCharCode((C&31)<<6|F&63);break;case 14:F=a[X++],j=a[X++],k+=String.fromCharCode((C&15)<<12|(F&63)<<6|(j&63)<<0);break;default:}}return k},s={decodeTextFrame:x},u;function w(){return!u&&typeof self.TextDecoder!="undefined"&&(u=new self.TextDecoder("utf-8")),u}},"./src/demux/mp3demuxer.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/demux/base-audio-demuxer.ts"),S=T("./src/demux/id3.ts"),g=T("./src/utils/logger.ts"),_=T("./src/demux/mpegaudio.ts");function d(r,h){r.prototype=Object.create(h.prototype),r.prototype.constructor=r,o(r,h)}function o(r,h){return o=Object.setPrototypeOf||function(f,x){return f.__proto__=x,f},o(r,h)}var i=function(r){d(h,r);function h(){return r.apply(this,arguments)||this}var p=h.prototype;return p.resetInitSegment=function(x,v,l){r.prototype.resetInitSegment.call(this,x,v,l),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:x,duration:l,inputTimeScale:9e4,dropped:0}},h.probe=function(x){if(!x)return!1;for(var v=S.getID3Data(x,0)||[],l=v.length,n=x.length;l<n;l++)if(_.probe(x,l))return g.logger.log("MPEG Audio sync word found !"),!0;return!1},p.canParse=function(x,v){return _.canParse(x,v)},p.appendFrame=function(x,v,l){return this.initPTS===null?void 0:_.appendFrame(x,v,l,this.initPTS,this.frameIndex)},h}(L.default);i.minProbeByteLength=4,m.default=i},"./src/demux/mp4demuxer.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/utils/mp4-tools.ts"),S=T("./src/demux/dummy-demuxed-track.ts"),g=function(){function _(o,i){this.remainderData=null,this.config=void 0,this.config=i}var d=_.prototype;return d.resetTimeStamp=function(){},d.resetInitSegment=function(){},d.resetContiguity=function(){},_.probe=function(i){return Object(L.findBox)({data:i,start:0,end:Math.min(i.length,16384)},["moof"]).length>0},d.demux=function(i){var r=i,h=Object(S.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(L.appendUint8Array)(this.remainderData,i));var p=Object(L.segmentValidRange)(r);this.remainderData=p.remainder,h.samples=p.valid||new Uint8Array}else h.samples=r;return{audioTrack:Object(S.dummyTrack)(),avcTrack:h,id3Track:Object(S.dummyTrack)(),textTrack:Object(S.dummyTrack)()}},d.flush=function(){var i=Object(S.dummyTrack)();return i.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(S.dummyTrack)(),avcTrack:i,id3Track:Object(S.dummyTrack)(),textTrack:Object(S.dummyTrack)()}},d.demuxSampleAes=function(i,r,h){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},d.destroy=function(){},_}();g.minProbeByteLength=1024,m.default=g},"./src/demux/mpegaudio.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"appendFrame",function(){return o}),T.d(m,"parseHeader",function(){return i}),T.d(m,"isHeaderPattern",function(){return r}),T.d(m,"isHeader",function(){return h}),T.d(m,"canParse",function(){return p}),T.d(m,"probe",function(){return f});var L=null,S=[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],g=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],_=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],d=[0,1,1,4];function o(x,v,l,n,s){if(l+24>v.length)return;var u=i(v,l);if(u&&l+u.frameLength<=v.length){var w=u.samplesPerFrame*9e4/u.sampleRate,y=n+s*w,a={unit:v.subarray(l,l+u.frameLength),pts:y,dts:y};return x.config=[],x.channelCount=u.channelCount,x.samplerate=u.sampleRate,x.samples.push(a),{sample:a,length:u.frameLength,missing:0}}}function i(x,v){var l=x[v+1]>>3&3,n=x[v+1]>>1&3,s=x[v+2]>>4&15,u=x[v+2]>>2&3;if(l!==1&&s!==0&&s!==15&&u!==3){var w=x[v+2]>>1&1,y=x[v+3]>>6,a=l===3?3-n:n===3?3:4,R=S[a*14+s-1]*1e3,D=l===3?0:l===2?1:2,c=g[D*3+u],b=y===3?1:2,E=_[l][n],C=d[n],F=E*8*C,j=Math.floor(E*R/c+w)*C;if(L===null){var k=navigator.userAgent||"",X=k.match(/Chrome\/(\d+)/i);L=X?parseInt(X[1]):0}var G=!!L&&L<=87;return G&&n===2&&R>=224e3&&y===0&&(x[v+3]=x[v+3]|128),{sampleRate:c,channelCount:b,frameLength:j,samplesPerFrame:F}}}function r(x,v){return x[v]===255&&(x[v+1]&224)===224&&(x[v+1]&6)!==0}function h(x,v){return v+1<x.length&&r(x,v)}function p(x,v){var l=4;return r(x,v)&&l<=x.length-v}function f(x,v){if(v+1<x.length&&r(x,v)){var l=4,n=i(x,v),s=l;n!=null&&n.frameLength&&(s=n.frameLength);var u=v+s;return u===x.length||h(x,u)}return!1}},"./src/demux/sample-aes.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/crypt/decrypter.ts"),S=T("./src/demux/tsdemuxer.ts"),g=function(){function _(o,i,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new L.default(o,i,{removePKCS7Padding:!1})}var d=_.prototype;return d.decryptBuffer=function(i,r){this.decrypter.decrypt(i,this.keyData.key.buffer,this.keyData.iv.buffer,r)},d.decryptAacSample=function(i,r,h,p){var f=i[r].unit,x=f.subarray(16,f.length-f.length%16),v=x.buffer.slice(x.byteOffset,x.byteOffset+x.length),l=this;this.decryptBuffer(v,function(n){var s=new Uint8Array(n);f.set(s,16),p||l.decryptAacSamples(i,r+1,h)})},d.decryptAacSamples=function(i,r,h){for(;;r++){if(r>=i.length){h();return}if(i[r].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(i,r,h,p),!p)return}},d.getAvcEncryptedData=function(i){for(var r=Math.floor((i.length-48)/160)*16+16,h=new Int8Array(r),p=0,f=32;f<=i.length-16;f+=160,p+=16)h.set(i.subarray(f,f+16),p);return h},d.getAvcDecryptedUnit=function(i,r){for(var h=new Uint8Array(r),p=0,f=32;f<=i.length-16;f+=160,p+=16)i.set(h.subarray(p,p+16),f);return i},d.decryptAvcSample=function(i,r,h,p,f,x){var v=Object(S.discardEPB)(f.data),l=this.getAvcEncryptedData(v),n=this;this.decryptBuffer(l.buffer,function(s){f.data=n.getAvcDecryptedUnit(v,s),x||n.decryptAvcSamples(i,r,h+1,p)})},d.decryptAvcSamples=function(i,r,h,p){if(i instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,h=0){if(r>=i.length){p();return}for(var f=i[r].units;!(h>=f.length);h++){var x=f[h];if(x.data.length<=48||x.type!==1&&x.type!==5)continue;var v=this.decrypter.isSync();if(this.decryptAvcSample(i,r,h,p,x,v),!v)return}}},_}();m.default=g},"./src/demux/transmuxer-interface.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return f});var L=T("./node_modules/webworkify-webpack/index.js"),S=T.n(L),g=T("./src/events.ts"),_=T("./src/demux/transmuxer.ts"),d=T("./src/utils/logger.ts"),o=T("./src/errors.ts"),i=T("./src/utils/mediasource-helper.ts"),r=T("./node_modules/eventemitter3/index.js"),h=T.n(r),p=Object(i.getMediaSource)()||{isTypeSupported:function(){return!1}},f=function(){function x(l,n,s,u){var w=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=l,this.id=n,this.onTransmuxComplete=s,this.onFlush=u;var y=l.config,a=function(E,C){C=C||{},C.frag=w.frag,C.id=w.id,l.trigger(E,C)};this.observer=new r.EventEmitter,this.observer.on(g.Events.FRAG_DECRYPTED,a),this.observer.on(g.Events.ERROR,a);var R={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},D=navigator.vendor;if(y.enableWorker&&typeof Worker!="undefined"){d.logger.log("demuxing in webworker");var c;try{c=this.worker=L("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),c.addEventListener("message",this.onwmsg),c.onerror=function(b){l.trigger(g.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(b.message+" ("+b.filename+":"+b.lineno+")")})},c.postMessage({cmd:"init",typeSupported:R,vendor:D,id:n,config:JSON.stringify(y)})}catch(b){d.logger.warn("Error in worker:",b),d.logger.error("Error while initializing DemuxerWorker, fallback to inline"),c&&self.URL.revokeObjectURL(c.objectURL),this.transmuxer=new _.default(this.observer,R,y,D,n),this.worker=null}}else this.transmuxer=new _.default(this.observer,R,y,D,n)}var v=x.prototype;return v.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var u=this.observer;u&&u.removeAllListeners(),this.observer=null},v.push=function(n,s,u,w,y,a,R,D,c,b){var E=this;c.transmuxing.start=self.performance.now();var C=this.transmuxer,F=this.worker,j=a?a.start:y.start,k=y.decryptdata,X=this.frag,G=!(X&&y.cc===X.cc),H=!(X&&c.level===X.level),K=X?c.sn-X.sn:-1,B=this.part?c.part-this.part.index:1,U=!H&&(K===1||K===0&&B===1),W=self.performance.now();(H||K||y.stats.parsing.start===0)&&(y.stats.parsing.start=W),a&&(B||!U)&&(a.stats.parsing.start=W);var Q=new _.TransmuxState(G,U,D,H,j);if(!U||G){d.logger.log("[transmuxer-interface, "+y.type+"]: Starting new transmux session for sn: "+c.sn+" p: "+c.part+" level: "+c.level+" id: "+c.id+`
discontinuity: `+G+`
trackSwitch: `+H+`
contiguous: `+U+`
accurateTimeOffset: `+D+`
timeOffset: `+j);var ie=new _.TransmuxConfig(u,w,s,R,b);this.configureTransmuxer(ie)}if(this.frag=y,this.part=a,F)F.postMessage({cmd:"demux",data:n,decryptdata:k,chunkMeta:c,state:Q},n instanceof ArrayBuffer?[n]:[]);else if(C){var ce=C.push(n,k,c,Q);Object(_.isPromise)(ce)?ce.then(function(he){E.handleTransmuxComplete(he)}):this.handleTransmuxComplete(ce)}},v.flush=function(n){var s=this;n.transmuxing.start=self.performance.now();var u=this.transmuxer,w=this.worker;if(w)w.postMessage({cmd:"flush",chunkMeta:n});else if(u){var y=u.flush(n);Object(_.isPromise)(y)?y.then(function(a){s.handleFlushResult(a,n)}):this.handleFlushResult(y,n)}},v.handleFlushResult=function(n,s){var u=this;n.forEach(function(w){u.handleTransmuxComplete(w)}),this.onFlush(s)},v.onWorkerMessage=function(n){var s=n.data,u=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,u.trigger(s.event,s.data);break}}},v.configureTransmuxer=function(n){var s=this.worker,u=this.transmuxer;s?s.postMessage({cmd:"configure",config:n}):u&&u.configure(n)},v.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},x}()},"./src/demux/transmuxer-worker.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return o});var L=T("./src/demux/transmuxer.ts"),S=T("./src/events.ts"),g=T("./src/utils/logger.ts"),_=T("./node_modules/eventemitter3/index.js"),d=T.n(_);function o(f){var x=new _.EventEmitter,v=function(n,s){f.postMessage({event:n,data:s})};x.on(S.Events.FRAG_DECRYPTED,v),x.on(S.Events.ERROR,v),f.addEventListener("message",function(l){var n=l.data;switch(n.cmd){case"init":{var s=JSON.parse(n.config);f.transmuxer=new L.default(x,n.typeSupported,s,n.vendor,n.id),Object(g.enableLogs)(s.debug),v("init",null);break}case"configure":{f.transmuxer.configure(n.config);break}case"demux":{var u=f.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(L.isPromise)(u)?u.then(function(a){i(f,a)}):i(f,u);break}case"flush":{var w=n.chunkMeta,y=f.transmuxer.flush(w);Object(L.isPromise)(y)?y.then(function(a){h(f,a,w)}):h(f,y,w);break}default:break}})}function i(f,x){if(p(x.remuxResult))return;var v=[],l=x.remuxResult,n=l.audio,s=l.video;n&&r(v,n),s&&r(v,s),f.postMessage({event:"transmuxComplete",data:x},v)}function r(f,x){x.data1&&f.push(x.data1.buffer),x.data2&&f.push(x.data2.buffer)}function h(f,x,v){x.forEach(function(l){i(f,l)}),f.postMessage({event:"flush",data:v})}function p(f){return!f.audio&&!f.video&&!f.text&&!f.id3&&!f.initSegment}},"./src/demux/transmuxer.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return s}),T.d(m,"isPromise",function(){return y}),T.d(m,"TransmuxConfig",function(){return a}),T.d(m,"TransmuxState",function(){return R});var L=T("./src/events.ts"),S=T("./src/errors.ts"),g=T("./src/crypt/decrypter.ts"),_=T("./src/demux/aacdemuxer.ts"),d=T("./src/demux/mp4demuxer.ts"),o=T("./src/demux/tsdemuxer.ts"),i=T("./src/demux/mp3demuxer.ts"),r=T("./src/remux/mp4-remuxer.ts"),h=T("./src/remux/passthrough-remuxer.ts"),p=T("./src/demux/chunk-cache.ts"),f=T("./src/utils/mp4-tools.ts"),x=T("./src/utils/logger.ts"),v;try{v=self.performance.now.bind(self.performance)}catch(D){x.logger.debug("Unable to use Performance API on this environment"),v=self.Date.now}var l=[{demux:o.default,remux:r.default},{demux:d.default,remux:h.default},{demux:_.default,remux:r.default},{demux:i.default,remux:r.default}],n=1024;l.forEach(function(D){var c=D.demux;n=Math.max(n,c.minProbeByteLength)});var s=function(){function D(b,E,C,F,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 p.default,this.observer=b,this.typeSupported=E,this.config=C,this.vendor=F,this.id=j}var c=D.prototype;return c.configure=function(E){this.transmuxConfig=E,this.decrypter&&this.decrypter.reset()},c.push=function(E,C,F,j){var k=this,X=F.transmuxing;X.executeStart=v();var G=new Uint8Array(E),H=this.cache,K=this.config,B=this.currentTransmuxState,U=this.transmuxConfig;j&&(this.currentTransmuxState=j);var W=u(G,C);if(W&&W.method==="AES-128"){var Q=this.getDecrypter();if(K.enableSoftwareAES){var ie=Q.softwareDecrypt(G,W.key.buffer,W.iv.buffer);if(!ie)return X.executeEnd=v(),w(F);G=new Uint8Array(ie)}else return this.decryptionPromise=Q.webCryptoDecrypt(G,W.key.buffer,W.iv.buffer).then(function(Y){var z=k.push(Y,null,F);return k.decryptionPromise=null,z}),this.decryptionPromise}var ce=j||B,he=ce.contiguous,be=ce.discontinuity,ne=ce.trackSwitch,le=ce.accurateTimeOffset,ue=ce.timeOffset,re=U.audioCodec,oe=U.videoCodec,q=U.defaultInitPts,se=U.duration,J=U.initSegmentData;if((be||ne)&&this.resetInitSegment(J,re,oe,se),be&&this.resetInitialTimestamp(q),he||this.resetContiguity(),this.needsProbing(G,be,ne)){if(H.dataLength){var ee=H.flush();G=Object(f.appendUint8Array)(ee,G)}this.configureTransmuxer(G,U)}var ge=this.transmux(G,W,ue,le,F),te=this.currentTransmuxState;return te.contiguous=!0,te.discontinuity=!1,te.trackSwitch=!1,X.executeEnd=v(),ge},c.flush=function(E){var C=this,F=E.transmuxing;F.executeStart=v();var j=this.decrypter,k=this.cache,X=this.currentTransmuxState,G=this.decryptionPromise;if(G)return G.then(function(){return C.flush(E)});var H=[],K=X.timeOffset;if(j){var B=j.flush();B&&H.push(this.push(B,null,E))}var U=k.dataLength;k.reset();var W=this.demuxer,Q=this.remuxer;if(!W||!Q)return U>=n&&this.observer.emit(L.Events.ERROR,L.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),F.executeEnd=v(),[w(E)];var ie=W.flush(K);return y(ie)?ie.then(function(ce){return C.flushRemux(H,ce,E),H}):(this.flushRemux(H,ie,E),H)},c.flushRemux=function(E,C,F){var j=C.audioTrack,k=C.avcTrack,X=C.id3Track,G=C.textTrack,H=this.currentTransmuxState,K=H.accurateTimeOffset,B=H.timeOffset;x.logger.log("[transmuxer.ts]: Flushed fragment "+F.sn+(F.part>-1?" p: "+F.part:"")+" of level "+F.level);var U=this.remuxer.remux(j,k,X,G,B,K,!0,this.id);E.push({remuxResult:U,chunkMeta:F}),F.transmuxing.executeEnd=v()},c.resetInitialTimestamp=function(E){var C=this.demuxer,F=this.remuxer;if(!C||!F)return;C.resetTimeStamp(E),F.resetTimeStamp(E)},c.resetContiguity=function(){var E=this.demuxer,C=this.remuxer;if(!E||!C)return;E.resetContiguity(),C.resetNextTimestamp()},c.resetInitSegment=function(E,C,F,j){var k=this.demuxer,X=this.remuxer;if(!k||!X)return;k.resetInitSegment(C,F,j),X.resetInitSegment(E,C,F)},c.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},c.transmux=function(E,C,F,j,k){var X;return C&&C.method==="SAMPLE-AES"?X=this.transmuxSampleAes(E,C,F,j,k):X=this.transmuxUnencrypted(E,F,j,k),X},c.transmuxUnencrypted=function(E,C,F,j){var k=this.demuxer.demux(E,C,!1,!this.config.progressive),X=k.audioTrack,G=k.avcTrack,H=k.id3Track,K=k.textTrack,B=this.remuxer.remux(X,G,H,K,C,F,!1,this.id);return{remuxResult:B,chunkMeta:j}},c.transmuxSampleAes=function(E,C,F,j,k){var X=this;return this.demuxer.demuxSampleAes(E,C,F).then(function(G){var H=X.remuxer.remux(G.audioTrack,G.avcTrack,G.id3Track,G.textTrack,F,j,!1,X.id);return{remuxResult:H,chunkMeta:k}})},c.configureTransmuxer=function(E,C){for(var F=this.config,j=this.observer,k=this.typeSupported,X=this.vendor,G=C.audioCodec,H=C.defaultInitPts,K=C.duration,B=C.initSegmentData,U=C.videoCodec,W,Q=0,ie=l.length;Q<ie;Q++)if(l[Q].demux.probe(E)){W=l[Q];break}W||(x.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),W={demux:d.default,remux:h.default});var ce=this.demuxer,he=this.remuxer,be=W.remux,ne=W.demux;(!he||!(he instanceof be))&&(this.remuxer=new be(j,F,k,X)),(!ce||!(ce instanceof ne))&&(this.demuxer=new ne(j,F,k),this.probe=ne.probe),this.resetInitSegment(B,G,U,K),this.resetInitialTimestamp(H)},c.needsProbing=function(E,C,F){return!this.demuxer||!this.remuxer||C||F},c.getDecrypter=function(){var E=this.decrypter;return E||(E=this.decrypter=new g.default(this.observer,this.config)),E},D}();function u(D,c){var b=null;return D.byteLength>0&&c!=null&&c.key!=null&&c.iv!==null&&c.method!=null&&(b=c),b}var w=function(c){return{remuxResult:{},chunkMeta:c}};function y(D){return"then"in D&&D.then instanceof Function}var a=function(c,b,E,C,F){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=c,this.videoCodec=b,this.initSegmentData=E,this.duration=C,this.defaultInitPts=F},R=function(c,b,E,C,F){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=c,this.contiguous=b,this.accurateTimeOffset=E,this.trackSwitch=C,this.timeOffset=F}},"./src/demux/tsdemuxer.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"discardEPB",function(){return w});var L=T("./src/demux/adts.ts"),S=T("./src/demux/mpegaudio.ts"),g=T("./src/demux/exp-golomb.ts"),_=T("./src/demux/id3.ts"),d=T("./src/demux/sample-aes.ts"),o=T("./src/events.ts"),i=T("./src/utils/mp4-tools.ts"),r=T("./src/utils/logger.ts"),h=T("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},f=function(){function y(R,D,c){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=R,this.config=D,this.typeSupported=c}y.probe=function(D){var c=y.syncOffset(D);return c<0?!1:(c&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+c+", junk ahead ?"),!0)},y.syncOffset=function(D){for(var c=Math.min(1e3,D.length-3*188),b=0;b<c;){if(D[b]===71&&D[b+188]===71&&D[b+2*188]===71)return b;b++}return-1},y.createTrack=function(D,c){return{container:D==="video"||D==="audio"?"video/mp2t":void 0,type:D,id:p[D],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:D==="audio"?c:void 0}};var a=y.prototype;return a.resetInitSegment=function(D,c,b){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=y.createTrack("video",b),this._audioTrack=y.createTrack("audio",b),this._id3Track=y.createTrack("id3",b),this._txtTrack=y.createTrack("text",b),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=D,this.videoCodec=c,this._duration=b},a.resetTimeStamp=function(){},a.resetContiguity=function(){var D=this._audioTrack,c=this._avcTrack,b=this._id3Track;D&&(D.pesData=null),c&&(c.pesData=null),b&&(b.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},a.demux=function(D,c,b,E){b===void 0&&(b=!1),E===void 0&&(E=!1),b||(this.sampleAes=null);var C,F=this._avcTrack,j=this._audioTrack,k=this._id3Track,X=F.pid,G=F.pesData,H=j.pid,K=k.pid,B=j.pesData,U=k.pesData,W=!1,Q=this.pmtParsed,ie=this._pmtId,ce=D.length;if(this.remainderData&&(D=Object(i.appendUint8Array)(this.remainderData,D),ce=D.length,this.remainderData=null),ce<188&&!E)return this.remainderData=D,{audioTrack:j,avcTrack:F,id3Track:k,textTrack:this._txtTrack};var he=Math.max(0,y.syncOffset(D));ce-=(ce+he)%188,ce<D.byteLength&&!E&&(this.remainderData=new Uint8Array(D.buffer,ce,D.buffer.byteLength-ce));for(var be=he;be<ce;be+=188)if(D[be]===71){var ne=!!(D[be+1]&64),le=((D[be+1]&31)<<8)+D[be+2],ue=(D[be+3]&48)>>4,re=void 0;if(ue>1){if(re=be+5+D[be+4],re===be+188)continue}else re=be+4;switch(le){case X:ne&&(G&&(C=n(G))&&this.parseAVCPES(C,!1),G={data:[],size:0}),G&&(G.data.push(D.subarray(re,be+188)),G.size+=be+188-re);break;case H:ne&&(B&&(C=n(B))&&(j.isAAC?this.parseAACPES(C):this.parseMPEGPES(C)),B={data:[],size:0}),B&&(B.data.push(D.subarray(re,be+188)),B.size+=be+188-re);break;case K:ne&&(U&&(C=n(U))&&this.parseID3PES(C),U={data:[],size:0}),U&&(U.data.push(D.subarray(re,be+188)),U.size+=be+188-re);break;case 0:ne&&(re+=D[re]+1),ie=this._pmtId=v(D,re);break;case ie:{ne&&(re+=D[re]+1);var oe=l(D,re,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,b);X=oe.avc,X>0&&(F.pid=X),H=oe.audio,H>0&&(j.pid=H,j.isAAC=oe.isAAC),K=oe.id3,K>0&&(k.pid=K),W&&!Q&&(r.logger.log("reparse from beginning"),W=!1,be=he-188),Q=this.pmtParsed=!0;break}case 17:case 8191:break;default:W=!0;break}}else this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});F.pesData=G,j.pesData=B,k.pesData=U;var q={audioTrack:j,avcTrack:F,id3Track:k,textTrack:this._txtTrack};return E&&this.extractRemainingSamples(q),q},a.flush=function(){var D=this.remainderData;this.remainderData=null;var c;return D?c=this.demux(D,-1,!1,!0):c={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(c),this.sampleAes?this.decrypt(c,this.sampleAes):c},a.extractRemainingSamples=function(D){var c=D.audioTrack,b=D.avcTrack,E=D.id3Track,C=b.pesData,F=c.pesData,j=E.pesData,k;C&&(k=n(C))?(this.parseAVCPES(k,!0),b.pesData=null):b.pesData=C,F&&(k=n(F))?(c.isAAC?this.parseAACPES(k):this.parseMPEGPES(k),c.pesData=null):(F!=null&&F.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),c.pesData=F),j&&(k=n(j))?(this.parseID3PES(k),E.pesData=null):E.pesData=j},a.demuxSampleAes=function(D,c,b){var E=this.demux(D,b,!0,!this.config.progressive),C=this.sampleAes=new d.default(this.observer,this.config,c);return this.decrypt(E,C)},a.decrypt=function(D,c){return new Promise(function(b){var E=D.audioTrack,C=D.avcTrack;E.samples&&E.isAAC?c.decryptAacSamples(E.samples,0,function(){C.samples?c.decryptAvcSamples(C.samples,0,0,function(){b(D)}):b(D)}):C.samples&&c.decryptAvcSamples(C.samples,0,0,function(){b(D)})})},a.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},a.parseAVCPES=function(D,c){var b=this,E=this._avcTrack,C=this.parseAVCNALu(D.data),F=!1,j=this.avcSample,k,X=!1;D.data=null,j&&C.length&&!E.audFound&&(s(j,E),j=this.avcSample=x(!1,D.pts,D.dts,"")),C.forEach(function(G){switch(G.type){case 1:{k=!0,j||(j=b.avcSample=x(!0,D.pts,D.dts,"")),F&&(j.debug+="NDR "),j.frame=!0;var H=G.data;if(X&&H.length>4){var K=new g.default(H).readSliceType();(K===2||K===4||K===7||K===9)&&(j.key=!0)}break}case 5:k=!0,j||(j=b.avcSample=x(!0,D.pts,D.dts,"")),F&&(j.debug+="IDR "),j.key=!0,j.frame=!0;break;case 6:{k=!0,F&&j&&(j.debug+="SEI ");var B=new g.default(w(G.data));B.readUByte();for(var U=0,W=0,Q=!1,ie=0;!Q&&B.bytesAvailable>1;){U=0;do ie=B.readUByte(),U+=ie;while(ie===255);W=0;do ie=B.readUByte(),W+=ie;while(ie===255);if(U===4&&B.bytesAvailable!==0){Q=!0;var ce=B.readUByte();if(ce===181){var he=B.readUShort();if(he===49){var be=B.readUInt();if(be===1195456820){var ne=B.readUByte();if(ne===3){for(var le=B.readUByte(),ue=B.readUByte(),re=31&le,oe=[le,ue],q=0;q<re;q++)oe.push(B.readUByte()),oe.push(B.readUByte()),oe.push(B.readUByte());u(b._txtTrack.samples,{type:3,pts:D.pts,bytes:oe})}}}}}else if(U===5&&B.bytesAvailable!==0){if(Q=!0,W>16){for(var se=[],J=0;J<16;J++)se.push(B.readUByte().toString(16)),(J===3||J===5||J===7||J===9)&&se.push("-");for(var ee=W-16,ge=new Uint8Array(ee),te=0;te<ee;te++)ge[te]=B.readUByte();u(b._txtTrack.samples,{pts:D.pts,payloadType:U,uuid:se.join(""),userData:Object(_.utf8ArrayToStr)(ge),userDataBytes:ge})}}else if(W<B.bytesAvailable)for(var Y=0;Y<W;Y++)B.readUByte()}break}case 7:if(k=!0,X=!0,F&&j&&(j.debug+="SPS "),!E.sps){var z=new g.default(G.data),$=z.readSPS();E.width=$.width,E.height=$.height,E.pixelRatio=$.pixelRatio,E.sps=[G.data],E.duration=b._duration;for(var me=G.data.subarray(1,4),pe="avc1.",xe=0;xe<3;xe++){var Re=me[xe].toString(16);Re.length<2&&(Re="0"+Re),pe+=Re}E.codec=pe}break;case 8:k=!0,F&&j&&(j.debug+="PPS "),E.pps||(E.pps=[G.data]);break;case 9:k=!1,E.audFound=!0,j&&s(j,E),j=b.avcSample=x(!1,D.pts,D.dts,F?"AUD ":"");break;case 12:k=!1;break;default:k=!1,j&&(j.debug+="unknown NAL "+G.type+" ");break}if(j&&k){var ke=j.units;ke.push(G)}}),c&&j&&(s(j,E),this.avcSample=null)},a.getLastNalUnit=function(){var D,c=this.avcSample,b;if(!c||c.units.length===0){var E=this._avcTrack.samples;c=E[E.length-1]}if((D=c)!==null&&D!==void 0&&D.units){var C=c.units;b=C[C.length-1]}return b},a.parseAVCNALu=function(D){var c=D.byteLength,b=this._avcTrack,E=b.naluState||0,C=E,F=[],j=0,k,X,G,H=-1,K=0;for(E===-1&&(H=0,K=D[0]&31,E=0,j=1);j<c;){if(k=D[j++],!E){E=k?0:1;continue}if(E===1){E=k?0:2;continue}if(!k)E=3;else if(k===1){if(H>=0){var B={data:D.subarray(H,j-E-1),type:K};F.push(B)}else{var U=this.getLastNalUnit();if(U&&(C&&j<=4-C&&(U.state&&(U.data=U.data.subarray(0,U.data.byteLength-C))),X=j-E-1,X>0)){var W=new Uint8Array(U.data.byteLength+X);W.set(U.data,0),W.set(D.subarray(0,X),U.data.byteLength),U.data=W,U.state=0}}j<c?(G=D[j]&31,H=j,K=G,E=0):E=-1}else E=0}if(H>=0&&E>=0){var Q={data:D.subarray(H,c),type:K,state:E};F.push(Q)}if(F.length===0){var ie=this.getLastNalUnit();if(ie){var ce=new Uint8Array(ie.data.byteLength+D.byteLength);ce.set(ie.data,0),ce.set(D,ie.data.byteLength),ie.data=ce}}return b.naluState=E,F},a.parseAACPES=function(D){var c=0,b=this._audioTrack,E=this.aacOverFlow,C=D.data;if(E){this.aacOverFlow=null;var F=E.sample.unit.byteLength,j=Math.min(E.missing,F),k=F-j;E.sample.unit.set(C.subarray(0,j),k),b.samples.push(E.sample),c=E.missing}var X,G;for(X=c,G=C.length;X<G-1&&!L.isHeader(C,X);X++);if(X!==c){var H,K;if(X<G-1?(H="AAC PES did not start with ADTS header,offset:"+X,K=!1):(H="no ADTS header found in AAC PES",K=!0),r.logger.warn("parsing error:"+H),this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:K,reason:H}),K)return}L.initTrackConfig(b,this.observer,C,X,this.audioCodec);var B;if(D.pts!==void 0)B=D.pts;else if(E){var U=L.getFrameDuration(b.samplerate);B=E.sample.pts+U}else{r.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var W=0;X<G;)if(L.isHeader(C,X)){if(X+5<G){var Q=L.appendFrame(b,C,X,B,W);if(Q)if(Q.missing)this.aacOverFlow=Q;else{X+=Q.length,W++;continue}}break}else X++},a.parseMPEGPES=function(D){var c=D.data,b=c.length,E=0,C=0,F=D.pts;if(F===void 0){r.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;C<b;)if(S.isHeader(c,C)){var j=S.appendFrame(this._audioTrack,c,C,F,E);if(j)C+=j.length,E++;else break}else C++},a.parseID3PES=function(D){if(D.pts===void 0){r.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(D)},y}();f.minProbeByteLength=188;function x(y,a,R,D){return{key:y,frame:!1,pts:a,dts:R,units:[],debug:D,length:0}}function v(y,a){return(y[a+10]&31)<<8|y[a+11]}function l(y,a,R,D){var c={audio:-1,avc:-1,id3:-1,isAAC:!0},b=(y[a+1]&15)<<8|y[a+2],E=a+3+b-4,C=(y[a+10]&15)<<8|y[a+11];for(a+=12+C;a<E;){var F=(y[a+1]&31)<<8|y[a+2];switch(y[a]){case 207:if(!D){r.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:c.audio===-1&&(c.audio=F);break;case 21:c.id3===-1&&(c.id3=F);break;case 219:if(!D){r.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:c.avc===-1&&(c.avc=F);break;case 3:case 4:R?c.audio===-1&&(c.audio=F,c.isAAC=!1):r.logger.log("MPEG audio found, not supported in this browser");break;case 36:r.logger.warn("Unsupported HEVC stream type found");break;default:break}a+=((y[a+3]&15)<<8|y[a+4])+5}return c}function n(y){var a=0,R,D,c,b,E,C=y.data;if(!y||y.size===0)return null;for(;C[0].length<19&&C.length>1;){var F=new Uint8Array(C[0].length+C[1].length);F.set(C[0]),F.set(C[1],C[0].length),C[0]=F,C.splice(1,1)}R=C[0];var j=(R[0]<<16)+(R[1]<<8)+R[2];if(j===1){if(D=(R[4]<<8)+R[5],D&&D>y.size-6)return null;var k=R[7];k&192&&(b=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,k&64?(E=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,b-E>60*9e4&&(r.logger.warn(Math.round((b-E)/9e4)+"s delta between PTS and DTS, align them"),b=E)):E=b),c=R[8];var X=c+9;if(y.size<=X)return null;y.size-=X;for(var G=new Uint8Array(y.size),H=0,K=C.length;H<K;H++){R=C[H];var B=R.byteLength;if(X)if(X>B){X-=B;continue}else R=R.subarray(X),B-=X,X=0;G.set(R,a),a+=B}return D&&(D-=c+3),{data:G,pts:b,dts:E,len:D}}return null}function s(y,a){if(y.units.length&&y.frame){if(y.pts===void 0){var R=a.samples,D=R.length;if(D){var c=R[D-1];y.pts=c.pts,y.dts=c.dts}else{a.dropped++;return}}a.samples.push(y)}y.debug.length&&r.logger.log(y.pts+"/"+y.dts+":"+y.debug)}function u(y,a){var R=y.length;if(R>0){if(a.pts>=y[R-1].pts)y.push(a);else for(var D=R-1;D>=0;D--)if(a.pts<y[D].pts){y.splice(D,0,a);break}}else y.push(a)}function w(y){for(var a=y.byteLength,R=[],D=1;D<a-2;)y[D]===0&&y[D+1]===0&&y[D+2]===3?(R.push(D+2),D+=2):D++;if(R.length===0)return y;var c=a-R.length,b=new Uint8Array(c),E=0;for(D=0;D<c;E++,D++)E===R[0]&&(E++,R.shift()),b[D]=y[E];return b}m.default=f},"./src/errors.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"ErrorTypes",function(){return L}),T.d(m,"ErrorDetails",function(){return S});var L;(function(g){g.NETWORK_ERROR="networkError",g.MEDIA_ERROR="mediaError",g.KEY_SYSTEM_ERROR="keySystemError",g.MUX_ERROR="muxError",g.OTHER_ERROR="otherError"})(L||(L={}));var S;(function(g){g.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",g.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",g.KEY_SYSTEM_NO_SESSION="keySystemNoSession",g.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",g.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",g.MANIFEST_LOAD_ERROR="manifestLoadError",g.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",g.MANIFEST_PARSING_ERROR="manifestParsingError",g.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",g.LEVEL_EMPTY_ERROR="levelEmptyError",g.LEVEL_LOAD_ERROR="levelLoadError",g.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",g.LEVEL_SWITCH_ERROR="levelSwitchError",g.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",g.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",g.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",g.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",g.FRAG_LOAD_ERROR="fragLoadError",g.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",g.FRAG_DECRYPT_ERROR="fragDecryptError",g.FRAG_PARSING_ERROR="fragParsingError",g.REMUX_ALLOC_ERROR="remuxAllocError",g.KEY_LOAD_ERROR="keyLoadError",g.KEY_LOAD_TIMEOUT="keyLoadTimeOut",g.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",g.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",g.BUFFER_APPEND_ERROR="bufferAppendError",g.BUFFER_APPENDING_ERROR="bufferAppendingError",g.BUFFER_STALLED_ERROR="bufferStalledError",g.BUFFER_FULL_ERROR="bufferFullError",g.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",g.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",g.INTERNAL_EXCEPTION="internalException",g.INTERNAL_ABORTED="aborted",g.UNKNOWN="unknown"})(S||(S={}))},"./src/events.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"Events",function(){return L});var L;(function(S){S.MEDIA_ATTACHING="hlsMediaAttaching",S.MEDIA_ATTACHED="hlsMediaAttached",S.MEDIA_DETACHING="hlsMediaDetaching",S.MEDIA_DETACHED="hlsMediaDetached",S.BUFFER_RESET="hlsBufferReset",S.BUFFER_CODECS="hlsBufferCodecs",S.BUFFER_CREATED="hlsBufferCreated",S.BUFFER_APPENDING="hlsBufferAppending",S.BUFFER_APPENDED="hlsBufferAppended",S.BUFFER_EOS="hlsBufferEos",S.BUFFER_FLUSHING="hlsBufferFlushing",S.BUFFER_FLUSHED="hlsBufferFlushed",S.MANIFEST_LOADING="hlsManifestLoading",S.MANIFEST_LOADED="hlsManifestLoaded",S.MANIFEST_PARSED="hlsManifestParsed",S.LEVEL_SWITCHING="hlsLevelSwitching",S.LEVEL_SWITCHED="hlsLevelSwitched",S.LEVEL_LOADING="hlsLevelLoading",S.LEVEL_LOADED="hlsLevelLoaded",S.LEVEL_UPDATED="hlsLevelUpdated",S.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",S.LEVELS_UPDATED="hlsLevelsUpdated",S.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",S.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",S.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",S.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",S.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",S.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",S.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",S.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",S.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",S.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",S.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",S.CUES_PARSED="hlsCuesParsed",S.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",S.INIT_PTS_FOUND="hlsInitPtsFound",S.FRAG_LOADING="hlsFragLoading",S.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",S.FRAG_LOADED="hlsFragLoaded",S.FRAG_DECRYPTED="hlsFragDecrypted",S.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",S.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",S.FRAG_PARSING_METADATA="hlsFragParsingMetadata",S.FRAG_PARSED="hlsFragParsed",S.FRAG_BUFFERED="hlsFragBuffered",S.FRAG_CHANGED="hlsFragChanged",S.FPS_DROP="hlsFpsDrop",S.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",S.ERROR="hlsError",S.DESTROYING="hlsDestroying",S.KEY_LOADING="hlsKeyLoading",S.KEY_LOADED="hlsKeyLoaded",S.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",S.BACK_BUFFER_REACHED="hlsBackBufferReached"})(L||(L={}))},"./src/hls.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return y});var L=T("./node_modules/url-toolkit/src/url-toolkit.js"),S=T.n(L),g=T("./src/loader/playlist-loader.ts"),_=T("./src/loader/key-loader.ts"),d=T("./src/controller/id3-track-controller.ts"),o=T("./src/controller/latency-controller.ts"),i=T("./src/controller/level-controller.ts"),r=T("./src/controller/fragment-tracker.ts"),h=T("./src/controller/stream-controller.ts"),p=T("./src/is-supported.ts"),f=T("./src/utils/logger.ts"),x=T("./src/config.ts"),v=T("./node_modules/eventemitter3/index.js"),l=T.n(v),n=T("./src/events.ts"),s=T("./src/errors.ts");function u(a,R){for(var D=0;D<R.length;D++){var c=R[D];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}}function w(a,R,D){return R&&u(a.prototype,R),D&&u(a,D),a}var y=function(){a.isSupported=function(){return Object(p.isSupported)()};function a(D){D===void 0&&(D={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new v.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 c=this.config=Object(x.mergeConfig)(a.DefaultConfig,D);this.userConfig=D,Object(f.enableLogs)(c.debug),this._autoLevelCapping=-1,c.progressive&&Object(x.enableStreamingMode)(c);var b=c.abrController,E=c.bufferController,C=c.capLevelController,F=c.fpsController,j=this.abrController=new b(this),k=this.bufferController=new E(this),X=this.capLevelController=new C(this),G=new F(this),H=new g.default(this),K=new _.default(this),B=new d.default(this),U=this.levelController=new i.default(this),W=new r.FragmentTracker(this),Q=this.streamController=new h.default(this,W);X.setStreamController(Q),G.setStreamController(Q);var ie=[U,Q];this.networkControllers=ie;var ce=[H,K,j,k,X,G,B,W];this.audioTrackController=this.createController(c.audioTrackController,null,ie),this.createController(c.audioStreamController,W,ie),this.subtitleTrackController=this.createController(c.subtitleTrackController,null,ie),this.createController(c.subtitleStreamController,W,ie),this.createController(c.timelineController,null,ce),this.emeController=this.createController(c.emeController,null,ce),this.cmcdController=this.createController(c.cmcdController,null,ce),this.latencyController=this.createController(o.default,null,ce),this.coreComponents=ce}var R=a.prototype;return R.createController=function(c,b,E){if(c){var C=b?new c(this,b):new c(this);return E&&E.push(C),C}return null},R.on=function(c,b,E){E===void 0&&(E=this),this._emitter.on(c,b,E)},R.once=function(c,b,E){E===void 0&&(E=this),this._emitter.once(c,b,E)},R.removeAllListeners=function(c){this._emitter.removeAllListeners(c)},R.off=function(c,b,E,C){E===void 0&&(E=this),this._emitter.off(c,b,E,C)},R.listeners=function(c){return this._emitter.listeners(c)},R.emit=function(c,b,E){return this._emitter.emit(c,b,E)},R.trigger=function(c,b){if(this.config.debug)return this.emit(c,c,b);try{return this.emit(c,c,b)}catch(E){f.logger.error("An internal error happened while handling event "+c+'. Error message: "'+E.message+'". Here is a stacktrace:',E),this.trigger(n.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:c,error:E})}return!1},R.listenerCount=function(c){return this._emitter.listenerCount(c)},R.destroy=function(){f.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(c){return c.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(c){return c.destroy()}),this.coreComponents.length=0},R.attachMedia=function(c){f.logger.log("attachMedia"),this._media=c,this.trigger(n.Events.MEDIA_ATTACHING,{media:c})},R.detachMedia=function(){f.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},R.loadSource=function(c){this.stopLoad();var b=this.media,E=this.url,C=this.url=L.buildAbsoluteURL(self.location.href,c,{alwaysNormalize:!0});f.logger.log("loadSource:"+C),b&&E&&E!==C&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(b)),this.trigger(n.Events.MANIFEST_LOADING,{url:c})},R.startLoad=function(c){c===void 0&&(c=-1),f.logger.log("startLoad("+c+")"),this.networkControllers.forEach(function(b){b.startLoad(c)})},R.stopLoad=function(){f.logger.log("stopLoad"),this.networkControllers.forEach(function(c){c.stopLoad()})},R.swapAudioCodec=function(){f.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},R.recoverMediaError=function(){f.logger.log("recoverMediaError");var c=this._media;this.detachMedia(),c&&this.attachMedia(c)},R.removeLevel=function(c,b){b===void 0&&(b=0),this.levelController.removeLevel(c,b)},w(a,[{key:"levels",get:function(){var c=this.levelController.levels;return c||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(c){f.logger.log("set currentLevel:"+c),this.loadLevel=c,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(c){f.logger.log("set nextLevel:"+c),this.levelController.manualLevel=c,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(c){f.logger.log("set loadLevel:"+c),this.levelController.manualLevel=c}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(c){this.levelController.nextLoadLevel=c}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(c){f.logger.log("set firstLevel:"+c),this.levelController.firstLevel=c}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(c){f.logger.log("set startLevel:"+c),c!==-1&&(c=Math.max(c,this.minAutoLevel)),this.levelController.startLevel=c}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(c){var b=!!c;b!==this.config.capLevelToPlayerSize&&(b?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=b)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(c){this._autoLevelCapping!==c&&(f.logger.log("set autoLevelCapping:"+c),this._autoLevelCapping=c)}},{key:"bandwidthEstimate",get:function(){var c=this.abrController.bwEstimator;return c?c.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var c=this.levels,b=this.config.minAutoBitrate;if(!c)return 0;for(var E=c.length,C=0;C<E;C++)if(c[C].maxBitrate>b)return C;return 0}},{key:"maxAutoLevel",get:function(){var c=this.levels,b=this.autoLevelCapping,E;return b===-1&&c&&c.length?E=c.length-1:E=b,E}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(c){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,c)}},{key:"audioTracks",get:function(){var c=this.audioTrackController;return c?c.audioTracks:[]}},{key:"audioTrack",get:function(){var c=this.audioTrackController;return c?c.audioTrack:-1},set:function(c){var b=this.audioTrackController;b&&(b.audioTrack=c)}},{key:"subtitleTracks",get:function(){var c=this.subtitleTrackController;return c?c.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var c=this.subtitleTrackController;return c?c.subtitleTrack:-1},set:function(c){var b=this.subtitleTrackController;b&&(b.subtitleTrack=c)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var c=this.subtitleTrackController;return c?c.subtitleDisplay:!1},set:function(c){var b=this.subtitleTrackController;b&&(b.subtitleDisplay=c)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(c){this.config.lowLatencyMode=c}},{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 s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return a.defaultConfig?a.defaultConfig:x.hlsDefaultConfig},set:function(c){a.defaultConfig=c}}]),a}();y.defaultConfig=void 0},"./src/is-supported.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"isSupported",function(){return g}),T.d(m,"changeTypeSupported",function(){return _});var L=T("./src/utils/mediasource-helper.ts");function S(){return self.SourceBuffer||self.WebKitSourceBuffer}function g(){var d=Object(L.getMediaSource)();if(!d)return!1;var o=S(),i=d&&typeof d.isTypeSupported=="function"&&d.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!o||o.prototype&&typeof o.prototype.appendBuffer=="function"&&typeof o.prototype.remove=="function";return!!i&&!!r}function _(){var d,o=S();return typeof(o==null||((d=o.prototype)===null||d===void 0)?void 0:d.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return f}),T.d(m,"LoadError",function(){return v});var L=T("./src/polyfills/number.ts"),S=T("./src/errors.ts");function g(l,n){l.prototype=Object.create(n.prototype),l.prototype.constructor=l,r(l,n)}function _(l){var n=typeof Map=="function"?new Map:void 0;return _=function(u){if(u===null||!i(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(u))return n.get(u);n.set(u,w)}function w(){return d(u,arguments,h(this).constructor)}return w.prototype=Object.create(u.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),r(w,u)},_(l)}function d(l,n,s){return o()?d=Reflect.construct:d=function(w,y,a){var R=[null];R.push.apply(R,y);var D=Function.bind.apply(w,R),c=new D;return a&&r(c,a.prototype),c},d.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(l){return!1}}function i(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function r(l,n){return r=Object.setPrototypeOf||function(u,w){return u.__proto__=w,u},r(l,n)}function h(l){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},h(l)}var p=Math.pow(2,17),f=function(){function l(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var n=l.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(u,w){var y=this,a=u.url;if(!a)return Promise.reject(new v({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,networkDetails:null},"Fragment does not have a "+(a?"part list":"url")));this.abort();var R=this.config,D=R.fLoader,c=R.loader;return new Promise(function(b,E){y.loader&&y.loader.destroy();var C=y.loader=u.loader=D?new D(R):new c(R),F=x(u),j={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:p};u.stats=C.stats,C.load(F,j,{onSuccess:function(X,G,H,K){y.resetLoader(u,C),b({frag:u,part:null,payload:X.data,networkDetails:K})},onError:function(X,G,H){y.resetLoader(u,C),E(new v({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,response:X,networkDetails:H}))},onAbort:function(X,G,H){y.resetLoader(u,C),E(new v({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,networkDetails:H}))},onTimeout:function(X,G,H){y.resetLoader(u,C),E(new v({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,networkDetails:H}))},onProgress:function(X,G,H,K){w&&w({frag:u,part:null,payload:H,networkDetails:K})}})})},n.loadPart=function(u,w,y){var a=this;this.abort();var R=this.config,D=R.fLoader,c=R.loader;return new Promise(function(b,E){a.loader&&a.loader.destroy();var C=a.loader=u.loader=D?new D(R):new c(R),F=x(u,w),j={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:p};w.stats=C.stats,C.load(F,j,{onSuccess:function(X,G,H,K){a.resetLoader(u,C),a.updateStatsFromPart(u,w);var B={frag:u,part:w,payload:X.data,networkDetails:K};y(B),b(B)},onError:function(X,G,H){a.resetLoader(u,C),E(new v({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,part:w,response:X,networkDetails:H}))},onAbort:function(X,G,H){u.stats.aborted=w.stats.aborted,a.resetLoader(u,C),E(new v({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,part:w,networkDetails:H}))},onTimeout:function(X,G,H){a.resetLoader(u,C),E(new v({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,part:w,networkDetails:H}))}})})},n.updateStatsFromPart=function(u,w){var y=u.stats,a=w.stats,R=a.total;if(y.loaded+=a.loaded,R){var D=Math.round(u.duration/w.duration),c=Math.min(Math.round(y.loaded/R),D),b=D-c,E=b*Math.round(y.loaded/c);y.total=y.loaded+E}else y.total=Math.max(y.loaded,y.total);var C=y.loading,F=a.loading;C.start?C.first+=F.first-F.start:(C.start=F.start,C.first=F.first),C.end=F.end},n.resetLoader=function(u,w){u.loader=null,this.loader===w&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),w.destroy()},l}();function x(l,n){n===void 0&&(n=null);var s=n||l,u={frag:l,part:n,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},w=s.byteRangeStartOffset,y=s.byteRangeEndOffset;return Object(L.isFiniteNumber)(w)&&Object(L.isFiniteNumber)(y)&&(u.rangeStart=w,u.rangeEnd=y),u}var v=function(l){g(n,l);function n(s){for(var u,w=arguments.length,y=new Array(w>1?w-1:0),a=1;a<w;a++)y[a-1]=arguments[a];return u=l.call.apply(l,[this].concat(y))||this,u.data=void 0,u.data=s,u}return n}(_(Error))},"./src/loader/fragment.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"ElementaryStreamTypes",function(){return f}),T.d(m,"BaseSegment",function(){return x}),T.d(m,"Fragment",function(){return v}),T.d(m,"Part",function(){return l});var L=T("./src/polyfills/number.ts"),S=T("./node_modules/url-toolkit/src/url-toolkit.js"),g=T.n(S),_=T("./src/utils/logger.ts"),d=T("./src/loader/level-key.ts"),o=T("./src/loader/load-stats.ts");function i(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,r(n,s)}function r(n,s){return r=Object.setPrototypeOf||function(w,y){return w.__proto__=y,w},r(n,s)}function h(n,s){for(var u=0;u<s.length;u++){var w=s[u];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(n,w.key,w)}}function p(n,s,u){return s&&h(n.prototype,s),u&&h(n,u),n}var f;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(f||(f={}));var x=function(){function n(u){var w;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(w={},w[f.AUDIO]=null,w[f.VIDEO]=null,w[f.AUDIOVIDEO]=null,w),this.baseurl=u}var s=n.prototype;return s.setByteRange=function(w,y){var a=w.split("@",2),R=[];a.length===1?R[0]=y?y.byteRangeEndOffset:0:R[0]=parseInt(a[1]),R[1]=parseInt(a[0])+R[0],this._byteRange=R},p(n,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(S.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(w){this._url=w}}]),n}(),v=function(n){i(s,n);function s(w,y){var a;return a=n.call(this,y)||this,a._decryptdata=null,a.rawProgramDateTime=null,a.programDateTime=null,a.tagList=[],a.duration=0,a.sn=0,a.levelkey=void 0,a.type=void 0,a.loader=null,a.level=-1,a.cc=0,a.startPTS=void 0,a.endPTS=void 0,a.appendedPTS=void 0,a.startDTS=void 0,a.endDTS=void 0,a.start=0,a.deltaPTS=void 0,a.maxStartPTS=void 0,a.minEndPTS=void 0,a.stats=new o.LoadStats,a.urlId=0,a.data=void 0,a.bitrateTest=!1,a.title=null,a.initSegment=null,a.type=w,a}var u=s.prototype;return u.createInitializationVector=function(y){for(var a=new Uint8Array(16),R=12;R<16;R++)a[R]=y>>8*(15-R)&255;return a},u.setDecryptDataFromLevelKey=function(y,a){var R=y;return(y==null?void 0:y.method)==="AES-128"&&y.uri&&!y.iv&&(R=d.LevelKey.fromURI(y.uri),R.method=y.method,R.iv=this.createInitializationVector(a),R.keyFormat="identity"),R},u.setElementaryStreamInfo=function(y,a,R,D,c,b){b===void 0&&(b=!1);var E=this.elementaryStreams,C=E[y];if(!C){E[y]={startPTS:a,endPTS:R,startDTS:D,endDTS:c,partial:b};return}C.startPTS=Math.min(C.startPTS,a),C.endPTS=Math.max(C.endPTS,R),C.startDTS=Math.min(C.startDTS,D),C.endDTS=Math.max(C.endDTS,c)},u.clearElementaryStreamInfo=function(){var y=this.elementaryStreams;y[f.AUDIO]=null,y[f.VIDEO]=null,y[f.AUDIOVIDEO]=null},p(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var y=this.sn;typeof y!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&_.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),y=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,y)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(L.isFiniteNumber)(this.programDateTime))return null;var y=Object(L.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+y*1e3}},{key:"encrypted",get:function(){var y;return!!((y=this.decryptdata)!==null&&y!==void 0&&y.keyFormat&&this.decryptdata.uri)}}]),s}(x),l=function(n){i(s,n);function s(u,w,y,a,R){var D;D=n.call(this,y)||this,D.fragOffset=0,D.duration=0,D.gap=!1,D.independent=!1,D.relurl=void 0,D.fragment=void 0,D.index=void 0,D.stats=new o.LoadStats,D.duration=u.decimalFloatingPoint("DURATION"),D.gap=u.bool("GAP"),D.independent=u.bool("INDEPENDENT"),D.relurl=u.enumeratedString("URI"),D.fragment=w,D.index=a;var c=u.enumeratedString("BYTERANGE");return c&&D.setByteRange(c,R),R&&(D.fragOffset=R.fragOffset+R.duration),D}return p(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var w=this.elementaryStreams;return!!(w.audio||w.video||w.audiovideo)}}]),s}(x)},"./src/loader/key-loader.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return _});var L=T("./src/events.ts"),S=T("./src/errors.ts"),g=T("./src/utils/logger.ts"),_=function(){function d(i){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=i,this._registerListeners()}var o=d.prototype;return o._registerListeners=function(){this.hls.on(L.Events.KEY_LOADING,this.onKeyLoading,this)},o._unregisterListeners=function(){this.hls.off(L.Events.KEY_LOADING,this.onKeyLoading)},o.destroy=function(){this._unregisterListeners();for(var r in this.loaders){var h=this.loaders[r];h&&h.destroy()}this.loaders={}},o.onKeyLoading=function(r,h){var p=h.frag,f=p.type,x=this.loaders[f];if(!p.decryptdata){g.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var v=p.decryptdata.uri;if(v!==this.decrypturl||this.decryptkey===null){var l=this.hls.config;if(x&&(g.logger.warn("abort previous key loader for type:"+f),x.abort()),!v){g.logger.warn("key uri is falsy");return}var n=l.loader,s=p.loader=this.loaders[f]=new n(l);this.decrypturl=v,this.decryptkey=null;var u={url:v,frag:p,responseType:"arraybuffer"},w={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(u,w,y)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(L.Events.KEY_LOADED,{frag:p}))},o.loadsuccess=function(r,h,p){var f=p.frag;if(!f.decryptdata){g.logger.error("after key load, decryptdata unset");return}this.decryptkey=f.decryptdata.key=new Uint8Array(r.data),f.loader=null,delete this.loaders[f.type],this.hls.trigger(L.Events.KEY_LOADED,{frag:f})},o.loaderror=function(r,h){var p=h.frag,f=p.loader;f&&f.abort(),delete this.loaders[p.type],this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:r})},o.loadtimeout=function(r,h){var p=h.frag,f=p.loader;f&&f.abort(),delete this.loaders[p.type],this.hls.trigger(L.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},d}()},"./src/loader/level-details.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"LevelDetails",function(){return d});var L=T("./src/polyfills/number.ts");function S(o,i){for(var r=0;r<i.length;r++){var h=i[r];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}function g(o,i,r){return i&&S(o.prototype,i),r&&S(o,r),o}var _=10,d=function(){function o(r){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=r}var i=o.prototype;return i.reloaded=function(h){if(!h){this.advanced=!0,this.updated=!0;return}var p=this.lastPartSn-h.lastPartSn,f=this.lastPartIndex-h.lastPartIndex;this.updated=this.endSN!==h.endSN||!!f||!!p,this.advanced=this.endSN>h.endSN||p>0||p===0&&f>0,this.updated||this.advanced?this.misses=Math.floor(h.misses*.6):this.misses=h.misses+1,this.availabilityDelay=h.availabilityDelay},g(o,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(L.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||_}},{key:"drift",get:function(){var h=this.driftEndTime-this.driftStartTime;if(h>0){var p=this.driftEnd-this.driftStart;return p*1e3/h}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var h;return(h=this.fragments)!==null&&h!==void 0&&h.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),o}()},"./src/loader/level-key.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"LevelKey",function(){return d});var L=T("./node_modules/url-toolkit/src/url-toolkit.js"),S=T.n(L);function g(o,i){for(var r=0;r<i.length;r++){var h=i[r];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}function _(o,i,r){return i&&g(o.prototype,i),r&&g(o,r),o}var d=function(){o.fromURL=function(r,h){return new o(r,h)},o.fromURI=function(r){return new o(r)};function o(i,r){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,r?this._uri=Object(L.buildAbsoluteURL)(i,r,{alwaysNormalize:!0}):this._uri=i}return _(o,[{key:"uri",get:function(){return this._uri}}]),o}()},"./src/loader/load-stats.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"LoadStats",function(){return L});var L=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,m,T){"use strict";T.r(m),T.d(m,"default",function(){return s});var L=T("./src/polyfills/number.ts"),S=T("./node_modules/url-toolkit/src/url-toolkit.js"),g=T.n(S),_=T("./src/loader/fragment.ts"),d=T("./src/loader/level-details.ts"),o=T("./src/loader/level-key.ts"),i=T("./src/utils/attr-list.ts"),r=T("./src/utils/logger.ts"),h=T("./src/utils/codecs.ts"),p=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,f=/#EXT-X-MEDIA:(.*)/g,x=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),v=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("|")),l=/\.(mp4|m4s|m4v|m4a)$/i;function n(R){var D,c;return l.test((D=(c=S.parseURL(R))===null||c===void 0?void 0:c.path)!=null?D:"")}var s=function(){function R(){}return R.findGroup=function(c,b){for(var E=0;E<c.length;E++){var C=c[E];if(C.id===b)return C}},R.convertAVC1ToAVCOTI=function(c){var b=c.split(".");if(b.length>2){var E=b.shift()+".";return E+=parseInt(b.shift()).toString(16),E+=("000"+parseInt(b.shift()).toString(16)).substr(-4),E}return c},R.resolve=function(c,b){return S.buildAbsoluteURL(b,c,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(c,b){var E=[],C={},F=!1;p.lastIndex=0;for(var j;(j=p.exec(c))!=null;)if(j[1]){var k=new i.AttrList(j[1]),X={attrs:k,bitrate:k.decimalInteger("AVERAGE-BANDWIDTH")||k.decimalInteger("BANDWIDTH"),name:k.NAME,url:R.resolve(j[2],b)},G=k.decimalResolution("RESOLUTION");G&&(X.width=G.width,X.height=G.height),u((k.CODECS||"").split(/[ ,]+/).filter(function(K){return K}),X),X.videoCodec&&X.videoCodec.indexOf("avc1")!==-1&&(X.videoCodec=R.convertAVC1ToAVCOTI(X.videoCodec)),E.push(X)}else if(j[3]){var H=new i.AttrList(j[3]);H["DATA-ID"]&&(F=!0,C[H["DATA-ID"]]=H)}return{levels:E,sessionData:F?C:null}},R.parseMasterPlaylistMedia=function(c,b,E,C){C===void 0&&(C=[]);var F,j=[],k=0;for(f.lastIndex=0;(F=f.exec(c))!==null;){var X=new i.AttrList(F[1]);if(X.TYPE===E){var G={attrs:X,bitrate:0,id:k++,groupId:X["GROUP-ID"],instreamId:X["INSTREAM-ID"],name:X.NAME||X.LANGUAGE||"",type:E,default:X.bool("DEFAULT"),autoselect:X.bool("AUTOSELECT"),forced:X.bool("FORCED"),lang:X.LANGUAGE,url:X.URI?R.resolve(X.URI,b):""};if(C.length){var H=R.findGroup(C,G.groupId)||C[0];w(G,H,"audioCodec"),w(G,H,"textCodec")}j.push(G)}}return j},R.parseLevelPlaylist=function(c,b,E,C,F){var j=new d.LevelDetails(b),k=j.fragments,X=null,G=0,H=0,K=0,B=0,U=null,W=new _.Fragment(C,b),Q,ie,ce,he=-1,be=!1;for(x.lastIndex=0,j.m3u8=c;(Q=x.exec(c))!==null;){be&&(be=!1,W=new _.Fragment(C,b),W.start=K,W.sn=G,W.cc=B,W.level=E,X&&(W.initSegment=X,W.rawProgramDateTime=X.rawProgramDateTime));var ne=Q[1];if(ne){W.duration=parseFloat(ne);var le=(" "+Q[2]).slice(1);W.title=le||null,W.tagList.push(le?["INF",ne,le]:["INF",ne])}else if(Q[3])Object(L.isFiniteNumber)(W.duration)&&(W.start=K,ce&&(W.levelkey=ce),W.sn=G,W.level=E,W.cc=B,W.urlId=F,k.push(W),W.relurl=(" "+Q[3]).slice(1),a(W,U),U=W,K+=W.duration,G++,H=0,be=!0);else if(Q[4]){var ue=(" "+Q[4]).slice(1);U?W.setByteRange(ue,U):W.setByteRange(ue)}else if(Q[5])W.rawProgramDateTime=(" "+Q[5]).slice(1),W.tagList.push(["PROGRAM-DATE-TIME",W.rawProgramDateTime]),he===-1&&(he=k.length);else{if(Q=Q[0].match(v),!Q){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(ie=1;ie<Q.length&&!(typeof Q[ie]!="undefined");ie++);var re=(" "+Q[ie]).slice(1),oe=(" "+Q[ie+1]).slice(1),q=Q[ie+2]?(" "+Q[ie+2]).slice(1):"";switch(re){case"PLAYLIST-TYPE":j.type=oe.toUpperCase();break;case"MEDIA-SEQUENCE":G=j.startSN=parseInt(oe);break;case"SKIP":{var se=new i.AttrList(oe),J=se.decimalInteger("SKIPPED-SEGMENTS");if(Object(L.isFiniteNumber)(J)){j.skippedSegments=J;for(var ee=J;ee--;)k.unshift(null);G+=J}var ge=se.enumeratedString("RECENTLY-REMOVED-DATERANGES");ge&&(j.recentlyRemovedDateranges=ge.split(" "));break}case"TARGETDURATION":j.targetduration=parseFloat(oe);break;case"VERSION":j.version=parseInt(oe);break;case"EXTM3U":break;case"ENDLIST":j.live=!1;break;case"#":(oe||q)&&W.tagList.push(q?[oe,q]:[oe]);break;case"DIS":B++;case"GAP":W.tagList.push([re]);break;case"BITRATE":W.tagList.push([re,oe]);break;case"DISCONTINUITY-SEQ":B=parseInt(oe);break;case"KEY":{var te,Y=new i.AttrList(oe),z=Y.enumeratedString("METHOD"),$=Y.URI,me=Y.hexadecimalInteger("IV"),pe=Y.enumeratedString("KEYFORMATVERSIONS"),xe=Y.enumeratedString("KEYID"),Re=(te=Y.enumeratedString("KEYFORMAT"))!=null?te:"identity",ke=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ke.indexOf(Re)>-1){r.logger.warn("Keyformat "+Re+" is not supported from the manifest");continue}else if(Re!=="identity")continue;z&&(ce=o.LevelKey.fromURL(b,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(z)>=0&&(ce.method=z,ce.keyFormat=Re,xe&&(ce.keyID=xe),pe&&(ce.keyFormatVersions=pe),ce.iv=me));break}case"START":{var Me=new i.AttrList(oe),Pe=Me.decimalFloatingPoint("TIME-OFFSET");Object(L.isFiniteNumber)(Pe)&&(j.startTimeOffset=Pe);break}case"MAP":{var je=new i.AttrList(oe);W.relurl=je.URI,je.BYTERANGE&&W.setByteRange(je.BYTERANGE),W.level=E,W.sn="initSegment",ce&&(W.levelkey=ce),W.initSegment=null,X=W,be=!0;break}case"SERVER-CONTROL":{var Fe=new i.AttrList(oe);j.canBlockReload=Fe.bool("CAN-BLOCK-RELOAD"),j.canSkipUntil=Fe.optionalFloat("CAN-SKIP-UNTIL",0),j.canSkipDateRanges=j.canSkipUntil>0&&Fe.bool("CAN-SKIP-DATERANGES"),j.partHoldBack=Fe.optionalFloat("PART-HOLD-BACK",0),j.holdBack=Fe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var We=new i.AttrList(oe);j.partTarget=We.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Se=j.partList;Se||(Se=j.partList=[]);var Xe=H>0?Se[Se.length-1]:void 0,Ye=H++,Ie=new _.Part(new i.AttrList(oe),W,b,Ye,Xe);Se.push(Ie),W.duration+=Ie.duration;break}case"PRELOAD-HINT":{var He=new i.AttrList(oe);j.preloadHint=He;break}case"RENDITION-REPORT":{var Ae=new i.AttrList(oe);j.renditionReports=j.renditionReports||[],j.renditionReports.push(Ae);break}default:r.logger.warn("line parsed but not handled: "+Q);break}}}U&&!U.relurl?(k.pop(),K-=U.duration,j.partList&&(j.fragmentHint=U)):j.partList&&(a(W,U),W.cc=B,j.fragmentHint=W);var Te=k.length,Ce=k[0],ye=k[Te-1];if(K+=j.skippedSegments*j.targetduration,K>0&&Te&&ye){j.averagetargetduration=K/Te;var Ee=ye.sn;j.endSN=Ee!=="initSegment"?Ee:0,Ce&&(j.startCC=Ce.cc,Ce.initSegment||j.fragments.every(function(we){return we.relurl&&n(we.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),W=new _.Fragment(C,b),W.relurl=ye.relurl,W.level=E,W.sn="initSegment",Ce.initSegment=W,j.needSidxRanges=!0))}else j.endSN=0,j.startCC=0;return j.fragmentHint&&(K+=j.fragmentHint.duration),j.totalduration=K,j.endCC=B,he>0&&y(k,he),j},R}();function u(R,D){["video","audio","text"].forEach(function(c){var b=R.filter(function(C){return Object(h.isCodecType)(C,c)});if(b.length){var E=b.filter(function(C){return C.lastIndexOf("avc1",0)===0||C.lastIndexOf("mp4a",0)===0});D[c+"Codec"]=E.length>0?E[0]:b[0],R=R.filter(function(C){return b.indexOf(C)===-1})}}),D.unknownCodecs=R}function w(R,D,c){var b=D[c];b&&(R[c]=b)}function y(R,D){for(var c=R[D],b=D;b--;){var E=R[b];if(!E)return;E.programDateTime=c.programDateTime-E.duration*1e3,c=E}}function a(R,D){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):D!=null&&D.programDateTime&&(R.programDateTime=D.endProgramDateTime),Object(L.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/polyfills/number.ts"),S=T("./src/events.ts"),g=T("./src/errors.ts"),_=T("./src/utils/logger.ts"),d=T("./src/utils/mp4-tools.ts"),o=T("./src/loader/m3u8-parser.ts"),i=T("./src/types/loader.ts"),r=T("./src/utils/attr-list.ts");function h(x){var v=x.type;switch(v){case i.PlaylistContextType.AUDIO_TRACK:return i.PlaylistLevelType.AUDIO;case i.PlaylistContextType.SUBTITLE_TRACK:return i.PlaylistLevelType.SUBTITLE;default:return i.PlaylistLevelType.MAIN}}function p(x,v){var l=x.url;return(l===void 0||l.indexOf("data:")===0)&&(l=v.url),l}var f=function(){function x(l){this.hls=void 0,this.loaders=Object.create(null),this.hls=l,this.registerListeners()}var v=x.prototype;return v.registerListeners=function(){var n=this.hls;n.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(S.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(S.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},v.unregisterListeners=function(){var n=this.hls;n.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(S.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(S.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(S.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},v.createInternalLoader=function(n){var s=this.hls.config,u=s.pLoader,w=s.loader,y=u||w,a=new y(s);return n.loader=a,this.loaders[n.type]=a,a},v.getInternalLoader=function(n){return this.loaders[n.type]},v.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},v.destroyInternalLoaders=function(){for(var n in this.loaders){var s=this.loaders[n];s&&s.destroy(),this.resetInternalLoader(n)}},v.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},v.onManifestLoading=function(n,s){var u=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:i.PlaylistContextType.MANIFEST,url:u,deliveryDirectives:null})},v.onLevelLoading=function(n,s){var u=s.id,w=s.level,y=s.url,a=s.deliveryDirectives;this.load({id:u,groupId:null,level:w,responseType:"text",type:i.PlaylistContextType.LEVEL,url:y,deliveryDirectives:a})},v.onAudioTrackLoading=function(n,s){var u=s.id,w=s.groupId,y=s.url,a=s.deliveryDirectives;this.load({id:u,groupId:w,level:null,responseType:"text",type:i.PlaylistContextType.AUDIO_TRACK,url:y,deliveryDirectives:a})},v.onSubtitleTrackLoading=function(n,s){var u=s.id,w=s.groupId,y=s.url,a=s.deliveryDirectives;this.load({id:u,groupId:w,level:null,responseType:"text",type:i.PlaylistContextType.SUBTITLE_TRACK,url:y,deliveryDirectives:a})},v.load=function(n){var s,u=this.hls.config,w=this.getInternalLoader(n);if(w){var y=w.context;if(y&&y.url===n.url){_.logger.trace("[playlist-loader]: playlist request ongoing");return}_.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),w.abort()}var a,R,D,c;switch(n.type){case i.PlaylistContextType.MANIFEST:a=u.manifestLoadingMaxRetry,R=u.manifestLoadingTimeOut,D=u.manifestLoadingRetryDelay,c=u.manifestLoadingMaxRetryTimeout;break;case i.PlaylistContextType.LEVEL:case i.PlaylistContextType.AUDIO_TRACK:case i.PlaylistContextType.SUBTITLE_TRACK:a=0,R=u.levelLoadingTimeOut;break;default:a=u.levelLoadingMaxRetry,R=u.levelLoadingTimeOut,D=u.levelLoadingRetryDelay,c=u.levelLoadingMaxRetryTimeout;break}if(w=this.createInternalLoader(n),(s=n.deliveryDirectives)!==null&&s!==void 0&&s.part){var b;if(n.type===i.PlaylistContextType.LEVEL&&n.level!==null?b=this.hls.levels[n.level].details:n.type===i.PlaylistContextType.AUDIO_TRACK&&n.id!==null?b=this.hls.audioTracks[n.id].details:n.type===i.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(b=this.hls.subtitleTracks[n.id].details),b){var E=b.partTarget,C=b.targetduration;E&&C&&(R=Math.min(Math.max(E*3,C*.8)*1e3,R))}}var F={timeout:R,maxRetry:a,retryDelay:D,maxRetryDelay:c,highWaterMark:0},j={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};w.load(n,F,j)},v.loadsuccess=function(n,s,u,w){if(w===void 0&&(w=null),u.isSidxRequest){this.handleSidxRequest(n,u),this.handlePlaylistLoaded(n,s,u,w);return}this.resetInternalLoader(u.type);var y=n.data;if(y.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,u,"no EXTM3U delimiter",w);return}s.parsing.start=performance.now(),y.indexOf("#EXTINF:")>0||y.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,s,u,w):this.handleMasterPlaylist(n,s,u,w)},v.loaderror=function(n,s,u){u===void 0&&(u=null),this.handleNetworkError(s,u,!1,n)},v.loadtimeout=function(n,s,u){u===void 0&&(u=null),this.handleNetworkError(s,u,!0)},v.handleMasterPlaylist=function(n,s,u,w){var y=this.hls,a=n.data,R=p(n,u),D=o.default.parseMasterPlaylist(a,R),c=D.levels,b=D.sessionData;if(!c.length){this.handleManifestParsingError(n,u,"no level found in manifest",w);return}var E=c.map(function(G){return{id:G.attrs.AUDIO,audioCodec:G.audioCodec}}),C=c.map(function(G){return{id:G.attrs.SUBTITLES,textCodec:G.textCodec}}),F=o.default.parseMasterPlaylistMedia(a,R,"AUDIO",E),j=o.default.parseMasterPlaylistMedia(a,R,"SUBTITLES",C),k=o.default.parseMasterPlaylistMedia(a,R,"CLOSED-CAPTIONS");if(F.length){var X=F.some(function(G){return!G.url});!X&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(_.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),F.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new r.AttrList({}),bitrate:0,url:""}))}y.trigger(S.Events.MANIFEST_LOADED,{levels:c,audioTracks:F,subtitles:j,captions:k,url:R,stats:s,networkDetails:w,sessionData:b})},v.handleTrackOrLevelPlaylist=function(n,s,u,w){var y=this.hls,a=u.id,R=u.level,D=u.type,c=p(n,u),b=Object(L.isFiniteNumber)(a)?a:0,E=Object(L.isFiniteNumber)(R)?R:b,C=h(u),F=o.default.parseLevelPlaylist(n.data,c,E,C,b);if(!F.fragments.length){y.trigger(S.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:c,reason:"no fragments found in level",level:typeof u.level=="number"?u.level:void 0});return}if(D===i.PlaylistContextType.MANIFEST){var j={attrs:new r.AttrList({}),bitrate:0,details:F,name:"",url:c};y.trigger(S.Events.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:c,stats:s,networkDetails:w,sessionData:null})}if(s.parsing.end=performance.now(),F.needSidxRanges){var k,X=(k=F.fragments[0].initSegment)===null||k===void 0?void 0:k.url;this.load({url:X,isSidxRequest:!0,type:D,level:R,levelDetails:F,id:a,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}u.levelDetails=F,this.handlePlaylistLoaded(n,s,u,w)},v.handleSidxRequest=function(n,s){var u=Object(d.parseSegmentIndex)(new Uint8Array(n.data));if(!u)return;var w=u.references,y=s.levelDetails;w.forEach(function(a,R){var D=a.info,c=y.fragments[R];c.byteRange.length===0&&c.setByteRange(String(1+D.end-D.start)+"@"+String(D.start)),c.initSegment&&c.initSegment.setByteRange(String(u.moovEndOffset)+"@0")})},v.handleManifestParsingError=function(n,s,u,w){this.hls.trigger(S.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===i.PlaylistContextType.MANIFEST,url:n.url,reason:u,response:n,context:s,networkDetails:w})},v.handleNetworkError=function(n,s,u,w){u===void 0&&(u=!1),_.logger.warn("[playlist-loader]: A network "+(u?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var y=g.ErrorDetails.UNKNOWN,a=!1,R=this.getInternalLoader(n);switch(n.type){case i.PlaylistContextType.MANIFEST:y=u?g.ErrorDetails.MANIFEST_LOAD_TIMEOUT:g.ErrorDetails.MANIFEST_LOAD_ERROR,a=!0;break;case i.PlaylistContextType.LEVEL:y=u?g.ErrorDetails.LEVEL_LOAD_TIMEOUT:g.ErrorDetails.LEVEL_LOAD_ERROR,a=!1;break;case i.PlaylistContextType.AUDIO_TRACK:y=u?g.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,a=!1;break;case i.PlaylistContextType.SUBTITLE_TRACK:y=u?g.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:g.ErrorDetails.SUBTITLE_LOAD_ERROR,a=!1;break}R&&this.resetInternalLoader(n.type);var D={type:g.ErrorTypes.NETWORK_ERROR,details:y,fatal:a,url:n.url,loader:R,context:n,networkDetails:s};w&&(D.response=w),this.hls.trigger(S.Events.ERROR,D)},v.handlePlaylistLoaded=function(n,s,u,w){var y=u.type,a=u.level,R=u.id,D=u.groupId,c=u.loader,b=u.levelDetails,E=u.deliveryDirectives;if(!(b!=null&&b.targetduration)){this.handleManifestParsingError(n,u,"invalid target duration",w);return}if(!c)return;b.live&&(c.getCacheAge&&(b.ageHeader=c.getCacheAge()||0),(!c.getCacheAge||isNaN(b.ageHeader))&&(b.ageHeader=0));switch(y){case i.PlaylistContextType.MANIFEST:case i.PlaylistContextType.LEVEL:this.hls.trigger(S.Events.LEVEL_LOADED,{details:b,level:a||0,id:R||0,stats:s,networkDetails:w,deliveryDirectives:E});break;case i.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(S.Events.AUDIO_TRACK_LOADED,{details:b,id:R||0,groupId:D||"",stats:s,networkDetails:w,deliveryDirectives:E});break;case i.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(S.Events.SUBTITLE_TRACK_LOADED,{details:b,id:R||0,groupId:D||"",stats:s,networkDetails:w,deliveryDirectives:E});break}},x}();m.default=f},"./src/polyfills/number.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"isFiniteNumber",function(){return L}),T.d(m,"MAX_SAFE_INTEGER",function(){return S});var L=Number.isFinite||function(g){return typeof g=="number"&&isFinite(g)},S=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(P,m,T){"use strict";T.r(m);var L=function(){function S(){}return S.getSilentFrame=function(_,d){switch(_){case"mp4a.40.2":if(d===1)return new Uint8Array([0,200,0,128,35,128]);if(d===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(d===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(d===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(d===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(d===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(d===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(d===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(d===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},S}();m.default=L},"./src/remux/mp4-generator.ts":function(P,m,T){"use strict";T.r(m);var L=Math.pow(2,32)-1,S=function(){function g(){}return g.init=function(){g.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var d;for(d in g.types)g.types.hasOwnProperty(d)&&(g.types[d]=[d.charCodeAt(0),d.charCodeAt(1),d.charCodeAt(2),d.charCodeAt(3)]);var o=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);g.HDLR_TYPES={video:o,audio:i};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),h=new Uint8Array([0,0,0,0,0,0,0,0]);g.STTS=g.STSC=g.STCO=h,g.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),g.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),g.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),g.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),f=new Uint8Array([97,118,99,49]),x=new Uint8Array([0,0,0,1]);g.FTYP=g.box(g.types.ftyp,p,x,p,f),g.DINF=g.box(g.types.dinf,g.box(g.types.dref,r))},g.box=function(d){for(var o=8,i=arguments.length,r=new Array(i>1?i-1:0),h=1;h<i;h++)r[h-1]=arguments[h];for(var p=r.length,f=p;p--;)o+=r[p].byteLength;var x=new Uint8Array(o);for(x[0]=o>>24&255,x[1]=o>>16&255,x[2]=o>>8&255,x[3]=o&255,x.set(d,4),p=0,o=8;p<f;p++)x.set(r[p],o),o+=r[p].byteLength;return x},g.hdlr=function(d){return g.box(g.types.hdlr,g.HDLR_TYPES[d])},g.mdat=function(d){return g.box(g.types.mdat,d)},g.mdhd=function(d,o){o*=d;var i=Math.floor(o/(L+1)),r=Math.floor(o%(L+1));return g.box(g.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,i>>24,i>>16&255,i>>8&255,i&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))},g.mdia=function(d){return g.box(g.types.mdia,g.mdhd(d.timescale,d.duration),g.hdlr(d.type),g.minf(d))},g.mfhd=function(d){return g.box(g.types.mfhd,new Uint8Array([0,0,0,0,d>>24,d>>16&255,d>>8&255,d&255]))},g.minf=function(d){return d.type==="audio"?g.box(g.types.minf,g.box(g.types.smhd,g.SMHD),g.DINF,g.stbl(d)):g.box(g.types.minf,g.box(g.types.vmhd,g.VMHD),g.DINF,g.stbl(d))},g.moof=function(d,o,i){return g.box(g.types.moof,g.mfhd(d),g.traf(i,o))},g.moov=function(d){for(var o=d.length,i=[];o--;)i[o]=g.trak(d[o]);return g.box.apply(null,[g.types.moov,g.mvhd(d[0].timescale,d[0].duration)].concat(i).concat(g.mvex(d)))},g.mvex=function(d){for(var o=d.length,i=[];o--;)i[o]=g.trex(d[o]);return g.box.apply(null,[g.types.mvex].concat(i))},g.mvhd=function(d,o){o*=d;var i=Math.floor(o/(L+1)),r=Math.floor(o%(L+1)),h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,i>>24,i>>16&255,i>>8&255,i&255,r>>24,r>>16&255,r>>8&255,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return g.box(g.types.mvhd,h)},g.sdtp=function(d){var o=d.samples||[],i=new Uint8Array(4+o.length),r,h;for(r=0;r<o.length;r++)h=o[r].flags,i[r+4]=h.dependsOn<<4|h.isDependedOn<<2|h.hasRedundancy;return g.box(g.types.sdtp,i)},g.stbl=function(d){return g.box(g.types.stbl,g.stsd(d),g.box(g.types.stts,g.STTS),g.box(g.types.stsc,g.STSC),g.box(g.types.stsz,g.STSZ),g.box(g.types.stco,g.STCO))},g.avc1=function(d){var o=[],i=[],r,h,p;for(r=0;r<d.sps.length;r++)h=d.sps[r],p=h.byteLength,o.push(p>>>8&255),o.push(p&255),o=o.concat(Array.prototype.slice.call(h));for(r=0;r<d.pps.length;r++)h=d.pps[r],p=h.byteLength,i.push(p>>>8&255),i.push(p&255),i=i.concat(Array.prototype.slice.call(h));var f=g.box(g.types.avcC,new Uint8Array([1,o[3],o[4],o[5],252|3,224|d.sps.length].concat(o).concat([d.pps.length]).concat(i))),x=d.width,v=d.height,l=d.pixelRatio[0],n=d.pixelRatio[1];return g.box(g.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,x>>8&255,x&255,v>>8&255,v&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]),f,g.box(g.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),g.box(g.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,l&255,n>>24,n>>16&255,n>>8&255,n&255])))},g.esds=function(d){var o=d.config.length;return new Uint8Array([0,0,0,0,3,23+o,0,1,0,4,15+o,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([o]).concat(d.config).concat([6,1,2]))},g.mp4a=function(d){var o=d.samplerate;return g.box(g.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,d.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]),g.box(g.types.esds,g.esds(d)))},g.mp3=function(d){var o=d.samplerate;return g.box(g.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,d.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]))},g.stsd=function(d){return d.type==="audio"?!d.isAAC&&d.codec==="mp3"?g.box(g.types.stsd,g.STSD,g.mp3(d)):g.box(g.types.stsd,g.STSD,g.mp4a(d)):g.box(g.types.stsd,g.STSD,g.avc1(d))},g.tkhd=function(d){var o=d.id,i=d.duration*d.timescale,r=d.width,h=d.height,p=Math.floor(i/(L+1)),f=Math.floor(i%(L+1));return g.box(g.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,o>>24&255,o>>16&255,o>>8&255,o&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,f>>24,f>>16&255,f>>8&255,f&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,h>>8&255,h&255,0,0]))},g.traf=function(d,o){var i=g.sdtp(d),r=d.id,h=Math.floor(o/(L+1)),p=Math.floor(o%(L+1));return g.box(g.types.traf,g.box(g.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),g.box(g.types.tfdt,new Uint8Array([1,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,p>>24,p>>16&255,p>>8&255,p&255])),g.trun(d,i.length+16+20+8+16+8+8),i)},g.trak=function(d){return d.duration=d.duration||4294967295,g.box(g.types.trak,g.tkhd(d),g.mdia(d))},g.trex=function(d){var o=d.id;return g.box(g.types.trex,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},g.trun=function(d,o){var i=d.samples||[],r=i.length,h=12+16*r,p=new Uint8Array(h),f,x,v,l,n,s;for(o+=8+h,p.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255],0),f=0;f<r;f++)x=i[f],v=x.duration,l=x.size,n=x.flags,s=x.cts,p.set([v>>>24&255,v>>>16&255,v>>>8&255,v&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*f);return g.box(g.types.trun,p)},g.initSegment=function(d){g.types||g.init();var o=g.moov(d),i=new Uint8Array(g.FTYP.byteLength+o.byteLength);return i.set(g.FTYP),i.set(o,g.FTYP.byteLength),i},g}();S.types=void 0,S.HDLR_TYPES=void 0,S.STTS=void 0,S.STSC=void 0,S.STCO=void 0,S.STSZ=void 0,S.VMHD=void 0,S.SMHD=void 0,S.STSD=void 0,S.FTYP=void 0,S.DINF=void 0,m.default=S},"./src/remux/mp4-remuxer.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return s}),T.d(m,"normalizePts",function(){return u});var L=T("./src/polyfills/number.ts"),S=T("./src/remux/aac-helper.ts"),g=T("./src/remux/mp4-generator.ts"),_=T("./src/events.ts"),d=T("./src/errors.ts"),o=T("./src/utils/logger.ts"),i=T("./src/types/loader.ts"),r=T("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign||function(R){for(var D=1;D<arguments.length;D++){var c=arguments[D];for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(R[b]=c[b])}return R},h.apply(this,arguments)}var p=10*1e3,f=1024,x=1152,v=null,l=null,n=!1,s=function(){function R(c,b,E,C){if(C===void 0&&(C=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=c,this.config=b,this.typeSupported=E,this.ISGenerated=!1,v===null){var F=navigator.userAgent||"",j=F.match(/Chrome\/(\d+)/i);v=j?parseInt(j[1]):0}if(l===null){var k=navigator.userAgent.match(/Safari\/(\d+)/i);l=k?parseInt(k[1]):0}n=!!v&&v<75||!!l&&l<600}var D=R.prototype;return D.destroy=function(){},D.resetTimeStamp=function(b){o.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=b},D.resetNextTimestamp=function(){o.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},D.resetInitSegment=function(){o.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},D.getVideoStartPts=function(b){var E=!1,C=b.reduce(function(F,j){var k=j.pts-F;return k<-4294967296?(E=!0,u(F,j.pts)):k>0?F:j.pts},b[0].pts);return E&&o.logger.debug("PTS rollover detected"),C},D.remux=function(b,E,C,F,j,k,X,G){var H,K,B,U,W,Q,ie=j,ce=j,he=b.pid>-1,be=E.pid>-1,ne=E.samples.length,le=b.samples.length>0,ue=ne>1,re=(!he||le)&&(!be||ue)||this.ISGenerated||X;if(re){this.ISGenerated||(B=this.generateIS(b,E,j));var oe=this.isVideoContiguous,q=-1;if(ue&&(q=w(E.samples),!oe&&this.config.forceKeyFrameOnDiscontinuity))if(Q=!0,q>0){o.logger.warn("[mp4-remuxer]: Dropped "+q+" out of "+ne+" video samples due to a missing keyframe");var se=this.getVideoStartPts(E.samples);E.samples=E.samples.slice(q),E.dropped+=q,ce+=(E.samples[0].pts-se)/(E.timescale||9e4)}else q===-1&&(o.logger.warn("[mp4-remuxer]: No keyframe found out of "+ne+" video samples"),Q=!1);if(this.ISGenerated){if(le&&ue){var J=this.getVideoStartPts(E.samples),ee=u(b.samples[0].pts,J)-J,ge=ee/E.inputTimeScale;ie+=Math.max(0,ge),ce+=Math.max(0,-ge)}if(le){if(b.samplerate||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(b,E,j)),K=this.remuxAudio(b,ie,this.isAudioContiguous,k,be||ue||G===i.PlaylistLevelType.AUDIO?ce:void 0),ue){var te=K?K.endPTS-K.startPTS:0;E.inputTimeScale||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(b,E,j)),H=this.remuxVideo(E,ce,oe,te)}}else ue&&(H=this.remuxVideo(E,ce,oe,0));H&&(H.firstKeyFrame=q,H.independent=q!==-1)}}return this.ISGenerated&&(C.samples.length&&(W=this.remuxID3(C,j)),F.samples.length&&(U=this.remuxText(F,j))),{audio:K,video:H,initSegment:B,independent:Q,text:U,id3:W}},D.generateIS=function(b,E,C){var F=b.samples,j=E.samples,k=this.typeSupported,X={},G=!Object(L.isFiniteNumber)(this._initPTS),H="audio/mp4",K,B,U;if(G&&(K=B=Infinity),b.config&&F.length&&(b.timescale=b.samplerate,b.isAAC||(k.mpeg?(H="audio/mpeg",b.codec=""):k.mp3&&(b.codec="mp3")),X.audio={id:"audio",container:H,codec:b.codec,initSegment:!b.isAAC&&k.mpeg?new Uint8Array(0):g.default.initSegment([b]),metadata:{channelCount:b.channelCount}},G&&(U=b.inputTimeScale,K=B=F[0].pts-Math.round(U*C))),E.sps&&E.pps&&j.length&&(E.timescale=E.inputTimeScale,X.video={id:"main",container:"video/mp4",codec:E.codec,initSegment:g.default.initSegment([E]),metadata:{width:E.width,height:E.height}},G)){U=E.inputTimeScale;var W=this.getVideoStartPts(j),Q=Math.round(U*C);B=Math.min(B,u(j[0].dts,W)-Q),K=Math.min(K,W-Q)}if(Object.keys(X).length)return this.ISGenerated=!0,G&&(this._initPTS=K,this._initDTS=B),{tracks:X,initPTS:K,timescale:U}},D.remuxVideo=function(b,E,C,F){var j=b.inputTimeScale,k=b.samples,X=[],G=k.length,H=this._initPTS,K=this.nextAvcDts,B=8,U,W,Q,ie=Number.POSITIVE_INFINITY,ce=Number.NEGATIVE_INFINITY,he=0,be=!1;if(!C||K===null){var ne=E*j,le=k[0].pts-u(k[0].dts,k[0].pts);K=ne-le}for(var ue=0;ue<G;ue++){var re=k[ue];if(re.pts=u(re.pts-H,K),re.dts=u(re.dts-H,K),re.dts>re.pts){var oe=9e4*.2;he=Math.max(Math.min(he,re.pts-re.dts),-1*oe)}re.dts<k[ue>0?ue-1:ue].dts&&(be=!0)}be&&k.sort(function(pt,dt){var it=pt.dts-dt.dts,Lt=pt.pts-dt.pts;return it||Lt}),W=k[0].dts,Q=k[k.length-1].dts;var q=Math.round((Q-W)/(G-1));if(he<0){if(he<q*-2){o.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(r.toMsFromMpegTsClock)(-q,!0)+" ms");for(var se=he,J=0;J<G;J++)k[J].dts=se=Math.max(se,k[J].pts-q),k[J].pts=Math.max(se,k[J].pts)}else{o.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(r.toMsFromMpegTsClock)(he,!0)+" ms to overcome this issue");for(var ee=0;ee<G;ee++)k[ee].dts=k[ee].dts+he}W=k[0].dts}if(C){var ge=W-K,te=ge>q,Y=ge<-1;if(te||Y){te?o.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(ge,!0)+" ms ("+ge+"dts) hole between fragments detected, filling it"):o.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-ge,!0)+" ms ("+ge+"dts) overlapping between fragments detected"),W=K;var z=k[0].pts-ge;k[0].dts=W,k[0].pts=z,o.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(z,!0)+"/"+Object(r.toMsFromMpegTsClock)(W,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(ge,!0)+" ms")}}n&&(W=Math.max(0,W));for(var $=0,me=0,pe=0;pe<G;pe++){for(var xe=k[pe],Re=xe.units,ke=Re.length,Me=0,Pe=0;Pe<ke;Pe++)Me+=Re[Pe].data.length;me+=Me,$+=ke,xe.length=Me,xe.dts=Math.max(xe.dts,W),xe.pts=Math.max(xe.pts,xe.dts,0),ie=Math.min(xe.pts,ie),ce=Math.max(xe.pts,ce)}Q=k[G-1].dts;var je=me+4*$+8,Fe;try{Fe=new Uint8Array(je)}catch(pt){this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:je,reason:"fail allocating video mdat "+je});return}var We=new DataView(Fe.buffer);We.setUint32(0,je),Fe.set(g.default.types.mdat,4);for(var Se=0;Se<G;Se++){for(var Xe=k[Se],Ye=Xe.units,Ie=0,He=0,Ae=Ye.length;He<Ae;He++){var Te=Ye[He],Ce=Te.data,ye=Te.data.byteLength;We.setUint32(B,ye),B+=4,Fe.set(Ce,B),B+=ye,Ie+=4+ye}if(Se<G-1)U=k[Se+1].dts-Xe.dts;else{var Ee=this.config,we=Xe.dts-k[Se>0?Se-1:Se].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var Oe=Math.floor(Ee.maxBufferHole*j),Le=(F?ie+F*j:this.nextAudioPts)-Xe.pts;Le>Oe?(U=Le-we,U<0&&(U=we),o.logger.log("[mp4-remuxer]: It is approximately "+Le/90+" ms to the next segment; using duration "+U/90+" ms for the last video frame.")):U=we}else U=we}var Be=Math.round(Xe.pts-Xe.dts);X.push(new y(Xe.key,U,Ie,Be))}if(X.length&&v&&v<70){var ze=X[0].flags;ze.dependsOn=2,ze.isNonSync=0}console.assert(U!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=K=Q+U,this.isVideoContiguous=!0;var nt=g.default.moof(b.sequenceNumber++,W,h({},b,{samples:X})),Ze="video",at={data1:nt,data2:Fe,startPTS:ie/j,endPTS:(ce+U)/j,startDTS:W/j,endDTS:K/j,type:Ze,hasAudio:!1,hasVideo:!0,nb:X.length,dropped:b.dropped};return b.samples=[],b.dropped=0,console.assert(Fe.length,"MDAT length must not be zero"),at},D.remuxAudio=function(b,E,C,F,j){var k=b.inputTimeScale,X=b.samplerate?b.samplerate:k,G=k/X,H=b.isAAC?f:x,K=H*G,B=this._initPTS,U=!b.isAAC&&this.typeSupported.mpeg,W=[],Q=b.samples,ie=U?0:8,ce=this.nextAudioPts||-1,he=E*k;if(this.isAudioContiguous=C=C||Q.length&&ce>0&&(F&&Math.abs(he-ce)<9e3||Math.abs(u(Q[0].pts-B,he)-ce)<20*K),Q.forEach(function(Ce){Ce.pts=u(Ce.pts-B,he)}),!C||ce<0){if(Q=Q.filter(function(Ce){return Ce.pts>=0}),!Q.length)return;j===0?ce=0:F?ce=Math.max(0,he):ce=Q[0].pts}if(b.isAAC)for(var be=j!==void 0,ne=this.config.maxAudioFramesDrift,le=0,ue=ce;le<Q.length;le++){var re=Q[le],oe=re.pts,q=oe-ue,se=Math.abs(1e3*q/k);if(q<=-ne*K&&be)le===0&&(o.logger.warn("Audio frame @ "+(oe/k).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*q/k)+" ms."),this.nextAudioPts=ce=ue=oe);else if(q>=ne*K&&se<p&&be){var J=Math.round(q/K);ue=oe-J*K,ue<0&&(J--,ue+=K),le===0&&(this.nextAudioPts=ce=ue),o.logger.warn("[mp4-remuxer]: Injecting "+J+" audio frame @ "+(ue/k).toFixed(3)+"s due to "+Math.round(1e3*q/k)+" ms gap.");for(var ee=0;ee<J;ee++){var ge=Math.max(ue,0),te=S.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);te||(o.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),te=re.unit.subarray()),Q.splice(le,0,{unit:te,pts:ge}),ue+=K,le++}}re.pts=ue,ue+=K}for(var Y=null,z=null,$,me=0,pe=Q.length;pe--;)me+=Q[pe].unit.byteLength;for(var xe=0,Re=Q.length;xe<Re;xe++){var ke=Q[xe],Me=ke.unit,Pe=ke.pts;if(z!==null){var je=W[xe-1];je.duration=Math.round((Pe-z)/G)}else if(C&&b.isAAC&&(Pe=ce),Y=Pe,me>0){me+=ie;try{$=new Uint8Array(me)}catch(Ce){this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:me,reason:"fail allocating audio mdat "+me});return}if(!U){var Fe=new DataView($.buffer);Fe.setUint32(0,me),$.set(g.default.types.mdat,4)}}else return;$.set(Me,ie);var We=Me.byteLength;ie+=We,W.push(new y(!0,H,We,0)),z=Pe}var Se=W.length;if(!Se)return;var Xe=W[W.length-1];this.nextAudioPts=ce=z+G*Xe.duration;var Ye=U?new Uint8Array(0):g.default.moof(b.sequenceNumber++,Y/G,h({},b,{samples:W}));b.samples=[];var Ie=Y/k,He=ce/k,Ae="audio",Te={data1:Ye,data2:$,startPTS:Ie,endPTS:He,startDTS:Ie,endDTS:He,type:Ae,hasAudio:!0,hasVideo:!1,nb:Se};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),Te},D.remuxEmptyAudio=function(b,E,C,F){var j=b.inputTimeScale,k=b.samplerate?b.samplerate:j,X=j/k,G=this.nextAudioPts,H=(G!==null?G:F.startDTS*j)+this._initDTS,K=F.endDTS*j+this._initDTS,B=X*f,U=Math.ceil((K-H)/B),W=S.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);if(o.logger.warn("[mp4-remuxer]: remux empty Audio"),!W){o.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Q=[],ie=0;ie<U;ie++){var ce=H+ie*B;Q.push({unit:W,pts:ce,dts:ce})}return b.samples=Q,this.remuxAudio(b,E,C,!1)},D.remuxID3=function(b,E){var C=b.samples.length;if(!C)return;for(var F=b.inputTimeScale,j=this._initPTS,k=this._initDTS,X=0;X<C;X++){var G=b.samples[X];G.pts=u(G.pts-j,E*F)/F,G.dts=u(G.dts-k,E*F)/F}var H=b.samples;return b.samples=[],{samples:H}},D.remuxText=function(b,E){var C=b.samples.length;if(!C)return;for(var F=b.inputTimeScale,j=this._initPTS,k=0;k<C;k++){var X=b.samples[k];X.pts=u(X.pts-j,E*F)/F}b.samples.sort(function(H,K){return H.pts-K.pts});var G=b.samples;return b.samples=[],{samples:G}},R}();function u(R,D){var c;if(D===null)return R;for(D<R?c=-8589934592:c=8589934592;Math.abs(R-D)>4294967296;)R+=c;return R}function w(R){for(var D=0;D<R.length;D++)if(R[D].key)return D;return-1}var y=function(D,c,b,E){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=c,this.size=b,this.cts=E,this.flags=new a(D)},a=function(D){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=D?2:1,this.isNonSync=D?0:1}},"./src/remux/passthrough-remuxer.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/polyfills/number.ts"),S=T("./src/utils/mp4-tools.ts"),g=T("./src/loader/fragment.ts"),_=T("./src/utils/logger.ts"),d=function(){function r(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var h=r.prototype;return h.destroy=function(){},h.resetTimeStamp=function(f){this.initPTS=f,this.lastEndDTS=null},h.resetNextTimestamp=function(){this.lastEndDTS=null},h.resetInitSegment=function(f,x,v){this.audioCodec=x,this.videoCodec=v,this.generateInitSegment(f),this.emitInitSegment=!0},h.generateInitSegment=function(f){var x=this.audioCodec,v=this.videoCodec;if(!f||!f.byteLength){this.initTracks=void 0,this.initData=void 0;return}var l=this.initData=Object(S.parseInitSegment)(f);x||(x=i(l.audio,g.ElementaryStreamTypes.AUDIO)),v||(v=i(l.video,g.ElementaryStreamTypes.VIDEO));var n={};l.audio&&l.video?n.audiovideo={container:"video/mp4",codec:x+","+v,initSegment:f,id:"main"}:l.audio?n.audio={container:"audio/mp4",codec:x,initSegment:f,id:"audio"}:l.video?n.video={container:"video/mp4",codec:v,initSegment:f,id:"main"}:_.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},h.remux=function(f,x,v,l,n){var s=this.initPTS,u=this.lastEndDTS,w={audio:void 0,video:void 0,text:l,id3:v,initSegment:void 0};Object(L.isFiniteNumber)(u)||(u=this.lastEndDTS=n||0);var y=x.samples;if(!y||!y.length)return w;var a={initPTS:void 0,timescale:1},R=this.initData;if((!R||!R.length)&&(this.generateInitSegment(y),R=this.initData),!R||!R.length)return _.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),w;this.emitInitSegment&&(a.tracks=this.initTracks,this.emitInitSegment=!1),Object(L.isFiniteNumber)(s)||(this.initPTS=a.initPTS=s=o(R,y,u));var D=Object(S.getDuration)(y,R),c=u,b=D+c;Object(S.offsetStartDTS)(R,y,s),D>0?this.lastEndDTS=b:(_.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var E=!!R.audio,C=!!R.video,F="";E&&(F+="audio"),C&&(F+="video");var j={data1:y,startPTS:c,startDTS:c,endPTS:b,endDTS:b,type:F,hasAudio:E,hasVideo:C,nb:1,dropped:0};return w.audio=j.type==="audio"?j:void 0,w.video=j.type!=="audio"?j:void 0,w.text=l,w.id3=v,w.initSegment=a,w},r}(),o=function(h,p,f){return Object(S.getStartDTS)(h,p)-f};function i(r,h){var p=r==null?void 0:r.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||h===g.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}m.default=d},"./src/task-loop.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return L});var L=function(){function S(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var g=S.prototype;return g.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},g.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},g.onHandlerDestroyed=function(){},g.hasInterval=function(){return!!this._tickInterval},g.hasNextTick=function(){return!!this._tickTimer},g.setInterval=function(d){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,d),!0)},g.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},g.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},g.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},g.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},g.doTick=function(){},S}()},"./src/types/cmcd.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"CMCDVersion",function(){return L}),T.d(m,"CMCDObjectType",function(){return S}),T.d(m,"CMCDStreamingFormat",function(){return g}),T.d(m,"CMCDStreamType",function(){return _});var L=1,S;(function(d){d.MANIFEST="m",d.AUDIO="a",d.VIDEO="v",d.MUXED="av",d.INIT="i",d.CAPTION="c",d.TIMED_TEXT="tt",d.KEY="k",d.OTHER="o"})(S||(S={}));var g;(function(d){d.DASH="d",d.HLS="h",d.SMOOTH="s",d.OTHER="o"})(g||(g={}));var _;(function(d){d.VOD="v",d.LIVE="l"})(_||(_={}))},"./src/types/level.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"HlsSkip",function(){return g}),T.d(m,"getSkipValue",function(){return _}),T.d(m,"HlsUrlParameters",function(){return d}),T.d(m,"Level",function(){return o});function L(i,r){for(var h=0;h<r.length;h++){var p=r[h];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}function S(i,r,h){return r&&L(i.prototype,r),h&&L(i,h),i}var g;(function(i){i.No="",i.Yes="YES",i.v2="v2"})(g||(g={}));function _(i,r){var h=i.canSkipUntil,p=i.canSkipDateRanges,f=i.endSN,x=r!==void 0?r-f:0;return h&&x<h?p?g.v2:g.Yes:g.No}var d=function(){function i(h,p,f){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=h,this.part=p,this.skip=f}var r=i.prototype;return r.addDirectives=function(p){var f=new self.URL(p);return this.msn!==void 0&&f.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&f.searchParams.set("_HLS_part",this.part.toString()),this.skip&&f.searchParams.set("_HLS_skip",this.skip),f.toString()},i}(),o=function(){function i(r){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[r.url],this.attrs=r.attrs,this.bitrate=r.bitrate,r.details&&(this.details=r.details),this.id=r.id||0,this.name=r.name,this.width=r.width||0,this.height=r.height||0,this.audioCodec=r.audioCodec,this.videoCodec=r.videoCodec,this.unknownCodecs=r.unknownCodecs,this.codecSet=[r.videoCodec,r.audioCodec].filter(function(h){return h}).join(",").replace(/\.[^.,]+/g,"")}return S(i,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(h){var p=h%this.url.length;this._urlId!==p&&(this.details=void 0,this._urlId=p)}}]),i}()},"./src/types/loader.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"PlaylistContextType",function(){return L}),T.d(m,"PlaylistLevelType",function(){return S});var L;(function(g){g.MANIFEST="manifest",g.LEVEL="level",g.AUDIO_TRACK="audioTrack",g.SUBTITLE_TRACK="subtitleTrack"})(L||(L={}));var S;(function(g){g.MAIN="main",g.AUDIO="audio",g.SUBTITLE="subtitle"})(S||(S={}))},"./src/types/transmuxer.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"ChunkMetadata",function(){return L});var L=function(_,d,o,i,r,h){i===void 0&&(i=0),r===void 0&&(r=-1),h===void 0&&(h=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=S(),this.buffering={audio:S(),video:S(),audiovideo:S()},this.level=_,this.sn=d,this.id=o,this.size=i,this.part=r,this.partial=h};function S(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"AttrList",function(){return g});var L=/^(\d+)x(\d+)$/,S=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,g=function(){function _(o){typeof o=="string"&&(o=_.parseAttrList(o));for(var i in o)o.hasOwnProperty(i)&&(this[i]=o[i])}var d=_.prototype;return d.decimalInteger=function(i){var r=parseInt(this[i],10);return r>Number.MAX_SAFE_INTEGER?Infinity:r},d.hexadecimalInteger=function(i){if(this[i]){var r=(this[i]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var h=new Uint8Array(r.length/2),p=0;p<r.length/2;p++)h[p]=parseInt(r.slice(p*2,p*2+2),16);return h}else return null},d.hexadecimalIntegerAsNumber=function(i){var r=parseInt(this[i],16);return r>Number.MAX_SAFE_INTEGER?Infinity:r},d.decimalFloatingPoint=function(i){return parseFloat(this[i])},d.optionalFloat=function(i,r){var h=this[i];return h?parseFloat(h):r},d.enumeratedString=function(i){return this[i]},d.bool=function(i){return this[i]==="YES"},d.decimalResolution=function(i){var r=L.exec(this[i]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},_.parseAttrList=function(i){var r,h={},p='"';for(S.lastIndex=0;(r=S.exec(i))!==null;){var f=r[2];f.indexOf(p)===0&&f.lastIndexOf(p)===f.length-1&&(f=f.slice(1,-1)),h[r[1]]=f}return h},_}()},"./src/utils/binary-search.ts":function(P,m,T){"use strict";T.r(m);var L={search:function(g,_){for(var d=0,o=g.length-1,i=null,r=null;d<=o;){i=(d+o)/2|0,r=g[i];var h=_(r);if(h>0)d=i+1;else if(h<0)o=i-1;else return r}return null}};m.default=L},"./src/utils/buffer-helper.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"BufferHelper",function(){return g});var L=T("./src/utils/logger.ts"),S={length:0,start:function(){return 0},end:function(){return 0}},g=function(){function _(){}return _.isBuffered=function(o,i){try{if(o){for(var r=_.getBuffered(o),h=0;h<r.length;h++)if(i>=r.start(h)&&i<=r.end(h))return!0}}catch(p){}return!1},_.bufferInfo=function(o,i,r){try{if(o){var h=_.getBuffered(o),p=[],f;for(f=0;f<h.length;f++)p.push({start:h.start(f),end:h.end(f)});return this.bufferedInfo(p,i,r)}}catch(x){}return{len:0,start:i,end:i,nextStart:void 0}},_.bufferedInfo=function(o,i,r){i=Math.max(0,i),o.sort(function(a,R){var D=a.start-R.start;return D||R.end-a.end});var h=[];if(r)for(var p=0;p<o.length;p++){var f=h.length;if(f){var x=h[f-1].end;o[p].start-x<r?o[p].end>x&&(h[f-1].end=o[p].end):h.push(o[p])}else h.push(o[p])}else h=o;for(var v=0,l,n=i,s=i,u=0;u<h.length;u++){var w=h[u].start,y=h[u].end;if(i+r>=w&&i<y)n=w,s=y,v=s-i;else if(i+r<w){l=w;break}}return{len:v,start:n||0,end:s||0,nextStart:l}},_.getBuffered=function(o){try{return o.buffered}catch(i){return L.logger.log("failed to get media.buffered",i),S}},_}()},"./src/utils/cea-608-parser.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"Row",function(){return s}),T.d(m,"CaptionScreen",function(){return u});var L=T("./src/utils/logger.ts"),S={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},g=function(b){var E=b;return S.hasOwnProperty(b)&&(E=S[b]),String.fromCharCode(E)},_=15,d=100,o={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},i={17:2,18:4,21:6,22:8,23:10,19:13,20:15},r={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],f;(function(c){c[c.ERROR=0]="ERROR",c[c.TEXT=1]="TEXT",c[c.WARNING=2]="WARNING",c[c.INFO=2]="INFO",c[c.DEBUG=3]="DEBUG",c[c.DATA=3]="DATA"})(f||(f={}));var x=function(){function c(){this.time=null,this.verboseLevel=f.ERROR}var b=c.prototype;return b.log=function(C,F){this.verboseLevel>=C&&L.logger.log(this.time+" ["+C+"] "+F)},c}(),v=function(b){for(var E=[],C=0;C<b.length;C++)E.push(b[C].toString(16));return E},l=function(){function c(E,C,F,j,k){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=E||"white",this.underline=C||!1,this.italics=F||!1,this.background=j||"black",this.flash=k||!1}var b=c.prototype;return b.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},b.setStyles=function(C){for(var F=["foreground","underline","italics","background","flash"],j=0;j<F.length;j++){var k=F[j];C.hasOwnProperty(k)&&(this[k]=C[k])}},b.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},b.equals=function(C){return this.foreground===C.foreground&&this.underline===C.underline&&this.italics===C.italics&&this.background===C.background&&this.flash===C.flash},b.copy=function(C){this.foreground=C.foreground,this.underline=C.underline,this.italics=C.italics,this.background=C.background,this.flash=C.flash},b.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},c}(),n=function(){function c(E,C,F,j,k,X){this.uchar=void 0,this.penState=void 0,this.uchar=E||" ",this.penState=new l(C,F,j,k,X)}var b=c.prototype;return b.reset=function(){this.uchar=" ",this.penState.reset()},b.setChar=function(C,F){this.uchar=C,this.penState.copy(F)},b.setPenState=function(C){this.penState.copy(C)},b.equals=function(C){return this.uchar===C.uchar&&this.penState.equals(C.penState)},b.copy=function(C){this.uchar=C.uchar,this.penState.copy(C.penState)},b.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},c}(),s=function(){function c(E){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var C=0;C<d;C++)this.chars.push(new n);this.logger=E,this.pos=0,this.currPenState=new l}var b=c.prototype;return b.equals=function(C){for(var F=!0,j=0;j<d;j++)if(!this.chars[j].equals(C.chars[j])){F=!1;break}return F},b.copy=function(C){for(var F=0;F<d;F++)this.chars[F].copy(C.chars[F])},b.isEmpty=function(){for(var C=!0,F=0;F<d;F++)if(!this.chars[F].isEmpty()){C=!1;break}return C},b.setCursor=function(C){this.pos!==C&&(this.pos=C),this.pos<0?(this.logger.log(f.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>d&&(this.logger.log(f.DEBUG,"Too large cursor position "+this.pos),this.pos=d)},b.moveCursor=function(C){var F=this.pos+C;if(C>1)for(var j=this.pos+1;j<F+1;j++)this.chars[j].setPenState(this.currPenState);this.setCursor(F)},b.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},b.insertChar=function(C){C>=144&&this.backSpace();var F=g(C);if(this.pos>=d){this.logger.log(f.ERROR,"Cannot insert "+C.toString(16)+" ("+F+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(F,this.currPenState),this.moveCursor(1)},b.clearFromPos=function(C){var F;for(F=C;F<d;F++)this.chars[F].reset()},b.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},b.clearToEndOfRow=function(){this.clearFromPos(this.pos)},b.getTextString=function(){for(var C=[],F=!0,j=0;j<d;j++){var k=this.chars[j].uchar;k!==" "&&(F=!1),C.push(k)}return F?"":C.join("")},b.setPenStyles=function(C){this.currPenState.setStyles(C);var F=this.chars[this.pos];F.setPenState(this.currPenState)},c}(),u=function(){function c(E){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var C=0;C<_;C++)this.rows.push(new s(E));this.logger=E,this.currRow=_-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var b=c.prototype;return b.reset=function(){for(var C=0;C<_;C++)this.rows[C].clear();this.currRow=_-1},b.equals=function(C){for(var F=!0,j=0;j<_;j++)if(!this.rows[j].equals(C.rows[j])){F=!1;break}return F},b.copy=function(C){for(var F=0;F<_;F++)this.rows[F].copy(C.rows[F])},b.isEmpty=function(){for(var C=!0,F=0;F<_;F++)if(!this.rows[F].isEmpty()){C=!1;break}return C},b.backSpace=function(){var C=this.rows[this.currRow];C.backSpace()},b.clearToEndOfRow=function(){var C=this.rows[this.currRow];C.clearToEndOfRow()},b.insertChar=function(C){var F=this.rows[this.currRow];F.insertChar(C)},b.setPen=function(C){var F=this.rows[this.currRow];F.setPenStyles(C)},b.moveCursor=function(C){var F=this.rows[this.currRow];F.moveCursor(C)},b.setCursor=function(C){this.logger.log(f.INFO,"setCursor: "+C);var F=this.rows[this.currRow];F.setCursor(C)},b.setPAC=function(C){this.logger.log(f.INFO,"pacData = "+JSON.stringify(C));var F=C.row-1;if(this.nrRollUpRows&&F<this.nrRollUpRows-1&&(F=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==F){for(var j=0;j<_;j++)this.rows[j].clear();var k=this.currRow+1-this.nrRollUpRows,X=this.lastOutputScreen;if(X){var G=X.rows[k].cueStartTime,H=this.logger.time;if(G&&H!==null&&G<H)for(var K=0;K<this.nrRollUpRows;K++)this.rows[F-this.nrRollUpRows+K+1].copy(X.rows[k+K])}}this.currRow=F;var B=this.rows[this.currRow];if(C.indent!==null){var U=C.indent,W=Math.max(U-1,0);B.setCursor(C.indent),C.color=B.chars[W].penState.foreground}var Q={foreground:C.color,underline:C.underline,italics:C.italics,background:"black",flash:!1};this.setPen(Q)},b.setBkgData=function(C){this.logger.log(f.INFO,"bkgData = "+JSON.stringify(C)),this.backSpace(),this.setPen(C),this.insertChar(32)},b.setRollUpRows=function(C){this.nrRollUpRows=C},b.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(f.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(f.TEXT,this.getDisplayText());var C=this.currRow+1-this.nrRollUpRows,F=this.rows.splice(C,1)[0];F.clear(),this.rows.splice(this.currRow,0,F),this.logger.log(f.INFO,"Rolling up")},b.getDisplayText=function(C){C=C||!1;for(var F=[],j="",k=-1,X=0;X<_;X++){var G=this.rows[X].getTextString();G&&(k=X+1,C?F.push("Row "+k+": '"+G+"'"):F.push(G.trim()))}return F.length>0&&(C?j="["+F.join(" | ")+"]":j=F.join(`
`)),j},b.getTextAndFormat=function(){return this.rows},c}(),w=function(){function c(E,C,F){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=E,this.outputFilter=C,this.mode=null,this.verbose=0,this.displayedMemory=new u(F),this.nonDisplayedMemory=new u(F),this.lastOutputScreen=new u(F),this.currRollUpRow=this.displayedMemory.rows[_-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=F}var b=c.prototype;return b.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[_-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},b.getHandler=function(){return this.outputFilter},b.setHandler=function(C){this.outputFilter=C},b.setPAC=function(C){this.writeScreen.setPAC(C)},b.setBkgData=function(C){this.writeScreen.setBkgData(C)},b.setMode=function(C){if(C===this.mode)return;this.mode=C,this.logger.log(f.INFO,"MODE="+C),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=C},b.insertChars=function(C){for(var F=0;F<C.length;F++)this.writeScreen.insertChar(C[F]);var j=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(f.INFO,j+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(f.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},b.ccRCL=function(){this.logger.log(f.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},b.ccBS=function(){if(this.logger.log(f.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},b.ccAOF=function(){},b.ccAON=function(){},b.ccDER=function(){this.logger.log(f.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},b.ccRU=function(C){this.logger.log(f.INFO,"RU("+C+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(C)},b.ccFON=function(){this.logger.log(f.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},b.ccRDC=function(){this.logger.log(f.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},b.ccTR=function(){this.logger.log(f.INFO,"TR"),this.setMode("MODE_TEXT")},b.ccRTD=function(){this.logger.log(f.INFO,"RTD"),this.setMode("MODE_TEXT")},b.ccEDM=function(){this.logger.log(f.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},b.ccCR=function(){this.logger.log(f.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},b.ccENM=function(){this.logger.log(f.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},b.ccEOC=function(){if(this.logger.log(f.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var C=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=C,this.writeScreen=this.nonDisplayedMemory,this.logger.log(f.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},b.ccTO=function(C){this.logger.log(f.INFO,"TO("+C+") - Tab Offset"),this.writeScreen.moveCursor(C)},b.ccMIDROW=function(C){var F={flash:!1};if(F.underline=C%2===1,F.italics=C>=46,F.italics)F.foreground="white";else{var j=Math.floor(C/2)-16,k=["white","green","blue","cyan","red","yellow","magenta"];F.foreground=k[j]}this.logger.log(f.INFO,"MIDROW: "+JSON.stringify(F)),this.writeScreen.setPen(F)},b.outputDataUpdate=function(C){C===void 0&&(C=!1);var F=this.logger.time;if(F===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=F:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,F,this.lastOutputScreen),C&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:F),this.lastOutputScreen.copy(this.displayedMemory))},b.cueSplitAtTime=function(C){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,C,this.displayedMemory),this.cueStartTime=C))},c}(),y=function(){function c(E,C,F){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var j=new x;this.channels=[null,new w(E,C,j),new w(E+1,F,j)],this.cmdHistory=D(),this.logger=j}var b=c.prototype;return b.getHandler=function(C){return this.channels[C].getHandler()},b.setHandler=function(C,F){this.channels[C].setHandler(F)},b.addData=function(C,F){var j,k,X,G=!1;this.logger.time=C;for(var H=0;H<F.length;H+=2){if(k=F[H]&127,X=F[H+1]&127,k===0&&X===0)continue;if(this.logger.log(f.DATA,"["+v([F[H],F[H+1]])+"] -> ("+v([k,X])+")"),j=this.parseCmd(k,X),j||(j=this.parseMidrow(k,X)),j||(j=this.parsePAC(k,X)),j||(j=this.parseBackgroundAttributes(k,X)),!j&&(G=this.parseChars(k,X),G)){var K=this.currentChannel;if(K&&K>0){var B=this.channels[K];B.insertChars(G)}else this.logger.log(f.WARNING,"No channel found yet. TEXT-MODE?")}!j&&!G&&this.logger.log(f.WARNING,"Couldn't parse cleaned data "+v([k,X])+" orig: "+v([F[H],F[H+1]]))}},b.parseCmd=function(C,F){var j=this.cmdHistory,k=(C===20||C===28||C===21||C===29)&&F>=32&&F<=47,X=(C===23||C===31)&&F>=33&&F<=35;if(!(k||X))return!1;if(R(C,F,j))return a(null,null,j),this.logger.log(f.DEBUG,"Repeated command ("+v([C,F])+") is dropped"),!0;var G=C===20||C===21||C===23?1:2,H=this.channels[G];return C===20||C===21||C===28||C===29?F===32?H.ccRCL():F===33?H.ccBS():F===34?H.ccAOF():F===35?H.ccAON():F===36?H.ccDER():F===37?H.ccRU(2):F===38?H.ccRU(3):F===39?H.ccRU(4):F===40?H.ccFON():F===41?H.ccRDC():F===42?H.ccTR():F===43?H.ccRTD():F===44?H.ccEDM():F===45?H.ccCR():F===46?H.ccENM():F===47&&H.ccEOC():H.ccTO(F-32),a(C,F,j),this.currentChannel=G,!0},b.parseMidrow=function(C,F){var j=0;if((C===17||C===25)&&F>=32&&F<=47){if(C===17?j=1:j=2,j!==this.currentChannel)return this.logger.log(f.ERROR,"Mismatch channel in midrow parsing"),!1;var k=this.channels[j];return k?(k.ccMIDROW(F),this.logger.log(f.DEBUG,"MIDROW ("+v([C,F])+")"),!0):!1}return!1},b.parsePAC=function(C,F){var j,k=this.cmdHistory,X=(C>=17&&C<=23||C>=25&&C<=31)&&F>=64&&F<=127,G=(C===16||C===24)&&F>=64&&F<=95;if(!(X||G))return!1;if(R(C,F,k))return a(null,null,k),!0;var H=C<=23?1:2;F>=64&&F<=95?j=H===1?o[C]:r[C]:j=H===1?i[C]:h[C];var K=this.channels[H];return K?(K.setPAC(this.interpretPAC(j,F)),a(C,F,k),this.currentChannel=H,!0):!1},b.interpretPAC=function(C,F){var j,k={color:null,italics:!1,indent:null,underline:!1,row:C};return F>95?j=F-96:j=F-64,k.underline=(j&1)===1,j<=13?k.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(j/2)]:j<=15?(k.italics=!0,k.color="white"):k.indent=Math.floor((j-16)/2)*4,k},b.parseChars=function(C,F){var j,k=null,X=null;if(C>=25?(j=2,X=C-8):(j=1,X=C),X>=17&&X<=19){var G;X===17?G=F+80:X===18?G=F+112:G=F+144,this.logger.log(f.INFO,"Special char '"+g(G)+"' in channel "+j),k=[G]}else C>=32&&C<=127&&(k=F===0?[C]:[C,F]);if(k){var H=v(k);this.logger.log(f.DEBUG,"Char codes = "+H.join(",")),a(C,F,this.cmdHistory)}return k},b.parseBackgroundAttributes=function(C,F){var j=(C===16||C===24)&&F>=32&&F<=47,k=(C===23||C===31)&&F>=45&&F<=47;if(!(j||k))return!1;var X,G={};C===16||C===24?(X=Math.floor((F-32)/2),G.background=p[X],F%2===1&&(G.background=G.background+"_semi")):F===45?G.background="transparent":(G.foreground="black",F===47&&(G.underline=!0));var H=C<=23?1:2,K=this.channels[H];return K.setBkgData(G),a(C,F,this.cmdHistory),!0},b.reset=function(){for(var C=0;C<Object.keys(this.channels).length;C++){var F=this.channels[C];F&&F.reset()}this.cmdHistory=D()},b.cueSplitAtTime=function(C){for(var F=0;F<this.channels.length;F++){var j=this.channels[F];j&&j.cueSplitAtTime(C)}},c}();function a(c,b,E){E.a=c,E.b=b}function R(c,b,E){return E.a===c&&E.b===b}function D(){return{a:null,b:null}}m.default=y},"./src/utils/codecs.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"isCodecType",function(){return S}),T.d(m,"isCodecSupportedInMp4",function(){return g});var L={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 S(_,d){var o=L[d];return!!o&&o[_.slice(0,4)]===!0}function g(_,d){return MediaSource.isTypeSupported((d||"video")+'/mp4;codecs="'+_+'"')}},"./src/utils/cues.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/utils/vttparser.ts"),S=T("./src/utils/webvtt-parser.ts"),g=T("./src/utils/texttrack-utils.ts"),_=/\s/,d={newCue:function(i,r,h,p){for(var f=[],x,v,l,n,s,u=self.VTTCue||self.TextTrackCue,w=0;w<p.rows.length;w++)if(x=p.rows[w],l=!0,n=0,s="",!x.isEmpty()){for(var y=0;y<x.chars.length;y++)_.test(x.chars[y].uchar)&&l?n++:(s+=x.chars[y].uchar,l=!1);x.cueStartTime=r,r===h&&(h+=1e-4),n>=16?n--:n++;var a=Object(L.fixLineBreaks)(s.trim()),R=Object(S.generateCueId)(r,h,a);(!i||!i.cues||!i.cues.getCueById(R))&&(v=new u(r,h,a),v.id=R,v.line=w+1,v.align="left",v.position=10+Math.min(80,Math.floor(n*8/32)*10),f.push(v))}return i&&f.length&&(f.sort(function(D,c){return D.line==="auto"||c.line==="auto"?0:D.line>8&&c.line>8?c.line-D.line:D.line-c.line}),f.forEach(function(D){return Object(g.addCueToTrack)(i,D)})),f}};m.default=d},"./src/utils/discontinuities.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"findFirstFragWithCC",function(){return _}),T.d(m,"shouldAlignOnDiscontinuities",function(){return d}),T.d(m,"findDiscontinuousReferenceFrag",function(){return o}),T.d(m,"adjustSlidingStart",function(){return r}),T.d(m,"alignStream",function(){return h}),T.d(m,"alignPDT",function(){return f}),T.d(m,"alignFragmentByPDTDelta",function(){return x}),T.d(m,"alignMediaPlaylistByPDT",function(){return v});var L=T("./src/polyfills/number.ts"),S=T("./src/utils/logger.ts"),g=T("./src/controller/level-helper.ts");function _(l,n){for(var s=null,u=0,w=l.length;u<w;u++){var y=l[u];if(y&&y.cc===n){s=y;break}}return s}function d(l,n,s){return!!(n.details&&(s.endCC>s.startCC||l&&l.cc<s.startCC))}function o(l,n){var s=l.fragments,u=n.fragments;if(!u.length||!s.length){S.logger.log("No fragments to align");return}var w=_(s,u[0].cc);if(!w||w&&!w.startPTS){S.logger.log("No frag in previous level to align on");return}return w}function i(l,n){if(l){var s=l.start+n;l.start=l.startPTS=s,l.endPTS=s+l.duration}}function r(l,n){for(var s=n.fragments,u=0,w=s.length;u<w;u++)i(s[u],l);n.fragmentHint&&i(n.fragmentHint,l),n.alignedSliding=!0}function h(l,n,s){if(!n)return;p(l,s,n),!s.alignedSliding&&n.details&&f(s,n.details),!s.alignedSliding&&n.details&&!s.skippedSegments&&Object(g.adjustSliding)(n.details,s)}function p(l,n,s){if(d(l,s,n)){var u=o(s.details,n);u&&Object(L.isFiniteNumber)(u.start)&&(S.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),r(u.start,n))}}function f(l,n){if(!n.fragments.length||!l.hasProgramDateTime||!n.hasProgramDateTime)return;var s=n.fragments[0].programDateTime,u=l.fragments[0].programDateTime,w=(u-s)/1e3+n.fragments[0].start;w&&Object(L.isFiniteNumber)(w)&&(S.logger.log("Adjusting PTS using programDateTime delta "+(u-s)+"ms, sliding:"+w.toFixed(3)+" "+l.url+" "),r(w,l))}function x(l,n){var s=l.programDateTime;if(!s)return;var u=(s-n)/1e3;l.start=l.startPTS=u,l.endPTS=u+l.duration}function v(l,n){if(!n.fragments.length||!l.hasProgramDateTime||!n.hasProgramDateTime)return;var s=n.fragments[0].programDateTime,u=n.fragments[0].start,w=s-u*1e3;l.fragments.forEach(function(y){x(y,w)}),l.fragmentHint&&x(l.fragmentHint,w),l.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/utils/ewma.ts"),S=function(){function g(d,o,i){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new L.default(d),this.fast_=new L.default(o)}var _=g.prototype;return _.update=function(o,i){var r=this.slow_,h=this.fast_;this.slow_.halfLife!==o&&(this.slow_=new L.default(o,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==i&&(this.fast_=new L.default(i,h.getEstimate(),h.getTotalWeight()))},_.sample=function(o,i){o=Math.max(o,this.minDelayMs_);var r=8*i,h=o/1e3,p=r/h;this.fast_.sample(h,p),this.slow_.sample(h,p)},_.canEstimate=function(){var o=this.fast_;return o&&o.getTotalWeight()>=this.minWeight_},_.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},_.destroy=function(){},g}();m.default=S},"./src/utils/ewma.ts":function(P,m,T){"use strict";T.r(m);var L=function(){function S(_,d,o){d===void 0&&(d=0),o===void 0&&(o=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=_,this.alpha_=_?Math.exp(Math.log(.5)/_):0,this.estimate_=d,this.totalWeight_=o}var g=S.prototype;return g.sample=function(d,o){var i=Math.pow(this.alpha_,d);this.estimate_=o*(1-i)+i*this.estimate_,this.totalWeight_+=d},g.getTotalWeight=function(){return this.totalWeight_},g.getEstimate=function(){if(this.alpha_){var d=1-Math.pow(this.alpha_,this.totalWeight_);if(d)return this.estimate_/d}return this.estimate_},S}();m.default=L},"./src/utils/fetch-loader.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"fetchSupported",function(){return x});var L=T("./src/polyfills/number.ts"),S=T("./src/loader/load-stats.ts"),g=T("./src/demux/chunk-cache.ts");function _(u,w){u.prototype=Object.create(w.prototype),u.prototype.constructor=u,h(u,w)}function d(u){var w=typeof Map=="function"?new Map:void 0;return d=function(a){if(a===null||!r(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof w!="undefined"){if(w.has(a))return w.get(a);w.set(a,R)}function R(){return o(a,arguments,p(this).constructor)}return R.prototype=Object.create(a.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),h(R,a)},d(u)}function o(u,w,y){return i()?o=Reflect.construct:o=function(R,D,c){var b=[null];b.push.apply(b,D);var E=Function.bind.apply(R,b),C=new E;return c&&h(C,c.prototype),C},o.apply(null,arguments)}function i(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(u){return!1}}function r(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function h(u,w){return h=Object.setPrototypeOf||function(a,R){return a.__proto__=R,a},h(u,w)}function p(u){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},p(u)}function f(){return f=Object.assign||function(u){for(var w=1;w<arguments.length;w++){var y=arguments[w];for(var a in y)Object.prototype.hasOwnProperty.call(y,a)&&(u[a]=y[a])}return u},f.apply(this,arguments)}function x(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(u){}return!1}var v=function(){function u(y){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=y.fetchSetup||n,this.controller=new self.AbortController,this.stats=new S.LoadStats}var w=u.prototype;return w.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},w.abortInternal=function(){var a=this.response;(!a||!a.ok)&&(this.stats.aborted=!0,this.controller.abort())},w.abort=function(){var a;this.abortInternal(),(a=this.callbacks)!==null&&a!==void 0&&a.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},w.load=function(a,R,D){var c=this,b=this.stats;if(b.loading.start)throw new Error("Loader can only be used once.");b.loading.start=self.performance.now();var E=l(a,this.controller.signal),C=D.onProgress,F=a.responseType==="arraybuffer",j=F?"byteLength":"length";this.context=a,this.config=R,this.callbacks=D,this.request=this.fetchSetup(a,E),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){c.abortInternal(),D.onTimeout(b,a,c.response)},R.timeout),self.fetch(this.request).then(function(k){if(c.response=c.loader=k,!k.ok){var X=k.status,G=k.statusText;throw new s(G||"fetch, bad network response",X,k)}return b.loading.first=Math.max(self.performance.now(),b.loading.start),b.total=parseInt(k.headers.get("Content-Length")||"0"),C&&Object(L.isFiniteNumber)(R.highWaterMark)?c.loadProgressively(k,b,a,R.highWaterMark,C):F?k.arrayBuffer():k.text()}).then(function(k){var X=c.response;self.clearTimeout(c.requestTimeout),b.loading.end=Math.max(self.performance.now(),b.loading.first),b.loaded=b.total=k[j];var G={url:X.url,data:k};C&&!Object(L.isFiniteNumber)(R.highWaterMark)&&C(b,a,k,X),D.onSuccess(G,b,a,X)}).catch(function(k){if(self.clearTimeout(c.requestTimeout),b.aborted)return;var X=k.code||0;D.onError({code:X,text:k.message},a,k.details)})},w.getCacheAge=function(){var a=null;if(this.response){var R=this.response.headers.get("age");a=R?parseFloat(R):null}return a},w.loadProgressively=function(a,R,D,c,b){c===void 0&&(c=0);var E=new g.default,C=a.body.getReader(),F=function j(){return C.read().then(function(k){if(k.done)return E.dataLength&&b(R,D,E.flush(),a),Promise.resolve(new ArrayBuffer(0));var X=k.value,G=X.length;return R.loaded+=G,G<c||E.dataLength?(E.push(X),E.dataLength>=c&&b(R,D,E.flush(),a)):b(R,D,X,a),j()}).catch(function(){return Promise.reject()})};return F()},u}();function l(u,w){var y={method:"GET",mode:"cors",credentials:"same-origin",signal:w,headers:new self.Headers(f({},u.headers))};return u.rangeEnd&&y.headers.set("Range","bytes="+u.rangeStart+"-"+String(u.rangeEnd-1)),y}function n(u,w){return new self.Request(u.url,w)}var s=function(u){_(w,u);function w(y,a,R){var D;return D=u.call(this,y)||this,D.code=void 0,D.details=void 0,D.code=a,D.details=R,D}return w}(d(Error));m.default=v},"./src/utils/imsc1-ttml-parser.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"IMSC1_CODEC",function(){return r}),T.d(m,"parseIMSC1",function(){return x});var L=T("./src/utils/mp4-tools.ts"),S=T("./src/utils/vttparser.ts"),g=T("./src/utils/vttcue.ts"),_=T("./src/demux/id3.ts"),d=T("./src/utils/timescale-conversion.ts"),o=T("./src/utils/webvtt-parser.ts");function i(){return i=Object.assign||function(c){for(var b=1;b<arguments.length;b++){var E=arguments[b];for(var C in E)Object.prototype.hasOwnProperty.call(E,C)&&(c[C]=E[C])}return c},i.apply(this,arguments)}var r="stpp.ttml.im1t",h=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,p=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,f={left:"start",center:"center",right:"end",start:"start",end:"end"};function x(c,b,E,C,F){var j=Object(L.findBox)(new Uint8Array(c),["mdat"]);if(j.length===0){F(new Error("Could not parse IMSC1 mdat"));return}var k=j[0],X=Object(_.utf8ArrayToStr)(new Uint8Array(c,k.start,k.end-k.start)),G=Object(d.toTimescaleFromScale)(b,1,E);try{C(v(X,G))}catch(H){F(H)}}function v(c,b){var E=new DOMParser,C=E.parseFromString(c,"text/xml"),F=C.getElementsByTagName("tt")[0];if(!F)throw new Error("Invalid ttml");var j={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},k=Object.keys(j).reduce(function(B,U){return B[U]=F.getAttribute("ttp:"+U)||j[U],B},{}),X=F.getAttribute("xml:space")!=="preserve",G=n(l(F,"styling","style")),H=n(l(F,"layout","region")),K=l(F,"body","[begin]");return[].map.call(K,function(B){var U=s(B,X);if(!U||!B.hasAttribute("begin"))return null;var W=a(B.getAttribute("begin"),k),Q=a(B.getAttribute("dur"),k),ie=a(B.getAttribute("end"),k);if(W===null)throw y(B);if(ie===null){if(Q===null)throw y(B);ie=W+Q}var ce=new g.default(W-b,ie-b,U);ce.id=Object(o.generateCueId)(ce.startTime,ce.endTime,ce.text);var he=H[B.getAttribute("region")],be=G[B.getAttribute("style")];ce.position=10,ce.size=80;var ne=u(he,be),le=ne.textAlign;if(le){var ue=f[le];ue&&(ce.lineAlign=ue),ce.align=le}return i(ce,ne),ce}).filter(function(B){return B!==null})}function l(c,b,E){var C=c.getElementsByTagName(b)[0];return C?[].slice.call(C.querySelectorAll(E)):[]}function n(c){return c.reduce(function(b,E){var C=E.getAttribute("xml:id");return C&&(b[C]=E),b},{})}function s(c,b){return[].slice.call(c.childNodes).reduce(function(E,C,F){var j;return C.nodeName==="br"&&F?E+`
`:(j=C.childNodes)!==null&&j!==void 0&&j.length?s(C,b):b?E+C.textContent.trim().replace(/\s+/g," "):E+C.textContent},"")}function u(c,b){var E="http://www.w3.org/ns/ttml#styling",C=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return C.reduce(function(F,j){var k=w(b,E,j)||w(c,E,j);return k&&(F[j]=k),F},{})}function w(c,b,E){return c.hasAttributeNS(b,E)?c.getAttributeNS(b,E):null}function y(c){return new Error("Could not parse ttml timestamp "+c)}function a(c,b){if(!c)return null;var E=Object(S.parseTimeStamp)(c);return E===null&&(h.test(c)?E=R(c,b):p.test(c)&&(E=D(c,b))),E}function R(c,b){var E=h.exec(c),C=(E[4]|0)+(E[5]|0)/b.subFrameRate;return(E[1]|0)*3600+(E[2]|0)*60+(E[3]|0)+C/b.frameRate}function D(c,b){var E=p.exec(c),C=Number(E[1]),F=E[2];switch(F){case"h":return C*3600;case"m":return C*60;case"ms":return C*1e3;case"f":return C/b.frameRate;case"t":return C/b.tickRate}return C}},"./src/utils/logger.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"enableLogs",function(){return o}),T.d(m,"logger",function(){return i});var L=function(){},S={trace:L,debug:L,log:L,warn:L,info:L,error:L},g=S;function _(r){var h=self.console[r];return h?h.bind(self.console,"["+r+"] >"):L}function d(r){for(var h=arguments.length,p=new Array(h>1?h-1:0),f=1;f<h;f++)p[f-1]=arguments[f];p.forEach(function(x){g[x]=r[x]?r[x].bind(r):_(x)})}function o(r){if(self.console&&r===!0||typeof r=="object"){d(r,"debug","log","info","warn","error");try{g.log()}catch(h){g=S}}else g=S}var i=g},"./src/utils/mediakeys-helper.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"KeySystems",function(){return L}),T.d(m,"requestMediaKeySystemAccess",function(){return S});var L;(function(g){g.WIDEVINE="com.widevine.alpha",g.PLAYREADY="com.microsoft.playready"})(L||(L={}));var S=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"getMediaSource",function(){return L});function L(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"bin2str",function(){return d}),T.d(m,"readUint16",function(){return o}),T.d(m,"readUint32",function(){return i}),T.d(m,"writeUint32",function(){return r}),T.d(m,"findBox",function(){return h}),T.d(m,"parseSegmentIndex",function(){return p}),T.d(m,"parseInitSegment",function(){return f}),T.d(m,"getStartDTS",function(){return x}),T.d(m,"getDuration",function(){return v}),T.d(m,"computeRawDurationFromSamples",function(){return l}),T.d(m,"offsetStartDTS",function(){return n}),T.d(m,"segmentValidRange",function(){return s}),T.d(m,"appendUint8Array",function(){return u});var L=T("./src/utils/typed-array.ts"),S=T("./src/loader/fragment.ts"),g=Math.pow(2,32)-1,_=[].push;function d(w){return String.fromCharCode.apply(null,w)}function o(w,y){"data"in w&&(y+=w.start,w=w.data);var a=w[y]<<8|w[y+1];return a<0?65536+a:a}function i(w,y){"data"in w&&(y+=w.start,w=w.data);var a=w[y]<<24|w[y+1]<<16|w[y+2]<<8|w[y+3];return a<0?4294967296+a:a}function r(w,y,a){"data"in w&&(y+=w.start,w=w.data),w[y]=a>>24,w[y+1]=a>>16&255,w[y+2]=a>>8&255,w[y+3]=a&255}function h(w,y){var a=[];if(!y.length)return a;var R,D,c;"data"in w?(R=w.data,D=w.start,c=w.end):(R=w,D=0,c=R.byteLength);for(var b=D;b<c;){var E=i(R,b),C=d(R.subarray(b+4,b+8)),F=E>1?b+E:c;if(C===y[0])if(y.length===1)a.push({data:R,start:b+8,end:F});else{var j=h({data:R,start:b+8,end:F},y.slice(1));j.length&&_.apply(a,j)}b=F}return a}function p(w){var y=h(w,["moov"]),a=y[0],R=a?a.end:null,D=h(w,["sidx"]);if(!D||!D[0])return null;var c=[],b=D[0],E=b.data[0],C=E===0?8:16,F=i(b,C);C+=4;var j=0,k=0;E===0?C+=8:C+=16,C+=2;var X=b.end+k,G=o(b,C);C+=2;for(var H=0;H<G;H++){var K=C,B=i(b,K);K+=4;var U=B&2147483647,W=(B&2147483648)>>>31;if(W===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Q=i(b,K);K+=4,c.push({referenceSize:U,subsegmentDuration:Q,info:{duration:Q/F,start:X,end:X+U-1}}),X+=U,K+=4,C=K}return{earliestPresentationTime:j,timescale:F,version:E,referencesCount:G,references:c,moovEndOffset:R}}function f(w){for(var y=[],a=h(w,["moov","trak"]),R=0;R<a.length;R++){var D=a[R],c=h(D,["tkhd"])[0];if(c){var b=c.data[c.start],E=b===0?12:20,C=i(c,E),F=h(D,["mdia","mdhd"])[0];if(F){b=F.data[F.start],E=b===0?12:20;var j=i(F,E),k=h(D,["mdia","hdlr"])[0];if(k){var X=d(k.data.subarray(k.start+8,k.start+12)),G={soun:S.ElementaryStreamTypes.AUDIO,vide:S.ElementaryStreamTypes.VIDEO}[X];if(G){var H=h(D,["mdia","minf","stbl","stsd"])[0],K=void 0;H&&(K=d(H.data.subarray(H.start+12,H.start+16))),y[C]={timescale:j,type:G},y[G]={timescale:j,id:C,codec:K}}}}}}var B=h(w,["moov","mvex","trex"]);return B.forEach(function(U){var W=i(U,4),Q=y[W];Q&&(Q.default={duration:i(U,12),flags:i(U,20)})}),y}function x(w,y){return h(y,["moof","traf"]).reduce(function(a,R){var D=h(R,["tfdt"])[0],c=D.data[D.start],b=h(R,["tfhd"]).reduce(function(E,C){var F=i(C,4),j=w[F];if(j){var k=i(D,4);c===1&&(k*=Math.pow(2,32),k+=i(D,8));var X=j.timescale||9e4,G=k/X;if(isFinite(G)&&(E===null||G<E))return G}return E},null);return b!==null&&isFinite(b)&&(a===null||b<a)?b:a},null)||0}function v(w,y){for(var a=0,R=0,D=0,c=h(w,["moof","traf"]),b=0;b<c.length;b++){var E=c[b],C=h(E,["tfhd"])[0],F=i(C,4),j=y[F];if(!j)continue;var k=j.default,X=i(C,0)|(k==null?void 0:k.flags),G=k==null?void 0:k.duration;X&8&&(X&2?G=i(C,12):G=i(C,8));for(var H=j.timescale||9e4,K=h(E,["trun"]),B=0;B<K.length;B++){if(G){var U=i(K[B],4);a=G*U}else a=l(K[B]);j.type===S.ElementaryStreamTypes.VIDEO?R+=a/H:j.type===S.ElementaryStreamTypes.AUDIO&&(D+=a/H)}}if(R===0&&D===0){var W=p(w);if(W!=null&&W.references)return W.references.reduce(function(Q,ie){return Q+ie.info.duration||0},0)}return R||D}function l(w){var y=i(w,0),a=8;y&1&&(a+=4),y&4&&(a+=4);for(var R=0,D=i(w,4),c=0;c<D;c++){if(y&256){var b=i(w,a);R+=b,a+=4}y&512&&(a+=4),y&1024&&(a+=4),y&2048&&(a+=4)}return R}function n(w,y,a){h(y,["moof","traf"]).forEach(function(R){h(R,["tfhd"]).forEach(function(D){var c=i(D,4),b=w[c];if(!b)return;var E=b.timescale||9e4;h(R,["tfdt"]).forEach(function(C){var F=C.data[C.start],j=i(C,4);if(F===0)r(C,4,j-a*E);else{j*=Math.pow(2,32),j+=i(C,8),j-=a*E,j=Math.max(j,0);var k=Math.floor(j/(g+1)),X=Math.floor(j%(g+1));r(C,4,k),r(C,8,X)}})})})}function s(w){var y={valid:null,remainder:null},a=h(w,["moof"]);if(a){if(a.length<2)return y.remainder=w,y}else return y;var R=a[a.length-1];return y.valid=Object(L.sliceUint8)(w,0,R.start-8),y.remainder=Object(L.sliceUint8)(w,R.start-8),y}function u(w,y){var a=new Uint8Array(w.length+y.length);return a.set(w),a.set(y,w.length),a}},"./src/utils/output-filter.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return L});var L=function(){function S(_,d){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=_,this.trackName=d}var g=S.prototype;return g.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},g.newCue=function(d,o,i){(this.startTime===null||this.startTime>d)&&(this.startTime=d),this.endTime=o,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)},g.reset=function(){this.cueRanges=[]},S}()},"./src/utils/texttrack-utils.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"sendAddTrackEvent",function(){return S}),T.d(m,"addCueToTrack",function(){return g}),T.d(m,"clearCurrentCues",function(){return _}),T.d(m,"removeCuesInRange",function(){return d}),T.d(m,"getCuesInRange",function(){return i});var L=T("./src/utils/logger.ts");function S(r,h){var p;try{p=new Event("addtrack")}catch(f){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=r,h.dispatchEvent(p)}function g(r,h){var p=r.mode;if(p==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(h.id))try{if(r.addCue(h),!r.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(x){L.logger.debug("[texttrack-utils]: "+x);var f=new self.TextTrackCue(h.startTime,h.endTime,h.text);f.id=h.id,r.addCue(f)}p==="disabled"&&(r.mode=p)}function _(r){var h=r.mode;if(h==="disabled"&&(r.mode="hidden"),r.cues)for(var p=r.cues.length;p--;)r.removeCue(r.cues[p]);h==="disabled"&&(r.mode=h)}function d(r,h,p){var f=r.mode;if(f==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var x=i(r.cues,h,p),v=0;v<x.length;v++)r.removeCue(x[v]);f==="disabled"&&(r.mode=f)}function o(r,h){if(h<r[0].startTime)return 0;var p=r.length-1;if(h>r[p].endTime)return-1;for(var f=0,x=p;f<=x;){var v=Math.floor((x+f)/2);if(h<r[v].startTime)x=v-1;else if(h>r[v].startTime&&f<p)f=v+1;else return v}return r[f].startTime-h<h-r[x].startTime?f:x}function i(r,h,p){var f=[],x=o(r,h);if(x>-1)for(var v=x,l=r.length;v<l;v++){var n=r[v];if(n.startTime>=h&&n.endTime<=p)f.push(n);else if(n.startTime>p)return f}return f}},"./src/utils/time-ranges.ts":function(P,m,T){"use strict";T.r(m);var L={toString:function(g){for(var _="",d=g.length,o=0;o<d;o++)_+="["+g.start(o).toFixed(3)+","+g.end(o).toFixed(3)+"]";return _}};m.default=L},"./src/utils/timescale-conversion.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"toTimescaleFromBase",function(){return S}),T.d(m,"toTimescaleFromScale",function(){return g}),T.d(m,"toMsFromMpegTsClock",function(){return _}),T.d(m,"toMpegTsClockFromTimescale",function(){return d});var L=9e4;function S(o,i,r,h){r===void 0&&(r=1),h===void 0&&(h=!1);var p=o*i*r;return h?Math.round(p):p}function g(o,i,r,h){return r===void 0&&(r=1),h===void 0&&(h=!1),S(o,i,1/r,h)}function _(o,i){return i===void 0&&(i=!1),S(o,1e3,1/L,i)}function d(o,i){return i===void 0&&(i=1),S(o,L,1/i)}},"./src/utils/typed-array.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"sliceUint8",function(){return L});function L(S,g,_){return Uint8Array.prototype.slice?S.slice(g,_):new Uint8Array(Array.prototype.slice.call(S,g,_))}},"./src/utils/vttcue.ts":function(P,m,T){"use strict";T.r(m),m.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var L=["","lr","rl"],S=["start","middle","end","left","right"];function g(r,h){if(typeof h!="string")return!1;if(!Array.isArray(r))return!1;var p=h.toLowerCase();return~r.indexOf(p)?p:!1}function _(r){return g(L,r)}function d(r){return g(S,r)}function o(r){for(var h=arguments.length,p=new Array(h>1?h-1:0),f=1;f<h;f++)p[f-1]=arguments[f];for(var x=1;x<arguments.length;x++){var v=arguments[x];for(var l in v)r[l]=v[l]}return r}function i(r,h,p){var f=this,x={enumerable:!0};f.hasBeenReset=!1;var v="",l=!1,n=r,s=h,u=p,w=null,y="",a=!0,R="auto",D="start",c=50,b="middle",E=50,C="middle";Object.defineProperty(f,"id",o({},x,{get:function(){return v},set:function(j){v=""+j}})),Object.defineProperty(f,"pauseOnExit",o({},x,{get:function(){return l},set:function(j){l=!!j}})),Object.defineProperty(f,"startTime",o({},x,{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(f,"endTime",o({},x,{get:function(){return s},set:function(j){if(typeof j!="number")throw new TypeError("End time must be set to a number.");s=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"text",o({},x,{get:function(){return u},set:function(j){u=""+j,this.hasBeenReset=!0}})),Object.defineProperty(f,"region",o({},x,{get:function(){return w},set:function(j){w=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"vertical",o({},x,{get:function(){return y},set:function(j){var k=_(j);if(k===!1)throw new SyntaxError("An invalid or illegal string was specified.");y=k,this.hasBeenReset=!0}})),Object.defineProperty(f,"snapToLines",o({},x,{get:function(){return a},set:function(j){a=!!j,this.hasBeenReset=!0}})),Object.defineProperty(f,"line",o({},x,{get:function(){return R},set:function(j){if(typeof j!="number"&&j!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");R=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"lineAlign",o({},x,{get:function(){return D},set:function(j){var k=d(j);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");D=k,this.hasBeenReset=!0}})),Object.defineProperty(f,"position",o({},x,{get:function(){return c},set:function(j){if(j<0||j>100)throw new Error("Position must be between 0 and 100.");c=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"positionAlign",o({},x,{get:function(){return b},set:function(j){var k=d(j);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");b=k,this.hasBeenReset=!0}})),Object.defineProperty(f,"size",o({},x,{get:function(){return E},set:function(j){if(j<0||j>100)throw new Error("Size must be between 0 and 100.");E=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"align",o({},x,{get:function(){return C},set:function(j){var k=d(j);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");C=k,this.hasBeenReset=!0}})),f.displayState=void 0}return i.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},i}()},"./src/utils/vttparser.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"parseTimeStamp",function(){return g}),T.d(m,"fixLineBreaks",function(){return h}),T.d(m,"VTTParser",function(){return p});var L=T("./src/utils/vttcue.ts"),S=function(){function f(){}var x=f.prototype;return x.decode=function(l,n){if(!l)return"";if(typeof l!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(l))},f}();function g(f){function x(l,n,s,u){return(l|0)*3600+(n|0)*60+(s|0)+parseFloat(u||0)}var v=f.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return v?parseFloat(v[2])>59?x(v[2],v[3],0,v[4]):x(v[1],v[2],v[3],v[4]):null}var _=function(){function f(){this.values=Object.create(null)}var x=f.prototype;return x.set=function(l,n){!this.get(l)&&n!==""&&(this.values[l]=n)},x.get=function(l,n,s){return s?this.has(l)?this.values[l]:n[s]:this.has(l)?this.values[l]:n},x.has=function(l){return l in this.values},x.alt=function(l,n,s){for(var u=0;u<s.length;++u)if(n===s[u]){this.set(l,n);break}},x.integer=function(l,n){/^-?\d+$/.test(n)&&this.set(l,parseInt(n,10))},x.percent=function(l,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var s=parseFloat(n);if(s>=0&&s<=100)return this.set(l,s),!0}return!1},f}();function d(f,x,v,l){var n=l?f.split(l):[f];for(var s in n){if(typeof n[s]!="string")continue;var u=n[s].split(v);if(u.length!==2)continue;var w=u[0],y=u[1];x(w,y)}}var o=new L.default(0,0,""),i=o.align==="middle"?"middle":"center";function r(f,x,v){var l=f;function n(){var w=g(f);if(w===null)throw new Error("Malformed timestamp: "+l);return f=f.replace(/^[^\sa-zA-Z-]+/,""),w}function s(w,y){var a=new _;d(w,function(c,b){var E;switch(c){case"region":for(var C=v.length-1;C>=0;C--)if(v[C].id===b){a.set(c,v[C].region);break}break;case"vertical":a.alt(c,b,["rl","lr"]);break;case"line":E=b.split(","),a.integer(c,E[0]),a.percent(c,E[0])&&a.set("snapToLines",!1),a.alt(c,E[0],["auto"]),E.length===2&&a.alt("lineAlign",E[1],["start",i,"end"]);break;case"position":E=b.split(","),a.percent(c,E[0]),E.length===2&&a.alt("positionAlign",E[1],["start",i,"end","line-left","line-right","auto"]);break;case"size":a.percent(c,b);break;case"align":a.alt(c,b,["start",i,"end","left","right"]);break}},/:/,/\s/),y.region=a.get("region",null),y.vertical=a.get("vertical","");var R=a.get("line","auto");R==="auto"&&o.line===-1&&(R=-1),y.line=R,y.lineAlign=a.get("lineAlign","start"),y.snapToLines=a.get("snapToLines",!0),y.size=a.get("size",100),y.align=a.get("align",i);var D=a.get("position","auto");D==="auto"&&o.position===50&&(D=y.align==="start"||y.align==="left"?0:y.align==="end"||y.align==="right"?100:50),y.position=D}function u(){f=f.replace(/^\s+/,"")}if(u(),x.startTime=n(),u(),f.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+l);f=f.substr(3),u(),x.endTime=n(),u(),s(f,x)}function h(f){return f.replace(/<br(?: \/)?>/gi,`
`)}var p=function(){function f(){this.state="INITIAL",this.buffer="",this.decoder=new S,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var x=f.prototype;return x.parse=function(l){var n=this;l&&(n.buffer+=n.decoder.decode(l,{stream:!0}));function s(){var D=n.buffer,c=0;for(D=h(D);c<D.length&&D[c]!=="\r"&&D[c]!==`
`;)++c;var b=D.substr(0,c);return D[c]==="\r"&&++c,D[c]===`
`&&++c,n.buffer=D.substr(c),b}function u(D){d(D,function(c,b){},/:/)}try{var w="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;w=s();var y=w.match(/^()?WEBVTT([ \t].*)?$/);if(!y||!y[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var a=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;a?a=!1:w=s();switch(n.state){case"HEADER":/:/.test(w)?u(w):w||(n.state="ID");continue;case"NOTE":w||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(w)){n.state="NOTE";break}if(!w)continue;if(n.cue=new L.default(0,0,""),n.state="CUE",w.indexOf("-->")===-1){n.cue.id=w;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{r(w,n.cue,n.regionList)}catch(D){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var R=w.indexOf("-->")!==-1;if(!w||R&&(a=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=`
`),n.cue.text+=w}continue;case"BADCUE":w||(n.state="ID")}}}catch(D){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},x.flush=function(){var l=this;try{if((l.cue||l.state==="HEADER")&&(l.buffer+=`
`,l.parse()),l.state==="INITIAL"||l.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){l.onparsingerror&&l.onparsingerror(n)}return l.onflush&&l.onflush(),this},f}()},"./src/utils/webvtt-parser.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"generateCueId",function(){return p}),T.d(m,"parseWebVTT",function(){return x});var L=T("./src/polyfills/number.ts"),S=T("./src/utils/vttparser.ts"),g=T("./src/demux/id3.ts"),_=T("./src/utils/timescale-conversion.ts"),d=T("./src/remux/mp4-remuxer.ts"),o=/\r\n|\n\r|\n|\r/g,i=function(l,n,s){return s===void 0&&(s=0),l.substr(s,n.length)===n},r=function(l){var n=parseInt(l.substr(-3)),s=parseInt(l.substr(-6,2)),u=parseInt(l.substr(-9,2)),w=l.length>9?parseInt(l.substr(0,l.indexOf(":"))):0;if(!Object(L.isFiniteNumber)(n)||!Object(L.isFiniteNumber)(s)||!Object(L.isFiniteNumber)(u)||!Object(L.isFiniteNumber)(w))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+l);return n+=1e3*s,n+=60*1e3*u,n+=60*60*1e3*w,n},h=function(l){for(var n=5381,s=l.length;s;)n=n*33^l.charCodeAt(--s);return(n>>>0).toString()};function p(v,l,n){return h(v.toString())+h(l.toString())+h(n)}var f=function(l,n,s){var u=l[n],w=l[u.prevCC];if(!w||!w.new&&u.new){l.ccOffset=l.presentationOffset=u.start,u.new=!1;return}for(;(y=w)!==null&&y!==void 0&&y.new;){var y;l.ccOffset+=u.start-w.start,u.new=!1,u=w,w=l[u.prevCC]}l.presentationOffset=s};function x(v,l,n,s,u,w,y,a){var R=new S.VTTParser,D=Object(g.utf8ArrayToStr)(new Uint8Array(v)).trim().replace(o,`
`).split(`
`),c=[],b=Object(_.toMpegTsClockFromTimescale)(l,n),E="00:00.000",C=0,F=0,j,k=!0,X=!1;R.oncue=function(G){var H=s[u],K=s.ccOffset,B=(C-b)/9e4;if(H!=null&&H.new&&(F!==void 0?K=s.ccOffset=H.start:f(s,u,B)),B&&(K=B-s.presentationOffset),X){var U=G.endTime-G.startTime,W=Object(d.normalizePts)((G.startTime+K-F)*9e4,w*9e4)/9e4;G.startTime=W,G.endTime=W+U}var Q=G.text.trim();G.text=decodeURIComponent(encodeURIComponent(Q)),G.id||(G.id=p(G.startTime,G.endTime,Q)),G.endTime>0&&c.push(G)},R.onparsingerror=function(G){j=G},R.onflush=function(){if(j){a(j);return}y(c)},D.forEach(function(G){if(k)if(i(G,"X-TIMESTAMP-MAP=")){k=!1,X=!0,G.substr(16).split(",").forEach(function(H){i(H,"LOCAL:")?E=H.substr(6):i(H,"MPEGTS:")&&(C=parseInt(H.substr(7)))});try{F=r(E)/1e3}catch(H){X=!1,j=H}return}else G===""&&(k=!1);R.parse(G+`
`)}),R.flush()}},"./src/utils/xhr-loader.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/utils/logger.ts"),S=T("./src/loader/load-stats.ts"),g=/^age:\s*[\d.]+\s*$/m,_=function(){function d(i){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=i?i.xhrSetup:null,this.stats=new S.LoadStats,this.retryDelay=0}var o=d.prototype;return o.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},o.abortInternal=function(){var r=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),r&&(r.onreadystatechange=null,r.onprogress=null,r.readyState!==4&&(this.stats.aborted=!0,r.abort()))},o.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!==null&&r!==void 0&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},o.load=function(r,h,p){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=r,this.config=h,this.callbacks=p,this.retryDelay=h.retryDelay,this.loadInternal()},o.loadInternal=function(){var r=this.config,h=this.context;if(!r)return;var p=this.loader=new self.XMLHttpRequest,f=this.stats;f.loading.first=0,f.loaded=0;var x=this.xhrSetup;try{if(x)try{x(p,h.url)}catch(n){p.open("GET",h.url,!0),x(p,h.url)}p.readyState||p.open("GET",h.url,!0);var v=this.context.headers;if(v)for(var l in v)p.setRequestHeader(l,v[l])}catch(n){this.callbacks.onError({code:p.status,text:n.message},h,p);return}h.rangeEnd&&p.setRequestHeader("Range","bytes="+h.rangeStart+"-"+(h.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=h.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),p.send()},o.readystatechange=function(){var r=this.context,h=this.loader,p=this.stats;if(!r||!h)return;var f=h.readyState,x=this.config;if(p.aborted)return;if(f>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),f===4){h.onreadystatechange=null,h.onprogress=null;var v=h.status;if(v>=200&&v<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var l,n;if(r.responseType==="arraybuffer"?(l=h.response,n=l.byteLength):(l=h.responseText,n=l.length),p.loaded=p.total=n,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(p,r,l,h),!this.callbacks)return;var u={url:h.responseURL,data:l};this.callbacks.onSuccess(u,p,r,h)}else p.retry>=x.maxRetry||v>=400&&v<499?(L.logger.error(v+" while loading "+r.url),this.callbacks.onError({code:v,text:h.statusText},r,h)):(L.logger.warn(v+" 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,x.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),x.timeout)},o.loadtimeout=function(){L.logger.warn("timeout while loading "+this.context.url);var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))},o.loadprogress=function(r){var h=this.stats;h.loaded=r.loaded,r.lengthComputable&&(h.total=r.total)},o.getCacheAge=function(){var r=null;if(this.loader&&g.test(this.loader.getAllResponseHeaders())){var h=this.loader.getResponseHeader("age");r=h?parseFloat(h):null}return r},d}();m.default=_}}).default})},vHTk:function(I,Z,N){I.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.StreamCipher,S=m.algo,g=S.RC4=L.extend({_doReset:function(){for(var o=this._key,i=o.words,r=o.sigBytes,h=this._S=[],p=0;p<256;p++)h[p]=p;for(var p=0,f=0;p<256;p++){var x=p%r,v=i[x>>>2]>>>24-x%4*8&255;f=(f+h[p]+v)%256;var l=h[p];h[p]=h[f],h[f]=l}this._i=this._j=0},_doProcessBlock:function(o,i){o[i]^=_.call(this)},keySize:256/32,ivSize:0});function _(){for(var o=this._S,i=this._i,r=this._j,h=0,p=0;p<4;p++){i=(i+1)%256,r=(r+o[i])%256;var f=o[i];o[i]=o[r],o[r]=f,h|=o[(o[i]+o[r])%256]<<24-p*8}return this._i=i,this._j=r,h}m.RC4=L._createHelper(g);var d=S.RC4Drop=g.extend({cfg:g.cfg.extend({drop:192}),_doReset:function(){g._doReset.call(this);for(var o=this.cfg.drop;o>0;o--)_.call(this)}});m.RC4Drop=L._createHelper(d)}(),P.RC4})},wZgz:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.BlockCipher,S=m.algo,g=[],_=[],d=[],o=[],i=[],r=[],h=[],p=[],f=[],x=[];(function(){for(var n=[],s=0;s<256;s++)s<128?n[s]=s<<1:n[s]=s<<1^283;for(var u=0,w=0,s=0;s<256;s++){var y=w^w<<1^w<<2^w<<3^w<<4;y=y>>>8^y&255^99,g[u]=y,_[y]=u;var a=n[u],R=n[a],D=n[R],c=n[y]*257^y*16843008;d[u]=c<<24|c>>>8,o[u]=c<<16|c>>>16,i[u]=c<<8|c>>>24,r[u]=c;var c=D*16843009^R*65537^a*257^u*16843008;h[y]=c<<24|c>>>8,p[y]=c<<16|c>>>16,f[y]=c<<8|c>>>24,x[y]=c,u?(u=a^n[n[n[D^a]]],w^=n[n[w]]):u=w=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],l=S.AES=L.extend({_doReset:function(){var n;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var s=this._keyPriorReset=this._key,u=s.words,w=s.sigBytes/4,y=this._nRounds=w+6,a=(y+1)*4,R=this._keySchedule=[],D=0;D<a;D++)D<w?R[D]=u[D]:(n=R[D-1],D%w?w>6&&D%w==4&&(n=g[n>>>24]<<24|g[n>>>16&255]<<16|g[n>>>8&255]<<8|g[n&255]):(n=n<<8|n>>>24,n=g[n>>>24]<<24|g[n>>>16&255]<<16|g[n>>>8&255]<<8|g[n&255],n^=v[D/w|0]<<24),R[D]=R[D-w]^n);for(var c=this._invKeySchedule=[],b=0;b<a;b++){var D=a-b;if(b%4)var n=R[D];else var n=R[D-4];b<4||D<=4?c[b]=n:c[b]=h[g[n>>>24]]^p[g[n>>>16&255]]^f[g[n>>>8&255]]^x[g[n&255]]}},encryptBlock:function(n,s){this._doCryptBlock(n,s,this._keySchedule,d,o,i,r,g)},decryptBlock:function(n,s){var u=n[s+1];n[s+1]=n[s+3],n[s+3]=u,this._doCryptBlock(n,s,this._invKeySchedule,h,p,f,x,_);var u=n[s+1];n[s+1]=n[s+3],n[s+3]=u},_doCryptBlock:function(n,s,u,w,y,a,R,D){for(var c=this._nRounds,b=n[s]^u[0],E=n[s+1]^u[1],C=n[s+2]^u[2],F=n[s+3]^u[3],j=4,k=1;k<c;k++){var X=w[b>>>24]^y[E>>>16&255]^a[C>>>8&255]^R[F&255]^u[j++],G=w[E>>>24]^y[C>>>16&255]^a[F>>>8&255]^R[b&255]^u[j++],H=w[C>>>24]^y[F>>>16&255]^a[b>>>8&255]^R[E&255]^u[j++],K=w[F>>>24]^y[b>>>16&255]^a[E>>>8&255]^R[C&255]^u[j++];b=X,E=G,C=H,F=K}var X=(D[b>>>24]<<24|D[E>>>16&255]<<16|D[C>>>8&255]<<8|D[F&255])^u[j++],G=(D[E>>>24]<<24|D[C>>>16&255]<<16|D[F>>>8&255]<<8|D[b&255])^u[j++],H=(D[C>>>24]<<24|D[F>>>16&255]<<16|D[b>>>8&255]<<8|D[E&255])^u[j++],K=(D[F>>>24]<<24|D[b>>>16&255]<<16|D[E>>>8&255]<<8|D[C&255])^u[j++];n[s]=X,n[s+1]=G,n[s+2]=H,n[s+3]=K},keySize:256/32});m.AES=L._createHelper(l)}(),P.AES})},wbyO:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,S=m.enc,g=S.Base64url={stringify:function(d,o=!0){var i=d.words,r=d.sigBytes,h=o?this._safe_map:this._map;d.clamp();for(var p=[],f=0;f<r;f+=3)for(var x=i[f>>>2]>>>24-f%4*8&255,v=i[f+1>>>2]>>>24-(f+1)%4*8&255,l=i[f+2>>>2]>>>24-(f+2)%4*8&255,n=x<<16|v<<8|l,s=0;s<4&&f+s*.75<r;s++)p.push(h.charAt(n>>>6*(3-s)&63));var u=h.charAt(64);if(u)for(;p.length%4;)p.push(u);return p.join("")},parse:function(d,o=!0){var i=d.length,r=o?this._safe_map:this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var p=0;p<r.length;p++)h[r.charCodeAt(p)]=p}var f=r.charAt(64);if(f){var x=d.indexOf(f);x!==-1&&(i=x)}return _(d,i,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function _(d,o,i){for(var r=[],h=0,p=0;p<o;p++)if(p%4){var f=i[d.charCodeAt(p-1)]<<p%4*2,x=i[d.charCodeAt(p)]>>>6-p%4*2,v=f|x;r[h>>>2]|=v<<24-h%4*8,h++}return L.create(r,h)}}(),P.enc.Base64url})},ynwM:function(I,Z,N){var P=N("MFOe"),m=P.Global;I.exports={name:"oldFF-globalStorage",read:L,write:S,each:g,remove:_,clearAll:d};var T=m.globalStorage;function L(o){return T[o]}function S(o,i){T[o]=i}function g(o){for(var i=T.length-1;i>=0;i--){var r=T.key(i);o(T[r],r)}}function _(o){return T.removeItem(o)}function d(){g(function(o,i){delete T[o]})}}}]);