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

233 lines
1.4 MiB

This file contains invisible Unicode characters!

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

(window.webpackJsonp=window.webpackJsonp||[]).push([[211,5,6,7,8,13,16],{"+NIl":function(I,Y,k){(function(L){L(k("VrN/"))})(function(L){"use strict";L.defineMode("stex",function(c,S){"use strict";function R(m,b){m.cmdState.push(b)}function f(m){return m.cmdState.length>0?m.cmdState[m.cmdState.length-1]:null}function s(m){var b=m.cmdState.pop();b&&b.closeBracket()}function w(m){for(var b=m.cmdState,g=b.length-1;g>=0;g--){var v=b[g];if(v.name=="DEFAULT")continue;return v}return{styleIdentifier:function(){return null}}}function l(m,b,g){return function(){this.name=m,this.bracketNo=0,this.style=b,this.styles=g,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var i={};i.importmodule=l("importmodule","tag",["string","builtin"]),i.documentclass=l("documentclass","tag",["","atom"]),i.usepackage=l("usepackage","tag",["atom"]),i.begin=l("begin","tag",["atom"]),i.end=l("end","tag",["atom"]),i.label=l("label","tag",["atom"]),i.ref=l("ref","tag",["atom"]),i.eqref=l("eqref","tag",["atom"]),i.cite=l("cite","tag",["atom"]),i.bibitem=l("bibitem","tag",["atom"]),i.Bibitem=l("Bibitem","tag",["atom"]),i.RBibitem=l("RBibitem","tag",["atom"]),i.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function a(m,b){m.f=b}function r(m,b){var g;if(m.match(/^\\[a-zA-Z@]+/)){var v=m.current().slice(1);return g=i.hasOwnProperty(v)?i[v]:i.DEFAULT,g=new g,R(b,g),a(b,p),g.style}if(m.match(/^\\[$&%#{}_]/))return"tag";if(m.match(/^\\[,;!\/\\]/))return"tag";if(m.match("\\["))return a(b,function(d,h){return u(d,h,"\\]")}),"keyword";if(m.match("\\("))return a(b,function(d,h){return u(d,h,"\\)")}),"keyword";if(m.match("$$"))return a(b,function(d,h){return u(d,h,"$$")}),"keyword";if(m.match("$"))return a(b,function(d,h){return u(d,h,"$")}),"keyword";var n=m.next();if(n=="%")return m.skipToEnd(),"comment";if(n=="}"||n=="]"){if(g=f(b),g)g.closeBracket(n),a(b,p);else return"error";return"bracket"}else return n=="{"||n=="["?(g=i.DEFAULT,g=new g,R(b,g),"bracket"):/\d/.test(n)?(m.eatWhile(/[\w.%]/),"atom"):(m.eatWhile(/[\w\-_]/),g=w(b),g.name=="begin"&&(g.argument=m.current()),g.styleIdentifier())}function u(m,b,g){if(m.eatSpace())return null;if(g&&m.match(g))return a(b,r),"keyword";if(m.match(/^\\[a-zA-Z@]+/))return"tag";if(m.match(/^[a-zA-Z]+/))return"variable-2";if(m.match(/^\\[$&%#{}_]/))return"tag";if(m.match(/^\\[,;!\/]/))return"tag";if(m.match(/^[\^_&]/))return"tag";if(m.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(m.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var v=m.next();return v=="{"||v=="}"||v=="["||v=="]"||v=="("||v==")"?"bracket":v=="%"?(m.skipToEnd(),"comment"):"error"}function p(m,b){var g=m.peek(),v;return g=="{"||g=="["?(v=f(b),v.openBracket(g),m.eat(g),a(b,r),"bracket"):/[ \t\r]/.test(g)?(m.eat(g),null):(a(b,r),s(b),r(m,b))}return{startState:function(){var m=S.inMathMode?function(b,g){return u(b,g)}:r;return{cmdState:[],f:m}},copyState:function(m){return{cmdState:m.cmdState.slice(),f:m.f}},token:function(m,b){return b.f(m,b)},blankLine:function(m){m.f=r,m.cmdState.length=0},lineComment:"%"}}),L.defineMIME("text/x-stex","stex"),L.defineMIME("text/x-latex","stex")})},"+ua5":function(I,Y,k){},"19Vz":function(I,Y,k){(function(L){L(k("VrN/"))})(function(L){L.defineOption("placeholder","",function(l,i,a){var r=a&&a!=L.Init;if(i&&!r)l.on("blur",f),l.on("change",s),l.on("swapDoc",s),L.on(l.getInputField(),"compositionupdate",l.state.placeholderCompose=function(){R(l)}),s(l);else if(!i&&r){l.off("blur",f),l.off("change",s),l.off("swapDoc",s),L.off(l.getInputField(),"compositionupdate",l.state.placeholderCompose),c(l);var u=l.getWrapperElement();u.className=u.className.replace(" CodeMirror-empty","")}i&&!l.hasFocus()&&f(l)});function c(l){l.state.placeholder&&(l.state.placeholder.parentNode.removeChild(l.state.placeholder),l.state.placeholder=null)}function S(l){c(l);var i=l.state.placeholder=document.createElement("pre");i.style.cssText="height: 0; overflow: visible",i.style.direction=l.getOption("direction"),i.className="CodeMirror-placeholder CodeMirror-line-like";var a=l.getOption("placeholder");typeof a=="string"&&(a=document.createTextNode(a)),i.appendChild(a),l.display.lineSpace.insertBefore(i,l.display.lineSpace.firstChild)}function R(l){setTimeout(function(){var i=!1,a=l.getInputField();a.nodeName=="TEXTAREA"?i=!a.value:l.lineCount()==1&&(i=!/[^\u200b]/.test(a.querySelector(".CodeMirror-line").textContent)),i?S(l):c(l)},20)}function f(l){w(l)&&S(l)}function s(l){var i=l.getWrapperElement(),a=w(l);i.className=i.className.replace(" CodeMirror-empty","")+(a?" CodeMirror-empty":""),a?S(l):c(l)}function w(l){return l.lineCount()===1&&l.getLine(0)===""}})},"1T2W":function(I,Y,k){I.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(I,Y,k){(function(L){L(k("VrN/"))})(function(L){"use strict";var c={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};L.defineMode("xml",function(R,f){var s=R.indentUnit,w={},l=f.htmlMode?c:S;for(var i in l)w[i]=l[i];for(var i in f)w[i]=f[i];var a,r;function u(_,N){function j(z){return N.tokenize=z,z(_,N)}var M=_.next();if(M=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?j(b("atom","]]>")):null:_.match("--")?j(b("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),j(g(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),N.tokenize=b("meta","?>"),"meta"):(a=_.eat("/")?"closeTag":"openTag",N.tokenize=p,"tag bracket");if(M=="&"){var H;return _.eat("#")?_.eat("x")?H=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):H=_.eatWhile(/[\d]/)&&_.eat(";"):H=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),H?"atom":"error"}else return _.eatWhile(/[^&<]/),null}u.isInText=!0;function p(_,N){var j=_.next();if(j==">"||j=="/"&&_.eat(">"))return N.tokenize=u,a=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return a="equals",null;if(j=="<"){N.tokenize=u,N.state=h,N.tagName=N.tagStart=null;var M=N.tokenize(_,N);return M?M+" tag error":"tag error"}else return/[\'\"]/.test(j)?(N.tokenize=m(j),N.stringStartCol=_.column(),N.tokenize(_,N)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(_){var N=function(j,M){for(;!j.eol();)if(j.next()==_){M.tokenize=p;break}return"string"};return N.isInAttribute=!0,N}function b(_,N){return function(j,M){for(;!j.eol();){if(j.match(N)){M.tokenize=u;break}j.next()}return _}}function g(_){return function(N,j){for(var M;(M=N.next())!=null;){if(M=="<")return j.tokenize=g(_+1),j.tokenize(N,j);if(M==">")if(_==1){j.tokenize=u;break}else return j.tokenize=g(_-1),j.tokenize(N,j)}return"meta"}}function v(_,N,j){this.prev=_.context,this.tagName=N,this.indent=_.indented,this.startOfLine=j,(w.doNotIndent.hasOwnProperty(N)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function n(_){_.context&&(_.context=_.context.prev)}function d(_,N){for(var j;;){if(!_.context)return;if(j=_.context.tagName,!w.contextGrabbers.hasOwnProperty(j)||!w.contextGrabbers[j].hasOwnProperty(N))return;n(_)}}function h(_,N,j){return _=="openTag"?(j.tagStart=N.column(),C):_=="closeTag"?T:h}function C(_,N,j){return _=="word"?(j.tagName=N.current(),r="tag",O):w.allowMissingTagName&&_=="endTag"?(r="tag bracket",O(_,N,j)):(r="error",C)}function T(_,N,j){if(_=="word"){var M=N.current();return j.context&&j.context.tagName!=M&&w.implicitlyClosed.hasOwnProperty(j.context.tagName)&&n(j),j.context&&j.context.tagName==M||w.matchClosing===!1?(r="tag",o):(r="tag error",P)}else return w.allowMissingTagName&&_=="endTag"?(r="tag bracket",o(_,N,j)):(r="error",P)}function o(_,N,j){return _!="endTag"?(r="error",o):(n(j),h)}function P(_,N,j){return r="error",o(_,N,j)}function O(_,N,j){if(_=="word")return r="attribute",y;if(_=="endTag"||_=="selfcloseTag"){var M=j.tagName,H=j.tagStart;return j.tagName=j.tagStart=null,_=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(M)?d(j,M):(d(j,M),j.context=new v(j,M,H==j.indented)),h}return r="error",O}function y(_,N,j){return _=="equals"?x:(w.allowMissing||(r="error"),O(_,N,j))}function x(_,N,j){return _=="string"?E:_=="word"&&w.allowUnquoted?(r="string",O):(r="error",O(_,N,j))}function E(_,N,j){return _=="string"?E:O(_,N,j)}return{startState:function(_){var N={tokenize:u,state:h,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(N.baseIndent=_),N},token:function(_,N){if(!N.tagName&&_.sol()&&(N.indented=_.indentation()),_.eatSpace())return null;a=null;var j=N.tokenize(_,N);return(j||a)&&j!="comment"&&(r=null,N.state=N.state(a||j,_,N),r&&(j=r=="error"?j+" error":r)),j},indent:function(_,N,j){var M=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+s;if(M&&M.noIndent)return L.Pass;if(_.tokenize!=p&&_.tokenize!=u)return j?j.match(/^(\s*)/)[0].length:0;if(_.tagName)return w.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+s*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(N))return 0;var H=N&&/^<(\/)?([\w_:\.-]*)/.exec(N);if(H&&H[1])for(;M;)if(M.tagName==H[2]){M=M.prev;break}else if(w.implicitlyClosed.hasOwnProperty(M.tagName))M=M.prev;else break;else if(H)for(;M;){var z=w.contextGrabbers[M.tagName];if(z&&z.hasOwnProperty(H[2]))M=M.prev;else break}for(;M&&M.prev&&!M.startOfLine;)M=M.prev;return M?M.indent+s:_.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(_){_.state==x&&(_.state=O)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var N=[],j=_.context;j;j=j.prev)j.tagName&&N.push(j.tagName);return N.reverse()}}}),L.defineMIME("text/xml","xml"),L.defineMIME("application/xml","xml"),L.mimeModes.hasOwnProperty("text/html")||L.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("MlIO"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.Hasher,f=c.x64,s=f.Word,w=f.WordArray,l=c.algo;function i(){return s.create.apply(s,arguments)}var a=[i(1116352408,3609767458),i(1899447441,602891725),i(3049323471,3964484399),i(3921009573,2173295548),i(961987163,4081628472),i(1508970993,3053834265),i(2453635748,2937671579),i(2870763221,3664609560),i(3624381080,2734883394),i(310598401,1164996542),i(607225278,1323610764),i(1426881987,3590304994),i(1925078388,4068182383),i(2162078206,991336113),i(2614888103,633803317),i(3248222580,3479774868),i(3835390401,2666613458),i(4022224774,944711139),i(264347078,2341262773),i(604807628,2007800933),i(770255983,1495990901),i(1249150122,1856431235),i(1555081692,3175218132),i(1996064986,2198950837),i(2554220882,3999719339),i(2821834349,766784016),i(2952996808,2566594879),i(3210313671,3203337956),i(3336571891,1034457026),i(3584528711,2466948901),i(113926993,3758326383),i(338241895,168717936),i(666307205,1188179964),i(773529912,1546045734),i(1294757372,1522805485),i(1396182291,2643833823),i(1695183700,2343527390),i(1986661051,1014477480),i(2177026350,1206759142),i(2456956037,344077627),i(2730485921,1290863460),i(2820302411,3158454273),i(3259730800,3505952657),i(3345764771,106217008),i(3516065817,3606008344),i(3600352804,1432725776),i(4094571909,1467031594),i(275423344,851169720),i(430227734,3100823752),i(506948616,1363258195),i(659060556,3750685593),i(883997877,3785050280),i(958139571,3318307427),i(1322822218,3812723403),i(1537002063,2003034995),i(1747873779,3602036899),i(1955562222,1575990012),i(2024104815,1125592928),i(2227730452,2716904306),i(2361852424,442776044),i(2428436474,593698344),i(2756734187,3733110249),i(3204031479,2999351573),i(3329325298,3815920427),i(3391569614,3928383900),i(3515267271,566280711),i(3940187606,3454069534),i(4118630271,4000239992),i(116418474,1914138554),i(174292421,2731055270),i(289380356,3203993006),i(460393269,320620315),i(685471733,587496836),i(852142971,1086792851),i(1017036298,365543100),i(1126000580,2618297676),i(1288033470,3409855158),i(1501505948,4234509866),i(1607167915,987167468),i(1816402316,1246189591)],r=[];(function(){for(var p=0;p<80;p++)r[p]=i()})();var u=l.SHA512=R.extend({_doReset:function(){this._hash=new w.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(p,m){for(var b=this._hash.words,g=b[0],v=b[1],n=b[2],d=b[3],h=b[4],C=b[5],T=b[6],o=b[7],P=g.high,O=g.low,y=v.high,x=v.low,E=n.high,_=n.low,N=d.high,j=d.low,M=h.high,H=h.low,z=C.high,F=C.low,G=T.high,B=T.low,K=o.high,W=o.low,J=P,ee=O,Z=y,he=x,ge=E,ie=_,we=N,me=j,oe=M,se=H,te=z,be=F,q=G,ae=B,xe=K,ne=W,Q=0;Q<80;Q++){var X,$,pe=r[Q];if(Q<16)$=pe.high=p[m+Q*2]|0,X=pe.low=p[m+Q*2+1]|0;else{var de=r[Q-15],Ce=de.high,ze=de.low,qe=(Ce>>>1|ze<<31)^(Ce>>>8|ze<<24)^Ce>>>7,Ye=(ze>>>1|Ce<<31)^(ze>>>8|Ce<<24)^(ze>>>7|Ce<<25),Ve=r[Q-2],et=Ve.high,rt=Ve.low,Me=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,Se=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),Ge=r[Q-7],tt=Ge.high,Ue=Ge.low,Xe=r[Q-16],Pe=Xe.high,Te=Xe.low;X=Ye+Ue,$=qe+tt+(X>>>0<Ye>>>0?1:0),X=X+Se,$=$+Me+(X>>>0<Se>>>0?1:0),X=X+Te,$=$+Pe+(X>>>0<Te>>>0?1:0),pe.high=$,pe.low=X}var Ae=oe&te^~oe&q,ce=se&be^~se&ae,Ee=J&Z^J&ge^Z&ge,_e=ee&he^ee&ie^he&ie,De=(J>>>28|ee<<4)^(J<<30|ee>>>2)^(J<<25|ee>>>7),je=(ee>>>28|J<<4)^(ee<<30|J>>>2)^(ee<<25|J>>>7),$e=(oe>>>14|se<<18)^(oe>>>18|se<<14)^(oe<<23|se>>>9),at=(se>>>14|oe<<18)^(se>>>18|oe<<14)^(se<<23|oe>>>9),it=a[Q],st=it.high,Je=it.low,gt=ne+at,yt=xe+$e+(gt>>>0<ne>>>0?1:0),gt=gt+ce,yt=yt+Ae+(gt>>>0<ce>>>0?1:0),gt=gt+Je,yt=yt+st+(gt>>>0<Je>>>0?1:0),gt=gt+X,yt=yt+$+(gt>>>0<X>>>0?1:0),ct=je+_e,Lt=De+Ee+(ct>>>0<je>>>0?1:0);xe=q,ne=ae,q=te,ae=be,te=oe,be=se,se=me+gt|0,oe=we+yt+(se>>>0<me>>>0?1:0)|0,we=ge,me=ie,ge=Z,ie=he,Z=J,he=ee,ee=gt+ct|0,J=yt+Lt+(ee>>>0<gt>>>0?1:0)|0}O=g.low=O+ee,g.high=P+J+(O>>>0<ee>>>0?1:0),x=v.low=x+he,v.high=y+Z+(x>>>0<he>>>0?1:0),_=n.low=_+ie,n.high=E+ge+(_>>>0<ie>>>0?1:0),j=d.low=j+me,d.high=N+we+(j>>>0<me>>>0?1:0),H=h.low=H+se,h.high=M+oe+(H>>>0<se>>>0?1:0),F=C.low=F+be,C.high=z+te+(F>>>0<be>>>0?1:0),B=T.low=B+ae,T.high=G+q+(B>>>0<ae>>>0?1:0),W=o.low=W+ne,o.high=K+xe+(W>>>0<ne>>>0?1:0)},_doFinalize:function(){var p=this._data,m=p.words,b=this._nDataBytes*8,g=p.sigBytes*8;m[g>>>5]|=128<<24-g%32,m[(g+128>>>10<<5)+30]=Math.floor(b/4294967296),m[(g+128>>>10<<5)+31]=b,p.sigBytes=m.length*4,this._process();var v=this._hash.toX32();return v},clone:function(){var p=R.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});c.SHA512=R._createHelper(u),c.HmacSHA512=R._createHmacHelper(u)}(),L.SHA512})},"3y9D":function(I,Y,k){(function(L,c){I.exports=Y=c(k("Ib8C"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.WordArray,f=S.Hasher,s=c.algo,w=[],l=s.SHA1=f.extend({_doReset:function(){this._hash=new R.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(i,a){for(var r=this._hash.words,u=r[0],p=r[1],m=r[2],b=r[3],g=r[4],v=0;v<80;v++){if(v<16)w[v]=i[a+v]|0;else{var n=w[v-3]^w[v-8]^w[v-14]^w[v-16];w[v]=n<<1|n>>>31}var d=(u<<5|u>>>27)+g+w[v];v<20?d+=(p&m|~p&b)+1518500249:v<40?d+=(p^m^b)+1859775393:v<60?d+=(p&m|p&b|m&b)-1894007588:d+=(p^m^b)-899497514,g=b,b=m,m=p<<30|p>>>2,p=u,u=d}r[0]=r[0]+u|0,r[1]=r[1]+p|0,r[2]=r[2]+m|0,r[3]=r[3]+b|0,r[4]=r[4]+g|0},_doFinalize:function(){var i=this._data,a=i.words,r=this._nDataBytes*8,u=i.sigBytes*8;return a[u>>>5]|=128<<24-u%32,a[(u+64>>>9<<4)+14]=Math.floor(r/4294967296),a[(u+64>>>9<<4)+15]=r,i.sigBytes=a.length*4,this._process(),this._hash},clone:function(){var i=f.clone.call(this);return i._hash=this._hash.clone(),i}});c.SHA1=f._createHelper(l),c.HmacSHA1=f._createHmacHelper(l)}(),L.SHA1})},4:function(I,Y){},"5hvy":function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("MlIO"))})(this,function(L){return function(c){var S=L,R=S.lib,f=R.WordArray,s=R.Hasher,w=S.x64,l=w.Word,i=S.algo,a=[],r=[],u=[];(function(){for(var b=1,g=0,v=0;v<24;v++){a[b+5*g]=(v+1)*(v+2)/2%64;var n=g%5,d=(2*b+3*g)%5;b=n,g=d}for(var b=0;b<5;b++)for(var g=0;g<5;g++)r[b+5*g]=g+(2*b+3*g)%5*5;for(var h=1,C=0;C<24;C++){for(var T=0,o=0,P=0;P<7;P++){if(h&1){var O=(1<<P)-1;O<32?o^=1<<O:T^=1<<O-32}h&128?h=h<<1^113:h<<=1}u[C]=l.create(T,o)}})();var p=[];(function(){for(var b=0;b<25;b++)p[b]=l.create()})();var m=i.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var b=this._state=[],g=0;g<25;g++)b[g]=new l.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(b,g){for(var v=this._state,n=this.blockSize/2,d=0;d<n;d++){var h=b[g+2*d],C=b[g+2*d+1];h=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360;var T=v[d];T.high^=C,T.low^=h}for(var o=0;o<24;o++){for(var P=0;P<5;P++){for(var O=0,y=0,x=0;x<5;x++){var T=v[P+5*x];O^=T.high,y^=T.low}var E=p[P];E.high=O,E.low=y}for(var P=0;P<5;P++)for(var _=p[(P+4)%5],N=p[(P+1)%5],j=N.high,M=N.low,O=_.high^(j<<1|M>>>31),y=_.low^(M<<1|j>>>31),x=0;x<5;x++){var T=v[P+5*x];T.high^=O,T.low^=y}for(var H=1;H<25;H++){var O,y,T=v[H],z=T.high,F=T.low,G=a[H];G<32?(O=z<<G|F>>>32-G,y=F<<G|z>>>32-G):(O=F<<G-32|z>>>64-G,y=z<<G-32|F>>>64-G);var B=p[r[H]];B.high=O,B.low=y}var K=p[0],W=v[0];K.high=W.high,K.low=W.low;for(var P=0;P<5;P++)for(var x=0;x<5;x++){var H=P+5*x,T=v[H],J=p[H],ee=p[(P+1)%5+5*x],Z=p[(P+2)%5+5*x];T.high=J.high^~ee.high&Z.high,T.low=J.low^~ee.low&Z.low}var T=v[0],he=u[o];T.high^=he.high,T.low^=he.low}},_doFinalize:function(){var b=this._data,g=b.words,v=this._nDataBytes*8,n=b.sigBytes*8,d=this.blockSize*32;g[n>>>5]|=1<<24-n%32,g[(c.ceil((n+1)/d)*d>>>5)-1]|=128,b.sigBytes=g.length*4,this._process();for(var h=this._state,C=this.cfg.outputLength/8,T=C/8,o=[],P=0;P<T;P++){var O=h[P],y=O.high,x=O.low;y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,o.push(x),o.push(y)}return new f.init(o,C)},clone:function(){for(var b=s.clone.call(this),g=b._state=this._state.slice(0),v=0;v<25;v++)g[v]=g[v].clone();return b}});S.SHA3=s._createHelper(m),S.HmacSHA3=s._createHmacHelper(m)}(Math),L.SHA3})},"5nXd":function(I,Y,k){var L=k("MFOe"),c=L.slice,S=L.pluck,R=L.each,f=L.bind,s=L.create,w=L.isList,l=L.isFunction,i=L.isObject;I.exports={createStore:u};var a={version:"2.0.12",enabled:!1,get:function(p,m){var b=this.storage.read(this._namespacePrefix+p);return this._deserialize(b,m)},set:function(p,m){return m===void 0?this.remove(p):(this.storage.write(this._namespacePrefix+p,this._serialize(m)),m)},remove:function(p){this.storage.remove(this._namespacePrefix+p)},each:function(p){var m=this;this.storage.each(function(b,g){p.call(m,m._deserialize(b),(g||"").replace(m._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(p){return this._namespacePrefix=="__storejs_"+p+"_"},createStore:function(){return u.apply(this,arguments)},addPlugin:function(p){this._addPlugin(p)},namespace:function(p){return u(this.storage,this.plugins,p)}};function r(){var p=typeof console=="undefined"?null:console;if(!p)return;var m=p.warn?p.warn:p.log;m.apply(p,arguments)}function u(p,m,b){b||(b=""),p&&!w(p)&&(p=[p]),m&&!w(m)&&(m=[m]);var g=b?"__storejs_"+b+"_":"",v=b?new RegExp("^"+g):null,n=/^[a-zA-Z0-9_\-]*$/;if(!n.test(b))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var d={_namespacePrefix:g,_namespaceRegexp:v,_testStorage:function(C){try{var T="__storejs__test__";C.write(T,T);var o=C.read(T)===T;return C.remove(T),o}catch(P){return!1}},_assignPluginFnProp:function(C,T){var o=this[T];this[T]=function(){var O=c(arguments,0),y=this;function x(){return o?(R(arguments,function(_,N){O[N]=_}),o.apply(y,O)):void 0}var E=[x].concat(O);return C.apply(y,E)}},_serialize:function(C){return JSON.stringify(C)},_deserialize:function(C,T){if(!C)return T;var o="";try{o=JSON.parse(C)}catch(P){o=C}return o!==void 0?o:T},_addStorage:function(C){if(this.enabled)return;this._testStorage(C)&&(this.storage=C,this.enabled=!0)},_addPlugin:function(C){var T=this;if(w(C)){R(C,function(O){T._addPlugin(O)});return}var o=S(this.plugins,function(O){return C===O});if(o)return;if(this.plugins.push(C),!l(C))throw new Error("Plugins must be function values that return objects");var P=C.call(this);if(!i(P))throw new Error("Plugins must return an object of function properties");R(P,function(O,y){if(!l(O))throw new Error("Bad plugin property: "+y+" from plugin "+C.name+". Plugins should only return functions.");T._assignPluginFnProp(O,y)})},addStorage:function(C){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(C)}},h=s(d,a,{plugins:[]});return h.raw={},R(h,function(C,T){l(C)&&(h.raw[T]=f(h,C))}),R(p,function(C){h._addStorage(C)}),R(m,function(C){h._addPlugin(C)}),h}},"6+eU":function(I,Y,k){"use strict";k.d(Y,"a",function(){return o});var L=k("wx14"),c=k("rePB"),S=k("VTBJ"),R=k("1OyB"),f=k("vuIU"),s=k("Ji7U"),w=k("LK+K"),l=k("cDcd"),i=k.n(l),a=k("TSYQ"),r=k.n(a),u=function(O){var y,x="".concat(O.rootPrefixCls,"-item"),E=r()(x,"".concat(x,"-").concat(O.page),(y={},Object(c.a)(y,"".concat(x,"-active"),O.active),Object(c.a)(y,O.className,!!O.className),Object(c.a)(y,"".concat(x,"-disabled"),!O.page),y)),_=function(){O.onClick(O.page)},N=function(M){O.onKeyPress(M,O.onClick,O.page)};return i.a.createElement("li",{title:O.showTitle?O.page:null,className:E,onClick:_,onKeyPress:N,tabIndex:"0"},O.itemRender(O.page,"page",i.a.createElement("a",{rel:"nofollow"},O.page)))},p=u,m={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},b=function(P){Object(s.a)(y,P);var O=Object(w.a)(y);function y(){var x;Object(R.a)(this,y);for(var E=arguments.length,_=new Array(E),N=0;N<E;N++)_[N]=arguments[N];return x=O.call.apply(O,[this].concat(_)),x.state={goInputText:""},x.buildOptionText=function(j){return"".concat(j," ").concat(x.props.locale.items_per_page)},x.changeSize=function(j){x.props.changeSize(Number(j))},x.handleChange=function(j){x.setState({goInputText:j.target.value})},x.handleBlur=function(j){var M=x.props,H=M.goButton,z=M.quickGo,F=M.rootPrefixCls,G=x.state.goInputText;if(H||G==="")return;if(j.relatedTarget&&(j.relatedTarget.className.indexOf("".concat(F,"-prev"))>=0||j.relatedTarget.className.indexOf("".concat(F,"-next"))>=0))return;x.setState({goInputText:""}),z(x.getValidValue())},x.go=function(j){var M=x.state.goInputText;if(M==="")return;(j.keyCode===m.ENTER||j.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(f.a)(y,[{key:"getValidValue",value:function(){var E=this.state,_=E.goInputText,N=E.current;return!_||isNaN(_)?N:Number(_)}},{key:"getPageSizeOptions",value:function(){var E=this.props,_=E.pageSize,N=E.pageSizeOptions;return N.some(function(j){return j.toString()===_.toString()})?N:N.concat([_.toString()]).sort(function(j,M){var H=isNaN(Number(j))?0:Number(j),z=isNaN(Number(M))?0:Number(M);return H-z})}},{key:"render",value:function(){var E=this,_=this.props,N=_.pageSize,j=_.locale,M=_.rootPrefixCls,H=_.changeSize,z=_.quickGo,F=_.goButton,G=_.selectComponentClass,B=_.buildOptionText,K=_.selectPrefixCls,W=_.disabled,J=this.state.goInputText,ee="".concat(M,"-options"),Z=G,he=null,ge=null,ie=null;if(!H&&!z)return null;var we=this.getPageSizeOptions();if(H&&Z){var me=we.map(function(oe,se){return i.a.createElement(Z.Option,{key:se,value:oe.toString()},(B||E.buildOptionText)(oe))});he=i.a.createElement(Z,{disabled:W,prefixCls:K,showSearch:!1,className:"".concat(ee,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(N||we[0]).toString(),onChange:this.changeSize,getPopupContainer:function(se){return se.parentNode}},me)}return z&&(F&&(ie=typeof F=="boolean"?i.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:W,className:"".concat(ee,"-quick-jumper-button")},j.jump_to_confirm):i.a.createElement("span",{onClick:this.go,onKeyUp:this.go},F)),ge=i.a.createElement("div",{className:"".concat(ee,"-quick-jumper")},j.jump_to,i.a.createElement("input",{disabled:W,type:"text",value:J,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),j.page,ie)),i.a.createElement("li",{className:"".concat(ee)},he,ge)}}]),y}(i.a.Component);b.defaultProps={pageSizeOptions:["10","20","50","100"]};var g=b,v=k("N2Kk");function n(){}function d(P){return typeof P=="number"&&isFinite(P)&&Math.floor(P)===P}function h(P,O,y){return y}function C(P,O,y){var x=typeof P=="undefined"?O.pageSize:P;return Math.floor((y.total-1)/x)+1}var T=function(P){Object(s.a)(y,P);var O=Object(w.a)(y);function y(x){var E;Object(R.a)(this,y),E=O.call(this,x),E.getJumpPrevPage=function(){return Math.max(1,E.state.current-(E.props.showLessItems?3:5))},E.getJumpNextPage=function(){return Math.min(C(void 0,E.state,E.props),E.state.current+(E.props.showLessItems?3:5))},E.getItemIcon=function(H,z){var F=E.props.prefixCls,G=H||i.a.createElement("button",{type:"button","aria-label":z,className:"".concat(F,"-item-link")});return typeof H=="function"&&(G=i.a.createElement(H,Object(S.a)({},E.props))),G},E.savePaginationNode=function(H){E.paginationNode=H},E.isValid=function(H){return d(H)&&H!==E.state.current},E.shouldDisplayQuickJumper=function(){var H=E.props,z=H.showQuickJumper,F=H.pageSize,G=H.total;return G<=F?!1:z},E.handleKeyDown=function(H){(H.keyCode===m.ARROW_UP||H.keyCode===m.ARROW_DOWN)&&H.preventDefault()},E.handleKeyUp=function(H){var z=E.getValidValue(H),F=E.state.currentInputValue;z!==F&&E.setState({currentInputValue:z}),H.keyCode===m.ENTER?E.handleChange(z):H.keyCode===m.ARROW_UP?E.handleChange(z-1):H.keyCode===m.ARROW_DOWN&&E.handleChange(z+1)},E.changePageSize=function(H){var z=E.state.current,F=C(H,E.state,E.props);z=z>F?F:z,F===0&&(z=E.state.current),typeof H=="number"&&("pageSize"in E.props||E.setState({pageSize:H}),"current"in E.props||E.setState({current:z,currentInputValue:z})),E.props.onShowSizeChange(z,H),"onChange"in E.props&&E.props.onChange&&E.props.onChange(z,H)},E.handleChange=function(H){var z=E.props.disabled,F=H;if(E.isValid(F)&&!z){var G=C(void 0,E.state,E.props);F>G?F=G:F<1&&(F=1),"current"in E.props||E.setState({current:F,currentInputValue:F});var B=E.state.pageSize;return E.props.onChange(F,B),F}return E.state.current},E.prev=function(){E.hasPrev()&&E.handleChange(E.state.current-1)},E.next=function(){E.hasNext()&&E.handleChange(E.state.current+1)},E.jumpPrev=function(){E.handleChange(E.getJumpPrevPage())},E.jumpNext=function(){E.handleChange(E.getJumpNextPage())},E.hasPrev=function(){return E.state.current>1},E.hasNext=function(){return E.state.current<C(void 0,E.state,E.props)},E.runIfEnter=function(H,z){if(H.key==="Enter"||H.charCode===13){for(var F=arguments.length,G=new Array(F>2?F-2:0),B=2;B<F;B++)G[B-2]=arguments[B];z.apply(void 0,G)}},E.runIfEnterPrev=function(H){E.runIfEnter(H,E.prev)},E.runIfEnterNext=function(H){E.runIfEnter(H,E.next)},E.runIfEnterJumpPrev=function(H){E.runIfEnter(H,E.jumpPrev)},E.runIfEnterJumpNext=function(H){E.runIfEnter(H,E.jumpNext)},E.handleGoTO=function(H){(H.keyCode===m.ENTER||H.type==="click")&&E.handleChange(E.state.currentInputValue)};var _=x.onChange!==n,N="current"in x;N&&!_&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var j=x.defaultCurrent;"current"in x&&(j=x.current);var M=x.defaultPageSize;return"pageSize"in x&&(M=x.pageSize),j=Math.min(j,C(M,void 0,x)),E.state={current:j,currentInputValue:j,pageSize:M},E}return Object(f.a)(y,[{key:"componentDidUpdate",value:function(E,_){var N=this.props.prefixCls;if(_.current!==this.state.current&&this.paginationNode){var j=this.paginationNode.querySelector(".".concat(N,"-item-").concat(_.current));j&&document.activeElement===j&&j.blur()}}},{key:"getValidValue",value:function(E){var _=E.target.value,N=C(void 0,this.state,this.props),j=this.state.currentInputValue,M;return _===""?M=_:isNaN(Number(_))?M=j:_>=N?M=N:M=Number(_),M}},{key:"getShowSizeChanger",value:function(){var E=this.props,_=E.showSizeChanger,N=E.total,j=E.totalBoundaryShowSizeChanger;return typeof _!="undefined"?_:N>j}},{key:"renderPrev",value:function(E){var _=this.props,N=_.prevIcon,j=_.itemRender,M=j(E,"prev",this.getItemIcon(N,"prev page")),H=!this.hasPrev();return Object(l.isValidElement)(M)?Object(l.cloneElement)(M,{disabled:H}):M}},{key:"renderNext",value:function(E){var _=this.props,N=_.nextIcon,j=_.itemRender,M=j(E,"next",this.getItemIcon(N,"next page")),H=!this.hasNext();return Object(l.isValidElement)(M)?Object(l.cloneElement)(M,{disabled:H}):M}},{key:"render",value:function(){var E=this,_=this.props,N=_.prefixCls,j=_.className,M=_.style,H=_.disabled,z=_.hideOnSinglePage,F=_.total,G=_.locale,B=_.showQuickJumper,K=_.showLessItems,W=_.showTitle,J=_.showTotal,ee=_.simple,Z=_.itemRender,he=_.showPrevNextJumpers,ge=_.jumpPrevIcon,ie=_.jumpNextIcon,we=_.selectComponentClass,me=_.selectPrefixCls,oe=_.pageSizeOptions,se=this.state,te=se.current,be=se.pageSize,q=se.currentInputValue;if(z===!0&&F<=be)return null;var ae=C(void 0,this.state,this.props),xe=[],ne=null,Q=null,X=null,$=null,pe=null,de=B&&B.goButton,Ce=K?1:2,ze=te-1>0?te-1:0,qe=te+1<ae?te+1:ae,Ye=Object.keys(this.props).reduce(function(ce,Ee){return(Ee.substr(0,5)==="data-"||Ee.substr(0,5)==="aria-"||Ee==="role")&&(ce[Ee]=E.props[Ee]),ce},{});if(ee)return de&&(typeof de=="boolean"?pe=i.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},G.jump_to_confirm):pe=i.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},de),pe=i.a.createElement("li",{title:W?"".concat(G.jump_to).concat(te,"/").concat(ae):null,className:"".concat(N,"-simple-pager")},pe)),i.a.createElement("ul",Object(L.a)({className:r()(N,"".concat(N,"-simple"),Object(c.a)({},"".concat(N,"-disabled"),H),j),style:M,ref:this.savePaginationNode},Ye),i.a.createElement("li",{title:W?G.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:r()("".concat(N,"-prev"),Object(c.a)({},"".concat(N,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ze)),i.a.createElement("li",{title:W?"".concat(te,"/").concat(ae):null,className:"".concat(N,"-simple-pager")},i.a.createElement("input",{type:"text",value:q,disabled:H,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),i.a.createElement("span",{className:"".concat(N,"-slash")},"/"),ae),i.a.createElement("li",{title:W?G.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:r()("".concat(N,"-next"),Object(c.a)({},"".concat(N,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(qe)),pe);if(ae<=3+Ce*2){var Ve={locale:G,rootPrefixCls:N,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:W,itemRender:Z};ae||xe.push(i.a.createElement(p,Object(L.a)({},Ve,{key:"noPager",page:ae,className:"".concat(N,"-disabled")})));for(var et=1;et<=ae;et+=1){var rt=te===et;xe.push(i.a.createElement(p,Object(L.a)({},Ve,{key:et,page:et,active:rt})))}}else{var Me=K?G.prev_3:G.prev_5,Se=K?G.next_3:G.next_5;he&&(ne=i.a.createElement("li",{title:W?Me:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:r()("".concat(N,"-jump-prev"),Object(c.a)({},"".concat(N,"-jump-prev-custom-icon"),!!ge))},Z(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ge,"prev page"))),Q=i.a.createElement("li",{title:W?Se:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:r()("".concat(N,"-jump-next"),Object(c.a)({},"".concat(N,"-jump-next-custom-icon"),!!ie))},Z(this.getJumpNextPage(),"jump-next",this.getItemIcon(ie,"next page")))),$=i.a.createElement(p,{locale:G,last:!0,rootPrefixCls:N,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ae,page:ae,active:!1,showTitle:W,itemRender:Z}),X=i.a.createElement(p,{locale:G,rootPrefixCls:N,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:W,itemRender:Z});var Ge=Math.max(1,te-Ce),tt=Math.min(te+Ce,ae);te-1<=Ce&&(tt=1+Ce*2),ae-te<=Ce&&(Ge=ae-Ce*2);for(var Ue=Ge;Ue<=tt;Ue+=1){var Xe=te===Ue;xe.push(i.a.createElement(p,{locale:G,rootPrefixCls:N,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ue,page:Ue,active:Xe,showTitle:W,itemRender:Z}))}te-1>=Ce*2&&te!==1+2&&(xe[0]=Object(l.cloneElement)(xe[0],{className:"".concat(N,"-item-after-jump-prev")}),xe.unshift(ne)),ae-te>=Ce*2&&te!==ae-2&&(xe[xe.length-1]=Object(l.cloneElement)(xe[xe.length-1],{className:"".concat(N,"-item-before-jump-next")}),xe.push(Q)),Ge!==1&&xe.unshift(X),tt!==ae&&xe.push($)}var Pe=null;J&&(Pe=i.a.createElement("li",{className:"".concat(N,"-total-text")},J(F,[F===0?0:(te-1)*be+1,te*be>F?F:te*be])));var Te=!this.hasPrev()||!ae,Ae=!this.hasNext()||!ae;return i.a.createElement("ul",Object(L.a)({className:r()(N,j,Object(c.a)({},"".concat(N,"-disabled"),H)),style:M,unselectable:"unselectable",ref:this.savePaginationNode},Ye),Pe,i.a.createElement("li",{title:W?G.prev_page:null,onClick:this.prev,tabIndex:Te?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(N,"-prev"),Object(c.a)({},"".concat(N,"-disabled"),Te)),"aria-disabled":Te},this.renderPrev(ze)),xe,i.a.createElement("li",{title:W?G.next_page:null,onClick:this.next,tabIndex:Ae?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(N,"-next"),Object(c.a)({},"".concat(N,"-disabled"),Ae)),"aria-disabled":Ae},this.renderNext(qe)),i.a.createElement(g,{disabled:H,locale:G,rootPrefixCls:N,selectComponentClass:we,selectPrefixCls:me,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:te,pageSize:be,pageSizeOptions:oe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:de}))}}],[{key:"getDerivedStateFromProps",value:function(E,_){var N={};if("current"in E&&(N.current=E.current,E.current!==_.current&&(N.currentInputValue=N.current)),"pageSize"in E&&E.pageSize!==_.pageSize){var j=_.current,M=C(E.pageSize,_,E);j=j>M?M:j,"current"in E||(N.current=j,N.currentInputValue=j),N.pageSize=E.pageSize}return N}}]),y}(i.a.Component);T.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:v.a,style:{},itemRender:h,totalBoundaryShowSizeChanger:50};var o=T},"6RRn":function(I,Y,k){"use strict";var L=k("wCXF"),c=k("n6Qo");k.d(Y,"b",function(){return c.a});var S=k("IBYe"),R=k("6eGT"),f=k("hW8S");k.d(Y,"a",function(){return f.a}),Y.c=L.b},"6eGT":function(I,Y,k){"use strict";function L(c){return null}Y.a=L},"7Cbv":function(I,Y,k){"use strict";var L=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),c=new Uint8Array(16);function S(){if(!L)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return L(c)}var R=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function f(p){return typeof p=="string"&&R.test(p)}for(var s=f,w=[],l=0;l<256;++l)w.push((l+256).toString(16).substr(1));function i(p){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,b=(w[p[m+0]]+w[p[m+1]]+w[p[m+2]]+w[p[m+3]]+"-"+w[p[m+4]]+w[p[m+5]]+"-"+w[p[m+6]]+w[p[m+7]]+"-"+w[p[m+8]]+w[p[m+9]]+"-"+w[p[m+10]]+w[p[m+11]]+w[p[m+12]]+w[p[m+13]]+w[p[m+14]]+w[p[m+15]]).toLowerCase();if(!s(b))throw TypeError("Stringified UUID is invalid");return b}var a=i;function r(p,m,b){p=p||{};var g=p.random||(p.rng||S)();if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,m){b=b||0;for(var v=0;v<16;++v)m[b+v]=g[v];return m}return a(g)}var u=Y.a=r},"7ahc":function(I,Y,k){"use strict";k.d(Y,"a",function(){return C});var L=k("k1fw"),c=k("0Owb"),S=k("+L6B"),R=k("2/Rp"),f=k("y8nQ"),s=k("Vl3Y"),w=k("tJVT"),l=k("OaEy"),i=k("2fM7"),a=k("cDcd"),r=k.n(a),u=k("VrN/"),p=k.n(u),m=k("p77/"),b=k.n(m),g=k("c5Ni"),v=k.n(g),n=i.a.Option,d={labelCol:{span:4},wrapperCol:{span:20}},h={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Y.b=function(T){var o=T.callback,P=T.onCancel,O=Object(a.useState)("python"),y=Object(w.a)(O,2),x=y[0],E=y[1];function _(j){E(h[j][1])}function N(j){o(j)}return r.a.createElement(s.a,Object(c.a)({},d,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:N}),r.a.createElement(s.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(i.a,{onChange:_},Object.keys(h).map(function(j){return r.a.createElement(n,{key:j,value:j},h[j][0])}))),r.a.createElement(s.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(C,{mode:x})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(R.a,{type:"ghost",onClick:P},"\u53D6\u6D88")))};function C(T){var o=T.value,P=T.onChange,O=T.mode,y=T.options,x=y===void 0?{}:y,E=Object(a.useRef)(),_=Object(a.useState)(),N=Object(w.a)(_,2),j=N[0],M=N[1];return Object(a.useEffect)(function(){if(j){function H(z){var F=z.getValue();P&&P(F)}return j.on("change",H),function(){j.off("change",H)}}},[j,P]),Object(a.useEffect)(function(){j&&j.setOption("mode",O)},[j,O]),Object(a.useEffect)(function(){j&&((o!==j.getValue()||o==="")&&setTimeout(function(){j.setValue(o||" ")},300))},[j,o]),Object(a.useEffect)(function(){if(E.current&&!j){var H=p.a.fromTextArea(E.current,Object(L.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));M(H)}},[E.current,j]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:E}))}},"815F":function(I,Y,k){"use strict";k.d(Y,"e",function(){return w}),k.d(Y,"c",function(){return i}),k.d(Y,"d",function(){return a}),k.d(Y,"a",function(){return u}),k.d(Y,"f",function(){return p}),k.d(Y,"b",function(){return m});var L=k("KQm4"),c=k("VTBJ"),S=k("Ff2n"),R=k("Zm9Q"),f=k("Kwbf"),s=k("OZM5");function w(b,g){return b!=null?b:g}function l(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=new Map;function v(n){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(h){var C=h.key,T=h.children;Object(f.a)(C!=null,"Tree node must have a certain key: [".concat(d).concat(C,"]"));var o=String(C);Object(f.a)(!g.has(o)||C===null||C===void 0,"Same 'key' exist in the Tree: ".concat(o)),g.set(o,!0),v(T,"".concat(d).concat(o," > "))})}v(b)}function i(b){function g(v){var n=Object(R.a)(v);return n.map(function(d){if(!Object(s.i)(d))return Object(f.a)(!d,"Tree/TreeNode can only accept TreeNode as children."),null;var h=d.key,C=d.props,T=C.children,o=Object(S.a)(C,["children"]),P=Object(c.a)({key:h},o),O=g(T);return O.length&&(P.children=O),P}).filter(function(d){return d})}return g(b)}function a(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],v=new Set(g===!0?[]:g),n=[];function d(h){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return h.map(function(T,o){var P=Object(s.h)(C?C.pos:"0",o),O=w(T.key,P),y=Object(c.a)(Object(c.a)({},T),{},{parent:C,pos:P,children:null,data:T,isStart:[].concat(Object(L.a)(C?C.isStart:[]),[o===0]),isEnd:[].concat(Object(L.a)(C?C.isEnd:[]),[o===h.length-1])});return n.push(y),g===!0||v.has(O)?y.children=d(T.children||[],y):y.children=[],y})}return d(b),n}function r(b,g,v){var n;v?typeof v=="string"?n=function(C){return C[v]}:typeof v=="function"&&(n=function(C){return v(C)}):n=function(C,T){return w(C.key,T)};function d(h,C,T){var o=h?h.children:b,P=h?Object(s.h)(T.pos,C):"0";if(h){var O=n(h,P),y={node:h,index:C,pos:P,key:O,parentPos:T.node?T.pos:null,level:T.level+1};g(y)}o&&o.forEach(function(x,E){d(x,E,{node:h,pos:P,level:T?T.level+1:-1})})}d(null)}function u(b){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=g.initWrapper,n=g.processEntity,d=g.onProcessFinished,h=arguments.length>2?arguments[2]:void 0,C={},T={},o={posEntities:C,keyEntities:T};return v&&(o=v(o)||o),r(b,function(P){var O=P.node,y=P.index,x=P.pos,E=P.key,_=P.parentPos,N=P.level,j={node:O,index:y,key:E,pos:x,level:N},M=w(E,x);C[x]=j,T[M]=j,j.parent=C[_],j.parent&&(j.parent.children=j.parent.children||[],j.parent.children.push(j)),n&&n(j,o)},h),d&&d(o),o}function p(b,g){var v=g.expandedKeys,n=g.selectedKeys,d=g.loadedKeys,h=g.loadingKeys,C=g.checkedKeys,T=g.halfCheckedKeys,o=g.dragOverNodeKey,P=g.dropPosition,O=g.keyEntities,y=O[b],x={eventKey:b,expanded:v.indexOf(b)!==-1,selected:n.indexOf(b)!==-1,loaded:d.indexOf(b)!==-1,loading:h.indexOf(b)!==-1,checked:C.indexOf(b)!==-1,halfChecked:T.indexOf(b)!==-1,pos:String(y?y.pos:""),dragOver:o===b&&P===0,dragOverGapTop:o===b&&P===-1,dragOverGapBottom:o===b&&P===1};return x}function m(b){var g=b.data,v=b.expanded,n=b.selected,d=b.checked,h=b.loaded,C=b.loading,T=b.halfChecked,o=b.dragOver,P=b.dragOverGapTop,O=b.dragOverGapBottom,y=b.pos,x=b.active,E=Object(c.a)(Object(c.a)({},g),{},{expanded:v,selected:n,checked:d,loaded:h,loading:C,halfChecked:T,dragOver:o,dragOverGapTop:P,dragOverGapBottom:O,pos:y,active:x});return"props"in E||Object.defineProperty(E,"props",{get:function(){return Object(f.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),b}}),E}},"8EBN":function(I,Y,k){(function(L){L(k("VrN/"))})(function(L){"use strict";L.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var c=0;c<L.modeInfo.length;c++){var S=L.modeInfo[c];S.mimes&&(S.mime=S.mimes[0])}L.findModeByMIME=function(R){R=R.toLowerCase();for(var f=0;f<L.modeInfo.length;f++){var s=L.modeInfo[f];if(s.mime==R)return s;if(s.mimes){for(var w=0;w<s.mimes.length;w++)if(s.mimes[w]==R)return s}}if(/\+xml$/.test(R))return L.findModeByMIME("application/xml");if(/\+json$/.test(R))return L.findModeByMIME("application/json")},L.findModeByExtension=function(R){R=R.toLowerCase();for(var f=0;f<L.modeInfo.length;f++){var s=L.modeInfo[f];if(s.ext){for(var w=0;w<s.ext.length;w++)if(s.ext[w]==R)return s}}},L.findModeByFileName=function(R){for(var f=0;f<L.modeInfo.length;f++){var s=L.modeInfo[f];if(s.file&&s.file.test(R))return s}var w=R.lastIndexOf("."),l=w>-1&&R.substring(w+1,R.length);if(l)return L.findModeByExtension(l)},L.findModeByName=function(R){R=R.toLowerCase();for(var f=0;f<L.modeInfo.length;f++){var s=L.modeInfo[f];if(s.name.toLowerCase()==R)return s;if(s.alias){for(var w=0;w<s.alias.length;w++)if(s.alias[w].toLowerCase()==R)return s}}}})},"8hTe":function(I,Y,k){I.exports={button:"button___1wy9m"}},"9Bee":function(I,Y,k){"use strict";var L=k("DYRE"),c=k("zeV3"),S=k("+L6B"),R=k("2/Rp"),f=k("k1fw"),s=k("tJVT"),w=k("cDcd"),l=k.n(w),i=k("vg9a"),a=k("DlQD"),r=k.n(a),u=k("rUJ1");function p(ie,we){var me=ie.match(/^(\s+)(?:```)/);if(me===null)return we;var oe=me[1];return we.split(`
`).map(function(se){var te=se.match(/^\s+/);if(te===null)return se;var be=Object(s.a)(te,1),q=be[0];return q.length>=oe.length?se.slice(oe.length):se}).join(`
`)}var m=[],b=["<ul>"],g=new r.a.Renderer,v=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function n(){m.length=0,b=["<ul>"]}var d={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function h(ie,we,me,oe){if(we>=ie.length||ie[we].level<=me)return we;var se=ie[we];oe.push("<li><a href='#"+se.anchor+"'>"+se.text+"</a>"),we++;var te=[];return we=h(ie,we,se.level,te),te.length>0&&(oe.push("<ul>"),te.forEach(function(be){oe.push(be)}),oe.push("</ul>")),oe.push("</li>"),we=h(ie,we,me,oe),we}function C(){return h(m,0,0,b),b.push("</ul>"),b.join("")}var T={heading:function(we){var me=v.exec(we);if(me)return{type:"heading",raw:me[0],depth:me[1].length,text:me[2]}},fences:function(we){var me=this.rules.block.fences.exec(we);if(me){var oe=me[0],se=p(oe,me[3]||""),te=me[2]?me[2].trim():me[2];if(["latex","katex","math"].indexOf(te)>=0){var be=O(),q=se;se=be,y[be]={type:"block",expression:q}}return{type:"code",raw:oe,lang:te,text:se}}}},o=/(?:\${2})([^\n`]+?)(?:\${2})/gi,P=0,O=function(){return"__special_katext_id_".concat(P++,"__")},y={};function x(){return y}function E(){P=0,y={}}function _(ie){return ie=ie.replace(o,function(we,me){var oe=O();return y[oe]={type:"inline",expression:me},oe}),ie}var N=g.listitem;g.listitem=function(ie){return N(_(ie))};var j=g.paragraph;g.paragraph=function(ie){return j(_(ie))};var M=g.tablecell;g.tablecell=function(ie,we){return M(_(ie),we)},g.code=function(ie,we,me){var oe=(we||"").match(/\S*/)[0];return oe?["latex","katex","math"].indexOf(oe)>=0?"<p class='editormd-tex'>".concat(ie,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(we,'">').concat(me?ie:Object(u.escape)(ie,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(me?ie:Object(u.escape)(ie,!0))+"</code></pre>"},g.heading=function(ie,we,me){var oe=this.options.headerPrefix+me.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:oe,level:we,text:ie}),"<h"+we+' id="'+oe+'">'+ie+"</h"+we+">"},r.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),r.a.use({tokenizer:T,renderer:g});var H=r.a,z=k("SJMd"),F=k("ulZh"),G=k.n(F),B=k("m3rI"),K=k("Oy/b"),W=k("p5ED"),J=k("8hTe"),ee=k.n(J),Z=/<pre[^>]*>/g;function he(ie){var we=document.createElement("div");return we.innerHTML=ie,we.childNodes.length===0?"":we.childNodes[0].nodeValue}var ge=Y.a=function(ie){var we=ie.value,me=we===void 0?"":we,oe=ie.edit,se=oe===void 0?!1:oe,te=ie.className,be=ie.showTextOnly,q=ie.showLines,ae=ie.replaces,xe=ie.zoomImg,ne=ie.hasMask,Q=ie.style,X=Q===void 0?{}:Q,$=ie.stylesPrev,pe=$===void 0?{}:$,de=String(me),Ce=Object(w.useRef)(),ze=Object(w.useRef)(),qe=Object(w.useState)(""),Ye=Object(s.a)(qe,2),Ve=Ye[0],et=Ye[1],rt=Object(w.useState)("office"),Me=Object(s.a)(rt,2),Se=Me[0],Ge=Me[1],tt=Object(w.useMemo)(function(){try{var Ae=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ce=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ee=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;de=de.replace(Ae,"("+B.a.API_SERVER+"/api/attachments/").replace(ce,'"'+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($e){}var _e=H(de),De=x();if(de.match(/\[TOC\]/)&&(_e=_e.replace("<p>[TOC]</p>",C()),n()),_e=_e.replace(/(__special_katext_id_\d+__)/g,function($e,at){var it=De[at],st=it.type,Je=it.expression;return Object(K.renderToString)(he(Je)||"",{displayMode:st==="block",throwOnError:!1,output:"html"})}),_e=_e.replace(/▁/g,"\u2581\u2581\u2581"),E(),be){var je=document.createElement("div");return je.innerHTML=_e,je.innerText}return setTimeout(function(){return Pe()},500),_e},[de]),Ue=Object(w.useRef)();d.WebkitLineClamp=q,q&&(X=Object(f.a)(Object(f.a)({},X),d));function Xe(Ae){var ce=Ae.target;if(ce.tagName.toUpperCase()==="IMG"){if(xe){var Ee=ce.getAttribute("src");et(Ee),Ge("image")}}else if(ce.tagName.toUpperCase()==="A"){var _e=ce.getAttribute("href");if(_e.indexOf("office")>-1)Ae.preventDefault(),et(_e),Ge("office");else if(_e.indexOf("application/pdf")>-1)Ae.preventDefault(),et(_e),Ge("pdf");else if(_e.indexOf("text/html")>-1)Ae.preventDefault(),et(_e),Ge("html");else if(_e.startsWith("#")){Ae.preventDefault();var De=document.getElementById(_e.replace("#",""));De&&De.scrollIntoView(!0)}}}var Pe=function(){var ce,Ee=(ce=Ue.current)===null||ce===void 0?void 0:ce.querySelectorAll("video");Ee==null||Ee.forEach(function(_e){if(_e.oncontextmenu=function(){return!1},_e.src.indexOf(".m3u8")>-1&&!_e.canPlayType("application/vnd.apple.mpegurl")){if(G.a.isSupported()){var De=new G.a;De.loadSource(_e.src),De.attachMedia(_e)}}})};Object(w.useEffect)(function(){if(Ue.current&&tt&&(tt.match(Z)&&window.PR.prettyPrint()),Ue.current)return Ue.current.addEventListener("click",Xe),function(){Ue.current.removeEventListener("click",Xe),E(),n()}},[tt,Ue.current,Xe]);var Te=function(ce){if(!se)return;ce.target.nodeName==="IMG"?(Ce.current.style.display="flex",Ce.current.style.width=ce.target.clientWidth+"px",Ce.current.style.height=ce.target.clientHeight+"px",Ce.current.style.top=ce.target.offsetTop+"px",Ce.current.style.left=ce.target.offsetLeft+"px",ze.current.src=ce.target.getAttribute("src")):Ce.current.style.display="none"};return l.a.createElement("div",{style:{position:"relative"}},l.a.createElement("div",{ref:Ue,style:Object(f.a)({},X),className:"".concat(te||""," markdown-body ").concat(ee.a.mdBody),onMouseOver:Te,dangerouslySetInnerHTML:{__html:tt}}),l.a.createElement("div",{ref:Ce,className:ee.a.button},l.a.createElement(c.a,null,l.a.createElement(R.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),l.a.createElement(R.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),l.a.createElement("img",{ref:ze,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),l.a.createElement(W.a,{close:!0,data:Ve,type:Ve!=null&&Ve.length?Se:"",style:Object(f.a)({},pe),onClose:function(){return et("")}}))}},"9OqN":function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.CTR=function(){var c=L.lib.BlockCipherMode.extend(),S=c.Encryptor=c.extend({processBlock:function(R,f){var s=this._cipher,w=s.blockSize,l=this._iv,i=this._counter;l&&(i=this._counter=l.slice(0),this._iv=void 0);var a=i.slice(0);s.encryptBlock(a,0),i[w-1]=i[w-1]+1|0;for(var r=0;r<w;r++)R[f+r]^=a[r]}});return c.Decryptor=S,c}(),L.mode.CTR})},"9VGf":function(I,Y,k){"use strict";k.d(Y,"a",function(){return S});var L=k("cDcd"),c=k.n(L);function S(R,f){var s=Object(L.useRef)();Object(L.useEffect)(function(){s.current=R}),Object(L.useEffect)(function(){function w(){s.current()}if(f!==null){var l=setInterval(w,f);return function(){return clearInterval(l)}}},[f])}},ALsQ:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.CFB=function(){var c=L.lib.BlockCipherMode.extend();c.Encryptor=c.extend({processBlock:function(R,f){var s=this._cipher,w=s.blockSize;S.call(this,R,f,w,s),this._prevBlock=R.slice(f,f+w)}}),c.Decryptor=c.extend({processBlock:function(R,f){var s=this._cipher,w=s.blockSize,l=R.slice(f,f+w);S.call(this,R,f,w,s),this._prevBlock=l}});function S(R,f,s,w){var l,i=this._iv;i?(l=i.slice(0),this._iv=void 0):l=this._prevBlock,w.encryptBlock(l,0);for(var a=0;a<s;a++)R[f+a]^=l[a]}return c}(),L.mode.CFB})},B7Ph:function(I,Y,k){"use strict";k.d(Y,"a",function(){return ee});var L=k("5NDa"),c=k("5rEg"),S=k("sRBo"),R=k("kaz8"),f=k("5Dmo"),s=k("3S7+"),w=k("14J3"),l=k("BMrR"),i=k("7Kak"),a=k("9yH6"),r=k("+L6B"),u=k("2/Rp"),p=k("2qtc"),m=k("kLXV"),b=k("k1fw"),g=k("miYZ"),v=k("tsqr"),n=k("9og8"),d=k("tJVT"),h=k("oBTY"),C=k("DZo9"),T=k("8z0m"),o=k("WmNS"),P=k.n(o),O=k("cDcd"),y=k.n(O),x=k("Bvq2"),E=k.n(x),_=k("nj2k"),N=k.n(_),j=k("mxV5"),M=k.n(j),H=k("KhGG"),z=k("ErOA"),F=k("7Cbv"),G=k("1vsH"),B=k("p5ED"),K=T.a.Dragger,W=function(he){for(var ge=function(xe){return xe&&xe.substring(0,xe.lastIndexOf("."))},ie=Object(h.a)(he),we=0,me=[],oe=0;oe<ie.length;oe++){for(var se="",te=0;te<me.length;te++)if(ge(me[te][0].name)==ge(ie[oe].name)){we=1,se=te;break}if(we==1)me[se].push(ie[oe]),we=0;else if(we==0){var be=new Array;be.push(ie[oe]),me.push(be)}}var q=me.map(function(ae){if(ae[0].name.includes(".in"))return ae.length===2?ae:[ae[0],{}];if(ae[0].name.includes(".out"))return ae.length===2?ae.reverse():[{},ae[0]]});return q},J=function(he){var ge=he.onClose,ie=he.onOK,we=he.visible,me=he.wrapClassName,oe=he.rootIdentifier,se=he.multiple,te=se===void 0?!1:se,be=he.defaultMultipleValue,q=be===void 0?!0:be,ae=Object(O.useState)([]),xe=Object(d.a)(ae,2),ne=xe[0],Q=xe[1],X=Object(O.useState)({}),$=Object(d.a)(X,2),pe=$[0],de=$[1],Ce=Object(O.useState)(!1),ze=Object(d.a)(Ce,2),qe=ze[0],Ye=ze[1],Ve=Object(O.useState)(!0),et=Object(d.a)(Ve,2),rt=et[0],Me=et[1],Se=Object(O.useRef)([]),Ge=Object(O.useRef)(0),tt=function(){ge()};Object(O.useEffect)(function(){Ue()},[]),Object(O.useEffect)(function(){we&&(Se.current=[],Ge.current=0,Q([]),Me(q))},[we]);var Ue=function(){var De=Object(n.a)(P.a.mark(function je(){var $e,at;return P.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return st.prev=0,st.next=3,Object(z.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:$e=st.sent,at=JSON.parse(Object(H.a)($e.data)),de(at),st.next=11;break;case 8:st.prev=8,st.t0=st.catch(0),v.b.error(st.t0);case 11:case"end":return st.stop()}},je,null,[[0,8]])}));return function(){return De.apply(this,arguments)}}(),Xe=function(je){return je&&je.substring(0,je.lastIndexOf("."))},Pe=function(je){var $e,at,it=Xe(($e=je[0])===null||$e===void 0?void 0:$e.name)||Xe((at=je[1])===null||at===void 0?void 0:at.name),st=ne.filter(function(Je){return Xe(Je.name)!==it});Se.current=Object(h.a)(st),Q(Object(h.a)(st))},Te=function(je){if(!rt){var $e=new FormData;$e.append("file",je.file);var at=Object(z.a)("/api/attachments/get_file_content.json",{method:"post",body:$e},!0);at.then(function(ct){if(ct.status===0){Ge.current=Ge.current+1;var Lt=Se.current.map(function(Ct){if(Ct.name===je.name){var Ft,Et=Object(b.a)({},Ct);return je!=null&&(Ft=je.name)!==null&&Ft!==void 0&&Ft.includes(".in")?Et.input=ct==null?void 0:ct.content:Et.output=ct==null?void 0:ct.content,Et}return Ct});if(Se.current=Object(h.a)(Lt),Q(Object(h.a)(Lt)),Ge.current>0&&Ge.current===ne.length){Ye(!1);var kt=W(Lt);kt=kt.filter(function(Ct){var Ft,Et;return!!((Ft=Ct[0])!==null&&Ft!==void 0&&Ft.name&&(Et=Ct[1])!==null&&Et!==void 0&&Et.name)}),kt=kt.map(function(Ct){return Object(b.a)(Object(b.a)(Object(b.a)({},Ct[0]),Ct[1]),{},{is_file:!1})}),ie(kt),ge()}}else Ye(!1),ge()});return}var it=new M.a({endpoint:pe.end_point,region:pe.region,accessKeyId:pe.access_key_id,accessKeySecret:pe.access_key_secret,bucket:pe.bucket,stsToken:pe.security_token}),st=je.name,Je={container_type:"TestSet",file_name:st},gt=Object(F.a)(),yt="testsets/".concat(oe,"/").concat(gt).concat(st.indexOf(".")>-1?"."+st.split(".").pop():"");oe===null&&(yt="testsets/".concat(gt).concat(st.indexOf(".")>-1?"."+st.split(".").pop():"")),it.multipartUpload(yt,new Blob([je.file],{type:je.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:st+""},url:pe==null?void 0:pe.callback_url,host:pe==null?void 0:pe.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(z.e)(Je)}}).then(function(ct){if(ct.data.status===0){Ge.current=Ge.current+1;var Lt=Se.current.map(function(Ct){var Ft,Et;if(Ct.name===((Ft=ct.data)===null||Ft===void 0||((Et=Ft.data)===null||Et===void 0)?void 0:Et.file_name)){var ir,Yt,It,Ht=Object(b.a)({},Ct);if((ir=ct.data)!==null&&ir!==void 0&&(Yt=ir.data)!==null&&Yt!==void 0&&(It=Yt.file_name)!==null&&It!==void 0&&It.includes(".in")){var Ur,cn,gr,zn,vt,_t;Ht.in_object_key=(Ur=ct.data)===null||Ur===void 0||((cn=Ur.data)===null||cn===void 0)?void 0:cn.object,Ht.in_object_size=(gr=ct.data)===null||gr===void 0||((zn=gr.data)===null||zn===void 0)?void 0:zn.size,Ht.input=(vt=ct.data)===null||vt===void 0||((_t=vt.data)===null||_t===void 0)?void 0:_t.file_name,Ht.in_file=je}else{var mt,mr,Cr,Bt,Rt,Er;Ht.out_object_key=(mt=ct.data)===null||mt===void 0||((mr=mt.data)===null||mr===void 0)?void 0:mr.object,Ht.out_object_size=(Cr=ct.data)===null||Cr===void 0||((Bt=Cr.data)===null||Bt===void 0)?void 0:Bt.size,Ht.output=(Rt=ct.data)===null||Rt===void 0||((Er=Rt.data)===null||Er===void 0)?void 0:Er.file_name,Ht.out_file=je}return Ht}return Ct});if(Se.current=Object(h.a)(Lt),Q(Object(h.a)(Lt)),Ge.current>0&&Ge.current===ne.length){Ye(!1);var kt=W(Lt);kt=kt.filter(function(Ct){var Ft,Et;return!!((Ft=Ct[0])!==null&&Ft!==void 0&&Ft.name&&(Et=Ct[1])!==null&&Et!==void 0&&Et.name)}),kt=kt.map(function(Ct){return Object(b.a)(Object(b.a)(Object(b.a)({},Ct[0]),Ct[1]),{},{is_file:!0})}),ie(kt),ge()}}})},Ae=function(je){return new Promise(function($e,at){for(var it=0,st=[],Je=function(ct){je[ct].file.slice(0,1).arrayBuffer().then(function(){it++,it===je.length&&(st.length?(v.b.warn("".concat(st.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),at()):$e(je))}).catch(function(Lt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Lt),it++,st.push(je[ct].name),it===je.length&&(st.length?(v.b.warn("".concat(st.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),at()):$e(je))})},gt=0;gt<je.length;gt++)Je(gt)})},ce=function(){var De=Object(n.a)(P.a.mark(function je(){var $e;return P.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:if(!(ne.length===0)){it.next=3;break}return v.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),it.abrupt("return");case 3:return it.next=5,Ae(ne);case 5:if(Ye(!0),$e=W(ne),!$e.some(function(st){var Je,gt;return!((Je=st[0])!==null&&Je!==void 0&&Je.name&&(gt=st[1])!==null&&gt!==void 0&&gt.name)})){it.next=10;break}return m.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 st=Object(n.a)(P.a.mark(function gt(){return P.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:ne.map(function(){var Lt=Object(n.a)(P.a.mark(function kt(Ct){return P.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:Te(Ct);case 1:case"end":return Et.stop()}},kt)}));return function(kt){return Lt.apply(this,arguments)}}());case 1:case"end":return ct.stop()}},gt)}));function Je(){return st.apply(this,arguments)}return Je}(),onCancel:function(){Ye(!1)}}),it.abrupt("return");case 10:ne.map(function(){var st=Object(n.a)(P.a.mark(function Je(gt){return P.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:Te(gt);case 1:case"end":return ct.stop()}},Je)}));return function(Je){return st.apply(this,arguments)}}());case 11:case"end":return it.stop()}},je)}));return function(){return De.apply(this,arguments)}}(),Ee={name:"file",fileList:ne,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(je){if(ne!=null&&ne.some(function(at){return at.name===je.name}))return v.b.info("".concat(je.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(je.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(je.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 $e={name:je.name,uid:je.uid,file:je,percent:0};return ne.push($e),Se.current=Object(h.a)(ne),Q(Object(h.a)(ne)),!1}},_e=W(ne);return console.log(ne,_e,"fileList"),y.a.createElement(m.a,{visible:we,wrapClassName:me,onOk:ce,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:qe},onCancel:tt,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},y.a.createElement("div",{className:E.a.wrap},ne.length?y.a.createElement("div",null,y.a.createElement(l.a,{justify:"space-between",align:"middle",className:"mb20"},y.a.createElement("div",{style:{visibility:te?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",y.a.createElement(a.a.Group,{className:"ml10",value:rt,onChange:function(je){return Me(je.target.value)}},y.a.createElement(a.a,{value:!1},"\u6587\u672C"),y.a.createElement(a.a,{value:!0},"\u6587\u4EF6"))),y.a.createElement(T.a,Ee,y.a.createElement(u.a,{className:E.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),y.a.createElement(ee,{data:_e,onRemove:Pe})):y.a.createElement("div",{className:E.a.noData},y.a.createElement("img",{src:N.a,alt:""}),y.a.createElement(T.a,Ee,y.a.createElement(u.a,{className:E.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),y.a.createElement("div",{className:E.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",y.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",y.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",y.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",y.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",y.a.createElement("br",null))))},ee=function(he){var ge=he.data,ie=ge===void 0?[]:ge,we=he.onRemove,me=he.width,oe=me===void 0?"auto":me,se=he.showScore,te=se===void 0?!1:se,be=he.disabled,q=be===void 0?!1:be,ae=he.inputChange,xe=he.onEvaluatingChange,ne=he.showEvaluatingSetting,Q=ne===void 0?!1:ne,X={value:"",filename:"",dataUrl:""},$=Object(O.useState)(Object(b.a)({},X)),pe=Object(d.a)($,2),de=pe[0],Ce=pe[1],ze=function(et){var rt=document.createElement("a");document.body.appendChild(rt);var Me=URL.createObjectURL(et.file);rt.href=Me,rt.download=et.name,rt.click(),URL.revokeObjectURL(Me),document.body.removeChild(rt)},qe=function(et,rt){Object(G.y)(et,rt)},Ye=function(et,rt){m.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:y.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){we(et,rt)},onCancel:function(){}})};return ie.length?y.a.createElement("div",{style:{width:oe}},y.a.createElement("div",{className:E.a.head},Q&&y.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",y.a.createElement(s.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),y.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),y.a.createElement("div",{style:{width:te?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),y.a.createElement("div",{style:{width:te?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),te&&y.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),Q&&y.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",y.a.createElement(s.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),Q&&y.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",y.a.createElement(s.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),y.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),ie.map(function(Ve,et){var rt,Me,Se,Ge;return y.a.createElement("div",{key:et,className:E.a.list},Q&&y.a.createElement("div",{style:{width:"10%"}},y.a.createElement(R.a,{checked:!!Ve.hidden,onChange:function(Ue){xe(Ue.target.checked?1:0,et,"hidden")}})),y.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",et+1),y.a.createElement("div",{className:E.a.info,style:{width:te?"25%":"35%"}},y.a.createElement("span",{title:Ve.input||((rt=Ve[0])===null||rt===void 0?void 0:rt.name),onClick:Object(n.a)(P.a.mark(function tt(){var Ue,Xe;return P.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(Ve.input?Ve.input_file_url?Ue=Ve.input_file_url:Ue=Ve.in_file:Ue=Ve[0],!(typeof Ue=="string")){Te.next=14;break}return Te.next=4,fetch(Ue,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Xe=Te.sent,Te.t0=Ce,Te.next=8,Xe.text();case 8:Te.t1=Te.sent,Te.t2=Ue,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(G.H)(Ue.file);case 16:Xe=Te.sent,Ce({value:Xe.text,filename:Ue.name,dataUrl:Xe.link});case 18:case"end":return Te.stop()}},tt)}))},Ve.input||((Me=Ve[0])===null||Me===void 0?void 0:Me.name))),y.a.createElement("div",{className:E.a.info,style:{width:te?"25%":"35%"}},y.a.createElement("span",{title:Ve.output||((Se=Ve[1])===null||Se===void 0?void 0:Se.name),onClick:Object(n.a)(P.a.mark(function tt(){var Ue,Xe;return P.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(Ve.input?Ve.output_file_url?Ue=Ve.output_file_url:Ue=Ve.out_file:Ue=Ve[1],!(typeof Ue=="string")){Te.next=14;break}return Te.next=4,fetch(Ue,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Xe=Te.sent,Te.t0=Ce,Te.next=8,Xe.text();case 8:Te.t1=Te.sent,Te.t2=Ue,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(G.H)(Ue.file);case 16:Xe=Te.sent,Ce({value:Xe.text,filename:Ue.name,dataUrl:Xe.link});case 18:case"end":return Te.stop()}},tt)}))},Ve.output||((Ge=Ve[1])===null||Ge===void 0?void 0:Ge.name))),te&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(c.a,{disabled:q,style:{width:"70%"},onChange:function(Ue){return ae(Ue,et)},value:Ve.score}),y.a.createElement("span",null,"\xA0%")),Q&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(R.a,{checked:Ve.is_invisible||!1,onChange:function(Ue){xe(Ue.target.checked,et,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),Q&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(R.a,{checked:Ve.last_match_rule||!1,onChange:function(Ue){xe(Ue.target.checked,et,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),y.a.createElement("div",{onClick:function(){return Ye(Ve,et)},style:{width:"10%"}},y.a.createElement("span",{className:E.a.del},"\u5220\u9664")))}),y.a.createElement(B.a,{close:!0,data:de.dataUrl,filename:de.filename,type:de.dataUrl.length?"txt":"",onClose:function(){return Ce(Object(b.a)({},X))},monacoEditor:{value:de.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):y.a.createElement(y.a.Fragment,null)};Y.b=J},BU3w:function(I,Y,k){"use strict";k.d(Y,"a",function(){return s});var L=k("MNnm"),c="rc-util-key";function S(w){if(w.attachTo)return w.attachTo;var l=document.querySelector("head");return l||document.body}function R(w){var l,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(L.a)())return null;var a=document.createElement("style");if((l=i.csp)===null||l===void 0?void 0:l.nonce){var r;a.nonce=(r=i.csp)===null||r===void 0?void 0:r.nonce}a.innerHTML=w;var u=S(i),p=u.firstChild;return i.prepend&&u.prepend?u.prepend(a):i.prepend&&p?u.insertBefore(a,p):u.appendChild(a),a}var f=new Map;function s(w,l){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=S(i);if(!f.has(a)){var r=R("",i),u=r.parentNode;f.set(a,u),u.removeChild(r)}var p=Array.from(f.get(a).children).find(function(n){return n.tagName==="STYLE"&&n[c]===l});if(p){var m,b;if(((m=i.csp)===null||m===void 0?void 0:m.nonce)&&p.nonce!==((b=i.csp)===null||b===void 0?void 0:b.nonce)){var g;p.nonce=(g=i.csp)===null||g===void 0?void 0:g.nonce}return p.innerHTML!==w&&(p.innerHTML=w),p}var v=R(w,i);return v[c]=l,v}},Bd2K:function(I,Y,k){(function(L){L(k("VrN/"),k("osHv"))})(function(L){L.defineOption("autoCloseTags",!1,function(i,a,r){if(r!=L.Init&&r&&i.removeKeyMap("autoCloseTags"),!a)return;var u={name:"autoCloseTags"};(typeof a!="object"||a.whenClosing!==!1)&&(u["'/'"]=function(p){return s(p)}),(typeof a!="object"||a.whenOpening!==!1)&&(u["'>'"]=function(p){return R(p)}),i.addKeyMap(u)});var c=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],S=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function R(i){if(i.getOption("disableInput"))return L.Pass;for(var a=i.listSelections(),r=[],u=i.getOption("autoCloseTags"),p=0;p<a.length;p++){if(!a[p].empty())return L.Pass;var m=a[p].head,b=i.getTokenAt(m),g=L.innerMode(i.getMode(),b.state),v=g.state,n=g.mode.xmlCurrentTag&&g.mode.xmlCurrentTag(v),d=n&&n.name;if(!d)return L.Pass;var h=g.mode.configuration=="html",C=typeof u=="object"&&u.dontCloseTags||h&&c,T=typeof u=="object"&&u.indentTags||h&&S;b.end>m.ch&&(d=d.slice(0,d.length-b.end+m.ch));var o=d.toLowerCase();if(!d||b.type=="string"&&(b.end!=m.ch||!/[\"\']/.test(b.string.charAt(b.string.length-1))||b.string.length==1)||b.type=="tag"&&n.close||b.string.indexOf("/")==m.ch-b.start-1||C&&w(C,o)>-1||l(i,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(v)||[],d,m,!0))return L.Pass;var P=typeof u=="object"&&u.emptyTags;if(P&&w(P,d)>-1){r[p]={text:"/>",newPos:L.Pos(m.line,m.ch+2)};continue}var O=T&&w(T,o)>-1;r[p]={indent:O,text:">"+(O?`
`:"")+"</"+d+">",newPos:O?L.Pos(m.line+1,0):L.Pos(m.line,m.ch+1)}}for(var y=typeof u=="object"&&u.dontIndentOnAutoClose,p=a.length-1;p>=0;p--){var x=r[p];i.replaceRange(x.text,a[p].head,a[p].anchor,"+insert");var E=i.listSelections().slice(0);E[p]={head:x.newPos,anchor:x.newPos},i.setSelections(E),!y&&x.indent&&(i.indentLine(x.newPos.line,null,!0),i.indentLine(x.newPos.line+1,null,!0))}}function f(i,a){for(var r=i.listSelections(),u=[],p=a?"/":"</",m=i.getOption("autoCloseTags"),b=typeof m=="object"&&m.dontIndentOnSlash,g=0;g<r.length;g++){if(!r[g].empty())return L.Pass;var v=r[g].head,n=i.getTokenAt(v),d=L.innerMode(i.getMode(),n.state),h=d.state;if(a&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=v.ch-1))return L.Pass;var C,T=d.mode.name!="xml"&&i.getMode().name=="htmlmixed";if(T&&d.mode.name=="javascript")C=p+"script";else if(T&&d.mode.name=="css")C=p+"style";else{var o=d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(h);if(!o||o.length&&l(i,o,o[o.length-1],v))return L.Pass;C=p+o[o.length-1]}i.getLine(v.line).charAt(n.end)!=">"&&(C+=">"),u[g]=C}if(i.replaceSelections(u),r=i.listSelections(),!b)for(var g=0;g<r.length;g++)(g==r.length-1||r[g].head.line<r[g+1].head.line)&&i.indentLine(r[g].head.line)}function s(i){return i.getOption("disableInput")?L.Pass:f(i,!0)}L.commands.closeTag=function(i){return f(i)};function w(i,a){if(i.indexOf)return i.indexOf(a);for(var r=0,u=i.length;r<u;++r)if(i[r]==a)return r;return-1}function l(i,a,r,u,p){if(!L.scanForClosingTag)return!1;var m=Math.min(i.lastLine()+1,u.line+500),b=L.scanForClosingTag(i,u,null,m);if(!b||b.tag!=r)return!1;for(var g=p?1:0,v=a.length-1;v>=0&&a[v]==r;v--)++g;u=b.to;for(var v=1;v<g;v++){var n=L.scanForClosingTag(i,u,null,m);if(!n||n.tag!=r)return!1;u=n.to}return!0}})},BjJ7:function(I,Y,k){"use strict";k.d(Y,"d",function(){return c}),k.d(Y,"c",function(){return S}),k.d(Y,"e",function(){return R}),k.d(Y,"b",function(){return f}),k.d(Y,"a",function(){return w});var L=k("m3rI");function c(l){var i=!0;if(l.length>0){for(var a=0;a<l.length;a++)if(l[a].compile_success==0||!l[a].compile_success){i=!1;break}}else i=!1;return i}function S(l){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=[],r=0;r<l.length;r++){var u=l[r],p=i?"".concat(i,"/").concat(u.name):"".concat(u.name);a.push({title:u.name,isLeaf:!(u.type==="tree"),key:p})}return a}function R(l,i,a){for(var r=0;r<l.length;r++){var u=l[r];if(u.key===i){u.children=a;break}u.children&&R(u.children,i,a)}return l}function f(l,i,a){var r;return function(){var u=this,p=arguments,m=function(){r=null,a||l.apply(u,p)},b=a&&!r;clearTimeout(r),r=setTimeout(m,i),b&&l.apply(u,p)}}var s=!0,w=L.a.API_SERVER},Bvq2:function(I,Y,k){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,Y,k){},CrYA:function(I,Y,k){var L=k("MFOe"),c=L.Global;I.exports={name:"sessionStorage",read:R,write:f,each:s,remove:w,clearAll:l};function S(){return c.sessionStorage}function R(i){return S().getItem(i)}function f(i,a){return S().setItem(i,a)}function s(i){for(var a=S().length-1;a>=0;a--){var r=S().key(a);i(R(r),r)}}function w(i){return S().removeItem(i)}function l(){return S().clear()}},D1Df:function(I,Y,k){"use strict";function L(M){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L=function(z){return typeof z}:L=function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},L(M)}function c(){return c=Object.assign||function(M){for(var H=1;H<arguments.length;H++){var z=arguments[H];for(var F in z)Object.prototype.hasOwnProperty.call(z,F)&&(M[F]=z[F])}return M},c.apply(this,arguments)}function S(M,H){var z=Object.keys(M);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(M);H&&(F=F.filter(function(G){return Object.getOwnPropertyDescriptor(M,G).enumerable})),z.push.apply(z,F)}return z}function R(M){for(var H=1;H<arguments.length;H++){var z=arguments[H]!=null?arguments[H]:{};H%2?S(z,!0).forEach(function(F){b(M,F,z[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(z)):S(z).forEach(function(F){Object.defineProperty(M,F,Object.getOwnPropertyDescriptor(z,F))})}return M}function f(M,H){if(M==null)return{};var z=s(M,H),F,G;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(M);for(G=0;G<B.length;G++){if(F=B[G],H.indexOf(F)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(M,F))continue;z[F]=M[F]}}return z}function s(M,H){if(M==null)return{};var z={},F=Object.keys(M),G,B;for(B=0;B<F.length;B++){if(G=F[B],H.indexOf(G)>=0)continue;z[G]=M[G]}return z}function w(M,H){if(!(M instanceof H))throw new TypeError("Cannot call a class as a function")}function l(M,H){for(var z=0;z<H.length;z++){var F=H[z];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(M,F.key,F)}}function i(M,H,z){return H&&l(M.prototype,H),z&&l(M,z),M}function a(M,H){return H&&(L(H)==="object"||typeof H=="function")?H:u(M)}function r(M){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(z){return z.__proto__||Object.getPrototypeOf(z)},r(M)}function u(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function p(M,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(H&&H.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),H&&m(M,H)}function m(M,H){return m=Object.setPrototypeOf||function(F,G){return F.__proto__=G,F},m(M,H)}function b(M,H,z){return H in M?Object.defineProperty(M,H,{value:z,enumerable:!0,configurable:!0,writable:!0}):M[H]=z,M}var g=k("cDcd"),v=k("17x9"),n=k("H38U"),d=k("aRTE");function h(M){for(var H="",z=0;z<M.length;z++){var F=M.charCodeAt(z);F<128?H+=String.fromCharCode(F):F<2048?(H+=String.fromCharCode(192|F>>6),H+=String.fromCharCode(128|F&63)):F<55296||F>=57344?(H+=String.fromCharCode(224|F>>12),H+=String.fromCharCode(128|F>>6&63),H+=String.fromCharCode(128|F&63)):(z++,F=65536+((F&1023)<<10|M.charCodeAt(z)&1023),H+=String.fromCharCode(240|F>>18),H+=String.fromCharCode(128|F>>12&63),H+=String.fromCharCode(128|F>>6&63),H+=String.fromCharCode(128|F&63))}return H}var C={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},T={},o=4,P=.1;function O(M){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=[];return M.forEach(function(F,G){var B=null;F.forEach(function(K,W){if(!K&&B!==null){z.push("M".concat(B+H," ").concat(G+H,"h").concat(W-B,"v1H").concat(B+H,"z")),B=null;return}if(W===F.length-1){if(!K)return;B===null?z.push("M".concat(W+H,",").concat(G+H," h1v1H").concat(W+H,"z")):z.push("M".concat(B+H,",").concat(G+H," h").concat(W+1-B,"v1H").concat(B+H,"z"));return}K&&B===null&&(B=W)})}),z.join("")}function y(M,H){return M.slice().map(function(z,F){return F<H.y||F>=H.y+H.h?z:z.map(function(G,B){return B<H.x||B>=H.x+H.w?G:!1})})}function x(M,H){var z=M.imageSettings,F=M.size,G=M.includeMargin;if(z==null)return null;var B=G?o:0,K=H.length+B*2,W=Math.floor(F*P),J=K/F,ee=(z.width||W)*J,Z=(z.height||W)*J,he=z.x==null?H.length/2-ee/2:z.x*J,ge=z.y==null?H.length/2-Z/2:z.y*J,ie=null;if(z.excavate){var we=Math.floor(he),me=Math.floor(ge),oe=Math.ceil(ee+he-we),se=Math.ceil(Z+ge-me);ie={x:we,y:me,w:oe,h:se}}return{x:he,y:ge,h:Z,w:ee,excavation:ie}}var E=function(){try{new Path2D().addPath(new Path2D)}catch(M){return!1}return!0}(),_=function(M){p(H,M);function H(){var z,F;w(this,H);for(var G=arguments.length,B=new Array(G),K=0;K<G;K++)B[K]=arguments[K];return F=a(this,(z=r(H)).call.apply(z,[this].concat(B))),b(u(F),"_canvas",void 0),b(u(F),"_image",void 0),b(u(F),"state",{imgLoaded:!1}),b(u(F),"handleImageLoad",function(){F.setState({imgLoaded:!0})}),F}return i(H,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var F=this.props,G=F.value,B=F.size,K=F.level,W=F.bgColor,J=F.fgColor,ee=F.includeMargin,Z=F.imageSettings,he=new n(-1,d[K]);if(he.addData(h(G)),he.make(),this._canvas!=null){var ge=this._canvas,ie=ge.getContext("2d");if(!ie)return;var we=he.modules;if(we===null)return;var me=ee?o:0,oe=we.length+me*2,se=x(this.props,we);Z!=null&&se!=null&&(se.excavation!=null&&(we=y(we,se.excavation)));var te=window.devicePixelRatio||1;ge.height=ge.width=B*te;var be=B/oe*te;ie.scale(be,be),ie.fillStyle=W,ie.fillRect(0,0,oe,oe),ie.fillStyle=J,E?ie.fill(new Path2D(O(we,me))):we.forEach(function(q,ae){q.forEach(function(xe,ne){xe&&ie.fillRect(ne+me,ae+me,1,1)})}),this.state.imgLoaded&&this._image&&se!=null&&ie.drawImage(this._image,se.x+me,se.y+me,se.w,se.h)}}},{key:"render",value:function(){var F=this,G=this.props,B=G.value,K=G.size,W=G.level,J=G.bgColor,ee=G.fgColor,Z=G.style,he=G.includeMargin,ge=G.imageSettings,ie=f(G,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),we=R({height:K,width:K},Z),me=null,oe=ge&&ge.src;return ge!=null&&oe!=null&&(me=g.createElement("img",{src:oe,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(te){return F._image=te}})),g.createElement(g.Fragment,null,g.createElement("canvas",c({style:we,height:K,width:K,ref:function(te){return F._canvas=te}},ie)),me)}}]),H}(g.PureComponent);b(_,"defaultProps",C);var N=function(M){p(H,M);function H(){return w(this,H),a(this,r(H).apply(this,arguments))}return i(H,[{key:"render",value:function(){var F=this.props,G=F.value,B=F.size,K=F.level,W=F.bgColor,J=F.fgColor,ee=F.includeMargin,Z=F.imageSettings,he=f(F,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),ge=new n(-1,d[K]);ge.addData(h(G)),ge.make();var ie=ge.modules;if(ie===null)return null;var we=ee?o:0,me=ie.length+we*2,oe=x(this.props,ie),se=null;Z!=null&&oe!=null&&(oe.excavation!=null&&(ie=y(ie,oe.excavation)),se=g.createElement("image",{xlinkHref:Z.src,height:oe.h,width:oe.w,x:oe.x+we,y:oe.y+we,preserveAspectRatio:"none"}));var te=O(ie,we);return g.createElement("svg",c({shapeRendering:"crispEdges",height:B,width:B,viewBox:"0 0 ".concat(me," ").concat(me)},he),g.createElement("path",{fill:W,d:"M0,0 h".concat(me,"v").concat(me,"H0z")}),g.createElement("path",{fill:J,d:te}),se)}}]),H}(g.PureComponent);b(N,"defaultProps",C);var j=function(H){var z=H.renderAs,F=f(H,["renderAs"]),G=z==="svg"?N:_;return g.createElement(G,F)};j.defaultProps=R({renderAs:"canvas"},C),I.exports=j},DlQD:function(I,Y,k){(function(L,c){I.exports=c()})(this,function(){"use strict";function L(Pe,Te){for(var Ae=0;Ae<Te.length;Ae++){var ce=Te[Ae];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Pe,ce.key,ce)}}function c(Pe,Te,Ae){return Te&&L(Pe.prototype,Te),Ae&&L(Pe,Ae),Pe}function S(Pe,Te){if(!Pe)return;if(typeof Pe=="string")return R(Pe,Te);var Ae=Object.prototype.toString.call(Pe).slice(8,-1);if(Ae==="Object"&&Pe.constructor&&(Ae=Pe.constructor.name),Ae==="Map"||Ae==="Set")return Array.from(Pe);if(Ae==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ae))return R(Pe,Te)}function R(Pe,Te){(Te==null||Te>Pe.length)&&(Te=Pe.length);for(var Ae=0,ce=new Array(Te);Ae<Te;Ae++)ce[Ae]=Pe[Ae];return ce}function f(Pe,Te){var Ae;if(typeof Symbol=="undefined"||Pe[Symbol.iterator]==null){if(Array.isArray(Pe)||(Ae=S(Pe))||Te&&Pe&&typeof Pe.length=="number"){Ae&&(Pe=Ae);var ce=0;return function(){return ce>=Pe.length?{done:!0}:{done:!1,value:Pe[ce++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Ae=Pe[Symbol.iterator](),Ae.next.bind(Ae)}function s(Pe,Te){return Te={exports:{}},Pe(Te,Te.exports),Te.exports}var w=s(function(Pe){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 Ae(ce){Pe.exports.defaults=ce}Pe.exports={defaults:Te(),getDefaults:Te,changeDefaults:Ae}}),l=w.defaults,i=w.getDefaults,a=w.changeDefaults,r=/[&<>"']/,u=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,m=/[<>"']|&(?!#?\w+;)/g,b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},g=function(Te){return b[Te]};function v(Pe,Te){if(Te){if(r.test(Pe))return Pe.replace(u,g)}else if(p.test(Pe))return Pe.replace(m,g);return Pe}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function d(Pe){return Pe.replace(n,function(Te,Ae){return Ae=Ae.toLowerCase(),Ae==="colon"?":":Ae.charAt(0)==="#"?Ae.charAt(1)==="x"?String.fromCharCode(parseInt(Ae.substring(2),16)):String.fromCharCode(+Ae.substring(1)):""})}var h=/(^|[^\[])\^/g;function C(Pe,Te){Pe=Pe.source||Pe,Te=Te||"";var Ae={replace:function(Ee,_e){return _e=_e.source||_e,_e=_e.replace(h,"$1"),Pe=Pe.replace(Ee,_e),Ae},getRegex:function(){return new RegExp(Pe,Te)}};return Ae}var T=/[^\w:]/g,o=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function P(Pe,Te,Ae){if(Pe){var ce;try{ce=decodeURIComponent(d(Ae)).replace(T,"").toLowerCase()}catch(Ee){return null}if(ce.indexOf("javascript:")===0||ce.indexOf("vbscript:")===0||ce.indexOf("data:")===0)return null}Te&&!o.test(Ae)&&(Ae=_(Te,Ae));try{Ae=encodeURI(Ae).replace(/%25/g,"%")}catch(Ee){return null}return Ae}var O={},y=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(Pe,Te){O[" "+Pe]||(y.test(Pe)?O[" "+Pe]=Pe+"/":O[" "+Pe]=H(Pe,"/",!0)),Pe=O[" "+Pe];var Ae=Pe.indexOf(":")===-1;return Te.substring(0,2)==="//"?Ae?Te:Pe.replace(x,"$1")+Te:Te.charAt(0)==="/"?Ae?Te:Pe.replace(E,"$1")+Te:Pe+Te}var N={exec:function(){}};function j(Pe){for(var Te=1,Ae,ce;Te<arguments.length;Te++){Ae=arguments[Te];for(ce in Ae)Object.prototype.hasOwnProperty.call(Ae,ce)&&(Pe[ce]=Ae[ce])}return Pe}function M(Pe,Te){var Ae=Pe.replace(/\|/g,function(_e,De,je){for(var $e=!1,at=De;--at>=0&&je[at]==="\\";)$e=!$e;return $e?"|":" |"}),ce=Ae.split(/ \|/),Ee=0;if(ce.length>Te)ce.splice(Te);else for(;ce.length<Te;)ce.push("");for(;Ee<ce.length;Ee++)ce[Ee]=ce[Ee].trim().replace(/\\\|/g,"|");return ce}function H(Pe,Te,Ae){var ce=Pe.length;if(ce===0)return"";for(var Ee=0;Ee<ce;){var _e=Pe.charAt(ce-Ee-1);if(_e===Te&&!Ae)Ee++;else if(_e!==Te&&Ae)Ee++;else break}return Pe.substr(0,ce-Ee)}function z(Pe,Te){if(Pe.indexOf(Te[1])===-1)return-1;for(var Ae=Pe.length,ce=0,Ee=0;Ee<Ae;Ee++)if(Pe[Ee]==="\\")Ee++;else if(Pe[Ee]===Te[0])ce++;else if(Pe[Ee]===Te[1]&&(ce--,ce<0))return Ee;return-1}function F(Pe){Pe&&Pe.sanitize&&!Pe.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var G={escape:v,unescape:d,edit:C,cleanUrl:P,resolveUrl:_,noopTest:N,merge:j,splitCells:M,rtrim:H,findClosingBracket:z,checkSanitizeDeprecation:F},B=w.defaults,K=G.rtrim,W=G.splitCells,J=G.escape,ee=G.findClosingBracket;function Z(Pe,Te,Ae){var ce=Te.href,Ee=Te.title?J(Te.title):null,_e=Pe[1].replace(/\\([\[\]])/g,"$1");return Pe[0].charAt(0)!=="!"?{type:"link",raw:Ae,href:ce,title:Ee,text:_e}:{type:"image",raw:Ae,href:ce,title:Ee,text:J(_e)}}function he(Pe,Te){var Ae=Pe.match(/^(\s+)(?:```)/);if(Ae===null)return Te;var ce=Ae[1];return Te.split(`
`).map(function(Ee){var _e=Ee.match(/^\s+/);if(_e===null)return Ee;var De=_e[0];return De.length>=ce.length?Ee.slice(ce.length):Ee}).join(`
`)}var ge=function(){function Pe(Ae){this.options=Ae||B}var Te=Pe.prototype;return Te.space=function(ce){var Ee=this.rules.block.newline.exec(ce);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:`
`}},Te.code=function(ce,Ee){var _e=this.rules.block.code.exec(ce);if(_e){var De=Ee[Ee.length-1];if(De&&De.type==="paragraph")return{raw:_e[0],text:_e[0].trimRight()};var je=_e[0].replace(/^ {4}/gm,"");return{type:"code",raw:_e[0],codeBlockStyle:"indented",text:this.options.pedantic?je:K(je,`
`)}}},Te.fences=function(ce){var Ee=this.rules.block.fences.exec(ce);if(Ee){var _e=Ee[0],De=he(_e,Ee[3]||"");return{type:"code",raw:_e,lang:Ee[2]?Ee[2].trim():Ee[2],text:De}}},Te.heading=function(ce){var Ee=this.rules.block.heading.exec(ce);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},Te.nptable=function(ce){var Ee=this.rules.block.nptable.exec(ce);if(Ee){var _e={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(_e.header.length===_e.align.length){var De=_e.align.length,je;for(je=0;je<De;je++)/^ *-+: *$/.test(_e.align[je])?_e.align[je]="right":/^ *:-+: *$/.test(_e.align[je])?_e.align[je]="center":/^ *:-+ *$/.test(_e.align[je])?_e.align[je]="left":_e.align[je]=null;for(De=_e.cells.length,je=0;je<De;je++)_e.cells[je]=W(_e.cells[je],_e.header.length);return _e}}},Te.hr=function(ce){var Ee=this.rules.block.hr.exec(ce);if(Ee)return{type:"hr",raw:Ee[0]}},Te.blockquote=function(ce){var Ee=this.rules.block.blockquote.exec(ce);if(Ee){var _e=Ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ee[0],text:_e}}},Te.list=function(ce){var Ee=this.rules.block.list.exec(ce);if(Ee){for(var _e=Ee[0],De=Ee[2],je=De.length>1,$e=De[De.length-1]===")",at={type:"list",raw:_e,ordered:je,start:je?+De.slice(0,-1):"",loose:!1,items:[]},it=Ee[0].match(this.rules.block.item),st=!1,Je,gt,yt,ct,Lt,kt,Ct,Ft=it.length,Et=0;Et<Ft;Et++)Je=it[Et],_e=Je,gt=Je.length,Je=Je.replace(/^ *([*+-]|\d+[.)]) */,""),~Je.indexOf(`
`)&&(gt-=Je.length,Je=this.options.pedantic?Je.replace(/^ {1,4}/gm,""):Je.replace(new RegExp("^ {1,"+gt+"}","gm"),"")),Et!==Ft-1&&(yt=this.rules.block.bullet.exec(it[Et+1])[0],(je?yt.length===1||!$e&&yt[yt.length-1]===")":yt.length>1||this.options.smartLists&&yt!==De)&&(ct=it.slice(Et+1).join(`
`),at.raw=at.raw.substring(0,at.raw.length-ct.length),Et=Ft-1)),Lt=st||/\n\n(?!\s*$)/.test(Je),Et!==Ft-1&&(st=Je.charAt(Je.length-1)===`
`,Lt||(Lt=st)),Lt&&(at.loose=!0),kt=/^\[[ xX]\] /.test(Je),Ct=void 0,kt&&(Ct=Je[1]!==" ",Je=Je.replace(/^\[[ xX]\] +/,"")),at.items.push({type:"list_item",raw:_e,task:kt,checked:Ct,loose:Lt,text:Je});return at}},Te.html=function(ce){var Ee=this.rules.block.html.exec(ce);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]):J(Ee[0]):Ee[0]}},Te.def=function(ce){var Ee=this.rules.block.def.exec(ce);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var _e=Ee[1].toLowerCase().replace(/\s+/g," ");return{tag:_e,raw:Ee[0],href:Ee[2],title:Ee[3]}}},Te.table=function(ce){var Ee=this.rules.block.table.exec(ce);if(Ee){var _e={type:"table",header:W(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
`):[]};if(_e.header.length===_e.align.length){_e.raw=Ee[0];var De=_e.align.length,je;for(je=0;je<De;je++)/^ *-+: *$/.test(_e.align[je])?_e.align[je]="right":/^ *:-+: *$/.test(_e.align[je])?_e.align[je]="center":/^ *:-+ *$/.test(_e.align[je])?_e.align[je]="left":_e.align[je]=null;for(De=_e.cells.length,je=0;je<De;je++)_e.cells[je]=W(_e.cells[je].replace(/^ *\| *| *\| *$/g,""),_e.header.length);return _e}}},Te.lheading=function(ce){var Ee=this.rules.block.lheading.exec(ce);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[2].charAt(0)==="="?1:2,text:Ee[1]}},Te.paragraph=function(ce){var Ee=this.rules.block.paragraph.exec(ce);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(ce,Ee){var _e=this.rules.block.text.exec(ce);if(_e){var De=Ee[Ee.length-1];return De&&De.type==="text"?{raw:_e[0],text:_e[0]}:{type:"text",raw:_e[0],text:_e[0]}}},Te.escape=function(ce){var Ee=this.rules.inline.escape.exec(ce);if(Ee)return{type:"escape",raw:Ee[0],text:J(Ee[1])}},Te.tag=function(ce,Ee,_e){var De=this.rules.inline.tag.exec(ce);if(De)return!Ee&&/^<a /i.test(De[0])?Ee=!0:Ee&&/^<\/a>/i.test(De[0])&&(Ee=!1),!_e&&/^<(pre|code|kbd|script)(\s|>)/i.test(De[0])?_e=!0:_e&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(De[0])&&(_e=!1),{type:this.options.sanitize?"text":"html",raw:De[0],inLink:Ee,inRawBlock:_e,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):J(De[0]):De[0]}},Te.link=function(ce){var Ee=this.rules.inline.link.exec(ce);if(Ee){var _e=ee(Ee[2],"()");if(_e>-1){var De=Ee[0].indexOf("!")===0?5:4,je=De+Ee[1].length+_e;Ee[2]=Ee[2].substring(0,_e),Ee[0]=Ee[0].substring(0,je).trim(),Ee[3]=""}var $e=Ee[2],at="";if(this.options.pedantic){var it=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec($e);it?($e=it[1],at=it[3]):at=""}else at=Ee[3]?Ee[3].slice(1,-1):"";$e=$e.trim().replace(/^<([\s\S]*)>$/,"$1");var st=Z(Ee,{href:$e&&$e.replace(this.rules.inline._escapes,"$1"),title:at&&at.replace(this.rules.inline._escapes,"$1")},Ee[0]);return st}},Te.reflink=function(ce,Ee){var _e;if((_e=this.rules.inline.reflink.exec(ce))||(_e=this.rules.inline.nolink.exec(ce))){var De=(_e[2]||_e[1]).replace(/\s+/g," ");if(De=Ee[De.toLowerCase()],!De||!De.href){var je=_e[0].charAt(0);return{type:"text",raw:je,text:je}}var $e=Z(_e,De,_e[0]);return $e}},Te.strong=function(ce,Ee,_e){_e===void 0&&(_e="");var De=this.rules.inline.strong.start.exec(ce);if(De&&(!De[1]||De[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){Ee=Ee.slice(-1*ce.length);var je=De[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;je.lastIndex=0;for(var $e;(De=je.exec(Ee))!=null;)if($e=this.rules.inline.strong.middle.exec(Ee.slice(0,De.index+3)),$e)return{type:"strong",raw:ce.slice(0,$e[0].length),text:ce.slice(2,$e[0].length-2)}}},Te.em=function(ce,Ee,_e){_e===void 0&&(_e="");var De=this.rules.inline.em.start.exec(ce);if(De&&(!De[1]||De[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){Ee=Ee.slice(-1*ce.length);var je=De[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;je.lastIndex=0;for(var $e;(De=je.exec(Ee))!=null;)if($e=this.rules.inline.em.middle.exec(Ee.slice(0,De.index+2)),$e)return{type:"em",raw:ce.slice(0,$e[0].length),text:ce.slice(1,$e[0].length-1)}}},Te.codespan=function(ce){var Ee=this.rules.inline.code.exec(ce);if(Ee){var _e=Ee[2].replace(/\n/g," "),De=/[^ ]/.test(_e),je=_e.startsWith(" ")&&_e.endsWith(" ");return De&&je&&(_e=_e.substring(1,_e.length-1)),_e=J(_e,!0),{type:"codespan",raw:Ee[0],text:_e}}},Te.br=function(ce){var Ee=this.rules.inline.br.exec(ce);if(Ee)return{type:"br",raw:Ee[0]}},Te.del=function(ce){var Ee=this.rules.inline.del.exec(ce);if(Ee)return{type:"del",raw:Ee[0],text:Ee[1]}},Te.autolink=function(ce,Ee){var _e=this.rules.inline.autolink.exec(ce);if(_e){var De,je;return _e[2]==="@"?(De=J(this.options.mangle?Ee(_e[1]):_e[1]),je="mailto:"+De):(De=J(_e[1]),je=De),{type:"link",raw:_e[0],text:De,href:je,tokens:[{type:"text",raw:De,text:De}]}}},Te.url=function(ce,Ee){var _e;if(_e=this.rules.inline.url.exec(ce)){var De,je;if(_e[2]==="@")De=J(this.options.mangle?Ee(_e[0]):_e[0]),je="mailto:"+De;else{var $e;do $e=_e[0],_e[0]=this.rules.inline._backpedal.exec(_e[0])[0];while($e!==_e[0]);De=J(_e[0]),_e[1]==="www."?je="http://"+De:je=De}return{type:"link",raw:_e[0],text:De,href:je,tokens:[{type:"text",raw:De,text:De}]}}},Te.inlineText=function(ce,Ee,_e){var De=this.rules.inline.text.exec(ce);if(De){var je;return Ee?je=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):J(De[0]):De[0]:je=J(this.options.smartypants?_e(De[0]):De[0]),{type:"text",raw:De[0],text:je}}},Pe}(),ie=G.noopTest,we=G.edit,me=G.merge,oe={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ie,table:ie,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};oe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,oe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,oe.def=we(oe.def).replace("label",oe._label).replace("title",oe._title).getRegex(),oe.bullet=/(?:[*+-]|\d{1,9}[.)])/,oe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,oe.item=we(oe.item,"gm").replace(/bull/g,oe.bullet).getRegex(),oe.list=we(oe.list).replace(/bull/g,oe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+oe.def.source+")").getRegex(),oe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",oe._comment=/<!--(?!-?>)[\s\S]*?-->/,oe.html=we(oe.html,"i").replace("comment",oe._comment).replace("tag",oe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oe.paragraph=we(oe._paragraph).replace("hr",oe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",oe._tag).getRegex(),oe.blockquote=we(oe.blockquote).replace("paragraph",oe.paragraph).getRegex(),oe.normal=me({},oe),oe.gfm=me({},oe.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),oe.gfm.nptable=we(oe.gfm.nptable).replace("hr",oe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",oe._tag).getRegex(),oe.gfm.table=we(oe.gfm.table).replace("hr",oe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",oe._tag).getRegex(),oe.pedantic=me({},oe.normal,{html:we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ie,paragraph:we(oe.normal._paragraph).replace("hr",oe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",oe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ie,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ie,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};se._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",se.punctuation=we(se.punctuation).replace(/punctuation/g,se._punctuation).getRegex(),se._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",se._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",se.em.start=we(se.em.start).replace(/punctuation/g,se._punctuation).getRegex(),se.em.middle=we(se.em.middle).replace(/punctuation/g,se._punctuation).replace(/overlapSkip/g,se._overlapSkip).getRegex(),se.em.endAst=we(se.em.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.em.endUnd=we(se.em.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.start=we(se.strong.start).replace(/punctuation/g,se._punctuation).getRegex(),se.strong.middle=we(se.strong.middle).replace(/punctuation/g,se._punctuation).replace(/blockSkip/g,se._blockSkip).getRegex(),se.strong.endAst=we(se.strong.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.endUnd=we(se.strong.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.blockSkip=we(se._blockSkip,"g").getRegex(),se.overlapSkip=we(se._overlapSkip,"g").getRegex(),se._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,se._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,se._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,se.autolink=we(se.autolink).replace("scheme",se._scheme).replace("email",se._email).getRegex(),se._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,se.tag=we(se.tag).replace("comment",oe._comment).replace("attribute",se._attribute).getRegex(),se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,se._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,se.link=we(se.link).replace("label",se._label).replace("href",se._href).replace("title",se._title).getRegex(),se.reflink=we(se.reflink).replace("label",se._label).getRegex(),se.reflinkSearch=we(se.reflinkSearch,"g").replace("reflink",se.reflink).replace("nolink",se.nolink).getRegex(),se.normal=me({},se),se.pedantic=me({},se.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:we(/^!?\[(label)\]\((.*?)\)/).replace("label",se._label).getRegex(),reflink:we(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se._label).getRegex()}),se.gfm=me({},se.normal,{escape:we(se.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),se.gfm.url=we(se.gfm.url,"i").replace("email",se.gfm._extended_email).getRegex(),se.breaks=me({},se.gfm,{br:we(se.br).replace("{2,}","*").getRegex(),text:we(se.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var te={block:oe,inline:se},be=w.defaults,q=te.block,ae=te.inline;function xe(Pe){return Pe.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ne(Pe){var Te="",Ae,ce,Ee=Pe.length;for(Ae=0;Ae<Ee;Ae++)ce=Pe.charCodeAt(Ae),Math.random()>.5&&(ce="x"+ce.toString(16)),Te+="&#"+ce+";";return Te}var Q=function(){function Pe(Ae){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ae||be,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ce={block:q.normal,inline:ae.normal};this.options.pedantic?(ce.block=q.pedantic,ce.inline=ae.pedantic):this.options.gfm&&(ce.block=q.gfm,this.options.breaks?ce.inline=ae.breaks:ce.inline=ae.gfm),this.tokenizer.rules=ce}Pe.lex=function(ce,Ee){var _e=new Pe(Ee);return _e.lex(ce)};var Te=Pe.prototype;return Te.lex=function(ce){return ce=ce.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ce,this.tokens,!0),this.inline(this.tokens),this.tokens},Te.blockTokens=function(ce,Ee,_e){Ee===void 0&&(Ee=[]),_e===void 0&&(_e=!0),ce=ce.replace(/^ +$/gm,"");for(var De,je,$e,at;ce;){if(De=this.tokenizer.space(ce)){ce=ce.substring(De.raw.length),De.type&&Ee.push(De);continue}if(De=this.tokenizer.code(ce,Ee)){ce=ce.substring(De.raw.length),De.type?Ee.push(De):(at=Ee[Ee.length-1],at.raw+=`
`+De.raw,at.text+=`
`+De.text);continue}if(De=this.tokenizer.fences(ce)){ce=ce.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.heading(ce)){ce=ce.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.nptable(ce)){ce=ce.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.hr(ce)){ce=ce.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.blockquote(ce)){ce=ce.substring(De.raw.length),De.tokens=this.blockTokens(De.text,[],_e),Ee.push(De);continue}if(De=this.tokenizer.list(ce)){for(ce=ce.substring(De.raw.length),$e=De.items.length,je=0;je<$e;je++)De.items[je].tokens=this.blockTokens(De.items[je].text,[],!1);Ee.push(De);continue}if(De=this.tokenizer.html(ce)){ce=ce.substring(De.raw.length),Ee.push(De);continue}if(_e&&(De=this.tokenizer.def(ce))){ce=ce.substring(De.raw.length),this.tokens.links[De.tag]||(this.tokens.links[De.tag]={href:De.href,title:De.title});continue}if(De=this.tokenizer.table(ce)){ce=ce.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.lheading(ce)){ce=ce.substring(De.raw.length),Ee.push(De);continue}if(_e&&(De=this.tokenizer.paragraph(ce))){ce=ce.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.text(ce,Ee)){ce=ce.substring(De.raw.length),De.type?Ee.push(De):(at=Ee[Ee.length-1],at.raw+=`
`+De.raw,at.text+=`
`+De.text);continue}if(ce){var it="Infinite loop on byte: "+ce.charCodeAt(0);if(this.options.silent){console.error(it);break}else throw new Error(it)}}return Ee},Te.inline=function(ce){var Ee,_e,De,je,$e,at,it=ce.length;for(Ee=0;Ee<it;Ee++){at=ce[Ee];switch(at.type){case"paragraph":case"text":case"heading":{at.tokens=[],this.inlineTokens(at.text,at.tokens);break}case"table":{for(at.tokens={header:[],cells:[]},je=at.header.length,_e=0;_e<je;_e++)at.tokens.header[_e]=[],this.inlineTokens(at.header[_e],at.tokens.header[_e]);for(je=at.cells.length,_e=0;_e<je;_e++)for($e=at.cells[_e],at.tokens.cells[_e]=[],De=0;De<$e.length;De++)at.tokens.cells[_e][De]=[],this.inlineTokens($e[De],at.tokens.cells[_e][De]);break}case"blockquote":{this.inline(at.tokens);break}case"list":{for(je=at.items.length,_e=0;_e<je;_e++)this.inline(at.items[_e].tokens);break}}}return ce},Te.inlineTokens=function(ce,Ee,_e,De,je){Ee===void 0&&(Ee=[]),_e===void 0&&(_e=!1),De===void 0&&(De=!1),je===void 0&&(je="");var $e,at=ce,it;if(this.tokens.links){var st=Object.keys(this.tokens.links);if(st.length>0)for(;(it=this.tokenizer.rules.inline.reflinkSearch.exec(at))!=null;)st.includes(it[0].slice(it[0].lastIndexOf("[")+1,-1))&&(at=at.slice(0,it.index)+"["+"a".repeat(it[0].length-2)+"]"+at.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(it=this.tokenizer.rules.inline.blockSkip.exec(at))!=null;)at=at.slice(0,it.index)+"["+"a".repeat(it[0].length-2)+"]"+at.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ce;){if($e=this.tokenizer.escape(ce)){ce=ce.substring($e.raw.length),Ee.push($e);continue}if($e=this.tokenizer.tag(ce,_e,De)){ce=ce.substring($e.raw.length),_e=$e.inLink,De=$e.inRawBlock,Ee.push($e);continue}if($e=this.tokenizer.link(ce)){ce=ce.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,De)),Ee.push($e);continue}if($e=this.tokenizer.reflink(ce,this.tokens.links)){ce=ce.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,De)),Ee.push($e);continue}if($e=this.tokenizer.strong(ce,at,je)){ce=ce.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],_e,De),Ee.push($e);continue}if($e=this.tokenizer.em(ce,at,je)){ce=ce.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],_e,De),Ee.push($e);continue}if($e=this.tokenizer.codespan(ce)){ce=ce.substring($e.raw.length),Ee.push($e);continue}if($e=this.tokenizer.br(ce)){ce=ce.substring($e.raw.length),Ee.push($e);continue}if($e=this.tokenizer.del(ce)){ce=ce.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],_e,De),Ee.push($e);continue}if($e=this.tokenizer.autolink(ce,ne)){ce=ce.substring($e.raw.length),Ee.push($e);continue}if(!_e&&($e=this.tokenizer.url(ce,ne))){ce=ce.substring($e.raw.length),Ee.push($e);continue}if($e=this.tokenizer.inlineText(ce,De,xe)){ce=ce.substring($e.raw.length),je=$e.raw.slice(-1),Ee.push($e);continue}if(ce){var Je="Infinite loop on byte: "+ce.charCodeAt(0);if(this.options.silent){console.error(Je);break}else throw new Error(Je)}}return Ee},c(Pe,null,[{key:"rules",get:function(){return{block:q,inline:ae}}}]),Pe}(),X=w.defaults,$=G.cleanUrl,pe=G.escape,de=function(){function Pe(Ae){this.options=Ae||X}var Te=Pe.prototype;return Te.code=function(ce,Ee,_e){var De=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var je=this.options.highlight(ce,De);je!=null&&je!==ce&&(_e=!0,ce=je)}return De?'<pre><code class="'+this.options.langPrefix+pe(De,!0)+'">'+(_e?ce:pe(ce,!0))+`</code></pre>
`:"<pre><code>"+(_e?ce:pe(ce,!0))+`</code></pre>
`},Te.blockquote=function(ce){return`<blockquote>
`+ce+`</blockquote>
`},Te.html=function(ce){return ce},Te.heading=function(ce,Ee,_e,De){return this.options.headerIds?"<h"+Ee+' id="'+this.options.headerPrefix+De.slug(_e)+'">'+ce+"</h"+Ee+`>
`:"<h"+Ee+">"+ce+"</h"+Ee+`>
`},Te.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Te.list=function(ce,Ee,_e){var De=Ee?"ol":"ul",je=Ee&&_e!==1?' start="'+_e+'"':"";return"<"+De+je+`>
`+ce+"</"+De+`>
`},Te.listitem=function(ce){return"<li>"+ce+`</li>
`},Te.checkbox=function(ce){return"<input "+(ce?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Te.paragraph=function(ce){return"<p>"+ce+`</p>
`},Te.table=function(ce,Ee){return Ee&&(Ee="<tbody>"+Ee+"</tbody>"),`<table>
<thead>
`+ce+`</thead>
`+Ee+`</table>
`},Te.tablerow=function(ce){return`<tr>
`+ce+`</tr>
`},Te.tablecell=function(ce,Ee){var _e=Ee.header?"th":"td",De=Ee.align?"<"+_e+' align="'+Ee.align+'">':"<"+_e+">";return De+ce+"</"+_e+`>
`},Te.strong=function(ce){return"<strong>"+ce+"</strong>"},Te.em=function(ce){return"<em>"+ce+"</em>"},Te.codespan=function(ce){return"<code>"+ce+"</code>"},Te.br=function(){return this.options.xhtml?"<br/>":"<br>"},Te.del=function(ce){return"<del>"+ce+"</del>"},Te.link=function(ce,Ee,_e){if(ce=$(this.options.sanitize,this.options.baseUrl,ce),ce===null)return _e;var De='<a href="'+pe(ce)+'"';return Ee&&(De+=' title="'+Ee+'"'),De+=">"+_e+"</a>",De},Te.image=function(ce,Ee,_e){if(ce=$(this.options.sanitize,this.options.baseUrl,ce),ce===null)return _e;var De='<img src="'+ce+'" alt="'+_e+'"';return Ee&&(De+=' title="'+Ee+'"'),De+=this.options.xhtml?"/>":">",De},Te.text=function(ce){return ce},Pe}(),Ce=function(){function Pe(){}var Te=Pe.prototype;return Te.strong=function(ce){return ce},Te.em=function(ce){return ce},Te.codespan=function(ce){return ce},Te.del=function(ce){return ce},Te.html=function(ce){return ce},Te.text=function(ce){return ce},Te.link=function(ce,Ee,_e){return""+_e},Te.image=function(ce,Ee,_e){return""+_e},Te.br=function(){return""},Pe}(),ze=function(){function Pe(){this.seen={}}var Te=Pe.prototype;return Te.slug=function(ce){var Ee=ce.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ee)){var _e=Ee;do this.seen[_e]++,Ee=_e+"-"+this.seen[_e];while(this.seen.hasOwnProperty(Ee))}return this.seen[Ee]=0,Ee},Pe}(),qe=w.defaults,Ye=G.unescape,Ve=function(){function Pe(Ae){this.options=Ae||qe,this.options.renderer=this.options.renderer||new de,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ce,this.slugger=new ze}Pe.parse=function(ce,Ee){var _e=new Pe(Ee);return _e.parse(ce)};var Te=Pe.prototype;return Te.parse=function(ce,Ee){Ee===void 0&&(Ee=!0);var _e="",De,je,$e,at,it,st,Je,gt,yt,ct,Lt,kt,Ct,Ft,Et,ir,Yt,It,Ht=ce.length;for(De=0;De<Ht;De++){ct=ce[De];switch(ct.type){case"space":continue;case"hr":{_e+=this.renderer.hr();continue}case"heading":{_e+=this.renderer.heading(this.parseInline(ct.tokens),ct.depth,Ye(this.parseInline(ct.tokens,this.textRenderer)),this.slugger);continue}case"code":{_e+=this.renderer.code(ct.text,ct.lang,ct.escaped);continue}case"table":{for(gt="",Je="",at=ct.header.length,je=0;je<at;je++)Je+=this.renderer.tablecell(this.parseInline(ct.tokens.header[je]),{header:!0,align:ct.align[je]});for(gt+=this.renderer.tablerow(Je),yt="",at=ct.cells.length,je=0;je<at;je++){for(st=ct.tokens.cells[je],Je="",it=st.length,$e=0;$e<it;$e++)Je+=this.renderer.tablecell(this.parseInline(st[$e]),{header:!1,align:ct.align[$e]});yt+=this.renderer.tablerow(Je)}_e+=this.renderer.table(gt,yt);continue}case"blockquote":{yt=this.parse(ct.tokens),_e+=this.renderer.blockquote(yt);continue}case"list":{for(Lt=ct.ordered,kt=ct.start,Ct=ct.loose,at=ct.items.length,yt="",je=0;je<at;je++)Et=ct.items[je],ir=Et.checked,Yt=Et.task,Ft="",Et.task&&(It=this.renderer.checkbox(ir),Ct?Et.tokens.length>0&&Et.tokens[0].type==="text"?(Et.tokens[0].text=It+" "+Et.tokens[0].text,Et.tokens[0].tokens&&Et.tokens[0].tokens.length>0&&Et.tokens[0].tokens[0].type==="text"&&(Et.tokens[0].tokens[0].text=It+" "+Et.tokens[0].tokens[0].text)):Et.tokens.unshift({type:"text",text:It}):Ft+=It),Ft+=this.parse(Et.tokens,Ct),yt+=this.renderer.listitem(Ft,Yt,ir);_e+=this.renderer.list(yt,Lt,kt);continue}case"html":{_e+=this.renderer.html(ct.text);continue}case"paragraph":{_e+=this.renderer.paragraph(this.parseInline(ct.tokens));continue}case"text":{for(yt=ct.tokens?this.parseInline(ct.tokens):ct.text;De+1<Ht&&ce[De+1].type==="text";)ct=ce[++De],yt+=`
`+(ct.tokens?this.parseInline(ct.tokens):ct.text);_e+=Ee?this.renderer.paragraph(yt):yt;continue}default:{var Ur='Token with "'+ct.type+'" type was not found.';if(this.options.silent){console.error(Ur);return}else throw new Error(Ur)}}}return _e},Te.parseInline=function(ce,Ee){Ee=Ee||this.renderer;var _e="",De,je,$e=ce.length;for(De=0;De<$e;De++){je=ce[De];switch(je.type){case"escape":{_e+=Ee.text(je.text);break}case"html":{_e+=Ee.html(je.text);break}case"link":{_e+=Ee.link(je.href,je.title,this.parseInline(je.tokens,Ee));break}case"image":{_e+=Ee.image(je.href,je.title,je.text);break}case"strong":{_e+=Ee.strong(this.parseInline(je.tokens,Ee));break}case"em":{_e+=Ee.em(this.parseInline(je.tokens,Ee));break}case"codespan":{_e+=Ee.codespan(je.text);break}case"br":{_e+=Ee.br();break}case"del":{_e+=Ee.del(this.parseInline(je.tokens,Ee));break}case"text":{_e+=Ee.text(je.text);break}default:{var at='Token with "'+je.type+'" type was not found.';if(this.options.silent){console.error(at);return}else throw new Error(at)}}}return _e},Pe}(),et=G.merge,rt=G.checkSanitizeDeprecation,Me=G.escape,Se=w.getDefaults,Ge=w.changeDefaults,tt=w.defaults;function Ue(Pe,Te,Ae){if(typeof Pe=="undefined"||Pe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Pe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Pe)+", string expected");if(typeof Te=="function"&&(Ae=Te,Te=null),Te=et({},Ue.defaults,Te||{}),rt(Te),Ae){var ce=Te.highlight,Ee;try{Ee=Q.lex(Pe,Te)}catch($e){return Ae($e)}var _e=function(at){var it;if(!at)try{it=Ve.parse(Ee,Te)}catch(st){at=st}return Te.highlight=ce,at?Ae(at):Ae(null,it)};if(!ce||ce.length<3)return _e();if(delete Te.highlight,!Ee.length)return _e();var De=0;Ue.walkTokens(Ee,function($e){$e.type==="code"&&(De++,setTimeout(function(){ce($e.text,$e.lang,function(at,it){if(at)return _e(at);it!=null&&it!==$e.text&&($e.text=it,$e.escaped=!0),De--,De===0&&_e()})},0))}),De===0&&_e();return}try{var je=Q.lex(Pe,Te);return Te.walkTokens&&Ue.walkTokens(je,Te.walkTokens),Ve.parse(je,Te)}catch($e){if($e.message+=`
Please report this to https://github.com/markedjs/marked.`,Te.silent)return"<p>An error occurred:</p><pre>"+Me($e.message+"",!0)+"</pre>";throw $e}}Ue.options=Ue.setOptions=function(Pe){return et(Ue.defaults,Pe),Ge(Ue.defaults),Ue},Ue.getDefaults=Se,Ue.defaults=tt,Ue.use=function(Pe){var Te=et({},Pe);if(Pe.renderer&&function(){var ce=Ue.defaults.renderer||new de,Ee=function(je){var $e=ce[je];ce[je]=function(){for(var at=arguments.length,it=new Array(at),st=0;st<at;st++)it[st]=arguments[st];var Je=Pe.renderer[je].apply(ce,it);return Je===!1&&(Je=$e.apply(ce,it)),Je}};for(var _e in Pe.renderer)Ee(_e);Te.renderer=ce}(),Pe.tokenizer&&function(){var ce=Ue.defaults.tokenizer||new ge,Ee=function(je){var $e=ce[je];ce[je]=function(){for(var at=arguments.length,it=new Array(at),st=0;st<at;st++)it[st]=arguments[st];var Je=Pe.tokenizer[je].apply(ce,it);return Je===!1&&(Je=$e.apply(ce,it)),Je}};for(var _e in Pe.tokenizer)Ee(_e);Te.tokenizer=ce}(),Pe.walkTokens){var Ae=Ue.defaults.walkTokens;Te.walkTokens=function(ce){Pe.walkTokens(ce),Ae&&Ae(ce)}}Ue.setOptions(Te)},Ue.walkTokens=function(Pe,Te){for(var Ae=f(Pe),ce;!(ce=Ae()).done;){var Ee=ce.value;Te(Ee);switch(Ee.type){case"table":{for(var _e=f(Ee.tokens.header),De;!(De=_e()).done;){var je=De.value;Ue.walkTokens(je,Te)}for(var $e=f(Ee.tokens.cells),at;!(at=$e()).done;)for(var it=at.value,st=f(it),Je;!(Je=st()).done;){var gt=Je.value;Ue.walkTokens(gt,Te)}break}case"list":{Ue.walkTokens(Ee.items,Te);break}default:Ee.tokens&&Ue.walkTokens(Ee.tokens,Te)}}},Ue.Parser=Ve,Ue.parser=Ve.parse,Ue.Renderer=de,Ue.TextRenderer=Ce,Ue.Lexer=Q,Ue.lexer=Q.lex,Ue.Tokenizer=ge,Ue.Slugger=ze,Ue.parse=Ue;var Xe=Ue;return Xe})},"DlR+":function(I,Y,k){var L=k("MFOe"),c=L.Global,S=L.trim;I.exports={name:"cookieStorage",read:f,write:w,each:s,remove:l,clearAll:i};var R=c.document;function f(r){if(!r||!a(r))return null;var u="(?:^|.*;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(R.cookie.replace(new RegExp(u),"$1"))}function s(r){for(var u=R.cookie.split(/; ?/g),p=u.length-1;p>=0;p--){if(!S(u[p]))continue;var m=u[p].split("="),b=unescape(m[0]),g=unescape(m[1]);r(g,b)}}function w(r,u){if(!r)return;R.cookie=escape(r)+"="+escape(u)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function l(r){if(!r||!a(r))return;R.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function i(){s(function(r,u){l(u)})}function a(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(R.cookie)}},E4JC:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.StreamCipher,f=c.algo,s=[],w=[],l=[],i=f.Rabbit=R.extend({_doReset:function(){for(var r=this._key.words,u=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 m=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],b=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++)a.call(this);for(var p=0;p<8;p++)b[p]^=m[p+4&7];if(u){var g=u.words,v=g[0],n=g[1],d=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,h=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,C=d>>>16|h&4294901760,T=h<<16|d&65535;b[0]^=d,b[1]^=C,b[2]^=h,b[3]^=T,b[4]^=d,b[5]^=C,b[6]^=h,b[7]^=T;for(var p=0;p<4;p++)a.call(this)}},_doProcessBlock:function(r,u){var p=this._X;a.call(this),s[0]=p[0]^p[5]>>>16^p[3]<<16,s[1]=p[2]^p[7]>>>16^p[5]<<16,s[2]=p[4]^p[1]>>>16^p[7]<<16,s[3]=p[6]^p[3]>>>16^p[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,r[u+m]^=s[m]},blockSize:128/32,ivSize:64/32});function a(){for(var r=this._X,u=this._C,p=0;p<8;p++)w[p]=u[p];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<w[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<w[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<w[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<w[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<w[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<w[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<w[6]>>>0?1:0)|0,this._b=u[7]>>>0<w[7]>>>0?1:0;for(var p=0;p<8;p++){var m=r[p]+u[p],b=m&65535,g=m>>>16,v=((b*b>>>17)+b*g>>>15)+g*g,n=((m&4294901760)*m|0)+((m&65535)*m|0);l[p]=v^n}r[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,r[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,r[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,r[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,r[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,r[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,r[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,r[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}c.Rabbit=R._createHelper(i)}(),L.Rabbit})},ELLl:function(I,Y,k){(function(L){L(k("VrN/"))})(function(L){var c={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=L.Pos;L.defineOption("autoCloseBrackets",!1,function(b,g,v){v&&v!=L.Init&&(b.removeKeyMap(f),b.state.closeBrackets=null),g&&(s(R(g,"pairs")),b.state.closeBrackets=g,b.addKeyMap(f))});function R(b,g){return g=="pairs"&&typeof b=="string"?b:typeof b=="object"&&b[g]!=null?b[g]:c[g]}var f={Backspace:i,Enter:a};function s(b){for(var g=0;g<b.length;g++){var v=b.charAt(g),n="'"+v+"'";f[n]||(f[n]=w(v))}}s(c.pairs+"`");function w(b){return function(g){return u(g,b)}}function l(b){var g=b.state.closeBrackets;if(!g||g.override)return g;var v=b.getModeAt(b.getCursor());return v.closeBrackets||g}function i(b){var g=l(b);if(!g||b.getOption("disableInput"))return L.Pass;for(var v=R(g,"pairs"),n=b.listSelections(),d=0;d<n.length;d++){if(!n[d].empty())return L.Pass;var h=p(b,n[d].head);if(!h||v.indexOf(h)%2!=0)return L.Pass}for(var d=n.length-1;d>=0;d--){var C=n[d].head;b.replaceRange("",S(C.line,C.ch-1),S(C.line,C.ch+1),"+delete")}}function a(b){var g=l(b),v=g&&R(g,"explode");if(!v||b.getOption("disableInput"))return L.Pass;for(var n=b.listSelections(),d=0;d<n.length;d++){if(!n[d].empty())return L.Pass;var h=p(b,n[d].head);if(!h||v.indexOf(h)%2!=0)return L.Pass}b.operation(function(){var C=b.lineSeparator()||`
`;b.replaceSelection(C+C,null),b.execCommand("goCharLeft"),n=b.listSelections();for(var T=0;T<n.length;T++){var o=n[T].head.line;b.indentLine(o,null,!0),b.indentLine(o+1,null,!0)}})}function r(b){var g=L.cmpPos(b.anchor,b.head)>0;return{anchor:new S(b.anchor.line,b.anchor.ch+(g?-1:1)),head:new S(b.head.line,b.head.ch+(g?1:-1))}}function u(b,g){var v=l(b);if(!v||b.getOption("disableInput"))return L.Pass;var n=R(v,"pairs"),d=n.indexOf(g);if(d==-1)return L.Pass;for(var h=R(v,"closeBefore"),C=R(v,"triples"),T=n.charAt(d+1)==g,o=b.listSelections(),P=d%2==0,O,y=0;y<o.length;y++){var x=o[y],E=x.head,_,N=b.getRange(E,S(E.line,E.ch+1));if(P&&!x.empty())_="surround";else if((T||!P)&&N==g)T&&m(b,E)?_="both":C.indexOf(g)>=0&&b.getRange(E,S(E.line,E.ch+3))==g+g+g?_="skipThree":_="skip";else if(T&&E.ch>1&&C.indexOf(g)>=0&&b.getRange(S(E.line,E.ch-2),E)==g+g){if(E.ch>2&&/\bstring/.test(b.getTokenTypeAt(S(E.line,E.ch-2))))return L.Pass;_="addFour"}else if(T){var j=E.ch==0?" ":b.getRange(S(E.line,E.ch-1),E);if(!L.isWordChar(N)&&j!=g&&!L.isWordChar(j))_="both";else return L.Pass}else if(P&&(N.length===0||/\s/.test(N)||h.indexOf(N)>-1))_="both";else return L.Pass;if(!O)O=_;else if(O!=_)return L.Pass}var M=d%2?n.charAt(d-1):g,H=d%2?g:n.charAt(d+1);b.operation(function(){if(O=="skip")b.execCommand("goCharRight");else if(O=="skipThree")for(var z=0;z<3;z++)b.execCommand("goCharRight");else if(O=="surround"){for(var F=b.getSelections(),z=0;z<F.length;z++)F[z]=M+F[z]+H;b.replaceSelections(F,"around"),F=b.listSelections().slice();for(var z=0;z<F.length;z++)F[z]=r(F[z]);b.setSelections(F)}else O=="both"?(b.replaceSelection(M+H,null),b.triggerElectric(M+H),b.execCommand("goCharLeft")):O=="addFour"&&(b.replaceSelection(M+M+M+M,"before"),b.execCommand("goCharRight"))})}function p(b,g){var v=b.getRange(S(g.line,g.ch-1),S(g.line,g.ch+1));return v.length==2?v:null}function m(b,g){var v=b.getTokenAt(S(g.line,g.ch+1));return/\bstring/.test(v.type)&&v.start==g.ch&&(g.ch==0||!/\bstring/.test(b.getTokenTypeAt(g)))}})},ELcG:function(I,Y,k){(function(L,c){I.exports=Y=c(k("Ib8C"))})(this,function(L){/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return function(c){var S=L,R=S.lib,f=R.WordArray,s=R.Hasher,w=S.algo,l=f.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),i=f.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]),a=f.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=f.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=f.create([0,1518500249,1859775393,2400959708,2840853838]),p=f.create([1352829926,1548603684,1836072691,2053994217,0]),m=w.RIPEMD160=s.extend({_doReset:function(){this._hash=f.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(C,T){for(var o=0;o<16;o++){var P=T+o,O=C[P];C[P]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var y=this._hash.words,x=u.words,E=p.words,_=l.words,N=i.words,j=a.words,M=r.words,H,z,F,G,B,K,W,J,ee,Z;K=H=y[0],W=z=y[1],J=F=y[2],ee=G=y[3],Z=B=y[4];for(var he,o=0;o<80;o+=1)he=H+C[T+_[o]]|0,o<16?he+=b(z,F,G)+x[0]:o<32?he+=g(z,F,G)+x[1]:o<48?he+=v(z,F,G)+x[2]:o<64?he+=n(z,F,G)+x[3]:he+=d(z,F,G)+x[4],he=he|0,he=h(he,j[o]),he=he+B|0,H=B,B=G,G=h(F,10),F=z,z=he,he=K+C[T+N[o]]|0,o<16?he+=d(W,J,ee)+E[0]:o<32?he+=n(W,J,ee)+E[1]:o<48?he+=v(W,J,ee)+E[2]:o<64?he+=g(W,J,ee)+E[3]:he+=b(W,J,ee)+E[4],he=he|0,he=h(he,M[o]),he=he+Z|0,K=Z,Z=ee,ee=h(J,10),J=W,W=he;he=y[1]+F+ee|0,y[1]=y[2]+G+Z|0,y[2]=y[3]+B+K|0,y[3]=y[4]+H+W|0,y[4]=y[0]+z+J|0,y[0]=he},_doFinalize:function(){var C=this._data,T=C.words,o=this._nDataBytes*8,P=C.sigBytes*8;T[P>>>5]|=128<<24-P%32,T[(P+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,C.sigBytes=(T.length+1)*4,this._process();for(var O=this._hash,y=O.words,x=0;x<5;x++){var E=y[x];y[x]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return O},clone:function(){var C=s.clone.call(this);return C._hash=this._hash.clone(),C}});function b(C,T,o){return C^T^o}function g(C,T,o){return C&T|~C&o}function v(C,T,o){return(C|~T)^o}function n(C,T,o){return C&o|T&~o}function d(C,T,o){return C^(T|~o)}function h(C,T){return C<<T|C>>>32-T}S.RIPEMD160=s._createHelper(m),S.HmacRIPEMD160=s._createHmacHelper(m)}(Math),L.RIPEMD160})},ETIr:function(I,Y,k){(function(L,c){I.exports=Y=c(k("Ib8C"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.WordArray,f=c.enc,s=f.Base64={stringify:function(l){var i=l.words,a=l.sigBytes,r=this._map;l.clamp();for(var u=[],p=0;p<a;p+=3)for(var m=i[p>>>2]>>>24-p%4*8&255,b=i[p+1>>>2]>>>24-(p+1)%4*8&255,g=i[p+2>>>2]>>>24-(p+2)%4*8&255,v=m<<16|b<<8|g,n=0;n<4&&p+n*.75<a;n++)u.push(r.charAt(v>>>6*(3-n)&63));var d=r.charAt(64);if(d)for(;u.length%4;)u.push(d);return u.join("")},parse:function(l){var i=l.length,a=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var u=0;u<a.length;u++)r[a.charCodeAt(u)]=u}var p=a.charAt(64);if(p){var m=l.indexOf(p);m!==-1&&(i=m)}return w(l,i,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function w(l,i,a){for(var r=[],u=0,p=0;p<i;p++)if(p%4){var m=a[l.charCodeAt(p-1)]<<p%4*2,b=a[l.charCodeAt(p)]>>>6-p%4*2,g=m|b;r[u>>>2]|=g<<24-u%4*8,u++}return R.create(r,u)}}(),L.enc.Base64})},"F+F2":function(I,Y,k){(function(L,c){I.exports=Y=c(k("Ib8C"))})(this,function(L){return function(){if(typeof ArrayBuffer!="function")return;var c=L,S=c.lib,R=S.WordArray,f=R.init,s=R.init=function(w){if(w instanceof ArrayBuffer&&(w=new Uint8Array(w)),(w instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&w instanceof Uint8ClampedArray||w instanceof Int16Array||w instanceof Uint16Array||w instanceof Int32Array||w instanceof Uint32Array||w instanceof Float32Array||w instanceof Float64Array)&&(w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength)),w instanceof Uint8Array){for(var l=w.byteLength,i=[],a=0;a<l;a++)i[a>>>2]|=w[a]<<24-a%4*8;f.call(this,i,l)}else f.apply(this,arguments)};s.prototype=R}(),L.lib.WordArray})},GRuw:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("lPiR"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.WordArray,f=c.algo,s=f.SHA256,w=f.SHA224=s.extend({_doReset:function(){this._hash=new R.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var l=s._doFinalize.call(this);return l.sigBytes-=4,l}});c.SHA224=s._createHelper(w),c.HmacSHA224=s._createHmacHelper(w)}(),L.SHA224})},GfqC:function(I,Y,k){"use strict";var L=k("cDcd"),c=k.n(L),S=k("TSYQ"),R=k.n(S);function f(G,B){var K="cannot "+G.method+" "+G.action+" "+B.status+"'",W=new Error(K);return W.status=B.status,W.method=G.method,W.url=G.action,W}function s(G){var B=G.responseText||G.response;if(!B)return B;try{return JSON.parse(B)}catch(K){return B}}function w(G){var B=new XMLHttpRequest;G.onProgress&&B.upload&&(B.upload.onprogress=function(ee){ee.total>0&&(ee.percent=ee.loaded/ee.total*100),G.onProgress(ee)});var K=new FormData;G.data&&Object.keys(G.data).forEach(function(J){var ee=G.data[J];if(Array.isArray(ee)){ee.forEach(function(Z){K.append(J+"[]",Z)});return}K.append(J,G.data[J])}),G.file instanceof Blob?K.append(G.filename,G.file,G.file.name):K.append(G.filename,G.file),B.onerror=function(ee){G.onError(ee)},B.onload=function(){return B.status<200||B.status>=300?G.onError(f(G,B),s(B)):G.onSuccess(s(B),B)},B.open(G.method,G.action,!0),G.withCredentials&&"withCredentials"in B&&(B.withCredentials=!0);var W=G.headers||{};return W["X-Requested-With"]!==null&&B.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(W).forEach(function(J){W[J]!==null&&B.setRequestHeader(J,W[J])}),B.send(K),{abort:function(){B.abort()}}}var l=+new Date,i=0;function a(){return"rc-upload-"+l+"-"+ ++i}function r(G,B){return G.indexOf(B,G.length-B.length)!==-1}var u=function(G,B){if(G&&B){var K=Array.isArray(B)?B:B.split(","),W=G.name||"",J=G.type||"",ee=J.replace(/\/.*$/,"");return K.some(function(Z){var he=Z.trim();return he.charAt(0)==="."?r(W.toLowerCase(),he.toLowerCase()):/\/\*$/.test(he)?ee===he.replace(/\/.*$/,""):J===he})}return!0};function p(G,B){var K=G.createReader(),W=[];function J(){K.readEntries(function(ee){var Z=Array.prototype.slice.apply(ee);W=W.concat(Z);var he=!Z.length;he?B(W):J()})}J()}var m=function(B,K,W){var J=function ee(Z,he){he=he||"",Z.isFile?Z.file(function(ge){W(ge)&&(Z.fullPath&&!ge.webkitRelativePath&&(Object.defineProperties(ge,{webkitRelativePath:{writable:!0}}),ge.webkitRelativePath=Z.fullPath.replace(/^\//,""),Object.defineProperties(ge,{webkitRelativePath:{writable:!1}})),K([ge]))}):Z.isDirectory&&p(Z,function(ge){ge.forEach(function(ie){ee(ie,""+he+Z.name+"/")})})};B.forEach(function(ee){J(ee.webkitGetAsEntry())})},b=m,g=Object.assign||function(G){for(var B=1;B<arguments.length;B++){var K=arguments[B];for(var W in K)Object.prototype.hasOwnProperty.call(K,W)&&(G[W]=K[W])}return G},v=function(){function G(B,K){var W=[],J=!0,ee=!1,Z=void 0;try{for(var he=B[Symbol.iterator](),ge;!(J=(ge=he.next()).done)&&!(W.push(ge.value),K&&W.length===K);J=!0);}catch(ie){ee=!0,Z=ie}finally{try{!J&&he.return&&he.return()}finally{if(ee)throw Z}}return W}return function(B,K){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return G(B,K);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function G(B,K){for(var W=0;W<K.length;W++){var J=K[W];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(B,J.key,J)}}return function(B,K,W){return K&&G(B.prototype,K),W&&G(B,W),B}}();function d(G,B,K){return B in G?Object.defineProperty(G,B,{value:K,enumerable:!0,configurable:!0,writable:!0}):G[B]=K,G}function h(G,B){var K={};for(var W in G){if(B.indexOf(W)>=0)continue;if(!Object.prototype.hasOwnProperty.call(G,W))continue;K[W]=G[W]}return K}function C(G,B){if(!(G instanceof B))throw new TypeError("Cannot call a class as a function")}function T(G,B){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:G}function o(G,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);G.prototype=Object.create(B&&B.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(G,B):G.__proto__=B)}var P=function(B){return Object.keys(B).reduce(function(K,W){return(W.substr(0,5)==="data-"||W.substr(0,5)==="aria-"||W==="role")&&(K[W]=B[W]),K},{})},O=function(G){o(B,G);function B(){var K,W,J,ee;C(this,B);for(var Z=arguments.length,he=Array(Z),ge=0;ge<Z;ge++)he[ge]=arguments[ge];return ee=(W=(J=T(this,(K=B.__proto__||Object.getPrototypeOf(B)).call.apply(K,[this].concat(he))),J),J.state={uid:a()},J.reqs={},J.onChange=function(ie){var we=ie.target.files;J.uploadFiles(we),J.reset()},J.onClick=function(ie){var we=J.fileInput;if(!we)return;var me=J.props,oe=me.children,se=me.onClick;oe&&oe.type==="button"&&(we.parentNode.focus(),we.parentNode.querySelector("button").blur()),we.click(),se&&se(ie)},J.onKeyDown=function(ie){ie.key==="Enter"&&J.onClick()},J.onFileDrop=function(ie){var we=J.props.multiple;if(ie.preventDefault(),ie.type==="dragover")return;if(J.props.directory)b(Array.prototype.slice.call(ie.dataTransfer.items),J.uploadFiles,function(oe){return u(oe,J.props.accept)});else{var me=Array.prototype.slice.call(ie.dataTransfer.files).filter(function(oe){return u(oe,J.props.accept)});we===!1&&(me=me.slice(0,1)),J.uploadFiles(me)}},J.uploadFiles=function(ie){var we=Array.prototype.slice.call(ie);we.map(function(me){return me.uid=a(),me}).forEach(function(me){J.upload(me,we)})},J.saveFileInput=function(ie){J.fileInput=ie},W),T(J,ee)}return n(B,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(W,J){var ee=this,Z=this.props;if(!Z.beforeUpload)return setTimeout(function(){return ee.post(W)},0);var he=Z.beforeUpload(W,J);he&&he.then?he.then(function(ge){var ie=Object.prototype.toString.call(ge);return ie==="[object File]"||ie==="[object Blob]"?ee.post(ge):ee.post(W)}).catch(function(ge){console.log(ge)}):he!==!1&&setTimeout(function(){return ee.post(W)},0);return}},{key:"post",value:function(W){var J=this;if(!this._isMounted)return;var ee=this.props,Z=ee.onStart,he=ee.onProgress,ge=ee.transformFile,ie=ge===void 0?function(we){return we}:ge;new Promise(function(we){var me=ee.action;return typeof me=="function"&&(me=me(W)),we(me)}).then(function(we){var me=W.uid,oe=ee.customRequest||w,se=Promise.resolve(ie(W)).then(function(te){var be=ee.data;return typeof be=="function"&&(be=be(te)),Promise.all([te,be])}).catch(function(te){console.error(te)});se.then(function(te){var be=v(te,2),q=be[0],ae=be[1],xe={action:we,filename:ee.name,data:ae,file:q,headers:ee.headers,withCredentials:ee.withCredentials,method:ee.method||"post",onProgress:he?function(ne){he(ne,W)}:null,onSuccess:function(Q,X){delete J.reqs[me],ee.onSuccess(Q,W,X)},onError:function(Q,X){delete J.reqs[me],ee.onError(Q,X,W)}};Z(W),J.reqs[me]=oe(xe)})})}},{key:"reset",value:function(){this.setState({uid:a()})}},{key:"abort",value:function(W){var J=this.reqs;if(W){var ee=W;W&&W.uid&&(ee=W.uid),J[ee]&&J[ee].abort&&J[ee].abort(),delete J[ee]}else Object.keys(J).forEach(function(Z){J[Z]&&J[Z].abort&&J[Z].abort(),delete J[Z]})}},{key:"render",value:function(){var W,J=this.props,ee=J.component,Z=J.prefixCls,he=J.className,ge=J.disabled,ie=J.id,we=J.style,me=J.multiple,oe=J.accept,se=J.children,te=J.directory,be=J.openFileDialogOnClick,q=J.onMouseEnter,ae=J.onMouseLeave,xe=h(J,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ne=R()((W={},d(W,Z,!0),d(W,Z+"-disabled",ge),d(W,he,he),W)),Q=ge?{}:{onClick:be?this.onClick:function(){},onKeyDown:be?this.onKeyDown:function(){},onMouseEnter:q,onMouseLeave:ae,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return c.a.createElement(ee,g({},Q,{className:ne,role:"button",style:we}),c.a.createElement("input",g({},P(xe),{id:ie,type:"file",ref:this.saveFileInput,onClick:function($){return $.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:oe,directory:te?"directory":null,webkitdirectory:te?"webkitdirectory":null,multiple:me,onChange:this.onChange})),se)}}]),B}(L.Component),y=O,x=Object.assign||function(G){for(var B=1;B<arguments.length;B++){var K=arguments[B];for(var W in K)Object.prototype.hasOwnProperty.call(K,W)&&(G[W]=K[W])}return G},E=function(){function G(B,K){for(var W=0;W<K.length;W++){var J=K[W];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(B,J.key,J)}}return function(B,K,W){return K&&G(B.prototype,K),W&&G(B,W),B}}();function _(G,B){if(!(G instanceof B))throw new TypeError("Cannot call a class as a function")}function N(G,B){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:G}function j(G,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);G.prototype=Object.create(B&&B.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(G,B):G.__proto__=B)}function M(){}var H=function(G){j(B,G);function B(){var K,W,J,ee;_(this,B);for(var Z=arguments.length,he=Array(Z),ge=0;ge<Z;ge++)he[ge]=arguments[ge];return ee=(W=(J=N(this,(K=B.__proto__||Object.getPrototypeOf(B)).call.apply(K,[this].concat(he))),J),J.saveUploader=function(ie){J.uploader=ie},W),N(J,ee)}return E(B,[{key:"abort",value:function(W){this.uploader.abort(W)}},{key:"render",value:function(){return c.a.createElement(y,x({},this.props,{ref:this.saveUploader}))}}]),B}(L.Component);H.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:M,onError:M,onSuccess:M,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var z=H,F=Y.a=z},H38U:function(I,Y,k){var L=k("f4xo"),c=k("rcnY"),S=k("wU8J"),R=k("Iq15"),f=k("dWSS");function s(l,i){this.typeNumber=l,this.errorCorrectLevel=i,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var w=s.prototype;w.addData=function(l){var i=new L(l);this.dataList.push(i),this.dataCache=null},w.isDark=function(l,i){if(l<0||this.moduleCount<=l||i<0||this.moduleCount<=i)throw new Error(l+","+i);return this.modules[l][i]},w.getModuleCount=function(){return this.moduleCount},w.make=function(){if(this.typeNumber<1){var l=1;for(l=1;l<40;l++){for(var i=c.getRSBlocks(l,this.errorCorrectLevel),a=new S,r=0,u=0;u<i.length;u++)r+=i[u].dataCount;for(var u=0;u<this.dataList.length;u++){var p=this.dataList[u];a.put(p.mode,4),a.put(p.getLength(),R.getLengthInBits(p.mode,l)),p.write(a)}if(a.getLengthInBits()<=r*8)break}this.typeNumber=l}this.makeImpl(!1,this.getBestMaskPattern())},w.makeImpl=function(l,i){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var a=0;a<this.moduleCount;a++){this.modules[a]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[a][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(l,i),this.typeNumber>=7&&this.setupTypeNumber(l),this.dataCache==null&&(this.dataCache=s.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,i)},w.setupPositionProbePattern=function(l,i){for(var a=-1;a<=7;a++){if(l+a<=-1||this.moduleCount<=l+a)continue;for(var r=-1;r<=7;r++){if(i+r<=-1||this.moduleCount<=i+r)continue;0<=a&&a<=6&&(r==0||r==6)||0<=r&&r<=6&&(a==0||a==6)||2<=a&&a<=4&&2<=r&&r<=4?this.modules[l+a][i+r]=!0:this.modules[l+a][i+r]=!1}}},w.getBestMaskPattern=function(){for(var l=0,i=0,a=0;a<8;a++){this.makeImpl(!0,a);var r=R.getLostPoint(this);(a==0||l>r)&&(l=r,i=a)}return i},w.createMovieClip=function(l,i,a){var r=l.createEmptyMovieClip(i,a),u=1;this.make();for(var p=0;p<this.modules.length;p++)for(var m=p*u,b=0;b<this.modules[p].length;b++){var g=b*u,v=this.modules[p][b];v&&(r.beginFill(0,100),r.moveTo(g,m),r.lineTo(g+u,m),r.lineTo(g+u,m+u),r.lineTo(g,m+u),r.endFill())}return r},w.setupTimingPattern=function(){for(var l=8;l<this.moduleCount-8;l++){if(this.modules[l][6]!=null)continue;this.modules[l][6]=l%2==0}for(var i=8;i<this.moduleCount-8;i++){if(this.modules[6][i]!=null)continue;this.modules[6][i]=i%2==0}},w.setupPositionAdjustPattern=function(){for(var l=R.getPatternPosition(this.typeNumber),i=0;i<l.length;i++)for(var a=0;a<l.length;a++){var r=l[i],u=l[a];if(this.modules[r][u]!=null)continue;for(var p=-2;p<=2;p++)for(var m=-2;m<=2;m++)p==-2||p==2||m==-2||m==2||p==0&&m==0?this.modules[r+p][u+m]=!0:this.modules[r+p][u+m]=!1}},w.setupTypeNumber=function(l){for(var i=R.getBCHTypeNumber(this.typeNumber),a=0;a<18;a++){var r=!l&&(i>>a&1)==1;this.modules[Math.floor(a/3)][a%3+this.moduleCount-8-3]=r}for(var a=0;a<18;a++){var r=!l&&(i>>a&1)==1;this.modules[a%3+this.moduleCount-8-3][Math.floor(a/3)]=r}},w.setupTypeInfo=function(l,i){for(var a=this.errorCorrectLevel<<3|i,r=R.getBCHTypeInfo(a),u=0;u<15;u++){var p=!l&&(r>>u&1)==1;u<6?this.modules[u][8]=p:u<8?this.modules[u+1][8]=p:this.modules[this.moduleCount-15+u][8]=p}for(var u=0;u<15;u++){var p=!l&&(r>>u&1)==1;u<8?this.modules[8][this.moduleCount-u-1]=p:u<9?this.modules[8][15-u-1+1]=p:this.modules[8][15-u-1]=p}this.modules[this.moduleCount-8][8]=!l},w.mapData=function(l,i){for(var a=-1,r=this.moduleCount-1,u=7,p=0,m=this.moduleCount-1;m>0;m-=2)for(m==6&&m--;;){for(var b=0;b<2;b++)if(this.modules[r][m-b]==null){var g=!1;p<l.length&&(g=(l[p]>>>u&1)==1);var v=R.getMask(i,r,m-b);v&&(g=!g),this.modules[r][m-b]=g,u--,u==-1&&(p++,u=7)}if(r+=a,r<0||this.moduleCount<=r){r-=a,a=-a;break}}},s.PAD0=236,s.PAD1=17,s.createData=function(l,i,a){for(var r=c.getRSBlocks(l,i),u=new S,p=0;p<a.length;p++){var m=a[p];u.put(m.mode,4),u.put(m.getLength(),R.getLengthInBits(m.mode,l)),m.write(u)}for(var b=0,p=0;p<r.length;p++)b+=r[p].dataCount;if(u.getLengthInBits()>b*8)throw new Error("code length overflow. ("+u.getLengthInBits()+">"+b*8+")");for(u.getLengthInBits()+4<=b*8&&u.put(0,4);u.getLengthInBits()%8!=0;)u.putBit(!1);for(;!(u.getLengthInBits()>=b*8);){if(u.put(s.PAD0,8),u.getLengthInBits()>=b*8)break;u.put(s.PAD1,8)}return s.createBytes(u,r)},s.createBytes=function(l,i){for(var a=0,r=0,u=0,p=new Array(i.length),m=new Array(i.length),b=0;b<i.length;b++){var g=i[b].dataCount,v=i[b].totalCount-g;r=Math.max(r,g),u=Math.max(u,v),p[b]=new Array(g);for(var n=0;n<p[b].length;n++)p[b][n]=255&l.buffer[n+a];a+=g;var d=R.getErrorCorrectPolynomial(v),h=new f(p[b],d.getLength()-1),C=h.mod(d);m[b]=new Array(d.getLength()-1);for(var n=0;n<m[b].length;n++){var T=n+C.getLength()-m[b].length;m[b][n]=T>=0?C.get(T):0}}for(var o=0,n=0;n<i.length;n++)o+=i[n].totalCount;for(var P=new Array(o),O=0,n=0;n<r;n++)for(var b=0;b<i.length;b++)n<p[b].length&&(P[O++]=p[b][n]);for(var n=0;n<u;n++)for(var b=0;b<i.length;b++)n<m[b].length&&(P[O++]=m[b][n]);return P},I.exports=s},HmJG:function(I,Y,k){},IBYe:function(I,Y,k){"use strict";function L(c){return null}Y.a=L},Ib8C:function(I,Y,k){(function(L){(function(c,S){I.exports=Y=S()})(this,function(){var c=c||function(S,R){var f;if(typeof window!="undefined"&&window.crypto&&(f=window.crypto),typeof self!="undefined"&&self.crypto&&(f=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(f=globalThis.crypto),!f&&typeof window!="undefined"&&window.msCrypto&&(f=window.msCrypto),!f&&typeof L!="undefined"&&L.crypto&&(f=L.crypto),!f&&!0)try{f=k(4)}catch(d){}var s=function(){if(f){if(typeof f.getRandomValues=="function")try{return f.getRandomValues(new Uint32Array(1))[0]}catch(d){}if(typeof f.randomBytes=="function")try{return f.randomBytes(4).readInt32LE()}catch(d){}}throw new Error("Native crypto module could not be used to get secure random number.")},w=Object.create||function(){function d(){}return function(h){var C;return d.prototype=h,C=new d,d.prototype=null,C}}(),l={},i=l.lib={},a=i.Base=function(){return{extend:function(d){var h=w(this);return d&&h.mixIn(d),(!h.hasOwnProperty("init")||this.init===h.init)&&(h.init=function(){h.$super.init.apply(this,arguments)}),h.init.prototype=h,h.$super=this,h},create:function(){var d=this.extend();return d.init.apply(d,arguments),d},init:function(){},mixIn:function(d){for(var h in d)d.hasOwnProperty(h)&&(this[h]=d[h]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),r=i.WordArray=a.extend({init:function(d,h){d=this.words=d||[],h!=R?this.sigBytes=h:this.sigBytes=d.length*4},toString:function(d){return(d||p).stringify(this)},concat:function(d){var h=this.words,C=d.words,T=this.sigBytes,o=d.sigBytes;if(this.clamp(),T%4)for(var P=0;P<o;P++){var O=C[P>>>2]>>>24-P%4*8&255;h[T+P>>>2]|=O<<24-(T+P)%4*8}else for(var y=0;y<o;y+=4)h[T+y>>>2]=C[y>>>2];return this.sigBytes+=o,this},clamp:function(){var d=this.words,h=this.sigBytes;d[h>>>2]&=4294967295<<32-h%4*8,d.length=S.ceil(h/4)},clone:function(){var d=a.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var h=[],C=0;C<d;C+=4)h.push(s());return new r.init(h,d)}}),u=l.enc={},p=u.Hex={stringify:function(d){for(var h=d.words,C=d.sigBytes,T=[],o=0;o<C;o++){var P=h[o>>>2]>>>24-o%4*8&255;T.push((P>>>4).toString(16)),T.push((P&15).toString(16))}return T.join("")},parse:function(d){for(var h=d.length,C=[],T=0;T<h;T+=2)C[T>>>3]|=parseInt(d.substr(T,2),16)<<24-T%8*4;return new r.init(C,h/2)}},m=u.Latin1={stringify:function(d){for(var h=d.words,C=d.sigBytes,T=[],o=0;o<C;o++){var P=h[o>>>2]>>>24-o%4*8&255;T.push(String.fromCharCode(P))}return T.join("")},parse:function(d){for(var h=d.length,C=[],T=0;T<h;T++)C[T>>>2]|=(d.charCodeAt(T)&255)<<24-T%4*8;return new r.init(C,h)}},b=u.Utf8={stringify:function(d){try{return decodeURIComponent(escape(m.stringify(d)))}catch(h){throw new Error("Malformed UTF-8 data")}},parse:function(d){return m.parse(unescape(encodeURIComponent(d)))}},g=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(d){typeof d=="string"&&(d=b.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var h,C=this._data,T=C.words,o=C.sigBytes,P=this.blockSize,O=P*4,y=o/O;d?y=S.ceil(y):y=S.max((y|0)-this._minBufferSize,0);var x=y*P,E=S.min(x*4,o);if(x){for(var _=0;_<x;_+=P)this._doProcessBlock(T,_);h=T.splice(0,x),C.sigBytes-=E}return new r.init(h,E)},clone:function(){var d=a.clone.call(this);return d._data=this._data.clone(),d},_minBufferSize:0}),v=i.Hasher=g.extend({cfg:a.extend(),init:function(d){this.cfg=this.cfg.extend(d),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(d){return this._append(d),this._process(),this},finalize:function(d){d&&this._append(d);var h=this._doFinalize();return h},blockSize:512/32,_createHelper:function(d){return function(h,C){return new d.init(C).finalize(h)}},_createHmacHelper:function(d){return function(h,C){return new n.HMAC.init(d,C).finalize(h)}}}),n=l.algo={};return l}(Math);return c})}).call(this,k("IyRk"))},Iq15:function(I,Y,k){var L=k("nVVt"),c=k("dWSS"),S=k("dQei"),R={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,G18:1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,G15_MASK:1<<14|1<<12|1<<10|1<<4|1<<1,getBCHTypeInfo:function(s){for(var w=s<<10;f.getBCHDigit(w)-f.getBCHDigit(f.G15)>=0;)w^=f.G15<<f.getBCHDigit(w)-f.getBCHDigit(f.G15);return(s<<10|w)^f.G15_MASK},getBCHTypeNumber:function(s){for(var w=s<<12;f.getBCHDigit(w)-f.getBCHDigit(f.G18)>=0;)w^=f.G18<<f.getBCHDigit(w)-f.getBCHDigit(f.G18);return s<<12|w},getBCHDigit:function(s){for(var w=0;s!=0;)w++,s>>>=1;return w},getPatternPosition:function(s){return f.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,w,l){switch(s){case R.PATTERN000:return(w+l)%2==0;case R.PATTERN001:return w%2==0;case R.PATTERN010:return l%3==0;case R.PATTERN011:return(w+l)%3==0;case R.PATTERN100:return(Math.floor(w/2)+Math.floor(l/3))%2==0;case R.PATTERN101:return w*l%2+w*l%3==0;case R.PATTERN110:return(w*l%2+w*l%3)%2==0;case R.PATTERN111:return(w*l%3+(w+l)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){for(var w=new c([1],0),l=0;l<s;l++)w=w.multiply(new c([1,S.gexp(l)],0));return w},getLengthInBits:function(s,w){if(1<=w&&w<10)switch(s){case L.MODE_NUMBER:return 10;case L.MODE_ALPHA_NUM:return 9;case L.MODE_8BIT_BYTE:return 8;case L.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(w<27)switch(s){case L.MODE_NUMBER:return 12;case L.MODE_ALPHA_NUM:return 11;case L.MODE_8BIT_BYTE:return 16;case L.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(w<41)switch(s){case L.MODE_NUMBER:return 14;case L.MODE_ALPHA_NUM:return 13;case L.MODE_8BIT_BYTE:return 16;case L.MODE_KANJI:return 12;default:throw new Error("mode:"+s)}else throw new Error("type:"+w)},getLostPoint:function(s){for(var w=s.getModuleCount(),l=0,i=0;i<w;i++)for(var a=0;a<w;a++){for(var r=0,u=s.isDark(i,a),p=-1;p<=1;p++){if(i+p<0||w<=i+p)continue;for(var m=-1;m<=1;m++){if(a+m<0||w<=a+m)continue;if(p==0&&m==0)continue;u==s.isDark(i+p,a+m)&&r++}}r>5&&(l+=3+r-5)}for(var i=0;i<w-1;i++)for(var a=0;a<w-1;a++){var b=0;s.isDark(i,a)&&b++,s.isDark(i+1,a)&&b++,s.isDark(i,a+1)&&b++,s.isDark(i+1,a+1)&&b++,(b==0||b==4)&&(l+=3)}for(var i=0;i<w;i++)for(var a=0;a<w-6;a++)s.isDark(i,a)&&!s.isDark(i,a+1)&&s.isDark(i,a+2)&&s.isDark(i,a+3)&&s.isDark(i,a+4)&&!s.isDark(i,a+5)&&s.isDark(i,a+6)&&(l+=40);for(var a=0;a<w;a++)for(var i=0;i<w-6;i++)s.isDark(i,a)&&!s.isDark(i+1,a)&&s.isDark(i+2,a)&&s.isDark(i+3,a)&&s.isDark(i+4,a)&&!s.isDark(i+5,a)&&s.isDark(i+6,a)&&(l+=40);for(var g=0,a=0;a<w;a++)for(var i=0;i<w;i++)s.isDark(i,a)&&g++;var v=Math.abs(100*g/w/w-50)/5;return l+=v*10,l}};I.exports=f},J66h:function(I,Y,k){(function(L){var c,S;(function(R,f){I.exports=f(R)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof L!="undefined"?L:this,function(R){"use strict";R=R||{};var f=R.Base64,s="2.6.4",w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(M){for(var H={},z=0,F=M.length;z<F;z++)H[M.charAt(z)]=z;return H}(w),i=String.fromCharCode,a=function(M){if(M.length<2){var H=M.charCodeAt(0);return H<128?M:H<2048?i(192|H>>>6)+i(128|H&63):i(224|H>>>12&15)+i(128|H>>>6&63)+i(128|H&63)}else{var H=65536+(M.charCodeAt(0)-55296)*1024+(M.charCodeAt(1)-56320);return i(240|H>>>18&7)+i(128|H>>>12&63)+i(128|H>>>6&63)+i(128|H&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,u=function(M){return M.replace(r,a)},p=function(M){var H=[0,2,1][M.length%3],z=M.charCodeAt(0)<<16|(M.length>1?M.charCodeAt(1):0)<<8|(M.length>2?M.charCodeAt(2):0),F=[w.charAt(z>>>18),w.charAt(z>>>12&63),H>=2?"=":w.charAt(z>>>6&63),H>=1?"=":w.charAt(z&63)];return F.join("")},m=R.btoa&&typeof R.btoa=="function"?function(M){return R.btoa(M)}:function(M){if(M.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return M.replace(/[\s\S]{1,3}/g,p)},b=function(M){return m(u(String(M)))},g=function(M){return M.replace(/[+\/]/g,function(H){return H=="+"?"-":"_"}).replace(/=/g,"")},v=function(M,H){return H?g(b(M)):b(M)},n=function(M){return v(M,!0)},d;R.Uint8Array&&(d=function(M,H){for(var z="",F=0,G=M.length;F<G;F+=3){var B=M[F],K=M[F+1],W=M[F+2],J=B<<16|K<<8|W;z+=w.charAt(J>>>18)+w.charAt(J>>>12&63)+(typeof K!="undefined"?w.charAt(J>>>6&63):"=")+(typeof W!="undefined"?w.charAt(J&63):"=")}return H?g(z):z});var h=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=function(M){switch(M.length){case 4:var H=(7&M.charCodeAt(0))<<18|(63&M.charCodeAt(1))<<12|(63&M.charCodeAt(2))<<6|63&M.charCodeAt(3),z=H-65536;return i((z>>>10)+55296)+i((z&1023)+56320);case 3:return i((15&M.charCodeAt(0))<<12|(63&M.charCodeAt(1))<<6|63&M.charCodeAt(2));default:return i((31&M.charCodeAt(0))<<6|63&M.charCodeAt(1))}},T=function(M){return M.replace(h,C)},o=function(M){var H=M.length,z=H%4,F=(H>0?l[M.charAt(0)]<<18:0)|(H>1?l[M.charAt(1)]<<12:0)|(H>2?l[M.charAt(2)]<<6:0)|(H>3?l[M.charAt(3)]:0),G=[i(F>>>16),i(F>>>8&255),i(F&255)];return G.length-=[0,0,2,1][z],G.join("")},P=R.atob&&typeof R.atob=="function"?function(M){return R.atob(M)}:function(M){return M.replace(/\S{1,4}/g,o)},O=function(M){return P(String(M).replace(/[^A-Za-z0-9\+\/]/g,""))},y=function(M){return T(P(M))},x=function(M){return String(M).replace(/[-_]/g,function(H){return H=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},E=function(M){return y(x(M))},_;R.Uint8Array&&(_=function(M){return Uint8Array.from(O(x(M)),function(H){return H.charCodeAt(0)})});var N=function(){var M=R.Base64;return R.Base64=f,M};if(R.Base64={VERSION:s,atob:O,btoa:m,fromBase64:E,toBase64:v,utob:u,encode:v,encodeURI:n,btou:T,decode:E,noConflict:N,fromUint8Array:d,toUint8Array:_},typeof Object.defineProperty=="function"){var j=function(M){return{value:M,enumerable:!1,writable:!0,configurable:!0}};R.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",j(function(){return E(this)})),Object.defineProperty(String.prototype,"toBase64",j(function(M){return v(this,M)})),Object.defineProperty(String.prototype,"toBase64URI",j(function(){return v(this,!0)}))}}return R.Meteor&&(Base64=R.Base64),I.exports?I.exports.Base64=R.Base64:!(c=[],S=function(){return R.Base64}.apply(Y,c),S!==void 0&&(I.exports=S)),{Base64:R.Base64}})}).call(this,k("IyRk"))},K3mO:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.Base,f=S.WordArray,s=c.algo,w=s.MD5,l=s.EvpKDF=R.extend({cfg:R.extend({keySize:128/32,hasher:w,iterations:1}),init:function(i){this.cfg=this.cfg.extend(i)},compute:function(i,a){for(var r,u=this.cfg,p=u.hasher.create(),m=f.create(),b=m.words,g=u.keySize,v=u.iterations;b.length<g;){r&&p.update(r),r=p.update(i).finalize(a),p.reset();for(var n=1;n<v;n++)r=p.finalize(r),p.reset();m.concat(r)}return m.sigBytes=g*4,m}});c.EvpKDF=function(i,a,r){return l.create(r).compute(i,a)}}(),L.EvpKDF})},KhGG:function(I,Y,k){"use strict";k.d(Y,"a",function(){return o}),k.d(Y,"c",function(){return y});var L=k("0Owb"),c=k("miYZ"),S=k("tsqr"),R=k("oBTY"),f=k("tJVT"),s=k("PpiC"),w=k("k1fw"),l=k("9og8"),i=k("DZo9"),a=k("8z0m"),r=k("WmNS"),u=k.n(r),p=k("cDcd"),m=k.n(p),b=k("ErOA"),g=k("NFKh"),v=k.n(g),n=k("7Cbv"),d=k("9kvl"),h=k("mxV5"),C=k.n(h),T=a.a.Dragger,o=function(_){var N="bf3c199c2470cb477d907b1e0917c17b",j="5183666c72eec9e4",M=v.a.enc.Utf8.parse(N),H=v.a.enc.Utf8.parse(j),z=v.a.AES.decrypt(_,M,{iv:H,mode:v.a.mode.CBC});return z.toString(v.a.enc.Utf8)},P,O=function(){var E=Object(l.a)(u.a.mark(function _(N){var j,M,H,z,F,G,B,K,W,J,ee;return u.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return B=N.identifier,K=N.oldFilename,W=N.newFilename,he.next=3,Object(b.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return J=he.sent,J.data=JSON.parse(o(J.data)),ee=new C.a({endpoint:J==null||((j=J.data)===null||j===void 0)?void 0:j.end_point,region:J==null||((M=J.data)===null||M===void 0)?void 0:M.region,accessKeyId:J==null||((H=J.data)===null||H===void 0)?void 0:H.access_key_id,accessKeySecret:J==null||((z=J.data)===null||z===void 0)?void 0:z.access_key_secret,bucket:J==null||((F=J.data)===null||F===void 0)?void 0:F.bucket,stsToken:J==null||((G=J.data)===null||G===void 0)?void 0:G.security_token}),he.abrupt("return",new Promise(function(ge,ie){console.log(11111,"".concat(B,"/").concat(K),"".concat(B,"/").concat(W),J.data),ee.copy("/".concat(B,"/").concat(K),"/".concat(B,"/").concat(W)).then(function(we){console.log("\u62F7\u8D1D\u6210\u529F",we)}).catch(function(we){console.log(we);debugger})}));case 7:case"end":return he.stop()}},_)}));return function(N){return E.apply(this,arguments)}}(),y=function(){var E=Object(l.a)(u.a.mark(function _(N,j,M){var H,z,F,G,B,K,W,J,ee,Z;return u.a.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return j.file_name=N.name,ge.next=3,Object(b.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return W=ge.sent,console.log("decrypt(res.data):",o(W.data)),W.data=JSON.parse(o(W.data)),J=N.name.split("."),J.pop(),ee=j.realFileName?J:Object(n.a)(),Z=new C.a({endpoint:W==null||((H=W.data)===null||H===void 0)?void 0:H.end_point,region:W==null||((z=W.data)===null||z===void 0)?void 0:z.region,accessKeyId:W==null||((F=W.data)===null||F===void 0)?void 0:F.access_key_id,accessKeySecret:W==null||((G=W.data)===null||G===void 0)?void 0:G.access_key_secret,bucket:W==null||((B=W.data)===null||B===void 0)?void 0:B.bucket,stsToken:W==null||((K=W.data)===null||K===void 0)?void 0:K.security_token}),ge.abrupt("return",new Promise(function(ie,we){var me;Z.multipartUpload("".concat(ee),new Blob([N],{type:N.type}),Object(w.a)(Object(w.a)({timeout:200*1e3,partSize:102400},M),{},{callback:{url:W==null||((me=W.data)===null||me===void 0)?void 0:me.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(b.e)(j)}})).then(function(oe){var se;N.response=(se=oe.data)===null||se===void 0?void 0:se.data,ie(oe==null?void 0:oe.data)}).catch(function(oe){we(oe),console.log("err:",oe)})}));case 11:case"end":return ge.stop()}},_)}));return function(N,j,M){return E.apply(this,arguments)}}(),x=function(_){var N=_.user,j=_.cancelUpload,M=Object(s.a)(_,["user","cancelUpload"]),H=Object(p.useState)([]),z=Object(f.a)(H,2),F=z[0],G=z[1],B=Object(p.useState)(),K=Object(f.a)(B,2),W=K[0],J=K[1],ee={onRemove:function(ge){G(Object(R.a)(F.filter(function(ie){return ie.name!==ge.name}))),M.onChange(F.filter(function(ie){return ie.name!==ge.name}))},disabled:M.disabled,multiple:!0,fileList:F==null?void 0:F.map(function(he){return he.file}),customRequest:function(){},beforeUpload:function(){var he=Object(l.a)(u.a.mark(function ie(we){var me;return u.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(me=M.maxSize||1024*1024*1024*1,!F.filter(function(te){return te.name===we.name}).length){se.next=4;break}return S.b.info("".concat(we.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),se.abrupt("return");case 4:if(!((we==null?void 0:we.size)>me)){se.next=7;break}return S.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(me/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),se.abrupt("return",!1);case 7:return F.push({name:we.name,file:we}),G(Object(R.a)(F)),M.onChange(F),se.abrupt("return",!1);case 11:case"end":return se.stop()}},ie)}));function ge(ie){return he.apply(this,arguments)}return ge}()},Z=function(){var he=Object(l.a)(u.a.mark(function ge(ie,we){var me,oe,se,te,be,q,ae,xe,ne,Q;return u.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return we.file_name=ie.name,ae=ie.name,$.next=4,Object(b.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(xe=$.sent,xe.data=JSON.parse(o(xe.data)),!((xe==null?void 0:xe.status)!==0)){$.next=12;break}return F[F.findIndex(function(pe){return pe.name===ae})].status="error",F[F.findIndex(function(pe){return pe.name===ae})].file.status="error",M.onChange(F),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),$.abrupt("return");case 12:return W=new C.a({endpoint:xe==null||((me=xe.data)===null||me===void 0)?void 0:me.end_point,region:xe==null||((oe=xe.data)===null||oe===void 0)?void 0:oe.region,accessKeyId:xe==null||((se=xe.data)===null||se===void 0)?void 0:se.access_key_id,accessKeySecret:xe==null||((te=xe.data)===null||te===void 0)?void 0:te.access_key_secret,bucket:xe==null||((be=xe.data)===null||be===void 0)?void 0:be.bucket,stsToken:xe==null||((q=xe.data)===null||q===void 0)?void 0:q.security_token}),console.log(ie,"file"),J(W),ne=ie.name.split("."),ne.pop(),Q=we.realFileName?ne:Object(n.a)(),$.abrupt("return",new Promise(function(pe,de){try{var Ce;W.multipartUpload("".concat(M.identifier,"/").concat(Q).concat(ae.indexOf(".")>-1?"."+ae.split(".").pop():""),new Blob([ie.file],{type:ie.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(qe,Ye,Ve){try{console.log("\u8FDB\u5EA6",qe,Ye,Ve);var et=F.findIndex(function(rt){return rt.name===ae});F[et].file.percent=qe*100,F[et].tempCheckpoint=Ye,G(Object(R.a)(F))}catch(rt){}},checkpoint:F[F.findIndex(function(ze){return ze.name===ae})].tempCheckpoint,callback:{customValue:{id:ae+""},url:xe==null||((Ce=xe.data)===null||Ce===void 0)?void 0:Ce.callback_url,host:xe==null?void 0:xe.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(b.e)(we)}}).then(function(ze){var qe,Ye=F.findIndex(function(Se){return Se.name===ae}),Ve="done";if(((qe=ze.data)===null||qe===void 0?void 0:qe.status)===0){var et;ie.response=(et=ze.data)===null||et===void 0?void 0:et.data;var rt=F.findIndex(function(Se){return Se.name===ae});F[rt].status="done",F[rt].file.status="done"}else{var Me;S.b.warn((Me=ze.data)===null||Me===void 0?void 0:Me.message),Ve="error"}F[Ye].status=Ve,F[Ye].file.status=Ve,M.onChange(F),pe(ze==null?void 0:ze.data)}).catch(function(ze){F[F.findIndex(function(qe){return qe.name===ae})].status="error",F[F.findIndex(function(qe){return qe.name===ae})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),G(Object(R.a)(F)),M.onChange(F),de(ze),console.log("err:",ze)})}catch(ze){}}));case 19:case"end":return $.stop()}},ge)}));return function(ie,we){return he.apply(this,arguments)}}();return Object(p.useEffect)(function(){F.every(function(he){return he==="done"||he==="error"})&&M.onComplete(F)},[F]),Object(p.useEffect)(function(){if(j){var he;(he=W)===null||he===void 0||he.cancel()}},[j]),Object(p.useEffect)(function(){M.uploading&&F.map(function(){var he=Object(l.a)(u.a.mark(function ge(ie){var we,me;return u.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(!((!ie.status||ie.status==="error")&&!j)){se.next=6;break}return ie.status="uploading",ie.file.status="uploading",se.next=5,Z(ie,{login:N==null||((we=N.userInfo)===null||we===void 0)?void 0:we.login,container_type:M.container_type,container_id:M.container_id,description:M.description,realFileName:M.realFileName});case 5:me=se.sent;case 6:case"end":return se.stop()}},ge)}));return function(ge){return he.apply(this,arguments)}}())},[M.uploading]),m.a.createElement(T,Object(L.a)({},ee,{height:M.height,className:M.className}),m.a.createElement("p",{className:"ant-upload-hint"},M.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Y.b=Object(d.a)(function(E){var _=E.loading,N=E.globalSetting,j=E.user;return{globalSetting:N,loading:_.models.competitions,user:j}})(x)},KmYQ:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.ZeroPadding={pad:function(c,S){var R=S*4;c.clamp(),c.sigBytes+=R-(c.sigBytes%R||R)},unpad:function(c){for(var S=c.words,R=c.sigBytes-1,R=c.sigBytes-1;R>=0;R--)if(S[R>>>2]>>>24-R%4*8&255){c.sigBytes=R+1;break}}},L.pad.ZeroPadding})},L9qf:function(I,Y,k){I.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},LdHM:function(I,Y,k){"use strict";k.d(Y,"b",function(){return h}),k.d(Y,"a",function(){return T});var L=k("1OyB"),c=k("vuIU"),S=k("Ji7U"),R=k("LK+K"),f=k("cDcd"),s=k("rePB"),w=k("Ff2n"),l=k("ODXe"),i=k("4IlW"),a=k("bX4T"),r=k("YrtM"),u=k("TSYQ"),p=k.n(u),m=k("+nKL"),b=k("8OUc"),g=function(W,J){var ee=W.prefixCls,Z=W.id,he=W.flattenOptions,ge=W.childrenAsData,ie=W.values,we=W.searchValue,me=W.multiple,oe=W.defaultActiveFirstOption,se=W.height,te=W.itemHeight,be=W.notFoundContent,q=W.open,ae=W.menuItemSelectedIcon,xe=W.virtual,ne=W.onSelect,Q=W.onToggleOpen,X=W.onActiveValue,$=W.onScroll,pe=W.onMouseEnter,de="".concat(ee,"-item"),Ce=Object(r.a)(function(){return he},[q,he],function(Xe,Pe){return Pe[0]&&Xe[1]!==Pe[1]}),ze=f.useRef(null),qe=function(Pe){Pe.preventDefault()},Ye=function(Pe){ze.current&&ze.current.scrollTo({index:Pe})},Ve=function(Pe){for(var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ae=Ce.length,ce=0;ce<Ae;ce+=1){var Ee=(Pe+ce*Te+Ae)%Ae,_e=Ce[Ee],De=_e.group,je=_e.data;if(!De&&!je.disabled)return Ee}return-1},et=f.useState(function(){return Ve(0)}),rt=Object(l.a)(et,2),Me=rt[0],Se=rt[1],Ge=function(Pe){Se(Pe);var Te=Ce[Pe];if(!Te){X(null,-1);return}X(Te.data.value,Pe)};f.useEffect(function(){Ge(oe!==!1?Ve(0):-1)},[Ce.length,we]),f.useEffect(function(){var Xe=setTimeout(function(){if(!me&&q&&ie.size===1){var Pe=Array.from(ie)[0],Te=Ce.findIndex(function(Ae){var ce=Ae.data;return ce.value===Pe});Ge(Te),Ye(Te)}});return function(){return clearTimeout(Xe)}},[q]);var tt=function(Pe){Pe!==void 0&&ne(Pe,{selected:!ie.has(Pe)}),me||Q(!1)};if(f.useImperativeHandle(J,function(){return{onKeyDown:function(Pe){var Te=Pe.which;switch(Te){case i.a.UP:case i.a.DOWN:{var Ae=0;if(Te===i.a.UP?Ae=-1:Te===i.a.DOWN&&(Ae=1),Ae!==0){var ce=Ve(Me+Ae,Ae);Ye(ce),Ge(ce)}break}case i.a.ENTER:{var Ee=Ce[Me];Ee&&!Ee.data.disabled?tt(Ee.data.value):tt(void 0),q&&Pe.preventDefault();break}case i.a.ESC:Q(!1)}},onKeyUp:function(){},scrollTo:function(Pe){Ye(Pe)}}}),Ce.length===0)return f.createElement("div",{role:"listbox",id:"".concat(Z,"_list"),className:"".concat(de,"-empty"),onMouseDown:qe},be);function Ue(Xe){var Pe=Ce[Xe];if(!Pe)return null;var Te=Pe.data||{},Ae=Te.value,ce=Te.label,Ee=Te.children,_e=Object(a.a)(Te,!0),De=ge?Ee:ce;return Pe?f.createElement("div",Object.assign({"aria-label":typeof De=="string"?De:null},_e,{key:Xe,role:"option",id:"".concat(Z,"_list_").concat(Xe),"aria-selected":ie.has(Ae)}),Ae):null}return f.createElement(f.Fragment,null,f.createElement("div",{role:"listbox",id:"".concat(Z,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ue(Me-1),Ue(Me),Ue(Me+1)),f.createElement(m.a,{itemKey:"key",ref:ze,data:Ce,height:se,itemHeight:te,fullHeight:!1,onMouseDown:qe,onScroll:$,virtual:xe,onMouseEnter:pe},function(Xe,Pe){var Te,Ae=Xe.group,ce=Xe.groupOption,Ee=Xe.data,_e=Ee.label,De=Ee.key;if(Ae)return f.createElement("div",{className:p()(de,"".concat(de,"-group"))},_e!==void 0?_e:De);var je=Ee.disabled,$e=Ee.value,at=Ee.title,it=Ee.children,st=Ee.style,Je=Ee.className,gt=Object(w.a)(Ee,["disabled","value","title","children","style","className"]),yt=ie.has($e),ct="".concat(de,"-option"),Lt=p()(de,ct,Je,(Te={},Object(s.a)(Te,"".concat(ct,"-grouped"),ce),Object(s.a)(Te,"".concat(ct,"-active"),Me===Pe&&!je),Object(s.a)(Te,"".concat(ct,"-disabled"),je),Object(s.a)(Te,"".concat(ct,"-selected"),yt),Te)),kt=ge?it:_e,Ct=!ae||typeof ae=="function"||yt;return f.createElement("div",Object.assign({},gt,{"aria-selected":yt,className:Lt,title:at,onMouseMove:function(){if(Me===Pe||je)return;Ge(Pe)},onClick:function(){je||tt($e)},style:st}),f.createElement("div",{className:"".concat(ct,"-content")},kt||$e),f.isValidElement(ae)||yt,Ct&&f.createElement(b.a,{className:"".concat(de,"-option-state"),customizeIcon:ae,customizeIconProps:{isSelected:yt}},yt?"\u2713":null))}))},v=f.forwardRef(g);v.displayName="OptionList";var n=v,d=function(){return null};d.isSelectOption=!0;var h=d,C=function(){return null};C.isSelectOptGroup=!0;var T=C,o=k("VTBJ"),P=k("Zm9Q");function O(K){var W=K.key,J=K.props,ee=J.children,Z=J.value,he=Object(w.a)(J,["children","value"]);return Object(o.a)({key:W,value:Z!==void 0?Z:W,children:ee},he)}function y(K){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(P.a)(K).map(function(J,ee){if(!f.isValidElement(J)||!J.type)return null;var Z=J.type.isSelectOptGroup,he=J.key,ge=J.props,ie=ge.children,we=Object(w.a)(ge,["children"]);return W||!Z?O(J):Object(o.a)(Object(o.a)({key:"__RC_SELECT_GRP__".concat(he===null?ee:he,"__"),label:he},we),{},{options:y(ie)})}).filter(function(J){return J})}var x=k("2Qr1"),E=k("qNPg"),_=k("U8pU"),N=k("Kwbf"),j=k("WKfj");function M(K){var W=K.mode,J=K.options,ee=K.children,Z=K.backfill,he=K.allowClear,ge=K.placeholder,ie=K.getInputElement,we=K.showSearch,me=K.onSearch,oe=K.defaultOpen,se=K.autoFocus,te=K.labelInValue,be=K.value,q=K.inputValue,ae=K.optionLabelProp,xe=W==="multiple"||W==="tags",ne=we!==void 0?we:xe||W==="combobox",Q=J||y(ee);if(Object(N.a)(W!=="tags"||Q.every(function(de){return!de.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var X=Q.some(function(de){return de.options?de.options.some(function(Ce){return typeof("value"in Ce?Ce.value:Ce.key)=="number"}):typeof("value"in de?de.value:de.key)=="number"});Object(N.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(N.a)(W!=="combobox"||!ae,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(N.a)(W==="combobox"||!Z,"`backfill` only works with `combobox` mode."),Object(N.a)(W==="combobox"||!ie,"`getInputElement` only work with `combobox` mode."),Object(N.b)(W!=="combobox"||!ie||!he||!ge,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),me&&!ne&&W!=="combobox"&&W!=="tags"&&Object(N.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(N.b)(!oe||se,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),be!=null){var $=Object(j.d)(be);Object(N.a)(!te||$.every(function(de){return Object(_.a)(de)==="object"&&("key"in de||"value"in de)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(N.a)(!xe||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(ee){var pe=null;Object(P.a)(ee).some(function(de){if(!f.isValidElement(de)||!de.type)return!1;var Ce=de.type;if(Ce.isSelectOption)return!1;if(Ce.isSelectOptGroup){var ze=Object(P.a)(de.props.children).every(function(qe){return!f.isValidElement(qe)||!de.type||qe.type.isSelectOption?!0:(pe=qe.type,!1)});return!ze}return pe=Ce,!0}),pe&&Object(N.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(pe.displayName||pe.name||pe,"`.")),Object(N.a)(q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var H=M,z=Object(E.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:y,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:H,fillOptionsWithMissingValue:x.a}),F=function(K){Object(S.a)(J,K);var W=Object(R.a)(J);function J(){var ee;return Object(L.a)(this,J),ee=W.apply(this,arguments),ee.selectRef=f.createRef(),ee.focus=function(){ee.selectRef.current.focus()},ee.blur=function(){ee.selectRef.current.blur()},ee}return Object(c.a)(J,[{key:"render",value:function(){return f.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),J}(f.Component);F.Option=h,F.OptGroup=T;var G=F,B=Y.c=G},M8RZ:function(I,Y,k){"use strict";k.d(Y,"a",function(){return i});var L=k("fWQN"),c=k("mtLc"),S=k("yKVA"),R=k("879j"),f=k("cDcd"),s=k.n(f),w=k("faye"),l=k.n(w),i=function(a){Object(S.a)(u,a);var r=Object(R.a)(u);function u(p){var m;Object(L.a)(this,u),m=r.call(this,p);var b=window.document;return m.node=b.createElement("div"),b.body.appendChild(m.node),m}return Object(c.a)(u,[{key:"render",value:function(){var m=this.props.children;return Object(w.createPortal)(m,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),u}(s.a.Component)},MFOe:function(I,Y,k){(function(L){var c=s(),S=w(),R=l(),f=typeof window!="undefined"?window:L;I.exports={assign:c,create:S,trim:R,bind:i,slice:a,each:r,map:u,pluck:p,isList:m,isFunction:b,isObject:g,Global:f};function s(){return Object.assign?Object.assign:function(n,d,h,C){for(var T=1;T<arguments.length;T++)r(Object(arguments[T]),function(o,P){n[P]=o});return n}}function w(){if(Object.create)return function(d,h,C,T){var o=a(arguments,1);return c.apply(this,[Object.create(d)].concat(o))};{function v(){}return function(d,h,C,T){var o=a(arguments,1);return v.prototype=d,c.apply(this,[new v].concat(o))}}}function l(){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 i(v,n){return function(){return n.apply(v,Array.prototype.slice.call(arguments,0))}}function a(v,n){return Array.prototype.slice.call(v,n||0)}function r(v,n){p(v,function(d,h){return n(d,h),!1})}function u(v,n){var d=m(v)?[]:{};return p(v,function(h,C){return d[C]=n(h,C),!1}),d}function p(v,n){if(m(v)){for(var d=0;d<v.length;d++)if(n(v[d],d))return v[d]}else for(var h in v)if(v.hasOwnProperty(h)&&n(v[h],h))return v[h]}function m(v){return v!=null&&typeof v!="function"&&typeof v.length=="number"}function b(v){return v&&{}.toString.call(v)==="[object Function]"}function g(v){return v&&{}.toString.call(v)==="[object Object]"}}).call(this,k("IyRk"))},MlIO:function(I,Y,k){(function(L,c){I.exports=Y=c(k("Ib8C"))})(this,function(L){return function(c){var S=L,R=S.lib,f=R.Base,s=R.WordArray,w=S.x64={},l=w.Word=f.extend({init:function(a,r){this.high=a,this.low=r}}),i=w.WordArray=f.extend({init:function(a,r){a=this.words=a||[],r!=c?this.sigBytes=r:this.sigBytes=a.length*8},toX32:function(){for(var a=this.words,r=a.length,u=[],p=0;p<r;p++){var m=a[p];u.push(m.high),u.push(m.low)}return s.create(u,this.sigBytes)},clone:function(){for(var a=f.clone.call(this),r=a.words=this.words.slice(0),u=r.length,p=0;p<u;p++)r[p]=r[p].clone();return a}})}(),L})},NFKh:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("MlIO"),k("F+F2"),k("qM6L"),k("ETIr"),k("wbyO"),k("cv67"),k("3y9D"),k("lPiR"),k("GRuw"),k("1uat"),k("uGsb"),k("5hvy"),k("ELcG"),k("WYAk"),k("e7zE"),k("K3mO"),k("OLod"),k("ALsQ"),k("9OqN"),k("qu8F"),k("S6kV"),k("gb/T"),k("qBft"),k("oRuE"),k("jO9C"),k("KmYQ"),k("uGxW"),k("bQjk"),k("wZgz"),k("pA7S"),k("w7YG"),k("E4JC"),k("PVpz"))})(this,function(L){return L})},NvD2:function(I,Y,k){"use strict";k.d(Y,"a",function(){return s});var L=k("Kwbf");function c(w,l){var i=new Set;return w.forEach(function(a){l.has(a)||i.add(a)}),i}function S(w){var l=w||{},i=l.disabled,a=l.disableCheckbox,r=l.checkable;return!!(i||a)||r===!1}function R(w,l,i,a){for(var r=new Set(w),u=new Set,p=0;p<=i;p+=1){var m=l.get(p)||new Set;m.forEach(function(n){var d=n.key,h=n.node,C=n.children,T=C===void 0?[]:C;r.has(d)&&!a(h)&&T.filter(function(o){return!a(o.node)}).forEach(function(o){r.add(o.key)})})}for(var b=new Set,g=i;g>=0;g-=1){var v=l.get(g)||new Set;v.forEach(function(n){var d=n.parent,h=n.node;if(a(h)||!n.parent||b.has(n.parent.key))return;if(a(n.parent.node)){b.add(d.key);return}var C=!0,T=!1;(d.children||[]).filter(function(o){return!a(o.node)}).forEach(function(o){var P=o.key,O=r.has(P);C&&!O&&(C=!1),!T&&(O||u.has(P))&&(T=!0)}),C&&r.add(d.key),T&&u.add(d.key),b.add(d.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(c(u,r))}}function f(w,l,i,a,r){for(var u=new Set(w),p=new Set(l),m=0;m<=a;m+=1){var b=i.get(m)||new Set;b.forEach(function(d){var h=d.key,C=d.node,T=d.children,o=T===void 0?[]:T;!u.has(h)&&!p.has(h)&&!r(C)&&o.filter(function(P){return!r(P.node)}).forEach(function(P){u.delete(P.key)})})}p=new Set;for(var g=new Set,v=a;v>=0;v-=1){var n=i.get(v)||new Set;n.forEach(function(d){var h=d.parent,C=d.node;if(r(C)||!d.parent||g.has(d.parent.key))return;if(r(d.parent.node)){g.add(h.key);return}var T=!0,o=!1;(h.children||[]).filter(function(P){return!r(P.node)}).forEach(function(P){var O=P.key,y=u.has(O);T&&!y&&(T=!1),!o&&(y||p.has(O))&&(o=!0)}),T||u.delete(h.key),o&&p.add(h.key),g.add(h.key)})}return{checkedKeys:Array.from(u),halfCheckedKeys:Array.from(c(p,u))}}function s(w,l,i,a){var r=[],u;a?u=a:u=S;var p=new Set(w.filter(function(v){var n=!!i[v];return n||r.push(v),n})),m=new Map,b=0;Object.keys(i).forEach(function(v){var n=i[v],d=n.level,h=m.get(d);h||(h=new Set,m.set(d,h)),h.add(n),b=Math.max(b,d)}),Object(L.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(v){return"'".concat(v,"'")}).join(", ")));var g;return l===!0?g=R(p,m,b,u):g=f(p,l.halfCheckedKeys,m,b,u),g}},OLod:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("K3mO"))})(this,function(L){L.lib.Cipher||function(c){var S=L,R=S.lib,f=R.Base,s=R.WordArray,w=R.BufferedBlockAlgorithm,l=S.enc,i=l.Utf8,a=l.Base64,r=S.algo,u=r.EvpKDF,p=R.Cipher=w.extend({cfg:f.extend(),createEncryptor:function(E,_){return this.create(this._ENC_XFORM_MODE,E,_)},createDecryptor:function(E,_){return this.create(this._DEC_XFORM_MODE,E,_)},init:function(E,_,N){this.cfg=this.cfg.extend(N),this._xformMode=E,this._key=_,this.reset()},reset:function(){w.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function E(_){return typeof _=="string"?x:P}return function(_){return{encrypt:function(N,j,M){return E(j).encrypt(_,N,j,M)},decrypt:function(N,j,M){return E(j).decrypt(_,N,j,M)}}}}()}),m=R.StreamCipher=p.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),b=S.mode={},g=R.BlockCipherMode=f.extend({createEncryptor:function(E,_){return this.Encryptor.create(E,_)},createDecryptor:function(E,_){return this.Decryptor.create(E,_)},init:function(E,_){this._cipher=E,this._iv=_}}),v=b.CBC=function(){var E=g.extend();E.Encryptor=E.extend({processBlock:function(N,j){var M=this._cipher,H=M.blockSize;_.call(this,N,j,H),M.encryptBlock(N,j),this._prevBlock=N.slice(j,j+H)}}),E.Decryptor=E.extend({processBlock:function(N,j){var M=this._cipher,H=M.blockSize,z=N.slice(j,j+H);M.decryptBlock(N,j),_.call(this,N,j,H),this._prevBlock=z}});function _(N,j,M){var H,z=this._iv;z?(H=z,this._iv=c):H=this._prevBlock;for(var F=0;F<M;F++)N[j+F]^=H[F]}return E}(),n=S.pad={},d=n.Pkcs7={pad:function(E,_){for(var N=_*4,j=N-E.sigBytes%N,M=j<<24|j<<16|j<<8|j,H=[],z=0;z<j;z+=4)H.push(M);var F=s.create(H,j);E.concat(F)},unpad:function(E){var _=E.words[E.sigBytes-1>>>2]&255;E.sigBytes-=_}},h=R.BlockCipher=p.extend({cfg:p.cfg.extend({mode:v,padding:d}),reset:function(){var E;p.reset.call(this);var _=this.cfg,N=_.iv,j=_.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,N&&N.words):(this._mode=E.call(j,this,N&&N.words),this._mode.__creator=E)},_doProcessBlock:function(E,_){this._mode.processBlock(E,_)},_doFinalize:function(){var E,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),_.unpad(E)),E},blockSize:128/32}),C=R.CipherParams=f.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),T=S.format={},o=T.OpenSSL={stringify:function(E){var _,N=E.ciphertext,j=E.salt;return j?_=s.create([1398893684,1701076831]).concat(j).concat(N):_=N,_.toString(a)},parse:function(E){var _,N=a.parse(E),j=N.words;return j[0]==1398893684&&j[1]==1701076831&&(_=s.create(j.slice(2,4)),j.splice(0,4),N.sigBytes-=16),C.create({ciphertext:N,salt:_})}},P=R.SerializableCipher=f.extend({cfg:f.extend({format:o}),encrypt:function(E,_,N,j){j=this.cfg.extend(j);var M=E.createEncryptor(N,j),H=M.finalize(_),z=M.cfg;return C.create({ciphertext:H,key:N,iv:z.iv,algorithm:E,mode:z.mode,padding:z.padding,blockSize:E.blockSize,formatter:j.format})},decrypt:function(E,_,N,j){j=this.cfg.extend(j),_=this._parse(_,j.format);var M=E.createDecryptor(N,j).finalize(_.ciphertext);return M},_parse:function(E,_){return typeof E=="string"?_.parse(E,this):E}}),O=S.kdf={},y=O.OpenSSL={execute:function(E,_,N,j){j||(j=s.random(64/8));var M=u.create({keySize:_+N}).compute(E,j),H=s.create(M.words.slice(_),N*4);return M.sigBytes=_*4,C.create({key:M,iv:H,salt:j})}},x=R.PasswordBasedCipher=P.extend({cfg:P.cfg.extend({kdf:y}),encrypt:function(E,_,N,j){j=this.cfg.extend(j);var M=j.kdf.execute(N,E.keySize,E.ivSize);j.iv=M.iv;var H=P.encrypt.call(this,E,_,M.key,j);return H.mixIn(M),H},decrypt:function(E,_,N,j){j=this.cfg.extend(j),_=this._parse(_,j.format);var M=j.kdf.execute(N,E.keySize,E.ivSize,_.salt);j.iv=M.iv;var H=P.decrypt.call(this,E,_,M.key,j);return H}})}()})},OZM5:function(I,Y,k){"use strict";k.d(Y,"b",function(){return a}),k.d(Y,"a",function(){return r}),k.d(Y,"k",function(){return u}),k.d(Y,"h",function(){return p}),k.d(Y,"i",function(){return m}),k.d(Y,"g",function(){return b}),k.d(Y,"c",function(){return g}),k.d(Y,"d",function(){return v}),k.d(Y,"j",function(){return h}),k.d(Y,"e",function(){return C}),k.d(Y,"f",function(){return T});var L=k("KQm4"),c=k("U8pU"),S=k("Ff2n"),R=k("cDcd"),f=k.n(R),s=k("Kwbf"),w=k("WaYH"),l=.25,i=2;function a(o,P){var O=o.slice(),y=O.indexOf(P);return y>=0&&O.splice(y,1),O}function r(o,P){var O=o.slice();return O.indexOf(P)===-1&&O.push(P),O}function u(o){return o.split("-")}function p(o,P){return"".concat(o,"-").concat(P)}function m(o){return o&&o.type&&o.type.isTreeNode}function b(o,P){var O=[o],y=P[o];function x(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];E.forEach(function(_){var N=_.key,j=_.children;O.push(N),x(j)})}return x(y.children),O}function g(o,P){var O=o.clientY,y=P.selectHandle.getBoundingClientRect(),x=y.top,E=y.bottom,_=y.height,N=Math.max(_*l,i);return O<=x+N?-1:O>=E-N?1:0}function v(o,P){if(!o)return;var O=P.multiple;return O?o.slice():o.length?[o[0]]:o}var n=function(P){return P};function d(o,P){if(!o)return[];var O=P||{},y=O.processProps,x=y===void 0?n:y,E=Array.isArray(o)?o:[o];return E.map(function(_){var N=_.children,j=Object(S.a)(_,["children"]),M=d(N,P);return f.a.createElement(w.a,Object.assign({},x(j)),M)})}function h(o){if(!o)return null;var P;if(Array.isArray(o))P={checkedKeys:o,halfCheckedKeys:void 0};else if(Object(c.a)(o)==="object")P={checkedKeys:o.checked||void 0,halfCheckedKeys:o.halfChecked||void 0};else return Object(s.a)(!1,"`checkedKeys` is not an array or an object"),null;return P}function C(o,P){var O=new Set;function y(x){if(O.has(x))return;var E=P[x];if(!E)return;O.add(x);var _=E.parent,N=E.node;if(N.disabled)return;_&&y(_.key)}return(o||[]).forEach(function(x){y(x)}),Object(L.a)(O)}function T(o){var P={};return Object.keys(o).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(P[O]=o[O])}),P}},Ot1p:function(I,Y,k){"use strict";var L=k("2qtc"),c=k("kLXV"),S=k("rAM+"),R=k("miYZ"),f=k("tsqr"),s=k("9og8"),w=k("tJVT"),l=k("jrin"),i=k("WmNS"),a=k.n(i),r=k("cDcd"),u=k.n(r),p=k("VrN/"),m=k.n(p),b=k("bdgK"),g=k("p77/"),v=k("Bd2K"),n=k("ELLl"),d=k("19Vz"),h=k("lZu9"),C=k("+NIl"),T=k("kSUc"),o=k("9Bee"),P=function(Je){var gt=Je.value,yt=gt===void 0?"":gt,ct=Je.className,Lt=Je.showTextOnly,kt=Je.showLines,Ct=Je.style,Ft=Ct===void 0?{}:Ct,Et=Object(r.useMemo)(function(){return""},[yt]);return u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{dangerouslySetInnerHTML:{__html:Et}}))},O=k("Q9mQ"),y=k("diRs"),x=k("0Owb"),E=k("dejd"),_=k("C+DQ"),N=k("D1Df"),j=k.n(N),M=k("1vsH"),H=k("m3rI"),z=[{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 F(Je){var gt=Je.onActionCallback,yt=Je.title,ct=Je.icon,Lt=Je.actionName,kt=Je.className,Ct=kt===void 0?"":kt,Ft=Je.children;function Et(){gt(Lt)}return u.a.createElement("a",{title:yt,className:Ct,onClick:Et},u.a.createElement("i",{className:"md-iconfont ".concat(ct)}),Ft)}var G=function(Je){var gt=Je.watch,yt=Je.showNullButton,ct=Je.onActionCallback,Lt=Je.fullScreen,kt=Je.insertTemp,Ct=Je.hidetoolBar,Ft=Je.uuid,Et=Je.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(M.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(M.G)("_educoder_session"),"&key=").concat(Ft,"&api=").concat(encodeURIComponent(H.a.PROXY_SERVER)));var ir=[].concat(z,[{title:"".concat(gt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(gt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return u.a.createElement("ul",{className:"markdown-toolbar-container"},!Ct&&ir.map(function(Yt,It){return u.a.createElement("li",{key:It},Yt.actionName?u.a.createElement(F,Object(x.a)({},Yt,{onActionCallback:ct})):u.a.createElement("span",{className:"v-line"}))}),yt?u.a.createElement("li",null,u.a.createElement(F,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ct},u.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,kt&&u.a.createElement("li",null,u.a.createElement(F,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(kt),onActionCallback:ct},u.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),u.a.createElement("li",null,u.a.createElement(y.a,{title:"\u6253\u5F00\u624B\u673A\u626B\u4E00\u626B",content:u.a.createElement("div",null,u.a.createElement(j.a,{size:150,fgColor:"#000",value:"https://test2.educoder.net/upload.html?_educoder_session_login=".concat(Object(M.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(M.G)("_educoder_session"),"&key=").concat(Ft,"&api=").concat(encodeURIComponent(H.a.PROXY_SERVER))}))},u.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return Et(!0)}},"\u624B\u673A\u4E0A\u4F20\u6587\u4EF6"))),u.a.createElement("li",{className:"btn-full-screen"},u.a.createElement(F,{icon:"".concat(Lt?"icon-shrink":"icon-enlarge"),title:Lt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ct})))},B=k("M8RZ"),K=k("+L6B"),W=k("2/Rp"),J=k("y8nQ"),ee=k("Vl3Y"),Z=k("5NDa"),he=k("5rEg"),ge={labelCol:{span:4},wrapperCol:{span:20}},ie=function(Je){var gt=Je.callback,yt=Je.onCancel;function ct(Lt){gt(Lt)}return u.a.createElement(ee.a,Object(x.a)({},ge,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ct}),u.a.createElement(ee.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},u.a.createElement(he.a,null)),u.a.createElement(ee.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},u.a.createElement(he.a,null)),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(W.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))},we=k("7ahc"),me=k("k1fw"),oe=k("HmJG"),se=k("BjJ7"),te=ee.a.useForm,be={width:280,marginRight:10},q={labelCol:{span:5},wrapperCol:{span:19}},ae=function(Je){var gt=Je.callback,yt=Je.onCancel,ct=te(),Lt=Object(w.a)(ct,1),kt=Lt[0],Ct=useRef();function Ft(Yt){gt(Object(me.a)(Object(me.a)({},Yt),{},{name:Ct.current}))}function Et(Yt,It){if(Yt.status===-1){f.b.error(Yt.message);return}kt.setFieldsValue({src:"/api/attachments/".concat(Yt.id),type:It.type})}function ir(Yt){var It=Yt.target.files[0];Ct.current=It.name,ne(It,Et)}return u.a.createElement(ee.a,Object(x.a)({form:kt},q,{className:"upload-image-panel",onFinish:Ft}),u.a.createElement(ee.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},u.a.createElement("div",{className:"flex-container"},u.a.createElement(ee.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},u.a.createElement(he.a,{style:be})),u.a.createElement(xe,{onFileChange:ir}))),u.a.createElement(ee.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},u.a.createElement(he.a,{style:{width:264}})),u.a.createElement(ee.a.Item,{style:{textAlign:"right"}},u.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(W.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))};function xe(Je){var gt=Je.onFileChange;return u.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",u.a.createElement("input",{type:"file",onChange:gt}))}function ne(Je,gt){if(!Je)throw new String("\u6CA1\u6709\u6587\u4EF6");var yt=new FormData;yt.append("editormd-image-file",Je),yt.append("file_param_name","editormd-image-file"),yt.append("byxhr","true");var ct=new window.XMLHttpRequest;ct.withCredentials=!0,ct.addEventListener("load",function(Lt){gt(JSON.parse(Lt.target.responseText),Je)},!1),ct.addEventListener("error",function(Lt){console.error(Lt)},!1),ct.open("POST","".concat(se.a,"/api/attachments.json")),ct.send(yt)}var Q=k("giR+"),X=k("fyUT"),$=k("7Kak"),pe=k("9yH6"),de=pe.a.Group,Ce={margin:"0 8px"},ze=function(Je){var gt=Je.callback,yt=Je.onCancel;function ct(Lt){gt(Lt)}return u.a.createElement(ee.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ct},u.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},u.a.createElement("span",{style:Ce},"\u5355\u5143\u683C\u6570\uFF1A"),u.a.createElement("span",{style:Ce},"\u884C\u6570"),u.a.createElement(ee.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},u.a.createElement(X.a,null)),u.a.createElement("span",{style:Ce},"\u5217\u6570"),u.a.createElement(ee.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},u.a.createElement(X.a,null))),u.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},u.a.createElement("span",{style:Ce},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),u.a.createElement(ee.a.Item,{name:"align"},u.a.createElement(de,null,u.a.createElement(pe.a,{value:"default"},u.a.createElement("i",{className:"fa fa-align-justify"})),u.a.createElement(pe.a,{value:"left"},u.a.createElement("i",{className:"fa fa-align-left"})),u.a.createElement(pe.a,{value:"center"},u.a.createElement("i",{className:"fa fa-align-center"})),u.a.createElement(pe.a,{value:"right"},u.a.createElement("i",{className:"fa fa-align-right"}))))),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(W.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))},qe=k("ErOA"),Ye=k("7Cbv"),Ve="link",et="upload-image",rt="code-block",Me="add-table",Se="------------",Ge={default:Se,left:":".concat(Se),center:":".concat(Se,":"),right:"".concat(Se,":")},tt=k("9VGf"),Ue,Xe;function Pe(){}var Te=0,Ae=1e4,ce="\u2581",Ee=`
**\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 _e(Je){return/^\d+$/.test(Je)?"".concat(Je,"px"):Je}var De=navigator.platform.toUpperCase().indexOf("MAC")>=0,je=De?"Cmd":"Ctrl",$e=["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"],at=(Ue={},Object(l.a)(Ue,je+"-B","bold"),Object(l.a)(Ue,je+"-I","italic"),Ue),it=(Xe={},Object(l.a)(Xe,Ve,"\u6DFB\u52A0\u94FE\u63A5"),Object(l.a)(Xe,rt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(l.a)(Xe,et,"\u6DFB\u52A0\u6587\u4EF6"),Object(l.a)(Xe,Me,"\u6DFB\u52A0\u8868\u683C"),Xe),st=Y.a=function(Je){var gt=Je.defaultValue,yt=gt===void 0?"":gt,ct=Je.onChange,Lt=Je.width,kt=Lt===void 0?"100%":Lt,Ct=Je.height,Ft=Ct===void 0?400:Ct,Et=Je.miniToolbar,ir=Et===void 0?!1:Et,Yt=Je.isFocus,It=Yt===void 0?!1:Yt,Ht=Je.watch,Ur=Je.insertTemp,cn=Je.mode,gr=cn===void 0?"markdown":cn,zn=Je.id,vt=zn===void 0?"markdown-editor-id":zn,_t=Je.showResizeBar,mt=_t===void 0?!1:_t,mr=Je.noStorage,Cr=mr===void 0?!1:mr,Bt=Je.showNullButton,Rt=Bt===void 0?!1:Bt,Er=Je.hidetoolBar,yn=Er===void 0?!1:Er,Ir=Je.fullScreen,ut=Ir===void 0?!1:Ir,Mt=Je.onBlur,Wr=Je.onCMBeforeChange,tn=Je.onFullScreen,Sn=Je.className,bn=Sn===void 0?"":Sn,Hr=Je.disablePaste,Ot=Hr===void 0?!1:Hr,dn=Je.placeholder,Kr=dn===void 0?"":dn,Or=Je.values,sr=Or===void 0?"":Or,ta=Object(r.useState)(null),Ln=Object(w.a)(ta,2),ft=Ln[0],ca=Ln[1],ra=Object(r.useState)(yt),An=Object(w.a)(ra,2),Lr=An[0],Fn=An[1],En=Object(r.useState)(Ht),an=Object(w.a)(En,2),rr=an[0],$r=an[1],tr=Object(r.useState)(ut),Kt=Object(w.a)(tr,2),Zt=Kt[0],xr=Kt[1],Nr=Object(r.useState)(""),Jr=Object(w.a)(Nr,2),on=Jr[0],Ma=Jr[1],ei=Object(r.useState)(0),Ga=Object(w.a)(ei,2),na=Ga[0],sn=Ga[1],Xa=Object(r.useState)(Ft),zr=Object(w.a)(Xa,2),aa=zr[0],Pn=zr[1],fn=Object(r.useState)(!1),Cn=Object(w.a)(fn,2),Va=Cn[0],da=Cn[1],ia=Object(r.useRef)(Object(Ye.a)()),Fa=Object(r.useRef)(!1),Sa=Object(r.useRef)(),_n=Object(r.useRef)(),fa=Object(r.useRef)(),ha=Object(r.useRef)(),Gn=Object(r.useRef)(),ya=function(){var Dt=Object(s.a)(a.a.mark(function $t(){var Ut,lr;return a.a.wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:return Pr.next=2,Object(qe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ia.current}});case 2:lr=Pr.sent,lr!=null&&(Ut=lr.attachments)!==null&&Ut!==void 0&&Ut.length&&(console.log("cm:",ft,_n),lr.attachments.map(function(dr){dr.content_type.indexOf("image")>-1?ft.replaceSelection("![,](/api/attachments/".concat(dr.id,"?type=").concat(dr.content_type,")")):dr.content_type.indexOf("video")>-1?ft.replaceSelection('<video width="100%" controls src="'.concat(H.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):dr.content_type.indexOf("pdf")>-1?ft.replaceSelection('<a href="'.concat(H.a.API_SERVER,"/api/attachments/").concat(dr.id,"?type=").concat(dr.content_type,'&disposition=inline" target="_blank">').concat(dr.name,"</a>")):ft.replaceSelection("[".concat(dr.name,"](").concat(H.a.API_SERVER,"/api/attachments/").concat(dr.id,"?type=").concat(dr.content_type,")"))}));case 4:case"end":return Pr.stop()}},$t)}));return function(){return Dt.apply(this,arguments)}}();Object(r.useEffect)(function(){Fn(sr),ft==null||ft.setValue(sr)},[sr]),Object(r.useEffect)(function(){tn==null||tn(Zt)},[Zt]),Object(r.useEffect)(function(){if(_n.current){var Dt=m.a.fromTextArea(_n.current,{mode:gr,lineNumbers:!ir,lineWrapping:!0,value:yt,autoCloseTags:!0,autoCloseBrackets:!0});It&&Dt.focus();function $t(Ut,lr){if(Ot){lr.preventDefault();return}var yr=lr.clipboardData;if(yr){var Pr=yr.types.toString(),dr=yr.items;if(Pr==="Files"||yr.types.indexOf("Files")>-1){if(lr.preventDefault(),gr=="stex")return;try{var Gr,hn=dr[1];((Gr=dr[0])===null||Gr===void 0?void 0:Gr.kind)==="file"&&(hn=dr[0]);var fr=hn.getAsFile(),pa=fr.name.split(".").pop();ne(fr,function(Nt){if(Nt.id){var qt,Jt,Qr;(fr==null||((qt=fr.type)===null||qt===void 0)?void 0:qt.indexOf("image"))>-1?Dt.replaceSelection("![,](/api/attachments/".concat(Nt.id,"?type=").concat(Nt.content_type,")")):(fr==null||((Jt=fr.type)===null||Jt===void 0)?void 0:Jt.indexOf("video"))>-1?Dt.replaceSelection('<video width="100%" controls src="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Nt.id,'"></video>')):(fr==null||((Qr=fr.type)===null||Qr===void 0)?void 0:Qr.indexOf("pdf"))>-1?Dt.replaceSelection('<a href="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(fr.type,'&disposition=inline" target="_blank">').concat(fr.name,"</a>")):$e.includes(pa)?Dt.replaceSelection('<a href="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Nt.id,'?type=office&disposition=inline" target="_blank">').concat(fr.name,"</a>")):Dt.replaceSelection("[".concat(fr.name,"](").concat(H.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Nt.content_type,")"))}else(Nt==null?void 0:Nt.status)===401&&(document.location.href="/user/login")})}catch(Nt){f.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Dt.on("paste",$t),Dt.on("dragleave",function(Ut,lr){fa.current.classList.remove("mouse-hover-md")}),Dt.on("dragover",function(Ut,lr){fa.current.classList.add("mouse-hover-md")}),Dt.on("drop",function(Ut,lr){fa.current.classList.add("mouse-hover-md");var yr;if(yr=lr.dataTransfer.files,yr.length>0){lr.preventDefault(),lr.stopPropagation();for(var Pr=function(hn){var fr=yr[hn],pa=fr.name.split(".").pop();ne(fr,function(Nt){if(Nt.id){var qt,Jt,Qr;(fr==null||((qt=fr.type)===null||qt===void 0)?void 0:qt.indexOf("image"))>-1?Dt.replaceSelection("![,](/api/attachments/".concat(Nt.id,"?type=").concat(Nt.content_type,")")):(fr==null||((Jt=fr.type)===null||Jt===void 0)?void 0:Jt.indexOf("video"))>-1?Dt.replaceSelection('<video width="100%" controls src="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Nt.id,'"></video>')):(fr==null||((Qr=fr.type)===null||Qr===void 0)?void 0:Qr.indexOf("pdf"))>-1?Dt.replaceSelection('<a href="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(fr.type,'&disposition=inline" target="_blank">').concat(fr.name,"</a>")):$e.includes(pa)?Dt.replaceSelection('<a href="'.concat(H.a.API_SERVER,"/api/attachments/").concat(Nt.id,'?type=office&disposition=inline" target="_blank">').concat(fr.name,"</a>")):Dt.replaceSelection("[".concat(fr.name,"](").concat(H.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Nt.content_type,")"))}else(Nt==null?void 0:Nt.status)===401&&(document.location.href="/user/login")})},dr=0;dr<yr.length;dr++)Pr(dr)}}),ca(Dt),function(){Dt.off("paste",$t)}}},[]);var Bn=Object(r.useCallback)(function(){if(fa.current)try{}catch(Dt){console.log(Dt,"---- to set md editor body height")}},[aa,fa,Zt]);Object(r.useEffect)(function(){function Dt(){var Ut=new b.default(function(lr){var yr=Object(S.a)(lr),Pr;try{for(yr.s();!(Pr=yr.n()).done;){var dr=Pr.value;(dr.target.offsetHeight>0||dr.target.offsetWidth>0)&&(Bn(),ft.setSize("100%","100%"),ft.refresh())}}catch(Gr){yr.e(Gr)}finally{yr.f()}});return Ut.observe(_n.current.parentElement),Ut}if(ft){var $t=Dt();return function(){$t.unobserve(_n.current.parentElement)}}},[ft,Bn]),Object(r.useEffect)(function(){if(ft){for(var Dt=[],$t=function(){var dr=lr[Ut];yr=Object(w.a)(dr,2);var Gr=yr[0],hn=yr[1],fr=Object(l.a)({},Gr,function(){Ca(hn)});Dt.push(fr),ft.addKeyMap(fr)},Ut=0,lr=Object.entries(at);Ut<lr.length;Ut++){var yr;$t()}return Sa.current=setInterval(function(){Fa.current&&ya()},4e3),function(){clearInterval(Sa.current);var Pr=Object(S.a)(Dt),dr;try{for(Pr.s();!(dr=Pr.n()).done;){var Gr=dr.value;ft.removeKeyMap(Gr)}}catch(hn){Pr.e(hn)}finally{Pr.f()}}}},[ft]),Object(r.useEffect)(function(){ut!==Zt&&xr(ut)},[ut]),Object(tt.a)(function(){if(!Cr&&na>0){var Dt=new Date().getTime(),$t=window.sessionStorage.getItem(vt);Dt>=na+Ae&&(!$t||$t!==Lr)&&(window.sessionStorage.setItem(vt,Lr),da(!0))}},Ae),Object(r.useEffect)(function(){$r(Ht)},[ft,Ht]),Object(r.useEffect)(function(){ft&&(It&&ft.focus())},[ft,It]),Object(r.useEffect)(function(){if(rr&&ft){var Dt=ft.getScrollerElement();function $t(Ut){var lr=Ut.target;if(Gn.current){var yr=lr.scrollTop/lr.scrollHeight;Gn.current.scrollTop=Gn.current.scrollHeight*yr}}return Dt.addEventListener("scroll",$t),function(){Dt.removeEventListener("scroll",$t)}}},[ft,rr]),Object(r.useEffect)(function(){if(ft&&Wr){function Dt($t,Ut){Wr($t,Ut)}return ft.on("beforeChange",Dt),function(){ft.off("beforeChange",Dt)}}},[ft,Wr]),Object(r.useEffect)(function(){if(ft&&Mt){function Dt(){Mt(ft.getValue())}return ft.on("blur",Dt),function(){ft.off("blur",Dt)}}},[ft,Mt]),Object(r.useEffect)(function(){if(ft){function Dt($t){var Ut=$t.getValue();Fn(Ut),sn(new Date().getTime()),$t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ct&&ct(Ut)}return ft.on("change",Dt),function(){ft.off("change",Dt)}}},[ft,ct]),Object(r.useEffect)(function(){ft&&(yt==null?(ft.setValue(""),Fn("")):yt!==ft.getValue()&&(ft.setValue(yt),Fn(yt),ft.setCursor(ft.lineCount(),0)))},[ft,yt]);var Ca=Object(r.useCallback)(function(Dt){var $t=ft.getCursor(),Ut=ft.getSelection(),lr=Ut.split(`
`);switch(Dt){case"bold":return ft.replaceSelection("**"+Ut+"**"),Ut===""&&ft.setCursor($t.line,$t.ch+2),ft.focus();case"italic":return ft.replaceSelection("*"+Ut+"*"),Ut===""&&ft.setCursor($t.line,$t.ch+1),ft.focus();case"code":return ft.replaceSelection("`"+Ut+"`"),Ut===""&&ft.setCursor($t.line,$t.ch+1),ft.focus();case"inline-latex":return ft.replaceSelection("`$$"+Ut+"$$`"),Ut===""&&ft.setCursor($t.line,$t.ch+3),ft.focus();case"latex":return ft.replaceSelection("```latex\n"+Ut+"\n```"),ft.setCursor($t.line+1,Ut.length+1),ft.focus();case"line-break":return ft.replaceSelection(`<br/>
`),ft.focus();case"list-ul":return Ut===""?ft.replaceSelection("- "+Ut):ft.replaceSelection(lr.map(function(yr){return yr===""?"":"- ".concat(yr)}).join(`
`)),ft.focus();case"list-ol":return Ut===""?ft.replaceSelection("1. "+Ut):ft.replaceSelection(lr.map(function(yr,Pr){return yr===""?"":"".concat(Pr+1,". ").concat(yr)}).join(`
`)),ft.focus();case"add-null-ch":return Ut===""&&ft.setCursor($t.line,$t.ch+1),ft.replaceSelection(ce),ft.focus();case"inster-template-1":return Ut===""&&ft.setCursor($t.line,$t.ch),ft.replaceSelection(Ee),ft.focus();case"eraser":return ft.setValue(""),ft.focus();case"trigger-watch":return $r(!rr),ft.focus();case"trigger-full-screen":return xr(!Zt),ft.focus();case Ve:Ma(Ve);return;case rt:Ma(rt);return;case et:Ma(et);return;case Me:Ma(Me);return;default:throw new Error}},[ft,rr,Zt]),kn=Object(r.useCallback)(function(Dt){Ma("");switch(on){case Ve:var $t=Dt.title,Ut=Dt.link;return ft.replaceSelection("[".concat($t,"](").concat(Ut,")")),ft.focus();case rt:var lr=Dt.language,yr=Dt.content;return ft.replaceSelection(["```"+lr,yr,"```"].join(`
`)),ft.focus();case et:var Pr=Dt.src,dr=Dt.alt;return dr?ft.replaceSelection("![ ".concat(dr," ]( ").concat(Pr,' "').concat(dr,'" )')):ft.replaceSelection("![,](".concat(Pr,")")),ft.focus();case Me:for(var Gr=Dt.row,hn=Dt.col,fr=Dt.align,pa=`
`,Nt=0;Nt<Gr;Nt++){for(var qt=[],Jt=[],Qr=0;Qr<hn;Qr++)Nt===1&&Jt.push(Ge[fr]),qt.push(" ");Nt===1&&(pa+="| ".concat(Jt.join(" | "),` |
`)),pa+="| ".concat(qt.join(hn===1?"":" | "),` |
`)}return ft.replaceSelection(pa+`
`),ft.focus();default:throw new Error}},[ft,on]),oa=Object(r.useMemo)(function(){switch(on){case Ve:return u.a.createElement(ie,{callback:kn,onCancel:sa});case rt:return u.a.createElement(we.b,{callback:kn,onCancel:sa});case et:return u.a.createElement(ae,{callback:kn,onCancel:sa});case Me:return u.a.createElement(ze,{callback:kn,onCancel:sa});default:return null}},[on]);function sa(){Ma("")}Object(r.useEffect)(function(){if(ha.current){var Dt=ha.current,$t=!1,Ut=0;function lr(dr){$t=!0,Ut=dr.pageY}function yr(){$t=!1}function Pr(dr){if($t){var Gr=dr.pageY-Ut;Gr<0&&(Gr=0),Gr>300&&(Gr=300);var hn=Ft+Gr+"px";Pn(hn)}}return Dt.addEventListener("mousedown",lr),document.addEventListener("mousemove",Pr),document.addEventListener("mouseup",yr),function(){Dt.removeEventListener("mousedown",lr),document.removeEventListener("mousemove",Pr),document.removeEventListener("mouseup",yr)}}},[ft,ha]),Object(r.useEffect)(function(){Pn(Ft)},[Ft]);var Xn=_e(kt),Dr=_e(aa),Ya={width:Xn,height:Dr},ti=Object(r.useMemo)(function(){if(na){var Dt=new Date(na),$t=Dt.getHours(),Ut=Dt.getMinutes(),lr=Dt.getSeconds();return $t=$t<10?"0"+$t:$t,Ut=Ut<10?"0"+Ut:Ut,lr=lr<10?"0"+lr:lr,"".concat($t,":").concat(Ut,":").concat(lr)}return 0},[na]);function La(){window.sessionStorage.removeItem(vt),da(!1),sn(0)}function $a(){da(!1),sn(0),ft.setValue(window.sessionStorage.getItem(vt))}function Ba(Dt,$t){var Ut=ft.getValue();Ut=Ut.replace(Dt,$t),Fn(Ut),ft==null||ft.setValue(Ut)}return u.a.createElement(r.Fragment,null,u.a.createElement("div",{className:"markdown-editor-wrapper",ref:fa},u.a.createElement("div",{className:"markdown-editor-container ".concat(bn," ").concat(rr?"on-preview":""," ").concat(ir?"mini":""," ").concat(Zt?"full-screen":""),style:Ya},u.a.createElement(G,{insertTemp:Ur,watch:rr,fullScreen:Zt,showNullButton:Rt,onActionCallback:Ca,hidetoolBar:yn,uuid:ia.current,setOpenPhones:function(){Fa.current=!0}}),u.a.createElement("div",{className:"markdown-editor-body"},u.a.createElement("div",{className:"codemirror-container"},u.a.createElement("textarea",{ref:_n,placeholder:Kr})),rr?u.a.createElement("div",{ref:Gn,className:"preview-container"},gr==="stex"&&u.a.createElement(P,{value:Lr}),gr!=="stex"&&u.a.createElement(o.a,{edit:!0,value:Lr,replaces:Ba})):null))),mt?u.a.createElement("a",{ref:ha,className:"editor-resize"}):null,u.a.createElement(B.a,null,it[on]?u.a.createElement(c.a,{centered:!0,title:it[on],visible:!0,onCancel:sa,footer:null,className:"markdown-popup-form"},oa):null))}},PD8m:function(I,Y){I.exports={name:"memoryStorage",read:L,write:c,each:S,remove:R,clearAll:f};var k={};function L(s){return k[s]}function c(s,w){k[s]=w}function S(s){for(var w in k)k.hasOwnProperty(w)&&s(k[w],w)}function R(s){delete k[s]}function f(s){k={}}},PVpz:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.StreamCipher,f=c.algo,s=[],w=[],l=[],i=f.RabbitLegacy=R.extend({_doReset:function(){var r=this._key.words,u=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],m=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var b=0;b<4;b++)a.call(this);for(var b=0;b<8;b++)m[b]^=p[b+4&7];if(u){var g=u.words,v=g[0],n=g[1],d=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,h=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,C=d>>>16|h&4294901760,T=h<<16|d&65535;m[0]^=d,m[1]^=C,m[2]^=h,m[3]^=T,m[4]^=d,m[5]^=C,m[6]^=h,m[7]^=T;for(var b=0;b<4;b++)a.call(this)}},_doProcessBlock:function(r,u){var p=this._X;a.call(this),s[0]=p[0]^p[5]>>>16^p[3]<<16,s[1]=p[2]^p[7]>>>16^p[5]<<16,s[2]=p[4]^p[1]>>>16^p[7]<<16,s[3]=p[6]^p[3]>>>16^p[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,r[u+m]^=s[m]},blockSize:128/32,ivSize:64/32});function a(){for(var r=this._X,u=this._C,p=0;p<8;p++)w[p]=u[p];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<w[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<w[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<w[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<w[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<w[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<w[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<w[6]>>>0?1:0)|0,this._b=u[7]>>>0<w[7]>>>0?1:0;for(var p=0;p<8;p++){var m=r[p]+u[p],b=m&65535,g=m>>>16,v=((b*b>>>17)+b*g>>>15)+g*g,n=((m&4294901760)*m|0)+((m&65535)*m|0);l[p]=v^n}r[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,r[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,r[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,r[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,r[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,r[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,r[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,r[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}c.RabbitLegacy=R._createHelper(i)}(),L.RabbitLegacy})},RELg:function(I,Y,k){var L=k("MFOe"),c=L.Global;I.exports={name:"oldIE-userDataStorage",write:w,read:l,each:i,remove:a,clearAll:r};var S="storejs",R=c.document,f=m(),s=(c.navigator?c.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function w(b,g){if(s)return;var v=p(b);f(function(n){n.setAttribute(v,g),n.save(S)})}function l(b){if(s)return;var g=p(b),v=null;return f(function(n){v=n.getAttribute(g)}),v}function i(b){f(function(g){for(var v=g.XMLDocument.documentElement.attributes,n=v.length-1;n>=0;n--){var d=v[n];b(g.getAttribute(d.name),d.name)}})}function a(b){var g=p(b);f(function(v){v.removeAttribute(g),v.save(S)})}function r(){f(function(b){var g=b.XMLDocument.documentElement.attributes;b.load(S);for(var v=g.length-1;v>=0;v--)b.removeAttribute(g[v].name);b.save(S)})}var u=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function p(b){return b.replace(/^\d/,"___$&").replace(u,"___")}function m(){if(!R||!R.documentElement||!R.documentElement.addBehavior)return null;var b="script",g,v,n;try{v=new ActiveXObject("htmlfile"),v.open(),v.write("<"+b+">document.w=window</"+b+'><iframe src="/favicon.ico"></iframe>'),v.close(),g=v.w.frames[0].document,n=g.createElement("div")}catch(d){n=R.createElement("div"),g=R.body}return function(d){var h=[].slice.call(arguments,0);h.unshift(n),g.appendChild(n),n.addBehavior("#default#userData"),n.load(S),d.apply(this,h),g.removeChild(n);return}}},S6kV:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.OFB=function(){var c=L.lib.BlockCipherMode.extend(),S=c.Encryptor=c.extend({processBlock:function(R,f){var s=this._cipher,w=s.blockSize,l=this._iv,i=this._keystream;l&&(i=this._keystream=l.slice(0),this._iv=void 0),s.encryptBlock(i,0);for(var a=0;a<w;a++)R[f+a]^=i[a]}});return c.Decryptor=S,c}(),L.mode.OFB})},"SA+Z":function(I,Y,k){var L=k("wTVA"),c=k("EbDI"),S=k("ZhPi"),R=k("wkBT");function f(s){return L(s)||c(s)||S(s)||R()}I.exports=f,I.exports.__esModule=!0,I.exports.default=I.exports},SJMd:function(I,Y){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var k,L,c,S=!1,R,f;window.PR_SHOULD_USE_CONTINUATION=!0;var s,w;(function(){var l=window,i=["break,continue,do,else,for,if,return,while"],a=[i,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],r=[a,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],u=[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"],m=[r,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],b="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",g=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],v="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[i,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],d=[i,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],h=[i,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],C=[u,m,p,g,v,n,d,h],T=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,o="str",P="kwd",O="com",y="typ",x="lit",E="pun",_="pln",N="tag",j="dec",M="src",H="atn",z="atv",F="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(ne){for(var Q=0,X=!1,$=!1,pe=0,de=ne.length;pe<de;++pe){var Ce=ne[pe];if(Ce.ignoreCase)$=!0;else if(/[a-z]/i.test(Ce.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,$=!1;break}}var ze={b:8,t:9,n:10,v:11,f:12,r:13};function qe(Me){var Se=Me.charCodeAt(0);if(Se!==92)return Se;var Ge=Me.charAt(1);return Se=ze[Ge],Se||("0"<=Ge&&Ge<="7"?parseInt(Me.substring(1),8):Ge==="u"||Ge==="x"?parseInt(Me.substring(2),16):Me.charCodeAt(1))}function Ye(Me){if(Me<32)return(Me<16?"\\x0":"\\x")+Me.toString(16);var Se=String.fromCharCode(Me);return Se==="\\"||Se==="-"||Se==="]"||Se==="^"?"\\"+Se:Se}function Ve(Me){var Se=Me.substring(1,Me.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Ge=[],tt=Se[0]==="^",Ue=["["];tt&&Ue.push("^");for(var Xe=tt?1:0,Pe=Se.length;Xe<Pe;++Xe){var Te=Se[Xe];if(/\\[bdsw]/i.test(Te))Ue.push(Te);else{var Ae=qe(Te),ce;Xe+2<Pe&&Se[Xe+1]==="-"?(ce=qe(Se[Xe+2]),Xe+=2):ce=Ae,Ge.push([Ae,ce]),ce<65||Ae>122||(ce<65||Ae>90||Ge.push([Math.max(65,Ae)|32,Math.min(ce,90)|32]),ce<97||Ae>122||Ge.push([Math.max(97,Ae)&~32,Math.min(ce,122)&~32]))}}Ge.sort(function(je,$e){return je[0]-$e[0]||$e[1]-je[1]});for(var Ee=[],_e=[],Xe=0;Xe<Ge.length;++Xe){var De=Ge[Xe];De[0]<=_e[1]+1?_e[1]=Math.max(_e[1],De[1]):Ee.push(_e=De)}for(var Xe=0;Xe<Ee.length;++Xe){var De=Ee[Xe];Ue.push(Ye(De[0])),De[1]>De[0]&&(De[1]+1>De[0]&&Ue.push("-"),Ue.push(Ye(De[1])))}return Ue.push("]"),Ue.join("")}function et(Me){for(var Se=Me.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Ge=Se.length,tt=[],Ue=0,Xe=0;Ue<Ge;++Ue){var Pe=Se[Ue];if(Pe==="(")++Xe;else if(Pe.charAt(0)==="\\"){var Te=+Pe.substring(1);Te&&(Te<=Xe?tt[Te]=-1:Se[Ue]=Ye(Te))}}for(var Ue=1;Ue<tt.length;++Ue)tt[Ue]===-1&&(tt[Ue]=++Q);for(var Ue=0,Xe=0;Ue<Ge;++Ue){var Pe=Se[Ue];if(Pe==="(")++Xe,tt[Xe]||(Se[Ue]="(?:");else if(Pe.charAt(0)==="\\"){var Te=+Pe.substring(1);Te&&Te<=Xe&&(Se[Ue]="\\"+tt[Te])}}for(var Ue=0;Ue<Ge;++Ue)Se[Ue]==="^"&&Se[Ue+1]!=="^"&&(Se[Ue]="");if(Me.ignoreCase&&X)for(var Ue=0;Ue<Ge;++Ue){var Pe=Se[Ue],Ae=Pe.charAt(0);Pe.length>=2&&Ae==="["?Se[Ue]=Ve(Pe):Ae!=="\\"&&(Se[Ue]=Pe.replace(/[a-zA-Z]/g,function(_e){var De=_e.charCodeAt(0);return"["+String.fromCharCode(De&~32,De|32)+"]"}))}return Se.join("")}for(var rt=[],pe=0,de=ne.length;pe<de;++pe){var Ce=ne[pe];if(Ce.global||Ce.multiline)throw new Error(""+Ce);rt.push("(?:"+et(Ce)+")")}return new RegExp(rt.join("|"),$?"gi":"g")}function K(ne,Q){var X=/(?:^|\s)nocode(?:\s|$)/,$=[],pe=0,de=[],Ce=0;function ze(qe){var Ye=qe.nodeType;if(Ye==1){if(X.test(qe.className))return;for(var Ve=qe.firstChild;Ve;Ve=Ve.nextSibling)ze(Ve);var et=qe.nodeName.toLowerCase();(et==="br"||et==="li")&&($[Ce]=`
`,de[Ce<<1]=pe++,de[Ce++<<1|1]=qe)}else if(Ye==3||Ye==4){var rt=qe.nodeValue;rt.length&&(Q?rt=rt.replace(/\r\n?/g,`
`):rt=rt.replace(/[ \t\r\n]+/g," "),$[Ce]=rt,de[Ce<<1]=pe,pe+=rt.length,de[Ce++<<1|1]=qe)}}return ze(ne),{sourceCode:$.join("").replace(/\n$/,""),spans:de}}function W(ne,Q,X,$,pe){if(!X)return;var de={sourceNode:ne,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:Q,decorations:null};$(de),pe.push.apply(pe,de.decorations)}var J=/\S/;function ee(ne){for(var Q=void 0,X=ne.firstChild;X;X=X.nextSibling){var $=X.nodeType;Q=$===1?Q?ne:X:$===3&&J.test(X.nodeValue)?ne:Q}return Q===ne?void 0:Q}function Z(ne,Q){var X={},$;(function(){for(var Ce=ne.concat(Q),ze=[],qe={},Ye=0,Ve=Ce.length;Ye<Ve;++Ye){var et=Ce[Ye],rt=et[3];if(rt)for(var Me=rt.length;--Me>=0;)X[rt.charAt(Me)]=et;var Se=et[1],Ge=""+Se;qe.hasOwnProperty(Ge)||(ze.push(Se),qe[Ge]=null)}ze.push(/[\0-\uffff]/),$=B(ze)})();var pe=Q.length,de=function(Ce){for(var ze=Ce.sourceCode,qe=Ce.basePos,Ye=Ce.sourceNode,Ve=[qe,_],et=0,rt=ze.match($)||[],Me={},Se=0,Ge=rt.length;Se<Ge;++Se){var tt=rt[Se],Ue=Me[tt],Xe=void 0,Pe;if(typeof Ue=="string")Pe=!1;else{var Te=X[tt.charAt(0)];if(Te)Xe=tt.match(Te[1]),Ue=Te[0];else{for(var Ae=0;Ae<pe;++Ae)if(Te=Q[Ae],Xe=tt.match(Te[1]),Xe){Ue=Te[0];break}Xe||(Ue=_)}Pe=Ue.length>=5&&Ue.substring(0,5)==="lang-",Pe&&!(Xe&&typeof Xe[1]=="string")&&(Pe=!1,Ue=M),Pe||(Me[tt]=Ue)}var ce=et;if(et+=tt.length,!Pe)Ve.push(qe+ce,Ue);else{var Ee=Xe[1],_e=tt.indexOf(Ee),De=_e+Ee.length;Xe[2]&&(De=tt.length-Xe[2].length,_e=De-Ee.length);var je=Ue.substring(5);W(Ye,qe+ce,tt.substring(0,_e),de,Ve),W(Ye,qe+ce+_e,Ee,se(je,Ee),Ve),W(Ye,qe+ce+De,tt.substring(De),de,Ve)}}Ce.decorations=Ve};return de}function he(ne){var Q=[],X=[];ne.tripleQuotedStrings?Q.push([o,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ne.multiLineStrings?Q.push([o,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Q.push([o,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ne.verbatimStrings&&X.push([o,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=ne.hashComments;$&&(ne.cStyleComments?($>1?Q.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Q.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([o,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Q.push([O,/^#[^\r\n]*/,null,"#"])),ne.cStyleComments&&(X.push([O,/^\/\/[^\r\n]*/,null]),X.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var pe=ne.regexLiterals;if(pe){var de=pe>1?"":`
\r`,Ce=de?".":"[\\S\\s]",ze="/(?=[^/*"+de+"])(?:[^/\\x5B\\x5C"+de+"]|\\x5C"+Ce+"|\\x5B(?:[^\\x5C\\x5D"+de+"]|\\x5C"+Ce+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+G+"("+ze+")")])}var qe=ne.types;qe&&X.push([y,qe]);var Ye=(""+ne.keywords).replace(/^ | $/g,"");Ye.length&&X.push([P,new RegExp("^(?:"+Ye.replace(/[\s,]+/g,"|")+")\\b"),null]),Q.push([_,/^\s+/,null,` \r
\xA0`]);var Ve="^.[^\\s\\w.$@'\"`/\\\\]*";return ne.regexLiterals&&(Ve+="(?!s*/)"),X.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[y,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[_,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[_,/^\\[\s\S]?/,null],[E,new RegExp(Ve),null]),Z(Q,X)}var ge=he({keywords:C,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ie(ne,Q,X){for(var $=/(?:^|\s)nocode(?:\s|$)/,pe=/\r\n?|\n/,de=ne.ownerDocument,Ce=de.createElement("li");ne.firstChild;)Ce.appendChild(ne.firstChild);var ze=[Ce];function qe(Se){var Ge=Se.nodeType;if(Ge==1&&!$.test(Se.className))if(Se.nodeName==="br")Ye(Se),Se.parentNode&&Se.parentNode.removeChild(Se);else for(var tt=Se.firstChild;tt;tt=tt.nextSibling)qe(tt);else if((Ge==3||Ge==4)&&X){var Ue=Se.nodeValue,Xe=Ue.match(pe);if(Xe){var Pe=Ue.substring(0,Xe.index);Se.nodeValue=Pe;var Te=Ue.substring(Xe.index+Xe[0].length);if(Te){var Ae=Se.parentNode;Ae.insertBefore(de.createTextNode(Te),Se.nextSibling)}Ye(Se),Pe||Se.parentNode.removeChild(Se)}}}function Ye(Se){for(;!Se.nextSibling;)if(Se=Se.parentNode,!Se)return;function Ge(Xe,Pe){var Te=Pe?Xe.cloneNode(!1):Xe,Ae=Xe.parentNode;if(Ae){var ce=Ge(Ae,1),Ee=Xe.nextSibling;ce.appendChild(Te);for(var _e=Ee;_e;_e=Ee)Ee=_e.nextSibling,ce.appendChild(_e)}return Te}for(var tt=Ge(Se.nextSibling,0),Ue;(Ue=tt.parentNode)&&Ue.nodeType===1;)tt=Ue;ze.push(tt)}for(var Ve=0;Ve<ze.length;++Ve)qe(ze[Ve]);Q===(Q|0)&&ze[0].setAttribute("value",Q);var et=de.createElement("ol");et.className="linenums";for(var rt=Math.max(0,Q-1|0)||0,Ve=0,Me=ze.length;Ve<Me;++Ve)Ce=ze[Ve],Ce.className="L"+(Ve+rt)%10,Ce.firstChild||Ce.appendChild(de.createTextNode("\xA0")),et.appendChild(Ce);ne.appendChild(et)}function we(ne){var Q=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Q=Q&&+Q[1]<=8;var X=/\n/g,$=ne.sourceCode,pe=$.length,de=0,Ce=ne.spans,ze=Ce.length,qe=0,Ye=ne.decorations,Ve=Ye.length,et=0;Ye[Ve]=pe;var rt,Me;for(Me=rt=0;Me<Ve;)Ye[Me]!==Ye[Me+2]?(Ye[rt++]=Ye[Me++],Ye[rt++]=Ye[Me++]):Me+=2;for(Ve=rt,Me=rt=0;Me<Ve;){for(var Se=Ye[Me],Ge=Ye[Me+1],tt=Me+2;tt+2<=Ve&&Ye[tt+1]===Ge;)tt+=2;Ye[rt++]=Se,Ye[rt++]=Ge,Me=tt}Ve=Ye.length=rt;var Ue=ne.sourceNode,Xe="";Ue&&(Xe=Ue.style.display,Ue.style.display="none");try{for(var Pe=null;qe<ze;){var Te=Ce[qe],Ae=Ce[qe+2]||pe,ce=Ye[et+2]||pe,tt=Math.min(Ae,ce),Ee=Ce[qe+1],_e;if(Ee.nodeType!==1&&(_e=$.substring(de,tt))){Q&&(_e=_e.replace(X,"\r")),Ee.nodeValue=_e;var De=Ee.ownerDocument,je=De.createElement("span");je.className=Ye[et+1];var $e=Ee.parentNode;$e.replaceChild(je,Ee),je.appendChild(Ee),de<Ae&&(Ce[qe+1]=Ee=De.createTextNode($.substring(tt,Ae)),$e.insertBefore(Ee,je.nextSibling))}de=tt,de>=Ae&&(qe+=2),de>=ce&&(et+=2)}}finally{Ue&&(Ue.style.display=Xe)}}var me={};function oe(ne,Q){for(var X=Q.length;--X>=0;){var $=Q[X];me.hasOwnProperty($)?l.console&&console.warn("cannot override language handler %s",$):me[$]=ne}}function se(ne,Q){return ne&&me.hasOwnProperty(ne)||(ne=/^\s*</.test(Q)?"default-markup":"default-code"),me[ne]}oe(ge,["default-code"]),oe(Z([],[[_,/^[^<?]+/],[j,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\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"]),oe(Z([[_,/^[\s]+/,null,` \r
`],[z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[N,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[H,/^(?!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"]),oe(Z([],[[z,/^[\s\S]+/]]),["uq.val"]),oe(he({keywords:u,hashComments:!0,cStyleComments:!0,types:T}),["c","cc","cpp","cxx","cyc","m"]),oe(he({keywords:"null,true,false"}),["json"]),oe(he({keywords:m,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:T}),["cs"]),oe(he({keywords:p,cStyleComments:!0}),["java"]),oe(he({keywords:h,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),oe(he({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),oe(he({keywords:v,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),oe(he({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),oe(he({keywords:g,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),oe(he({keywords:b,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),oe(Z([],[[o,/^[\s\S]+/]]),["regex"]);function te(ne){var Q=ne.langExtension;try{var X=K(ne.sourceNode,ne.pre),$=X.sourceCode;ne.sourceCode=$,ne.spans=X.spans,ne.basePos=0,se(Q,$)(ne),we(ne)}catch(pe){l.console&&console.log(pe&&pe.stack||pe)}}function be(ne,Q,X){var $=X||!1,pe=Q||null,de=document.createElement("div");de.innerHTML="<pre>"+ne+"</pre>",de=de.firstChild,$&&ie(de,$,!0);var Ce={langExtension:pe,numberLines:$,sourceNode:de,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return te(Ce),de.innerHTML}function q(ne,Q){var X=Q||document.body,$=X.ownerDocument||document;function pe(Te){return X.getElementsByTagName(Te)}for(var de=[pe("pre"),pe("code"),pe("xmp")],Ce=[],ze=0;ze<de.length;++ze)for(var qe=0,Ye=de[ze].length;qe<Ye;++qe)Ce.push(de[ze][qe]);de=null;var Ve=Date;Ve.now||(Ve={now:function(){return+new Date}});var et=0,rt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Me=/\bprettyprint\b/,Se=/\bprettyprinted\b/,Ge=/pre|xmp/i,tt=/^code$/i,Ue=/^(?:pre|code|xmp)$/i,Xe={};function Pe(){for(var Te=l.PR_SHOULD_USE_CONTINUATION?Ve.now()+250:Infinity;et<Ce.length&&Ve.now()<Te;et++){for(var Ae=Ce[et],ce=Xe,Ee=Ae;Ee=Ee.previousSibling;){var _e=Ee.nodeType,De=(_e===7||_e===8)&&Ee.nodeValue;if(De?!/^\??prettify\b/.test(De):_e!==3||/\S/.test(Ee.nodeValue))break;if(De){ce={},De.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Ft,Et,ir){ce[Et]=ir});break}}var je=Ae.className;if((ce!==Xe||Me.test(je))&&!Se.test(je)){for(var $e=!1,at=Ae.parentNode;at;at=at.parentNode){var it=at.tagName;if(Ue.test(it)&&at.className&&Me.test(at.className)){$e=!0;break}}if(!$e){Ae.className+=" prettyprinted";var st=ce.lang;if(!st){st=je.match(rt);var Je;!st&&(Je=ee(Ae))&&tt.test(Je.tagName)&&(st=Je.className.match(rt)),st&&(st=st[1])}var gt;if(Ge.test(Ae.tagName))gt=1;else{var yt=Ae.currentStyle,ct=$.defaultView,Lt=yt?yt.whiteSpace:ct&&ct.getComputedStyle?ct.getComputedStyle(Ae,null).getPropertyValue("white-space"):0;gt=Lt&&Lt.substring(0,3)==="pre"}var kt=ce.linenums;(kt=kt==="true"||+kt)||(kt=je.match(/\blinenums\b(?::(\d+))?/),kt=kt?kt[1]&&kt[1].length?+kt[1]:!0:!1),kt&&ie(Ae,kt,gt);var Ct={langExtension:st,sourceNode:Ae,numberLines:kt,pre:gt,sourceCode:null,basePos:null,spans:null,decorations:null};te(Ct)}}}et<Ce.length?l.setTimeout(Pe,250):typeof ne=="function"&&ne()}Pe()}var ae=l.PR={createSimpleLexer:Z,registerLangHandler:oe,sourceDecorator:he,PR_ATTRIB_NAME:H,PR_ATTRIB_VALUE:z,PR_COMMENT:O,PR_DECLARATION:j,PR_KEYWORD:P,PR_LITERAL:x,PR_NOCODE:F,PR_PLAIN:_,PR_PUNCTUATION:E,PR_SOURCE:M,PR_STRING:o,PR_TAG:N,PR_TYPE:y,prettyPrintOne:S?l.prettyPrintOne=be:s=be,prettyPrint:w=S?l.prettyPrint=q:w=q},xe=l.define;typeof xe=="function"&&xe.amd&&xe("google-code-prettify",[],function(){return ae})})()},"VrN/":function(I,Y,k){(function(L,c){I.exports=c()})(this,function(){"use strict";var L=navigator.userAgent,c=navigator.platform,S=/gecko\/\d/i.test(L),R=/MSIE \d/.test(L),f=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(L),s=/Edge\/(\d+)/.exec(L),w=R||f||s,l=w&&(R?document.documentMode||6:+(s||f)[1]),i=!s&&/WebKit\//.test(L),a=i&&/Qt\/\d+\.\d+/.test(L),r=!s&&/Chrome\//.test(L),u=/Opera\//.test(L),p=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(L),b=/PhantomJS/.test(L),g=!s&&/AppleWebKit/.test(L)&&/Mobile\/\w+/.test(L),v=/Android/.test(L),n=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(L),d=g||/Mac/.test(c),h=/\bCrOS\b/.test(L),C=/win/i.test(c),T=u&&L.match(/Version\/(\d*\.\d*)/);T&&(T=Number(T[1])),T&&T>=15&&(u=!1,i=!0);var o=d&&(a||u&&(T==null||T<12.11)),P=S||w&&l>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var y=function(e,t){var D=e.className,A=O(t).exec(D);if(A){var U=D.slice(A.index+A[0].length);e.className=D.slice(0,A.index)+(U?A[1]+U:"")}};function x(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function E(e,t){return x(e).appendChild(t)}function _(e,t,D,A){var U=document.createElement(e);if(D&&(U.className=D),A&&(U.style.cssText=A),typeof t=="string")U.appendChild(document.createTextNode(t));else if(t)for(var V=0;V<t.length;++V)U.appendChild(t[V]);return U}function N(e,t,D,A){var U=_(e,t,D,A);return U.setAttribute("role","presentation"),U}var j;document.createRange?j=function(e,t,D,A){var U=document.createRange();return U.setEnd(A||e,D),U.setStart(e,t),U}:j=function(e,t,D){var A=document.body.createTextRange();try{A.moveToElementText(e.parentNode)}catch(U){return A}return A.collapse(!0),A.moveEnd("character",D),A.moveStart("character",t),A};function M(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function H(){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 z(e,t){var D=e.className;O(t).test(D)||(e.className+=(D?" ":"")+t)}function F(e,t){for(var D=e.split(" "),A=0;A<D.length;A++)D[A]&&!O(D[A]).test(t)&&(t+=" "+D[A]);return t}var G=function(e){e.select()};g?G=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(G=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 K(e,t,D){t||(t={});for(var A in e)e.hasOwnProperty(A)&&(D!==!1||!t.hasOwnProperty(A))&&(t[A]=e[A]);return t}function W(e,t,D,A,U){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var V=A||0,re=U||0;;){var le=e.indexOf(" ",V);if(le<0||le>=t)return re+(t-V);re+=le-V,re+=D-re%D,V=le+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};J.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},J.prototype.set=function(e,t){this.f=t;var D=+new Date+e;(!this.id||D<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=D)};function ee(e,t){for(var D=0;D<e.length;++D)if(e[D]==t)return D;return-1}var Z=50,he={toString:function(){return"CodeMirror.Pass"}},ge={scroll:!1},ie={origin:"*mouse"},we={origin:"+move"};function me(e,t,D){for(var A=0,U=0;;){var V=e.indexOf(" ",A);V==-1&&(V=e.length);var re=V-A;if(V==e.length||U+re>=t)return A+Math.min(re,t-U);if(U+=V-A,U+=D-U%D,A=V+1,U>=t)return A}}var oe=[""];function se(e){for(;oe.length<=e;)oe.push(te(oe)+" ");return oe[e]}function te(e){return e[e.length-1]}function be(e,t){for(var D=[],A=0;A<e.length;A++)D[A]=t(e[A],A);return D}function q(e,t,D){for(var A=0,U=D(t);A<e.length&&D(e[A])<=U;)A++;e.splice(A,0,t)}function ae(){}function xe(e,t){var D;return Object.create?D=Object.create(e):(ae.prototype=e,D=new ae),t&&K(t,D),D}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function X(e,t){return t?t.source.indexOf("\\w")>-1&&Q(e)?!0:t.test(e):Q(e)}function $(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var pe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function de(e){return e.charCodeAt(0)>=768&&pe.test(e)}function Ce(e,t,D){for(;(D<0?t>0:t<e.length)&&de(e.charAt(t));)t+=D;return t}function ze(e,t,D){for(var A=t>D?-1:1;;){if(t==D)return t;var U=(t+D)/2,V=A<0?Math.ceil(U):Math.floor(U);if(V==t)return e(V)?t:D;e(V)?D=V:t=V+A}}function qe(e,t,D,A){if(!e)return A(t,D,"ltr",0);for(var U=!1,V=0;V<e.length;++V){var re=e[V];(re.from<D&&re.to>t||t==D&&re.to==t)&&(A(Math.max(re.from,t),Math.min(re.to,D),re.level==1?"rtl":"ltr",V),U=!0)}U||A(t,D,"ltr")}var Ye=null;function Ve(e,t,D){var A;Ye=null;for(var U=0;U<e.length;++U){var V=e[U];if(V.from<t&&V.to>t)return U;V.to==t&&(V.from!=V.to&&D=="before"?A=U:Ye=U),V.from==t&&(V.from!=V.to&&D!="before"?A=U:Ye=U)}return A!=null?A:Ye}var et=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(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 A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,U=/[stwN]/,V=/[LRr]/,re=/[Lb1n]/,le=/[1n]/;function ue(ve,Ie,Fe){this.level=ve,this.from=Ie,this.to=Fe}return function(ve,Ie){var Fe=Ie=="ltr"?"L":"R";if(ve.length==0||Ie=="ltr"&&!A.test(ve))return!1;for(var nt=ve.length,Ze=[],lt=0;lt<nt;++lt)Ze.push(D(ve.charCodeAt(lt)));for(var dt=0,bt=Fe;dt<nt;++dt){var wt=Ze[dt];wt=="m"?Ze[dt]=bt:bt=wt}for(var At=0,Tt=Fe;At<nt;++At){var Pt=Ze[At];Pt=="1"&&Tt=="r"?Ze[At]="n":V.test(Pt)&&(Tt=Pt,Pt=="r"&&(Ze[At]="R"))}for(var Qt=1,Gt=Ze[0];Qt<nt-1;++Qt){var br=Ze[Qt];br=="+"&&Gt=="1"&&Ze[Qt+1]=="1"?Ze[Qt]="1":br==","&&Gt==Ze[Qt+1]&&(Gt=="1"||Gt=="n")&&(Ze[Qt]=Gt),Gt=br}for(var un=0;un<nt;++un){var qn=Ze[un];if(qn==",")Ze[un]="N";else if(qn=="%"){var On=void 0;for(On=un+1;On<nt&&Ze[On]=="%";++On);for(var Pa=un&&Ze[un-1]=="!"||On<nt&&Ze[On]=="1"?"1":"N",Aa=un;Aa<On;++Aa)Ze[Aa]=Pa;un=On-1}}for(var Hn=0,Ra=Fe;Hn<nt;++Hn){var ua=Ze[Hn];Ra=="L"&&ua=="1"?Ze[Hn]="L":V.test(ua)&&(Ra=ua)}for(var Zn=0;Zn<nt;++Zn)if(U.test(Ze[Zn])){var Kn=void 0;for(Kn=Zn+1;Kn<nt&&U.test(Ze[Kn]);++Kn);for(var Mn=(Zn?Ze[Zn-1]:Fe)=="L",Da=(Kn<nt?Ze[Kn]:Fe)=="L",Zi=Mn==Da?Mn?"L":"R":Fe,_i=Zn;_i<Kn;++_i)Ze[_i]=Zi;Zn=Kn-1}for(var ga=[],ui,ea=0;ea<nt;)if(re.test(Ze[ea])){var ps=ea;for(++ea;ea<nt&&re.test(Ze[ea]);++ea);ga.push(new ue(0,ps,ea))}else{var vi=ea,Li=ga.length,Pi=Ie=="rtl"?1:0;for(++ea;ea<nt&&Ze[ea]!="L";++ea);for(var Ta=vi;Ta<ea;)if(le.test(Ze[Ta])){vi<Ta&&(ga.splice(Li,0,new ue(1,vi,Ta)),Li+=Pi);var qi=Ta;for(++Ta;Ta<ea&&le.test(Ze[Ta]);++Ta);ga.splice(Li,0,new ue(2,qi,Ta)),Li+=Pi,vi=Ta}else++Ta;vi<ea&&ga.splice(Li,0,new ue(1,vi,ea))}return Ie=="ltr"&&(ga[0].level==1&&(ui=ve.match(/^\s+/))&&(ga[0].from=ui[0].length,ga.unshift(new ue(0,0,ui[0].length))),te(ga).level==1&&(ui=ve.match(/\s+$/))&&(te(ga).to-=ui[0].length,ga.push(new ue(0,nt-ui[0].length,nt)))),Ie=="rtl"?ga.reverse():ga}}();function rt(e,t){var D=e.order;return D==null&&(D=e.order=et(e.text,t)),D}var Me=[],Se=function(e,t,D){if(e.addEventListener)e.addEventListener(t,D,!1);else if(e.attachEvent)e.attachEvent("on"+t,D);else{var A=e._handlers||(e._handlers={});A[t]=(A[t]||Me).concat(D)}};function Ge(e,t){return e._handlers&&e._handlers[t]||Me}function tt(e,t,D){if(e.removeEventListener)e.removeEventListener(t,D,!1);else if(e.detachEvent)e.detachEvent("on"+t,D);else{var A=e._handlers,U=A&&A[t];if(U){var V=ee(U,D);V>-1&&(A[t]=U.slice(0,V).concat(U.slice(V+1)))}}}function Ue(e,t){var D=Ge(e,t);if(!D.length)return;for(var A=Array.prototype.slice.call(arguments,2),U=0;U<D.length;++U)D[U].apply(null,A)}function Xe(e,t,D){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ue(e,D||t.type,e,t),_e(t)||t.codemirrorIgnore}function Pe(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var D=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),A=0;A<t.length;++A)ee(D,t[A])==-1&&D.push(t[A])}function Te(e,t){return Ge(e,t).length>0}function Ae(e){e.prototype.on=function(t,D){Se(this,t,D)},e.prototype.off=function(t,D){tt(this,t,D)}}function ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function _e(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function De(e){ce(e),Ee(e)}function je(e){return e.target||e.srcElement}function $e(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),d&&e.ctrlKey&&t==1&&(t=3),t}var at=function(){if(w&&l<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),it;function st(e){if(it==null){var t=_("span","\u200B");E(e,_("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(it=t.offsetWidth<=1&&t.offsetHeight>2&&!(w&&l<8))}var D=it?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var Je;function gt(e){if(Je!=null)return Je;var t=E(e,document.createTextNode("A\u062EA")),D=j(t,0,1).getBoundingClientRect(),A=j(t,1,2).getBoundingClientRect();return x(e),!D||D.left==D.right?!1:Je=A.right-D.right<3}var yt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,D=[],A=e.length;t<=A;){var U=e.indexOf(`
`,t);U==-1&&(U=e.length);var V=e.slice(t,e.charAt(U-1)=="\r"?U-1:U),re=V.indexOf("\r");re!=-1?(D.push(V.slice(0,re)),t+=re+1):(D.push(V),t=U+1)}return D}:function(e){return e.split(/\r\n?|\n/)},ct=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(D){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Lt=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),kt=null;function Ct(e){if(kt!=null)return kt;var t=E(e,_("span","x")),D=t.getBoundingClientRect(),A=j(t,0,1).getBoundingClientRect();return kt=Math.abs(D.left-A.left)>1}var Ft={},Et={};function ir(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ft[e]=t}function Yt(e,t){Et[e]=t}function It(e){if(typeof e=="string"&&Et.hasOwnProperty(e))e=Et[e];else if(e&&typeof e.name=="string"&&Et.hasOwnProperty(e.name)){var t=Et[e.name];typeof t=="string"&&(t={name:t}),e=xe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return It("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return It("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Ht(e,t){t=It(t);var D=Ft[t.name];if(!D)return Ht(e,"text/plain");var A=D(e,t);if(Ur.hasOwnProperty(t.name)){var U=Ur[t.name];for(var V in U){if(!U.hasOwnProperty(V))continue;A.hasOwnProperty(V)&&(A["_"+V]=A[V]),A[V]=U[V]}}if(A.name=t.name,t.helperType&&(A.helperType=t.helperType),t.modeProps)for(var re in t.modeProps)A[re]=t.modeProps[re];return A}var Ur={};function cn(e,t){var D=Ur.hasOwnProperty(e)?Ur[e]:Ur[e]={};K(t,D)}function gr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var D={};for(var A in t){var U=t[A];U instanceof Array&&(U=U.concat([])),D[A]=U}return D}function zn(e,t){for(var D;e.innerMode&&!(D=e.innerMode(t),!D||D.mode==e);)t=D.state,e=D.mode;return D||{mode:e,state:t}}function vt(e,t,D){return e.startState?e.startState(t,D):!0}var _t=function(e,t,D){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};_t.prototype.eol=function(){return this.pos>=this.string.length},_t.prototype.sol=function(){return this.pos==this.lineStart},_t.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},_t.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},_t.prototype.eat=function(e){var t=this.string.charAt(this.pos),D;if(typeof e=="string"?D=t==e:D=t&&(e.test?e.test(t):e(t)),D)return++this.pos,t},_t.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},_t.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},_t.prototype.skipToEnd=function(){this.pos=this.string.length},_t.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},_t.prototype.backUp=function(e){this.pos-=e},_t.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)},_t.prototype.indentation=function(){return W(this.string,null,this.tabSize)-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},_t.prototype.match=function(e,t,D){if(typeof e=="string"){var A=function(re){return D?re.toLowerCase():re},U=this.string.substr(this.pos,e.length);if(A(U)==A(e))return t!==!1&&(this.pos+=e.length),!0}else{var V=this.string.slice(this.pos).match(e);return V&&V.index>0?null:(V&&t!==!1&&(this.pos+=V[0].length),V)}},_t.prototype.current=function(){return this.string.slice(this.start,this.pos)},_t.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},_t.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},_t.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function mt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var D=e;!D.lines;)for(var A=0;;++A){var U=D.children[A],V=U.chunkSize();if(t<V){D=U;break}t-=V}return D.lines[t]}function mr(e,t,D){var A=[],U=t.line;return e.iter(t.line,D.line+1,function(V){var re=V.text;U==D.line&&(re=re.slice(0,D.ch)),U==t.line&&(re=re.slice(t.ch)),A.push(re),++U}),A}function Cr(e,t,D){var A=[];return e.iter(t,D,function(U){A.push(U.text)}),A}function Bt(e,t){var D=t-e.height;if(D)for(var A=e;A;A=A.parent)A.height+=D}function Rt(e){if(e.parent==null)return null;for(var t=e.parent,D=ee(t.lines,e),A=t.parent;A;t=A,A=A.parent)for(var U=0;!(A.children[U]==t);++U)D+=A.children[U].chunkSize();return D+t.first}function Er(e,t){var D=e.first;e:do{for(var A=0;A<e.children.length;++A){var U=e.children[A],V=U.height;if(t<V){e=U;continue e}t-=V,D+=U.chunkSize()}return D}while(!e.lines);for(var re=0;re<e.lines.length;++re){var le=e.lines[re],ue=le.height;if(t<ue)break;t-=ue}return D+re}function yn(e,t){return t>=e.first&&t<e.first+e.size}function Ir(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ut(e,t,D){if(D===void 0&&(D=null),!(this instanceof ut))return new ut(e,t,D);this.line=e,this.ch=t,this.sticky=D}function Mt(e,t){return e.line-t.line||e.ch-t.ch}function Wr(e,t){return e.sticky==t.sticky&&Mt(e,t)==0}function tn(e){return ut(e.line,e.ch)}function Sn(e,t){return Mt(e,t)<0?t:e}function bn(e,t){return Mt(e,t)<0?e:t}function Hr(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ot(e,t){if(t.line<e.first)return ut(e.first,0);var D=e.first+e.size-1;return t.line>D?ut(D,mt(e,D).text.length):dn(t,mt(e,t.line).text.length)}function dn(e,t){var D=e.ch;return D==null||D>t?ut(e.line,t):D<0?ut(e.line,0):e}function Kr(e,t){for(var D=[],A=0;A<t.length;A++)D[A]=Ot(e,t[A]);return D}var Or=function(e,t){this.state=e,this.lookAhead=t},sr=function(e,t,D,A){this.state=t,this.doc=e,this.line=D,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};sr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},sr.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}},sr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},sr.fromSaved=function(e,t,D){return t instanceof Or?new sr(e,gr(e.mode,t.state),D,t.lookAhead):new sr(e,gr(e.mode,t),D)},sr.prototype.save=function(e){var t=e!==!1?gr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Or(t,this.maxLookAhead):t};function ta(e,t,D,A){var U=[e.state.modeGen],V={};an(e,t.text,e.doc.mode,D,function(ve,Ie){return U.push(ve,Ie)},V,A);for(var re=D.state,le=function(ve){D.baseTokens=U;var Ie=e.state.overlays[ve],Fe=1,nt=0;D.state=!0,an(e,t.text,Ie.mode,D,function(Ze,lt){for(var dt=Fe;nt<Ze;){var bt=U[Fe];bt>Ze&&U.splice(Fe,1,Ze,U[Fe+1],bt),Fe+=2,nt=Math.min(Ze,bt)}if(!lt)return;if(Ie.opaque)U.splice(dt,Fe-dt,Ze,"overlay "+lt),Fe=dt+2;else for(;dt<Fe;dt+=2){var wt=U[dt+1];U[dt+1]=(wt?wt+" ":"")+"overlay "+lt}},V),D.state=re,D.baseTokens=null,D.baseTokenPos=1},ue=0;ue<e.state.overlays.length;++ue)le(ue);return{styles:U,classes:V.bgClass||V.textClass?V:null}}function Ln(e,t,D){if(!t.styles||t.styles[0]!=e.state.modeGen){var A=ft(e,Rt(t)),U=t.text.length>e.options.maxHighlightLength&&gr(e.doc.mode,A.state),V=ta(e,t,A);U&&(A.state=U),t.stateAfter=A.save(!U),t.styles=V.styles,V.classes?t.styleClasses=V.classes:t.styleClasses&&(t.styleClasses=null),D===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,D){var A=e.doc,U=e.display;if(!A.mode.startState)return new sr(A,!0,t);var V=rr(e,t,D),re=V>A.first&&mt(A,V-1).stateAfter,le=re?sr.fromSaved(A,re,V):new sr(A,vt(A.mode),V);return A.iter(V,t,function(ue){ca(e,ue.text,le);var ve=le.line;ue.stateAfter=ve==t-1||ve%5==0||ve>=U.viewFrom&&ve<U.viewTo?le.save():null,le.nextLine()}),D&&(A.modeFrontier=le.line),le}function ca(e,t,D,A){var U=e.doc.mode,V=new _t(t,e.options.tabSize,D);for(V.start=V.pos=A||0,t==""&&ra(U,D.state);!V.eol();)An(U,V,D.state),V.start=V.pos}function ra(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var D=zn(e,t);if(D.mode.blankLine)return D.mode.blankLine(D.state)}function An(e,t,D,A){for(var U=0;U<10;U++){A&&(A[0]=zn(e,D).mode);var V=e.token(t,D);if(t.pos>t.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var Lr=function(e,t,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=D};function Fn(e,t,D,A){var U=e.doc,V=U.mode,re;t=Ot(U,t);var le=mt(U,t.line),ue=ft(e,t.line,D),ve=new _t(le.text,e.options.tabSize,ue),Ie;for(A&&(Ie=[]);(A||ve.pos<t.ch)&&!ve.eol();)ve.start=ve.pos,re=An(V,ve,ue.state),A&&Ie.push(new Lr(ve,re,gr(U.mode,ue.state)));return A?Ie:new Lr(ve,re,ue.state)}function En(e,t){if(e)for(;;){var D=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!D)break;e=e.slice(0,D.index)+e.slice(D.index+D[0].length);var A=D[1]?"bgClass":"textClass";t[A]==null?t[A]=D[2]:new RegExp("(?:^|\\s)"+D[2]+"(?:$|\\s)").test(t[A])||(t[A]+=" "+D[2])}return e}function an(e,t,D,A,U,V,re){var le=D.flattenSpans;le==null&&(le=e.options.flattenSpans);var ue=0,ve=null,Ie=new _t(t,e.options.tabSize,A),Fe,nt=e.options.addModeClass&&[null];for(t==""&&En(ra(D,A.state),V);!Ie.eol();){if(Ie.pos>e.options.maxHighlightLength?(le=!1,re&&ca(e,t,A,Ie.pos),Ie.pos=t.length,Fe=null):Fe=En(An(D,Ie,A.state,nt),V),nt){var Ze=nt[0].name;Ze&&(Fe="m-"+(Fe?Ze+" "+Fe:Ze))}if(!le||ve!=Fe){for(;ue<Ie.start;)ue=Math.min(Ie.start,ue+5e3),U(ue,ve);ve=Fe}Ie.start=Ie.pos}for(;ue<Ie.pos;){var lt=Math.min(Ie.pos,ue+5e3);U(lt,ve),ue=lt}}function rr(e,t,D){for(var A,U,V=e.doc,re=D?-1:t-(e.doc.mode.innerMode?1e3:100),le=t;le>re;--le){if(le<=V.first)return V.first;var ue=mt(V,le-1),ve=ue.stateAfter;if(ve&&(!D||le+(ve instanceof Or?ve.lookAhead:0)<=V.modeFrontier))return le;var Ie=W(ue.text,null,e.options.tabSize);(U==null||A>Ie)&&(U=le-1,A=Ie)}return U}function $r(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var D=e.first,A=t-1;A>D;A--){var U=mt(e,A).stateAfter;if(U&&(!(U instanceof Or)||A+U.lookAhead<t)){D=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,D)}var tr=!1,Kt=!1;function Zt(){tr=!0}function xr(){Kt=!0}function Nr(e,t,D){this.marker=e,this.from=t,this.to=D}function Jr(e,t){if(e)for(var D=0;D<e.length;++D){var A=e[D];if(A.marker==t)return A}}function on(e,t){for(var D,A=0;A<e.length;++A)e[A]!=t&&(D||(D=[])).push(e[A]);return D}function Ma(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function ei(e,t,D){var A;if(e)for(var U=0;U<e.length;++U){var V=e[U],re=V.marker,le=V.from==null||(re.inclusiveLeft?V.from<=t:V.from<t);if(le||V.from==t&&re.type=="bookmark"&&(!D||!V.marker.insertLeft)){var ue=V.to==null||(re.inclusiveRight?V.to>=t:V.to>t);(A||(A=[])).push(new Nr(re,V.from,ue?null:V.to))}}return A}function Ga(e,t,D){var A;if(e)for(var U=0;U<e.length;++U){var V=e[U],re=V.marker,le=V.to==null||(re.inclusiveRight?V.to>=t:V.to>t);if(le||V.from==t&&re.type=="bookmark"&&(!D||V.marker.insertLeft)){var ue=V.from==null||(re.inclusiveLeft?V.from<=t:V.from<t);(A||(A=[])).push(new Nr(re,ue?null:V.from-t,V.to==null?null:V.to-t))}}return A}function na(e,t){if(t.full)return null;var D=yn(e,t.from.line)&&mt(e,t.from.line).markedSpans,A=yn(e,t.to.line)&&mt(e,t.to.line).markedSpans;if(!D&&!A)return null;var U=t.from.ch,V=t.to.ch,re=Mt(t.from,t.to)==0,le=ei(D,U,re),ue=Ga(A,V,re),ve=t.text.length==1,Ie=te(t.text).length+(ve?U:0);if(le)for(var Fe=0;Fe<le.length;++Fe){var nt=le[Fe];if(nt.to==null){var Ze=Jr(ue,nt.marker);Ze?ve&&(nt.to=Ze.to==null?null:Ze.to+Ie):nt.to=U}}if(ue)for(var lt=0;lt<ue.length;++lt){var dt=ue[lt];if(dt.to!=null&&(dt.to+=Ie),dt.from==null){var bt=Jr(le,dt.marker);bt||(dt.from=Ie,ve&&(le||(le=[])).push(dt))}else dt.from+=Ie,ve&&(le||(le=[])).push(dt)}le&&(le=sn(le)),ue&&ue!=le&&(ue=sn(ue));var wt=[le];if(!ve){var At=t.text.length-2,Tt;if(At>0&&le)for(var Pt=0;Pt<le.length;++Pt)le[Pt].to==null&&(Tt||(Tt=[])).push(new Nr(le[Pt].marker,null,null));for(var Qt=0;Qt<At;++Qt)wt.push(Tt);wt.push(ue)}return wt}function sn(e){for(var t=0;t<e.length;++t){var D=e[t];D.from!=null&&D.from==D.to&&D.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Xa(e,t,D){var A=null;if(e.iter(t.line,D.line+1,function(Ze){if(Ze.markedSpans)for(var lt=0;lt<Ze.markedSpans.length;++lt){var dt=Ze.markedSpans[lt].marker;dt.readOnly&&(!A||ee(A,dt)==-1)&&(A||(A=[])).push(dt)}}),!A)return null;for(var U=[{from:t,to:D}],V=0;V<A.length;++V)for(var re=A[V],le=re.find(0),ue=0;ue<U.length;++ue){var ve=U[ue];if(Mt(ve.to,le.from)<0||Mt(ve.from,le.to)>0)continue;var Ie=[ue,1],Fe=Mt(ve.from,le.from),nt=Mt(ve.to,le.to);(Fe<0||!re.inclusiveLeft&&!Fe)&&Ie.push({from:ve.from,to:le.from}),(nt>0||!re.inclusiveRight&&!nt)&&Ie.push({from:le.to,to:ve.to}),U.splice.apply(U,Ie),ue+=Ie.length-3}return U}function zr(e){var t=e.markedSpans;if(!t)return;for(var D=0;D<t.length;++D)t[D].marker.detachLine(e);e.markedSpans=null}function aa(e,t){if(!t)return;for(var D=0;D<t.length;++D)t[D].marker.attachLine(e);e.markedSpans=t}function Pn(e){return e.inclusiveLeft?-1:0}function fn(e){return e.inclusiveRight?1:0}function Cn(e,t){var D=e.lines.length-t.lines.length;if(D!=0)return D;var A=e.find(),U=t.find(),V=Mt(A.from,U.from)||Pn(e)-Pn(t);if(V)return-V;var re=Mt(A.to,U.to)||fn(e)-fn(t);return re||t.id-e.id}function Va(e,t){var D=Kt&&e.markedSpans,A;if(D)for(var U=void 0,V=0;V<D.length;++V)U=D[V],U.marker.collapsed&&(t?U.from:U.to)==null&&(!A||Cn(A,U.marker)<0)&&(A=U.marker);return A}function da(e){return Va(e,!0)}function ia(e){return Va(e,!1)}function Fa(e,t){var D=Kt&&e.markedSpans,A;if(D)for(var U=0;U<D.length;++U){var V=D[U];V.marker.collapsed&&(V.from==null||V.from<t)&&(V.to==null||V.to>t)&&(!A||Cn(A,V.marker)<0)&&(A=V.marker)}return A}function Sa(e,t,D,A,U){var V=mt(e,t),re=Kt&&V.markedSpans;if(re)for(var le=0;le<re.length;++le){var ue=re[le];if(!ue.marker.collapsed)continue;var ve=ue.marker.find(0),Ie=Mt(ve.from,D)||Pn(ue.marker)-Pn(U),Fe=Mt(ve.to,A)||fn(ue.marker)-fn(U);if(Ie>=0&&Fe<=0||Ie<=0&&Fe>=0)continue;if(Ie<=0&&(ue.marker.inclusiveRight&&U.inclusiveLeft?Mt(ve.to,D)>=0:Mt(ve.to,D)>0)||Ie>=0&&(ue.marker.inclusiveRight&&U.inclusiveLeft?Mt(ve.from,A)<=0:Mt(ve.from,A)<0))return!0}}function _n(e){for(var t;t=da(e);)e=t.find(-1,!0).line;return e}function fa(e){for(var t;t=ia(e);)e=t.find(1,!0).line;return e}function ha(e){for(var t,D;t=ia(e);)e=t.find(1,!0).line,(D||(D=[])).push(e);return D}function Gn(e,t){var D=mt(e,t),A=_n(D);return D==A?t:Rt(A)}function ya(e,t){if(t>e.lastLine())return t;var D=mt(e,t),A;if(!Bn(e,D))return t;for(;A=ia(D);)D=A.find(1,!0).line;return Rt(D)+1}function Bn(e,t){var D=Kt&&t.markedSpans;if(D)for(var A=void 0,U=0;U<D.length;++U){if(A=D[U],!A.marker.collapsed)continue;if(A.from==null)return!0;if(A.marker.widgetNode)continue;if(A.from==0&&A.marker.inclusiveLeft&&Ca(e,t,A))return!0}}function Ca(e,t,D){if(D.to==null){var A=D.marker.find(1,!0);return Ca(e,A.line,Jr(A.line.markedSpans,D.marker))}if(D.marker.inclusiveRight&&D.to==t.text.length)return!0;for(var U=void 0,V=0;V<t.markedSpans.length;++V)if(U=t.markedSpans[V],U.marker.collapsed&&!U.marker.widgetNode&&U.from==D.to&&(U.to==null||U.to!=D.from)&&(U.marker.inclusiveLeft||D.marker.inclusiveRight)&&Ca(e,t,U))return!0}function kn(e){e=_n(e);for(var t=0,D=e.parent,A=0;A<D.lines.length;++A){var U=D.lines[A];if(U==e)break;t+=U.height}for(var V=D.parent;V;D=V,V=D.parent)for(var re=0;re<V.children.length;++re){var le=V.children[re];if(le==D)break;t+=le.height}return t}function oa(e){if(e.height==0)return 0;for(var t=e.text.length,D,A=e;D=da(A);){var U=D.find(0,!0);A=U.from.line,t+=U.from.ch-U.to.ch}for(A=e;D=ia(A);){var V=D.find(0,!0);t-=A.text.length-V.from.ch,A=V.to.line,t+=A.text.length-V.to.ch}return t}function sa(e){var t=e.display,D=e.doc;t.maxLine=mt(D,D.first),t.maxLineLength=oa(t.maxLine),t.maxLineChanged=!0,D.iter(function(A){var U=oa(A);U>t.maxLineLength&&(t.maxLineLength=U,t.maxLine=A)})}var Xn=function(e,t,D){this.text=e,aa(this,t),this.height=D?D(this):1};Xn.prototype.lineNo=function(){return Rt(this)},Ae(Xn);function Dr(e,t,D,A){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),zr(e),aa(e,D);var U=A?A(e):1;U!=e.height&&Bt(e,U)}function Ya(e){e.parent=null,zr(e)}var ti={},La={};function $a(e,t){if(!e||/^\s*$/.test(e))return null;var D=t.addModeClass?La:ti;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function Ba(e,t){var D=N("span",null,null,i?"padding-right: .1px":null),A={pre:N("pre",[D],"CodeMirror-line"),content:D,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var U=0;U<=(t.rest?t.rest.length:0);U++){var V=U?t.rest[U-1]:t.line,re=void 0;A.pos=0,A.addToken=$t,gt(e.display.measure)&&(re=rt(V,e.doc.direction))&&(A.addToken=lr(A.addToken,re)),A.map=[];var le=t!=e.display.externalMeasured&&Rt(V);Pr(V,A,Ln(e,V,le)),V.styleClasses&&(V.styleClasses.bgClass&&(A.bgClass=F(V.styleClasses.bgClass,A.bgClass||"")),V.styleClasses.textClass&&(A.textClass=F(V.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(st(e.display.measure))),U==0?(t.measure.map=A.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(A.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(i){var ue=A.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return Ue(e,"renderLine",e,t.line,A.pre),A.pre.className&&(A.textClass=F(A.pre.className,A.textClass||"")),A}function Dt(e){var t=_("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function $t(e,t,D,A,U,V,re){if(!t)return;var le=e.splitSpaces?Ut(t,e.trailingSpace):t,ue=e.cm.state.specialChars,ve=!1,Ie;if(!ue.test(t))e.col+=t.length,Ie=document.createTextNode(le),e.map.push(e.pos,e.pos+t.length,Ie),w&&l<9&&(ve=!0),e.pos+=t.length;else{Ie=document.createDocumentFragment();for(var Fe=0;;){ue.lastIndex=Fe;var nt=ue.exec(t),Ze=nt?nt.index-Fe:t.length-Fe;if(Ze){var lt=document.createTextNode(le.slice(Fe,Fe+Ze));w&&l<9?Ie.appendChild(_("span",[lt])):Ie.appendChild(lt),e.map.push(e.pos,e.pos+Ze,lt),e.col+=Ze,e.pos+=Ze}if(!nt)break;Fe+=Ze+1;var dt=void 0;if(nt[0]==" "){var bt=e.cm.options.tabSize,wt=bt-e.col%bt;dt=Ie.appendChild(_("span",se(wt),"cm-tab")),dt.setAttribute("role","presentation"),dt.setAttribute("cm-text"," "),e.col+=wt}else nt[0]=="\r"||nt[0]==`
`?(dt=Ie.appendChild(_("span",nt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),dt.setAttribute("cm-text",nt[0]),e.col+=1):(dt=e.cm.options.specialCharPlaceholder(nt[0]),dt.setAttribute("cm-text",nt[0]),w&&l<9?Ie.appendChild(_("span",[dt])):Ie.appendChild(dt),e.col+=1);e.map.push(e.pos,e.pos+1,dt),e.pos++}}if(e.trailingSpace=le.charCodeAt(t.length-1)==32,D||A||U||ve||V||re){var At=D||"";A&&(At+=A),U&&(At+=U);var Tt=_("span",[Ie],At,V);if(re)for(var Pt in re)re.hasOwnProperty(Pt)&&Pt!="style"&&Pt!="class"&&Tt.setAttribute(Pt,re[Pt]);return e.content.appendChild(Tt)}e.content.appendChild(Ie)}function Ut(e,t){if(e.length>1&&!/ /.test(e))return e;for(var D=t,A="",U=0;U<e.length;U++){var V=e.charAt(U);V==" "&&D&&(U==e.length-1||e.charCodeAt(U+1)==32)&&(V="\xA0"),A+=V,D=V==" "}return A}function lr(e,t){return function(D,A,U,V,re,le,ue){U=U?U+" cm-force-border":"cm-force-border";for(var ve=D.pos,Ie=ve+A.length;;){for(var Fe=void 0,nt=0;nt<t.length&&!(Fe=t[nt],Fe.to>ve&&Fe.from<=ve);nt++);if(Fe.to>=Ie)return e(D,A,U,V,re,le,ue);e(D,A.slice(0,Fe.to-ve),U,V,null,le,ue),V=null,A=A.slice(Fe.to-ve),ve=Fe.to}}}function yr(e,t,D,A){var U=!A&&D.widgetNode;U&&e.map.push(e.pos,e.pos+t,U),!A&&e.cm.display.input.needsContentAttribute&&(U||(U=e.content.appendChild(document.createElement("span"))),U.setAttribute("cm-marker",D.id)),U&&(e.cm.display.input.setUneditable(U),e.content.appendChild(U)),e.pos+=t,e.trailingSpace=!1}function Pr(e,t,D){var A=e.markedSpans,U=e.text,V=0;if(!A){for(var re=1;re<D.length;re+=2)t.addToken(t,U.slice(V,V=D[re]),$a(D[re+1],t.cm.options));return}for(var le=U.length,ue=0,ve=1,Ie="",Fe,nt,Ze=0,lt,dt,bt,wt,At;;){if(Ze==ue){lt=dt=bt=nt="",At=null,wt=null,Ze=Infinity;for(var Tt=[],Pt=void 0,Qt=0;Qt<A.length;++Qt){var Gt=A[Qt],br=Gt.marker;if(br.type=="bookmark"&&Gt.from==ue&&br.widgetNode)Tt.push(br);else if(Gt.from<=ue&&(Gt.to==null||Gt.to>ue||br.collapsed&&Gt.to==ue&&Gt.from==ue)){if(Gt.to!=null&&Gt.to!=ue&&Ze>Gt.to&&(Ze=Gt.to,dt=""),br.className&&(lt+=" "+br.className),br.css&&(nt=(nt?nt+";":"")+br.css),br.startStyle&&Gt.from==ue&&(bt+=" "+br.startStyle),br.endStyle&&Gt.to==Ze&&(Pt||(Pt=[])).push(br.endStyle,Gt.to),br.title&&((At||(At={})).title=br.title),br.attributes)for(var un in br.attributes)(At||(At={}))[un]=br.attributes[un];br.collapsed&&(!wt||Cn(wt.marker,br)<0)&&(wt=Gt)}else Gt.from>ue&&Ze>Gt.from&&(Ze=Gt.from)}if(Pt)for(var qn=0;qn<Pt.length;qn+=2)Pt[qn+1]==Ze&&(dt+=" "+Pt[qn]);if(!wt||wt.from==ue)for(var On=0;On<Tt.length;++On)yr(t,0,Tt[On]);if(wt&&(wt.from||0)==ue){if(yr(t,(wt.to==null?le+1:wt.to)-ue,wt.marker,wt.from==null),wt.to==null)return;wt.to==ue&&(wt=!1)}}if(ue>=le)break;for(var Pa=Math.min(le,Ze);;){if(Ie){var Aa=ue+Ie.length;if(!wt){var Hn=Aa>Pa?Ie.slice(0,Pa-ue):Ie;t.addToken(t,Hn,Fe?Fe+lt:lt,bt,ue+Hn.length==Ze?dt:"",nt,At)}if(Aa>=Pa){Ie=Ie.slice(Pa-ue),ue=Pa;break}ue=Aa,bt=""}Ie=U.slice(V,V=D[ve++]),Fe=$a(D[ve++],t.cm.options)}}}function dr(e,t,D){this.line=t,this.rest=ha(t),this.size=this.rest?Rt(te(this.rest))-D+1:1,this.node=this.text=null,this.hidden=Bn(e,t)}function Gr(e,t,D){for(var A=[],U,V=t;V<D;V=U){var re=new dr(e.doc,mt(e.doc,V),V);U=V+re.size,A.push(re)}return A}var hn=null;function fr(e){hn?hn.ops.push(e):e.ownsGroup=hn={ops:[e],delayedCallbacks:[]}}function pa(e){var t=e.delayedCallbacks,D=0;do{for(;D<t.length;D++)t[D].call(null);for(var A=0;A<e.ops.length;A++){var U=e.ops[A];if(U.cursorActivityHandlers)for(;U.cursorActivityCalled<U.cursorActivityHandlers.length;)U.cursorActivityHandlers[U.cursorActivityCalled++].call(null,U.cm)}}while(D<t.length)}function Nt(e,t){var D=e.ownsGroup;if(!D)return;try{pa(D)}finally{hn=null,t(D)}}var qt=null;function Jt(e,t){var D=Ge(e,t);if(!D.length)return;var A=Array.prototype.slice.call(arguments,2),U;hn?U=hn.delayedCallbacks:qt?U=qt:(U=qt=[],setTimeout(Qr,0));for(var V=function(le){U.push(function(){return D[le].apply(null,A)})},re=0;re<D.length;++re)V(re)}function Qr(){var e=qt;qt=null;for(var t=0;t<e.length;++t)e[t]()}function Wa(e,t,D,A){for(var U=0;U<t.changes.length;U++){var V=t.changes[U];V=="text"?er(e,t):V=="gutter"?kr(e,t,D,A):V=="class"?nr(e,t):V=="widget"&&hr(e,t,A)}t.changes=null}function Ha(e){return e.node==e.text&&(e.node=_("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&l<8&&(e.node.style.zIndex=2)),e.node}function Xt(e,t){var D=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(D&&(D+=" CodeMirror-linebackground"),t.background)D?t.background.className=D:(t.background.parentNode.removeChild(t.background),t.background=null);else if(D){var A=Ha(t);t.background=A.insertBefore(_("div",null,D),A.firstChild),e.display.input.setUneditable(t.background)}}function St(e,t){var D=e.display.externalMeasured;return D&&D.line==t.line?(e.display.externalMeasured=null,t.measure=D.measure,D.built):Ba(e,t)}function er(e,t){var D=t.text.className,A=St(e,t);t.text==t.node&&(t.node=A.pre),t.text.parentNode.replaceChild(A.pre,t.text),t.text=A.pre,A.bgClass!=t.bgClass||A.textClass!=t.textClass?(t.bgClass=A.bgClass,t.textClass=A.textClass,nr(e,t)):D&&(t.text.className=D)}function nr(e,t){Xt(e,t),t.line.wrapClass?Ha(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var D=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=D||""}function kr(e,t,D,A){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var U=Ha(t);t.gutterBackground=_("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px; width: "+A.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),U.insertBefore(t.gutterBackground,t.text)}var V=t.line.gutterMarkers;if(e.options.lineNumbers||V){var re=Ha(t),le=t.gutter=_("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px");if(e.display.input.setUneditable(le),re.insertBefore(le,t.text),t.line.gutterClass&&(le.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(t.lineNumber=le.appendChild(_("div",Ir(e.options,D),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+A.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var ve=e.display.gutterSpecs[ue].className,Ie=V.hasOwnProperty(ve)&&V[ve];Ie&&le.appendChild(_("div",[Ie],"CodeMirror-gutter-elt","left: "+A.gutterLeft[ve]+"px; width: "+A.gutterWidth[ve]+"px"))}}}function hr(e,t,D){t.alignable&&(t.alignable=null);for(var A=O("CodeMirror-linewidget"),U=t.node.firstChild,V=void 0;U;U=V)V=U.nextSibling,A.test(U.className)&&t.node.removeChild(U);rn(e,t,D)}function pn(e,t,D,A){var U=St(e,t);return t.text=t.node=U.pre,U.bgClass&&(t.bgClass=U.bgClass),U.textClass&&(t.textClass=U.textClass),nr(e,t),kr(e,t,D,A),rn(e,t,A),t.node}function rn(e,t,D){if(_a(e,t.line,t,D,!0),t.rest)for(var A=0;A<t.rest.length;A++)_a(e,t.rest[A],t,D,!1)}function _a(e,t,D,A,U){if(!t.widgets)return;for(var V=Ha(D),re=0,le=t.widgets;re<le.length;++re){var ue=le[re],ve=_("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),Rn(ue,ve,D,A),e.display.input.setUneditable(ve),U&&ue.above?V.insertBefore(ve,D.gutter||D.text):V.appendChild(ve),Jt(ue,"redraw")}}function Rn(e,t,D,A){if(e.noHScroll){(D.alignable||(D.alignable=[])).push(t);var U=A.wrapperWidth;t.style.left=A.fixedPos+"px",e.coverGutter||(U-=A.gutterTotalWidth,t.style.paddingLeft=A.gutterTotalWidth+"px"),t.style.width=U+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-A.gutterTotalWidth+"px"))}function In(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!M(document.body,e.node)){var D="position: relative;";e.coverGutter&&(D+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(D+="width: "+t.display.wrapper.clientWidth+"px;"),E(t.display.measure,_("div",[e.node],null,D))}return e.height=e.node.parentNode.offsetHeight}function Wn(e,t){for(var D=je(t);D!=e.wrapper;D=D.parentNode)if(!D||D.nodeType==1&&D.getAttribute("cm-ignore-events")=="true"||D.parentNode==e.sizer&&D!=e.mover)return!0}function Ka(e){return e.lineSpace.offsetTop}function Re(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Be(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=E(e.measure,_("pre","x","CodeMirror-line-like")),D=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,A={left:parseInt(D.paddingLeft),right:parseInt(D.paddingRight)};return!isNaN(A.left)&&!isNaN(A.right)&&(e.cachedPaddingH=A),A}function Ke(e){return Z-e.display.nativeBarWidth}function Le(e){return e.display.scroller.clientWidth-Ke(e)-e.display.barWidth}function fe(e){return e.display.scroller.clientHeight-Ke(e)-e.display.barHeight}function Oe(e,t,D){var A=e.options.lineWrapping,U=A&&Le(e);if(!t.measure.heights||A&&t.measure.width!=U){var V=t.measure.heights=[];if(A){t.measure.width=U;for(var re=t.text.firstChild.getClientRects(),le=0;le<re.length-1;le++){var ue=re[le],ve=re[le+1];Math.abs(ue.bottom-ve.bottom)>2&&V.push((ue.bottom+ve.top)/2-D.top)}}V.push(D.bottom-D.top)}}function ye(e,t,D){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;A<e.rest.length;A++)if(e.rest[A]==t)return{map:e.measure.maps[A],cache:e.measure.caches[A]};for(var U=0;U<e.rest.length;U++)if(Rt(e.rest[U])>D)return{map:e.measure.maps[U],cache:e.measure.caches[U],before:!0}}function ke(e,t){t=_n(t);var D=Rt(t),A=e.display.externalMeasured=new dr(e.doc,t,D);A.lineN=D;var U=A.built=Ba(e,A);return A.text=U.pre,E(e.display.lineMeasure,U.pre),A}function Ne(e,t,D,A){return Qe(e,We(e,t),D,A)}function He(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ln(e,t)];var D=e.display.externalMeasured;if(D&&t>=D.lineN&&t<D.lineN+D.size)return D}function We(e,t){var D=Rt(t),A=He(e,D);A&&!A.text?A=null:A&&A.changes&&(Wa(e,A,D,xn(e)),e.curOp.forceUpdate=!0),A||(A=ke(e,t));var U=ye(A,t,D);return{line:t,view:A,rect:null,map:U.map,cache:U.cache,before:U.before,hasHeights:!1}}function Qe(e,t,D,A,U){t.before&&(D=-1);var V=D+(A||""),re;return t.cache.hasOwnProperty(V)?re=t.cache[V]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Oe(e,t.view,t.rect),t.hasHeights=!0),re=xt(e,t,D,A),re.bogus||(t.cache[V]=re)),{left:re.left,right:re.right,top:U?re.rtop:re.top,bottom:U?re.rbottom:re.bottom}}var ot={left:0,right:0,top:0,bottom:0};function pt(e,t,D){for(var A,U,V,re,le,ue,ve=0;ve<e.length;ve+=3)if(le=e[ve],ue=e[ve+1],t<le?(U=0,V=1,re="left"):t<ue?(U=t-le,V=U+1):(ve==e.length-3||t==ue&&e[ve+3]>t)&&(V=ue-le,U=V-1,t>=ue&&(re="right")),U!=null){if(A=e[ve+2],le==ue&&D==(A.insertLeft?"left":"right")&&(re=D),D=="left"&&U==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)A=e[(ve-=3)+2],re="left";if(D=="right"&&U==ue-le)for(;ve<e.length-3&&e[ve+3]==e[ve+4]&&!e[ve+5].insertLeft;)A=e[(ve+=3)+2],re="right";break}return{node:A,start:U,end:V,collapse:re,coverStart:le,coverEnd:ue}}function ht(e,t){var D=ot;if(t=="left")for(var A=0;A<e.length&&!((D=e[A]).left!=D.right);A++);else for(var U=e.length-1;U>=0&&!((D=e[U]).left!=D.right);U--);return D}function xt(e,t,D,A){var U=pt(t.map,D,A),V=U.node,re=U.start,le=U.end,ue=U.collapse,ve;if(V.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;re&&de(t.line.text.charAt(U.coverStart+re));)--re;for(;U.coverStart+le<U.coverEnd&&de(t.line.text.charAt(U.coverStart+le));)++le;if(w&&l<9&&re==0&&le==U.coverEnd-U.coverStart?ve=V.parentNode.getBoundingClientRect():ve=ht(j(V,re,le).getClientRects(),A),ve.left||ve.right||re==0)break;le=re,re=re-1,ue="right"}w&&l<11&&(ve=Wt(e.display.measure,ve))}else{re>0&&(ue=A="right");var Fe;e.options.lineWrapping&&(Fe=V.getClientRects()).length>1?ve=Fe[A=="right"?Fe.length-1:0]:ve=V.getBoundingClientRect()}if(w&&l<9&&!re&&(!ve||!ve.left&&!ve.right)){var nt=V.parentNode.getClientRects()[0];nt?ve={left:nt.left,right:nt.left+Vn(e.display),top:nt.top,bottom:nt.bottom}:ve=ot}for(var Ze=ve.top-t.rect.top,lt=ve.bottom-t.rect.top,dt=(Ze+lt)/2,bt=t.view.measure.heights,wt=0;wt<bt.length-1&&!(dt<bt[wt]);wt++);var At=wt?bt[wt-1]:0,Tt=bt[wt],Pt={left:(ue=="right"?ve.right:ve.left)-t.rect.left,right:(ue=="left"?ve.left:ve.right)-t.rect.left,top:At,bottom:Tt};return!ve.left&&!ve.right&&(Pt.bogus=!0),e.options.singleCursorHeightPerLine||(Pt.rtop=Ze,Pt.rbottom=lt),Pt}function Wt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ct(e))return t;var D=screen.logicalXDPI/screen.deviceXDPI,A=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*D,right:t.right*D,top:t.top*A,bottom:t.bottom*A}}function ar(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 or(e){e.display.externalMeasure=null,x(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ar(e.display.view[t])}function ur(e){or(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function vr(){return r&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pr(){return r&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function cr(e){var t=0;if(e.widgets)for(var D=0;D<e.widgets.length;++D)e.widgets[D].above&&(t+=In(e.widgets[D]));return t}function Ar(e,t,D,A,U){if(!U){var V=cr(t);D.top+=V,D.bottom+=V}if(A=="line")return D;A||(A="local");var re=kn(t);if(A=="local"?re+=Ka(e.display):re-=e.display.viewOffset,A=="page"||A=="window"){var le=e.display.lineSpace.getBoundingClientRect();re+=le.top+(A=="window"?0:pr());var ue=le.left+(A=="window"?0:vr());D.left+=ue,D.right+=ue}return D.top+=re,D.bottom+=re,D}function wr(e,t,D){if(D=="div")return t;var A=t.left,U=t.top;if(D=="page")A-=vr(),U-=pr();else if(D=="local"||!D){var V=e.display.sizer.getBoundingClientRect();A+=V.left,U+=V.top}var re=e.display.lineSpace.getBoundingClientRect();return{left:A-re.left,top:U-re.top}}function mn(e,t,D,A,U){return A||(A=mt(e.doc,t.line)),Ar(e,A,Ne(e,A,t.ch,U),D)}function Tr(e,t,D,A,U,V){A=A||mt(e.doc,t.line),U||(U=We(e,A));function re(lt,dt){var bt=Qe(e,U,lt,dt?"right":"left",V);return dt?bt.left=bt.right:bt.right=bt.left,Ar(e,A,bt,D)}var le=rt(A,e.doc.direction),ue=t.ch,ve=t.sticky;if(ue>=A.text.length?(ue=A.text.length,ve="before"):ue<=0&&(ue=0,ve="after"),!le)return re(ve=="before"?ue-1:ue,ve=="before");function Ie(lt,dt,bt){var wt=le[dt],At=wt.level==1;return re(bt?lt-1:lt,At!=bt)}var Fe=Ve(le,ue,ve),nt=Ye,Ze=Ie(ue,Fe,ve=="before");return nt!=null&&(Ze.other=Ie(ue,nt,ve!="before")),Ze}function Vt(e,t){var D=0;t=Ot(e.doc,t),e.options.lineWrapping||(D=Vn(e.display)*t.ch);var A=mt(e.doc,t.line),U=kn(A)+Ka(e.display);return{left:D,right:D,top:U,bottom:U+A.height}}function zt(e,t,D,A,U){var V=ut(e,t,D);return V.xRel=U,A&&(V.outside=A),V}function Sr(e,t,D){var A=e.doc;if(D+=e.display.viewOffset,D<0)return zt(A.first,0,null,-1,-1);var U=Er(A,D),V=A.first+A.size-1;if(U>V)return zt(A.first+A.size-1,mt(A,V).text.length,null,1,1);t<0&&(t=0);for(var re=mt(A,U);;){var le=vn(e,re,U,t,D),ue=Fa(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ue)return le;var ve=ue.find(1);if(ve.line==U)return ve;re=mt(A,U=ve.line)}}function Rr(e,t,D,A){A-=cr(t);var U=t.text.length,V=ze(function(re){return Qe(e,D,re-1).bottom<=A},U,0);return U=ze(function(re){return Qe(e,D,re).top>A},V,U),{begin:V,end:U}}function jt(e,t,D,A){D||(D=We(e,t));var U=Ar(e,t,Qe(e,D,A),"line").top;return Rr(e,t,D,U)}function Mr(e,t,D,A){return e.bottom<=D?!1:e.top>D?!0:(A?e.left:e.right)>t}function vn(e,t,D,A,U){U-=kn(t);var V=We(e,t),re=cr(t),le=0,ue=t.text.length,ve=!0,Ie=rt(t,e.doc.direction);if(Ie){var Fe=(e.options.lineWrapping?Zr:jr)(e,t,D,V,Ie,A,U);ve=Fe.level!=1,le=ve?Fe.from:Fe.to-1,ue=ve?Fe.to:Fe.from-1}var nt=null,Ze=null,lt=ze(function(Qt){var Gt=Qe(e,V,Qt);return Gt.top+=re,Gt.bottom+=re,Mr(Gt,A,U,!1)?(Gt.top<=U&&Gt.left<=A&&(nt=Qt,Ze=Gt),!0):!1},le,ue),dt,bt,wt=!1;if(Ze){var At=A-Ze.left<Ze.right-A,Tt=At==ve;lt=nt+(Tt?0:1),bt=Tt?"after":"before",dt=At?Ze.left:Ze.right}else{!ve&&(lt==ue||lt==le)&&lt++,bt=lt==0?"after":lt==t.text.length?"before":Qe(e,V,lt-(ve?1:0)).bottom+re<=U==ve?"after":"before";var Pt=Tr(e,ut(D,lt,bt),"line",t,V);dt=Pt.left,wt=U<Pt.top?-1:U>=Pt.bottom?1:0}return lt=Ce(t.text,lt,1),zt(D,lt,bt,wt,A-dt)}function jr(e,t,D,A,U,V,re){var le=ze(function(Fe){var nt=U[Fe],Ze=nt.level!=1;return Mr(Tr(e,ut(D,Ze?nt.to:nt.from,Ze?"before":"after"),"line",t,A),V,re,!0)},0,U.length-1),ue=U[le];if(le>0){var ve=ue.level!=1,Ie=Tr(e,ut(D,ve?ue.from:ue.to,ve?"after":"before"),"line",t,A);Mr(Ie,V,re,!0)&&Ie.top>re&&(ue=U[le-1])}return ue}function Zr(e,t,D,A,U,V,re){var le=Rr(e,t,A,re),ue=le.begin,ve=le.end;/\s/.test(t.text.charAt(ve-1))&&ve--;for(var Ie=null,Fe=null,nt=0;nt<U.length;nt++){var Ze=U[nt];if(Ze.from>=ve||Ze.to<=ue)continue;var lt=Ze.level!=1,dt=Qe(e,A,lt?Math.min(ve,Ze.to)-1:Math.max(ue,Ze.from)).right,bt=dt<V?V-dt+1e9:dt-V;(!Ie||Fe>bt)&&(Ie=Ze,Fe=bt)}return Ie||(Ie=U[U.length-1]),Ie.from<ue&&(Ie={from:ue,to:Ie.to,level:Ie.level}),Ie.to>ve&&(Ie={from:Ie.from,to:ve,level:Ie.level}),Ie}var Vr;function Dn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Vr==null){Vr=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Vr.appendChild(document.createTextNode("x")),Vr.appendChild(_("br"));Vr.appendChild(document.createTextNode("x"))}E(e.measure,Vr);var D=Vr.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),x(e.measure),D||1}function Vn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),D=_("pre",[t],"CodeMirror-line-like");E(e.measure,D);var A=t.getBoundingClientRect(),U=(A.right-A.left)/10;return U>2&&(e.cachedCharWidth=U),U||10}function xn(e){for(var t=e.display,D={},A={},U=t.gutters.clientLeft,V=t.gutters.firstChild,re=0;V;V=V.nextSibling,++re){var le=e.display.gutterSpecs[re].className;D[le]=V.offsetLeft+V.clientLeft+U,A[le]=V.clientWidth}return{fixedPos:ma(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:D,gutterWidth:A,wrapperWidth:t.wrapper.clientWidth}}function ma(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ka(e){var t=Dn(e.display),D=e.options.lineWrapping,A=D&&Math.max(5,e.display.scroller.clientWidth/Vn(e.display)-3);return function(U){if(Bn(e.doc,U))return 0;var V=0;if(U.widgets)for(var re=0;re<U.widgets.length;re++)U.widgets[re].height&&(V+=U.widgets[re].height);return D?V+(Math.ceil(U.text.length/A)||1)*t:V+t}}function ba(e){var t=e.doc,D=ka(e);t.iter(function(A){var U=D(A);U!=A.height&&Bt(A,U)})}function Yn(e,t,D,A){var U=e.display;if(!D&&je(t).getAttribute("cm-not-content")=="true")return null;var V,re,le=U.lineSpace.getBoundingClientRect();try{V=t.clientX-le.left,re=t.clientY-le.top}catch(Fe){return null}var ue=Sr(e,V,re),ve;if(A&&ue.xRel>0&&(ve=mt(e.doc,ue.line).text).length==ue.ch){var Ie=W(ve,ve.length,e.options.tabSize)-ve.length;ue=ut(ue.line,Math.max(0,Math.round((V-Be(e.display).left)/Vn(e.display))-Ie))}return ue}function ln(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var D=e.display.view,A=0;A<D.length;A++)if(t-=D[A].size,t<0)return A}function qr(e,t,D,A){t==null&&(t=e.doc.first),D==null&&(D=e.doc.first+e.doc.size),A||(A=0);var U=e.display;if(A&&D<U.viewTo&&(U.updateLineNumbers==null||U.updateLineNumbers>t)&&(U.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=U.viewTo)Kt&&Gn(e.doc,t)<U.viewTo&&gn(e);else if(D<=U.viewFrom)Kt&&ya(e.doc,D+A)>U.viewFrom?gn(e):(U.viewFrom+=A,U.viewTo+=A);else if(t<=U.viewFrom&&D>=U.viewTo)gn(e);else if(t<=U.viewFrom){var V=Ia(e,D,D+A,1);V?(U.view=U.view.slice(V.index),U.viewFrom=V.lineN,U.viewTo+=A):gn(e)}else if(D>=U.viewTo){var re=Ia(e,t,t,-1);re?(U.view=U.view.slice(0,re.index),U.viewTo=re.lineN):gn(e)}else{var le=Ia(e,t,t,-1),ue=Ia(e,D,D+A,1);le&&ue?(U.view=U.view.slice(0,le.index).concat(Gr(e,le.lineN,ue.lineN)).concat(U.view.slice(ue.index)),U.viewTo+=A):gn(e)}var ve=U.externalMeasured;ve&&(D<ve.lineN?ve.lineN+=A:t<ve.lineN+ve.size&&(U.externalMeasured=null))}function wn(e,t,D){e.curOp.viewChanged=!0;var A=e.display,U=e.display.externalMeasured;if(U&&t>=U.lineN&&t<U.lineN+U.size&&(A.externalMeasured=null),t<A.viewFrom||t>=A.viewTo)return;var V=A.view[ln(e,t)];if(V.node==null)return;var re=V.changes||(V.changes=[]);ee(re,D)==-1&&re.push(D)}function gn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ia(e,t,D,A){var U=ln(e,t),V,re=e.display.view;if(!Kt||D==e.doc.first+e.doc.size)return{index:U,lineN:D};for(var le=e.display.viewFrom,ue=0;ue<U;ue++)le+=re[ue].size;if(le!=t){if(A>0){if(U==re.length-1)return null;V=le+re[U].size-t,U++}else V=le-t;t+=V,D+=V}for(;Gn(e.doc,D)!=D;){if(U==(A<0?0:re.length-1))return null;D+=A*re[U-(A<0?1:0)].size,U+=A}return{index:U,lineN:D}}function ri(e,t,D){var A=e.display,U=A.view;U.length==0||t>=A.viewTo||D<=A.viewFrom?(A.view=Gr(e,t,D),A.viewFrom=t):(A.viewFrom>t?A.view=Gr(e,t,A.viewFrom).concat(A.view):A.viewFrom<t&&(A.view=A.view.slice(ln(e,t))),A.viewFrom=t,A.viewTo<D?A.view=A.view.concat(Gr(e,A.viewTo,D)):A.viewTo>D&&(A.view=A.view.slice(0,ln(e,D)))),A.viewTo=D}function ni(e){for(var t=e.display.view,D=0,A=0;A<t.length;A++){var U=t[A];!U.hidden&&(!U.node||U.changes)&&++D}return D}function Yr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function za(e,t){t===void 0&&(t=!0);for(var D=e.doc,A={},U=A.cursors=document.createDocumentFragment(),V=A.selection=document.createDocumentFragment(),re=0;re<D.sel.ranges.length;re++){if(!t&&re==D.sel.primIndex)continue;var le=D.sel.ranges[re];if(le.from().line>=e.display.viewTo||le.to().line<e.display.viewFrom)continue;var ue=le.empty();(ue||e.options.showCursorWhenSelecting)&&ai(e,le.head,U),ue||Xr(e,le,V)}return A}function ai(e,t,D){var A=Tr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),U=D.appendChild(_("div","\xA0","CodeMirror-cursor"));if(U.style.left=A.left+"px",U.style.top=A.top+"px",U.style.height=Math.max(0,A.bottom-A.top)*e.options.cursorHeight+"px",A.other){var V=D.appendChild(_("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));V.style.display="",V.style.left=A.other.left+"px",V.style.top=A.other.top+"px",V.style.height=(A.other.bottom-A.other.top)*.85+"px"}}function nn(e,t){return e.top-t.top||e.left-t.left}function Xr(e,t,D){var A=e.display,U=e.doc,V=document.createDocumentFragment(),re=Be(e.display),le=re.left,ue=Math.max(A.sizerWidth,Le(e)-A.sizer.offsetLeft)-re.right,ve=U.direction=="ltr";function Ie(Tt,Pt,Qt,Gt){Pt<0&&(Pt=0),Pt=Math.round(Pt),Gt=Math.round(Gt),V.appendChild(_("div",null,"CodeMirror-selected","position: absolute; left: "+Tt+`px;
top: `+Pt+"px; width: "+(Qt==null?ue-Tt:Qt)+`px;
height: `+(Gt-Pt)+"px"))}function Fe(Tt,Pt,Qt){var Gt=mt(U,Tt),br=Gt.text.length,un,qn;function On(Hn,Ra){return mn(e,ut(Tt,Hn),"div",Gt,Ra)}function Pa(Hn,Ra,ua){var Zn=jt(e,Gt,null,Hn),Kn=Ra=="ltr"==(ua=="after")?"left":"right",Mn=ua=="after"?Zn.begin:Zn.end-(/\s/.test(Gt.text.charAt(Zn.end-1))?2:1);return On(Mn,Kn)[Kn]}var Aa=rt(Gt,U.direction);return qe(Aa,Pt||0,Qt==null?br:Qt,function(Hn,Ra,ua,Zn){var Kn=ua=="ltr",Mn=On(Hn,Kn?"left":"right"),Da=On(Ra-1,Kn?"right":"left"),Zi=Pt==null&&Hn==0,_i=Qt==null&&Ra==br,ga=Zn==0,ui=!Aa||Zn==Aa.length-1;if(Da.top-Mn.top<=3){var ea=(ve?Zi:_i)&&ga,ps=(ve?_i:Zi)&&ui,vi=ea?le:(Kn?Mn:Da).left,Li=ps?ue:(Kn?Da:Mn).right;Ie(vi,Mn.top,Li-vi,Mn.bottom)}else{var Pi,Ta,qi,ms;Kn?(Pi=ve&&Zi&&ga?le:Mn.left,Ta=ve?ue:Pa(Hn,ua,"before"),qi=ve?le:Pa(Ra,ua,"after"),ms=ve&&_i&&ui?ue:Da.right):(Pi=ve?Pa(Hn,ua,"before"):le,Ta=!ve&&Zi&&ga?ue:Mn.right,qi=!ve&&_i&&ui?le:Da.left,ms=ve?Pa(Ra,ua,"after"):ue),Ie(Pi,Mn.top,Ta-Pi,Mn.bottom),Mn.bottom<Da.top&&Ie(le,Mn.bottom,null,Da.top),Ie(qi,Da.top,ms-qi,Da.bottom)}(!un||nn(Mn,un)<0)&&(un=Mn),nn(Da,un)<0&&(un=Da),(!qn||nn(Mn,qn)<0)&&(qn=Mn),nn(Da,qn)<0&&(qn=Da)}),{start:un,end:qn}}var nt=t.from(),Ze=t.to();if(nt.line==Ze.line)Fe(nt.line,nt.ch,Ze.ch);else{var lt=mt(U,nt.line),dt=mt(U,Ze.line),bt=_n(lt)==_n(dt),wt=Fe(nt.line,nt.ch,bt?lt.text.length+1:null).end,At=Fe(Ze.line,bt?0:null,Ze.ch).start;bt&&(wt.top<At.top-2?(Ie(wt.right,wt.top,null,wt.bottom),Ie(le,At.top,At.left,At.bottom)):Ie(wt.right,wt.top,At.left-wt.right,wt.bottom)),wt.bottom<At.top&&Ie(le,wt.bottom,null,At.top)}D.appendChild(V)}function $n(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var D=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||gi(e),t.cursorDiv.style.visibility=(D=!D)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Co(e){e.state.focused||(e.display.input.focus(),ii(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,gi(e))},100)}function ii(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ue(e,"focus",e,t),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),i&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),$n(e)}function gi(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ue(e,"blur",e,t),e.state.focused=!1,y(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ki(e){for(var t=e.display,D=t.lineDiv.offsetTop,A=0;A<t.view.length;A++){var U=t.view[A],V=e.options.lineWrapping,re=void 0,le=0;if(U.hidden)continue;if(w&&l<8){var ue=U.node.offsetTop+U.node.offsetHeight;re=ue-D,D=ue}else{var ve=U.node.getBoundingClientRect();re=ve.bottom-ve.top,!V&&U.text.firstChild&&(le=U.text.firstChild.getBoundingClientRect().right-ve.left-1)}var Ie=U.line.height-re;if((Ie>.005||Ie<-.005)&&(Bt(U.line,re),to(U.line),U.rest))for(var Fe=0;Fe<U.rest.length;Fe++)to(U.rest[Fe]);if(le>e.display.sizerWidth){var nt=Math.ceil(le/Vn(e.display));nt>e.display.maxLineLength&&(e.display.maxLineLength=nt,e.display.maxLine=U.line,e.display.maxLineChanged=!0)}}}function to(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var D=e.widgets[t],A=D.node.parentNode;A&&(D.height=A.offsetHeight)}}function Ii(e,t,D){var A=D&&D.top!=null?Math.max(0,D.top):e.scroller.scrollTop;A=Math.floor(A-Ka(e));var U=D&&D.bottom!=null?D.bottom:A+e.wrapper.clientHeight,V=Er(t,A),re=Er(t,U);if(D&&D.ensure){var le=D.ensure.from.line,ue=D.ensure.to.line;le<V?(V=le,re=Er(t,kn(mt(t,le))+e.wrapper.clientHeight)):Math.min(ue,t.lastLine())>=re&&(V=Er(t,kn(mt(t,ue))-e.wrapper.clientHeight),re=ue)}return{from:V,to:Math.max(re,V+1)}}function Vo(e,t){if(Xe(e,"scrollCursorIntoView"))return;var D=e.display,A=D.sizer.getBoundingClientRect(),U=null;if(t.top+A.top<0?U=!0:t.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(U=!1),U!=null&&!b){var V=_("div","\u200B",null,`position: absolute;
top: `+(t.top-D.viewOffset-Ka(e.display))+`px;
height: `+(t.bottom-t.top+Ke(e)+D.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(V),V.scrollIntoView(U),e.display.lineSpace.removeChild(V)}}function Yo(e,t,D,A){A==null&&(A=0);var U;!e.options.lineWrapping&&t==D&&(t=t.ch?ut(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,D=t.sticky=="before"?ut(t.line,t.ch+1,"before"):t);for(var V=0;V<5;V++){var re=!1,le=Tr(e,t),ue=!D||D==t?le:Tr(e,D);U={left:Math.min(le.left,ue.left),top:Math.min(le.top,ue.top)-A,right:Math.max(le.left,ue.left),bottom:Math.max(le.bottom,ue.bottom)+A};var ve=ro(e,U),Ie=e.doc.scrollTop,Fe=e.doc.scrollLeft;if(ve.scrollTop!=null&&(Ei(e,ve.scrollTop),Math.abs(e.doc.scrollTop-Ie)>1&&(re=!0)),ve.scrollLeft!=null&&(Na(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-Fe)>1&&(re=!0)),!re)break}return U}function _o(e,t){var D=ro(e,t);D.scrollTop!=null&&Ei(e,D.scrollTop),D.scrollLeft!=null&&Na(e,D.scrollLeft)}function ro(e,t){var D=e.display,A=Dn(e.display);t.top<0&&(t.top=0);var U=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:D.scroller.scrollTop,V=fe(e),re={};t.bottom-t.top>V&&(t.bottom=t.top+V);var le=e.doc.height+Re(D),ue=t.top<A,ve=t.bottom>le-A;if(t.top<U)re.scrollTop=ue?0:t.top;else if(t.bottom>U+V){var Ie=Math.min(t.top,(ve?le:t.bottom)-V);Ie!=U&&(re.scrollTop=Ie)}var Fe=e.options.fixedGutter?0:D.gutters.offsetWidth,nt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-Fe,Ze=Le(e)-D.gutters.offsetWidth,lt=t.right-t.left>Ze;return lt&&(t.right=t.left+Ze),t.left<10?re.scrollLeft=0:t.left<nt?re.scrollLeft=Math.max(0,t.left+Fe-(lt?0:10)):t.right>Ze+nt-3&&(re.scrollLeft=t.right+(lt?0:10)-Ze),re}function no(e,t){if(t==null)return;Ni(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function yi(e){Ni(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function bi(e,t,D){(t!=null||D!=null)&&Ni(e),t!=null&&(e.curOp.scrollLeft=t),D!=null&&(e.curOp.scrollTop=D)}function $o(e,t){Ni(e),e.curOp.scrollToPos=t}function Ni(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var D=Vt(e,t.from),A=Vt(e,t.to);Oi(e,D,A,t.margin)}}function Oi(e,t,D,A){var U=ro(e,{left:Math.min(t.left,D.left),top:Math.min(t.top,D.top)-A,right:Math.max(t.right,D.right),bottom:Math.max(t.bottom,D.bottom)+A});bi(e,U.scrollLeft,U.scrollTop)}function Ei(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;S||Di(e,{top:t}),xi(e,t,!0),S&&Di(e),Ri(e,100)}function xi(e,t,D){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!D)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Na(e,t,D,A){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(D?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!A)return;e.doc.scrollLeft=t,_r(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ci(e){var t=e.display,D=t.gutters.offsetWidth,A=Math.round(e.doc.height+Re(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?D:0,docHeight:A,scrollHeight:A+Ke(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:D}}var oi=function(e,t,D){this.cm=D;var A=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),U=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=U.tabIndex=-1,e(A),e(U),Se(A,"scroll",function(){A.clientHeight&&t(A.scrollTop,"vertical")}),Se(U,"scroll",function(){U.clientWidth&&t(U.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};oi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,D=e.scrollHeight>e.clientHeight+1,A=e.nativeBarWidth;if(D){this.vert.style.display="block",this.vert.style.bottom=t?A+"px":"0";var U=e.viewHeight-(t?A:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+U)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=D?A+"px":"0",this.horiz.style.left=e.barLeft+"px";var V=e.viewWidth-e.barLeft-(D?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+V)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(A==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:D?A:0,bottom:t?A:0}},oi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},oi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},oi.prototype.zeroWidthHack=function(){var e=d&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new J,this.disableVert=new J},oi.prototype.enableZeroWidthBar=function(e,t,D){e.style.pointerEvents="auto";function A(){var U=e.getBoundingClientRect(),V=D=="vert"?document.elementFromPoint(U.right-1,(U.top+U.bottom)/2):document.elementFromPoint((U.right+U.left)/2,U.bottom-1);V!=e?e.style.pointerEvents="none":t.set(1e3,A)}t.set(1e3,A)},oi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ai=function(){};Ai.prototype.update=function(){return{bottom:0,right:0}},Ai.prototype.setScrollLeft=function(){},Ai.prototype.setScrollTop=function(){},Ai.prototype.clear=function(){};function di(e,t){t||(t=ci(e));var D=e.display.barWidth,A=e.display.barHeight;ji(e,t);for(var U=0;U<4&&D!=e.display.barWidth||A!=e.display.barHeight;U++)D!=e.display.barWidth&&e.options.lineWrapping&&ki(e),ji(e,ci(e)),D=e.display.barWidth,A=e.display.barHeight}function ji(e,t){var D=e.display,A=D.scrollbars.update(t);D.sizer.style.paddingRight=(D.barWidth=A.right)+"px",D.sizer.style.paddingBottom=(D.barHeight=A.bottom)+"px",D.heightForcer.style.borderBottom=A.bottom+"px solid transparent",A.right&&A.bottom?(D.scrollbarFiller.style.display="block",D.scrollbarFiller.style.height=A.bottom+"px",D.scrollbarFiller.style.width=A.right+"px"):D.scrollbarFiller.style.display="",A.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(D.gutterFiller.style.display="block",D.gutterFiller.style.height=A.bottom+"px",D.gutterFiller.style.width=t.gutterWidth+"px"):D.gutterFiller.style.display=""}var ao={native:oi,null:Ai};function Ui(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&y(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ao[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Se(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,D){D=="horizontal"?Na(e,t):Ei(e,t)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var io=0;function si(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++io},fr(e.curOp)}function fi(e){var t=e.curOp;t&&Nt(t,function(D){for(var A=0;A<D.ops.length;A++)D.ops[A].cm.curOp=null;Oo(D)})}function Oo(e){for(var t=e.ops,D=0;D<t.length;D++)Jo(t[D]);for(var A=0;A<t.length;A++)Qo(t[A]);for(var U=0;U<t.length;U++)Zo(t[U]);for(var V=0;V<t.length;V++)oo(t[V]);for(var re=0;re<t.length;re++)qo(t[re])}function Jo(e){var t=e.cm,D=t.display;Ao(t),e.updateMaxLine&&sa(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<D.viewFrom||e.scrollToPos.to.line>=D.viewTo)||D.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ja(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&hi(e.cm,e.update)}function Zo(e){var t=e.cm,D=t.display;e.updatedDisplay&&ki(t),e.barMeasure=ci(t),D.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ne(t,D.maxLine,D.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(D.scroller.clientWidth,D.sizer.offsetLeft+e.adjustWidthTo+Ke(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-Le(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=D.input.prepareSelection())}function oo(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Na(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var D=e.focus&&e.focus==H();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,D),(e.updatedDisplay||e.startHeight!=t.doc.height)&&di(t,e.barMeasure),e.updatedDisplay&&Br(t,e.barMeasure),e.selectionChanged&&$n(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),D&&Co(e.cm)}function qo(e){var t=e.cm,D=t.display,A=t.doc;if(e.updatedDisplay&&Fi(t,e.update),D.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(D.wheelStartX=D.wheelStartY=null),e.scrollTop!=null&&xi(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Na(t,e.scrollLeft,!0,!0),e.scrollToPos){var U=Yo(t,Ot(A,e.scrollToPos.from),Ot(A,e.scrollToPos.to),e.scrollToPos.margin);Vo(t,U)}var V=e.maybeHiddenMarkers,re=e.maybeUnhiddenMarkers;if(V)for(var le=0;le<V.length;++le)V[le].lines.length||Ue(V[le],"hide");if(re)for(var ue=0;ue<re.length;++ue)re[ue].lines.length&&Ue(re[ue],"unhide");D.wrapper.offsetHeight&&(A.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ue(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Ea(e,t){if(e.curOp)return t();si(e);try{return t()}finally{fi(e)}}function Nn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);si(e);try{return t.apply(e,arguments)}finally{fi(e)}}}function la(e){return function(){if(this.curOp)return e.apply(this,arguments);si(this);try{return e.apply(this,arguments)}finally{fi(this)}}}function jn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);si(t);try{return e.apply(this,arguments)}finally{fi(t)}}}function Ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(es,e))}function es(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var D=+new Date+e.options.workTime,A=ft(e,t.highlightFrontier),U=[];t.iter(A.line,Math.min(t.first+t.size,e.display.viewTo+500),function(V){if(A.line>=e.display.viewFrom){var re=V.styles,le=V.text.length>e.options.maxHighlightLength?gr(t.mode,A.state):null,ue=ta(e,V,A,!0);le&&(A.state=le),V.styles=ue.styles;var ve=V.styleClasses,Ie=ue.classes;Ie?V.styleClasses=Ie:ve&&(V.styleClasses=null);for(var Fe=!re||re.length!=V.styles.length||ve!=Ie&&(!ve||!Ie||ve.bgClass!=Ie.bgClass||ve.textClass!=Ie.textClass),nt=0;!Fe&&nt<re.length;++nt)Fe=re[nt]!=V.styles[nt];Fe&&U.push(A.line),V.stateAfter=A.save(),A.nextLine()}else V.text.length<=e.options.maxHighlightLength&&ca(e,V.text,A),V.stateAfter=A.line%5==0?A.save():null,A.nextLine();if(+new Date>D)return Ri(e,e.options.workDelay),!0}),t.highlightFrontier=A.line,t.modeFrontier=Math.max(t.modeFrontier,A.line),U.length&&Ea(e,function(){for(var V=0;V<U.length;V++)wn(e,U[V],"text")})}var ja=function(e,t,D){var A=e.display;this.viewport=t,this.visible=Ii(A,e.doc,t),this.editorIsHidden=!A.wrapper.offsetWidth,this.wrapperHeight=A.wrapper.clientHeight,this.wrapperWidth=A.wrapper.clientWidth,this.oldDisplayWidth=Le(e),this.force=D,this.dims=xn(e),this.events=[]};ja.prototype.signal=function(e,t){Te(e,t)&&this.events.push(arguments)},ja.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ue.apply(null,this.events[e])};function Ao(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ke(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ke(e)+"px",t.scrollbarsClipped=!0)}function Ro(e){if(e.hasFocus())return null;var t=H();if(!t||!M(e.display.lineDiv,t))return null;var D={activeElt:t};if(window.getSelection){var A=window.getSelection();A.anchorNode&&A.extend&&M(e.display.lineDiv,A.anchorNode)&&(D.anchorNode=A.anchorNode,D.anchorOffset=A.anchorOffset,D.focusNode=A.focusNode,D.focusOffset=A.focusOffset)}return D}function Do(e){if(!e||!e.activeElt||e.activeElt==H())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode)){var t=window.getSelection(),D=document.createRange();D.setEnd(e.anchorNode,e.anchorOffset),D.collapse(!1),t.removeAllRanges(),t.addRange(D),t.extend(e.focusNode,e.focusOffset)}}function hi(e,t){var D=e.display,A=e.doc;if(t.editorIsHidden)return gn(e),!1;if(!t.force&&t.visible.from>=D.viewFrom&&t.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&ni(e)==0)return!1;Jn(e)&&(gn(e),t.dims=xn(e));var U=A.first+A.size,V=Math.max(t.visible.from-e.options.viewportMargin,A.first),re=Math.min(U,t.visible.to+e.options.viewportMargin);D.viewFrom<V&&V-D.viewFrom<20&&(V=Math.max(A.first,D.viewFrom)),D.viewTo>re&&D.viewTo-re<20&&(re=Math.min(U,D.viewTo)),Kt&&(V=Gn(e.doc,V),re=ya(e.doc,re));var le=V!=D.viewFrom||re!=D.viewTo||D.lastWrapHeight!=t.wrapperHeight||D.lastWrapWidth!=t.wrapperWidth;ri(e,V,re),D.viewOffset=kn(mt(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var ue=ni(e);if(!le&&ue==0&&!t.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var ve=Ro(e);return ue>4&&(D.lineDiv.style.display="none"),Mo(e,D.updateLineNumbers,t.dims),ue>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,Do(ve),x(D.cursorDiv),x(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,le&&(D.lastWrapHeight=t.wrapperHeight,D.lastWrapWidth=t.wrapperWidth,Ri(e,400)),D.updateLineNumbers=null,!0}function Fi(e,t){for(var D=t.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||t.oldDisplayWidth==Le(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+Re(e.display)-fe(e),D.top)}),t.visible=Ii(e.display,e.doc,D),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else A&&(t.visible=Ii(e.display,e.doc,D));if(!hi(e,t))break;ki(e);var U=ci(e);Yr(e),di(e,U),Br(e,U),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Di(e,t){var D=new ja(e,t);if(hi(e,D)){ki(e),Fi(e,D);var A=ci(e);Yr(e),di(e,A),Br(e,A),D.finish()}}function Mo(e,t,D){var A=e.display,U=e.options.lineNumbers,V=A.lineDiv,re=V.firstChild;function le(lt){var dt=lt.nextSibling;return i&&d&&e.display.currentWheelTarget==lt?lt.style.display="none":lt.parentNode.removeChild(lt),dt}for(var ue=A.view,ve=A.viewFrom,Ie=0;Ie<ue.length;Ie++){var Fe=ue[Ie];if(!Fe.hidden)if(!Fe.node||Fe.node.parentNode!=V){var nt=pn(e,Fe,ve,D);V.insertBefore(nt,re)}else{for(;re!=Fe.node;)re=le(re);var Ze=U&&t!=null&&t<=ve&&Fe.lineNumber;Fe.changes&&(ee(Fe.changes,"gutter")>-1&&(Ze=!1),Wa(e,Fe,ve,D)),Ze&&(x(Fe.lineNumber),Fe.lineNumber.appendChild(document.createTextNode(Ir(e.options,ve)))),re=Fe.node.nextSibling}ve+=Fe.size}for(;re;)re=le(re)}function Bi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Br(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ke(e)+"px"}function _r(e){var t=e.display,D=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var A=ma(t)-t.scroller.scrollLeft+e.doc.scrollLeft,U=t.gutters.offsetWidth,V=A+"px",re=0;re<D.length;re++)if(!D[re].hidden){e.options.fixedGutter&&(D[re].gutter&&(D[re].gutter.style.left=V),D[re].gutterBackground&&(D[re].gutterBackground.style.left=V));var le=D[re].alignable;if(le)for(var ue=0;ue<le.length;ue++)le[ue].style.left=V}e.options.fixedGutter&&(t.gutters.style.left=A+U+"px")}function Jn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,D=Ir(e.options,t.first+t.size-1),A=e.display;if(D.length!=A.lineNumChars){var U=A.measure.appendChild(_("div",[_("div",D)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=U.firstChild.offsetWidth,re=U.offsetWidth-V;return A.lineGutter.style.width="",A.lineNumInnerWidth=Math.max(V,A.lineGutter.offsetWidth-re)+1,A.lineNumWidth=A.lineNumInnerWidth+re,A.lineNumChars=A.lineNumInnerWidth?D.length:-1,A.lineGutter.style.width=A.lineNumWidth+"px",Bi(e.display),!0}return!1}function xa(e,t){for(var D=[],A=!1,U=0;U<e.length;U++){var V=e[U],re=null;if(typeof V!="string"&&(re=V.style,V=V.className),V=="CodeMirror-linenumbers")if(t)A=!0;else continue;D.push({className:V,style:re})}return t&&!A&&D.push({className:"CodeMirror-linenumbers",style:null}),D}function wi(e){var t=e.gutters,D=e.gutterSpecs;x(t),e.lineGutter=null;for(var A=0;A<D.length;++A){var U=D[A],V=U.className,re=U.style,le=t.appendChild(_("div",null,"CodeMirror-gutter "+V));re&&(le.style.cssText=re),V=="CodeMirror-linenumbers"&&(e.lineGutter=le,le.style.width=(e.lineNumWidth||1)+"px")}t.style.display=D.length?"":"none",Bi(e)}function Ja(e){wi(e.display),qr(e),_r(e)}function Mi(e,t,D,A){var U=this;this.input=D,U.scrollbarFiller=_("div",null,"CodeMirror-scrollbar-filler"),U.scrollbarFiller.setAttribute("cm-not-content","true"),U.gutterFiller=_("div",null,"CodeMirror-gutter-filler"),U.gutterFiller.setAttribute("cm-not-content","true"),U.lineDiv=N("div",null,"CodeMirror-code"),U.selectionDiv=_("div",null,null,"position: relative; z-index: 1"),U.cursorDiv=_("div",null,"CodeMirror-cursors"),U.measure=_("div",null,"CodeMirror-measure"),U.lineMeasure=_("div",null,"CodeMirror-measure"),U.lineSpace=N("div",[U.measure,U.lineMeasure,U.selectionDiv,U.cursorDiv,U.lineDiv],null,"position: relative; outline: none");var V=N("div",[U.lineSpace],"CodeMirror-lines");U.mover=_("div",[V],null,"position: relative"),U.sizer=_("div",[U.mover],"CodeMirror-sizer"),U.sizerWidth=null,U.heightForcer=_("div",null,null,"position: absolute; height: "+Z+"px; width: 1px;"),U.gutters=_("div",null,"CodeMirror-gutters"),U.lineGutter=null,U.scroller=_("div",[U.sizer,U.heightForcer,U.gutters],"CodeMirror-scroll"),U.scroller.setAttribute("tabIndex","-1"),U.wrapper=_("div",[U.scrollbarFiller,U.gutterFiller,U.scroller],"CodeMirror"),w&&l<8&&(U.gutters.style.zIndex=-1,U.scroller.style.paddingRight=0),!i&&!(S&&n)&&(U.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(U.wrapper):e(U.wrapper)),U.viewFrom=U.viewTo=t.first,U.reportedViewFrom=U.reportedViewTo=t.first,U.view=[],U.renderedView=null,U.externalMeasured=null,U.viewOffset=0,U.lastWrapHeight=U.lastWrapWidth=0,U.updateLineNumbers=null,U.nativeBarWidth=U.barHeight=U.barWidth=0,U.scrollbarsClipped=!1,U.lineNumWidth=U.lineNumInnerWidth=U.lineNumChars=null,U.alignWidgets=!1,U.cachedCharWidth=U.cachedTextHeight=U.cachedPaddingH=null,U.maxLine=null,U.maxLineLength=0,U.maxLineChanged=!1,U.wheelDX=U.wheelDY=U.wheelStartX=U.wheelStartY=null,U.shift=!1,U.selForContextMenu=null,U.activeTouch=null,U.gutterSpecs=xa(A.gutters,A.lineNumbers),wi(U),D.init(U)}var li=0,Qn=null;w?Qn=-.53:S?Qn=15:r?Qn=-.7:p&&(Qn=-1/3);function Wi(e){var t=e.wheelDeltaX,D=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),D==null&&e.detail&&e.axis==e.VERTICAL_AXIS?D=e.detail:D==null&&(D=e.wheelDelta),{x:t,y:D}}function so(e){var t=Wi(e);return t.x*=Qn,t.y*=Qn,t}function lo(e,t){var D=Wi(t),A=D.x,U=D.y,V=e.display,re=V.scroller,le=re.scrollWidth>re.clientWidth,ue=re.scrollHeight>re.clientHeight;if(!(A&&le||U&&ue))return;if(U&&d&&i){e:for(var ve=t.target,Ie=V.view;ve!=re;ve=ve.parentNode)for(var Fe=0;Fe<Ie.length;Fe++)if(Ie[Fe].node==ve){e.display.currentWheelTarget=ve;break e}}if(A&&!S&&!u&&Qn!=null){U&&ue&&Ei(e,Math.max(0,re.scrollTop+U*Qn)),Na(e,Math.max(0,re.scrollLeft+A*Qn)),(!U||U&&ue)&&ce(t),V.wheelStartX=null;return}if(U&&Qn!=null){var nt=U*Qn,Ze=e.doc.scrollTop,lt=Ze+V.wrapper.clientHeight;nt<0?Ze=Math.max(0,Ze+nt-50):lt=Math.min(e.doc.height,lt+nt+50),Di(e,{top:Ze,bottom:lt})}li<20&&(V.wheelStartX==null?(V.wheelStartX=re.scrollLeft,V.wheelStartY=re.scrollTop,V.wheelDX=A,V.wheelDY=U,setTimeout(function(){if(V.wheelStartX==null)return;var dt=re.scrollLeft-V.wheelStartX,bt=re.scrollTop-V.wheelStartY,wt=bt&&V.wheelDY&&bt/V.wheelDY||dt&&V.wheelDX&&dt/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!wt)return;Qn=(Qn*li+wt)/(li+1),++li},200)):(V.wheelDX+=A,V.wheelDY+=U))}var wa=function(e,t){this.ranges=e,this.primIndex=t};wa.prototype.primary=function(){return this.ranges[this.primIndex]},wa.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var D=this.ranges[t],A=e.ranges[t];if(!Wr(D.anchor,A.anchor)||!Wr(D.head,A.head))return!1}return!0},wa.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Fr(tn(this.ranges[t].anchor),tn(this.ranges[t].head));return new wa(e,this.primIndex)},wa.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},wa.prototype.contains=function(e,t){t||(t=e);for(var D=0;D<this.ranges.length;D++){var A=this.ranges[D];if(Mt(t,A.from())>=0&&Mt(e,A.to())<=0)return D}return-1};var Fr=function(e,t){this.anchor=e,this.head=t};Fr.prototype.from=function(){return bn(this.anchor,this.head)},Fr.prototype.to=function(){return Sn(this.anchor,this.head)},Fr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ua(e,t,D){var A=e&&e.options.selectionsMayTouch,U=t[D];t.sort(function(nt,Ze){return Mt(nt.from(),Ze.from())}),D=ee(t,U);for(var V=1;V<t.length;V++){var re=t[V],le=t[V-1],ue=Mt(le.to(),re.from());if(A&&!re.empty()?ue>0:ue>=0){var ve=bn(le.from(),re.from()),Ie=Sn(le.to(),re.to()),Fe=le.empty()?re.from()==re.head:le.from()==le.head;V<=D&&--D,t.splice(--V,2,new Fr(Fe?Ie:ve,Fe?ve:Ie))}}return new wa(t,D)}function Qa(e,t){return new wa([new Fr(e,t||e)],0)}function Za(e){return e.text?ut(e.from.line+e.text.length-1,te(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function uo(e,t){if(Mt(e,t.from)<0)return e;if(Mt(e,t.to)<=0)return Za(t);var D=e.line+t.text.length-(t.to.line-t.from.line)-1,A=e.ch;return e.line==t.to.line&&(A+=Za(t).ch-t.to.ch),ut(D,A)}function Hi(e,t){for(var D=[],A=0;A<e.sel.ranges.length;A++){var U=e.sel.ranges[A];D.push(new Fr(uo(U.anchor,t),uo(U.head,t)))}return Ua(e.cm,D,e.sel.primIndex)}function Lo(e,t,D){return e.line==t.line?ut(D.line,e.ch-t.ch+D.ch):ut(D.line+(e.line-t.line),e.ch)}function Po(e,t,D){for(var A=[],U=ut(e.first,0),V=U,re=0;re<t.length;re++){var le=t[re],ue=Lo(le.from,U,V),ve=Lo(Za(le),U,V);if(U=le.to,V=ve,D=="around"){var Ie=e.sel.ranges[re],Fe=Mt(Ie.head,Ie.anchor)<0;A[re]=new Fr(Fe?ve:ue,Fe?ue:ve)}else A[re]=new Fr(ue,ue)}return new wa(A,e.sel.primIndex)}function pi(e){e.doc.mode=Ht(e.options,e.doc.modeOption),co(e)}function co(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ri(e,100),e.state.modeGen++,e.curOp&&qr(e)}function vs(e,t){return t.from.ch==0&&t.to.ch==0&&te(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,t,D,A){function U(At){return D?D[At]:null}function V(At,Tt,Pt){Dr(At,Tt,Pt,A),Jt(At,"change",At,t)}function re(At,Tt){for(var Pt=[],Qt=At;Qt<Tt;++Qt)Pt.push(new Xn(ve[Qt],U(Qt),A));return Pt}var le=t.from,ue=t.to,ve=t.text,Ie=mt(e,le.line),Fe=mt(e,ue.line),nt=te(ve),Ze=U(ve.length-1),lt=ue.line-le.line;if(t.full)e.insert(0,re(0,ve.length)),e.remove(ve.length,e.size-ve.length);else if(vs(e,t)){var dt=re(0,ve.length-1);V(Fe,Fe.text,Ze),lt&&e.remove(le.line,lt),dt.length&&e.insert(le.line,dt)}else if(Ie==Fe)if(ve.length==1)V(Ie,Ie.text.slice(0,le.ch)+nt+Ie.text.slice(ue.ch),Ze);else{var bt=re(1,ve.length-1);bt.push(new Xn(nt+Ie.text.slice(ue.ch),Ze,A)),V(Ie,Ie.text.slice(0,le.ch)+ve[0],U(0)),e.insert(le.line+1,bt)}else if(ve.length==1)V(Ie,Ie.text.slice(0,le.ch)+ve[0]+Fe.text.slice(ue.ch),U(0)),e.remove(le.line+1,lt);else{V(Ie,Ie.text.slice(0,le.ch)+ve[0],U(0)),V(Fe,nt+Fe.text.slice(ue.ch),Ze);var wt=re(1,ve.length-1);lt>1&&e.remove(le.line+1,lt-1),e.insert(le.line+1,wt)}Jt(e,"change",e,t)}function Ti(e,t,D){function A(U,V,re){if(U.linked)for(var le=0;le<U.linked.length;++le){var ue=U.linked[le];if(ue.doc==V)continue;var ve=re&&ue.sharedHist;if(D&&!ve)continue;t(ue.doc,ve),A(ue.doc,U,ve)}}A(e,null,!0)}function gs(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ba(e),pi(e),ys(e),e.options.lineWrapping||sa(e),e.options.mode=t.modeOption,qr(e)}function ys(e){(e.doc.direction=="rtl"?z:y)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Ea(e,function(){ys(e),qr(e)})}function ko(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function rs(e,t){var D={from:tn(t.from),to:Za(t),text:mr(e,t.from,t.to)};return xs(e,D,t.from.line,t.to.line+1),Ti(e,function(A){return xs(A,D,t.from.line,t.to.line+1)},!0),D}function bs(e){for(;e.length;){var t=te(e);if(t.ranges)e.pop();else break}}function ml(e,t){if(t)return bs(e.done),te(e.done);if(e.done.length&&!te(e.done).ranges)return te(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),te(e.done)}function Es(e,t,D,A){var U=e.history;U.undone.length=0;var V=+new Date,re,le;if((U.lastOp==A||U.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&U.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(re=ml(U,U.lastOp==A)))le=te(re.changes),Mt(t.from,t.to)==0&&Mt(t.from,le.to)==0?le.to=Za(t):re.changes.push(rs(e,t));else{var ue=te(U.done);for((!ue||!ue.ranges)&&Io(e.sel,U.done),re={changes:[rs(e,t)],generation:U.generation},U.done.push(re);U.done.length>U.undoDepth;)U.done.shift(),U.done[0].ranges||U.done.shift()}U.done.push(D),U.generation=++U.maxGeneration,U.lastModTime=U.lastSelTime=V,U.lastOp=U.lastSelOp=A,U.lastOrigin=U.lastSelOrigin=t.origin,le||Ue(e,"historyAdded")}function vl(e,t,D,A){var U=t.charAt(0);return U=="*"||U=="+"&&D.ranges.length==A.ranges.length&&D.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,D,A){var U=e.history,V=A&&A.origin;D==U.lastSelOp||V&&U.lastSelOrigin==V&&(U.lastModTime==U.lastSelTime&&U.lastOrigin==V||vl(e,V,te(U.done),t))?U.done[U.done.length-1]=t:Io(t,U.done),U.lastSelTime=+new Date,U.lastSelOrigin=V,U.lastSelOp=D,A&&A.clearRedo!==!1&&bs(U.undone)}function Io(e,t){var D=te(t);D&&D.ranges&&D.equals(e)||t.push(e)}function xs(e,t,D,A){var U=t["spans_"+e.id],V=0;e.iter(Math.max(e.first,D),Math.min(e.first+e.size,A),function(re){re.markedSpans&&((U||(U=t["spans_"+e.id]={}))[V]=re.markedSpans),++V})}function yl(e){if(!e)return null;for(var t,D=0;D<e.length;++D)e[D].marker.explicitlyCleared?t||(t=e.slice(0,D)):t&&t.push(e[D]);return t?t.length?t:null:e}function bl(e,t){var D=t["spans_"+e.id];if(!D)return null;for(var A=[],U=0;U<t.text.length;++U)A.push(yl(D[U]));return A}function ws(e,t){var D=bl(e,t),A=na(e,t);if(!D)return A;if(!A)return D;for(var U=0;U<D.length;++U){var V=D[U],re=A[U];if(V&&re){e:for(var le=0;le<re.length;++le){for(var ue=re[le],ve=0;ve<V.length;++ve)if(V[ve].marker==ue.marker)continue e;V.push(ue)}}else re&&(D[U]=re)}return D}function Ki(e,t,D){for(var A=[],U=0;U<e.length;++U){var V=e[U];if(V.ranges){A.push(D?wa.prototype.deepCopy.call(V):V);continue}var re=V.changes,le=[];A.push({changes:le});for(var ue=0;ue<re.length;++ue){var ve=re[ue],Ie=void 0;if(le.push({from:ve.from,to:ve.to,text:ve.text}),t)for(var Fe in ve)(Ie=Fe.match(/^spans_(\d+)$/))&&(ee(t,Number(Ie[1]))>-1&&(te(le)[Fe]=ve[Fe],delete ve[Fe]))}}return A}function ns(e,t,D,A){if(A){var U=e.anchor;if(D){var V=Mt(t,U)<0;V!=Mt(D,U)<0?(U=t,t=D):V!=Mt(t,D)<0&&(t=D)}return new Fr(U,t)}else return new Fr(D||t,t)}function No(e,t,D,A,U){U==null&&(U=e.cm&&(e.cm.display.shift||e.extend)),va(e,new wa([ns(e.sel.primary(),t,D,U)],0),A)}function Ts(e,t,D){for(var A=[],U=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)A[V]=ns(e.sel.ranges[V],t[V],null,U);var re=Ua(e.cm,A,e.sel.primIndex);va(e,re,D)}function as(e,t,D,A){var U=e.sel.ranges.slice(0);U[t]=D,va(e,Ua(e.cm,U,e.sel.primIndex),A)}function Ss(e,t,D,A){va(e,Qa(t,D),A)}function El(e,t,D){var A={ranges:t.ranges,update:function(U){this.ranges=[];for(var V=0;V<U.length;V++)this.ranges[V]=new Fr(Ot(e,U[V].anchor),Ot(e,U[V].head))},origin:D&&D.origin};return Ue(e,"beforeSelectionChange",e,A),e.cm&&Ue(e.cm,"beforeSelectionChange",e.cm,A),A.ranges!=t.ranges?Ua(e.cm,A.ranges,A.ranges.length-1):t}function Cs(e,t,D){var A=e.history.done,U=te(A);U&&U.ranges?(A[A.length-1]=t,jo(e,t,D)):va(e,t,D)}function va(e,t,D){jo(e,t,D),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,D)}function jo(e,t,D){(Te(e,"beforeSelectionChange")||e.cm&&Te(e.cm,"beforeSelectionChange"))&&(t=El(e,t,D));var A=D&&D.bias||(Mt(t.primary().head,e.sel.primary().head)<0?-1:1);_s(e,As(e,t,A,!0)),!(D&&D.scroll===!1)&&e.cm&&yi(e.cm)}function _s(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Pe(e.cm)),Jt(e,"cursorActivity",e)}function Os(e){_s(e,As(e,e.sel,null,!1))}function As(e,t,D,A){for(var U,V=0;V<t.ranges.length;V++){var re=t.ranges[V],le=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],ue=Uo(e,re.anchor,le&&le.anchor,D,A),ve=Uo(e,re.head,le&&le.head,D,A);(U||ue!=re.anchor||ve!=re.head)&&(U||(U=t.ranges.slice(0,V)),U[V]=new Fr(ue,ve))}return U?Ua(e.cm,U,t.primIndex):t}function zi(e,t,D,A,U){var V=mt(e,t.line);if(V.markedSpans)for(var re=0;re<V.markedSpans.length;++re){var le=V.markedSpans[re],ue=le.marker,ve="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,Ie="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((le.from==null||(ve?le.from<=t.ch:le.from<t.ch))&&(le.to==null||(Ie?le.to>=t.ch:le.to>t.ch))){if(U&&(Ue(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(V.markedSpans){--re;continue}else break;if(!ue.atomic)continue;if(D){var Fe=ue.find(A<0?1:-1),nt=void 0;if((A<0?Ie:ve)&&(Fe=Rs(e,Fe,-A,Fe&&Fe.line==t.line?V:null)),Fe&&Fe.line==t.line&&(nt=Mt(Fe,D))&&(A<0?nt<0:nt>0))return zi(e,Fe,t,A,U)}var Ze=ue.find(A<0?-1:1);return(A<0?ve:Ie)&&(Ze=Rs(e,Ze,A,Ze.line==t.line?V:null)),Ze?zi(e,Ze,t,A,U):null}}return t}function Uo(e,t,D,A,U){var V=A||1,re=zi(e,t,D,V,U)||!U&&zi(e,t,D,V,!0)||zi(e,t,D,-V,U)||!U&&zi(e,t,D,-V,!0);return re||(e.cantEdit=!0,ut(e.first,0))}function Rs(e,t,D,A){return D<0&&t.ch==0?t.line>e.first?Ot(e,ut(t.line-1)):null:D>0&&t.ch==(A||mt(e,t.line)).text.length?t.line<e.first+e.size-1?ut(t.line+1,0):null:new ut(t.line,t.ch+D)}function Ds(e){e.setSelection(ut(e.firstLine(),0),ut(e.lastLine()),ge)}function Ms(e,t,D){var A={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return A.canceled=!0}};return D&&(A.update=function(U,V,re,le){U&&(A.from=Ot(e,U)),V&&(A.to=Ot(e,V)),re&&(A.text=re),le!==void 0&&(A.origin=le)}),Ue(e,"beforeChange",e,A),e.cm&&Ue(e.cm,"beforeChange",e.cm,A),A.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:A.from,to:A.to,text:A.text,origin:A.origin}}function Gi(e,t,D){if(e.cm){if(!e.cm.curOp)return Nn(e.cm,Gi)(e,t,D);if(e.cm.state.suppressEdits)return}if((Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"))&&(t=Ms(e,t,!0),!t))return;var A=tr&&!D&&Xa(e,t.from,t.to);if(A)for(var U=A.length-1;U>=0;--U)Ls(e,{from:A[U].from,to:A[U].to,text:U?[""]:t.text,origin:t.origin});else Ls(e,t)}function Ls(e,t){if(t.text.length==1&&t.text[0]==""&&Mt(t.from,t.to)==0)return;var D=Hi(e,t);Es(e,t,D,e.cm?e.cm.curOp.id:NaN),fo(e,t,D,na(e,t));var A=[];Ti(e,function(U,V){!V&&ee(A,U.history)==-1&&(Ns(U.history,t),A.push(U.history)),fo(U,t,null,na(U,t))})}function Fo(e,t,D){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!D)return;for(var U=e.history,V,re=e.sel,le=t=="undo"?U.done:U.undone,ue=t=="undo"?U.undone:U.done,ve=0;ve<le.length&&!(V=le[ve],D?V.ranges&&!V.equals(e.sel):!V.ranges);ve++);if(ve==le.length)return;for(U.lastOrigin=U.lastSelOrigin=null;;)if(V=le.pop(),V.ranges){if(Io(V,ue),D&&!V.equals(e.sel)){va(e,V,{clearRedo:!1});return}re=V}else if(A){le.push(V);return}else break;var Ie=[];Io(re,ue),ue.push({changes:Ie,generation:U.generation}),U.generation=V.generation||++U.maxGeneration;for(var Fe=Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"),nt=function(dt){var bt=V.changes[dt];if(bt.origin=t,Fe&&!Ms(e,bt,!1))return le.length=0,{};Ie.push(rs(e,bt));var wt=dt?Hi(e,bt):te(le);fo(e,bt,wt,ws(e,bt)),!dt&&e.cm&&e.cm.scrollIntoView({from:bt.from,to:Za(bt)});var At=[];Ti(e,function(Tt,Pt){!Pt&&ee(At,Tt.history)==-1&&(Ns(Tt.history,bt),At.push(Tt.history)),fo(Tt,bt,null,ws(Tt,bt))})},Ze=V.changes.length-1;Ze>=0;--Ze){var lt=nt(Ze);if(lt)return lt.v}}function Ps(e,t){if(t==0)return;if(e.first+=t,e.sel=new wa(be(e.sel.ranges,function(U){return new Fr(ut(U.anchor.line+t,U.anchor.ch),ut(U.head.line+t,U.head.ch))}),e.sel.primIndex),e.cm){qr(e.cm,e.first,e.first-t,t);for(var D=e.cm.display,A=D.viewFrom;A<D.viewTo;A++)wn(e.cm,A,"gutter")}}function fo(e,t,D,A){if(e.cm&&!e.cm.curOp)return Nn(e.cm,fo)(e,t,D,A);if(t.to.line<e.first){Ps(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var U=t.text.length-1-(e.first-t.from.line);Ps(e,U),t={from:ut(e.first,0),to:ut(t.to.line+U,t.to.ch),text:[te(t.text)],origin:t.origin}}var V=e.lastLine();t.to.line>V&&(t={from:t.from,to:ut(V,mt(e,V).text.length),text:[t.text[0]],origin:t.origin}),t.removed=mr(e,t.from,t.to),D||(D=Hi(e,t)),e.cm?xl(e.cm,t,A):ts(e,t,A),jo(e,D,ge),e.cantEdit&&Uo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,t,D){var A=e.doc,U=e.display,V=t.from,re=t.to,le=!1,ue=V.line;e.options.lineWrapping||(ue=Rt(_n(mt(A,V.line))),A.iter(ue,re.line+1,function(Ze){if(Ze==U.maxLine)return le=!0,!0})),A.sel.contains(t.from,t.to)>-1&&Pe(e),ts(A,t,D,ka(e)),e.options.lineWrapping||(A.iter(ue,V.line+t.text.length,function(Ze){var lt=oa(Ze);lt>U.maxLineLength&&(U.maxLine=Ze,U.maxLineLength=lt,U.maxLineChanged=!0,le=!1)}),le&&(e.curOp.updateMaxLine=!0)),$r(A,V.line),Ri(e,400);var ve=t.text.length-(re.line-V.line)-1;t.full?qr(e):V.line==re.line&&t.text.length==1&&!vs(e.doc,t)?wn(e,V.line,"text"):qr(e,V.line,re.line+1,ve);var Ie=Te(e,"changes"),Fe=Te(e,"change");if(Fe||Ie){var nt={from:V,to:re,text:t.text,removed:t.removed,origin:t.origin};Fe&&Jt(e,"change",e,nt),Ie&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(nt)}e.display.selForContextMenu=null}function Xi(e,t,D,A,U){var V;A||(A=D),Mt(A,D)<0&&(V=[A,D],D=V[0],A=V[1]),typeof t=="string"&&(t=e.splitLines(t)),Gi(e,{from:D,to:A,text:t,origin:U})}function ks(e,t,D,A){D<e.line?e.line+=A:t<e.line&&(e.line=t,e.ch=0)}function Is(e,t,D,A){for(var U=0;U<e.length;++U){var V=e[U],re=!0;if(V.ranges){V.copied||(V=e[U]=V.deepCopy(),V.copied=!0);for(var le=0;le<V.ranges.length;le++)ks(V.ranges[le].anchor,t,D,A),ks(V.ranges[le].head,t,D,A);continue}for(var ue=0;ue<V.changes.length;++ue){var ve=V.changes[ue];if(D<ve.from.line)ve.from=ut(ve.from.line+A,ve.from.ch),ve.to=ut(ve.to.line+A,ve.to.ch);else if(t<=ve.to.line){re=!1;break}}re||(e.splice(0,U+1),U=0)}}function Ns(e,t){var D=t.from.line,A=t.to.line,U=t.text.length-(A-D)-1;Is(e.done,D,A,U),Is(e.undone,D,A,U)}function ho(e,t,D,A){var U=t,V=t;return typeof t=="number"?V=mt(e,Hr(e,t)):U=Rt(t),U==null?null:(A(V,U)&&e.cm&&wn(e.cm,U,D),V)}function po(e){this.lines=e,this.parent=null;for(var t=0,D=0;D<e.length;++D)e[D].parent=this,t+=e[D].height;this.height=t}po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var D=e,A=e+t;D<A;++D){var U=this.lines[D];this.height-=U.height,Ya(U),Jt(U,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,D){this.height+=D,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var A=0;A<t.length;++A)t[A].parent=this},iterN:function(e,t,D){for(var A=e+t;e<A;++e)if(D(this.lines[e]))return!0}};function mo(e){this.children=e;for(var t=0,D=0,A=0;A<e.length;++A){var U=e[A];t+=U.chunkSize(),D+=U.height,U.parent=this}this.size=t,this.height=D,this.parent=null}mo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var D=0;D<this.children.length;++D){var A=this.children[D],U=A.chunkSize();if(e<U){var V=Math.min(t,U-e),re=A.height;if(A.removeInner(e,V),this.height-=re-A.height,U==V&&(this.children.splice(D--,1),A.parent=null),(t-=V)==0)break;e=0}else e-=U}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof po))){var le=[];this.collapse(le),this.children=[new po(le)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,D){this.size+=t.length,this.height+=D;for(var A=0;A<this.children.length;++A){var U=this.children[A],V=U.chunkSize();if(e<=V){if(U.insertInner(e,t,D),U.lines&&U.lines.length>50){for(var re=U.lines.length%25+25,le=re;le<U.lines.length;){var ue=new po(U.lines.slice(le,le+=25));U.height-=ue.height,this.children.splice(++A,0,ue),ue.parent=this}U.lines=U.lines.slice(0,re),this.maybeSpill()}break}e-=V}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),D=new mo(t);if(e.parent){e.size-=D.size,e.height-=D.height;var U=ee(e.parent.children,e);e.parent.children.splice(U+1,0,D)}else{var A=new mo(e.children);A.parent=e,e.children=[A,D],e=A}D.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,D){for(var A=0;A<this.children.length;++A){var U=this.children[A],V=U.chunkSize();if(e<V){var re=Math.min(t,V-e);if(U.iterN(e,re,D))return!0;if((t-=re)==0)break;e=0}else e-=V}}};var vo=function(e,t,D){if(D)for(var A in D)D.hasOwnProperty(A)&&(this[A]=D[A]);this.doc=e,this.node=t};vo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,D=this.line,A=Rt(D);if(A==null||!t)return;for(var U=0;U<t.length;++U)t[U]==this&&t.splice(U--,1);t.length||(D.widgets=null);var V=In(this);Bt(D,Math.max(0,D.height-V)),e&&(Ea(e,function(){js(e,D,-V),wn(e,A,"widget")}),Jt(e,"lineWidgetCleared",e,this,A))},vo.prototype.changed=function(){var e=this,t=this.height,D=this.doc.cm,A=this.line;this.height=null;var U=In(this)-t;if(!U)return;Bn(this.doc,A)||Bt(A,A.height+U),D&&Ea(D,function(){D.curOp.forceUpdate=!0,js(D,A,U),Jt(D,"lineWidgetChanged",D,e,Rt(A))})},Ae(vo);function js(e,t,D){kn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&no(e,D)}function wl(e,t,D,A){var U=new vo(e,D,A),V=e.cm;return V&&U.noHScroll&&(V.display.alignWidgets=!0),ho(e,t,"widget",function(re){var le=re.widgets||(re.widgets=[]);if(U.insertAt==null?le.push(U):le.splice(Math.min(le.length-1,Math.max(0,U.insertAt)),0,U),U.line=re,V&&!Bn(e,re)){var ue=kn(re)<e.scrollTop;Bt(re,re.height+In(U)),ue&&no(V,U.height),V.curOp.forceUpdate=!0}return!0}),V&&Jt(V,"lineWidgetAdded",V,U,typeof t=="number"?t:Rt(t)),U}var Us=0,Si=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Us};Si.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&si(e),Te(this,"clear")){var D=this.find();D&&Jt(this,"clear",D.from,D.to)}for(var A=null,U=null,V=0;V<this.lines.length;++V){var re=this.lines[V],le=Jr(re.markedSpans,this);e&&!this.collapsed?wn(e,Rt(re),"text"):e&&(le.to!=null&&(U=Rt(re)),le.from!=null&&(A=Rt(re))),re.markedSpans=on(re.markedSpans,le),le.from==null&&this.collapsed&&!Bn(this.doc,re)&&e&&Bt(re,Dn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var ve=_n(this.lines[ue]),Ie=oa(ve);Ie>e.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=Ie,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&qr(e,A,U+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Jt(e,"markerCleared",e,this,A,U),t&&fi(e),this.parent&&this.parent.clear()},Si.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var D,A,U=0;U<this.lines.length;++U){var V=this.lines[U],re=Jr(V.markedSpans,this);if(re.from!=null&&(D=ut(t?V:Rt(V),re.from),e==-1))return D;if(re.to!=null&&(A=ut(t?V:Rt(V),re.to),e==1))return A}return D&&{from:D,to:A}},Si.prototype.changed=function(){var e=this,t=this.find(-1,!0),D=this,A=this.doc.cm;if(!t||!A)return;Ea(A,function(){var U=t.line,V=Rt(t.line),re=He(A,V);if(re&&(ar(re),A.curOp.selectionChanged=A.curOp.forceUpdate=!0),A.curOp.updateMaxLine=!0,!Bn(D.doc,U)&&D.height!=null){var le=D.height;D.height=null;var ue=In(D)-le;ue&&Bt(U,U.height+ue)}Jt(A,"markerChanged",A,e)})},Si.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ee(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Si.prototype.detachLine=function(e){if(this.lines.splice(ee(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ae(Si);function Vi(e,t,D,A,U){if(A&&A.shared)return Tl(e,t,D,A,U);if(e.cm&&!e.cm.curOp)return Nn(e.cm,Vi)(e,t,D,A,U);var V=new Si(e,U),re=Mt(t,D);if(A&&K(A,V,!1),re>0||re==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=N("span",[V.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(Sa(e,t.line,t,D,V)||t.line!=D.line&&Sa(e,D.line,t,D,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");xr()}V.addToHistory&&Es(e,{from:t,to:D,origin:"markText"},e.sel,NaN);var le=t.line,ue=e.cm,ve;if(e.iter(le,D.line+1,function(Fe){ue&&V.collapsed&&!ue.options.lineWrapping&&_n(Fe)==ue.display.maxLine&&(ve=!0),V.collapsed&&le!=t.line&&Bt(Fe,0),Ma(Fe,new Nr(V,le==t.line?t.ch:null,le==D.line?D.ch:null)),++le}),V.collapsed&&e.iter(t.line,D.line+1,function(Fe){Bn(e,Fe)&&Bt(Fe,0)}),V.clearOnEnter&&Se(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(Zt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++Us,V.atomic=!0),ue){if(ve&&(ue.curOp.updateMaxLine=!0),V.collapsed)qr(ue,t.line,D.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Ie=t.line;Ie<=D.line;Ie++)wn(ue,Ie,"text");V.atomic&&Os(ue.doc),Jt(ue,"markerAdded",ue,V)}return V}var go=function(e,t){this.markers=e,this.primary=t;for(var D=0;D<e.length;++D)e[D].parent=this};go.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Jt(this,"clear")},go.prototype.find=function(e,t){return this.primary.find(e,t)},Ae(go);function Tl(e,t,D,A,U){A=K(A),A.shared=!1;var V=[Vi(e,t,D,A,U)],re=V[0],le=A.widgetNode;return Ti(e,function(ue){le&&(A.widgetNode=le.cloneNode(!0)),V.push(Vi(ue,Ot(ue,t),Ot(ue,D),A,U));for(var ve=0;ve<ue.linked.length;++ve)if(ue.linked[ve].isParent)return;re=te(V)}),new go(V,re)}function Fs(e){return e.findMarks(ut(e.first,0),e.clipPos(ut(e.lastLine())),function(t){return t.parent})}function Sl(e,t){for(var D=0;D<t.length;D++){var A=t[D],U=A.find(),V=e.clipPos(U.from),re=e.clipPos(U.to);if(Mt(V,re)){var le=Vi(e,V,re,A.primary,A.primary.type);A.markers.push(le),le.parent=A}}}function Cl(e){for(var t=function(A){var U=e[A],V=[U.primary.doc];Ti(U.primary.doc,function(ue){return V.push(ue)});for(var re=0;re<U.markers.length;re++){var le=U.markers[re];ee(V,le.doc)==-1&&(le.parent=null,U.markers.splice(re--,1))}},D=0;D<e.length;D++)t(D)}var _l=0,Oa=function(e,t,D,A,U){if(!(this instanceof Oa))return new Oa(e,t,D,A,U);D==null&&(D=0),mo.call(this,[new po([new Xn("",null)])]),this.first=D,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=D;var V=ut(D,0);this.sel=Qa(V),this.history=new ko(null),this.id=++_l,this.modeOption=t,this.lineSep=A,this.direction=U=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:V,to:V,text:e}),va(this,Qa(V),ge)};Oa.prototype=xe(mo.prototype,{constructor:Oa,iter:function(e,t,D){D?this.iterN(e-this.first,t-e,D):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var D=0,A=0;A<t.length;++A)D+=t[A].height;this.insertInner(e-this.first,t,D)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Cr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:jn(function(e){var t=ut(this.first,0),D=this.first+this.size-1;Gi(this,{from:t,to:ut(D,mt(this,D).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&bi(this.cm,0,0),va(this,Qa(t),ge)}),replaceRange:function(e,t,D,A){t=Ot(this,t),D=D?Ot(this,D):t,Xi(this,e,t,D,A)},getRange:function(e,t,D){var A=mr(this,Ot(this,e),Ot(this,t));return D===!1?A:A.join(D||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(yn(this,e))return mt(this,e)},getLineNumber:function(e){return Rt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=mt(this,e)),_n(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ot(this,e)},getCursor:function(e){var t=this.sel.primary(),D;return e==null||e=="head"?D=t.head:e=="anchor"?D=t.anchor:e=="end"||e=="to"||e===!1?D=t.to():D=t.from(),D},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:jn(function(e,t,D){Ss(this,Ot(this,typeof e=="number"?ut(e,t||0):e),null,D)}),setSelection:jn(function(e,t,D){Ss(this,Ot(this,e),Ot(this,t||e),D)}),extendSelection:jn(function(e,t,D){No(this,Ot(this,e),t&&Ot(this,t),D)}),extendSelections:jn(function(e,t){Ts(this,Kr(this,e),t)}),extendSelectionsBy:jn(function(e,t){var D=be(this.sel.ranges,e);Ts(this,Kr(this,D),t)}),setSelections:jn(function(e,t,D){if(!e.length)return;for(var A=[],U=0;U<e.length;U++)A[U]=new Fr(Ot(this,e[U].anchor),Ot(this,e[U].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),va(this,Ua(this.cm,A,t),D)}),addSelection:jn(function(e,t,D){var A=this.sel.ranges.slice(0);A.push(new Fr(Ot(this,e),Ot(this,t||e))),va(this,Ua(this.cm,A,A.length-1),D)}),getSelection:function(e){for(var t=this.sel.ranges,D,A=0;A<t.length;A++){var U=mr(this,t[A].from(),t[A].to());D=D?D.concat(U):U}return e===!1?D:D.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],D=this.sel.ranges,A=0;A<D.length;A++){var U=mr(this,D[A].from(),D[A].to());e!==!1&&(U=U.join(e||this.lineSeparator())),t[A]=U}return t},replaceSelection:function(e,t,D){for(var A=[],U=0;U<this.sel.ranges.length;U++)A[U]=e;this.replaceSelections(A,t,D||"+input")},replaceSelections:jn(function(e,t,D){for(var A=[],U=this.sel,V=0;V<U.ranges.length;V++){var re=U.ranges[V];A[V]={from:re.from(),to:re.to(),text:this.splitLines(e[V]),origin:D}}for(var le=t&&t!="end"&&Po(this,A,t),ue=A.length-1;ue>=0;ue--)Gi(this,A[ue]);le?Cs(this,le):this.cm&&yi(this.cm)}),undo:jn(function(){Fo(this,"undo")}),redo:jn(function(){Fo(this,"redo")}),undoSelection:jn(function(){Fo(this,"undo",!0)}),redoSelection:jn(function(){Fo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,D=0,A=0;A<e.done.length;A++)e.done[A].ranges||++t;for(var U=0;U<e.undone.length;U++)e.undone[U].ranges||++D;return{undo:t,redo:D}},clearHistory:function(){var e=this;this.history=new ko(this.history.maxGeneration),Ti(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ki(this.history.done),undone:Ki(this.history.undone)}},setHistory:function(e){var t=this.history=new ko(this.history.maxGeneration);t.done=Ki(e.done.slice(0),null,!0),t.undone=Ki(e.undone.slice(0),null,!0)},setGutterMarker:jn(function(e,t,D){return ho(this,e,"gutter",function(A){var U=A.gutterMarkers||(A.gutterMarkers={});return U[t]=D,!D&&$(U)&&(A.gutterMarkers=null),!0})}),clearGutter:jn(function(e){var t=this;this.iter(function(D){D.gutterMarkers&&D.gutterMarkers[e]&&ho(t,D,"gutter",function(){return D.gutterMarkers[e]=null,$(D.gutterMarkers)&&(D.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!yn(this,e))return null;if(t=e,e=mt(this,e),!e)return null}else if(t=Rt(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:jn(function(e,t,D){return ho(this,e,t=="gutter"?"gutter":"class",function(A){var U=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!A[U])A[U]=D;else{if(O(D).test(A[U]))return!1;A[U]+=" "+D}return!0})}),removeLineClass:jn(function(e,t,D){return ho(this,e,t=="gutter"?"gutter":"class",function(A){var U=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",V=A[U];if(V)if(D==null)A[U]=null;else{var re=V.match(O(D));if(!re)return!1;var le=re.index+re[0].length;A[U]=V.slice(0,re.index)+(!re.index||le==V.length?"":" ")+V.slice(le)||null}else return!1;return!0})}),addLineWidget:jn(function(e,t,D){return wl(this,e,t,D)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,D){return Vi(this,Ot(this,e),Ot(this,t),D,D&&D.type||"range")},setBookmark:function(e,t){var D={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Ot(this,e),Vi(this,e,e,D,"bookmark")},findMarksAt:function(e){e=Ot(this,e);var t=[],D=mt(this,e.line).markedSpans;if(D)for(var A=0;A<D.length;++A){var U=D[A];(U.from==null||U.from<=e.ch)&&(U.to==null||U.to>=e.ch)&&t.push(U.marker.parent||U.marker)}return t},findMarks:function(e,t,D){e=Ot(this,e),t=Ot(this,t);var A=[],U=e.line;return this.iter(e.line,t.line+1,function(V){var re=V.markedSpans;if(re)for(var le=0;le<re.length;le++){var ue=re[le];!(ue.to!=null&&U==e.line&&e.ch>=ue.to||ue.from==null&&U!=e.line||ue.from!=null&&U==t.line&&ue.from>=t.ch)&&(!D||D(ue.marker))&&A.push(ue.marker.parent||ue.marker)}++U}),A},getAllMarks:function(){var e=[];return this.iter(function(t){var D=t.markedSpans;if(D)for(var A=0;A<D.length;++A)D[A].from!=null&&e.push(D[A].marker)}),e},posFromIndex:function(e){var t,D=this.first,A=this.lineSeparator().length;return this.iter(function(U){var V=U.text.length+A;if(V>e)return t=e,!0;e-=V,++D}),Ot(this,ut(D,t))},indexFromPos:function(e){e=Ot(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var D=this.lineSeparator().length;return this.iter(this.first,e.line,function(A){t+=A.text.length+D}),t},copy:function(e){var t=new Oa(Cr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,D=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<D&&(D=e.to);var A=new Oa(Cr(this,t,D),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(A.history=this.history),(this.linked||(this.linked=[])).push({doc:A,sharedHist:e.sharedHist}),A.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Sl(A,Fs(this)),A},unlinkDoc:function(e){if(e instanceof Tn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var D=this.linked[t];if(D.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Cl(Fs(this));break}if(e.history==this.history){var A=[e.id];Ti(e,function(U){return A.push(U.id)},!0),e.history=new ko(null),e.history.done=Ki(this.history.done,A),e.history.undone=Ki(this.history.undone,A)}},iterLinkedDocs:function(e){Ti(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):yt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:jn(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)})}),Oa.prototype.eachLine=Oa.prototype.iter;var Bs=0;function Ol(e){var t=this;if(Ws(t),Xe(t,e)||Wn(t.display,e))return;ce(e),w&&(Bs=+new Date);var D=Yn(t,e,!0),A=e.dataTransfer.files;if(!D||t.isReadOnly())return;if(A&&A.length&&window.FileReader&&window.File)for(var U=A.length,V=Array(U),re=0,le=function(){++re==U&&Nn(t,function(){D=Ot(t.doc,D);var Ze={from:D,to:D,text:t.doc.splitLines(V.filter(function(lt){return lt!=null}).join(t.doc.lineSeparator())),origin:"paste"};Gi(t.doc,Ze),Cs(t.doc,Qa(Ot(t.doc,D),Ot(t.doc,Za(Ze))))})()},ue=function(Ze,lt){if(t.options.allowDropFileTypes&&ee(t.options.allowDropFileTypes,Ze.type)==-1){le();return}var dt=new FileReader;dt.onerror=function(){return le()},dt.onload=function(){var bt=dt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(bt)){le();return}V[lt]=bt,le()},dt.readAsText(Ze)},ve=0;ve<A.length;ve++)ue(A[ve],ve);else{if(t.state.draggingText&&t.doc.sel.contains(D)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Ie=e.dataTransfer.getData("Text");if(Ie){var Fe;if(t.state.draggingText&&!t.state.draggingText.copy&&(Fe=t.listSelections()),jo(t.doc,Qa(D,D)),Fe)for(var nt=0;nt<Fe.length;++nt)Xi(t.doc,"",Fe[nt].anchor,Fe[nt].head,"drag");t.replaceSelection(Ie,"around","paste"),t.display.input.focus()}}catch(Ze){}}}function Al(e,t){if(w&&(!e.state.draggingText||+new Date-Bs<100)){De(t);return}if(Xe(e,t)||Wn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p){var D=_("img",null,null,"position: fixed; left: 0; top: 0;");D.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",u&&(D.width=D.height=1,e.display.wrapper.appendChild(D),D._top=D.offsetTop),t.dataTransfer.setDragImage(D,0,0),u&&D.parentNode.removeChild(D)}}function Rl(e,t){var D=Yn(e,t);if(!D)return;var A=document.createDocumentFragment();ai(e,D,A),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,A)}function Ws(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Hs(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),D=[],A=0;A<t.length;A++){var U=t[A].CodeMirror;U&&D.push(U)}D.length&&D[0].operation(function(){for(var V=0;V<D.length;V++)e(D[V])})}var Ks=!1;function Dl(){if(Ks)return;Ml(),Ks=!0}function Ml(){var e;Se(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hs(Ll)},100))}),Se(window,"blur",function(){return Hs(gi)})}function Ll(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ci={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},yo=0;yo<10;yo++)Ci[yo+48]=Ci[yo+96]=String(yo);for(var Bo=65;Bo<=90;Bo++)Ci[Bo]=String.fromCharCode(Bo);for(var bo=1;bo<=12;bo++)Ci[bo+111]=Ci[bo+63235]="F"+bo;var mi={};mi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},mi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},mi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},mi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},mi.default=d?mi.macDefault:mi.pcDefault;function Pl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var D,A,U,V,re=0;re<t.length-1;re++){var le=t[re];if(/^(cmd|meta|m)$/i.test(le))V=!0;else if(/^a(lt)?$/i.test(le))D=!0;else if(/^(c|ctrl|control)$/i.test(le))A=!0;else if(/^s(hift)?$/i.test(le))U=!0;else throw new Error("Unrecognized modifier name: "+le)}return D&&(e="Alt-"+e),A&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),U&&(e="Shift-"+e),e}function kl(e){var t={};for(var D in e)if(e.hasOwnProperty(D)){var A=e[D];if(/^(name|fallthrough|(de|at)tach)$/.test(D))continue;if(A=="..."){delete e[D];continue}for(var U=be(D.split(" "),Pl),V=0;V<U.length;V++){var re=void 0,le=void 0;V==U.length-1?(le=U.join(" "),re=A):(le=U.slice(0,V+1).join(" "),re="...");var ue=t[le];if(!ue)t[le]=re;else if(ue!=re)throw new Error("Inconsistent bindings for "+le)}delete e[D]}for(var ve in t)e[ve]=t[ve];return e}function Yi(e,t,D,A){t=Wo(t);var U=t.call?t.call(e,A):t[e];if(U===!1)return"nothing";if(U==="...")return"multi";if(U!=null&&D(U))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Yi(e,t.fallthrough,D,A);for(var V=0;V<t.fallthrough.length;V++){var re=Yi(e,t.fallthrough[V],D,A);if(re)return re}}}function zs(e){var t=typeof e=="string"?e:Ci[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Gs(e,t,D){var A=e;return t.altKey&&A!="Alt"&&(e="Alt-"+e),(o?t.metaKey:t.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(o?t.ctrlKey:t.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!D&&t.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function Xs(e,t){if(u&&e.keyCode==34&&e.char)return!1;var D=Ci[e.keyCode];return D==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(D=e.code),Gs(D,e,t))}function Wo(e){return typeof e=="string"?mi[e]:e}function $i(e,t){for(var D=e.doc.sel.ranges,A=[],U=0;U<D.length;U++){for(var V=t(D[U]);A.length&&Mt(V.from,te(A).to)<=0;){var re=A.pop();if(Mt(re.from,V.from)<0){V.from=re.from;break}}A.push(V)}Ea(e,function(){for(var le=A.length-1;le>=0;le--)Xi(e.doc,"",A[le].from,A[le].to,"+delete");yi(e)})}function is(e,t,D){var A=Ce(e.text,t+D,D);return A<0||A>e.text.length?null:A}function os(e,t,D){var A=is(e,t.ch,D);return A==null?null:new ut(t.line,A,D<0?"after":"before")}function ss(e,t,D,A,U){if(e){t.doc.direction=="rtl"&&(U=-U);var V=rt(D,t.doc.direction);if(V){var re=U<0?te(V):V[0],le=U<0==(re.level==1),ue=le?"after":"before",ve;if(re.level>0||t.doc.direction=="rtl"){var Ie=We(t,D);ve=U<0?D.text.length-1:0;var Fe=Qe(t,Ie,ve).top;ve=ze(function(nt){return Qe(t,Ie,nt).top==Fe},U<0==(re.level==1)?re.from:re.to-1,ve),ue=="before"&&(ve=is(D,ve,1))}else ve=U<0?re.to:re.from;return new ut(A,ve,ue)}}return new ut(A,U<0?D.text.length:0,U<0?"before":"after")}function Il(e,t,D,A){var U=rt(t,e.doc.direction);if(!U)return os(t,D,A);D.ch>=t.text.length?(D.ch=t.text.length,D.sticky="before"):D.ch<=0&&(D.ch=0,D.sticky="after");var V=Ve(U,D.ch,D.sticky),re=U[V];if(e.doc.direction=="ltr"&&re.level%2==0&&(A>0?re.to>D.ch:re.from<D.ch))return os(t,D,A);var le=function(wt,At){return is(t,wt instanceof ut?wt.ch:wt,At)},ue,ve=function(wt){return e.options.lineWrapping?(ue=ue||We(e,t),jt(e,t,ue,wt)):{begin:0,end:t.text.length}},Ie=ve(D.sticky=="before"?le(D,-1):D.ch);if(e.doc.direction=="rtl"||re.level==1){var Fe=re.level==1==A<0,nt=le(D,Fe?1:-1);if(nt!=null&&(Fe?nt<=re.to&&nt<=Ie.end:nt>=re.from&&nt>=Ie.begin)){var Ze=Fe?"before":"after";return new ut(D.line,nt,Ze)}}var lt=function(wt,At,Tt){for(var Pt=function(un,qn){return qn?new ut(D.line,le(un,1),"before"):new ut(D.line,un,"after")};wt>=0&&wt<U.length;wt+=At){var Qt=U[wt],Gt=At>0==(Qt.level!=1),br=Gt?Tt.begin:le(Tt.end,-1);if(Qt.from<=br&&br<Qt.to)return Pt(br,Gt);if(br=Gt?Qt.from:le(Qt.to,-1),Tt.begin<=br&&br<Tt.end)return Pt(br,Gt)}},dt=lt(V+A,A,Ie);if(dt)return dt;var bt=A>0?Ie.end:le(Ie.begin,-1);return bt!=null&&!(A>0&&bt==t.text.length)&&(dt=lt(A>0?0:U.length-1,A,ve(bt)),dt)?dt:null}var Eo={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ge)},killLine:function(e){return $i(e,function(t){if(t.empty()){var D=mt(e.doc,t.head.line).text.length;return t.head.ch==D&&t.head.line<e.lastLine()?{from:t.head,to:ut(t.head.line+1,0)}:{from:t.head,to:ut(t.head.line,D)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return $i(e,function(t){return{from:ut(t.from().line,0),to:Ot(e.doc,ut(t.to().line+1,0))}})},delLineLeft:function(e){return $i(e,function(t){return{from:ut(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return $i(e,function(t){var D=e.charCoords(t.head,"div").top+5,A=e.coordsChar({left:0,top:D},"div");return{from:A,to:t.from()}})},delWrappedLineRight:function(e){return $i(e,function(t){var D=e.charCoords(t.head,"div").top+5,A=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div");return{from:t.from(),to:A}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ut(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ut(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Vs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Ys(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Nl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var D=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div")},we)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var D=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:D},"div")},we)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var D=e.cursorCoords(t.head,"div").top+5,A=e.coordsChar({left:0,top:D},"div");return A.ch<e.getLine(A.line).search(/\S/)?Ys(e,t.head):A},we)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],D=e.listSelections(),A=e.options.tabSize,U=0;U<D.length;U++){var V=D[U].from(),re=W(e.getLine(V.line),V.ch,A);t.push(se(A-re%A))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ea(e,function(){for(var t=e.listSelections(),D=[],A=0;A<t.length;A++){if(!t[A].empty())continue;var U=t[A].head,V=mt(e.doc,U.line).text;if(V){if(U.ch==V.length&&(U=new ut(U.line,U.ch-1)),U.ch>0)U=new ut(U.line,U.ch+1),e.replaceRange(V.charAt(U.ch-1)+V.charAt(U.ch-2),ut(U.line,U.ch-2),U,"+transpose");else if(U.line>e.doc.first){var re=mt(e.doc,U.line-1).text;re&&(U=new ut(U.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),ut(U.line-1,re.length-1),U,"+transpose"))}}D.push(new Fr(U,U))}e.setSelections(D)})},newlineAndIndent:function(e){return Ea(e,function(){for(var t=e.listSelections(),D=t.length-1;D>=0;D--)e.replaceRange(e.doc.lineSeparator(),t[D].anchor,t[D].head,"+input");t=e.listSelections();for(var A=0;A<t.length;A++)e.indentLine(t[A].from().line,null,!0);yi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vs(e,t){var D=mt(e.doc,t),A=_n(D);return A!=D&&(t=Rt(A)),ss(!0,e,A,t,1)}function Nl(e,t){var D=mt(e.doc,t),A=fa(D);return A!=D&&(t=Rt(A)),ss(!0,e,D,t,-1)}function Ys(e,t){var D=Vs(e,t.line),A=mt(e.doc,D.line),U=rt(A,e.doc.direction);if(!U||U[0].level==0){var V=Math.max(D.ch,A.text.search(/\S/)),re=t.line==D.line&&t.ch<=V&&t.ch;return ut(D.line,re?0:V,D.sticky)}return D}function Ho(e,t,D){if(typeof t=="string"&&(t=Eo[t],!t))return!1;e.display.input.ensurePolled();var A=e.display.shift,U=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),D&&(e.display.shift=!1),U=t(e)!=he}finally{e.display.shift=A,e.state.suppressEdits=!1}return U}function jl(e,t,D){for(var A=0;A<e.state.keyMaps.length;A++){var U=Yi(t,e.state.keyMaps[A],D,e);if(U)return U}return e.options.extraKeys&&Yi(t,e.options.extraKeys,D,e)||Yi(t,e.options.keyMap,D,e)}var Ul=new J;function xo(e,t,D,A){var U=e.state.keySeq;if(U){if(zs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==U&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,U+" "+t,D,A))return!0}return $s(e,t,D,A)}function $s(e,t,D,A){var U=jl(e,t,A);return U=="multi"&&(e.state.keySeq=t),U=="handled"&&Jt(e,"keyHandled",e,t,D),(U=="handled"||U=="multi")&&(ce(D),$n(e)),!!U}function Js(e,t){var D=Xs(t,!0);return D?t.shiftKey&&!e.state.keySeq?xo(e,"Shift-"+D,t,function(A){return Ho(e,A,!0)})||xo(e,D,t,function(A){if(typeof A=="string"?/^go[A-Z]/.test(A):A.motion)return Ho(e,A)}):xo(e,D,t,function(A){return Ho(e,A)}):!1}function Fl(e,t,D){return xo(e,"'"+D+"'",t,function(A){return Ho(e,A,!0)})}var ls=null;function Qs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=H(),Xe(t,e))return;w&&l<11&&e.keyCode==27&&(e.returnValue=!1);var D=e.keyCode;t.display.shift=D==16||e.shiftKey;var A=Js(t,e);u&&(ls=A?D:null,!A&&D==88&&!Lt&&(d?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),S&&!d&&!A&&D==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),D==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bl(t)}function Bl(e){var t=e.display.lineDiv;z(t,"CodeMirror-crosshair");function D(A){(A.keyCode==18||!A.altKey)&&(y(t,"CodeMirror-crosshair"),tt(document,"keyup",D),tt(document,"mouseover",D))}Se(document,"keyup",D),Se(document,"mouseover",D)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Xe(this,e)}function el(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Wn(t.display,e)||Xe(t,e)||e.ctrlKey&&!e.altKey||d&&e.metaKey)return;var D=e.keyCode,A=e.charCode;if(u&&D==ls){ls=null,ce(e);return}if(u&&(!e.which||e.which<10)&&Js(t,e))return;var U=String.fromCharCode(A==null?D:A);if(U=="\b")return;if(Fl(t,e,U))return;t.display.input.onKeyPress(e)}var Wl=400,us=function(e,t,D){this.time=e,this.pos=t,this.button=D};us.prototype.compare=function(e,t,D){return this.time+Wl>e&&Mt(t,this.pos)==0&&D==this.button};var wo,To;function Hl(e,t){var D=+new Date;return To&&To.compare(D,e,t)?(wo=To=null,"triple"):wo&&wo.compare(D,e,t)?(To=new us(D,e,t),wo=null,"double"):(wo=new us(D,e,t),To=null,"single")}function tl(e){var t=this,D=t.display;if(Xe(t,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,Wn(D,e)){i||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(t,e))return;var A=Yn(t,e),U=$e(e),V=A?Hl(A,U):"single";if(window.focus(),U==1&&t.state.selectingText&&t.state.selectingText(e),A&&Kl(t,U,A,V,e))return;U==1?A?Gl(t,A,V,e):je(e)==D.scroller&&ce(e):U==2?(A&&No(t.doc,A),setTimeout(function(){return D.input.focus()},20)):U==3&&(P?t.display.input.onContextMenu(e):eo(t))}function Kl(e,t,D,A,U){var V="Click";return A=="double"?V="Double"+V:A=="triple"&&(V="Triple"+V),V=(t==1?"Left":t==2?"Middle":"Right")+V,xo(e,Gs(V,U),U,function(re){if(typeof re=="string"&&(re=Eo[re]),!re)return!1;var le=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),le=re(e,D)!=he}finally{e.state.suppressEdits=!1}return le})}function zl(e,t,D){var A=e.getOption("configureMouse"),U=A?A(e,t,D):{};if(U.unit==null){var V=h?D.shiftKey&&D.metaKey:D.altKey;U.unit=V?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(U.extend==null||e.doc.extend)&&(U.extend=e.doc.extend||D.shiftKey),U.addNew==null&&(U.addNew=d?D.metaKey:D.ctrlKey),U.moveOnDrag==null&&(U.moveOnDrag=!(d?D.altKey:D.ctrlKey)),U}function Gl(e,t,D,A){w?setTimeout(B(Co,e),0):e.curOp.focus=H();var U=zl(e,D,A),V=e.doc.sel,re;e.options.dragDrop&&at&&!e.isReadOnly()&&D=="single"&&(re=V.contains(t))>-1&&(Mt((re=V.ranges[re]).from(),t)<0||t.xRel>0)&&(Mt(re.to(),t)>0||t.xRel<0)?Xl(e,A,t,U):Vl(e,A,t,U)}function Xl(e,t,D,A){var U=e.display,V=!1,re=Nn(e,function(ve){i&&(U.scroller.draggable=!1),e.state.draggingText=!1,tt(U.wrapper.ownerDocument,"mouseup",re),tt(U.wrapper.ownerDocument,"mousemove",le),tt(U.scroller,"dragstart",ue),tt(U.scroller,"drop",re),V||(ce(ve),A.addNew||No(e.doc,D,null,null,A.extend),i&&!p||w&&l==9?setTimeout(function(){U.wrapper.ownerDocument.body.focus({preventScroll:!0}),U.input.focus()},20):U.input.focus())}),le=function(ve){V=V||Math.abs(t.clientX-ve.clientX)+Math.abs(t.clientY-ve.clientY)>=10},ue=function(){return V=!0};i&&(U.scroller.draggable=!0),e.state.draggingText=re,re.copy=!A.moveOnDrag,U.scroller.dragDrop&&U.scroller.dragDrop(),Se(U.wrapper.ownerDocument,"mouseup",re),Se(U.wrapper.ownerDocument,"mousemove",le),Se(U.scroller,"dragstart",ue),Se(U.scroller,"drop",re),eo(e),setTimeout(function(){return U.input.focus()},20)}function rl(e,t,D){if(D=="char")return new Fr(t,t);if(D=="word")return e.findWordAt(t);if(D=="line")return new Fr(ut(t.line,0),Ot(e.doc,ut(t.line+1,0)));var A=D(e,t);return new Fr(A.from,A.to)}function Vl(e,t,D,A){var U=e.display,V=e.doc;ce(t);var re,le,ue=V.sel,ve=ue.ranges;if(A.addNew&&!A.extend?(le=V.sel.contains(D),le>-1?re=ve[le]:re=new Fr(D,D)):(re=V.sel.primary(),le=V.sel.primIndex),A.unit=="rectangle")A.addNew||(re=new Fr(D,D)),D=Yn(e,t,!0,!0),le=-1;else{var Ie=rl(e,D,A.unit);A.extend?re=ns(re,Ie.anchor,Ie.head,A.extend):re=Ie}A.addNew?le==-1?(le=ve.length,va(V,Ua(e,ve.concat([re]),le),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[le].empty()&&A.unit=="char"&&!A.extend?(va(V,Ua(e,ve.slice(0,le).concat(ve.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ue=V.sel):as(V,le,re,ie):(le=0,va(V,new wa([re],0),ie),ue=V.sel);var Fe=D;function nt(Tt){if(Mt(Fe,Tt)==0)return;if(Fe=Tt,A.unit=="rectangle"){for(var Pt=[],Qt=e.options.tabSize,Gt=W(mt(V,D.line).text,D.ch,Qt),br=W(mt(V,Tt.line).text,Tt.ch,Qt),un=Math.min(Gt,br),qn=Math.max(Gt,br),On=Math.min(D.line,Tt.line),Pa=Math.min(e.lastLine(),Math.max(D.line,Tt.line));On<=Pa;On++){var Aa=mt(V,On).text,Hn=me(Aa,un,Qt);un==qn?Pt.push(new Fr(ut(On,Hn),ut(On,Hn))):Aa.length>Hn&&Pt.push(new Fr(ut(On,Hn),ut(On,me(Aa,qn,Qt))))}Pt.length||Pt.push(new Fr(D,D)),va(V,Ua(e,ue.ranges.slice(0,le).concat(Pt),le),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Tt)}else{var Ra=re,ua=rl(e,Tt,A.unit),Zn=Ra.anchor,Kn;Mt(ua.anchor,Zn)>0?(Kn=ua.head,Zn=bn(Ra.from(),ua.anchor)):(Kn=ua.anchor,Zn=Sn(Ra.to(),ua.head));var Mn=ue.ranges.slice(0);Mn[le]=Yl(e,new Fr(Ot(V,Zn),Kn)),va(V,Ua(e,Mn,le),ie)}}var Ze=U.wrapper.getBoundingClientRect(),lt=0;function dt(Tt){var Pt=++lt,Qt=Yn(e,Tt,!0,A.unit=="rectangle");if(!Qt)return;if(Mt(Qt,Fe)!=0){e.curOp.focus=H(),nt(Qt);var Gt=Ii(U,V);(Qt.line>=Gt.to||Qt.line<Gt.from)&&setTimeout(Nn(e,function(){lt==Pt&&dt(Tt)}),150)}else{var br=Tt.clientY<Ze.top?-20:Tt.clientY>Ze.bottom?20:0;br&&setTimeout(Nn(e,function(){if(lt!=Pt)return;U.scroller.scrollTop+=br,dt(Tt)}),50)}}function bt(Tt){e.state.selectingText=!1,lt=Infinity,Tt&&(ce(Tt),U.input.focus()),tt(U.wrapper.ownerDocument,"mousemove",wt),tt(U.wrapper.ownerDocument,"mouseup",At),V.history.lastSelOrigin=null}var wt=Nn(e,function(Tt){Tt.buttons===0||!$e(Tt)?bt(Tt):dt(Tt)}),At=Nn(e,bt);e.state.selectingText=At,Se(U.wrapper.ownerDocument,"mousemove",wt),Se(U.wrapper.ownerDocument,"mouseup",At)}function Yl(e,t){var D=t.anchor,A=t.head,U=mt(e.doc,D.line);if(Mt(D,A)==0&&D.sticky==A.sticky)return t;var V=rt(U);if(!V)return t;var re=Ve(V,D.ch,D.sticky),le=V[re];if(le.from!=D.ch&&le.to!=D.ch)return t;var ue=re+(le.from==D.ch==(le.level!=1)?0:1);if(ue==0||ue==V.length)return t;var ve;if(A.line!=D.line)ve=(A.line-D.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ie=Ve(V,A.ch,A.sticky),Fe=Ie-re||(A.ch-D.ch)*(le.level==1?-1:1);Ie==ue-1||Ie==ue?ve=Fe<0:ve=Fe>0}var nt=V[ue+(ve?-1:0)],Ze=ve==(nt.level==1),lt=Ze?nt.from:nt.to,dt=Ze?"after":"before";return D.ch==lt&&D.sticky==dt?t:new Fr(new ut(D.line,lt,dt),A)}function nl(e,t,D,A){var U,V;if(t.touches)U=t.touches[0].clientX,V=t.touches[0].clientY;else try{U=t.clientX,V=t.clientY}catch(nt){return!1}if(U>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&ce(t);var re=e.display,le=re.lineDiv.getBoundingClientRect();if(V>le.bottom||!Te(e,D))return _e(t);V-=le.top-re.viewOffset;for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var ve=re.gutters.childNodes[ue];if(ve&&ve.getBoundingClientRect().right>=U){var Ie=Er(e.doc,V),Fe=e.display.gutterSpecs[ue];return Ue(e,D,e,Ie,Fe.className,t),_e(t)}}}function cs(e,t){return nl(e,t,"gutterClick",!0)}function al(e,t){if(Wn(e.display,t)||$l(e,t))return;if(Xe(e,t,"contextmenu"))return;P||e.display.input.onContextMenu(t)}function $l(e,t){return Te(e,"gutterContextMenu")?nl(e,t,"gutterContextMenu",!1):!1}function il(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ur(e)}var Ji={toString:function(){return"CodeMirror.Init"}},ol={},Ko={};function Jl(e){var t=e.optionHandlers;function D(A,U,V,re){e.defaults[A]=U,V&&(t[A]=re?function(le,ue,ve){ve!=Ji&&V(le,ue,ve)}:V)}e.defineOption=D,e.Init=Ji,D("value","",function(A,U){return A.setValue(U)},!0),D("mode",null,function(A,U){A.doc.modeOption=U,pi(A)},!0),D("indentUnit",2,pi,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(A){co(A),ur(A),qr(A)},!0),D("lineSeparator",null,function(A,U){if(A.doc.lineSep=U,!U)return;var V=[],re=A.doc.first;A.doc.iter(function(ue){for(var ve=0;;){var Ie=ue.text.indexOf(U,ve);if(Ie==-1)break;ve=Ie+U.length,V.push(ut(re,Ie))}re++});for(var le=V.length-1;le>=0;le--)Xi(A.doc,U,V[le],ut(V[le].line,V[le].ch+U.length))}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,U,V){A.state.specialChars=new RegExp(U.source+(U.test(" ")?"":"| "),"g"),V!=Ji&&A.refresh()}),D("specialCharPlaceholder",Dt,function(A){return A.refresh()},!0),D("electricChars",!0),D("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),D("spellcheck",!1,function(A,U){return A.getInputField().spellcheck=U},!0),D("autocorrect",!1,function(A,U){return A.getInputField().autocorrect=U},!0),D("autocapitalize",!1,function(A,U){return A.getInputField().autocapitalize=U},!0),D("rtlMoveVisually",!C),D("wholeLineUpdateBefore",!0),D("theme","default",function(A){il(A),Ja(A)},!0),D("keyMap","default",function(A,U,V){var re=Wo(U),le=V!=Ji&&Wo(V);le&&le.detach&&le.detach(A,re),re.attach&&re.attach(A,le||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Zl,!0),D("gutters",[],function(A,U){A.display.gutterSpecs=xa(U,A.options.lineNumbers),Ja(A)},!0),D("fixedGutter",!0,function(A,U){A.display.gutters.style.left=U?ma(A.display)+"px":"0",A.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(A){return di(A)},!0),D("scrollbarStyle","native",function(A){Ui(A),di(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),D("lineNumbers",!1,function(A,U){A.display.gutterSpecs=xa(A.options.gutters,U),Ja(A)},!0),D("firstLineNumber",1,Ja,!0),D("lineNumberFormatter",function(A){return A},Ja,!0),D("showCursorWhenSelecting",!1,Yr,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(A,U){U=="nocursor"&&(gi(A),A.display.input.blur()),A.display.input.readOnlyChanged(U)}),D("screenReaderLabel",null,function(A,U){U=U===""?null:U,A.display.input.screenReaderLabelChanged(U)}),D("disableInput",!1,function(A,U){U||A.display.input.reset()},!0),D("dragDrop",!0,Ql),D("allowDropFileTypes",null),D("cursorBlinkRate",530),D("cursorScrollMargin",0),D("cursorHeight",1,Yr,!0),D("singleCursorHeightPerLine",!0,Yr,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,co,!0),D("addModeClass",!1,co,!0),D("pollInterval",100),D("undoDepth",200,function(A,U){return A.doc.history.undoDepth=U}),D("historyEventDelay",1250),D("viewportMargin",10,function(A){return A.refresh()},!0),D("maxHighlightLength",1e4,co,!0),D("moveInputWithCursor",!0,function(A,U){U||A.display.input.resetPosition()}),D("tabindex",null,function(A,U){return A.display.input.getField().tabIndex=U||""}),D("autofocus",null),D("direction","ltr",function(A,U){return A.doc.setDirection(U)},!0),D("phrases",null)}function Ql(e,t,D){var A=D&&D!=Ji;if(!t!=!A){var U=e.display.dragFunctions,V=t?Se:tt;V(e.display.scroller,"dragstart",U.start),V(e.display.scroller,"dragenter",U.enter),V(e.display.scroller,"dragover",U.over),V(e.display.scroller,"dragleave",U.leave),V(e.display.scroller,"drop",U.drop)}}function Zl(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(y(e.display.wrapper,"CodeMirror-wrap"),sa(e)),ba(e),qr(e),ur(e),setTimeout(function(){return di(e)},100)}function Tn(e,t){var D=this;if(!(this instanceof Tn))return new Tn(e,t);this.options=t=t?K(t):{},K(ol,t,!1);var A=t.value;typeof A=="string"?A=new Oa(A,t.mode,null,t.lineSeparator,t.direction):t.mode&&(A.modeOption=t.mode),this.doc=A;var U=new Tn.inputStyles[t.inputStyle](this),V=this.display=new Mi(e,A,U,t);V.wrapper.CodeMirror=this,il(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ui(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new J,keySeq:null,specialChars:null},t.autofocus&&!n&&V.input.focus(),w&&l<11&&setTimeout(function(){return D.display.input.reset(!0)},20),ql(this),Dl(),si(this),this.curOp.forceUpdate=!0,gs(this,A),t.autofocus&&!n||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&ii(D)},20):gi(this);for(var re in Ko)Ko.hasOwnProperty(re)&&Ko[re](this,t[re],Ji);Jn(this),t.finishInit&&t.finishInit(this);for(var le=0;le<ds.length;++le)ds[le](this);fi(this),i&&t.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}Tn.defaults=ol,Tn.optionHandlers=Ko;function ql(e){var t=e.display;Se(t.scroller,"mousedown",Nn(e,tl)),w&&l<11?Se(t.scroller,"dblclick",Nn(e,function(ue){if(Xe(e,ue))return;var ve=Yn(e,ue);if(!ve||cs(e,ue)||Wn(e.display,ue))return;ce(ue);var Ie=e.findWordAt(ve);No(e.doc,Ie.anchor,Ie.head)})):Se(t.scroller,"dblclick",function(ue){return Xe(e,ue)||ce(ue)}),Se(t.scroller,"contextmenu",function(ue){return al(e,ue)}),Se(t.input.getField(),"contextmenu",function(ue){t.scroller.contains(ue.target)||al(e,ue)});var D,A={end:0};function U(){t.activeTouch&&(D=setTimeout(function(){return t.activeTouch=null},1e3),A=t.activeTouch,A.end=+new Date)}function V(ue){if(ue.touches.length!=1)return!1;var ve=ue.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function re(ue,ve){if(ve.left==null)return!0;var Ie=ve.left-ue.left,Fe=ve.top-ue.top;return Ie*Ie+Fe*Fe>20*20}Se(t.scroller,"touchstart",function(ue){if(!Xe(e,ue)&&!V(ue)&&!cs(e,ue)){t.input.ensurePolled(),clearTimeout(D);var ve=+new Date;t.activeTouch={start:ve,moved:!1,prev:ve-A.end<=300?A:null},ue.touches.length==1&&(t.activeTouch.left=ue.touches[0].pageX,t.activeTouch.top=ue.touches[0].pageY)}}),Se(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Se(t.scroller,"touchend",function(ue){var ve=t.activeTouch;if(ve&&!Wn(t,ue)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var Ie=e.coordsChar(t.activeTouch,"page"),Fe;!ve.prev||re(ve,ve.prev)?Fe=new Fr(Ie,Ie):!ve.prev.prev||re(ve,ve.prev.prev)?Fe=e.findWordAt(Ie):Fe=new Fr(ut(Ie.line,0),Ot(e.doc,ut(Ie.line+1,0))),e.setSelection(Fe.anchor,Fe.head),e.focus(),ce(ue)}U()}),Se(t.scroller,"touchcancel",U),Se(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ei(e,t.scroller.scrollTop),Na(e,t.scroller.scrollLeft,!0),Ue(e,"scroll",e))}),Se(t.scroller,"mousewheel",function(ue){return lo(e,ue)}),Se(t.scroller,"DOMMouseScroll",function(ue){return lo(e,ue)}),Se(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(ue){Xe(e,ue)||De(ue)},over:function(ue){Xe(e,ue)||(Rl(e,ue),De(ue))},start:function(ue){return Al(e,ue)},drop:Nn(e,Ol),leave:function(ue){Xe(e,ue)||Ws(e)}};var le=t.input.getField();Se(le,"keyup",function(ue){return Zs.call(e,ue)}),Se(le,"keydown",Nn(e,Qs)),Se(le,"keypress",Nn(e,el)),Se(le,"focus",function(ue){return ii(e,ue)}),Se(le,"blur",function(ue){return gi(e,ue)})}var ds=[];Tn.defineInitHook=function(e){return ds.push(e)};function So(e,t,D,A){var U=e.doc,V;D==null&&(D="add"),D=="smart"&&(U.mode.indent?V=ft(e,t).state:D="prev");var re=e.options.tabSize,le=mt(U,t),ue=W(le.text,null,re);le.stateAfter&&(le.stateAfter=null);var ve=le.text.match(/^\s*/)[0],Ie;if(!A&&!/\S/.test(le.text))Ie=0,D="not";else if(D=="smart"&&(Ie=U.mode.indent(V,le.text.slice(ve.length),le.text),Ie==he||Ie>150)){if(!A)return;D="prev"}D=="prev"?t>U.first?Ie=W(mt(U,t-1).text,null,re):Ie=0:D=="add"?Ie=ue+e.options.indentUnit:D=="subtract"?Ie=ue-e.options.indentUnit:typeof D=="number"&&(Ie=ue+D),Ie=Math.max(0,Ie);var Fe="",nt=0;if(e.options.indentWithTabs)for(var Ze=Math.floor(Ie/re);Ze;--Ze)nt+=re,Fe+=" ";if(nt<Ie&&(Fe+=se(Ie-nt)),Fe!=ve)return Xi(U,Fe,ut(t,0),ut(t,ve.length),"+input"),le.stateAfter=null,!0;for(var lt=0;lt<U.sel.ranges.length;lt++){var dt=U.sel.ranges[lt];if(dt.head.line==t&&dt.head.ch<ve.length){var bt=ut(t,ve.length);as(U,lt,new Fr(bt,bt));break}}}var qa=null;function zo(e){qa=e}function fs(e,t,D,A,U){var V=e.doc;e.display.shift=!1,A||(A=V.sel);var re=+new Date-200,le=U=="paste"||e.state.pasteIncoming>re,ue=yt(t),ve=null;if(le&&A.ranges.length>1)if(qa&&qa.text.join(`
`)==t){if(A.ranges.length%qa.text.length==0){ve=[];for(var Ie=0;Ie<qa.text.length;Ie++)ve.push(V.splitLines(qa.text[Ie]))}}else ue.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(ve=be(ue,function(wt){return[wt]}));for(var Fe=e.curOp.updateInput,nt=A.ranges.length-1;nt>=0;nt--){var Ze=A.ranges[nt],lt=Ze.from(),dt=Ze.to();Ze.empty()&&(D&&D>0?lt=ut(lt.line,lt.ch-D):e.state.overwrite&&!le?dt=ut(dt.line,Math.min(mt(V,dt.line).text.length,dt.ch+te(ue).length)):le&&qa&&qa.lineWise&&qa.text.join(`
`)==ue.join(`
`)&&(lt=dt=ut(lt.line,0)));var bt={from:lt,to:dt,text:ve?ve[nt%ve.length]:ue,origin:U||(le?"paste":e.state.cutIncoming>re?"cut":"+input")};Gi(e.doc,bt),Jt(e,"inputRead",e,bt)}t&&!le&&ll(e,t),yi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Fe),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,t){var D=e.clipboardData&&e.clipboardData.getData("Text");if(D)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Ea(t,function(){return fs(t,D,0,null,"paste")}),!0}function ll(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var D=e.doc.sel,A=D.ranges.length-1;A>=0;A--){var U=D.ranges[A];if(U.head.ch>100||A&&D.ranges[A-1].head.line==U.head.line)continue;var V=e.getModeAt(U.head),re=!1;if(V.electricChars){for(var le=0;le<V.electricChars.length;le++)if(t.indexOf(V.electricChars.charAt(le))>-1){re=So(e,U.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(mt(e.doc,U.head.line).text.slice(0,U.head.ch))&&(re=So(e,U.head.line,"smart")));re&&Jt(e,"electricInput",e,U.head.line)}}function ul(e){for(var t=[],D=[],A=0;A<e.doc.sel.ranges.length;A++){var U=e.doc.sel.ranges[A].head.line,V={anchor:ut(U,0),head:ut(U+1,0)};D.push(V),t.push(e.getRange(V.anchor,V.head))}return{text:t,ranges:D}}function cl(e,t,D,A){e.setAttribute("autocorrect",D?"":"off"),e.setAttribute("autocapitalize",A?"":"off"),e.setAttribute("spellcheck",!!t)}function dl(){var e=_("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=_("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return i?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),cl(e),t}function eu(e){var t=e.optionHandlers,D=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(A,U){var V=this.options,re=V[A];if(V[A]==U&&A!="mode")return;V[A]=U,t.hasOwnProperty(A)&&Nn(this,t[A])(this,U,re),Ue(this,"optionChange",this,A)},getOption:function(A){return this.options[A]},getDoc:function(){return this.doc},addKeyMap:function(A,U){this.state.keyMaps[U?"push":"unshift"](Wo(A))},removeKeyMap:function(A){for(var U=this.state.keyMaps,V=0;V<U.length;++V)if(U[V]==A||U[V].name==A)return U.splice(V,1),!0},addOverlay:la(function(A,U){var V=A.token?A:e.getMode(this.options,A);if(V.startState)throw new Error("Overlays may not be stateful.");q(this.state.overlays,{mode:V,modeSpec:A,opaque:U&&U.opaque,priority:U&&U.priority||0},function(re){return re.priority}),this.state.modeGen++,qr(this)}),removeOverlay:la(function(A){for(var U=this.state.overlays,V=0;V<U.length;++V){var re=U[V].modeSpec;if(re==A||typeof A=="string"&&re.name==A){U.splice(V,1),this.state.modeGen++,qr(this);return}}}),indentLine:la(function(A,U,V){typeof U!="string"&&typeof U!="number"&&(U==null?U=this.options.smartIndent?"smart":"prev":U=U?"add":"subtract"),yn(this.doc,A)&&So(this,A,U,V)}),indentSelection:la(function(A){for(var U=this.doc.sel.ranges,V=-1,re=0;re<U.length;re++){var le=U[re];if(le.empty())le.head.line>V&&(So(this,le.head.line,A,!0),V=le.head.line,re==this.doc.sel.primIndex&&yi(this));else{var ue=le.from(),ve=le.to(),Ie=Math.max(V,ue.line);V=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var Fe=Ie;Fe<V;++Fe)So(this,Fe,A);var nt=this.doc.sel.ranges;ue.ch==0&&U.length==nt.length&&nt[re].from().ch>0&&as(this.doc,re,new Fr(ue,nt[re].to()),ge)}}}),getTokenAt:function(A,U){return Fn(this,A,U)},getLineTokens:function(A,U){return Fn(this,ut(A),U,!0)},getTokenTypeAt:function(A){A=Ot(this.doc,A);var U=Ln(this,mt(this.doc,A.line)),V=0,re=(U.length-1)/2,le=A.ch,ue;if(le==0)ue=U[2];else for(;;){var ve=V+re>>1;if((ve?U[ve*2-1]:0)>=le)re=ve;else if(U[ve*2+1]<le)V=ve+1;else{ue=U[ve*2+2];break}}var Ie=ue?ue.indexOf("overlay "):-1;return Ie<0?ue:Ie==0?null:ue.slice(0,Ie-1)},getModeAt:function(A){var U=this.doc.mode;return U.innerMode?e.innerMode(U,this.getTokenAt(A).state).mode:U},getHelper:function(A,U){return this.getHelpers(A,U)[0]},getHelpers:function(A,U){var V=[];if(!D.hasOwnProperty(U))return V;var re=D[U],le=this.getModeAt(A);if(typeof le[U]=="string")re[le[U]]&&V.push(re[le[U]]);else if(le[U])for(var ue=0;ue<le[U].length;ue++){var ve=re[le[U][ue]];ve&&V.push(ve)}else le.helperType&&re[le.helperType]?V.push(re[le.helperType]):re[le.name]&&V.push(re[le.name]);for(var Ie=0;Ie<re._global.length;Ie++){var Fe=re._global[Ie];Fe.pred(le,this)&&ee(V,Fe.val)==-1&&V.push(Fe.val)}return V},getStateAfter:function(A,U){var V=this.doc;return A=Hr(V,A==null?V.first+V.size-1:A),ft(this,A+1,U).state},cursorCoords:function(A,U){var V,re=this.doc.sel.primary();return A==null?V=re.head:typeof A=="object"?V=Ot(this.doc,A):V=A?re.from():re.to(),Tr(this,V,U||"page")},charCoords:function(A,U){return mn(this,Ot(this.doc,A),U||"page")},coordsChar:function(A,U){return A=wr(this,A,U||"page"),Sr(this,A.left,A.top)},lineAtHeight:function(A,U){return A=wr(this,{top:A,left:0},U||"page").top,Er(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,U,V){var re=!1,le;if(typeof A=="number"){var ue=this.doc.first+this.doc.size-1;A<this.doc.first?A=this.doc.first:A>ue&&(A=ue,re=!0),le=mt(this.doc,A)}else le=A;return Ar(this,le,{top:0,left:0},U||"page",V||re).top+(re?this.doc.height-kn(le):0)},defaultTextHeight:function(){return Dn(this.display)},defaultCharWidth:function(){return Vn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,U,V,re,le){var ue=this.display;A=Tr(this,Ot(this.doc,A));var ve=A.bottom,Ie=A.left;if(U.style.position="absolute",U.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(U),ue.sizer.appendChild(U),re=="over")ve=A.top;else if(re=="above"||re=="near"){var Fe=Math.max(ue.wrapper.clientHeight,this.doc.height),nt=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(re=="above"||A.bottom+U.offsetHeight>Fe)&&A.top>U.offsetHeight?ve=A.top-U.offsetHeight:A.bottom+U.offsetHeight<=Fe&&(ve=A.bottom),Ie+U.offsetWidth>nt&&(Ie=nt-U.offsetWidth)}U.style.top=ve+"px",U.style.left=U.style.right="",le=="right"?(Ie=ue.sizer.clientWidth-U.offsetWidth,U.style.right="0px"):(le=="left"?Ie=0:le=="middle"&&(Ie=(ue.sizer.clientWidth-U.offsetWidth)/2),U.style.left=Ie+"px"),V&&_o(this,{left:Ie,top:ve,right:Ie+U.offsetWidth,bottom:ve+U.offsetHeight})},triggerOnKeyDown:la(Qs),triggerOnKeyPress:la(el),triggerOnKeyUp:Zs,triggerOnMouseDown:la(tl),execCommand:function(A){if(Eo.hasOwnProperty(A))return Eo[A].call(null,this)},triggerElectric:la(function(A){ll(this,A)}),findPosH:function(A,U,V,re){var le=1;U<0&&(le=-1,U=-U);for(var ue=Ot(this.doc,A),ve=0;ve<U&&!(ue=hs(this.doc,ue,le,V,re),ue.hitSide);++ve);return ue},moveH:la(function(A,U){var V=this;this.extendSelectionsBy(function(re){return V.display.shift||V.doc.extend||re.empty()?hs(V.doc,re.head,A,U,V.options.rtlMoveVisually):A<0?re.from():re.to()},we)}),deleteH:la(function(A,U){var V=this.doc.sel,re=this.doc;V.somethingSelected()?re.replaceSelection("",null,"+delete"):$i(this,function(le){var ue=hs(re,le.head,A,U,!1);return A<0?{from:ue,to:le.head}:{from:le.head,to:ue}})}),findPosV:function(A,U,V,re){var le=1,ue=re;U<0&&(le=-1,U=-U);for(var ve=Ot(this.doc,A),Ie=0;Ie<U;++Ie){var Fe=Tr(this,ve,"div");if(ue==null?ue=Fe.left:Fe.left=ue,ve=fl(this,Fe,le,V),ve.hitSide)break}return ve},moveV:la(function(A,U){var V=this,re=this.doc,le=[],ue=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(Ie){if(ue)return A<0?Ie.from():Ie.to();var Fe=Tr(V,Ie.head,"div");Ie.goalColumn!=null&&(Fe.left=Ie.goalColumn),le.push(Fe.left);var nt=fl(V,Fe,A,U);return U=="page"&&Ie==re.sel.primary()&&no(V,mn(V,nt,"div").top-Fe.top),nt},we),le.length)for(var ve=0;ve<re.sel.ranges.length;ve++)re.sel.ranges[ve].goalColumn=le[ve]}),findWordAt:function(A){var U=this.doc,V=mt(U,A.line).text,re=A.ch,le=A.ch;if(V){var ue=this.getHelper(A,"wordChars");(A.sticky=="before"||le==V.length)&&re?--re:++le;for(var ve=V.charAt(re),Ie=X(ve,ue)?function(Fe){return X(Fe,ue)}:/\s/.test(ve)?function(Fe){return/\s/.test(Fe)}:function(Fe){return!/\s/.test(Fe)&&!X(Fe)};re>0&&Ie(V.charAt(re-1));)--re;for(;le<V.length&&Ie(V.charAt(le));)++le}return new Fr(ut(A.line,re),ut(A.line,le))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):y(this.display.cursorDiv,"CodeMirror-overwrite"),Ue(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==H()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:la(function(A,U){bi(this,A,U)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-Ke(this)-this.display.barHeight,width:A.scrollWidth-Ke(this)-this.display.barWidth,clientHeight:fe(this),clientWidth:Le(this)}},scrollIntoView:la(function(A,U){A==null?(A={from:this.doc.sel.primary().head,to:null},U==null&&(U=this.options.cursorScrollMargin)):typeof A=="number"?A={from:ut(A,0),to:null}:A.from==null&&(A={from:A,to:null}),A.to||(A.to=A.from),A.margin=U||0,A.from.line!=null?$o(this,A):Oi(this,A.from,A.to,A.margin)}),setSize:la(function(A,U){var V=this,re=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};A!=null&&(this.display.wrapper.style.width=re(A)),U!=null&&(this.display.wrapper.style.height=re(U)),this.options.lineWrapping&&or(this);var le=this.display.viewFrom;this.doc.iter(le,this.display.viewTo,function(ue){if(ue.widgets){for(var ve=0;ve<ue.widgets.length;ve++)if(ue.widgets[ve].noHScroll){wn(V,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,Ue(this,"refresh",this)}),operation:function(A){return Ea(this,A)},startOperation:function(){return si(this)},endOperation:function(){return fi(this)},refresh:la(function(){var A=this.display.cachedTextHeight;qr(this),this.curOp.forceUpdate=!0,ur(this),bi(this,this.doc.scrollLeft,this.doc.scrollTop),Bi(this.display),(A==null||Math.abs(A-Dn(this.display))>.5||this.options.lineWrapping)&&ba(this),Ue(this,"refresh",this)}),swapDoc:la(function(A){var U=this.doc;return U.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),ur(this),this.display.input.reset(),bi(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Jt(this,"swapDoc",this,U),U}),phrase:function(A){var U=this.options.phrases;return U&&Object.prototype.hasOwnProperty.call(U,A)?U[A]:A},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ae(e),e.registerHelper=function(A,U,V){D.hasOwnProperty(A)||(D[A]=e[A]={_global:[]}),D[A][U]=V},e.registerGlobalHelper=function(A,U,V,re){e.registerHelper(A,U,re),D[A]._global.push({pred:V,val:re})}}function hs(e,t,D,A,U){var V=t,re=D,le=mt(e,t.line),ue=U&&e.direction=="rtl"?-D:D;function ve(){var At=t.line+ue;return At<e.first||At>=e.first+e.size?!1:(t=new ut(At,t.ch,t.sticky),le=mt(e,At))}function Ie(At){var Tt;if(A=="codepoint"){var Pt=le.text.charCodeAt(t.ch+(A>0?0:-1));isNaN(Pt)?Tt=null:Tt=new ut(t.line,Math.max(0,Math.min(le.text.length,t.ch+D*(Pt>=55296&&Pt<56320?2:1))),-D)}else U?Tt=Il(e.cm,le,t,D):Tt=os(le,t,D);if(Tt==null)if(!At&&ve())t=ss(U,e.cm,le,t.line,ue);else return!1;else t=Tt;return!0}if(A=="char"||A=="codepoint")Ie();else if(A=="column")Ie(!0);else if(A=="word"||A=="group")for(var Fe=null,nt=A=="group",Ze=e.cm&&e.cm.getHelper(t,"wordChars"),lt=!0;!(D<0&&!Ie(!lt));lt=!1){var dt=le.text.charAt(t.ch)||`
`,bt=X(dt,Ze)?"w":nt&&dt==`
`?"n":!nt||/\s/.test(dt)?null:"p";if(nt&&!lt&&!bt&&(bt="s"),Fe&&Fe!=bt){D<0&&(D=1,Ie(),t.sticky="after");break}if(bt&&(Fe=bt),D>0&&!Ie(!lt))break}var wt=Uo(e,t,V,re,!0);return Wr(V,wt)&&(wt.hitSide=!0),wt}function fl(e,t,D,A){var U=e.doc,V=t.left,re;if(A=="page"){var le=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(le-.5*Dn(e.display),3);re=(D>0?t.bottom:t.top)+D*ue}else A=="line"&&(re=D>0?t.bottom+3:t.top-3);for(var ve;!(ve=Sr(e,V,re),!ve.outside);){if(D<0?re<=0:re>=U.height){ve.hitSide=!0;break}re+=D*5}return ve}var en=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new J,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};en.prototype.init=function(e){var t=this,D=this,A=D.cm,U=D.div=e.lineDiv;cl(U,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function V(le){for(var ue=le.target;ue;ue=ue.parentNode){if(ue==U)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Se(U,"paste",function(le){if(!V(le)||Xe(A,le)||sl(le,A))return;l<=11&&setTimeout(Nn(A,function(){return t.updateFromDOM()}),20)}),Se(U,"compositionstart",function(le){t.composing={data:le.data,done:!1}}),Se(U,"compositionupdate",function(le){t.composing||(t.composing={data:le.data,done:!1})}),Se(U,"compositionend",function(le){t.composing&&(le.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Se(U,"touchstart",function(){return D.forceCompositionEnd()}),Se(U,"input",function(){t.composing||t.readFromDOMSoon()});function re(le){if(!V(le)||Xe(A,le))return;if(A.somethingSelected())zo({lineWise:!1,text:A.getSelections()}),le.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var ue=ul(A);zo({lineWise:!0,text:ue.text}),le.type=="cut"&&A.operation(function(){A.setSelections(ue.ranges,0,ge),A.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ve=qa.text.join(`
`);if(le.clipboardData.setData("Text",ve),le.clipboardData.getData("Text")==ve){le.preventDefault();return}}var Ie=dl(),Fe=Ie.firstChild;A.display.lineSpace.insertBefore(Ie,A.display.lineSpace.firstChild),Fe.value=qa.text.join(`
`);var nt=document.activeElement;G(Fe),setTimeout(function(){A.display.lineSpace.removeChild(Ie),nt.focus(),nt==U&&D.showPrimarySelection()},50)}Se(U,"copy",re),Se(U,"cut",re)},en.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},en.prototype.prepareSelection=function(){var e=za(this.cm,!1);return e.focus=document.activeElement==this.div,e},en.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},en.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},en.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,D=t.doc.sel.primary(),A=D.from(),U=D.to();if(t.display.viewTo==t.display.viewFrom||A.line>=t.display.viewTo||U.line<t.display.viewFrom){e.removeAllRanges();return}var V=Go(t,e.anchorNode,e.anchorOffset),re=Go(t,e.focusNode,e.focusOffset);if(V&&!V.bad&&re&&!re.bad&&Mt(bn(V,re),A)==0&&Mt(Sn(V,re),U)==0)return;var le=t.display.view,ue=A.line>=t.display.viewFrom&&hl(t,A)||{node:le[0].measure.map[2],offset:0},ve=U.line<t.display.viewTo&&hl(t,U);if(!ve){var Ie=le[le.length-1].measure,Fe=Ie.maps?Ie.maps[Ie.maps.length-1]:Ie.map;ve={node:Fe[Fe.length-1],offset:Fe[Fe.length-2]-Fe[Fe.length-3]}}if(!ue||!ve){e.removeAllRanges();return}var nt=e.rangeCount&&e.getRangeAt(0),Ze;try{Ze=j(ue.node,ue.offset,ve.offset,ve.node)}catch(lt){}Ze&&(!S&&t.state.focused?(e.collapse(ue.node,ue.offset),Ze.collapsed||(e.removeAllRanges(),e.addRange(Ze))):(e.removeAllRanges(),e.addRange(Ze)),nt&&e.anchorNode==null?e.addRange(nt):S&&this.startGracePeriod()),this.rememberSelection()},en.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)},en.prototype.showMultipleSelections=function(e){E(this.cm.display.cursorDiv,e.cursors),E(this.cm.display.selectionDiv,e.selection)},en.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},en.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return M(this.div,t)},en.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},en.prototype.blur=function(){this.div.blur()},en.prototype.getField=function(){return this.div},en.prototype.supportsTouch=function(){return!0},en.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Ea(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)},en.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},en.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(v&&r&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var D=Go(t,e.anchorNode,e.anchorOffset),A=Go(t,e.focusNode,e.focusOffset);D&&A&&Ea(t,function(){va(t.doc,Qa(D,A),ge),(D.bad||A.bad)&&(t.curOp.selectionChanged=!0)})},en.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,D=e.doc.sel.primary(),A=D.from(),U=D.to();if(A.ch==0&&A.line>e.firstLine()&&(A=ut(A.line-1,mt(e.doc,A.line-1).length)),U.ch==mt(e.doc,U.line).text.length&&U.line<e.lastLine()&&(U=ut(U.line+1,0)),A.line<t.viewFrom||U.line>t.viewTo-1)return!1;var V,re,le;A.line==t.viewFrom||(V=ln(e,A.line))==0?(re=Rt(t.view[0].line),le=t.view[0].node):(re=Rt(t.view[V].line),le=t.view[V-1].node.nextSibling);var ue=ln(e,U.line),ve,Ie;if(ue==t.view.length-1?(ve=t.viewTo-1,Ie=t.lineDiv.lastChild):(ve=Rt(t.view[ue+1].line)-1,Ie=t.view[ue+1].node.previousSibling),!le)return!1;for(var Fe=e.doc.splitLines(ru(e,le,Ie,re,ve)),nt=mr(e.doc,ut(re,0),ut(ve,mt(e.doc,ve).text.length));Fe.length>1&&nt.length>1;)if(te(Fe)==te(nt))Fe.pop(),nt.pop(),ve--;else if(Fe[0]==nt[0])Fe.shift(),nt.shift(),re++;else break;for(var Ze=0,lt=0,dt=Fe[0],bt=nt[0],wt=Math.min(dt.length,bt.length);Ze<wt&&dt.charCodeAt(Ze)==bt.charCodeAt(Ze);)++Ze;for(var At=te(Fe),Tt=te(nt),Pt=Math.min(At.length-(Fe.length==1?Ze:0),Tt.length-(nt.length==1?Ze:0));lt<Pt&&At.charCodeAt(At.length-lt-1)==Tt.charCodeAt(Tt.length-lt-1);)++lt;if(Fe.length==1&&nt.length==1&&re==A.line)for(;Ze&&Ze>A.ch&&At.charCodeAt(At.length-lt-1)==Tt.charCodeAt(Tt.length-lt-1);)Ze--,lt++;Fe[Fe.length-1]=At.slice(0,At.length-lt).replace(/^\u200b+/,""),Fe[0]=Fe[0].slice(Ze).replace(/\u200b+$/,"");var Qt=ut(re,Ze),Gt=ut(ve,nt.length?te(nt).length-lt:0);if(Fe.length>1||Fe[0]||Mt(Qt,Gt))return Xi(e.doc,Fe,Qt,Gt,"+input"),!0},en.prototype.ensurePolled=function(){this.forceCompositionEnd()},en.prototype.reset=function(){this.forceCompositionEnd()},en.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},en.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)},en.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ea(this.cm,function(){return qr(e.cm)})},en.prototype.setUneditable=function(e){e.contentEditable="false"},en.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Nn(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},en.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},en.prototype.onContextMenu=function(){},en.prototype.resetPosition=function(){},en.prototype.needsContentAttribute=!0;function hl(e,t){var D=He(e,t.line);if(!D||D.hidden)return null;var A=mt(e.doc,t.line),U=ye(D,A,t.line),V=rt(A,e.doc.direction),re="left";if(V){var le=Ve(V,t.ch);re=le%2?"right":"left"}var ue=pt(U.map,t.ch,re);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Qi(e,t){return t&&(e.bad=!0),e}function ru(e,t,D,A,U){var V="",re=!1,le=e.doc.lineSeparator(),ue=!1;function ve(Ze){return function(lt){return lt.id==Ze}}function Ie(){re&&(V+=le,ue&&(V+=le),re=ue=!1)}function Fe(Ze){Ze&&(Ie(),V+=Ze)}function nt(Ze){if(Ze.nodeType==1){var lt=Ze.getAttribute("cm-text");if(lt){Fe(lt);return}var dt=Ze.getAttribute("cm-marker"),bt;if(dt){var wt=e.findMarks(ut(A,0),ut(U+1,0),ve(+dt));wt.length&&(bt=wt[0].find(0))&&Fe(mr(e.doc,bt.from,bt.to).join(le));return}if(Ze.getAttribute("contenteditable")=="false")return;var At=/^(pre|div|p|li|table|br)$/i.test(Ze.nodeName);if(!/^br$/i.test(Ze.nodeName)&&Ze.textContent.length==0)return;At&&Ie();for(var Tt=0;Tt<Ze.childNodes.length;Tt++)nt(Ze.childNodes[Tt]);/^(pre|p)$/i.test(Ze.nodeName)&&(ue=!0),At&&(re=!0)}else Ze.nodeType==3&&Fe(Ze.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(nt(t),t==D);)t=t.nextSibling,ue=!1;return V}function Go(e,t,D){var A;if(t==e.display.lineDiv){if(A=e.display.lineDiv.childNodes[D],!A)return Qi(e.clipPos(ut(e.display.viewTo-1)),!0);t=null,D=0}else for(A=t;;A=A.parentNode){if(!A||A==e.display.lineDiv)return null;if(A.parentNode&&A.parentNode==e.display.lineDiv)break}for(var U=0;U<e.display.view.length;U++){var V=e.display.view[U];if(V.node==A)return nu(V,t,D)}}function nu(e,t,D){var A=e.text.firstChild,U=!1;if(!t||!M(A,t))return Qi(ut(Rt(e.line),0),!0);if(t==A&&(U=!0,t=A.childNodes[D],D=0,!t)){var V=e.rest?te(e.rest):e.line;return Qi(ut(Rt(V),V.text.length),U)}var re=t.nodeType==3?t:null,le=t;for(!re&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(re=t.firstChild,D&&(D=re.nodeValue.length));le.parentNode!=A;)le=le.parentNode;var ue=e.measure,ve=ue.maps;function Ie(bt,wt,At){for(var Tt=-1;Tt<(ve?ve.length:0);Tt++)for(var Pt=Tt<0?ue.map:ve[Tt],Qt=0;Qt<Pt.length;Qt+=3){var Gt=Pt[Qt+2];if(Gt==bt||Gt==wt){var br=Rt(Tt<0?e.line:e.rest[Tt]),un=Pt[Qt]+At;return(At<0||Gt!=bt)&&(un=Pt[Qt+(At?1:0)]),ut(br,un)}}}var Fe=Ie(re,le,D);if(Fe)return Qi(Fe,U);for(var nt=le.nextSibling,Ze=re?re.nodeValue.length-D:0;nt;nt=nt.nextSibling){if(Fe=Ie(nt,nt.firstChild,0),Fe)return Qi(ut(Fe.line,Fe.ch-Ze),U);Ze+=nt.textContent.length}for(var lt=le.previousSibling,dt=D;lt;lt=lt.previousSibling){if(Fe=Ie(lt,lt.firstChild,-1),Fe)return Qi(ut(Fe.line,Fe.ch+dt),U);dt+=lt.textContent.length}}var Un=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new J,this.hasSelection=!1,this.composing=null};Un.prototype.init=function(e){var t=this,D=this,A=this.cm;this.createField(e);var U=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(U.style.width="0px"),Se(U,"input",function(){w&&l>=9&&t.hasSelection&&(t.hasSelection=null),D.poll()}),Se(U,"paste",function(re){if(Xe(A,re)||sl(re,A))return;A.state.pasteIncoming=+new Date,D.fastPoll()});function V(re){if(Xe(A,re))return;if(A.somethingSelected())zo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var le=ul(A);zo({lineWise:!0,text:le.text}),re.type=="cut"?A.setSelections(le.ranges,null,ge):(D.prevInput="",U.value=le.text.join(`
`),G(U))}else return;re.type=="cut"&&(A.state.cutIncoming=+new Date)}Se(U,"cut",V),Se(U,"copy",V),Se(e.scroller,"paste",function(re){if(Wn(e,re)||Xe(A,re))return;if(!U.dispatchEvent){A.state.pasteIncoming=+new Date,D.focus();return}var le=new Event("paste");le.clipboardData=re.clipboardData,U.dispatchEvent(le)}),Se(e.lineSpace,"selectstart",function(re){Wn(e,re)||ce(re)}),Se(U,"compositionstart",function(){var re=A.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:re,range:A.markText(re,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Se(U,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},Un.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Un.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Un.prototype.prepareSelection=function(){var e=this.cm,t=e.display,D=e.doc,A=za(e);if(e.options.moveInputWithCursor){var U=Tr(e,D.sel.primary().head,"div"),V=t.wrapper.getBoundingClientRect(),re=t.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,U.top+re.top-V.top)),A.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,U.left+re.left-V.left))}return A},Un.prototype.showSelection=function(e){var t=this.cm,D=t.display;E(D.cursorDiv,e.cursors),E(D.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Un.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var D=t.getSelection();this.textarea.value=D,t.state.focused&&G(this.textarea),w&&l>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",w&&l>=9&&(this.hasSelection=null))},Un.prototype.getField=function(){return this.textarea},Un.prototype.supportsTouch=function(){return!1},Un.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||H()!=this.textarea))try{this.textarea.focus()}catch(e){}},Un.prototype.blur=function(){this.textarea.blur()},Un.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Un.prototype.receivedFocus=function(){this.slowPoll()},Un.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()})},Un.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function D(){var A=t.poll();!A&&!e?(e=!0,t.polling.set(60,D)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,D)},Un.prototype.poll=function(){var e=this,t=this.cm,D=this.textarea,A=this.prevInput;if(this.contextMenuPending||!t.state.focused||ct(D)&&!A&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var U=D.value;if(U==A&&!t.somethingSelected())return!1;if(w&&l>=9&&this.hasSelection===U||d&&/[\uf700-\uf7ff]/.test(U))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var V=U.charCodeAt(0);if(V==8203&&!A&&(A="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,le=Math.min(A.length,U.length);re<le&&A.charCodeAt(re)==U.charCodeAt(re);)++re;return Ea(t,function(){fs(t,U.slice(re),A.length-re,null,e.composing?"*compose":null),U.length>1e3||U.indexOf(`
`)>-1?D.value=e.prevInput="":e.prevInput=U,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Un.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Un.prototype.onKeyPress=function(){w&&l>=9&&(this.hasSelection=null),this.fastPoll()},Un.prototype.onContextMenu=function(e){var t=this,D=t.cm,A=D.display,U=t.textarea;t.contextMenuPending&&t.contextMenuPending();var V=Yn(D,e),re=A.scroller.scrollTop;if(!V||u)return;var le=D.options.resetSelectionOnContextMenu;le&&D.doc.sel.contains(V)==-1&&Nn(D,va)(D.doc,Qa(V),ge);var ue=U.style.cssText,ve=t.wrapper.style.cssText,Ie=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",U.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Ie.top-5)+"px; left: "+(e.clientX-Ie.left-5)+`px;
z-index: 1000; background: `+(w?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Fe;i&&(Fe=window.scrollY),A.input.focus(),i&&window.scrollTo(null,Fe),A.input.reset(),D.somethingSelected()||(U.value=t.prevInput=" "),t.contextMenuPending=Ze,A.selForContextMenu=D.doc.sel,clearTimeout(A.detectingSelectAll);function nt(){if(U.selectionStart!=null){var dt=D.somethingSelected(),bt="\u200B"+(dt?U.value:"");U.value="\u21DA",U.value=bt,t.prevInput=dt?"":"\u200B",U.selectionStart=1,U.selectionEnd=bt.length,A.selForContextMenu=D.doc.sel}}function Ze(){if(t.contextMenuPending!=Ze)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=ve,U.style.cssText=ue,w&&l<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=re),U.selectionStart!=null){(!w||w&&l<9)&&nt();var dt=0,bt=function(){A.selForContextMenu==D.doc.sel&&U.selectionStart==0&&U.selectionEnd>0&&t.prevInput=="\u200B"?Nn(D,Ds)(D):dt++<10?A.detectingSelectAll=setTimeout(bt,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(bt,200)}}if(w&&l>=9&&nt(),P){De(e);var lt=function(){tt(window,"mouseup",lt),setTimeout(Ze,20)};Se(window,"mouseup",lt)}else setTimeout(Ze,50)},Un.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Un.prototype.setUneditable=function(){},Un.prototype.needsContentAttribute=!1;function au(e,t){if(t=t?K(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var D=H();t.autofocus=D==e||e.getAttribute("autofocus")!=null&&D==document.body}function A(){e.value=le.getValue()}var U;if(e.form&&(Se(e.form,"submit",A),!t.leaveSubmitMethodAlone)){var V=e.form;U=V.submit;try{var re=V.submit=function(){A(),V.submit=U,V.submit(),V.submit=re}}catch(ue){}}t.finishInit=function(ue){ue.save=A,ue.getTextArea=function(){return e},ue.toTextArea=function(){ue.toTextArea=isNaN,A(),e.parentNode.removeChild(ue.getWrapperElement()),e.style.display="",e.form&&(tt(e.form,"submit",A),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=U))}},e.style.display="none";var le=Tn(function(ue){return e.parentNode.insertBefore(ue,e.nextSibling)},t);return le}function iu(e){e.off=tt,e.on=Se,e.wheelEventPixels=so,e.Doc=Oa,e.splitLines=yt,e.countColumn=W,e.findColumn=me,e.isWordChar=Q,e.Pass=he,e.signal=Ue,e.Line=Xn,e.changeEnd=Za,e.scrollbarModel=ao,e.Pos=ut,e.cmpPos=Mt,e.modes=Ft,e.mimeModes=Et,e.resolveMode=It,e.getMode=Ht,e.modeExtensions=Ur,e.extendMode=cn,e.copyState=gr,e.startState=vt,e.innerMode=zn,e.commands=Eo,e.keyMap=mi,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=Yi,e.normalizeKeyMap=kl,e.StringStream=_t,e.SharedTextMarker=go,e.TextMarker=Si,e.LineWidget=vo,e.e_preventDefault=ce,e.e_stopPropagation=Ee,e.e_stop=De,e.addClass=z,e.contains=M,e.rmClass=y,e.keyNames=Ci}Jl(Tn),eu(Tn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Xo in Oa.prototype)Oa.prototype.hasOwnProperty(Xo)&&ee(ou,Xo)<0&&(Tn.prototype[Xo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Oa.prototype[Xo]));return Ae(Oa),Tn.inputStyles={textarea:Un,contenteditable:en},Tn.defineMode=function(e){!Tn.defaults.mode&&e!="null"&&(Tn.defaults.mode=e),ir.apply(this,arguments)},Tn.defineMIME=Yt,Tn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Tn.defineMIME("text/plain","null"),Tn.defineExtension=function(e,t){Tn.prototype[e]=t},Tn.defineDocExtension=function(e,t){Oa.prototype[e]=t},Tn.fromTextArea=au,iu(Tn),Tn.version="5.58.2",Tn})},WYAk:function(I,Y,k){(function(L,c){I.exports=Y=c(k("Ib8C"))})(this,function(L){(function(){var c=L,S=c.lib,R=S.Base,f=c.enc,s=f.Utf8,w=c.algo,l=w.HMAC=R.extend({init:function(i,a){i=this._hasher=new i.init,typeof a=="string"&&(a=s.parse(a));var r=i.blockSize,u=r*4;a.sigBytes>u&&(a=i.finalize(a)),a.clamp();for(var p=this._oKey=a.clone(),m=this._iKey=a.clone(),b=p.words,g=m.words,v=0;v<r;v++)b[v]^=1549556828,g[v]^=909522486;p.sigBytes=m.sigBytes=u,this.reset()},reset:function(){var i=this._hasher;i.reset(),i.update(this._iKey)},update:function(i){return this._hasher.update(i),this},finalize:function(i){var a=this._hasher,r=a.finalize(i);a.reset();var u=a.finalize(this._oKey.clone().concat(r));return u}})})()})},WaYH:function(I,Y,k){"use strict";var L=k("rePB"),c=k("Ff2n"),S=k("VTBJ"),R=k("1OyB"),f=k("vuIU"),s=k("JX7q"),w=k("Ji7U"),l=k("LK+K"),i=k("cDcd"),a=k("TSYQ"),r=k.n(a),u=k("sboe"),p=k("OZM5"),m=function(P){var O=P.prefixCls,y=P.level,x=P.isStart,E=P.isEnd;if(!y)return null;for(var _="".concat(O,"-indent-unit"),N=[],j=0;j<y;j+=1){var M;N.push(i.createElement("span",{key:j,className:r()(_,(M={},Object(L.a)(M,"".concat(_,"-start"),x[j+1]),Object(L.a)(M,"".concat(_,"-end"),E[j+1]),Object(L.a)(M,"".concat(_,"-end-first-level"),!j&&E[0]),M))}))}return i.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},N)},b=m,g=k("815F"),v="open",n="close",d="---",h=function(o){Object(w.a)(O,o);var P=Object(l.a)(O);function O(){var y;return Object(R.a)(this,O),y=P.apply(this,arguments),y.state={dragNodeHighlight:!1},y.onSelectorClick=function(x){var E=y.props.context.onNodeClick;E(x,Object(g.b)(y.props)),y.isSelectable()?y.onSelect(x):y.onCheck(x)},y.onSelectorDoubleClick=function(x){var E=y.props.context.onNodeDoubleClick;E(x,Object(g.b)(y.props))},y.onSelect=function(x){if(y.isDisabled())return;var E=y.props.context.onNodeSelect;x.preventDefault(),E(x,Object(g.b)(y.props))},y.onCheck=function(x){if(y.isDisabled())return;var E=y.props,_=E.disableCheckbox,N=E.checked,j=y.props.context.onNodeCheck;if(!y.isCheckable()||_)return;x.preventDefault();var M=!N;j(x,Object(g.b)(y.props),M)},y.onMouseEnter=function(x){var E=y.props.context.onNodeMouseEnter;E(x,Object(g.b)(y.props))},y.onMouseLeave=function(x){var E=y.props.context.onNodeMouseLeave;E(x,Object(g.b)(y.props))},y.onContextMenu=function(x){var E=y.props.context.onNodeContextMenu;E(x,Object(g.b)(y.props))},y.onDragStart=function(x){var E=y.props.context.onNodeDragStart;x.stopPropagation(),y.setState({dragNodeHighlight:!0}),E(x,Object(s.a)(y));try{x.dataTransfer.setData("text/plain","")}catch(_){}},y.onDragEnter=function(x){var E=y.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),E(x,Object(s.a)(y))},y.onDragOver=function(x){var E=y.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),E(x,Object(s.a)(y))},y.onDragLeave=function(x){var E=y.props.context.onNodeDragLeave;x.stopPropagation(),E(x,Object(s.a)(y))},y.onDragEnd=function(x){var E=y.props.context.onNodeDragEnd;x.stopPropagation(),y.setState({dragNodeHighlight:!1}),E(x,Object(s.a)(y))},y.onDrop=function(x){var E=y.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),y.setState({dragNodeHighlight:!1}),E(x,Object(s.a)(y))},y.onExpand=function(x){var E=y.props.context.onNodeExpand;E(x,Object(g.b)(y.props))},y.setSelectHandle=function(x){y.selectHandle=x},y.getNodeState=function(){var x=y.props.expanded;return y.isLeaf()?null:x?v:n},y.hasChildren=function(){var x=y.props.eventKey,E=y.props.context.keyEntities,_=E[x]||{},N=_.children;return!!(N||[]).length},y.isLeaf=function(){var x=y.props,E=x.isLeaf,_=x.loaded,N=y.props.context.loadData,j=y.hasChildren();return E===!1?!1:E||!N&&!j||N&&_&&!j},y.isDisabled=function(){var x=y.props.disabled,E=y.props.context.disabled;return!!(E||x)},y.isCheckable=function(){var x=y.props.checkable,E=y.props.context.checkable;return!E||x===!1?!1:E},y.syncLoadData=function(x){var E=x.expanded,_=x.loading,N=x.loaded,j=y.props.context,M=j.loadData,H=j.onNodeLoad;if(_)return;M&&E&&!y.isLeaf()&&(!y.hasChildren()&&!N&&H(Object(g.b)(y.props)))},y.renderSwitcher=function(){var x=y.props,E=x.expanded,_=x.switcherIcon,N=y.props.context,j=N.prefixCls,M=N.switcherIcon,H=_||M;if(y.isLeaf())return i.createElement("span",{className:r()("".concat(j,"-switcher"),"".concat(j,"-switcher-noop"))},typeof H=="function"?H(Object(S.a)(Object(S.a)({},y.props),{},{isLeaf:!0})):H);var z=r()("".concat(j,"-switcher"),"".concat(j,"-switcher_").concat(E?v:n));return i.createElement("span",{onClick:y.onExpand,className:z},typeof H=="function"?H(Object(S.a)(Object(S.a)({},y.props),{},{isLeaf:!1})):H)},y.renderCheckbox=function(){var x=y.props,E=x.checked,_=x.halfChecked,N=x.disableCheckbox,j=y.props.context.prefixCls,M=y.isDisabled(),H=y.isCheckable();if(!H)return null;var z=typeof H!="boolean"?H:null;return i.createElement("span",{className:r()("".concat(j,"-checkbox"),E&&"".concat(j,"-checkbox-checked"),!E&&_&&"".concat(j,"-checkbox-indeterminate"),(M||N)&&"".concat(j,"-checkbox-disabled")),onClick:y.onCheck},z)},y.renderIcon=function(){var x=y.props.loading,E=y.props.context.prefixCls;return i.createElement("span",{className:r()("".concat(E,"-iconEle"),"".concat(E,"-icon__").concat(y.getNodeState()||"docu"),x&&"".concat(E,"-icon_loading"))})},y.renderSelector=function(){var x=y.state.dragNodeHighlight,E=y.props,_=E.title,N=E.selected,j=E.icon,M=E.loading,H=E.data,z=y.props.context,F=z.prefixCls,G=z.showIcon,B=z.icon,K=z.draggable,W=z.loadData,J=z.titleRender,ee=y.isDisabled(),Z="".concat(F,"-node-content-wrapper"),he;if(G){var ge=j||B;he=ge?i.createElement("span",{className:r()("".concat(F,"-iconEle"),"".concat(F,"-icon__customize"))},typeof ge=="function"?ge(y.props):ge):y.renderIcon()}else W&&M&&(he=y.renderIcon());var ie;typeof _=="function"?ie=_(H):J?ie=J(H):ie=_;var we=i.createElement("span",{className:"".concat(F,"-title")},ie);return i.createElement("span",{ref:y.setSelectHandle,title:typeof _=="string"?_:"",className:r()("".concat(Z),"".concat(Z,"-").concat(y.getNodeState()||"normal"),!ee&&(N||x)&&"".concat(F,"-node-selected"),!ee&&K&&"draggable"),draggable:!ee&&K||void 0,"aria-grabbed":!ee&&K||void 0,onMouseEnter:y.onMouseEnter,onMouseLeave:y.onMouseLeave,onContextMenu:y.onContextMenu,onClick:y.onSelectorClick,onDoubleClick:y.onSelectorDoubleClick,onDragStart:K?y.onDragStart:void 0},he,we)},y}return Object(f.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var x=this.props.selectable,E=this.props.context.selectable;return typeof x=="boolean"?x:E}},{key:"render",value:function(){var x,E=this.props,_=E.eventKey,N=E.className,j=E.style,M=E.dragOver,H=E.dragOverGapTop,z=E.dragOverGapBottom,F=E.isLeaf,G=E.isStart,B=E.isEnd,K=E.expanded,W=E.selected,J=E.checked,ee=E.halfChecked,Z=E.loading,he=E.domRef,ge=E.active,ie=E.onMouseMove,we=Object(c.a)(E,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),me=this.props.context,oe=me.prefixCls,se=me.filterTreeNode,te=me.draggable,be=me.keyEntities,q=this.isDisabled(),ae=Object(p.f)(we),xe=be[_]||{},ne=xe.level,Q=B[B.length-1];return i.createElement("div",Object.assign({ref:he,className:r()(N,"".concat(oe,"-treenode"),(x={},Object(L.a)(x,"".concat(oe,"-treenode-disabled"),q),Object(L.a)(x,"".concat(oe,"-treenode-switcher-").concat(K?"open":"close"),!F),Object(L.a)(x,"".concat(oe,"-treenode-checkbox-checked"),J),Object(L.a)(x,"".concat(oe,"-treenode-checkbox-indeterminate"),ee),Object(L.a)(x,"".concat(oe,"-treenode-selected"),W),Object(L.a)(x,"".concat(oe,"-treenode-loading"),Z),Object(L.a)(x,"".concat(oe,"-treenode-active"),ge),Object(L.a)(x,"".concat(oe,"-treenode-leaf-last"),Q),Object(L.a)(x,"drag-over",!q&&M),Object(L.a)(x,"drag-over-gap-top",!q&&H),Object(L.a)(x,"drag-over-gap-bottom",!q&&z),Object(L.a)(x,"filter-node",se&&se(Object(g.b)(this.props))),x)),style:j,onDragEnter:te?this.onDragEnter:void 0,onDragOver:te?this.onDragOver:void 0,onDragLeave:te?this.onDragLeave:void 0,onDrop:te?this.onDrop:void 0,onDragEnd:te?this.onDragEnd:void 0,onMouseMove:ie},ae),i.createElement(b,{prefixCls:oe,level:ne,isStart:G,isEnd:B}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(i.Component),C=function(P){return i.createElement(u.a.Consumer,null,function(O){return i.createElement(h,Object.assign({},P,{context:O}))})};C.displayName="TreeNode",C.defaultProps={title:d},C.isTreeNode=1;var T=Y.a=C},XIdC:function(I,Y,k){"use strict";var L=k("rePB"),c=k("ODXe"),S=k("Ff2n"),R=k("cDcd"),f=k.n(R),s=k("TSYQ"),w=k.n(s),l=k("6cGi"),i=k("4IlW"),a=R.forwardRef(function(r,u){var p,m=r.prefixCls,b=m===void 0?"rc-switch":m,g=r.className,v=r.checked,n=r.defaultChecked,d=r.disabled,h=r.loadingIcon,C=r.checkedChildren,T=r.unCheckedChildren,o=r.onClick,P=r.onChange,O=r.onKeyDown,y=Object(S.a)(r,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),x=Object(l.a)(!1,{value:v,defaultValue:n}),E=Object(c.a)(x,2),_=E[0],N=E[1];function j(F,G){var B=_;return d||(B=F,N(B),P==null||P(B,G)),B}function M(F){F.which===i.a.LEFT?j(!1,F):F.which===i.a.RIGHT&&j(!0,F),O==null||O(F)}function H(F){var G=j(!_,F);o==null||o(G,F)}var z=w()(b,g,(p={},Object(L.a)(p,"".concat(b,"-checked"),_),Object(L.a)(p,"".concat(b,"-disabled"),d),p));return R.createElement("button",Object.assign({},y,{type:"button",role:"switch","aria-checked":_,disabled:d,className:z,ref:u,onKeyDown:M,onClick:H}),h,R.createElement("span",{className:"".concat(b,"-inner")},_?C:T))});a.displayName="Switch",Y.a=a},Y1PL:function(I,Y,k){"use strict";k.r(Y),k.d(Y,"ResizableTextArea",function(){return ee});var L=k("wx14"),c=k("1OyB"),S=k("vuIU"),R=k("Ji7U"),f=k("LK+K"),s=k("cDcd"),w=k("VTBJ"),l=k("rePB"),i=k("Zm9Q"),a=k("Kwbf"),r=k("c+Xe"),u=k("m+aA"),p=k("bdgK"),m=new Map;function b(ge){ge.forEach(function(ie){var we,me=ie.target;(we=m.get(me))===null||we===void 0||we.forEach(function(oe){return oe(me)})})}var g=new p.default(b),v=null,n=null;function d(ge,ie){m.has(ge)||(m.set(ge,new Set),g.observe(ge)),m.get(ge).add(ie)}function h(ge,ie){m.has(ge)&&(m.get(ge).delete(ie),m.get(ge).size||(g.unobserve(ge),m.delete(ge)))}var C=function(ge){Object(R.a)(we,ge);var ie=Object(f.a)(we);function we(){return Object(c.a)(this,we),ie.apply(this,arguments)}return Object(S.a)(we,[{key:"render",value:function(){return this.props.children}}]),we}(s.Component),T=s.createContext(null);function o(ge){var ie=ge.children,we=ge.onBatchResize,me=s.useRef(0),oe=s.useRef([]),se=s.useContext(T),te=s.useCallback(function(be,q,ae){me.current+=1;var xe=me.current;oe.current.push({size:be,element:q,data:ae}),Promise.resolve().then(function(){xe===me.current&&(we==null||we(oe.current),oe.current=[])}),se==null||se(be,q,ae)},[we,se]);return s.createElement(T.Provider,{value:te},ie)}function P(ge){var ie=ge.children,we=ge.disabled,me=s.useRef(null),oe=s.useRef(null),se=s.useContext(T),te=s.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),be=s.isValidElement(ie)&&Object(r.c)(ie),q=be?ie.ref:null,ae=s.useMemo(function(){return Object(r.a)(q,me)},[q,me]),xe=s.useRef(ge);xe.current=ge;var ne=s.useCallback(function(Q){var X=xe.current,$=X.onResize,pe=X.data,de=Q.getBoundingClientRect(),Ce=de.width,ze=de.height,qe=Q.offsetWidth,Ye=Q.offsetHeight,Ve=Math.floor(Ce),et=Math.floor(ze);if(te.current.width!==Ve||te.current.height!==et||te.current.offsetWidth!==qe||te.current.offsetHeight!==Ye){var rt={width:Ve,height:et,offsetWidth:qe,offsetHeight:Ye};te.current=rt;var Me=qe===Math.round(Ce)?Ce:qe,Se=Ye===Math.round(ze)?ze:Ye,Ge=Object(w.a)(Object(w.a)({},rt),{},{offsetWidth:Me,offsetHeight:Se});se==null||se(Ge,Q,pe),$&&Promise.resolve().then(function(){$(Ge,Q)})}},[]);return s.useEffect(function(){var Q=Object(u.a)(me.current)||Object(u.a)(oe.current);return Q&&!we&&d(Q,ne),function(){return h(Q,ne)}},[me.current,we]),s.createElement(C,{ref:oe},be?s.cloneElement(ie,{ref:ae}):ie)}var O="rc-observer-key";function y(ge){var ie=ge.children,we=Object(i.a)(ie);return we.map(function(me,oe){var se=(me==null?void 0:me.key)||"".concat(O,"-").concat(oe);return s.createElement(P,Object(L.a)({},ge,{key:se}),me)})}y.Collection=o;var x=y,E=k("bT9E"),_=k("TSYQ"),N=k.n(_),j=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,M=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],H={},z;function F(ge){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,we=ge.getAttribute("id")||ge.getAttribute("data-reactid")||ge.getAttribute("name");if(ie&&H[we])return H[we];var me=window.getComputedStyle(ge),oe=me.getPropertyValue("box-sizing")||me.getPropertyValue("-moz-box-sizing")||me.getPropertyValue("-webkit-box-sizing"),se=parseFloat(me.getPropertyValue("padding-bottom"))+parseFloat(me.getPropertyValue("padding-top")),te=parseFloat(me.getPropertyValue("border-bottom-width"))+parseFloat(me.getPropertyValue("border-top-width")),be=M.map(function(ae){return"".concat(ae,":").concat(me.getPropertyValue(ae))}).join(";"),q={sizingStyle:be,paddingSize:se,borderSize:te,boxSizing:oe};return ie&&we&&(H[we]=q),q}function G(ge){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,we=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;z||(z=document.createElement("textarea"),z.setAttribute("tab-index","-1"),z.setAttribute("aria-hidden","true"),document.body.appendChild(z)),ge.getAttribute("wrap")?z.setAttribute("wrap",ge.getAttribute("wrap")):z.removeAttribute("wrap");var oe=F(ge,ie),se=oe.paddingSize,te=oe.borderSize,be=oe.boxSizing,q=oe.sizingStyle;z.setAttribute("style","".concat(q,";").concat(j)),z.value=ge.value||ge.placeholder||"";var ae=Number.MIN_SAFE_INTEGER,xe=Number.MAX_SAFE_INTEGER,ne=z.scrollHeight,Q;if(be==="border-box"?ne+=te:be==="content-box"&&(ne-=se),we!==null||me!==null){z.value=" ";var X=z.scrollHeight-se;we!==null&&(ae=X*we,be==="border-box"&&(ae=ae+se+te),ne=Math.max(ae,ne)),me!==null&&(xe=X*me,be==="border-box"&&(xe=xe+se+te),Q=ne>xe?"":"hidden",ne=Math.min(xe,ne))}return{height:ne,minHeight:ae,maxHeight:xe,overflowY:Q,resize:"none"}}var B=k("Gytx"),K=k.n(B),W;(function(ge){ge[ge.NONE=0]="NONE",ge[ge.RESIZING=1]="RESIZING",ge[ge.RESIZED=2]="RESIZED"})(W||(W={}));var J=function(ge){Object(R.a)(we,ge);var ie=Object(f.a)(we);function we(me){var oe;return Object(c.a)(this,we),oe=ie.call(this,me),oe.nextFrameActionId=void 0,oe.resizeFrameId=void 0,oe.textArea=void 0,oe.saveTextArea=function(se){oe.textArea=se},oe.handleResize=function(se){var te=oe.state.resizeStatus,be=oe.props,q=be.autoSize,ae=be.onResize;if(te!==W.NONE)return;typeof ae=="function"&&ae(se),q&&oe.resizeOnNextFrame()},oe.resizeOnNextFrame=function(){cancelAnimationFrame(oe.nextFrameActionId),oe.nextFrameActionId=requestAnimationFrame(oe.resizeTextarea)},oe.resizeTextarea=function(){var se=oe.props.autoSize;if(!se||!oe.textArea)return;var te=se.minRows,be=se.maxRows,q=G(oe.textArea,!1,te,be);oe.setState({textareaStyles:q,resizeStatus:W.RESIZING},function(){cancelAnimationFrame(oe.resizeFrameId),oe.resizeFrameId=requestAnimationFrame(function(){oe.setState({resizeStatus:W.RESIZED},function(){oe.resizeFrameId=requestAnimationFrame(function(){oe.setState({resizeStatus:W.NONE}),oe.fixFirefoxAutoScroll()})})})})},oe.renderTextArea=function(){var se=oe.props,te=se.prefixCls,be=te===void 0?"rc-textarea":te,q=se.autoSize,ae=se.onResize,xe=se.className,ne=se.disabled,Q=oe.state,X=Q.textareaStyles,$=Q.resizeStatus,pe=Object(E.a)(oe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),de=N()(be,xe,Object(l.a)({},"".concat(be,"-disabled"),ne));"value"in pe&&(pe.value=pe.value||"");var Ce=Object(w.a)(Object(w.a)(Object(w.a)({},oe.props.style),X),$===W.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return s.createElement(x,{onResize:oe.handleResize,disabled:!(q||ae)},s.createElement("textarea",Object(L.a)({},pe,{className:de,style:Ce,ref:oe.saveTextArea})))},oe.state={textareaStyles:{},resizeStatus:W.NONE},oe}return Object(S.a)(we,[{key:"componentDidUpdate",value:function(oe){(oe.value!==this.props.value||!K()(oe.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var oe=this.textArea.selectionStart,se=this.textArea.selectionEnd;this.textArea.setSelectionRange(oe,se)}}catch(te){}}},{key:"render",value:function(){return this.renderTextArea()}}]),we}(s.Component),ee=J,Z=function(ge){Object(R.a)(we,ge);var ie=Object(f.a)(we);function we(me){var oe;Object(c.a)(this,we),oe=ie.call(this,me),oe.resizableTextArea=void 0,oe.focus=function(){oe.resizableTextArea.textArea.focus()},oe.saveTextArea=function(te){oe.resizableTextArea=te},oe.handleChange=function(te){var be=oe.props.onChange;oe.setValue(te.target.value,function(){oe.resizableTextArea.resizeTextarea()}),be&&be(te)},oe.handleKeyDown=function(te){var be=oe.props,q=be.onPressEnter,ae=be.onKeyDown;te.keyCode===13&&q&&q(te),ae&&ae(te)};var se=typeof me.value=="undefined"||me.value===null?me.defaultValue:me.value;return oe.state={value:se},oe}return Object(S.a)(we,[{key:"setValue",value:function(oe,se){"value"in this.props||this.setState({value:oe},se)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return s.createElement(ee,Object(L.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(oe){return"value"in oe?{value:oe.value}:null}}]),we}(s.Component),he=Y.default=Z},ZD9Y:function(I,Y,k){"use strict";var L=k("BoS7"),c=k("Sdc0"),S=k("OaEy"),R=k("2fM7"),f=k("cDcd"),s=k.n(f),w=k("lOMy"),l=k.n(w),i=R.a.Option;Y.a=function(a){var r=a.onFontSizeChange,u=a.cmFontSize,p=a.cmCodeMode,m=a.onCodeModeChange,b=a.onTabToSpace,g=a.className,v=g===void 0?"":g,n=a.tabToSpace,d=a.children;return s.a.createElement("div",{className:"tpi-code-setting ".concat(v)},s.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),s.a.createElement("section",null,s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),s.a.createElement(R.a,{bordered:!1,size:"small",value:p,onChange:m},s.a.createElement(i,{value:"vs"},"\u767D\u8272\u80CC\u666F"),s.a.createElement(i,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),s.a.createElement(R.a,{bordered:!1,size:"small",value:u,onChange:r},s.a.createElement(i,{value:12},"12px"),s.a.createElement(i,{value:14},"14px"),s.a.createElement(i,{value:16},"16px"),s.a.createElement(i,{value:18},"18px"),s.a.createElement(i,{value:20},"20px"),s.a.createElement(i,{value:22},"22px"))),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"Tab\u8F6C\u6362"),s.a.createElement(c.a,{checked:n,onChange:b}))),s.a.createElement("h3",null,"\u5FEB\u6377\u952E"),s.a.createElement("section",null,s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),s.a.createElement("span",null,"Ctrl + S")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),s.a.createElement("span",null,"F1 / Alt + F1")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),s.a.createElement("span",null,"Ctrl + ]/[")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),s.a.createElement("span",null,"Ctrl + Shift + \\")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),s.a.createElement("span",null,"Home")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),s.a.createElement("span",null,"End"))),d)}},ZW9T:function(I,Y,k){"use strict";k.d(Y,"a",function(){return T});var L=k("k1fw"),c=k("miYZ"),S=k("tsqr"),R=k("rAM+"),f=k("tJVT"),s=k("PpiC"),w=k("cDcd"),l=k.n(w),i=k("bdgK");function a(o,P,O,y,x){var E=P.getWordUntilPosition(O),_={startLineNumber:O.lineNumber,endLineNumber:O.lineNumber,startColumn:E.startColumn,endColumn:E.endColumn},N=y.map(function(j){return{label:j,kind:o.languages.CompletionItemKind.Keyword,insertText:j,insertTextRules:o.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_}});return x.map(function(j){N.push(Object(L.a)(Object(L.a)({},j),{},{range:_}))}),N}var r=function(o){var P={label:"ifelse",kind:o.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:o.languages.CompletionItemInsertTextRule.InsertAsSnippet},O=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];o.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(_,N){var j=a(o,_,N,O,[P]);return{suggestions:j}}});var y=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];o.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(_,N){var j=[{label:"print",kind:o.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:o.languages.CompletionItemInsertTextRule.InsertAsSnippet}],M=a(o,_,N,y,j);return{suggestions:M}}});var x=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];o.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(_,N){var j=[P,{label:"main",kind:o.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:o.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:o.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:o.languages.CompletionItemInsertTextRule.InsertAsSnippet}],M=a(o,_,N,x,j);return{suggestions:M}}})},u="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",p=k("LvDl"),m=k("+ua5");function b(o){return/^\d+$/.test(o)?"".concat(o,"px"):o}function g(){}var v=!1,n={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function d(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=o;if(Array.isArray(o)){for(var O=0;O<o.length;O++){var y=n[o[O]];if(y)return y}return P[0]}return n[P]||P}var h=null,C=Y.b=function(o){var P=o.width,O=P===void 0?"100%":P,y=o.height,x=y===void 0?"100%":y,E=o.value,_=o.language,N=_===void 0?"javascript":_,j=o.style,M=j===void 0?{}:j,H=o.options,z=H===void 0?{}:H,F=o.overrideServices,G=F===void 0?{}:F,B=o.theme,K=B===void 0?"vs-dark":B,W=o.onEditBlur,J=o.onSave,ee=o.autoHeight,Z=ee===void 0?!1:ee,he=o.forbidCopy,ge=he===void 0?!1:he,ie=o.onChange,we=ie===void 0?g:ie,me=o.editorDidMount,oe=me===void 0?g:me,se=o.onFocus,te=se===void 0?g:se,be=o.filename,q=be===void 0?"educoder.txt":be,ae=o.errorLine,xe=o.errorContent,ne=xe===void 0?"":xe,Q=Object(s.a)(o,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),X=Object(w.useRef)(),$=Object(w.useRef)({}),pe=Object(w.useRef)(),de=Object(w.useRef)(!1),Ce=Object(w.useRef)(),ze=Object(w.useState)(!1),qe=Object(f.a)(ze,2),Ye=qe[0],Ve=qe[1];function et(){var at;return X.current&&(at=new i.default(function(it){var st=Object(R.a)(it),Je;try{for(st.s();!(Je=st.n()).done;){var gt=Je.value;(gt.target.offsetHeight>0||gt.target.offsetWidth>0)&&$.current.instance.layout()}}catch(yt){st.e(yt)}finally{st.f()}}),at.observe(X.current)),at}function rt(){S.b.warn(decodeURIComponent(u))}var Me=function(){var it=$.current.instance;if(E!=null&&it&&Ye){var st=it.getModel();st&&E!==st.getValue()&&(v=!0,st.setValue(E),it.layout(),v=!1)}};Object(w.useEffect)(function(){pe.current&&clearTimeout(pe.current),pe.current=setTimeout(function(){Me()},500)},[E,Ye,$.current]),Object(w.useEffect)(function(){if(ae&&$.current&&$.current.instance){var at=$.current.instance;at.changeViewZones(function(st){var Je=document.createElement("div");Je.style.padding="10px 20px",Je.style.width="calc(100% - 20px)",Je.className="my-error-line-wrp",Je.innerHTML=ne,st.addZone({afterLineNumber:ae||11,heightInLines:3,domNode:Je})});var it={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};at.addOverlayWidget(it),at.revealPositionInCenter({lineNumber:20,column:1})}},[ae,$.current,Ye]);function Se(){var at=$.current.instance;if(at){var it=at.getSelection(),st=$.current.pastePos||{},Je=new h.Range(st.startLineNumber||it.endLineNumber,st.startColumn||it.endColumn,st.endLineNumber||it.endLineNumber,st.endColumn||it.endColumn);setTimeout(function(){at.executeEdits("",[{range:Je,text:""}])},300)}}function Ge(at){(window.navigator.platform.match("Mac")?at.metaKey:at.ctrlKey)&&at.keyCode==83&&(at.preventDefault(),J())}var tt=function(){if(Z&&$.current.instance){var it=$.current.instance.getContentHeight();je(it<x?x:it)}else je(x)};function Ue(at){var it=document.createEvent("MouseEvents");it.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),at.dispatchEvent(it)}function Xe(at,it){var st=window.URL||window.webkitURL||window,Je=new Blob([it]),gt=document.createElementNS("http://www.w3.org/1999/xhtml","a");gt.href=st.createObjectURL(Je),gt.download=at,Ue(gt)}Object(w.useEffect)(function(){tt()},[tt]),Object(w.useEffect)(function(){X.current&&!Ye&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(at){try{h=at,$.current.instance=h.editor.create(X.current,{value:E,language:d(N),theme:K,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},G);var it=$.current.instance;if(oe(it,h),setTimeout(function(){tt(),$.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Xe(q||"educoder.txt",it.getValue())}})},500),$.current.subscription=it.onDidChangeModelContent(function(Je){de.current?clearTimeout(Ce.current):(tt(),we(it.getValue(),Je)),Ce.current=setTimeout(function(){de.current=!1},500)}),window.Monaco||r(h),ge&&(it.addCommand(h.KeyMod.CtrlCmd|h.KeyMod.Shift|h.KeyCode.KEY_V,function(){return rt(),null}),it.addCommand(h.KeyMod.CtrlCmd|h.KeyCode.KEY_C,function(){return rt(),null})),window.Monaco=h,W&&it.onDidBlurEditorWidget(function(){W(it.getValue())}),te&&it.onDidFocusEditorText(function(){te(it.getValue())}),ge){it.addCommand(h.KeyMod.CtrlCmd|h.KeyCode.KEY_V,function(){return rt(),null}),it.onDidPaste(function(Je){$.current.pastePos=Je});try{window.addEventListener("paste",Se)}catch(Je){}}var st=et();return Ve(!0),function(){var Je=$.current.instance;Je.dispose();var gt=Je.getModel();gt&&gt.dispose(),$.current.subscription&&$.current.subscription.dispose(),ge&&window.removeEventListener("paste",Se),st.unobserve(X.current)}}catch(Je){}})},[]),Object(w.useEffect)(function(){var at=$.current.instance;if(at&&Ye)return document.addEventListener("keydown",Ge,!1),function(){document.removeEventListener("keydown",Ge)}},[J,Ye]),Object(w.useEffect)(function(){var at=$.current.instance;if(at&&Ye){var it=d(N);h.editor.setModelLanguage(at.getModel(),it),console.log("language:",N,at.getModel(),it)}},[N,Ye]),Object(w.useEffect)(function(){var at=$.current.instance;at&&Ye&&h.editor.setTheme(K)},[K,Ye]),Object(w.useEffect)(function(){var at=$.current.instance;at&&Ye&&(at.updateOptions(Object(L.a)({},z)),setTimeout(function(){at.getModel().updateOptions(Object(L.a)({},z))},200))},[JSON.stringify(z),Ye]),Object(w.useEffect)(function(){var at=$.current.instance;at&&Ye&&at.layout()},[O,x,Ye]);var Pe=Object(w.useState)(b(O)),Te=Object(f.a)(Pe,2),Ae=Te[0],ce=Te[1],Ee=Object(w.useState)(b(x)),_e=Object(f.a)(Ee,2),De=_e[0],je=_e[1],$e=Object(L.a)(Object(L.a)({},M),{},{width:Ae,height:De});return l.a.createElement("div",{className:"my-monaco-editor",ref:X,style:$e})};function T(o){var P=o.width,O=P===void 0?"100%":P,y=o.height,x=y===void 0?"100%":y,E=o.original,_=o.modified,N=o.language,j=o.options,M=j===void 0?{}:j,H=Object(w.useRef)(),z=Object(w.useState)(null),F=Object(f.a)(z,2),G=F[0],B=F[1];function K(Z){var he;return H.current&&(he=new i.default(function(ge){var ie=Object(R.a)(ge),we;try{for(ie.s();!(we=ie.n()).done;){var me=we.value;(me.target.offsetHeight>0||me.target.offsetWidth>0)&&Z.layout()}}catch(oe){ie.e(oe)}finally{ie.f()}}),he.observe(H.current)),he}Object(w.useEffect)(function(){H.current&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(Z){h=Z;var he=h.editor.createDiffEditor(H.current,Object(L.a)(Object(L.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},M),{},{wordWrap:!0}));B(he);var ge=K(he);return function(){he.dispose();var ie=he.getModel();ie&&ie.dispose(),ge.unobserve(H.current)}})},[]),Object(w.useEffect)(function(){G&&G.setModel({original:h.editor.createModel(E,N),modified:h.editor.createModel(_,N)})},[E,_,N,G]);var W=b(O),J=b(x),ee={width:W,height:J};return l.a.createElement("div",{className:"my-diff-editor",ref:H,style:ee})}},ZpRC:function(I,Y,k){"use strict";function L(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function c(r,u){return(!u||r!=="hidden")&&r!=="visible"&&r!=="clip"}function S(r,u){if(r.clientHeight<r.scrollHeight||r.clientWidth<r.scrollWidth){var p=getComputedStyle(r,null);return c(p.overflowY,u)||c(p.overflowX,u)||function(m){var b=function(g){if(!g.ownerDocument||!g.ownerDocument.defaultView)return null;try{return g.ownerDocument.defaultView.frameElement}catch(v){return null}}(m);return!!b&&(b.clientHeight<m.scrollHeight||b.clientWidth<m.scrollWidth)}(r)}return!1}function R(r,u,p,m,b,g,v,n){return g<r&&v>u||g>r&&v<u?0:g<=r&&n<=p||v>=u&&n>=p?g-r-m:v>u&&n<p||g<r&&n>p?v-u+b:0}var f=function(r,u){var p=window,m=u.scrollMode,b=u.block,g=u.inline,v=u.boundary,n=u.skipOverflowHiddenElements,d=typeof v=="function"?v:function(X){return X!==v};if(!L(r))throw new TypeError("Invalid target");for(var h=document.scrollingElement||document.documentElement,C=[],T=r;L(T)&&d(T);){if((T=T.parentElement)===h){C.push(T);break}T!=null&&T===document.body&&S(T)&&!S(document.documentElement)||T!=null&&S(T,n)&&C.push(T)}for(var o=p.visualViewport?p.visualViewport.width:innerWidth,P=p.visualViewport?p.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,x=r.getBoundingClientRect(),E=x.height,_=x.width,N=x.top,j=x.right,M=x.bottom,H=x.left,z=b==="start"||b==="nearest"?N:b==="end"?M:N+E/2,F=g==="center"?H+_/2:g==="end"?j:H,G=[],B=0;B<C.length;B++){var K=C[B],W=K.getBoundingClientRect(),J=W.height,ee=W.width,Z=W.top,he=W.right,ge=W.bottom,ie=W.left;if(m==="if-needed"&&N>=0&&H>=0&&M<=P&&j<=o&&N>=Z&&M<=ge&&H>=ie&&j<=he)return G;var we=getComputedStyle(K),me=parseInt(we.borderLeftWidth,10),oe=parseInt(we.borderTopWidth,10),se=parseInt(we.borderRightWidth,10),te=parseInt(we.borderBottomWidth,10),be=0,q=0,ae="offsetWidth"in K?K.offsetWidth-K.clientWidth-me-se:0,xe="offsetHeight"in K?K.offsetHeight-K.clientHeight-oe-te:0;if(h===K)be=b==="start"?z:b==="end"?z-P:b==="nearest"?R(y,y+P,P,oe,te,y+z,y+z+E,E):z-P/2,q=g==="start"?F:g==="center"?F-o/2:g==="end"?F-o:R(O,O+o,o,me,se,O+F,O+F+_,_),be=Math.max(0,be+y),q=Math.max(0,q+O);else{be=b==="start"?z-Z-oe:b==="end"?z-ge+te+xe:b==="nearest"?R(Z,ge,J,oe,te+xe,z,z+E,E):z-(Z+J/2)+xe/2,q=g==="start"?F-ie-me:g==="center"?F-(ie+ee/2)+ae/2:g==="end"?F-he+se+ae:R(ie,he,ee,me,se+ae,F,F+_,_);var ne=K.scrollLeft,Q=K.scrollTop;z+=Q-(be=Math.max(0,Math.min(Q+be,K.scrollHeight-J+xe))),F+=ne-(q=Math.max(0,Math.min(ne+q,K.scrollWidth-ee+ae)))}G.push({el:K,top:be,left:q})}return G};function s(r){return r===Object(r)&&Object.keys(r).length!==0}function w(r,u){u===void 0&&(u="auto");var p="scrollBehavior"in document.body.style;r.forEach(function(m){var b=m.el,g=m.top,v=m.left;b.scroll&&p?b.scroll({top:g,left:v,behavior:u}):(b.scrollTop=g,b.scrollLeft=v)})}function l(r){return r===!1?{block:"end",inline:"nearest"}:s(r)?r:{block:"start",inline:"nearest"}}function i(r,u){var p=!r.ownerDocument.documentElement.contains(r);if(s(u)&&typeof u.behavior=="function")return u.behavior(p?[]:f(r,u));if(p)return;var m=l(u);return w(f(r,m),m.behavior)}var a=Y.a=i},Zss7:function(I,Y,k){var L;(function(c){var S=/^\s+/,R=/\s+$/,f=0,s=c.round,w=c.min,l=c.max,i=c.random;function a(te,be){if(te=te||"",be=be||{},te instanceof a)return te;if(!(this instanceof a))return new a(te,be);var q=r(te);this._originalInput=te,this._r=q.r,this._g=q.g,this._b=q.b,this._a=q.a,this._roundA=s(100*this._a)/100,this._format=be.format||q.format,this._gradientType=be.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=q.ok,this._tc_id=f++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var te=this.toRgb();return(te.r*299+te.g*587+te.b*114)/1e3},getLuminance:function(){var te=this.toRgb(),be,q,ae,xe,ne,Q;return be=te.r/255,q=te.g/255,ae=te.b/255,be<=.03928?xe=be/12.92:xe=c.pow((be+.055)/1.055,2.4),q<=.03928?ne=q/12.92:ne=c.pow((q+.055)/1.055,2.4),ae<=.03928?Q=ae/12.92:Q=c.pow((ae+.055)/1.055,2.4),.2126*xe+.7152*ne+.0722*Q},setAlpha:function(te){return this._a=G(te),this._roundA=s(100*this._a)/100,this},toHsv:function(){var te=b(this._r,this._g,this._b);return{h:te.h*360,s:te.s,v:te.v,a:this._a}},toHsvString:function(){var te=b(this._r,this._g,this._b),be=s(te.h*360),q=s(te.s*100),ae=s(te.v*100);return this._a==1?"hsv("+be+", "+q+"%, "+ae+"%)":"hsva("+be+", "+q+"%, "+ae+"%, "+this._roundA+")"},toHsl:function(){var te=p(this._r,this._g,this._b);return{h:te.h*360,s:te.s,l:te.l,a:this._a}},toHslString:function(){var te=p(this._r,this._g,this._b),be=s(te.h*360),q=s(te.s*100),ae=s(te.l*100);return this._a==1?"hsl("+be+", "+q+"%, "+ae+"%)":"hsla("+be+", "+q+"%, "+ae+"%, "+this._roundA+")"},toHex:function(te){return v(this._r,this._g,this._b,te)},toHexString:function(te){return"#"+this.toHex(te)},toHex8:function(te){return n(this._r,this._g,this._b,this._a,te)},toHex8String:function(te){return"#"+this.toHex8(te)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(B(this._r,255)*100)+"%",g:s(B(this._g,255)*100)+"%",b:s(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+s(B(this._r,255)*100)+"%, "+s(B(this._g,255)*100)+"%, "+s(B(this._b,255)*100)+"%)":"rgba("+s(B(this._r,255)*100)+"%, "+s(B(this._g,255)*100)+"%, "+s(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[v(this._r,this._g,this._b,!0)]||!1},toFilter:function(te){var be="#"+d(this._r,this._g,this._b,this._a),q=be,ae=this._gradientType?"GradientType = 1, ":"";if(te){var xe=a(te);q="#"+d(xe._r,xe._g,xe._b,xe._a)}return"progid:DXImageTransform.Microsoft.gradient("+ae+"startColorstr="+be+",endColorstr="+q+")"},toString:function(te){var be=!!te;te=te||this._format;var q=!1,ae=this._a<1&&this._a>=0,xe=!be&&ae&&(te==="hex"||te==="hex6"||te==="hex3"||te==="hex4"||te==="hex8"||te==="name");return xe?te==="name"&&this._a===0?this.toName():this.toRgbString():(te==="rgb"&&(q=this.toRgbString()),te==="prgb"&&(q=this.toPercentageRgbString()),(te==="hex"||te==="hex6")&&(q=this.toHexString()),te==="hex3"&&(q=this.toHexString(!0)),te==="hex4"&&(q=this.toHex8String(!0)),te==="hex8"&&(q=this.toHex8String()),te==="name"&&(q=this.toName()),te==="hsl"&&(q=this.toHslString()),te==="hsv"&&(q=this.toHsvString()),q||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(te,be){var q=te.apply(null,[this].concat([].slice.call(be)));return this._r=q._r,this._g=q._g,this._b=q._b,this.setAlpha(q._a),this},lighten:function(){return this._applyModification(o,arguments)},brighten:function(){return this._applyModification(P,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(C,arguments)},greyscale:function(){return this._applyModification(T,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(te,be){return te.apply(null,[this].concat([].slice.call(be)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(N,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},a.fromRatio=function(te,be){if(typeof te=="object"){var q={};for(var ae in te)te.hasOwnProperty(ae)&&(ae==="a"?q[ae]=te[ae]:q[ae]=he(te[ae]));te=q}return a(te,be)};function r(te){var be={r:0,g:0,b:0},q=1,ae=null,xe=null,ne=null,Q=!1,X=!1;return typeof te=="string"&&(te=oe(te)),typeof te=="object"&&(me(te.r)&&me(te.g)&&me(te.b)?(be=u(te.r,te.g,te.b),Q=!0,X=String(te.r).substr(-1)==="%"?"prgb":"rgb"):me(te.h)&&me(te.s)&&me(te.v)?(ae=he(te.s),xe=he(te.v),be=g(te.h,ae,xe),Q=!0,X="hsv"):me(te.h)&&me(te.s)&&me(te.l)&&(ae=he(te.s),ne=he(te.l),be=m(te.h,ae,ne),Q=!0,X="hsl"),te.hasOwnProperty("a")&&(q=te.a)),q=G(q),{ok:Q,format:te.format||X,r:w(255,l(be.r,0)),g:w(255,l(be.g,0)),b:w(255,l(be.b,0)),a:q}}function u(te,be,q){return{r:B(te,255)*255,g:B(be,255)*255,b:B(q,255)*255}}function p(te,be,q){te=B(te,255),be=B(be,255),q=B(q,255);var ae=l(te,be,q),xe=w(te,be,q),ne,Q,X=(ae+xe)/2;if(ae==xe)ne=Q=0;else{var $=ae-xe;Q=X>.5?$/(2-ae-xe):$/(ae+xe);switch(ae){case te:ne=(be-q)/$+(be<q?6:0);break;case be:ne=(q-te)/$+2;break;case q:ne=(te-be)/$+4;break}ne/=6}return{h:ne,s:Q,l:X}}function m(te,be,q){var ae,xe,ne;te=B(te,360),be=B(be,100),q=B(q,100);function Q(pe,de,Ce){return Ce<0&&(Ce+=1),Ce>1&&(Ce-=1),Ce<1/6?pe+(de-pe)*6*Ce:Ce<1/2?de:Ce<2/3?pe+(de-pe)*(2/3-Ce)*6:pe}if(be===0)ae=xe=ne=q;else{var X=q<.5?q*(1+be):q+be-q*be,$=2*q-X;ae=Q($,X,te+1/3),xe=Q($,X,te),ne=Q($,X,te-1/3)}return{r:ae*255,g:xe*255,b:ne*255}}function b(te,be,q){te=B(te,255),be=B(be,255),q=B(q,255);var ae=l(te,be,q),xe=w(te,be,q),ne,Q,X=ae,$=ae-xe;if(Q=ae===0?0:$/ae,ae==xe)ne=0;else{switch(ae){case te:ne=(be-q)/$+(be<q?6:0);break;case be:ne=(q-te)/$+2;break;case q:ne=(te-be)/$+4;break}ne/=6}return{h:ne,s:Q,v:X}}function g(te,be,q){te=B(te,360)*6,be=B(be,100),q=B(q,100);var ae=c.floor(te),xe=te-ae,ne=q*(1-be),Q=q*(1-xe*be),X=q*(1-(1-xe)*be),$=ae%6,pe=[q,Q,ne,ne,X,q][$],de=[X,q,q,Q,ne,ne][$],Ce=[ne,ne,X,q,q,Q][$];return{r:pe*255,g:de*255,b:Ce*255}}function v(te,be,q,ae){var xe=[Z(s(te).toString(16)),Z(s(be).toString(16)),Z(s(q).toString(16))];return ae&&xe[0].charAt(0)==xe[0].charAt(1)&&xe[1].charAt(0)==xe[1].charAt(1)&&xe[2].charAt(0)==xe[2].charAt(1)?xe[0].charAt(0)+xe[1].charAt(0)+xe[2].charAt(0):xe.join("")}function n(te,be,q,ae,xe){var ne=[Z(s(te).toString(16)),Z(s(be).toString(16)),Z(s(q).toString(16)),Z(ge(ae))];return xe&&ne[0].charAt(0)==ne[0].charAt(1)&&ne[1].charAt(0)==ne[1].charAt(1)&&ne[2].charAt(0)==ne[2].charAt(1)&&ne[3].charAt(0)==ne[3].charAt(1)?ne[0].charAt(0)+ne[1].charAt(0)+ne[2].charAt(0)+ne[3].charAt(0):ne.join("")}function d(te,be,q,ae){var xe=[Z(ge(ae)),Z(s(te).toString(16)),Z(s(be).toString(16)),Z(s(q).toString(16))];return xe.join("")}a.equals=function(te,be){return!te||!be?!1:a(te).toRgbString()==a(be).toRgbString()},a.random=function(){return a.fromRatio({r:i(),g:i(),b:i()})};function h(te,be){be=be===0?0:be||10;var q=a(te).toHsl();return q.s-=be/100,q.s=K(q.s),a(q)}function C(te,be){be=be===0?0:be||10;var q=a(te).toHsl();return q.s+=be/100,q.s=K(q.s),a(q)}function T(te){return a(te).desaturate(100)}function o(te,be){be=be===0?0:be||10;var q=a(te).toHsl();return q.l+=be/100,q.l=K(q.l),a(q)}function P(te,be){be=be===0?0:be||10;var q=a(te).toRgb();return q.r=l(0,w(255,q.r-s(255*-(be/100)))),q.g=l(0,w(255,q.g-s(255*-(be/100)))),q.b=l(0,w(255,q.b-s(255*-(be/100)))),a(q)}function O(te,be){be=be===0?0:be||10;var q=a(te).toHsl();return q.l-=be/100,q.l=K(q.l),a(q)}function y(te,be){var q=a(te).toHsl(),ae=(q.h+be)%360;return q.h=ae<0?360+ae:ae,a(q)}function x(te){var be=a(te).toHsl();return be.h=(be.h+180)%360,a(be)}function E(te){var be=a(te).toHsl(),q=be.h;return[a(te),a({h:(q+120)%360,s:be.s,l:be.l}),a({h:(q+240)%360,s:be.s,l:be.l})]}function _(te){var be=a(te).toHsl(),q=be.h;return[a(te),a({h:(q+90)%360,s:be.s,l:be.l}),a({h:(q+180)%360,s:be.s,l:be.l}),a({h:(q+270)%360,s:be.s,l:be.l})]}function N(te){var be=a(te).toHsl(),q=be.h;return[a(te),a({h:(q+72)%360,s:be.s,l:be.l}),a({h:(q+216)%360,s:be.s,l:be.l})]}function j(te,be,q){be=be||6,q=q||30;var ae=a(te).toHsl(),xe=360/q,ne=[a(te)];for(ae.h=(ae.h-(xe*be>>1)+720)%360;--be;)ae.h=(ae.h+xe)%360,ne.push(a(ae));return ne}function M(te,be){be=be||6;for(var q=a(te).toHsv(),ae=q.h,xe=q.s,ne=q.v,Q=[],X=1/be;be--;)Q.push(a({h:ae,s:xe,v:ne})),ne=(ne+X)%1;return Q}a.mix=function(te,be,q){q=q===0?0:q||50;var ae=a(te).toRgb(),xe=a(be).toRgb(),ne=q/100,Q={r:(xe.r-ae.r)*ne+ae.r,g:(xe.g-ae.g)*ne+ae.g,b:(xe.b-ae.b)*ne+ae.b,a:(xe.a-ae.a)*ne+ae.a};return a(Q)},a.readability=function(te,be){var q=a(te),ae=a(be);return(c.max(q.getLuminance(),ae.getLuminance())+.05)/(c.min(q.getLuminance(),ae.getLuminance())+.05)},a.isReadable=function(te,be,q){var ae=a.readability(te,be),xe,ne;ne=!1,xe=se(q);switch(xe.level+xe.size){case"AAsmall":case"AAAlarge":ne=ae>=4.5;break;case"AAlarge":ne=ae>=3;break;case"AAAsmall":ne=ae>=7;break}return ne},a.mostReadable=function(te,be,q){var ae=null,xe=0,ne,Q,X,$;q=q||{},Q=q.includeFallbackColors,X=q.level,$=q.size;for(var pe=0;pe<be.length;pe++)ne=a.readability(te,be[pe]),ne>xe&&(xe=ne,ae=a(be[pe]));return a.isReadable(te,ae,{level:X,size:$})||!Q?ae:(q.includeFallbackColors=!1,a.mostReadable(te,["#fff","#000"],q))};var H=a.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"},z=a.hexNames=F(H);function F(te){var be={};for(var q in te)te.hasOwnProperty(q)&&(be[te[q]]=q);return be}function G(te){return te=parseFloat(te),(isNaN(te)||te<0||te>1)&&(te=1),te}function B(te,be){J(te)&&(te="100%");var q=ee(te);return te=w(be,l(0,parseFloat(te))),q&&(te=parseInt(te*be,10)/100),c.abs(te-be)<1e-6?1:te%be/parseFloat(be)}function K(te){return w(1,l(0,te))}function W(te){return parseInt(te,16)}function J(te){return typeof te=="string"&&te.indexOf(".")!=-1&&parseFloat(te)===1}function ee(te){return typeof te=="string"&&te.indexOf("%")!=-1}function Z(te){return te.length==1?"0"+te:""+te}function he(te){return te<=1&&(te=te*100+"%"),te}function ge(te){return c.round(parseFloat(te)*255).toString(16)}function ie(te){return W(te)/255}var we=function(){var te="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",q="(?:"+be+")|(?:"+te+")",ae="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",xe="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?";return{CSS_UNIT:new RegExp(q),rgb:new RegExp("rgb"+ae),rgba:new RegExp("rgba"+xe),hsl:new RegExp("hsl"+ae),hsla:new RegExp("hsla"+xe),hsv:new RegExp("hsv"+ae),hsva:new RegExp("hsva"+xe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function me(te){return!!we.CSS_UNIT.exec(te)}function oe(te){te=te.replace(S,"").replace(R,"").toLowerCase();var be=!1;if(H[te])te=H[te],be=!0;else if(te=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var q;return(q=we.rgb.exec(te))?{r:q[1],g:q[2],b:q[3]}:(q=we.rgba.exec(te))?{r:q[1],g:q[2],b:q[3],a:q[4]}:(q=we.hsl.exec(te))?{h:q[1],s:q[2],l:q[3]}:(q=we.hsla.exec(te))?{h:q[1],s:q[2],l:q[3],a:q[4]}:(q=we.hsv.exec(te))?{h:q[1],s:q[2],v:q[3]}:(q=we.hsva.exec(te))?{h:q[1],s:q[2],v:q[3],a:q[4]}:(q=we.hex8.exec(te))?{r:W(q[1]),g:W(q[2]),b:W(q[3]),a:ie(q[4]),format:be?"name":"hex8"}:(q=we.hex6.exec(te))?{r:W(q[1]),g:W(q[2]),b:W(q[3]),format:be?"name":"hex"}:(q=we.hex4.exec(te))?{r:W(q[1]+""+q[1]),g:W(q[2]+""+q[2]),b:W(q[3]+""+q[3]),a:ie(q[4]+""+q[4]),format:be?"name":"hex8"}:(q=we.hex3.exec(te))?{r:W(q[1]+""+q[1]),g:W(q[2]+""+q[2]),b:W(q[3]+""+q[3]),format:be?"name":"hex"}:!1}function se(te){var be,q;return te=te||{level:"AA",size:"small"},be=(te.level||"AA").toUpperCase(),q=(te.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),q!=="small"&&q!=="large"&&(q="small"),{level:be,size:q}}I.exports?I.exports=a:!(L=function(){return a}.call(Y,k,Y,I),L!==void 0&&(I.exports=L))})(Math)},aRTE:function(I,Y){I.exports={L:1,M:0,Q:3,H:2}},bCnd:function(I,Y,k){"use strict";k.d(Y,"b",function(){return R}),k.d(Y,"a",function(){return f});var L=k("je13"),c=k.n(L),S=!1;function R(s,w){var l=c.a.get("__ec");l||(l={}),l[s]=w,c.a.set("__ec",l)}function f(s,w){var l=c.a.get("__ec");return l?l[s]===void 0?w:l[s]:w}},bQjk:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){return function(c){var S=L,R=S.lib,f=R.CipherParams,s=S.enc,w=s.Hex,l=S.format,i=l.Hex={stringify:function(a){return a.ciphertext.toString(w)},parse:function(a){var r=w.parse(a);return f.create({ciphertext:r})}}}(),L.format.Hex})},bT9E:function(I,Y,k){"use strict";k.d(Y,"a",function(){return c});var L=k("VTBJ");function c(S,R){var f=Object(L.a)({},S);return Array.isArray(R)&&R.forEach(function(s){delete f[s]}),f}},biw7:function(I,Y,k){"use strict";var L=k("cDcd"),c=k.n(L),S=L.createContext(null);Y.a=S},c5Ni:function(I,Y,k){},cDPC:function(I,Y,k){"use strict";var L=k("tJVT"),c=k("cDcd"),S=k.n(c),R=k("i3hx"),f=k.n(R);Y.a=function(s){var w=s.defaultX,l=w===void 0?"40%":w,i=s.leftChild,a=s.rightChild,r=s.className,u=s.hideResize,p=u===void 0?!1:u,m=Object(c.useState)(l),b=Object(L.a)(m,2),g=b[0],v=b[1],n=Object(c.useRef)();function d(){n.current=!0}Object(c.useEffect)(function(){function T(P){n.current&&v(P.pageX)}function o(){n.current=!1}return window.addEventListener("mousemove",T),window.addEventListener("mouseup",o),function(){window.removeEventListener("mousemove",T),window.removeEventListener("mouseup",o)}},[]);var h=typeof g=="number"&&g!==.01?"".concat(g,"px"):l,C="calc(100% - ".concat(p?"0px":"4px"," - ").concat(h,")");return S.a.createElement("div",{className:"split-panel-container ".concat(r)},S.a.createElement("section",{style:{width:h,display:g===.01?"none":""}},i),S.a.createElement("section",{className:"resize-x-bar",onMouseDown:d},S.a.createElement("a",{className:"btn-resize"},S.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},S.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),S.a.createElement("section",{style:{width:C}},a))}},cv67:function(I,Y,k){(function(L,c){I.exports=Y=c(k("Ib8C"))})(this,function(L){return function(c){var S=L,R=S.lib,f=R.WordArray,s=R.Hasher,w=S.algo,l=[];(function(){for(var m=0;m<64;m++)l[m]=c.abs(c.sin(m+1))*4294967296|0})();var i=w.MD5=s.extend({_doReset:function(){this._hash=new f.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,b){for(var g=0;g<16;g++){var v=b+g,n=m[v];m[v]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var d=this._hash.words,h=m[b+0],C=m[b+1],T=m[b+2],o=m[b+3],P=m[b+4],O=m[b+5],y=m[b+6],x=m[b+7],E=m[b+8],_=m[b+9],N=m[b+10],j=m[b+11],M=m[b+12],H=m[b+13],z=m[b+14],F=m[b+15],G=d[0],B=d[1],K=d[2],W=d[3];G=a(G,B,K,W,h,7,l[0]),W=a(W,G,B,K,C,12,l[1]),K=a(K,W,G,B,T,17,l[2]),B=a(B,K,W,G,o,22,l[3]),G=a(G,B,K,W,P,7,l[4]),W=a(W,G,B,K,O,12,l[5]),K=a(K,W,G,B,y,17,l[6]),B=a(B,K,W,G,x,22,l[7]),G=a(G,B,K,W,E,7,l[8]),W=a(W,G,B,K,_,12,l[9]),K=a(K,W,G,B,N,17,l[10]),B=a(B,K,W,G,j,22,l[11]),G=a(G,B,K,W,M,7,l[12]),W=a(W,G,B,K,H,12,l[13]),K=a(K,W,G,B,z,17,l[14]),B=a(B,K,W,G,F,22,l[15]),G=r(G,B,K,W,C,5,l[16]),W=r(W,G,B,K,y,9,l[17]),K=r(K,W,G,B,j,14,l[18]),B=r(B,K,W,G,h,20,l[19]),G=r(G,B,K,W,O,5,l[20]),W=r(W,G,B,K,N,9,l[21]),K=r(K,W,G,B,F,14,l[22]),B=r(B,K,W,G,P,20,l[23]),G=r(G,B,K,W,_,5,l[24]),W=r(W,G,B,K,z,9,l[25]),K=r(K,W,G,B,o,14,l[26]),B=r(B,K,W,G,E,20,l[27]),G=r(G,B,K,W,H,5,l[28]),W=r(W,G,B,K,T,9,l[29]),K=r(K,W,G,B,x,14,l[30]),B=r(B,K,W,G,M,20,l[31]),G=u(G,B,K,W,O,4,l[32]),W=u(W,G,B,K,E,11,l[33]),K=u(K,W,G,B,j,16,l[34]),B=u(B,K,W,G,z,23,l[35]),G=u(G,B,K,W,C,4,l[36]),W=u(W,G,B,K,P,11,l[37]),K=u(K,W,G,B,x,16,l[38]),B=u(B,K,W,G,N,23,l[39]),G=u(G,B,K,W,H,4,l[40]),W=u(W,G,B,K,h,11,l[41]),K=u(K,W,G,B,o,16,l[42]),B=u(B,K,W,G,y,23,l[43]),G=u(G,B,K,W,_,4,l[44]),W=u(W,G,B,K,M,11,l[45]),K=u(K,W,G,B,F,16,l[46]),B=u(B,K,W,G,T,23,l[47]),G=p(G,B,K,W,h,6,l[48]),W=p(W,G,B,K,x,10,l[49]),K=p(K,W,G,B,z,15,l[50]),B=p(B,K,W,G,O,21,l[51]),G=p(G,B,K,W,M,6,l[52]),W=p(W,G,B,K,o,10,l[53]),K=p(K,W,G,B,N,15,l[54]),B=p(B,K,W,G,C,21,l[55]),G=p(G,B,K,W,E,6,l[56]),W=p(W,G,B,K,F,10,l[57]),K=p(K,W,G,B,y,15,l[58]),B=p(B,K,W,G,H,21,l[59]),G=p(G,B,K,W,P,6,l[60]),W=p(W,G,B,K,j,10,l[61]),K=p(K,W,G,B,T,15,l[62]),B=p(B,K,W,G,_,21,l[63]),d[0]=d[0]+G|0,d[1]=d[1]+B|0,d[2]=d[2]+K|0,d[3]=d[3]+W|0},_doFinalize:function(){var m=this._data,b=m.words,g=this._nDataBytes*8,v=m.sigBytes*8;b[v>>>5]|=128<<24-v%32;var n=c.floor(g/4294967296),d=g;b[(v+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,b[(v+64>>>9<<4)+14]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,m.sigBytes=(b.length+1)*4,this._process();for(var h=this._hash,C=h.words,T=0;T<4;T++){var o=C[T];C[T]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360}return h},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});function a(m,b,g,v,n,d,h){var C=m+(b&g|~b&v)+n+h;return(C<<d|C>>>32-d)+b}function r(m,b,g,v,n,d,h){var C=m+(b&v|g&~v)+n+h;return(C<<d|C>>>32-d)+b}function u(m,b,g,v,n,d,h){var C=m+(b^g^v)+n+h;return(C<<d|C>>>32-d)+b}function p(m,b,g,v,n,d,h){var C=m+(g^(b|~v))+n+h;return(C<<d|C>>>32-d)+b}S.MD5=s._createHelper(i),S.HmacMD5=s._createHmacHelper(i)}(Math),L.MD5})},dQei:function(I,Y){for(var k={glog:function(c){if(c<1)throw new Error("glog("+c+")");return k.LOG_TABLE[c]},gexp:function(c){for(;c<0;)c+=255;for(;c>=256;)c-=255;return k.EXP_TABLE[c]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},L=0;L<8;L++)k.EXP_TABLE[L]=1<<L;for(var L=8;L<256;L++)k.EXP_TABLE[L]=k.EXP_TABLE[L-4]^k.EXP_TABLE[L-5]^k.EXP_TABLE[L-6]^k.EXP_TABLE[L-8];for(var L=0;L<255;L++)k.LOG_TABLE[k.EXP_TABLE[L]]=L;I.exports=k},dWSS:function(I,Y,k){var L=k("dQei");function c(S,R){if(S.length==null)throw new Error(S.length+"/"+R);for(var f=0;f<S.length&&S[f]==0;)f++;this.num=new Array(S.length-f+R);for(var s=0;s<S.length-f;s++)this.num[s]=S[s+f]}c.prototype={get:function(S){return this.num[S]},getLength:function(){return this.num.length},multiply:function(S){for(var R=new Array(this.getLength()+S.getLength()-1),f=0;f<this.getLength();f++)for(var s=0;s<S.getLength();s++)R[f+s]^=L.gexp(L.glog(this.get(f))+L.glog(S.get(s)));return new c(R,0)},mod:function(S){if(this.getLength()-S.getLength()<0)return this;for(var R=L.glog(this.get(0))-L.glog(S.get(0)),f=new Array(this.getLength()),s=0;s<this.getLength();s++)f[s]=this.get(s);for(var s=0;s<S.getLength();s++)f[s]^=L.gexp(L.glog(S.get(s))+R);return new c(f,0).mod(S)}},I.exports=c},dejd:function(I,Y,k){},dmUQ:function(I,Y,k){"use strict";var L=k("Ff2n"),c=k("rePB"),S=k("1OyB"),R=k("vuIU"),f=k("Ji7U"),s=k("md7G"),w=k("foSv"),l=k("cDcd"),i=k.n(l),a=k("TSYQ"),r=k.n(a),u=k("4IlW");function p(E,_){var N=Object.keys(E);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(E);_&&(j=j.filter(function(M){return Object.getOwnPropertyDescriptor(E,M).enumerable})),N.push.apply(N,j)}return N}function m(E){for(var _=1;_<arguments.length;_++){var N=arguments[_]!=null?arguments[_]:{};_%2?p(Object(N),!0).forEach(function(j){Object(c.a)(E,j,N[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(N)):p(Object(N)).forEach(function(j){Object.defineProperty(E,j,Object.getOwnPropertyDescriptor(N,j))})}return E}function b(E){var _=g();return function(){var j=Object(w.a)(E),M;if(_){var H=Object(w.a)(this).constructor;M=Reflect.construct(j,arguments,H)}else M=j.apply(this,arguments);return Object(s.a)(this,M)}}function g(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(E){return!1}}function v(){}function n(E){E.preventDefault()}var d=function(_){return _.replace(/[^\w.-]+/g,"")},h=200,C=600,T=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,o=function(_){return _!=null},P=function(_,N){return N===_||typeof N=="number"&&typeof _=="number"&&isNaN(N)&&isNaN(_)},O=function(E){Object(f.a)(N,E);var _=b(N);function N(j){var M;Object(S.a)(this,N),M=_.call(this,j),M.onKeyDown=function(F){var G=M.props,B=G.onKeyDown,K=G.onPressEnter;if(F.keyCode===u.a.UP){var W=M.getRatio(F);M.up(F,W,null),M.stop()}else if(F.keyCode===u.a.DOWN){var J=M.getRatio(F);M.down(F,J,null),M.stop()}else F.keyCode===u.a.ENTER&&K&&K(F);if(M.recordCursorPosition(),M.lastKeyCode=F.keyCode,B){for(var ee=arguments.length,Z=new Array(ee>1?ee-1:0),he=1;he<ee;he++)Z[he-1]=arguments[he];B.apply(void 0,[F].concat(Z))}},M.onKeyUp=function(F){var G=M.props.onKeyUp;if(M.stop(),M.recordCursorPosition(),G){for(var B=arguments.length,K=new Array(B>1?B-1:0),W=1;W<B;W++)K[W-1]=arguments[W];G.apply(void 0,[F].concat(K))}},M.onChange=function(F){var G=M.props.onChange;M.state.focused&&(M.inputting=!0),M.rawInput=M.props.parser(M.getValueFromEvent(F)),M.setState({inputValue:M.rawInput}),G(M.toNumber(M.rawInput))},M.onMouseUp=function(){var F=M.props.onMouseUp;M.recordCursorPosition(),F&&F.apply(void 0,arguments)},M.onFocus=function(){var F;M.setState({focused:!0}),(F=M.props).onFocus.apply(F,arguments)},M.onBlur=function(){var F=M.props.onBlur;M.inputting=!1,M.setState({focused:!1});var G=M.getCurrentValidValue(M.state.inputValue),B=M.setValue(G,v);if(F){var K=M.input.value,W=M.getInputDisplayValue({focus:!1,value:B});M.input.value=W&&Number(W),F.apply(void 0,arguments),M.input.value=K}},M.getRatio=function(F){var G=1;return F.metaKey||F.ctrlKey?G=.1:F.shiftKey&&(G=10),G},M.getFullNum=function(F){return isNaN(F)?F:/e/i.test(String(F))?Number(F).toFixed(18).replace(/\.?0+$/,""):F},M.getPrecision=function(F){if(o(M.props.precision))return M.props.precision;var G=String(F);if(G.indexOf("e-")>=0)return parseInt(G.slice(G.indexOf("e-")+2),10);var B=0;return G.indexOf(".")>=0&&(B=G.length-G.indexOf(".")-1),B},M.getInputDisplayValue=function(F){var G=F||M.state,B=G.focused,K=G.inputValue,W=G.value,J;B?J=K:J=M.toPrecisionAsStep(W),J==null&&(J="");var ee=M.formatWrapper(J);return o(M.props.decimalSeparator)&&(ee=ee.toString().replace(".",M.props.decimalSeparator)),ee},M.recordCursorPosition=function(){try{M.cursorStart=M.input.selectionStart,M.cursorEnd=M.input.selectionEnd,M.currentValue=M.input.value,M.cursorBefore=M.input.value.substring(0,M.cursorStart),M.cursorAfter=M.input.value.substring(M.cursorEnd)}catch(F){}},M.restoreByAfter=function(F){if(F===void 0)return!1;var G=M.input.value,B=G.lastIndexOf(F);if(B===-1)return!1;var K=M.cursorBefore.length;return M.lastKeyCode===u.a.DELETE&&M.cursorBefore.charAt(K-1)===F[0]?(M.fixCaret(K,K),!0):B+F.length===G.length?(M.fixCaret(B,B),!0):!1},M.partRestoreByAfter=function(F){return F===void 0?!1:Array.prototype.some.call(F,function(G,B){var K=F.substring(B);return M.restoreByAfter(K)})},M.isNotCompleteNumber=function(F){return isNaN(F)||F===""||F===null||F&&F.toString().indexOf(".")===F.toString().length-1},M.stop=function(){M.autoStepTimer&&clearTimeout(M.autoStepTimer)},M.down=function(F,G,B){M.pressingUpOrDown=!0,M.step("down",F,G,B)},M.up=function(F,G,B){M.pressingUpOrDown=!0,M.step("up",F,G,B)},M.saveInput=function(F){M.input=F};var H=j.value;H===void 0&&(H=j.defaultValue),M.state={focused:j.autoFocus};var z=M.getValidValue(M.toNumber(H));return M.state=m(m({},M.state),{},{inputValue:M.toPrecisionAsStep(z),value:z}),M}return Object(R.a)(N,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(M){var H=this.props,z=H.value,F=H.onChange,G=H.max,B=H.min,K=this.state.focused;if(M){if(!P(M.value,z)||!P(M.max,G)||!P(M.min,B)){var W=K?z:this.getValidValue(z),J;this.pressingUpOrDown?J=W:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(W),this.setState({value:W,inputValue:J})}var ee="value"in this.props?z:this.state.value;"max"in this.props&&M.max!==G&&typeof ee=="number"&&ee>G&&F&&F(G),"min"in this.props&&M.min!==B&&typeof ee=="number"&&ee<B&&F&&F(B)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Z=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===u.a.BACKSPACE?Z=this.cursorStart-1:this.lastKeyCode===u.a.DELETE&&(Z=this.cursorStart):Z=this.input.value.length,this.fixCaret(Z,Z)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case u.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case u.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(M){var H=M;return H===""?H="":this.isNotCompleteNumber(parseFloat(H))?H=this.state.value:H=this.getValidValue(H),this.toNumber(H)}},{key:"getValueFromEvent",value:function(M){var H=M.target.value.trim().replace(/。/g,".");return o(this.props.decimalSeparator)&&(H=H.replace(this.props.decimalSeparator,".")),H}},{key:"getValidValue",value:function(M){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,F=parseFloat(M);return isNaN(F)?M:(F<H&&(F=H),F>z&&(F=z),F)}},{key:"setValue",value:function(M,H){var z=this.props.precision,F=this.isNotCompleteNumber(parseFloat(M))?null:parseFloat(M),G=this.state.value,B=G===void 0?null:G,K=this.state.inputValue,W=K===void 0?null:K,J=typeof F=="number"?F.toFixed(z):"".concat(F),ee=F!==B||J!=="".concat(W);return"value"in this.props?(W=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:W},H)):this.setState({value:F,inputValue:this.toPrecisionAsStep(M)},H),ee&&this.props.onChange(F),F}},{key:"getMaxPrecision",value:function(M){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.props,F=z.precision,G=z.step;if(o(F))return F;var B=this.getPrecision(H),K=this.getPrecision(G),W=this.getPrecision(M);return M?Math.max(W,B+K):B+K}},{key:"getPrecisionFactor",value:function(M){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.getMaxPrecision(M,H);return Math.pow(10,z)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(M){return this.props.formatter?this.props.formatter(M):M}},{key:"toPrecisionAsStep",value:function(M){if(this.isNotCompleteNumber(M)||M==="")return M;var H=Math.abs(this.getMaxPrecision(M));return isNaN(H)?M.toString():Number(M).toFixed(H)}},{key:"toNumber",value:function(M){var H=this.props.precision,z=this.state.focused,F=M&&M.length>16&&z;return this.isNotCompleteNumber(M)||F?M:o(H)?Math.round(M*Math.pow(10,H))/Math.pow(10,H):Number(M)}},{key:"upStep",value:function(M,H){var z=this.props.step,F=this.getPrecisionFactor(M,H),G=Math.abs(this.getMaxPrecision(M,H)),B=((F*M+F*z*H)/F).toFixed(G);return this.toNumber(B)}},{key:"downStep",value:function(M,H){var z=this.props.step,F=this.getPrecisionFactor(M,H),G=Math.abs(this.getMaxPrecision(M,H)),B=((F*M-F*z*H)/F).toFixed(G);return this.toNumber(B)}},{key:"step",value:function(M,H){var z=this,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,G=arguments.length>3?arguments[3]:void 0;this.stop(),H&&(H.persist(),H.preventDefault());var B=this.props;if(B.disabled)return;var K=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(K))return;var W=this["".concat(M,"Step")](K,F),J=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(){z.pressingUpOrDown=!1}),J)return;this.autoStepTimer=setTimeout(function(){z[M](H,F,!0)},G?h:C)}},{key:"fixCaret",value:function(M,H){if(M===void 0||H===void 0||!this.input||!this.input.value)return;try{var z=this.input.selectionStart,F=this.input.selectionEnd;(M!==z||H!==F)&&this.input.setSelectionRange(M,H)}catch(G){}}},{key:"render",value:function(){var M,H=this.props,z=H.prefixCls,F=H.disabled,G=H.readOnly,B=H.useTouch,K=H.autoComplete,W=H.upHandler,J=H.downHandler,ee=H.className,Z=H.max,he=H.min,ge=H.style,ie=H.title,we=H.onMouseEnter,me=H.onMouseLeave,oe=H.onMouseOver,se=H.onMouseOut,te=H.required,be=H.onClick,q=H.tabIndex,ae=H.type,xe=H.placeholder,ne=H.id,Q=H.inputMode,X=H.pattern,$=H.step,pe=H.maxLength,de=H.autoFocus,Ce=H.name,ze=H.onPaste,qe=H.onInput,Ye=Object(L.a)(H,["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"]),Ve=this.state,et=Ve.value,rt=Ve.focused,Me=r()(z,(M={},Object(c.a)(M,ee,!!ee),Object(c.a)(M,"".concat(z,"-disabled"),F),Object(c.a)(M,"".concat(z,"-focused"),rt),M)),Se={};Object.keys(Ye).forEach(function(De){(De.substr(0,5)==="data-"||De.substr(0,5)==="aria-"||De==="role")&&(Se[De]=Ye[De])});var Ge=!G&&!F,tt=this.getInputDisplayValue(null),Ue=(et||et===0)&&(isNaN(et)||Number(et)>=Z),Xe=(et||et===0)&&(isNaN(et)||Number(et)<=he),Pe=Ue||F||G,Te=Xe||F||G,Ae=r()("".concat(z,"-handler"),"".concat(z,"-handler-up"),Object(c.a)({},"".concat(z,"-handler-up-disabled"),Pe)),ce=r()("".concat(z,"-handler"),"".concat(z,"-handler-down"),Object(c.a)({},"".concat(z,"-handler-down-disabled"),Te)),Ee=B?{onTouchStart:Pe?v:this.up,onTouchEnd:this.stop}:{onMouseDown:Pe?v:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},_e=B?{onTouchStart:Te?v:this.down,onTouchEnd:this.stop}:{onMouseDown:Te?v:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return i.a.createElement("div",{className:Me,style:ge,title:ie,onMouseEnter:we,onMouseLeave:me,onMouseOver:oe,onMouseOut:se,onFocus:function(){return null},onBlur:function(){return null}},i.a.createElement("div",{className:"".concat(z,"-handler-wrap")},i.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":Pe,className:Ae}),W||i.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner"),onClick:n})),i.a.createElement("span",Object.assign({unselectable:"on"},_e,{role:"button","aria-label":"Decrease Value","aria-disabled":Te,className:ce}),J||i.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner"),onClick:n}))),i.a.createElement("div",{className:"".concat(z,"-input-wrap")},i.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":he,"aria-valuemax":Z,"aria-valuenow":et,required:te,type:ae,placeholder:xe,onPaste:ze,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(z,"-input"),tabIndex:q,autoComplete:K,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ge?this.onKeyDown:v,onKeyUp:Ge?this.onKeyUp:v,autoFocus:de,maxLength:pe,readOnly:G,disabled:F,max:Z,min:he,step:$,name:Ce,title:ie,id:ne,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(tt),pattern:X,inputMode:Q,onInput:qe},Se))))}}]),N}(i.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:T,min:-T,step:1,style:{},onChange:v,onKeyDown:v,onPressEnter:v,onFocus:v,onBlur:v,parser:d,required:!1,autoComplete:"off"};var y=O,x=Y.a=y},e7zE:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.Base,f=S.WordArray,s=c.algo,w=s.SHA1,l=s.HMAC,i=s.PBKDF2=R.extend({cfg:R.extend({keySize:128/32,hasher:w,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,r){for(var u=this.cfg,p=l.create(u.hasher,a),m=f.create(),b=f.create([1]),g=m.words,v=b.words,n=u.keySize,d=u.iterations;g.length<n;){var h=p.update(r).finalize(b);p.reset();for(var C=h.words,T=C.length,o=h,P=1;P<d;P++){o=p.finalize(o),p.reset();for(var O=o.words,y=0;y<T;y++)C[y]^=O[y]}m.concat(h),v[0]++}return m.sigBytes=n*4,m}});c.PBKDF2=function(a,r,u){return i.create(u).compute(a,r)}}(),L.PBKDF2})},eRFJ:function(I,Y,k){I.exports={header:"header___2DEfS",field:"field___2KFR1","oj-form-container":"oj-form-container___11-CJ","oj-left-panel":"oj-left-panel___2_COu","oj-form-info":"oj-form-info___3RmjJ",footer:"footer___13GF0",result:"result___2TPH2",passText:"passText___m4yU3",noPassText:"noPassText___bU8yW",pass:"pass___1qwzN",noPass:"noPass___35fR7","test-case-name":"test-case-name___JX6gg","btn-remove-case":"btn-remove-case___20q0s","icon-tag":"icon-tag___ahN2d",btn_back:"btn_back___2GR2u",testJi:"testJi___lY3ok",upBtn:"upBtn___14ov-","oj-problems":"oj-problems___3xexO",row:"row____2CFx",a:"a___1o_MZ",b:"b___2s_8T",inputTwo:"inputTwo___2QE50",inputOne:"inputOne___3VLjS",cusModal:"cusModal___3HaCu","oj-custom-large-spin":"oj-custom-large-spin___18Uw5",MdEditor:"MdEditor___2TQ6G"}},f4xo:function(I,Y,k){var L=k("nVVt");function c(S){this.mode=L.MODE_8BIT_BYTE,this.data=S}c.prototype={getLength:function(S){return this.data.length},write:function(S){for(var R=0;R<this.data.length;R++)S.put(this.data.charCodeAt(R),8)}},I.exports=c},fcSX:function(I,Y,k){"use strict";var L=k("Ff2n"),c=k("1OyB"),S=k("vuIU"),R=k("Ji7U"),f=k("md7G"),s=k("foSv"),w=k("1W/9"),l=k("cDcd"),i=k("rePB"),a=k("JX7q"),r=k("TSYQ"),u=k.n(r),p=k("qx4F"),m=k("4IlW");function b(F){return Array.isArray(F)?F:[F]}var g={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},v=Object.keys(g).filter(function(F){if(typeof document=="undefined")return!1;var G=document.getElementsByTagName("html")[0];return F in(G?G.style:{})})[0],n=g[v];function d(F,G,B,K){F.addEventListener?F.addEventListener(G,B,K):F.attachEvent&&F.attachEvent("on".concat(G),B)}function h(F,G,B,K){F.removeEventListener?F.removeEventListener(G,B,K):F.attachEvent&&F.detachEvent("on".concat(G),B)}function C(F,G){var B=typeof F=="function"?F(G):F;return Array.isArray(B)?B.length===2?B:[B[0],B[1]]:[B]}var T=function(G){return!isNaN(parseFloat(G))&&isFinite(G)},o=!(typeof window!="undefined"&&window.document&&window.document.createElement),P=function F(G,B,K,W){if(!B||B===document||B instanceof Document)return!1;if(B===G.parentNode)return!0;var J=Math.max(Math.abs(K),Math.abs(W))===Math.abs(W),ee=Math.max(Math.abs(K),Math.abs(W))===Math.abs(K),Z=B.scrollHeight-B.clientHeight,he=B.scrollWidth-B.clientWidth,ge=document.defaultView.getComputedStyle(B),ie=ge.overflowY==="auto"||ge.overflowY==="scroll",we=ge.overflowX==="auto"||ge.overflowX==="scroll",me=Z&&ie,oe=he&&we;return J&&(!me||me&&(B.scrollTop>=Z&&W<0||B.scrollTop<=0&&W>0))||ee&&(!oe||oe&&(B.scrollLeft>=he&&K<0||B.scrollLeft<=0&&K>0))?F(G,B.parentNode,K,W):!1};function O(F){var G=y();return function(){var K=Object(s.a)(F),W;if(G){var J=Object(s.a)(this).constructor;W=Reflect.construct(K,arguments,J)}else W=K.apply(this,arguments);return Object(f.a)(this,W)}}function y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(F){return!1}}var x={},E=function(F){Object(R.a)(B,F);var G=O(B);function B(K){var W;return Object(c.a)(this,B),W=G.call(this,K),W.domFocus=function(){W.dom&&W.dom.focus()},W.removeStartHandler=function(J){if(J.touches.length>1)return;W.startPos={x:J.touches[0].clientX,y:J.touches[0].clientY}},W.removeMoveHandler=function(J){if(J.changedTouches.length>1)return;var ee=J.currentTarget,Z=J.changedTouches[0].clientX-W.startPos.x,he=J.changedTouches[0].clientY-W.startPos.y;(ee===W.maskDom||ee===W.handlerDom||ee===W.contentDom&&P(ee,J.target,Z,he))&&J.cancelable&&J.preventDefault()},W.transitionEnd=function(J){var ee=J.target;h(ee,n,W.transitionEnd),ee.style.transition=""},W.onKeyDown=function(J){if(J.keyCode===m.a.ESC){var ee=W.props.onClose;J.stopPropagation(),ee&&ee(J)}},W.onWrapperTransitionEnd=function(J){var ee=W.props,Z=ee.open,he=ee.afterVisibleChange;J.target===W.contentWrapper&&J.propertyName.match(/transform$/)&&(W.dom.style.transition="",!Z&&W.getCurrentDrawerSome()&&(document.body.style.overflowX="",W.maskDom&&(W.maskDom.style.left="",W.maskDom.style.width="")),he&&he(!!Z))},W.openLevelTransition=function(){var J=W.props,ee=J.open,Z=J.width,he=J.height,ge=W.getHorizontalBoolAndPlacementName(),ie=ge.isHorizontal,we=ge.placementName,me=W.contentDom?W.contentDom.getBoundingClientRect()[ie?"width":"height"]:0,oe=(ie?Z:he)||me;W.setLevelAndScrolling(ee,we,oe)},W.setLevelTransform=function(J,ee,Z,he){var ge=W.props,ie=ge.placement,we=ge.levelMove,me=ge.duration,oe=ge.ease,se=ge.showMask;W.levelDom.forEach(function(te){te.style.transition="transform ".concat(me," ").concat(oe),d(te,n,W.transitionEnd);var be=J?Z:0;if(we){var q=C(we,{target:te,open:J});be=J?q[0]:q[1]||0}var ae=typeof be=="number"?"".concat(be,"px"):be,xe=ie==="left"||ie==="top"?ae:"-".concat(ae);xe=se&&ie==="right"&&he?"calc(".concat(xe," + ").concat(he,"px)"):xe,te.style.transform=be?"".concat(ee,"(").concat(xe,")"):""})},W.setLevelAndScrolling=function(J,ee,Z){var he=W.props.onChange;if(!o){var ge=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(p.a)(!0):0;W.setLevelTransform(J,ee,Z,ge),W.toggleScrollingToDrawerAndBody(ge)}he&&he(J)},W.toggleScrollingToDrawerAndBody=function(J){var ee=W.props,Z=ee.getOpenCount,he=ee.getContainer,ge=ee.showMask,ie=ee.open,we=he&&he(),me=Z&&Z();if(we&&we.parentNode===document.body&&ge){var oe=["touchstart"],se=[document.body,W.maskDom,W.handlerDom,W.contentDom];ie&&document.body.style.overflow!=="hidden"?(J&&W.addScrollingEffect(J),me===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",se.forEach(function(te,be){if(!te)return;d(te,oe[be]||"touchmove",be?W.removeMoveHandler:W.removeStartHandler,W.passive)})):W.getCurrentDrawerSome()&&(me||(document.body.style.overflow=""),document.body.style.touchAction="",J&&W.remScrollingEffect(J),se.forEach(function(te,be){if(!te)return;h(te,oe[be]||"touchmove",be?W.removeMoveHandler:W.removeStartHandler,W.passive)}))}},W.addScrollingEffect=function(J){var ee=W.props,Z=ee.placement,he=ee.duration,ge=ee.ease,ie=ee.getOpenCount,we=ee.switchScrollingEffect,me=ie&&ie();me===1&&we();var oe="width ".concat(he," ").concat(ge),se="transform ".concat(he," ").concat(ge);W.dom.style.transition="none";switch(Z){case"right":W.dom.style.transform="translateX(-".concat(J,"px)");break;case"top":case"bottom":W.dom.style.width="calc(100% - ".concat(J,"px)"),W.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(se,",").concat(oe),W.dom.style.width="",W.dom.style.transform="")})},W.remScrollingEffect=function(J){var ee=W.props,Z=ee.placement,he=ee.duration,ge=ee.ease,ie=ee.getOpenCount,we=ee.switchScrollingEffect,me=ie&&ie();me||we(!0),v&&(document.body.style.overflowX="hidden"),W.dom.style.transition="none";var oe,se="width ".concat(he," ").concat(ge),te="transform ".concat(he," ").concat(ge);switch(Z){case"left":{W.dom.style.width="100%",se="width 0s ".concat(ge," ").concat(he);break}case"right":{W.dom.style.transform="translateX(".concat(J,"px)"),W.dom.style.width="100%",se="width 0s ".concat(ge," ").concat(he),W.maskDom&&(W.maskDom.style.left="-".concat(J,"px"),W.maskDom.style.width="calc(100% + ".concat(J,"px)"));break}case"top":case"bottom":{W.dom.style.width="calc(100% + ".concat(J,"px)"),W.dom.style.height="100%",W.dom.style.transform="translateZ(0)",oe="height 0s ".concat(ge," ").concat(he);break}default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(te,",").concat(oe?"".concat(oe,","):"").concat(se),W.dom.style.transform="",W.dom.style.width="",W.dom.style.height="")})},W.getCurrentDrawerSome=function(){return!Object.keys(x).some(function(J){return x[J]})},W.getLevelDom=function(J){var ee=J.level,Z=J.getContainer;if(o)return;var he=Z&&Z(),ge=he?he.parentNode:null;if(W.levelDom=[],ee==="all"){var ie=ge?Array.prototype.slice.call(ge.children):[];ie.forEach(function(we){we.nodeName!=="SCRIPT"&&we.nodeName!=="STYLE"&&we.nodeName!=="LINK"&&we!==he&&W.levelDom.push(we)})}else ee&&b(ee).forEach(function(we){document.querySelectorAll(we).forEach(function(me){W.levelDom.push(me)})})},W.getHorizontalBoolAndPlacementName=function(){var J=W.props.placement,ee=J==="left"||J==="right",Z="translate".concat(ee?"X":"Y");return{isHorizontal:ee,placementName:Z}},W.state={_self:Object(a.a)(W)},W}return Object(S.a)(B,[{key:"componentDidMount",value:function(){var W=this;if(!o){var J=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return J=!0,null}}))}catch(ie){}this.passive=J?{passive:!1}:!1}var ee=this.props,Z=ee.open,he=ee.getContainer,ge=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),Z&&(ge&&ge.parentNode===document.body&&(x[this.drawerId]=Z),this.openLevelTransition(),this.forceUpdate(function(){W.domFocus()}))}},{key:"componentDidUpdate",value:function(W){var J=this.props,ee=J.open,Z=J.getContainer,he=Z&&Z();ee!==W.open&&(ee&&this.domFocus(),he&&he.parentNode===document.body&&(x[this.drawerId]=!!ee),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var W=this.props,J=W.getOpenCount,ee=W.open,Z=W.switchScrollingEffect,he=typeof J=="function"&&J();delete x[this.drawerId],ee&&(this.setLevelTransform(!1),document.body.style.touchAction=""),he||(document.body.style.overflow="",Z(!0))}},{key:"render",value:function(){var W,J=this,ee=this.props,Z=ee.className,he=ee.children,ge=ee.style,ie=ee.width,we=ee.height,me=ee.defaultOpen,oe=ee.open,se=ee.prefixCls,te=ee.placement,be=ee.level,q=ee.levelMove,ae=ee.ease,xe=ee.duration,ne=ee.getContainer,Q=ee.handler,X=ee.onChange,$=ee.afterVisibleChange,pe=ee.showMask,de=ee.maskClosable,Ce=ee.maskStyle,ze=ee.onClose,qe=ee.onHandleClick,Ye=ee.keyboard,Ve=ee.getOpenCount,et=ee.switchScrollingEffect,rt=Object(L.a)(ee,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Me=this.dom?oe:!1,Se=u()(se,(W={},Object(i.a)(W,"".concat(se,"-").concat(te),!0),Object(i.a)(W,"".concat(se,"-open"),Me),Object(i.a)(W,Z||"",!!Z),Object(i.a)(W,"no-mask",!pe),W)),Ge=this.getHorizontalBoolAndPlacementName(),tt=Ge.placementName,Ue=te==="left"||te==="top"?"-100%":"100%",Xe=Me?"":"".concat(tt,"(").concat(Ue,")"),Pe=Q&&l.cloneElement(Q,{onClick:function(Ae){Q.props.onClick&&Q.props.onClick(),qe&&qe(Ae)},ref:function(Ae){J.handlerDom=Ae}});return l.createElement("div",Object.assign({},rt,{tabIndex:-1,className:Se,style:ge,ref:function(Ae){J.dom=Ae},onKeyDown:Me&&Ye?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),pe&&l.createElement("div",{className:"".concat(se,"-mask"),onClick:de?ze:void 0,style:Ce,ref:function(Ae){J.maskDom=Ae}}),l.createElement("div",{className:"".concat(se,"-content-wrapper"),style:{transform:Xe,msTransform:Xe,width:T(ie)?"".concat(ie,"px"):ie,height:T(we)?"".concat(we,"px"):we},ref:function(Ae){J.contentWrapper=Ae}},l.createElement("div",{className:"".concat(se,"-content"),ref:function(Ae){J.contentDom=Ae},onTouchStart:Me&&pe?this.removeStartHandler:void 0,onTouchMove:Me&&pe?this.removeMoveHandler:void 0},he),Pe))}}],[{key:"getDerivedStateFromProps",value:function(W,J){var ee=J.prevProps,Z=J._self,he={prevProps:W};if(ee!==void 0){var ge=W.placement,ie=W.level;ge!==ee.placement&&(Z.contentDom=null),ie!==ee.level&&Z.getLevelDom(W)}return he}}]),B}(l.Component);E.defaultProps={switchScrollingEffect:function(){}};var _=E;function N(F){var G=j();return function(){var K=Object(s.a)(F),W;if(G){var J=Object(s.a)(this).constructor;W=Reflect.construct(K,arguments,J)}else W=K.apply(this,arguments);return Object(f.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(F){return!1}}var M=function(F){Object(R.a)(B,F);var G=N(B);function B(K){var W;Object(c.a)(this,B),W=G.call(this,K),W.onHandleClick=function(ee){var Z=W.props,he=Z.onHandleClick,ge=Z.open;if(he&&he(ee),typeof ge=="undefined"){var ie=W.state.open;W.setState({open:!ie})}},W.onClose=function(ee){var Z=W.props,he=Z.onClose,ge=Z.open;he&&he(ee),typeof ge=="undefined"&&W.setState({open:!1})};var J=typeof K.open!="undefined"?K.open:!!K.defaultOpen;return W.state={open:J},"onMaskClick"in K&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),W}return Object(S.a)(B,[{key:"render",value:function(){var W=this,J=this.props,ee=J.defaultOpen,Z=J.getContainer,he=J.wrapperClassName,ge=J.forceRender,ie=J.handler,we=Object(L.a)(J,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),me=this.state.open;if(!Z)return l.createElement("div",{className:he,ref:function(te){W.dom=te}},l.createElement(_,Object.assign({},we,{open:me,handler:ie,getContainer:function(){return W.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var oe=!!ie||ge;return l.createElement(w.a,{visible:me,forceRender:oe,getContainer:Z,wrapperClassName:he},function(se){var te=se.visible,be=se.afterClose,q=Object(L.a)(se,["visible","afterClose"]);return l.createElement(_,Object.assign({},we,q,{open:te!==void 0?te:me,afterVisibleChange:be!==void 0?be:we.afterVisibleChange,handler:ie,onClose:W.onClose,onHandleClick:W.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(W,J){var ee=J.prevProps,Z={prevProps:W};return typeof ee!="undefined"&&W.open!==ee.open&&(Z.open=W.open),Z}}]),B}(l.Component);M.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:l.createElement("div",{className:"drawer-handle"},l.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var H=M,z=Y.a=H},fyJ8:function(I,Y,k){"use strict";var L=k("rePB"),c=k("VTBJ"),S=k("Ff2n"),R=k("U8pU"),f=k("cDcd"),s=k.n(f),w=k("TSYQ"),l=k.n(w),i=k("c+Xe"),a=k("sR1s");function r(g){return g&&Object(R.a)(g)==="object"&&!Array.isArray(g)&&!f.isValidElement(g)}function u(g){return typeof g=="string"?!0:Object(i.c)(g)}function p(g,v){var n,d=g.prefixCls,h=g.className,C=g.record,T=g.index,o=g.dataIndex,P=g.render,O=g.children,y=g.component,x=y===void 0?"td":y,E=g.colSpan,_=g.rowSpan,N=g.fixLeft,j=g.fixRight,M=g.firstFixLeft,H=g.lastFixLeft,z=g.firstFixRight,F=g.lastFixRight,G=g.appendNode,B=g.additionalProps,K=B===void 0?{}:B,W=g.ellipsis,J=g.align,ee=g.rowType,Z=g.isSticky,he="".concat(d,"-cell"),ge,ie;if(O)ie=O;else{var we=Object(a.b)(C,o);if(ie=we,P){var me=P(we,C,T);r(me)?(ie=me.children,ge=me.props):ie=me}}Object(R.a)(ie)==="object"&&!Array.isArray(ie)&&!f.isValidElement(ie)&&(ie=null),W&&(H||z)&&(ie=f.createElement("span",{className:"".concat(he,"-content")},ie));var oe=ge||{},se=oe.colSpan,te=oe.rowSpan,be=oe.style,q=oe.className,ae=Object(S.a)(oe,["colSpan","rowSpan","style","className"]),xe=se!==void 0?se:E,ne=te!==void 0?te:_;if(xe===0||ne===0)return null;var Q={},X=typeof N=="number",$=typeof j=="number";X&&(Q.position="sticky",Q.left=N),$&&(Q.position="sticky",Q.right=j);var pe={};J&&(pe.textAlign=J);var de,Ce=W===!0?{showTitle:!0}:W;Ce&&(Ce.showTitle||ee==="header")&&(typeof ie=="string"||typeof ie=="number"?de=ie.toString():f.isValidElement(ie)&&typeof ie.props.children=="string"&&(de=ie.props.children));var ze=Object(c.a)(Object(c.a)(Object(c.a)({title:de},ae),K),{},{colSpan:xe&&xe!==1?xe:null,rowSpan:ne&&ne!==1?ne:null,className:l()(he,h,(n={},Object(L.a)(n,"".concat(he,"-fix-left"),X),Object(L.a)(n,"".concat(he,"-fix-left-first"),M),Object(L.a)(n,"".concat(he,"-fix-left-last"),H),Object(L.a)(n,"".concat(he,"-fix-right"),$),Object(L.a)(n,"".concat(he,"-fix-right-first"),z),Object(L.a)(n,"".concat(he,"-fix-right-last"),F),Object(L.a)(n,"".concat(he,"-ellipsis"),W),Object(L.a)(n,"".concat(he,"-with-append"),G),Object(L.a)(n,"".concat(he,"-fix-sticky"),(X||$)&&Z),n),K.className,q),style:Object(c.a)(Object(c.a)(Object(c.a)(Object(c.a)({},K.style),pe),Q),be),ref:u(x)?v:null});return f.createElement(x,Object.assign({},ze),G,ie)}var m=f.forwardRef(p);m.displayName="Cell";var b=f.memo(m,function(g,v){return v.shouldCellUpdate?!v.shouldCellUpdate(v.record,g.record):!1});Y.a=b},gRFJ:function(I,Y,k){I.exports=[k("rdUC"),k("ynwM"),k("RELg"),k("DlR+"),k("CrYA"),k("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(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(Y){var k=meta[Y];return typeof k=="string"?k:"\\u"+("0000"+Y.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+I+'"'}function str(I,Y){var k,L,c,S,R=gap,f,s=Y[I];s&&typeof s=="object"&&typeof s.toJSON=="function"&&(s=s.toJSON(I)),typeof rep=="function"&&(s=rep.call(Y,I,s));switch(typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,f=[],Object.prototype.toString.apply(s)==="[object Array]"){for(S=s.length,k=0;k<S;k+=1)f[k]=str(k,s)||"null";return c=f.length===0?"[]":gap?`[
`+gap+f.join(`,
`+gap)+`
`+R+"]":"["+f.join(",")+"]",gap=R,c}if(rep&&typeof rep=="object")for(S=rep.length,k=0;k<S;k+=1)typeof rep[k]=="string"&&(L=rep[k],c=str(L,s),c&&f.push(quote(L)+(gap?": ":":")+c));else for(L in s)Object.prototype.hasOwnProperty.call(s,L)&&(c=str(L,s),c&&f.push(quote(L)+(gap?": ":":")+c));return c=f.length===0?"{}":gap?`{
`+gap+f.join(`,
`+gap)+`
`+R+"}":"{"+f.join(",")+"}",gap=R,c}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(I,Y,k){var L;if(gap="",indent="",typeof k=="number")for(L=0;L<k;L+=1)indent+=" ";else typeof k=="string"&&(indent=k);if(rep=Y,Y&&typeof Y!="function"&&(typeof Y!="object"||typeof Y.length!="number"))throw new Error("JSON.stringify");return str("",{"":I})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(I,Y){var k,L,c=I[Y];if(c&&typeof c=="object")for(k in c)Object.prototype.hasOwnProperty.call(c,k)&&(L=walk(c,k),L!==void 0?c[k]=L:delete c[k]);return reviver.call(I,Y,c)}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,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.ECB=function(){var c=L.lib.BlockCipherMode.extend();return c.Encryptor=c.extend({processBlock:function(S,R){this._cipher.encryptBlock(S,R)}}),c.Decryptor=c.extend({processBlock:function(S,R){this._cipher.decryptBlock(S,R)}}),c}(),L.mode.ECB})},h78n:function(I,Y,k){"use strict";k.d(Y,"a",function(){return M});var L=k("cDcd"),c=k.n(L),S=k("TSYQ"),R=k.n(S),f={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},s=function(F){var G=F.map(function(){return Object(L.useRef)()}),B=Object(L.useRef)();return Object(L.useEffect)(function(){var K=Date.now(),W=!1;Object.keys(G).forEach(function(J){var ee=G[J].current;if(!ee)return;W=!0;var Z=ee.style;Z.transitionDuration=".3s, .3s, .3s, .06s",B.current&&K-B.current<100&&(Z.transitionDuration="0s, 0s")}),W&&(B.current=Date.now())}),[G]};function w(){return w=Object.assign||function(z){for(var F=1;F<arguments.length;F++){var G=arguments[F];for(var B in G)Object.prototype.hasOwnProperty.call(G,B)&&(z[B]=G[B])}return z},w.apply(this,arguments)}function l(z,F){return p(z)||u(z,F)||a(z,F)||i()}function i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(z,F){if(!z)return;if(typeof z=="string")return r(z,F);var G=Object.prototype.toString.call(z).slice(8,-1);if(G==="Object"&&z.constructor&&(G=z.constructor.name),G==="Map"||G==="Set")return Array.from(z);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return r(z,F)}function r(z,F){(F==null||F>z.length)&&(F=z.length);for(var G=0,B=new Array(F);G<F;G++)B[G]=z[G];return B}function u(z,F){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var G=[],B=!0,K=!1,W=void 0;try{for(var J=z[Symbol.iterator](),ee;!(B=(ee=J.next()).done)&&!(G.push(ee.value),F&&G.length===F);B=!0);}catch(Z){K=!0,W=Z}finally{try{!B&&J.return!=null&&J.return()}finally{if(K)throw W}}return G}function p(z){if(Array.isArray(z))return z}function m(z,F){if(z==null)return{};var G=b(z,F),B,K;if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(z);for(K=0;K<W.length;K++){if(B=W[K],F.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,B))continue;G[B]=z[B]}}return G}function b(z,F){if(z==null)return{};var G={},B=Object.keys(z),K,W;for(W=0;W<B.length;W++){if(K=B[W],F.indexOf(K)>=0)continue;G[K]=z[K]}return G}var g=function(F){var G=F.className,B=F.percent,K=F.prefixCls,W=F.strokeColor,J=F.strokeLinecap,ee=F.strokeWidth,Z=F.style,he=F.trailColor,ge=F.trailWidth,ie=F.transition,we=m(F,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete we.gapPosition;var me=Array.isArray(B)?B:[B],oe=Array.isArray(W)?W:[W],se=s(me),te=l(se,1),be=te[0],q=ee/2,ae=100-ee/2,xe="M ".concat(J==="round"?q:0,",").concat(q,`
L `).concat(J==="round"?ae:100,",").concat(q),ne="0 0 100 ".concat(ee),Q=0;return c.a.createElement("svg",w({className:R()("".concat(K,"-line"),G),viewBox:ne,preserveAspectRatio:"none",style:Z},we),c.a.createElement("path",{className:"".concat(K,"-line-trail"),d:xe,strokeLinecap:J,stroke:he,strokeWidth:ge||ee,fillOpacity:"0"}),me.map(function(X,$){var pe={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(Q,"px"),transition:ie||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},de=oe[$]||oe[oe.length-1];return Q+=X,c.a.createElement("path",{key:$,className:"".concat(K,"-line-path"),d:xe,strokeLinecap:J,stroke:de,strokeWidth:ee,fillOpacity:"0",ref:be[$],style:pe})}))};g.defaultProps=f;var v=g;function n(){return n=Object.assign||function(z){for(var F=1;F<arguments.length;F++){var G=arguments[F];for(var B in G)Object.prototype.hasOwnProperty.call(G,B)&&(z[B]=G[B])}return z},n.apply(this,arguments)}function d(z,F){return P(z)||o(z,F)||C(z,F)||h()}function h(){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 C(z,F){if(!z)return;if(typeof z=="string")return T(z,F);var G=Object.prototype.toString.call(z).slice(8,-1);if(G==="Object"&&z.constructor&&(G=z.constructor.name),G==="Map"||G==="Set")return Array.from(z);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return T(z,F)}function T(z,F){(F==null||F>z.length)&&(F=z.length);for(var G=0,B=new Array(F);G<F;G++)B[G]=z[G];return B}function o(z,F){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var G=[],B=!0,K=!1,W=void 0;try{for(var J=z[Symbol.iterator](),ee;!(B=(ee=J.next()).done)&&!(G.push(ee.value),F&&G.length===F);B=!0);}catch(Z){K=!0,W=Z}finally{try{!B&&J.return!=null&&J.return()}finally{if(K)throw W}}return G}function P(z){if(Array.isArray(z))return z}function O(z,F){if(z==null)return{};var G=y(z,F),B,K;if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(z);for(K=0;K<W.length;K++){if(B=W[K],F.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,B))continue;G[B]=z[B]}}return G}function y(z,F){if(z==null)return{};var G={},B=Object.keys(z),K,W;for(W=0;W<B.length;W++){if(K=B[W],F.indexOf(K)>=0)continue;G[K]=z[K]}return G}var x=0;function E(z){return+z.replace("%","")}function _(z){return Array.isArray(z)?z:[z]}function N(z,F,G,B){var K=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,W=arguments.length>5?arguments[5]:void 0,J=50-B/2,ee=0,Z=-J,he=0,ge=-2*J;switch(W){case"left":ee=-J,Z=0,he=2*J,ge=0;break;case"right":ee=J,Z=0,he=-2*J,ge=0;break;case"bottom":Z=J,ge=2*J;break;default:}var ie="M 50,50 m ".concat(ee,",").concat(Z,`
a `).concat(J,",").concat(J," 0 1 1 ").concat(he,",").concat(-ge,`
a `).concat(J,",").concat(J," 0 1 1 ").concat(-he,",").concat(ge),we=Math.PI*2*J,me={stroke:G,strokeDasharray:"".concat(F/100*(we-K),"px ").concat(we,"px"),strokeDashoffset:"-".concat(K/2+z/100*(we-K),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ie,pathStyle:me}}var j=function(F){var G=F.prefixCls,B=F.strokeWidth,K=F.trailWidth,W=F.gapDegree,J=F.gapPosition,ee=F.trailColor,Z=F.strokeLinecap,he=F.style,ge=F.className,ie=F.strokeColor,we=F.percent,me=O(F,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),oe=Object(L.useMemo)(function(){return x+=1,x},[]),se=N(0,100,ee,B,W,J),te=se.pathString,be=se.pathStyle,q=_(we),ae=_(ie),xe=ae.find(function(pe){return Object.prototype.toString.call(pe)==="[object Object]"}),ne=s(q),Q=d(ne,1),X=Q[0],$=function(){var de=0;return q.map(function(Ce,ze){var qe=ae[ze]||ae[ae.length-1],Ye=Object.prototype.toString.call(qe)==="[object Object]"?"url(#".concat(G,"-gradient-").concat(oe,")"):"",Ve=N(de,Ce,qe,B,W,J);return de+=Ce,c.a.createElement("path",{key:ze,className:"".concat(G,"-circle-path"),d:Ve.pathString,stroke:Ye,strokeLinecap:Z,strokeWidth:B,opacity:Ce===0?0:1,fillOpacity:"0",style:Ve.pathStyle,ref:X[ze]})})};return c.a.createElement("svg",n({className:R()("".concat(G,"-circle"),ge),viewBox:"0 0 100 100",style:he},me),xe&&c.a.createElement("defs",null,c.a.createElement("linearGradient",{id:"".concat(G,"-gradient-").concat(oe),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(xe).sort(function(pe,de){return E(pe)-E(de)}).map(function(pe,de){return c.a.createElement("stop",{key:de,offset:pe,stopColor:xe[pe]})}))),c.a.createElement("path",{className:"".concat(G,"-circle-trail"),d:te,stroke:ee,strokeLinecap:Z,strokeWidth:K||B,fillOpacity:"0",style:be}),$().reverse())};j.defaultProps=f;var M=j,H={Line:v,Circle:M}},hW8S:function(I,Y,k){"use strict";k.d(Y,"a",function(){return R}),k.d(Y,"c",function(){return f}),k.d(Y,"b",function(){return s});var L=k("VTBJ"),c=k("Ff2n"),S=k("Kwbf"),R="RC_TABLE_INTERNAL_COL_DEFINE";function f(w){var l=w.expandable,i=Object(c.a)(w,["expandable"]);return"expandable"in w?Object(L.a)(Object(L.a)({},i),l):i}function s(w){return Object.keys(w).reduce(function(l,i){return(i.substr(0,5)==="data-"||i.substr(0,5)==="aria-")&&(l[i]=w[i]),l},{})}},i3hx:function(I,Y,k){},jO9C:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.Iso97971={pad:function(c,S){c.concat(L.lib.WordArray.create([2147483648],1)),L.pad.ZeroPadding.pad(c,S)},unpad:function(c){L.pad.ZeroPadding.unpad(c),c.sigBytes--}},L.pad.Iso97971})},je13:function(I,Y,k){var L=k("5nXd"),c=k("gRFJ"),S=[k("uQRt")];I.exports=L.createStore(c,S)},k3GJ:function(I,Y,k){"use strict";k.d(Y,"a",function(){return pn});var L=k("rePB"),c=k("ODXe"),S=k("Ff2n"),R=k("VTBJ"),f=k("cDcd"),s=k("TSYQ"),w=k.n(s),l=k("Zm9Q"),i=k("6cGi"),a=k("KQm4"),r=k("xEkU"),u=k.n(r),p=k("t23M");function m(Re){var Be=Object(f.useRef)(),Ke=Object(f.useRef)(!1);function Le(){for(var fe=arguments.length,Oe=new Array(fe),ye=0;ye<fe;ye++)Oe[ye]=arguments[ye];Ke.current||(u.a.cancel(Be.current),Be.current=u()(function(){Re.apply(void 0,Oe)}))}return Object(f.useEffect)(function(){return function(){Ke.current=!0,u.a.cancel(Be.current)}},[]),Le}function b(Re){var Be=Object(f.useRef)([]),Ke=Object(f.useState)({}),Le=Object(c.a)(Ke,2),fe=Le[1],Oe=Object(f.useRef)(typeof Re=="function"?Re():Re),ye=m(function(){var Ne=Oe.current;Be.current.forEach(function(He){Ne=He(Ne)}),Be.current=[],Oe.current=Ne,fe({})});function ke(Ne){Be.current.push(Ne),ye()}return[Oe.current,ke]}var g=k("4IlW");function v(Re,Be){var Ke,Le=Re.prefixCls,fe=Re.id,Oe=Re.active,ye=Re.rtl,ke=Re.tab,Ne=ke.key,He=ke.tab,We=ke.disabled,Qe=ke.closeIcon,ot=Re.tabBarGutter,pt=Re.tabPosition,ht=Re.closable,xt=Re.renderWrapper,Wt=Re.removeAriaLabel,ar=Re.editable,or=Re.onClick,ur=Re.onRemove,vr=Re.onFocus,pr="".concat(Le,"-tab");f.useEffect(function(){return ur},[]);var cr={};pt==="top"||pt==="bottom"?cr[ye?"marginLeft":"marginRight"]=ot:cr.marginBottom=ot;var Ar=ar&&ht!==!1&&!We;function wr(Vt){if(We)return;or(Vt)}function mn(Vt){Vt.preventDefault(),Vt.stopPropagation(),ar.onEdit("remove",{key:Ne,event:Vt})}var Tr=f.createElement("div",{key:Ne,ref:Be,className:w()(pr,(Ke={},Object(L.a)(Ke,"".concat(pr,"-with-remove"),Ar),Object(L.a)(Ke,"".concat(pr,"-active"),Oe),Object(L.a)(Ke,"".concat(pr,"-disabled"),We),Ke)),style:cr,onClick:wr},f.createElement("div",{role:"tab","aria-selected":Oe,id:fe&&"".concat(fe,"-tab-").concat(Ne),className:"".concat(pr,"-btn"),"aria-controls":fe&&"".concat(fe,"-panel-").concat(Ne),"aria-disabled":We,tabIndex:We?null:0,onClick:function(zt){zt.stopPropagation(),wr(zt)},onKeyDown:function(zt){[g.a.SPACE,g.a.ENTER].includes(zt.which)&&(zt.preventDefault(),wr(zt))},onFocus:vr},He),Ar&&f.createElement("button",{type:"button","aria-label":Wt||"remove",tabIndex:0,className:"".concat(pr,"-remove"),onClick:function(zt){zt.stopPropagation(),mn(zt)}},Qe||ar.removeIcon||"\xD7"));return xt&&(Tr=xt(Tr)),Tr}var n=f.forwardRef(v),d={width:0,height:0,left:0,top:0};function h(Re,Be,Ke){return Object(f.useMemo)(function(){for(var Le,fe=new Map,Oe=Be.get((Le=Re[0])===null||Le===void 0?void 0:Le.key)||d,ye=Oe.left+Oe.width,ke=0;ke<Re.length;ke+=1){var Ne=Re[ke].key,He=Be.get(Ne);if(!He){var We;He=Be.get((We=Re[ke-1])===null||We===void 0?void 0:We.key)||d}var Qe=fe.get(Ne)||Object(R.a)({},He);Qe.right=ye-Qe.left-Qe.width,fe.set(Ne,Qe)}return fe},[Re.map(function(Le){return Le.key}).join("_"),Be,Ke])}var C={width:0,height:0,left:0,top:0,right:0};function T(Re,Be,Ke,Le,fe){var Oe=fe.tabs,ye=fe.tabPosition,ke=fe.rtl,Ne,He,We;["top","bottom"].includes(ye)?(Ne="width",He=ke?"right":"left",We=Math.abs(Be.left)):(Ne="height",He="top",We=-Be.top);var Qe=Be[Ne],ot=Ke[Ne],pt=Le[Ne],ht=Qe;return ot+pt>Qe&&(ht=Qe-pt),Object(f.useMemo)(function(){if(!Oe.length)return[0,0];for(var xt=Oe.length,Wt=xt,ar=0;ar<xt;ar+=1){var or=Re.get(Oe[ar].key)||C;if(or[He]+or[Ne]>We+ht){Wt=ar-1;break}}for(var ur=0,vr=xt-1;vr>=0;vr-=1){var pr=Re.get(Oe[vr].key)||C;if(pr[He]<We){ur=vr+1;break}}return[ur,Wt]},[Re,We,ht,ye,Oe.map(function(xt){return xt.key}).join("_"),ke])}var o=k("wx14"),P=k("1OyB"),O=k("vuIU"),y=k("JX7q"),x=k("Ji7U"),E=k("LK+K"),_=k("I8Z2"),N=k("bT9E"),j=k("2GS6"),M=k("Gytx"),H=k.n(M),z=k("U8pU"),F=/iPhone/i,G=/iPod/i,B=/iPad/i,K=/\bAndroid(?:.+)Mobile\b/i,W=/Android/i,J=/\bAndroid(?:.+)SD4930UR\b/i,ee=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,Z=/Windows Phone/i,he=/\bWindows(?:.+)ARM\b/i,ge=/BlackBerry/i,ie=/BB10/i,we=/Opera Mini/i,me=/\b(CriOS|Chrome)(?:.+)Mobile/i,oe=/Mobile(?:.+)Firefox\b/i;function se(Re,Be){return Re.test(Be)}function te(Re){var Be=Re||(typeof navigator!="undefined"?navigator.userAgent:""),Ke=(Be||"").split("[FBAN");if(typeof Ke[1]!="undefined"){var Le=Ke,fe=Object(c.a)(Le,1);Be=fe[0]}if(Ke=Be.split("Twitter"),typeof Ke[1]!="undefined"){var Oe=Ke,ye=Object(c.a)(Oe,1);Be=ye[0]}var ke={apple:{phone:se(F,Be)&&!se(Z,Be),ipod:se(G,Be),tablet:!se(F,Be)&&se(B,Be)&&!se(Z,Be),device:(se(F,Be)||se(G,Be)||se(B,Be))&&!se(Z,Be)},amazon:{phone:se(J,Be),tablet:!se(J,Be)&&se(ee,Be),device:se(J,Be)||se(ee,Be)},android:{phone:!se(Z,Be)&&se(J,Be)||!se(Z,Be)&&se(K,Be),tablet:!se(Z,Be)&&!se(J,Be)&&!se(K,Be)&&(se(ee,Be)||se(W,Be)),device:!se(Z,Be)&&(se(J,Be)||se(ee,Be)||se(K,Be)||se(W,Be))||se(/\bokhttp\b/i,Be)},windows:{phone:se(Z,Be),tablet:se(he,Be),device:se(Z,Be)||se(he,Be)},other:{blackberry:se(ge,Be),blackberry10:se(ie,Be),opera:se(we,Be),firefox:se(oe,Be),chrome:se(me,Be),device:se(ge,Be)||se(ie,Be)||se(we,Be)||se(oe,Be)||se(me,Be)},any:null,phone:null,tablet:null};return ke.any=ke.apple.device||ke.android.device||ke.windows.device||ke.other.device,ke.phone=ke.apple.phone||ke.android.phone||ke.windows.phone,ke.tablet=ke.apple.tablet||ke.android.tablet||ke.windows.tablet,ke}var be=Object(R.a)(Object(R.a)({},te()),{},{isMobile:te}),q=be;function ae(){}function xe(Re,Be,Ke){var Le=Be||"";return Re.key||"".concat(Le,"item_").concat(Ke)}function ne(Re){return"".concat(Re,"-menu-")}function Q(Re,Be){var Ke=-1;f.Children.forEach(Re,function(Le){Ke+=1,Le&&Le.type&&Le.type.isMenuItemGroup?f.Children.forEach(Le.props.children,function(fe){Ke+=1,Be(fe,Ke)}):Be(Le,Ke)})}function X(Re,Be,Ke){if(!Re||Ke.find)return;f.Children.forEach(Re,function(Le){if(Le){var fe=Le.type;if(!fe||!(fe.isSubMenu||fe.isMenuItem||fe.isMenuItemGroup))return;Be.indexOf(Le.key)!==-1?Ke.find=!0:Le.props.children&&X(Le.props.children,Be,Ke)}})}var $=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],pe=function(Be){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Le=Be&&typeof Be.getBoundingClientRect=="function"&&Be.getBoundingClientRect().width;if(Le){if(Ke){var fe=getComputedStyle(Be),Oe=fe.marginLeft,ye=fe.marginRight;Le+=+Oe.replace("px","")+ +ye.replace("px","")}Le=+Le.toFixed(6)}return Le||0},de=function(Be,Ke,Le){Be&&Object(z.a)(Be.style)==="object"&&(Be.style[Ke]=Le)},Ce=function(){return q.any},ze=k("bdgK"),qe=k("faye"),Ye=k.n(qe),Ve=k("wgJM"),et=k("l4aY"),rt=k("m+aA"),Me=k("c+Xe"),Se=k("zT1h"),Ge=k("QC+M");function tt(Re,Be,Ke){return Ke?Re[0]===Be[0]:Re[0]===Be[0]&&Re[1]===Be[1]}function Ue(Re,Be,Ke){var Le=Re[Be]||{};return Object(R.a)(Object(R.a)({},Le),Ke)}function Xe(Re,Be,Ke,Le){for(var fe=Ke.points,Oe=Object.keys(Re),ye=0;ye<Oe.length;ye+=1){var ke=Oe[ye];if(tt(Re[ke].points,fe,Le))return"".concat(Be,"-placement-").concat(ke)}return""}var Pe=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Re=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Re)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Re==null?void 0:Re.substr(0,4)))},Te=k("MNnm");function Ae(Re,Be){var Ke={};return Ke[Re.toLowerCase()]=Be.toLowerCase(),Ke["Webkit".concat(Re)]="webkit".concat(Be),Ke["Moz".concat(Re)]="moz".concat(Be),Ke["ms".concat(Re)]="MS".concat(Be),Ke["O".concat(Re)]="o".concat(Be.toLowerCase()),Ke}function ce(Re,Be){var Ke={animationend:Ae("Animation","AnimationEnd"),transitionend:Ae("Transition","TransitionEnd")};return Re&&("AnimationEvent"in Be||delete Ke.animationend.animation,"TransitionEvent"in Be||delete Ke.transitionend.transition),Ke}var Ee=ce(Object(Te.a)(),typeof window!="undefined"?window:{}),_e={};if(Object(Te.a)()){var De=document.createElement("div");_e=De.style}var je={};function $e(Re){if(je[Re])return je[Re];var Be=Ee[Re];if(Be)for(var Ke=Object.keys(Be),Le=Ke.length,fe=0;fe<Le;fe+=1){var Oe=Ke[fe];if(Object.prototype.hasOwnProperty.call(Be,Oe)&&Oe in _e)return je[Re]=Be[Oe],je[Re]}return""}var at=$e("animationend"),it=$e("transitionend"),st=!!(at&&it),Je=at||"animationend",gt=it||"transitionend";function yt(Re,Be){if(!Re)return null;if(Object(z.a)(Re)==="object"){var Ke=Be.replace(/-\w/g,function(Le){return Le[1].toUpperCase()});return Re[Ke]}return"".concat(Re,"-").concat(Be)}var ct="none",Lt="appear",kt="enter",Ct="leave",Ft="none",Et="prepare",ir="start",Yt="active",It="end";function Ht(Re){var Be=Object(f.useRef)(!1),Ke=Object(f.useState)(Re),Le=Object(c.a)(Ke,2),fe=Le[0],Oe=Le[1];function ye(ke){Be.current||Oe(ke)}return Object(f.useEffect)(function(){return function(){Be.current=!0}},[]),[fe,ye]}var Ur=Object(Te.a)()?f.useLayoutEffect:f.useEffect,cn=Ur,gr=function(){var Re=f.useRef(null);function Be(){Ve.a.cancel(Re.current)}function Ke(Le){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Be();var Oe=Object(Ve.a)(function(){fe<=1?Le({isCanceled:function(){return Oe!==Re.current}}):Ke(Le,fe-1)});Re.current=Oe}return f.useEffect(function(){return function(){Be()}},[]),[Ke,Be]},zn=[Et,ir,Yt,It],vt=!1,_t=!0;function mt(Re){return Re===Yt||Re===It}var mr=function(Re,Be){var Ke=f.useState(Ft),Le=Object(c.a)(Ke,2),fe=Le[0],Oe=Le[1],ye=gr(),ke=Object(c.a)(ye,2),Ne=ke[0],He=ke[1];function We(){Oe(Et)}return cn(function(){if(fe!==Ft&&fe!==It){var Qe=zn.indexOf(fe),ot=zn[Qe+1],pt=Be(fe);pt===vt?Oe(ot):Ne(function(ht){function xt(){if(ht.isCanceled())return;Oe(ot)}pt===!0?xt():Promise.resolve(pt).then(xt)})}},[Re,fe]),f.useEffect(function(){return function(){He()}},[]),[We,fe]},Cr=function(Re){var Be=Object(f.useRef)(),Ke=Object(f.useRef)(Re);Ke.current=Re;var Le=f.useCallback(function(ye){Ke.current(ye)},[]);function fe(ye){ye&&(ye.removeEventListener(gt,Le),ye.removeEventListener(Je,Le))}function Oe(ye){Be.current&&Be.current!==ye&&fe(Be.current),ye&&ye!==Be.current&&(ye.addEventListener(gt,Le),ye.addEventListener(Je,Le),Be.current=ye)}return f.useEffect(function(){return function(){fe(Be.current)}},[]),[Oe,fe]};function Bt(Re,Be,Ke,Le){var fe=Le.motionEnter,Oe=fe===void 0?!0:fe,ye=Le.motionAppear,ke=ye===void 0?!0:ye,Ne=Le.motionLeave,He=Ne===void 0?!0:Ne,We=Le.motionDeadline,Qe=Le.motionLeaveImmediately,ot=Le.onAppearPrepare,pt=Le.onEnterPrepare,ht=Le.onLeavePrepare,xt=Le.onAppearStart,Wt=Le.onEnterStart,ar=Le.onLeaveStart,or=Le.onAppearActive,ur=Le.onEnterActive,vr=Le.onLeaveActive,pr=Le.onAppearEnd,cr=Le.onEnterEnd,Ar=Le.onLeaveEnd,wr=Le.onVisibleChanged,mn=Ht(),Tr=Object(c.a)(mn,2),Vt=Tr[0],zt=Tr[1],Sr=Ht(ct),Rr=Object(c.a)(Sr,2),jt=Rr[0],Mr=Rr[1],vn=Ht(null),jr=Object(c.a)(vn,2),Zr=jr[0],Vr=jr[1],Dn=Object(f.useRef)(!1),Vn=Object(f.useRef)(null),xn=Object(f.useRef)(!1),ma=Object(f.useRef)(null);function ka(){var nn=Ke();return nn||ma.current}var ba=Object(f.useRef)(!1);function Yn(nn){var Xr=ka();if(nn&&!nn.deadline&&nn.target!==Xr)return;var $n;jt===Lt&&ba.current?$n=pr==null?void 0:pr(Xr,nn):jt===kt&&ba.current?$n=cr==null?void 0:cr(Xr,nn):jt===Ct&&ba.current&&($n=Ar==null?void 0:Ar(Xr,nn)),$n!==!1&&!xn.current&&(Mr(ct),Vr(null))}var ln=Cr(Yn),qr=Object(c.a)(ln,1),wn=qr[0],gn=f.useMemo(function(){var nn,Xr,$n;switch(jt){case"appear":return nn={},Object(L.a)(nn,Et,ot),Object(L.a)(nn,ir,xt),Object(L.a)(nn,Yt,or),nn;case"enter":return Xr={},Object(L.a)(Xr,Et,pt),Object(L.a)(Xr,ir,Wt),Object(L.a)(Xr,Yt,ur),Xr;case"leave":return $n={},Object(L.a)($n,Et,ht),Object(L.a)($n,ir,ar),Object(L.a)($n,Yt,vr),$n;default:return{}}},[jt]),Ia=mr(jt,function(nn){if(nn===Et){var Xr=gn[Et];return Xr?Xr(ka()):vt}if(Yr in gn){var $n;Vr((($n=gn[Yr])===null||$n===void 0?void 0:$n.call(gn,ka(),null))||null)}return Yr===Yt&&(wn(ka()),We>0&&(clearTimeout(Vn.current),Vn.current=setTimeout(function(){Yn({deadline:!0})},We))),_t}),ri=Object(c.a)(Ia,2),ni=ri[0],Yr=ri[1],za=mt(Yr);ba.current=za,cn(function(){zt(Be);var nn=Dn.current;if(Dn.current=!0,!Re)return;var Xr;!nn&&Be&&ke&&(Xr=Lt),nn&&Be&&Oe&&(Xr=kt),(nn&&!Be&&He||!nn&&Qe&&!Be&&He)&&(Xr=Ct),Xr&&(Mr(Xr),ni())},[Be]),Object(f.useEffect)(function(){(jt===Lt&&!ke||jt===kt&&!Oe||jt===Ct&&!He)&&Mr(ct)},[ke,Oe,He]),Object(f.useEffect)(function(){return function(){clearTimeout(Vn.current),xn.current=!0}},[]),Object(f.useEffect)(function(){Vt!==void 0&&jt===ct&&(wr==null||wr(Vt))},[Vt,jt]);var ai=Zr;return gn[Et]&&Yr===ir&&(ai=Object(R.a)({transition:"none"},ai)),[jt,Yr,ai,Vt!=null?Vt:Be]}var Rt=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){return Object(P.a)(this,Ke),Be.apply(this,arguments)}return Object(O.a)(Ke,[{key:"render",value:function(){return this.props.children}}]),Ke}(f.Component),Er=Rt;function yn(Re){var Be=Re;Object(z.a)(Re)==="object"&&(Be=Re.transitionSupport);function Ke(fe){return!!(fe.motionName&&Be)}var Le=f.forwardRef(function(fe,Oe){var ye=fe.visible,ke=ye===void 0?!0:ye,Ne=fe.removeOnLeave,He=Ne===void 0?!0:Ne,We=fe.forceRender,Qe=fe.children,ot=fe.motionName,pt=fe.leavedClassName,ht=fe.eventProps,xt=Ke(fe),Wt=Object(f.useRef)(),ar=Object(f.useRef)();function or(){try{return Object(rt.a)(Wt.current||ar.current)}catch(Mr){return null}}var ur=Bt(xt,ke,or,fe),vr=Object(c.a)(ur,4),pr=vr[0],cr=vr[1],Ar=vr[2],wr=vr[3],mn=f.useRef(wr);wr&&(mn.current=!0);var Tr=Object(f.useRef)(Oe);Tr.current=Oe;var Vt=f.useCallback(function(Mr){Wt.current=Mr,Object(Me.b)(Tr.current,Mr)},[]),zt,Sr=Object(R.a)(Object(R.a)({},ht),{},{visible:ke});if(!Qe)zt=null;else if(pr===ct||!Ke(fe))wr?zt=Qe(Object(R.a)({},Sr),Vt):!He&&mn.current?zt=Qe(Object(R.a)(Object(R.a)({},Sr),{},{className:pt}),Vt):We?zt=Qe(Object(R.a)(Object(R.a)({},Sr),{},{style:{display:"none"}}),Vt):zt=null;else{var Rr,jt;cr===Et?jt="prepare":mt(cr)?jt="active":cr===ir&&(jt="start"),zt=Qe(Object(R.a)(Object(R.a)({},Sr),{},{className:w()(yt(ot,pr),(Rr={},Object(L.a)(Rr,yt(ot,"".concat(pr,"-").concat(jt)),jt),Object(L.a)(Rr,ot,typeof ot=="string"),Rr)),style:Ar}),Vt)}return f.createElement(Er,{ref:ar},zt)});return Le.displayName="CSSMotion",Le}var Ir=yn(st),ut="add",Mt="keep",Wr="remove",tn="removed";function Sn(Re){var Be;return Re&&Object(z.a)(Re)==="object"&&"key"in Re?Be=Re:Be={key:Re},Object(R.a)(Object(R.a)({},Be),{},{key:String(Be.key)})}function bn(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Re.map(Sn)}function Hr(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ke=[],Le=0,fe=Be.length,Oe=bn(Re),ye=bn(Be);Oe.forEach(function(He){for(var We=!1,Qe=Le;Qe<fe;Qe+=1){var ot=ye[Qe];if(ot.key===He.key){Le<Qe&&(Ke=Ke.concat(ye.slice(Le,Qe).map(function(pt){return Object(R.a)(Object(R.a)({},pt),{},{status:ut})})),Le=Qe),Ke.push(Object(R.a)(Object(R.a)({},ot),{},{status:Mt})),Le+=1,We=!0;break}}We||Ke.push(Object(R.a)(Object(R.a)({},He),{},{status:Wr}))}),Le<fe&&(Ke=Ke.concat(ye.slice(Le).map(function(He){return Object(R.a)(Object(R.a)({},He),{},{status:ut})})));var ke={};Ke.forEach(function(He){var We=He.key;ke[We]=(ke[We]||0)+1});var Ne=Object.keys(ke).filter(function(He){return ke[He]>1});return Ne.forEach(function(He){Ke=Ke.filter(function(We){var Qe=We.key,ot=We.status;return Qe!==He||ot!==Wr}),Ke.forEach(function(We){We.key===He&&(We.status=Mt)})}),Ke}var Ot=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function dn(Re){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ir,Ke=function(Le){Object(x.a)(Oe,Le);var fe=Object(E.a)(Oe);function Oe(){var ye;return Object(P.a)(this,Oe),ye=fe.apply(this,arguments),ye.state={keyEntities:[]},ye.removeKey=function(ke){ye.setState(function(Ne){var He=Ne.keyEntities;return{keyEntities:He.map(function(We){return We.key!==ke?We:Object(R.a)(Object(R.a)({},We),{},{status:tn})})}})},ye}return Object(O.a)(Oe,[{key:"render",value:function(){var ke=this,Ne=this.state.keyEntities,He=this.props,We=He.component,Qe=He.children,ot=He.onVisibleChanged,pt=Object(S.a)(He,["component","children","onVisibleChanged"]),ht=We||f.Fragment,xt={};return Ot.forEach(function(Wt){xt[Wt]=pt[Wt],delete pt[Wt]}),delete pt.keys,f.createElement(ht,pt,Ne.map(function(Wt){var ar=Wt.status,or=Object(S.a)(Wt,["status"]),ur=ar===ut||ar===Mt;return f.createElement(Be,Object(o.a)({},xt,{key:or.key,visible:ur,eventProps:or,onVisibleChanged:function(pr){ot==null||ot(pr,{key:or.key}),pr||ke.removeKey(or.key)}}),Qe)}))}}],[{key:"getDerivedStateFromProps",value:function(ke,Ne){var He=ke.keys,We=Ne.keyEntities,Qe=bn(He),ot=Hr(We,Qe);return{keyEntities:ot.filter(function(pt){var ht=We.find(function(xt){var Wt=xt.key;return pt.key===Wt});return!(ht&&ht.status===tn&&pt.status===Wr)})}}}]),Oe}(f.Component);return Ke.defaultProps={component:"div"},Ke}var Kr=dn(st),Or=Ir;function sr(Re){var Be=Re.prefixCls,Ke=Re.motion,Le=Re.animation,fe=Re.transitionName;return Ke||(Le?{motionName:"".concat(Be,"-").concat(Le)}:fe?{motionName:fe}:null)}function ta(Re){var Be=Re.prefixCls,Ke=Re.visible,Le=Re.zIndex,fe=Re.mask,Oe=Re.maskMotion,ye=Re.maskAnimation,ke=Re.maskTransitionName;if(!fe)return null;var Ne={};return(Oe||ke||ye)&&(Ne=Object(R.a)({motionAppear:!0},sr({motion:Oe,prefixCls:Be,transitionName:ke,animation:ye}))),f.createElement(Or,Object(o.a)({},Ne,{visible:Ke,removeOnLeave:!0}),function(He){var We=He.className;return f.createElement("div",{style:{zIndex:Le},className:w()("".concat(Be,"-mask"),We)})})}var Ln=k("9mu1"),ft=k("o0o1"),ca=k.n(ft),ra=k("HaE+"),An=["measure","align",null,"motion"],Lr=function(Re,Be){var Ke=Object(f.useState)(null),Le=Object(c.a)(Ke,2),fe=Le[0],Oe=Le[1],ye=Object(f.useRef)(),ke=Object(f.useRef)(!1);function Ne(Qe){ke.current||Oe(Qe)}function He(){Ve.a.cancel(ye.current)}function We(Qe){He(),ye.current=Object(Ve.a)(function(){Ne(function(ot){switch(fe){case"align":return"motion";case"motion":return"stable";default:}return ot}),Qe==null||Qe()})}return Object(f.useEffect)(function(){Ne("measure")},[Re]),Object(f.useEffect)(function(){switch(fe){case"measure":Be();break;default:}fe&&(ye.current=Object(Ve.a)(Object(ra.a)(ca.a.mark(function Qe(){var ot,pt;return ca.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:ot=An.indexOf(fe),pt=An[ot+1],pt&&ot!==-1&&Ne(pt);case 3:case"end":return xt.stop()}},Qe)}))))},[fe]),Object(f.useEffect)(function(){return function(){ke.current=!0,He()}},[]),[fe,We]},Fn=function(Re){var Be=f.useState({width:0,height:0}),Ke=Object(c.a)(Be,2),Le=Ke[0],fe=Ke[1];function Oe(ke){fe({width:ke.offsetWidth,height:ke.offsetHeight})}var ye=f.useMemo(function(){var ke={};if(Re){var Ne=Le.width,He=Le.height;Re.indexOf("height")!==-1&&He?ke.height=He:Re.indexOf("minHeight")!==-1&&He&&(ke.minHeight=He),Re.indexOf("width")!==-1&&Ne?ke.width=Ne:Re.indexOf("minWidth")!==-1&&Ne&&(ke.minWidth=Ne)}return ke},[Re,Le]);return[ye,Oe]},En=f.forwardRef(function(Re,Be){var Ke=Re.visible,Le=Re.prefixCls,fe=Re.className,Oe=Re.style,ye=Re.children,ke=Re.zIndex,Ne=Re.stretch,He=Re.destroyPopupOnHide,We=Re.forceRender,Qe=Re.align,ot=Re.point,pt=Re.getRootDomNode,ht=Re.getClassNameFromAlign,xt=Re.onAlign,Wt=Re.onMouseEnter,ar=Re.onMouseLeave,or=Re.onMouseDown,ur=Re.onTouchStart,vr=Object(f.useRef)(),pr=Object(f.useRef)(),cr=Object(f.useState)(),Ar=Object(c.a)(cr,2),wr=Ar[0],mn=Ar[1],Tr=Fn(Ne),Vt=Object(c.a)(Tr,2),zt=Vt[0],Sr=Vt[1];function Rr(){Ne&&Sr(pt())}var jt=Lr(Ke,Rr),Mr=Object(c.a)(jt,2),vn=Mr[0],jr=Mr[1],Zr=Object(f.useRef)();function Vr(){return ot||pt}function Dn(){var ln;(ln=vr.current)===null||ln===void 0||ln.forceAlign()}function Vn(ln,qr){var wn=ht(qr);wr!==wn&&mn(wn),vn==="align"&&(wr!==wn?Promise.resolve().then(function(){Dn()}):jr(function(){var gn;(gn=Zr.current)===null||gn===void 0||gn.call(Zr)}),xt==null||xt(ln,qr))}var xn=Object(R.a)({},sr(Re));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(ln){var qr=xn[ln];xn[ln]=function(wn,gn){return jr(),qr==null?void 0:qr(wn,gn)}});function ma(){return new Promise(function(ln){Zr.current=ln})}f.useEffect(function(){!xn.motionName&&vn==="motion"&&jr()},[xn.motionName,vn]),f.useImperativeHandle(Be,function(){return{forceAlign:Dn,getElement:function(){return pr.current}}});var ka=Object(R.a)(Object(R.a)({},zt),{},{zIndex:ke,opacity:vn==="motion"||vn==="stable"||!Ke?void 0:0,pointerEvents:vn==="stable"?void 0:"none"},Oe),ba=!0;(Qe==null?void 0:Qe.points)&&(vn==="align"||vn==="stable")&&(ba=!1);var Yn=ye;return f.Children.count(ye)>1&&(Yn=f.createElement("div",{className:"".concat(Le,"-content")},ye)),f.createElement(Or,Object(o.a)({visible:Ke,ref:pr,leavedClassName:"".concat(Le,"-hidden")},xn,{onAppearPrepare:ma,onEnterPrepare:ma,removeOnLeave:He,forceRender:We}),function(ln,qr){var wn=ln.className,gn=ln.style,Ia=w()(Le,fe,wr,wn);return f.createElement(Ln.a,{target:Vr(),key:"popup",ref:vr,monitorWindowResize:!0,disabled:ba,align:Qe,onAlign:Vn},f.createElement("div",{ref:qr,className:Ia,onMouseEnter:Wt,onMouseLeave:ar,onMouseDownCapture:or,onTouchStartCapture:ur,style:Object(R.a)(Object(R.a)({},gn),ka)},Yn))})});En.displayName="PopupInner";var an=En,rr=f.forwardRef(function(Re,Be){var Ke=Re.prefixCls,Le=Re.visible,fe=Re.zIndex,Oe=Re.children,ye=Re.mobile;ye=ye===void 0?{}:ye;var ke=ye.popupClassName,Ne=ye.popupStyle,He=ye.popupMotion,We=He===void 0?{}:He,Qe=ye.popupRender,ot=f.useRef();f.useImperativeHandle(Be,function(){return{forceAlign:function(){},getElement:function(){return ot.current}}});var pt=Object(R.a)({zIndex:fe},Ne),ht=Oe;return f.Children.count(Oe)>1&&(ht=f.createElement("div",{className:"".concat(Ke,"-content")},Oe)),Qe&&(ht=Qe(ht)),f.createElement(Or,Object(o.a)({visible:Le,ref:ot,removeOnLeave:!0},We),function(xt,Wt){var ar=xt.className,or=xt.style,ur=w()(Ke,ke,ar);return f.createElement("div",{ref:Wt,className:ur,style:Object(R.a)(Object(R.a)({},or),pt)},ht)})});rr.displayName="MobilePopupInner";var $r=rr,tr=["visible","mobile"],Kt=f.forwardRef(function(Re,Be){var Ke=Re.visible,Le=Re.mobile,fe=Object(S.a)(Re,tr),Oe=Object(f.useState)(Ke),ye=Object(c.a)(Oe,2),ke=ye[0],Ne=ye[1],He=Object(f.useState)(!1),We=Object(c.a)(He,2),Qe=We[0],ot=We[1],pt=Object(R.a)(Object(R.a)({},fe),{},{visible:ke});Object(f.useEffect)(function(){Ne(Ke),Ke&&Le&&ot(Pe())},[Ke,Le]);var ht=Qe?f.createElement($r,Object(o.a)({},pt,{mobile:Le,ref:Be})):f.createElement(an,Object(o.a)({},pt,{ref:Be}));return f.createElement("div",null,f.createElement(ta,pt),ht)});Kt.displayName="Popup";var Zt=Kt,xr=f.createContext(null),Nr=xr;function Jr(){}function on(){return""}function Ma(Re){return Re?Re.ownerDocument:window.document}var ei=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ga(Re){var Be=function(Ke){Object(x.a)(fe,Ke);var Le=Object(E.a)(fe);function fe(Oe){var ye;Object(P.a)(this,fe),ye=Le.call(this,Oe),ye.popupRef=f.createRef(),ye.triggerRef=f.createRef(),ye.attachId=void 0,ye.clickOutsideHandler=void 0,ye.touchOutsideHandler=void 0,ye.contextMenuOutsideHandler1=void 0,ye.contextMenuOutsideHandler2=void 0,ye.mouseDownTimeout=void 0,ye.focusTime=void 0,ye.preClickTime=void 0,ye.preTouchTime=void 0,ye.delayTimer=void 0,ye.hasPopupMouseDown=void 0,ye.onMouseEnter=function(Ne){var He=ye.props.mouseEnterDelay;ye.fireEvents("onMouseEnter",Ne),ye.delaySetPopupVisible(!0,He,He?null:Ne)},ye.onMouseMove=function(Ne){ye.fireEvents("onMouseMove",Ne),ye.setPoint(Ne)},ye.onMouseLeave=function(Ne){ye.fireEvents("onMouseLeave",Ne),ye.delaySetPopupVisible(!1,ye.props.mouseLeaveDelay)},ye.onPopupMouseEnter=function(){ye.clearDelayTimer()},ye.onPopupMouseLeave=function(Ne){var He;if(Ne.relatedTarget&&!Ne.relatedTarget.setTimeout&&Object(et.a)((He=ye.popupRef.current)===null||He===void 0?void 0:He.getElement(),Ne.relatedTarget))return;ye.delaySetPopupVisible(!1,ye.props.mouseLeaveDelay)},ye.onFocus=function(Ne){ye.fireEvents("onFocus",Ne),ye.clearDelayTimer(),ye.isFocusToShow()&&(ye.focusTime=Date.now(),ye.delaySetPopupVisible(!0,ye.props.focusDelay))},ye.onMouseDown=function(Ne){ye.fireEvents("onMouseDown",Ne),ye.preClickTime=Date.now()},ye.onTouchStart=function(Ne){ye.fireEvents("onTouchStart",Ne),ye.preTouchTime=Date.now()},ye.onBlur=function(Ne){ye.fireEvents("onBlur",Ne),ye.clearDelayTimer(),ye.isBlurToHide()&&ye.delaySetPopupVisible(!1,ye.props.blurDelay)},ye.onContextMenu=function(Ne){Ne.preventDefault(),ye.fireEvents("onContextMenu",Ne),ye.setPopupVisible(!0,Ne)},ye.onContextMenuClose=function(){ye.isContextMenuToShow()&&ye.close()},ye.onClick=function(Ne){if(ye.fireEvents("onClick",Ne),ye.focusTime){var He;if(ye.preClickTime&&ye.preTouchTime?He=Math.min(ye.preClickTime,ye.preTouchTime):ye.preClickTime?He=ye.preClickTime:ye.preTouchTime&&(He=ye.preTouchTime),Math.abs(He-ye.focusTime)<20)return;ye.focusTime=0}ye.preClickTime=0,ye.preTouchTime=0,ye.isClickToShow()&&(ye.isClickToHide()||ye.isBlurToHide())&&Ne&&Ne.preventDefault&&Ne.preventDefault();var We=!ye.state.popupVisible;(ye.isClickToHide()&&!We||We&&ye.isClickToShow())&&ye.setPopupVisible(!ye.state.popupVisible,Ne)},ye.onPopupMouseDown=function(){if(ye.hasPopupMouseDown=!0,clearTimeout(ye.mouseDownTimeout),ye.mouseDownTimeout=window.setTimeout(function(){ye.hasPopupMouseDown=!1},0),ye.context){var Ne;(Ne=ye.context).onPopupMouseDown.apply(Ne,arguments)}},ye.onDocumentClick=function(Ne){if(ye.props.mask&&!ye.props.maskClosable)return;var He=Ne.target,We=ye.getRootDomNode(),Qe=ye.getPopupDomNode();(!Object(et.a)(We,He)||ye.isContextMenuOnly())&&!Object(et.a)(Qe,He)&&!ye.hasPopupMouseDown&&ye.close()},ye.getRootDomNode=function(){var Ne=ye.props.getTriggerDOMNode;if(Ne)return Ne(ye.triggerRef.current);try{var He=Object(rt.a)(ye.triggerRef.current);if(He)return He}catch(We){}return Ye.a.findDOMNode(Object(y.a)(ye))},ye.getPopupClassNameFromAlign=function(Ne){var He=[],We=ye.props,Qe=We.popupPlacement,ot=We.builtinPlacements,pt=We.prefixCls,ht=We.alignPoint,xt=We.getPopupClassNameFromAlign;return Qe&&ot&&He.push(Xe(ot,pt,Ne,ht)),xt&&He.push(xt(Ne)),He.join(" ")},ye.getComponent=function(){var Ne=ye.props,He=Ne.prefixCls,We=Ne.destroyPopupOnHide,Qe=Ne.popupClassName,ot=Ne.onPopupAlign,pt=Ne.popupMotion,ht=Ne.popupAnimation,xt=Ne.popupTransitionName,Wt=Ne.popupStyle,ar=Ne.mask,or=Ne.maskAnimation,ur=Ne.maskTransitionName,vr=Ne.maskMotion,pr=Ne.zIndex,cr=Ne.popup,Ar=Ne.stretch,wr=Ne.alignPoint,mn=Ne.mobile,Tr=Ne.forceRender,Vt=ye.state,zt=Vt.popupVisible,Sr=Vt.point,Rr=ye.getPopupAlign(),jt={};return ye.isMouseEnterToShow()&&(jt.onMouseEnter=ye.onPopupMouseEnter),ye.isMouseLeaveToHide()&&(jt.onMouseLeave=ye.onPopupMouseLeave),jt.onMouseDown=ye.onPopupMouseDown,jt.onTouchStart=ye.onPopupMouseDown,f.createElement(Zt,Object(o.a)({prefixCls:He,destroyPopupOnHide:We,visible:zt,point:wr&&Sr,className:Qe,align:Rr,onAlign:ot,animation:ht,getClassNameFromAlign:ye.getPopupClassNameFromAlign},jt,{stretch:Ar,getRootDomNode:ye.getRootDomNode,style:Wt,mask:ar,zIndex:pr,transitionName:xt,maskAnimation:or,maskTransitionName:ur,maskMotion:vr,ref:ye.popupRef,motion:pt,mobile:mn,forceRender:Tr}),typeof cr=="function"?cr():cr)},ye.attachParent=function(Ne){Ve.a.cancel(ye.attachId);var He=ye.props,We=He.getPopupContainer,Qe=He.getDocument,ot=ye.getRootDomNode(),pt;We?(ot||We.length===0)&&(pt=We(ot)):pt=Qe(ye.getRootDomNode()).body,pt?pt.appendChild(Ne):ye.attachId=Object(Ve.a)(function(){ye.attachParent(Ne)})},ye.getContainer=function(){var Ne=ye.props.getDocument,He=Ne(ye.getRootDomNode()).createElement("div");return He.style.position="absolute",He.style.top="0",He.style.left="0",He.style.width="100%",ye.attachParent(He),He},ye.setPoint=function(Ne){var He=ye.props.alignPoint;if(!He||!Ne)return;ye.setState({point:{pageX:Ne.pageX,pageY:Ne.pageY}})},ye.handlePortalUpdate=function(){ye.state.prevPopupVisible!==ye.state.popupVisible&&ye.props.afterPopupVisibleChange(ye.state.popupVisible)},ye.triggerContextValue={onPopupMouseDown:ye.onPopupMouseDown};var ke;return"popupVisible"in Oe?ke=!!Oe.popupVisible:ke=!!Oe.defaultPopupVisible,ye.state={prevPopupVisible:ke,popupVisible:ke},ei.forEach(function(Ne){ye["fire".concat(Ne)]=function(He){ye.fireEvents(Ne,He)}}),ye}return Object(O.a)(fe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ye=this.props,ke=this.state;if(ke.popupVisible){var Ne;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ne=ye.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Se.a)(Ne,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ne=Ne||ye.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Se.a)(Ne,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ne=Ne||ye.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Se.a)(Ne,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Se.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Ve.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ye;return((ye=this.popupRef.current)===null||ye===void 0?void 0:ye.getElement())||null}},{key:"getPopupAlign",value:function(){var ye=this.props,ke=ye.popupPlacement,Ne=ye.popupAlign,He=ye.builtinPlacements;return ke&&He?Ue(He,ke,Ne):Ne}},{key:"setPopupVisible",value:function(ye,ke){var Ne=this.props.alignPoint,He=this.state.popupVisible;this.clearDelayTimer(),He!==ye&&("popupVisible"in this.props||this.setState({popupVisible:ye,prevPopupVisible:He}),this.props.onPopupVisibleChange(ye)),Ne&&ke&&ye&&this.setPoint(ke)}},{key:"delaySetPopupVisible",value:function(ye,ke,Ne){var He=this,We=ke*1e3;if(this.clearDelayTimer(),We){var Qe=Ne?{pageX:Ne.pageX,pageY:Ne.pageY}:null;this.delayTimer=window.setTimeout(function(){He.setPopupVisible(ye,Qe),He.clearDelayTimer()},We)}else this.setPopupVisible(ye,Ne)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(ye){var ke=this.props.children.props,Ne=this.props;return ke[ye]&&Ne[ye]?this["fire".concat(ye)]:ke[ye]||Ne[ye]}},{key:"isClickToShow",value:function(){var ye=this.props,ke=ye.action,Ne=ye.showAction;return ke.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ye=this.props.action;return ye==="contextMenu"||ye.length===1&&ye[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ye=this.props,ke=ye.action,Ne=ye.showAction;return ke.indexOf("contextMenu")!==-1||Ne.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ye=this.props,ke=ye.action,Ne=ye.hideAction;return ke.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ye=this.props,ke=ye.action,Ne=ye.showAction;return ke.indexOf("hover")!==-1||Ne.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ye=this.props,ke=ye.action,Ne=ye.hideAction;return ke.indexOf("hover")!==-1||Ne.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ye=this.props,ke=ye.action,Ne=ye.showAction;return ke.indexOf("focus")!==-1||Ne.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ye=this.props,ke=ye.action,Ne=ye.hideAction;return ke.indexOf("focus")!==-1||Ne.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ye;(ye=this.popupRef.current)===null||ye===void 0||ye.forceAlign()}}},{key:"fireEvents",value:function(ye,ke){var Ne=this.props.children.props[ye];Ne&&Ne(ke);var He=this.props[ye];He&&He(ke)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ye=this.state.popupVisible,ke=this.props,Ne=ke.children,He=ke.forceRender,We=ke.alignPoint,Qe=ke.className,ot=ke.autoDestroy,pt=f.Children.only(Ne),ht={key:"trigger"};this.isContextMenuToShow()?ht.onContextMenu=this.onContextMenu:ht.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(ht.onClick=this.onClick,ht.onMouseDown=this.onMouseDown,ht.onTouchStart=this.onTouchStart):(ht.onClick=this.createTwoChains("onClick"),ht.onMouseDown=this.createTwoChains("onMouseDown"),ht.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(ht.onMouseEnter=this.onMouseEnter,We&&(ht.onMouseMove=this.onMouseMove)):ht.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?ht.onMouseLeave=this.onMouseLeave:ht.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(ht.onFocus=this.onFocus,ht.onBlur=this.onBlur):(ht.onFocus=this.createTwoChains("onFocus"),ht.onBlur=this.createTwoChains("onBlur"));var xt=w()(pt&&pt.props&&pt.props.className,Qe);xt&&(ht.className=xt);var Wt=Object(R.a)({},ht);Object(Me.c)(pt)&&(Wt.ref=Object(Me.a)(this.triggerRef,pt.ref));var ar=f.cloneElement(pt,Wt),or;return(ye||this.popupRef.current||He)&&(or=f.createElement(Re,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ye&&ot&&(or=null),f.createElement(Nr.Provider,{value:this.triggerContextValue},ar,or)}}],[{key:"getDerivedStateFromProps",value:function(ye,ke){var Ne=ye.popupVisible,He={};return Ne!==void 0&&ke.popupVisible!==Ne&&(He.popupVisible=Ne,He.prevPopupVisible=ke.popupVisible),He}}]),fe}(f.Component);return Be.contextType=Nr,Be.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:on,getDocument:Ma,onPopupVisibleChange:Jr,afterPopupVisibleChange:Jr,onPopupAlign:Jr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Be}var na=Ga(Ge.a),sn={adjustX:1,adjustY:1},Xa={topLeft:{points:["bl","tl"],overflow:sn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:sn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:sn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:sn,offset:[4,0]}},zr={topLeft:{points:["bl","tl"],overflow:sn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:sn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:sn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:sn,offset:[4,0]}},aa=Xa,Pn=0,fn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Cn=function(Be,Ke,Le){var fe=ne(Ke),Oe=Be.getState();Be.setState({defaultActiveFirst:Object(R.a)(Object(R.a)({},Oe.defaultActiveFirst),{},Object(L.a)({},fe,Le))})},Va=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(Le){var fe;Object(P.a)(this,Ke),fe=Be.call(this,Le),fe.onDestroy=function(We){fe.props.onDestroy(We)},fe.onKeyDown=function(We){var Qe=We.keyCode,ot=fe.menuInstance,pt=fe.props.store,ht=fe.getVisible();if(Qe===g.a.ENTER)return fe.onTitleClick(We),Cn(pt,fe.props.eventKey,!0),!0;if(Qe===g.a.RIGHT)return ht?ot.onKeyDown(We):(fe.triggerOpenChange(!0),Cn(pt,fe.props.eventKey,!0)),!0;if(Qe===g.a.LEFT){var xt;if(ht)xt=ot.onKeyDown(We);else return;return xt||(fe.triggerOpenChange(!1),xt=!0),xt}return ht&&(Qe===g.a.UP||Qe===g.a.DOWN)?ot.onKeyDown(We):void 0},fe.onOpenChange=function(We){fe.props.onOpenChange(We)},fe.onPopupVisibleChange=function(We){fe.triggerOpenChange(We,We?"mouseenter":"mouseleave")},fe.onMouseEnter=function(We){var Qe=fe.props,ot=Qe.eventKey,pt=Qe.onMouseEnter,ht=Qe.store;Cn(ht,fe.props.eventKey,!1),pt({key:ot,domEvent:We})},fe.onMouseLeave=function(We){var Qe=fe.props,ot=Qe.parentMenu,pt=Qe.eventKey,ht=Qe.onMouseLeave;ot.subMenuInstance=Object(y.a)(fe),ht({key:pt,domEvent:We})},fe.onTitleMouseEnter=function(We){var Qe=fe.props,ot=Qe.eventKey,pt=Qe.onItemHover,ht=Qe.onTitleMouseEnter;pt({key:ot,hover:!0}),ht({key:ot,domEvent:We})},fe.onTitleMouseLeave=function(We){var Qe=fe.props,ot=Qe.parentMenu,pt=Qe.eventKey,ht=Qe.onItemHover,xt=Qe.onTitleMouseLeave;ot.subMenuInstance=Object(y.a)(fe),ht({key:pt,hover:!1}),xt({key:pt,domEvent:We})},fe.onTitleClick=function(We){var Qe=Object(y.a)(fe),ot=Qe.props;if(ot.onTitleClick({key:ot.eventKey,domEvent:We}),ot.triggerSubMenuAction==="hover")return;fe.triggerOpenChange(!fe.getVisible(),"click"),Cn(ot.store,fe.props.eventKey,!1)},fe.onSubMenuClick=function(We){typeof fe.props.onClick=="function"&&fe.props.onClick(fe.addKeyPath(We))},fe.onSelect=function(We){fe.props.onSelect(We)},fe.onDeselect=function(We){fe.props.onDeselect(We)},fe.getPrefixCls=function(){return"".concat(fe.props.rootPrefixCls,"-submenu")},fe.getActiveClassName=function(){return"".concat(fe.getPrefixCls(),"-active")},fe.getDisabledClassName=function(){return"".concat(fe.getPrefixCls(),"-disabled")},fe.getSelectedClassName=function(){return"".concat(fe.getPrefixCls(),"-selected")},fe.getOpenClassName=function(){return"".concat(fe.props.rootPrefixCls,"-submenu-open")},fe.getVisible=function(){return fe.state.isOpen},fe.getMode=function(){return fe.state.mode},fe.saveMenuInstance=function(We){fe.menuInstance=We},fe.addKeyPath=function(We){return Object(R.a)(Object(R.a)({},We),{},{keyPath:(We.keyPath||[]).concat(fe.props.eventKey)})},fe.triggerOpenChange=function(We,Qe){var ot=fe.props.eventKey,pt=function(){fe.onOpenChange({key:ot,item:Object(y.a)(fe),trigger:Qe,open:We})};Qe==="mouseenter"?fe.mouseenterTimeout=setTimeout(function(){pt()},0):pt()},fe.isChildrenSelected=function(){var We={find:!1};return X(fe.props.children,fe.props.selectedKeys,We),We.find},fe.isInlineMode=function(){return fe.getMode()==="inline"},fe.adjustWidth=function(){if(!fe.subMenuTitle||!fe.menuInstance)return;var We=qe.findDOMNode(fe.menuInstance);if(We.offsetWidth>=fe.subMenuTitle.offsetWidth)return;We.style.minWidth="".concat(fe.subMenuTitle.offsetWidth,"px")},fe.saveSubMenuTitle=function(We){fe.subMenuTitle=We},fe.getBaseProps=function(){var We=Object(y.a)(fe),Qe=We.props,ot=fe.getMode();return{mode:ot==="horizontal"?"vertical":ot,visible:fe.getVisible(),level:Qe.level+1,inlineIndent:Qe.inlineIndent,focusable:!1,onClick:fe.onSubMenuClick,onSelect:fe.onSelect,onDeselect:fe.onDeselect,onDestroy:fe.onDestroy,selectedKeys:Qe.selectedKeys,eventKey:"".concat(Qe.eventKey,"-menu-"),openKeys:Qe.openKeys,motion:Qe.motion,onOpenChange:fe.onOpenChange,subMenuOpenDelay:Qe.subMenuOpenDelay,parentMenu:Object(y.a)(fe),subMenuCloseDelay:Qe.subMenuCloseDelay,forceSubMenuRender:Qe.forceSubMenuRender,triggerSubMenuAction:Qe.triggerSubMenuAction,builtinPlacements:Qe.builtinPlacements,defaultActiveFirst:Qe.store.getState().defaultActiveFirst[ne(Qe.eventKey)],multiple:Qe.multiple,prefixCls:Qe.rootPrefixCls,id:fe.internalMenuId,manualRef:fe.saveMenuInstance,itemIcon:Qe.itemIcon,expandIcon:Qe.expandIcon,direction:Qe.direction}},fe.getMotion=function(We,Qe){var ot=Object(y.a)(fe),pt=ot.haveRendered,ht=fe.props,xt=ht.motion,Wt=ht.rootPrefixCls,ar=Object(R.a)(Object(R.a)({},xt),{},{leavedClassName:"".concat(Wt,"-hidden"),removeOnLeave:!1,motionAppear:pt||!Qe||We!=="inline"});return ar};var Oe=Le.store,ye=Le.eventKey,ke=Oe.getState(),Ne=ke.defaultActiveFirst;fe.isRootMenu=!1;var He=!1;return Ne&&(He=Ne[ye]),Cn(Oe,ye,He),fe.state={mode:Le.mode,isOpen:Le.isOpen},fe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var fe=this,Oe=this.props,ye=Oe.mode,ke=Oe.parentMenu,Ne=Oe.manualRef,He=Oe.isOpen,We=function(){fe.setState({mode:ye,isOpen:He})},Qe=He!==this.state.isOpen,ot=ye!==this.state.mode;if((ot||Qe)&&(Ve.a.cancel(this.updateStateRaf),ot?this.updateStateRaf=Object(Ve.a)(We):We()),Ne&&Ne(this),ye!=="horizontal"||!(ke==null?void 0:ke.isRootMenu)||!He)return;this.minWidthTimeout=setTimeout(function(){return fe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var fe=this.props,Oe=fe.onDestroy,ye=fe.eventKey;Oe&&Oe(ye),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Ve.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(fe,Oe){var ye=this.getBaseProps();return f.createElement(sa,Object(o.a)({},ye,{id:this.internalMenuId,className:fe,style:Oe}),this.props.children)}},{key:"renderChildren",value:function(){var fe=this,Oe=this.getBaseProps(),ye=Oe.mode,ke=Oe.visible,Ne=Oe.forceSubMenuRender,He=Oe.direction,We=this.getMotion(ye,ke);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ke||Ne,!this.haveOpened)return f.createElement("div",null);var Qe=w()("".concat(Oe.prefixCls,"-sub"),Object(L.a)({},"".concat(Oe.prefixCls,"-rtl"),He==="rtl"));return this.isInlineMode()?f.createElement(Or,Object(o.a)({visible:Oe.visible,forceRender:Ne},We),function(ot){var pt=ot.className,ht=ot.style,xt=w()(Qe,pt);return fe.renderPopupMenu(xt,ht)}):this.renderPopupMenu(Qe)}},{key:"render",value:function(){var fe,Oe,ye,ke=Object(R.a)({},this.props),Ne=this.getVisible(),He=this.getPrefixCls(),We=this.isInlineMode(),Qe=this.getMode(),ot=w()(He,"".concat(He,"-").concat(Qe),(fe={},Object(L.a)(fe,ke.className,!!ke.className),Object(L.a)(fe,this.getOpenClassName(),Ne),Object(L.a)(fe,this.getActiveClassName(),ke.active||Ne&&!We),Object(L.a)(fe,this.getDisabledClassName(),ke.disabled),Object(L.a)(fe,this.getSelectedClassName(),this.isChildrenSelected()),fe));this.internalMenuId||(ke.eventKey?this.internalMenuId="".concat(ke.eventKey,"$Menu"):(Pn+=1,this.internalMenuId="$__$".concat(Pn,"$Menu")));var pt={},ht={},xt={};ke.disabled||(pt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},ht={onClick:this.onTitleClick},xt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Wt={},ar=ke.direction,or=ar==="rtl";We&&(or?Wt.paddingRight=ke.inlineIndent*ke.level:Wt.paddingLeft=ke.inlineIndent*ke.level);var ur={};this.getVisible()&&(ur={"aria-owns":this.internalMenuId});var vr=null;Qe!=="horizontal"&&(vr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(vr=f.createElement(this.props.expandIcon,Object(R.a)({},this.props))));var pr=f.createElement("div",Object(o.a)({ref:this.saveSubMenuTitle,style:Wt,className:"".concat(He,"-title"),role:"button"},xt,ht,{"aria-expanded":Ne},ur,{"aria-haspopup":"true",title:typeof ke.title=="string"?ke.title:void 0}),ke.title,vr||f.createElement("i",{className:"".concat(He,"-arrow")})),cr=this.renderChildren(),Ar=((Oe=ke.parentMenu)===null||Oe===void 0?void 0:Oe.isRootMenu)?ke.parentMenu.props.getPopupContainer:function(Vr){return Vr.parentNode},wr=fn[Qe],mn=ke.popupOffset?{offset:ke.popupOffset}:{},Tr=w()((ye={},Object(L.a)(ye,ke.popupClassName,ke.popupClassName&&!We),Object(L.a)(ye,"".concat(He,"-rtl"),or),ye)),Vt=ke.disabled,zt=ke.triggerSubMenuAction,Sr=ke.subMenuOpenDelay,Rr=ke.forceSubMenuRender,jt=ke.subMenuCloseDelay,Mr=ke.builtinPlacements;$.forEach(function(Vr){return delete ke[Vr]}),delete ke.onClick;var vn=or?Object(R.a)(Object(R.a)({},zr),Mr):Object(R.a)(Object(R.a)({},Xa),Mr);delete ke.direction;var jr=this.getBaseProps(),Zr=We?null:this.getMotion(jr.mode,jr.visible);return f.createElement("li",Object(o.a)({},ke,pt,{className:ot,role:"menuitem"}),f.createElement(na,{prefixCls:He,popupClassName:w()("".concat(He,"-popup"),Tr),getPopupContainer:Ar,builtinPlacements:vn,popupPlacement:wr,popupVisible:We?!1:Ne,popupAlign:mn,popup:We?null:cr,action:Vt||We?[]:[zt],mouseEnterDelay:Sr,mouseLeaveDelay:jt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Rr,popupMotion:Zr},pr),We?cr:null)}}]),Ke}(f.Component);Va.defaultProps={onMouseEnter:ae,onMouseLeave:ae,onTitleMouseEnter:ae,onTitleMouseLeave:ae,onTitleClick:ae,manualRef:ae,mode:"vertical",title:""};var da=Object(_.b)(function(Re,Be){var Ke=Re.openKeys,Le=Re.activeKey,fe=Re.selectedKeys,Oe=Be.eventKey,ye=Be.subMenuKey;return{isOpen:Ke.indexOf(Oe)>-1,active:Le[ye]===Oe,selectedKeys:fe}})(Va);da.isSubMenu=!0;var ia=da,Fa="menuitem-overflowed",Sa=.5,_n=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){var Le;return Object(P.a)(this,Ke),Le=Be.apply(this,arguments),Le.resizeObserver=null,Le.mutationObserver=null,Le.originalTotalWidth=0,Le.overflowedItems=[],Le.menuItemSizes=[],Le.cancelFrameId=null,Le.state={lastVisibleIndex:void 0},Le.childRef=f.createRef(),Le.getMenuItemNodes=function(){var fe=Le.props.prefixCls,Oe=Le.childRef.current;return Oe?[].slice.call(Oe.children).filter(function(ye){return ye.className.split(" ").indexOf("".concat(fe,"-overflowed-submenu"))<0}):[]},Le.getOverflowedSubMenuItem=function(fe,Oe,ye){var ke=Le.props,Ne=ke.overflowedIndicator,He=ke.level,We=ke.mode,Qe=ke.prefixCls,ot=ke.theme;if(He!==1||We!=="horizontal")return null;var pt=Le.props.children[0],ht=pt.props,xt=ht.children,Wt=ht.title,ar=ht.style,or=Object(S.a)(ht,["children","title","style"]),ur=Object(R.a)({},ar),vr="".concat(fe,"-overflowed-indicator"),pr="".concat(fe,"-overflowed-indicator");Oe.length===0&&ye!==!0?ur=Object(R.a)(Object(R.a)({},ur),{},{display:"none"}):ye&&(ur=Object(R.a)(Object(R.a)({},ur),{},{visibility:"hidden",position:"absolute"}),vr="".concat(vr,"-placeholder"),pr="".concat(pr,"-placeholder"));var cr=ot?"".concat(Qe,"-").concat(ot):"",Ar={};return $.forEach(function(wr){or[wr]!==void 0&&(Ar[wr]=or[wr])}),f.createElement(ia,Object(o.a)({title:Ne,className:"".concat(Qe,"-overflowed-submenu"),popupClassName:cr},Ar,{key:vr,eventKey:pr,disabled:!1,style:ur}),Oe)},Le.setChildrenWidthAndResize=function(){if(Le.props.mode!=="horizontal")return;var fe=Le.childRef.current;if(!fe)return;var Oe=fe.children;if(!Oe||Oe.length===0)return;var ye=fe.children[Oe.length-1];de(ye,"display","inline-block");var ke=Le.getMenuItemNodes(),Ne=ke.filter(function(He){return He.className.split(" ").indexOf(Fa)>=0});Ne.forEach(function(He){de(He,"display","inline-block")}),Le.menuItemSizes=ke.map(function(He){return pe(He,!0)}),Ne.forEach(function(He){de(He,"display","none")}),Le.overflowedIndicatorWidth=pe(fe.children[fe.children.length-1],!0),Le.originalTotalWidth=Le.menuItemSizes.reduce(function(He,We){return He+We},0),Le.handleResize(),de(ye,"display","none")},Le.handleResize=function(){if(Le.props.mode!=="horizontal")return;var fe=Le.childRef.current;if(!fe)return;var Oe=pe(fe);Le.overflowedItems=[];var ye=0,ke;Le.originalTotalWidth>Oe+Sa&&(ke=-1,Le.menuItemSizes.forEach(function(Ne){ye+=Ne,ye+Le.overflowedIndicatorWidth<=Oe&&(ke+=1)})),Le.setState({lastVisibleIndex:ke})},Le}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){var fe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Oe=this.childRef.current;if(!Oe)return;this.resizeObserver=new ze.default(function(ye){ye.forEach(function(){var ke=fe.cancelFrameId;cancelAnimationFrame(ke),fe.cancelFrameId=requestAnimationFrame(fe.setChildrenWidthAndResize)})}),[].slice.call(Oe.children).concat(Oe).forEach(function(ye){fe.resizeObserver.observe(ye)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){fe.resizeObserver.disconnect(),[].slice.call(Oe.children).concat(Oe).forEach(function(ye){fe.resizeObserver.observe(ye)}),fe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Oe,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(fe){var Oe=this,ye=this.state.lastVisibleIndex;return(fe||[]).reduce(function(ke,Ne,He){var We=Ne;if(Oe.props.mode==="horizontal"){var Qe=Oe.getOverflowedSubMenuItem(Ne.props.eventKey,[]);ye!==void 0&&Oe.props.className.indexOf("".concat(Oe.props.prefixCls,"-root"))!==-1&&(He>ye&&(We=f.cloneElement(Ne,{style:{display:"none"},eventKey:"".concat(Ne.props.eventKey,"-hidden"),className:"".concat(Fa)})),He===ye+1&&(Oe.overflowedItems=fe.slice(ye+1).map(function(pt){return f.cloneElement(pt,{key:pt.props.eventKey,mode:"vertical-left"})}),Qe=Oe.getOverflowedSubMenuItem(Ne.props.eventKey,Oe.overflowedItems)));var ot=[].concat(Object(a.a)(ke),[Qe,We]);return He===fe.length-1&&ot.push(Oe.getOverflowedSubMenuItem(Ne.props.eventKey,[],!0)),ot}return[].concat(Object(a.a)(ke),[We])},[])}},{key:"render",value:function(){var fe=this.props,Oe=fe.visible,ye=fe.prefixCls,ke=fe.overflowedIndicator,Ne=fe.mode,He=fe.level,We=fe.tag,Qe=fe.children,ot=fe.theme,pt=Object(S.a)(fe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),ht=We;return f.createElement(ht,Object(o.a)({ref:this.childRef},pt),this.renderChildren(Qe))}}]),Ke}(f.Component);_n.defaultProps={tag:"div",className:""};var fa=_n;function ha(Re){return Re.length?Re.every(function(Be){return!!Be.props.disabled}):!0}function Gn(Re,Be,Ke){var Le=Re.getState();Re.setState({activeKey:Object(R.a)(Object(R.a)({},Le.activeKey),{},Object(L.a)({},Be,Ke))})}function ya(Re){return Re.eventKey||"0-menu-"}function Bn(Re,Be){var Ke=Be,Le=Re.children,fe=Re.eventKey;if(Ke){var Oe;if(Q(Le,function(ye,ke){ye&&ye.props&&!ye.props.disabled&&Ke===xe(ye,fe,ke)&&(Oe=!0)}),Oe)return Ke}return Ke=null,Re.defaultActiveFirst&&Q(Le,function(ye,ke){!Ke&&ye&&!ye.props.disabled&&(Ke=xe(ye,fe,ke))}),Ke}function Ca(Re){if(!Re)return;var Be=this.instanceArray.indexOf(Re);Be!==-1?this.instanceArray[Be]=Re:this.instanceArray.push(Re)}var kn=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(Le){var fe;return Object(P.a)(this,Ke),fe=Be.call(this,Le),fe.onKeyDown=function(Oe,ye){var ke=Oe.keyCode,Ne;if(fe.getFlatInstanceArray().forEach(function(We){We&&We.props.active&&We.onKeyDown&&(Ne=We.onKeyDown(Oe))}),Ne)return 1;var He=null;return(ke===g.a.UP||ke===g.a.DOWN)&&(He=fe.step(ke===g.a.UP?-1:1)),He?(Oe.preventDefault(),Gn(fe.props.store,ya(fe.props),He.props.eventKey),typeof ye=="function"&&ye(He),1):void 0},fe.onItemHover=function(Oe){var ye=Oe.key,ke=Oe.hover;Gn(fe.props.store,ya(fe.props),ke?ye:null)},fe.onDeselect=function(Oe){fe.props.onDeselect(Oe)},fe.onSelect=function(Oe){fe.props.onSelect(Oe)},fe.onClick=function(Oe){fe.props.onClick(Oe)},fe.onOpenChange=function(Oe){fe.props.onOpenChange(Oe)},fe.onDestroy=function(Oe){fe.props.onDestroy(Oe)},fe.getFlatInstanceArray=function(){return fe.instanceArray},fe.step=function(Oe){var ye=fe.getFlatInstanceArray(),ke=fe.props.store.getState().activeKey[ya(fe.props)],Ne=ye.length;if(!Ne)return null;Oe<0&&(ye=ye.concat().reverse());var He=-1;if(ye.every(function(pt,ht){return pt&&pt.props.eventKey===ke?(He=ht,!1):!0}),!fe.props.defaultActiveFirst&&He!==-1&&ha(ye.slice(He,Ne-1)))return;var We=(He+1)%Ne,Qe=We;do{var ot=ye[Qe];if(!ot||ot.props.disabled)Qe=(Qe+1)%Ne;else return ot}while(Qe!==We);return null},fe.renderCommonMenuItem=function(Oe,ye,ke){var Ne=fe.props.store.getState(),He=Object(y.a)(fe),We=He.props,Qe=xe(Oe,We.eventKey,ye),ot=Oe.props;if(!ot||typeof Oe.type=="string")return Oe;var pt=Qe===Ne.activeKey,ht=Object(R.a)(Object(R.a)({mode:ot.mode||We.mode,level:We.level,inlineIndent:We.inlineIndent,renderMenuItem:fe.renderMenuItem,rootPrefixCls:We.prefixCls,index:ye,parentMenu:We.parentMenu,manualRef:ot.disabled?void 0:Object(j.a)(Oe.ref,Ca.bind(Object(y.a)(fe))),eventKey:Qe,active:!ot.disabled&&pt,multiple:We.multiple,onClick:function(Wt){(ot.onClick||ae)(Wt),fe.onClick(Wt)},onItemHover:fe.onItemHover,motion:We.motion,subMenuOpenDelay:We.subMenuOpenDelay,subMenuCloseDelay:We.subMenuCloseDelay,forceSubMenuRender:We.forceSubMenuRender,onOpenChange:fe.onOpenChange,onDeselect:fe.onDeselect,onSelect:fe.onSelect,builtinPlacements:We.builtinPlacements,itemIcon:ot.itemIcon||fe.props.itemIcon,expandIcon:ot.expandIcon||fe.props.expandIcon},ke),{},{direction:We.direction});return(We.mode==="inline"||Ce())&&(ht.triggerSubMenuAction="click"),f.cloneElement(Oe,Object(R.a)(Object(R.a)({},ht),{},{key:Qe||ye}))},fe.renderMenuItem=function(Oe,ye,ke){if(!Oe)return null;var Ne=fe.props.store.getState(),He={openKeys:Ne.openKeys,selectedKeys:Ne.selectedKeys,triggerSubMenuAction:fe.props.triggerSubMenuAction,subMenuKey:ke};return fe.renderCommonMenuItem(Oe,ye,He)},Le.store.setState({activeKey:Object(R.a)(Object(R.a)({},Le.store.getState().activeKey),{},Object(L.a)({},Le.eventKey,Bn(Le,Le.activeKey)))}),fe.instanceArray=[],fe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(fe){return this.props.visible||fe.visible||this.props.className!==fe.className||!H()(this.props.style,fe.style)}},{key:"componentDidUpdate",value:function(fe){var Oe=this.props,ye="activeKey"in Oe?Oe.activeKey:Oe.store.getState().activeKey[ya(Oe)],ke=Bn(Oe,ye);if(ke!==ye)Gn(Oe.store,ya(Oe),ke);else if("activeKey"in fe){var Ne=Bn(fe,fe.activeKey);ke!==Ne&&Gn(Oe.store,ya(Oe),ke)}}},{key:"render",value:function(){var fe=this,Oe=Object(o.a)({},this.props);this.instanceArray=[];var ye=w()(Oe.prefixCls,Oe.className,"".concat(Oe.prefixCls,"-").concat(Oe.mode)),ke={className:ye,role:Oe.role||"menu"};Oe.id&&(ke.id=Oe.id),Oe.focusable&&(ke.tabIndex=0,ke.onKeyDown=this.onKeyDown);var Ne=Oe.prefixCls,He=Oe.eventKey,We=Oe.visible,Qe=Oe.level,ot=Oe.mode,pt=Oe.overflowedIndicator,ht=Oe.theme;return $.forEach(function(xt){return delete Oe[xt]}),delete Oe.onClick,f.createElement(fa,Object(o.a)({},Oe,{prefixCls:Ne,mode:ot,tag:"ul",level:Qe,theme:ht,visible:We,overflowedIndicator:pt},ke),Object(l.a)(Oe.children).map(function(xt,Wt){return fe.renderMenuItem(xt,Wt,He||"0-menu-")}))}}]),Ke}(f.Component);kn.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ae};var oa=Object(_.b)()(kn),sa=oa,Xn=k("Kwbf");function Dr(Re,Be,Ke){var Le=Re.prefixCls,fe=Re.motion,Oe=Re.defaultMotions,ye=Oe===void 0?{}:Oe,ke=Re.openAnimation,Ne=Re.openTransitionName,He=Be.switchingModeFromInline;if(fe)return fe;if(Object(z.a)(ke)==="object"&&ke)Object(Xn.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ke=="string")return{motionName:"".concat(Le,"-open-").concat(ke)};if(Ne)return{motionName:Ne};var We=ye[Ke];return We||(He?null:ye.other)}var Ya=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(Le){var fe;Object(P.a)(this,Ke),fe=Be.call(this,Le),fe.onSelect=function(ke){var Ne=Object(y.a)(fe),He=Ne.props;if(He.selectable){var We=fe.store.getState(),Qe=We.selectedKeys,ot=ke.key;He.multiple?Qe=Qe.concat([ot]):Qe=[ot],"selectedKeys"in He||fe.store.setState({selectedKeys:Qe}),He.onSelect(Object(R.a)(Object(R.a)({},ke),{},{selectedKeys:Qe}))}},fe.onClick=function(ke){var Ne=fe.getRealMenuMode(),He=Object(y.a)(fe),We=He.store,Qe=He.props.onOpenChange;Ne!=="inline"&&!("openKeys"in fe.props)&&(We.setState({openKeys:[]}),Qe([])),fe.props.onClick(ke)},fe.onKeyDown=function(ke,Ne){fe.innerMenu.getWrappedInstance().onKeyDown(ke,Ne)},fe.onOpenChange=function(ke){var Ne=Object(y.a)(fe),He=Ne.props,We=fe.store.getState().openKeys.concat(),Qe=!1,ot=function(ht){var xt=!1;if(ht.open)xt=We.indexOf(ht.key)===-1,xt&&We.push(ht.key);else{var Wt=We.indexOf(ht.key);xt=Wt!==-1,xt&&We.splice(Wt,1)}Qe=Qe||xt};Array.isArray(ke)?ke.forEach(ot):ot(ke),Qe&&("openKeys"in fe.props||fe.store.setState({openKeys:We}),He.onOpenChange(We))},fe.onDeselect=function(ke){var Ne=Object(y.a)(fe),He=Ne.props;if(He.selectable){var We=fe.store.getState().selectedKeys.concat(),Qe=ke.key,ot=We.indexOf(Qe);ot!==-1&&We.splice(ot,1),"selectedKeys"in He||fe.store.setState({selectedKeys:We}),He.onDeselect(Object(R.a)(Object(R.a)({},ke),{},{selectedKeys:We}))}},fe.onMouseEnter=function(ke){fe.restoreModeVerticalFromInline();var Ne=fe.props.onMouseEnter;Ne&&Ne(ke)},fe.onTransitionEnd=function(ke){var Ne=ke.propertyName==="width"&&ke.target===ke.currentTarget,He=ke.target.className,We=Object.prototype.toString.call(He)==="[object SVGAnimatedString]"?He.animVal:He,Qe=ke.propertyName==="font-size"&&We.indexOf("anticon")>=0;(Ne||Qe)&&fe.restoreModeVerticalFromInline()},fe.setInnerMenu=function(ke){fe.innerMenu=ke},fe.isRootMenu=!0;var Oe=Le.defaultSelectedKeys,ye=Le.defaultOpenKeys;return"selectedKeys"in Le&&(Oe=Le.selectedKeys||[]),"openKeys"in Le&&(ye=Le.openKeys||[]),fe.store=Object(_.c)({selectedKeys:Oe,openKeys:ye,activeKey:{"0-menu-":Bn(Le,Le.activeKey)}}),fe.state={switchingModeFromInline:!1,prevProps:Le,inlineOpenKeys:[],store:fe.store},fe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(fe){var Oe=this.props,ye=Oe.siderCollapsed,ke=Oe.inlineCollapsed,Ne=Oe.onOpenChange;(!fe.inlineCollapsed&&ke||!fe.siderCollapsed&&ye)&&Ne([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var fe=this.props.collapsedWidth,Oe=this.store,ye=this.prevOpenKeys,ke=this.getInlineCollapsed()&&(fe===0||fe==="0"||fe==="0px");ke?(this.prevOpenKeys=Oe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ye&&(this.store.setState({openKeys:ye}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var fe=this.props.mode,Oe=this.state.switchingModeFromInline,ye=this.getInlineCollapsed();return Oe&&ye?"inline":ye?"vertical":fe}},{key:"getInlineCollapsed",value:function(){var fe=this.props,Oe=fe.inlineCollapsed,ye=fe.siderCollapsed;return ye!==void 0?ye:Oe}},{key:"restoreModeVerticalFromInline",value:function(){var fe=this.state.switchingModeFromInline;fe&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var fe=Object(R.a)({},Object(N.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Oe=this.getRealMenuMode();return fe.className+=" ".concat(fe.prefixCls,"-root"),fe.direction==="rtl"&&(fe.className+=" ".concat(fe.prefixCls,"-rtl")),fe=Object(R.a)(Object(R.a)({},fe),{},{mode:Oe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Dr(this.props,this.state,Oe)}),delete fe.openAnimation,delete fe.openTransitionName,f.createElement(_.a,{store:this.store},f.createElement(sa,Object(o.a)({},fe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(fe,Oe){var ye=Oe.prevProps,ke=Oe.store,Ne=ke.getState(),He={},We={prevProps:fe};return ye.mode==="inline"&&fe.mode!=="inline"&&(We.switchingModeFromInline=!0),"openKeys"in fe?He.openKeys=fe.openKeys||[]:((fe.inlineCollapsed&&!ye.inlineCollapsed||fe.siderCollapsed&&!ye.siderCollapsed)&&(We.switchingModeFromInline=!0,We.inlineOpenKeys=Ne.openKeys,He.openKeys=[]),(!fe.inlineCollapsed&&ye.inlineCollapsed||!fe.siderCollapsed&&ye.siderCollapsed)&&(He.openKeys=Oe.inlineOpenKeys,We.inlineOpenKeys=[])),Object.keys(He).length&&ke.setState(He),We}}]),Ke}(f.Component);Ya.defaultProps={selectable:!0,onClick:ae,onSelect:ae,onOpenChange:ae,onDeselect:ae,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:f.createElement("span",null,"\xB7\xB7\xB7")};var ti=Ya,La=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){var Le;return Object(P.a)(this,Ke),Le=Be.apply(this,arguments),Le.onKeyDown=function(fe){var Oe=fe.keyCode;return Oe===g.a.ENTER?(Le.onClick(fe),!0):void 0},Le.onMouseLeave=function(fe){var Oe=Le.props,ye=Oe.eventKey,ke=Oe.onItemHover,Ne=Oe.onMouseLeave;ke({key:ye,hover:!1}),Ne({key:ye,domEvent:fe})},Le.onMouseEnter=function(fe){var Oe=Le.props,ye=Oe.eventKey,ke=Oe.onItemHover,Ne=Oe.onMouseEnter;ke({key:ye,hover:!0}),Ne({key:ye,domEvent:fe})},Le.onClick=function(fe){var Oe=Le.props,ye=Oe.eventKey,ke=Oe.multiple,Ne=Oe.onClick,He=Oe.onSelect,We=Oe.onDeselect,Qe=Oe.isSelected,ot={key:ye,keyPath:[ye],item:Object(y.a)(Le),domEvent:fe};Ne(ot),ke?Qe?We(ot):He(ot):Qe||He(ot)},Le.saveNode=function(fe){Le.node=fe},Le}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var fe=this.props;fe.onDestroy&&fe.onDestroy(fe.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var fe,Oe=Object(R.a)({},this.props),ye=w()(this.getPrefixCls(),Oe.className,(fe={},Object(L.a)(fe,this.getActiveClassName(),!Oe.disabled&&Oe.active),Object(L.a)(fe,this.getSelectedClassName(),Oe.isSelected),Object(L.a)(fe,this.getDisabledClassName(),Oe.disabled),fe)),ke=Object(R.a)(Object(R.a)({},Oe.attribute),{},{title:typeof Oe.title=="string"?Oe.title:void 0,className:ye,role:Oe.role||"menuitem","aria-disabled":Oe.disabled});Oe.role==="option"?ke=Object(R.a)(Object(R.a)({},ke),{},{role:"option","aria-selected":Oe.isSelected}):(Oe.role===null||Oe.role==="none")&&(ke.role="none");var Ne={onClick:Oe.disabled?null:this.onClick,onMouseLeave:Oe.disabled?null:this.onMouseLeave,onMouseEnter:Oe.disabled?null:this.onMouseEnter},He=Object(R.a)({},Oe.style);Oe.mode==="inline"&&(Oe.direction==="rtl"?He.paddingRight=Oe.inlineIndent*Oe.level:He.paddingLeft=Oe.inlineIndent*Oe.level),$.forEach(function(Qe){return delete Oe[Qe]}),delete Oe.direction;var We=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(We=f.createElement(this.props.itemIcon,this.props)),f.createElement("li",Object(o.a)({},Object(N.a)(Oe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ke,Ne,{style:He,ref:this.saveNode}),Oe.children,We)}}]),Ke}(f.Component);La.isMenuItem=!0,La.defaultProps={onSelect:ae,onMouseEnter:ae,onMouseLeave:ae,manualRef:ae};var $a=Object(_.b)(function(Re,Be){var Ke=Re.activeKey,Le=Re.selectedKeys,fe=Be.eventKey,Oe=Be.subMenuKey;return{active:Ke[Oe]===fe,isSelected:Array.isArray(Le)?Le.indexOf(fe)!==-1:Le===fe}})(La),Ba=$a,Dt=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){var Le;return Object(P.a)(this,Ke),Le=Be.apply(this,arguments),Le.renderInnerMenuItem=function(fe){var Oe=Le.props,ye=Oe.renderMenuItem,ke=Oe.index;return ye(fe,ke,Le.props.subMenuKey)},Le}return Object(O.a)(Ke,[{key:"render",value:function(){var fe=Object(o.a)({},this.props),Oe=fe.className,ye=Oe===void 0?"":Oe,ke=fe.rootPrefixCls,Ne="".concat(ke,"-item-group-title"),He="".concat(ke,"-item-group-list"),We=fe.title,Qe=fe.children;return $.forEach(function(ot){return delete fe[ot]}),delete fe.direction,f.createElement("li",Object(o.a)({},fe,{onClick:function(pt){return pt.stopPropagation()},className:"".concat(ye," ").concat(ke,"-item-group")}),f.createElement("div",{className:Ne,title:typeof We=="string"?We:void 0},We),f.createElement("ul",{className:He},f.Children.map(Qe,this.renderInnerMenuItem)))}}]),Ke}(f.Component);Dt.isMenuItemGroup=!0,Dt.defaultProps={disabled:!0};var $t=Dt,Ut=function(Be){var Ke=Be.className,Le=Be.rootPrefixCls,fe=Be.style;return f.createElement("li",{className:"".concat(Ke," ").concat(Le,"-item-divider"),style:fe})};Ut.defaultProps={disabled:!0,className:"",style:{}};var lr=Ut,yr=ti,Pr=k("eDIo");function dr(Re,Be){var Ke=Re.prefixCls,Le=Re.editable,fe=Re.locale,Oe=Re.style;return!Le||Le.showAdd===!1?null:f.createElement("button",{ref:Be,type:"button",className:"".concat(Ke,"-nav-add"),style:Oe,"aria-label":(fe==null?void 0:fe.addAriaLabel)||"Add tab",onClick:function(ke){Le.onEdit("add",{event:ke})}},Le.addIcon||"+")}var Gr=f.forwardRef(dr);function hn(Re,Be){var Ke=Re.prefixCls,Le=Re.id,fe=Re.tabs,Oe=Re.locale,ye=Re.mobile,ke=Re.moreIcon,Ne=ke===void 0?"More":ke,He=Re.moreTransitionName,We=Re.style,Qe=Re.className,ot=Re.editable,pt=Re.tabBarGutter,ht=Re.rtl,xt=Re.onTabClick,Wt=Object(f.useState)(!1),ar=Object(c.a)(Wt,2),or=ar[0],ur=ar[1],vr=Object(f.useState)(null),pr=Object(c.a)(vr,2),cr=pr[0],Ar=pr[1],wr="".concat(Le,"-more-popup"),mn="".concat(Ke,"-dropdown"),Tr=cr!==null?"".concat(wr,"-").concat(cr):null,Vt=Oe==null?void 0:Oe.dropdownAriaLabel,zt=f.createElement(yr,{onClick:function(Zr){var Vr=Zr.key,Dn=Zr.domEvent;xt(Vr,Dn),ur(!1)},id:wr,tabIndex:-1,role:"listbox","aria-activedescendant":Tr,selectedKeys:[cr],"aria-label":Vt!==void 0?Vt:"expanded dropdown"},fe.map(function(jr){return f.createElement(Ba,{key:jr.key,id:"".concat(wr,"-").concat(jr.key),role:"option","aria-controls":Le&&"".concat(Le,"-panel-").concat(jr.key),disabled:jr.disabled},jr.tab)}));function Sr(jr){for(var Zr=fe.filter(function(ma){return!ma.disabled}),Vr=Zr.findIndex(function(ma){return ma.key===cr})||0,Dn=Zr.length,Vn=0;Vn<Dn;Vn+=1){Vr=(Vr+jr+Dn)%Dn;var xn=Zr[Vr];if(!xn.disabled){Ar(xn.key);return}}}function Rr(jr){var Zr=jr.which;if(!or){[g.a.DOWN,g.a.SPACE,g.a.ENTER].includes(Zr)&&(ur(!0),jr.preventDefault());return}switch(Zr){case g.a.UP:Sr(-1),jr.preventDefault();break;case g.a.DOWN:Sr(1),jr.preventDefault();break;case g.a.ESC:ur(!1);break;case g.a.SPACE:case g.a.ENTER:cr!==null&&xt(cr,jr);break}}Object(f.useEffect)(function(){var jr=document.getElementById(Tr);jr&&jr.scrollIntoView&&jr.scrollIntoView(!1)},[cr]),Object(f.useEffect)(function(){or||Ar(null)},[or]);var jt=Object(L.a)({},ht?"marginLeft":"marginRight",pt);fe.length||(jt.visibility="hidden",jt.order=1);var Mr=w()(Object(L.a)({},"".concat(mn,"-rtl"),ht)),vn=ye?null:f.createElement(Pr.a,{prefixCls:mn,overlay:zt,trigger:["hover"],visible:or,transitionName:He,onVisibleChange:ur,overlayClassName:Mr,mouseEnterDelay:.1,mouseLeaveDelay:.1},f.createElement("button",{type:"button",className:"".concat(Ke,"-nav-more"),style:jt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":wr,id:"".concat(Le,"-more"),"aria-expanded":or,onKeyDown:Rr},Ne));return f.createElement("div",{className:w()("".concat(Ke,"-nav-operations"),Qe),style:We,ref:Be},vn,f.createElement(Gr,{prefixCls:Ke,locale:Oe,editable:ot}))}var fr=f.forwardRef(hn),pa=Object(f.createContext)(null),Nt=.1,qt=.01,Jt=20,Qr=Math.pow(.995,Jt);function Wa(){var Re=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Re)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Re.substr(0,4)))}function Ha(Re,Be){var Ke=Object(f.useState)(),Le=Object(c.a)(Ke,2),fe=Le[0],Oe=Le[1],ye=Object(f.useState)(0),ke=Object(c.a)(ye,2),Ne=ke[0],He=ke[1],We=Object(f.useState)(0),Qe=Object(c.a)(We,2),ot=Qe[0],pt=Qe[1],ht=Object(f.useState)(),xt=Object(c.a)(ht,2),Wt=xt[0],ar=xt[1],or=Object(f.useRef)();function ur(Vt){var zt=Vt.touches[0],Sr=zt.screenX,Rr=zt.screenY;Oe({x:Sr,y:Rr}),window.clearInterval(or.current)}function vr(Vt){if(!fe)return;Vt.preventDefault();var zt=Vt.touches[0],Sr=zt.screenX,Rr=zt.screenY;Oe({x:Sr,y:Rr});var jt=Sr-fe.x,Mr=Rr-fe.y;Be(jt,Mr);var vn=Date.now();He(vn),pt(vn-Ne),ar({x:jt,y:Mr})}function pr(){if(!fe)return;if(Oe(null),ar(null),Wt){var Vt=Wt.x/ot,zt=Wt.y/ot,Sr=Math.abs(Vt),Rr=Math.abs(zt);if(Math.max(Sr,Rr)<Nt)return;var jt=Vt,Mr=zt;or.current=window.setInterval(function(){if(Math.abs(jt)<qt&&Math.abs(Mr)<qt){window.clearInterval(or.current);return}jt*=Qr,Mr*=Qr,Be(jt*Jt,Mr*Jt)},Jt)}}var cr=Object(f.useRef)(0),Ar=Object(f.useRef)(!1),wr=Object(f.useRef)();function mn(Vt){var zt=Vt.deltaX,Sr=Vt.deltaY,Rr=0,jt=Math.abs(zt),Mr=Math.abs(Sr);jt===Mr?Rr=wr.current==="x"?zt:Sr:jt>Mr?(Rr=zt,wr.current="x"):(Rr=Sr,wr.current="y");var vn=Date.now();vn-cr.current>100&&(Ar.current=!1),(Be(-Rr,-Rr)||Ar.current)&&(Vt.preventDefault(),Ar.current=!0),cr.current=vn}var Tr=Object(f.useRef)(null);Tr.current={onTouchStart:ur,onTouchMove:vr,onTouchEnd:pr,onWheel:mn},f.useEffect(function(){function Vt(jt){Tr.current.onTouchStart(jt)}function zt(jt){Tr.current.onTouchMove(jt)}function Sr(jt){Tr.current.onTouchEnd(jt)}function Rr(jt){Tr.current.onWheel(jt)}return document.addEventListener("touchmove",zt,{passive:!1}),document.addEventListener("touchend",Sr,{passive:!1}),Re.current.addEventListener("touchstart",Vt,{passive:!1}),Re.current.addEventListener("wheel",Rr),function(){document.removeEventListener("touchmove",zt),document.removeEventListener("touchend",Sr)}},[])}function Xt(){var Re=Object(f.useRef)(new Map);function Be(Le){return Re.current.has(Le)||Re.current.set(Le,f.createRef()),Re.current.get(Le)}function Ke(Le){Re.current.delete(Le)}return[Be,Ke]}function St(Re,Be){var Ke=f.useRef(Re),Le=f.useState({}),fe=Object(c.a)(Le,2),Oe=fe[1];function ye(ke){var Ne=typeof ke=="function"?ke(Ke.current):ke;Ne!==Ke.current&&Be(Ne,Ke.current),Ke.current=Ne,Oe({})}return[Ke.current,ye]}var er=function(Be){var Ke=Be.position,Le=Be.prefixCls,fe=Be.extra;if(!fe)return null;var Oe,ye=fe;return Ke==="right"&&(Oe=ye.right||!ye.left&&ye||null),Ke==="left"&&(Oe=ye.left||null),Oe?f.createElement("div",{className:"".concat(Le,"-extra-content")},Oe):null};function nr(Re,Be){var Ke,Le=f.useContext(pa),fe=Le.prefixCls,Oe=Le.tabs,ye=Re.className,ke=Re.style,Ne=Re.id,He=Re.animated,We=Re.activeKey,Qe=Re.rtl,ot=Re.extra,pt=Re.editable,ht=Re.locale,xt=Re.tabPosition,Wt=Re.tabBarGutter,ar=Re.children,or=Re.onTabClick,ur=Re.onTabScroll,vr=Object(f.useRef)(),pr=Object(f.useRef)(),cr=Object(f.useRef)(),Ar=Object(f.useRef)(),wr=Xt(),mn=Object(c.a)(wr,2),Tr=mn[0],Vt=mn[1],zt=xt==="top"||xt==="bottom",Sr=St(0,function(Br,_r){zt&&ur&&ur({direction:Br>_r?"left":"right"})}),Rr=Object(c.a)(Sr,2),jt=Rr[0],Mr=Rr[1],vn=St(0,function(Br,_r){!zt&&ur&&ur({direction:Br>_r?"top":"bottom"})}),jr=Object(c.a)(vn,2),Zr=jr[0],Vr=jr[1],Dn=Object(f.useState)(0),Vn=Object(c.a)(Dn,2),xn=Vn[0],ma=Vn[1],ka=Object(f.useState)(0),ba=Object(c.a)(ka,2),Yn=ba[0],ln=ba[1],qr=Object(f.useState)(0),wn=Object(c.a)(qr,2),gn=wn[0],Ia=wn[1],ri=Object(f.useState)(0),ni=Object(c.a)(ri,2),Yr=ni[0],za=ni[1],ai=Object(f.useState)(null),nn=Object(c.a)(ai,2),Xr=nn[0],$n=nn[1],Co=Object(f.useState)(null),eo=Object(c.a)(Co,2),ii=eo[0],gi=eo[1],ki=Object(f.useState)(0),to=Object(c.a)(ki,2),Ii=to[0],Vo=to[1],Yo=Object(f.useState)(0),_o=Object(c.a)(Yo,2),ro=_o[0],no=_o[1],yi=b(new Map),bi=Object(c.a)(yi,2),$o=bi[0],Ni=bi[1],Oi=h(Oe,$o,xn),Ei="".concat(fe,"-nav-operations-hidden"),xi=0,Na=0;zt?Qe?(xi=0,Na=Math.max(0,xn-Xr)):(xi=Math.min(0,Xr-xn),Na=0):(xi=Math.min(0,ii-Yn),Na=0);function ci(Br){return Br<xi?[xi,!1]:Br>Na?[Na,!1]:[Br,!0]}var oi=Object(f.useRef)(),Ai=Object(f.useState)(),di=Object(c.a)(Ai,2),ji=di[0],ao=di[1];function Ui(){ao(Date.now())}function io(){window.clearTimeout(oi.current)}Ha(vr,function(Br,_r){var Jn=!1;function xa(wi,Ja){wi(function(Mi){var li=ci(Mi+Ja),Qn=Object(c.a)(li,2),Wi=Qn[0],so=Qn[1];return Jn=so,Wi})}if(zt){if(Xr>=xn)return Jn;xa(Mr,Br)}else{if(ii>=Yn)return Jn;xa(Vr,_r)}return io(),Ui(),Jn}),Object(f.useEffect)(function(){return io(),ji&&(oi.current=window.setTimeout(function(){ao(0)},100)),io},[ji]);function si(){var Br=arguments.length>0&&arguments[0]!==void 0?arguments[0]:We,_r=Oi.get(Br);if(!_r)return;if(zt){var Jn=jt;Qe?_r.right<jt?Jn=_r.right:_r.right+_r.width>jt+Xr&&(Jn=_r.right+_r.width-Xr):_r.left<-jt?Jn=-_r.left:_r.left+_r.width>-jt+Xr&&(Jn=-(_r.left+_r.width-Xr)),Vr(0),Mr(ci(Jn)[0])}else{var xa=Zr;_r.top<-Zr?xa=-_r.top:_r.top+_r.height>-Zr+ii&&(xa=-(_r.top+_r.height-ii)),Mr(0),Vr(ci(xa)[0])}}var fi=T(Oi,{width:Xr,height:ii,left:jt,top:Zr},{width:gn,height:Yr},{width:Ii,height:ro},Object(R.a)(Object(R.a)({},Re),{},{tabs:Oe})),Oo=Object(c.a)(fi,2),Jo=Oo[0],Qo=Oo[1],Zo=Oe.map(function(Br){var _r=Br.key;return f.createElement(n,{id:Ne,prefixCls:fe,key:_r,rtl:Qe,tab:Br,closable:Br.closable,editable:pt,active:_r===We,tabPosition:xt,tabBarGutter:Wt,renderWrapper:ar,removeAriaLabel:ht==null?void 0:ht.removeAriaLabel,ref:Tr(_r),onClick:function(xa){or(_r,xa)},onRemove:function(){Vt(_r)},onFocus:function(){si(_r),Ui(),Qe||(vr.current.scrollLeft=0),vr.current.scrollTop=0}})}),oo=m(function(){var Br,_r,Jn,xa,wi,Ja,Mi,li,Qn,Wi=((Br=vr.current)===null||Br===void 0?void 0:Br.offsetWidth)||0,so=((_r=vr.current)===null||_r===void 0?void 0:_r.offsetHeight)||0,lo=((Jn=Ar.current)===null||Jn===void 0?void 0:Jn.offsetWidth)||0,wa=((xa=Ar.current)===null||xa===void 0?void 0:xa.offsetHeight)||0,Fr=((wi=cr.current)===null||wi===void 0?void 0:wi.offsetWidth)||0,Ua=((Ja=cr.current)===null||Ja===void 0?void 0:Ja.offsetHeight)||0;$n(Wi),gi(so),Vo(lo),no(wa);var Qa=(((Mi=pr.current)===null||Mi===void 0?void 0:Mi.offsetWidth)||0)-lo,Za=(((li=pr.current)===null||li===void 0?void 0:li.offsetHeight)||0)-wa;ma(Qa),ln(Za);var uo=(Qn=cr.current)===null||Qn===void 0?void 0:Qn.className.includes(Ei);Ia(Qa-(uo?0:Fr)),za(Za-(uo?0:Ua)),Ni(function(){var Hi=new Map;return Oe.forEach(function(Lo){var Po=Lo.key,pi=Tr(Po).current;pi&&Hi.set(Po,{width:pi.offsetWidth,height:pi.offsetHeight,left:pi.offsetLeft,top:pi.offsetTop})}),Hi})}),qo=Oe.slice(0,Jo),Ea=Oe.slice(Qo+1),Nn=[].concat(Object(a.a)(qo),Object(a.a)(Ea)),la=Object(f.useState)(),jn=Object(c.a)(la,2),Ri=jn[0],es=jn[1],ja=Oi.get(We),Ao=Object(f.useRef)();function Ro(){u.a.cancel(Ao.current)}Object(f.useEffect)(function(){var Br={};return ja&&(zt?(Qe?Br.right=ja.right:Br.left=ja.left,Br.width=ja.width):(Br.top=ja.top,Br.height=ja.height)),Ro(),Ao.current=u()(function(){es(Br)}),Ro},[ja,zt,Qe]),Object(f.useEffect)(function(){si()},[We,ja,Oi,zt]),Object(f.useEffect)(function(){oo()},[Qe,Wt,We,Oe.map(function(Br){return Br.key}).join("_")]);var Do=!!Nn.length,hi="".concat(fe,"-nav-wrap"),Fi,Di,Mo,Bi;return zt?Qe?(Di=jt>0,Fi=jt+Xr<xn):(Fi=jt<0,Di=-jt+Xr<xn):(Mo=Zr<0,Bi=-Zr+ii<Yn),f.createElement("div",{ref:Be,role:"tablist",className:w()("".concat(fe,"-nav"),ye),style:ke,onKeyDown:function(){Ui()}},f.createElement(er,{position:"left",extra:ot,prefixCls:fe}),f.createElement(p.a,{onResize:oo},f.createElement("div",{className:w()(hi,(Ke={},Object(L.a)(Ke,"".concat(hi,"-ping-left"),Fi),Object(L.a)(Ke,"".concat(hi,"-ping-right"),Di),Object(L.a)(Ke,"".concat(hi,"-ping-top"),Mo),Object(L.a)(Ke,"".concat(hi,"-ping-bottom"),Bi),Ke)),ref:vr},f.createElement(p.a,{onResize:oo},f.createElement("div",{ref:pr,className:"".concat(fe,"-nav-list"),style:{transform:"translate(".concat(jt,"px, ").concat(Zr,"px)"),transition:ji?"none":void 0}},Zo,f.createElement(Gr,{ref:Ar,prefixCls:fe,locale:ht,editable:pt,style:{visibility:Do?"hidden":null}}),f.createElement("div",{className:w()("".concat(fe,"-ink-bar"),Object(L.a)({},"".concat(fe,"-ink-bar-animated"),He.inkBar)),style:Ri}))))),f.createElement(fr,Object.assign({},Re,{ref:cr,prefixCls:fe,tabs:Nn,className:!Do&&Ei})),f.createElement(er,{position:"right",extra:ot,prefixCls:fe}))}var kr=f.forwardRef(nr);function hr(Re){var Be=Re.id,Ke=Re.activeKey,Le=Re.animated,fe=Re.tabPosition,Oe=Re.rtl,ye=Re.destroyInactiveTabPane,ke=f.useContext(pa),Ne=ke.prefixCls,He=ke.tabs,We=Le.tabPane,Qe=He.findIndex(function(ot){return ot.key===Ke});return f.createElement("div",{className:w()("".concat(Ne,"-content-holder"))},f.createElement("div",{className:w()("".concat(Ne,"-content"),"".concat(Ne,"-content-").concat(fe),Object(L.a)({},"".concat(Ne,"-content-animated"),We)),style:Qe&&We?Object(L.a)({},Oe?"marginRight":"marginLeft","-".concat(Qe,"00%")):null},He.map(function(ot){return f.cloneElement(ot.node,{key:ot.key,prefixCls:Ne,tabKey:ot.key,id:Be,animated:We,active:ot.key===Ke,destroyInactiveTabPane:ye})})))}function pn(Re){var Be=Re.prefixCls,Ke=Re.forceRender,Le=Re.className,fe=Re.style,Oe=Re.id,ye=Re.active,ke=Re.animated,Ne=Re.destroyInactiveTabPane,He=Re.tabKey,We=Re.children,Qe=f.useState(Ke),ot=Object(c.a)(Qe,2),pt=ot[0],ht=ot[1];f.useEffect(function(){ye?ht(!0):Ne&&ht(!1)},[ye,Ne]);var xt={};return ye||(ke?(xt.visibility="hidden",xt.height=0,xt.overflowY="hidden"):xt.display="none"),f.createElement("div",{id:Oe&&"".concat(Oe,"-panel-").concat(He),role:"tabpanel",tabIndex:ye?0:-1,"aria-labelledby":Oe&&"".concat(Oe,"-tab-").concat(He),"aria-hidden":!ye,style:Object(R.a)(Object(R.a)({},xt),fe),className:w()("".concat(Be,"-tabpane"),ye&&"".concat(Be,"-tabpane-active"),Le)},(ye||pt||Ke)&&We)}var rn=0;function _a(Re){return Object(l.a)(Re).map(function(Be){if(f.isValidElement(Be)){var Ke=Be.key!==void 0?String(Be.key):void 0;return Object(R.a)(Object(R.a)({key:Ke},Be.props),{},{node:Be})}return null}).filter(function(Be){return Be})}function Rn(Re,Be){var Ke,Le=Re.id,fe=Re.prefixCls,Oe=fe===void 0?"rc-tabs":fe,ye=Re.className,ke=Re.children,Ne=Re.direction,He=Re.activeKey,We=Re.defaultActiveKey,Qe=Re.editable,ot=Re.animated,pt=Re.tabPosition,ht=pt===void 0?"top":pt,xt=Re.tabBarGutter,Wt=Re.tabBarStyle,ar=Re.tabBarExtraContent,or=Re.locale,ur=Re.moreIcon,vr=Re.moreTransitionName,pr=Re.destroyInactiveTabPane,cr=Re.renderTabBar,Ar=Re.onChange,wr=Re.onTabClick,mn=Re.onTabScroll,Tr=Object(S.a)(Re,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Vt=_a(ke),zt=Ne==="rtl",Sr;ot===!1?Sr={inkBar:!1,tabPane:!1}:Sr=Object(R.a)({inkBar:!0,tabPane:!1},ot!==!0?ot:null);var Rr=Object(f.useState)(!1),jt=Object(c.a)(Rr,2),Mr=jt[0],vn=jt[1];Object(f.useEffect)(function(){vn(Wa())},[]);var jr=Object(i.a)(function(){var Yr;return(Yr=Vt[0])===null||Yr===void 0?void 0:Yr.key},{value:He,defaultValue:We}),Zr=Object(c.a)(jr,2),Vr=Zr[0],Dn=Zr[1],Vn=Object(f.useState)(function(){return Vt.findIndex(function(Yr){return Yr.key===Vr})}),xn=Object(c.a)(Vn,2),ma=xn[0],ka=xn[1];Object(f.useEffect)(function(){var Yr=Vt.findIndex(function(ai){return ai.key===Vr});if(Yr===-1){var za;Yr=Math.max(0,Math.min(ma,Vt.length-1)),Dn((za=Vt[Yr])===null||za===void 0?void 0:za.key)}ka(Yr)},[Vt.map(function(Yr){return Yr.key}).join("_"),Vr,ma]);var ba=Object(i.a)(null,{value:Le}),Yn=Object(c.a)(ba,2),ln=Yn[0],qr=Yn[1],wn=ht;Mr&&!["left","right"].includes(ht)&&(wn="top"),Object(f.useEffect)(function(){Le||(qr("rc-tabs-".concat(rn)),rn+=1)},[]);function gn(Yr,za){wr==null||wr(Yr,za),Dn(Yr),Ar==null||Ar(Yr)}var Ia={id:ln,activeKey:Vr,animated:Sr,tabPosition:wn,rtl:zt,mobile:Mr},ri,ni=Object(R.a)(Object(R.a)({},Ia),{},{editable:Qe,locale:or,moreIcon:ur,moreTransitionName:vr,tabBarGutter:xt,onTabClick:gn,onTabScroll:mn,extra:ar,style:Wt,panes:ke});return cr?ri=cr(ni,kr):ri=f.createElement(kr,Object.assign({},ni)),f.createElement(pa.Provider,{value:{tabs:Vt,prefixCls:Oe}},f.createElement("div",Object.assign({ref:Be,id:Le,className:w()(Oe,"".concat(Oe,"-").concat(wn),(Ke={},Object(L.a)(Ke,"".concat(Oe,"-mobile"),Mr),Object(L.a)(Ke,"".concat(Oe,"-editable"),Qe),Object(L.a)(Ke,"".concat(Oe,"-rtl"),zt),Ke),ye)},Tr),ri,f.createElement(hr,Object.assign({destroyInactiveTabPane:pr},Ia,{animated:Sr}))))}var In=f.forwardRef(Rn);In.TabPane=pn;var Wn=In,Ka=Y.b=Wn},kSUc:function(I,Y,k){},lOMy:function(I,Y,k){},lPiR:function(I,Y,k){(function(L,c){I.exports=Y=c(k("Ib8C"))})(this,function(L){return function(c){var S=L,R=S.lib,f=R.WordArray,s=R.Hasher,w=S.algo,l=[],i=[];(function(){function u(g){for(var v=c.sqrt(g),n=2;n<=v;n++)if(!(g%n))return!1;return!0}function p(g){return(g-(g|0))*4294967296|0}for(var m=2,b=0;b<64;)u(m)&&(b<8&&(l[b]=p(c.pow(m,1/2))),i[b]=p(c.pow(m,1/3)),b++),m++})();var a=[],r=w.SHA256=s.extend({_doReset:function(){this._hash=new f.init(l.slice(0))},_doProcessBlock:function(u,p){for(var m=this._hash.words,b=m[0],g=m[1],v=m[2],n=m[3],d=m[4],h=m[5],C=m[6],T=m[7],o=0;o<64;o++){if(o<16)a[o]=u[p+o]|0;else{var P=a[o-15],O=(P<<25|P>>>7)^(P<<14|P>>>18)^P>>>3,y=a[o-2],x=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;a[o]=O+a[o-7]+x+a[o-16]}var E=d&h^~d&C,_=b&g^b&v^g&v,N=(b<<30|b>>>2)^(b<<19|b>>>13)^(b<<10|b>>>22),j=(d<<26|d>>>6)^(d<<21|d>>>11)^(d<<7|d>>>25),M=T+j+E+i[o]+a[o],H=N+_;T=C,C=h,h=d,d=n+M|0,n=v,v=g,g=b,b=M+H|0}m[0]=m[0]+b|0,m[1]=m[1]+g|0,m[2]=m[2]+v|0,m[3]=m[3]+n|0,m[4]=m[4]+d|0,m[5]=m[5]+h|0,m[6]=m[6]+C|0,m[7]=m[7]+T|0},_doFinalize:function(){var u=this._data,p=u.words,m=this._nDataBytes*8,b=u.sigBytes*8;return p[b>>>5]|=128<<24-b%32,p[(b+64>>>9<<4)+14]=c.floor(m/4294967296),p[(b+64>>>9<<4)+15]=m,u.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var u=s.clone.call(this);return u._hash=this._hash.clone(),u}});S.SHA256=s._createHelper(r),S.HmacSHA256=s._createHmacHelper(r)}(Math),L.SHA256})},lZu9:function(I,Y,k){(function(L){L(k("VrN/"),k("1eCo"),k("8EBN"))})(function(L){"use strict";L.defineMode("markdown",function(c,S){var R=L.getMode(c,"text/html"),f=R.name=="null";function s(B){if(L.findModeByName){var K=L.findModeByName(B);K&&(B=K.mime||K.mimes[0])}var W=L.getMode(c,B);return W.name=="null"?null:W}S.highlightFormatting===void 0&&(S.highlightFormatting=!1),S.maxBlockquoteDepth===void 0&&(S.maxBlockquoteDepth=0),S.taskLists===void 0&&(S.taskLists=!1),S.strikethrough===void 0&&(S.strikethrough=!1),S.emoji===void 0&&(S.emoji=!1),S.fencedCodeBlockHighlighting===void 0&&(S.fencedCodeBlockHighlighting=!0),S.fencedCodeBlockDefaultMode===void 0&&(S.fencedCodeBlockDefaultMode="text/plain"),S.xml===void 0&&(S.xml=!0),S.tokenTypeOverrides===void 0&&(S.tokenTypeOverrides={});var w={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var l in w)w.hasOwnProperty(l)&&S.tokenTypeOverrides[l]&&(w[l]=S.tokenTypeOverrides[l]);var i=/^([*\-_])(?:\s*\1){2,}\s*$/,a=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,u=S.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,m=/^[^#!\[\]*_\\<>` "'(~:]+/,b=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,g=/^\s*\[[^\]]+?\]:.*$/,v=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 d(B,K,W){return K.f=K.inline=W,W(B,K)}function h(B,K,W){return K.f=K.block=W,W(B,K)}function C(B){return!B||!/\S/.test(B.string)}function T(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==P){var K=f;if(!K){var W=L.innerMode(R,B.htmlState);K=W.mode.name=="xml"&&W.state.tagStart===null&&!W.state.context&&W.state.tokenize.isInText}K&&(B.f=E,B.block=o,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function o(B,K){var W=B.column()===K.indentation,J=C(K.prevLine.stream),ee=K.indentedCode,Z=K.prevLine.hr,he=K.list!==!1,ge=(K.listStack[K.listStack.length-1]||0)+3;K.indentedCode=!1;var ie=K.indentation;if(K.indentationDiff===null&&(K.indentationDiff=K.indentation,he)){for(K.list=null;ie<K.listStack[K.listStack.length-1];)K.listStack.pop(),K.listStack.length?K.indentation=K.listStack[K.listStack.length-1]:K.list=!1;K.list!==!1&&(K.indentationDiff=ie-K.listStack[K.listStack.length-1])}var we=!J&&!Z&&!K.prevLine.header&&(!he||!ee)&&!K.prevLine.fencedCodeEnd,me=(K.list===!1||Z||J)&&K.indentation<=ge&&B.match(i),oe=null;if(K.indentationDiff>=4&&(ee||K.prevLine.fencedCodeEnd||K.prevLine.header||J))return B.skipToEnd(),K.indentedCode=!0,w.code;if(B.eatSpace())return null;if(W&&K.indentation<=ge&&(oe=B.match(u))&&oe[1].length<=6)return K.quote=0,K.header=oe[1].length,K.thisLine.header=!0,S.highlightFormatting&&(K.formatting="header"),K.f=K.inline,y(K);if(K.indentation<=ge&&B.eat(">"))return K.quote=W?1:K.quote+1,S.highlightFormatting&&(K.formatting="quote"),B.eatSpace(),y(K);if(!me&&!K.setext&&W&&K.indentation<=ge&&(oe=B.match(a))){var se=oe[1]?"ol":"ul";return K.indentation=ie+B.current().length,K.list=!0,K.quote=0,K.listStack.push(K.indentation),K.em=!1,K.strong=!1,K.code=!1,K.strikethrough=!1,S.taskLists&&B.match(r,!1)&&(K.taskList=!0),K.f=K.inline,S.highlightFormatting&&(K.formatting=["list","list-"+se]),y(K)}else{if(W&&K.indentation<=ge&&(oe=B.match(b,!0)))return K.quote=0,K.fencedEndRE=new RegExp(oe[1]+"+ *$"),K.localMode=S.fencedCodeBlockHighlighting&&s(oe[2]||S.fencedCodeBlockDefaultMode),K.localMode&&(K.localState=L.startState(K.localMode)),K.f=K.block=O,S.highlightFormatting&&(K.formatting="code-block"),K.code=-1,y(K);if(K.setext||(!we||!he)&&!K.quote&&K.list===!1&&!K.code&&!me&&!g.test(B.string)&&(oe=B.lookAhead(1))&&(oe=oe.match(p)))return K.setext?(K.header=K.setext,K.setext=0,B.skipToEnd(),S.highlightFormatting&&(K.formatting="header")):(K.header=oe[0].charAt(0)=="="?1:2,K.setext=K.header),K.thisLine.header=!0,K.f=K.inline,y(K);if(me)return B.skipToEnd(),K.hr=!0,K.thisLine.hr=!0,w.hr;if(B.peek()==="[")return d(B,K,H)}return d(B,K,K.inline)}function P(B,K){var W=R.token(B,K.htmlState);if(!f){var J=L.innerMode(R,K.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||K.md_inside&&B.current().indexOf(">")>-1)&&(K.f=E,K.block=o,K.htmlState=null)}return W}function O(B,K){var W=K.listStack[K.listStack.length-1]||0,J=K.indentation<W,ee=W+3;if(K.fencedEndRE&&K.indentation<=ee&&(J||B.match(K.fencedEndRE))){S.highlightFormatting&&(K.formatting="code-block");var Z;return J||(Z=y(K)),K.localMode=K.localState=null,K.block=o,K.f=E,K.fencedEndRE=null,K.code=0,K.thisLine.fencedCodeEnd=!0,J?h(B,K,K.block):Z}else return K.localMode?K.localMode.token(B,K.localState):(B.skipToEnd(),w.code)}function y(B){var K=[];if(B.formatting){K.push(w.formatting),typeof B.formatting=="string"&&(B.formatting=[B.formatting]);for(var W=0;W<B.formatting.length;W++)K.push(w.formatting+"-"+B.formatting[W]),B.formatting[W]==="header"&&K.push(w.formatting+"-"+B.formatting[W]+"-"+B.header),B.formatting[W]==="quote"&&(!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=B.quote?K.push(w.formatting+"-"+B.formatting[W]+"-"+B.quote):K.push("error"))}if(B.taskOpen)return K.push("meta"),K.length?K.join(" "):null;if(B.taskClosed)return K.push("property"),K.length?K.join(" "):null;if(B.linkHref?K.push(w.linkHref,"url"):(B.strong&&K.push(w.strong),B.em&&K.push(w.em),B.strikethrough&&K.push(w.strikethrough),B.emoji&&K.push(w.emoji),B.linkText&&K.push(w.linkText),B.code&&K.push(w.code),B.image&&K.push(w.image),B.imageAltText&&K.push(w.imageAltText,"link"),B.imageMarker&&K.push(w.imageMarker)),B.header&&K.push(w.header,w.header+"-"+B.header),B.quote&&(K.push(w.quote),!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=B.quote?K.push(w.quote+"-"+B.quote):K.push(w.quote+"-"+S.maxBlockquoteDepth)),B.list!==!1){var J=(B.listStack.length-1)%3;J?J===1?K.push(w.list2):K.push(w.list3):K.push(w.list1)}return B.trailingSpaceNewLine?K.push("trailing-space-new-line"):B.trailingSpace&&K.push("trailing-space-"+(B.trailingSpace%2?"a":"b")),K.length?K.join(" "):null}function x(B,K){return B.match(m,!0)?y(K):void 0}function E(B,K){var W=K.text(B,K);if(typeof W!="undefined")return W;if(K.list)return K.list=null,y(K);if(K.taskList){var J=B.match(r,!0)[1]===" ";return J?K.taskOpen=!0:K.taskClosed=!0,S.highlightFormatting&&(K.formatting="task"),K.taskList=!1,y(K)}if(K.taskOpen=!1,K.taskClosed=!1,K.header&&B.match(/^#+$/,!0))return S.highlightFormatting&&(K.formatting="header"),y(K);var ee=B.next();if(K.linkTitle){K.linkTitle=!1;var Z=ee;ee==="("&&(Z=")"),Z=(Z+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var he="^\\s*(?:[^"+Z+"\\\\]+|\\\\\\\\|\\\\.)"+Z;if(B.match(new RegExp(he),!0))return w.linkHref}if(ee==="`"){var ge=K.formatting;S.highlightFormatting&&(K.formatting="code"),B.eatWhile("`");var ie=B.current().length;if(K.code==0&&(!K.quote||ie==1))return K.code=ie,y(K);if(ie==K.code){var we=y(K);return K.code=0,we}else return K.formatting=ge,y(K)}else if(K.code)return y(K);if(ee==="\\"&&(B.next(),S.highlightFormatting)){var me=y(K),oe=w.formatting+"-escape";return me?me+" "+oe:oe}if(ee==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return K.imageMarker=!0,K.image=!0,S.highlightFormatting&&(K.formatting="image"),y(K);if(ee==="["&&K.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return K.imageMarker=!1,K.imageAltText=!0,S.highlightFormatting&&(K.formatting="image"),y(K);if(ee==="]"&&K.imageAltText){S.highlightFormatting&&(K.formatting="image");var me=y(K);return K.imageAltText=!1,K.image=!1,K.inline=K.f=N,me}if(ee==="["&&!K.image)return K.linkText&&B.match(/^.*?\]/)||(K.linkText=!0,S.highlightFormatting&&(K.formatting="link")),y(K);if(ee==="]"&&K.linkText){S.highlightFormatting&&(K.formatting="link");var me=y(K);return K.linkText=!1,K.inline=K.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?N:E,me}if(ee==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){K.f=K.inline=_,S.highlightFormatting&&(K.formatting="link");var me=y(K);return me?me+=" ":me="",me+w.linkInline}if(ee==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){K.f=K.inline=_,S.highlightFormatting&&(K.formatting="link");var me=y(K);return me?me+=" ":me="",me+w.linkEmail}if(S.xml&&ee==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var se=B.string.indexOf(">",B.pos);if(se!=-1){var te=B.string.substring(B.start,se);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(te)&&(K.md_inside=!0)}return B.backUp(1),K.htmlState=L.startState(R),h(B,K,P)}if(S.xml&&ee==="<"&&B.match(/^\/\w*?>/))return K.md_inside=!1,"tag";if(ee==="*"||ee==="_"){for(var be=1,q=B.pos==1?" ":B.string.charAt(B.pos-2);be<3&&B.eat(ee);)be++;var ae=B.peek()||" ",xe=!/\s/.test(ae)&&(!v.test(ae)||/\s/.test(q)||v.test(q)),ne=!/\s/.test(q)&&(!v.test(q)||/\s/.test(ae)||v.test(ae)),Q=null,X=null;if(be%2&&(!K.em&&xe&&(ee==="*"||!ne||v.test(q))?Q=!0:K.em==ee&&ne&&(ee==="*"||!xe||v.test(ae))&&(Q=!1)),be>1&&(!K.strong&&xe&&(ee==="*"||!ne||v.test(q))?X=!0:K.strong==ee&&ne&&(ee==="*"||!xe||v.test(ae))&&(X=!1)),X!=null||Q!=null){S.highlightFormatting&&(K.formatting=Q==null?"strong":X==null?"em":"strong em"),Q===!0&&(K.em=ee),X===!0&&(K.strong=ee);var we=y(K);return Q===!1&&(K.em=!1),X===!1&&(K.strong=!1),we}}else if(ee===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return y(K);B.backUp(1)}if(S.strikethrough){if(ee==="~"&&B.eatWhile(ee)){if(K.strikethrough){S.highlightFormatting&&(K.formatting="strikethrough");var we=y(K);return K.strikethrough=!1,we}else if(B.match(/^[^\s]/,!1))return K.strikethrough=!0,S.highlightFormatting&&(K.formatting="strikethrough"),y(K)}else if(ee===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return y(K);B.backUp(2)}}if(S.emoji&&ee===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){K.emoji=!0,S.highlightFormatting&&(K.formatting="emoji");var $=y(K);return K.emoji=!1,$}return ee===" "&&(B.match(/^ +$/,!1)?K.trailingSpace++:K.trailingSpace&&(K.trailingSpaceNewLine=!0)),y(K)}function _(B,K){var W=B.next();if(W===">"){K.f=K.inline=E,S.highlightFormatting&&(K.formatting="link");var J=y(K);return J?J+=" ":J="",J+w.linkInline}return B.match(/^[^>]+/,!0),w.linkInline}function N(B,K){if(B.eatSpace())return null;var W=B.next();return W==="("||W==="["?(K.f=K.inline=M(W==="("?")":"]"),S.highlightFormatting&&(K.formatting="link-string"),K.linkHref=!0,y(K)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function M(B){return function(K,W){var J=K.next();if(J===B){W.f=W.inline=E,S.highlightFormatting&&(W.formatting="link-string");var ee=y(W);return W.linkHref=!1,ee}return K.match(j[B]),W.linkHref=!0,y(W)}}function H(B,K){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(K.f=z,B.next(),S.highlightFormatting&&(K.formatting="link"),K.linkText=!0,y(K)):d(B,K,E)}function z(B,K){if(B.match(/^\]:/,!0)){K.f=K.inline=F,S.highlightFormatting&&(K.formatting="link");var W=y(K);return K.linkText=!1,W}return B.match(/^([^\]\\]|\\.)+/,!0),w.linkText}function F(B,K){return B.eatSpace()?null:(B.match(/^[^\s]+/,!0),B.peek()===void 0?K.linkTitle=!0:B.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),K.f=K.inline=E,w.linkHref+" url")}var G={startState:function(){return{f:o,prevLine:{stream:null},thisLine:{stream:null},block:o,htmlState:null,indentation:0,inline:E,text:x,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(B){return{f:B.f,prevLine:B.prevLine,thisLine:B.thisLine,block:B.block,htmlState:B.htmlState&&L.copyState(R,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?L.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,K){if(K.formatting=!1,B!=K.thisLine.stream){if(K.header=0,K.hr=!1,B.match(/^\s*$/,!0))return T(K),null;if(K.prevLine=K.thisLine,K.thisLine={stream:B},K.taskList=!1,K.trailingSpace=0,K.trailingSpaceNewLine=!1,!K.localState&&(K.f=K.block,K.f!=P)){var W=B.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(K.indentation=W,K.indentationDiff=null,W>0)return null}}return K.f(B,K)},innerMode:function(B){return B.block==P?{state:B.htmlState,mode:R}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:G}},indent:function(B,K,W){return B.block==P&&R.indent?R.indent(B.htmlState,K,W):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,K,W):L.Pass},blankLine:T,getType:y,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return G},"xml"),L.defineMIME("text/markdown","markdown"),L.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 Y})(function(){var define,module,exports;return function(){function I(Y,k,L){function c(f,s){if(!k[f]){if(!Y[f]){var w=typeof require=="function"&&require;if(!s&&w)return require(f,!0);if(S)return S(f,!0);var l=new Error("Cannot find module '"+f+"'");throw l.code="MODULE_NOT_FOUND",l}var i=k[f]={exports:{}};Y[f][0].call(i.exports,function(a){var r=Y[f][1][a];return c(r||a)},i,i.exports,I,Y,k,L)}return k[f].exports}for(var S=typeof require=="function"&&require,R=0;R<L.length;R++)c(L[R]);return c}return I}()({1:[function(I,Y,k){"use strict";var L=I("./browser/client");L.Buffer=I("buffer").Buffer,L.urllib=I("../shims/xhr"),L.version=I("./browser/version").version,Y.exports=L},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(I,Y,k){(function(L,c){"use strict";var S=I("babel-runtime/core-js/promise"),R=i(S),f=I("babel-runtime/regenerator"),s=i(f),w=I("babel-runtime/core-js/object/assign"),l=i(w);function i(H){return H&&H.__esModule?H:{default:H}}var a=I("debug")("ali-oss"),r=I("copy-to"),u=I("xml2js"),p=I("agentkeepalive"),m=I("merge-descriptors"),b=I("url"),g=I("is-type-of"),v=I("platform"),n=I("utility"),d=I("urllib"),h=I("./version"),C=I("bowser"),T=I("../common/signUtils"),o=I("../common/utils/isIP"),P=o.isIP,O=I("../common/client/initOptions"),y=I("../common/utils/createRequest"),x=y.createRequest,E=new p;function _(){var H=v.name,z=v.version;H&&H.toLowerCase&&H.toLowerCase()==="ie"&&z.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function N(){return location&&location.protocol==="https:"}function j(H,z){if(_(),!(this instanceof j))return new j(H,z);H&&H.inited?this.options=H:this.options=j.initOptions(H),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=d,this.agent=this.options.agent||E),this.ctx=z,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}Y.exports=j,j.initOptions=function(z){z.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var F=(0,l.default)({secure:N(),useFetch:!1},z);return O(F)};var M=j.prototype;M.debug=a,m(M,I("./object")),m(M,I("../common/bucket/getBucketWebsite")),m(M,I("../common/bucket/putBucketWebsite")),m(M,I("../common/bucket/deleteBucketWebsite")),m(M,I("../common/bucket/getBucketLifecycle")),m(M,I("../common/bucket/putBucketLifecycle")),m(M,I("../common/bucket/deleteBucketLifecycle")),m(M,I("../common/bucket/putBucketVersioning")),m(M,I("../common/bucket/getBucketVersioning")),m(M,I("./managed-upload")),m(M,I("../common/multipart")),m(M,I("../common/parallel")),M.signature=function(z){return this.debug("authorization stringToSign: %s",z,"info"),T.computeSignature(this.options.accessKeySecret,z)},M.authorization=function(z,F,G,B){var K=T.buildCanonicalString(z.toUpperCase(),F,{headers:B,parameters:G});return T.authorization(this.options.accessKeyId,this.options.accessKeySecret,K)},M.request=function(z){var F,G,B,K,W,J;return s.default.async(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return F=x.call(this,z),this.options.useFetch||(F.params.mode="disable-fetch"),G=void 0,B=void 0,K=!!z.stream,Z.prev=5,Z.next=8,s.default.awrap(this.urllib.request(F.url,F.params));case 8:G=Z.sent,this.debug("response %s %s, got %s, headers: %j",z.method,F.url,G.status,G.headers,"info"),Z.next=15;break;case 12:Z.prev=12,Z.t0=Z.catch(5),B=Z.t0;case 15:if(W=void 0,!(G&&z.successStatuses&&z.successStatuses.indexOf(G.status)===-1)){Z.next=28;break}return Z.next=19,s.default.awrap(this.requestError(G));case 19:if(W=Z.sent,!(W.code==="RequestTimeTooSkewed"&&!K)){Z.next=25;break}return this.options.amendTimeSkewed=+new Date(W.serverTime)-new Date,Z.next=24,s.default.awrap(this.request(z));case 24:return Z.abrupt("return",Z.sent);case 25:W.params=z,Z.next=32;break;case 28:if(!B){Z.next=32;break}return Z.next=31,s.default.awrap(this.requestError(B));case 31:W=Z.sent;case 32:if(!W){Z.next=34;break}throw W;case 34:if(!z.xmlResponse){Z.next=39;break}return Z.next=37,s.default.awrap(this.parseXML(G.data));case 37:J=Z.sent,G.data=J;case 39:return Z.abrupt("return",G);case 40:case"end":return Z.stop()}},null,this,[[5,12]])},M._getResource=function(z){var F="/";return z.bucket&&(F+=z.bucket+"/"),z.object&&(F+=z.object),F},M._isIP=P,M._escape=function(z){return n.encodeURIComponent(z).replace(/%2F/g,"/")},M._getReqUrl=function(z){var F={};r(this.options.endpoint).to(F);var G=this._isIP(F.hostname),B=this.options.cname;z.bucket&&!B&&!G&&(F.host=z.bucket+"."+F.host);var K="/";z.bucket&&G&&(K+=z.bucket+"/"),z.object&&(K+=this._escape(z.object).replace(/\+/g,"%2B")),F.pathname=K;var W={};if(z.query&&m(W,z.query),z.subres){var J={};g.string(z.subres)?J[z.subres]="":g.array(z.subres)?z.subres.forEach(function(ee){J[ee]=""}):J=z.subres,m(W,J)}return F.query=W,b.format(F)},M._getUserAgent=function(){var z=c&&c.browser?"js":"nodejs",F="aliyun-sdk-"+z+"/"+h.version,G=v.description;return!G&&c&&(G="Node.js "+c.version.slice(1)+" on "+c.platform+" "+c.arch),this._checkUserAgent(F+" "+G)},M._checkUserAgent=function(z){var F=z.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return F},M.checkBrowserAndVersion=function(z,F){return C.name===z&&C.version.split(".")[0]===F},M.parseXML=function(z){return new R.default(function(F,G){L.isBuffer(z)&&(z=z.toString()),u.parseString(z,{explicitRoot:!1,explicitArray:!1},function(B,K){B?G(B):F(K)})})},M.requestError=function(z){var F,G,B,K;return s.default.async(function(J){for(;;)switch(J.prev=J.next){case 0:if(F=null,!(!z.data||!z.data.length)){J.next=5;break}z.status===-1||z.status===-2?(F=new Error(z.message),F.name=z.name,F.status=z.status,F.code=z.name):(z.status===404?(F=new Error("Object not exists"),F.name="NoSuchKeyError",F.status=404,F.code="NoSuchKey"):z.status===412?(F=new Error("Pre condition failed"),F.name="PreconditionFailedError",F.status=412,F.code="PreconditionFailed"):(F=new Error("Unknow error, status: "+z.status),F.name="UnknowError",F.status=z.status),F.requestId=z.headers["x-oss-request-id"],F.host=""),J.next=33;break;case 5:return G=String(z.data),this.debug("request response error data: %s",G,"error"),B=void 0,J.prev=8,J.next=11,s.default.awrap(this.parseXML(G));case 11:if(J.t0=J.sent,J.t0){J.next=14;break}J.t0={};case 14:B=J.t0,J.next=24;break;case 17:return J.prev=17,J.t1=J.catch(8),this.debug(G,"error"),J.t1.message+=`
raw xml: `+G,J.t1.status=z.status,J.t1.requestId=z.headers["x-oss-request-id"],J.abrupt("return",J.t1);case 24:K=B.Message||"unknow request error, status: "+z.status,B.Condition&&(K+=" (condition: "+B.Condition+")"),F=new Error(K),F.name=B.Code?B.Code+"Error":"UnknowError",F.status=z.status,F.code=B.Code,F.requestId=B.RequestId,F.hostId=B.HostId,F.serverTime=B.ServerTime;case 33:return this.debug("generate error %j",F,"error"),J.abrupt("return",F);case 35:case"end":return J.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,Y,k){(function(L){"use strict";var c=I("babel-runtime/core-js/array/from"),S=l(c),R=I("babel-runtime/core-js/promise"),f=l(R),s=I("babel-runtime/regenerator"),w=l(s);function l(T){return T&&T.__esModule?T:{default:T}}var i=I("is-type-of"),a=I("util"),r=I("path"),u=I("mime"),p=I("copy-to"),m=I("../common/utils/isBlob"),b=m.isBlob,g=I("../common/utils/isFile"),v=g.isFile,n=k;n.multipartUpload=function(o,P,O){var y,x,E,_,N,j,M,H,z;return w.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){G.next=6;break}return G.next=5,w.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return G.abrupt("return",G.sent);case 6:return y=100*1024,O.mime||(v(P)?O.mime=u.getType(r.extname(P.name)):b(P)?O.mime=P.type:O.mime=u.getType(r.extname(P))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),G.next=12,w.default.awrap(this._getFileSize(P));case 12:if(x=G.sent,!(x<y)){G.next=25;break}return E=this._createStream(P,0,x),O.contentLength=x,G.next=18,w.default.awrap(this.putStream(o,E,O));case 18:if(_=G.sent,!(O&&O.progress)){G.next=22;break}return G.next=22,w.default.awrap(O.progress(1));case 22:return N={res:_.res,bucket:this.options.bucket,name:o,etag:_.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(N.data=_.data),G.abrupt("return",N);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){G.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<y)){G.next=29;break}throw new Error("partSize must not be smaller than "+y);case 29:return G.next=31,w.default.awrap(this.initMultipartUpload(o,O));case 31:if(j=G.sent,M=j.uploadId,H=this._getPartSize(x,O.partSize),z={file:P,name:o,fileSize:x,partSize:H,uploadId:M,doneParts:[]},!(O&&O.progress)){G.next=38;break}return G.next=38,w.default.awrap(O.progress(0,z,j.res));case 38:return G.next=40,w.default.awrap(this._resumeMultipart(z,O));case 40:return G.abrupt("return",G.sent);case 41:case"end":return G.stop()}},null,this)},n._resumeMultipart=function(o,P){var O,y,x,E,_,N,j,M,H,z,F,G,B,K,W,J,ee,Z;return w.default.async(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(O=this,!this.isCancel()){ge.next=3;break}throw this._makeCancelEvent();case 3:return y=o.file,x=o.fileSize,E=o.partSize,_=o.uploadId,N=o.doneParts,j=o.name,M=[],N.length>0&&p(N).to(M),H=this._divideParts(x,E),z=H.length,F=!1,G=function(we,me){var oe=this;return new f.default(function(te,be){var q,ae,xe,ne;return w.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,we.isCancel()){X.next=18;break}return q=H[me-1],ae={stream:we._createStream(y,q.start,q.end),size:q.end-q.start},X.next=6,w.default.awrap(we._uploadPart(j,_,me,ae));case 6:if(xe=X.sent,!(!we.isCancel()&&!F)){X.next=15;break}if(o.doneParts.push({number:me,etag:xe.res.headers.etag}),!P.progress){X.next=12;break}return X.next=12,w.default.awrap(P.progress(N.length/z,o,xe.res));case 12:te({number:me,etag:xe.res.headers.etag}),X.next=16;break;case 15:te();case 16:X.next=19;break;case 18:te();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),ne=new Error,ne.name=X.t0.name,ne.message=X.t0.message,ne.stack=X.t0.stack,ne.partNum=me,p(X.t0).to(ne),be(ne);case 30:case"end":return X.stop()}},null,oe,[[0,21]])})},B=(0,S.default)(new Array(z),function(ie,we){return we+1}),K=M.map(function(ie){return ie.number}),W=B.filter(function(ie){return K.indexOf(ie)<0}),J=5,ee=P.parallel||J,ge.next=17,w.default.awrap(this._parallel(W,ee,function(ie){return new f.default(function(we,me){G(O,ie).then(function(oe){oe&&M.push(oe),we()}).catch(function(oe){me(oe)})})}));case 17:if(Z=ge.sent,F=!0,!this.isCancel()){ge.next=22;break}throw G=null,this._makeCancelEvent();case 22:if(!(Z&&Z.length>0)){ge.next=25;break}throw Z[0].message="Failed to upload some parts with error: "+Z[0].toString()+" part_num: "+Z[0].partNum,Z[0];case 25:return ge.next=27,w.default.awrap(this.completeMultipartUpload(j,_,M,P));case 27:return ge.abrupt("return",ge.sent);case 28:case"end":return ge.stop()}},null,this)},n._getFileSize=function(o){return w.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!i.buffer(o)){O.next=4;break}return O.abrupt("return",o.length);case 4:if(!(b(o)||v(o))){O.next=6;break}return O.abrupt("return",o.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var d=I("stream"),h=d.Readable;function C(T,o){if(!(this instanceof C))return new C(T,o);h.call(this,o),this.file=T,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}a.inherits(C,h),C.prototype.readFileAndPush=function(o){if(this.fileBuffer)for(var P=!0;P&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,y=O+o;y=y>this.fileBuffer.length?this.fileBuffer.length:y,this.start=y,P=this.push(this.fileBuffer.slice(O,y))}},C.prototype._read=function(o){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var P=16*1024;o=o||P;var O=this;this.reader.onload=function(x){O.fileBuffer=L.from(new Uint8Array(x.target.result)),O.file=null,O.readFileAndPush(o)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(o)},n._createStream=function(o,P,O){if(b(o)||v(o))return new C(o.slice(P,O));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(o,P){var O=10*1e3,y=1024*1024;return P?Math.max(Math.ceil(o/O),P):y},n._divideParts=function(o,P){for(var O=Math.ceil(o/P),y=[],x=0;x<O;x++){var E=P*x,_=Math.min(E+P,o);y.push({start:E,end:_})}return y}}).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,Y,k){"use strict";var L=I("babel-runtime/core-js/promise"),c=i(L),S=I("babel-runtime/core-js/object/keys"),R=i(S),f=I("babel-runtime/core-js/object/assign"),s=i(f),w=I("babel-runtime/regenerator"),l=i(w);function i(O){return O&&O.__esModule?O:{default:O}}var a=I("utility"),r=I("fs"),u=I("is-type-of"),p=I("url"),m=I("copy-to"),b=I("path"),g=I("mime"),v=I("../common/callback"),n=I("../common/signUtils"),d=I("merge-descriptors"),h=I("../common/utils/isBlob"),C=h.isBlob,T=I("../common/utils/isFile"),o=T.isFile,P=k;P.append=function(y,x,E){var _;return l.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,l.default.awrap(this.put(y,x,E));case 6:return _=j.sent,_.nextAppendPosition=_.res.headers["x-oss-next-append-position"],j.abrupt("return",_);case 9:case"end":return j.stop()}},null,this)},P.put=function(y,x,E){var _,N,j,M,H,z,F;return l.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(_=void 0,E=E||{},y=this._objectName(y),!u.buffer(x)){B.next=7;break}_=x,B.next=33;break;case 7:if(!(C(x)||o(x))){B.next=32;break}return E.mime||(o(x)?E.mime=g.getType(b.extname(x.name)):E.mime=x.type),N=this._createStream(x,0,x.size),B.next=12,l.default.awrap(this._getFileSize(x));case 12:return E.contentLength=B.sent,B.prev=13,B.next=16,l.default.awrap(this.putStream(y,N,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,l.default.awrap(this.put(y,x,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),M=E.method||"PUT",H=this._objectRequestParams(M,y,E),v.encodeCallback(H,E),H.mime=E.mime,H.content=_,H.successStatuses=[200],B.next=43,l.default.awrap(this.request(H));case 43:return z=B.sent,F={name:y,url:this._objectUrl(y),res:z.res},H.headers&&H.headers["x-oss-callback"]&&(F.data=JSON.parse(z.data.toString())),B.abrupt("return",F);case 47:case"end":return B.stop()}},null,this,[[13,20]])},P.putStream=function(y,x,E){var _,N,j,M;return l.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return E=E||{},E.headers=E.headers||{},y=this._objectName(y),E.contentLength?E.headers["Content-Length"]=E.contentLength:E.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(E.meta,E.headers),_=E.method||"PUT",N=this._objectRequestParams(_,y,E),v.encodeCallback(N,E),N.mime=E.mime,N.stream=x,N.successStatuses=[200],z.next=13,l.default.awrap(this.request(N));case 13:return j=z.sent,M={name:y,url:this._objectUrl(y),res:j.res},N.headers&&N.headers["x-oss-callback"]&&(M.data=JSON.parse(j.data.toString())),z.abrupt("return",M);case 17:case"end":return z.stop()}},null,this)},d(P,I("../common/object/copyObject")),d(P,I("../common/object/getObjectTagging")),d(P,I("../common/object/putObjectTagging")),d(P,I("../common/object/deleteObjectTagging")),d(P,I("../common/image")),d(P,I("../common/object/getBucketVersions")),d(P,I("../common/object/getACL")),d(P,I("../common/object/putACL")),d(P,I("../common/object/head")),d(P,I("../common/object/delete")),d(P,I("../common/object/get")),d(P,I("../common/object/putSymlink")),d(P,I("../common/object/getSymlink")),d(P,I("../common/object/deleteMulti")),d(P,I("../common/object/getObjectMeta")),P.putMeta=function(y,x,E){var _;return l.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,l.default.awrap(this.copy(y,y,{meta:x||{},timeout:E&&E.timeout,ctx:E&&E.ctx}));case 2:return _=j.sent,j.abrupt("return",_);case 4:case"end":return j.stop()}},null,this)},P.list=function(y,x){var E,_,N,j,M;return l.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return E=this._objectRequestParams("GET","",x),E.query=y,E.xmlResponse=!0,E.successStatuses=[200],z.next=6,l.default.awrap(this.request(E));case 6:return _=z.sent,N=_.data.Contents,j=this,N&&(Array.isArray(N)||(N=[N]),N=N.map(function(F){return{name:F.Key,url:j._objectUrl(F.Key),lastModified:F.LastModified,etag:F.ETag,type:F.Type,size:Number(F.Size),storageClass:F.StorageClass,owner:{id:F.Owner.ID,displayName:F.Owner.DisplayName}}})),M=_.data.CommonPrefixes||null,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(F){return F.Prefix})),z.abrupt("return",{res:_.res,objects:N,prefixes:M,nextMarker:_.data.NextMarker||null,isTruncated:_.data.IsTruncated==="true"});case 13:case"end":return z.stop()}},null,this)},P.restore=function(y,x){var E,_;return l.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return x=x||{},x.subres=(0,s.default)({restore:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),E=this._objectRequestParams("POST",y,x),E.successStatuses=[202],j.next=7,l.default.awrap(this.request(E));case 7:return _=j.sent,j.abrupt("return",{res:_.res});case 9:case"end":return j.stop()}},null,this)},P.signatureUrl=function(y,x){x=x||{},y=this._objectName(y),x.method=x.method||"GET";var E=a.timestamp()+(x.expires||1800),_={bucket:this.options.bucket,object:y},N=this._getResource(_);this.options.stsToken&&(x["security-token"]=this.options.stsToken);var j=n._signatureForURL(this.options.accessKeySecret,x,N,E),M=p.parse(this._getReqUrl(_));return M.query={OSSAccessKeyId:this.options.accessKeyId,Expires:E,Signature:j.Signature},m(j.subResource).to(M.query),M.format()},P.getObjectUrl=function(y,x){return x?x[x.length-1]!=="/"&&(x+="/"):x=this.options.endpoint.format(),x+this._escape(this._objectName(y))},P._objectUrl=function(y){return this._getReqUrl({bucket:this.options.bucket,object:y})},P.generateObjectUrl=function(O,y){if(y)y[y.length-1]!=="/"&&(y+="/");else{y=this.options.endpoint.format();var x=p.parse(y),E=this.options.bucket;x.hostname=E+"."+x.hostname,x.host=E+"."+x.host,y=x.format()}return y+this._escape(this._objectName(O))},P._objectRequestParams=function(y,x,E){if(!this.options.bucket)throw new Error("Please create a bucket first");E=E||{},x=this._objectName(x);var _={object:x,bucket:this.options.bucket,method:y,subres:E&&E.subres,timeout:E&&E.timeout,ctx:E&&E.ctx};return E.headers&&(_.headers={},m(E.headers).to(_.headers)),_},P._objectName=function(y){return y.replace(/^\/+/,"")},P._convertMetaToHeaders=function(y,x){if(!y)return;(0,R.default)(y).forEach(function(E){x["x-oss-meta-"+E]=y[E]})},P._deleteFileSafe=function(y){var x=this;return new c.default(function(E){r.exists(y,function(_){_?r.unlink(y,function(N){N&&x.debug("unlink %j error: %s",y,N,"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,Y,k){"use strict";k.version="6.10.0"},{}],6:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=S(L);function S(w){return w&&w.__esModule?w:{default:w}}var R=I("../utils/checkBucketName"),f=R.checkBucketName,s=k;s.deleteBucketLifecycle=function(l,i){var a,r;return c.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return f(l),a=this._bucketRequestParams("DELETE",l,"lifecycle",i),a.successStatuses=[204],p.next=5,c.default.awrap(this.request(a));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,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=S(L);function S(w){return w&&w.__esModule?w:{default:w}}var R=I("../utils/checkBucketName"),f=R.checkBucketName,s=k;s.deleteBucketWebsite=function(l,i){var a,r;return c.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return f(l),a=this._bucketRequestParams("DELETE",l,"website",i),a.successStatuses=[204],p.next=5,c.default.awrap(this.request(a));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,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=S(L);function S(r){return r&&r.__esModule?r:{default:r}}var R=I("../utils/checkBucketName"),f=R.checkBucketName,s=I("../utils/isArray"),w=s.isArray,l=I("../utils/formatObjKey"),i=l.formatObjKey,a=k;a.getBucketLifecycle=function(u,p){var m,b,g;return c.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return f(u),m=this._bucketRequestParams("GET",u,"lifecycle",p),m.successStatuses=[200],m.xmlResponse=!0,n.next=6,c.default.awrap(this.request(m));case 6:return b=n.sent,g=b.data.Rule||null,g&&(w(g)||(g=[g]),g=g.map(function(d){return d.ID&&(d.id=d.ID,delete d.ID),d.Tag&&!w(d.Tag)&&(d.Tag=[d.Tag]),i(d,"firstLowerCase")})),n.abrupt("return",{rules:g,res:b.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,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=S(L);function S(w){return w&&w.__esModule?w:{default:w}}var R=I("../utils/checkBucketName"),f=R.checkBucketName,s=k;s.getBucketVersioning=function(l,i){var a,r,u;return c.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return f(l),a=this._bucketRequestParams("GET",l,"versioning",i),a.xmlResponse=!0,a.successStatuses=[200],m.next=6,c.default.awrap(this.request(a));case 6:return r=m.sent,u=r.data.Status,m.abrupt("return",{status:r.status,versionStatus:u,res:r.res});case 9:case"end":return m.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=S(L);function S(i){return i&&i.__esModule?i:{default:i}}var R=I("../utils/checkBucketName"),f=R.checkBucketName,s=I("../utils/isObject"),w=s.isObject,l=k;l.getBucketWebsite=function(a,r){var u,p,m;return c.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return f(a),u=this._bucketRequestParams("GET",a,"website",r),u.successStatuses=[200],u.xmlResponse=!0,g.next=6,c.default.awrap(this.request(u));case 6:return p=g.sent,m=[],p.data.RoutingRules&&p.data.RoutingRules.RoutingRule&&(w(p.data.RoutingRules.RoutingRule)?m=[p.data.RoutingRules.RoutingRule]:m=p.data.RoutingRules.RoutingRule),g.abrupt("return",{index:p.data.IndexDocument&&p.data.IndexDocument.Suffix||"",supportSubDir:p.data.IndexDocument&&p.data.IndexDocument.SupportSubDir||"false",type:p.data.IndexDocument&&p.data.IndexDocument.Type,routingRules:m,error:p.data.ErrorDocument&&p.data.ErrorDocument.Key||null,res:p.res});case 10:case"end":return g.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=S(L);function S(o){return o&&o.__esModule?o:{default:o}}var R=I("../utils/checkBucketName"),f=R.checkBucketName,s=I("../utils/isArray"),w=s.isArray,l=I("../utils/deepCopy"),i=l.deepCopy,a=I("../utils/isObject"),r=a.isObject,u=I("../utils/obj2xml"),p=u.obj2xml,m=I("../utils/checkObjectTag"),b=m.checkObjectTag,g=I("../utils/getStrBytesCount"),v=g.getStrBytesCount,n=k;n.putBucketLifecycle=function(P,O,y){var x,E,_,N,j;return c.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:if(f(P),w(O)){H.next=3;break}throw new Error("rules must be Array");case 3:return x=this._bucketRequestParams("PUT",P,"lifecycle",y),E=[],_={LifecycleConfiguration:{Rule:E}},O.forEach(function(z){d(z),T(z),z.id&&(z.ID=z.id,delete z.id),E.push(z)}),N=p(_,{headers:!0,firstUpperCase:!0}),x.content=N,x.mime="xml",x.successStatuses=[200],H.next=13,c.default.awrap(this.request(x));case 13:return j=H.sent,H.abrupt("return",{res:j.res});case 15:case"end":return H.stop()}},null,this)};function d(o){o.days&&(o.expiration={days:o.days}),o.date&&(o.expiration={createdBeforeDate:o.date})}function h(o,P){var O=o.days,y=o.createdBeforeDate;if(!O&&!y)throw new Error(P+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(y&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(y))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function C(o){if(!w(o)&&!r(o))throw new Error("tag must be Object or Array");o=r(o)?[o]:o;var P={},O=i(o);O.forEach(function(y){P[y.key]=y.value}),b(P)}function T(o){if(o.id&&v(o.id)>255)throw new Error("ID is composed of 255 bytes at most");if(o.prefix===""||o.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(o.status))throw new Error("Status must be Enabled or Disabled");if(o.transition){if(!["IA","Archive"].includes(o.transition.storageClass))throw new Error("StorageClass must be IA or Archive");h(o.transition,"Transition")}if(o.expiration){if(!o.expiration.expiredObjectDeleteMarker)h(o.expiration,"Expiration");else if(o.expiration.days||o.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(o.abortMultipartUpload&&h(o.abortMultipartUpload,"AbortMultipartUpload"),!o.expiration&&!o.abortMultipartUpload&&!o.transition&&!o.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(o.tag){if(o.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");C(o.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,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=S(L);function S(i){return i&&i.__esModule?i:{default:i}}var R=I("../utils/checkBucketName"),f=R.checkBucketName,s=I("../utils/obj2xml"),w=s.obj2xml,l=k;l.putBucketVersioning=function(a,r){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,m,b;return c.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:if(f(a),["Enabled","Suspended"].includes(r)){v.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return p=this._bucketRequestParams("PUT",a,"versioning",u),m={VersioningConfiguration:{Status:r}},p.mime="xml",p.content=w(m,{headers:!0}),v.next=9,c.default.awrap(this.request(p));case 9:return b=v.sent,v.abrupt("return",{res:b.res,status:b.status});case 11:case"end":return v.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=S(L);function S(r){return r&&r.__esModule?r:{default:r}}var R=I("../utils/checkBucketName"),f=R.checkBucketName,s=I("../utils/obj2xml"),w=s.obj2xml,l=I("../utils/isArray"),i=l.isArray,a=k;a.putBucketWebsite=function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments[2],b,g,v,n,d;return c.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(f(u),b=this._bucketRequestParams("PUT",u,"website",m),g={Suffix:p.index||"index.html"},v={IndexDocument:g},n={WebsiteConfiguration:v},p.supportSubDir&&(g.SupportSubDir=p.supportSubDir),p.type&&(g.Type=p.type),p.error&&(v.ErrorDocument={Key:p.error}),!(p.routingRules!==void 0)){C.next=12;break}if(i(p.routingRules)){C.next=11;break}throw new Error("RoutingRules must be Array");case 11:v.RoutingRules={RoutingRule:p.routingRules};case 12:return n=w(n),b.content=n,b.mime="xml",b.successStatuses=[200],C.next=18,c.default.awrap(this.request(b));case 18:return d=C.sent,C.abrupt("return",{res:d.res});case 20:case"end":return C.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(I,Y,k){(function(L){"use strict";var c=I("babel-runtime/core-js/object/keys"),S=s(c),R=I("babel-runtime/core-js/json/stringify"),f=s(R);function s(w){return w&&w.__esModule?w:{default:w}}k.encodeCallback=function(l,i){if(l.headers=l.headers||{},!Object.prototype.hasOwnProperty.call(l.headers,"x-oss-callback")&&i.callback){var a={callbackUrl:encodeURI(i.callback.url),callbackBody:i.callback.body};i.callback.host&&(a.callbackHost=i.callback.host),i.callback.contentType&&(a.callbackBodyType=i.callback.contentType);var r=L.from((0,f.default)(a)).toString("base64");if(l.headers["x-oss-callback"]=r,i.callback.customValue){var u={};(0,S.default)(i.callback.customValue).forEach(function(p){u["x:"+p]=i.callback.customValue[p]}),l.headers["x-oss-callback-var"]=L.from((0,f.default)(u)).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,Y,k){"use strict";var L=I("babel-runtime/core-js/object/assign"),c=S(L);function S(a){return a&&a.__esModule?a:{default:a}}var R=I("humanize-ms"),f=I("url"),s=I("../utils/checkBucketName"),w=s.checkBucketName;function l(a,r){var u=f.parse(a);if(u.protocol||(u=f.parse("http"+(r?"s":"")+"://"+a)),u.protocol!=="http:"&&u.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return u}function i(a,r,u){var p=u?"https://":"http://",m=r?"-internal.aliyuncs.com":".aliyuncs.com",b="vpc100-oss-cn-";return a.substr(0,b.length)===b&&(m=".aliyuncs.com"),f.parse(p+a+m)}Y.exports=function(a){if(!a||!a.accessKeyId||!a.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");a.bucket&&w(a.bucket);var r=(0,c.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},a);if(r.accessKeyId=r.accessKeyId.trim(),r.accessKeySecret=r.accessKeySecret.trim(),r.timeout&&(r.timeout=R(r.timeout)),r.endpoint)r.endpoint=l(r.endpoint,r.secure);else if(r.region)r.endpoint=i(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,Y,k){"use strict";var L=I("merge-descriptors"),c=k;L(c,I("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=S(L);function S(r){return r&&r.__esModule?r:{default:r}}var R=I("../utils/checkBucketName"),f=R.checkBucketName,s=I("querystring"),w=I("js-base64"),l=w.Base64.encode,i=k;i.processObjectSave=function(u,p,m,b){var g,v,n,d;return c.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:return a(u,"sourceObject"),a(p,"targetObject"),a(m,"process"),p=this._objectName(p),b&&f(b),g=this._objectRequestParams("POST",u,{subres:"x-oss-process"}),v=b?",b_"+l(b):"",p=l(p),n={"x-oss-process":m+"|sys/saveas,o_"+p+v},g.content=s.stringify(n),C.next=12,c.default.awrap(this.request(g));case 12:return d=C.sent,C.abrupt("return",{res:d.res,status:d.res.status});case 14:case"end":return C.stop()}},null,this)};function a(r,u){if(!r)throw new Error(u+" is required");if(typeof r!="string")throw new Error(u+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=S(L);function S(i){return i&&i.__esModule?i:{default:i}}var R=I("copy-to"),f=I("./callback"),s=I("./utils/deepCopy"),w=s.deepCopy,l=k;l.listUploads=function(a,r){var u,p,m,b;return c.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return r=r||{},u={},R(r).to(u),u.subres="uploads",p=this._objectRequestParams("GET","",u),p.query=a,p.xmlResponse=!0,p.successStatuses=[200],v.next=10,c.default.awrap(this.request(p));case 10:return m=v.sent,b=m.data.Upload||[],Array.isArray(b)||(b=[b]),b=b.map(function(n){return{name:n.Key,uploadId:n.UploadId,initiated:n.Initiated}}),v.abrupt("return",{res:m.res,uploads:b,bucket:m.data.Bucket,nextKeyMarker:m.data.NextKeyMarker,nextUploadIdMarker:m.data.NextUploadIdMarker,isTruncated:m.data.IsTruncated==="true"});case 15:case"end":return v.stop()}},null,this)},l.listParts=function(a,r,u,p){var m,b,g;return c.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return p=p||{},m={},R(p).to(m),m.subres={uploadId:r},b=this._objectRequestParams("GET",a,m),b.query=u,b.xmlResponse=!0,b.successStatuses=[200],n.next=10,c.default.awrap(this.request(b));case 10:return g=n.sent,n.abrupt("return",{res:g.res,uploadId:g.data.UploadId,bucket:g.data.Bucket,name:g.data.Key,partNumberMarker:g.data.PartNumberMarker,nextPartNumberMarker:g.data.NextPartNumberMarker,maxParts:g.data.MaxParts,isTruncated:g.data.IsTruncated,parts:g.data.Part||[]});case 12:case"end":return n.stop()}},null,this)},l.abortMultipartUpload=function(a,r,u){var p,m,b;return c.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return this._stop(),u=u||{},p={},R(u).to(p),p.subres={uploadId:r},m=this._objectRequestParams("DELETE",a,p),m.successStatuses=[204],v.next=9,c.default.awrap(this.request(m));case 9:return b=v.sent,v.abrupt("return",{res:b.res});case 11:case"end":return v.stop()}},null,this)},l.initMultipartUpload=function(a,r){var u,p,m;return c.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return r=r||{},u={},R(r).to(u),u.headers=u.headers||{},this._convertMetaToHeaders(r.meta,u.headers),u.subres="uploads",p=this._objectRequestParams("POST",a,u),p.mime=r.mime,p.xmlResponse=!0,p.successStatuses=[200],g.next=12,c.default.awrap(this.request(p));case 12:return m=g.sent,g.abrupt("return",{res:m.res,bucket:m.data.Bucket,name:m.data.Key,uploadId:m.data.UploadId});case 14:case"end":return g.stop()}},null,this)},l.uploadPart=function(a,r,u,p,m,b,g){var v;return c.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return v={stream:this._createStream(p,m,b),size:b-m},d.next=3,c.default.awrap(this._uploadPart(a,r,u,v,g));case 3:return d.abrupt("return",d.sent);case 4:case"end":return d.stop()}},null,this)},l.completeMultipartUpload=function(a,r,u,p){var m,b,g,v,n,d,h,C;return c.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:for(m=u.concat().sort(function(P,O){return P.number-O.number}).filter(function(P,O,y){return!O||P.number!==y[O-1].number}),b=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,g=0;g<m.length;g++)v=m[g],b+=`<Part>
`,b+="<PartNumber>"+v.number+`</PartNumber>
`,b+="<ETag>"+v.etag+`</ETag>
`,b+=`</Part>
`;return b+="</CompleteMultipartUpload>",p=p||{},n={},n=w(p),n.headers&&delete n.headers["x-oss-server-side-encryption"],n.subres={uploadId:r},d=this._objectRequestParams("POST",a,n),f.encodeCallback(d,n),d.mime="xml",d.content=b,d.headers&&d.headers["x-oss-callback"]||(d.xmlResponse=!0),d.successStatuses=[200],o.next=17,c.default.awrap(this.request(d));case 17:return h=o.sent,C={res:h.res,bucket:d.bucket,name:a,etag:h.res.headers.etag},d.headers&&d.headers["x-oss-callback"]&&(C.data=JSON.parse(h.data.toString())),o.abrupt("return",C);case 21:case"end":return o.stop()}},null,this)},l._uploadPart=function(a,r,u,p,m){var b,g,v;return c.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return m=m||{},b={},R(m).to(b),b.headers={"Content-Length":p.size},b.subres={partNumber:u,uploadId:r},g=this._objectRequestParams("PUT",a,b),g.mime=b.mime,g.stream=p.stream,g.successStatuses=[200],d.next=11,c.default.awrap(this.request(g));case 11:if(v=d.sent,v.res.headers.etag){d.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 14:return p.stream=null,g.stream=null,d.abrupt("return",{name:a,etag:v.res.headers.etag,res:v.res});case 17:case"end":return d.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=w(L),S=I("babel-runtime/core-js/object/keys"),R=w(S),f=I("babel-runtime/helpers/typeof"),s=w(f);function w(r){return r&&r.__esModule?r:{default:r}}var l=I("../utils/checkBucketName"),i=l.checkBucketName,a=k;a.copy=function(u,p,m,b){var g,v,n;return c.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return(typeof m=="undefined"?"undefined":(0,s.default)(m))==="object"&&(b=m),b=b||{},b.headers=b.headers||{},(0,R.default)(b.headers).forEach(function(C){b.headers["x-oss-copy-source-"+C.toLowerCase()]=b.headers[C]}),b.meta&&(b.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(b.meta,b.headers),p=this._getSourceName(p,m),b.versionId&&(p=p+"?versionId="+b.versionId),b.headers["x-oss-copy-source"]=p,g=this._objectRequestParams("PUT",u,b),g.xmlResponse=!0,g.successStatuses=[200,304],h.next=14,c.default.awrap(this.request(g));case 14:return v=h.sent,n=v.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),h.abrupt("return",{data:n,res:v.res});case 18:case"end":return h.stop()}},null,this)},a._getSourceName=function(u,p){return typeof p=="string"?u=this._objectName(u):u[0]!=="/"?p=this.options.bucket:(p=u.replace(/\/(.+?)(\/.*)/,"$1"),u=u.replace(/(\/.+?\/)(.*)/,"$2")),i(p),u=encodeURI(u),u="/"+p+"/"+u,u}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/object/assign"),R=f(S);function f(w){return w&&w.__esModule?w:{default:w}}var s=k;s.delete=function(l){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,r;return c.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return i.subres=(0,R.default)({},i.subres),i.versionId&&(i.subres.versionId=i.versionId),a=this._objectRequestParams("DELETE",l,i),a.successStatuses=[204],p.next=6,c.default.awrap(this.request(a));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,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/object/assign"),R=f(S);function f(a){return a&&a.__esModule?a:{default:a}}var s=I("utility"),w=I("../utils/obj2xml"),l=w.obj2xml,i=k;i.deleteMulti=function(r){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p,m,b,g,v,n,d,h,C,T,o,P;return c.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:if(p=[],!(!r||!r.length)){y.next=3;break}throw new Error("names is required");case 3:for(m=0;m<r.length;m++)b={},typeof r[m]=="string"?b.Key=s.escape(this._objectName(r[m])):(g=r[m],v=g.key,n=g.versionId,b.Key=s.escape(this._objectName(v)),b.VersionId=n),p.push(b);return d={Delete:{Quiet:!!u.quiet,Object:p}},h=l(d,{headers:!0}),u.subres=(0,R.default)({delete:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),C=this._objectRequestParams("POST","",u),C.mime="xml",C.content=h,C.xmlResponse=!0,C.successStatuses=[200],y.next=15,c.default.awrap(this.request(C));case 15:return T=y.sent,o=T.data,P=o&&o.Deleted||null,P&&(Array.isArray(P)||(P=[P])),y.abrupt("return",{res:T.res,deleted:P||[]});case 20:case"end":return y.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/object/assign"),R=f(S);function f(w){return w&&w.__esModule?w:{default:w}}var s=k;s.deleteObjectTagging=function(l){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,r;return c.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return i.subres=(0,R.default)({tagging:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),l=this._objectName(l),a=this._objectRequestParams("DELETE",l,i),a.successStatuses=[204],p.next=7,c.default.awrap(this.request(a));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,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/object/assign"),R=f(S);function f(i){return i&&i.__esModule?i:{default:i}}var s=I("fs"),w=I("is-type-of"),l=k;l.get=function(a,r){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,m,b,g;return c.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return p=null,m=!1,w.writableStream(r)?p=r:w.string(r)?(p=s.createWriteStream(r),m=!0):u=r,u=u||{},u.subres=(0,R.default)({},u.subres),u.versionId&&(u.subres.versionId=u.versionId),u.process&&(u.subres["x-oss-process"]=u.process),b=void 0,n.prev=8,g=this._objectRequestParams("GET",a,u),g.writeStream=p,g.successStatuses=[200,206,304],n.next=14,c.default.awrap(this.request(g));case 14:b=n.sent,m&&p.destroy(),n.next=25;break;case 18:if(n.prev=18,n.t0=n.catch(8),!m){n.next=24;break}return p.destroy(),n.next=24,c.default.awrap(this._deleteFileSafe(r));case 24:throw n.t0;case 25:return n.abrupt("return",{res:b.res,content:b.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,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/object/assign"),R=f(S);function f(w){return w&&w.__esModule?w:{default:w}}var s=k;s.getACL=function(l){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,r;return c.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return i.subres=(0,R.default)({acl:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),l=this._objectName(l),a=this._objectRequestParams("GET",l,i),a.successStatuses=[200],a.xmlResponse=!0,p.next=8,c.default.awrap(this.request(a));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,Y,k){"use strict";var L=I("babel-runtime/core-js/object/keys"),c=w(L),S=I("babel-runtime/regenerator"),R=w(S),f=I("babel-runtime/core-js/object/assign"),s=w(f);function w(g){return g&&g.__esModule?g:{default:g}}var l=k,i=I("../utils/isObject"),a=i.isObject,r=I("../utils/isArray"),u=r.isArray;l.getBucketVersions=p,l.listObjectVersions=p;function p(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,d,h,C,T,o;return R.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(g.versionIdMarker&&g.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return v.subres=(0,s.default)({versions:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),n=this._objectRequestParams("GET","",v),n.xmlResponse=!0,n.successStatuses=[200],n.query=b(g),O.next=10,R.default.awrap(this.request(n));case 10:return d=O.sent,h=d.data.Version||[],C=d.data.DeleteMarker||[],T=this,h&&(Array.isArray(h)||(h=[h]),h=h.map(function(y){return{name:y.Key,url:T._objectUrl(y.Key),lastModified:y.LastModified,isLatest:y.IsLatest==="true",versionId:y.VersionId,etag:y.ETag,type:y.Type,size:Number(y.Size),storageClass:y.StorageClass,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),C&&(u(C)||(C=[C]),C=C.map(function(y){return{name:y.Key,lastModified:y.LastModified,versionId:y.VersionId,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),o=d.data.CommonPrefixes||null,o&&(u(o)||(o=[o]),o=o.map(function(y){return y.Prefix})),O.abrupt("return",{res:d.res,objects:h,deleteMarker:C,prefixes:o,nextMarker:d.data.NextMarker||null,NextVersionIdMarker:d.data.NextVersionIdMarker||null,isTruncated:d.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function m(g){return g.replace(/([A-Z])/g,"-$1").toLowerCase()}function b(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v={};return a(g)&&(0,c.default)(g).forEach(function(n){v[m(n)]=g[n]}),v}},{"../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,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/object/assign"),R=f(S);function f(w){return w&&w.__esModule?w:{default:w}}var s=k;s.getObjectMeta=function(l,i){var a,r;return c.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return i=i||{},l=this._objectName(l),i.subres=(0,R.default)({objectMeta:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),a=this._objectRequestParams("HEAD",l,i),a.successStatuses=[200],p.next=8,c.default.awrap(this.request(a));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,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/object/assign"),R=f(S);function f(i){return i&&i.__esModule?i:{default:i}}var s=k,w=I("../utils/isObject"),l=w.isObject;s.getObjectTagging=function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,p,m,b,g;return c.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return r.subres=(0,R.default)({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),a=this._objectName(a),u=this._objectRequestParams("GET",a,r),u.successStatuses=[200],n.next=7,c.default.awrap(this.request(u));case 7:return p=n.sent,n.next=10,c.default.awrap(this.parseXML(p.data));case 10:return m=n.sent,b=m.TagSet.Tag,b=b&&l(b)?[b]:b||[],g={},b.forEach(function(d){g[d.Key]=d.Value}),n.abrupt("return",{status:p.status,res:p.res,tag:g});case 16:case"end":return n.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/object/assign"),R=f(S);function f(w){return w&&w.__esModule?w:{default:w}}var s=k;s.getSymlink=function(l){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,r,u;return c.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return i.subres=(0,R.default)({symlink:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),l=this._objectName(l),a=this._objectRequestParams("GET",l,i),a.successStatuses=[200],m.next=7,c.default.awrap(this.request(a));case 7:return r=m.sent,u=r.res.headers["x-oss-symlink-target"],m.abrupt("return",{targetName:decodeURIComponent(u),res:r.res});case 10:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=w(L),S=I("babel-runtime/core-js/object/keys"),R=w(S),f=I("babel-runtime/core-js/object/assign"),s=w(f);function w(i){return i&&i.__esModule?i:{default:i}}var l=k;l.head=function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,p,m;return c.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return r.subres=(0,s.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),u=this._objectRequestParams("HEAD",a,r),u.successStatuses=[200,304],g.next=6,c.default.awrap(this.request(u));case 6:return p=g.sent,m={meta:null,res:p.res,status:p.status},p.status===200&&(0,R.default)(p.headers).forEach(function(v){v.indexOf("x-oss-meta-")===0&&(m.meta||(m.meta={}),m.meta[v.substring(11)]=p.headers[v])}),g.abrupt("return",m);case 10:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/object/assign"),R=f(S);function f(w){return w&&w.__esModule?w:{default:w}}var s=k;s.putACL=function(l,i,a){var r,u;return c.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return a=a||{},a.subres=(0,R.default)({acl:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),a.headers=a.headers||{},a.headers["x-oss-object-acl"]=i,l=this._objectName(l),r=this._objectRequestParams("PUT",l,a),r.successStatuses=[200],m.next=10,c.default.awrap(this.request(r));case 10:return u=m.sent,m.abrupt("return",{res:u.res});case 12:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=w(L),S=I("babel-runtime/core-js/object/keys"),R=w(S),f=I("babel-runtime/core-js/object/assign"),s=w(f);function w(p){return p&&p.__esModule?p:{default:p}}var l=I("../utils/obj2xml"),i=l.obj2xml,a=I("../utils/checkObjectTag"),r=a.checkObjectTag,u=k;u.putObjectTagging=function(m,b){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},v,n,d;return c.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:return r(b),g.subres=(0,s.default)({tagging:""},g.subres),g.versionId&&(g.subres.versionId=g.versionId),m=this._objectName(m),v=this._objectRequestParams("PUT",m,g),v.successStatuses=[200],b=(0,R.default)(b).map(function(T){return{Key:T,Value:b[T]}}),n={Tagging:{TagSet:{Tag:b}}},v.mime="xml",v.content=i(n),C.next=12,c.default.awrap(this.request(v));case 12:return d=C.sent,C.abrupt("return",{res:d.res,status:d.status});case 14:case"end":return C.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,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/object/assign"),R=f(S);function f(w){return w&&w.__esModule?w:{default:w}}var s=k;s.putSymlink=function(l,i,a){var r,u;return c.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return a=a||{},a.headers=a.headers||{},i=this._escape(this._objectName(i)),this._convertMetaToHeaders(a.meta,a.headers),a.headers["x-oss-symlink-target"]=i,a.subres=(0,R.default)({symlink:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),a.storageClass&&(a.headers["x-oss-storage-class"]=a.storageClass),l=this._objectName(l),r=this._objectRequestParams("PUT",l,a),r.successStatuses=[200],m.next=13,c.default.awrap(this.request(r));case 13:return u=m.sent,m.abrupt("return",{res:u.res});case 15:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(I,Y,k){"use strict";var L=I("babel-runtime/regenerator"),c=f(L),S=I("babel-runtime/core-js/promise"),R=f(S);function f(w){return w&&w.__esModule?w:{default:w}}var s=k;s._parallelNode=function(l,i,a,r){var u,p,m,b,g,v,n,d;return c.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:u=this,p=[],m=[],b=l.length/i,g=l.length%i,v=g===0?b:(l.length-g)/i+1,n=1,d=0;case 8:if(!(d<l.length)){C.next=26;break}if(!u.isCancel()){C.next=11;break}return C.abrupt("break",26);case 11:if(r?m.push(a(u,l[d],r)):m.push(a(u,l[d])),!(m.length===i||n===v&&d===l.length-1)){C.next=23;break}return C.prev=13,n+=1,C.next=17,c.default.awrap(R.default.all(m));case 17:C.next=22;break;case 19:C.prev=19,C.t0=C.catch(13),p.push(C.t0);case 22:m=[];case 23:d++,C.next=8;break;case 26:return C.abrupt("return",p);case 27:case"end":return C.stop()}},null,this,[[13,19]])},s._parallel=function(l,i,a){var r=this;return new R.default(function(u){var p=[];if(i<=0||!l){u(p);return}function m(o){return function(){if(o===null)throw new Error("Callback was already called.");var P=o;o=null;for(var O=arguments.length,y=Array(O),x=0;x<O;x++)y[x]=arguments[x];P.apply(this,y)}}function b(o){var P=-1,O=o.length;return function(){return++P<O&&!r.isCancel()?{value:o[P],key:P}:null}}var g=b(l),v=!1,n=0,d=!1;function h(o,P){n-=1,o?(v=!0,p.push(o),u(p)):P==={}||v&&n<=0?(v=!0,u(p)):d||(r.isCancel()?u(p):T())}function C(o,P){a(o).then(function(O){P(null,O)}).catch(function(O){P(O)})}function T(){for(d=!0;n<i&&!v&&!r.isCancel();){var o=g();if(o===null||p.length>0){v=!0,n<=0&&u(p);return}n+=1,C(o.value,m(h))}d=!1}T()})},s.cancel=function(l){this.options.cancelFlag=!0,l&&this.abortMultipartUpload(l.name,l.uploadId,l.options)},s.isCancel=function(){return this.options.cancelFlag},s.resetCancelFlag=function(){this.options.cancelFlag=!1},s._stop=function(){this.options.cancelFlag=!0},s._makeCancelEvent=function(){var l={status:0,name:"cancel"};return l}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(I,Y,k){(function(L){"use strict";var c=I("babel-runtime/core-js/json/stringify"),S=s(c),R=I("babel-runtime/core-js/object/keys"),f=s(R);function s(i){return i&&i.__esModule?i:{default:i}}var w=I("./../../shims/crypto/crypto.js"),l=I("is-type-of");k.buildCanonicalizedResource=function(a,r){var u=""+a,p="?";if(l.string(r)&&r.trim()!=="")u+=p+r;else if(l.array(r))r.sort(),u+=p+r.join("&");else if(r){var m=function(v,n){return v[0]>n[0]?1:v[0]<n[0]?-1:0},b=function(v){u+=p+v,r[v]&&(u+="="+r[v]),p="&"};(0,f.default)(r).sort(m).forEach(b)}return u},k.buildCanonicalString=function(a,r,u,p){u=u||{};var m=u.headers||{},b="x-oss-",g=[],v={},n=[a.toUpperCase(),m["Content-Md5"]||"",m["Content-Type"]||m["Content-Type".toLowerCase()],p||m["x-oss-date"]];return(0,f.default)(m).forEach(function(d){var h=d.toLowerCase();h.indexOf(b)===0&&(v[h]=String(m[d]).trim())}),(0,f.default)(v).sort().forEach(function(d){g.push(d+":"+v[d])}),n=n.concat(g),n.push(this.buildCanonicalizedResource(r,u.parameters)),n.join(`
`)},k.computeSignature=function(a,r){var u=w.createHmac("sha1",a);return u.update(L.from(r,"utf8")).digest("base64")},k.authorization=function(a,r,u){return"OSS "+a+":"+this.computeSignature(r,u)},k._signatureForURL=function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=arguments[2],p=arguments[3],m={},b=r.subResource,g=b===void 0?{}:b;if(r.process){var v="x-oss-process";g[v]=r.process}if(r.trafficLimit){var n="x-oss-traffic-limit";g[n]=r.trafficLimit}if(r.response&&(0,f.default)(r.response).forEach(function(T){var o="response-"+T.toLowerCase();g[o]=r.response[T]}),(0,f.default)(r).forEach(function(T){var o=T.toLowerCase(),P=r[T];o.indexOf("x-oss-")===0?m[o]=P:(o.indexOf("content-md5")===0||o.indexOf("content-type")===0)&&(m[T]=P)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(g["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var d={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(d.callbackHost=r.callback.host),r.callback.contentType&&(d.callbackBodyType=r.callback.contentType),g.callback=L.from((0,S.default)(d)).toString("base64"),r.callback.customValue){var h={};(0,f.default)(r.callback.customValue).forEach(function(T){h["x:"+T]=r.callback.customValue[T]}),g["callback-var"]=L.from((0,S.default)(h)).toString("base64")}}var C=this.buildCanonicalString(r.method,u,{headers:m,parameters:g},p.toString());return{Signature:this.computeSignature(a,C),subResource:g}}}).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,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkBucketName=void 0,k.checkBucketName=function(L,c){var S=c?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!S.test(L))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/entries"),c=S(L);function S(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(k,"__esModule",{value:!0}),k.checkObjectTag=void 0;var R=I("./checkValid"),f=R.checkValid,s=I("./isObject"),w=s.isObject,l=[{validator:function(u){if(typeof u!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],i={key:[].concat(l,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(l,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function a(r){if(!w(r))throw new Error("tag must be Object");var u=(0,c.default)(r);if(u.length>10)throw new Error("maximum of 10 tags for a object");var p=["key","value"];u.forEach(function(m){m.forEach(function(b,g){f(b,i[p[g]])})})}k.checkObjectTag=a},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(I,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkValid=void 0;function L(c,S){S.forEach(function(R){if(R.validator)R.validator(c);else if(R.pattern&&!R.pattern.test(c))throw new Error(R.msg)})}k.checkValid=L},{}],38:[function(I,Y,k){(function(L){"use strict";var c=I("babel-runtime/core-js/object/assign"),S=R(c);function R(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(k,"__esModule",{value:!0}),k.createRequest=void 0;var f=I("./../../../shims/crypto/crypto.js"),s=I("debug")("ali-oss"),w=I("mime"),l=I("dateformat"),i=I("copy-to"),a=I("path");function r(m,b){return m[b]||m[b.toLowerCase()]}function u(m,b){delete m[b],delete m[b.toLowerCase()]}function p(m){var b=new Date;this.options.amendTimeSkewed&&(b=+new Date+this.options.amendTimeSkewed);var g={"x-oss-date":l(b,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(g["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,S.default)(g,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(g["x-oss-security-token"]=this.options.stsToken),i(m.headers).to(g),r(g,"Content-Type")||(m.mime&&m.mime.indexOf("/")>0?g["Content-Type"]=m.mime:g["Content-Type"]=w.getType(m.mime||a.extname(m.object||""))),r(g,"Content-Type")||u(g,"Content-Type"),m.content&&(g["Content-Md5"]=f.createHash("md5").update(L.from(m.content,"utf8")).digest("base64"),g["Content-Length"]||(g["Content-Length"]=m.content.length));var v=this._getResource(m);g.authorization=this.authorization(m.method,v,m.subres,g);var n=this._getReqUrl(m);s("request %s %s, with headers %j, !!stream: %s",m.method,n,g,!!m.stream);var d=m.timeout||this.options.timeout,h={method:m.method,content:m.content,stream:m.stream,headers:g,timeout:d,writeStream:m.writeStream,customResponse:m.customResponse,ctx:m.ctx||this.ctx};return this.agent&&(h.agent=this.agent),this.httpsAgent&&(h.httpsAgent=this.httpsAgent),{url:n,params:h}}k.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,Y,k){"use strict";var L=I("babel-runtime/core-js/object/keys"),c=f(L),S=I("babel-runtime/helpers/typeof"),R=f(S);function f(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(k,"__esModule",{value:!0}),k.deepCopy=void 0,k.deepCopy=function(s){if(s===null||(typeof s=="undefined"?"undefined":(0,R.default)(s))!=="object")return s;var w=Array.isArray(s)?[]:{};return(0,c.default)(s).forEach(function(l){w[l]=k.deepCopy(s[l])}),w}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/keys"),c=f(L),S=I("babel-runtime/helpers/typeof"),R=f(S);function f(l){return l&&l.__esModule?l:{default:l}}Object.defineProperty(k,"__esModule",{value:!0}),k.formatObjKey=void 0;function s(l,i){if(l===null||(typeof l=="undefined"?"undefined":(0,R.default)(l))!=="object")return l;var a=void 0;if(Array.isArray(l)){a=[];for(var r=0;r<l.length;r++)a.push(s(l[r],i))}else a={},(0,c.default)(l).forEach(function(u){a[w(u,i)]=s(l[u],i)});return a}k.formatObjKey=s;function w(l,i){return i==="firstUpperCase"?l=l.replace(/^./,function(a){return a.toUpperCase()}):i==="firstLowerCase"&&(l=l.replace(/^./,function(a){return a.toLowerCase()})),l}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(I,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.getStrBytesCount=void 0;function L(c){for(var S=0,R=0;R<c.length;R++){var f=c.charAt(R);/^[\u00-\uff]$/.test(f)?S+=1:S+=2}return S}k.getStrBytesCount=L},{}],42:[function(I,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isArray=void 0,k.isArray=function(L){return Object.prototype.toString.call(L)==="[object Array]"}},{}],43:[function(I,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isBlob=void 0;function L(c){return typeof Blob!="undefined"&&c instanceof Blob}k.isBlob=L},{}],44:[function(I,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isFile=void 0,k.isFile=function(L){return typeof File!="undefined"&&L instanceof File}},{}],45:[function(I,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isIP=void 0,k.isIP=function(L){var c=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,S=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return c.test(L)||S.test(L)}},{}],46:[function(I,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isObject=void 0,k.isObject=function(L){return Object.prototype.toString.call(L)==="[object Object]"}},{}],47:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/keys"),c=S(L);function S(w){return w&&w.__esModule?w:{default:w}}Object.defineProperty(k,"__esModule",{value:!0}),k.obj2xml=void 0;var R=I("./formatObjKey");function f(w){return Object.prototype.toString.call(w).replace(/(.*? |])/g,"").toLowerCase()}function s(w,l){var i="";return l&&l.headers&&(i=`<?xml version="1.0" encoding="UTF-8"?>
`),l&&l.firstUpperCase&&(w=R.formatObjKey(w,"firstUpperCase")),f(w)==="object"?(0,c.default)(w).forEach(function(a){f(w[a])==="string"||f(w[a])==="number"?i+="<"+a+">"+w[a]+"</"+a+">":f(w[a])==="object"?i+="<"+a+">"+s(w[a])+"</"+a+">":f(w[a])==="array"?i+=w[a].map(function(r){return"<"+a+">"+s(r)+"</"+a+">"}).join(""):i+="<"+a+">"+w[a].toString()+"</"+a+">"}):i+=w.toString(),i}k.obj2xml=s},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(I,Y,k){Y.exports=L,Y.exports.HttpsAgent=L;function L(){}},{}],49:[function(I,Y,k){Y.exports=I("./register")().Promise},{"./register":51}],50:[function(I,Y,k){"use strict";var L="@@any-promise/REGISTRATION",c=null;Y.exports=function(S,R){return function(s,w){s=s||null,w=w||{};var l=w.global!==!1;if(c===null&&l&&(c=S[L]||null),c!==null&&s!==null&&c.implementation!==s)throw new Error('any-promise already defined as "'+c.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return c===null&&(s!==null&&typeof w.Promise!="undefined"?c={Promise:w.Promise,implementation:s}:c=R(s),l&&(S[L]=c)),c}}},{}],51:[function(I,Y,k){"use strict";Y.exports=I("./loader")(window,L);function L(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(I,Y,k){Y.exports={default:I("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(I,Y,k){Y.exports={default:I("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(I,Y,k){Y.exports={default:I("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(I,Y,k){Y.exports={default:I("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(I,Y,k){Y.exports={default:I("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(I,Y,k){Y.exports={default:I("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(I,Y,k){Y.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,Y,k){Y.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,Y,k){Y.exports={default:I("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(I,Y,k){Y.exports={default:I("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(I,Y,k){Y.exports={default:I("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(I,Y,k){Y.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,Y,k){Y.exports={default:I("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(I,Y,k){Y.exports={default:I("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(I,Y,k){Y.exports={default:I("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(I,Y,k){"use strict";k.__esModule=!0;var L=I("../core-js/symbol/iterator"),c=s(L),S=I("../core-js/symbol"),R=s(S),f=typeof R.default=="function"&&typeof c.default=="symbol"?function(w){return typeof w}:function(w){return w&&typeof R.default=="function"&&w.constructor===R.default&&w!==R.default.prototype?"symbol":typeof w};function s(w){return w&&w.__esModule?w:{default:w}}k.default=typeof R.default=="function"&&f(c.default)==="symbol"?function(w){return typeof w=="undefined"?"undefined":f(w)}:function(w){return w&&typeof R.default=="function"&&w.constructor===R.default&&w!==R.default.prototype?"symbol":typeof w=="undefined"?"undefined":f(w)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(I,Y,k){Y.exports=I("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(I,Y,k){"use strict";k.byteLength=l,k.toByteArray=a,k.fromByteArray=p;for(var L=[],c=[],S=typeof Uint8Array!="undefined"?Uint8Array:Array,R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,s=R.length;f<s;++f)L[f]=R[f],c[R.charCodeAt(f)]=f;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63;function w(m){var b=m.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=m.indexOf("=");g===-1&&(g=b);var v=g===b?0:4-g%4;return[g,v]}function l(m){var b=w(m),g=b[0],v=b[1];return(g+v)*3/4-v}function i(m,b,g){return(b+g)*3/4-g}function a(m){var b,g=w(m),v=g[0],n=g[1],d=new S(i(m,v,n)),h=0,C=n>0?v-4:v,T;for(T=0;T<C;T+=4)b=c[m.charCodeAt(T)]<<18|c[m.charCodeAt(T+1)]<<12|c[m.charCodeAt(T+2)]<<6|c[m.charCodeAt(T+3)],d[h++]=b>>16&255,d[h++]=b>>8&255,d[h++]=b&255;return n===2&&(b=c[m.charCodeAt(T)]<<2|c[m.charCodeAt(T+1)]>>4,d[h++]=b&255),n===1&&(b=c[m.charCodeAt(T)]<<10|c[m.charCodeAt(T+1)]<<4|c[m.charCodeAt(T+2)]>>2,d[h++]=b>>8&255,d[h++]=b&255),d}function r(m){return L[m>>18&63]+L[m>>12&63]+L[m>>6&63]+L[m&63]}function u(m,b,g){for(var v,n=[],d=b;d<g;d+=3)v=(m[d]<<16&16711680)+(m[d+1]<<8&65280)+(m[d+2]&255),n.push(r(v));return n.join("")}function p(m){for(var b,g=m.length,v=g%3,n=[],d=16383,h=0,C=g-v;h<C;h+=d)n.push(u(m,h,h+d>C?C:h+d));return v===1?(b=m[g-1],n.push(L[b>>2]+L[b<<4&63]+"==")):v===2&&(b=(m[g-2]<<8)+m[g-1],n.push(L[b>>10]+L[b>>4&63]+L[b<<2&63]+"=")),n.join("")}},{}],70:[function(I,Y,k){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(L,c,S){typeof Y!="undefined"&&Y.exports?Y.exports=S():typeof define=="function"&&define.amd?define(c,S):L[c]=S()}(this,"bowser",function(){var L=!0;function c(i){function a(G){var B=i.match(G);return B&&B.length>1&&B[1]||""}function r(G){var B=i.match(G);return B&&B.length>1&&B[2]||""}var u=a(/(ipod|iphone|ipad)/i).toLowerCase(),p=/like android/i.test(i),m=!p&&/android/i.test(i),b=/nexus\s*[0-6]\s*/i.test(i),g=!b&&/nexus\s*[0-9]+/i.test(i),v=/CrOS/.test(i),n=/silk/i.test(i),d=/sailfish/i.test(i),h=/tizen/i.test(i),C=/(web|hpw)(o|0)s/i.test(i),T=/windows phone/i.test(i),o=/SamsungBrowser/i.test(i),P=!T&&/windows/i.test(i),O=!u&&!n&&/macintosh/i.test(i),y=!m&&!d&&!h&&!C&&/linux/i.test(i),x=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),E=a(/version\/(\d+(\.\d+)?)/i),_=/tablet/i.test(i)&&!/tablet pc/i.test(i),N=!_&&/[^-]mobi/i.test(i),j=/xbox/i.test(i),M;/opera/i.test(i)?M={name:"Opera",opera:L,version:E||a(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(i)?M={name:"Opera",opera:L,version:a(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||E}:/SamsungBrowser/i.test(i)?M={name:"Samsung Internet for Android",samsungBrowser:L,version:E||a(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(i)?M={name:"NAVER Whale browser",whale:L,version:a(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(i)?M={name:"MZ Browser",mzbrowser:L,version:a(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(i)?M={name:"Opera Coast",coast:L,version:E||a(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(i)?M={name:"Focus",focus:L,version:a(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(i)?M={name:"Yandex Browser",yandexbrowser:L,version:E||a(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(i)?M={name:"UC Browser",ucbrowser:L,version:a(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(i)?M={name:"Maxthon",maxthon:L,version:a(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(i)?M={name:"Epiphany",epiphany:L,version:a(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(i)?M={name:"Puffin",puffin:L,version:a(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(i)?M={name:"Sleipnir",sleipnir:L,version:a(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(i)?M={name:"K-Meleon",kMeleon:L,version:a(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:T?(M={name:"Windows Phone",osname:"Windows Phone",windowsphone:L},x?(M.msedge=L,M.version=x):(M.msie=L,M.version=a(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(i)?M={name:"Internet Explorer",msie:L,version:a(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:v?M={name:"Chrome",osname:"Chrome OS",chromeos:L,chromeBook:L,chrome:L,version:a(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(i)?M={name:"Microsoft Edge",msedge:L,version:x}:/vivaldi/i.test(i)?M={name:"Vivaldi",vivaldi:L,version:a(/vivaldi\/(\d+(\.\d+)?)/i)||E}:d?M={name:"Sailfish",osname:"Sailfish OS",sailfish:L,version:a(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(i)?M={name:"SeaMonkey",seamonkey:L,version:a(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(i)?(M={name:"Firefox",firefox:L,version:a(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(i)&&(M.firefoxos=L,M.osname="Firefox OS")):n?M={name:"Amazon Silk",silk:L,version:a(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(i)?M={name:"PhantomJS",phantom:L,version:a(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(i)?M={name:"SlimerJS",slimer:L,version:a(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(i)||/rim\stablet/i.test(i)?M={name:"BlackBerry",osname:"BlackBerry OS",blackberry:L,version:E||a(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:C?(M={name:"WebOS",osname:"WebOS",webos:L,version:E||a(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(i)&&(M.touchpad=L)):/bada/i.test(i)?M={name:"Bada",osname:"Bada",bada:L,version:a(/dolfin\/(\d+(\.\d+)?)/i)}:h?M={name:"Tizen",osname:"Tizen",tizen:L,version:a(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||E}:/qupzilla/i.test(i)?M={name:"QupZilla",qupzilla:L,version:a(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||E}:/chromium/i.test(i)?M={name:"Chromium",chromium:L,version:a(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||E}:/chrome|crios|crmo/i.test(i)?M={name:"Chrome",chrome:L,version:a(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:m?M={name:"Android",version:E}:/safari|applewebkit/i.test(i)?(M={name:"Safari",safari:L},E&&(M.version=E)):u?(M={name:u=="iphone"?"iPhone":u=="ipad"?"iPad":"iPod"},E&&(M.version=E)):/googlebot/i.test(i)?M={name:"Googlebot",googlebot:L,version:a(/googlebot\/(\d+(\.\d+))/i)||E}:M={name:a(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!M.msedge&&/(apple)?webkit/i.test(i)?(/(apple)?webkit\/537\.36/i.test(i)?(M.name=M.name||"Blink",M.blink=L):(M.name=M.name||"Webkit",M.webkit=L),!M.version&&E&&(M.version=E)):!M.opera&&/gecko\//i.test(i)&&(M.name=M.name||"Gecko",M.gecko=L,M.version=M.version||a(/gecko\/(\d+(\.\d+)?)/i)),!M.windowsphone&&(m||M.silk)?(M.android=L,M.osname="Android"):!M.windowsphone&&u?(M[u]=L,M.ios=L,M.osname="iOS"):O?(M.mac=L,M.osname="macOS"):j?(M.xbox=L,M.osname="Xbox"):P?(M.windows=L,M.osname="Windows"):y&&(M.linux=L,M.osname="Linux");function H(G){switch(G){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 z="";M.windows?z=H(a(/Windows ((NT|XP)( \d\d?.\d)?)/i)):M.windowsphone?z=a(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):M.mac?(z=a(/Mac OS X (\d+([_\.\s]\d+)*)/i),z=z.replace(/[_\s]/g,".")):u?(z=a(/os (\d+([_\s]\d+)*) like mac os x/i),z=z.replace(/[_\s]/g,".")):m?z=a(/android[ \/-](\d+(\.\d+)*)/i):M.webos?z=a(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):M.blackberry?z=a(/rim\stablet\sos\s(\d+(\.\d+)*)/i):M.bada?z=a(/bada\/(\d+(\.\d+)*)/i):M.tizen&&(z=a(/tizen[\/\s](\d+(\.\d+)*)/i)),z&&(M.osversion=z);var F=!M.windows&&z.split(".")[0];return _||g||u=="ipad"||m&&(F==3||F>=4&&!N)||M.silk?M.tablet=L:(N||u=="iphone"||u=="ipod"||m||b||M.blackberry||M.webos||M.bada)&&(M.mobile=L),M.msedge||M.msie&&M.version>=10||M.yandexbrowser&&M.version>=15||M.vivaldi&&M.version>=1||M.chrome&&M.version>=20||M.samsungBrowser&&M.version>=4||M.whale&&s([M.version,"1.0"])===1||M.mzbrowser&&s([M.version,"6.0"])===1||M.focus&&s([M.version,"1.0"])===1||M.firefox&&M.version>=20||M.safari&&M.version>=6||M.opera&&M.version>=10||M.ios&&M.osversion&&M.osversion.split(".")[0]>=6||M.blackberry&&M.version>=10.1||M.chromium&&M.version>=20?M.a=L:M.msie&&M.version<10||M.chrome&&M.version<20||M.firefox&&M.version<20||M.safari&&M.version<6||M.opera&&M.version<10||M.ios&&M.osversion&&M.osversion.split(".")[0]<6||M.chromium&&M.version<20?M.c=L:M.x=L,M}var S=c(typeof navigator!="undefined"&&navigator.userAgent||"");S.test=function(i){for(var a=0;a<i.length;++a){var r=i[a];if(typeof r=="string"&&r in S)return!0}return!1};function R(i){return i.split(".").length}function f(i,a){var r=[],u;if(Array.prototype.map)return Array.prototype.map.call(i,a);for(u=0;u<i.length;u++)r.push(a(i[u]));return r}function s(i){for(var a=Math.max(R(i[0]),R(i[1])),r=f(i,function(u){var p=a-R(u);return u=u+new Array(p+1).join(".0"),f(u.split("."),function(m){return new Array(20-m.length).join("0")+m}).reverse()});--a>=0;){if(r[0][a]>r[1][a])return 1;if(r[0][a]===r[1][a]){if(a===0)return 0}else return-1}}function w(i,a,r){var u=S;typeof a=="string"&&(r=a,a=void 0),a===void 0&&(a=!1),r&&(u=c(r));var p=""+u.version;for(var m in i)if(i.hasOwnProperty(m)&&u[m]){if(typeof i[m]!="string")throw new Error("Browser version in the minVersion map should be a string: "+m+": "+String(i));return s([p,i[m]])<0}return a}function l(i,a,r){return!w(i,a,r)}return S.isUnsupportedBrowser=w,S.compareVersions=s,S.check=l,S._detect=c,S.detect=c,S})},{}],71:[function(I,Y,k){},{}],72:[function(I,Y,k){var L=I("buffer").Buffer,c=L.isEncoding||function(l){switch(l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function S(l){if(l&&!c(l))throw new Error("Unknown encoding: "+l)}var R=k.StringDecoder=function(l){this.encoding=(l||"utf8").toLowerCase().replace(/[-_]/,""),S(l);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=w;break;default:this.write=f;return}this.charBuffer=new L(6),this.charReceived=0,this.charLength=0};R.prototype.write=function(l){for(var i="";this.charLength;){var a=l.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:l.length;if(l.copy(this.charBuffer,this.charReceived,0,a),this.charReceived+=a,this.charReceived<this.charLength)return"";l=l.slice(a,l.length),i=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var u=i.charCodeAt(i.length-1);if(u>=55296&&u<=56319){this.charLength+=this.surrogateSize,i="";continue}if(this.charReceived=this.charLength=0,l.length===0)return i;break}this.detectIncompleteChar(l);var r=l.length;this.charLength&&(l.copy(this.charBuffer,0,l.length-this.charReceived,r),r-=this.charReceived),i+=l.toString(this.encoding,0,r);var r=i.length-1,u=i.charCodeAt(r);if(u>=55296&&u<=56319){var p=this.surrogateSize;return this.charLength+=p,this.charReceived+=p,this.charBuffer.copy(this.charBuffer,p,0,p),l.copy(this.charBuffer,0,0,p),i.substring(0,r)}return i},R.prototype.detectIncompleteChar=function(l){for(var i=l.length>=3?3:l.length;i>0;i--){var a=l[l.length-i];if(i==1&&a>>5==6){this.charLength=2;break}if(i<=2&&a>>4==14){this.charLength=3;break}if(i<=3&&a>>3==30){this.charLength=4;break}}this.charReceived=i},R.prototype.end=function(l){var i="";if(l&&l.length&&(i=this.write(l)),this.charReceived){var a=this.charReceived,r=this.charBuffer,u=this.encoding;i+=r.slice(0,a).toString(u)}return i};function f(l){return l.toString(this.encoding)}function s(l){this.charReceived=l.length%2,this.charLength=this.charReceived?2:0}function w(l){this.charReceived=l.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(I,Y,k){(function(L,c){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var S=I("base64-js"),R=I("ieee754"),f=I("isarray");k.Buffer=c,k.SlowBuffer=n,k.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=L.TYPED_ARRAY_SUPPORT!==void 0?L.TYPED_ARRAY_SUPPORT:s(),k.kMaxLength=w();function s(){try{var ne=new Uint8Array(1);return ne.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ne.foo()===42&&typeof ne.subarray=="function"&&ne.subarray(1,1).byteLength===0}catch(Q){return!1}}function w(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(ne,Q){if(w()<Q)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(ne=new Uint8Array(Q),ne.__proto__=c.prototype):(ne===null&&(ne=new c(Q)),ne.length=Q),ne}function c(ne,Q,X){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(ne,Q,X);if(typeof ne=="number"){if(typeof Q=="string")throw new Error("If encoding is specified then the first argument must be a string");return u(this,ne)}return i(this,ne,Q,X)}c.poolSize=8192,c._augment=function(ne){return ne.__proto__=c.prototype,ne};function i(ne,Q,X,$){if(typeof Q=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Q instanceof ArrayBuffer?b(ne,Q,X,$):typeof Q=="string"?p(ne,Q,X):g(ne,Q)}c.from=function(ne,Q,X){return i(null,ne,Q,X)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0}));function a(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be a number');if(ne<0)throw new RangeError('"size" argument must not be negative')}function r(ne,Q,X,$){return a(Q),Q<=0?l(ne,Q):X!==void 0?typeof $=="string"?l(ne,Q).fill(X,$):l(ne,Q).fill(X):l(ne,Q)}c.alloc=function(ne,Q,X){return r(null,ne,Q,X)};function u(ne,Q){if(a(Q),ne=l(ne,Q<0?0:v(Q)|0),!c.TYPED_ARRAY_SUPPORT)for(var X=0;X<Q;++X)ne[X]=0;return ne}c.allocUnsafe=function(ne){return u(null,ne)},c.allocUnsafeSlow=function(ne){return u(null,ne)};function p(ne,Q,X){if((typeof X!="string"||X==="")&&(X="utf8"),!c.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var $=d(Q,X)|0;ne=l(ne,$);var pe=ne.write(Q,X);return pe!==$&&(ne=ne.slice(0,pe)),ne}function m(ne,Q){var X=Q.length<0?0:v(Q.length)|0;ne=l(ne,X);for(var $=0;$<X;$+=1)ne[$]=Q[$]&255;return ne}function b(ne,Q,X,$){if(Q.byteLength,X<0||Q.byteLength<X)throw new RangeError("'offset' is out of bounds");if(Q.byteLength<X+($||0))throw new RangeError("'length' is out of bounds");return X===void 0&&$===void 0?Q=new Uint8Array(Q):$===void 0?Q=new Uint8Array(Q,X):Q=new Uint8Array(Q,X,$),c.TYPED_ARRAY_SUPPORT?(ne=Q,ne.__proto__=c.prototype):ne=m(ne,Q),ne}function g(ne,Q){if(c.isBuffer(Q)){var X=v(Q.length)|0;return ne=l(ne,X),ne.length===0||Q.copy(ne,0,0,X),ne}if(Q){if(typeof ArrayBuffer!="undefined"&&Q.buffer instanceof ArrayBuffer||"length"in Q)return typeof Q.length!="number"||xe(Q.length)?l(ne,0):m(ne,Q);if(Q.type==="Buffer"&&f(Q.data))return m(ne,Q.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(ne){if(ne>=w())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w().toString(16)+" bytes");return ne|0}function n(ne){return+ne!=ne&&(ne=0),c.alloc(+ne)}c.isBuffer=function(Q){return!!(Q!=null&&Q._isBuffer)},c.compare=function(Q,X){if(!c.isBuffer(Q)||!c.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(Q===X)return 0;for(var $=Q.length,pe=X.length,de=0,Ce=Math.min($,pe);de<Ce;++de)if(Q[de]!==X[de]){$=Q[de],pe=X[de];break}return $<pe?-1:pe<$?1:0},c.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(Q,X){if(!f(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return c.alloc(0);var $;if(X===void 0)for(X=0,$=0;$<Q.length;++$)X+=Q[$].length;var pe=c.allocUnsafe(X),de=0;for($=0;$<Q.length;++$){var Ce=Q[$];if(!c.isBuffer(Ce))throw new TypeError('"list" argument must be an Array of Buffers');Ce.copy(pe,de),de+=Ce.length}return pe};function d(ne,Q){if(c.isBuffer(ne))return ne.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ne)||ne instanceof ArrayBuffer))return ne.byteLength;typeof ne!="string"&&(ne=""+ne);var X=ne.length;if(X===0)return 0;for(var $=!1;;)switch(Q){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return se(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return q(ne).length;default:if($)return se(ne).length;Q=(""+Q).toLowerCase(),$=!0}}c.byteLength=d;function h(ne,Q,X){var $=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,Q>>>=0,X<=Q)return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return G(this,Q,X);case"utf8":case"utf-8":return j(this,Q,X);case"ascii":return z(this,Q,X);case"latin1":case"binary":return F(this,Q,X);case"base64":return N(this,Q,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,Q,X);default:if($)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),$=!0}}c.prototype._isBuffer=!0;function C(ne,Q,X){var $=ne[Q];ne[Q]=ne[X],ne[X]=$}c.prototype.swap16=function(){var Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X<Q;X+=2)C(this,X,X+1);return this},c.prototype.swap32=function(){var Q=this.length;if(Q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<Q;X+=4)C(this,X,X+3),C(this,X+1,X+2);return this},c.prototype.swap64=function(){var Q=this.length;if(Q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<Q;X+=8)C(this,X,X+7),C(this,X+1,X+6),C(this,X+2,X+5),C(this,X+3,X+4);return this},c.prototype.toString=function(){var Q=this.length|0;return Q===0?"":arguments.length===0?j(this,0,Q):h.apply(this,arguments)},c.prototype.equals=function(Q){if(!c.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q?!0:c.compare(this,Q)===0},c.prototype.inspect=function(){var Q="",X=k.INSPECT_MAX_BYTES;return this.length>0&&(Q=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(Q+=" ... ")),"<Buffer "+Q+">"},c.prototype.compare=function(Q,X,$,pe,de){if(!c.isBuffer(Q))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),$===void 0&&($=Q?Q.length:0),pe===void 0&&(pe=0),de===void 0&&(de=this.length),X<0||$>Q.length||pe<0||de>this.length)throw new RangeError("out of range index");if(pe>=de&&X>=$)return 0;if(pe>=de)return-1;if(X>=$)return 1;if(X>>>=0,$>>>=0,pe>>>=0,de>>>=0,this===Q)return 0;for(var Ce=de-pe,ze=$-X,qe=Math.min(Ce,ze),Ye=this.slice(pe,de),Ve=Q.slice(X,$),et=0;et<qe;++et)if(Ye[et]!==Ve[et]){Ce=Ye[et],ze=Ve[et];break}return Ce<ze?-1:ze<Ce?1:0};function T(ne,Q,X,$,pe){if(ne.length===0)return-1;if(typeof X=="string"?($=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=pe?0:ne.length-1),X<0&&(X=ne.length+X),X>=ne.length){if(pe)return-1;X=ne.length-1}else if(X<0)if(pe)X=0;else return-1;if(typeof Q=="string"&&(Q=c.from(Q,$)),c.isBuffer(Q))return Q.length===0?-1:o(ne,Q,X,$,pe);if(typeof Q=="number")return Q=Q&255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?pe?Uint8Array.prototype.indexOf.call(ne,Q,X):Uint8Array.prototype.lastIndexOf.call(ne,Q,X):o(ne,[Q],X,$,pe);throw new TypeError("val must be string, number or Buffer")}function o(ne,Q,X,$,pe){var de=1,Ce=ne.length,ze=Q.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(ne.length<2||Q.length<2)return-1;de=2,Ce/=2,ze/=2,X/=2}function qe(Me,Se){return de===1?Me[Se]:Me.readUInt16BE(Se*de)}var Ye;if(pe){var Ve=-1;for(Ye=X;Ye<Ce;Ye++)if(qe(ne,Ye)===qe(Q,Ve===-1?0:Ye-Ve)){if(Ve===-1&&(Ve=Ye),Ye-Ve+1===ze)return Ve*de}else Ve!==-1&&(Ye-=Ye-Ve),Ve=-1}else for(X+ze>Ce&&(X=Ce-ze),Ye=X;Ye>=0;Ye--){for(var et=!0,rt=0;rt<ze;rt++)if(qe(ne,Ye+rt)!==qe(Q,rt)){et=!1;break}if(et)return Ye}return-1}c.prototype.includes=function(Q,X,$){return this.indexOf(Q,X,$)!==-1},c.prototype.indexOf=function(Q,X,$){return T(this,Q,X,$,!0)},c.prototype.lastIndexOf=function(Q,X,$){return T(this,Q,X,$,!1)};function P(ne,Q,X,$){X=Number(X)||0;var pe=ne.length-X;$?($=Number($),$>pe&&($=pe)):$=pe;var de=Q.length;if(de%2!==0)throw new TypeError("Invalid hex string");$>de/2&&($=de/2);for(var Ce=0;Ce<$;++Ce){var ze=parseInt(Q.substr(Ce*2,2),16);if(isNaN(ze))return Ce;ne[X+Ce]=ze}return Ce}function O(ne,Q,X,$){return ae(se(Q,ne.length-X),ne,X,$)}function y(ne,Q,X,$){return ae(te(Q),ne,X,$)}function x(ne,Q,X,$){return y(ne,Q,X,$)}function E(ne,Q,X,$){return ae(q(Q),ne,X,$)}function _(ne,Q,X,$){return ae(be(Q,ne.length-X),ne,X,$)}c.prototype.write=function(Q,X,$,pe){if(X===void 0)pe="utf8",$=this.length,X=0;else if($===void 0&&typeof X=="string")pe=X,$=this.length,X=0;else if(isFinite(X))X=X|0,isFinite($)?($=$|0,pe===void 0&&(pe="utf8")):(pe=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var de=this.length-X;if(($===void 0||$>de)&&($=de),Q.length>0&&($<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");pe||(pe="utf8");for(var Ce=!1;;)switch(pe){case"hex":return P(this,Q,X,$);case"utf8":case"utf-8":return O(this,Q,X,$);case"ascii":return y(this,Q,X,$);case"latin1":case"binary":return x(this,Q,X,$);case"base64":return E(this,Q,X,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,Q,X,$);default:if(Ce)throw new TypeError("Unknown encoding: "+pe);pe=(""+pe).toLowerCase(),Ce=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function N(ne,Q,X){return Q===0&&X===ne.length?S.fromByteArray(ne):S.fromByteArray(ne.slice(Q,X))}function j(ne,Q,X){X=Math.min(ne.length,X);for(var $=[],pe=Q;pe<X;){var de=ne[pe],Ce=null,ze=de>239?4:de>223?3:de>191?2:1;if(pe+ze<=X){var qe,Ye,Ve,et;switch(ze){case 1:de<128&&(Ce=de);break;case 2:qe=ne[pe+1],(qe&192)===128&&(et=(de&31)<<6|qe&63,et>127&&(Ce=et));break;case 3:qe=ne[pe+1],Ye=ne[pe+2],(qe&192)===128&&(Ye&192)===128&&(et=(de&15)<<12|(qe&63)<<6|Ye&63,et>2047&&(et<55296||et>57343)&&(Ce=et));break;case 4:qe=ne[pe+1],Ye=ne[pe+2],Ve=ne[pe+3],(qe&192)===128&&(Ye&192)===128&&(Ve&192)===128&&(et=(de&15)<<18|(qe&63)<<12|(Ye&63)<<6|Ve&63,et>65535&&et<1114112&&(Ce=et))}}Ce===null?(Ce=65533,ze=1):Ce>65535&&(Ce-=65536,$.push(Ce>>>10&1023|55296),Ce=56320|Ce&1023),$.push(Ce),pe+=ze}return H($)}var M=4096;function H(ne){var Q=ne.length;if(Q<=M)return String.fromCharCode.apply(String,ne);for(var X="",$=0;$<Q;)X+=String.fromCharCode.apply(String,ne.slice($,$+=M));return X}function z(ne,Q,X){var $="";X=Math.min(ne.length,X);for(var pe=Q;pe<X;++pe)$+=String.fromCharCode(ne[pe]&127);return $}function F(ne,Q,X){var $="";X=Math.min(ne.length,X);for(var pe=Q;pe<X;++pe)$+=String.fromCharCode(ne[pe]);return $}function G(ne,Q,X){var $=ne.length;(!Q||Q<0)&&(Q=0),(!X||X<0||X>$)&&(X=$);for(var pe="",de=Q;de<X;++de)pe+=oe(ne[de]);return pe}function B(ne,Q,X){for(var $=ne.slice(Q,X),pe="",de=0;de<$.length;de+=2)pe+=String.fromCharCode($[de]+$[de+1]*256);return pe}c.prototype.slice=function(Q,X){var $=this.length;Q=~~Q,X=X===void 0?$:~~X,Q<0?(Q+=$,Q<0&&(Q=0)):Q>$&&(Q=$),X<0?(X+=$,X<0&&(X=0)):X>$&&(X=$),X<Q&&(X=Q);var pe;if(c.TYPED_ARRAY_SUPPORT)pe=this.subarray(Q,X),pe.__proto__=c.prototype;else{var de=X-Q;pe=new c(de,void 0);for(var Ce=0;Ce<de;++Ce)pe[Ce]=this[Ce+Q]}return pe};function K(ne,Q,X){if(ne%1!==0||ne<0)throw new RangeError("offset is not uint");if(ne+Q>X)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUIntLE=function(Q,X,$){Q=Q|0,X=X|0,$||K(Q,X,this.length);for(var pe=this[Q],de=1,Ce=0;++Ce<X&&(de*=256);)pe+=this[Q+Ce]*de;return pe},c.prototype.readUIntBE=function(Q,X,$){Q=Q|0,X=X|0,$||K(Q,X,this.length);for(var pe=this[Q+--X],de=1;X>0&&(de*=256);)pe+=this[Q+--X]*de;return pe},c.prototype.readUInt8=function(Q,X){return X||K(Q,1,this.length),this[Q]},c.prototype.readUInt16LE=function(Q,X){return X||K(Q,2,this.length),this[Q]|this[Q+1]<<8},c.prototype.readUInt16BE=function(Q,X){return X||K(Q,2,this.length),this[Q]<<8|this[Q+1]},c.prototype.readUInt32LE=function(Q,X){return X||K(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},c.prototype.readUInt32BE=function(Q,X){return X||K(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},c.prototype.readIntLE=function(Q,X,$){Q=Q|0,X=X|0,$||K(Q,X,this.length);for(var pe=this[Q],de=1,Ce=0;++Ce<X&&(de*=256);)pe+=this[Q+Ce]*de;return de*=128,pe>=de&&(pe-=Math.pow(2,8*X)),pe},c.prototype.readIntBE=function(Q,X,$){Q=Q|0,X=X|0,$||K(Q,X,this.length);for(var pe=X,de=1,Ce=this[Q+--pe];pe>0&&(de*=256);)Ce+=this[Q+--pe]*de;return de*=128,Ce>=de&&(Ce-=Math.pow(2,8*X)),Ce},c.prototype.readInt8=function(Q,X){return X||K(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},c.prototype.readInt16LE=function(Q,X){X||K(Q,2,this.length);var $=this[Q]|this[Q+1]<<8;return $&32768?$|4294901760:$},c.prototype.readInt16BE=function(Q,X){X||K(Q,2,this.length);var $=this[Q+1]|this[Q]<<8;return $&32768?$|4294901760:$},c.prototype.readInt32LE=function(Q,X){return X||K(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},c.prototype.readInt32BE=function(Q,X){return X||K(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},c.prototype.readFloatLE=function(Q,X){return X||K(Q,4,this.length),R.read(this,Q,!0,23,4)},c.prototype.readFloatBE=function(Q,X){return X||K(Q,4,this.length),R.read(this,Q,!1,23,4)},c.prototype.readDoubleLE=function(Q,X){return X||K(Q,8,this.length),R.read(this,Q,!0,52,8)},c.prototype.readDoubleBE=function(Q,X){return X||K(Q,8,this.length),R.read(this,Q,!1,52,8)};function W(ne,Q,X,$,pe,de){if(!c.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>pe||Q<de)throw new RangeError('"value" argument is out of bounds');if(X+$>ne.length)throw new RangeError("Index out of range")}c.prototype.writeUIntLE=function(Q,X,$,pe){if(Q=+Q,X=X|0,$=$|0,!pe){var de=Math.pow(2,8*$)-1;W(this,Q,X,$,de,0)}var Ce=1,ze=0;for(this[X]=Q&255;++ze<$&&(Ce*=256);)this[X+ze]=Q/Ce&255;return X+$},c.prototype.writeUIntBE=function(Q,X,$,pe){if(Q=+Q,X=X|0,$=$|0,!pe){var de=Math.pow(2,8*$)-1;W(this,Q,X,$,de,0)}var Ce=$-1,ze=1;for(this[X+Ce]=Q&255;--Ce>=0&&(ze*=256);)this[X+Ce]=Q/ze&255;return X+$},c.prototype.writeUInt8=function(Q,X,$){return Q=+Q,X=X|0,$||W(this,Q,X,1,255,0),c.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),this[X]=Q&255,X+1};function J(ne,Q,X,$){Q<0&&(Q=65535+Q+1);for(var pe=0,de=Math.min(ne.length-X,2);pe<de;++pe)ne[X+pe]=(Q&255<<8*($?pe:1-pe))>>>($?pe:1-pe)*8}c.prototype.writeUInt16LE=function(Q,X,$){return Q=+Q,X=X|0,$||W(this,Q,X,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[X]=Q&255,this[X+1]=Q>>>8):J(this,Q,X,!0),X+2},c.prototype.writeUInt16BE=function(Q,X,$){return Q=+Q,X=X|0,$||W(this,Q,X,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[X]=Q>>>8,this[X+1]=Q&255):J(this,Q,X,!1),X+2};function ee(ne,Q,X,$){Q<0&&(Q=4294967295+Q+1);for(var pe=0,de=Math.min(ne.length-X,4);pe<de;++pe)ne[X+pe]=Q>>>($?pe:3-pe)*8&255}c.prototype.writeUInt32LE=function(Q,X,$){return Q=+Q,X=X|0,$||W(this,Q,X,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[X+3]=Q>>>24,this[X+2]=Q>>>16,this[X+1]=Q>>>8,this[X]=Q&255):ee(this,Q,X,!0),X+4},c.prototype.writeUInt32BE=function(Q,X,$){return Q=+Q,X=X|0,$||W(this,Q,X,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[X]=Q>>>24,this[X+1]=Q>>>16,this[X+2]=Q>>>8,this[X+3]=Q&255):ee(this,Q,X,!1),X+4},c.prototype.writeIntLE=function(Q,X,$,pe){if(Q=+Q,X=X|0,!pe){var de=Math.pow(2,8*$-1);W(this,Q,X,$,de-1,-de)}var Ce=0,ze=1,qe=0;for(this[X]=Q&255;++Ce<$&&(ze*=256);)Q<0&&qe===0&&this[X+Ce-1]!==0&&(qe=1),this[X+Ce]=(Q/ze>>0)-qe&255;return X+$},c.prototype.writeIntBE=function(Q,X,$,pe){if(Q=+Q,X=X|0,!pe){var de=Math.pow(2,8*$-1);W(this,Q,X,$,de-1,-de)}var Ce=$-1,ze=1,qe=0;for(this[X+Ce]=Q&255;--Ce>=0&&(ze*=256);)Q<0&&qe===0&&this[X+Ce+1]!==0&&(qe=1),this[X+Ce]=(Q/ze>>0)-qe&255;return X+$},c.prototype.writeInt8=function(Q,X,$){return Q=+Q,X=X|0,$||W(this,Q,X,1,127,-128),c.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),Q<0&&(Q=255+Q+1),this[X]=Q&255,X+1},c.prototype.writeInt16LE=function(Q,X,$){return Q=+Q,X=X|0,$||W(this,Q,X,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[X]=Q&255,this[X+1]=Q>>>8):J(this,Q,X,!0),X+2},c.prototype.writeInt16BE=function(Q,X,$){return Q=+Q,X=X|0,$||W(this,Q,X,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[X]=Q>>>8,this[X+1]=Q&255):J(this,Q,X,!1),X+2},c.prototype.writeInt32LE=function(Q,X,$){return Q=+Q,X=X|0,$||W(this,Q,X,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[X]=Q&255,this[X+1]=Q>>>8,this[X+2]=Q>>>16,this[X+3]=Q>>>24):ee(this,Q,X,!0),X+4},c.prototype.writeInt32BE=function(Q,X,$){return Q=+Q,X=X|0,$||W(this,Q,X,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),c.TYPED_ARRAY_SUPPORT?(this[X]=Q>>>24,this[X+1]=Q>>>16,this[X+2]=Q>>>8,this[X+3]=Q&255):ee(this,Q,X,!1),X+4};function Z(ne,Q,X,$,pe,de){if(X+$>ne.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function he(ne,Q,X,$,pe){return pe||Z(ne,Q,X,4,34028234663852886e22,-34028234663852886e22),R.write(ne,Q,X,$,23,4),X+4}c.prototype.writeFloatLE=function(Q,X,$){return he(this,Q,X,!0,$)},c.prototype.writeFloatBE=function(Q,X,$){return he(this,Q,X,!1,$)};function ge(ne,Q,X,$,pe){return pe||Z(ne,Q,X,8,17976931348623157e292,-17976931348623157e292),R.write(ne,Q,X,$,52,8),X+8}c.prototype.writeDoubleLE=function(Q,X,$){return ge(this,Q,X,!0,$)},c.prototype.writeDoubleBE=function(Q,X,$){return ge(this,Q,X,!1,$)},c.prototype.copy=function(Q,X,$,pe){if($||($=0),!pe&&pe!==0&&(pe=this.length),X>=Q.length&&(X=Q.length),X||(X=0),pe>0&&pe<$&&(pe=$),pe===$)return 0;if(Q.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(pe<0)throw new RangeError("sourceEnd out of bounds");pe>this.length&&(pe=this.length),Q.length-X<pe-$&&(pe=Q.length-X+$);var de=pe-$,Ce;if(this===Q&&$<X&&X<pe)for(Ce=de-1;Ce>=0;--Ce)Q[Ce+X]=this[Ce+$];else if(de<1e3||!c.TYPED_ARRAY_SUPPORT)for(Ce=0;Ce<de;++Ce)Q[Ce+X]=this[Ce+$];else Uint8Array.prototype.set.call(Q,this.subarray($,$+de),X);return de},c.prototype.fill=function(Q,X,$,pe){if(typeof Q=="string"){if(typeof X=="string"?(pe=X,X=0,$=this.length):typeof $=="string"&&(pe=$,$=this.length),Q.length===1){var de=Q.charCodeAt(0);de<256&&(Q=de)}if(pe!==void 0&&typeof pe!="string")throw new TypeError("encoding must be a string");if(typeof pe=="string"&&!c.isEncoding(pe))throw new TypeError("Unknown encoding: "+pe)}else typeof Q=="number"&&(Q=Q&255);if(X<0||this.length<X||this.length<$)throw new RangeError("Out of range index");if($<=X)return this;X=X>>>0,$=$===void 0?this.length:$>>>0,Q||(Q=0);var Ce;if(typeof Q=="number")for(Ce=X;Ce<$;++Ce)this[Ce]=Q;else{var ze=c.isBuffer(Q)?Q:se(new c(Q,pe).toString()),qe=ze.length;for(Ce=0;Ce<$-X;++Ce)this[Ce+X]=ze[Ce%qe]}return this};var ie=/[^+\/0-9A-Za-z-_]/g;function we(ne){if(ne=me(ne).replace(ie,""),ne.length<2)return"";for(;ne.length%4!==0;)ne=ne+"=";return ne}function me(ne){return ne.trim?ne.trim():ne.replace(/^\s+|\s+$/g,"")}function oe(ne){return ne<16?"0"+ne.toString(16):ne.toString(16)}function se(ne,Q){Q=Q||Infinity;for(var X,$=ne.length,pe=null,de=[],Ce=0;Ce<$;++Ce){if(X=ne.charCodeAt(Ce),X>55295&&X<57344){if(!pe){if(X>56319){(Q-=3)>-1&&de.push(239,191,189);continue}else if(Ce+1===$){(Q-=3)>-1&&de.push(239,191,189);continue}pe=X;continue}if(X<56320){(Q-=3)>-1&&de.push(239,191,189),pe=X;continue}X=(pe-55296<<10|X-56320)+65536}else pe&&((Q-=3)>-1&&de.push(239,191,189));if(pe=null,X<128){if((Q-=1)<0)break;de.push(X)}else if(X<2048){if((Q-=2)<0)break;de.push(X>>6|192,X&63|128)}else if(X<65536){if((Q-=3)<0)break;de.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((Q-=4)<0)break;de.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return de}function te(ne){for(var Q=[],X=0;X<ne.length;++X)Q.push(ne.charCodeAt(X)&255);return Q}function be(ne,Q){for(var X,$,pe,de=[],Ce=0;Ce<ne.length&&!((Q-=2)<0);++Ce)X=ne.charCodeAt(Ce),$=X>>8,pe=X%256,de.push(pe),de.push($);return de}function q(ne){return S.toByteArray(we(ne))}function ae(ne,Q,X,$){for(var pe=0;pe<$&&!(pe+X>=Q.length||pe>=ne.length);++pe)Q[pe+X]=ne[pe];return pe}function xe(ne){return ne!==ne}}).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,Y,k){Y.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(I,Y,k){Y.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(I,Y,k){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var L=Array.prototype.slice;Y.exports=c;function c(R,f){if(!(this instanceof c))return new c(R,f);this.src=R,this._withAccess=f}c.prototype.withAccess=function(R){return this._withAccess=R!==!1,this},c.prototype.pick=function(R){return Array.isArray(R)||(R=L.call(arguments)),R.length&&(this.keys=R),this},c.prototype.to=function(R){if(R=R||{},!this.src)return R;var f=this.keys||Object.keys(this.src);if(!this._withAccess){for(var s=0;s<f.length;s++){if(w=f[s],R[w]!==void 0)continue;R[w]=this.src[w]}return R}for(var s=0;s<f.length;s++){var w=f[s];if(!S(R,w))continue;var l=this.src.__lookupGetter__(w),i=this.src.__lookupSetter__(w);l&&R.__defineGetter__(w,l),i&&R.__defineSetter__(w,i),!l&&!i&&(R[w]=this.src[w])}return R},c.prototype.toCover=function(R){for(var f=this.keys||Object.keys(this.src),s=0;s<f.length;s++){var w=f[s];delete R[w];var l=this.src.__lookupGetter__(w),i=this.src.__lookupSetter__(w);l&&R.__defineGetter__(w,l),i&&R.__defineSetter__(w,i),!l&&!i&&(R[w]=this.src[w])}},c.prototype.override=c.prototype.toCover,c.prototype.and=function(R){var f={};return this.to(f),this.src=R,this.to(f),this.src=f,this};function S(R,f){return R[f]===void 0&&R.__lookupGetter__(f)===void 0&&R.__lookupSetter__(f)===void 0}},{}],77:[function(I,Y,k){I("../../modules/es6.string.iterator"),I("../../modules/es6.array.from"),Y.exports=I("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(I,Y,k){var L=I("../../modules/_core"),c=L.JSON||(L.JSON={stringify:JSON.stringify});Y.exports=function(R){return c.stringify.apply(c,arguments)}},{"../../modules/_core":99}],79:[function(I,Y,k){I("../../modules/es6.object.assign"),Y.exports=I("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(I,Y,k){I("../../modules/es6.object.create");var L=I("../../modules/_core").Object;Y.exports=function(S,R){return L.create(S,R)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(I,Y,k){I("../../modules/es6.object.define-property");var L=I("../../modules/_core").Object;Y.exports=function(S,R,f){return L.defineProperty(S,R,f)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(I,Y,k){I("../../modules/es7.object.entries"),Y.exports=I("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(I,Y,k){I("../../modules/es6.object.get-own-property-names");var L=I("../../modules/_core").Object;Y.exports=function(S){return L.getOwnPropertyNames(S)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(I,Y,k){I("../../modules/es6.object.get-prototype-of"),Y.exports=I("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(I,Y,k){I("../../modules/es6.object.keys"),Y.exports=I("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(I,Y,k){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"),Y.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,Y,k){I("../modules/web.immediate"),Y.exports=I("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(I,Y,k){I("../../modules/es6.string.from-code-point"),Y.exports=I("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(I,Y,k){I("../../modules/es6.function.has-instance"),Y.exports=I("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(I,Y,k){I("../../modules/es6.symbol"),I("../../modules/es6.object.to-string"),I("../../modules/es7.symbol.async-iterator"),I("../../modules/es7.symbol.observable"),Y.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,Y,k){I("../../modules/es6.string.iterator"),I("../../modules/web.dom.iterable"),Y.exports=I("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(I,Y,k){Y.exports=function(L){if(typeof L!="function")throw TypeError(L+" is not a function!");return L}},{}],93:[function(I,Y,k){Y.exports=function(){}},{}],94:[function(I,Y,k){Y.exports=function(L,c,S,R){if(!(L instanceof c)||R!==void 0&&R in L)throw TypeError(S+": incorrect invocation!");return L}},{}],95:[function(I,Y,k){var L=I("./_is-object");Y.exports=function(c){if(!L(c))throw TypeError(c+" is not an object!");return c}},{"./_is-object":119}],96:[function(I,Y,k){var L=I("./_to-iobject"),c=I("./_to-length"),S=I("./_to-absolute-index");Y.exports=function(R){return function(f,s,w){var l=L(f),i=c(l.length),a=S(w,i),r;if(R&&s!=s){for(;i>a;)if(r=l[a++],r!=r)return!0}else for(;i>a;a++)if((R||a in l)&&l[a]===s)return R||a||0;return!R&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(I,Y,k){var L=I("./_cof"),c=I("./_wks")("toStringTag"),S=L(function(){return arguments}())=="Arguments",R=function(f,s){try{return f[s]}catch(w){}};Y.exports=function(f){var s,w,l;return f===void 0?"Undefined":f===null?"Null":typeof(w=R(s=Object(f),c))=="string"?w:S?L(s):(l=L(s))=="Object"&&typeof s.callee=="function"?"Arguments":l}},{"./_cof":98,"./_wks":166}],98:[function(I,Y,k){var L={}.toString;Y.exports=function(c){return L.call(c).slice(8,-1)}},{}],99:[function(I,Y,k){var L=Y.exports={version:"2.6.11"};typeof __e=="number"&&(__e=L)},{}],100:[function(I,Y,k){"use strict";var L=I("./_object-dp"),c=I("./_property-desc");Y.exports=function(S,R,f){R in S?L.f(S,R,c(0,f)):S[R]=f}},{"./_object-dp":132,"./_property-desc":146}],101:[function(I,Y,k){var L=I("./_a-function");Y.exports=function(c,S,R){if(L(c),S===void 0)return c;switch(R){case 1:return function(f){return c.call(S,f)};case 2:return function(f,s){return c.call(S,f,s)};case 3:return function(f,s,w){return c.call(S,f,s,w)}}return function(){return c.apply(S,arguments)}}},{"./_a-function":92}],102:[function(I,Y,k){Y.exports=function(L){if(L==null)throw TypeError("Can't call method on "+L);return L}},{}],103:[function(I,Y,k){Y.exports=!I("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(I,Y,k){var L=I("./_is-object"),c=I("./_global").document,S=L(c)&&L(c.createElement);Y.exports=function(R){return S?c.createElement(R):{}}},{"./_global":110,"./_is-object":119}],105:[function(I,Y,k){Y.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(I,Y,k){var L=I("./_object-keys"),c=I("./_object-gops"),S=I("./_object-pie");Y.exports=function(R){var f=L(R),s=c.f;if(s)for(var w=s(R),l=S.f,i=0,a;w.length>i;)l.call(R,a=w[i++])&&f.push(a);return f}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(I,Y,k){var L=I("./_global"),c=I("./_core"),S=I("./_ctx"),R=I("./_hide"),f=I("./_has"),s="prototype",w=function(l,i,a){var r=l&w.F,u=l&w.G,p=l&w.S,m=l&w.P,b=l&w.B,g=l&w.W,v=u?c:c[i]||(c[i]={}),n=v[s],d=u?L:p?L[i]:(L[i]||{})[s],h,C,T;u&&(a=i);for(h in a){if(C=!r&&d&&d[h]!==void 0,C&&f(v,h))continue;T=C?d[h]:a[h],v[h]=u&&typeof d[h]!="function"?a[h]:b&&C?S(T,L):g&&d[h]==T?function(o){var P=function(O,y,x){if(this instanceof o){switch(arguments.length){case 0:return new o;case 1:return new o(O);case 2:return new o(O,y)}return new o(O,y,x)}return o.apply(this,arguments)};return P[s]=o[s],P}(T):m&&typeof T=="function"?S(Function.call,T):T,m&&((v.virtual||(v.virtual={}))[h]=T,l&w.R&&n&&!n[h]&&R(n,h,T))}};w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,Y.exports=w},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(I,Y,k){Y.exports=function(L){try{return!!L()}catch(c){return!0}}},{}],109:[function(I,Y,k){var L=I("./_ctx"),c=I("./_iter-call"),S=I("./_is-array-iter"),R=I("./_an-object"),f=I("./_to-length"),s=I("./core.get-iterator-method"),w={},l={},k=Y.exports=function(i,a,r,u,p){var m=p?function(){return i}:s(i),b=L(r,u,a?2:1),g=0,v,n,d,h;if(typeof m!="function")throw TypeError(i+" is not iterable!");if(S(m)){for(v=f(i.length);v>g;g++)if(h=a?b(R(n=i[g])[0],n[1]):b(i[g]),h===w||h===l)return h}else for(d=m.call(i);!(n=d.next()).done;)if(h=c(d,b,n.value,a),h===w||h===l)return h};k.BREAK=w,k.RETURN=l},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(I,Y,k){var L=Y.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=L)},{}],111:[function(I,Y,k){var L={}.hasOwnProperty;Y.exports=function(c,S){return L.call(c,S)}},{}],112:[function(I,Y,k){var L=I("./_object-dp"),c=I("./_property-desc");Y.exports=I("./_descriptors")?function(S,R,f){return L.f(S,R,c(1,f))}:function(S,R,f){return S[R]=f,S}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(I,Y,k){var L=I("./_global").document;Y.exports=L&&L.documentElement},{"./_global":110}],114:[function(I,Y,k){Y.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,Y,k){Y.exports=function(L,c,S){var R=S===void 0;switch(c.length){case 0:return R?L():L.call(S);case 1:return R?L(c[0]):L.call(S,c[0]);case 2:return R?L(c[0],c[1]):L.call(S,c[0],c[1]);case 3:return R?L(c[0],c[1],c[2]):L.call(S,c[0],c[1],c[2]);case 4:return R?L(c[0],c[1],c[2],c[3]):L.call(S,c[0],c[1],c[2],c[3])}return L.apply(S,c)}},{}],116:[function(I,Y,k){var L=I("./_cof");Y.exports=Object("z").propertyIsEnumerable(0)?Object:function(c){return L(c)=="String"?c.split(""):Object(c)}},{"./_cof":98}],117:[function(I,Y,k){var L=I("./_iterators"),c=I("./_wks")("iterator"),S=Array.prototype;Y.exports=function(R){return R!==void 0&&(L.Array===R||S[c]===R)}},{"./_iterators":125,"./_wks":166}],118:[function(I,Y,k){var L=I("./_cof");Y.exports=Array.isArray||function(S){return L(S)=="Array"}},{"./_cof":98}],119:[function(I,Y,k){Y.exports=function(L){return typeof L=="object"?L!==null:typeof L=="function"}},{}],120:[function(I,Y,k){var L=I("./_an-object");Y.exports=function(c,S,R,f){try{return f?S(L(R)[0],R[1]):S(R)}catch(w){var s=c.return;throw s!==void 0&&L(s.call(c)),w}}},{"./_an-object":95}],121:[function(I,Y,k){"use strict";var L=I("./_object-create"),c=I("./_property-desc"),S=I("./_set-to-string-tag"),R={};I("./_hide")(R,I("./_wks")("iterator"),function(){return this}),Y.exports=function(f,s,w){f.prototype=L(R,{next:c(1,w)}),S(f,s+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(I,Y,k){"use strict";var L=I("./_library"),c=I("./_export"),S=I("./_redefine"),R=I("./_hide"),f=I("./_iterators"),s=I("./_iter-create"),w=I("./_set-to-string-tag"),l=I("./_object-gpo"),i=I("./_wks")("iterator"),a=!([].keys&&"next"in[].keys()),r="@@iterator",u="keys",p="values",m=function(){return this};Y.exports=function(b,g,v,n,d,h,C){s(v,g,n);var T=function(z){if(!a&&z in y)return y[z];switch(z){case u:return function(){return new v(this,z)};case p:return function(){return new v(this,z)}}return function(){return new v(this,z)}},o=g+" Iterator",P=d==p,O=!1,y=b.prototype,x=y[i]||y[r]||d&&y[d],E=x||T(d),_=d?P?T("entries"):E:void 0,N=g=="Array"&&y.entries||x,j,M,H;if(N&&(H=l(N.call(new b)),H!==Object.prototype&&H.next&&(w(H,o,!0),!L&&typeof H[i]!="function"&&R(H,i,m))),P&&x&&x.name!==p&&(O=!0,E=function(){return x.call(this)}),(!L||C)&&(a||O||!y[i])&&R(y,i,E),f[g]=E,f[o]=m,d)if(j={values:P?E:T(p),keys:h?E:T(u),entries:_},C)for(M in j)M in y||S(y,M,j[M]);else c(c.P+c.F*(a||O),g,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,Y,k){var L=I("./_wks")("iterator"),c=!1;try{var S=[7][L]();S.return=function(){c=!0},Array.from(S,function(){throw 2})}catch(R){}Y.exports=function(R,f){if(!f&&!c)return!1;var s=!1;try{var w=[7],l=w[L]();l.next=function(){return{done:s=!0}},w[L]=function(){return l},R(w)}catch(i){}return s}},{"./_wks":166}],124:[function(I,Y,k){Y.exports=function(L,c){return{value:c,done:!!L}}},{}],125:[function(I,Y,k){Y.exports={}},{}],126:[function(I,Y,k){Y.exports=!0},{}],127:[function(I,Y,k){var L=I("./_uid")("meta"),c=I("./_is-object"),S=I("./_has"),R=I("./_object-dp").f,f=0,s=Object.isExtensible||function(){return!0},w=!I("./_fails")(function(){return s(Object.preventExtensions({}))}),l=function(p){R(p,L,{value:{i:"O"+ ++f,w:{}}})},i=function(p,m){if(!c(p))return typeof p=="symbol"?p:(typeof p=="string"?"S":"P")+p;if(!S(p,L)){if(!s(p))return"F";if(!m)return"E";l(p)}return p[L].i},a=function(p,m){if(!S(p,L)){if(!s(p))return!0;if(!m)return!1;l(p)}return p[L].w},r=function(p){return w&&u.NEED&&s(p)&&!S(p,L)&&l(p),p},u=Y.exports={KEY:L,NEED:!1,fastKey:i,getWeak:a,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(I,Y,k){var L=I("./_global"),c=I("./_task").set,S=L.MutationObserver||L.WebKitMutationObserver,R=L.process,f=L.Promise,s=I("./_cof")(R)=="process";Y.exports=function(){var w,l,i,a=function(){var m,b;for(s&&(m=R.domain)&&m.exit();w;){b=w.fn,w=w.next;try{b()}catch(g){throw w?i():l=void 0,g}}l=void 0,m&&m.enter()};if(s)i=function(){R.nextTick(a)};else if(S&&!(L.navigator&&L.navigator.standalone)){var r=!0,u=document.createTextNode("");new S(a).observe(u,{characterData:!0}),i=function(){u.data=r=!r}}else if(f&&f.resolve){var p=f.resolve(void 0);i=function(){p.then(a)}}else i=function(){c.call(L,a)};return function(m){var b={fn:m,next:void 0};l&&(l.next=b),w||(w=b,i()),l=b}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(I,Y,k){"use strict";var L=I("./_a-function");function c(S){var R,f;this.promise=new S(function(s,w){if(R!==void 0||f!==void 0)throw TypeError("Bad Promise constructor");R=s,f=w}),this.resolve=L(R),this.reject=L(f)}Y.exports.f=function(S){return new c(S)}},{"./_a-function":92}],130:[function(I,Y,k){"use strict";var L=I("./_descriptors"),c=I("./_object-keys"),S=I("./_object-gops"),R=I("./_object-pie"),f=I("./_to-object"),s=I("./_iobject"),w=Object.assign;Y.exports=!w||I("./_fails")(function(){var l={},i={},a=Symbol(),r="abcdefghijklmnopqrst";return l[a]=7,r.split("").forEach(function(u){i[u]=u}),w({},l)[a]!=7||Object.keys(w({},i)).join("")!=r})?function(i,a){for(var r=f(i),u=arguments.length,p=1,m=S.f,b=R.f;u>p;)for(var g=s(arguments[p++]),v=m?c(g).concat(m(g)):c(g),n=v.length,d=0,h;n>d;)h=v[d++],(!L||b.call(g,h))&&(r[h]=g[h]);return r}:w},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(I,Y,k){var L=I("./_an-object"),c=I("./_object-dps"),S=I("./_enum-bug-keys"),R=I("./_shared-key")("IE_PROTO"),f=function(){},s="prototype",w=function(){var l=I("./_dom-create")("iframe"),i=S.length,a="<",r=">",u;for(l.style.display="none",I("./_html").appendChild(l),l.src="javascript:",u=l.contentWindow.document,u.open(),u.write(a+"script"+r+"document.F=Object"+a+"/script"+r),u.close(),w=u.F;i--;)delete w[s][S[i]];return w()};Y.exports=Object.create||function(i,a){var r;return i!==null?(f[s]=L(i),r=new f,f[s]=null,r[R]=i):r=w(),a===void 0?r:c(r,a)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(I,Y,k){var L=I("./_an-object"),c=I("./_ie8-dom-define"),S=I("./_to-primitive"),R=Object.defineProperty;k.f=I("./_descriptors")?Object.defineProperty:function(s,w,l){if(L(s),w=S(w,!0),L(l),c)try{return R(s,w,l)}catch(i){}if("get"in l||"set"in l)throw TypeError("Accessors not supported!");return"value"in l&&(s[w]=l.value),s}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(I,Y,k){var L=I("./_object-dp"),c=I("./_an-object"),S=I("./_object-keys");Y.exports=I("./_descriptors")?Object.defineProperties:function(f,s){c(f);for(var w=S(s),l=w.length,i=0,a;l>i;)L.f(f,a=w[i++],s[a]);return f}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(I,Y,k){var L=I("./_object-pie"),c=I("./_property-desc"),S=I("./_to-iobject"),R=I("./_to-primitive"),f=I("./_has"),s=I("./_ie8-dom-define"),w=Object.getOwnPropertyDescriptor;k.f=I("./_descriptors")?w:function(i,a){if(i=S(i),a=R(a,!0),s)try{return w(i,a)}catch(r){}if(f(i,a))return c(!L.f.call(i,a),i[a])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(I,Y,k){var L=I("./_to-iobject"),c=I("./_object-gopn").f,S={}.toString,R=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(s){try{return c(s)}catch(w){return R.slice()}};Y.exports.f=function(w){return R&&S.call(w)=="[object Window]"?f(w):c(L(w))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(I,Y,k){var L=I("./_object-keys-internal"),c=I("./_enum-bug-keys").concat("length","prototype");k.f=Object.getOwnPropertyNames||function(R){return L(R,c)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(I,Y,k){k.f=Object.getOwnPropertySymbols},{}],138:[function(I,Y,k){var L=I("./_has"),c=I("./_to-object"),S=I("./_shared-key")("IE_PROTO"),R=Object.prototype;Y.exports=Object.getPrototypeOf||function(f){return f=c(f),L(f,S)?f[S]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?R:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(I,Y,k){var L=I("./_has"),c=I("./_to-iobject"),S=I("./_array-includes")(!1),R=I("./_shared-key")("IE_PROTO");Y.exports=function(f,s){var w=c(f),l=0,i=[],a;for(a in w)a!=R&&(L(w,a)&&i.push(a));for(;s.length>l;)L(w,a=s[l++])&&(~S(i,a)||i.push(a));return i}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(I,Y,k){var L=I("./_object-keys-internal"),c=I("./_enum-bug-keys");Y.exports=Object.keys||function(R){return L(R,c)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(I,Y,k){k.f={}.propertyIsEnumerable},{}],142:[function(I,Y,k){var L=I("./_export"),c=I("./_core"),S=I("./_fails");Y.exports=function(R,f){var s=(c.Object||{})[R]||Object[R],w={};w[R]=f(s),L(L.S+L.F*S(function(){s(1)}),"Object",w)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(I,Y,k){var L=I("./_descriptors"),c=I("./_object-keys"),S=I("./_to-iobject"),R=I("./_object-pie").f;Y.exports=function(f){return function(s){for(var w=S(s),l=c(w),i=l.length,a=0,r=[],u;i>a;)u=l[a++],(!L||R.call(w,u))&&r.push(f?[u,w[u]]:w[u]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(I,Y,k){Y.exports=function(L){try{return{e:!1,v:L()}}catch(c){return{e:!0,v:c}}}},{}],145:[function(I,Y,k){var L=I("./_an-object"),c=I("./_is-object"),S=I("./_new-promise-capability");Y.exports=function(R,f){if(L(R),c(f)&&f.constructor===R)return f;var s=S.f(R),w=s.resolve;return w(f),s.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(I,Y,k){Y.exports=function(L,c){return{enumerable:!(L&1),configurable:!(L&2),writable:!(L&4),value:c}}},{}],147:[function(I,Y,k){var L=I("./_hide");Y.exports=function(c,S,R){for(var f in S)R&&c[f]?c[f]=S[f]:L(c,f,S[f]);return c}},{"./_hide":112}],148:[function(I,Y,k){Y.exports=I("./_hide")},{"./_hide":112}],149:[function(I,Y,k){"use strict";var L=I("./_global"),c=I("./_core"),S=I("./_object-dp"),R=I("./_descriptors"),f=I("./_wks")("species");Y.exports=function(s){var w=typeof c[s]=="function"?c[s]:L[s];R&&w&&!w[f]&&S.f(w,f,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(I,Y,k){var L=I("./_object-dp").f,c=I("./_has"),S=I("./_wks")("toStringTag");Y.exports=function(R,f,s){R&&!c(R=s?R:R.prototype,S)&&L(R,S,{configurable:!0,value:f})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(I,Y,k){var L=I("./_shared")("keys"),c=I("./_uid");Y.exports=function(S){return L[S]||(L[S]=c(S))}},{"./_shared":152,"./_uid":162}],152:[function(I,Y,k){var L=I("./_core"),c=I("./_global"),S="__core-js_shared__",R=c[S]||(c[S]={});(Y.exports=function(f,s){return R[f]||(R[f]=s!==void 0?s:{})})("versions",[]).push({version:L.version,mode:I("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(I,Y,k){var L=I("./_an-object"),c=I("./_a-function"),S=I("./_wks")("species");Y.exports=function(R,f){var s=L(R).constructor,w;return s===void 0||(w=L(s)[S])==null?f:c(w)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(I,Y,k){var L=I("./_to-integer"),c=I("./_defined");Y.exports=function(S){return function(R,f){var s=String(c(R)),w=L(f),l=s.length,i,a;return w<0||w>=l?S?"":void 0:(i=s.charCodeAt(w),i<55296||i>56319||w+1===l||(a=s.charCodeAt(w+1))<56320||a>57343?S?s.charAt(w):i:S?s.slice(w,w+2):(i-55296<<10)+(a-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(I,Y,k){var L=I("./_ctx"),c=I("./_invoke"),S=I("./_html"),R=I("./_dom-create"),f=I("./_global"),s=f.process,w=f.setImmediate,l=f.clearImmediate,i=f.MessageChannel,a=f.Dispatch,r=0,u={},p="onreadystatechange",m,b,g,v=function(){var d=+this;if(u.hasOwnProperty(d)){var h=u[d];delete u[d],h()}},n=function(d){v.call(d.data)};(!w||!l)&&(w=function(h){for(var C=[],T=1;arguments.length>T;)C.push(arguments[T++]);return u[++r]=function(){c(typeof h=="function"?h:Function(h),C)},m(r),r},l=function(h){delete u[h]},I("./_cof")(s)=="process"?m=function(d){s.nextTick(L(v,d,1))}:a&&a.now?m=function(d){a.now(L(v,d,1))}:i?(b=new i,g=b.port2,b.port1.onmessage=n,m=L(g.postMessage,g,1)):f.addEventListener&&typeof postMessage=="function"&&!f.importScripts?(m=function(d){f.postMessage(d+"","*")},f.addEventListener("message",n,!1)):p in R("script")?m=function(d){S.appendChild(R("script"))[p]=function(){S.removeChild(this),v.call(d)}}:m=function(d){setTimeout(L(v,d,1),0)}),Y.exports={set:w,clear:l}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(I,Y,k){var L=I("./_to-integer"),c=Math.max,S=Math.min;Y.exports=function(R,f){return R=L(R),R<0?c(R+f,0):S(R,f)}},{"./_to-integer":157}],157:[function(I,Y,k){var L=Math.ceil,c=Math.floor;Y.exports=function(S){return isNaN(S=+S)?0:(S>0?c:L)(S)}},{}],158:[function(I,Y,k){var L=I("./_iobject"),c=I("./_defined");Y.exports=function(S){return L(c(S))}},{"./_defined":102,"./_iobject":116}],159:[function(I,Y,k){var L=I("./_to-integer"),c=Math.min;Y.exports=function(S){return S>0?c(L(S),9007199254740991):0}},{"./_to-integer":157}],160:[function(I,Y,k){var L=I("./_defined");Y.exports=function(c){return Object(L(c))}},{"./_defined":102}],161:[function(I,Y,k){var L=I("./_is-object");Y.exports=function(c,S){if(!L(c))return c;var R,f;if(S&&typeof(R=c.toString)=="function"&&!L(f=R.call(c)))return f;if(typeof(R=c.valueOf)=="function"&&!L(f=R.call(c)))return f;if(!S&&typeof(R=c.toString)=="function"&&!L(f=R.call(c)))return f;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(I,Y,k){var L=0,c=Math.random();Y.exports=function(S){return"Symbol(".concat(S===void 0?"":S,")_",(++L+c).toString(36))}},{}],163:[function(I,Y,k){var L=I("./_global"),c=L.navigator;Y.exports=c&&c.userAgent||""},{"./_global":110}],164:[function(I,Y,k){var L=I("./_global"),c=I("./_core"),S=I("./_library"),R=I("./_wks-ext"),f=I("./_object-dp").f;Y.exports=function(s){var w=c.Symbol||(c.Symbol=S?{}:L.Symbol||{});s.charAt(0)!="_"&&!(s in w)&&f(w,s,{value:R.f(s)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(I,Y,k){k.f=I("./_wks")},{"./_wks":166}],166:[function(I,Y,k){var L=I("./_shared")("wks"),c=I("./_uid"),S=I("./_global").Symbol,R=typeof S=="function",f=Y.exports=function(s){return L[s]||(L[s]=R&&S[s]||(R?S:c)("Symbol."+s))};f.store=L},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(I,Y,k){var L=I("./_classof"),c=I("./_wks")("iterator"),S=I("./_iterators");Y.exports=I("./_core").getIteratorMethod=function(R){if(R!=null)return R[c]||R["@@iterator"]||S[L(R)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(I,Y,k){"use strict";var L=I("./_ctx"),c=I("./_export"),S=I("./_to-object"),R=I("./_iter-call"),f=I("./_is-array-iter"),s=I("./_to-length"),w=I("./_create-property"),l=I("./core.get-iterator-method");c(c.S+c.F*!I("./_iter-detect")(function(i){Array.from(i)}),"Array",{from:function(a){var r=S(a),u=typeof this=="function"?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,b=m!==void 0,g=0,v=l(r),n,d,h,C;if(b&&(m=L(m,p>2?arguments[2]:void 0,2)),v!=null&&!(u==Array&&f(v)))for(C=v.call(r),d=new u;!(h=C.next()).done;g++)w(d,g,b?R(C,m,[h.value,g],!0):h.value);else for(n=s(r.length),d=new u(n);n>g;g++)w(d,g,b?m(r[g],g):r[g]);return d.length=g,d}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(I,Y,k){"use strict";var L=I("./_add-to-unscopables"),c=I("./_iter-step"),S=I("./_iterators"),R=I("./_to-iobject");Y.exports=I("./_iter-define")(Array,"Array",function(f,s){this._t=R(f),this._i=0,this._k=s},function(){var f=this._t,s=this._k,w=this._i++;return!f||w>=f.length?(this._t=void 0,c(1)):s=="keys"?c(0,w):s=="values"?c(0,f[w]):c(0,[w,f[w]])},"values"),S.Arguments=S.Array,L("keys"),L("values"),L("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(I,Y,k){"use strict";var L=I("./_is-object"),c=I("./_object-gpo"),S=I("./_wks")("hasInstance"),R=Function.prototype;S in R||I("./_object-dp").f(R,S,{value:function(f){if(typeof this!="function"||!L(f))return!1;if(!L(this.prototype))return f instanceof this;for(;f=c(f);)if(this.prototype===f)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(I,Y,k){var L=I("./_export");L(L.S+L.F,"Object",{assign:I("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(I,Y,k){var L=I("./_export");L(L.S,"Object",{create:I("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(I,Y,k){var L=I("./_export");L(L.S+L.F*!I("./_descriptors"),"Object",{defineProperty:I("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(I,Y,k){I("./_object-sap")("getOwnPropertyNames",function(){return I("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(I,Y,k){var L=I("./_to-object"),c=I("./_object-gpo");I("./_object-sap")("getPrototypeOf",function(){return function(R){return c(L(R))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(I,Y,k){var L=I("./_to-object"),c=I("./_object-keys");I("./_object-sap")("keys",function(){return function(R){return c(L(R))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(I,Y,k){arguments[4][71][0].apply(k,arguments)},{dup:71}],178:[function(I,Y,k){"use strict";var L=I("./_library"),c=I("./_global"),S=I("./_ctx"),R=I("./_classof"),f=I("./_export"),s=I("./_is-object"),w=I("./_a-function"),l=I("./_an-instance"),i=I("./_for-of"),a=I("./_species-constructor"),r=I("./_task").set,u=I("./_microtask")(),p=I("./_new-promise-capability"),m=I("./_perform"),b=I("./_user-agent"),g=I("./_promise-resolve"),v="Promise",n=c.TypeError,d=c.process,h=d&&d.versions,C=h&&h.v8||"",T=c[v],o=R(d)=="process",P=function(){},O,y,x,E,_=y=p.f,N=!!function(){try{var K=T.resolve(1),W=(K.constructor={})[I("./_wks")("species")]=function(J){J(P,P)};return(o||typeof PromiseRejectionEvent=="function")&&K.then(P)instanceof W&&C.indexOf("6.6")!==0&&b.indexOf("Chrome/66")===-1}catch(J){}}(),j=function(K){var W;return s(K)&&typeof(W=K.then)=="function"?W:!1},M=function(K,W){if(K._n)return;K._n=!0;var J=K._c;u(function(){for(var ee=K._v,Z=K._s==1,he=0,ge=function(ie){var we=Z?ie.ok:ie.fail,me=ie.resolve,oe=ie.reject,se=ie.domain,te,be,q;try{we?(Z||(K._h==2&&F(K),K._h=1),we===!0?te=ee:(se&&se.enter(),te=we(ee),se&&(se.exit(),q=!0)),te===ie.promise?oe(n("Promise-chain cycle")):(be=j(te))?be.call(te,me,oe):me(te)):oe(ee)}catch(ae){se&&!q&&se.exit(),oe(ae)}};J.length>he;)ge(J[he++]);K._c=[],K._n=!1,W&&!K._h&&H(K)})},H=function(K){r.call(c,function(){var W=K._v,J=z(K),ee,Z,he;if(J&&(ee=m(function(){o?d.emit("unhandledRejection",W,K):(Z=c.onunhandledrejection)?Z({promise:K,reason:W}):(he=c.console)&&he.error&&he.error("Unhandled promise rejection",W)}),K._h=o||z(K)?2:1),K._a=void 0,J&&ee.e)throw ee.v})},z=function(K){return K._h!==1&&(K._a||K._c).length===0},F=function(K){r.call(c,function(){var W;o?d.emit("rejectionHandled",K):(W=c.onrejectionhandled)&&W({promise:K,reason:K._v})})},G=function(K){var W=this;if(W._d)return;W._d=!0,W=W._w||W,W._v=K,W._s=2,W._a||(W._a=W._c.slice()),M(W,!0)},B=function(K){var W=this,J;if(W._d)return;W._d=!0,W=W._w||W;try{if(W===K)throw n("Promise can't be resolved itself");(J=j(K))?u(function(){var ee={_w:W,_d:!1};try{J.call(K,S(B,ee,1),S(G,ee,1))}catch(Z){G.call(ee,Z)}}):(W._v=K,W._s=1,M(W,!1))}catch(ee){G.call({_w:W,_d:!1},ee)}};N||(T=function(W){l(this,T,v,"_h"),w(W),O.call(this);try{W(S(B,this,1),S(G,this,1))}catch(J){G.call(this,J)}},O=function(W){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=I("./_redefine-all")(T.prototype,{then:function(W,J){var ee=_(a(this,T));return ee.ok=typeof W=="function"?W:!0,ee.fail=typeof J=="function"&&J,ee.domain=o?d.domain:void 0,this._c.push(ee),this._a&&this._a.push(ee),this._s&&M(this,!1),ee.promise},catch:function(K){return this.then(void 0,K)}}),x=function(){var K=new O;this.promise=K,this.resolve=S(B,K,1),this.reject=S(G,K,1)},p.f=_=function(K){return K===T||K===E?new x(K):y(K)}),f(f.G+f.W+f.F*!N,{Promise:T}),I("./_set-to-string-tag")(T,v),I("./_set-species")(v),E=I("./_core")[v],f(f.S+f.F*!N,v,{reject:function(W){var J=_(this),ee=J.reject;return ee(W),J.promise}}),f(f.S+f.F*(L||!N),v,{resolve:function(W){return g(L&&this===E?T:this,W)}}),f(f.S+f.F*!(N&&I("./_iter-detect")(function(K){T.all(K).catch(P)})),v,{all:function(W){var J=this,ee=_(J),Z=ee.resolve,he=ee.reject,ge=m(function(){var ie=[],we=0,me=1;i(W,!1,function(oe){var se=we++,te=!1;ie.push(void 0),me++,J.resolve(oe).then(function(be){if(te)return;te=!0,ie[se]=be,--me||Z(ie)},he)}),--me||Z(ie)});return ge.e&&he(ge.v),ee.promise},race:function(W){var J=this,ee=_(J),Z=ee.reject,he=m(function(){i(W,!1,function(ge){J.resolve(ge).then(ee.resolve,Z)})});return he.e&&Z(he.v),ee.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(I,Y,k){var L=I("./_export"),c=I("./_to-absolute-index"),S=String.fromCharCode,R=String.fromCodePoint;L(L.S+L.F*(!!R&&R.length!=1),"String",{fromCodePoint:function(s){for(var w=[],l=arguments.length,i=0,a;l>i;){if(a=+arguments[i++],c(a,1114111)!==a)throw RangeError(a+" is not a valid code point");w.push(a<65536?S(a):S(((a-=65536)>>10)+55296,a%1024+56320))}return w.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(I,Y,k){"use strict";var L=I("./_string-at")(!0);I("./_iter-define")(String,"String",function(c){this._t=String(c),this._i=0},function(){var c=this._t,S=this._i,R;return S>=c.length?{value:void 0,done:!0}:(R=L(c,S),this._i+=R.length,{value:R,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(I,Y,k){"use strict";var L=I("./_global"),c=I("./_has"),S=I("./_descriptors"),R=I("./_export"),f=I("./_redefine"),s=I("./_meta").KEY,w=I("./_fails"),l=I("./_shared"),i=I("./_set-to-string-tag"),a=I("./_uid"),r=I("./_wks"),u=I("./_wks-ext"),p=I("./_wks-define"),m=I("./_enum-keys"),b=I("./_is-array"),g=I("./_an-object"),v=I("./_is-object"),n=I("./_to-object"),d=I("./_to-iobject"),h=I("./_to-primitive"),C=I("./_property-desc"),T=I("./_object-create"),o=I("./_object-gopn-ext"),P=I("./_object-gopd"),O=I("./_object-gops"),y=I("./_object-dp"),x=I("./_object-keys"),E=P.f,_=y.f,N=o.f,j=L.Symbol,M=L.JSON,H=M&&M.stringify,z="prototype",F=r("_hidden"),G=r("toPrimitive"),B={}.propertyIsEnumerable,K=l("symbol-registry"),W=l("symbols"),J=l("op-symbols"),ee=Object[z],Z=typeof j=="function"&&!!O.f,he=L.QObject,ge=!he||!he[z]||!he[z].findChild,ie=S&&w(function(){return T(_({},"a",{get:function(){return _(this,"a",{value:7}).a}})).a!=7})?function(de,Ce,ze){var qe=E(ee,Ce);qe&&delete ee[Ce],_(de,Ce,ze),qe&&de!==ee&&_(ee,Ce,qe)}:_,we=function(de){var Ce=W[de]=T(j[z]);return Ce._k=de,Ce},me=Z&&typeof j.iterator=="symbol"?function(de){return typeof de=="symbol"}:function(de){return de instanceof j},oe=function(Ce,ze,qe){return Ce===ee&&oe(J,ze,qe),g(Ce),ze=h(ze,!0),g(qe),c(W,ze)?(qe.enumerable?(c(Ce,F)&&Ce[F][ze]&&(Ce[F][ze]=!1),qe=T(qe,{enumerable:C(0,!1)})):(c(Ce,F)||_(Ce,F,C(1,{})),Ce[F][ze]=!0),ie(Ce,ze,qe)):_(Ce,ze,qe)},se=function(Ce,ze){g(Ce);for(var qe=m(ze=d(ze)),Ye=0,Ve=qe.length,et;Ve>Ye;)oe(Ce,et=qe[Ye++],ze[et]);return Ce},te=function(Ce,ze){return ze===void 0?T(Ce):se(T(Ce),ze)},be=function(Ce){var ze=B.call(this,Ce=h(Ce,!0));return this===ee&&c(W,Ce)&&!c(J,Ce)?!1:ze||!c(this,Ce)||!c(W,Ce)||c(this,F)&&this[F][Ce]?ze:!0},q=function(Ce,ze){if(Ce=d(Ce),ze=h(ze,!0),Ce===ee&&c(W,ze)&&!c(J,ze))return;var qe=E(Ce,ze);return qe&&c(W,ze)&&!(c(Ce,F)&&Ce[F][ze])&&(qe.enumerable=!0),qe},ae=function(Ce){for(var ze=N(d(Ce)),qe=[],Ye=0,Ve;ze.length>Ye;)!c(W,Ve=ze[Ye++])&&Ve!=F&&Ve!=s&&qe.push(Ve);return qe},xe=function(Ce){for(var ze=Ce===ee,qe=N(ze?J:d(Ce)),Ye=[],Ve=0,et;qe.length>Ve;)c(W,et=qe[Ve++])&&(ze?c(ee,et):!0)&&Ye.push(W[et]);return Ye};Z||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var Ce=a(arguments.length>0?arguments[0]:void 0),ze=function(qe){this===ee&&ze.call(J,qe),c(this,F)&&c(this[F],Ce)&&(this[F][Ce]=!1),ie(this,Ce,C(1,qe))};return S&&ge&&ie(ee,Ce,{configurable:!0,set:ze}),we(Ce)},f(j[z],"toString",function(){return this._k}),P.f=q,y.f=oe,I("./_object-gopn").f=o.f=ae,I("./_object-pie").f=be,O.f=xe,S&&!I("./_library")&&f(ee,"propertyIsEnumerable",be,!0),u.f=function(de){return we(r(de))}),R(R.G+R.W+R.F*!Z,{Symbol:j});for(var ne="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Q=0;ne.length>Q;)r(ne[Q++]);for(var X=x(r.store),$=0;X.length>$;)p(X[$++]);R(R.S+R.F*!Z,"Symbol",{for:function(de){return c(K,de+="")?K[de]:K[de]=j(de)},keyFor:function(Ce){if(!me(Ce))throw TypeError(Ce+" is not a symbol!");for(var ze in K)if(K[ze]===Ce)return ze},useSetter:function(){ge=!0},useSimple:function(){ge=!1}}),R(R.S+R.F*!Z,"Object",{create:te,defineProperty:oe,defineProperties:se,getOwnPropertyDescriptor:q,getOwnPropertyNames:ae,getOwnPropertySymbols:xe});var pe=w(function(){O.f(1)});R(R.S+R.F*pe,"Object",{getOwnPropertySymbols:function(Ce){return O.f(n(Ce))}}),M&&R(R.S+R.F*(!Z||w(function(){var de=j();return H([de])!="[null]"||H({a:de})!="{}"||H(Object(de))!="{}"})),"JSON",{stringify:function(Ce){for(var ze=[Ce],qe=1,Ye,Ve;arguments.length>qe;)ze.push(arguments[qe++]);return Ve=Ye=ze[1],!v(Ye)&&Ce===void 0||me(Ce)?void 0:(b(Ye)||(Ye=function(et,rt){if(typeof Ve=="function"&&(rt=Ve.call(this,et,rt)),!me(rt))return rt}),ze[1]=Ye,H.apply(M,ze))}}),j[z][G]||I("./_hide")(j[z],G,j[z].valueOf),i(j,"Symbol"),i(Math,"Math",!0),i(L.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(I,Y,k){var L=I("./_export"),c=I("./_object-to-array")(!0);L(L.S,"Object",{entries:function(R){return c(R)}})},{"./_export":107,"./_object-to-array":143}],183:[function(I,Y,k){"use strict";var L=I("./_export"),c=I("./_core"),S=I("./_global"),R=I("./_species-constructor"),f=I("./_promise-resolve");L(L.P+L.R,"Promise",{finally:function(s){var w=R(this,c.Promise||S.Promise),l=typeof s=="function";return this.then(l?function(i){return f(w,s()).then(function(){return i})}:s,l?function(i){return f(w,s()).then(function(){throw i})}:s)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(I,Y,k){"use strict";var L=I("./_export"),c=I("./_new-promise-capability"),S=I("./_perform");L(L.S,"Promise",{try:function(R){var f=c.f(this),s=S(R);return(s.e?f.reject:f.resolve)(s.v),f.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(I,Y,k){I("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(I,Y,k){I("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(I,Y,k){I("./es6.array.iterator");for(var L=I("./_global"),c=I("./_hide"),S=I("./_iterators"),R=I("./_wks")("toStringTag"),f="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s<f.length;s++){var w=f[s],l=L[w],i=l&&l.prototype;i&&!i[R]&&c(i,R,w),S[w]=S.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(I,Y,k){var L=I("./_export"),c=I("./_task");L(L.G+L.B,{setImmediate:c.set,clearImmediate:c.clear})},{"./_export":107,"./_task":155}],189:[function(I,Y,k){(function(L){"use strict";var c=I("babel-runtime/helpers/typeof"),S=R(c);function R(h){return h&&h.__esModule?h:{default:h}}function f(h){return Array.isArray?Array.isArray(h):d(h)==="[object Array]"}k.isArray=f;function s(h){return typeof h=="boolean"}k.isBoolean=s;function w(h){return h===null}k.isNull=w;function l(h){return h==null}k.isNullOrUndefined=l;function i(h){return typeof h=="number"}k.isNumber=i;function a(h){return typeof h=="string"}k.isString=a;function r(h){return(typeof h=="undefined"?"undefined":(0,S.default)(h))==="symbol"}k.isSymbol=r;function u(h){return h===void 0}k.isUndefined=u;function p(h){return d(h)==="[object RegExp]"}k.isRegExp=p;function m(h){return(typeof h=="undefined"?"undefined":(0,S.default)(h))==="object"&&h!==null}k.isObject=m;function b(h){return d(h)==="[object Date]"}k.isDate=b;function g(h){return d(h)==="[object Error]"||h instanceof Error}k.isError=g;function v(h){return typeof h=="function"}k.isFunction=v;function n(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||(typeof h=="undefined"?"undefined":(0,S.default)(h))==="symbol"||typeof h=="undefined"}k.isPrimitive=n,k.isBuffer=L.isBuffer;function d(h){return Object.prototype.toString.call(h)}}).call(this,{isBuffer:I("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(I,Y,k){"use strict";var L=I("babel-runtime/helpers/typeof"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(R){"use strict";var f=function(){var a=/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,u=/[^-+\dA-Z]/g;return function(p,m,b,g){if(arguments.length===1&&i(p)==="string"&&!/\d/.test(p)&&(m=p,p=void 0),p=p||new Date,p instanceof Date||(p=new Date(p)),isNaN(p))throw TypeError("Invalid date");m=String(f.masks[m]||m||f.masks.default);var v=m.slice(0,4);(v==="UTC:"||v==="GMT:")&&(m=m.slice(4),b=!0,v==="GMT:"&&(g=!0));var n=b?"getUTC":"get",d=p[n+"Date"](),h=p[n+"Day"](),C=p[n+"Month"](),T=p[n+"FullYear"](),o=p[n+"Hours"](),P=p[n+"Minutes"](),O=p[n+"Seconds"](),y=p[n+"Milliseconds"](),x=b?0:p.getTimezoneOffset(),E=w(p),_=l(p),N={d,dd:s(d),ddd:f.i18n.dayNames[h],dddd:f.i18n.dayNames[h+7],m:C+1,mm:s(C+1),mmm:f.i18n.monthNames[C],mmmm:f.i18n.monthNames[C+12],yy:String(T).slice(2),yyyy:T,h:o%12||12,hh:s(o%12||12),H:o,HH:s(o),M:P,MM:s(P),s:O,ss:s(O),l:s(y,3),L:s(Math.round(y/10)),t:o<12?"a":"p",tt:o<12?"am":"pm",T:o<12?"A":"P",TT:o<12?"AM":"PM",Z:g?"GMT":b?"UTC":(String(p).match(r)||[""]).pop().replace(u,""),o:(x>0?"-":"+")+s(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][d%10>3?0:(d%100-d%10!=10)*d%10],W:E,N:_};return m.replace(a,function(j){return j in N?N[j]:j.slice(1,j.length-1)})}}();f.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"},f.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function s(a,r){for(a=String(a),r=r||2;a.length<r;)a="0"+a;return a}function w(a){var r=new Date(a.getFullYear(),a.getMonth(),a.getDate());r.setDate(r.getDate()-(r.getDay()+6)%7+3);var u=new Date(r.getFullYear(),0,4);u.setDate(u.getDate()-(u.getDay()+6)%7+3);var p=r.getTimezoneOffset()-u.getTimezoneOffset();r.setHours(r.getHours()-p);var m=(r-u)/(864e5*7);return 1+Math.floor(m)}function l(a){var r=a.getDay();return r===0&&(r=7),r}function i(a){return a===null?"null":a===void 0?"undefined":(typeof a=="undefined"?"undefined":(0,c.default)(a))!=="object"?typeof a=="undefined"?"undefined":(0,c.default)(a):Array.isArray(a)?"array":{}.toString.call(a).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return f}):(typeof k=="undefined"?"undefined":(0,c.default)(k))==="object"?Y.exports=f:R.dateFormat=f})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(I,Y,k){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var L=/["'&<>]/;Y.exports=c;function c(S){var R=""+S,f=L.exec(R);if(!f)return R;var s,w="",l=0,i=0;for(l=f.index;l<R.length;l++){switch(R.charCodeAt(l)){case 34:s="&quot;";break;case 38:s="&amp;";break;case 39:s="&#39;";break;case 60:s="&lt;";break;case 62:s="&gt;";break;default:continue}i!==l&&(w+=R.substring(i,l)),i=l+1,w+=s}return i!==l?w+R.substring(i,l):w}},{}],192:[function(I,Y,k){function L(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Y.exports=L,L.EventEmitter=L,L.prototype._events=void 0,L.prototype._maxListeners=void 0,L.defaultMaxListeners=10,L.prototype.setMaxListeners=function(s){if(!S(s)||s<0||isNaN(s))throw TypeError("n must be a positive number");return this._maxListeners=s,this},L.prototype.emit=function(s){var w,l,i,a,r,u;if(this._events||(this._events={}),s==="error"&&(!this._events.error||R(this._events.error)&&!this._events.error.length)){if(w=arguments[1],w instanceof Error)throw w;var p=new Error('Uncaught, unspecified "error" event. ('+w+")");throw p.context=w,p}if(l=this._events[s],f(l))return!1;if(c(l))switch(arguments.length){case 1:l.call(this);break;case 2:l.call(this,arguments[1]);break;case 3:l.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),l.apply(this,a)}else if(R(l))for(a=Array.prototype.slice.call(arguments,1),u=l.slice(),i=u.length,r=0;r<i;r++)u[r].apply(this,a);return!0},L.prototype.addListener=function(s,w){var l;if(!c(w))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",s,c(w.listener)?w.listener:w),this._events[s]?R(this._events[s])?this._events[s].push(w):this._events[s]=[this._events[s],w]:this._events[s]=w,R(this._events[s])&&!this._events[s].warned&&(f(this._maxListeners)?l=L.defaultMaxListeners:l=this._maxListeners,l&&l>0&&this._events[s].length>l&&(this._events[s].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[s].length),typeof console.trace=="function"&&console.trace())),this},L.prototype.on=L.prototype.addListener,L.prototype.once=function(s,w){if(!c(w))throw TypeError("listener must be a function");var l=!1;function i(){this.removeListener(s,i),l||(l=!0,w.apply(this,arguments))}return i.listener=w,this.on(s,i),this},L.prototype.removeListener=function(s,w){var l,i,a,r;if(!c(w))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(l=this._events[s],a=l.length,i=-1,l===w||c(l.listener)&&l.listener===w)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,w);else if(R(l)){for(r=a;r-- >0;)if(l[r]===w||l[r].listener&&l[r].listener===w){i=r;break}if(i<0)return this;l.length===1?(l.length=0,delete this._events[s]):l.splice(i,1),this._events.removeListener&&this.emit("removeListener",s,w)}return this},L.prototype.removeAllListeners=function(s){var w,l;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[s]&&delete this._events[s],this;if(arguments.length===0){for(w in this._events){if(w==="removeListener")continue;this.removeAllListeners(w)}return this.removeAllListeners("removeListener"),this._events={},this}if(l=this._events[s],c(l))this.removeListener(s,l);else if(l)for(;l.length;)this.removeListener(s,l[l.length-1]);return delete this._events[s],this},L.prototype.listeners=function(s){var w;return!this._events||!this._events[s]?w=[]:c(this._events[s])?w=[this._events[s]]:w=this._events[s].slice(),w},L.prototype.listenerCount=function(s){if(this._events){var w=this._events[s];if(c(w))return 1;if(w)return w.length}return 0},L.listenerCount=function(s,w){return s.listenerCount(w)};function c(s){return typeof s=="function"}function S(s){return typeof s=="number"}function R(s){return typeof s=="object"&&s!==null}function f(s){return s===void 0}},{}],193:[function(I,Y,k){var L=I("http"),c=Y.exports;for(var S in L)L.hasOwnProperty(S)&&(c[S]=L[S]);c.request=function(R,f){return R||(R={}),R.scheme="https",R.protocol="https:",L.request.call(this,R,f)}},{http:231}],194:[function(I,Y,k){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var L=I("util"),c=I("ms");Y.exports=function(S){if(typeof S=="number")return S;var R=c(S);if(R===void 0){var f=new Error(L.format("humanize-ms(%j) result undefined",S));console.warn(f.stack)}return R}},{ms:204,util:243}],195:[function(I,Y,k){k.read=function(L,c,S,R,f){var s,w,l=f*8-R-1,i=(1<<l)-1,a=i>>1,r=-7,u=S?f-1:0,p=S?-1:1,m=L[c+u];for(u+=p,s=m&(1<<-r)-1,m>>=-r,r+=l;r>0;s=s*256+L[c+u],u+=p,r-=8);for(w=s&(1<<-r)-1,s>>=-r,r+=R;r>0;w=w*256+L[c+u],u+=p,r-=8);if(s===0)s=1-a;else{if(s===i)return w?NaN:(m?-1:1)*Infinity;w=w+Math.pow(2,R),s=s-a}return(m?-1:1)*w*Math.pow(2,s-R)},k.write=function(L,c,S,R,f,s){var w,l,i,a=s*8-f-1,r=(1<<a)-1,u=r>>1,p=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=R?0:s-1,b=R?1:-1,g=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===Infinity?(l=isNaN(c)?1:0,w=r):(w=Math.floor(Math.log(c)/Math.LN2),c*(i=Math.pow(2,-w))<1&&(w--,i*=2),w+u>=1?c+=p/i:c+=p*Math.pow(2,1-u),c*i>=2&&(w++,i/=2),w+u>=r?(l=0,w=r):w+u>=1?(l=(c*i-1)*Math.pow(2,f),w=w+u):(l=c*Math.pow(2,u-1)*Math.pow(2,f),w=0));f>=8;L[S+m]=l&255,m+=b,l/=256,f-=8);for(w=w<<f|l,a+=f;a>0;L[S+m]=w&255,m+=b,w/=256,a-=8);L[S+m-b]|=g*128}},{}],196:[function(I,Y,k){typeof Object.create=="function"?Y.exports=function(c,S){S&&(c.super_=S,c.prototype=Object.create(S.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:Y.exports=function(c,S){if(S){c.super_=S;var R=function(){};R.prototype=S.prototype,c.prototype=new R,c.prototype.constructor=c}}},{}],197:[function(I,Y,k){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/Y.exports=function(S){return S!=null&&(L(S)||c(S)||!!S._isBuffer)};function L(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function c(S){return typeof S.readFloatLE=="function"&&typeof S.slice=="function"&&L(S.slice(0,0))}},{}],198:[function(I,Y,k){var L={}.toString;Y.exports=Array.isArray||function(c){return L.call(c)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(I,Y){typeof exports=="object"&&typeof module!="undefined"?module.exports=Y(I):typeof define=="function"&&define.amd?define(Y):Y(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 Y={},k=0,L=I.length;k<L;k++)Y[I.charAt(k)]=k;return Y}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(I){if(I.length<2){var Y=I.charCodeAt(0);return Y<128?I:Y<2048?fromCharCode(192|Y>>>6)+fromCharCode(128|Y&63):fromCharCode(224|Y>>>12&15)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&63)}else{var Y=65536+(I.charCodeAt(0)-55296)*1024+(I.charCodeAt(1)-56320);return fromCharCode(240|Y>>>18&7)+fromCharCode(128|Y>>>12&63)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(I){return I.replace(re_utob,cb_utob)},cb_encode=function(I){var Y=[0,2,1][I.length%3],k=I.charCodeAt(0)<<16|(I.length>1?I.charCodeAt(1):0)<<8|(I.length>2?I.charCodeAt(2):0),L=[b64chars.charAt(k>>>18),b64chars.charAt(k>>>12&63),Y>=2?"=":b64chars.charAt(k>>>6&63),Y>=1?"=":b64chars.charAt(k&63)];return L.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 Y=Object.prototype.toString.call(I)==="[object Uint8Array]";return Y?I.toString("base64"):btoa(utob(String(I)))},encode=function(I,Y){return Y?_encode(String(I)).replace(/[+\/]/g,function(k){return k=="+"?"-":"_"}).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 Y=(7&I.charCodeAt(0))<<18|(63&I.charCodeAt(1))<<12|(63&I.charCodeAt(2))<<6|63&I.charCodeAt(3),k=Y-65536;return fromCharCode((k>>>10)+55296)+fromCharCode((k&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 Y=I.length,k=Y%4,L=(Y>0?b64tab[I.charAt(0)]<<18:0)|(Y>1?b64tab[I.charAt(1)]<<12:0)|(Y>2?b64tab[I.charAt(2)]<<6:0)|(Y>3?b64tab[I.charAt(3)]:0),c=[fromCharCode(L>>>16),fromCharCode(L>>>8&255),fromCharCode(L&255)];return c.length-=[0,0,2,1][k],c.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(Y){return Y=="-"?"+":"/"}).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,Y,k){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";Y.exports=c;var L=Object.prototype.hasOwnProperty;function c(S,R,f){if(!S)throw new TypeError("argument dest is required");if(!R)throw new TypeError("argument src is required");return f===void 0&&(f=!0),Object.getOwnPropertyNames(R).forEach(function(w){if(!f&&L.call(S,w))return;var l=Object.getOwnPropertyDescriptor(R,w);Object.defineProperty(S,w,l)}),S}},{}],201:[function(I,Y,k){"use strict";function L(){this._types=Object.create(null),this._extensions=Object.create(null);for(var c=0;c<arguments.length;c++)this.define(arguments[c]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}L.prototype.define=function(c,S){for(var R in c){var f=c[R].map(function(l){return l.toLowerCase()});R=R.toLowerCase();for(var s=0;s<f.length;s++){var w=f[s];if(w[0]=="*")continue;if(!S&&w in this._types)throw new Error('Attempt to change mapping for "'+w+'" extension from "'+this._types[w]+'" to "'+R+'". Pass `force=true` to allow this, otherwise remove "'+w+'" from the list of extensions for "'+R+'".');this._types[w]=R}if(S||!this._extensions[R]){var w=f[0];this._extensions[R]=w[0]!="*"?w:w.substr(1)}}},L.prototype.getType=function(c){c=String(c);var S=c.replace(/^.*[/\\]/,"").toLowerCase(),R=S.replace(/^.*\./,"").toLowerCase(),f=S.length<c.length,s=R.length<S.length-1;return(s||!f)&&this._types[R]||null},L.prototype.getExtension=function(c){return c=/^\s*([^;\s]*)/.test(c)&&RegExp.$1,c&&this._extensions[c.toLowerCase()]||null},Y.exports=L},{}],202:[function(I,Y,k){"use strict";var L=I("./Mime");Y.exports=new L(I("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(I,Y,k){Y.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(I,Y,k){var L=1e3,c=L*60,S=c*60,R=S*24,f=R*7,s=R*365.25;Y.exports=function(r,u){u=u||{};var p=typeof r;if(p==="string"&&r.length>0)return w(r);if(p==="number"&&isFinite(r))return u.long?i(r):l(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function w(r){if(r=String(r),r.length>100)return;var u=/^(-?(?:\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(!u)return;var p=parseFloat(u[1]),m=(u[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return p*s;case"weeks":case"week":case"w":return p*f;case"days":case"day":case"d":return p*R;case"hours":case"hour":case"hrs":case"hr":case"h":return p*S;case"minutes":case"minute":case"mins":case"min":case"m":return p*c;case"seconds":case"second":case"secs":case"sec":case"s":return p*L;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}function l(r){var u=Math.abs(r);return u>=R?Math.round(r/R)+"d":u>=S?Math.round(r/S)+"h":u>=c?Math.round(r/c)+"m":u>=L?Math.round(r/L)+"s":r+"ms"}function i(r){var u=Math.abs(r);return u>=R?a(r,u,R,"day"):u>=S?a(r,u,S,"hour"):u>=c?a(r,u,c,"minute"):u>=L?a(r,u,L,"second"):r+" ms"}function a(r,u,p,m){var b=u>=p*1.5;return Math.round(r/p)+" "+m+(b?"s":"")}},{}],205:[function(I,Y,k){(function(L){function c(s,w){for(var l=0,i=s.length-1;i>=0;i--){var a=s[i];a==="."?s.splice(i,1):a===".."?(s.splice(i,1),l++):l&&(s.splice(i,1),l--)}if(w)for(;l--;l)s.unshift("..");return s}k.resolve=function(){for(var s="",w=!1,l=arguments.length-1;l>=-1&&!w;l--){var i=l>=0?arguments[l]:L.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!i)continue;s=i+"/"+s,w=i.charAt(0)==="/"}return s=c(R(s.split("/"),function(a){return!!a}),!w).join("/"),(w?"/":"")+s||"."},k.normalize=function(s){var w=k.isAbsolute(s),l=f(s,-1)==="/";return s=c(R(s.split("/"),function(i){return!!i}),!w).join("/"),!s&&!w&&(s="."),s&&l&&(s+="/"),(w?"/":"")+s},k.isAbsolute=function(s){return s.charAt(0)==="/"},k.join=function(){var s=Array.prototype.slice.call(arguments,0);return k.normalize(R(s,function(w,l){if(typeof w!="string")throw new TypeError("Arguments to path.join must be strings");return w}).join("/"))},k.relative=function(s,w){s=k.resolve(s).substr(1),w=k.resolve(w).substr(1);function l(b){for(var g=0;g<b.length&&!(b[g]!=="");g++);for(var v=b.length-1;v>=0&&!(b[v]!=="");v--);return g>v?[]:b.slice(g,v-g+1)}for(var i=l(s.split("/")),a=l(w.split("/")),r=Math.min(i.length,a.length),u=r,p=0;p<r;p++)if(i[p]!==a[p]){u=p;break}for(var m=[],p=u;p<i.length;p++)m.push("..");return m=m.concat(a.slice(u)),m.join("/")},k.sep="/",k.delimiter=":",k.dirname=function(s){if(typeof s!="string"&&(s=s+""),s.length===0)return".";for(var w=s.charCodeAt(0),l=w===47,i=-1,a=!0,r=s.length-1;r>=1;--r)if(w=s.charCodeAt(r),w===47){if(!a){i=r;break}}else a=!1;return i===-1?l?"/":".":l&&i===1?"/":s.slice(0,i)};function S(s){typeof s!="string"&&(s=s+"");var w=0,l=-1,i=!0,a;for(a=s.length-1;a>=0;--a)if(s.charCodeAt(a)===47){if(!i){w=a+1;break}}else l===-1&&(i=!1,l=a+1);return l===-1?"":s.slice(w,l)}k.basename=function(s,w){var l=S(s);return w&&l.substr(-1*w.length)===w&&(l=l.substr(0,l.length-w.length)),l},k.extname=function(s){typeof s!="string"&&(s=s+"");for(var w=-1,l=0,i=-1,a=!0,r=0,u=s.length-1;u>=0;--u){var p=s.charCodeAt(u);if(p===47){if(!a){l=u+1;break}continue}i===-1&&(a=!1,i=u+1),p===46?w===-1?w=u:r!==1&&(r=1):w!==-1&&(r=-1)}return w===-1||i===-1||r===0||r===1&&w===i-1&&w===l+1?"":s.slice(w,i)};function R(s,w){if(s.filter)return s.filter(w);for(var l=[],i=0;i<s.length;i++)w(s[i],i,s)&&l.push(s[i]);return l}var f="ab".substr(-1)==="b"?function(s,w,l){return s.substr(w,l)}:function(s,w,l){return w<0&&(w=s.length+w),s.substr(w,l)}}).call(this,I("_process"))},{_process:208}],206:[function(I,Y,k){(function(L){/*!
* Platform.js <https://mths.be/platform>
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <https://mths.be/mit>
*/(function(){"use strict";var c={function:!0,object:!0},S=c[typeof window]&&window||this,R=S,f=c[typeof k]&&k,s=c[typeof Y]&&Y&&!Y.nodeType&&Y,w=f&&s&&typeof L=="object"&&L;w&&(w.global===w||w.window===w||w.self===w)&&(S=w);var l=Math.pow(2,53)-1,i=/\bOpera/,a=this,r=Object.prototype,u=r.hasOwnProperty,p=r.toString;function m(y){return y=String(y),y.charAt(0).toUpperCase()+y.slice(1)}function b(y,x,E){var _={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return x&&E&&/^Win/i.test(y)&&!/^Windows Phone /i.test(y)&&(_=_[/[\d.]+$/.exec(y)])&&(y="Windows "+_),y=String(y),x&&E&&(y=y.replace(RegExp(x,"i"),E)),y=v(y.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),y}function g(y,x){var E=-1,_=y?y.length:0;if(typeof _=="number"&&_>-1&&_<=l)for(;++E<_;)x(y[E],E,y);else n(y,x)}function v(y){return y=o(y),/^(?:webOS|i(?:OS|P))/.test(y)?y:m(y)}function n(y,x){for(var E in y)u.call(y,E)&&x(y[E],E,y)}function d(y){return y==null?m(y):p.call(y).slice(8,-1)}function h(y,x){var E=y!=null?typeof y[x]:"number";return!/^(?:boolean|number|string|undefined)$/.test(E)&&(E=="object"?!!y[x]:!0)}function C(y){return String(y).replace(/([ -])(?!$)/g,"$1?")}function T(y,x){var E=null;return g(y,function(_,N){E=x(E,_,N,y)}),E}function o(y){return String(y).replace(/^ +| +$/g,"")}function P(y){var x=S,E=y&&typeof y=="object"&&d(y)!="String";E&&(x=y,y=null);var _=x.navigator||{},N=_.userAgent||"";y||(y=N);var j=E||a==R,M=E?!!_.likeChrome:/\bChrome\b/.test(y)&&!/internal|\n/i.test(p.toString()),H="Object",z=E?H:"ScriptBridgingProxyObject",F=E?H:"Environment",G=E&&x.java?"JavaPackage":d(x.java),B=E?H:"RuntimeObject",K=/\bJava/.test(G)&&x.java,W=K&&d(x.environment)==F,J=K?"a":"\u03B1",ee=K?"b":"\u03B2",Z=x.document||{},he=x.operamini||x.opera,ge=i.test(ge=E&&he?he["[[Class]]"]:d(he))?ge:he=null,ie,we=y,me=[],oe=null,se=y==N,te=se&&he&&typeof he.version=="function"&&he.version(),be,q=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ae=pe(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),xe=Ce([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ne=$({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}}),Q=de(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function X(Ve){return T(Ve,function(et,rt){return et||RegExp("\\b"+(rt.pattern||C(rt))+"\\b","i").exec(y)&&(rt.label||rt)})}function $(Ve){return T(Ve,function(et,rt,Me){return et||(rt[xe]||rt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(xe)]||RegExp("\\b"+C(Me)+"(?:\\b|\\w*\\d)","i").exec(y))&&Me})}function pe(Ve){return T(Ve,function(et,rt){return et||RegExp("\\b"+(rt.pattern||C(rt))+"\\b","i").exec(y)&&(rt.label||rt)})}function de(Ve){return T(Ve,function(et,rt){var Me=rt.pattern||C(rt);return!et&&(et=RegExp("\\b"+Me+"(?:/[\\d.]+|[ \\w.]*)","i").exec(y))&&(et=b(et,Me,rt.label||rt)),et})}function Ce(Ve){return T(Ve,function(et,rt){var Me=rt.pattern||C(rt);return!et&&(et=RegExp("\\b"+Me+" *\\d+[.\\w_]*","i").exec(y)||RegExp("\\b"+Me+" *\\w+-[\\w]*","i").exec(y)||RegExp("\\b"+Me+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(y))&&((et=String(rt.label&&!RegExp(Me,"i").test(rt.label)?rt.label:et).split("/"))[1]&&!/[\d.]+/.test(et[0])&&(et[0]+=" "+et[1]),rt=rt.label||rt,et=v(et[0].replace(RegExp(Me,"i"),rt).replace(RegExp("; *(?:"+rt+"[_-])?","i")," ").replace(RegExp("("+rt+")[-_.]?(\\w)","i"),"$1 $2"))),et})}function ze(Ve){return T(Ve,function(et,rt){return et||(RegExp(rt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(y)||0)[1]||null})}function qe(){return this.description||""}if(q&&(q=[q]),ne&&!xe&&(xe=Ce([ne])),(ie=/\bGoogle TV\b/.exec(xe))&&(xe=ie[0]),/\bSimulator\b/i.test(y)&&(xe=(xe?xe+" ":"")+"Simulator"),ae=="Opera Mini"&&/\bOPiOS\b/.test(y)&&me.push("running in Turbo/Uncompressed mode"),ae=="IE"&&/\blike iPhone OS\b/.test(y)?(ie=P(y.replace(/like iPhone OS/,"")),ne=ie.manufacturer,xe=ie.product):/^iP/.test(xe)?(ae||(ae="Safari"),Q="iOS"+((ie=/ OS ([\d_]+)/i.exec(y))?" "+ie[1].replace(/_/g,"."):"")):ae=="Konqueror"&&!/buntu/i.test(Q)?Q="Kubuntu":ne&&ne!="Google"&&(/Chrome/.test(ae)&&!/\bMobile Safari\b/i.test(y)||/\bVita\b/.test(xe))||/\bAndroid\b/.test(Q)&&/^Chrome/.test(ae)&&/\bVersion\//i.test(y)?(ae="Android Browser",Q=/\bAndroid\b/.test(Q)?Q:"Android"):ae=="Silk"?(/\bMobi/i.test(y)||(Q="Android",me.unshift("desktop mode")),/Accelerated *= *true/i.test(y)&&me.unshift("accelerated")):ae=="PaleMoon"&&(ie=/\bFirefox\/([\d.]+)\b/.exec(y))?me.push("identifying as Firefox "+ie[1]):ae=="Firefox"&&(ie=/\b(Mobile|Tablet|TV)\b/i.exec(y))?(Q||(Q="Firefox OS"),xe||(xe=ie[1])):!ae||(ie=!/\bMinefield\b/i.test(y)&&/\b(?:Firefox|Safari)\b/.exec(ae))?(ae&&!xe&&/[\/,]|^[^(]+?\)/.test(y.slice(y.indexOf(ie+"/")+8))&&(ae=null),(ie=xe||ne||Q)&&(xe||ne||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Q))&&(ae=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Q)?Q:ie)+" Browser")):ae=="Electron"&&(ie=(/\bChrome\/([\d.]+)\b/.exec(y)||0)[1])&&me.push("Chromium "+ie),te||(te=ze(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",C(ae),"(?:Firefox|Minefield|NetFront)"])),(ie=q=="iCab"&&parseFloat(te)>3&&"WebKit"||/\bOpera\b/.test(ae)&&(/\bOPR\b/.test(y)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(y)&&!/^(?:Trident|EdgeHTML)$/.test(q)&&"WebKit"||!q&&/\bMSIE\b/i.test(y)&&(Q=="Mac OS"?"Tasman":"Trident")||q=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ae)&&"NetFront")&&(q=[ie]),ae=="IE"&&(ie=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(y)||0)[1])?(ae+=" Mobile",Q="Windows Phone "+(/\+$/.test(ie)?ie:ie+".x"),me.unshift("desktop mode")):/\bWPDesktop\b/i.test(y)?(ae="IE Mobile",Q="Windows Phone 8.x",me.unshift("desktop mode"),te||(te=(/\brv:([\d.]+)/.exec(y)||0)[1])):ae!="IE"&&q=="Trident"&&(ie=/\brv:([\d.]+)/.exec(y))&&(ae&&me.push("identifying as "+ae+(te?" "+te:"")),ae="IE",te=ie[1]),se){if(h(x,"global"))if(K&&(ie=K.lang.System,we=ie.getProperty("os.arch"),Q=Q||ie.getProperty("os.name")+" "+ie.getProperty("os.version")),W){try{te=x.require("ringo/engine").version.join("."),ae="RingoJS"}catch(Ve){(ie=x.system)&&ie.global.system==x.system&&(ae="Narwhal",Q||(Q=ie[0].os||null))}ae||(ae="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(ie=x.process)&&(typeof ie.versions=="object"&&(typeof ie.versions.electron=="string"?(me.push("Node "+ie.versions.node),ae="Electron",te=ie.versions.electron):typeof ie.versions.nw=="string"&&(me.push("Chromium "+te,"Node "+ie.versions.node),ae="NW.js",te=ie.versions.nw)),ae||(ae="Node.js",we=ie.arch,Q=ie.platform,te=/[\d.]+/.exec(ie.version),te=te?te[0]:null));else d(ie=x.runtime)==z?(ae="Adobe AIR",Q=ie.flash.system.Capabilities.os):d(ie=x.phantom)==B?(ae="PhantomJS",te=(ie=ie.version||null)&&ie.major+"."+ie.minor+"."+ie.patch):typeof Z.documentMode=="number"&&(ie=/\bTrident\/(\d+)/i.exec(y))?(te=[te,Z.documentMode],(ie=+ie[1]+4)!=te[1]&&(me.push("IE "+te[1]+" mode"),q&&(q[1]=""),te[1]=ie),te=ae=="IE"?String(te[1].toFixed(1)):te[0]):typeof Z.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ae)&&(me.push("masking as "+ae+" "+te),ae="IE",te="11.0",q=["Trident"],Q="Windows");Q=Q&&v(Q)}if(te&&(ie=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(te)||/(?:alpha|beta)(?: ?\d)?/i.exec(y+";"+(se&&_.appMinorVersion))||/\bMinefield\b/i.test(y)&&"a")&&(oe=/b/i.test(ie)?"beta":"alpha",te=te.replace(RegExp(ie+"\\+?$"),"")+(oe=="beta"?ee:J)+(/\d+\+?/.exec(ie)||"")),ae=="Fennec"||ae=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Q))ae="Firefox Mobile";else if(ae=="Maxthon"&&te)te=te.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(xe))xe=="Xbox 360"&&(Q=null),xe=="Xbox 360"&&/\bIEMobile\b/.test(y)&&me.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ae)||ae&&!xe&&!/Browser|Mobi/.test(ae))&&(Q=="Windows CE"||/Mobi/i.test(y)))ae+=" Mobile";else if(ae=="IE"&&se)try{x.external===null&&me.unshift("platform preview")}catch(Ve){me.unshift("embedded")}else(/\bBlackBerry\b/.test(xe)||/\bBB10\b/.test(y))&&(ie=(RegExp(xe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(y)||0)[1]||te)?(ie=[ie,/BB10/.test(y)],Q=(ie[1]?(xe=null,ne="BlackBerry"):"Device Software")+" "+ie[0],te=null):this!=n&&xe!="Wii"&&(se&&he||/Opera/.test(ae)&&/\b(?:MSIE|Firefox)\b/i.test(y)||ae=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Q)||ae=="IE"&&(Q&&!/^Win/.test(Q)&&te>5.5||/\bWindows XP\b/.test(Q)&&te>8||te==8&&!/\bTrident\b/.test(y)))&&!i.test(ie=P.call(n,y.replace(i,"")+";"))&&ie.name&&(ie="ing as "+ie.name+((ie=ie.version)?" "+ie:""),i.test(ae)?(/\bIE\b/.test(ie)&&Q=="Mac OS"&&(Q=null),ie="identify"+ie):(ie="mask"+ie,ge?ae=v(ge.replace(/([a-z])([A-Z])/g,"$1 $2")):ae="Opera",/\bIE\b/.test(ie)&&(Q=null),se||(te=null)),q=["Presto"],me.push(ie));(ie=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(y)||0)[1])&&(ie=[parseFloat(ie.replace(/\.(\d)$/,".0$1")),ie],ae=="Safari"&&ie[1].slice(-1)=="+"?(ae="WebKit Nightly",oe="alpha",te=ie[1].slice(0,-1)):(te==ie[1]||te==(ie[2]=(/\bSafari\/([\d.]+\+?)/i.exec(y)||0)[1]))&&(te=null),ie[1]=(/\bChrome\/([\d.]+)/i.exec(y)||0)[1],ie[0]==537.36&&ie[2]==537.36&&parseFloat(ie[1])>=28&&q=="WebKit"&&(q=["Blink"]),!se||!M&&!ie[1]?(q&&(q[1]="like Safari"),ie=(ie=ie[0],ie<400?1:ie<500?2:ie<526?3:ie<533?4:ie<534?"4+":ie<535?5:ie<537?6:ie<538?7:ie<601?8:"8")):(q&&(q[1]="like Chrome"),ie=ie[1]||(ie=ie[0],ie<530?1:ie<532?2:ie<532.05?3:ie<533?4:ie<534.03?5:ie<534.07?6:ie<534.1?7:ie<534.13?8:ie<534.16?9:ie<534.24?10:ie<534.3?11:ie<535.01?12:ie<535.02?"13+":ie<535.07?15:ie<535.11?16:ie<535.19?17:ie<536.05?18:ie<536.1?19:ie<537.01?20:ie<537.11?"21+":ie<537.13?23:ie<537.18?24:ie<537.24?25:ie<537.36?26:q!="Blink"?"27":"28")),q&&(q[1]+=" "+(ie+=typeof ie=="number"?".x":/[.+]/.test(ie)?"":"+")),ae=="Safari"&&(!te||parseInt(te)>45)&&(te=ie)),ae=="Opera"&&(ie=/\bzbov|zvav$/.exec(Q))?(ae+=" ",me.unshift("desktop mode"),ie=="zvav"?(ae+="Mini",te=null):ae+="Mobile",Q=Q.replace(RegExp(" *"+ie+"$"),"")):ae=="Safari"&&/\bChrome\b/.exec(q&&q[1])&&(me.unshift("desktop mode"),ae="Chrome Mobile",te=null,/\bOS X\b/.test(Q)?(ne="Apple",Q="iOS 4.3+"):Q=null),te&&te.indexOf(ie=/[\d.]+$/.exec(Q))==0&&y.indexOf("/"+ie+"-")>-1&&(Q=o(Q.replace(ie,""))),q&&!/\b(?:Avant|Nook)\b/.test(ae)&&(/Browser|Lunascape|Maxthon/.test(ae)||ae!="Safari"&&/^iOS/.test(Q)&&/\bSafari\b/.test(q[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ae)&&q[1])&&((ie=q[q.length-1])&&me.push(ie)),me.length&&(me=["("+me.join("; ")+")"]),ne&&xe&&xe.indexOf(ne)<0&&me.push("on "+ne),xe&&me.push((/^on /.test(me[me.length-1])?"":"on ")+xe),Q&&(ie=/ ([\d.+]+)$/.exec(Q),be=ie&&Q.charAt(Q.length-ie[0].length-1)=="/",Q={architecture:32,family:ie&&!be?Q.replace(ie[0],""):Q,version:ie?ie[1]:null,toString:function(){var Ve=this.version;return this.family+(Ve&&!be?" "+Ve:"")+(this.architecture==64?" 64-bit":"")}}),(ie=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(we))&&!/\bi686\b/i.test(we)?(Q&&(Q.architecture=64,Q.family=Q.family.replace(RegExp(" *"+ie),"")),ae&&(/\bWOW64\b/i.test(y)||se&&/\w(?:86|32)$/.test(_.cpuClass||_.platform)&&!/\bWin64; x64\b/i.test(y))&&me.unshift("32-bit")):Q&&/^OS X/.test(Q.family)&&ae=="Chrome"&&parseFloat(te)>=39&&(Q.architecture=64),y||(y=null);var Ye={};return Ye.description=y,Ye.layout=q&&q[0],Ye.manufacturer=ne,Ye.name=ae,Ye.prerelease=oe,Ye.product=xe,Ye.ua=y,Ye.version=ae&&te,Ye.os=Q||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ye.parse=P,Ye.toString=qe,Ye.version&&me.unshift(te),Ye.name&&me.unshift(ae),Q&&ae&&!(Q==String(Q).split(" ")[0]&&(Q==ae.split(" ")[0]||xe))&&me.push(xe?"("+Q+")":"on "+Q),me.length&&(Ye.description=me.join(" ")),Ye}var O=P();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(S.platform=O,define(function(){return O})):f&&s?n(O,function(y,x){f[x]=y}):S.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(I,Y,k){(function(L){"use strict";typeof L=="undefined"||!L.version||L.version.indexOf("v0.")===0||L.version.indexOf("v1.")===0&&L.version.indexOf("v1.8.")!==0?Y.exports={nextTick:c}:Y.exports=L;function c(S,R,f,s){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var w=arguments.length,l,i;switch(w){case 0:case 1:return L.nextTick(S);case 2:return L.nextTick(function(){S.call(null,R)});case 3:return L.nextTick(function(){S.call(null,R,f)});case 4:return L.nextTick(function(){S.call(null,R,f,s)});default:for(l=new Array(w-1),i=0;i<l.length;)l[i++]=arguments[i];return L.nextTick(function(){S.apply(null,l)})}}}).call(this,I("_process"))},{_process:208}],208:[function(I,Y,k){var L=Y.exports={},c,S;function R(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?c=setTimeout:c=R}catch(g){c=R}try{typeof clearTimeout=="function"?S=clearTimeout:S=f}catch(g){S=f}})();function s(g){if(c===setTimeout)return setTimeout(g,0);if((c===R||!c)&&setTimeout)return c=setTimeout,setTimeout(g,0);try{return c(g,0)}catch(v){try{return c.call(null,g,0)}catch(n){return c.call(this,g,0)}}}function w(g){if(S===clearTimeout)return clearTimeout(g);if((S===f||!S)&&clearTimeout)return S=clearTimeout,clearTimeout(g);try{return S(g)}catch(v){try{return S.call(null,g)}catch(n){return S.call(this,g)}}}var l=[],i=!1,a,r=-1;function u(){if(!i||!a)return;i=!1,a.length?l=a.concat(l):r=-1,l.length&&p()}function p(){if(i)return;var g=s(u);i=!0;for(var v=l.length;v;){for(a=l,l=[];++r<v;)a&&a[r].run();r=-1,v=l.length}a=null,i=!1,w(g)}L.nextTick=function(g){var v=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)v[n-1]=arguments[n];l.push(new m(g,v)),l.length===1&&!i&&s(p)};function m(g,v){this.fun=g,this.array=v}m.prototype.run=function(){this.fun.apply(null,this.array)},L.title="browser",L.browser=!0,L.env={},L.argv=[],L.version="",L.versions={};function b(){}L.on=b,L.addListener=b,L.once=b,L.off=b,L.removeListener=b,L.removeAllListeners=b,L.emit=b,L.prependListener=b,L.prependOnceListener=b,L.listeners=function(g){return[]},L.binding=function(g){throw new Error("process.binding is not supported")},L.cwd=function(){return"/"},L.chdir=function(g){throw new Error("process.chdir is not supported")},L.umask=function(){return 0}},{}],209:[function(I,Y,k){(function(L){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(c){var S=typeof k=="object"&&k&&!k.nodeType&&k,R=typeof Y=="object"&&Y&&!Y.nodeType&&Y,f=typeof L=="object"&&L;(f.global===f||f.window===f||f.self===f)&&(c=f);var s,w=2147483647,l=36,i=1,a=26,r=38,u=700,p=72,m=128,b="-",g=/^xn--/,v=/[^\x20-\x7E]/,n=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=l-i,C=Math.floor,T=String.fromCharCode,o;function P(G){throw new RangeError(d[G])}function O(G,B){for(var K=G.length,W=[];K--;)W[K]=B(G[K]);return W}function y(G,B){var K=G.split("@"),W="";K.length>1&&(W=K[0]+"@",G=K[1]),G=G.replace(n,".");var J=G.split("."),ee=O(J,B).join(".");return W+ee}function x(G){for(var B=[],K=0,W=G.length,J,ee;K<W;)J=G.charCodeAt(K++),J>=55296&&J<=56319&&K<W?(ee=G.charCodeAt(K++),(ee&64512)==56320?B.push(((J&1023)<<10)+(ee&1023)+65536):(B.push(J),K--)):B.push(J);return B}function E(G){return O(G,function(B){var K="";return B>65535&&(B-=65536,K+=T(B>>>10&1023|55296),B=56320|B&1023),K+=T(B),K}).join("")}function _(G){return G-48<10?G-22:G-65<26?G-65:G-97<26?G-97:l}function N(G,B){return G+22+75*(G<26)-((B!=0)<<5)}function j(G,B,K){var W=0;for(G=K?C(G/u):G>>1,G+=C(G/B);G>h*a>>1;W+=l)G=C(G/h);return C(W+(h+1)*G/(G+r))}function M(G){var B=[],K=G.length,W,J=0,ee=m,Z=p,he,ge,ie,we,me,oe,se,te,be;for(he=G.lastIndexOf(b),he<0&&(he=0),ge=0;ge<he;++ge)G.charCodeAt(ge)>=128&&P("not-basic"),B.push(G.charCodeAt(ge));for(ie=he>0?he+1:0;ie<K;){for(we=J,me=1,oe=l;!(ie>=K&&P("invalid-input"),se=_(G.charCodeAt(ie++)),(se>=l||se>C((w-J)/me))&&P("overflow"),J+=se*me,te=oe<=Z?i:oe>=Z+a?a:oe-Z,se<te);oe+=l)be=l-te,me>C(w/be)&&P("overflow"),me*=be;W=B.length+1,Z=j(J-we,W,we==0),C(J/W)>w-ee&&P("overflow"),ee+=C(J/W),J%=W,B.splice(J++,0,ee)}return E(B)}function H(G){var B,K,W,J,ee,Z,he,ge,ie,we,me,oe=[],se,te,be,q;for(G=x(G),se=G.length,B=m,K=0,ee=p,Z=0;Z<se;++Z)me=G[Z],me<128&&oe.push(T(me));for(W=J=oe.length,J&&oe.push(b);W<se;){for(he=w,Z=0;Z<se;++Z)me=G[Z],me>=B&&me<he&&(he=me);for(te=W+1,he-B>C((w-K)/te)&&P("overflow"),K+=(he-B)*te,B=he,Z=0;Z<se;++Z)if(me=G[Z],me<B&&++K>w&&P("overflow"),me==B){for(ge=K,ie=l;!(we=ie<=ee?i:ie>=ee+a?a:ie-ee,ge<we);ie+=l)q=ge-we,be=l-we,oe.push(T(N(we+q%be,0))),ge=C(q/be);oe.push(T(N(ge,0))),ee=j(K,te,W==J),K=0,++W}++K,++B}return oe.join("")}function z(G){return y(G,function(B){return g.test(B)?M(B.slice(4).toLowerCase()):B})}function F(G){return y(G,function(B){return v.test(B)?"xn--"+H(B):B})}if(s={version:"1.4.1",ucs2:{decode:x,encode:E},decode:M,encode:H,toASCII:F,toUnicode:z},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return s});else if(S&&R)if(Y.exports==S)R.exports=s;else for(o in s)s.hasOwnProperty(o)&&(S[o]=s[o]);else c.punycode=s})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(I,Y,k){"use strict";function L(S,R){return Object.prototype.hasOwnProperty.call(S,R)}Y.exports=function(S,R,f,s){R=R||"&",f=f||"=";var w={};if(typeof S!="string"||S.length===0)return w;var l=/\+/g;S=S.split(R);var i=1e3;s&&typeof s.maxKeys=="number"&&(i=s.maxKeys);var a=S.length;i>0&&a>i&&(a=i);for(var r=0;r<a;++r){var u=S[r].replace(l,"%20"),p=u.indexOf(f),m,b,g,v;p>=0?(m=u.substr(0,p),b=u.substr(p+1)):(m=u,b=""),g=decodeURIComponent(m),v=decodeURIComponent(b),L(w,g)?c(w[g])?w[g].push(v):w[g]=[w[g],v]:w[g]=v}return w};var c=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"}},{}],211:[function(I,Y,k){"use strict";var L=function(f){switch(typeof f){case"string":return f;case"boolean":return f?"true":"false";case"number":return isFinite(f)?f:"";default:return""}};Y.exports=function(f,s,w,l){return s=s||"&",w=w||"=",f===null&&(f=void 0),typeof f=="object"?S(R(f),function(i){var a=encodeURIComponent(L(i))+w;return c(f[i])?S(f[i],function(r){return a+encodeURIComponent(L(r))}).join(s):a+encodeURIComponent(L(f[i]))}).join(s):l?encodeURIComponent(L(l))+w+encodeURIComponent(L(f)):""};var c=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"};function S(f,s){if(f.map)return f.map(s);for(var w=[],l=0;l<f.length;l++)w.push(s(f[l],l));return w}var R=Object.keys||function(f){var s=[];for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&s.push(w);return s}},{}],212:[function(I,Y,k){"use strict";k.decode=k.parse=I("./decode"),k.encode=k.stringify=I("./encode")},{"./decode":210,"./encode":211}],213:[function(I,Y,k){Y.exports=I("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=f(L),S=I("babel-runtime/core-js/object/keys"),R=f(S);function f(v){return v&&v.__esModule?v:{default:v}}var s=I("process-nextick-args"),w=R.default||function(v){var n=[];for(var d in v)n.push(d);return n};Y.exports=m;var l=(0,c.default)(I("core-util-is"));l.inherits=I("inherits");var i=I("./_stream_readable"),a=I("./_stream_writable");l.inherits(m,i);for(var r=w(a.prototype),u=0;u<r.length;u++){var p=r[u];m.prototype[p]||(m.prototype[p]=a.prototype[p])}function m(v){if(!(this instanceof m))return new m(v);i.call(this,v),a.call(this,v),v&&v.readable===!1&&(this.readable=!1),v&&v.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,v&&v.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",b)}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function b(){if(this.allowHalfOpen||this._writableState.ended)return;s.nextTick(g,this)}function g(v){v.end()}Object.defineProperty(m.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(n){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=n,this._writableState.destroyed=n}}),m.prototype._destroy=function(v,n){this.push(null),this.end(),s.nextTick(n,v)}},{"./_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,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(w){return w&&w.__esModule?w:{default:w}}Y.exports=s;var R=I("./_stream_transform"),f=(0,c.default)(I("core-util-is"));f.inherits=I("inherits"),f.inherits(s,R);function s(w){if(!(this instanceof s))return new s(w);R.call(this,w)}s.prototype._transform=function(w,l,i){i(null,w)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(I,Y,k){(function(L,c){"use strict";var S=I("babel-runtime/core-js/object/get-prototype-of"),R=w(S),f=I("babel-runtime/core-js/object/create"),s=w(f);function w(q){return q&&q.__esModule?q:{default:q}}var l=I("process-nextick-args");Y.exports=x;var i=I("isarray"),a;x.ReadableState=y;var r=I("events").EventEmitter,u=function(ae,xe){return ae.listeners(xe).length},p=I("./internal/streams/stream"),m=I("safe-buffer").Buffer,b=c.Uint8Array||function(){};function g(q){return m.from(q)}function v(q){return m.isBuffer(q)||q instanceof b}var n=(0,s.default)(I("core-util-is"));n.inherits=I("inherits");var d=I("util"),h=void 0;d&&d.debuglog?h=d.debuglog("stream"):h=function(){};var C=I("./internal/streams/BufferList"),T=I("./internal/streams/destroy"),o;n.inherits(x,p);var P=["error","close","destroy","pause","resume"];function O(q,ae,xe){if(typeof q.prependListener=="function")return q.prependListener(ae,xe);!q._events||!q._events[ae]?q.on(ae,xe):i(q._events[ae])?q._events[ae].unshift(xe):q._events[ae]=[xe,q._events[ae]]}function y(q,ae){a=a||I("./_stream_duplex"),q=q||{};var xe=ae instanceof a;this.objectMode=!!q.objectMode,xe&&(this.objectMode=this.objectMode||!!q.readableObjectMode);var ne=q.highWaterMark,Q=q.readableHighWaterMark,X=this.objectMode?16:16*1024;ne||ne===0?this.highWaterMark=ne:xe&&(Q||Q===0)?this.highWaterMark=Q:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new C,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(o||(o=I("string_decoder/").StringDecoder),this.decoder=new o(q.encoding),this.encoding=q.encoding)}function x(q){if(a=a||I("./_stream_duplex"),!(this instanceof x))return new x(q);this._readableState=new y(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),p.call(this)}Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ae){if(!this._readableState)return;this._readableState.destroyed=ae}}),x.prototype.destroy=T.destroy,x.prototype._undestroy=T.undestroy,x.prototype._destroy=function(q,ae){this.push(null),ae(q)},x.prototype.push=function(q,ae){var xe=this._readableState,ne;return xe.objectMode?ne=!0:typeof q=="string"&&(ae=ae||xe.defaultEncoding,ae!==xe.encoding&&(q=m.from(q,ae),ae=""),ne=!0),E(this,q,ae,!1,ne)},x.prototype.unshift=function(q){return E(this,q,null,!0,!1)};function E(q,ae,xe,ne,Q){var X=q._readableState;if(ae===null)X.reading=!1,F(q,X);else{var $;Q||($=N(X,ae)),$?q.emit("error",$):X.objectMode||ae&&ae.length>0?(typeof ae!="string"&&!X.objectMode&&(0,R.default)(ae)!==m.prototype&&(ae=g(ae)),ne?X.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):_(q,X,ae,!0):X.ended?q.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!xe?(ae=X.decoder.write(ae),X.objectMode||ae.length!==0?_(q,X,ae,!1):K(q,X)):_(q,X,ae,!1))):ne||(X.reading=!1)}return j(X)}function _(q,ae,xe,ne){ae.flowing&&ae.length===0&&!ae.sync?(q.emit("data",xe),q.read(0)):(ae.length+=ae.objectMode?1:xe.length,ne?ae.buffer.unshift(xe):ae.buffer.push(xe),ae.needReadable&&G(q)),K(q,ae)}function N(q,ae){var xe;return!v(ae)&&typeof ae!="string"&&ae!==void 0&&!q.objectMode&&(xe=new TypeError("Invalid non-string/buffer chunk")),xe}function j(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(q){return o||(o=I("string_decoder/").StringDecoder),this._readableState.decoder=new o(q),this._readableState.encoding=q,this};var M=8388608;function H(q){return q>=M?q=M:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function z(q,ae){return q<=0||ae.length===0&&ae.ended?0:ae.objectMode?1:q!==q?ae.flowing&&ae.length?ae.buffer.head.data.length:ae.length:(q>ae.highWaterMark&&(ae.highWaterMark=H(q)),q<=ae.length?q:ae.ended?ae.length:(ae.needReadable=!0,0))}x.prototype.read=function(q){h("read",q),q=parseInt(q,10);var ae=this._readableState,xe=q;if(q!==0&&(ae.emittedReadable=!1),q===0&&ae.needReadable&&(ae.length>=ae.highWaterMark||ae.ended))return h("read: emitReadable",ae.length,ae.ended),ae.length===0&&ae.ended?se(this):G(this),null;if(q=z(q,ae),q===0&&ae.ended)return ae.length===0&&se(this),null;var ne=ae.needReadable;h("need readable",ne),(ae.length===0||ae.length-q<ae.highWaterMark)&&(ne=!0,h("length less than watermark",ne)),ae.ended||ae.reading?(ne=!1,h("reading or ended",ne)):ne&&(h("do read"),ae.reading=!0,ae.sync=!0,ae.length===0&&(ae.needReadable=!0),this._read(ae.highWaterMark),ae.sync=!1,ae.reading||(q=z(xe,ae)));var Q;return q>0?Q=ie(q,ae):Q=null,Q===null?(ae.needReadable=!0,q=0):ae.length-=q,ae.length===0&&(ae.ended||(ae.needReadable=!0),xe!==q&&ae.ended&&se(this)),Q!==null&&this.emit("data",Q),Q};function F(q,ae){if(ae.ended)return;if(ae.decoder){var xe=ae.decoder.end();xe&&xe.length&&(ae.buffer.push(xe),ae.length+=ae.objectMode?1:xe.length)}ae.ended=!0,G(q)}function G(q){var ae=q._readableState;ae.needReadable=!1,ae.emittedReadable||(h("emitReadable",ae.flowing),ae.emittedReadable=!0,ae.sync?l.nextTick(B,q):B(q))}function B(q){h("emit readable"),q.emit("readable"),ge(q)}function K(q,ae){ae.readingMore||(ae.readingMore=!0,l.nextTick(W,q,ae))}function W(q,ae){for(var xe=ae.length;!ae.reading&&!ae.flowing&&!ae.ended&&ae.length<ae.highWaterMark&&!(h("maybeReadMore read 0"),q.read(0),xe===ae.length);)xe=ae.length;ae.readingMore=!1}x.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(q,ae){var xe=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=q;break;case 1:ne.pipes=[ne.pipes,q];break;default:ne.pipes.push(q);break}ne.pipesCount+=1,h("pipe count=%d opts=%j",ne.pipesCount,ae);var Q=(!ae||ae.end!==!1)&&q!==L.stdout&&q!==L.stderr,X=Q?pe:Me;ne.endEmitted?l.nextTick(X):xe.once("end",X),q.on("unpipe",$);function $(Se,Ge){h("onunpipe"),Se===xe&&(Ge&&Ge.hasUnpiped===!1&&(Ge.hasUnpiped=!0,ze()))}function pe(){h("onend"),q.end()}var de=J(xe);q.on("drain",de);var Ce=!1;function ze(){h("cleanup"),q.removeListener("close",et),q.removeListener("finish",rt),q.removeListener("drain",de),q.removeListener("error",Ve),q.removeListener("unpipe",$),xe.removeListener("end",pe),xe.removeListener("end",Me),xe.removeListener("data",Ye),Ce=!0,ne.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&de()}var qe=!1;xe.on("data",Ye);function Ye(Se){h("ondata"),qe=!1;var Ge=q.write(Se);Ge===!1&&!qe&&((ne.pipesCount===1&&ne.pipes===q||ne.pipesCount>1&&be(ne.pipes,q)!==-1)&&!Ce&&(h("false write response, pause",xe._readableState.awaitDrain),xe._readableState.awaitDrain++,qe=!0),xe.pause())}function Ve(Se){h("onerror",Se),Me(),q.removeListener("error",Ve),u(q,"error")===0&&q.emit("error",Se)}O(q,"error",Ve);function et(){q.removeListener("finish",rt),Me()}q.once("close",et);function rt(){h("onfinish"),q.removeListener("close",et),Me()}q.once("finish",rt);function Me(){h("unpipe"),xe.unpipe(q)}return q.emit("pipe",xe),ne.flowing||(h("pipe resume"),xe.resume()),q};function J(q){return function(){var ae=q._readableState;h("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&u(q,"data")&&(ae.flowing=!0,ge(q))}}x.prototype.unpipe=function(q){var ae=this._readableState,xe={hasUnpiped:!1};if(ae.pipesCount===0)return this;if(ae.pipesCount===1)return q&&q!==ae.pipes?this:(q||(q=ae.pipes),ae.pipes=null,ae.pipesCount=0,ae.flowing=!1,q&&q.emit("unpipe",this,xe),this);if(!q){var ne=ae.pipes,Q=ae.pipesCount;ae.pipes=null,ae.pipesCount=0,ae.flowing=!1;for(var X=0;X<Q;X++)ne[X].emit("unpipe",this,xe);return this}var $=be(ae.pipes,q);return $===-1?this:(ae.pipes.splice($,1),ae.pipesCount-=1,ae.pipesCount===1&&(ae.pipes=ae.pipes[0]),q.emit("unpipe",this,xe),this)},x.prototype.on=function(q,ae){var xe=p.prototype.on.call(this,q,ae);if(q==="data")this._readableState.flowing!==!1&&this.resume();else if(q==="readable"){var ne=this._readableState;!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.emittedReadable=!1,ne.reading?ne.length&&G(this):l.nextTick(ee,this))}return xe},x.prototype.addListener=x.prototype.on;function ee(q){h("readable nexttick read 0"),q.read(0)}x.prototype.resume=function(){var q=this._readableState;return q.flowing||(h("resume"),q.flowing=!0,Z(this,q)),this};function Z(q,ae){ae.resumeScheduled||(ae.resumeScheduled=!0,l.nextTick(he,q,ae))}function he(q,ae){ae.reading||(h("resume read 0"),q.read(0)),ae.resumeScheduled=!1,ae.awaitDrain=0,q.emit("resume"),ge(q),ae.flowing&&!ae.reading&&q.read(0)}x.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ge(q){var ae=q._readableState;for(h("flow",ae.flowing);ae.flowing&&q.read()!==null;);}x.prototype.wrap=function(q){var ae=this,xe=this._readableState,ne=!1;q.on("end",function(){if(h("wrapped end"),xe.decoder&&!xe.ended){var $=xe.decoder.end();$&&$.length&&ae.push($)}ae.push(null)}),q.on("data",function($){if(h("wrapped data"),xe.decoder&&($=xe.decoder.write($)),xe.objectMode&&$==null)return;if(!xe.objectMode&&(!$||!$.length))return;var pe=ae.push($);pe||(ne=!0,q.pause())});for(var Q in q)this[Q]===void 0&&typeof q[Q]=="function"&&(this[Q]=function($){return function(){return q[$].apply(q,arguments)}}(Q));for(var X=0;X<P.length;X++)q.on(P[X],this.emit.bind(this,P[X]));return this._read=function($){h("wrapped _read",$),ne&&(ne=!1,q.resume())},this},Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),x._fromList=ie;function ie(q,ae){if(ae.length===0)return null;var xe;return ae.objectMode?xe=ae.buffer.shift():!q||q>=ae.length?(ae.decoder?xe=ae.buffer.join(""):ae.buffer.length===1?xe=ae.buffer.head.data:xe=ae.buffer.concat(ae.length),ae.buffer.clear()):xe=we(q,ae.buffer,ae.decoder),xe}function we(q,ae,xe){var ne;return q<ae.head.data.length?(ne=ae.head.data.slice(0,q),ae.head.data=ae.head.data.slice(q)):q===ae.head.data.length?ne=ae.shift():ne=xe?me(q,ae):oe(q,ae),ne}function me(q,ae){var xe=ae.head,ne=1,Q=xe.data;for(q-=Q.length;xe=xe.next;){var X=xe.data,$=q>X.length?X.length:q;if($===X.length?Q+=X:Q+=X.slice(0,q),q-=$,q===0){$===X.length?(++ne,xe.next?ae.head=xe.next:ae.head=ae.tail=null):(ae.head=xe,xe.data=X.slice($));break}++ne}return ae.length-=ne,Q}function oe(q,ae){var xe=m.allocUnsafe(q),ne=ae.head,Q=1;for(ne.data.copy(xe),q-=ne.data.length;ne=ne.next;){var X=ne.data,$=q>X.length?X.length:q;if(X.copy(xe,xe.length-q,0,$),q-=$,q===0){$===X.length?(++Q,ne.next?ae.head=ne.next:ae.head=ae.tail=null):(ae.head=ne,ne.data=X.slice($));break}++Q}return ae.length-=Q,xe}function se(q){var ae=q._readableState;if(ae.length>0)throw new Error('"endReadable()" called on non-empty stream');ae.endEmitted||(ae.ended=!0,l.nextTick(te,ae,q))}function te(q,ae){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,ae.readable=!1,ae.emit("end"))}function be(q,ae){for(var xe=0,ne=q.length;xe<ne;xe++)if(q[xe]===ae)return xe;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,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(a){return a&&a.__esModule?a:{default:a}}Y.exports=w;var R=I("./_stream_duplex"),f=(0,c.default)(I("core-util-is"));f.inherits=I("inherits"),f.inherits(w,R);function s(a,r){var u=this._transformState;u.transforming=!1;var p=u.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));u.writechunk=null,u.writecb=null,r!=null&&this.push(r),p(a);var m=this._readableState;m.reading=!1,(m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}function w(a){if(!(this instanceof w))return new w(a);R.call(this,a),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&(typeof a.transform=="function"&&(this._transform=a.transform),typeof a.flush=="function"&&(this._flush=a.flush)),this.on("prefinish",l)}function l(){var a=this;typeof this._flush=="function"?this._flush(function(r,u){i(a,r,u)}):i(this,null,null)}w.prototype.push=function(a,r){return this._transformState.needTransform=!1,R.prototype.push.call(this,a,r)},w.prototype._transform=function(a,r,u){throw new Error("_transform() is not implemented")},w.prototype._write=function(a,r,u){var p=this._transformState;if(p.writecb=u,p.writechunk=a,p.writeencoding=r,!p.transforming){var m=this._readableState;(p.needTransform||m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}},w.prototype._read=function(a){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},w.prototype._destroy=function(a,r){var u=this;R.prototype._destroy.call(this,a,function(p){r(p),u.emit("close")})};function i(a,r,u){if(r)return a.emit("error",r);if(u!=null&&a.push(u),a._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(a._transformState.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(I,Y,k){(function(L,c){"use strict";var S=I("babel-runtime/core-js/object/define-property"),R=p(S),f=I("babel-runtime/core-js/symbol/has-instance"),s=p(f),w=I("babel-runtime/core-js/symbol"),l=p(w),i=I("babel-runtime/core-js/object/create"),a=p(i),r=I("babel-runtime/core-js/set-immediate"),u=p(r);function p(oe){return oe&&oe.__esModule?oe:{default:oe}}var m=I("process-nextick-args");Y.exports=N;function b(oe,se,te){this.chunk=oe,this.encoding=se,this.callback=te,this.next=null}function g(oe){var se=this;this.next=null,this.entry=null,this.finish=function(){me(se,oe)}}var v=!L.browser&&["v0.10","v0.9."].indexOf(L.version.slice(0,5))>-1?u.default:m.nextTick,n;N.WritableState=E;var d=(0,a.default)(I("core-util-is"));d.inherits=I("inherits");var h={deprecate:I("util-deprecate")},C=I("./internal/streams/stream"),T=I("safe-buffer").Buffer,o=c.Uint8Array||function(){};function P(oe){return T.from(oe)}function O(oe){return T.isBuffer(oe)||oe instanceof o}var y=I("./internal/streams/destroy");d.inherits(N,C);function x(){}function E(oe,se){n=n||I("./_stream_duplex"),oe=oe||{};var te=se instanceof n;this.objectMode=!!oe.objectMode,te&&(this.objectMode=this.objectMode||!!oe.writableObjectMode);var be=oe.highWaterMark,q=oe.writableHighWaterMark,ae=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:te&&(q||q===0)?this.highWaterMark=q:this.highWaterMark=ae,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var xe=oe.decodeStrings===!1;this.decodeStrings=!xe,this.defaultEncoding=oe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){K(se,ne)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new g(this)}E.prototype.getBuffer=function(){for(var se=this.bufferedRequest,te=[];se;)te.push(se),se=se.next;return te},function(){try{Object.defineProperty(E.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(oe){}}();var _;typeof l.default=="function"&&s.default&&typeof Function.prototype[s.default]=="function"?(_=Function.prototype[s.default],(0,R.default)(N,s.default,{value:function(se){return _.call(this,se)?!0:this!==N?!1:se&&se._writableState instanceof E}})):_=function(se){return se instanceof this};function N(oe){if(n=n||I("./_stream_duplex"),!_.call(N,this)&&!(this instanceof n))return new N(oe);this._writableState=new E(oe,this),this.writable=!0,oe&&(typeof oe.write=="function"&&(this._write=oe.write),typeof oe.writev=="function"&&(this._writev=oe.writev),typeof oe.destroy=="function"&&(this._destroy=oe.destroy),typeof oe.final=="function"&&(this._final=oe.final)),C.call(this)}N.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j(oe,se){var te=new Error("write after end");oe.emit("error",te),m.nextTick(se,te)}function M(oe,se,te,be){var q=!0,ae=!1;return te===null?ae=new TypeError("May not write null values to stream"):typeof te!="string"&&te!==void 0&&!se.objectMode&&(ae=new TypeError("Invalid non-string/buffer chunk")),ae&&(oe.emit("error",ae),m.nextTick(be,ae),q=!1),q}N.prototype.write=function(oe,se,te){var be=this._writableState,q=!1,ae=!be.objectMode&&O(oe);return ae&&!T.isBuffer(oe)&&(oe=P(oe)),typeof se=="function"&&(te=se,se=null),ae?se="buffer":se||(se=be.defaultEncoding),typeof te!="function"&&(te=x),be.ended?j(this,te):(ae||M(this,be,oe,te))&&(be.pendingcb++,q=z(this,be,ae,oe,se,te)),q},N.prototype.cork=function(){var oe=this._writableState;oe.corked++},N.prototype.uncork=function(){var oe=this._writableState;oe.corked&&(oe.corked--,!oe.writing&&!oe.corked&&!oe.finished&&!oe.bufferProcessing&&oe.bufferedRequest&&ee(this,oe))},N.prototype.setDefaultEncoding=function(se){if(typeof se=="string"&&(se=se.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((se+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+se);return this._writableState.defaultEncoding=se,this};function H(oe,se,te){return!oe.objectMode&&oe.decodeStrings!==!1&&typeof se=="string"&&(se=T.from(se,te)),se}Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(oe,se,te,be,q,ae){if(!te){var xe=H(se,be,q);be!==xe&&(te=!0,q="buffer",be=xe)}var ne=se.objectMode?1:be.length;se.length+=ne;var Q=se.length<se.highWaterMark;if(Q||(se.needDrain=!0),se.writing||se.corked){var X=se.lastBufferedRequest;se.lastBufferedRequest={chunk:be,encoding:q,isBuf:te,callback:ae,next:null},X?X.next=se.lastBufferedRequest:se.bufferedRequest=se.lastBufferedRequest,se.bufferedRequestCount+=1}else F(oe,se,!1,ne,be,q,ae);return Q}function F(oe,se,te,be,q,ae,xe){se.writelen=be,se.writecb=xe,se.writing=!0,se.sync=!0,te?oe._writev(q,se.onwrite):oe._write(q,ae,se.onwrite),se.sync=!1}function G(oe,se,te,be,q){--se.pendingcb,te?(m.nextTick(q,be),m.nextTick(ie,oe,se),oe._writableState.errorEmitted=!0,oe.emit("error",be)):(q(be),oe._writableState.errorEmitted=!0,oe.emit("error",be),ie(oe,se))}function B(oe){oe.writing=!1,oe.writecb=null,oe.length-=oe.writelen,oe.writelen=0}function K(oe,se){var te=oe._writableState,be=te.sync,q=te.writecb;if(B(te),se)G(oe,te,be,se,q);else{var ae=Z(te);!ae&&!te.corked&&!te.bufferProcessing&&te.bufferedRequest&&ee(oe,te),be?v(W,oe,te,ae,q):W(oe,te,ae,q)}}function W(oe,se,te,be){te||J(oe,se),se.pendingcb--,be(),ie(oe,se)}function J(oe,se){se.length===0&&se.needDrain&&(se.needDrain=!1,oe.emit("drain"))}function ee(oe,se){se.bufferProcessing=!0;var te=se.bufferedRequest;if(oe._writev&&te&&te.next){var be=se.bufferedRequestCount,q=new Array(be),ae=se.corkedRequestsFree;ae.entry=te;for(var xe=0,ne=!0;te;)q[xe]=te,te.isBuf||(ne=!1),te=te.next,xe+=1;q.allBuffers=ne,F(oe,se,!0,se.length,q,"",ae.finish),se.pendingcb++,se.lastBufferedRequest=null,ae.next?(se.corkedRequestsFree=ae.next,ae.next=null):se.corkedRequestsFree=new g(se),se.bufferedRequestCount=0}else{for(;te;){var Q=te.chunk,X=te.encoding,$=te.callback,pe=se.objectMode?1:Q.length;if(F(oe,se,!1,pe,Q,X,$),te=te.next,se.bufferedRequestCount--,se.writing)break}te===null&&(se.lastBufferedRequest=null)}se.bufferedRequest=te,se.bufferProcessing=!1}N.prototype._write=function(oe,se,te){te(new Error("_write() is not implemented"))},N.prototype._writev=null,N.prototype.end=function(oe,se,te){var be=this._writableState;typeof oe=="function"?(te=oe,oe=null,se=null):typeof se=="function"&&(te=se,se=null),oe!=null&&this.write(oe,se),be.corked&&(be.corked=1,this.uncork()),!be.ending&&!be.finished&&we(this,be,te)};function Z(oe){return oe.ending&&oe.length===0&&oe.bufferedRequest===null&&!oe.finished&&!oe.writing}function he(oe,se){oe._final(function(te){se.pendingcb--,te&&oe.emit("error",te),se.prefinished=!0,oe.emit("prefinish"),ie(oe,se)})}function ge(oe,se){!se.prefinished&&!se.finalCalled&&(typeof oe._final=="function"?(se.pendingcb++,se.finalCalled=!0,m.nextTick(he,oe,se)):(se.prefinished=!0,oe.emit("prefinish")))}function ie(oe,se){var te=Z(se);return te&&(ge(oe,se),se.pendingcb===0&&(se.finished=!0,oe.emit("finish"))),te}function we(oe,se,te){se.ending=!0,ie(oe,se),te&&(se.finished?m.nextTick(te):oe.once("finish",te)),se.ended=!0,oe.writable=!1}function me(oe,se,te){var be=oe.entry;for(oe.entry=null;be;){var q=be.callback;se.pendingcb--,q(te),be=be.next}se.corkedRequestsFree?se.corkedRequestsFree.next=oe:se.corkedRequestsFree=oe}Object.defineProperty(N.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(se){if(!this._writableState)return;this._writableState.destroyed=se}}),N.prototype.destroy=y.destroy,N.prototype._undestroy=y.undestroy,N.prototype._destroy=function(oe,se){this.end(),se(oe)}}).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,Y,k){"use strict";function L(f,s){if(!(f instanceof s))throw new TypeError("Cannot call a class as a function")}var c=I("safe-buffer").Buffer,S=I("util");function R(f,s,w){f.copy(s,w)}Y.exports=function(){function f(){L(this,f),this.head=null,this.tail=null,this.length=0}return f.prototype.push=function(w){var l={data:w,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},f.prototype.unshift=function(w){var l={data:w,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},f.prototype.shift=function(){if(this.length===0)return;var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w},f.prototype.clear=function(){this.head=this.tail=null,this.length=0},f.prototype.join=function(w){if(this.length===0)return"";for(var l=this.head,i=""+l.data;l=l.next;)i+=w+l.data;return i},f.prototype.concat=function(w){if(this.length===0)return c.alloc(0);if(this.length===1)return this.head.data;for(var l=c.allocUnsafe(w>>>0),i=this.head,a=0;i;)R(i.data,l,a),a+=i.data.length,i=i.next;return l},f}(),S&&S.inspect&&S.inspect.custom&&(Y.exports.prototype[S.inspect.custom]=function(){var f=S.inspect({length:this.length});return this.constructor.name+" "+f})},{"safe-buffer":228,util:71}],220:[function(I,Y,k){"use strict";var L=I("process-nextick-args");function c(f,s){var w=this,l=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return l||i?(s?s(f):f&&(!this._writableState||!this._writableState.errorEmitted)&&L.nextTick(R,this,f),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(f||null,function(a){!s&&a?(L.nextTick(R,w,a),w._writableState&&(w._writableState.errorEmitted=!0)):s&&s(a)}),this)}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function R(f,s){f.emit("error",s)}Y.exports={destroy:c,undestroy:S}},{"process-nextick-args":207}],221:[function(I,Y,k){"use strict";Y.exports=I("events").EventEmitter},{events:192}],222:[function(I,Y,k){Y.exports=I("./readable").PassThrough},{"./readable":223}],223:[function(I,Y,k){k=Y.exports=I("./lib/_stream_readable.js"),k.Stream=k,k.Readable=k,k.Writable=I("./lib/_stream_writable.js"),k.Duplex=I("./lib/_stream_duplex.js"),k.Transform=I("./lib/_stream_transform.js"),k.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,Y,k){Y.exports=I("./readable").Transform},{"./readable":223}],225:[function(I,Y,k){Y.exports=I("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(I,Y,k){var L=function(){return this}()||Function("return this")(),c=L.regeneratorRuntime&&Object.getOwnPropertyNames(L).indexOf("regeneratorRuntime")>=0,S=c&&L.regeneratorRuntime;if(L.regeneratorRuntime=void 0,Y.exports=I("./runtime"),c)L.regeneratorRuntime=S;else try{delete L.regeneratorRuntime}catch(R){L.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(I,Y,k){!function(L){"use strict";var c=Object.prototype,S=c.hasOwnProperty,R,f=typeof Symbol=="function"?Symbol:{},s=f.iterator||"@@iterator",w=f.asyncIterator||"@@asyncIterator",l=f.toStringTag||"@@toStringTag",i=typeof Y=="object",a=L.regeneratorRuntime;if(a){i&&(Y.exports=a);return}a=L.regeneratorRuntime=i?Y.exports:{};function r(z,F,G,B){var K=F&&F.prototype instanceof n?F:n,W=Object.create(K.prototype),J=new j(B||[]);return W._invoke=x(z,G,J),W}a.wrap=r;function u(z,F,G){try{return{type:"normal",arg:z.call(F,G)}}catch(B){return{type:"throw",arg:B}}}var p="suspendedStart",m="suspendedYield",b="executing",g="completed",v={};function n(){}function d(){}function h(){}var C={};C[s]=function(){return this};var T=Object.getPrototypeOf,o=T&&T(T(M([])));o&&o!==c&&S.call(o,s)&&(C=o);var P=h.prototype=n.prototype=Object.create(C);d.prototype=P.constructor=h,h.constructor=d,h[l]=d.displayName="GeneratorFunction";function O(z){["next","throw","return"].forEach(function(F){z[F]=function(G){return this._invoke(F,G)}})}a.isGeneratorFunction=function(z){var F=typeof z=="function"&&z.constructor;return F?F===d||(F.displayName||F.name)==="GeneratorFunction":!1},a.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,h):(z.__proto__=h,l in z||(z[l]="GeneratorFunction")),z.prototype=Object.create(P),z},a.awrap=function(z){return{__await:z}};function y(z){function F(K,W,J,ee){var Z=u(z[K],z,W);if(Z.type==="throw")ee(Z.arg);else{var he=Z.arg,ge=he.value;return ge&&typeof ge=="object"&&S.call(ge,"__await")?Promise.resolve(ge.__await).then(function(ie){F("next",ie,J,ee)},function(ie){F("throw",ie,J,ee)}):Promise.resolve(ge).then(function(ie){he.value=ie,J(he)},ee)}}var G;function B(K,W){function J(){return new Promise(function(ee,Z){F(K,W,ee,Z)})}return G=G?G.then(J,J):J()}this._invoke=B}O(y.prototype),y.prototype[w]=function(){return this},a.AsyncIterator=y,a.async=function(z,F,G,B){var K=new y(r(z,F,G,B));return a.isGeneratorFunction(F)?K:K.next().then(function(W){return W.done?W.value:K.next()})};function x(z,F,G){var B=p;return function(W,J){if(B===b)throw new Error("Generator is already running");if(B===g){if(W==="throw")throw J;return H()}for(G.method=W,G.arg=J;;){var ee=G.delegate;if(ee){var Z=E(ee,G);if(Z){if(Z===v)continue;return Z}}if(G.method==="next")G.sent=G._sent=G.arg;else if(G.method==="throw"){if(B===p)throw B=g,G.arg;G.dispatchException(G.arg)}else G.method==="return"&&G.abrupt("return",G.arg);B=b;var he=u(z,F,G);if(he.type==="normal"){if(B=G.done?g:m,he.arg===v)continue;return{value:he.arg,done:G.done}}else he.type==="throw"&&(B=g,G.method="throw",G.arg=he.arg)}}}function E(z,F){var G=z.iterator[F.method];if(G===R){if(F.delegate=null,F.method==="throw"){if(z.iterator.return&&(F.method="return",F.arg=R,E(z,F),F.method==="throw"))return v;F.method="throw",F.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var B=u(G,z.iterator,F.arg);if(B.type==="throw")return F.method="throw",F.arg=B.arg,F.delegate=null,v;var K=B.arg;if(!K)return F.method="throw",F.arg=new TypeError("iterator result is not an object"),F.delegate=null,v;if(K.done)F[z.resultName]=K.value,F.next=z.nextLoc,F.method!=="return"&&(F.method="next",F.arg=R);else return K;return F.delegate=null,v}O(P),P[l]="Generator",P[s]=function(){return this},P.toString=function(){return"[object Generator]"};function _(z){var F={tryLoc:z[0]};1 in z&&(F.catchLoc=z[1]),2 in z&&(F.finallyLoc=z[2],F.afterLoc=z[3]),this.tryEntries.push(F)}function N(z){var F=z.completion||{};F.type="normal",delete F.arg,z.completion=F}function j(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(_,this),this.reset(!0)}a.keys=function(z){var F=[];for(var G in z)F.push(G);return F.reverse(),function B(){for(;F.length;){var K=F.pop();if(K in z)return B.value=K,B.done=!1,B}return B.done=!0,B}};function M(z){if(z){var F=z[s];if(F)return F.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var G=-1,B=function K(){for(;++G<z.length;)if(S.call(z,G))return K.value=z[G],K.done=!1,K;return K.value=R,K.done=!0,K};return B.next=B}}return{next:H}}a.values=M;function H(){return{value:R,done:!0}}j.prototype={constructor:j,reset:function(z){if(this.prev=0,this.next=0,this.sent=this._sent=R,this.done=!1,this.delegate=null,this.method="next",this.arg=R,this.tryEntries.forEach(N),!z)for(var F in this)F.charAt(0)==="t"&&S.call(this,F)&&!isNaN(+F.slice(1))&&(this[F]=R)},stop:function(){this.done=!0;var z=this.tryEntries[0],F=z.completion;if(F.type==="throw")throw F.arg;return this.rval},dispatchException:function(z){if(this.done)throw z;var F=this;function G(Z,he){return W.type="throw",W.arg=z,F.next=Z,he&&(F.method="next",F.arg=R),!!he}for(var B=this.tryEntries.length-1;B>=0;--B){var K=this.tryEntries[B],W=K.completion;if(K.tryLoc==="root")return G("end");if(K.tryLoc<=this.prev){var J=S.call(K,"catchLoc"),ee=S.call(K,"finallyLoc");if(J&&ee){if(this.prev<K.catchLoc)return G(K.catchLoc,!0);if(this.prev<K.finallyLoc)return G(K.finallyLoc)}else if(J){if(this.prev<K.catchLoc)return G(K.catchLoc,!0)}else if(ee){if(this.prev<K.finallyLoc)return G(K.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(z,F){for(var G=this.tryEntries.length-1;G>=0;--G){var B=this.tryEntries[G];if(B.tryLoc<=this.prev&&S.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var K=B;break}}K&&(z==="break"||z==="continue")&&K.tryLoc<=F&&F<=K.finallyLoc&&(K=null);var W=K?K.completion:{};return W.type=z,W.arg=F,K?(this.method="next",this.next=K.finallyLoc,v):this.complete(W)},complete:function(z,F){if(z.type==="throw")throw z.arg;return z.type==="break"||z.type==="continue"?this.next=z.arg:z.type==="return"?(this.rval=this.arg=z.arg,this.method="return",this.next="end"):z.type==="normal"&&F&&(this.next=F),v},finish:function(z){for(var F=this.tryEntries.length-1;F>=0;--F){var G=this.tryEntries[F];if(G.finallyLoc===z)return this.complete(G.completion,G.afterLoc),N(G),v}},catch:function(z){for(var F=this.tryEntries.length-1;F>=0;--F){var G=this.tryEntries[F];if(G.tryLoc===z){var B=G.completion;if(B.type==="throw"){var K=B.arg;N(G)}return K}}throw new Error("illegal catch attempt")},delegateYield:function(z,F,G){return this.delegate={iterator:M(z),resultName:F,nextLoc:G},this.method==="next"&&(this.arg=R),v}}}(function(){return this}()||Function("return this")())},{}],228:[function(I,Y,k){var L=I("buffer"),c=L.Buffer;function S(f,s){for(var w in f)s[w]=f[w]}c.from&&c.alloc&&c.allocUnsafe&&c.allocUnsafeSlow?Y.exports=L:(S(L,k),k.Buffer=R);function R(f,s,w){return c(f,s,w)}S(c,R),R.from=function(f,s,w){if(typeof f=="number")throw new TypeError("Argument must not be a number");return c(f,s,w)},R.alloc=function(f,s,w){if(typeof f!="number")throw new TypeError("Argument must be a number");var l=c(f);return s!==void 0?typeof w=="string"?l.fill(s,w):l.fill(s):l.fill(0),l},R.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return c(f)},R.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return L.SlowBuffer(f)}},{buffer:73}],229:[function(I,Y,k){(function(L){"use strict";var c=I("babel-runtime/core-js/string/from-code-point"),S=m(c),R=I("babel-runtime/core-js/json/stringify"),f=m(R),s=I("babel-runtime/helpers/typeof"),w=m(s),l=I("babel-runtime/core-js/object/define-property"),i=m(l),a=I("babel-runtime/core-js/object/keys"),r=m(a),u=I("babel-runtime/core-js/object/create"),p=m(u);function m(b){return b&&b.__esModule?b:{default:b}}(function(b){b.parser=function(X,$){return new v(X,$)},b.SAXParser=v,b.SAXStream=P,b.createStream=o,b.MAX_BUFFER_LENGTH=64*1024;var g=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];b.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function v(X,$){if(!(this instanceof v))return new v(X,$);var pe=this;d(pe),pe.q=pe.c="",pe.bufferCheckPosition=b.MAX_BUFFER_LENGTH,pe.opt=$||{},pe.opt.lowercase=pe.opt.lowercase||pe.opt.lowercasetags,pe.looseCase=pe.opt.lowercase?"toLowerCase":"toUpperCase",pe.tags=[],pe.closed=pe.closedRoot=pe.sawRoot=!1,pe.tag=pe.error=null,pe.strict=!!X,pe.noscript=!!(X||pe.opt.noscript),pe.state=W.BEGIN,pe.strictEntities=pe.opt.strictEntities,pe.ENTITIES=pe.strictEntities?(0,p.default)(b.XML_ENTITIES):(0,p.default)(b.ENTITIES),pe.attribList=[],pe.opt.xmlns&&(pe.ns=(0,p.default)(_)),pe.trackPosition=pe.opt.position!==!1,pe.trackPosition&&(pe.position=pe.line=pe.column=0),ee(pe,"onready")}p.default||(Object.create=function(X){function $(){}$.prototype=X;var pe=new $;return pe}),r.default||(Object.keys=function(X){var $=[];for(var pe in X)X.hasOwnProperty(pe)&&$.push(pe);return $});function n(X){for(var $=Math.max(b.MAX_BUFFER_LENGTH,10),pe=0,de=0,Ce=g.length;de<Ce;de++){var ze=X[g[de]].length;if(ze>$)switch(g[de]){case"textNode":he(X);break;case"cdata":Z(X,"oncdata",X.cdata),X.cdata="";break;case"script":Z(X,"onscript",X.script),X.script="";break;default:ie(X,"Max buffer length exceeded: "+g[de])}pe=Math.max(pe,ze)}var qe=b.MAX_BUFFER_LENGTH-pe;X.bufferCheckPosition=qe+X.position}function d(X){for(var $=0,pe=g.length;$<pe;$++)X[g[$]]=""}function h(X){he(X),X.cdata!==""&&(Z(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(Z(X,"onscript",X.script),X.script="")}v.prototype={end:function(){we(this)},write:Q,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){h(this)}};var C;try{C=I("stream").Stream}catch(X){C=function(){}}var T=b.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function o(X,$){return new P(X,$)}function P(X,$){if(!(this instanceof P))return new P(X,$);C.apply(this),this._parser=new v(X,$),this.writable=!0,this.readable=!0;var pe=this;this._parser.onend=function(){pe.emit("end")},this._parser.onerror=function(de){pe.emit("error",de),pe._parser.error=null},this._decoder=null,T.forEach(function(de){(0,i.default)(pe,"on"+de,{get:function(){return pe._parser["on"+de]},set:function(ze){if(!ze)return pe.removeAllListeners(de),pe._parser["on"+de]=ze,ze;pe.on(de,ze)},enumerable:!0,configurable:!1})})}P.prototype=(0,p.default)(C.prototype,{constructor:{value:P}}),P.prototype.write=function(X){if(typeof L=="function"&&typeof L.isBuffer=="function"&&L.isBuffer(X)){if(!this._decoder){var $=I("string_decoder").StringDecoder;this._decoder=new $("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},P.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},P.prototype.on=function(X,$){var pe=this;return!pe._parser["on"+X]&&T.indexOf(X)!==-1&&(pe._parser["on"+X]=function(){var de=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);de.splice(0,0,X),pe.emit.apply(pe,de)}),C.prototype.on.call(pe,X,$)};var O="[CDATA[",y="DOCTYPE",x="http://www.w3.org/XML/1998/namespace",E="http://www.w3.org/2000/xmlns/",_={xml:x,xmlns:E},N=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,j=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,M=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,H=/[#:_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 z(X){return X===" "||X===`
`||X==="\r"||X===" "}function F(X){return X==='"'||X==="'"}function G(X){return X===">"||z(X)}function B(X,$){return X.test($)}function K(X,$){return!B(X,$)}var W=0;b.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++},b.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},b.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)(b.ENTITIES).forEach(function(X){var $=b.ENTITIES[X],pe=typeof $=="number"?String.fromCharCode($):$;b.ENTITIES[X]=pe});for(var J in b.STATE)b.STATE[b.STATE[J]]=J;W=b.STATE;function ee(X,$,pe){X[$]&&X[$](pe)}function Z(X,$,pe){X.textNode&&he(X),ee(X,$,pe)}function he(X){X.textNode=ge(X.opt,X.textNode),X.textNode&&ee(X,"ontext",X.textNode),X.textNode=""}function ge(X,$){return X.trim&&($=$.trim()),X.normalize&&($=$.replace(/\s+/g," ")),$}function ie(X,$){return he(X),X.trackPosition&&($+=`
Line: `+X.line+`
Column: `+X.column+`
Char: `+X.c),$=new Error($),X.error=$,ee(X,"onerror",$),X}function we(X){return X.sawRoot&&!X.closedRoot&&me(X,"Unclosed root tag"),X.state!==W.BEGIN&&X.state!==W.BEGIN_WHITESPACE&&X.state!==W.TEXT&&ie(X,"Unexpected end"),he(X),X.c="",X.closed=!0,ee(X,"onend"),v.call(X,X.strict,X.opt),X}function me(X,$){if((typeof X=="undefined"?"undefined":(0,w.default)(X))!=="object"||!(X instanceof v))throw new Error("bad call to strictFail");X.strict&&ie(X,$)}function oe(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var $=X.tags[X.tags.length-1]||X,pe=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(pe.ns=$.ns),X.attribList.length=0,Z(X,"onopentagstart",pe)}function se(X,$){var pe=X.indexOf(":"),de=pe<0?["",X]:X.split(":"),Ce=de[0],ze=de[1];return $&&X==="xmlns"&&(Ce="xmlns",ze=""),{prefix:Ce,local:ze}}function te(X){if(X.strict||(X.attribName=X.attribName[X.looseCase]()),X.attribList.indexOf(X.attribName)!==-1||X.tag.attributes.hasOwnProperty(X.attribName)){X.attribName=X.attribValue="";return}if(X.opt.xmlns){var $=se(X.attribName,!0),pe=$.prefix,de=$.local;if(pe==="xmlns")if(de==="xml"&&X.attribValue!==x)me(X,"xml: prefix must be bound to "+x+`
Actual: `+X.attribValue);else if(de==="xmlns"&&X.attribValue!==E)me(X,"xmlns: prefix must be bound to "+E+`
Actual: `+X.attribValue);else{var Ce=X.tag,ze=X.tags[X.tags.length-1]||X;Ce.ns===ze.ns&&(Ce.ns=(0,p.default)(ze.ns)),Ce.ns[de]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,Z(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function be(X,$){if(X.opt.xmlns){var pe=X.tag,de=se(X.tagName);pe.prefix=de.prefix,pe.local=de.local,pe.uri=pe.ns[de.prefix]||"",pe.prefix&&!pe.uri&&(me(X,"Unbound namespace prefix: "+(0,f.default)(X.tagName)),pe.uri=de.prefix);var Ce=X.tags[X.tags.length-1]||X;pe.ns&&Ce.ns!==pe.ns&&(0,r.default)(pe.ns).forEach(function(Ue){Z(X,"onopennamespace",{prefix:Ue,uri:pe.ns[Ue]})});for(var ze=0,qe=X.attribList.length;ze<qe;ze++){var Ye=X.attribList[ze],Ve=Ye[0],et=Ye[1],rt=se(Ve,!0),Me=rt.prefix,Se=rt.local,Ge=Me===""?"":pe.ns[Me]||"",tt={name:Ve,value:et,prefix:Me,local:Se,uri:Ge};Me&&Me!=="xmlns"&&!Ge&&(me(X,"Unbound namespace prefix: "+(0,f.default)(Me)),tt.uri=Me),X.tag.attributes[Ve]=tt,Z(X,"onattribute",tt)}X.attribList.length=0}X.tag.isSelfClosing=!!$,X.sawRoot=!0,X.tags.push(X.tag),Z(X,"onopentag",X.tag),$||(!X.noscript&&X.tagName.toLowerCase()==="script"?X.state=W.SCRIPT:X.state=W.TEXT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function q(X){if(!X.tagName){me(X,"Weird empty close tag."),X.textNode+="</>",X.state=W.TEXT;return}if(X.script){if(X.tagName!=="script"){X.script+="</"+X.tagName+">",X.tagName="",X.state=W.SCRIPT;return}Z(X,"onscript",X.script),X.script=""}var $=X.tags.length,pe=X.tagName;X.strict||(pe=pe[X.looseCase]());for(var de=pe;$--;){var Ce=X.tags[$];if(Ce.name!==de)me(X,"Unexpected close tag");else break}if($<0){me(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=W.TEXT;return}X.tagName=pe;for(var ze=X.tags.length;ze-- >$;){var qe=X.tag=X.tags.pop();X.tagName=X.tag.name,Z(X,"onclosetag",X.tagName);var Ye={};for(var Ve in qe.ns)Ye[Ve]=qe.ns[Ve];var et=X.tags[X.tags.length-1]||X;X.opt.xmlns&&qe.ns!==et.ns&&(0,r.default)(qe.ns).forEach(function(rt){var Me=qe.ns[rt];Z(X,"onclosenamespace",{prefix:rt,uri:Me})})}$===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=W.TEXT}function ae(X){var $=X.entity,pe=$.toLowerCase(),de,Ce="";return X.ENTITIES[$]?X.ENTITIES[$]:X.ENTITIES[pe]?X.ENTITIES[pe]:($=pe,$.charAt(0)==="#"&&($.charAt(1)==="x"?($=$.slice(2),de=parseInt($,16),Ce=de.toString(16)):($=$.slice(1),de=parseInt($,10),Ce=de.toString(10))),$=$.replace(/^0+/,""),isNaN(de)||Ce.toLowerCase()!==$?(me(X,"Invalid character entity"),"&"+X.entity+";"):(0,S.default)(de))}function xe(X,$){$==="<"?(X.state=W.OPEN_WAKA,X.startTagPosition=X.position):z($)||(me(X,"Non-whitespace before first tag."),X.textNode=$,X.state=W.TEXT)}function ne(X,$){var pe="";return $<X.length&&(pe=X.charAt($)),pe}function Q(X){var $=this;if(this.error)throw this.error;if($.closed)return ie($,"Cannot write after close. Assign an onready handler.");if(X===null)return we($);(typeof X=="undefined"?"undefined":(0,w.default)(X))==="object"&&(X=X.toString());for(var pe=0,de="";!(de=ne(X,pe++),$.c=de,!de);){$.trackPosition&&($.position++,de===`
`?($.line++,$.column=0):$.column++);switch($.state){case W.BEGIN:if($.state=W.BEGIN_WHITESPACE,de==="\uFEFF")continue;xe($,de);continue;case W.BEGIN_WHITESPACE:xe($,de);continue;case W.TEXT:if($.sawRoot&&!$.closedRoot){for(var Ce=pe-1;de&&de!=="<"&&de!=="&";)de=ne(X,pe++),de&&$.trackPosition&&($.position++,de===`
`?($.line++,$.column=0):$.column++);$.textNode+=X.substring(Ce,pe-1)}de==="<"&&!($.sawRoot&&$.closedRoot&&!$.strict)?($.state=W.OPEN_WAKA,$.startTagPosition=$.position):(!z(de)&&(!$.sawRoot||$.closedRoot)&&me($,"Text data outside of root node."),de==="&"?$.state=W.TEXT_ENTITY:$.textNode+=de);continue;case W.SCRIPT:de==="<"?$.state=W.SCRIPT_ENDING:$.script+=de;continue;case W.SCRIPT_ENDING:de==="/"?$.state=W.CLOSE_TAG:($.script+="<"+de,$.state=W.SCRIPT);continue;case W.OPEN_WAKA:if(de==="!")$.state=W.SGML_DECL,$.sgmlDecl="";else if(!z(de))if(B(N,de))$.state=W.OPEN_TAG,$.tagName=de;else if(de==="/")$.state=W.CLOSE_TAG,$.tagName="";else if(de==="?")$.state=W.PROC_INST,$.procInstName=$.procInstBody="";else{if(me($,"Unencoded <"),$.startTagPosition+1<$.position){var ze=$.position-$.startTagPosition;de=new Array(ze).join(" ")+de}$.textNode+="<"+de,$.state=W.TEXT}continue;case W.SGML_DECL:($.sgmlDecl+de).toUpperCase()===O?(Z($,"onopencdata"),$.state=W.CDATA,$.sgmlDecl="",$.cdata=""):$.sgmlDecl+de==="--"?($.state=W.COMMENT,$.comment="",$.sgmlDecl=""):($.sgmlDecl+de).toUpperCase()===y?($.state=W.DOCTYPE,($.doctype||$.sawRoot)&&me($,"Inappropriately located doctype declaration"),$.doctype="",$.sgmlDecl=""):de===">"?(Z($,"onsgmldeclaration",$.sgmlDecl),$.sgmlDecl="",$.state=W.TEXT):(F(de)&&($.state=W.SGML_DECL_QUOTED),$.sgmlDecl+=de);continue;case W.SGML_DECL_QUOTED:de===$.q&&($.state=W.SGML_DECL,$.q=""),$.sgmlDecl+=de;continue;case W.DOCTYPE:de===">"?($.state=W.TEXT,Z($,"ondoctype",$.doctype),$.doctype=!0):($.doctype+=de,de==="["?$.state=W.DOCTYPE_DTD:F(de)&&($.state=W.DOCTYPE_QUOTED,$.q=de));continue;case W.DOCTYPE_QUOTED:$.doctype+=de,de===$.q&&($.q="",$.state=W.DOCTYPE);continue;case W.DOCTYPE_DTD:$.doctype+=de,de==="]"?$.state=W.DOCTYPE:F(de)&&($.state=W.DOCTYPE_DTD_QUOTED,$.q=de);continue;case W.DOCTYPE_DTD_QUOTED:$.doctype+=de,de===$.q&&($.state=W.DOCTYPE_DTD,$.q="");continue;case W.COMMENT:de==="-"?$.state=W.COMMENT_ENDING:$.comment+=de;continue;case W.COMMENT_ENDING:de==="-"?($.state=W.COMMENT_ENDED,$.comment=ge($.opt,$.comment),$.comment&&Z($,"oncomment",$.comment),$.comment=""):($.comment+="-"+de,$.state=W.COMMENT);continue;case W.COMMENT_ENDED:de!==">"?(me($,"Malformed comment"),$.comment+="--"+de,$.state=W.COMMENT):$.state=W.TEXT;continue;case W.CDATA:de==="]"?$.state=W.CDATA_ENDING:$.cdata+=de;continue;case W.CDATA_ENDING:de==="]"?$.state=W.CDATA_ENDING_2:($.cdata+="]"+de,$.state=W.CDATA);continue;case W.CDATA_ENDING_2:de===">"?($.cdata&&Z($,"oncdata",$.cdata),Z($,"onclosecdata"),$.cdata="",$.state=W.TEXT):de==="]"?$.cdata+="]":($.cdata+="]]"+de,$.state=W.CDATA);continue;case W.PROC_INST:de==="?"?$.state=W.PROC_INST_ENDING:z(de)?$.state=W.PROC_INST_BODY:$.procInstName+=de;continue;case W.PROC_INST_BODY:if(!$.procInstBody&&z(de))continue;de==="?"?$.state=W.PROC_INST_ENDING:$.procInstBody+=de;continue;case W.PROC_INST_ENDING:de===">"?(Z($,"onprocessinginstruction",{name:$.procInstName,body:$.procInstBody}),$.procInstName=$.procInstBody="",$.state=W.TEXT):($.procInstBody+="?"+de,$.state=W.PROC_INST_BODY);continue;case W.OPEN_TAG:B(j,de)?$.tagName+=de:(oe($),de===">"?be($):de==="/"?$.state=W.OPEN_TAG_SLASH:(z(de)||me($,"Invalid character in tag name"),$.state=W.ATTRIB));continue;case W.OPEN_TAG_SLASH:de===">"?(be($,!0),q($)):(me($,"Forward-slash in opening tag not followed by >"),$.state=W.ATTRIB);continue;case W.ATTRIB:if(z(de))continue;de===">"?be($):de==="/"?$.state=W.OPEN_TAG_SLASH:B(N,de)?($.attribName=de,$.attribValue="",$.state=W.ATTRIB_NAME):me($,"Invalid attribute name");continue;case W.ATTRIB_NAME:de==="="?$.state=W.ATTRIB_VALUE:de===">"?(me($,"Attribute without value"),$.attribValue=$.attribName,te($),be($)):z(de)?$.state=W.ATTRIB_NAME_SAW_WHITE:B(j,de)?$.attribName+=de:me($,"Invalid attribute name");continue;case W.ATTRIB_NAME_SAW_WHITE:if(de==="=")$.state=W.ATTRIB_VALUE;else{if(z(de))continue;me($,"Attribute without value"),$.tag.attributes[$.attribName]="",$.attribValue="",Z($,"onattribute",{name:$.attribName,value:""}),$.attribName="",de===">"?be($):B(N,de)?($.attribName=de,$.state=W.ATTRIB_NAME):(me($,"Invalid attribute name"),$.state=W.ATTRIB)}continue;case W.ATTRIB_VALUE:if(z(de))continue;F(de)?($.q=de,$.state=W.ATTRIB_VALUE_QUOTED):(me($,"Unquoted attribute value"),$.state=W.ATTRIB_VALUE_UNQUOTED,$.attribValue=de);continue;case W.ATTRIB_VALUE_QUOTED:if(de!==$.q){de==="&"?$.state=W.ATTRIB_VALUE_ENTITY_Q:$.attribValue+=de;continue}te($),$.q="",$.state=W.ATTRIB_VALUE_CLOSED;continue;case W.ATTRIB_VALUE_CLOSED:z(de)?$.state=W.ATTRIB:de===">"?be($):de==="/"?$.state=W.OPEN_TAG_SLASH:B(N,de)?(me($,"No whitespace between attributes"),$.attribName=de,$.attribValue="",$.state=W.ATTRIB_NAME):me($,"Invalid attribute name");continue;case W.ATTRIB_VALUE_UNQUOTED:if(!G(de)){de==="&"?$.state=W.ATTRIB_VALUE_ENTITY_U:$.attribValue+=de;continue}te($),de===">"?be($):$.state=W.ATTRIB;continue;case W.CLOSE_TAG:if($.tagName)de===">"?q($):B(j,de)?$.tagName+=de:$.script?($.script+="</"+$.tagName,$.tagName="",$.state=W.SCRIPT):(z(de)||me($,"Invalid tagname in closing tag"),$.state=W.CLOSE_TAG_SAW_WHITE);else{if(z(de))continue;K(N,de)?$.script?($.script+="</"+de,$.state=W.SCRIPT):me($,"Invalid tagname in closing tag."):$.tagName=de}continue;case W.CLOSE_TAG_SAW_WHITE:if(z(de))continue;de===">"?q($):me($,"Invalid characters in closing tag");continue;case W.TEXT_ENTITY:case W.ATTRIB_VALUE_ENTITY_Q:case W.ATTRIB_VALUE_ENTITY_U:var qe,Ye;switch($.state){case W.TEXT_ENTITY:qe=W.TEXT,Ye="textNode";break;case W.ATTRIB_VALUE_ENTITY_Q:qe=W.ATTRIB_VALUE_QUOTED,Ye="attribValue";break;case W.ATTRIB_VALUE_ENTITY_U:qe=W.ATTRIB_VALUE_UNQUOTED,Ye="attribValue";break}de===";"?($[Ye]+=ae($),$.entity="",$.state=qe):B($.entity.length?H:M,de)?$.entity+=de:(me($,"Invalid character in entity name"),$[Ye]+="&"+$.entity+de,$.entity="",$.state=qe);continue;default:throw new Error($,"Unknown state: "+$.state)}}return $.position>=$.bufferCheckPosition&&n($),$}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */S.default||function(){var X=String.fromCharCode,$=Math.floor,pe=function(){var Ce=16384,ze=[],qe,Ye,Ve=-1,et=arguments.length;if(!et)return"";for(var rt="";++Ve<et;){var Me=Number(arguments[Ve]);if(!isFinite(Me)||Me<0||Me>1114111||$(Me)!==Me)throw RangeError("Invalid code point: "+Me);Me<=65535?ze.push(Me):(Me-=65536,qe=(Me>>10)+55296,Ye=Me%1024+56320,ze.push(qe,Ye)),(Ve+1===et||ze.length>Ce)&&(rt+=X.apply(null,ze),ze.length=0)}return rt};i.default?Object.defineProperty(String,"fromCodePoint",{value:pe,configurable:!0,writable:!0}):String.fromCodePoint=pe}()})(typeof k=="undefined"?(void 0).sax={}:k)}).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,Y,k){Y.exports=S;var L=I("events").EventEmitter,c=I("inherits");c(S,L),S.Readable=I("readable-stream/readable.js"),S.Writable=I("readable-stream/writable.js"),S.Duplex=I("readable-stream/duplex.js"),S.Transform=I("readable-stream/transform.js"),S.PassThrough=I("readable-stream/passthrough.js"),S.Stream=S;function S(){L.call(this)}S.prototype.pipe=function(R,f){var s=this;function w(m){R.writable&&(R.write(m)===!1&&s.pause&&s.pause())}s.on("data",w);function l(){s.readable&&s.resume&&s.resume()}R.on("drain",l),!R._isStdio&&(!f||f.end!==!1)&&(s.on("end",a),s.on("close",r));var i=!1;function a(){if(i)return;i=!0,R.end()}function r(){if(i)return;i=!0,typeof R.destroy=="function"&&R.destroy()}function u(m){if(p(),L.listenerCount(this,"error")===0)throw m}s.on("error",u),R.on("error",u);function p(){s.removeListener("data",w),R.removeListener("drain",l),s.removeListener("end",a),s.removeListener("close",r),s.removeListener("error",u),R.removeListener("error",u),s.removeListener("end",p),s.removeListener("close",p),R.removeListener("close",p)}return s.on("end",p),s.on("close",p),R.on("close",p),R.emit("pipe",s),R}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(I,Y,k){(function(L){var c=I("./lib/request"),S=I("./lib/response"),R=I("xtend"),f=I("builtin-status-codes"),s=I("url"),w=k;w.request=function(l,i){typeof l=="string"?l=s.parse(l):l=R(l);var a=L.location.protocol.search(/^https?:$/)===-1?"http:":"",r=l.protocol||a,u=l.hostname||l.host,p=l.port,m=l.path||"/";u&&u.indexOf(":")!==-1&&(u="["+u+"]"),l.url=(u?r+"//"+u:"")+(p?":"+p:"")+m,l.method=(l.method||"GET").toUpperCase(),l.headers=l.headers||{};var b=new c(l);return i&&b.on("response",i),b},w.get=function(i,a){var r=w.request(i,a);return r.end(),r},w.ClientRequest=c,w.IncomingMessage=S.IncomingMessage,w.Agent=function(){},w.Agent.defaultMaxSockets=4,w.globalAgent=new w.Agent,w.STATUS_CODES=f,w.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(I,Y,k){(function(L){"use strict";k.fetch=w(L.fetch)&&w(L.ReadableStream),k.writableStream=w(L.WritableStream),k.abortController=w(L.AbortController),k.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),k.blobConstructor=!0}catch(l){}var c;function S(){if(c!==void 0)return c;if(L.XMLHttpRequest){c=new L.XMLHttpRequest;try{c.open("GET",L.XDomainRequest?"/":"https://example.com")}catch(l){c=null}}else c=null;return c}function R(l){var i=S();if(!i)return!1;try{return i.responseType=l,i.responseType===l}catch(a){}return!1}var f=typeof L.ArrayBuffer!="undefined",s=f&&w(L.ArrayBuffer.prototype.slice);k.arraybuffer=k.fetch||f&&R("arraybuffer"),k.msstream=!k.fetch&&s&&R("ms-stream"),k.mozchunkedarraybuffer=!k.fetch&&f&&R("moz-chunked-arraybuffer"),k.overrideMimeType=k.fetch||(S()?w(S().overrideMimeType):!1),k.vbArray=w(L.VBArray);function w(l){return typeof l=="function"}c=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(I,Y,k){(function(L,c,S){"use strict";var R=I("babel-runtime/core-js/object/keys"),f=s(R);function s(n){return n&&n.__esModule?n:{default:n}}var w=I("./capability"),l=I("inherits"),i=I("./response"),a=I("readable-stream"),r=I("to-arraybuffer"),u=i.IncomingMessage,p=i.readyStates;function m(n,d){return w.fetch&&d?"fetch":w.mozchunkedarraybuffer?"moz-chunked-arraybuffer":w.msstream?"ms-stream":w.arraybuffer&&n?"arraybuffer":w.vbArray&&n?"text:vbarray":"text"}var b=Y.exports=function(n){var d=this;a.Writable.call(d),d._opts=n,d._body=[],d._headers={},n.auth&&d.setHeader("Authorization","Basic "+new S(n.auth).toString("base64")),(0,f.default)(n.headers).forEach(function(T){d.setHeader(T,n.headers[T])});var h,C=!0;if(n.mode==="disable-fetch"||"requestTimeout"in n&&!w.abortController)C=!1,h=!0;else if(n.mode==="prefer-streaming")h=!1;else if(n.mode==="allow-wrong-content-type")h=!w.overrideMimeType;else if(!n.mode||n.mode==="default"||n.mode==="prefer-fast")h=!0;else throw new Error("Invalid value for opts.mode");d._mode=m(h,C),d._fetchTimer=null,d.on("finish",function(){d._onFinish()})};l(b,a.Writable),b.prototype.setHeader=function(n,d){var h=this,C=n.toLowerCase();if(v.indexOf(C)!==-1)return;h._headers[C]={name:n,value:d}},b.prototype.getHeader=function(n){var d=this._headers[n.toLowerCase()];return d?d.value:null},b.prototype.removeHeader=function(n){var d=this;delete d._headers[n.toLowerCase()]},b.prototype._onFinish=function(){var n=this;if(n._destroyed)return;var d=n._opts,h=n._headers,C=null;d.method!=="GET"&&d.method!=="HEAD"&&(w.arraybuffer?C=r(S.concat(n._body)):w.blobConstructor?C=new c.Blob(n._body.map(function(x){return r(x)}),{type:(h["content-type"]||{}).value||""}):C=S.concat(n._body).toString());var T=[];if((0,f.default)(h).forEach(function(x){var E=h[x].name,_=h[x].value;Array.isArray(_)?_.forEach(function(N){T.push([E,N])}):T.push([E,_])}),n._mode==="fetch"){var o=null,P=null;if(w.abortController){var O=new AbortController;o=O.signal,n._fetchAbortController=O,"requestTimeout"in d&&d.requestTimeout!==0&&(n._fetchTimer=c.setTimeout(function(){n.emit("requestTimeout"),n._fetchAbortController&&n._fetchAbortController.abort()},d.requestTimeout))}c.fetch(n._opts.url,{method:n._opts.method,headers:T,body:C||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:o}).then(function(x){n._fetchResponse=x,n._connect()},function(x){c.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",x)})}else{var y=n._xhr=new c.XMLHttpRequest;try{y.open(n._opts.method,n._opts.url,!0)}catch(x){L.nextTick(function(){n.emit("error",x)});return}"responseType"in y&&(y.responseType=n._mode.split(":")[0]),"withCredentials"in y&&(y.withCredentials=!!d.withCredentials),n._mode==="text"&&"overrideMimeType"in y&&y.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(y.timeout=d.requestTimeout,y.ontimeout=function(){n.emit("requestTimeout")}),T.forEach(function(x){y.setRequestHeader(x[0],x[1])}),n._response=null,y.onreadystatechange=function(){switch(y.readyState){case p.LOADING:case p.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(y.onprogress=function(){n._onXHRProgress()}),y.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{y.send(C)}catch(x){L.nextTick(function(){n.emit("error",x)});return}}};function g(n){try{var d=n.status;return d!==null&&d!==0}catch(h){return!1}}b.prototype._onXHRProgress=function(){var n=this;if(!g(n._xhr)||n._destroyed)return;n._response||n._connect(),n._response._onXHRProgress()},b.prototype._connect=function(){var n=this;if(n._destroyed)return;n._response=new u(n._xhr,n._fetchResponse,n._mode,n._fetchTimer),n._response.on("error",function(d){n.emit("error",d)}),n.emit("response",n._response)},b.prototype._write=function(n,d,h){var C=this;C._body.push(n),h()},b.prototype.abort=b.prototype.destroy=function(){var n=this;n._destroyed=!0,c.clearTimeout(n._fetchTimer),n._response&&(n._response._destroyed=!0),n._xhr?n._xhr.abort():n._fetchAbortController&&n._fetchAbortController.abort()},b.prototype.end=function(n,d,h){var C=this;typeof n=="function"&&(h=n,n=void 0),a.Writable.prototype.end.call(C,n,d,h)},b.prototype.flushHeaders=function(){},b.prototype.setTimeout=function(){},b.prototype.setNoDelay=function(){},b.prototype.setSocketKeepAlive=function(){};var v=["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,Y,k){(function(L,c,S){"use strict";var R=I("babel-runtime/core-js/promise"),f=s(R);function s(u){return u&&u.__esModule?u:{default:u}}var w=I("./capability"),l=I("inherits"),i=I("readable-stream"),a=k.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=k.IncomingMessage=function(u,p,m,b){var g=this;if(i.Readable.call(g),g._mode=m,g.headers={},g.rawHeaders=[],g.trailers={},g.rawTrailers=[],g.on("end",function(){L.nextTick(function(){g.emit("close")})}),m==="fetch"){var v=function o(){d.read().then(function(P){if(g._destroyed)return;if(P.done){c.clearTimeout(b),g.push(null);return}g.push(new S(P.value)),o()}).catch(function(P){c.clearTimeout(b),g._destroyed||g.emit("error",P)})};if(g._fetchResponse=p,g.url=p.url,g.statusCode=p.status,g.statusMessage=p.statusText,p.headers.forEach(function(o,P){g.headers[P.toLowerCase()]=o,g.rawHeaders.push(P,o)}),w.writableStream){var n=new WritableStream({write:function(P){return new f.default(function(O,y){g._destroyed?y():g.push(new S(P))?O():g._resumeFetch=O})},close:function(){c.clearTimeout(b),g._destroyed||g.push(null)},abort:function(P){g._destroyed||g.emit("error",P)}});try{p.body.pipeTo(n).catch(function(o){c.clearTimeout(b),g._destroyed||g.emit("error",o)});return}catch(o){}}var d=p.body.getReader();v()}else{g._xhr=u,g._pos=0,g.url=u.responseURL,g.statusCode=u.status,g.statusMessage=u.statusText;var h=u.getAllResponseHeaders().split(/\r?\n/);if(h.forEach(function(o){var P=o.match(/^([^:]+):\s*(.*)/);if(P){var O=P[1].toLowerCase();O==="set-cookie"?(g.headers[O]===void 0&&(g.headers[O]=[]),g.headers[O].push(P[2])):g.headers[O]!==void 0?g.headers[O]+=", "+P[2]:g.headers[O]=P[2],g.rawHeaders.push(P[1],P[2])}}),g._charset="x-user-defined",!w.overrideMimeType){var C=g.rawHeaders["mime-type"];if(C){var T=C.match(/;\s*charset=([^;])(;|$)/);T&&(g._charset=T[1].toLowerCase())}g._charset||(g._charset="utf-8")}}};l(r,i.Readable),r.prototype._read=function(){var u=this,p=u._resumeFetch;p&&(u._resumeFetch=null,p())},r.prototype._onXHRProgress=function(){var u=this,p=u._xhr,m=null;switch(u._mode){case"text:vbarray":if(p.readyState!==a.DONE)break;try{m=new c.VBArray(p.responseBody).toArray()}catch(d){}if(m!==null){u.push(new S(m));break}case"text":try{m=p.responseText}catch(d){u._mode="text:vbarray";break}if(m.length>u._pos){var b=m.substr(u._pos);if(u._charset==="x-user-defined"){for(var g=new S(b.length),v=0;v<b.length;v++)g[v]=b.charCodeAt(v)&255;u.push(g)}else u.push(b,u._charset);u._pos=m.length}break;case"arraybuffer":if(p.readyState!==a.DONE||!p.response)break;m=p.response,u.push(new S(new Uint8Array(m)));break;case"moz-chunked-arraybuffer":if(m=p.response,p.readyState!==a.LOADING||!m)break;u.push(new S(new Uint8Array(m)));break;case"ms-stream":if(m=p.response,p.readyState!==a.LOADING)break;var n=new c.MSStreamReader;n.onprogress=function(){n.result.byteLength>u._pos&&(u.push(new S(new Uint8Array(n.result.slice(u._pos)))),u._pos=n.result.byteLength)},n.onload=function(){u.push(null)},n.readAsArrayBuffer(m);break}u._xhr.readyState===a.DONE&&u._mode!=="ms-stream"&&u.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,Y,k){"use strict";var L=I("safe-buffer").Buffer,c=L.isEncoding||function(n){n=""+n;switch(n&&n.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function S(n){if(!n)return"utf8";for(var d;;)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(d)return;n=(""+n).toLowerCase(),d=!0}}function R(n){var d=S(n);if(typeof d!="string"&&(L.isEncoding===c||!c(n)))throw new Error("Unknown encoding: "+n);return d||n}k.StringDecoder=f;function f(n){this.encoding=R(n);var d;switch(this.encoding){case"utf16le":this.text=u,this.end=p,d=4;break;case"utf8":this.fillLast=i,d=4;break;case"base64":this.text=m,this.end=b,d=3;break;default:this.write=g,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=L.allocUnsafe(d)}f.prototype.write=function(n){if(n.length===0)return"";var d,h;if(this.lastNeed){if(d=this.fillLast(n),d===void 0)return"";h=this.lastNeed,this.lastNeed=0}else h=0;return h<n.length?d?d+this.text(n,h):this.text(n,h):d||""},f.prototype.end=r,f.prototype.text=a,f.prototype.fillLast=function(n){if(this.lastNeed<=n.length)return n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,n.length),this.lastNeed-=n.length};function s(n){return n<=127?0:n>>5===6?2:n>>4===14?3:n>>3===30?4:n>>6===2?-1:-2}function w(n,d,h){var C=d.length-1;if(C<h)return 0;var T=s(d[C]);return T>=0?(T>0&&(n.lastNeed=T-1),T):--C<h||T===-2?0:(T=s(d[C]),T>=0?(T>0&&(n.lastNeed=T-2),T):--C<h||T===-2?0:(T=s(d[C]),T>=0?(T>0&&(T===2?T=0:n.lastNeed=T-3),T):0))}function l(n,d,h){if((d[0]&192)!==128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&d.length>1){if((d[1]&192)!==128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&d.length>2&&(d[2]&192)!==128)return n.lastNeed=2,"\uFFFD"}}function i(n){var d=this.lastTotal-this.lastNeed,h=l(this,n,d);if(h!==void 0)return h;if(this.lastNeed<=n.length)return n.copy(this.lastChar,d,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,d,0,n.length),this.lastNeed-=n.length}function a(n,d){var h=w(this,n,d);if(!this.lastNeed)return n.toString("utf8",d);this.lastTotal=h;var C=n.length-(h-this.lastNeed);return n.copy(this.lastChar,0,C),n.toString("utf8",d,C)}function r(n){var d=n&&n.length?this.write(n):"";return this.lastNeed?d+"\uFFFD":d}function u(n,d){if((n.length-d)%2===0){var h=n.toString("utf16le",d);if(h){var C=h.charCodeAt(h.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],h.slice(0,-1)}return h}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",d,n.length-1)}function p(n){var d=n&&n.length?this.write(n):"";if(this.lastNeed){var h=this.lastTotal-this.lastNeed;return d+this.lastChar.toString("utf16le",0,h)}return d}function m(n,d){var h=(n.length-d)%3;return h===0?n.toString("base64",d):(this.lastNeed=3-h,this.lastTotal=3,h===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",d,n.length-h))}function b(n){var d=n&&n.length?this.write(n):"";return this.lastNeed?d+this.lastChar.toString("base64",0,3-this.lastNeed):d}function g(n){return n.toString(this.encoding)}function v(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(I,Y,k){(function(L,c){var S=I("process/browser.js").nextTick,R=Function.prototype.apply,f=Array.prototype.slice,s={},w=0;k.setTimeout=function(){return new l(R.call(setTimeout,window,arguments),clearTimeout)},k.setInterval=function(){return new l(R.call(setInterval,window,arguments),clearInterval)},k.clearTimeout=k.clearInterval=function(i){i.close()};function l(i,a){this._id=i,this._clearFn=a}l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},k.enroll=function(i,a){clearTimeout(i._idleTimeoutId),i._idleTimeout=a},k.unenroll=function(i){clearTimeout(i._idleTimeoutId),i._idleTimeout=-1},k._unrefActive=k.active=function(i){clearTimeout(i._idleTimeoutId);var a=i._idleTimeout;a>=0&&(i._idleTimeoutId=setTimeout(function(){i._onTimeout&&i._onTimeout()},a))},k.setImmediate=typeof L=="function"?L:function(i){var a=w++,r=arguments.length<2?!1:f.call(arguments,1);return s[a]=!0,S(function(){s[a]&&(r?i.apply(null,r):i.call(null),k.clearImmediate(a))}),a},k.clearImmediate=typeof c=="function"?c:function(i){delete s[i]}}).call(this,I("timers").setImmediate,I("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(I,Y,k){var L=I("buffer").Buffer;Y.exports=function(c){if(c instanceof Uint8Array){if(c.byteOffset===0&&c.byteLength===c.buffer.byteLength)return c.buffer;if(typeof c.buffer.slice=="function")return c.buffer.slice(c.byteOffset,c.byteOffset+c.byteLength)}if(L.isBuffer(c)){for(var S=new Uint8Array(c.length),R=c.length,f=0;f<R;f++)S[f]=c[f];return S.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(I,Y,k){"use strict";var L=I("punycode"),c=I("./util");k.parse=d,k.resolve=C,k.resolveObject=T,k.format=h,k.Url=S;function S(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var R=/^([a-z0-9.+-]+:)/i,f=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["<",">",'"',"`"," ","\r",`
`," "],l=["{","}","|","\\","^","`"].concat(w),i=["'"].concat(l),a=["%","/","?",";","#"].concat(i),r=["/","?","#"],u=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},n=I("querystring");function d(o,P,O){if(o&&c.isObject(o)&&o instanceof S)return o;var y=new S;return y.parse(o,P,O),y}S.prototype.parse=function(o,P,O){if(!c.isString(o))throw new TypeError("Parameter 'url' must be a string, not "+typeof o);var y=o.indexOf("?"),x=y!==-1&&y<o.indexOf("#")?"?":"#",E=o.split(x),_=/\\/g;E[0]=E[0].replace(_,"/"),o=E.join(x);var N=o;if(N=N.trim(),!O&&o.split("#").length===1){var j=s.exec(N);if(j)return this.path=N,this.href=N,this.pathname=j[1],j[2]?(this.search=j[2],P?this.query=n.parse(this.search.substr(1)):this.query=this.search.substr(1)):P&&(this.search="",this.query={}),this}var M=R.exec(N);if(M){M=M[0];var H=M.toLowerCase();this.protocol=H,N=N.substr(M.length)}if(O||M||N.match(/^\/\/[^@\/]+@[^@\/]+/)){var z=N.substr(0,2)==="//";z&&!(M&&g[M])&&(N=N.substr(2),this.slashes=!0)}if(!g[M]&&(z||M&&!v[M])){for(var F=-1,G=0;G<r.length;G++){var B=N.indexOf(r[G]);B!==-1&&(F===-1||B<F)&&(F=B)}var K,W;F===-1?W=N.lastIndexOf("@"):W=N.lastIndexOf("@",F),W!==-1&&(K=N.slice(0,W),N=N.slice(W+1),this.auth=decodeURIComponent(K)),F=-1;for(var G=0;G<a.length;G++){var B=N.indexOf(a[G]);B!==-1&&(F===-1||B<F)&&(F=B)}F===-1&&(F=N.length),this.host=N.slice(0,F),N=N.slice(F),this.parseHost(),this.hostname=this.hostname||"";var J=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!J)for(var ee=this.hostname.split(/\./),G=0,Z=ee.length;G<Z;G++){var he=ee[G];if(!he)continue;if(!he.match(p)){for(var ge="",ie=0,we=he.length;ie<we;ie++)he.charCodeAt(ie)>127?ge+="x":ge+=he[ie];if(!ge.match(p)){var me=ee.slice(0,G),oe=ee.slice(G+1),se=he.match(m);se&&(me.push(se[1]),oe.unshift(se[2])),oe.length&&(N="/"+oe.join(".")+N),this.hostname=me.join(".");break}}}this.hostname.length>u?this.hostname="":this.hostname=this.hostname.toLowerCase(),J||(this.hostname=L.toASCII(this.hostname));var te=this.port?":"+this.port:"",be=this.hostname||"";this.host=be+te,this.href+=this.host,J&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),N[0]!=="/"&&(N="/"+N))}if(!b[H])for(var G=0,Z=i.length;G<Z;G++){var q=i[G];if(N.indexOf(q)===-1)continue;var ae=encodeURIComponent(q);ae===q&&(ae=escape(q)),N=N.split(q).join(ae)}var xe=N.indexOf("#");xe!==-1&&(this.hash=N.substr(xe),N=N.slice(0,xe));var ne=N.indexOf("?");if(ne!==-1?(this.search=N.substr(ne),this.query=N.substr(ne+1),P&&(this.query=n.parse(this.query)),N=N.slice(0,ne)):P&&(this.search="",this.query={}),N&&(this.pathname=N),v[H]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var te=this.pathname||"",Q=this.search||"";this.path=te+Q}return this.href=this.format(),this};function h(o){return c.isString(o)&&(o=d(o)),o instanceof S?o.format():S.prototype.format.call(o)}S.prototype.format=function(){var o=this.auth||"";o&&(o=encodeURIComponent(o),o=o.replace(/%3A/i,":"),o+="@");var P=this.protocol||"",O=this.pathname||"",y=this.hash||"",x=!1,E="";this.host?x=o+this.host:this.hostname&&(x=o+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(E=n.stringify(this.query));var _=this.search||E&&"?"+E||"";return P&&P.substr(-1)!==":"&&(P+=":"),this.slashes||(!P||v[P])&&x!==!1?(x="//"+(x||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):x||(x=""),y&&y.charAt(0)!=="#"&&(y="#"+y),_&&_.charAt(0)!=="?"&&(_="?"+_),O=O.replace(/[?#]/g,function(N){return encodeURIComponent(N)}),_=_.replace("#","%23"),P+x+O+_+y};function C(o,P){return d(o,!1,!0).resolve(P)}S.prototype.resolve=function(o){return this.resolveObject(d(o,!1,!0)).format()};function T(o,P){return o?d(o,!1,!0).resolveObject(P):P}S.prototype.resolveObject=function(o){if(c.isString(o)){var P=new S;P.parse(o,!1,!0),o=P}for(var O=new S,y=Object.keys(this),x=0;x<y.length;x++){var E=y[x];O[E]=this[E]}if(O.hash=o.hash,o.href==="")return O.href=O.format(),O;if(o.slashes&&!o.protocol){for(var _=Object.keys(o),N=0;N<_.length;N++){var j=_[N];j!=="protocol"&&(O[j]=o[j])}return v[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(o.protocol&&o.protocol!==O.protocol){if(!v[o.protocol]){for(var M=Object.keys(o),H=0;H<M.length;H++){var z=M[H];O[z]=o[z]}return O.href=O.format(),O}if(O.protocol=o.protocol,!o.host&&!g[o.protocol]){for(var Z=(o.pathname||"").split("/");Z.length&&!(o.host=Z.shift()););o.host||(o.host=""),o.hostname||(o.hostname=""),Z[0]!==""&&Z.unshift(""),Z.length<2&&Z.unshift(""),O.pathname=Z.join("/")}else O.pathname=o.pathname;if(O.search=o.search,O.query=o.query,O.host=o.host||"",O.auth=o.auth,O.hostname=o.hostname||o.host,O.port=o.port,O.pathname||O.search){var F=O.pathname||"",G=O.search||"";O.path=F+G}return O.slashes=O.slashes||o.slashes,O.href=O.format(),O}var B=O.pathname&&O.pathname.charAt(0)==="/",K=o.host||o.pathname&&o.pathname.charAt(0)==="/",W=K||B||O.host&&o.pathname,J=W,ee=O.pathname&&O.pathname.split("/")||[],Z=o.pathname&&o.pathname.split("/")||[],he=O.protocol&&!v[O.protocol];if(he&&(O.hostname="",O.port=null,O.host&&(ee[0]===""?ee[0]=O.host:ee.unshift(O.host)),O.host="",o.protocol&&(o.hostname=null,o.port=null,o.host&&(Z[0]===""?Z[0]=o.host:Z.unshift(o.host)),o.host=null),W=W&&(Z[0]===""||ee[0]==="")),K)O.host=o.host||o.host===""?o.host:O.host,O.hostname=o.hostname||o.hostname===""?o.hostname:O.hostname,O.search=o.search,O.query=o.query,ee=Z;else if(Z.length)ee||(ee=[]),ee.pop(),ee=ee.concat(Z),O.search=o.search,O.query=o.query;else if(!c.isNullOrUndefined(o.search)){if(he){O.hostname=O.host=ee.shift();var ge=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;ge&&(O.auth=ge.shift(),O.host=O.hostname=ge.shift())}return O.search=o.search,O.query=o.query,(!c.isNull(O.pathname)||!c.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!ee.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var ie=ee.slice(-1)[0],we=(O.host||o.host||ee.length>1)&&(ie==="."||ie==="..")||ie==="",me=0,oe=ee.length;oe>=0;oe--)ie=ee[oe],ie==="."?ee.splice(oe,1):ie===".."?(ee.splice(oe,1),me++):me&&(ee.splice(oe,1),me--);if(!W&&!J)for(;me--;me)ee.unshift("..");W&&ee[0]!==""&&(!ee[0]||ee[0].charAt(0)!=="/")&&ee.unshift(""),we&&ee.join("/").substr(-1)!=="/"&&ee.push("");var se=ee[0]===""||ee[0]&&ee[0].charAt(0)==="/";if(he){O.hostname=O.host=se?"":ee.length?ee.shift():"";var ge=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;ge&&(O.auth=ge.shift(),O.host=O.hostname=ge.shift())}return W=W||O.host&&ee.length,W&&!se&&ee.unshift(""),ee.length?O.pathname=ee.join("/"):(O.pathname=null,O.path=null),(!c.isNull(O.pathname)||!c.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=o.auth||O.auth,O.slashes=O.slashes||o.slashes,O.href=O.format(),O},S.prototype.parseHost=function(){var o=this.host,P=f.exec(o);P&&(P=P[0],P!==":"&&(this.port=P.substr(1)),o=o.substr(0,o.length-P.length)),o&&(this.hostname=o)}},{"./util":239,punycode:209,querystring:212}],239:[function(I,Y,k){"use strict";Y.exports={isString:function(L){return typeof L=="string"},isObject:function(L){return typeof L=="object"&&L!==null},isNull:function(L){return L===null},isNullOrUndefined:function(L){return L==null}}},{}],240:[function(I,Y,k){(function(L){Y.exports=c;function c(R,f){if(S("noDeprecation"))return R;var s=!1;function w(){if(!s){if(S("throwDeprecation"))throw new Error(f);S("traceDeprecation")?console.trace(f):console.warn(f),s=!0}return R.apply(this,arguments)}return w}function S(R){try{if(!L.localStorage)return!1}catch(s){return!1}var f=L.localStorage[R];return f==null?!1:String(f).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(I,Y,k){typeof Object.create=="function"?Y.exports=function(c,S){c.super_=S,c.prototype=Object.create(S.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}})}:Y.exports=function(c,S){c.super_=S;var R=function(){};R.prototype=S.prototype,c.prototype=new R,c.prototype.constructor=c}},{}],242:[function(I,Y,k){Y.exports=function(c){return c&&typeof c=="object"&&typeof c.copy=="function"&&typeof c.fill=="function"&&typeof c.readUInt8=="function"}},{}],243:[function(I,Y,k){(function(L,c){var S=/%[sdj%]/g;k.format=function(F){if(!C(F)){for(var G=[],B=0;B<arguments.length;B++)G.push(s(arguments[B]));return G.join(" ")}for(var B=1,K=arguments,W=K.length,J=String(F).replace(S,function(Z){if(Z==="%%")return"%";if(B>=W)return Z;switch(Z){case"%s":return String(K[B++]);case"%d":return Number(K[B++]);case"%j":try{return JSON.stringify(K[B++])}catch(he){return"[Circular]"}default:return Z}}),ee=K[B];B<W;ee=K[++B])n(ee)||!O(ee)?J+=" "+ee:J+=" "+s(ee);return J},k.deprecate=function(F,G){if(o(c.process))return function(){return k.deprecate(F,G).apply(this,arguments)};if(L.noDeprecation===!0)return F;var B=!1;function K(){if(!B){if(L.throwDeprecation)throw new Error(G);L.traceDeprecation?console.trace(G):console.error(G),B=!0}return F.apply(this,arguments)}return K};var R={},f;k.debuglog=function(F){if(o(f)&&(f=L.env.NODE_DEBUG||""),F=F.toUpperCase(),!R[F])if(new RegExp("\\b"+F+"\\b","i").test(f)){var G=L.pid;R[F]=function(){var B=k.format.apply(k,arguments);console.error("%s %d: %s",F,G,B)}}else R[F]=function(){};return R[F]};function s(F,G){var B={seen:[],stylize:l};return arguments.length>=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),v(G)?B.showHidden=G:G&&k._extend(B,G),o(B.showHidden)&&(B.showHidden=!1),o(B.depth)&&(B.depth=2),o(B.colors)&&(B.colors=!1),o(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=w),a(B,F,B.depth)}k.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function w(F,G){var B=s.styles[G];return B?"["+s.colors[B][0]+"m"+F+"["+s.colors[B][1]+"m":F}function l(F,G){return F}function i(F){var G={};return F.forEach(function(B,K){G[B]=!0}),G}function a(F,G,B){if(F.customInspect&&G&&E(G.inspect)&&G.inspect!==k.inspect&&!(G.constructor&&G.constructor.prototype===G)){var K=G.inspect(B,F);return C(K)||(K=a(F,K,B)),K}var W=r(F,G);if(W)return W;var J=Object.keys(G),ee=i(J);if(F.showHidden&&(J=Object.getOwnPropertyNames(G)),x(G)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return u(G);if(J.length===0){if(E(G)){var Z=G.name?": "+G.name:"";return F.stylize("[Function"+Z+"]","special")}if(P(G))return F.stylize(RegExp.prototype.toString.call(G),"regexp");if(y(G))return F.stylize(Date.prototype.toString.call(G),"date");if(x(G))return u(G)}var he="",ge=!1,ie=["{","}"];if(g(G)&&(ge=!0,ie=["[","]"]),E(G)){var we=G.name?": "+G.name:"";he=" [Function"+we+"]"}if(P(G)&&(he=" "+RegExp.prototype.toString.call(G)),y(G)&&(he=" "+Date.prototype.toUTCString.call(G)),x(G)&&(he=" "+u(G)),J.length===0&&(!ge||G.length==0))return ie[0]+he+ie[1];if(B<0)return P(G)?F.stylize(RegExp.prototype.toString.call(G),"regexp"):F.stylize("[Object]","special");F.seen.push(G);var me;return ge?me=p(F,G,B,ee,J):me=J.map(function(oe){return m(F,G,B,ee,oe,ge)}),F.seen.pop(),b(me,he,ie)}function r(F,G){if(o(G))return F.stylize("undefined","undefined");if(C(G)){var B="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(B,"string")}if(h(G))return F.stylize(""+G,"number");if(v(G))return F.stylize(""+G,"boolean");if(n(G))return F.stylize("null","null")}function u(F){return"["+Error.prototype.toString.call(F)+"]"}function p(F,G,B,K,W){for(var J=[],ee=0,Z=G.length;ee<Z;++ee)z(G,String(ee))?J.push(m(F,G,B,K,String(ee),!0)):J.push("");return W.forEach(function(he){he.match(/^\d+$/)||J.push(m(F,G,B,K,he,!0))}),J}function m(F,G,B,K,W,J){var ee,Z,he;if(he=Object.getOwnPropertyDescriptor(G,W)||{value:G[W]},he.get?he.set?Z=F.stylize("[Getter/Setter]","special"):Z=F.stylize("[Getter]","special"):he.set&&(Z=F.stylize("[Setter]","special")),z(K,W)||(ee="["+W+"]"),Z||(F.seen.indexOf(he.value)<0?(n(B)?Z=a(F,he.value,null):Z=a(F,he.value,B-1),Z.indexOf(`
`)>-1&&(J?Z=Z.split(`
`).map(function(ge){return" "+ge}).join(`
`).substr(2):Z=`
`+Z.split(`
`).map(function(ge){return" "+ge}).join(`
`))):Z=F.stylize("[Circular]","special")),o(ee)){if(J&&W.match(/^\d+$/))return Z;ee=JSON.stringify(""+W),ee.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ee=ee.substr(1,ee.length-2),ee=F.stylize(ee,"name")):(ee=ee.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ee=F.stylize(ee,"string"))}return ee+": "+Z}function b(F,G,B){var K=0,W=F.reduce(function(J,ee){return K++,ee.indexOf(`
`)>=0&&K++,J+ee.replace(/\u001b\[\d\d?m/g,"").length+1},0);return W>60?B[0]+(G===""?"":G+`
`)+" "+F.join(`,
`)+" "+B[1]:B[0]+G+" "+F.join(", ")+" "+B[1]}function g(F){return Array.isArray(F)}k.isArray=g;function v(F){return typeof F=="boolean"}k.isBoolean=v;function n(F){return F===null}k.isNull=n;function d(F){return F==null}k.isNullOrUndefined=d;function h(F){return typeof F=="number"}k.isNumber=h;function C(F){return typeof F=="string"}k.isString=C;function T(F){return typeof F=="symbol"}k.isSymbol=T;function o(F){return F===void 0}k.isUndefined=o;function P(F){return O(F)&&N(F)==="[object RegExp]"}k.isRegExp=P;function O(F){return typeof F=="object"&&F!==null}k.isObject=O;function y(F){return O(F)&&N(F)==="[object Date]"}k.isDate=y;function x(F){return O(F)&&(N(F)==="[object Error]"||F instanceof Error)}k.isError=x;function E(F){return typeof F=="function"}k.isFunction=E;function _(F){return F===null||typeof F=="boolean"||typeof F=="number"||typeof F=="string"||typeof F=="symbol"||typeof F=="undefined"}k.isPrimitive=_,k.isBuffer=I("./support/isBuffer");function N(F){return Object.prototype.toString.call(F)}function j(F){return F<10?"0"+F.toString(10):F.toString(10)}var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function H(){var F=new Date,G=[j(F.getHours()),j(F.getMinutes()),j(F.getSeconds())].join(":");return[F.getDate(),M[F.getMonth()],G].join(" ")}k.log=function(){console.log("%s - %s",H(),k.format.apply(k,arguments))},k.inherits=I("inherits"),k._extend=function(F,G){if(!G||!O(G))return F;for(var B=Object.keys(G),K=B.length;K--;)F[B[K]]=G[B[K]];return F};function z(F,G){return Object.prototype.hasOwnProperty.call(F,G)}}).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,Y,k){"use strict";(function(){"use strict";k.stripBOM=function(L){return L[0]==="\uFEFF"?L.substring(1):L}}).call(void 0)},{}],245:[function(I,Y,k){"use strict";var L=I("babel-runtime/helpers/typeof"),c=f(L),S=I("babel-runtime/core-js/object/keys"),R=f(S);function f(s){return s&&s.__esModule?s:{default:s}}(function(){"use strict";var s,w,l,i,a,r={}.hasOwnProperty;s=I("xmlbuilder"),w=I("./defaults").defaults,i=function(p){return typeof p=="string"&&(p.indexOf("&")>=0||p.indexOf(">")>=0||p.indexOf("<")>=0)},a=function(p){return"<![CDATA["+l(p)+"]]>"},l=function(p){return p.replace("]]>","]]]]><![CDATA[>")},k.Builder=function(){function u(p){var m,b,g;this.options={},b=w["0.2"];for(m in b){if(!r.call(b,m))continue;g=b[m],this.options[m]=g}for(m in p){if(!r.call(p,m))continue;g=p[m],this.options[m]=g}}return u.prototype.buildObject=function(p){var m,b,g,v,n;return m=this.options.attrkey,b=this.options.charkey,(0,R.default)(p).length===1&&this.options.rootName===w["0.2"].rootName?(n=(0,R.default)(p)[0],p=p[n]):n=this.options.rootName,g=function(d){return function(h,C){var T,o,P,O,y,x;if((typeof C=="undefined"?"undefined":(0,c.default)(C))!=="object")d.options.cdata&&i(C)?h.raw(a(C)):h.txt(C);else if(Array.isArray(C))for(O in C){if(!r.call(C,O))continue;o=C[O];for(y in o)P=o[y],h=g(h.ele(y),P).up()}else for(y in C){if(!r.call(C,y))continue;if(o=C[y],y===m){if((typeof o=="undefined"?"undefined":(0,c.default)(o))==="object")for(T in o)x=o[T],h=h.att(T,x)}else if(y===b)d.options.cdata&&i(o)?h=h.raw(a(o)):h=h.txt(o);else if(Array.isArray(o))for(O in o){if(!r.call(o,O))continue;P=o[O],typeof P=="string"?d.options.cdata&&i(P)?h=h.ele(y).raw(a(P)).up():h=h.ele(y,P).up():h=g(h.ele(y),P).up()}else(typeof o=="undefined"?"undefined":(0,c.default)(o))==="object"?h=g(h.ele(y),o).up():typeof o=="string"&&d.options.cdata&&i(o)?h=h.ele(y).raw(a(o)).up():(o==null&&(o=""),h=h.ele(y,o.toString()).up())}return h}}(this),v=s.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),g(v,p).end(this.options.renderOpts)},u}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(I,Y,k){"use strict";(function(){k.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/promise"),c=i(L),S=I("babel-runtime/core-js/object/get-own-property-names"),R=i(S),f=I("babel-runtime/core-js/object/keys"),s=i(f),w=I("babel-runtime/helpers/typeof"),l=i(w);function i(a){return a&&a.__esModule?a:{default:a}}(function(){"use strict";var a,r,u,p,m,b,g,v,n=function(T,o){return function(){return T.apply(o,arguments)}},d=function(T,o){for(var P in o)h.call(o,P)&&(T[P]=o[P]);function O(){this.constructor=T}return O.prototype=o.prototype,T.prototype=new O,T.__super__=o.prototype,T},h={}.hasOwnProperty;g=I("sax"),u=I("events"),a=I("./bom"),b=I("./processors"),v=I("timers").setImmediate,r=I("./defaults").defaults,p=function(T){return(typeof T=="undefined"?"undefined":(0,l.default)(T))==="object"&&T!=null&&(0,s.default)(T).length===0},m=function(T,o,P){var O,y,x;for(O=0,y=T.length;O<y;O++)x=T[O],o=x(o,P);return o},k.Parser=function(C){d(T,C);function T(o){this.parseStringPromise=n(this.parseStringPromise,this),this.parseString=n(this.parseString,this),this.reset=n(this.reset,this),this.assignOrPush=n(this.assignOrPush,this),this.processAsync=n(this.processAsync,this);var P,O,y;if(!(this instanceof k.Parser))return new k.Parser(o);this.options={},O=r["0.2"];for(P in O){if(!h.call(O,P))continue;y=O[P],this.options[P]=y}for(P in o){if(!h.call(o,P))continue;y=o[P],this.options[P]=y}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(b.normalize)),this.reset()}return T.prototype.processAsync=function(){var o,P;try{return this.remaining.length<=this.options.chunkSize?(o=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(o),this.saxParser.close()):(o=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(o),v(this.processAsync))}catch(O){if(P=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(P)}},T.prototype.assignOrPush=function(o,P,O){return P in o?(o[P]instanceof Array||(o[P]=[o[P]]),o[P].push(O)):this.options.explicitArray?o[P]=[O]:o[P]=O},T.prototype.reset=function(){var o,P,O,y;return this.removeAllListeners(),this.saxParser=g.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(x){return function(E){if(x.saxParser.resume(),!x.saxParser.errThrown)return x.saxParser.errThrown=!0,x.emit("error",E)}}(this),this.saxParser.onend=function(x){return function(){if(!x.saxParser.ended)return x.saxParser.ended=!0,x.emit("end",x.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,y=[],o=this.options.attrkey,P=this.options.charkey,this.saxParser.onopentag=function(x){return function(E){var _,N,j,M,H;if(j={},j[P]="",!x.options.ignoreAttrs){H=E.attributes;for(_ in H){if(!h.call(H,_))continue;!(o in j)&&!x.options.mergeAttrs&&(j[o]={}),N=x.options.attrValueProcessors?m(x.options.attrValueProcessors,E.attributes[_],_):E.attributes[_],M=x.options.attrNameProcessors?m(x.options.attrNameProcessors,_):_,x.options.mergeAttrs?x.assignOrPush(j,M,N):j[o][M]=N}}return j["#name"]=x.options.tagNameProcessors?m(x.options.tagNameProcessors,E.name):E.name,x.options.xmlns&&(j[x.options.xmlnskey]={uri:E.uri,local:E.local}),y.push(j)}}(this),this.saxParser.onclosetag=function(x){return function(){var E,_,N,j,M,H,z,F,G,B;if(H=y.pop(),M=H["#name"],(!x.options.explicitChildren||!x.options.preserveChildrenOrder)&&delete H["#name"],H.cdata===!0&&(E=H.cdata,delete H.cdata),G=y[y.length-1],H[P].match(/^\s*$/)&&!E?(_=H[P],delete H[P]):(x.options.trim&&(H[P]=H[P].trim()),x.options.normalize&&(H[P]=H[P].replace(/\s{2,}/g," ").trim()),H[P]=x.options.valueProcessors?m(x.options.valueProcessors,H[P],M):H[P],(0,s.default)(H).length===1&&P in H&&!x.EXPLICIT_CHARKEY&&(H=H[P])),p(H)&&(H=x.options.emptyTag!==""?x.options.emptyTag:_),x.options.validator!=null&&(B="/"+function(){var K,W,J;for(J=[],K=0,W=y.length;K<W;K++)j=y[K],J.push(j["#name"]);return J}().concat(M).join("/"),function(){var K;try{return H=x.options.validator(B,G&&G[M],H)}catch(W){return K=W,x.emit("error",K)}}()),x.options.explicitChildren&&!x.options.mergeAttrs&&(typeof H=="undefined"?"undefined":(0,l.default)(H))==="object"){if(!x.options.preserveChildrenOrder)j={},x.options.attrkey in H&&(j[x.options.attrkey]=H[x.options.attrkey],delete H[x.options.attrkey]),!x.options.charsAsChildren&&x.options.charkey in H&&(j[x.options.charkey]=H[x.options.charkey],delete H[x.options.charkey]),(0,R.default)(H).length>0&&(j[x.options.childkey]=H),H=j;else if(G){G[x.options.childkey]=G[x.options.childkey]||[],z={};for(N in H){if(!h.call(H,N))continue;z[N]=H[N]}G[x.options.childkey].push(z),delete H["#name"],(0,s.default)(H).length===1&&P in H&&!x.EXPLICIT_CHARKEY&&(H=H[P])}}return y.length>0?x.assignOrPush(G,M,H):(x.options.explicitRoot&&(F=H,H={},H[M]=F),x.resultObject=H,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),O=function(x){return function(E){var _,N;if(N=y[y.length-1],N)return N[P]+=E,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||E.replace(/\\n/g,"").trim()!=="")&&(N[x.options.childkey]=N[x.options.childkey]||[],_={"#name":"__text__"},_[P]=E,x.options.normalize&&(_[P]=_[P].replace(/\s{2,}/g," ").trim()),N[x.options.childkey].push(_)),N}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(x){return function(E){var _;if(_=O(E),_)return _.cdata=!0}}(this)},T.prototype.parseString=function(o,P){var O;P!=null&&typeof P=="function"&&(this.on("end",function(y){return this.reset(),P(null,y)}),this.on("error",function(y){return this.reset(),P(y)}));try{return o=o.toString(),o.trim()===""?(this.emit("end",null),!0):(o=a.stripBOM(o),this.options.async?(this.remaining=o,v(this.processAsync),this.saxParser):this.saxParser.write(o).close())}catch(y){if(O=y,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},T.prototype.parseStringPromise=function(o){return new c.default(function(P){return function(O,y){return P.parseString(o,function(x,E){return x?y(x):O(E)})}}(this))},T}(u),k.parseString=function(C,T,o){var P,O,y;return o!=null?(typeof o=="function"&&(P=o),(typeof T=="undefined"?"undefined":(0,l.default)(T))==="object"&&(O=T)):(typeof T=="function"&&(P=T),O={}),y=new k.Parser(O),y.parseString(C,P)},k.parseStringPromise=function(C,T){var o,P;return(typeof T=="undefined"?"undefined":(0,l.default)(T))==="object"&&(o=T),P=new k.Parser(o),P.parseStringPromise(C)}}).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,Y,k){"use strict";(function(){"use strict";var L;L=new RegExp(/(?!xmlns)^.*:/),k.normalize=function(c){return c.toLowerCase()},k.firstCharLowerCase=function(c){return c.charAt(0).toLowerCase()+c.slice(1)},k.stripPrefix=function(c){return c.replace(L,"")},k.parseNumbers=function(c){return isNaN(c)||(c=c%1===0?parseInt(c,10):parseFloat(c)),c},k.parseBooleans=function(c){return/^(?:true|false)$/i.test(c)&&(c=c.toLowerCase()==="true"),c}}).call(void 0)},{}],249:[function(I,Y,k){"use strict";(function(){"use strict";var L,c,S,R,f=function(l,i){for(var a in i)s.call(i,a)&&(l[a]=i[a]);function r(){this.constructor=l}return r.prototype=i.prototype,l.prototype=new r,l.__super__=i.prototype,l},s={}.hasOwnProperty;c=I("./defaults"),L=I("./builder"),S=I("./parser"),R=I("./processors"),k.defaults=c.defaults,k.processors=R,k.ValidationError=function(w){f(l,w);function l(i){this.message=i}return l}(Error),k.Builder=L.Builder,k.Parser=S.Parser,k.parseString=S.parseString,k.parseStringPromise=S.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(I,Y,k){"use strict";(function(){Y.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(I,Y,k){"use strict";(function(){Y.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/get-prototype-of"),c=w(L),S=I("babel-runtime/helpers/typeof"),R=w(S),f=I("babel-runtime/core-js/object/assign"),s=w(f);function w(l){return l&&l.__esModule?l:{default:l}}(function(){var l,i,a,r,u,p,m,b=[].slice,g={}.hasOwnProperty;l=function(){var n,d,h,C,T,o;if(o=arguments[0],T=2<=arguments.length?b.call(arguments,1):[],u(s.default))s.default.apply(null,arguments);else for(n=0,h=T.length;n<h;n++)if(C=T[n],C!=null)for(d in C){if(!g.call(C,d))continue;o[d]=C[d]}return o},u=function(n){return!!n&&Object.prototype.toString.call(n)==="[object Function]"},p=function(n){var d;return!!n&&((d=typeof n=="undefined"?"undefined":(0,R.default)(n))==="function"||d==="object")},a=function(n){return u(Array.isArray)?Array.isArray(n):Object.prototype.toString.call(n)==="[object Array]"},r=function(n){var d;if(a(n))return!n.length;for(d in n){if(!g.call(n,d))continue;return!1}return!0},m=function(n){var d,h;return p(n)&&(h=(0,c.default)(n))&&(d=h.constructor)&&typeof d=="function"&&d instanceof d&&Function.prototype.toString.call(d)===Function.prototype.toString.call(Object)},i=function(n){return u(n.valueOf)?n.valueOf():n},Y.exports.assign=l,Y.exports.isFunction=u,Y.exports.isObject=p,Y.exports.isArray=a,Y.exports.isEmpty=r,Y.exports.isPlainObject=m,Y.exports.getValue=i}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(I,Y,k){"use strict";(function(){Y.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,f,s;R=I("./NodeType"),s=I("./XMLNode"),Y.exports=f=function(){function w(l,i,a){if(this.parent=l,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),i==null)throw new Error("Missing attribute name. "+this.debugInfo(i));this.name=this.stringify.name(i),this.value=this.stringify.attValue(a),this.type=R.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(w.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(w.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(w.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(w.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(w.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(w.prototype,"specified",{get:function(){return!0}}),w.prototype.clone=function(){return(0,c.default)(this)},w.prototype.toString=function(l){return this.options.writer.attribute(this,this.options.writer.filterOptions(l))},w.prototype.debugInfo=function(l){return l=l||this.name,l==null?"parent: <"+this.parent.name+">":"attribute: {"+l+"}, parent: <"+this.parent.name+">"},w.prototype.isEqualNode=function(l){return l.namespaceURI!==this.namespaceURI||(l.prefix!==this.prefix||l.localName!==this.localName)?!1:!(l.value!==this.value)},w}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,f,s,w=function(a,r){for(var u in r)l.call(r,u)&&(a[u]=r[u]);function p(){this.constructor=a}return p.prototype=r.prototype,a.prototype=new p,a.__super__=r.prototype,a},l={}.hasOwnProperty;R=I("./NodeType"),s=I("./XMLCharacterData"),Y.exports=f=function(i){w(a,i);function a(r,u){if(a.__super__.constructor.call(this,r),u==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=R.CData,this.value=this.stringify.cdata(u)}return a.prototype.clone=function(){return(0,c.default)(this)},a.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},a}(s)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,f,s=function(i,a){for(var r in a)w.call(a,r)&&(i[r]=a[r]);function u(){this.constructor=i}return u.prototype=a.prototype,i.prototype=new u,i.__super__=a.prototype,i},w={}.hasOwnProperty;f=I("./XMLNode"),Y.exports=R=function(l){s(i,l);function i(a){i.__super__.constructor.call(this,a),this.value=""}return Object.defineProperty(i.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(i.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(i.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),i.prototype.clone=function(){return(0,c.default)(this)},i.prototype.substringData=function(a,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.appendData=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.insertData=function(a,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.deleteData=function(a,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceData=function(a,r,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.isEqualNode=function(a){return i.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)?!(a.data!==this.data):!1},i}(f)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,f,s,w=function(a,r){for(var u in r)l.call(r,u)&&(a[u]=r[u]);function p(){this.constructor=a}return p.prototype=r.prototype,a.prototype=new p,a.__super__=r.prototype,a},l={}.hasOwnProperty;R=I("./NodeType"),f=I("./XMLCharacterData"),Y.exports=s=function(i){w(a,i);function a(r,u){if(a.__super__.constructor.call(this,r),u==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=R.Comment,this.value=this.stringify.comment(u)}return a.prototype.clone=function(){return(0,c.default)(this)},a.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},a}(f)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/keys"),c=f(L),S=I("babel-runtime/core-js/object/create"),R=f(S);function f(s){return s&&s.__esModule?s:{default:s}}(function(){var s,w,l;w=I("./XMLDOMErrorHandler"),l=I("./XMLDOMStringList"),Y.exports=s=function(){function i(){var a;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new w,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=a=(0,R.default)(this.defaultParams)}return Object.defineProperty(i.prototype,"parameterNames",{get:function(){return new l((0,c.default)(this.defaultParams))}}),i.prototype.getParameter=function(a){return this.params.hasOwnProperty(a)?this.params[a]:null},i.prototype.canSetParameter=function(a,r){return!0},i.prototype.setParameter=function(a,r){return r!=null?this.params[a]=r:delete this.params[a]},i}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(I,Y,k){"use strict";(function(){var L;Y.exports=L=function(){function c(){}return c.prototype.handleError=function(S){throw new Error(S)},c}()}).call(void 0)},{}],260:[function(I,Y,k){"use strict";(function(){var L;Y.exports=L=function(){function c(){}return c.prototype.hasFeature=function(S,R){return!0},c.prototype.createDocumentType=function(S,R,f){throw new Error("This DOM method is not implemented.")},c.prototype.createDocument=function(S,R,f){throw new Error("This DOM method is not implemented.")},c.prototype.createHTMLDocument=function(S){throw new Error("This DOM method is not implemented.")},c.prototype.getFeature=function(S,R){throw new Error("This DOM method is not implemented.")},c}()}).call(void 0)},{}],261:[function(I,Y,k){"use strict";(function(){var L;Y.exports=L=function(){function c(S){this.arr=S||[]}return Object.defineProperty(c.prototype,"length",{get:function(){return this.arr.length}}),c.prototype.item=function(S){return this.arr[S]||null},c.prototype.contains=function(S){return this.arr.indexOf(S)!==-1},c}()}).call(void 0)},{}],262:[function(I,Y,k){"use strict";(function(){var L,c,S,R=function(w,l){for(var i in l)f.call(l,i)&&(w[i]=l[i]);function a(){this.constructor=w}return a.prototype=l.prototype,w.prototype=new a,w.__super__=l.prototype,w},f={}.hasOwnProperty;S=I("./XMLNode"),L=I("./NodeType"),Y.exports=c=function(s){R(w,s);function w(l,i,a,r,u,p){if(w.__super__.constructor.call(this,l),i==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(a==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(i));if(!r)throw new Error("Missing DTD attribute type. "+this.debugInfo(i));if(!u)throw new Error("Missing DTD attribute default. "+this.debugInfo(i));if(u.indexOf("#")!==0&&(u="#"+u),!u.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(i));if(p&&!u.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(i));this.elementName=this.stringify.name(i),this.type=L.AttributeDeclaration,this.attributeName=this.stringify.name(a),this.attributeType=this.stringify.dtdAttType(r),p&&(this.defaultValue=this.stringify.dtdAttDefault(p)),this.defaultValueType=u}return w.prototype.toString=function(l){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(l))},w}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(I,Y,k){"use strict";(function(){var L,c,S,R=function(w,l){for(var i in l)f.call(l,i)&&(w[i]=l[i]);function a(){this.constructor=w}return a.prototype=l.prototype,w.prototype=new a,w.__super__=l.prototype,w},f={}.hasOwnProperty;S=I("./XMLNode"),L=I("./NodeType"),Y.exports=c=function(s){R(w,s);function w(l,i,a){if(w.__super__.constructor.call(this,l),i==null)throw new Error("Missing DTD element name. "+this.debugInfo());a||(a="(#PCDATA)"),Array.isArray(a)&&(a="("+a.join(",")+")"),this.name=this.stringify.name(i),this.type=L.ElementDeclaration,this.value=this.stringify.dtdElementValue(a)}return w.prototype.toString=function(l){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(l))},w}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(I,Y,k){"use strict";(function(){var L,c,S,R,f=function(l,i){for(var a in i)s.call(i,a)&&(l[a]=i[a]);function r(){this.constructor=l}return r.prototype=i.prototype,l.prototype=new r,l.__super__=i.prototype,l},s={}.hasOwnProperty;R=I("./Utility").isObject,S=I("./XMLNode"),L=I("./NodeType"),Y.exports=c=function(w){f(l,w);function l(i,a,r,u){if(l.__super__.constructor.call(this,i),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(u==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!a,this.name=this.stringify.name(r),this.type=L.EntityDeclaration,!R(u))this.value=this.stringify.dtdEntityValue(u),this.internal=!0;else{if(!u.pubID&&!u.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(u.pubID&&!u.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,u.pubID!=null&&(this.pubID=this.stringify.dtdPubID(u.pubID)),u.sysID!=null&&(this.sysID=this.stringify.dtdSysID(u.sysID)),u.nData!=null&&(this.nData=this.stringify.dtdNData(u.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}}return Object.defineProperty(l.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(l.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(l.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(l.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"xmlVersion",{get:function(){return null}}),l.prototype.toString=function(i){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(i))},l}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(I,Y,k){"use strict";(function(){var L,c,S,R=function(w,l){for(var i in l)f.call(l,i)&&(w[i]=l[i]);function a(){this.constructor=w}return a.prototype=l.prototype,w.prototype=new a,w.__super__=l.prototype,w},f={}.hasOwnProperty;S=I("./XMLNode"),L=I("./NodeType"),Y.exports=c=function(s){R(w,s);function w(l,i,a){if(w.__super__.constructor.call(this,l),i==null)throw new Error("Missing DTD notation name. "+this.debugInfo(i));if(!a.pubID&&!a.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(i));this.name=this.stringify.name(i),this.type=L.NotationDeclaration,a.pubID!=null&&(this.pubID=this.stringify.dtdPubID(a.pubID)),a.sysID!=null&&(this.sysID=this.stringify.dtdSysID(a.sysID))}return Object.defineProperty(w.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(w.prototype,"systemId",{get:function(){return this.sysID}}),w.prototype.toString=function(l){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(l))},w}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(I,Y,k){"use strict";(function(){var L,c,S,R,f=function(l,i){for(var a in i)s.call(i,a)&&(l[a]=i[a]);function r(){this.constructor=l}return r.prototype=i.prototype,l.prototype=new r,l.__super__=i.prototype,l},s={}.hasOwnProperty;R=I("./Utility").isObject,S=I("./XMLNode"),L=I("./NodeType"),Y.exports=c=function(w){f(l,w);function l(i,a,r,u){var p;l.__super__.constructor.call(this,i),R(a)&&(p=a,a=p.version,r=p.encoding,u=p.standalone),a||(a="1.0"),this.type=L.Declaration,this.version=this.stringify.xmlVersion(a),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),u!=null&&(this.standalone=this.stringify.xmlStandalone(u))}return l.prototype.toString=function(i){return this.options.writer.declaration(this,this.options.writer.filterOptions(i))},l}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(I,Y,k){"use strict";(function(){var L,c,S,R,f,s,w,l,i,a=function(p,m){for(var b in m)r.call(m,b)&&(p[b]=m[b]);function g(){this.constructor=p}return g.prototype=m.prototype,p.prototype=new g,p.__super__=m.prototype,p},r={}.hasOwnProperty;i=I("./Utility").isObject,l=I("./XMLNode"),L=I("./NodeType"),c=I("./XMLDTDAttList"),R=I("./XMLDTDEntity"),S=I("./XMLDTDElement"),f=I("./XMLDTDNotation"),w=I("./XMLNamedNodeMap"),Y.exports=s=function(u){a(p,u);function p(m,b,g){var v,n,d,h,C,T;if(p.__super__.constructor.call(this,m),this.type=L.DocType,m.children){for(h=m.children,n=0,d=h.length;n<d;n++)if(v=h[n],v.type===L.Element){this.name=v.name;break}}this.documentObject=m,i(b)&&(C=b,b=C.pubID,g=C.sysID),g==null&&(T=[b,g],g=T[0],b=T[1]),b!=null&&(this.pubID=this.stringify.dtdPubID(b)),g!=null&&(this.sysID=this.stringify.dtdSysID(g))}return Object.defineProperty(p.prototype,"entities",{get:function(){var b,g,v,n,d;for(n={},d=this.children,g=0,v=d.length;g<v;g++)b=d[g],b.type===L.EntityDeclaration&&!b.pe&&(n[b.name]=b);return new w(n)}}),Object.defineProperty(p.prototype,"notations",{get:function(){var b,g,v,n,d;for(n={},d=this.children,g=0,v=d.length;g<v;g++)b=d[g],b.type===L.NotationDeclaration&&(n[b.name]=b);return new w(n)}}),Object.defineProperty(p.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(p.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(p.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),p.prototype.element=function(m,b){var g;return g=new S(this,m,b),this.children.push(g),this},p.prototype.attList=function(m,b,g,v,n){var d;return d=new c(this,m,b,g,v,n),this.children.push(d),this},p.prototype.entity=function(m,b){var g;return g=new R(this,!1,m,b),this.children.push(g),this},p.prototype.pEntity=function(m,b){var g;return g=new R(this,!0,m,b),this.children.push(g),this},p.prototype.notation=function(m,b){var g;return g=new f(this,m,b),this.children.push(g),this},p.prototype.toString=function(m){return this.options.writer.docType(this,this.options.writer.filterOptions(m))},p.prototype.ele=function(m,b){return this.element(m,b)},p.prototype.att=function(m,b,g,v,n){return this.attList(m,b,g,v,n)},p.prototype.ent=function(m,b){return this.entity(m,b)},p.prototype.pent=function(m,b){return this.pEntity(m,b)},p.prototype.not=function(m,b){return this.notation(m,b)},p.prototype.up=function(){return this.root()||this.documentObject},p.prototype.isEqualNode=function(m){return p.__super__.isEqualNode.apply(this,arguments).isEqualNode(m)?m.name!==this.name||m.publicId!==this.publicId?!1:!(m.systemId!==this.systemId):!1},p}(l)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(I,Y,k){"use strict";(function(){var L,c,S,R,f,s,w,l,i=function(u,p){for(var m in p)a.call(p,m)&&(u[m]=p[m]);function b(){this.constructor=u}return b.prototype=p.prototype,u.prototype=new b,u.__super__=p.prototype,u},a={}.hasOwnProperty;l=I("./Utility").isPlainObject,S=I("./XMLDOMImplementation"),c=I("./XMLDOMConfiguration"),f=I("./XMLNode"),L=I("./NodeType"),w=I("./XMLStringifier"),s=I("./XMLStringWriter"),Y.exports=R=function(r){i(u,r);function u(p){u.__super__.constructor.call(this,null),this.name="#document",this.type=L.Document,this.documentURI=null,this.domConfig=new c,p||(p={}),p.writer||(p.writer=new s),this.options=p,this.stringify=new w(p)}return Object.defineProperty(u.prototype,"implementation",{value:new S}),Object.defineProperty(u.prototype,"doctype",{get:function(){var m,b,g,v;for(v=this.children,b=0,g=v.length;b<g;b++)if(m=v[b],m.type===L.DocType)return m;return null}}),Object.defineProperty(u.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(u.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(u.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(u.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].encoding:null}}),Object.defineProperty(u.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(u.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(u.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(u.prototype,"origin",{get:function(){return null}}),Object.defineProperty(u.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(u.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(u.prototype,"contentType",{get:function(){return null}}),u.prototype.end=function(p){var m;return m={},p?l(p)&&(m=p,p=this.options.writer):p=this.options.writer,p.document(this,p.filterOptions(m))},u.prototype.toString=function(p){return this.options.writer.document(this,this.options.writer.filterOptions(p))},u.prototype.createElement=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createTextNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createComment=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createCDATASection=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createProcessingInstruction=function(p,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createAttribute=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createEntityReference=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByTagName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.importNode=function(p,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createElementNS=function(p,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createAttributeNS=function(p,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByTagNameNS=function(p,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementById=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.adoptNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.renameNode=function(p,m,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByClassName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createEvent=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createNodeIterator=function(p,m,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createTreeWalker=function(p,m,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},u}(f)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(I,Y,k){"use strict";(function(){var L,c,S,R,f,s,w,l,i,a,r,u,p,m,b,g,v,n,d,h,C,T,o,P,O={}.hasOwnProperty;P=I("./Utility"),T=P.isObject,C=P.isFunction,o=P.isPlainObject,h=P.getValue,L=I("./NodeType"),u=I("./XMLDocument"),m=I("./XMLElement"),R=I("./XMLCData"),f=I("./XMLComment"),g=I("./XMLRaw"),d=I("./XMLText"),b=I("./XMLProcessingInstruction"),a=I("./XMLDeclaration"),r=I("./XMLDocType"),s=I("./XMLDTDAttList"),l=I("./XMLDTDEntity"),w=I("./XMLDTDElement"),i=I("./XMLDTDNotation"),S=I("./XMLAttribute"),n=I("./XMLStringifier"),v=I("./XMLStringWriter"),c=I("./WriterState"),Y.exports=p=function(){function y(x,E,_){var N;this.name="?xml",this.type=L.Document,x||(x={}),N={},x.writer?o(x.writer)&&(N=x.writer,x.writer=new v):x.writer=new v,this.options=x,this.writer=x.writer,this.writerOptions=this.writer.filterOptions(N),this.stringify=new n(x),this.onDataCallback=E||function(){},this.onEndCallback=_||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return y.prototype.createChildNode=function(x){var E,_,N,j,M,H,z,F;switch(x.type){case L.CData:this.cdata(x.value);break;case L.Comment:this.comment(x.value);break;case L.Element:N={},z=x.attribs;for(_ in z){if(!O.call(z,_))continue;E=z[_],N[_]=E.value}this.node(x.name,N);break;case L.Dummy:this.dummy();break;case L.Raw:this.raw(x.value);break;case L.Text:this.text(x.value);break;case L.ProcessingInstruction:this.instruction(x.target,x.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+x.constructor.name)}for(F=x.children,M=0,H=F.length;M<H;M++)j=F[M],this.createChildNode(j),j.type===L.Element&&this.up();return this},y.prototype.dummy=function(){return this},y.prototype.node=function(x,E,_){var N;if(x==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(x));return this.openCurrent(),x=h(x),E==null&&(E={}),E=h(E),T(E)||(N=[E,_],_=N[0],E=N[1]),this.currentNode=new m(this,x,E),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,_!=null&&this.text(_),this},y.prototype.element=function(x,E,_){var N,j,M,H,z,F;if(this.currentNode&&this.currentNode.type===L.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(x)||T(x)||C(x))for(H=this.options.noValidation,this.options.noValidation=!0,F=new u(this.options).element("TEMP_ROOT"),F.element(x),this.options.noValidation=H,z=F.children,j=0,M=z.length;j<M;j++)N=z[j],this.createChildNode(N),N.type===L.Element&&this.up();else this.node(x,E,_);return this},y.prototype.attribute=function(x,E){var _,N;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(x));if(x!=null&&(x=h(x)),T(x))for(_ in x){if(!O.call(x,_))continue;N=x[_],this.attribute(_,N)}else C(E)&&(E=E.apply()),this.options.keepNullAttributes&&E==null?this.currentNode.attribs[x]=new S(this,x,""):E!=null&&(this.currentNode.attribs[x]=new S(this,x,E));return this},y.prototype.text=function(x){var E;return this.openCurrent(),E=new d(this,x),this.onData(this.writer.text(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.cdata=function(x){var E;return this.openCurrent(),E=new R(this,x),this.onData(this.writer.cdata(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.comment=function(x){var E;return this.openCurrent(),E=new f(this,x),this.onData(this.writer.comment(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.raw=function(x){var E;return this.openCurrent(),E=new g(this,x),this.onData(this.writer.raw(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.instruction=function(x,E){var _,N,j,M,H;if(this.openCurrent(),x!=null&&(x=h(x)),E!=null&&(E=h(E)),Array.isArray(x))for(_=0,M=x.length;_<M;_++)N=x[_],this.instruction(N);else if(T(x))for(N in x){if(!O.call(x,N))continue;j=x[N],this.instruction(N,j)}else C(E)&&(E=E.apply()),H=new b(this,x,E),this.onData(this.writer.processingInstruction(H,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},y.prototype.declaration=function(x,E,_){var N;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return N=new a(this,x,E,_),this.onData(this.writer.declaration(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.doctype=function(x,E,_){if(this.openCurrent(),x==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new r(this,E,_),this.currentNode.rootNodeName=x,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},y.prototype.dtdElement=function(x,E){var _;return this.openCurrent(),_=new w(this,x,E),this.onData(this.writer.dtdElement(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.attList=function(x,E,_,N,j){var M;return this.openCurrent(),M=new s(this,x,E,_,N,j),this.onData(this.writer.dtdAttList(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.entity=function(x,E){var _;return this.openCurrent(),_=new l(this,!1,x,E),this.onData(this.writer.dtdEntity(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.pEntity=function(x,E){var _;return this.openCurrent(),_=new l(this,!0,x,E),this.onData(this.writer.dtdEntity(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.notation=function(x,E){var _;return this.openCurrent(),_=new i(this,x,E),this.onData(this.writer.dtdNotation(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},y.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},y.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},y.prototype.openNode=function(x){var E,_,N,j;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===L.Element&&(this.root=x),_="",x.type===L.Element){this.writerOptions.state=c.OpenTag,_=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,j=x.attribs;for(N in j){if(!O.call(j,N))continue;E=j[N],_+=this.writer.attribute(E,this.writerOptions,this.currentLevel)}_+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=c.InsideTag}else this.writerOptions.state=c.OpenTag,_=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+x.rootNodeName,x.pubID&&x.sysID?_+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(_+=' SYSTEM "'+x.sysID+'"'),x.children?(_+=" [",this.writerOptions.state=c.InsideTag):(this.writerOptions.state=c.CloseTag,_+=">"),_+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(_,this.currentLevel),x.isOpen=!0}},y.prototype.closeNode=function(x){var E;if(!x.isClosed)return E="",this.writerOptions.state=c.CloseTag,x.type===L.Element?E=this.writer.indent(x,this.writerOptions,this.currentLevel)+"</"+x.name+">"+this.writer.endline(x,this.writerOptions,this.currentLevel):E=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=c.None,this.onData(E,this.currentLevel),x.isClosed=!0},y.prototype.onData=function(x,E){return this.documentStarted=!0,this.onDataCallback(x,E+1)},y.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},y.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},y.prototype.ele=function(){return this.element.apply(this,arguments)},y.prototype.nod=function(x,E,_){return this.node(x,E,_)},y.prototype.txt=function(x){return this.text(x)},y.prototype.dat=function(x){return this.cdata(x)},y.prototype.com=function(x){return this.comment(x)},y.prototype.ins=function(x,E){return this.instruction(x,E)},y.prototype.dec=function(x,E,_){return this.declaration(x,E,_)},y.prototype.dtd=function(x,E,_){return this.doctype(x,E,_)},y.prototype.e=function(x,E,_){return this.element(x,E,_)},y.prototype.n=function(x,E,_){return this.node(x,E,_)},y.prototype.t=function(x){return this.text(x)},y.prototype.d=function(x){return this.cdata(x)},y.prototype.c=function(x){return this.comment(x)},y.prototype.r=function(x){return this.raw(x)},y.prototype.i=function(x,E){return this.instruction(x,E)},y.prototype.att=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.a=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.ent=function(x,E){return this.entity(x,E)},y.prototype.pent=function(x,E){return this.pEntity(x,E)},y.prototype.not=function(x,E){return this.notation(x,E)},y}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,f,s,w=function(a,r){for(var u in r)l.call(r,u)&&(a[u]=r[u]);function p(){this.constructor=a}return p.prototype=r.prototype,a.prototype=new p,a.__super__=r.prototype,a},l={}.hasOwnProperty;s=I("./XMLNode"),R=I("./NodeType"),Y.exports=f=function(i){w(a,i);function a(r){a.__super__.constructor.call(this,r),this.type=R.Dummy}return a.prototype.clone=function(){return(0,c.default)(this)},a.prototype.toString=function(r){return""},a}(s)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,f,s,w,l,i,a,r,u,p=function(g,v){for(var n in v)m.call(v,n)&&(g[n]=v[n]);function d(){this.constructor=g}return d.prototype=v.prototype,g.prototype=new d,g.__super__=v.prototype,g},m={}.hasOwnProperty;u=I("./Utility"),r=u.isObject,a=u.isFunction,i=u.getValue,l=I("./XMLNode"),R=I("./NodeType"),f=I("./XMLAttribute"),w=I("./XMLNamedNodeMap"),Y.exports=s=function(b){p(g,b);function g(v,n,d){var h,C,T,o;if(g.__super__.constructor.call(this,v),n==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=R.Element,this.attribs={},this.schemaTypeInfo=null,d!=null&&this.attribute(d),v.type===R.Document&&(this.isRoot=!0,this.documentObject=v,v.rootObject=this,v.children)){for(o=v.children,C=0,T=o.length;C<T;C++)if(h=o[C],h.type===R.DocType){h.name=this.name;break}}}return Object.defineProperty(g.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(g.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(g.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new w(this.attribs)),this.attributeMap}}),g.prototype.clone=function(){var v,n,d,h;d=(0,c.default)(this),d.isRoot&&(d.documentObject=null),d.attribs={},h=this.attribs;for(n in h){if(!m.call(h,n))continue;v=h[n],d.attribs[n]=v.clone()}return d.children=[],this.children.forEach(function(C){var T;return T=C.clone(),T.parent=d,d.children.push(T)}),d},g.prototype.attribute=function(v,n){var d,h;if(v!=null&&(v=i(v)),r(v))for(d in v){if(!m.call(v,d))continue;h=v[d],this.attribute(d,h)}else a(n)&&(n=n.apply()),this.options.keepNullAttributes&&n==null?this.attribs[v]=new f(this,v,""):n!=null&&(this.attribs[v]=new f(this,v,n));return this},g.prototype.removeAttribute=function(v){var n,d,h;if(v==null)throw new Error("Missing attribute name. "+this.debugInfo());if(v=i(v),Array.isArray(v))for(d=0,h=v.length;d<h;d++)n=v[d],delete this.attribs[n];else delete this.attribs[v];return this},g.prototype.toString=function(v){return this.options.writer.element(this,this.options.writer.filterOptions(v))},g.prototype.att=function(v,n){return this.attribute(v,n)},g.prototype.a=function(v,n){return this.attribute(v,n)},g.prototype.getAttribute=function(v){return this.attribs.hasOwnProperty(v)?this.attribs[v].value:null},g.prototype.setAttribute=function(v,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNode=function(v){return this.attribs.hasOwnProperty(v)?this.attribs[v]:null},g.prototype.setAttributeNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNS=function(v,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNS=function(v,n,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNS=function(v,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNodeNS=function(v,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNodeNS=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(v,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.hasAttribute=function(v){return this.attribs.hasOwnProperty(v)},g.prototype.hasAttributeNS=function(v,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttribute=function(v,n){return this.attribs.hasOwnProperty(v)?this.attribs[v].isId:n},g.prototype.setIdAttributeNS=function(v,n,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttributeNode=function(v,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(v,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByClassName=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isEqualNode=function(v){var n,d,h;if(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(v))return!1;if(v.namespaceURI!==this.namespaceURI)return!1;if(v.prefix!==this.prefix)return!1;if(v.localName!==this.localName)return!1;if(v.attribs.length!==this.attribs.length)return!1;for(n=d=0,h=this.attribs.length-1;0<=h?d<=h:d>=h;n=0<=h?++d:--d)if(!this.attribs[n].isEqualNode(v.attribs[n]))return!1;return!0},g}(l)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/keys"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R;Y.exports=R=function(){function f(s){this.nodes=s}return Object.defineProperty(f.prototype,"length",{get:function(){return(0,c.default)(this.nodes).length||0}}),f.prototype.clone=function(){return this.nodes=null},f.prototype.getNamedItem=function(s){return this.nodes[s]},f.prototype.setNamedItem=function(s){var w;return w=this.nodes[s.nodeName],this.nodes[s.nodeName]=s,w||null},f.prototype.removeNamedItem=function(s){var w;return w=this.nodes[s],delete this.nodes[s],w||null},f.prototype.item=function(s){return this.nodes[(0,c.default)(this.nodes)[s]]||null},f.prototype.getNamedItemNS=function(s,w){throw new Error("This DOM method is not implemented.")},f.prototype.setNamedItemNS=function(s){throw new Error("This DOM method is not implemented.")},f.prototype.removeNamedItemNS=function(s,w){throw new Error("This DOM method is not implemented.")},f}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(I,Y,k){"use strict";(function(){var L,c,S,R,f,s,w,l,i,a,r,u,p,m,b,g,v,n,d,h={}.hasOwnProperty;d=I("./Utility"),n=d.isObject,v=d.isFunction,g=d.isEmpty,b=d.getValue,l=null,S=null,R=null,f=null,s=null,p=null,m=null,u=null,w=null,c=null,r=null,i=null,L=null,Y.exports=a=function(){function C(T){this.parent=T,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,l||(l=I("./XMLElement"),S=I("./XMLCData"),R=I("./XMLComment"),f=I("./XMLDeclaration"),s=I("./XMLDocType"),p=I("./XMLRaw"),m=I("./XMLText"),u=I("./XMLProcessingInstruction"),w=I("./XMLDummy"),c=I("./NodeType"),r=I("./XMLNodeList"),i=I("./XMLNamedNodeMap"),L=I("./DocumentPosition"))}return Object.defineProperty(C.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(C.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(C.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(C.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(C.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new r(this.children)),this.childNodeList}}),Object.defineProperty(C.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(C.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(C.prototype,"previousSibling",{get:function(){var o;return o=this.parent.children.indexOf(this),this.parent.children[o-1]||null}}),Object.defineProperty(C.prototype,"nextSibling",{get:function(){var o;return o=this.parent.children.indexOf(this),this.parent.children[o+1]||null}}),Object.defineProperty(C.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(C.prototype,"textContent",{get:function(){var o,P,O,y,x;if(this.nodeType===c.Element||this.nodeType===c.DocumentFragment){for(x="",y=this.children,P=0,O=y.length;P<O;P++)o=y[P],o.textContent&&(x+=o.textContent);return x}else return null},set:function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),C.prototype.setParent=function(T){var o,P,O,y,x;for(this.parent=T,T&&(this.options=T.options,this.stringify=T.stringify),y=this.children,x=[],P=0,O=y.length;P<O;P++)o=y[P],x.push(o.setParent(this));return x},C.prototype.element=function(T,o,P){var O,y,x,E,_,N,j,M,H,z,F;if(N=null,o===null&&P==null&&(H=[{},null],o=H[0],P=H[1]),o==null&&(o={}),o=b(o),n(o)||(z=[o,P],P=z[0],o=z[1]),T!=null&&(T=b(T)),Array.isArray(T))for(x=0,j=T.length;x<j;x++)y=T[x],N=this.element(y);else if(v(T))N=this.element(T.apply());else if(n(T))for(_ in T){if(!h.call(T,_))continue;if(F=T[_],v(F)&&(F=F.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&_.indexOf(this.stringify.convertAttKey)===0)N=this.attribute(_.substr(this.stringify.convertAttKey.length),F);else if(!this.options.separateArrayItems&&Array.isArray(F)&&g(F))N=this.dummy();else if(n(F)&&g(F))N=this.element(_);else if(!this.options.keepNullNodes&&F==null)N=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(F))for(E=0,M=F.length;E<M;E++)y=F[E],O={},O[_]=y,N=this.element(O);else n(F)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&_.indexOf(this.stringify.convertTextKey)===0?N=this.element(F):(N=this.element(_),N.element(F)):N=this.element(_,F)}else!this.options.keepNullNodes&&P===null?N=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?N=this.text(P):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&T.indexOf(this.stringify.convertCDataKey)===0?N=this.cdata(P):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&T.indexOf(this.stringify.convertCommentKey)===0?N=this.comment(P):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&T.indexOf(this.stringify.convertRawKey)===0?N=this.raw(P):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&T.indexOf(this.stringify.convertPIKey)===0?N=this.instruction(T.substr(this.stringify.convertPIKey.length),P):N=this.node(T,o,P);if(N==null)throw new Error("Could not create any elements with: "+T+". "+this.debugInfo());return N},C.prototype.insertBefore=function(T,o,P){var O,y,x,E,_;if(T!=null?T.type:void 0)return x=T,E=o,x.setParent(this),E?(y=children.indexOf(E),_=children.splice(y),children.push(x),Array.prototype.push.apply(children,_)):children.push(x),x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(T));return y=this.parent.children.indexOf(this),_=this.parent.children.splice(y),O=this.parent.element(T,o,P),Array.prototype.push.apply(this.parent.children,_),O},C.prototype.insertAfter=function(T,o,P){var O,y,x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(T));return y=this.parent.children.indexOf(this),x=this.parent.children.splice(y+1),O=this.parent.element(T,o,P),Array.prototype.push.apply(this.parent.children,x),O},C.prototype.remove=function(){var T,o;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return T=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[T,T-T+1].concat(o=[])),this.parent},C.prototype.node=function(T,o,P){var O,y;return T!=null&&(T=b(T)),o||(o={}),o=b(o),n(o)||(y=[o,P],P=y[0],o=y[1]),O=new l(this,T,o),P!=null&&O.text(P),this.children.push(O),O},C.prototype.text=function(T){var o;return n(T)&&this.element(T),o=new m(this,T),this.children.push(o),this},C.prototype.cdata=function(T){var o;return o=new S(this,T),this.children.push(o),this},C.prototype.comment=function(T){var o;return o=new R(this,T),this.children.push(o),this},C.prototype.commentBefore=function(T){var o,P,O;return P=this.parent.children.indexOf(this),O=this.parent.children.splice(P),o=this.parent.comment(T),Array.prototype.push.apply(this.parent.children,O),this},C.prototype.commentAfter=function(T){var o,P,O;return P=this.parent.children.indexOf(this),O=this.parent.children.splice(P+1),o=this.parent.comment(T),Array.prototype.push.apply(this.parent.children,O),this},C.prototype.raw=function(T){var o;return o=new p(this,T),this.children.push(o),this},C.prototype.dummy=function(){var T;return T=new w(this),T},C.prototype.instruction=function(T,o){var P,O,y,x,E;if(T!=null&&(T=b(T)),o!=null&&(o=b(o)),Array.isArray(T))for(x=0,E=T.length;x<E;x++)P=T[x],this.instruction(P);else if(n(T))for(P in T){if(!h.call(T,P))continue;O=T[P],this.instruction(P,O)}else v(o)&&(o=o.apply()),y=new u(this,T,o),this.children.push(y);return this},C.prototype.instructionBefore=function(T,o){var P,O,y;return O=this.parent.children.indexOf(this),y=this.parent.children.splice(O),P=this.parent.instruction(T,o),Array.prototype.push.apply(this.parent.children,y),this},C.prototype.instructionAfter=function(T,o){var P,O,y;return O=this.parent.children.indexOf(this),y=this.parent.children.splice(O+1),P=this.parent.instruction(T,o),Array.prototype.push.apply(this.parent.children,y),this},C.prototype.declaration=function(T,o,P){var O,y;return O=this.document(),y=new f(O,T,o,P),O.children.length===0?O.children.unshift(y):O.children[0].type===c.Declaration?O.children[0]=y:O.children.unshift(y),O.root()||O},C.prototype.dtd=function(T,o){var P,O,y,x,E,_,N,j,M,H;for(O=this.document(),y=new s(O,T,o),M=O.children,x=E=0,N=M.length;E<N;x=++E)if(P=M[x],P.type===c.DocType)return O.children[x]=y,y;for(H=O.children,x=_=0,j=H.length;_<j;x=++_)if(P=H[x],P.isRoot)return O.children.splice(x,0,y),y;return O.children.push(y),y},C.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},C.prototype.root=function(){var T;for(T=this;T;){if(T.type===c.Document)return T.rootObject;if(T.isRoot)return T;T=T.parent}},C.prototype.document=function(){var T;for(T=this;T;){if(T.type===c.Document)return T;T=T.parent}},C.prototype.end=function(T){return this.document().end(T)},C.prototype.prev=function(){var T;if(T=this.parent.children.indexOf(this),T<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[T-1]},C.prototype.next=function(){var T;if(T=this.parent.children.indexOf(this),T===-1||T===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[T+1]},C.prototype.importDocument=function(T){var o;return o=T.root().clone(),o.parent=this,o.isRoot=!1,this.children.push(o),this},C.prototype.debugInfo=function(T){var o,P;return T=T||this.name,T==null&&!((o=this.parent)!=null?o.name:void 0)?"":T==null?"parent: <"+this.parent.name+">":((P=this.parent)!=null?P.name:void 0)?"node: <"+T+">, parent: <"+this.parent.name+">":"node: <"+T+">"},C.prototype.ele=function(T,o,P){return this.element(T,o,P)},C.prototype.nod=function(T,o,P){return this.node(T,o,P)},C.prototype.txt=function(T){return this.text(T)},C.prototype.dat=function(T){return this.cdata(T)},C.prototype.com=function(T){return this.comment(T)},C.prototype.ins=function(T,o){return this.instruction(T,o)},C.prototype.doc=function(){return this.document()},C.prototype.dec=function(T,o,P){return this.declaration(T,o,P)},C.prototype.e=function(T,o,P){return this.element(T,o,P)},C.prototype.n=function(T,o,P){return this.node(T,o,P)},C.prototype.t=function(T){return this.text(T)},C.prototype.d=function(T){return this.cdata(T)},C.prototype.c=function(T){return this.comment(T)},C.prototype.r=function(T){return this.raw(T)},C.prototype.i=function(T,o){return this.instruction(T,o)},C.prototype.u=function(){return this.up()},C.prototype.importXMLBuilder=function(T){return this.importDocument(T)},C.prototype.replaceChild=function(T,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.removeChild=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.appendChild=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.hasChildNodes=function(){return this.children.length!==0},C.prototype.cloneNode=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.isSupported=function(T,o){return!0},C.prototype.hasAttributes=function(){return this.attribs.length!==0},C.prototype.compareDocumentPosition=function(T){var o,P;return o=this,o===T?0:this.document()!==T.document()?(P=L.Disconnected|L.ImplementationSpecific,Math.random()<.5?P|=L.Preceding:P|=L.Following,P):o.isAncestor(T)?L.Contains|L.Preceding:o.isDescendant(T)?L.Contains|L.Following:o.isPreceding(T)?L.Preceding:L.Following},C.prototype.isSameNode=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.lookupPrefix=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.isDefaultNamespace=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.lookupNamespaceURI=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.isEqualNode=function(T){var o,P,O;if(T.nodeType!==this.nodeType)return!1;if(T.children.length!==this.children.length)return!1;for(o=P=0,O=this.children.length-1;0<=O?P<=O:P>=O;o=0<=O?++P:--P)if(!this.children[o].isEqualNode(T.children[o]))return!1;return!0},C.prototype.getFeature=function(T,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.setUserData=function(T,o,P){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.getUserData=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.contains=function(T){return T?T===this||this.isDescendant(T):!1},C.prototype.isDescendant=function(T){var o,P,O,y,x;for(x=this.children,O=0,y=x.length;O<y;O++){if(o=x[O],T===o)return!0;if(P=o.isDescendant(T),P)return!0}return!1},C.prototype.isAncestor=function(T){return T.isDescendant(this)},C.prototype.isPreceding=function(T){var o,P;return o=this.treePosition(T),P=this.treePosition(this),o===-1||P===-1?!1:o<P},C.prototype.isFollowing=function(T){var o,P;return o=this.treePosition(T),P=this.treePosition(this),o===-1||P===-1?!1:o>P},C.prototype.treePosition=function(T){var o,P;return P=0,o=!1,this.foreachTreeNode(this.document(),function(O){if(P++,!o&&O===T)return o=!0}),o?P:-1},C.prototype.foreachTreeNode=function(T,o){var P,O,y,x,E;for(T||(T=this.document()),x=T.children,O=0,y=x.length;O<y;O++){if(P=x[O],E=o(P))return E;if(E=this.foreachTreeNode(P,o),E)return E}},C}()}).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,Y,k){"use strict";(function(){var L;Y.exports=L=function(){function c(S){this.nodes=S}return Object.defineProperty(c.prototype,"length",{get:function(){return this.nodes.length||0}}),c.prototype.clone=function(){return this.nodes=null},c.prototype.item=function(S){return this.nodes[S]||null},c}()}).call(void 0)},{}],275:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,f,s,w=function(a,r){for(var u in r)l.call(r,u)&&(a[u]=r[u]);function p(){this.constructor=a}return p.prototype=r.prototype,a.prototype=new p,a.__super__=r.prototype,a},l={}.hasOwnProperty;R=I("./NodeType"),f=I("./XMLCharacterData"),Y.exports=s=function(i){w(a,i);function a(r,u,p){if(a.__super__.constructor.call(this,r),u==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=R.ProcessingInstruction,this.target=this.stringify.insTarget(u),this.name=this.target,p&&(this.value=this.stringify.insValue(p))}return a.prototype.clone=function(){return(0,c.default)(this)},a.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))},a.prototype.isEqualNode=function(r){return a.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)?!(r.target!==this.target):!1},a}(f)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,f,s,w=function(a,r){for(var u in r)l.call(r,u)&&(a[u]=r[u]);function p(){this.constructor=a}return p.prototype=r.prototype,a.prototype=new p,a.__super__=r.prototype,a},l={}.hasOwnProperty;R=I("./NodeType"),f=I("./XMLNode"),Y.exports=s=function(i){w(a,i);function a(r,u){if(a.__super__.constructor.call(this,r),u==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=R.Raw,this.value=this.stringify.raw(u)}return a.prototype.clone=function(){return(0,c.default)(this)},a.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))},a}(f)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(I,Y,k){"use strict";(function(){var L,c,S,R,f=function(l,i){for(var a in i)s.call(i,a)&&(l[a]=i[a]);function r(){this.constructor=l}return r.prototype=i.prototype,l.prototype=new r,l.__super__=i.prototype,l},s={}.hasOwnProperty;L=I("./NodeType"),R=I("./XMLWriterBase"),c=I("./WriterState"),Y.exports=S=function(w){f(l,w);function l(i,a){this.stream=i,l.__super__.constructor.call(this,a)}return l.prototype.endline=function(i,a,r){return i.isLastRootNode&&a.state===c.CloseTag?"":l.__super__.endline.call(this,i,a,r)},l.prototype.document=function(i,a){var r,u,p,m,b,g,v,n,d;for(v=i.children,u=p=0,b=v.length;p<b;u=++p)r=v[u],r.isLastRootNode=u===i.children.length-1;for(a=this.filterOptions(a),n=i.children,d=[],m=0,g=n.length;m<g;m++)r=n[m],d.push(this.writeChildNode(r,a,0));return d},l.prototype.attribute=function(i,a,r){return this.stream.write(l.__super__.attribute.call(this,i,a,r))},l.prototype.cdata=function(i,a,r){return this.stream.write(l.__super__.cdata.call(this,i,a,r))},l.prototype.comment=function(i,a,r){return this.stream.write(l.__super__.comment.call(this,i,a,r))},l.prototype.declaration=function(i,a,r){return this.stream.write(l.__super__.declaration.call(this,i,a,r))},l.prototype.docType=function(i,a,r){var u,p,m,b;if(r||(r=0),this.openNode(i,a,r),a.state=c.OpenTag,this.stream.write(this.indent(i,a,r)),this.stream.write("<!DOCTYPE "+i.root().name),i.pubID&&i.sysID?this.stream.write(' PUBLIC "'+i.pubID+'" "'+i.sysID+'"'):i.sysID&&this.stream.write(' SYSTEM "'+i.sysID+'"'),i.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(i,a,r)),a.state=c.InsideTag,b=i.children,p=0,m=b.length;p<m;p++)u=b[p],this.writeChildNode(u,a,r+1);a.state=c.CloseTag,this.stream.write("]")}return a.state=c.CloseTag,this.stream.write(a.spaceBeforeSlash+">"),this.stream.write(this.endline(i,a,r)),a.state=c.None,this.closeNode(i,a,r)},l.prototype.element=function(i,a,r){var u,p,m,b,g,v,n,d,h,C;r||(r=0),this.openNode(i,a,r),a.state=c.OpenTag,this.stream.write(this.indent(i,a,r)+"<"+i.name),h=i.attribs;for(n in h){if(!s.call(h,n))continue;u=h[n],this.attribute(u,a,r)}if(m=i.children.length,b=m===0?null:i.children[0],m===0||i.children.every(function(T){return(T.type===L.Text||T.type===L.Raw)&&T.value===""}))a.allowEmpty?(this.stream.write(">"),a.state=c.CloseTag,this.stream.write("</"+i.name+">")):(a.state=c.CloseTag,this.stream.write(a.spaceBeforeSlash+"/>"));else if(a.pretty&&m===1&&(b.type===L.Text||b.type===L.Raw)&&b.value!=null)this.stream.write(">"),a.state=c.InsideTag,a.suppressPrettyCount++,d=!0,this.writeChildNode(b,a,r+1),a.suppressPrettyCount--,d=!1,a.state=c.CloseTag,this.stream.write("</"+i.name+">");else{for(this.stream.write(">"+this.endline(i,a,r)),a.state=c.InsideTag,C=i.children,g=0,v=C.length;g<v;g++)p=C[g],this.writeChildNode(p,a,r+1);a.state=c.CloseTag,this.stream.write(this.indent(i,a,r)+"</"+i.name+">")}return this.stream.write(this.endline(i,a,r)),a.state=c.None,this.closeNode(i,a,r)},l.prototype.processingInstruction=function(i,a,r){return this.stream.write(l.__super__.processingInstruction.call(this,i,a,r))},l.prototype.raw=function(i,a,r){return this.stream.write(l.__super__.raw.call(this,i,a,r))},l.prototype.text=function(i,a,r){return this.stream.write(l.__super__.text.call(this,i,a,r))},l.prototype.dtdAttList=function(i,a,r){return this.stream.write(l.__super__.dtdAttList.call(this,i,a,r))},l.prototype.dtdElement=function(i,a,r){return this.stream.write(l.__super__.dtdElement.call(this,i,a,r))},l.prototype.dtdEntity=function(i,a,r){return this.stream.write(l.__super__.dtdEntity.call(this,i,a,r))},l.prototype.dtdNotation=function(i,a,r){return this.stream.write(l.__super__.dtdNotation.call(this,i,a,r))},l}(R)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(I,Y,k){"use strict";(function(){var L,c,S=function(s,w){for(var l in w)R.call(w,l)&&(s[l]=w[l]);function i(){this.constructor=s}return i.prototype=w.prototype,s.prototype=new i,s.__super__=w.prototype,s},R={}.hasOwnProperty;c=I("./XMLWriterBase"),Y.exports=L=function(f){S(s,f);function s(w){s.__super__.constructor.call(this,w)}return s.prototype.document=function(w,l){var i,a,r,u,p;for(l=this.filterOptions(l),u="",p=w.children,a=0,r=p.length;a<r;a++)i=p[a],u+=this.writeChildNode(i,l,0);return l.pretty&&u.slice(-l.newline.length)===l.newline&&(u=u.slice(0,-l.newline.length)),u},s}(c)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(I,Y,k){"use strict";(function(){var L,c=function(f,s){return function(){return f.apply(s,arguments)}},S={}.hasOwnProperty;Y.exports=L=function(){function R(f){this.assertLegalName=c(this.assertLegalName,this),this.assertLegalChar=c(this.assertLegalChar,this);var s,w,l;f||(f={}),this.options=f,this.options.version||(this.options.version="1.0"),w=f.stringify||{};for(s in w){if(!S.call(w,s))continue;l=w[s],this[s]=l}}return R.prototype.name=function(f){return this.options.noValidation?f:this.assertLegalName(""+f||"")},R.prototype.text=function(f){return this.options.noValidation?f:this.assertLegalChar(this.textEscape(""+f||""))},R.prototype.cdata=function(f){return this.options.noValidation?f:(f=""+f||"",f=f.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(f))},R.prototype.comment=function(f){if(this.options.noValidation)return f;if(f=""+f||"",f.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+f);return this.assertLegalChar(f)},R.prototype.raw=function(f){return this.options.noValidation?f:""+f||""},R.prototype.attValue=function(f){return this.options.noValidation?f:this.assertLegalChar(this.attEscape(f=""+f||""))},R.prototype.insTarget=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},R.prototype.insValue=function(f){if(this.options.noValidation)return f;if(f=""+f||"",f.match(/\?>/))throw new Error("Invalid processing instruction value: "+f);return this.assertLegalChar(f)},R.prototype.xmlVersion=function(f){if(this.options.noValidation)return f;if(f=""+f||"",!f.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+f);return f},R.prototype.xmlEncoding=function(f){if(this.options.noValidation)return f;if(f=""+f||"",!f.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+f);return this.assertLegalChar(f)},R.prototype.xmlStandalone=function(f){return this.options.noValidation?f:f?"yes":"no"},R.prototype.dtdPubID=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},R.prototype.dtdSysID=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},R.prototype.dtdElementValue=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},R.prototype.dtdAttType=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},R.prototype.dtdAttDefault=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},R.prototype.dtdEntityValue=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},R.prototype.dtdNData=function(f){return this.options.noValidation?f:this.assertLegalChar(""+f||"")},R.prototype.convertAttKey="@",R.prototype.convertPIKey="?",R.prototype.convertTextKey="#text",R.prototype.convertCDataKey="#cdata",R.prototype.convertCommentKey="#comment",R.prototype.convertRawKey="#raw",R.prototype.assertLegalChar=function(f){var s,w;if(this.options.noValidation)return f;if(s="",this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=f.match(s))throw new Error("Invalid character in string: "+f+" at index "+w.index)}else if(this.options.version==="1.1"&&(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=f.match(s)))throw new Error("Invalid character in string: "+f+" at index "+w.index);return f},R.prototype.assertLegalName=function(f){var s;if(this.options.noValidation)return f;if(this.assertLegalChar(f),s=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!f.match(s))throw new Error("Invalid character in name");return f},R.prototype.textEscape=function(f){var s;return this.options.noValidation?f:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,f.replace(s,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},R.prototype.attEscape=function(f){var s;return this.options.noValidation?f:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,f.replace(s,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},R}()}).call(void 0)},{}],280:[function(I,Y,k){"use strict";var L=I("babel-runtime/core-js/object/create"),c=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,f,s,w=function(a,r){for(var u in r)l.call(r,u)&&(a[u]=r[u]);function p(){this.constructor=a}return p.prototype=r.prototype,a.prototype=new p,a.__super__=r.prototype,a},l={}.hasOwnProperty;R=I("./NodeType"),f=I("./XMLCharacterData"),Y.exports=s=function(i){w(a,i);function a(r,u){if(a.__super__.constructor.call(this,r),u==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=R.Text,this.value=this.stringify.text(u)}return Object.defineProperty(a.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(a.prototype,"wholeText",{get:function(){var u,p,m;for(m="",p=this.previousSibling;p;)m=p.data+m,p=p.previousSibling;for(m+=this.data,u=this.nextSibling;u;)m=m+u.data,u=u.nextSibling;return m}}),a.prototype.clone=function(){return(0,c.default)(this)},a.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))},a.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a}(f)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(I,Y,k){"use strict";(function(){var L,c,S,R,f,s,w,l,i,a,r,u,p,m,b,g,v,n={}.hasOwnProperty;v=I("./Utility").assign,L=I("./NodeType"),i=I("./XMLDeclaration"),a=I("./XMLDocType"),S=I("./XMLCData"),R=I("./XMLComment"),u=I("./XMLElement"),m=I("./XMLRaw"),b=I("./XMLText"),p=I("./XMLProcessingInstruction"),r=I("./XMLDummy"),f=I("./XMLDTDAttList"),s=I("./XMLDTDElement"),w=I("./XMLDTDEntity"),l=I("./XMLDTDNotation"),c=I("./WriterState"),Y.exports=g=function(){function d(h){var C,T,o;h||(h={}),this.options=h,T=h.writer||{};for(C in T){if(!n.call(T,C))continue;o=T[C],this["_"+C]=this[C],this[C]=o}}return d.prototype.filterOptions=function(h){var C,T,o,P,O,y,x,E;return h||(h={}),h=v({},this.options,h),C={writer:this},C.pretty=h.pretty||!1,C.allowEmpty=h.allowEmpty||!1,C.indent=(T=h.indent)!=null?T:" ",C.newline=(o=h.newline)!=null?o:`
`,C.offset=(P=h.offset)!=null?P:0,C.dontPrettyTextNodes=(O=(y=h.dontPrettyTextNodes)!=null?y:h.dontprettytextnodes)!=null?O:0,C.spaceBeforeSlash=(x=(E=h.spaceBeforeSlash)!=null?E:h.spacebeforeslash)!=null?x:"",C.spaceBeforeSlash===!0&&(C.spaceBeforeSlash=" "),C.suppressPrettyCount=0,C.user={},C.state=c.None,C},d.prototype.indent=function(h,C,T){var o;return!C.pretty||C.suppressPrettyCount?"":C.pretty&&(o=(T||0)+C.offset+1,o>0)?new Array(o).join(C.indent):""},d.prototype.endline=function(h,C,T){return!C.pretty||C.suppressPrettyCount?"":C.newline},d.prototype.attribute=function(h,C,T){var o;return this.openAttribute(h,C,T),o=" "+h.name+'="'+h.value+'"',this.closeAttribute(h,C,T),o},d.prototype.cdata=function(h,C,T){var o;return this.openNode(h,C,T),C.state=c.OpenTag,o=this.indent(h,C,T)+"<![CDATA[",C.state=c.InsideTag,o+=h.value,C.state=c.CloseTag,o+="]]>"+this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),o},d.prototype.comment=function(h,C,T){var o;return this.openNode(h,C,T),C.state=c.OpenTag,o=this.indent(h,C,T)+"<!-- ",C.state=c.InsideTag,o+=h.value,C.state=c.CloseTag,o+=" -->"+this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),o},d.prototype.declaration=function(h,C,T){var o;return this.openNode(h,C,T),C.state=c.OpenTag,o=this.indent(h,C,T)+"<?xml",C.state=c.InsideTag,o+=' version="'+h.version+'"',h.encoding!=null&&(o+=' encoding="'+h.encoding+'"'),h.standalone!=null&&(o+=' standalone="'+h.standalone+'"'),C.state=c.CloseTag,o+=C.spaceBeforeSlash+"?>",o+=this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),o},d.prototype.docType=function(h,C,T){var o,P,O,y,x;if(T||(T=0),this.openNode(h,C,T),C.state=c.OpenTag,y=this.indent(h,C,T),y+="<!DOCTYPE "+h.root().name,h.pubID&&h.sysID?y+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.sysID&&(y+=' SYSTEM "'+h.sysID+'"'),h.children.length>0){for(y+=" [",y+=this.endline(h,C,T),C.state=c.InsideTag,x=h.children,P=0,O=x.length;P<O;P++)o=x[P],y+=this.writeChildNode(o,C,T+1);C.state=c.CloseTag,y+="]"}return C.state=c.CloseTag,y+=C.spaceBeforeSlash+">",y+=this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),y},d.prototype.element=function(h,C,T){var o,P,O,y,x,E,_,N,j,M,H,z,F,G;T||(T=0),M=!1,H="",this.openNode(h,C,T),C.state=c.OpenTag,H+=this.indent(h,C,T)+"<"+h.name,z=h.attribs;for(j in z){if(!n.call(z,j))continue;o=z[j],H+=this.attribute(o,C,T)}if(O=h.children.length,y=O===0?null:h.children[0],O===0||h.children.every(function(B){return(B.type===L.Text||B.type===L.Raw)&&B.value===""}))C.allowEmpty?(H+=">",C.state=c.CloseTag,H+="</"+h.name+">"+this.endline(h,C,T)):(C.state=c.CloseTag,H+=C.spaceBeforeSlash+"/>"+this.endline(h,C,T));else if(C.pretty&&O===1&&(y.type===L.Text||y.type===L.Raw)&&y.value!=null)H+=">",C.state=c.InsideTag,C.suppressPrettyCount++,M=!0,H+=this.writeChildNode(y,C,T+1),C.suppressPrettyCount--,M=!1,C.state=c.CloseTag,H+="</"+h.name+">"+this.endline(h,C,T);else{if(C.dontPrettyTextNodes){for(F=h.children,x=0,_=F.length;x<_;x++)if(P=F[x],(P.type===L.Text||P.type===L.Raw)&&P.value!=null){C.suppressPrettyCount++,M=!0;break}}for(H+=">"+this.endline(h,C,T),C.state=c.InsideTag,G=h.children,E=0,N=G.length;E<N;E++)P=G[E],H+=this.writeChildNode(P,C,T+1);C.state=c.CloseTag,H+=this.indent(h,C,T)+"</"+h.name+">",M&&C.suppressPrettyCount--,H+=this.endline(h,C,T),C.state=c.None}return this.closeNode(h,C,T),H},d.prototype.writeChildNode=function(h,C,T){switch(h.type){case L.CData:return this.cdata(h,C,T);case L.Comment:return this.comment(h,C,T);case L.Element:return this.element(h,C,T);case L.Raw:return this.raw(h,C,T);case L.Text:return this.text(h,C,T);case L.ProcessingInstruction:return this.processingInstruction(h,C,T);case L.Dummy:return"";case L.Declaration:return this.declaration(h,C,T);case L.DocType:return this.docType(h,C,T);case L.AttributeDeclaration:return this.dtdAttList(h,C,T);case L.ElementDeclaration:return this.dtdElement(h,C,T);case L.EntityDeclaration:return this.dtdEntity(h,C,T);case L.NotationDeclaration:return this.dtdNotation(h,C,T);default:throw new Error("Unknown XML node type: "+h.constructor.name)}},d.prototype.processingInstruction=function(h,C,T){var o;return this.openNode(h,C,T),C.state=c.OpenTag,o=this.indent(h,C,T)+"<?",C.state=c.InsideTag,o+=h.target,h.value&&(o+=" "+h.value),C.state=c.CloseTag,o+=C.spaceBeforeSlash+"?>",o+=this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),o},d.prototype.raw=function(h,C,T){var o;return this.openNode(h,C,T),C.state=c.OpenTag,o=this.indent(h,C,T),C.state=c.InsideTag,o+=h.value,C.state=c.CloseTag,o+=this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),o},d.prototype.text=function(h,C,T){var o;return this.openNode(h,C,T),C.state=c.OpenTag,o=this.indent(h,C,T),C.state=c.InsideTag,o+=h.value,C.state=c.CloseTag,o+=this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),o},d.prototype.dtdAttList=function(h,C,T){var o;return this.openNode(h,C,T),C.state=c.OpenTag,o=this.indent(h,C,T)+"<!ATTLIST",C.state=c.InsideTag,o+=" "+h.elementName+" "+h.attributeName+" "+h.attributeType,h.defaultValueType!=="#DEFAULT"&&(o+=" "+h.defaultValueType),h.defaultValue&&(o+=' "'+h.defaultValue+'"'),C.state=c.CloseTag,o+=C.spaceBeforeSlash+">"+this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),o},d.prototype.dtdElement=function(h,C,T){var o;return this.openNode(h,C,T),C.state=c.OpenTag,o=this.indent(h,C,T)+"<!ELEMENT",C.state=c.InsideTag,o+=" "+h.name+" "+h.value,C.state=c.CloseTag,o+=C.spaceBeforeSlash+">"+this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),o},d.prototype.dtdEntity=function(h,C,T){var o;return this.openNode(h,C,T),C.state=c.OpenTag,o=this.indent(h,C,T)+"<!ENTITY",C.state=c.InsideTag,h.pe&&(o+=" %"),o+=" "+h.name,h.value?o+=' "'+h.value+'"':(h.pubID&&h.sysID?o+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.sysID&&(o+=' SYSTEM "'+h.sysID+'"'),h.nData&&(o+=" NDATA "+h.nData)),C.state=c.CloseTag,o+=C.spaceBeforeSlash+">"+this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),o},d.prototype.dtdNotation=function(h,C,T){var o;return this.openNode(h,C,T),C.state=c.OpenTag,o=this.indent(h,C,T)+"<!NOTATION",C.state=c.InsideTag,o+=" "+h.name,h.pubID&&h.sysID?o+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.pubID?o+=' PUBLIC "'+h.pubID+'"':h.sysID&&(o+=' SYSTEM "'+h.sysID+'"'),C.state=c.CloseTag,o+=C.spaceBeforeSlash+">"+this.endline(h,C,T),C.state=c.None,this.closeNode(h,C,T),o},d.prototype.openNode=function(h,C,T){},d.prototype.closeNode=function(h,C,T){},d.prototype.openAttribute=function(h,C,T){},d.prototype.closeAttribute=function(h,C,T){},d}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(I,Y,k){"use strict";(function(){var L,c,S,R,f,s,w,l,i,a;a=I("./Utility"),l=a.assign,i=a.isFunction,S=I("./XMLDOMImplementation"),R=I("./XMLDocument"),f=I("./XMLDocumentCB"),w=I("./XMLStringWriter"),s=I("./XMLStreamWriter"),L=I("./NodeType"),c=I("./WriterState"),Y.exports.create=function(r,u,p,m){var b,g;if(r==null)throw new Error("Root element needs a name.");return m=l({},u,p,m),b=new R(m),g=b.element(r),m.headless||(b.declaration(m),(m.pubID!=null||m.sysID!=null)&&b.dtd(m)),g},Y.exports.begin=function(r,u,p){var m;return i(r)&&(m=[r,u],u=m[0],p=m[1],r={}),u?new f(r,u,p):new R(r)},Y.exports.stringWriter=function(r){return new w(r)},Y.exports.streamWriter=function(r,u){return new s(r,u)},Y.exports.implementation=new S,Y.exports.nodeType=L,Y.exports.writerState=c}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(I,Y,k){Y.exports=c;var L=Object.prototype.hasOwnProperty;function c(){for(var S={},R=0;R<arguments.length;R++){var f=arguments[R];for(var s in f)L.call(f,s)&&(S[s]=f[s])}return S}},{}],284:[function(I,Y,k){"use strict";var L=I("buffer").Buffer,c=I("./sha"),S=I("./md5"),R={sha1:c,md5:S},f=64,s=L.alloc(f);s.fill(0);function w(a,r,u){L.isBuffer(r)||(r=L.from(r)),L.isBuffer(u)||(u=L.from(u)),r.length>f?r=a(r):r.length<f&&(r=L.concat([r,s],f));for(var p=L.alloc(f),m=L.alloc(f),b=0;b<f;b++)p[b]=r[b]^54,m[b]=r[b]^92;var g=a(L.concat([p,u]));return a(L.concat([m,g]))}function l(a,r){a=a||"sha1";var u=R[a],p=[],m=0;return u||i("algorithm:",a,"is not yet supported"),{update:function(g){return L.isBuffer(g)||(g=L.from(g)),p.push(g),m+=g.length,this},digest:function(g){var v=L.concat(p),n=r?w(u,r,v):u(v);return p=null,g?n.toString(g):n}}}function i(){var a=[].slice.call(arguments).join(" ");throw new Error([a,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}k.createHash=function(a){return l(a)},k.createHmac=function(a,r){return l(a,r)},k.createCredentials=function(){i("sorry,createCredentials is not implemented yet")},k.createCipher=function(){i("sorry,createCipher is not implemented yet")},k.createCipheriv=function(){i("sorry,createCipheriv is not implemented yet")},k.createDecipher=function(){i("sorry,createDecipher is not implemented yet")},k.createDecipheriv=function(){i("sorry,createDecipheriv is not implemented yet")},k.createSign=function(){i("sorry,createSign is not implemented yet")},k.createVerify=function(){i("sorry,createVerify is not implemented yet")},k.createDiffieHellman=function(){i("sorry,createDiffieHellman is not implemented yet")},k.pbkdf2=function(){i("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(I,Y,k){"use strict";var L=I("buffer").Buffer,c=4,S=L.alloc(c);S.fill(0);var R=8;function f(l,i){if(l.length%c!==0){var a=l.length+(c-l.length%c);l=L.concat([l,S],a)}for(var r=[],u=i?l.readInt32BE:l.readInt32LE,p=0;p<l.length;p+=c)r.push(u.call(l,p));return r}function s(l,i,a){for(var r=L.alloc(i),u=a?r.writeInt32BE:r.writeInt32LE,p=0;p<l.length;p++)u.call(r,l[p],p*4,!0);return r}function w(l,i,a,r){L.isBuffer(l)||(l=L.from(l));var u=i(f(l,r),l.length*R);return s(u,a,r)}Y.exports={hash:w}},{buffer:73}],286:[function(I,Y,k){"use strict";var L=I("./helpers");function c(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function S(r,u){r[u>>5]|=128<<u%32,r[(u+64>>>9<<4)+14]=u;for(var p=1732584193,m=-271733879,b=-1732584194,g=271733878,v=0;v<r.length;v+=16){var n=p,d=m,h=b,C=g;p=f(p,m,b,g,r[v+0],7,-680876936),g=f(g,p,m,b,r[v+1],12,-389564586),b=f(b,g,p,m,r[v+2],17,606105819),m=f(m,b,g,p,r[v+3],22,-1044525330),p=f(p,m,b,g,r[v+4],7,-176418897),g=f(g,p,m,b,r[v+5],12,1200080426),b=f(b,g,p,m,r[v+6],17,-1473231341),m=f(m,b,g,p,r[v+7],22,-45705983),p=f(p,m,b,g,r[v+8],7,1770035416),g=f(g,p,m,b,r[v+9],12,-1958414417),b=f(b,g,p,m,r[v+10],17,-42063),m=f(m,b,g,p,r[v+11],22,-1990404162),p=f(p,m,b,g,r[v+12],7,1804603682),g=f(g,p,m,b,r[v+13],12,-40341101),b=f(b,g,p,m,r[v+14],17,-1502002290),m=f(m,b,g,p,r[v+15],22,1236535329),p=s(p,m,b,g,r[v+1],5,-165796510),g=s(g,p,m,b,r[v+6],9,-1069501632),b=s(b,g,p,m,r[v+11],14,643717713),m=s(m,b,g,p,r[v+0],20,-373897302),p=s(p,m,b,g,r[v+5],5,-701558691),g=s(g,p,m,b,r[v+10],9,38016083),b=s(b,g,p,m,r[v+15],14,-660478335),m=s(m,b,g,p,r[v+4],20,-405537848),p=s(p,m,b,g,r[v+9],5,568446438),g=s(g,p,m,b,r[v+14],9,-1019803690),b=s(b,g,p,m,r[v+3],14,-187363961),m=s(m,b,g,p,r[v+8],20,1163531501),p=s(p,m,b,g,r[v+13],5,-1444681467),g=s(g,p,m,b,r[v+2],9,-51403784),b=s(b,g,p,m,r[v+7],14,1735328473),m=s(m,b,g,p,r[v+12],20,-1926607734),p=w(p,m,b,g,r[v+5],4,-378558),g=w(g,p,m,b,r[v+8],11,-2022574463),b=w(b,g,p,m,r[v+11],16,1839030562),m=w(m,b,g,p,r[v+14],23,-35309556),p=w(p,m,b,g,r[v+1],4,-1530992060),g=w(g,p,m,b,r[v+4],11,1272893353),b=w(b,g,p,m,r[v+7],16,-155497632),m=w(m,b,g,p,r[v+10],23,-1094730640),p=w(p,m,b,g,r[v+13],4,681279174),g=w(g,p,m,b,r[v+0],11,-358537222),b=w(b,g,p,m,r[v+3],16,-722521979),m=w(m,b,g,p,r[v+6],23,76029189),p=w(p,m,b,g,r[v+9],4,-640364487),g=w(g,p,m,b,r[v+12],11,-421815835),b=w(b,g,p,m,r[v+15],16,530742520),m=w(m,b,g,p,r[v+2],23,-995338651),p=l(p,m,b,g,r[v+0],6,-198630844),g=l(g,p,m,b,r[v+7],10,1126891415),b=l(b,g,p,m,r[v+14],15,-1416354905),m=l(m,b,g,p,r[v+5],21,-57434055),p=l(p,m,b,g,r[v+12],6,1700485571),g=l(g,p,m,b,r[v+3],10,-1894986606),b=l(b,g,p,m,r[v+10],15,-1051523),m=l(m,b,g,p,r[v+1],21,-2054922799),p=l(p,m,b,g,r[v+8],6,1873313359),g=l(g,p,m,b,r[v+15],10,-30611744),b=l(b,g,p,m,r[v+6],15,-1560198380),m=l(m,b,g,p,r[v+13],21,1309151649),p=l(p,m,b,g,r[v+4],6,-145523070),g=l(g,p,m,b,r[v+11],10,-1120210379),b=l(b,g,p,m,r[v+2],15,718787259),m=l(m,b,g,p,r[v+9],21,-343485551),p=i(p,n),m=i(m,d),b=i(b,h),g=i(g,C)}return Array(p,m,b,g)}function R(r,u,p,m,b,g){return i(a(i(i(u,r),i(m,g)),b),p)}function f(r,u,p,m,b,g,v){return R(u&p|~u&m,r,u,b,g,v)}function s(r,u,p,m,b,g,v){return R(u&m|p&~m,r,u,b,g,v)}function w(r,u,p,m,b,g,v){return R(u^p^m,r,u,b,g,v)}function l(r,u,p,m,b,g,v){return R(p^(u|~m),r,u,b,g,v)}function i(r,u){var p=(r&65535)+(u&65535),m=(r>>16)+(u>>16)+(p>>16);return m<<16|p&65535}function a(r,u){return r<<u|r>>>32-u}Y.exports=function(u){return L.hash(u,S,16)}},{"./helpers":285}],287:[function(I,Y,k){"use strict";var L=I("./helpers");function c(w,l){w[l>>5]|=128<<24-l%32,w[(l+64>>9<<4)+15]=l;for(var i=Array(80),a=1732584193,r=-271733879,u=-1732584194,p=271733878,m=-1009589776,b=0;b<w.length;b+=16){for(var g=a,v=r,n=u,d=p,h=m,C=0;C<80;C++){C<16?i[C]=w[b+C]:i[C]=s(i[C-3]^i[C-8]^i[C-14]^i[C-16],1);var T=f(f(s(a,5),S(C,r,u,p)),f(f(m,i[C]),R(C)));m=p,p=u,u=s(r,30),r=a,a=T}a=f(a,g),r=f(r,v),u=f(u,n),p=f(p,d),m=f(m,h)}return Array(a,r,u,p,m)}function S(w,l,i,a){return w<20?l&i|~l&a:w<40?l^i^a:w<60?l&i|l&a|i&a:l^i^a}function R(w){return w<20?1518500249:w<40?1859775393:w<60?-1894007588:-899497514}function f(w,l){var i=(w&65535)+(l&65535),a=(w>>16)+(l>>16)+(i>>16);return a<<16|i&65535}function s(w,l){return w<<l|w>>>32-l}Y.exports=function(l){return L.hash(l,c,20,!0)}},{"./helpers":285}],288:[function(I,Y,k){"use strict";Y.exports=function(){return function(){}}},{}],289:[function(I,Y,k){(function(L){"use strict";var c=I("babel-runtime/helpers/typeof"),S=R(c);function R(a){return a&&a.__esModule?a:{default:a}}var f=I("stream"),s=f.Stream,w=I("../lib/common/utils/isArray"),l=w.isArray;Y.exports.string=function(r){return typeof r=="string"},Y.exports.array=l,Y.exports.buffer=L.isBuffer;function i(a){return a instanceof s}Y.exports.writableStream=function(r){return i(r)&&typeof r._write=="function"&&(0,S.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,Y,k){"use strict";k.encodeURIComponent=function(L){try{return encodeURIComponent(L)}catch(c){return L}},k.escape=I("escape-html"),k.timestamp=function(c){if(c){var S=c;return typeof S=="string"&&(S=Number(S)),String(c).length===10&&(S*=1e3),new Date(S)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(I,Y,k){(function(L,c){"use strict";var S=I("babel-runtime/core-js/json/stringify"),R=w(S),f=I("babel-runtime/helpers/typeof"),s=w(f);function w(C){return C&&C.__esModule?C:{default:C}}var l=I("util"),i=I("url"),a=I("http"),r=I("https"),u=I("debug")("urllib"),p=I("humanize-ms"),m,b=0,g=Math.pow(2,31)-10,v=/^https?:\/\//i;function n(C,T){return C===void 0?T:C}function d(C,T){return function(o,P,O){if(o)return T(o);C({data:P,status:O.statusCode,headers:O.headers,res:O})}}k.TIMEOUTS=[p("300s"),p("300s")];var h=["json","text"];k.request=function(T,o,P){return arguments.length===2&&typeof o=="function"&&(P=o,o=null),typeof P=="function"?k.requestWithCallback(T,o,P):(m||(m=I("any-promise")),new m(function(O,y){k.requestWithCallback(T,o,d(O,y))}))},k.requestWithCallback=function(T,o,P){if(!T||typeof T!="string"&&(typeof T=="undefined"?"undefined":(0,s.default)(T))!=="object"){var O=l.format("expect request url to be a string or a http request options, but got %j",T);throw new Error(O)}arguments.length===2&&typeof o=="function"&&(P=o,o=null),o=o||{},b>=g&&(b=0);var y=++b;o.requestUrls=o.requestUrls||[];var x={requestId:y,url:T,args:o,ctx:o.ctx};o.emitter&&o.emitter.emit("request",x),o.timeout=o.timeout||k.TIMEOUTS,o.maxRedirects=o.maxRedirects||10,o.streaming=o.streaming||o.customResponse;var E=Date.now(),_;typeof T=="string"?(v.test(T)||(T="http://"+T),_=i.parse(T)):_=T;var N=(o.type||o.method||_.method||"GET").toUpperCase(),j=_.port||80,M=a,H=n(o.agent,k.agent),z=o.fixJSONCtlChars;_.protocol==="https:"&&(M=r,H=n(o.httpsAgent,k.httpsAgent),_.port||(j=443));var F={host:_.hostname||_.host||"localhost",path:_.path||"/",method:N,port:j,agent:H,headers:o.headers||{},lookup:o.lookup};Array.isArray(o.timeout)?F.requestTimeout=o.timeout[o.timeout.length-1]:typeof o.timeout!="undefined"&&(F.requestTimeout=o.timeout);for(var G=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B<G.length;B++){var K=G[B];o.hasOwnProperty(K)&&(F[K]=o[K])}F.rejectUnauthorized===!1&&!F.hasOwnProperty("secureOptions")&&(F.secureOptions=I("constants").SSL_OP_NO_TLSv1_2);var W=o.auth||_.auth;W&&(F.auth=W);var J=o.content||o.data,ee=N==="GET"||N==="HEAD"||o.dataAsQueryString;if(!o.content&&(J&&!(typeof J=="string"||c.isBuffer(J))))if(ee)J=o.nestedQuerystring?qs.stringify(J):querystring.stringify(J);else{var Z=F.headers["Content-Type"]||F.headers["content-type"];Z||(o.contentType==="json"?Z="application/json":Z="application/x-www-form-urlencoded",F.headers["Content-Type"]=Z),parseContentType(Z).type==="application/json"?J=(0,R.default)(J):J=o.nestedQuerystring?qs.stringify(J):querystring.stringify(J)}ee&&J&&(F.path+=(_.query?"&":"?")+J,J=null);var he=0;if(J){var ge=J.length;c.isBuffer(J)||(ge=c.byteLength(J)),he=F.headers["Content-Length"]=ge}o.dataType==="json"&&(F.headers.Accept="application/json"),typeof o.beforeRequest=="function"&&o.beforeRequest(F);var ie=null,we=null,me=null,oe=!1,se=!1,te=0,be=-1,q=!1,ae="",xe="",ne=null;o.timing&&(ne={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function Q(){ie&&(clearTimeout(ie),ie=null)}function X(){we&&(clearTimeout(we),we=null)}function $(Se,Ge,tt){if(X(),!P){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),y,L.pid,F.method,T),Se&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),y,L.pid,Se.name,Se.message,Se.stack);return}var Ue=P;P=null;var Xe={};if(tt&&(be=tt.statusCode,Xe=tt.headers),be===401&&Xe["www-authenticate"]&&(!o.headers||!o.headers.Authorization)&&o.digestAuth){var Pe=Xe["www-authenticate"];if(Pe.indexOf("Digest ")>=0)return u("Request#%d %s: got digest auth header WWW-Authenticate: %s",y,T,Pe),o.headers=o.headers||{},o.headers.Authorization=digestAuthHeader(F.method,F.path,Pe,o.digestAuth),u("Request#%d %s: auth with digest header: %s",y,T,o.headers.Authorization),tt.headers["set-cookie"]&&(o.headers.Cookie=tt.headers["set-cookie"].join(";")),k.requestWithCallback(T,o,Ue)}var Te=Date.now()-E;ne&&(ne.contentDownload=Te),u("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Te,te,be,F.method,F.host,F.path,se,ne);var Ae={status:be,statusCode:be,headers:Xe,size:te,aborted:q,rt:Te,keepAliveSocket:se,data:Ge,requestUrls:o.requestUrls,timing:ne,remoteAddress:ae,remotePort:xe};if(Se){var ce="";H&&typeof H.getCurrentStatus=="function"&&(ce=", agent status: "+(0,R.default)(H.getCurrentStatus())),Se.message+=", "+F.method+" "+T+" "+be+" (connected: "+oe+", keepalive socket: "+se+ce+`)
headers: `+(0,R.default)(Xe),Se.data=Ge,Se.path=F.path,Se.status=be,Se.headers=Xe,Se.res=Ae}Ue(Se,Ge,o.streaming?tt:Ae),o.emitter&&(x.url=T,x.socket=rt&&rt.connection,x.options=F,x.size=he,o.emitter.emit("response",{requestId:y,error:Se,ctx:o.ctx,req:x,res:Ae}))}function pe(Se){var Ge=null;if(o.followRedirect&&statuses.redirect[Se.statusCode]){o._followRedirectCount=(o._followRedirectCount||0)+1;var tt=Se.headers.location;if(!tt)Ge=new Error("Got statusCode "+Se.statusCode+" but cannot resolve next location from headers"),Ge.name="FollowRedirectError";else if(o._followRedirectCount>o.maxRedirects)Ge=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+T),Ge.name="MaxRedirectError";else{var Ue=o.formatRedirectUrl?o.formatRedirectUrl(T,tt):i.resolve(T,tt);u("Request#%d %s: `redirected` from %s to %s",y,F.path,T,Ue),X(),o.headers&&o.headers.Host&&v.test(tt)&&(o.headers.Host=null);var Xe=P;return P=null,k.requestWithCallback(Ue,o,Xe),{redirect:!0,error:null}}}return{redirect:!1,error:Ge}}!F.headers["User-Agent"]&&!F.headers["user-agent"]&&(F.headers["User-Agent"]=navigator.userAgent),o.gzip&&(!F.headers["Accept-Encoding"]&&!F.headers["accept-encoding"]&&(F.headers["Accept-Encoding"]="gzip"));function de(Se,Ge,tt){var Ue=Se.headers["content-encoding"];return tt(null,Ge,Ue)}var Ce=o.writeStream;u("Request#%d %s %s with headers %j, options.path: %s",y,N,T,F.headers,F.path),o.requestUrls.push(T);function ze(Se){if(ne&&(ne.waiting=Date.now()-E),u("Request#%d %s `req response` event emit: status %d, headers: %j",y,T,Se.statusCode,Se.headers),o.streaming){var Ge=pe(Se);if(Ge.redirect){Se.resume();return}return Ge.error?(Se.resume(),$(Ge.error,null,Se)):$(null,null,Se)}if(Se.on("close",function(){u("Request#%d %s: `res close` event emit, total size %d",y,T,te)}),Se.on("error",function(){u("Request#%d %s: `res error` event emit, total size %d",y,T,te)}),Se.on("aborted",function(){q=!0,u("Request#%d %s: `res aborted` event emit, total size %d",y,T,te)}),Ce){var Ge=pe(Se);if(Ge.redirect){Se.resume();return}return Ge.error?(Se.resume(),Ce.end(),$(Ge.error,null,Se)):(o.consumeWriteStream===!1?Se.on("end",$.bind(null,null,null,Se)):isNode010||isNode012?first([[Ce,"close"],[Se,"aborted"]],function(Xe,Pe,Te){u("Request#%d %s: writeStream or res %s event emitted",y,T,Te),$(me||null,null,Se)}):Ce.on("close",function(){u("Request#%d %s: writeStream close event emitted",y,T),$(me||null,null,Se)}),Se.pipe(Ce))}var tt=[];Se.on("data",function(Ue){u("Request#%d %s: `res data` event emit, size %d",y,T,Ue.length),te+=Ue.length,tt.push(Ue)}),Se.on("end",function(){var Ue=c.concat(tt,te);if(u("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",y,T,te,Se._dumped),me)return $(me,Ue,Se);var Xe=pe(Se);if(Xe.error)return $(Xe.error,Ue,Se);if(Xe.redirect)return;de(Se,Ue,function(Pe,Te,Ae){if(Pe)return $(Pe,Ue,Se);if(!Ae&&h.indexOf(o.dataType)>=0){try{Te=decodeBodyByCharset(Te,Se)}catch(Ee){return u("decodeBodyByCharset error: %s",Ee),$(null,Te,Se)}if(o.dataType==="json")if(te===0)Te=null;else{var ce=parseJSON(Te,z);ce.error?Pe=ce.error:Te=ce.data}}q&&u("Request#%d %s: Remote socket was terminated before `response.end()` was called",y,T),$(Pe,Te,Se)})})}var qe,Ye;Array.isArray(o.timeout)?(qe=p(o.timeout[0]),Ye=p(o.timeout[1])):qe=Ye=p(o.timeout),u("ConnectTimeout: %d, ResponseTimeout: %d",qe,Ye);function Ve(){u("Connect timer ticking, timeout: %d",qe),ie=setTimeout(function(){ie=null,be===-1&&(be=-2);var Se="Connect timeout for "+qe+"ms",Ge="ConnectionTimeoutError";rt.socket||(Ge="SocketAssignTimeoutError",Se+=", working sockets is full"),me=new Error(Se),me.name=Ge,me.requestId=y,u("ConnectTimeout: Request#%d %s %s: %s, connected: %s",y,T,me.name,Se,oe),Me()},qe)}function et(){u("Response timer ticking, timeout: %d",Ye),we=setTimeout(function(){we=null;var Se="Response timeout for "+Ye+"ms",Ge="ResponseTimeoutError";me=new Error(Se),me.name=Ge,me.requestId=y,u("ResponseTimeout: Request#%d %s %s: %s, connected: %s",y,T,me.name,Se,oe),Me()},Ye)}var rt;F.mode=o.mode?o.mode:"";try{rt=M.request(F,ze)}catch(Se){return $(Se)}typeof window=="undefined"?Ve():rt.on("requestTimeout",function(){be===-1&&(be=-2);var Se="Connect timeout for "+qe+"ms",Ge="ConnectionTimeoutError";me=new Error(Se),me.name=Ge,me.requestId=y,Me()});function Me(){u("Request#%d %s abort, connected: %s",y,T,oe),rt.socket||(me.noSocket=!0,$(me)),rt.abort()}return ne&&rt.on("finish",function(){ne.requestSent=Date.now()-E}),rt.once("socket",function(Se){ne&&(ne.queuing=Date.now()-E),isNode010&&Se.socket&&(Se=Se.socket);var Ge=Se.readyState;if(Ge==="opening"){Se.once("lookup",function(tt,Ue,Xe){u("Request#%d %s lookup: %s, %s, %s",y,T,tt,Ue,Xe),ne&&(ne.dnslookup=Date.now()-E),Ue&&(ae=Ue)}),Se.once("connect",function(){ne&&(ne.connected=Date.now()-E),Q(),et(),u("Request#%d %s new socket connected",y,T),oe=!0,ae||(ae=Se.remoteAddress),xe=Se.remotePort});return}u("Request#%d %s reuse socket connected, readyState: %s",y,T,Ge),oe=!0,se=!0,ae||(ae=Se.remoteAddress),xe=Se.remotePort,Q(),et()}),rt.on("error",function(Se){(Se.name==="Error"||Se.name==="TypeError")&&(Se.name=oe?"ResponseError":"RequestError"),Se.message+=' (req "error")',u("Request#%d %s `req error` event emit, %s: %s",y,T,Se.name,Se.message),$(me||Se)}),Ce&&Ce.once("error",function(Se){Se.message+=' (writeStream "error")',me=Se,u("Request#%d %s `writeStream error` event emit, %s: %s",y,T,Se.name,Se.message),Me()}),o.stream?(o.stream.pipe(rt),o.stream.once("error",function(Se){Se.message+=' (stream "error")',me=Se,u("Request#%d %s `readStream error` event emit, %s: %s",y,T,Se.name,Se.message),Me()})):rt.end(J),rt.requestId=y,rt}}).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"))},n6Qo:function(I,Y,k){"use strict";k.d(Y,"a",function(){return l});var L=k("cDcd"),c=k("biw7"),S=k("fyJ8");function R(i){var a=i.className,r=i.index,u=i.children,p=i.colSpan,m=i.rowSpan,b=L.useContext(c.a),g=b.prefixCls,v=b.fixedInfoList,n=v[r];return L.createElement(S.a,Object.assign({className:a,index:r,component:"td",prefixCls:g,record:null,dataIndex:null,render:function(){return{children:u,props:{colSpan:p,rowSpan:m}}}},n))}function f(i){return L.createElement("tr",Object.assign({},i))}function s(i){var a=i.children,r=L.useContext(c.a),u=r.prefixCls;return L.createElement("tfoot",{className:"".concat(u,"-summary")},a)}var w=Y.b=s,l={Cell:R,Row:f}},nVVt:function(I,Y){I.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},nj2k:function(I,Y,k){I.exports=k.p+"static/nodata.c3b0b86c.svg"},oRuE:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.Iso10126={pad:function(c,S){var R=S*4,f=R-c.sigBytes%R;c.concat(L.lib.WordArray.random(f-1)).concat(L.lib.WordArray.create([f<<24],1))},unpad:function(c){var S=c.words[c.sigBytes-1>>>2]&255;c.sigBytes-=S}},L.pad.Iso10126})},osHv:function(I,Y,k){(function(L){L(k("VrN/"))})(function(L){"use strict";var c=L.Pos;function S(v,n){return v.line-n.line||v.ch-n.ch}var R="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",f=R+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s=new RegExp("<(/?)(["+R+"]["+f+"]*)","g");function w(v,n,d,h){this.line=n,this.ch=d,this.cm=v,this.text=v.getLine(n),this.min=h?Math.max(h.from,v.firstLine()):v.firstLine(),this.max=h?Math.min(h.to-1,v.lastLine()):v.lastLine()}function l(v,n){var d=v.cm.getTokenTypeAt(c(v.line,n));return d&&/\btag\b/.test(d)}function i(v){return v.line>=v.max?void 0:(v.ch=0,v.text=v.cm.getLine(++v.line),!0)}function a(v){return v.line<=v.min?void 0:(v.text=v.cm.getLine(--v.line),v.ch=v.text.length,!0)}function r(v){for(;;){var n=v.text.indexOf(">",v.ch);if(n==-1){if(i(v))continue;return}if(!l(v,n+1)){v.ch=n+1;continue}var d=v.text.lastIndexOf("/",n),h=d>-1&&!/\S/.test(v.text.slice(d+1,n));return v.ch=n+1,h?"selfClose":"regular"}}function u(v){for(;;){var n=v.ch?v.text.lastIndexOf("<",v.ch-1):-1;if(n==-1){if(a(v))continue;return}if(!l(v,n+1)){v.ch=n;continue}s.lastIndex=n,v.ch=n;var d=s.exec(v.text);if(d&&d.index==n)return d}}function p(v){for(;;){s.lastIndex=v.ch;var n=s.exec(v.text);if(!n){if(i(v))continue;return}if(!l(v,n.index+1)){v.ch=n.index+1;continue}return v.ch=n.index+n[0].length,n}}function m(v){for(;;){var n=v.ch?v.text.lastIndexOf(">",v.ch-1):-1;if(n==-1){if(a(v))continue;return}if(!l(v,n+1)){v.ch=n;continue}var d=v.text.lastIndexOf("/",n),h=d>-1&&!/\S/.test(v.text.slice(d+1,n));return v.ch=n+1,h?"selfClose":"regular"}}function b(v,n){for(var d=[];;){var h=p(v),C,T=v.line,o=v.ch-(h?h[0].length:0);if(!h||!(C=r(v)))return;if(C=="selfClose")continue;if(h[1]){for(var P=d.length-1;P>=0;--P)if(d[P]==h[2]){d.length=P;break}if(P<0&&(!n||n==h[2]))return{tag:h[2],from:c(T,o),to:c(v.line,v.ch)}}else d.push(h[2])}}function g(v,n){for(var d=[];;){var h=m(v);if(!h)return;if(h=="selfClose"){u(v);continue}var C=v.line,T=v.ch,o=u(v);if(!o)return;if(o[1])d.push(o[2]);else{for(var P=d.length-1;P>=0;--P)if(d[P]==o[2]){d.length=P;break}if(P<0&&(!n||n==o[2]))return{tag:o[2],from:c(v.line,v.ch),to:c(C,T)}}}}L.registerHelper("fold","xml",function(v,n){for(var d=new w(v,n.line,0);;){var h=p(d);if(!h||d.line!=n.line)return;var C=r(d);if(!C)return;if(!h[1]&&C!="selfClose"){var T=c(d.line,d.ch),o=b(d,h[2]);return o&&S(o.from,T)>0?{from:T,to:o.from}:null}}}),L.findMatchingTag=function(v,n,d){var h=new w(v,n.line,n.ch,d);if(h.text.indexOf(">")==-1&&h.text.indexOf("<")==-1)return;var C=r(h),T=C&&c(h.line,h.ch),o=C&&u(h);if(!C||!o||S(h,n)>0)return;var P={from:c(h.line,h.ch),to:T,tag:o[2]};return C=="selfClose"?{open:P,close:null,at:"open"}:o[1]?{open:g(h,o[2]),close:P,at:"close"}:(h=new w(v,T.line,T.ch,d),{open:P,close:b(h,o[2]),at:"open"})},L.findEnclosingTag=function(v,n,d,h){for(var C=new w(v,n.line,n.ch,d);;){var T=g(C,h);if(!T)break;var o=new w(v,n.line,n.ch,d),P=b(o,T.tag);if(P)return{open:T,close:P}}},L.scanForClosingTag=function(v,n,d,h){var C=new w(v,n.line,n.ch,h?{from:0,to:h}:null);return b(C,d)}})},p5ED:function(I,Y,k){"use strict";var L=k("+L6B"),c=k("2/Rp"),S=k("5Dmo"),R=k("3S7+"),f=k("k1fw"),s=k("tJVT"),w=k("cDcd"),l=k.n(w),i=k("vHTk"),a=k.n(i),r=k("yEEn"),u=k("ZW9T"),p=k("1vsH");Y.a=function(m){var b=m.name,g=m.data,v=m.theme,n=m.type,d=m.filename,h=m.monacoEditor,C=m.className,T=m.style,o=m.close,P=m.onClose,O=m.hasMask,y=Object(w.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),x=Object(s.a)(y,2),E=x[0],_=x[1],N=Object(w.useState)(""),j=Object(s.a)(N,2),M=j[0],H=j[1],z,F=1024*1024,G=10*F,B=Object(w.useRef)();n==="office"&&(z=Object(p.V)(g).filesize,z>G&&(n="other")),d&&(h.filename=d),Object(w.useEffect)(function(){var J,ee,Z=(J=document.cookie)===null||J===void 0||((ee=J.replace(/\s/g,""))===null||ee===void 0)?void 0:ee.split(";");Z==null||Z.map(function(he){var ge=he.split("=");ge[0]==="_educoder_session"&&H(ge[1])})},[]);var K=function(){if(g.startsWith("http")||g.startsWith("blob:")){W();return}Object(p.z)(d||"educoder",g,d)},W=function(){Object(p.x)(d||"educoder",decodeURIComponent(g))};return console.log("data:",g,"fileanme:",d," name:",b),l.a.createElement("div",{style:Object(f.a)({},T||{}),className:"".concat(O&&a.a.bgBlack," ").concat(n?a.a.wrp:"hide")},o&&l.a.createElement("div",{className:a.a.close,ref:B},l.a.createElement(R.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return B.current}},l.a.createElement("span",{onClick:W},l.a.createElement("i",{className:"icon-quxiaozhiding"}))),l.a.createElement(R.a,{title:"\u5173\u95ED",getPopupContainer:function(){return B.current}},l.a.createElement("span",{className:"",onClick:P},l.a.createElement("i",{className:"icon-guanbi1"})))),l.a.createElement("div",{className:"".concat(a.a[C]," ").concat(C," ").concat(a.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&l.a.createElement(u.b,h)),n==="audio"&&l.a.createElement("audio",{src:"".concat(g!=null&&g.startsWith("/")||(g==null?void 0:g.indexOf("https://"))>-1?g:"data:audio/mp3;base64,").concat(g),autoPlay:!0}),n==="video"&&l.a.createElement(l.a.Fragment,null,g!=null&&g.startsWith("/")?l.a.createElement("video",{controls:!0,src:"".concat(g),autoPlay:!0}):l.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(g),autoPlay:!0})),n==="html"&&l.a.createElement("iframe",{src:g+"&disposition=inline"}),n==="html"&&l.a.createElement("iframe",{src:g+"&disposition=inline"}),n==="pdf"&&l.a.createElement("embed",{className:a.a.embed,src:g}),n==="image"&&l.a.createElement(l.a.Fragment,null,l.a.createElement("img",{src:"".concat(g!=null&&g.startsWith("/")||(g==null?void 0:g.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(g)})),n==="other"&&l.a.createElement("div",null,l.a.createElement(c.a,{type:"primary",size:"large",onClick:K},l.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&l.a.createElement(c.a,{type:"primary",size:"large",onClick:K},l.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(I,Y,k){},pA7S:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.WordArray,f=S.BlockCipher,s=c.algo,w=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],i=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=[{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],u=s.DES=f.extend({_doReset:function(){for(var g=this._key,v=g.words,n=[],d=0;d<56;d++){var h=w[d]-1;n[d]=v[h>>>5]>>>31-h%32&1}for(var C=this._subKeys=[],T=0;T<16;T++){for(var o=C[T]=[],P=i[T],d=0;d<24;d++)o[d/6|0]|=n[(l[d]-1+P)%28]<<31-d%6,o[4+(d/6|0)]|=n[28+(l[d+24]-1+P)%28]<<31-d%6;o[0]=o[0]<<1|o[0]>>>31;for(var d=1;d<7;d++)o[d]=o[d]>>>(d-1)*4+3;o[7]=o[7]<<5|o[7]>>>27}for(var O=this._invSubKeys=[],d=0;d<16;d++)O[d]=C[15-d]},encryptBlock:function(g,v){this._doCryptBlock(g,v,this._subKeys)},decryptBlock:function(g,v){this._doCryptBlock(g,v,this._invSubKeys)},_doCryptBlock:function(g,v,n){this._lBlock=g[v],this._rBlock=g[v+1],p.call(this,4,252645135),p.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),p.call(this,1,1431655765);for(var d=0;d<16;d++){for(var h=n[d],C=this._lBlock,T=this._rBlock,o=0,P=0;P<8;P++)o|=a[P][((T^h[P])&r[P])>>>0];this._lBlock=T,this._rBlock=C^o}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,p.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),g[v]=this._lBlock,g[v+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(g,v){var n=(this._lBlock>>>g^this._rBlock)&v;this._rBlock^=n,this._lBlock^=n<<g}function m(g,v){var n=(this._rBlock>>>g^this._lBlock)&v;this._lBlock^=n,this._rBlock^=n<<g}c.DES=f._createHelper(u);var b=s.TripleDES=f.extend({_doReset:function(){var g=this._key,v=g.words;if(v.length!==2&&v.length!==4&&v.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var n=v.slice(0,2),d=v.length<4?v.slice(0,2):v.slice(2,4),h=v.length<6?v.slice(0,2):v.slice(4,6);this._des1=u.createEncryptor(R.create(n)),this._des2=u.createEncryptor(R.create(d)),this._des3=u.createEncryptor(R.create(h))},encryptBlock:function(g,v){this._des1.encryptBlock(g,v),this._des2.decryptBlock(g,v),this._des3.encryptBlock(g,v)},decryptBlock:function(g,v){this._des3.decryptBlock(g,v),this._des2.encryptBlock(g,v),this._des1.decryptBlock(g,v)},keySize:192/32,ivSize:64/32,blockSize:64/32});c.TripleDES=f._createHelper(b)}(),L.TripleDES})},qBft:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.AnsiX923={pad:function(c,S){var R=c.sigBytes,f=S*4,s=f-R%f,w=R+s-1;c.clamp(),c.words[w>>>2]|=s<<24-w%4*8,c.sigBytes+=s},unpad:function(c){var S=c.words[c.sigBytes-1>>>2]&255;c.sigBytes-=S}},L.pad.Ansix923})},qM6L:function(I,Y,k){(function(L,c){I.exports=Y=c(k("Ib8C"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.WordArray,f=c.enc,s=f.Utf16=f.Utf16BE={stringify:function(l){for(var i=l.words,a=l.sigBytes,r=[],u=0;u<a;u+=2){var p=i[u>>>2]>>>16-u%4*8&65535;r.push(String.fromCharCode(p))}return r.join("")},parse:function(l){for(var i=l.length,a=[],r=0;r<i;r++)a[r>>>1]|=l.charCodeAt(r)<<16-r%2*16;return R.create(a,i*2)}};f.Utf16LE={stringify:function(l){for(var i=l.words,a=l.sigBytes,r=[],u=0;u<a;u+=2){var p=w(i[u>>>2]>>>16-u%4*8&65535);r.push(String.fromCharCode(p))}return r.join("")},parse:function(l){for(var i=l.length,a=[],r=0;r<i;r++)a[r>>>1]|=w(l.charCodeAt(r)<<16-r%2*16);return R.create(a,i*2)}};function w(l){return l<<8&4278255360|l>>>8&16711935}}(),L.enc.Utf16})},qu8F:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return L.mode.CTRGladman=function(){var c=L.lib.BlockCipherMode.extend();function S(s){if((s>>24&255)===255){var w=s>>16&255,l=s>>8&255,i=s&255;w===255?(w=0,l===255?(l=0,i===255?i=0:++i):++l):++w,s=0,s+=w<<16,s+=l<<8,s+=i}else s+=1<<24;return s}function R(s){return(s[0]=S(s[0]))===0&&(s[1]=S(s[1])),s}var f=c.Encryptor=c.extend({processBlock:function(s,w){var l=this._cipher,i=l.blockSize,a=this._iv,r=this._counter;a&&(r=this._counter=a.slice(0),this._iv=void 0),R(r);var u=r.slice(0);l.encryptBlock(u,0);for(var p=0;p<i;p++)s[w+p]^=u[p]}});return c.Decryptor=f,c}(),L.mode.CTRGladman})},"rAM+":function(I,Y,k){"use strict";k.d(Y,"a",function(){return c});var L=k("Qw5x");function c(S,R){var f;if(typeof Symbol=="undefined"||S[Symbol.iterator]==null){if(Array.isArray(S)||(f=Object(L.a)(S))||R&&S&&typeof S.length=="number"){f&&(S=f);var s=0,w=function(){};return{s:w,n:function(){return s>=S.length?{done:!0}:{done:!1,value:S[s++]}},e:function(u){throw u},f:w}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l=!0,i=!1,a;return{s:function(){f=S[Symbol.iterator]()},n:function(){var u=f.next();return l=u.done,u},e:function(u){i=!0,a=u},f:function(){try{!l&&f.return!=null&&f.return()}finally{if(i)throw a}}}}},rUJ1:function(I,Y){const k=/[&<>"']/,L=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,R={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},f=O=>R[O];function s(O,y){if(y){if(k.test(O))return O.replace(L,f)}else if(c.test(O))return O.replace(S,f);return O}const w=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(O){return O.replace(w,(y,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const i=/(^|[^\[])\^/g;function a(O,y){O=O.source||O,y=y||"";const x={replace:(E,_)=>(_=_.source||_,_=_.replace(i,"$1"),O=O.replace(E,_),x),getRegex:()=>new RegExp(O,y)};return x}const r=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(O,y,x){if(O){let E;try{E=decodeURIComponent(l(x)).replace(r,"").toLowerCase()}catch(_){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}y&&!u.test(x)&&(x=n(y,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(E){return null}return x}const m={},b=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(O,y){m[" "+O]||(b.test(O)?m[" "+O]=O+"/":m[" "+O]=T(O,"/",!0)),O=m[" "+O];const x=O.indexOf(":")===-1;return y.substring(0,2)==="//"?x?y:O.replace(g,"$1")+y:y.charAt(0)==="/"?x?y:O.replace(v,"$1")+y:O+y}const d={exec:function(){}};function h(O){let y=1,x,E;for(;y<arguments.length;y++){x=arguments[y];for(E in x)Object.prototype.hasOwnProperty.call(x,E)&&(O[E]=x[E])}return O}function C(O,y){const x=O.replace(/\|/g,(N,j,M)=>{let H=!1,z=j;for(;--z>=0&&M[z]==="\\";)H=!H;return H?"|":" |"}),E=x.split(/ \|/);let _=0;if(E.length>y)E.splice(y);else for(;E.length<y;)E.push("");for(;_<E.length;_++)E[_]=E[_].trim().replace(/\\\|/g,"|");return E}function T(O,y,x){const E=O.length;if(E===0)return"";let _=0;for(;_<E;){const N=O.charAt(E-_-1);if(N===y&&!x)_++;else if(N!==y&&x)_++;else break}return O.substr(0,E-_)}function o(O,y){if(O.indexOf(y[1])===-1)return-1;const x=O.length;let E=0,_=0;for(;_<x;_++)if(O[_]==="\\")_++;else if(O[_]===y[0])E++;else if(O[_]===y[1]&&(E--,E<0))return _;return-1}function P(O){O&&O.sanitize&&!O.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}I.exports={escape:s,unescape:l,edit:a,cleanUrl:p,resolveUrl:n,noopTest:d,merge:h,splitCells:C,rtrim:T,findClosingBracket:o,checkSanitizeDeprecation:P}},rWjI:function(I,Y,k){"use strict";k.r(Y),k.d(Y,"Types",function(){return Ht});var L=k("P2fV"),c=k("NJEC"),S=k("CiB2"),R=k("DYRE"),f=k("zeV3"),s=k("sRBo"),w=k("kaz8"),l=k("7Kak"),i=k("9yH6"),a=k("giR+"),r=k("fyUT"),u=k("OaEy"),p=k("2fM7"),m=k("oBTY"),b=k("rAM+"),g=k("T2oS"),v=k("W9HT"),n=k("g9YV"),d=k("wCAj"),h=k("+L6B"),C=k("2/Rp"),T=k("14J3"),o=k("BMrR"),P=k("jCWc"),O=k("kPKH"),y=k("miYZ"),x=k("tsqr"),E=k("9og8"),_=k("y8nQ"),N=k("Vl3Y"),j=k("tJVT"),M=k("k1fw"),H=k("fu2T"),z=k("gK9i"),F=k("2qtc"),G=k("kLXV"),B=k("5NDa"),K=k("5rEg"),W=k("WmNS"),J=k.n(W),ee=k("cDcd"),Z=k.n(ee),he=k("eRFJ"),ge=k.n(he),ie=k("jrin"),we,me=p.a.Option,oe;(function(vt){vt[vt.language=0]="language",vt[vt.difficulty=1]="difficulty",vt[vt.category=2]="category",vt[vt.openOrNot=3]="openOrNot"})(oe||(oe={}));var se=(we={},Object(ie.a)(we,oe.language,[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}]),Object(ie.a)(we,oe.difficulty,[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}]),Object(ie.a)(we,oe.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(ie.a)(we,oe.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),we);function te(vt){return se[vt].map(function(_t){return Z.a.createElement(me,{key:_t.title,value:_t.key}," ",_t.title," ")})}function be(vt,_t){vt.map(function(mt){var mr=mt.id,Cr=mt.name,Bt=mt.sub_disciplines,Rt={value:mr,label:Cr};_t.push(Rt),Bt&&Bt.length>0&&(Rt.children=[],be(Bt,Rt.children))})}function q(vt,_t){for(var mt=[],mr=0;mr<vt.length;mr++){var Cr,Bt=vt[mr];if(((Cr=Bt.sub_disciplines)===null||Cr===void 0?void 0:Cr.length)>0){mt[0]=Bt.id;for(var Rt=0;Rt<Bt.sub_disciplines.length;Rt++){var Er=Bt.sub_disciplines[Rt];if(Er.id===_t)return mt[1]=Er.id,[mt,Er.tag_disciplines||Er.sub_disciplines||[]]}}}return[mt,[]]}var ae=k("Ty5D"),xe=k("9kvl"),ne=k("J66h"),Q=k("GIiI"),X=k("2BaD"),$=k("Ot1p"),pe=k("ErOA");function de(vt){return Object(pe.f)("practices.json",vt)}function Ce(){return Object(pe.c)("problems/new.json")}function ze(vt){return Object(pe.c)("practices/".concat(vt,"/edit.json"))}function qe(vt,_t){return Object(pe.g)("practices/".concat(vt),_t)}function Ye(vt,_t){return Object(pe.f)("exercises/".concat(vt,"/exercise_questions.json"),_t)}function Ve(vt,_t){return Object(pe.g)("exercise_questions/".concat(vt,".json"),_t)}var et=k("cDPC"),rt=k("bbsP"),Me=k("/wGt"),Se=k("0Owb"),Ge=k("ZW9T"),tt=k("ZD9Y"),Ue=k("M8RZ"),Xe=k("bCnd"),Pe=k("1T2W"),Te=k.n(Pe),Ae={theme:Object(Xe.a)("cmCodeMode","vs-dark"),fontSize:Object(Xe.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(Xe.a)("cmTabToSpace",!0)},ce;(function(vt){vt[vt.set_font_size=0]="set_font_size",vt[vt.set_theme=1]="set_theme",vt[vt.on_tab_to_space=2]="on_tab_to_space",vt[vt.set_show_editor_setting=3]="set_show_editor_setting"})(ce||(ce={}));function Ee(vt,_t){switch(_t.type){case ce.set_show_editor_setting:return Object(M.a)(Object(M.a)({},vt),{},{showEditorSetting:_t.payload});case ce.set_theme:return Object(M.a)(Object(M.a)({},vt),{},{theme:_t.payload});case ce.set_font_size:return Object(M.a)(Object(M.a)({},vt),{},{fontSize:_t.payload});case ce.on_tab_to_space:return Object(M.a)(Object(M.a)({},vt),{},{tabToSpace:_t.payload});default:throw new Error}}var _e=function(vt){var _t=vt.value,mt=vt.onChange,mr=vt.language,Cr=vt.onLanguage,Bt=vt.languageItems,Rt=vt.ActionBarRender,Er=Rt===void 0?function(Or){return Z.a.createElement(De,{languageItems:Bt,onLanguage:Cr,language:mr,onShowCodeSetting:Or})}:Rt,yn=Object(ee.useReducer)(Ee,Ae),Ir=Object(j.a)(yn,2),ut=Ir[0],Mt=Ir[1],Wr=ut.theme,tn=ut.fontSize,Sn=ut.showEditorSetting,bn=ut.tabToSpace;console.log(_t,mr,"value");var Hr={onFontSizeChange:function(sr){Mt({type:ce.set_font_size,payload:sr}),Object(Xe.b)("cmFontSize",sr)},tabToSpace:bn,cmFontSize:tn,className:"oj",cmCodeMode:Wr,onTabToSpace:function(sr){Mt({type:ce.on_tab_to_space,payload:sr}),Object(Xe.b)("cmTabToSpace",sr)},onCodeModeChange:function(sr){Mt({type:ce.set_theme,payload:sr}),Object(Xe.b)("cmCodeMode",sr)}};function Ot(){Mt({type:ce.set_show_editor_setting,payload:!1})}function dn(){Mt({type:ce.set_show_editor_setting,payload:!0})}var Kr={value:_t,language:mr,onChange:mt,theme:Wr,height:"calc(100% - 56px)",options:{fontSize:tn,insertSpaces:bn}};return Z.a.createElement(ee.Fragment,null,Z.a.createElement("div",{className:Te.a["code-panel-container"]},Er(dn),Z.a.createElement(Ge.b,Object(Se.a)({key:mr},Kr))),Z.a.createElement(Ue.a,null,Z.a.createElement(Me.a,{className:"oj",title:null,placement:"right",closable:!1,visible:Sn,onClose:Ot},Z.a.createElement(tt.a,Hr))))};function De(vt){var _t=vt.languageItems,mt=vt.language,mr=vt.onShowCodeSetting,Cr=vt.onLanguage;return Z.a.createElement("div",{className:Te.a["action-oj-bar"]},_t==null?void 0:_t.map(function(Bt){return Z.a.createElement("div",{className:mt===(Bt==null?void 0:Bt.language)?Te.a.active:"",onClick:function(){return Cr(Bt==null?void 0:Bt.language)},key:Bt==null?void 0:Bt.language},Bt==null?void 0:Bt.language)}),Z.a.createElement("a",{onClick:mr},Z.a.createElement("i",{className:"iconfont icon-shezhi"})))}var je=k("Znn+"),$e=k("ZTPi"),at=k("L9qf"),it=k.n(at),st=function(_t){var mt=_t.visible,mr=_t.onOK,Cr=_t.onCancel,Bt=Object(ee.useState)(!1),Rt=Object(j.a)(Bt,2),Er=Rt[0],yn=Rt[1],Ir=Object(ee.useState)(!1),ut=Object(j.a)(Ir,2),Mt=ut[0],Wr=ut[1],tn=Object(ee.useState)("1"),Sn=Object(j.a)(tn,2),bn=Sn[0],Hr=Sn[1],Ot=Object(ee.useState)(""),dn=Object(j.a)(Ot,2),Kr=dn[0],Or=dn[1],sr=Object(ee.useState)([]),ta=Object(j.a)(sr,2),Ln=ta[0],ft=ta[1],ca=function(){var an=Object(E.a)(J.a.mark(function rr(){var $r;return J.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(Kr){Kt.next=3;break}return x.b.warn("\u9898\u76EE".concat(En,"\u4E0D\u80FD\u4E3A\u7A7A")),Kt.abrupt("return");case 3:return Wr(!0),Kt.next=6,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:mt,name:Kr}});case 6:if($r=Kt.sent,!(($r==null?void 0:$r.status)===0)){Kt.next=10;break}return mr(),Kt.abrupt("return");case 10:Wr(!1);case 11:case"end":return Kt.stop()}},rr)}));return function(){return an.apply(this,arguments)}}(),ra=function(){var an=Object(E.a)(J.a.mark(function rr(){var $r,tr,Kt=arguments;return J.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:return $r=Kt.length>0&&Kt[0]!==void 0?Kt[0]:"",yn(!0),xr.next=4,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:mt,search:$r}});case 4:tr=xr.sent,ft(tr.tag_disciplines||[]),yn(!1);case 7:case"end":return xr.stop()}},rr)}));return function(){return an.apply(this,arguments)}}(),An=function(rr){var $r=rr.name;G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:Z.a.createElement("div",null,Z.a.createElement(K.a,{defaultValue:$r,placeholder:"\u8BF7\u8F93\u5165".concat(En,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(Kt){$r=Kt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var tr=Object(E.a)(J.a.mark(function Zt(){var xr;return J.a.wrap(function(Jr){for(;;)switch(Jr.prev=Jr.next){case 0:if($r){Jr.next=3;break}return x.b.warn("\u9898\u76EE".concat(En,"\u4E0D\u80FD\u4E3A\u7A7A")),Jr.abrupt("return",Promise.reject());case 3:return Jr.next=5,Object(pe.a)("/api/tag_disciplines/".concat(rr.id,"/rename.json"),{method:"post",body:{id:rr.id,name:$r}});case 5:xr=Jr.sent,(xr==null?void 0:xr.status)===0&&ra();case 7:case"end":return Jr.stop()}},Zt)}));function Kt(){return tr.apply(this,arguments)}return Kt}()})},Lr=function(rr){G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:mt==="practice"?Z.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",Z.a.createElement("span",{className:"c-light-primary"},rr.name),"\u201D\u5220\u9664\u5417\uFF1F",Z.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):Z.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",Z.a.createElement("span",{className:"c-light-primary"},rr.name),"\u201D\u5220\u9664\u5417\uFF1F",Z.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var $r=Object(E.a)(J.a.mark(function Kt(){var Zt;return J.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:return Nr.next=2,Object(pe.a)("/api/tag_disciplines/".concat(rr.id,".json"),{method:"delete",body:{id:rr.id}});case 2:Zt=Nr.sent,(Zt==null?void 0:Zt.status)===0&&ra();case 4:case"end":return Nr.stop()}},Kt)}));function tr(){return $r.apply(this,arguments)}return tr}()})},Fn=function(rr){ra(rr)},En=mt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return Z.a.createElement(G.a,{afterClose:function(){Wr(!1),yn(!1),Or(""),Hr("1"),ft([])},centered:!0,keyboard:!1,width:600,title:"".concat(En,"\u7BA1\u7406"),visible:!!mt,className:it.a.customModal,footer:null,onCancel:Cr},Z.a.createElement("section",{className:it.a.wrap},Z.a.createElement($e.a,{activeKey:bn,onChange:function(rr){Or(""),Hr(rr),ra()}},Z.a.createElement($e.a.TabPane,{tab:"\u65B0\u589E".concat(En),key:"1"},Z.a.createElement(K.a,{value:Kr,onChange:function(rr){return Or(rr.target.value)},className:it.a.in,placeholder:"\u8F93\u5165".concat(En,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),Z.a.createElement("div",{className:it.a.btns},Z.a.createElement(C.a,{onClick:Cr,className:"mr20"},"\u53D6\u6D88 "),Z.a.createElement(C.a,{loading:Mt,onClick:ca,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),Z.a.createElement($e.a.TabPane,{tab:"\u5DF2\u6709".concat(En),key:"2"},Z.a.createElement(K.a.Search,{allowClear:!0,onSearch:Fn,value:Kr,onChange:function(rr){return Or(rr.target.value)},className:it.a.in,placeholder:"\u8F93\u5165".concat(En,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),Z.a.createElement(d.a,{dataSource:Ln,bordered:!1,loading:Er,scroll:Ln.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(En,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(rr,$r){return Z.a.createElement("span",null,Z.a.createElement("span",{onClick:function(){return An($r)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),Z.a.createElement("span",{onClick:function(){return Lr($r)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},Je=st,gt=k("m3rI"),yt=k("B7Ph"),ct=k("wd/R"),Lt=k.n(ct),kt=k("1vsH"),Ct=k("9Bee"),Ft=k("xKgJ"),Et=K.a.TextArea,ir=G.a.confirm,Yt=z.a.Panel,It={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},Ht;(function(vt){vt[vt.SET_INITAL_DATA=0]="SET_INITAL_DATA",vt[vt.SET_LOADING=1]="SET_LOADING",vt[vt.SET_STATUS=2]="SET_STATUS"})(Ht||(Ht={}));var Ur="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function cn(vt,_t){switch(_t.type){case Ht.SET_INITAL_DATA:return Object(M.a)(Object(M.a)({},vt),_t.payload);case Ht.SET_LOADING:return Object(M.a)(Object(M.a)({},vt),{},{loading:_t.payload});case Ht.SET_STATUS:return Object(M.a)(Object(M.a)({},vt),{},{status:_t.payload});default:throw new Error}}var gr=Y.default=function(){var vt,_t,mt,mr=Object(ae.h)(),Cr=Object(ae.g)(),Bt=Object(ae.i)(),Rt=Bt.id,Er=N.a.useForm(),yn=Object(j.a)(Er,1),Ir=yn[0],ut=Object(ee.useState)(),Mt=Object(j.a)(ut,2),Wr=Mt[0],tn=Mt[1],Sn=Object(ee.useState)(!1),bn=Object(j.a)(Sn,2),Hr=bn[0],Ot=bn[1],dn=Object(ee.useState)([]),Kr=Object(j.a)(dn,2),Or=Kr[0],sr=Kr[1],ta=Object(ee.useState)([]),Ln=Object(j.a)(ta,2),ft=Ln[0],ca=Ln[1],ra=Object(ee.useState)([]),An=Object(j.a)(ra,2),Lr=An[0],Fn=An[1],En=Object(ee.useState)([]),an=Object(j.a)(En,2),rr=an[0],$r=an[1],tr=Object(ee.useState)([]),Kt=Object(j.a)(tr,2),Zt=Kt[0],xr=Kt[1],Nr=Object(ee.useState)("C"),Jr=Object(j.a)(Nr,2),on=Jr[0],Ma=Jr[1],ei=Object(ee.useReducer)(cn,It),Ga=Object(j.a)(ei,2),na=Ga[0],sn=Ga[1],Xa=na.loading,zr=na.data,aa=na.user,Pn=na.status,fn=zr==null?void 0:zr.hack_sets,Cn=zr==null||((vt=zr.hack)===null||vt===void 0)?void 0:vt.test_set_average,Va=Object(ee.useState)(!1),da=Object(j.a)(Va,2),ia=da[0],Fa=da[1],Sa=Object(ee.useRef)([]),_n=Object(ee.useState)(!1),fa=Object(j.a)(_n,2),ha=fa[0],Gn=fa[1],ya=Object(ee.useState)(!1),Bn=Object(j.a)(ya,2),Ca=Bn[0],kn=Bn[1],oa=Object(ee.useRef)(!0),sa=Object(ee.useState)({}),Xn=Object(j.a)(sa,2),Dr=Xn[0],Ya=Xn[1];Object(ee.useEffect)(function(){return Object(xe.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(xe.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(xe.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(xe.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(ee.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var ti=function(){var Xt=Object(E.a)(J.a.mark(function St(){var er,nr;return J.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return er=hr.sent,hr.next=5,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:nr=hr.sent,ca(er.tag_disciplines||[]),Fn(nr.tag_disciplines||[]);case 8:case"end":return hr.stop()}},St)}));return function(){return Xt.apply(this,arguments)}}(),La=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],$a=Object(ee.useCallback)(Object(E.a)(J.a.mark(function Xt(){var St,er,nr,kr,hr,pn,rn,_a,Rn,In,Wn,Ka,Re,Be,Ke,Le,fe,Oe,ye,ke,Ne,He,We,Qe,ot,pt,ht;return J.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(sn({type:Ht.SET_LOADING,payload:!0}),!Rt){Wt.next=19;break}return Wt.next=4,ze(Rt);case 4:St=Wt.sent,er=St.user,nr=St.language,kr=St.practice_sets,hr=St.practice_codes,pn=St.description,rn=St.difficulty,_a=St.name,Rn=St.open_or_not,In=St.time_limit,Wn=St.test_set_average,Ka=St.test_set_score,Re=St.status,Be=St.tag_discipline_ids,Ke=St.source_discipline_ids,Le=St.item_banks_group_id,fe=St.is_file,Oe=fe===void 0?!1:fe,ye=St.hide_actual_output,ke=St.review_privilege,Ne=St.review_description,He={review_privilege:ke,status:Re,review_description:Ne,name:_a},Ya(He),Fa(ye),We=Oe?[{input:"",output:"",score:100,position:1}]:kr,Oe?(sr(kr),Ir.setFieldsValue({hack_sets:We})):sr([]),Qe={loading:!0,user:er,status:Re,data:{hack:{difficulty:rn,name:_a,description:pn,open_or_not:Rn,time_limit:In,test_set_average:Wn,test_set_score:Ka,tag_discipline_ids:Be,source_discipline_ids:Ke,is_file:Oe},hack_sets:We}},sn({type:Ht.SET_INITAL_DATA,payload:Qe}),tn({hack:{difficulty:rn,name:_a,description:pn,open_or_not:Rn,time_limit:In,test_set_average:Wn,test_set_score:Ka,tag_discipline_ids:Be,source_discipline_ids:Ke,is_file:Oe}}),ot=hr==null?void 0:hr.map(function(ar){return Object(M.a)(Object(M.a)({},ar),{},{code:ne.Base64.decode(ar==null?void 0:ar.code)})}),xr(ot),Sa.current=ot,Wt.next=27;break;case 19:return Wt.next=21,Ce();case 21:pt=Wt.sent,ht=pt.user,sn({type:Ht.SET_INITAL_DATA,payload:{loading:!0,status:0,user:ht,data:{hack:{difficulty:"",time_limit:3,description:Ur,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),tn({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),xr(La),Sa.current=La;case 27:sn({type:Ht.SET_LOADING,payload:!1});case 28:case"end":return Wt.stop()}},Xt)})),[Rt]);Object(ee.useEffect)(function(){try{$a(),ti()}catch(Xt){console.log(Xt,"----")}},[]);function Ba(Xt,St){return Dt.apply(this,arguments)}function Dt(){return Dt=Object(E.a)(J.a.mark(function Xt(St,er){var nr,kr,hr,pn,rn,_a,Rn,In,Wn,Ka,Re,Be,Ke,Le,fe,Oe,ye,ke;return J.a.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:kr=Object(M.a)({},St),hr=kr.hack_sets,pn=kr.hack,pn.hide_actual_output=ia,rn=[],_a=[],Rn=0,In=pn!=null&&pn.is_file?Or.map(function(We,Qe){return Object(M.a)(Object(M.a)({},We),{},{position:Qe+1})}):hr.map(function(We){return Object(M.a)(Object(M.a)({},We),{},{is_file:!1})}),Wn=Object(b.a)(In);try{for(Wn.s();!(Ka=Wn.n()).done;)Re=Ka.value,Rn+=Re.score,Re.id&&Re.id>=0?rn.push(Re):_a.push(Re)}catch(We){Wn.e(We)}finally{Wn.f()}if(In!=null&&In.length){He.next=11;break}return x.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),He.abrupt("return");case 11:if(!(Rn!==100&&!pn.test_set_score)){He.next=14;break}return x.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),He.abrupt("return");case 14:if(!(In!=null&&In.some(function(We){return!We.output}))){He.next=17;break}return x.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),He.abrupt("return");case 17:if(oa.current?Gn(!0):kn(!0),Ke=Zt==null?void 0:Zt.map(function(We){return Object(M.a)(Object(M.a)({},We),{},{code:ne.Base64.encode(We==null?void 0:We.code)})}),!Rt){He.next=25;break}return He.next=22,qe(Rt,{practice:pn,practice_codes:Ke,practice_sets:_a,update_practice_sets:rn});case 22:Be=He.sent,He.next=28;break;case 25:return He.next=27,de({practice:pn,practice_codes:Ke,practice_sets:In,publish:!oa.current});case 27:Be=He.sent;case 28:if(Gn(!1),kn(!1),!(((nr=Be)===null||nr===void 0?void 0:nr.status)===0)){He.next=46;break}if(!((Le=Be)!==null&&Le!==void 0&&(fe=Le.similar_practice)!==null&&fe!==void 0&&fe.length)){He.next=35;break}return Ot(!0),$r((Oe=Be)===null||Oe===void 0?void 0:Oe.similar_practice),He.abrupt("return");case 35:if(!Rt){He.next=44;break}if(x.b.success("\u4FDD\u5B58\u6210\u529F"),oa.current){He.next=42;break}return He.next=40,Object(pe.a)("/api/practices/".concat(Rt,"/start"),{method:"get"});case 40:ye=He.sent,(ye==null?void 0:ye.status)===0&&Cr.push("/problems/".concat(ye==null?void 0:ye.identifier,"/oj/").concat(Rt));case 42:He.next=46;break;case 44:x.b.success("\u65B0\u5EFA\u6210\u529F"),Cr.replace("/problems/".concat((ke=Be)===null||ke===void 0?void 0:ke.identifier,"/ojedit"));case 46:case"end":return He.stop()}},Xt)})),Dt.apply(this,arguments)}function $t(){Cr.replace("/problems")}var Ut=function(St){var er=Math.floor(100/St.length),nr=er+100%St.length;St=St.map(function(kr,hr){return hr===St.length-1?Object(M.a)(Object(M.a)({},kr),{},{score:nr}):Object(M.a)(Object(M.a)({},kr),{},{score:er})}),sr(St)};function lr(Xt){Xt.target.value||Ut(Or),sn({type:Ht.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},zr),{},{hack:Object(M.a)(Object(M.a)({},zr.hack),{},{test_set_score:Xt.target.value})})}})}function yr(Xt){sn({type:Ht.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},zr),{},{hack:Object(M.a)(Object(M.a)({},zr.hack),{},{is_file:Xt.target.value})})}})}function Pr(Xt){Fa(Xt.target.checked)}function dr(Xt){var St=Xt.target.value;St&&Ut(Or),sn({type:Ht.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},zr),{},{hack:Object(M.a)(Object(M.a)({},zr.hack),{},{test_set_average:St})})}})}function Gr(){var Xt=Ir.getFieldValue("hack_sets"),St=Xt.length+1,er=Math.floor(100/St),nr=100%St;Xt.map(function(kr,hr){return Cn&&(kr.score=er),kr.position=hr+1,kr}),Xt.push({input:"",output:"",position:St,score:Cn?er+nr:0}),Ir.setFieldsValue({hack_sets:Xt}),sn({type:Ht.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},zr),{},{hack_sets:Xt})}})}Object(ee.useEffect)(function(){if(Cn){var Xt=fn==null?void 0:fn.length,St=Math.floor(100/Xt),er=100%Xt;fn==null||fn.map(function(nr,kr){return nr.score=St,nr.position=kr+1,kr===Xt-1&&(nr.score=St+er),nr}),sn({type:Ht.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},zr),{},{hack_sets:fn})}}),Ir.setFieldsValue({hack_sets:fn})}},[Cn]);function hn(Xt){var St=Ir.getFieldValue("hack_sets"),er=(St==null?void 0:St.length)-1,nr=Math.ceil(100/er),kr=100%er;St.splice(Xt,1),St==null||St.map(function(hr,pn){return Cn&&(hr.score=nr,pn===er-1&&(hr.score=nr+kr)),hr.position=pn+1,hr}),sn({type:Ht.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},zr),{},{hack_sets:St})}}),Ir.setFieldsValue({hack_sets:St})}function fr(Xt){Ma(Xt)}var pa=function(St){var er,nr=(er=Sa.current)===null||er===void 0?void 0:er.findIndex(function(kr){return kr.language===on});Sa.current[nr].code=St,xr(Sa.current)},Nt=function(St){tn(Object(M.a)({},Ir.getFieldsValue()))},qt=function(){var Xt=Object(E.a)(J.a.mark(function St(er){var nr;return J.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,Object(pe.a)("/api/practices/".concat(er,"/start"),{method:"get"});case 2:nr=hr.sent,(nr==null?void 0:nr.status)===0&&Object(kt.U)("/problems/".concat(nr==null?void 0:nr.identifier,"/oj/").concat(er));case 4:case"end":return hr.stop()}},St)}));return function(er){return Xt.apply(this,arguments)}}(),Jt=function(){var Xt=Object(E.a)(J.a.mark(function St(){var er,nr,kr,hr,pn,rn;return J.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:return Rn.next=2,ze(Rt);case 2:er=Rn.sent,nr=er.name,kr=er.status,hr=er.review_privilege,pn=er.review_description,rn={review_privilege:hr,status:kr,review_description:pn,name:nr},Ya(rn);case 6:case"end":return Rn.stop()}},St)}));return function(){return Xt.apply(this,arguments)}}(),Qr=function(){var St="";G.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:Z.a.createElement("div",{className:"mt20"},Z.a.createElement($.a,{className:ge.a.MdEditor,defaultValue:St,onChange:function(nr){St=nr}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var er=Object(E.a)(J.a.mark(function kr(){var hr;return J.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:if(St){rn.next=3;break}return x.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),rn.abrupt("return",Promise.reject());case 3:return rn.next=5,Object(pe.a)("/api/practices/".concat(Rt,"/review.json"),{method:"post",body:{op:"fail",description:St}});case 5:hr=rn.sent,(hr==null?void 0:hr.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),Jt());case 7:case"end":return rn.stop()}},kr)}));function nr(){return er.apply(this,arguments)}return nr}()})},Wa=function(){var Xt=Object(E.a)(J.a.mark(function St(){return J.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:"\u786E\u8BA4\u5C06\u9898\u76EE\u300A".concat(Dr==null?void 0:Dr.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var kr=Object(E.a)(J.a.mark(function pn(){var rn;return J.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:return Rn.next=2,Object(pe.a)("/api/practices/".concat(Rt,"/review.json"),{method:"post",body:{op:"pass"}});case 2:rn=Rn.sent,(rn==null?void 0:rn.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),Jt());case 4:case"end":return Rn.stop()}},pn)}));function hr(){return kr.apply(this,arguments)}return hr}()});case 1:case"end":return nr.stop()}},St)}));return function(){return Xt.apply(this,arguments)}}(),Ha=function(){var St=G.a.confirm({icon:null,width:700,className:"".concat(ge.a.cusModal," custom-modal-divider"),centered:!0,title:Z.a.createElement(o.a,null,Z.a.createElement(O.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),Z.a.createElement(O.a,null,Z.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return St.destroy()}}))),content:Z.a.createElement("div",null,Z.a.createElement(Ct.a,{className:"mt20",value:(Dr==null?void 0:Dr.review_description)||""}))})};return Z.a.createElement(v.a,{spinning:Xa,size:"large",className:ge.a["oj-custom-large-spin"]},zr?Z.a.createElement(ee.Fragment,null,Z.a.createElement("header",{className:ge.a.header},Z.a.createElement("div",null,Z.a.createElement("img",{src:"".concat(gt.a.IMG_SERVER,"/images/").concat(aa==null?void 0:aa.image_url),alt:"user",width:30}),Z.a.createElement("span",null,aa==null?void 0:aa.name)),Z.a.createElement("h2",null," ",zr==null||((_t=zr.hack)===null||_t===void 0)?void 0:_t.name," "),Rt?Z.a.createElement("a",{className:ge.a.btn_back,onClick:$t}," ",Z.a.createElement(Q.a,null),"\u9000\u51FA"):null),Z.a.createElement(N.a,{form:Ir,initialValues:zr,layout:"vertical",className:ge.a["oj-form-container"],onValuesChange:Nt,onFinish:Ba},Z.a.createElement(et.a,{hideResize:!0,className:ge.a["oj-problems"],leftChild:Z.a.createElement(zn,{formValue:Wr,onRemoveTestCase:hn,onAddTestCase:Gr,hack:zr.hack,onChangeScore:lr,onChangehide:Pr,onChangeAverage:dr,onChangeFile:yr,uploadData:Or,setUploadData:sr,handleUploadRatio:Ut,ischecked:ia,pointData:ft,sourceData:Lr,getPointData:ti}),rightChild:Z.a.createElement(_e,{value:Zt==null||((mt=Zt.find(function(Xt){return Xt.language===on}))===null||mt===void 0)?void 0:mt.code,onChange:pa,onLanguage:fr,languageItems:Zt,language:on})}),Z.a.createElement("div",{className:ge.a.footer},!!Rt&&Z.a.createElement("div",{className:ge.a.result},Z.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),Dr!=null&&Dr.review_privilege?Z.a.createElement(Z.a.Fragment,null,Z.a.createElement("div",{onClick:Wa,className:ge.a.pass},"\u901A\u8FC7"),Z.a.createElement("div",{onClick:Qr,className:ge.a.noPass},"\u4E0D\u901A\u8FC7")):Z.a.createElement(Z.a.Fragment,null,(Dr==null?void 0:Dr.status)===0&&Z.a.createElement("div",{className:ge.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(Dr==null?void 0:Dr.status)===1&&Z.a.createElement("div",{className:ge.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(Dr==null?void 0:Dr.status)===2&&Z.a.createElement("div",{className:ge.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(Dr==null?void 0:Dr.status)===3&&Z.a.createElement("div",{className:ge.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(Dr==null?void 0:Dr.status)===4&&Z.a.createElement("div",{className:ge.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(Dr==null?void 0:Dr.status)===5&&Z.a.createElement("div",{className:ge.a.noPassText},Z.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Z.a.createElement("span",{onClick:Ha},"\u67E5\u770B\u539F\u56E0")))),Z.a.createElement(C.a,{type:"primary",ghost:!0,onClick:$t},"\u9000\u51FA\u7F16\u8F91"),Z.a.createElement(C.a,{disabled:Ca,loading:ha,type:"primary",onClick:function(){oa.current=!0,Ir.submit()}},"\u4FDD\u5B58 "),Rt?Z.a.createElement(C.a,{disabled:ha,loading:Ca,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){oa.current=!1,Ir.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Z.a.createElement(C.a,{disabled:ha,loading:Ca,type:"primary",onClick:function(){oa.current=!1,Ir.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Z.a.createElement(G.a,{centered:!0,destroyOnClose:!0,footer:null,visible:Hr,onCancel:function(){return Ot(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},Z.a.createElement("div",null,Z.a.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),Z.a.createElement(d.a,{dataSource:rr,bordered:!1,scroll:rr.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(St,er){return Z.a.createElement("span",{onClick:function(){return qt(er==null?void 0:er.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},St)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(St){var er;return(er=Lt()(St))===null||er===void 0?void 0:er.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function zn(vt){var _t,mt,mr=vt.ischecked,Cr=vt.formValue,Bt=vt.hack,Rt=vt.onChangeAverage,Er=vt.onChangeScore,yn=vt.onChangehide,Ir=vt.onChangeFile,ut=vt.onAddTestCase,Mt=vt.onRemoveTestCase,Wr=vt.uploadData,tn=vt.setUploadData,Sn=vt.handleUploadRatio,bn=vt.pointData,Hr=vt.sourceData,Ot=vt.getPointData,dn=Bt.test_set_average,Kr=Bt.test_set_score,Or=Object(ee.useState)(!1),sr=Object(j.a)(Or,2),ta=sr[0],Ln=sr[1],ft=Object(ee.useState)(!1),ca=Object(j.a)(ft,2),ra=ca[0],An=ca[1],Lr=function(Kt,Zt){var xr=Object(m.a)(Wr);xr.splice(Zt,1),dn?Sn(xr):tn(xr)},Fn=function(Kt,Zt){console.log(Kt,Zt);var xr=Wr.map(function(Nr,Jr){return Jr===Zt?Object(M.a)(Object(M.a)({},Nr),{},{score:Kt.target.value?Number(Kt.target.value):0}):Nr});tn(xr)},En=function(Kt){var Zt=Wr.concat(Kt);Bt.test_set_average?Sn(Zt):tn(Zt)};function an(tr){tr.stopPropagation()}function rr(){if(Object(Ft.v)()){An("practice");return}var tr="";G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:Z.a.createElement("div",null,Z.a.createElement(K.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(Zt){tr=Zt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Kt=Object(E.a)(J.a.mark(function xr(){var Nr;return J.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:tr}});case 2:Nr=on.sent,(Nr==null?void 0:Nr.status)===0&&Ot();case 4:case"end":return on.stop()}},xr)}));function Zt(){return Kt.apply(this,arguments)}return Zt}()})}function $r(){if(Object(Ft.v)()){An("practice_source");return}var tr="";G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:Z.a.createElement("div",null,Z.a.createElement(K.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(Zt){tr=Zt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Kt=Object(E.a)(J.a.mark(function xr(){var Nr;return J.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:tr}});case 2:Nr=on.sent,(Nr==null?void 0:Nr.status)===0&&Ot();case 4:case"end":return on.stop()}},xr)}));function Zt(){return Kt.apply(this,arguments)}return Zt}()})}return Z.a.createElement("div",{className:ge.a["oj-left-panel"]},Z.a.createElement("div",{className:ge.a["oj-form-info"]},Z.a.createElement(N.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:ge.a.inputOne},Z.a.createElement(K.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Z.a.createElement("span",null,(Cr==null||((_t=Cr.hack)===null||_t===void 0||((mt=_t.name)===null||mt===void 0))?void 0:mt.length)||0,"/",Z.a.createElement("span",{className:"c-grey-999"},"60"))})),Z.a.createElement(N.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},Z.a.createElement($.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),Z.a.createElement("div",{className:ge.a.row},Z.a.createElement("div",{className:ge.a.a},Z.a.createElement(N.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},Z.a.createElement(p.a,null,te(oe.difficulty)))),Z.a.createElement("div",{className:ge.a.b},Z.a.createElement(N.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},Z.a.createElement(p.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Kt){return Kt.parentNode}},Hr.map(function(tr){return Z.a.createElement(p.a.Option,{key:tr.id,value:tr.id},tr.name)}))),Z.a.createElement(C.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return $r()}},Object(Ft.v)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Z.a.createElement("div",{className:ge.a.row},Z.a.createElement("div",{className:ge.a.b,style:{width:"100%",marginLeft:0}},Z.a.createElement(N.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},Z.a.createElement(p.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Kt){return Kt.parentNode}},bn.map(function(tr){return Z.a.createElement(p.a.Option,{key:tr.id,value:tr.id},tr.name)}))),Z.a.createElement(C.a,{type:"primary",ghost:!0,onClick:function(){return rr()}},Object(Ft.v)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Z.a.createElement("div",{className:ge.a.field},Z.a.createElement(N.a.Item,{label:"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],className:ge.a.inputTwo,extra:Z.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",Z.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},Z.a.createElement(r.a,{style:{width:185},min:3}))),Z.a.createElement("div",{className:"tst-case-info"},Z.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Bt.is_file&&Z.a.createElement(C.a,{style:{height:40},type:"primary",ghost:!0,onClick:ut},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Z.a.createElement(N.a.Item,{name:["hack","test_set_score"]},Z.a.createElement(i.a.Group,{onChange:Er},Z.a.createElement(i.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",Z.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),Z.a.createElement(i.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",Z.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),Z.a.createElement(w.a,{style:{marginBottom:"5px"},checked:mr,onChange:yn},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),Z.a.createElement(N.a.Item,{className:ge.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},Z.a.createElement(i.a.Group,{onChange:Ir},Z.a.createElement(f.a,{direction:"horizontal"},Z.a.createElement(i.a,{value:!1},"\u6587\u672C"),Z.a.createElement(i.a,{value:!0},"\u6587\u4EF6")))),!Bt.test_set_score&&Z.a.createElement(N.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},Z.a.createElement(i.a.Group,{onChange:Rt},Z.a.createElement(i.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Z.a.createElement(i.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Bt.is_file&&Z.a.createElement("div",{className:ge.a.upBtn},Z.a.createElement(C.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return Ln(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Z.a.createElement(yt.a,{disabled:Bt==null?void 0:Bt.test_set_average,inputChange:Fn,showScore:!Bt.test_set_score,data:Wr,onRemove:Lr})),!Bt.is_file&&Z.a.createElement(N.a.List,{name:"hack_sets"},function(tr,Kt){return Object(S.a)(Kt),Z.a.createElement(z.a,{accordion:!0},tr.map(function(Zt,xr){return Z.a.createElement(Yt,{key:"".concat(Zt.key,"--").concat(xr),header:Z.a.createElement("a",{className:ge.a["test-case-name"]},Z.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",xr+1),Kr?null:Z.a.createElement(Z.a.Fragment,null,Z.a.createElement(N.a.Item,{name:[Zt.name,"score"],fieldKey:[Zt.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(xr+1,"\u8BC4\u5206")}]},Z.a.createElement(r.a,{onClick:an,min:0,max:100,disabled:dn})),Z.a.createElement("span",null,"%"))),extra:xr>0?Z.a.createElement("div",{onClick:an},Z.a.createElement(c.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(xr+1),onConfirm:function(){Mt(xr)}},Z.a.createElement(X.a,{className:ge.a["btn-remove-case"]}))):null},Z.a.createElement(N.a.Item,{label:"\u8F93\u5165",name:[Zt.name,"input"],fieldKey:[Zt.fieldKey,"input"]},Z.a.createElement(Et,null)),Z.a.createElement(N.a.Item,{label:"\u8F93\u51FA",name:[Zt.name,"output"],fieldKey:[Zt.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Z.a.createElement(Et,null)))}))}))),Z.a.createElement(yt.b,{rootIdentifier:null,visible:ta,onClose:function(){return Ln(!1)},onOK:En}),Z.a.createElement(Je,{visible:ra,onCancel:function(){An(!1),Ot()},onOK:function(){An(!1),Ot()}}))}},rcnY:function(I,Y,k){var L=k("aRTE");function c(S,R){this.totalCount=S,this.dataCount=R}c.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],c.getRSBlocks=function(S,R){var f=c.getRsBlockTable(S,R);if(f==null)throw new Error("bad rs block @ typeNumber:"+S+"/errorCorrectLevel:"+R);for(var s=f.length/3,w=new Array,l=0;l<s;l++)for(var i=f[l*3+0],a=f[l*3+1],r=f[l*3+2],u=0;u<i;u++)w.push(new c(a,r));return w},c.getRsBlockTable=function(S,R){switch(R){case L.L:return c.RS_BLOCK_TABLE[(S-1)*4+0];case L.M:return c.RS_BLOCK_TABLE[(S-1)*4+1];case L.Q:return c.RS_BLOCK_TABLE[(S-1)*4+2];case L.H:return c.RS_BLOCK_TABLE[(S-1)*4+3];default:return}},I.exports=c},rdUC:function(I,Y,k){var L=k("MFOe"),c=L.Global;I.exports={name:"localStorage",read:R,write:f,each:s,remove:w,clearAll:l};function S(){return c.localStorage}function R(i){return S().getItem(i)}function f(i,a){return S().setItem(i,a)}function s(i){for(var a=S().length-1;a>=0;a--){var r=S().key(a);i(R(r),r)}}function w(i){return S().removeItem(i)}function l(){return S().clear()}},sR1s:function(I,Y,k){"use strict";k.d(Y,"b",function(){return R}),k.d(Y,"a",function(){return f}),k.d(Y,"c",function(){return s}),k.d(Y,"d",function(){return w});var L=k("U8pU"),c="RC_TABLE_KEY";function S(l){return l==null?[]:Array.isArray(l)?l:[l]}function R(l,i){if(!i&&typeof i!="number")return l;for(var a=S(i),r=l,u=0;u<a.length;u+=1){if(!r)return null;var p=a[u];r=r[p]}return r}function f(l){var i=[],a={};return l.forEach(function(r){for(var u=r||{},p=u.key,m=u.dataIndex,b=p||S(m).join("-")||c;a[b];)b="".concat(b,"_next");a[b]=!0,i.push(b)}),i}function s(){var l={};function i(p,m){m&&Object.keys(m).forEach(function(b){var g=m[b];g&&Object(L.a)(g)==="object"?(p[b]=p[b]||{},i(p[b],g)):p[b]=g})}for(var a=arguments.length,r=new Array(a),u=0;u<a;u++)r[u]=arguments[u];return r.forEach(function(p){i(l,p)}),l}function w(l){return l!=null}},sboe:function(I,Y,k){"use strict";k.d(Y,"a",function(){return S});var L=k("cDcd"),c=k.n(L),S=L.createContext(null)},t23M:function(I,Y,k){"use strict";var L=k("VTBJ"),c=k("1OyB"),S=k("vuIU"),R=k("Ji7U"),f=k("LK+K"),s=k("cDcd"),w=k.n(s),l=k("m+aA"),i=k("Zm9Q"),a=k("Kwbf"),r=k("c+Xe"),u=k("bdgK"),p="rc-observer-key",m=function(b){Object(R.a)(v,b);var g=Object(f.a)(v);function v(){var n;return Object(c.a)(this,v),n=g.apply(this,arguments),n.resizeObserver=null,n.childNode=null,n.currentElement=null,n.state={width:0,height:0,offsetHeight:0,offsetWidth:0},n.onResize=function(d){var h=n.props.onResize,C=d[0].target,T=C.getBoundingClientRect(),o=T.width,P=T.height,O=C.offsetWidth,y=C.offsetHeight,x=Math.floor(o),E=Math.floor(P);if(n.state.width!==x||n.state.height!==E||n.state.offsetWidth!==O||n.state.offsetHeight!==y){var _={width:x,height:E,offsetWidth:O,offsetHeight:y};n.setState(_),h&&Promise.resolve().then(function(){h(Object(L.a)(Object(L.a)({},_),{},{offsetWidth:O,offsetHeight:y}))})}},n.setChildNode=function(d){n.childNode=d},n}return Object(S.a)(v,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var d=this.props.disabled;if(d){this.destroyObserver();return}var h=Object(l.a)(this.childNode||this),C=h!==this.currentElement;C&&(this.destroyObserver(),this.currentElement=h),!this.resizeObserver&&h&&(this.resizeObserver=new u.default(this.onResize),this.resizeObserver.observe(h))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var d=this.props.children,h=Object(i.a)(d);if(h.length>1)Object(a.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(h.length===0)return Object(a.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var C=h[0];if(s.isValidElement(C)&&Object(r.c)(C)){var T=C.ref;h[0]=s.cloneElement(C,{ref:Object(r.a)(T,this.setChildNode)})}return h.length===1?h[0]:h.map(function(o,P){return!s.isValidElement(o)||"key"in o&&o.key!==null?o:s.cloneElement(o,{key:"".concat(p,"-").concat(P)})})}}]),v}(s.Component);m.displayName="ResizeObserver",Y.a=m},uGsb:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("MlIO"),k("1uat"))})(this,function(L){return function(){var c=L,S=c.x64,R=S.Word,f=S.WordArray,s=c.algo,w=s.SHA512,l=s.SHA384=w.extend({_doReset:function(){this._hash=new f.init([new R.init(3418070365,3238371032),new R.init(1654270250,914150663),new R.init(2438529370,812702999),new R.init(355462360,4144912697),new R.init(1731405415,4290775857),new R.init(2394180231,1750603025),new R.init(3675008525,1694076839),new R.init(1203062813,3204075428)])},_doFinalize:function(){var i=w._doFinalize.call(this);return i.sigBytes-=16,i}});c.SHA384=w._createHelper(l),c.HmacSHA384=w._createHmacHelper(l)}(),L.SHA384})},uGxW:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.NoPadding={pad:function(){},unpad:function(){}},L.pad.NoPadding})},uQRt:function(I,Y,k){I.exports=L;function L(){return k("gaXo"),{}}},ulZh:function(I,Y,k){typeof window!="undefined"&&function(c,S){I.exports=S()}(this,function(){return function(L){var c={};function S(R){if(c[R])return c[R].exports;var f=c[R]={i:R,l:!1,exports:{}};return L[R].call(f.exports,f,f.exports,S),f.l=!0,f.exports}return S.m=L,S.c=c,S.d=function(R,f,s){S.o(R,f)||Object.defineProperty(R,f,{enumerable:!0,get:s})},S.r=function(R){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(R,"__esModule",{value:!0})},S.t=function(R,f){if(f&1&&(R=S(R)),f&8)return R;if(f&4&&typeof R=="object"&&R&&R.__esModule)return R;var s=Object.create(null);if(S.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:R}),f&2&&typeof R!="string")for(var w in R)S.d(s,w,function(l){return R[l]}.bind(null,w));return s},S.n=function(R){var f=R&&R.__esModule?function(){return R.default}:function(){return R};return S.d(f,"a",f),f},S.o=function(R,f){return Object.prototype.hasOwnProperty.call(R,f)},S.p="/dist/",S(S.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(L,c,S){"use strict";var R=Object.prototype.hasOwnProperty,f="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(f=!1));function w(r,u,p){this.fn=r,this.context=u,this.once=p||!1}function l(r,u,p,m,b){if(typeof p!="function")throw new TypeError("The listener must be a function");var g=new w(p,m||r,b),v=f?f+u:u;return r._events[v]?r._events[v].fn?r._events[v]=[r._events[v],g]:r._events[v].push(g):(r._events[v]=g,r._eventsCount++),r}function i(r,u){--r._eventsCount===0?r._events=new s:delete r._events[u]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],p,m;if(this._eventsCount===0)return u;for(m in p=this._events)R.call(p,m)&&u.push(f?m.slice(1):m);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(p)):u},a.prototype.listeners=function(u){var p=f?f+u:u,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var b=0,g=m.length,v=new Array(g);b<g;b++)v[b]=m[b].fn;return v},a.prototype.listenerCount=function(u){var p=f?f+u:u,m=this._events[p];return m?m.fn?1:m.length:0},a.prototype.emit=function(u,p,m,b,g,v){var n=f?f+u:u;if(!this._events[n])return!1;var d=this._events[n],h=arguments.length,C,T;if(d.fn){d.once&&this.removeListener(u,d.fn,void 0,!0);switch(h){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,p),!0;case 3:return d.fn.call(d.context,p,m),!0;case 4:return d.fn.call(d.context,p,m,b),!0;case 5:return d.fn.call(d.context,p,m,b,g),!0;case 6:return d.fn.call(d.context,p,m,b,g,v),!0}for(T=1,C=new Array(h-1);T<h;T++)C[T-1]=arguments[T];d.fn.apply(d.context,C)}else{var o=d.length,P;for(T=0;T<o;T++){d[T].once&&this.removeListener(u,d[T].fn,void 0,!0);switch(h){case 1:d[T].fn.call(d[T].context);break;case 2:d[T].fn.call(d[T].context,p);break;case 3:d[T].fn.call(d[T].context,p,m);break;case 4:d[T].fn.call(d[T].context,p,m,b);break;default:if(!C)for(P=1,C=new Array(h-1);P<h;P++)C[P-1]=arguments[P];d[T].fn.apply(d[T].context,C)}}}return!0},a.prototype.on=function(u,p,m){return l(this,u,p,m,!1)},a.prototype.once=function(u,p,m){return l(this,u,p,m,!0)},a.prototype.removeListener=function(u,p,m,b){var g=f?f+u:u;if(!this._events[g])return this;if(!p)return i(this,g),this;var v=this._events[g];if(v.fn)v.fn===p&&(!b||v.once)&&(!m||v.context===m)&&i(this,g);else{for(var n=0,d=[],h=v.length;n<h;n++)(v[n].fn!==p||b&&!v[n].once||m&&v[n].context!==m)&&d.push(v[n]);d.length?this._events[g]=d.length===1?d[0]:d:i(this,g)}return this},a.prototype.removeAllListeners=function(u){var p;return u?(p=f?f+u:u,this._events[p]&&i(this,p)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=f,a.EventEmitter=a,L.exports=a},"./node_modules/url-toolkit/src/url-toolkit.js":function(L,c,S){(function(R){var f=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,s=/^([^\/?#]*)([^]*)$/,w=/(?:\/|^)\.(?=\/)/g,l=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,i={buildAbsoluteURL:function(a,r,u){if(u=u||{},a=a.trim(),r=r.trim(),!r){if(!u.alwaysNormalize)return a;var p=i.parseURL(a);if(!p)throw new Error("Error trying to parse base URL.");return p.path=i.normalizePath(p.path),i.buildURLFromParts(p)}var m=i.parseURL(r);if(!m)throw new Error("Error trying to parse relative URL.");if(m.scheme)return u.alwaysNormalize?(m.path=i.normalizePath(m.path),i.buildURLFromParts(m)):r;var b=i.parseURL(a);if(!b)throw new Error("Error trying to parse base URL.");if(!b.netLoc&&b.path&&b.path[0]!=="/"){var g=s.exec(b.path);b.netLoc=g[1],b.path=g[2]}b.netLoc&&!b.path&&(b.path="/");var v={scheme:b.scheme,netLoc:m.netLoc,path:null,params:m.params,query:m.query,fragment:m.fragment};if(!m.netLoc&&(v.netLoc=b.netLoc,m.path[0]!=="/"))if(!m.path)v.path=b.path,m.params||(v.params=b.params,m.query||(v.query=b.query));else{var n=b.path,d=n.substring(0,n.lastIndexOf("/")+1)+m.path;v.path=i.normalizePath(d)}return v.path===null&&(v.path=u.alwaysNormalize?i.normalizePath(m.path):m.path),i.buildURLFromParts(v)},parseURL:function(a){var r=f.exec(a);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(a){for(a=a.split("").reverse().join("").replace(w,"");a.length!==(a=a.replace(l,"")).length;);return a.split("").reverse().join("")},buildURLFromParts:function(a){return a.scheme+a.netLoc+a.path+a.params+a.query+a.fragment}};L.exports=i})(this)},"./node_modules/webworkify-webpack/index.js":function(L,c,S){function R(u){var p={};function m(g){if(p[g])return p[g].exports;var v=p[g]={i:g,l:!1,exports:{}};return u[g].call(v.exports,v,v.exports,m),v.l=!0,v.exports}m.m=u,m.c=p,m.i=function(g){return g},m.d=function(g,v,n){m.o(g,v)||Object.defineProperty(g,v,{configurable:!1,enumerable:!0,get:n})},m.r=function(g){Object.defineProperty(g,"__esModule",{value:!0})},m.n=function(g){var v=g&&g.__esModule?function(){return g.default}:function(){return g};return m.d(v,"a",v),v},m.o=function(g,v){return Object.prototype.hasOwnProperty.call(g,v)},m.p="/",m.oe=function(g){throw console.error(g),g};var b=m(m.s=ENTRY_MODULE);return b.default||b}var f="[\\.|\\-|\\+|\\w|/|@]+",s="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+f+").*?\\)";function w(u){return(u+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function l(u){return!isNaN(1*u)}function i(u,p,m){var b={};b[m]=[];var g=p.toString(),v=g.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!v)return b;for(var n=v[1],d=new RegExp("(\\\\n|\\W)"+w(n)+s,"g"),h;h=d.exec(g);){if(h[3]==="dll-reference")continue;b[m].push(h[3])}for(d=new RegExp("\\("+w(n)+'\\("(dll-reference\\s('+f+'))"\\)\\)'+s,"g");h=d.exec(g);)u[h[2]]||(b[m].push(h[1]),u[h[2]]=S(h[1]).m),b[h[2]]=b[h[2]]||[],b[h[2]].push(h[4]);for(var C=Object.keys(b),T=0;T<C.length;T++)for(var o=0;o<b[C[T]].length;o++)l(b[C[T]][o])&&(b[C[T]][o]=1*b[C[T]][o]);return b}function a(u){var p=Object.keys(u);return p.reduce(function(m,b){return m||u[b].length>0},!1)}function r(u,p){for(var m={main:[p]},b={main:[]},g={main:{}};a(m);)for(var v=Object.keys(m),n=0;n<v.length;n++){var d=v[n],h=m[d],C=h.pop();if(g[d]=g[d]||{},g[d][C]||!u[d][C])continue;g[d][C]=!0,b[d]=b[d]||[],b[d].push(C);for(var T=i(u,u[d][C],d),o=Object.keys(T),P=0;P<o.length;P++)m[o[P]]=m[o[P]]||[],m[o[P]]=m[o[P]].concat(T[o[P]])}return b}L.exports=function(u,p){p=p||{};var m={main:S.m},b=p.all?{main:Object.keys(m.main)}:r(m,u),g="";Object.keys(b).filter(function(C){return C!=="main"}).forEach(function(C){for(var T=0;b[C][T];)T++;b[C].push(T),m[C][T]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",g=g+"var "+C+" = ("+R.toString().replace("ENTRY_MODULE",JSON.stringify(T))+")({"+b[C].map(function(o){return""+JSON.stringify(o)+": "+m[C][o].toString()}).join(",")+`});
`}),g=g+"new (("+R.toString().replace("ENTRY_MODULE",JSON.stringify(u))+")({"+b.main.map(function(C){return""+JSON.stringify(C)+": "+m.main[C].toString()}).join(",")+"}))(self);";var v=new window.Blob([g],{type:"text/javascript"});if(p.bare)return v;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,d=n.createObjectURL(v),h=new window.Worker(d);return h.objectURL=d,h}},"./src/config.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"hlsDefaultConfig",function(){return P}),S.d(c,"mergeConfig",function(){return y}),S.d(c,"enableStreamingMode",function(){return x});var R=S("./src/controller/abr-controller.ts"),f=S("./src/controller/audio-stream-controller.ts"),s=S("./src/controller/audio-track-controller.ts"),w=S("./src/controller/subtitle-stream-controller.ts"),l=S("./src/controller/subtitle-track-controller.ts"),i=S("./src/controller/buffer-controller.ts"),a=S("./src/controller/timeline-controller.ts"),r=S("./src/controller/cap-level-controller.ts"),u=S("./src/controller/fps-controller.ts"),p=S("./src/controller/eme-controller.ts"),m=S("./src/controller/cmcd-controller.ts"),b=S("./src/utils/xhr-loader.ts"),g=S("./src/utils/fetch-loader.ts"),v=S("./src/utils/cues.ts"),n=S("./src/utils/mediakeys-helper.ts"),d=S("./src/utils/logger.ts");function h(){return h=Object.assign||function(E){for(var _=1;_<arguments.length;_++){var N=arguments[_];for(var j in N)Object.prototype.hasOwnProperty.call(N,j)&&(E[j]=N[j])}return E},h.apply(this,arguments)}function C(E,_){var N=Object.keys(E);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(E);_&&(j=j.filter(function(M){return Object.getOwnPropertyDescriptor(E,M).enumerable})),N.push.apply(N,j)}return N}function T(E){for(var _=1;_<arguments.length;_++){var N=arguments[_]!=null?arguments[_]:{};_%2?C(Object(N),!0).forEach(function(j){o(E,j,N[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(N)):C(Object(N)).forEach(function(j){Object.defineProperty(E,j,Object.getOwnPropertyDescriptor(N,j))})}return E}function o(E,_,N){return _ in E?Object.defineProperty(E,_,{value:N,enumerable:!0,configurable:!0,writable:!0}):E[_]=N,E}var P=T(T({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:b.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:R.default,bufferController:i.default,capLevelController:r.default,fpsController:u.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:w.SubtitleStreamController,subtitleTrackController:l.default,timelineController:a.TimelineController,audioStreamController:f.default,audioTrackController:s.default,emeController:p.default,cmcdController:m.default});function O(){return{cueHandler:v.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function y(E,_){if((_.liveSyncDurationCount||_.liveMaxLatencyDurationCount)&&(_.liveSyncDuration||_.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(_.liveMaxLatencyDurationCount!==void 0&&(_.liveSyncDurationCount===void 0||_.liveMaxLatencyDurationCount<=_.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(_.liveMaxLatencyDuration!==void 0&&(_.liveSyncDuration===void 0||_.liveMaxLatencyDuration<=_.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return h({},E,_)}function x(E){var _=E.loader;if(_!==g.default&&_!==b.default)d.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),E.progressive=!1;else{var N=Object(g.fetchSupported)();N&&(E.loader=g.default,E.progressive=!0,E.enableSoftwareAES=!0,d.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/polyfills/number.ts"),f=S("./src/utils/ewma-bandwidth-estimator.ts"),s=S("./src/events.ts"),w=S("./src/utils/buffer-helper.ts"),l=S("./src/errors.ts"),i=S("./src/types/loader.ts"),a=S("./src/utils/logger.ts");function r(m,b){for(var g=0;g<b.length;g++){var v=b[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}function u(m,b,g){return b&&r(m.prototype,b),g&&r(m,g),m}var p=function(){function m(g){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=g;var v=g.config;this.bwEstimator=new f.default(v.abrEwmaSlowVoD,v.abrEwmaFastVoD,v.abrEwmaDefaultEstimate),this.registerListeners()}var b=m.prototype;return b.registerListeners=function(){var v=this.hls;v.on(s.Events.FRAG_LOADING,this.onFragLoading,this),v.on(s.Events.FRAG_LOADED,this.onFragLoaded,this),v.on(s.Events.FRAG_BUFFERED,this.onFragBuffered,this),v.on(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(s.Events.ERROR,this.onError,this)},b.unregisterListeners=function(){var v=this.hls;v.off(s.Events.FRAG_LOADING,this.onFragLoading,this),v.off(s.Events.FRAG_LOADED,this.onFragLoaded,this),v.off(s.Events.FRAG_BUFFERED,this.onFragBuffered,this),v.off(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(s.Events.ERROR,this.onError,this)},b.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},b.onFragLoading=function(v,n){var d=n.frag;if(d.type===i.PlaylistLevelType.MAIN&&!this.timer){var h;this.fragCurrent=d,this.partCurrent=(h=n.part)!=null?h:null,this.timer=self.setInterval(this.onCheck,100)}},b.onLevelLoaded=function(v,n){var d=this.hls.config;n.details.live?this.bwEstimator.update(d.abrEwmaSlowLive,d.abrEwmaFastLive):this.bwEstimator.update(d.abrEwmaSlowVoD,d.abrEwmaFastVoD)},b._abandonRulesCheck=function(){var v=this.fragCurrent,n=this.partCurrent,d=this.hls,h=d.autoLevelEnabled,C=d.config,T=d.media;if(!v||!T)return;var o=n?n.stats:v.stats,P=n?n.duration:v.duration;if(o.aborted){a.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!h||T.paused||!T.playbackRate||!T.readyState)return;var O=performance.now()-o.loading.start,y=Math.abs(T.playbackRate);if(O<=500*P/y)return;var x=d.levels,E=d.minAutoLevel,_=x[v.level],N=o.total||Math.max(o.loaded,Math.round(P*_.maxBitrate/8)),j=Math.max(1,o.bwEstimate?o.bwEstimate/8:o.loaded*1e3/O),M=(N-o.loaded)/j,H=T.currentTime,z=(w.BufferHelper.bufferInfo(T,H,C.maxBufferHole).end-H)/y;if(z>=2*P/y||M<=z)return;var F=Number.POSITIVE_INFINITY,G;for(G=v.level-1;G>E;G--){var B=x[G].maxBitrate;if(F=P*B/(8*.8*j),F<z)break}if(F>=M)return;var K=this.bwEstimator.getEstimate();a.logger.warn("Fragment "+v.sn+(n?" part "+n.index:"")+" of level "+v.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+G+`
Current BW estimate: `+(Object(R.isFiniteNumber)(K)?(K/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+M.toFixed(3)+` s
Estimated load time for the next fragment: `+F.toFixed(3)+` s
Time to underbuffer: `+z.toFixed(3)+" s"),d.nextLoadLevel=G,this.bwEstimator.sample(O,o.loaded),this.clearTimer(),v.loader&&(this.fragCurrent=this.partCurrent=null,v.loader.abort()),d.trigger(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:v,part:n,stats:o})},b.onFragLoaded=function(v,n){var d=n.frag,h=n.part;if(d.type===i.PlaylistLevelType.MAIN&&Object(R.isFiniteNumber)(d.sn)){var C=h?h.stats:d.stats,T=h?h.duration:d.duration;if(this.clearTimer(),this.lastLoadedFragLevel=d.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var o=this.hls.levels[d.level],P=(o.loaded?o.loaded.bytes:0)+C.loaded,O=(o.loaded?o.loaded.duration:0)+T;o.loaded={bytes:P,duration:O},o.realBitrate=Math.round(8*P/O)}if(d.bitrateTest){var y={stats:C,frag:d,part:h,id:d.type};this.onFragBuffered(s.Events.FRAG_BUFFERED,y),d.bitrateTest=!1}}},b.onFragBuffered=function(v,n){var d=n.frag,h=n.part,C=h?h.stats:d.stats;if(C.aborted)return;if(d.type!==i.PlaylistLevelType.MAIN||d.sn==="initSegment")return;var T=C.parsing.end-C.loading.start;this.bwEstimator.sample(T,C.loaded),C.bwEstimate=this.bwEstimator.getEstimate(),d.bitrateTest?this.bitrateTestDelay=T/1e3:this.bitrateTestDelay=0},b.onError=function(v,n){switch(n.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},b.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},b.getNextABRAutoLevel=function(){var v=this.fragCurrent,n=this.partCurrent,d=this.hls,h=d.maxAutoLevel,C=d.config,T=d.minAutoLevel,o=d.media,P=n?n.duration:v?v.duration:0,O=o?o.currentTime:0,y=o&&o.playbackRate!==0?Math.abs(o.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():C.abrEwmaDefaultEstimate,E=(w.BufferHelper.bufferInfo(o,O,C.maxBufferHole).end-O)/y,_=this.findBestLevel(x,T,h,E,C.abrBandWidthFactor,C.abrBandWidthUpFactor);if(_>=0)return _;a.logger.trace((E?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var N=P?Math.min(P,C.maxStarvationDelay):C.maxStarvationDelay,j=C.abrBandWidthFactor,M=C.abrBandWidthUpFactor;if(!E){var H=this.bitrateTestDelay;if(H){var z=P?Math.min(P,C.maxLoadingDelay):C.maxLoadingDelay;N=z-H,a.logger.trace("bitrate test took "+Math.round(1e3*H)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*N)+" ms"),j=M=1}}return _=this.findBestLevel(x,T,h,E+N,j,M),Math.max(_,0)},b.findBestLevel=function(v,n,d,h,C,T){for(var o,P=this.fragCurrent,O=this.partCurrent,y=this.lastLoadedFragLevel,x=this.hls.levels,E=x[y],_=!!(E!=null&&(o=E.details)!==null&&o!==void 0&&o.live),N=E==null?void 0:E.codecSet,j=O?O.duration:P?P.duration:0,M=d;M>=n;M--){var H=x[M];if(!H||N&&H.codecSet!==N)continue;var z=H.details,F=(O?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||j,G=void 0;M<=y?G=C*v:G=T*v;var B=x[M].maxBitrate,K=B*F/G;if(a.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+M+"/"+Math.round(G)+"/"+B+"/"+F+"/"+h+"/"+K),G>B&&(!K||_&&!this.bitrateTestDelay||K<h))return M}return-1},u(m,[{key:"nextAutoLevel",get:function(){var v=this._nextAutoLevel,n=this.bwEstimator;if(v!==-1&&(!n||!n.canEstimate()))return v;var d=this.getNextABRAutoLevel();return v!==-1&&(d=Math.min(v,d)),d},set:function(v){this._nextAutoLevel=v}}]),m}();c.default=p},"./src/controller/audio-stream-controller.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/polyfills/number.ts"),f=S("./src/controller/base-stream-controller.ts"),s=S("./src/events.ts"),w=S("./src/utils/buffer-helper.ts"),l=S("./src/controller/fragment-tracker.ts"),i=S("./src/types/level.ts"),a=S("./src/types/loader.ts"),r=S("./src/loader/fragment.ts"),u=S("./src/demux/chunk-cache.ts"),p=S("./src/demux/transmuxer-interface.ts"),m=S("./src/types/transmuxer.ts"),b=S("./src/controller/fragment-finders.ts"),g=S("./src/utils/discontinuities.ts"),v=S("./src/errors.ts"),n=S("./src/utils/logger.ts");function d(){return d=Object.assign||function(P){for(var O=1;O<arguments.length;O++){var y=arguments[O];for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(P[x]=y[x])}return P},d.apply(this,arguments)}function h(P,O){P.prototype=Object.create(O.prototype),P.prototype.constructor=P,C(P,O)}function C(P,O){return C=Object.setPrototypeOf||function(x,E){return x.__proto__=E,x},C(P,O)}var T=100,o=function(P){h(O,P);function O(x,E){var _;return _=P.call(this,x,E,"[audio-stream-controller]")||this,_.videoBuffer=null,_.videoTrackCC=-1,_.waitingVideoCC=-1,_.audioSwitch=!1,_.trackId=-1,_.waitingData=null,_.mainDetails=null,_.bufferFlushed=!1,_._registerListeners(),_}var y=O.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var E=this.hls;E.on(s.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(s.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(s.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(s.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),E.on(s.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(s.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.on(s.Events.ERROR,this.onError,this),E.on(s.Events.BUFFER_RESET,this.onBufferReset,this),E.on(s.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(s.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(s.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.on(s.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y._unregisterListeners=function(){var E=this.hls;E.off(s.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(s.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(s.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(s.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),E.off(s.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(s.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.off(s.Events.ERROR,this.onError,this),E.off(s.Events.BUFFER_RESET,this.onBufferReset,this),E.off(s.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(s.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(s.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.off(s.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y.onInitPtsFound=function(E,_){var N=_.frag,j=_.id,M=_.initPTS;if(j==="main"){var H=N.cc;this.initPTS[N.cc]=M,this.log("InitPTS for cc: "+H+" found from main: "+M),this.videoTrackCC=H,this.state===f.State.WAITING_INIT_PTS&&this.tick()}},y.startLoad=function(E){if(!this.levels){this.startPosition=E,this.state=f.State.STOPPED;return}var _=this.lastCurrentTime;this.stopLoad(),this.setInterval(T),this.fragLoadError=0,_>0&&E===-1?(this.log("Override startPosition with lastCurrentTime @"+_.toFixed(3)),this.state=f.State.IDLE):(this.loadedmetadata=!1,this.state=f.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()},y.doTick=function(){switch(this.state){case f.State.IDLE:this.doTickIdle();break;case f.State.WAITING_TRACK:{var E,_=this.levels,N=this.trackId,j=_==null||((E=_[N])===null||E===void 0)?void 0:E.details;if(j){if(this.waitForCdnTuneIn(j))break;this.state=f.State.WAITING_INIT_PTS}break}case f.State.FRAG_LOADING_WAITING_RETRY:{var M,H=performance.now(),z=this.retryDate;(!z||H>=z||(M=this.media)!==null&&M!==void 0&&M.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=f.State.IDLE);break}case f.State.WAITING_INIT_PTS:{var F=this.waitingData;if(F){var G=F.frag,B=F.part,K=F.cache,W=F.complete;if(this.initPTS[G.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=f.State.FRAG_LOADING;var J=K.flush(),ee={frag:G,part:B,payload:J,networkDetails:null};this._handleFragmentLoadProgress(ee),W&&P.prototype._handleFragmentLoadComplete.call(this,ee)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+G.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Z=this.getLoadPosition(),he=w.BufferHelper.bufferInfo(this.mediaBuffer,Z,this.config.maxBufferHole),ge=Object(b.fragmentWithinToleranceTest)(he.end,this.config.maxFragLookUpTolerance,G);ge<0&&(n.logger.log("Waiting fragment cc ("+G.cc+") @ "+G.start+" cancelled because another fragment at "+he.end+" is needed"),this.clearWaitingFragment())}}else this.state=f.State.IDLE}}this.onTickEnd()},y.clearWaitingFragment=function(){var E=this.waitingData;E&&(this.fragmentTracker.removeFragment(E.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=f.State.IDLE)},y.onTickEnd=function(){var E=this.media;if(!E||!E.readyState)return;var _=this.mediaBuffer?this.mediaBuffer:E,N=_.buffered;!this.loadedmetadata&&N.length&&(this.loadedmetadata=!0),this.lastCurrentTime=E.currentTime},y.doTickIdle=function(){var E,_,N=this.hls,j=this.levels,M=this.media,H=this.trackId,z=N.config;if(!j||!j[H])return;if(!M&&(this.startFragRequested||!z.startFragPrefetch))return;var F=j[H],G=F.details;if(!G||G.live&&this.levelLastLoaded!==H||this.waitForCdnTuneIn(G)){this.state=f.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,a.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,a.PlaylistLevelType.AUDIO);if(B===null)return;var K=B.len,W=this.getMaxBufferLength(),J=this.audioSwitch;if(K>=W&&!J)return;if(!J&&this._streamEnded(B,G)){N.trigger(s.Events.BUFFER_EOS,{type:"audio"}),this.state=f.State.ENDED;return}var ee=G.fragments,Z=ee[0].start,he=B.end;if(J){var ge=this.getLoadPosition();he=ge,G.PTSKnown&&ge<Z&&((B.end>Z||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),M.currentTime=Z+.05))}var ie=this.getNextFragment(he,G);if(!ie){this.bufferFlushed=!0;return}((E=ie.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((_=ie.decryptdata)!==null&&_!==void 0&&_.key)?this.loadKey(ie,G):this.loadFragment(ie,G,he)},y.getMaxBufferLength=function(){var E=P.prototype.getMaxBufferLength.call(this),_=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,a.PlaylistLevelType.MAIN);return _===null?E:Math.max(E,_.len)},y.onMediaDetaching=function(){this.videoBuffer=null,P.prototype.onMediaDetaching.call(this)},y.onAudioTracksUpdated=function(E,_){var N=_.audioTracks;this.resetTransmuxer(),this.levels=N.map(function(j){return new i.Level(j)})},y.onAudioTrackSwitching=function(E,_){var N=!!_.url;this.trackId=_.id;var j=this.fragCurrent;j!=null&&j.loader&&j.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),N?this.setInterval(T):this.resetTransmuxer(),N?(this.audioSwitch=!0,this.state=f.State.IDLE):this.state=f.State.STOPPED,this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},y.onLevelLoaded=function(E,_){this.mainDetails=_.details},y.onAudioTrackLoaded=function(E,_){var N,j=this.levels,M=_.details,H=_.id;if(!j){this.warn("Audio tracks were reset while loading level "+H);return}this.log("Track "+H+" loaded ["+M.startSN+","+M.endSN+"],duration:"+M.totalduration);var z=j[H],F=0;if(M.live||(N=z.details)!==null&&N!==void 0&&N.live){var G=this.mainDetails;if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed||!G)return;!z.details&&M.hasProgramDateTime&&G.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(M,G),F=M.fragments[0].start):F=this.alignPlaylists(M,z.details)}z.details=M,this.levelLastLoaded=H,!this.startFragRequested&&(this.mainDetails||!M.live)&&this.setStartPosition(z.details,F),this.state===f.State.WAITING_TRACK&&!this.waitForCdnTuneIn(M)&&(this.state=f.State.IDLE),this.tick()},y._handleFragmentLoadProgress=function(E){var _,N=E.frag,j=E.part,M=E.payload,H=this.config,z=this.trackId,F=this.levels;if(!F){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+N.sn+" of level "+N.level+" will not be buffered");return}var G=F[z];console.assert(G,"Audio track is defined on fragment load progress");var B=G.details;console.assert(B,"Audio track details are defined on fragment load progress");var K=H.defaultAudioCodec||G.audioCodec||"mp4a.40.2",W=this.transmuxer;W||(W=this.transmuxer=new p.default(this.hls,a.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var J=this.initPTS[N.cc],ee=(_=N.initSegment)===null||_===void 0?void 0:_.data;if(J!==void 0){var Z=!1,he=j?j.index:-1,ge=he!==-1,ie=new m.ChunkMetadata(N.level,N.sn,N.stats.chunkCount,M.byteLength,he,ge);W.push(M,ee,K,"",N,j,B.totalduration,Z,ie,J)}else{n.logger.log("Unknown video PTS for cc "+N.cc+", waiting for video PTS before demuxing audio frag "+N.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+z);var we=this.waitingData=this.waitingData||{frag:N,part:j,cache:new u.default,complete:!1},me=we.cache;me.push(new Uint8Array(M)),this.waitingVideoCC=this.videoTrackCC,this.state=f.State.WAITING_INIT_PTS}},y._handleFragmentLoadComplete=function(E){if(this.waitingData){this.waitingData.complete=!0;return}P.prototype._handleFragmentLoadComplete.call(this,E)},y.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},y.onBufferCreated=function(E,_){var N=_.tracks.audio;N&&(this.mediaBuffer=N.buffer),_.tracks.video&&(this.videoBuffer=_.tracks.video.buffer)},y.onFragBuffered=function(E,_){var N=_.frag,j=_.part;if(N.type!==a.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(N)){this.warn("Fragment "+N.sn+(j?" p: "+j.index:"")+" of level "+N.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}N.sn!=="initSegment"&&(this.fragPrevious=N,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(N,j)},y.onError=function(E,_){switch(_.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:case v.ErrorDetails.KEY_LOAD_ERROR:case v.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(a.PlaylistLevelType.AUDIO,_);break;case v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case v.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==f.State.ERROR&&this.state!==f.State.STOPPED&&(this.state=_.fatal?f.State.ERROR:f.State.IDLE,this.warn(_.details+" while loading frag, switching to "+this.state+" state"));break;case v.ErrorDetails.BUFFER_FULL_ERROR:if(_.parent==="audio"&&(this.state===f.State.PARSING||this.state===f.State.PARSED)){var N=!0,j=this.getFwdBufferInfo(this.mediaBuffer,a.PlaylistLevelType.AUDIO);j&&j.len>.5&&(N=!this.reduceMaxBufferLength(j.len)),N&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,P.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},y.onBufferFlushed=function(E,_){var N=_.type;N===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},y._handleTransmuxComplete=function(E){var _,N="audio",j=this.hls,M=E.remuxResult,H=E.chunkMeta,z=this.getCurrentContext(H);if(!z){this.warn("The loading context changed while buffering fragment "+H.sn+" of level "+H.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(H.level);return}var F=z.frag,G=z.part,B=M.audio,K=M.text,W=M.id3,J=M.initSegment;if(this.fragContextChanged(F))return;if(this.state=f.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),J!=null&&J.tracks&&(this._bufferInitSegment(J.tracks,F,H),j.trigger(s.Events.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:N,tracks:J.tracks})),B){var ee=B.startPTS,Z=B.endPTS,he=B.startDTS,ge=B.endDTS;G&&(G.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:ee,endPTS:Z,startDTS:he,endDTS:ge}),F.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,ee,Z,he,ge),this.bufferFragmentData(B,F,G,H)}if(W!=null&&(_=W.samples)!==null&&_!==void 0&&_.length){var ie=d({frag:F,id:N},W);j.trigger(s.Events.FRAG_PARSING_METADATA,ie)}if(K){var we=d({frag:F,id:N},K);j.trigger(s.Events.FRAG_PARSING_USERDATA,we)}},y._bufferInitSegment=function(E,_,N){if(this.state!==f.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(s.Events.BUFFER_CODECS,E);var M=j.initSegment;if(M!=null&&M.byteLength){var H={type:"audio",frag:_,part:null,chunkMeta:N,parent:_.type,data:M};this.hls.trigger(s.Events.BUFFER_APPENDING,H)}this.tick()},y.loadFragment=function(E,_,N){var j=this.fragmentTracker.getState(E);this.fragCurrent=E,(this.audioSwitch||j===l.FragmentState.NOT_LOADED||j===l.FragmentState.PARTIAL)&&(E.sn==="initSegment"?this._loadInitSegment(E):_.live&&!Object(R.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=f.State.WAITING_INIT_PTS):(this.startFragRequested=!0,P.prototype.loadFragment.call(this,E,_,N)))},y.completeAudioSwitch=function(){var E=this.hls,_=this.media,N=this.trackId;_&&(this.log("Switching audio track : flushing all audio"),P.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,E.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:N})},O}(f.default);c.default=o},"./src/controller/audio-track-controller.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/events.ts"),f=S("./src/errors.ts"),s=S("./src/controller/base-playlist-controller.ts"),w=S("./src/types/loader.ts");function l(p,m){for(var b=0;b<m.length;b++){var g=m[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}function i(p,m,b){return m&&l(p.prototype,m),b&&l(p,b),p}function a(p,m){p.prototype=Object.create(m.prototype),p.prototype.constructor=p,r(p,m)}function r(p,m){return r=Object.setPrototypeOf||function(g,v){return g.__proto__=v,g},r(p,m)}var u=function(p){a(m,p);function m(g){var v;return v=p.call(this,g,"[audio-track-controller]")||this,v.tracks=[],v.groupId=null,v.tracksInGroup=[],v.trackId=-1,v.trackName="",v.selectDefaultTrack=!0,v.registerListeners(),v}var b=m.prototype;return b.registerListeners=function(){var v=this.hls;v.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),v.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.on(R.Events.LEVEL_LOADING,this.onLevelLoading,this),v.on(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),v.on(R.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),v.on(R.Events.ERROR,this.onError,this)},b.unregisterListeners=function(){var v=this.hls;v.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),v.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.off(R.Events.LEVEL_LOADING,this.onLevelLoading,this),v.off(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),v.off(R.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),v.off(R.Events.ERROR,this.onError,this)},b.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,p.prototype.destroy.call(this)},b.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},b.onManifestParsed=function(v,n){this.tracks=n.audioTracks||[]},b.onAudioTrackLoaded=function(v,n){var d=n.id,h=n.details,C=this.tracksInGroup[d];if(!C){this.warn("Invalid audio track id "+d);return}var T=C.details;C.details=n.details,this.log("audioTrack "+d+" loaded ["+h.startSN+"-"+h.endSN+"]"),d===this.trackId&&(this.retryCount=0,this.playlistLoaded(d,n,T))},b.onLevelLoading=function(v,n){this.switchLevel(n.level)},b.onLevelSwitching=function(v,n){this.switchLevel(n.level)},b.switchLevel=function(v){var n=this.hls.levels[v];if(!(n!=null&&n.audioGroupIds))return;var d=n.audioGroupIds[n.urlId];if(this.groupId!==d){this.groupId=d;var h=this.tracks.filter(function(T){return!d||T.groupId===d});this.selectDefaultTrack&&!h.some(function(T){return T.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=h;var C={audioTracks:h};this.log("Updating audio tracks, "+h.length+' track(s) found in "'+d+'" group-id'),this.hls.trigger(R.Events.AUDIO_TRACKS_UPDATED,C),this.selectInitialTrack()}},b.onError=function(v,n){if(p.prototype.onError.call(this,v,n),n.fatal||!n.context)return;n.context.type===w.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},b.setAudioTrack=function(v){var n=this.tracksInGroup;if(v<0||v>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var d=n[this.trackId];this.log("Now switching to audio-track index "+v);var h=n[v],C=h.id,T=h.groupId,o=T===void 0?"":T,P=h.name,O=h.type,y=h.url;if(this.trackId=v,this.trackName=P,this.selectDefaultTrack=!1,this.hls.trigger(R.Events.AUDIO_TRACK_SWITCHING,{id:C,groupId:o,name:P,type:O,url:y}),h.details&&!h.details.live)return;var x=this.switchParams(h.url,d==null?void 0:d.details);this.loadPlaylist(x)},b.selectInitialTrack=function(){var v=this.tracksInGroup;console.assert(v.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,d=this.findTrackId(n)||this.findTrackId();d!==-1?this.setAudioTrack(d):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},b.findTrackId=function(v){for(var n=this.tracksInGroup,d=0;d<n.length;d++){var h=n[d];if((!this.selectDefaultTrack||h.default)&&(!v||v===h.name))return h.id}return-1},b.loadPlaylist=function(v){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var d=n.id,h=n.groupId,C=n.url;if(v)try{C=v.addDirectives(C)}catch(T){this.warn("Could not construct new URL with HLS Delivery Directives: "+T)}this.log("loading audio-track playlist for id: "+d),this.clearTimer(),this.hls.trigger(R.Events.AUDIO_TRACK_LOADING,{url:C,id:d,groupId:h,deliveryDirectives:v||null})}},i(m,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(v){this.selectDefaultTrack=!1,this.setAudioTrack(v)}}]),m}(s.default);c.default=u},"./src/controller/base-playlist-controller.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return i});var R=S("./src/polyfills/number.ts"),f=S("./src/types/level.ts"),s=S("./src/controller/level-helper.ts"),w=S("./src/utils/logger.ts"),l=S("./src/errors.ts"),i=function(){function a(u,p){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=w.logger.log.bind(w.logger,p+":"),this.warn=w.logger.warn.bind(w.logger,p+":"),this.hls=u}var r=a.prototype;return r.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},r.onError=function(p,m){m.fatal&&m.type===l.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,m){var b=m==null?void 0:m.renditionReports;if(b)for(var g=0;g<b.length;g++){var v=b[g],n=""+v.URI;if(n===p.substr(-n.length)){var d=parseInt(v["LAST-MSN"]),h=parseInt(v["LAST-PART"]);if(m&&this.hls.config.lowLatencyMode){var C=Math.min(m.age-m.partTarget,m.targetduration);h!==void 0&&C>m.partTarget&&(h+=1)}if(Object(R.isFiniteNumber)(d))return new f.HlsUrlParameters(d,Object(R.isFiniteNumber)(h)?h:void 0,f.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,m,b){var g=this,v=m.details,n=m.stats,d=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(v.advancedDateTime=Date.now()-d,v.live||b!=null&&b.live){if(v.reloaded(b),b&&this.log("live playlist "+p+" "+(v.advanced?"REFRESHED "+v.lastPartSn+"-"+v.lastPartIndex:"MISSED")),b&&v.fragments.length>0&&Object(s.mergeDetails)(b,v),!this.canLoad||!v.live)return;var h,C=void 0,T=void 0;if(v.canBlockReload&&v.endSN&&v.advanced){var o=this.hls.config.lowLatencyMode,P=v.lastPartSn,O=v.endSN,y=v.lastPartIndex,x=y!==-1,E=P===O,_=o?0:y;x?(C=E?O+1:P,T=E?_:y+1):C=O+1;var N=v.age,j=N+v.ageHeader,M=Math.min(j-v.partTarget,v.targetduration*1.5);if(M>0){if(b&&M>b.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+b.tuneInGoal+" to: "+M+" with playlist age: "+v.age),M=0;else{var H=Math.floor(M/v.targetduration);if(C+=H,T!==void 0){var z=Math.round(M%v.targetduration/v.partTarget);T+=z}this.log("CDN Tune-in age: "+v.ageHeader+"s last advanced "+N.toFixed(2)+"s goal: "+M+" skip sn "+H+" to part "+T)}v.tuneInGoal=M}if(h=this.getDeliveryDirectives(v,m.deliveryDirectives,C,T),o||!E){this.loadPlaylist(h);return}}else h=this.getDeliveryDirectives(v,m.deliveryDirectives,C,T);var F=Object(s.computeReloadInterval)(v,n);C!==void 0&&v.canBlockReload&&(F-=v.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(F)+" ms"),this.timer=self.setTimeout(function(){return g.loadPlaylist(h)},F)}else this.clearTimer()},r.getDeliveryDirectives=function(p,m,b,g){var v=Object(f.getSkipValue)(p,b);return m!=null&&m.skip&&p.deltaUpdateFailed&&(b=m.msn,g=m.part,v=f.HlsSkip.No),new f.HlsUrlParameters(b,g,v)},r.retryLoadingOrFail=function(p){var m=this,b=this.hls.config,g=this.retryCount<b.levelLoadingMaxRetry;if(g){var v;if(this.retryCount++,p.details.indexOf("LoadTimeOut")>-1&&(v=p.context)!==null&&v!==void 0&&v.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*b.levelLoadingRetryDelay,b.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return m.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return g},a}()},"./src/controller/base-stream-controller.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"State",function(){return O}),S.d(c,"default",function(){return y});var R=S("./src/polyfills/number.ts"),f=S("./src/task-loop.ts"),s=S("./src/controller/fragment-tracker.ts"),w=S("./src/utils/buffer-helper.ts"),l=S("./src/utils/logger.ts"),i=S("./src/events.ts"),a=S("./src/errors.ts"),r=S("./src/types/transmuxer.ts"),u=S("./src/utils/mp4-tools.ts"),p=S("./src/utils/discontinuities.ts"),m=S("./src/controller/fragment-finders.ts"),b=S("./src/controller/level-helper.ts"),g=S("./src/loader/fragment-loader.ts"),v=S("./src/crypt/decrypter.ts"),n=S("./src/utils/time-ranges.ts"),d=S("./src/types/loader.ts");function h(x,E){for(var _=0;_<E.length;_++){var N=E[_];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,N.key,N)}}function C(x,E,_){return E&&h(x.prototype,E),_&&h(x,_),x}function T(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function o(x,E){x.prototype=Object.create(E.prototype),x.prototype.constructor=x,P(x,E)}function P(x,E){return P=Object.setPrototypeOf||function(N,j){return N.__proto__=j,N},P(x,E)}var O={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},y=function(x){o(E,x);function E(N,j,M){var H;return H=x.call(this)||this,H.hls=void 0,H.fragPrevious=null,H.fragCurrent=null,H.fragmentTracker=void 0,H.transmuxer=null,H._state=O.STOPPED,H.media=void 0,H.mediaBuffer=void 0,H.config=void 0,H.bitrateTest=!1,H.lastCurrentTime=0,H.nextLoadPosition=0,H.startPosition=0,H.loadedmetadata=!1,H.fragLoadError=0,H.retryDate=0,H.levels=null,H.fragmentLoader=void 0,H.levelLastLoaded=null,H.startFragRequested=!1,H.decrypter=void 0,H.initPTS=[],H.onvseeking=null,H.onvended=null,H.logPrefix="",H.log=void 0,H.warn=void 0,H.logPrefix=M,H.log=l.logger.log.bind(l.logger,M+":"),H.warn=l.logger.warn.bind(l.logger,M+":"),H.hls=N,H.fragmentLoader=new g.default(N.config),H.fragmentTracker=j,H.config=N.config,H.decrypter=new v.default(N,N.config),N.on(i.Events.KEY_LOADED,H.onKeyLoaded,T(H)),H}var _=E.prototype;return _.doTick=function(){this.onTickEnd()},_.onTickEnd=function(){},_.startLoad=function(j){},_.stopLoad=function(){this.fragmentLoader.abort();var j=this.fragCurrent;j&&this.fragmentTracker.removeFragment(j),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},_._streamEnded=function(j,M){var H=this.fragCurrent,z=this.fragmentTracker;if(!M.live&&H&&H.sn===M.endSN&&!j.nextStart){var F=z.getState(H);return F===s.FragmentState.PARTIAL||F===s.FragmentState.OK}return!1},_.onMediaAttached=function(j,M){var H=this.media=this.mediaBuffer=M.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),H.addEventListener("seeking",this.onvseeking),H.addEventListener("ended",this.onvended);var z=this.config;this.levels&&z.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(z.startPosition)},_.onMediaDetaching=function(){var j=this.media;j!=null&&j.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),j&&(j.removeEventListener("seeking",this.onvseeking),j.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},_.onMediaSeeking=function(){var j=this.config,M=this.fragCurrent,H=this.media,z=this.mediaBuffer,F=this.state,G=H?H.currentTime:0,B=w.BufferHelper.bufferInfo(z||H,G,j.maxBufferHole);if(this.log("media seeking to "+(Object(R.isFiniteNumber)(G)?G.toFixed(3):G)+", state: "+F),F===O.ENDED)this.resetLoadingState();else if(M&&!B.len){var K=j.maxFragLookUpTolerance,W=M.start-K,J=M.start+M.duration+K,ee=G>J;(G<W||ee)&&(ee&&M.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),M.loader.abort()),this.resetLoadingState())}H&&(this.lastCurrentTime=G),!this.loadedmetadata&&!B.len&&(this.nextLoadPosition=this.startPosition=G),this.tickImmediate()},_.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},_.onKeyLoaded=function(j,M){if(this.state!==O.KEY_LOADING||M.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var H=this.levels[M.frag.level].details;H&&this.loadFragment(M.frag,H,M.frag.start)},_.onHandlerDestroying=function(){this.stopLoad(),x.prototype.onHandlerDestroying.call(this)},_.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(i.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,x.prototype.onHandlerDestroyed.call(this)},_.loadKey=function(j,M){this.log("Loading key for "+j.sn+" of ["+M.startSN+"-"+M.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level),this.state=O.KEY_LOADING,this.fragCurrent=j,this.hls.trigger(i.Events.KEY_LOADING,{frag:j})},_.loadFragment=function(j,M,H){this._loadFragForPlayback(j,M,H)},_._loadFragForPlayback=function(j,M,H){var z=this,F=function(B){if(z.fragContextChanged(j)){z.warn("Fragment "+j.sn+(B.part?" p: "+B.part.index:"")+" of level "+j.level+" was dropped during download."),z.fragmentTracker.removeFragment(j);return}j.stats.chunkCount++,z._handleFragmentLoadProgress(B)};this._doFragLoad(j,M,H,F).then(function(G){if(!G)return;z.fragLoadError=0;var B=z.state;if(z.fragContextChanged(j)){(B===O.FRAG_LOADING||B===O.BACKTRACKING||!z.fragCurrent&&B===O.PARSING)&&(z.fragmentTracker.removeFragment(j),z.state=O.IDLE);return}if("payload"in G&&(z.log("Loaded fragment "+j.sn+" of level "+j.level),z.hls.trigger(i.Events.FRAG_LOADED,G),z.state===O.BACKTRACKING)){z.fragmentTracker.backtrack(j,G),z.resetFragmentLoading(j);return}z._handleFragmentLoadComplete(G)}).catch(function(G){z.warn(G),z.resetFragmentLoading(j)})},_.flushMainBuffer=function(j,M,H){if(H===void 0&&(H=null),!(j-M))return;var z={startOffset:j,endOffset:M,type:H};this.fragLoadError=0,this.hls.trigger(i.Events.BUFFER_FLUSHING,z)},_._loadInitSegment=function(j){var M=this;this._doFragLoad(j).then(function(H){if(!H||M.fragContextChanged(j)||!M.levels)throw new Error("init load aborted");return H}).then(function(H){var z=M.hls,F=H.payload,G=j.decryptdata;if(F&&F.byteLength>0&&G&&G.key&&G.iv&&G.method==="AES-128"){var B=self.performance.now();return M.decrypter.webCryptoDecrypt(new Uint8Array(F),G.key.buffer,G.iv.buffer).then(function(K){var W=self.performance.now();return z.trigger(i.Events.FRAG_DECRYPTED,{frag:j,payload:K,stats:{tstart:B,tdecrypt:W}}),H.payload=K,H})}return H}).then(function(H){var z=M.fragCurrent,F=M.hls,G=M.levels;if(!G)throw new Error("init load aborted, missing levels");var B=G[j.level].details;console.assert(B,"Level details are defined when init segment is loaded");var K=j.stats;M.state=O.IDLE,M.fragLoadError=0,j.data=new Uint8Array(H.payload),K.parsing.start=K.buffering.start=self.performance.now(),K.parsing.end=K.buffering.end=self.performance.now(),H.frag===z&&F.trigger(i.Events.FRAG_BUFFERED,{stats:K,frag:z,part:null,id:j.type}),M.tick()}).catch(function(H){M.warn(H),M.resetFragmentLoading(j)})},_.fragContextChanged=function(j){var M=this.fragCurrent;return!j||!M||j.level!==M.level||j.sn!==M.sn||j.urlId!==M.urlId},_.fragBufferedComplete=function(j,M){var H=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+j.type+" sn: "+j.sn+(M?" part: "+M.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level+" "+n.default.toString(w.BufferHelper.getBuffered(H))),this.state=O.IDLE,this.tick()},_._handleFragmentLoadComplete=function(j){var M=this.transmuxer;if(!M)return;var H=j.frag,z=j.part,F=j.partsLoaded,G=!F||F.length===0||F.some(function(K){return!K}),B=new r.ChunkMetadata(H.level,H.sn,H.stats.chunkCount+1,0,z?z.index:-1,!G);M.flush(B)},_._handleFragmentLoadProgress=function(j){},_._doFragLoad=function(j,M,H,z){var F=this;if(H===void 0&&(H=null),!this.levels)throw new Error("frag load aborted, missing levels");if(H=Math.max(j.start,H||0),this.config.lowLatencyMode&&M){var G=M.partList;if(G&&z){H>j.end&&M.fragmentHint&&(j=M.fragmentHint);var B=this.getNextPart(G,j,H);if(B>-1){var K=G[B];return this.log("Loading part sn: "+j.sn+" p: "+K.index+" cc: "+j.cc+" of playlist ["+M.startSN+"-"+M.endSN+"] parts [0-"+B+"-"+(G.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(H.toFixed(3))),this.nextLoadPosition=K.start+K.duration,this.state=O.FRAG_LOADING,this.hls.trigger(i.Events.FRAG_LOADING,{frag:j,part:G[B],targetBufferTime:H}),this.doFragPartsLoad(j,G,B,z).catch(function(W){return F.handleFragLoadError(W)})}else if(!j.url||this.loadedEndOfParts(G,H))return Promise.resolve(null)}}return this.log("Loading fragment "+j.sn+" cc: "+j.cc+" "+(M?"of ["+M.startSN+"-"+M.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(H.toFixed(3))),Object(R.isFiniteNumber)(j.sn)&&!this.bitrateTest&&(this.nextLoadPosition=j.start+j.duration),this.state=O.FRAG_LOADING,this.hls.trigger(i.Events.FRAG_LOADING,{frag:j,targetBufferTime:H}),this.fragmentLoader.load(j,z).catch(function(W){return F.handleFragLoadError(W)})},_.doFragPartsLoad=function(j,M,H,z){var F=this;return new Promise(function(G,B){var K=[],W=function J(ee){var Z=M[ee];F.fragmentLoader.loadPart(j,Z,z).then(function(he){K[Z.index]=he;var ge=he.part;F.hls.trigger(i.Events.FRAG_LOADED,he);var ie=M[ee+1];if(ie&&ie.fragment===j)J(ee+1);else return G({frag:j,part:ge,partsLoaded:K})}).catch(B)};W(H)})},_.handleFragLoadError=function(j){var M=j.data;return M&&M.details===a.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(M.frag,M.part):this.hls.trigger(i.Events.ERROR,M),null},_._handleTransmuxerFlush=function(j){var M=this.getCurrentContext(j);if(!M||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var H=M.frag,z=M.part,F=M.level,G=self.performance.now();H.stats.parsing.end=G,z&&(z.stats.parsing.end=G),this.updateLevelTiming(H,z,F,j.partial)},_.getCurrentContext=function(j){var M=this.levels,H=j.level,z=j.sn,F=j.part;if(!M||!M[H])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+H+". The current chunk will not be buffered."),null;var G=M[H],B=F>-1?Object(b.getPartWith)(G,z,F):null,K=B?B.fragment:Object(b.getFragmentWithSN)(G,z,this.fragCurrent);return K?{frag:K,part:B,level:G}:null},_.bufferFragmentData=function(j,M,H,z){if(!j||this.state!==O.PARSING)return;var F=j.data1,G=j.data2,B=F;if(F&&G&&(B=Object(u.appendUint8Array)(F,G)),!B||!B.length)return;var K={type:j.type,frag:M,part:H,chunkMeta:z,parent:M.type,data:B};this.hls.trigger(i.Events.BUFFER_APPENDING,K),j.dropped&&j.independent&&!H&&this.flushBufferGap(M)},_.flushBufferGap=function(j){var M=this.media;if(!M)return;if(!w.BufferHelper.isBuffered(M,M.currentTime)){this.flushMainBuffer(0,j.start);return}var H=M.currentTime,z=w.BufferHelper.bufferInfo(M,H,0),F=j.duration,G=Math.min(this.config.maxFragLookUpTolerance*2,F*.25),B=Math.max(Math.min(j.start-G,z.end-G),H+G);j.start-B>G&&this.flushMainBuffer(B,j.start)},_.getFwdBufferInfo=function(j,M){var H=this.config,z=this.getLoadPosition();if(!Object(R.isFiniteNumber)(z))return null;var F=w.BufferHelper.bufferInfo(j,z,H.maxBufferHole);if(F.len===0&&F.nextStart!==void 0){var G=this.fragmentTracker.getBufferedFrag(z,M);if(G&&F.nextStart<G.end)return w.BufferHelper.bufferInfo(j,z,Math.max(F.nextStart,H.maxBufferHole))}return F},_.getMaxBufferLength=function(j){var M=this.config,H;return j?H=Math.max(8*M.maxBufferSize/j,M.maxBufferLength):H=M.maxBufferLength,Math.min(H,M.maxMaxBufferLength)},_.reduceMaxBufferLength=function(j){var M=this.config,H=j||M.maxBufferLength;return M.maxMaxBufferLength>=H?(M.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+M.maxMaxBufferLength+"s"),!0):!1},_.getNextFragment=function(j,M){var H,z,F=M.fragments,G=F.length;if(!G)return null;var B=this.config,K=F[0].start,W;if(M.live){var J=B.initialLiveManifestSize;if(G<J)return this.warn("Not enough fragments to start playback (have: "+G+", need: "+J+")"),null;!M.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(W=this.getInitialLiveFragment(M,F),this.startPosition=W?this.hls.liveSyncPosition||W.start:j)}else j<=K&&(W=F[0]);if(!W){var ee=B.lowLatencyMode?M.partEnd:M.fragmentEnd;W=this.getFragmentAtPosition(j,ee,M)}return(H=W)!==null&&H!==void 0&&H.initSegment&&!((z=W)!==null&&z!==void 0&&z.initSegment.data)&&!this.bitrateTest&&(W=W.initSegment),W},_.getNextPart=function(j,M,H){for(var z=-1,F=!1,G=!0,B=0,K=j.length;B<K;B++){var W=j[B];if(G=G&&!W.independent,z>-1&&H<W.start)break;var J=W.loaded;!J&&(F||W.independent||G)&&W.fragment===M&&(z=B),F=J}return z},_.loadedEndOfParts=function(j,M){var H=j[j.length-1];return H&&M>H.start&&H.loaded},_.getInitialLiveFragment=function(j,M){var H=this.fragPrevious,z=null;if(H){if(j.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+H.programDateTime),z=Object(m.findFragmentByPDT)(M,H.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var F=H.sn+1;if(F>=j.startSN&&F<=j.endSN){var G=M[F-j.startSN];H.cc===G.cc&&(z=G,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=Object(m.findFragWithCC)(M,H.cc),z&&this.log("Live playlist, switching playlist, load frag with same CC: "+z.sn))}}else{var B=this.hls.liveSyncPosition;B!==null&&(z=this.getFragmentAtPosition(B,this.bitrateTest?j.fragmentEnd:j.edge,j))}return z},_.getFragmentAtPosition=function(j,M,H){var z=this.config,F=this.fragPrevious,G=H.fragments,B=H.endSN,K=H.fragmentHint,W=z.maxFragLookUpTolerance,J=!!(z.lowLatencyMode&&H.partList&&K);J&&K&&!this.bitrateTest&&(G=G.concat(K),B=K.sn);var ee;if(j<M){var Z=j>M-W?0:W;ee=Object(m.findFragmentByPTS)(F,G,j,Z)}else ee=G[G.length-1];if(ee){var he=ee.sn-H.startSN,ge=F&&ee.level===F.level,ie=G[he+1],we=this.fragmentTracker.getState(ee);if(we===s.FragmentState.BACKTRACKED){ee=null;for(var me=he;G[me]&&this.fragmentTracker.getState(G[me])===s.FragmentState.BACKTRACKED;)F?ee=G[me--]:ee=G[--me];ee||(ee=ie)}else F&&ee.sn===F.sn&&!J&&(ge&&(ee.sn<B&&this.fragmentTracker.getState(ie)!==s.FragmentState.OK?(this.log("SN "+ee.sn+" just loaded, load next one: "+ie.sn),ee=ie):ee=null))}return ee},_.synchronizeToLiveEdge=function(j){var M=this.config,H=this.media;if(!H)return;var z=this.hls.liveSyncPosition,F=H.currentTime,G=j.fragments[0].start,B=j.edge,K=F>=G-M.maxFragLookUpTolerance&&F<=B;if(z!==null&&H.duration>z&&(F<z||!K)){var W=M.liveMaxLatencyDuration!==void 0?M.liveMaxLatencyDuration:M.liveMaxLatencyDurationCount*j.targetduration;(!K&&H.readyState<4||F<B-W)&&(this.loadedmetadata||(this.nextLoadPosition=z),H.readyState&&(this.warn("Playback: "+F.toFixed(3)+" is located too far from the end of live sliding playlist: "+B+", reset currentTime to : "+z.toFixed(3)),H.currentTime=z))}},_.alignPlaylists=function(j,M){var H=this.levels,z=this.levelLastLoaded,F=this.fragPrevious,G=z!==null?H[z]:null,B=j.fragments.length;if(!B)return this.warn("No fragments in live playlist"),0;var K=j.fragments[0].start,W=!M,J=j.alignedSliding&&Object(R.isFiniteNumber)(K);if(W||!J&&!K){Object(p.alignStream)(F,G,j);var ee=j.fragments[0].start;return this.log("Live playlist sliding: "+ee.toFixed(2)+" start-sn: "+(M?M.startSN:"na")+"->"+j.startSN+" prev-sn: "+(F?F.sn:"na")+" fragments: "+B),ee}return K},_.waitForCdnTuneIn=function(j){var M=3;return j.live&&j.canBlockReload&&j.tuneInGoal>Math.max(j.partHoldBack,j.partTarget*M)},_.setStartPosition=function(j,M){var H=this.startPosition;if(H<M&&(H=-1),H===-1||this.lastCurrentTime===-1){var z=j.startTimeOffset;Object(R.isFiniteNumber)(z)?(H=M+z,z<0&&(H+=j.totalduration),H=Math.min(Math.max(M,H),M+j.totalduration),this.log("Start time offset "+z+" found in playlist, adjust startPosition to "+H),this.startPosition=H):j.live?H=this.hls.liveSyncPosition||M:this.startPosition=H=0,this.lastCurrentTime=H}this.nextLoadPosition=H},_.getLoadPosition=function(){var j=this.media,M=0;return this.loadedmetadata&&j?M=j.currentTime:this.nextLoadPosition&&(M=this.nextLoadPosition),M},_.handleFragLoadAborted=function(j,M){this.transmuxer&&j.sn!=="initSegment"&&j.stats.aborted&&(this.warn("Fragment "+j.sn+(M?" part"+M.index:"")+" of level "+j.level+" was aborted"),this.resetFragmentLoading(j))},_.resetFragmentLoading=function(j){(!this.fragCurrent||!this.fragContextChanged(j))&&(this.state=O.IDLE)},_.onFragmentOrKeyLoadError=function(j,M){if(M.fatal)return;var H=M.frag;if(!H||H.type!==j)return;var z=this.fragCurrent;console.assert(z&&H.sn===z.sn&&H.level===z.level&&H.urlId===z.urlId,"Frag load error must match current frag to retry");var F=this.config;if(this.fragLoadError+1<=F.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(H.level))return;var G=Math.min(Math.pow(2,this.fragLoadError)*F.fragLoadingRetryDelay,F.fragLoadingMaxRetryTimeout);this.warn("Fragment "+H.sn+" of "+j+" "+H.level+" failed to load, retrying in "+G+"ms"),this.retryDate=self.performance.now()+G,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else M.levelRetry?(j===d.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(l.logger.error(M.details+" reaches max retry, redispatch as fatal ..."),M.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},_.afterBufferFlushed=function(j,M,H){if(!j)return;var z=w.BufferHelper.getBuffered(j);this.fragmentTracker.detectEvictedFragments(M,z,H),this.state===O.ENDED&&this.resetLoadingState()},_.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},_.resetLiveStartWhenNotLoaded=function(j){if(!this.loadedmetadata){this.startFragRequested=!1;var M=this.levels?this.levels[j].details:null;if(M!=null&&M.live)return this.startPosition=-1,this.setStartPosition(M,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},_.updateLevelTiming=function(j,M,H,z){var F=this,G=H.details;console.assert(!!G,"level.details must be defined");var B=Object.keys(j.elementaryStreams).reduce(function(K,W){var J=j.elementaryStreams[W];if(J){var ee=J.endPTS-J.startPTS;if(ee<=0)return F.warn("Could not parse fragment "+j.sn+" "+W+" duration reliably ("+ee+") resetting transmuxer to fallback to playlist timing"),F.resetTransmuxer(),K||!1;var Z=z?0:Object(b.updateFragPTSDTS)(G,j,J.startPTS,J.endPTS,J.startDTS,J.endDTS);return F.hls.trigger(i.Events.LEVEL_PTS_UPDATED,{details:G,level:H,drift:Z,type:W,frag:j,start:J.startPTS,end:J.endPTS}),!0}return K},!1);B?(this.state=O.PARSED,this.hls.trigger(i.Events.FRAG_PARSED,{frag:j,part:M})):this.resetLoadingState()},_.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},C(E,[{key:"state",get:function(){return this._state},set:function(j){var M=this._state;M!==j&&(this._state=j,this.log(M+"->"+j))}}]),E}(f.default)},"./src/controller/buffer-controller.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return m});var R=S("./src/polyfills/number.ts"),f=S("./src/events.ts"),s=S("./src/utils/logger.ts"),w=S("./src/errors.ts"),l=S("./src/utils/buffer-helper.ts"),i=S("./src/utils/mediasource-helper.ts"),a=S("./src/loader/fragment.ts"),r=S("./src/controller/buffer-operation-queue.ts"),u=Object(i.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,m=function(){function b(v){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 d=n.hls,h=n.media,C=n.mediaSource;s.logger.log("[buffer-controller]: Media source opened"),h&&(n.updateMediaElementDuration(),d.trigger(f.Events.MEDIA_ATTACHED,{media:h})),C&&C.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){s.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){s.logger.log("[buffer-controller]: Media source ended")},this.hls=v,this._initSourceBuffer(),this.registerListeners()}var g=b.prototype;return g.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},g.destroy=function(){this.unregisterListeners(),this.details=null},g.registerListeners=function(){var n=this.hls;n.on(f.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(f.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(f.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(f.Events.BUFFER_RESET,this.onBufferReset,this),n.on(f.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(f.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(f.Events.BUFFER_EOS,this.onBufferEos,this),n.on(f.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(f.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(f.Events.FRAG_PARSED,this.onFragParsed,this),n.on(f.Events.FRAG_CHANGED,this.onFragChanged,this)},g.unregisterListeners=function(){var n=this.hls;n.off(f.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(f.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(f.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(f.Events.BUFFER_RESET,this.onBufferReset,this),n.off(f.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(f.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(f.Events.BUFFER_EOS,this.onBufferEos,this),n.off(f.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(f.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(f.Events.FRAG_PARSED,this.onFragParsed,this),n.off(f.Events.FRAG_CHANGED,this.onFragChanged,this)},g._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},g.onManifestParsed=function(n,d){var h=2;(d.audio&&!d.video||!d.altAudio)&&(h=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=h,this.details=null,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},g.onMediaAttaching=function(n,d){var h=this.media=d.media;if(h&&u){var C=this.mediaSource=new u;C.addEventListener("sourceopen",this._onMediaSourceOpen),C.addEventListener("sourceended",this._onMediaSourceEnded),C.addEventListener("sourceclose",this._onMediaSourceClose),h.src=self.URL.createObjectURL(C),this._objectUrl=h.src}},g.onMediaDetaching=function(){var n=this.media,d=this.mediaSource,h=this._objectUrl;if(d){if(s.logger.log("[buffer-controller]: media source detaching"),d.readyState==="open")try{d.endOfStream()}catch(C){s.logger.warn("[buffer-controller]: onMediaDetaching: "+C.message+" while calling endOfStream")}this.onBufferReset(),d.removeEventListener("sourceopen",this._onMediaSourceOpen),d.removeEventListener("sourceended",this._onMediaSourceEnded),d.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(h&&self.URL.revokeObjectURL(h),n.src===h?(n.removeAttribute("src"),n.load()):s.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(f.Events.MEDIA_DETACHED,void 0)},g.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(d){var h=n.sourceBuffer[d];try{h&&(n.removeBufferListeners(d),n.mediaSource&&n.mediaSource.removeSourceBuffer(h),n.sourceBuffer[d]=void 0)}catch(C){s.logger.warn("[buffer-controller]: Failed to reset the "+d+" buffer",C)}}),this._initSourceBuffer()},g.onBufferCodecs=function(n,d){var h=this,C=this.getSourceBufferTypes().length;if(Object.keys(d).forEach(function(T){if(C){var o=h.tracks[T];if(o&&typeof o.buffer.changeType=="function"){var P=d[T],O=P.codec,y=P.levelCodec,x=P.container,E=(o.levelCodec||o.codec).replace(p,"$1"),_=(y||O).replace(p,"$1");if(E!==_){var N=x+";codecs="+(y||O);h.appendChangeType(T,N)}}}else h.pendingTracks[T]=d[T]}),C)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},g.appendChangeType=function(n,d){var h=this,C=this.operationQueue,T={execute:function(){var P=h.sourceBuffer[n];P&&(s.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+d),P.changeType(d)),C.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(P){s.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",P)}};C.append(T,n)},g.onBufferAppending=function(n,d){var h=this,C=this.hls,T=this.operationQueue,o=this.tracks,P=d.data,O=d.type,y=d.frag,x=d.part,E=d.chunkMeta,_=E.buffering[O],N=self.performance.now();_.start=N;var j=y.stats.buffering,M=x?x.stats.buffering:null;j.start===0&&(j.start=N),M&&M.start===0&&(M.start=N);var H=o.audio,z=O==="audio"&&E.id===1&&(H==null?void 0:H.container)==="audio/mpeg",F={execute:function(){if(_.executeStart=self.performance.now(),z){var B=h.sourceBuffer[O];if(B){var K=y.start-B.timestampOffset;Math.abs(K)>=.1&&(s.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+y.start+" (delta: "+K+") sn: "+y.sn+")"),B.timestampOffset=y.start)}}h.appendExecutor(P,O)},onStart:function(){},onComplete:function(){var B=self.performance.now();_.executeEnd=_.end=B,j.first===0&&(j.first=B),M&&M.first===0&&(M.first=B);var K=h.sourceBuffer,W={};for(var J in K)W[J]=l.BufferHelper.getBuffered(K[J]);h.appendError=0,h.hls.trigger(f.Events.BUFFER_APPENDED,{type:O,frag:y,part:x,chunkMeta:E,parent:y.type,timeRanges:W})},onError:function(B){s.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",B);var K={type:w.ErrorTypes.MEDIA_ERROR,parent:y.type,details:w.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?K.details=w.ErrorDetails.BUFFER_FULL_ERROR:(h.appendError++,K.details=w.ErrorDetails.BUFFER_APPEND_ERROR,h.appendError>C.config.appendErrorMaxRetry&&(s.logger.error("[buffer-controller]: Failed "+C.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),K.fatal=!0)),C.trigger(f.Events.ERROR,K)}};T.append(F,O)},g.onBufferFlushing=function(n,d){var h=this,C=this.operationQueue,T=function(P){return{execute:h.removeExecutor.bind(h,P,d.startOffset,d.endOffset),onStart:function(){},onComplete:function(){h.hls.trigger(f.Events.BUFFER_FLUSHED,{type:P})},onError:function(y){s.logger.warn("[buffer-controller]: Failed to remove from "+P+" SourceBuffer",y)}}};d.type?C.append(T(d.type),d.type):this.getSourceBufferTypes().forEach(function(o){C.append(T(o),o)})},g.onFragParsed=function(n,d){var h=this,C=d.frag,T=d.part,o=[],P=T?T.elementaryStreams:C.elementaryStreams;P[a.ElementaryStreamTypes.AUDIOVIDEO]?o.push("audiovideo"):(P[a.ElementaryStreamTypes.AUDIO]&&o.push("audio"),P[a.ElementaryStreamTypes.VIDEO]&&o.push("video"));var O=function(){var x=self.performance.now();C.stats.buffering.end=x,T&&(T.stats.buffering.end=x);var E=T?T.stats:C.stats;h.hls.trigger(f.Events.FRAG_BUFFERED,{frag:C,part:T,stats:E,id:C.type})};o.length===0&&s.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+C.type+" level: "+C.level+" sn: "+C.sn),this.blockBuffers(O,o)},g.onFragChanged=function(n,d){this.flushBackBuffer()},g.onBufferEos=function(n,d){var h=this,C=this.getSourceBufferTypes().reduce(function(T,o){var P=h.sourceBuffer[o];return(!d.type||d.type===o)&&(P&&!P.ended&&(P.ended=!0,s.logger.log("[buffer-controller]: "+o+" sourceBuffer now EOS"))),T&&!!(!P||P.ended)},!0);C&&this.blockBuffers(function(){var T=h.mediaSource;if(!T||T.readyState!=="open")return;T.endOfStream()})},g.onLevelUpdated=function(n,d){var h=d.details;if(!h.fragments.length)return;this.details=h,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},g.flushBackBuffer=function(){var n=this.hls,d=this.details,h=this.media,C=this.sourceBuffer;if(!h||d===null)return;var T=this.getSourceBufferTypes();if(!T.length)return;var o=d.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(R.isFiniteNumber)(o)||o<0)return;var P=h.currentTime,O=d.levelTargetDuration,y=Math.max(o,O),x=Math.floor(P/O)*O-y;T.forEach(function(E){var _=C[E];if(_){var N=l.BufferHelper.getBuffered(_);N.length>0&&x>N.start(0)&&(n.trigger(f.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),d.live&&n.trigger(f.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),n.trigger(f.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:E}))}})},g.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,d=this.hls,h=this.media,C=this.mediaSource,T=n.fragments[0].start+n.totalduration,o=h.duration,P=Object(R.isFiniteNumber)(C.duration)?C.duration:0;n.live&&d.config.liveDurationInfinity?(s.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),C.duration=Infinity,this.updateSeekableRange(n)):(T>P&&T>o||!Object(R.isFiniteNumber)(o))&&(s.logger.log("[buffer-controller]: Updating Media Source duration to "+T.toFixed(3)),C.duration=T)},g.updateSeekableRange=function(n){var d=this.mediaSource,h=n.fragments,C=h.length;if(C&&n.live&&d!==null&&d!==void 0&&d.setLiveSeekableRange){var T=Math.max(0,h[0].start),o=Math.max(T,T+n.totalduration);d.setLiveSeekableRange(T,o)}},g.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,d=this.operationQueue,h=this.pendingTracks,C=Object.keys(h).length;if(C&&!n||C===2){this.createSourceBuffers(h),this.pendingTracks={};var T=this.getSourceBufferTypes();if(T.length===0){this.hls.trigger(f.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}T.forEach(function(o){d.executeNext(o)})}},g.createSourceBuffers=function(n){var d=this.sourceBuffer,h=this.mediaSource;if(!h)throw Error("createSourceBuffers called when mediaSource was null");var C=0;for(var T in n)if(!d[T]){var o=n[T];if(!o)throw Error("source buffer exists for track "+T+", however track does not");var P=o.levelCodec||o.codec,O=o.container+";codecs="+P;s.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var y=d[T]=h.addSourceBuffer(O),x=T;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[T]={buffer:y,codec:P,container:o.container,levelCodec:o.levelCodec,id:o.id},C++}catch(E){s.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+E.message),this.hls.trigger(f.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:E,mimeType:O})}}C&&this.hls.trigger(f.Events.BUFFER_CREATED,{tracks:this.tracks})},g._onSBUpdateStart=function(n){var d=this.operationQueue,h=d.current(n);h.onStart()},g._onSBUpdateEnd=function(n){var d=this.operationQueue,h=d.current(n);h.onComplete(),d.shiftAndExecuteNext(n)},g._onSBUpdateError=function(n,d){s.logger.error("[buffer-controller]: "+n+" SourceBuffer error",d),this.hls.trigger(f.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var h=this.operationQueue.current(n);h&&h.onError(d)},g.removeExecutor=function(n,d,h){var C=this.media,T=this.mediaSource,o=this.operationQueue,P=this.sourceBuffer,O=P[n];if(!C||!T||!O){s.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),o.shiftAndExecuteNext(n);return}var y=Object(R.isFiniteNumber)(C.duration)?C.duration:Infinity,x=Object(R.isFiniteNumber)(T.duration)?T.duration:Infinity,E=Math.max(0,d),_=Math.min(h,y,x);_>E?(s.logger.log("[buffer-controller]: Removing ["+E+","+_+"] from the "+n+" SourceBuffer"),console.assert(!O.updating,n+" sourceBuffer must not be updating"),O.remove(E,_)):o.shiftAndExecuteNext(n)},g.appendExecutor=function(n,d){var h=this.operationQueue,C=this.sourceBuffer,T=C[d];if(!T){s.logger.warn("[buffer-controller]: Attempting to append to the "+d+" SourceBuffer, but it does not exist"),h.shiftAndExecuteNext(d);return}T.ended=!1,console.assert(!T.updating,d+" sourceBuffer must not be updating"),T.appendBuffer(n)},g.blockBuffers=function(n,d){var h=this;if(d===void 0&&(d=this.getSourceBufferTypes()),!d.length){s.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var C=this.operationQueue,T=d.map(function(o){return C.appendBlocker(o)});Promise.all(T).then(function(){n(),d.forEach(function(o){var P=h.sourceBuffer[o];(!P||!P.updating)&&C.shiftAndExecuteNext(o)})})},g.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},g.addBufferListener=function(n,d,h){var C=this.sourceBuffer[n];if(!C)return;var T=h.bind(this,n);this.listeners[n].push({event:d,listener:T}),C.addEventListener(d,T)},g.removeBufferListeners=function(n){var d=this.sourceBuffer[n];if(!d)return;this.listeners[n].forEach(function(h){d.removeEventListener(h.event,h.listener)})},b}()},"./src/controller/buffer-operation-queue.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return f});var R=S("./src/utils/logger.ts"),f=function(){function s(l){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=l}var w=s.prototype;return w.append=function(i,a){var r=this.queues[a];r.push(i),r.length===1&&this.buffers[a]&&this.executeNext(a)},w.insertAbort=function(i,a){var r=this.queues[a];r.unshift(i),this.executeNext(a)},w.appendBlocker=function(i){var a,r=new Promise(function(p){a=p}),u={execute:a,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(u,i),r},w.executeNext=function(i){var a=this.buffers,r=this.queues,u=a[i],p=r[i];if(p.length){var m=p[0];try{m.execute()}catch(b){R.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),m.onError(b),(!u||!u.updating)&&(p.shift(),this.executeNext(i))}}},w.shiftAndExecuteNext=function(i){this.queues[i].shift(),this.executeNext(i)},w.current=function(i){return this.queues[i][0]},s}()},"./src/controller/cap-level-controller.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/events.ts");function f(l,i){for(var a=0;a<i.length;a++){var r=i[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(l,r.key,r)}}function s(l,i,a){return i&&f(l.prototype,i),a&&f(l,a),l}var w=function(){function l(a){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=a,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var i=l.prototype;return i.setStreamController=function(r){this.streamController=r},i.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},i.registerListeners=function(){var r=this.hls;r.on(R.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(R.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},i.unregisterListener=function(){var r=this.hls;r.off(R.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(R.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},i.onFpsDropLevelCapping=function(r,u){l.isLevelAllowed(u.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(u.droppedLevel)},i.onMediaAttaching=function(r,u){this.media=u.media instanceof HTMLVideoElement?u.media:null},i.onManifestParsed=function(r,u){var p=this.hls;this.restrictedLevels=[],this.firstLevel=u.firstLevel,p.config.capLevelToPlayerSize&&u.video&&this.startCapping()},i.onBufferCodecs=function(r,u){var p=this.hls;p.config.capLevelToPlayerSize&&u.video&&this.startCapping()},i.onMediaDetaching=function(){this.stopCapping()},i.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var u=this.hls;u.autoLevelCapping=this.getMaxLevel(r.length-1),u.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=u.autoLevelCapping}}},i.getMaxLevel=function(r){var u=this,p=this.hls.levels;if(!p.length)return-1;var m=p.filter(function(b,g){return l.isLevelAllowed(g,u.restrictedLevels)&&g<=r});return this.clientRect=null,l.getMaxLevelByMediaSize(m,this.mediaWidth,this.mediaHeight)},i.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},i.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},i.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,u={width:0,height:0};if(r){var p=r.getBoundingClientRect();u.width=p.width,u.height=p.height,!u.width&&!u.height&&(u.width=p.right-p.left||r.width||0,u.height=p.bottom-p.top||r.height||0)}return this.clientRect=u,u},l.isLevelAllowed=function(r,u){return u===void 0&&(u=[]),u.indexOf(r)===-1},l.getMaxLevelByMediaSize=function(r,u,p){if(!r||!r.length)return-1;for(var m=function(d,h){return h?d.width!==h.width||d.height!==h.height:!0},b=r.length-1,g=0;g<r.length;g+=1){var v=r[g];if((v.width>=u||v.height>=p)&&m(v,r[g+1])){b=g;break}}return b},s(l,[{key:"mediaWidth",get:function(){return this.getDimensions().width*l.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*l.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(u){}return r}}]),l}();c.default=w},"./src/controller/cmcd-controller.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return m});var R=S("./src/events.ts"),f=S("./src/types/cmcd.ts"),s=S("./src/utils/buffer-helper.ts"),w=S("./src/utils/logger.ts");function l(b,g){for(var v=0;v<g.length;v++){var n=g[v];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(b,n.key,n)}}function i(b,g,v){return g&&l(b.prototype,g),v&&l(b,v),b}function a(b,g){var v=typeof Symbol!="undefined"&&b[Symbol.iterator]||b["@@iterator"];if(v)return(v=v.call(b)).next.bind(v);if(Array.isArray(b)||(v=r(b))||g&&b&&typeof b.length=="number"){v&&(b=v);var n=0;return function(){return n>=b.length?{done:!0}:{done:!1,value:b[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(b,g){if(!b)return;if(typeof b=="string")return u(b,g);var v=Object.prototype.toString.call(b).slice(8,-1);if(v==="Object"&&b.constructor&&(v=b.constructor.name),v==="Map"||v==="Set")return Array.from(b);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return u(b,g)}function u(b,g){(g==null||g>b.length)&&(g=b.length);for(var v=0,n=new Array(g);v<g;v++)n[v]=b[v];return n}function p(){return p=Object.assign||function(b){for(var g=1;g<arguments.length;g++){var v=arguments[g];for(var n in v)Object.prototype.hasOwnProperty.call(v,n)&&(b[n]=v[n])}return b},p.apply(this,arguments)}var m=function(){function b(v){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(C){try{n.apply(C,{ot:f.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(T){w.logger.warn("Could not generate manifest CMCD data.",T)}},this.applyFragmentData=function(C){try{var T=C.frag,o=n.hls.levels[T.level],P=n.getObjectType(T),O={d:T.duration*1e3,ot:P};(P===f.CMCDObjectType.VIDEO||P===f.CMCDObjectType.AUDIO||P==f.CMCDObjectType.MUXED)&&(O.br=o.bitrate/1e3,O.tb=n.getTopBandwidth(P),O.bl=n.getBufferLength(P)),n.apply(C,O)}catch(y){w.logger.warn("Could not generate segment CMCD data.",y)}},this.hls=v;var d=this.config=v.config,h=d.cmcd;h!=null&&(d.pLoader=this.createPlaylistLoader(),d.fLoader=this.createFragmentLoader(),this.sid=h.sessionId||b.uuid(),this.cid=h.contentId,this.useHeaders=h.useHeaders===!0,this.registerListeners())}var g=b.prototype;return g.registerListeners=function(){var n=this.hls;n.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(R.Events.BUFFER_CREATED,this.onBufferCreated,this)},g.unregisterListeners=function(){var n=this.hls;n.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(R.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},g.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},g.onMediaAttached=function(n,d){this.media=d.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},g.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},g.onBufferCreated=function(n,d){var h,C;this.audioBuffer=(h=d.tracks.audio)===null||h===void 0?void 0:h.buffer,this.videoBuffer=(C=d.tracks.video)===null||C===void 0?void 0:C.buffer},g.createData=function(){var n;return{v:f.CMCDVersion,sf:f.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(n=this.media)===null||n===void 0?void 0:n.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},g.apply=function(n,d){d===void 0&&(d={}),p(d,this.createData());var h=d.ot===f.CMCDObjectType.INIT||d.ot===f.CMCDObjectType.VIDEO||d.ot===f.CMCDObjectType.MUXED;if(this.starved&&h&&(d.bs=!0,d.su=!0,this.starved=!1),d.su==null&&(d.su=this.buffering),this.useHeaders){var C=b.toHeaders(d);if(!Object.keys(C).length)return;n.headers||(n.headers={}),p(n.headers,C)}else{var T=b.toQuery(d);if(!T)return;n.url=b.appendQueryToUri(n.url,T)}},g.getObjectType=function(n){var d=n.type;return d==="subtitle"?f.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?f.CMCDObjectType.INIT:d==="audio"?f.CMCDObjectType.AUDIO:d==="main"?this.hls.audioTracks.length?f.CMCDObjectType.VIDEO:f.CMCDObjectType.MUXED:void 0},g.getTopBandwidth=function(n){for(var d=0,h=n===f.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,C=a(h),T;!(T=C()).done;){var o=T.value;o.bitrate>d&&(d=o.bitrate)}return d>0?d:NaN},g.getBufferLength=function(n){var d=this.hls.media,h=n===f.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!h||!d)return NaN;var C=s.BufferHelper.bufferInfo(h,d.currentTime,this.config.maxBufferHole);return C.len*1e3},g.createPlaylistLoader=function(){var n=this.config.pLoader,d=this.applyPlaylistData,h=n||this.config.loader;return function(){function C(o){this.loader=void 0,this.loader=new h(o)}var T=C.prototype;return T.destroy=function(){this.loader.destroy()},T.abort=function(){this.loader.abort()},T.load=function(P,O,y){d(P),this.loader.load(P,O,y)},i(C,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),C}()},g.createFragmentLoader=function(){var n=this.config.fLoader,d=this.applyFragmentData,h=n||this.config.loader;return function(){function C(o){this.loader=void 0,this.loader=new h(o)}var T=C.prototype;return T.destroy=function(){this.loader.destroy()},T.abort=function(){this.loader.abort()},T.load=function(P,O,y){d(P),this.loader.load(P,O,y)},i(C,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),C}()},b.uuid=function(){var n=URL.createObjectURL(new Blob),d=n.toString();return URL.revokeObjectURL(n),d.substr(d.lastIndexOf("/")+1)},b.serialize=function(n){for(var d=[],h=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},C=function(z){return Math.round(z)},T=function(z){return C(z/100)*100},o=function(z){return encodeURIComponent(z)},P={br:C,d:C,bl:T,dl:T,mtp:T,nor:o,rtp:T,tb:C},O=Object.keys(n||{}).sort(),y=a(O),x;!(x=y()).done;){var E=x.value,_=n[E];if(!h(_))continue;if(E==="v"&&_===1)continue;if(E=="pr"&&_===1)continue;var N=P[E];N&&(_=N(_));var j=typeof _,M=void 0;E==="ot"||E==="sf"||E==="st"?M=E+"="+_:j==="boolean"?M=E:j==="number"?M=E+"="+_:M=E+"="+JSON.stringify(_),d.push(M)}return d.join(",")},b.toHeaders=function(n){for(var d=Object.keys(n),h={},C=["Object","Request","Session","Status"],T=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},P=0,O=d;P<O.length;P++){var y=O[P],x=o[y]!=null?o[y]:1;T[x][y]=n[y]}for(var E=0;E<T.length;E++){var _=b.serialize(T[E]);_&&(h["CMCD-"+C[E]]=_)}return h},b.toQuery=function(n){return"CMCD="+encodeURIComponent(b.serialize(n))},b.appendQueryToUri=function(n,d){if(!d)return n;var h=n.includes("?")?"&":"?";return""+n+h+d},b}()},"./src/controller/eme-controller.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/events.ts"),f=S("./src/errors.ts"),s=S("./src/utils/logger.ts"),w=S("./src/utils/mediakeys-helper.ts");function l(m,b){for(var g=0;g<b.length;g++){var v=b[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}function i(m,b,g){return b&&l(m.prototype,b),g&&l(m,g),m}var a=3,r=function(b,g,v){var n={audioCapabilities:[],videoCapabilities:[]};return b.forEach(function(d){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+d+'"',robustness:v.audioRobustness||""})}),g.forEach(function(d){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+d+'"',robustness:v.videoRobustness||""})}),[n]},u=function(b,g,v,n){switch(b){case w.KeySystems.WIDEVINE:return r(g,v,n);default:throw new Error("Unknown key-system: "+b)}},p=function(){function m(g){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=g,this._config=g.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var b=m.prototype;return b.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},b._registerListeners=function(){this.hls.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this)},b._unregisterListeners=function(){this.hls.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this)},b.getLicenseServerUrl=function(v){switch(v){case w.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+v+'"')},b._attemptKeySystemAccess=function(v,n,d){var h=this,C=u(v,n,d,this._drmSystemOptions);s.logger.log("Requesting encrypted media key-system access");var T=this.requestMediaKeySystemAccess(v,C);this.mediaKeysPromise=T.then(function(o){return h._onMediaKeySystemAccessObtained(v,o)}),T.catch(function(o){s.logger.error('Failed to obtain key-system "'+v+'" access:',o)})},b._onMediaKeySystemAccessObtained=function(v,n){var d=this;s.logger.log('Access for key-system "'+v+'" obtained');var h={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:v};this._mediaKeysList.push(h);var C=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(T){return h.mediaKeys=T,s.logger.log('Media-keys created for key-system "'+v+'"'),d._onMediaKeysCreated(),T});return C.catch(function(T){s.logger.error("Failed to create media-keys:",T)}),C},b._onMediaKeysCreated=function(){var v=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),v._onNewMediaKeySession(n.mediaKeysSession))})},b._onNewMediaKeySession=function(v){var n=this;s.logger.log("New key-system session "+v.sessionId),v.addEventListener("message",function(d){n._onKeySessionMessage(v,d.message)},!1)},b._onKeySessionMessage=function(v,n){s.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(d){s.logger.log("Received license data (length: "+(d&&d.byteLength)+"), updating key-session"),v.update(d)})},b.onMediaEncrypted=function(v){var n=this;if(s.logger.log('Media is encrypted using "'+v.initDataType+'" init data type'),!this.mediaKeysPromise){s.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.KEY_SYSTEM_ERROR,details:f.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var d=function(C){if(!n._media)return;n._attemptSetMediaKeys(C),n._generateRequestWithPreferredKeySession(v.initDataType,v.initData)};this.mediaKeysPromise.then(d).catch(d)},b._attemptSetMediaKeys=function(v){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var n=this._mediaKeysList[0];if(!n||!n.mediaKeys){s.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.KEY_SYSTEM_ERROR,details:f.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}s.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},b._generateRequestWithPreferredKeySession=function(v,n){var d=this,h=this._mediaKeysList[0];if(!h){s.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.KEY_SYSTEM_ERROR,details:f.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(h.mediaKeysSessionInitialized){s.logger.warn("Key-Session already initialized but requested again");return}var C=h.mediaKeysSession;if(!C){s.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.KEY_SYSTEM_ERROR,details:f.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){s.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.KEY_SYSTEM_ERROR,details:f.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}s.logger.log('Generating key-session request for "'+v+'" init data type'),h.mediaKeysSessionInitialized=!0,C.generateRequest(v,n).then(function(){s.logger.debug("Key-session generation succeeded")}).catch(function(T){s.logger.error("Error generating key-session request:",T),d.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.KEY_SYSTEM_ERROR,details:f.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},b._createLicenseXhr=function(v,n,d){var h=new XMLHttpRequest;h.responseType="arraybuffer",h.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,h,v,n,d);var C=this._licenseXhrSetup;if(C)try{C.call(this.hls,h,v),C=void 0}catch(T){s.logger.error(T)}try{h.readyState||h.open("POST",v,!0),C&&C.call(this.hls,h,v)}catch(T){throw new Error("issue setting up KeySystem license XHR "+T)}return h},b._onLicenseRequestReadyStageChange=function(v,n,d,h){switch(v.readyState){case 4:if(v.status===200){this._requestLicenseFailureCount=0,s.logger.log("License request succeeded");var C=v.response,T=this._licenseResponseCallback;if(T)try{C=T.call(this.hls,v,n)}catch(P){s.logger.error(P)}h(C)}else{if(s.logger.error("License Request XHR failed ("+n+"). Status: "+v.status+" ("+v.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>a){this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.KEY_SYSTEM_ERROR,details:f.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var o=a-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+o+" attempts left"),this._requestLicense(d,h)}break}},b._generateLicenseRequestChallenge=function(v,n){switch(v.mediaKeySystemDomain){case w.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+v.mediaKeySystemDomain)},b._requestLicense=function(v,n){s.logger.log("Requesting content license for key-system");var d=this._mediaKeysList[0];if(!d){s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.KEY_SYSTEM_ERROR,details:f.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var h=this.getLicenseServerUrl(d.mediaKeySystemDomain),C=this._createLicenseXhr(h,v,n);s.logger.log("Sending license request to URL: "+h);var T=this._generateLicenseRequestChallenge(d,v);C.send(T)}catch(o){s.logger.error("Failure requesting DRM license: "+o),this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.KEY_SYSTEM_ERROR,details:f.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},b.onMediaAttached=function(v,n){if(!this._emeEnabled)return;var d=n.media;this._media=d,d.addEventListener("encrypted",this._onMediaEncrypted)},b.onMediaDetached=function(){var v=this._media,n=this._mediaKeysList;if(!v)return;v.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(d){if(d.mediaKeysSession)return d.mediaKeysSession.close().catch(function(){})})).then(function(){return v.setMediaKeys(null)}).catch(function(){})},b.onManifestParsed=function(v,n){if(!this._emeEnabled)return;var d=n.levels.map(function(C){return C.audioCodec}).filter(function(C){return!!C}),h=n.levels.map(function(C){return C.videoCodec}).filter(function(C){return!!C});this._attemptKeySystemAccess(w.KeySystems.WIDEVINE,d,h)},i(m,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),m}();c.default=p},"./src/controller/fps-controller.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/events.ts"),f=S("./src/utils/logger.ts"),s=function(){function w(i){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=i,this.registerListeners()}var l=w.prototype;return l.setStreamController=function(a){this.streamController=a},l.registerListeners=function(){this.hls.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},l.unregisterListeners=function(){this.hls.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching)},l.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},l.onMediaAttaching=function(a,r){var u=this.hls.config;if(u.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),u.fpsDroppedMonitoringPeriod)}},l.checkFPS=function(a,r,u){var p=performance.now();if(r){if(this.lastTime){var m=p-this.lastTime,b=u-this.lastDroppedFrames,g=r-this.lastDecodedFrames,v=1e3*b/m,n=this.hls;if(n.trigger(R.Events.FPS_DROP,{currentDropped:b,currentDecoded:g,totalDroppedFrames:u}),v>0&&b>n.config.fpsDroppedMonitoringThreshold*g){var d=n.currentLevel;f.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=d)&&(d=d-1,n.trigger(R.Events.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:n.currentLevel}),n.autoLevelCapping=d,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=u,this.lastDecodedFrames=r}},l.checkFPSInterval=function(){var a=this.media;if(a)if(this.isVideoPlaybackQualityAvailable){var r=a.getVideoPlaybackQuality();this.checkFPS(a,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(a,a.webkitDecodedFrameCount,a.webkitDroppedFrameCount)},w}();c.default=s},"./src/controller/fragment-finders.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"findFragmentByPDT",function(){return s}),S.d(c,"findFragmentByPTS",function(){return w}),S.d(c,"fragmentWithinToleranceTest",function(){return l}),S.d(c,"pdtWithinToleranceTest",function(){return i}),S.d(c,"findFragWithCC",function(){return a});var R=S("./src/polyfills/number.ts"),f=S("./src/utils/binary-search.ts");function s(r,u,p){if(u===null||!Array.isArray(r)||!r.length||!Object(R.isFiniteNumber)(u))return null;var m=r[0].programDateTime;if(u<(m||0))return null;var b=r[r.length-1].endProgramDateTime;if(u>=(b||0))return null;p=p||0;for(var g=0;g<r.length;++g){var v=r[g];if(i(u,p,v))return v}return null}function w(r,u,p,m){p===void 0&&(p=0),m===void 0&&(m=0);var b=null;if(r?b=u[r.sn-u[0].sn+1]||null:p===0&&u[0].start===0&&(b=u[0]),b&&l(p,m,b)===0)return b;var g=f.default.search(u,l.bind(null,p,m));return g||b}function l(r,u,p){r===void 0&&(r=0),u===void 0&&(u=0);var m=Math.min(u,p.duration+(p.deltaPTS?p.deltaPTS:0));return p.start+p.duration-m<=r?1:p.start-m>r&&p.start?-1:0}function i(r,u,p){var m=Math.min(u,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,b=p.endProgramDateTime||0;return b-m>r}function a(r,u){return f.default.search(r,function(p){return p.cc<u?1:p.cc>u?-1:0})}},"./src/controller/fragment-tracker.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"FragmentState",function(){return s}),S.d(c,"FragmentTracker",function(){return w});var R=S("./src/events.ts"),f=S("./src/types/loader.ts"),s;(function(a){a.NOT_LOADED="NOT_LOADED",a.BACKTRACKED="BACKTRACKED",a.APPENDING="APPENDING",a.PARTIAL="PARTIAL",a.OK="OK"})(s||(s={}));var w=function(){function a(u){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=u,this._registerListeners()}var r=a.prototype;return r._registerListeners=function(){var p=this.hls;p.on(R.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(R.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var p=this.hls;p.off(R.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(R.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(p,m){if(m===f.PlaylistLevelType.MAIN){var b=this.activeFragment,g=this.activeParts;if(!b)return null;if(g)for(var v=g.length;v--;){var n=g[v],d=n?n.end:b.appendedPTS;if(n.start<=p&&d!==void 0&&p<=d)return v>9&&(this.activeParts=g.slice(v-9)),n}else if(b.start<=p&&b.appendedPTS!==void 0&&p<=b.appendedPTS)return b}return this.getBufferedFrag(p,m)},r.getBufferedFrag=function(p,m){for(var b=this.fragments,g=Object.keys(b),v=g.length;v--;){var n=b[g[v]];if((n==null?void 0:n.body.type)===m&&n.buffered){var d=n.body;if(d.start<=p&&p<=d.end)return d}}return null},r.detectEvictedFragments=function(p,m,b){var g=this;Object.keys(this.fragments).forEach(function(v){var n=g.fragments[v];if(!n)return;if(!n.buffered){n.body.type===b&&g.removeFragment(n.body);return}var d=n.range[p];if(!d)return;d.time.some(function(h){var C=!g.isTimeBuffered(h.startPTS,h.endPTS,m);return C&&g.removeFragment(n.body),C})})},r.detectPartialFragments=function(p){var m=this,b=this.timeRanges,g=p.frag,v=p.part;if(!b||g.sn==="initSegment")return;var n=i(g),d=this.fragments[n];if(!d)return;Object.keys(b).forEach(function(h){var C=g.elementaryStreams[h];if(!C)return;var T=b[h],o=v!==null||C.partial===!0;d.range[h]=m.getBufferedTimes(g,v,o,T)}),d.backtrack=d.loaded=null,Object.keys(d.range).length?d.buffered=!0:this.removeFragment(d.body)},r.fragBuffered=function(p){var m=i(p),b=this.fragments[m];b&&(b.backtrack=b.loaded=null,b.buffered=!0)},r.getBufferedTimes=function(p,m,b,g){for(var v={time:[],partial:b},n=m?m.start:p.start,d=m?m.end:p.end,h=p.minEndPTS||d,C=p.maxStartPTS||n,T=0;T<g.length;T++){var o=g.start(T)-this.bufferPadding,P=g.end(T)+this.bufferPadding;if(C>=o&&h<=P){v.time.push({startPTS:Math.max(n,g.start(T)),endPTS:Math.min(d,g.end(T))});break}else if(n<P&&d>o)v.partial=!0,v.time.push({startPTS:Math.max(n,g.start(T)),endPTS:Math.min(d,g.end(T))});else if(d<=o)break}return v},r.getPartialFragment=function(p){var m=null,b,g,v,n=0,d=this.bufferPadding,h=this.fragments;return Object.keys(h).forEach(function(C){var T=h[C];if(!T)return;l(T)&&(g=T.body.start-d,v=T.body.end+d,p>=g&&p<=v&&(b=Math.min(p-g,v-p),n<=b&&(m=T.body,n=b)))}),m},r.getState=function(p){var m=i(p),b=this.fragments[m];return b?b.buffered?l(b)?s.PARTIAL:s.OK:b.backtrack?s.BACKTRACKED:s.APPENDING:s.NOT_LOADED},r.backtrack=function(p,m){var b=i(p),g=this.fragments[b];if(!g||g.backtrack)return null;var v=g.backtrack=m||g.loaded;return g.loaded=null,v},r.getBacktrackData=function(p){var m=i(p),b=this.fragments[m];if(b){var g,v=b.backtrack;if(v!=null&&(g=v.payload)!==null&&g!==void 0&&g.byteLength)return v;this.removeFragment(p)}return null},r.isTimeBuffered=function(p,m,b){for(var g,v,n=0;n<b.length;n++){if(g=b.start(n)-this.bufferPadding,v=b.end(n)+this.bufferPadding,p>=g&&m<=v)return!0;if(m<=g)return!1}return!1},r.onFragLoaded=function(p,m){var b=m.frag,g=m.part;if(b.sn==="initSegment"||b.bitrateTest||g)return;var v=i(b);this.fragments[v]={body:b,loaded:m,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(p,m){var b=this,g=m.frag,v=m.part,n=m.timeRanges;if(g.type===f.PlaylistLevelType.MAIN)if(this.activeFragment=g,v){var d=this.activeParts;d||(this.activeParts=d=[]),d.push(v)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(h){var C=n[h];if(b.detectEvictedFragments(h,C),!v)for(var T=0;T<C.length;T++)g.appendedPTS=Math.max(C.end(T),g.appendedPTS||0)})},r.onFragBuffered=function(p,m){this.detectPartialFragments(m)},r.hasFragment=function(p){var m=i(p);return!!this.fragments[m]},r.removeFragmentsInRange=function(p,m,b){var g=this;Object.keys(this.fragments).forEach(function(v){var n=g.fragments[v];if(!n)return;if(n.buffered){var d=n.body;d.type===b&&d.start<m&&d.end>p&&g.removeFragment(d)}})},r.removeFragment=function(p){var m=i(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[m]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},a}();function l(a){var r,u;return a.buffered&&(((r=a.range.video)===null||r===void 0?void 0:r.partial)||((u=a.range.audio)===null||u===void 0?void 0:u.partial))}function i(a){return a.type+"_"+a.level+"_"+a.urlId+"_"+a.sn}},"./src/controller/gap-controller.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"STALL_MINIMUM_DURATION_MS",function(){return l}),S.d(c,"MAX_START_GAP_JUMP",function(){return i}),S.d(c,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return a}),S.d(c,"SKIP_BUFFER_RANGE_START",function(){return r}),S.d(c,"default",function(){return u});var R=S("./src/utils/buffer-helper.ts"),f=S("./src/errors.ts"),s=S("./src/events.ts"),w=S("./src/utils/logger.ts"),l=250,i=2,a=.1,r=.05,u=function(){function p(b,g,v,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=b,this.media=g,this.fragmentTracker=v,this.hls=n}var m=p.prototype;return m.destroy=function(){this.hls=this.fragmentTracker=this.media=null},m.poll=function(g){var v=this.config,n=this.media,d=this.stalled,h=n.currentTime,C=n.seeking,T=this.seeking&&!C,o=!this.seeking&&C;if(this.seeking=C,h!==g){if(this.moved=!0,d!==null){if(this.stallReported){var P=self.performance.now()-d;w.logger.warn("playback not stuck anymore @"+h+", after "+Math.round(P)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((o||T)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!R.BufferHelper.getBuffered(n).length)return;var O=R.BufferHelper.bufferInfo(n,h,0),y=O.len>0,x=O.nextStart||0;if(!y&&!x)return;if(C){var E=O.len>i,_=!x||x-h>i&&!this.fragmentTracker.getPartialFragment(h);if(E||_)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var N,j=Math.max(x,O.start||0)-h,M=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,H=M==null||((N=M.details)===null||N===void 0)?void 0:N.live,z=H?M.details.targetduration*2:i;if(j>0&&j<=z){this._trySkipBufferHole(null);return}}var F=self.performance.now();if(d===null){this.stalled=F;return}var G=F-d;!C&&G>=l&&this._reportStall(O.len);var B=R.BufferHelper.bufferInfo(n,h,v.maxBufferHole);this._tryFixBufferStall(B,G)},m._tryFixBufferStall=function(g,v){var n=this.config,d=this.fragmentTracker,h=this.media,C=h.currentTime,T=d.getPartialFragment(C);if(T){var o=this._trySkipBufferHole(T);if(o)return}g.len>n.maxBufferHole&&v>n.highBufferWatchdogPeriod*1e3&&(w.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},m._reportStall=function(g){var v=this.hls,n=this.media,d=this.stallReported;d||(this.stallReported=!0,w.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+g+")"),v.trigger(s.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:g}))},m._trySkipBufferHole=function(g){for(var v=this.config,n=this.hls,d=this.media,h=d.currentTime,C=0,T=R.BufferHelper.getBuffered(d),o=0;o<T.length;o++){var P=T.start(o);if(h+v.maxBufferHole>=C&&h<P){var O=Math.max(P+r,d.currentTime+a);return w.logger.warn("skipping hole, adjusting currentTime from "+h+" to "+O),this.moved=!0,this.stalled=null,d.currentTime=O,g&&n.trigger(s.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+h+" to "+O,frag:g}),O}C=T.end(o)}return 0},m._tryNudgeBuffer=function(){var g=this.config,v=this.hls,n=this.media,d=n.currentTime,h=(this.nudgeRetry||0)+1;if(this.nudgeRetry=h,h<g.nudgeMaxRetry){var C=d+h*g.nudgeOffset;w.logger.warn("Nudging 'currentTime' from "+d+" to "+C),n.currentTime=C,v.trigger(s.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else w.logger.error("Playhead still not moving while enough data buffered @"+d+" after "+g.nudgeMaxRetry+" nudges"),v.trigger(s.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},p}()},"./src/controller/id3-track-controller.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/events.ts"),f=S("./src/utils/texttrack-utils.ts"),s=S("./src/demux/id3.ts"),w=.25,l=function(){function i(r){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=r,this._registerListeners()}var a=i.prototype;return a.destroy=function(){this._unregisterListeners()},a._registerListeners=function(){var u=this.hls;u.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(R.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.on(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},a._unregisterListeners=function(){var u=this.hls;u.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(R.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.off(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},a.onMediaAttached=function(u,p){this.media=p.media},a.onMediaDetaching=function(){if(!this.id3Track)return;Object(f.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},a.getID3Track=function(u){if(!this.media)return;for(var p=0;p<u.length;p++){var m=u[p];if(m.kind==="metadata"&&m.label==="id3")return Object(f.sendAddTrackEvent)(m,this.media),m}return this.media.addTextTrack("metadata","id3")},a.onFragParsingMetadata=function(u,p){if(!this.media)return;var m=p.frag,b=p.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var g=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,v=0;v<b.length;v++){var n=s.getID3Frames(b[v].data);if(n){var d=b[v].pts,h=v<b.length-1?b[v+1].pts:m.end,C=h-d;C<=0&&(h=d+w);for(var T=0;T<n.length;T++){var o=n[T];if(!s.isTimeStampFrame(o)){var P=new g(d,h,"");P.value=o,this.id3Track.addCue(P)}}}}},a.onBufferFlushing=function(u,p){var m=p.startOffset,b=p.endOffset,g=p.type;if(!g||g==="audio"){var v=this.id3Track;v&&Object(f.removeCuesInRange)(v,m,b)}},i}();c.default=l},"./src/controller/latency-controller.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return i});var R=S("./src/errors.ts"),f=S("./src/events.ts"),s=S("./src/utils/logger.ts");function w(a,r){for(var u=0;u<r.length;u++){var p=r[u];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}function l(a,r,u){return r&&w(a.prototype,r),u&&w(a,u),a}var i=function(){function a(u){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=u,this.config=u.config,this.registerListeners()}var r=a.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(f.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(f.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(f.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(f.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(f.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(f.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(f.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(f.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(f.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(f.Events.ERROR,this.onError)},r.onMediaAttached=function(p,m){this.media=m.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},r.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},r.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},r.onLevelUpdated=function(p,m){var b=m.details;this.levelDetails=b,b.advanced&&this.timeupdate(),!b.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(p,m){if(m.details!==R.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,s.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},r.timeupdate=function(){var p=this.media,m=this.levelDetails;if(!p||!m)return;this.currentTime=p.currentTime;var b=this.computeLatency();if(b===null)return;this._latency=b;var g=this.config,v=g.lowLatencyMode,n=g.maxLiveSyncPlaybackRate;if(!v||n===1)return;var d=this.targetLatency;if(d===null)return;var h=b-d,C=Math.min(this.maxLatency,d+m.targetduration),T=h<C;if(m.live&&T&&h>.05&&this.forwardBufferLength>1){var o=Math.min(2,Math.max(1,n)),P=Math.round(2/(1+Math.exp(-.75*h-this.edgeStalled))*20)/20;p.playbackRate=Math.min(o,Math.max(1,P))}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},l(a,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,m=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:m?p.liveMaxLatencyDurationCount*m.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var m=p.holdBack,b=p.partHoldBack,g=p.targetduration,v=this.config,n=v.liveSyncDuration,d=v.liveSyncDurationCount,h=v.lowLatencyMode,C=this.hls.userConfig,T=h&&b||m;(C.liveSyncDuration||C.liveSyncDurationCount||T===0)&&(T=n!==void 0?n:d*g);var o=g,P=1;return T+Math.min(this.stallCount*P,o)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),m=this.targetLatency,b=this.levelDetails;if(p===null||m===null||b===null)return null;var g=b.edge,v=p-m-this.edgeStalled,n=g-b.totalduration,d=g-(this.config.lowLatencyMode&&b.partTarget||b.targetduration);return Math.min(Math.max(n,v),d)}},{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 m=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-m,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,m=this.levelDetails;if(!p||!m)return 0;var b=p.buffered.length;return b?p.buffered.end(b-1):m.edge-this.currentTime}}]),a}()},"./src/controller/level-controller.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return v});var R=S("./src/types/level.ts"),f=S("./src/events.ts"),s=S("./src/errors.ts"),w=S("./src/utils/codecs.ts"),l=S("./src/controller/level-helper.ts"),i=S("./src/controller/base-playlist-controller.ts"),a=S("./src/types/loader.ts");function r(){return r=Object.assign||function(n){for(var d=1;d<arguments.length;d++){var h=arguments[d];for(var C in h)Object.prototype.hasOwnProperty.call(h,C)&&(n[C]=h[C])}return n},r.apply(this,arguments)}function u(n,d){for(var h=0;h<d.length;h++){var C=d[h];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(n,C.key,C)}}function p(n,d,h){return d&&u(n.prototype,d),h&&u(n,h),n}function m(n,d){n.prototype=Object.create(d.prototype),n.prototype.constructor=n,b(n,d)}function b(n,d){return b=Object.setPrototypeOf||function(C,T){return C.__proto__=T,C},b(n,d)}var g=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),v=function(n){m(d,n);function d(C){var T;return T=n.call(this,C,"[level-controller]")||this,T._levels=[],T._firstLevel=-1,T._startLevel=void 0,T.currentLevelIndex=-1,T.manualLevelIndex=-1,T.onParsedComplete=void 0,T._registerListeners(),T}var h=d.prototype;return h._registerListeners=function(){var T=this.hls;T.on(f.Events.MANIFEST_LOADED,this.onManifestLoaded,this),T.on(f.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.on(f.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.on(f.Events.FRAG_LOADED,this.onFragLoaded,this),T.on(f.Events.ERROR,this.onError,this)},h._unregisterListeners=function(){var T=this.hls;T.off(f.Events.MANIFEST_LOADED,this.onManifestLoaded,this),T.off(f.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.off(f.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.off(f.Events.FRAG_LOADED,this.onFragLoaded,this),T.off(f.Events.ERROR,this.onError,this)},h.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},h.startLoad=function(){var T=this._levels;T.forEach(function(o){o.loadError=0}),n.prototype.startLoad.call(this)},h.onManifestLoaded=function(T,o){var P=[],O=[],y=[],x,E={},_,N=!1,j=!1,M=!1;if(o.levels.forEach(function(G){var B=G.attrs;N=N||!!(G.width&&G.height),j=j||!!G.videoCodec,M=M||!!G.audioCodec,g&&G.audioCodec&&G.audioCodec.indexOf("mp4a.40.34")!==-1&&(G.audioCodec=void 0);var K=G.bitrate+"-"+G.attrs.RESOLUTION+"-"+G.attrs.CODECS;_=E[K],_?_.url.push(G.url):(_=new R.Level(G),E[K]=_,P.push(_)),B&&(B.AUDIO&&Object(l.addGroupId)(_,"audio",B.AUDIO),B.SUBTITLES&&Object(l.addGroupId)(_,"text",B.SUBTITLES))}),(N||j)&&M&&(P=P.filter(function(G){var B=G.videoCodec,K=G.width,W=G.height;return!!B||!!(K&&W)})),P=P.filter(function(G){var B=G.audioCodec,K=G.videoCodec;return(!B||Object(w.isCodecSupportedInMp4)(B,"audio"))&&(!K||Object(w.isCodecSupportedInMp4)(K,"video"))}),o.audioTracks&&(O=o.audioTracks.filter(function(G){return!G.audioCodec||Object(w.isCodecSupportedInMp4)(G.audioCodec,"audio")}),Object(l.assignTrackIdsByGroup)(O)),o.subtitles&&(y=o.subtitles,Object(l.assignTrackIdsByGroup)(y)),P.length>0){x=P[0].bitrate,P.sort(function(G,B){return G.bitrate-B.bitrate}),this._levels=P;for(var H=0;H<P.length;H++)if(P[H].bitrate===x){this._firstLevel=H,this.log("manifest loaded, "+P.length+" level(s) found, first bitrate: "+x);break}var z=M&&!j,F={levels:P,audioTracks:O,subtitleTracks:y,firstLevel:this._firstLevel,stats:o.stats,audio:M,video:j,altAudio:!z&&O.some(function(G){return!!G.url})};this.hls.trigger(f.Events.MANIFEST_PARSED,F),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(f.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:o.url,reason:"no level with compatible codecs found in manifest"})},h.onError=function(T,o){if(n.prototype.onError.call(this,T,o),o.fatal)return;var P=o.context,O=this._levels[this.currentLevelIndex];if(P&&(P.type===a.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&P.groupId===O.audioGroupIds[O.urlId]||P.type===a.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&P.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var y=!1,x=!0,E;switch(o.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:if(o.frag){var _=this._levels[o.frag.level];_?(_.fragmentError++,_.fragmentError>this.hls.config.fragLoadingMaxRetry&&(E=o.frag.level)):E=o.frag.level}break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:P&&(P.deliveryDirectives&&(x=!1),E=P.level),y=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:E=o.level,y=!0;break}E!==void 0&&this.recoverLevel(o,E,y,x)},h.recoverLevel=function(T,o,P,O){var y=T.details,x=this._levels[o];if(x.loadError++,P){var E=this.retryLoadingOrFail(T);if(E)T.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var _=x.url.length;if(_>1&&x.loadError<_)T.levelRetry=!0,this.redundantFailover(o);else if(this.manualLevelIndex===-1){var N=o===0?this._levels.length-1:o-1;this.currentLevelIndex!==N&&this._levels[N].loadError===0&&(this.warn(y+": switch to "+N),T.levelRetry=!0,this.hls.nextAutoLevel=N)}}},h.redundantFailover=function(T){var o=this._levels[T],P=o.url.length;if(P>1){var O=(o.urlId+1)%P;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(y){y.urlId=O}),this.level=T}},h.onFragLoaded=function(T,o){var P=o.frag;if(P!==void 0&&P.type===a.PlaylistLevelType.MAIN){var O=this._levels[P.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},h.onLevelLoaded=function(T,o){var P,O=o.level,y=o.details,x=this._levels[O];if(!x){var E;this.warn("Invalid level index "+O),(E=o.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(y.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(O,o,x.details)):(P=o.deliveryDirectives)!==null&&P!==void 0&&P.skip&&(y.deltaUpdateFailed=!0)},h.onAudioTrackSwitched=function(T,o){var P=this.hls.levels[this.currentLevelIndex];if(!P)return;if(P.audioGroupIds){for(var O=-1,y=this.hls.audioTracks[o.id].groupId,x=0;x<P.audioGroupIds.length;x++)if(P.audioGroupIds[x]===y){O=x;break}O!==P.urlId&&(P.urlId=O,this.startLoad())}},h.loadPlaylist=function(T){var o=this.currentLevelIndex,P=this._levels[o];if(this.canLoad&&P&&P.url.length>0){var O=P.urlId,y=P.url[O];if(T)try{y=T.addDirectives(y)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+o+(T?" at sn "+T.msn+" part "+T.part:"")+" with URL-id "+O+" "+y),this.clearTimer(),this.hls.trigger(f.Events.LEVEL_LOADING,{url:y,level:o,id:O,deliveryDirectives:T||null})}},h.removeLevel=function(T,o){var P=function(x,E){return E!==o},O=this._levels.filter(function(y,x){return x!==T?!0:y.url.length>1&&o!==void 0?(y.url=y.url.filter(P),y.audioGroupIds&&(y.audioGroupIds=y.audioGroupIds.filter(P)),y.textGroupIds&&(y.textGroupIds=y.textGroupIds.filter(P)),y.urlId=0,!0):!1}).map(function(y,x){var E=y.details;return E!=null&&E.fragments&&E.fragments.forEach(function(_){_.level=x}),y});this._levels=O,this.hls.trigger(f.Events.LEVELS_UPDATED,{levels:O})},p(d,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(T){var o,P=this._levels;if(P.length===0)return;if(this.currentLevelIndex===T&&(o=P[T])!==null&&o!==void 0&&o.details)return;if(T<0||T>=P.length){var O=T<0;if(this.hls.trigger(f.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:T,fatal:O,reason:"invalid level idx"}),O)return;T=Math.min(T,P.length-1)}this.clearTimer();var y=this.currentLevelIndex,x=P[y],E=P[T];this.log("switching to level "+T+" from "+y),this.currentLevelIndex=T;var _=r({},E,{level:T,maxBitrate:E.maxBitrate,uri:E.uri,urlId:E.urlId});delete _._urlId,this.hls.trigger(f.Events.LEVEL_SWITCHING,_);var N=E.details;if(!N||N.live){var j=this.switchParams(E.uri,x==null?void 0:x.details);this.loadPlaylist(j)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(T){this.manualLevelIndex=T,this._startLevel===void 0&&(this._startLevel=T),T!==-1&&(this.level=T)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(T){this._firstLevel=T}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var T=this.hls.config.startLevel;return T!==void 0?T:this._firstLevel}else return this._startLevel},set:function(T){this._startLevel=T}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(T){this.level=T,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=T)}}]),d}(i.default)},"./src/controller/level-helper.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"addGroupId",function(){return s}),S.d(c,"assignTrackIdsByGroup",function(){return w}),S.d(c,"updatePTS",function(){return l}),S.d(c,"updateFragPTSDTS",function(){return a}),S.d(c,"mergeDetails",function(){return r}),S.d(c,"mapPartIntersection",function(){return u}),S.d(c,"mapFragmentIntersection",function(){return p}),S.d(c,"adjustSliding",function(){return m}),S.d(c,"addSliding",function(){return b}),S.d(c,"computeReloadInterval",function(){return g}),S.d(c,"getFragmentWithSN",function(){return v}),S.d(c,"getPartWith",function(){return n});var R=S("./src/polyfills/number.ts"),f=S("./src/utils/logger.ts");function s(d,h,C){switch(h){case"audio":d.audioGroupIds||(d.audioGroupIds=[]),d.audioGroupIds.push(C);break;case"text":d.textGroupIds||(d.textGroupIds=[]),d.textGroupIds.push(C);break}}function w(d){var h={};d.forEach(function(C){var T=C.groupId||"";C.id=h[T]=h[T]||0,h[T]++})}function l(d,h,C){var T=d[h],o=d[C];i(T,o)}function i(d,h){var C=h.startPTS;if(Object(R.isFiniteNumber)(C)){var T=0,o;h.sn>d.sn?(T=C-d.start,o=d):(T=d.start-C,o=h),o.duration!==T&&(o.duration=T)}else if(h.sn>d.sn){var P=d.cc===h.cc;P&&d.minEndPTS?h.start=d.start+(d.minEndPTS-d.start):h.start=d.start+d.duration}else h.start=Math.max(d.start-h.duration,0)}function a(d,h,C,T,o,P){var O=T-C;O<=0&&(f.logger.warn("Fragment should have a positive duration",h),T=C+h.duration,P=o+h.duration);var y=C,x=T,E=h.startPTS,_=h.endPTS;if(Object(R.isFiniteNumber)(E)){var N=Math.abs(E-C);Object(R.isFiniteNumber)(h.deltaPTS)?h.deltaPTS=Math.max(N,h.deltaPTS):h.deltaPTS=N,y=Math.max(C,E),C=Math.min(C,E),o=Math.min(o,h.startDTS),x=Math.min(T,_),T=Math.max(T,_),P=Math.max(P,h.endDTS)}h.duration=T-C;var j=C-h.start;h.appendedPTS=T,h.start=h.startPTS=C,h.maxStartPTS=y,h.startDTS=o,h.endPTS=T,h.minEndPTS=x,h.endDTS=P;var M=h.sn;if(!d||M<d.startSN||M>d.endSN)return 0;var H,z=M-d.startSN,F=d.fragments;for(F[z]=h,H=z;H>0;H--)i(F[H],F[H-1]);for(H=z;H<F.length-1;H++)i(F[H],F[H+1]);return d.fragmentHint&&i(F[F.length-1],d.fragmentHint),d.PTSKnown=d.alignedSliding=!0,j}function r(d,h){for(var C=null,T=d.fragments,o=T.length-1;o>=0;o--){var P=T[o].initSegment;if(P){C=P;break}}d.fragmentHint&&delete d.fragmentHint.endPTS;var O=0,y;if(p(d,h,function(H,z){H.relurl&&(O=H.cc-z.cc),Object(R.isFiniteNumber)(H.startPTS)&&Object(R.isFiniteNumber)(H.endPTS)&&(z.start=z.startPTS=H.startPTS,z.startDTS=H.startDTS,z.appendedPTS=H.appendedPTS,z.maxStartPTS=H.maxStartPTS,z.endPTS=H.endPTS,z.endDTS=H.endDTS,z.minEndPTS=H.minEndPTS,z.duration=H.endPTS-H.startPTS,z.duration&&(y=z),h.PTSKnown=h.alignedSliding=!0),z.elementaryStreams=H.elementaryStreams,z.loader=H.loader,z.stats=H.stats,z.urlId=H.urlId,H.initSegment&&(z.initSegment=H.initSegment,C=H.initSegment)}),C){var x=h.fragmentHint?h.fragments.concat(h.fragmentHint):h.fragments;x.forEach(function(H){var z;(!H.initSegment||H.initSegment.relurl===((z=C)===null||z===void 0?void 0:z.relurl))&&(H.initSegment=C)})}if(h.skippedSegments&&(h.deltaUpdateFailed=h.fragments.some(function(H){return!H}),h.deltaUpdateFailed)){f.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var E=h.skippedSegments;E--;)h.fragments.shift();h.startSN=h.fragments[0].sn,h.startCC=h.fragments[0].cc}var _=h.fragments;if(O){f.logger.warn("discontinuity sliding from playlist, take drift into account");for(var N=0;N<_.length;N++)_[N].cc+=O}h.skippedSegments&&(h.startCC=h.fragments[0].cc),u(d.partList,h.partList,function(H,z){z.elementaryStreams=H.elementaryStreams,z.stats=H.stats}),y?a(h,y,y.startPTS,y.endPTS,y.startDTS,y.endDTS):m(d,h),_.length&&(h.totalduration=h.edge-_[0].start),h.driftStartTime=d.driftStartTime,h.driftStart=d.driftStart;var j=h.advancedDateTime;if(h.advanced&&j){var M=h.edge;h.driftStart||(h.driftStartTime=j,h.driftStart=M),h.driftEndTime=j,h.driftEnd=M}else h.driftEndTime=d.driftEndTime,h.driftEnd=d.driftEnd,h.advancedDateTime=d.advancedDateTime}function u(d,h,C){if(d&&h)for(var T=0,o=0,P=d.length;o<=P;o++){var O=d[o],y=h[o+T];O&&y&&O.index===y.index&&O.fragment.sn===y.fragment.sn?C(O,y):T--}}function p(d,h,C){for(var T=h.skippedSegments,o=Math.max(d.startSN,h.startSN)-h.startSN,P=(d.fragmentHint?1:0)+(T?h.endSN:Math.min(d.endSN,h.endSN))-h.startSN,O=h.startSN-d.startSN,y=h.fragmentHint?h.fragments.concat(h.fragmentHint):h.fragments,x=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments,E=o;E<=P;E++){var _=x[O+E],N=y[E];T&&!N&&E<T&&(N=h.fragments[E]=_),_&&N&&C(_,N)}}function m(d,h){var C=h.startSN+h.skippedSegments-d.startSN,T=d.fragments;if(C<0||C>=T.length)return;b(h,T[C].start)}function b(d,h){if(h){for(var C=d.fragments,T=d.skippedSegments;T<C.length;T++)C[T].start+=h;d.fragmentHint&&(d.fragmentHint.start+=h)}}function g(d,h){var C=1e3*d.levelTargetDuration,T=C/2,o=d.age,P=o>0&&o<C*3,O=h.loading.end-h.loading.start,y,x=d.availabilityDelay;if(d.updated===!1)if(P){var E=333*d.misses;y=Math.max(Math.min(T,O*2),E),d.availabilityDelay=(d.availabilityDelay||0)+y}else y=T;else P?(x=Math.min(x||C/2,o),d.availabilityDelay=x,y=x+C-o):y=C-O;return Math.round(y)}function v(d,h,C){if(!d||!d.details)return null;var T=d.details,o=T.fragments[h-T.startSN];return o||(o=T.fragmentHint,o&&o.sn===h?o:h<T.startSN&&C&&C.sn===h?C:null)}function n(d,h,C){if(!d||!d.details)return null;var T=d.details.partList;if(T)for(var o=T.length;o--;){var P=T[o];if(P.index===C&&P.fragment.sn===h)return P}return null}},"./src/controller/stream-controller.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return T});var R=S("./src/polyfills/number.ts"),f=S("./src/controller/base-stream-controller.ts"),s=S("./src/is-supported.ts"),w=S("./src/events.ts"),l=S("./src/utils/buffer-helper.ts"),i=S("./src/controller/fragment-tracker.ts"),a=S("./src/types/loader.ts"),r=S("./src/loader/fragment.ts"),u=S("./src/demux/transmuxer-interface.ts"),p=S("./src/types/transmuxer.ts"),m=S("./src/controller/gap-controller.ts"),b=S("./src/errors.ts"),g=S("./src/utils/logger.ts");function v(o,P){for(var O=0;O<P.length;O++){var y=P[O];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(o,y.key,y)}}function n(o,P,O){return P&&v(o.prototype,P),O&&v(o,O),o}function d(o,P){o.prototype=Object.create(P.prototype),o.prototype.constructor=o,h(o,P)}function h(o,P){return h=Object.setPrototypeOf||function(y,x){return y.__proto__=x,y},h(o,P)}var C=100,T=function(o){d(P,o);function P(y,x){var E;return E=o.call(this,y,x,"[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 O=P.prototype;return O._registerListeners=function(){var x=this.hls;x.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(w.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.on(w.Events.ERROR,this.onError,this),x.on(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(w.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var x=this.hls;x.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.off(w.Events.ERROR,this.onError,this),x.off(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(w.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(x){if(this.levels){var E=this.lastCurrentTime,_=this.hls;if(this.stopLoad(),this.setInterval(C),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var N=_.startLevel;N===-1&&(_.config.testBandwidth?(N=0,this.bitrateTest=!0):N=_.nextAutoLevel),this.level=_.nextLoadLevel=N,this.loadedmetadata=!1}E>0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+E.toFixed(3)),x=E),this.state=f.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=f.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,o.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case f.State.IDLE:this.doTickIdle();break;case f.State.WAITING_LEVEL:{var x,E=this.levels,_=this.level,N=E==null||((x=E[_])===null||x===void 0)?void 0:x.details;if(N&&(!N.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(N))break;this.state=f.State.IDLE;break}break}case f.State.FRAG_LOADING_WAITING_RETRY:{var j,M=self.performance.now(),H=this.retryDate;(!H||M>=H||(j=this.media)!==null&&j!==void 0&&j.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=f.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){o.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var x,E,_=this.hls,N=this.levelLastLoaded,j=this.levels,M=this.media,H=_.config,z=_.nextLoadLevel;if(N===null||!M&&(this.startFragRequested||!H.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!j||!j[z])return;var F=j[z];this.level=_.nextLoadLevel=z;var G=F.details;if(!G||this.state===f.State.WAITING_LEVEL||G.live&&this.levelLastLoaded!==z){this.state=f.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:M,a.PlaylistLevelType.MAIN);if(B===null)return;var K=B.len,W=this.getMaxBufferLength(F.maxBitrate);if(K>=W)return;if(this._streamEnded(B,G)){var J={};this.altAudio&&(J.type="video"),this.hls.trigger(w.Events.BUFFER_EOS,J),this.state=f.State.ENDED;return}var ee=B.end,Z=this.getNextFragment(ee,G);if(this.couldBacktrack&&!this.fragPrevious&&Z&&Z.sn!=="initSegment"){var he=Z.sn-G.startSN;he>1&&(Z=G.fragments[he-1],this.fragmentTracker.removeFragment(Z))}if(Z&&this.fragmentTracker.getState(Z)===i.FragmentState.OK&&this.nextLoadPosition>ee){var ge=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(M,ge,a.PlaylistLevelType.MAIN),Z=this.getNextFragment(this.nextLoadPosition,G)}if(!Z)return;Z.initSegment&&!Z.initSegment.data&&!this.bitrateTest&&(Z=Z.initSegment),((x=Z.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((E=Z.decryptdata)!==null&&E!==void 0&&E.key)?this.loadKey(Z,G):this.loadFragment(Z,G,ee)},O.loadFragment=function(x,E,_){var N,j=this.fragmentTracker.getState(x);if(this.fragCurrent=x,j===i.FragmentState.BACKTRACKED){var M=this.fragmentTracker.getBacktrackData(x);if(M){this._handleFragmentLoadProgress(M),this._handleFragmentLoadComplete(M);return}else j=i.FragmentState.NOT_LOADED}j===i.FragmentState.NOT_LOADED||j===i.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,o.prototype.loadFragment.call(this,x,E,_)):j===i.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((N=this.media)===null||N===void 0?void 0:N.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(x){var E=this.fragmentTracker.getAppendedFrag(x,a.PlaylistLevelType.MAIN);return E&&"fragment"in E?E.fragment:E},O.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,a.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var x=this.levels,E=this.media;if(E!=null&&E.readyState){var _,N=this.getAppendedFrag(E.currentTime);if(N&&N.start>1&&this.flushMainBuffer(0,N.start-1),!E.paused&&x){var j=this.hls.nextLoadLevel,M=x[j],H=this.fragLastKbps;H&&this.fragCurrent?_=this.fragCurrent.duration*M.maxBitrate/(1e3*H)+1:_=0}else _=0;var z=this.getBufferedFrag(E.currentTime+_);if(z){var F=this.followingBufferedFrag(z);if(F){this.abortCurrentFrag();var G=F.maxStartPTS?F.maxStartPTS:F.start,B=F.duration,K=Math.max(z.end,G+Math.min(Math.max(B-this.config.maxFragLookUpTolerance,B*.5),B*.75));this.flushMainBuffer(K,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===f.State.KEY_LOADING&&(this.state=f.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(x,E){o.prototype.flushMainBuffer.call(this,x,E,this.altAudio?"video":null)},O.onMediaAttached=function(x,E){o.prototype.onMediaAttached.call(this,x,E);var _=E.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),_.addEventListener("playing",this.onvplaying),_.addEventListener("seeked",this.onvseeked),this.gapController=new m.default(this.config,_,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),o.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var x=this.media,E=x?x.currentTime:null;Object(R.isFiniteNumber)(E)&&this.log("Media seeked to "+E.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(w.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(x,E){var _=!1,N=!1,j;E.levels.forEach(function(M){j=M.audioCodec,j&&(j.indexOf("mp4a.40.2")!==-1&&(_=!0),j.indexOf("mp4a.40.5")!==-1&&(N=!0))}),this.audioCodecSwitch=_&&N&&!Object(s.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},O.onLevelLoading=function(x,E){var _=this.levels;if(!_||this.state!==f.State.IDLE)return;var N=_[E.level];(!N.details||N.details.live&&this.levelLastLoaded!==E.level||this.waitForCdnTuneIn(N.details))&&(this.state=f.State.WAITING_LEVEL)},O.onLevelLoaded=function(x,E){var _,N=this.levels,j=E.level,M=E.details,H=M.totalduration;if(!N){this.warn("Levels were reset while loading level "+j);return}this.log("Level "+j+" loaded ["+M.startSN+","+M.endSN+"], cc ["+M.startCC+", "+M.endCC+"] duration:"+H);var z=this.fragCurrent;z&&(this.state===f.State.FRAG_LOADING||this.state===f.State.FRAG_LOADING_WAITING_RETRY)&&(z.level!==E.level&&z.loader&&(this.state=f.State.IDLE,z.loader.abort()));var F=N[j],G=0;if(M.live||(_=F.details)!==null&&_!==void 0&&_.live){if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed)return;G=this.alignPlaylists(M,F.details)}if(F.details=M,this.levelLastLoaded=j,this.hls.trigger(w.Events.LEVEL_UPDATED,{details:M,level:j}),this.state===f.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(M))return;this.state=f.State.IDLE}this.startFragRequested?M.live&&this.synchronizeToLiveEdge(M):this.setStartPosition(M,G),this.tick()},O._handleFragmentLoadProgress=function(x){var E,_=x.frag,N=x.part,j=x.payload,M=this.levels;if(!M){this.warn("Levels were reset while fragment load was in progress. Fragment "+_.sn+" of level "+_.level+" will not be buffered");return}var H=M[_.level],z=H.details;if(!z){this.warn("Dropping fragment "+_.sn+" of level "+_.level+" after level details were reset");return}var F=H.videoCodec,G=z.PTSKnown||!z.live,B=(E=_.initSegment)===null||E===void 0?void 0:E.data,K=this._getAudioCodec(H),W=this.transmuxer=this.transmuxer||new u.default(this.hls,a.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),J=N?N.index:-1,ee=J!==-1,Z=new p.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,j.byteLength,J,ee),he=this.initPTS[_.cc];W.push(j,B,K,F,_,N,z.totalduration,G,Z,he)},O.onAudioTrackSwitching=function(x,E){var _=this.altAudio,N=!!E.url,j=E.id;if(!N){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var M=this.fragCurrent;M!=null&&M.loader&&(this.log("Switching to main audio track, cancel main fragment load"),M.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var H=this.hls;_&&H.trigger(w.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),H.trigger(w.Events.AUDIO_TRACK_SWITCHED,{id:j})}},O.onAudioTrackSwitched=function(x,E){var _=E.id,N=!!this.hls.audioTracks[_].url;if(N){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=N,this.tick()},O.onBufferCreated=function(x,E){var _=E.tracks,N,j,M=!1;for(var H in _){var z=_[H];if(z.id==="main"){if(j=H,N=z,H==="video"){var F=_[H];F&&(this.videoBuffer=F.buffer)}}else M=!0}M&&N?(this.log("Alternate track found, use "+j+".buffered to schedule main fragment loading"),this.mediaBuffer=N.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(x,E){var _=E.frag,N=E.part;if(_&&_.type!==a.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(_)){this.warn("Fragment "+_.sn+(N?" p: "+N.index:"")+" of level "+_.level+" finished buffering, but was aborted. state: "+this.state),this.state===f.State.PARSED&&(this.state=f.State.IDLE);return}var j=N?N.stats:_.stats;this.fragLastKbps=Math.round(8*j.total/(j.buffering.end-j.loading.first)),_.sn!=="initSegment"&&(this.fragPrevious=_),this.fragBufferedComplete(_,N)},O.onError=function(x,E){switch(E.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:case b.ErrorDetails.KEY_LOAD_ERROR:case b.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(a.PlaylistLevelType.MAIN,E);break;case b.ErrorDetails.LEVEL_LOAD_ERROR:case b.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==f.State.ERROR&&(E.fatal?(this.warn(""+E.details),this.state=f.State.ERROR):!E.levelRetry&&this.state===f.State.WAITING_LEVEL&&(this.state=f.State.IDLE));break;case b.ErrorDetails.BUFFER_FULL_ERROR:if(E.parent==="main"&&(this.state===f.State.PARSING||this.state===f.State.PARSED)){var _=!0,N=this.getFwdBufferInfo(this.media,a.PlaylistLevelType.MAIN);N&&N.len>.5&&(_=!this.reduceMaxBufferLength(N.len)),_&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var x=this.media,E=this.gapController;if(!x||!E||!x.readyState)return;var _=l.BufferHelper.getBuffered(x);!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this.seekToStartPos()):E.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=f.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(x,E){var _=E.type;if(_!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var N=(_===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(N,_,a.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(x,E){this.levels=E.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var x=this.media,E=x.currentTime,_=this.startPosition;if(_>=0&&E<_){if(x.seeking){g.logger.log("could not seek to "+_+", already seeking at "+E);return}var N=l.BufferHelper.getBuffered(x),j=N.length?N.start(0):0,M=j-_;M>0&&(M<this.config.maxBufferHole||M<this.config.maxFragLookUpTolerance)&&(g.logger.log("adjusting start position by "+M+" to match buffer start"),_+=M,this.startPosition=_),this.log("seek to target start position "+_+" from current time "+E),x.currentTime=_}},O._getAudioCodec=function(x){var E=this.config.defaultAudioCodec||x.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},O._loadBitrateTestFrag=function(x){var E=this;this._doFragLoad(x).then(function(_){var N=E.hls;if(!_||N.nextLoadLevel||E.fragContextChanged(x))return;E.fragLoadError=0,E.state=f.State.IDLE,E.startFragRequested=!1,E.bitrateTest=!1;var j=x.stats;j.parsing.start=j.parsing.end=j.buffering.start=j.buffering.end=self.performance.now(),N.trigger(w.Events.FRAG_LOADED,_)})},O._handleTransmuxComplete=function(x){var E,_="main",N=this.hls,j=x.remuxResult,M=x.chunkMeta,H=this.getCurrentContext(M);if(!H){this.warn("The loading context changed while buffering fragment "+M.sn+" of level "+M.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(M.level);return}var z=H.frag,F=H.part,G=H.level,B=j.video,K=j.text,W=j.id3,J=j.initSegment,ee=this.altAudio?void 0:j.audio;if(this.fragContextChanged(z))return;if(this.state=f.State.PARSING,J){J.tracks&&(this._bufferInitSegment(G,J.tracks,z,M),N.trigger(w.Events.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:_,tracks:J.tracks}));var Z=J.initPTS,he=J.timescale;Object(R.isFiniteNumber)(Z)&&(this.initPTS[z.cc]=Z,N.trigger(w.Events.INIT_PTS_FOUND,{frag:z,id:_,initPTS:Z,timescale:he}))}if(B&&j.independent!==!1){if(G.details){var ge=B.startPTS,ie=B.endPTS,we=B.startDTS,me=B.endDTS;if(F)F.elementaryStreams[B.type]={startPTS:ge,endPTS:ie,startDTS:we,endDTS:me};else if(B.firstKeyFrame&&B.independent&&(this.couldBacktrack=!0),B.dropped&&B.independent){var oe=this.getLoadPosition()+this.config.maxBufferHole;if(oe<ge){this.backtrack(z);return}z.setElementaryStreamInfo(B.type,z.start,ie,z.start,me,!0)}z.setElementaryStreamInfo(B.type,ge,ie,we,me),this.bufferFragmentData(B,z,F,M)}}else if(j.independent===!1){this.backtrack(z);return}if(ee){var se=ee.startPTS,te=ee.endPTS,be=ee.startDTS,q=ee.endDTS;F&&(F.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:se,endPTS:te,startDTS:be,endDTS:q}),z.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,se,te,be,q),this.bufferFragmentData(ee,z,F,M)}if(W!=null&&(E=W.samples)!==null&&E!==void 0&&E.length){var ae={frag:z,id:_,samples:W.samples};N.trigger(w.Events.FRAG_PARSING_METADATA,ae)}if(K){var xe={frag:z,id:_,samples:K.samples};N.trigger(w.Events.FRAG_PARSING_USERDATA,xe)}},O._bufferInitSegment=function(x,E,_,N){var j=this;if(this.state!==f.State.PARSING)return;this.audioOnly=!!E.audio&&!E.video,this.altAudio&&!this.audioOnly&&delete E.audio;var M=E.audio,H=E.video,z=E.audiovideo;if(M){var F=x.audioCodec,G=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(F&&(F.indexOf("mp4a.40.5")!==-1?F="mp4a.40.2":F="mp4a.40.5"),M.metadata.channelCount!==1&&G.indexOf("firefox")===-1&&(F="mp4a.40.5")),G.indexOf("android")!==-1&&M.container!=="audio/mpeg"&&(F="mp4a.40.2",this.log("Android: force audio codec to "+F)),x.audioCodec&&x.audioCodec!==F&&this.log('Swapping manifest audio codec "'+x.audioCodec+'" for "'+F+'"'),M.levelCodec=F,M.id="main",this.log("Init audio buffer, container:"+M.container+", codecs[selected/level/parsed]=["+(F||"")+"/"+(x.audioCodec||"")+"/"+M.codec+"]")}H&&(H.levelCodec=x.videoCodec,H.id="main",this.log("Init video buffer, container:"+H.container+", codecs[level/parsed]=["+(x.videoCodec||"")+"/"+H.codec+"]")),z&&this.log("Init audiovideo buffer, container:"+z.container+", codecs[level/parsed]=["+(x.attrs.CODECS||"")+"/"+z.codec+"]"),this.hls.trigger(w.Events.BUFFER_CODECS,E),Object.keys(E).forEach(function(B){var K=E[B],W=K.initSegment;W!=null&&W.byteLength&&j.hls.trigger(w.Events.BUFFER_APPENDING,{type:B,data:W,frag:_,part:null,chunkMeta:N,parent:_.type})}),this.tick()},O.backtrack=function(x){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(x);var E=this.fragmentTracker.backtrack(x);this.fragPrevious=null,this.nextLoadPosition=x.start,E?this.resetFragmentLoading(x):this.state=f.State.BACKTRACKING},O.checkFragmentChanged=function(){var x=this.media,E=null;if(x&&x.readyState>1&&x.seeking===!1){var _=x.currentTime;if(l.BufferHelper.isBuffered(x,_)?E=this.getAppendedFrag(_):l.BufferHelper.isBuffered(x,_+.1)&&(E=this.getAppendedFrag(_+.1)),E){var N=this.fragPlaying,j=E.level;(!N||E.sn!==N.sn||N.level!==j||E.urlId!==N.urlId)&&(this.hls.trigger(w.Events.FRAG_CHANGED,{frag:E}),(!N||N.level!==j)&&this.hls.trigger(w.Events.LEVEL_SWITCHED,{level:j}),this.fragPlaying=E)}}},n(P,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var E=this.getAppendedFrag(x.currentTime);if(E)return E.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var E=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(E)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),P}(f.default)},"./src/controller/subtitle-stream-controller.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"SubtitleStreamController",function(){return d});var R=S("./src/events.ts"),f=S("./src/utils/logger.ts"),s=S("./src/utils/buffer-helper.ts"),w=S("./src/controller/fragment-finders.ts"),l=S("./src/utils/discontinuities.ts"),i=S("./src/controller/level-helper.ts"),a=S("./src/controller/fragment-tracker.ts"),r=S("./src/controller/base-stream-controller.ts"),u=S("./src/types/loader.ts"),p=S("./src/types/level.ts");function m(h,C){for(var T=0;T<C.length;T++){var o=C[T];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(h,o.key,o)}}function b(h,C,T){return C&&m(h.prototype,C),T&&m(h,T),h}function g(h,C){h.prototype=Object.create(C.prototype),h.prototype.constructor=h,v(h,C)}function v(h,C){return v=Object.setPrototypeOf||function(o,P){return o.__proto__=P,o},v(h,C)}var n=500,d=function(h){g(C,h);function C(o,P){var O;return O=h.call(this,o,P,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var T=C.prototype;return T.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},T._registerListeners=function(){var P=this.hls;P.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),P.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),P.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),P.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),P.on(R.Events.ERROR,this.onError,this),P.on(R.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),P.on(R.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),P.on(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),P.on(R.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),P.on(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},T._unregisterListeners=function(){var P=this.hls;P.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),P.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),P.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),P.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),P.off(R.Events.ERROR,this.onError,this),P.off(R.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),P.off(R.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),P.off(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),P.off(R.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),P.off(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},T.startLoad=function(){this.stopLoad(),this.state=r.State.IDLE,this.setInterval(n),this.tick()},T.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},T.onLevelLoaded=function(P,O){this.mainDetails=O.details},T.onSubtitleFragProcessed=function(P,O){var y=O.frag,x=O.success;if(this.fragPrevious=y,this.state=r.State.IDLE,!x)return;var E=this.tracksBuffered[this.currentTrackId];if(!E)return;for(var _,N=y.start,j=0;j<E.length;j++)if(N>=E[j].start&&N<=E[j].end){_=E[j];break}var M=y.start+y.duration;_?_.end=M:(_={start:N,end:M},E.push(_)),this.fragmentTracker.fragBuffered(y)},T.onBufferFlushing=function(P,O){var y=O.startOffset,x=O.endOffset;if(y===0&&x!==Number.POSITIVE_INFINITY){var E=this.currentTrackId,_=this.levels;if(!_.length||!_[E]||!_[E].details)return;var N=_[E].details,j=N.targetduration,M=x-j;if(M<=0)return;O.endOffsetSubtitles=Math.max(0,M),this.tracksBuffered.forEach(function(H){for(var z=0;z<H.length;){if(H[z].end<=M){H.shift();continue}else if(H[z].start<M)H[z].start=M;else break;z++}}),this.fragmentTracker.removeFragmentsInRange(y,M,u.PlaylistLevelType.SUBTITLE)}},T.onError=function(P,O){var y,x=O.frag;if(!x||x.type!==u.PlaylistLevelType.SUBTITLE)return;(y=this.fragCurrent)!==null&&y!==void 0&&y.loader&&this.fragCurrent.loader.abort(),this.state=r.State.IDLE},T.onSubtitleTracksUpdated=function(P,O){var y=this,x=O.subtitleTracks;this.tracksBuffered=[],this.levels=x.map(function(E){return new p.Level(E)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(E){y.tracksBuffered[E.id]=[]}),this.mediaBuffer=null},T.onSubtitleTrackSwitch=function(P,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var y=this.levels[this.currentTrackId];y!=null&&y.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,y&&this.setInterval(n)},T.onSubtitleTrackLoaded=function(P,O){var y,x=O.details,E=O.id,_=this.currentTrackId,N=this.levels;if(!N.length)return;var j=N[_];if(E>=N.length||E!==_||!j)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(y=j.details)!==null&&y!==void 0&&y.live){var M=this.mainDetails;if(x.deltaUpdateFailed||!M)return;var H=M.fragments[0];if(!j.details)x.hasProgramDateTime&&M.hasProgramDateTime?Object(l.alignMediaPlaylistByPDT)(x,M):H&&Object(i.addSliding)(x,H.start);else{var z=this.alignPlaylists(x,j.details);z===0&&H&&Object(i.addSliding)(x,H.start)}}if(j.details=x,this.levelLastLoaded=E,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var F=Object(w.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);F||(this.warn("Subtitle playlist not aligned with playback"),j.details=void 0)}},T._handleFragmentLoadComplete=function(P){var O=P.frag,y=P.payload,x=O.decryptdata,E=this.hls;if(this.fragContextChanged(O))return;if(y&&y.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var _=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(y),x.key.buffer,x.iv.buffer).then(function(N){var j=performance.now();E.trigger(R.Events.FRAG_DECRYPTED,{frag:O,payload:N,stats:{tstart:_,tdecrypt:j}})})}},T.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var P,O=this.currentTrackId,y=this.levels;if(!y.length||!y[O]||!y[O].details)return;var x=y[O].details,E=x.targetduration,_=this.config,N=this.media,j=s.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,N.currentTime-E,_.maxBufferHole),M=j.end,H=j.len,z=this.getMaxBufferLength()+E;if(H>z)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var F=x.fragments,G=F.length,B=x.edge,K,W=this.fragPrevious;if(M<B){var J=_.maxFragLookUpTolerance;W&&x.hasProgramDateTime&&(K=Object(w.findFragmentByPDT)(F,W.endProgramDateTime,J)),K||(K=Object(w.findFragmentByPTS)(W,F,M,J),!K&&W&&W.start<F[0].start&&(K=F[0]))}else K=F[G-1];(P=K)!==null&&P!==void 0&&P.encrypted?(f.logger.log("Loading key for "+K.sn),this.state=r.State.KEY_LOADING,this.hls.trigger(R.Events.KEY_LOADING,{frag:K})):K&&this.fragmentTracker.getState(K)===a.FragmentState.NOT_LOADED&&this.loadFragment(K,x,M)}},T.loadFragment=function(P,O,y){this.fragCurrent=P,h.prototype.loadFragment.call(this,P,O,y)},b(C,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),C}(r.default)},"./src/controller/subtitle-track-controller.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/events.ts"),f=S("./src/utils/texttrack-utils.ts"),s=S("./src/controller/base-playlist-controller.ts"),w=S("./src/types/loader.ts");function l(m,b){for(var g=0;g<b.length;g++){var v=b[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}function i(m,b,g){return b&&l(m.prototype,b),g&&l(m,g),m}function a(m,b){m.prototype=Object.create(b.prototype),m.prototype.constructor=m,r(m,b)}function r(m,b){return r=Object.setPrototypeOf||function(v,n){return v.__proto__=n,v},r(m,b)}var u=function(m){a(b,m);function b(v){var n;return n=m.call(this,v,"[subtitle-track-controller]")||this,n.media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}var g=b.prototype;return g.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,m.prototype.destroy.call(this)},g.registerListeners=function(){var n=this.hls;n.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(R.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(R.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){var n=this.hls;n.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(R.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(R.Events.ERROR,this.onError,this)},g.onMediaAttached=function(n,d){if(this.media=d.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},g.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},g.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var n=p(this.media.textTracks);n.forEach(function(d){Object(f.clearCurrentCues)(d)}),this.subtitleTrack=-1,this.media=null},g.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},g.onManifestParsed=function(n,d){this.tracks=d.subtitleTracks},g.onSubtitleTrackLoaded=function(n,d){var h=d.id,C=d.details,T=this.trackId,o=this.tracksInGroup[T];if(!o){this.warn("Invalid subtitle track id "+h);return}var P=o.details;o.details=d.details,this.log("subtitle track "+h+" loaded ["+C.startSN+"-"+C.endSN+"]"),h===this.trackId&&(this.retryCount=0,this.playlistLoaded(h,d,P))},g.onLevelLoading=function(n,d){this.switchLevel(d.level)},g.onLevelSwitching=function(n,d){this.switchLevel(d.level)},g.switchLevel=function(n){var d=this.hls.levels[n];if(!(d!=null&&d.textGroupIds))return;var h=d.textGroupIds[d.urlId];if(this.groupId!==h){var C=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,T=this.tracks.filter(function(O){return!h||O.groupId===h});this.tracksInGroup=T;var o=this.findTrackId(C==null?void 0:C.name)||this.findTrackId();this.groupId=h;var P={subtitleTracks:T};this.log("Updating subtitle tracks, "+T.length+' track(s) found in "'+h+'" group-id'),this.hls.trigger(R.Events.SUBTITLE_TRACKS_UPDATED,P),o!==-1&&this.setSubtitleTrack(o,C)}},g.findTrackId=function(n){for(var d=this.tracksInGroup,h=0;h<d.length;h++){var C=d[h];if((!this.selectDefaultTrack||C.default)&&(!n||n===C.name))return C.id}return-1},g.onError=function(n,d){if(m.prototype.onError.call(this,n,d),d.fatal||!d.context)return;d.context.type===w.PlaylistContextType.SUBTITLE_TRACK&&d.context.id===this.trackId&&d.context.groupId===this.groupId&&this.retryLoadingOrFail(d)},g.loadPlaylist=function(n){var d=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(d)){var h=d.id,C=d.groupId,T=d.url;if(n)try{T=n.addDirectives(T)}catch(o){this.warn("Could not construct new URL with HLS Delivery Directives: "+o)}this.log("Loading subtitle playlist for id "+h),this.hls.trigger(R.Events.SUBTITLE_TRACK_LOADING,{url:T,id:h,groupId:C,deliveryDirectives:n||null})}},g.toggleTrackModes=function(n){var d=this,h=this.media,C=this.subtitleDisplay,T=this.trackId;if(!h)return;var o=p(h.textTracks),P=o.filter(function(x){return x.groupId===d.groupId});if(n===-1)[].slice.call(o).forEach(function(x){x.mode="disabled"});else{var O=P[T];O&&(O.mode="disabled")}var y=P[n];y&&(y.mode=C?"showing":"hidden")},g.setSubtitleTrack=function(n,d){var h,C=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(h=C[n])!==null&&h!==void 0&&h.details)||n<-1||n>=C.length)return;this.clearTimer();var T=C[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,T){var o=T.id,P=T.groupId,O=P===void 0?"":P,y=T.name,x=T.type,E=T.url;this.hls.trigger(R.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:O,name:y,type:x,url:E});var _=this.switchParams(T.url,d==null?void 0:d.details);this.loadPlaylist(_)}else this.hls.trigger(R.Events.SUBTITLE_TRACK_SWITCH,{id:n})},g.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,d=p(this.media.textTracks),h=0;h<d.length;h++)if(d[h].mode==="hidden")n=h;else if(d[h].mode==="showing"){n=h;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},i(b,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var d=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,d)}}]),b}(s.default);function p(m){for(var b=[],g=0;g<m.length;g++){var v=m[g];v.kind==="subtitles"&&v.label&&b.push(m[g])}return b}c.default=u},"./src/controller/timeline-controller.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"TimelineController",function(){return p});var R=S("./src/polyfills/number.ts"),f=S("./src/events.ts"),s=S("./src/utils/cea-608-parser.ts"),w=S("./src/utils/output-filter.ts"),l=S("./src/utils/webvtt-parser.ts"),i=S("./src/utils/texttrack-utils.ts"),a=S("./src/utils/imsc1-ttml-parser.ts"),r=S("./src/types/loader.ts"),u=S("./src/utils/logger.ts"),p=function(){function v(d){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=g(),this.captionsProperties=void 0,this.hls=d,this.config=d.config,this.Cues=d.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 h=new w.default(this,"textTrack1"),C=new w.default(this,"textTrack2"),T=new w.default(this,"textTrack3"),o=new w.default(this,"textTrack4");this.cea608Parser1=new s.default(1,h,C),this.cea608Parser2=new s.default(3,T,o)}d.on(f.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),d.on(f.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on(f.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(f.Events.MANIFEST_LOADED,this.onManifestLoaded,this),d.on(f.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),d.on(f.Events.FRAG_LOADING,this.onFragLoading,this),d.on(f.Events.FRAG_LOADED,this.onFragLoaded,this),d.on(f.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),d.on(f.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),d.on(f.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),d.on(f.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),d.on(f.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=v.prototype;return n.destroy=function(){var h=this.hls;h.off(f.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),h.off(f.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.off(f.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.off(f.Events.MANIFEST_LOADED,this.onManifestLoaded,this),h.off(f.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),h.off(f.Events.FRAG_LOADING,this.onFragLoading,this),h.off(f.Events.FRAG_LOADED,this.onFragLoaded,this),h.off(f.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),h.off(f.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),h.off(f.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),h.off(f.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),h.off(f.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(h,C,T,o,P){for(var O=!1,y=P.length;y--;){var x=P[y],E=b(x[0],x[1],C,T);if(E>=0&&(x[0]=Math.min(x[0],C),x[1]=Math.max(x[1],T),O=!0,E/(T-C)>.5))return}if(O||P.push([C,T]),this.config.renderTextTracksNatively){var _=this.captionsTracks[h];this.Cues.newCue(_,C,T,o)}else{var N=this.Cues.newCue(null,C,T,o);this.hls.trigger(f.Events.CUES_PARSED,{type:"captions",cues:N,track:h})}},n.onInitPtsFound=function(h,C){var T=this,o=C.frag,P=C.id,O=C.initPTS,y=C.timescale,x=this.unparsedVttFrags;P==="main"&&(this.initPTS[o.cc]=O,this.timescale[o.cc]=y),x.length&&(this.unparsedVttFrags=[],x.forEach(function(E){T.onFragLoaded(f.Events.FRAG_LOADED,E)}))},n.getExistingTrack=function(h){var C=this.media;if(C)for(var T=0;T<C.textTracks.length;T++){var o=C.textTracks[T];if(o[h])return o}return null},n.createCaptionsTrack=function(h){this.config.renderTextTracksNatively?this.createNativeTrack(h):this.createNonNativeTrack(h)},n.createNativeTrack=function(h){if(this.captionsTracks[h])return;var C=this.captionsProperties,T=this.captionsTracks,o=this.media,P=C[h],O=P.label,y=P.languageCode,x=this.getExistingTrack(h);if(x)T[h]=x,Object(i.clearCurrentCues)(T[h]),Object(i.sendAddTrackEvent)(T[h],o);else{var E=this.createTextTrack("captions",O,y);E&&(E[h]=!0,T[h]=E)}},n.createNonNativeTrack=function(h){if(this.nonNativeCaptionsTracks[h])return;var C=this.captionsProperties[h];if(!C)return;var T=C.label,o={_id:h,label:T,kind:"captions",default:C.media?!!C.media.default:!1,closedCaptions:C.media};this.nonNativeCaptionsTracks[h]=o,this.hls.trigger(f.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[o]})},n.createTextTrack=function(h,C,T){var o=this.media;return o?o.addTextTrack(h,C,T):void 0},n.onMediaAttaching=function(h,C){this.media=C.media,this._cleanTracks()},n.onMediaDetaching=function(){var h=this.captionsTracks;Object.keys(h).forEach(function(C){Object(i.clearCurrentCues)(h[C]),delete h[C]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=g(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},n._cleanTracks=function(){var h=this.media;if(!h)return;var C=h.textTracks;if(C)for(var T=0;T<C.length;T++)Object(i.clearCurrentCues)(C[T])},n.onSubtitleTracksUpdated=function(h,C){var T=this;this.textTracks=[];var o=C.subtitleTracks||[],P=o.some(function(E){return E.textCodec===a.IMSC1_CODEC});if(this.config.enableWebVTT||P&&this.config.enableIMSC1){var O=this.tracks&&o&&this.tracks.length===o.length;if(this.tracks=o||[],this.config.renderTextTracksNatively){var y=this.media?this.media.textTracks:[];this.tracks.forEach(function(E,_){var N;if(_<y.length){for(var j=null,M=0;M<y.length;M++)if(m(y[M],E)){j=y[M];break}j&&(N=j)}N?Object(i.clearCurrentCues)(N):(N=T.createTextTrack("subtitles",E.name,E.lang),N&&(N.mode="disabled")),N&&(N.groupId=E.groupId,T.textTracks.push(N))})}else if(!O&&this.tracks&&this.tracks.length){var x=this.tracks.map(function(E){return{label:E.name,kind:E.type.toLowerCase(),default:E.default,subtitleTrack:E}});this.hls.trigger(f.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},n.onManifestLoaded=function(h,C){var T=this;this.config.enableCEA708Captions&&C.captions&&C.captions.forEach(function(o){var P=/(?:CC|SERVICE)([1-4])/.exec(o.instreamId);if(!P)return;var O="textTrack"+P[1],y=T.captionsProperties[O];if(!y)return;y.label=o.name,o.lang&&(y.languageCode=o.lang),y.media=o})},n.onFragLoading=function(h,C){var T=this.cea608Parser1,o=this.cea608Parser2,P=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(T&&o))return;if(C.frag.type===r.PlaylistLevelType.MAIN){var y,x,E=C.frag.sn,_=(y=C==null||((x=C.part)===null||x===void 0)?void 0:x.index)!=null?y:-1;E===P+1||E===P&&_===O+1||(T.reset(),o.reset()),this.lastSn=E,this.lastPartIndex=_}},n.onFragLoaded=function(h,C){var T=C.frag,o=C.payload,P=this.initPTS,O=this.unparsedVttFrags;if(T.type===r.PlaylistLevelType.SUBTITLE)if(o.byteLength){if(!Object(R.isFiniteNumber)(P[T.cc])){O.push(C),P.length&&this.hls.trigger(f.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:T,error:new Error("Missing initial subtitle PTS")});return}var y=T.decryptdata;if(y==null||y.key==null||y.method!=="AES-128"){var x=this.tracks[T.level],E=this.vttCCs;E[T.cc]||(E[T.cc]={start:T.start,prevCC:this.prevCC,new:!0},this.prevCC=T.cc),x&&x.textCodec===a.IMSC1_CODEC?this._parseIMSC1(T,o):this._parseVTTs(T,o,E)}}else this.hls.trigger(f.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:T,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(h,C){var T=this,o=this.hls;Object(a.parseIMSC1)(C,this.initPTS[h.cc],this.timescale[h.cc],function(P){T._appendCues(P,h.level),o.trigger(f.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:h})},function(P){u.logger.log("Failed to parse IMSC1: "+P),o.trigger(f.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h,error:P})})},n._parseVTTs=function(h,C,T){var o=this,P=this.hls;Object(l.parseWebVTT)(C,this.initPTS[h.cc],this.timescale[h.cc],T,h.cc,h.start,function(O){o._appendCues(O,h.level),P.trigger(f.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:h})},function(O){o._fallbackToIMSC1(h,C),u.logger.log("Failed to parse VTT cue: "+O),P.trigger(f.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h,error:O})})},n._fallbackToIMSC1=function(h,C){var T=this,o=this.tracks[h.level];o.textCodec||Object(a.parseIMSC1)(C,this.initPTS[h.cc],this.timescale[h.cc],function(){o.textCodec=a.IMSC1_CODEC,T._parseIMSC1(h,C)},function(){o.textCodec="wvtt"})},n._appendCues=function(h,C){var T=this.hls;if(this.config.renderTextTracksNatively){var o=this.textTracks[C];if(o.mode==="disabled")return;h.forEach(function(y){return Object(i.addCueToTrack)(o,y)})}else{var P=this.tracks[C],O=P.default?"default":"subtitles"+C;T.trigger(f.Events.CUES_PARSED,{type:"subtitles",cues:h,track:O})}},n.onFragDecrypted=function(h,C){var T=C.frag;if(T.type===r.PlaylistLevelType.SUBTITLE){if(!Object(R.isFiniteNumber)(this.initPTS[T.cc])){this.unparsedVttFrags.push(C);return}this.onFragLoaded(f.Events.FRAG_LOADED,C)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(h,C){var T=this.cea608Parser1,o=this.cea608Parser2;if(!this.enabled||!(T&&o))return;for(var P=0;P<C.samples.length;P++){var O=C.samples[P].bytes;if(O){var y=this.extractCea608Data(O);T.addData(C.samples[P].pts,y[0]),o.addData(C.samples[P].pts,y[1])}}},n.onBufferFlushing=function(h,C){var T=C.startOffset,o=C.endOffset,P=C.endOffsetSubtitles,O=C.type,y=this.media;if(!y||y.currentTime<o)return;if(!O||O==="video"){var x=this.captionsTracks;Object.keys(x).forEach(function(_){return Object(i.removeCuesInRange)(x[_],T,o)})}if(this.config.renderTextTracksNatively&&(T===0&&P!==void 0)){var E=this.textTracks;Object.keys(E).forEach(function(_){return Object(i.removeCuesInRange)(E[_],T,P)})}},n.extractCea608Data=function(h){for(var C=h[0]&31,T=2,o=[[],[]],P=0;P<C;P++){var O=h[T++],y=127&h[T++],x=127&h[T++],E=(4&O)!==0,_=3&O;if(y===0&&x===0)continue;E&&((_===0||_===1)&&(o[_].push(y),o[_].push(x)))}return o},v}();function m(v,n){return v&&v.label===n.name&&!(v.textTrack1||v.textTrack2)}function b(v,n,d,h){return Math.min(n,h)-Math.max(v,d)}function g(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return R});var R=function(){function f(w,l){this.subtle=void 0,this.aesIV=void 0,this.subtle=w,this.aesIV=l}var s=f.prototype;return s.decrypt=function(l,i){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},i,l)},f}()},"./src/crypt/aes-decryptor.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"removePadding",function(){return f}),S.d(c,"default",function(){return s});var R=S("./src/utils/typed-array.ts");function f(w){var l=w.byteLength,i=l&&new DataView(w.buffer).getUint8(l-1);return i?Object(R.sliceUint8)(w,0,l-i):w}var s=function(){function w(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var l=w.prototype;return l.uint8ArrayToUint32Array_=function(a){for(var r=new DataView(a),u=new Uint32Array(4),p=0;p<4;p++)u[p]=r.getUint32(p*4);return u},l.initTable=function(){var a=this.sBox,r=this.invSBox,u=this.subMix,p=u[0],m=u[1],b=u[2],g=u[3],v=this.invSubMix,n=v[0],d=v[1],h=v[2],C=v[3],T=new Uint32Array(256),o=0,P=0,O=0;for(O=0;O<256;O++)O<128?T[O]=O<<1:T[O]=O<<1^283;for(O=0;O<256;O++){var y=P^P<<1^P<<2^P<<3^P<<4;y=y>>>8^y&255^99,a[o]=y,r[y]=o;var x=T[o],E=T[x],_=T[E],N=T[y]*257^y*16843008;p[o]=N<<24|N>>>8,m[o]=N<<16|N>>>16,b[o]=N<<8|N>>>24,g[o]=N,N=_*16843009^E*65537^x*257^o*16843008,n[y]=N<<24|N>>>8,d[y]=N<<16|N>>>16,h[y]=N<<8|N>>>24,C[y]=N,o?(o=x^T[T[T[_^x]]],P^=T[T[P]]):o=P=1}},l.expandKey=function(a){for(var r=this.uint8ArrayToUint32Array_(a),u=!0,p=0;p<r.length&&u;)u=r[p]===this.key[p],p++;if(u)return;this.key=r;var m=this.keySize=r.length;if(m!==4&&m!==6&&m!==8)throw new Error("Invalid aes key size="+m);var b=this.ksRows=(m+6+1)*4,g,v,n=this.keySchedule=new Uint32Array(b),d=this.invKeySchedule=new Uint32Array(b),h=this.sBox,C=this.rcon,T=this.invSubMix,o=T[0],P=T[1],O=T[2],y=T[3],x,E;for(g=0;g<b;g++){if(g<m){x=n[g]=r[g];continue}E=x,g%m===0?(E=E<<8|E>>>24,E=h[E>>>24]<<24|h[E>>>16&255]<<16|h[E>>>8&255]<<8|h[E&255],E^=C[g/m|0]<<24):m>6&&g%m===4&&(E=h[E>>>24]<<24|h[E>>>16&255]<<16|h[E>>>8&255]<<8|h[E&255]),n[g]=x=(n[g-m]^E)>>>0}for(v=0;v<b;v++)g=b-v,v&3?E=n[g]:E=n[g-4],v<4||g<=4?d[v]=E:d[v]=o[h[E>>>24]]^P[h[E>>>16&255]]^O[h[E>>>8&255]]^y[h[E&255]],d[v]=d[v]>>>0},l.networkToHostOrderSwap=function(a){return a<<24|(a&65280)<<8|(a&16711680)>>8|a>>>24},l.decrypt=function(a,r,u){for(var p=this.keySize+6,m=this.invKeySchedule,b=this.invSBox,g=this.invSubMix,v=g[0],n=g[1],d=g[2],h=g[3],C=this.uint8ArrayToUint32Array_(u),T=C[0],o=C[1],P=C[2],O=C[3],y=new Int32Array(a),x=new Int32Array(y.length),E,_,N,j,M,H,z,F,G,B,K,W,J,ee,Z=this.networkToHostOrderSwap;r<y.length;){for(G=Z(y[r]),B=Z(y[r+1]),K=Z(y[r+2]),W=Z(y[r+3]),M=G^m[0],H=W^m[1],z=K^m[2],F=B^m[3],J=4,ee=1;ee<p;ee++)E=v[M>>>24]^n[H>>16&255]^d[z>>8&255]^h[F&255]^m[J],_=v[H>>>24]^n[z>>16&255]^d[F>>8&255]^h[M&255]^m[J+1],N=v[z>>>24]^n[F>>16&255]^d[M>>8&255]^h[H&255]^m[J+2],j=v[F>>>24]^n[M>>16&255]^d[H>>8&255]^h[z&255]^m[J+3],M=E,H=_,z=N,F=j,J=J+4;E=b[M>>>24]<<24^b[H>>16&255]<<16^b[z>>8&255]<<8^b[F&255]^m[J],_=b[H>>>24]<<24^b[z>>16&255]<<16^b[F>>8&255]<<8^b[M&255]^m[J+1],N=b[z>>>24]<<24^b[F>>16&255]<<16^b[M>>8&255]<<8^b[H&255]^m[J+2],j=b[F>>>24]<<24^b[M>>16&255]<<16^b[H>>8&255]<<8^b[z&255]^m[J+3],x[r]=Z(E^T),x[r+1]=Z(j^o),x[r+2]=Z(N^P),x[r+3]=Z(_^O),T=G,o=B,P=K,O=W,r=r+4}return x.buffer},w}()},"./src/crypt/decrypter.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return r});var R=S("./src/crypt/aes-crypto.ts"),f=S("./src/crypt/fast-aes-key.ts"),s=S("./src/crypt/aes-decryptor.ts"),w=S("./src/utils/logger.ts"),l=S("./src/utils/mp4-tools.ts"),i=S("./src/utils/typed-array.ts"),a=16,r=function(){function u(m,b,g){var v=g===void 0?{}:g,n=v.removePKCS7Padding,d=n===void 0?!0:n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=m,this.config=b,this.removePKCS7Padding=d,d)try{var h=self.crypto;h&&(this.subtle=h.subtle||h.webkitSubtle)}catch(C){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var p=u.prototype;return p.destroy=function(){this.observer=null},p.isSync=function(){return this.config.enableSoftwareAES},p.flush=function(){var b=this.currentResult;if(!b){this.reset();return}var g=new Uint8Array(b);return this.reset(),this.removePKCS7Padding?Object(s.removePadding)(g):g},p.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},p.decrypt=function(b,g,v,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(b),g,v);var d=this.flush();d&&n(d.buffer)}else this.webCryptoDecrypt(new Uint8Array(b),g,v).then(n)},p.softwareDecrypt=function(b,g,v){var n=this.currentIV,d=this.currentResult,h=this.remainderData;this.logOnce("JS AES decrypt"),h&&(b=Object(l.appendUint8Array)(h,b),this.remainderData=null);var C=this.getValidChunk(b);if(!C.length)return null;n&&(v=n);var T=this.softwareDecrypter;T||(T=this.softwareDecrypter=new s.default),T.expandKey(g);var o=d;return this.currentResult=T.decrypt(C.buffer,0,v),this.currentIV=Object(i.sliceUint8)(C,-16).buffer,o||null},p.webCryptoDecrypt=function(b,g,v){var n=this,d=this.subtle;return(this.key!==g||!this.fastAesKey)&&(this.key=g,this.fastAesKey=new f.default(d,g)),this.fastAesKey.expandKey().then(function(h){if(!d)return Promise.reject(new Error("web crypto not initialized"));var C=new R.default(d,v);return C.decrypt(b.buffer,h)}).catch(function(h){return n.onWebCryptoError(h,b,g,v)})},p.onWebCryptoError=function(b,g,v,n){return w.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",b),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(g,v,n)},p.getValidChunk=function(b){var g=b,v=b.length-b.length%a;return v!==b.length&&(g=Object(i.sliceUint8)(b,0,v),this.remainderData=Object(i.sliceUint8)(b,v)),g},p.logOnce=function(b){if(!this.logEnabled)return;w.logger.log("[decrypter.ts]: "+b),this.logEnabled=!1},u}()},"./src/crypt/fast-aes-key.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return R});var R=function(){function f(w,l){this.subtle=void 0,this.key=void 0,this.subtle=w,this.key=l}var s=f.prototype;return s.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},f}()},"./src/demux/aacdemuxer.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/demux/base-audio-demuxer.ts"),f=S("./src/demux/adts.ts"),s=S("./src/utils/logger.ts"),w=S("./src/demux/id3.ts");function l(r,u){r.prototype=Object.create(u.prototype),r.prototype.constructor=r,i(r,u)}function i(r,u){return i=Object.setPrototypeOf||function(m,b){return m.__proto__=b,m},i(r,u)}var a=function(r){l(u,r);function u(m,b){var g;return g=r.call(this)||this,g.observer=void 0,g.config=void 0,g.observer=m,g.config=b,g}var p=u.prototype;return p.resetInitSegment=function(b,g,v){r.prototype.resetInitSegment.call(this,b,g,v),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:b,duration:v,inputTimeScale:9e4,dropped:0}},u.probe=function(b){if(!b)return!1;for(var g=w.getID3Data(b,0)||[],v=g.length,n=b.length;v<n;v++)if(f.probe(b,v))return s.logger.log("ADTS sync word found !"),!0;return!1},p.canParse=function(b,g){return f.canParse(b,g)},p.appendFrame=function(b,g,v){f.initTrackConfig(b,this.observer,g,v,b.manifestCodec);var n=f.appendFrame(b,g,v,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},u}(R.default);a.minProbeByteLength=9,c.default=a},"./src/demux/adts.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"getAudioConfig",function(){return w}),S.d(c,"isHeaderPattern",function(){return l}),S.d(c,"getHeaderLength",function(){return i}),S.d(c,"getFullFrameLength",function(){return a}),S.d(c,"canGetFrameLength",function(){return r}),S.d(c,"isHeader",function(){return u}),S.d(c,"canParse",function(){return p}),S.d(c,"probe",function(){return m}),S.d(c,"initTrackConfig",function(){return b}),S.d(c,"getFrameDuration",function(){return g}),S.d(c,"parseFrameHeader",function(){return v}),S.d(c,"appendFrame",function(){return n});var R=S("./src/utils/logger.ts"),f=S("./src/errors.ts"),s=S("./src/events.ts");function w(d,h,C,T){var o,P,O,y,x=navigator.userAgent.toLowerCase(),E=T,_=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];o=((h[C+2]&192)>>>6)+1;var N=(h[C+2]&60)>>>2;if(N>_.length-1){d.trigger(s.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+N});return}return O=(h[C+2]&1)<<2,O|=(h[C+3]&192)>>>6,R.logger.log("manifest codec:"+T+", ADTS type:"+o+", samplingIndex:"+N),/firefox/i.test(x)?N>=6?(o=5,y=new Array(4),P=N-3):(o=2,y=new Array(2),P=N):x.indexOf("android")!==-1?(o=2,y=new Array(2),P=N):(o=5,y=new Array(4),T&&(T.indexOf("mp4a.40.29")!==-1||T.indexOf("mp4a.40.5")!==-1)||!T&&N>=6?P=N-3:((T&&T.indexOf("mp4a.40.2")!==-1&&(N>=6&&O===1||/vivaldi/i.test(x))||!T&&O===1)&&(o=2,y=new Array(2)),P=N)),y[0]=o<<3,y[0]|=(N&14)>>1,y[1]|=(N&1)<<7,y[1]|=O<<3,o===5&&(y[1]|=(P&14)>>1,y[2]=(P&1)<<7,y[2]|=2<<2,y[3]=0),{config:y,samplerate:_[N],channelCount:O,codec:"mp4a.40."+o,manifestCodec:E}}function l(d,h){return d[h]===255&&(d[h+1]&246)===240}function i(d,h){return d[h+1]&1?7:9}function a(d,h){return(d[h+3]&3)<<11|d[h+4]<<3|(d[h+5]&224)>>>5}function r(d,h){return h+5<d.length}function u(d,h){return h+1<d.length&&l(d,h)}function p(d,h){return r(d,h)&&l(d,h)&&a(d,h)<=d.length-h}function m(d,h){if(u(d,h)){var C=i(d,h);if(h+C>=d.length)return!1;var T=a(d,h);if(T<=C)return!1;var o=h+T;return o===d.length||u(d,o)}return!1}function b(d,h,C,T,o){if(!d.samplerate){var P=w(h,C,T,o);if(!P)return;d.config=P.config,d.samplerate=P.samplerate,d.channelCount=P.channelCount,d.codec=P.codec,d.manifestCodec=P.manifestCodec,R.logger.log("parsed codec:"+d.codec+", rate:"+P.samplerate+", channels:"+P.channelCount)}}function g(d){return 1024*9e4/d}function v(d,h,C,T,o){var P=i(d,h),O=a(d,h);if(O-=P,O>0){var y=C+T*o;return{headerLength:P,frameLength:O,stamp:y}}}function n(d,h,C,T,o){var P=g(d.samplerate),O=v(h,C,T,o,P);if(O){var y=O.frameLength,x=O.headerLength,E=O.stamp,_=x+y,N=Math.max(0,C+_-h.length),j;N?(j=new Uint8Array(_-x),j.set(h.subarray(C+x,h.length),0)):j=h.subarray(C+x,C+_);var M={unit:j,pts:E};return N||d.samples.push(M),{sample:M,length:_,missing:N}}}},"./src/demux/base-audio-demuxer.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"initPTSFn",function(){return a});var R=S("./src/polyfills/number.ts"),f=S("./src/demux/id3.ts"),s=S("./src/demux/dummy-demuxed-track.ts"),w=S("./src/utils/mp4-tools.ts"),l=S("./src/utils/typed-array.ts"),i=function(){function r(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var u=r.prototype;return u.resetInitSegment=function(m,b,g){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},u.resetTimeStamp=function(){},u.resetContiguity=function(){},u.canParse=function(m,b){return!1},u.appendFrame=function(m,b,g){},u.demux=function(m,b){this.cachedData&&(m=Object(w.appendUint8Array)(this.cachedData,m),this.cachedData=null);var g=f.getID3Data(m,0),v=g?g.length:0,n,d,h=this._audioTrack,C=this._id3Track,T=g?f.getTimeStamp(g):void 0,o=m.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=a(T,b)),g&&g.length>0&&C.samples.push({pts:this.initPTS,dts:this.initPTS,data:g}),d=this.initPTS;v<o;){if(this.canParse(m,v)){var P=this.appendFrame(h,m,v);P?(this.frameIndex++,d=P.sample.pts,v+=P.length,n=v):v=o}else f.canParse(m,v)?(g=f.getID3Data(m,v),C.samples.push({pts:d,dts:d,data:g}),v+=g.length,n=v):v++;if(v===o&&n!==o){var O=Object(l.sliceUint8)(m,n);this.cachedData?this.cachedData=Object(w.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:h,avcTrack:Object(s.dummyTrack)(),id3Track:C,textTrack:Object(s.dummyTrack)()}},u.demuxSampleAes=function(m,b,g){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},u.flush=function(m){var b=this.cachedData;return b&&(this.cachedData=null,this.demux(b,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(s.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(s.dummyTrack)()}},u.destroy=function(){},r}(),a=function(u,p){return Object(R.isFiniteNumber)(u)?u*90:p*9e4};c.default=i},"./src/demux/chunk-cache.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return R});var R=function(){function s(){this.chunks=[],this.dataLength=0}var w=s.prototype;return w.push=function(i){this.chunks.push(i),this.dataLength+=i.length},w.flush=function(){var i=this.chunks,a=this.dataLength,r;if(i.length)i.length===1?r=i[0]:r=f(i,a);else return new Uint8Array(0);return this.reset(),r},w.reset=function(){this.chunks.length=0,this.dataLength=0},s}();function f(s,w){for(var l=new Uint8Array(w),i=0,a=0;a<s.length;a++){var r=s[a];l.set(r,i),i+=r.length}return l}},"./src/demux/dummy-demuxed-track.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"dummyTrack",function(){return R});function R(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/utils/logger.ts"),f=function(){function s(l){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=l,this.bytesAvailable=l.byteLength,this.word=0,this.bitsAvailable=0}var w=s.prototype;return w.loadWord=function(){var i=this.data,a=this.bytesAvailable,r=i.byteLength-a,u=new Uint8Array(4),p=Math.min(4,a);if(p===0)throw new Error("no bytes available");u.set(i.subarray(r,r+p)),this.word=new DataView(u.buffer).getUint32(0),this.bitsAvailable=p*8,this.bytesAvailable-=p},w.skipBits=function(i){var a;this.bitsAvailable>i?(this.word<<=i,this.bitsAvailable-=i):(i-=this.bitsAvailable,a=i>>3,i-=a>>3,this.bytesAvailable-=a,this.loadWord(),this.word<<=i,this.bitsAvailable-=i)},w.readBits=function(i){var a=Math.min(this.bitsAvailable,i),r=this.word>>>32-a;return i>32&&R.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=a,this.bitsAvailable>0?this.word<<=a:this.bytesAvailable>0&&this.loadWord(),a=i-a,a>0&&this.bitsAvailable?r<<a|this.readBits(a):r},w.skipLZ=function(){var i;for(i=0;i<this.bitsAvailable;++i)if((this.word&2147483648>>>i)!==0)return this.word<<=i,this.bitsAvailable-=i,i;return this.loadWord(),i+this.skipLZ()},w.skipUEG=function(){this.skipBits(1+this.skipLZ())},w.skipEG=function(){this.skipBits(1+this.skipLZ())},w.readUEG=function(){var i=this.skipLZ();return this.readBits(i+1)-1},w.readEG=function(){var i=this.readUEG();return 1&i?1+i>>>1:-1*(i>>>1)},w.readBoolean=function(){return this.readBits(1)===1},w.readUByte=function(){return this.readBits(8)},w.readUShort=function(){return this.readBits(16)},w.readUInt=function(){return this.readBits(32)},w.skipScalingList=function(i){for(var a=8,r=8,u,p=0;p<i;p++)r!==0&&(u=this.readEG(),r=(a+u+256)%256),a=r===0?a:r},w.readSPS=function(){var i=0,a=0,r=0,u=0,p,m,b,g=this.readUByte.bind(this),v=this.readBits.bind(this),n=this.readUEG.bind(this),d=this.readBoolean.bind(this),h=this.skipBits.bind(this),C=this.skipEG.bind(this),T=this.skipUEG.bind(this),o=this.skipScalingList.bind(this);g();var P=g();if(v(5),h(3),g(),T(),P===100||P===110||P===122||P===244||P===44||P===83||P===86||P===118||P===128){var O=n();if(O===3&&h(1),T(),T(),h(1),d())for(m=O!==3?8:12,b=0;b<m;b++)d()&&(b<6?o(16):o(64))}T();var y=n();if(y===0)n();else if(y===1)for(h(1),C(),C(),p=n(),b=0;b<p;b++)C();T(),h(1);var x=n(),E=n(),_=v(1);_===0&&h(1),h(1),d()&&(i=n(),a=n(),r=n(),u=n());var N=[1,1];if(d()&&d()){var j=g();switch(j){case 1:N=[1,1];break;case 2:N=[12,11];break;case 3:N=[10,11];break;case 4:N=[16,11];break;case 5:N=[40,33];break;case 6:N=[24,11];break;case 7:N=[20,11];break;case 8:N=[32,11];break;case 9:N=[80,33];break;case 10:N=[18,11];break;case 11:N=[15,11];break;case 12:N=[64,33];break;case 13:N=[160,99];break;case 14:N=[4,3];break;case 15:N=[3,2];break;case 16:N=[2,1];break;case 255:{N=[g()<<8|g(),g()<<8|g()];break}}}return{width:Math.ceil((x+1)*16-i*2-a*2),height:(2-_)*(E+1)*16-(_?2:4)*(r+u),pixelRatio:N}},w.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},s}();c.default=f},"./src/demux/id3.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"isHeader",function(){return R}),S.d(c,"isFooter",function(){return f}),S.d(c,"getID3Data",function(){return s}),S.d(c,"canParse",function(){return l}),S.d(c,"getTimeStamp",function(){return i}),S.d(c,"isTimeStampFrame",function(){return a}),S.d(c,"getID3Frames",function(){return u}),S.d(c,"decodeFrame",function(){return p}),S.d(c,"utf8ArrayToStr",function(){return n}),S.d(c,"testables",function(){return d});var R=function(o,P){return P+10<=o.length&&(o[P]===73&&o[P+1]===68&&o[P+2]===51&&(o[P+3]<255&&o[P+4]<255&&(o[P+6]<128&&o[P+7]<128&&o[P+8]<128&&o[P+9]<128)))},f=function(o,P){return P+10<=o.length&&(o[P]===51&&o[P+1]===68&&o[P+2]===73&&(o[P+3]<255&&o[P+4]<255&&(o[P+6]<128&&o[P+7]<128&&o[P+8]<128&&o[P+9]<128)))},s=function(o,P){for(var O=P,y=0;R(o,P);){y+=10;var x=w(o,P+6);y+=x,f(o,P+10)&&(y+=10),P+=y}return y>0?o.subarray(O,O+y):void 0},w=function(o,P){var O=0;return O=(o[P]&127)<<21,O|=(o[P+1]&127)<<14,O|=(o[P+2]&127)<<7,O|=o[P+3]&127,O},l=function(o,P){return R(o,P)&&w(o,P+6)+10<=o.length-P},i=function(o){for(var P=u(o),O=0;O<P.length;O++){var y=P[O];if(a(y))return v(y)}return},a=function(o){return o&&o.key==="PRIV"&&o.info==="com.apple.streaming.transportStreamTimestamp"},r=function(o){var P=String.fromCharCode(o[0],o[1],o[2],o[3]),O=w(o,4),y=10;return{type:P,size:O,data:o.subarray(y,y+O)}},u=function(o){for(var P=0,O=[];R(o,P);){var y=w(o,P+6);P+=10;for(var x=P+y;P+8<x;){var E=r(o.subarray(P)),_=p(E);_&&O.push(_),P+=E.size+10}f(o,P)&&(P+=10)}return O},p=function(o){return o.type==="PRIV"?m(o):o.type[0]==="W"?g(o):b(o)},m=function(o){if(o.size<2)return;var P=n(o.data,!0),O=new Uint8Array(o.data.subarray(P.length+1));return{key:o.type,info:P,data:O.buffer}},b=function(o){if(o.size<2)return;if(o.type==="TXXX"){var P=1,O=n(o.data.subarray(P),!0);P+=O.length+1;var y=n(o.data.subarray(P));return{key:o.type,info:O,data:y}}var x=n(o.data.subarray(1));return{key:o.type,data:x}},g=function(o){if(o.type==="WXXX"){if(o.size<2)return;var P=1,O=n(o.data.subarray(P),!0);P+=O.length+1;var y=n(o.data.subarray(P));return{key:o.type,info:O,data:y}}var x=n(o.data);return{key:o.type,data:x}},v=function(o){if(o.data.byteLength===8){var P=new Uint8Array(o.data),O=P[3]&1,y=(P[4]<<23)+(P[5]<<15)+(P[6]<<7)+P[7];return y/=45,O&&(y+=4772185884e-2),Math.round(y)}return},n=function(o,P){P===void 0&&(P=!1);var O=C();if(O){var y=O.decode(o);if(P){var x=y.indexOf("\0");return x!==-1?y.substring(0,x):y}return y.replace(/\0/g,"")}for(var E=o.length,_,N,j,M="",H=0;H<E;){if(_=o[H++],_===0&&P)return M;if(_===0||_===3)continue;switch(_>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:M+=String.fromCharCode(_);break;case 12:case 13:N=o[H++],M+=String.fromCharCode((_&31)<<6|N&63);break;case 14:N=o[H++],j=o[H++],M+=String.fromCharCode((_&15)<<12|(N&63)<<6|(j&63)<<0);break;default:}}return M},d={decodeTextFrame:b},h;function C(){return!h&&typeof self.TextDecoder!="undefined"&&(h=new self.TextDecoder("utf-8")),h}},"./src/demux/mp3demuxer.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/demux/base-audio-demuxer.ts"),f=S("./src/demux/id3.ts"),s=S("./src/utils/logger.ts"),w=S("./src/demux/mpegaudio.ts");function l(r,u){r.prototype=Object.create(u.prototype),r.prototype.constructor=r,i(r,u)}function i(r,u){return i=Object.setPrototypeOf||function(m,b){return m.__proto__=b,m},i(r,u)}var a=function(r){l(u,r);function u(){return r.apply(this,arguments)||this}var p=u.prototype;return p.resetInitSegment=function(b,g,v){r.prototype.resetInitSegment.call(this,b,g,v),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:b,duration:v,inputTimeScale:9e4,dropped:0}},u.probe=function(b){if(!b)return!1;for(var g=f.getID3Data(b,0)||[],v=g.length,n=b.length;v<n;v++)if(w.probe(b,v))return s.logger.log("MPEG Audio sync word found !"),!0;return!1},p.canParse=function(b,g){return w.canParse(b,g)},p.appendFrame=function(b,g,v){return this.initPTS===null?void 0:w.appendFrame(b,g,v,this.initPTS,this.frameIndex)},u}(R.default);a.minProbeByteLength=4,c.default=a},"./src/demux/mp4demuxer.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/utils/mp4-tools.ts"),f=S("./src/demux/dummy-demuxed-track.ts"),s=function(){function w(i,a){this.remainderData=null,this.config=void 0,this.config=a}var l=w.prototype;return l.resetTimeStamp=function(){},l.resetInitSegment=function(){},l.resetContiguity=function(){},w.probe=function(a){return Object(R.findBox)({data:a,start:0,end:Math.min(a.length,16384)},["moof"]).length>0},l.demux=function(a){var r=a,u=Object(f.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(R.appendUint8Array)(this.remainderData,a));var p=Object(R.segmentValidRange)(r);this.remainderData=p.remainder,u.samples=p.valid||new Uint8Array}else u.samples=r;return{audioTrack:Object(f.dummyTrack)(),avcTrack:u,id3Track:Object(f.dummyTrack)(),textTrack:Object(f.dummyTrack)()}},l.flush=function(){var a=Object(f.dummyTrack)();return a.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(f.dummyTrack)(),avcTrack:a,id3Track:Object(f.dummyTrack)(),textTrack:Object(f.dummyTrack)()}},l.demuxSampleAes=function(a,r,u){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},l.destroy=function(){},w}();s.minProbeByteLength=1024,c.default=s},"./src/demux/mpegaudio.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"appendFrame",function(){return i}),S.d(c,"parseHeader",function(){return a}),S.d(c,"isHeaderPattern",function(){return r}),S.d(c,"isHeader",function(){return u}),S.d(c,"canParse",function(){return p}),S.d(c,"probe",function(){return m});var R=null,f=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],s=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],w=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],l=[0,1,1,4];function i(b,g,v,n,d){if(v+24>g.length)return;var h=a(g,v);if(h&&v+h.frameLength<=g.length){var C=h.samplesPerFrame*9e4/h.sampleRate,T=n+d*C,o={unit:g.subarray(v,v+h.frameLength),pts:T,dts:T};return b.config=[],b.channelCount=h.channelCount,b.samplerate=h.sampleRate,b.samples.push(o),{sample:o,length:h.frameLength,missing:0}}}function a(b,g){var v=b[g+1]>>3&3,n=b[g+1]>>1&3,d=b[g+2]>>4&15,h=b[g+2]>>2&3;if(v!==1&&d!==0&&d!==15&&h!==3){var C=b[g+2]>>1&1,T=b[g+3]>>6,o=v===3?3-n:n===3?3:4,P=f[o*14+d-1]*1e3,O=v===3?0:v===2?1:2,y=s[O*3+h],x=T===3?1:2,E=w[v][n],_=l[n],N=E*8*_,j=Math.floor(E*P/y+C)*_;if(R===null){var M=navigator.userAgent||"",H=M.match(/Chrome\/(\d+)/i);R=H?parseInt(H[1]):0}var z=!!R&&R<=87;return z&&n===2&&P>=224e3&&T===0&&(b[g+3]=b[g+3]|128),{sampleRate:y,channelCount:x,frameLength:j,samplesPerFrame:N}}}function r(b,g){return b[g]===255&&(b[g+1]&224)===224&&(b[g+1]&6)!==0}function u(b,g){return g+1<b.length&&r(b,g)}function p(b,g){var v=4;return r(b,g)&&v<=b.length-g}function m(b,g){if(g+1<b.length&&r(b,g)){var v=4,n=a(b,g),d=v;n!=null&&n.frameLength&&(d=n.frameLength);var h=g+d;return h===b.length||u(b,h)}return!1}},"./src/demux/sample-aes.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/crypt/decrypter.ts"),f=S("./src/demux/tsdemuxer.ts"),s=function(){function w(i,a,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new R.default(i,a,{removePKCS7Padding:!1})}var l=w.prototype;return l.decryptBuffer=function(a,r){this.decrypter.decrypt(a,this.keyData.key.buffer,this.keyData.iv.buffer,r)},l.decryptAacSample=function(a,r,u,p){var m=a[r].unit,b=m.subarray(16,m.length-m.length%16),g=b.buffer.slice(b.byteOffset,b.byteOffset+b.length),v=this;this.decryptBuffer(g,function(n){var d=new Uint8Array(n);m.set(d,16),p||v.decryptAacSamples(a,r+1,u)})},l.decryptAacSamples=function(a,r,u){for(;;r++){if(r>=a.length){u();return}if(a[r].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(a,r,u,p),!p)return}},l.getAvcEncryptedData=function(a){for(var r=Math.floor((a.length-48)/160)*16+16,u=new Int8Array(r),p=0,m=32;m<=a.length-16;m+=160,p+=16)u.set(a.subarray(m,m+16),p);return u},l.getAvcDecryptedUnit=function(a,r){for(var u=new Uint8Array(r),p=0,m=32;m<=a.length-16;m+=160,p+=16)a.set(u.subarray(p,p+16),m);return a},l.decryptAvcSample=function(a,r,u,p,m,b){var g=Object(f.discardEPB)(m.data),v=this.getAvcEncryptedData(g),n=this;this.decryptBuffer(v.buffer,function(d){m.data=n.getAvcDecryptedUnit(g,d),b||n.decryptAvcSamples(a,r,u+1,p)})},l.decryptAvcSamples=function(a,r,u,p){if(a instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,u=0){if(r>=a.length){p();return}for(var m=a[r].units;!(u>=m.length);u++){var b=m[u];if(b.data.length<=48||b.type!==1&&b.type!==5)continue;var g=this.decrypter.isSync();if(this.decryptAvcSample(a,r,u,p,b,g),!g)return}}},w}();c.default=s},"./src/demux/transmuxer-interface.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return m});var R=S("./node_modules/webworkify-webpack/index.js"),f=S.n(R),s=S("./src/events.ts"),w=S("./src/demux/transmuxer.ts"),l=S("./src/utils/logger.ts"),i=S("./src/errors.ts"),a=S("./src/utils/mediasource-helper.ts"),r=S("./node_modules/eventemitter3/index.js"),u=S.n(r),p=Object(a.getMediaSource)()||{isTypeSupported:function(){return!1}},m=function(){function b(v,n,d,h){var C=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=v,this.id=n,this.onTransmuxComplete=d,this.onFlush=h;var T=v.config,o=function(E,_){_=_||{},_.frag=C.frag,_.id=C.id,v.trigger(E,_)};this.observer=new r.EventEmitter,this.observer.on(s.Events.FRAG_DECRYPTED,o),this.observer.on(s.Events.ERROR,o);var P={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(T.enableWorker&&typeof Worker!="undefined"){l.logger.log("demuxing in webworker");var y;try{y=this.worker=R("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),y.addEventListener("message",this.onwmsg),y.onerror=function(x){v.trigger(s.Events.ERROR,{type:i.ErrorTypes.OTHER_ERROR,details:i.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},y.postMessage({cmd:"init",typeSupported:P,vendor:O,id:n,config:JSON.stringify(T)})}catch(x){l.logger.warn("Error in worker:",x),l.logger.error("Error while initializing DemuxerWorker, fallback to inline"),y&&self.URL.revokeObjectURL(y.objectURL),this.transmuxer=new w.default(this.observer,P,T,O,n),this.worker=null}}else this.transmuxer=new w.default(this.observer,P,T,O,n)}var g=b.prototype;return g.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var d=this.transmuxer;d&&(d.destroy(),this.transmuxer=null)}var h=this.observer;h&&h.removeAllListeners(),this.observer=null},g.push=function(n,d,h,C,T,o,P,O,y,x){var E=this;y.transmuxing.start=self.performance.now();var _=this.transmuxer,N=this.worker,j=o?o.start:T.start,M=T.decryptdata,H=this.frag,z=!(H&&T.cc===H.cc),F=!(H&&y.level===H.level),G=H?y.sn-H.sn:-1,B=this.part?y.part-this.part.index:1,K=!F&&(G===1||G===0&&B===1),W=self.performance.now();(F||G||T.stats.parsing.start===0)&&(T.stats.parsing.start=W),o&&(B||!K)&&(o.stats.parsing.start=W);var J=new w.TransmuxState(z,K,O,F,j);if(!K||z){l.logger.log("[transmuxer-interface, "+T.type+"]: Starting new transmux session for sn: "+y.sn+" p: "+y.part+" level: "+y.level+" id: "+y.id+`
discontinuity: `+z+`
trackSwitch: `+F+`
contiguous: `+K+`
accurateTimeOffset: `+O+`
timeOffset: `+j);var ee=new w.TransmuxConfig(h,C,d,P,x);this.configureTransmuxer(ee)}if(this.frag=T,this.part=o,N)N.postMessage({cmd:"demux",data:n,decryptdata:M,chunkMeta:y,state:J},n instanceof ArrayBuffer?[n]:[]);else if(_){var Z=_.push(n,M,y,J);Object(w.isPromise)(Z)?Z.then(function(he){E.handleTransmuxComplete(he)}):this.handleTransmuxComplete(Z)}},g.flush=function(n){var d=this;n.transmuxing.start=self.performance.now();var h=this.transmuxer,C=this.worker;if(C)C.postMessage({cmd:"flush",chunkMeta:n});else if(h){var T=h.flush(n);Object(w.isPromise)(T)?T.then(function(o){d.handleFlushResult(o,n)}):this.handleFlushResult(T,n)}},g.handleFlushResult=function(n,d){var h=this;n.forEach(function(C){h.handleTransmuxComplete(C)}),this.onFlush(d)},g.onWorkerMessage=function(n){var d=n.data,h=this.hls;switch(d.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(d.data);break}case"flush":{this.onFlush(d.data);break}default:{d.data=d.data||{},d.data.frag=this.frag,d.data.id=this.id,h.trigger(d.event,d.data);break}}},g.configureTransmuxer=function(n){var d=this.worker,h=this.transmuxer;d?d.postMessage({cmd:"configure",config:n}):h&&h.configure(n)},g.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},b}()},"./src/demux/transmuxer-worker.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return i});var R=S("./src/demux/transmuxer.ts"),f=S("./src/events.ts"),s=S("./src/utils/logger.ts"),w=S("./node_modules/eventemitter3/index.js"),l=S.n(w);function i(m){var b=new w.EventEmitter,g=function(n,d){m.postMessage({event:n,data:d})};b.on(f.Events.FRAG_DECRYPTED,g),b.on(f.Events.ERROR,g),m.addEventListener("message",function(v){var n=v.data;switch(n.cmd){case"init":{var d=JSON.parse(n.config);m.transmuxer=new R.default(b,n.typeSupported,d,n.vendor,n.id),Object(s.enableLogs)(d.debug),g("init",null);break}case"configure":{m.transmuxer.configure(n.config);break}case"demux":{var h=m.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(R.isPromise)(h)?h.then(function(o){a(m,o)}):a(m,h);break}case"flush":{var C=n.chunkMeta,T=m.transmuxer.flush(C);Object(R.isPromise)(T)?T.then(function(o){u(m,o,C)}):u(m,T,C);break}default:break}})}function a(m,b){if(p(b.remuxResult))return;var g=[],v=b.remuxResult,n=v.audio,d=v.video;n&&r(g,n),d&&r(g,d),m.postMessage({event:"transmuxComplete",data:b},g)}function r(m,b){b.data1&&m.push(b.data1.buffer),b.data2&&m.push(b.data2.buffer)}function u(m,b,g){b.forEach(function(v){a(m,v)}),m.postMessage({event:"flush",data:g})}function p(m){return!m.audio&&!m.video&&!m.text&&!m.id3&&!m.initSegment}},"./src/demux/transmuxer.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return d}),S.d(c,"isPromise",function(){return T}),S.d(c,"TransmuxConfig",function(){return o}),S.d(c,"TransmuxState",function(){return P});var R=S("./src/events.ts"),f=S("./src/errors.ts"),s=S("./src/crypt/decrypter.ts"),w=S("./src/demux/aacdemuxer.ts"),l=S("./src/demux/mp4demuxer.ts"),i=S("./src/demux/tsdemuxer.ts"),a=S("./src/demux/mp3demuxer.ts"),r=S("./src/remux/mp4-remuxer.ts"),u=S("./src/remux/passthrough-remuxer.ts"),p=S("./src/demux/chunk-cache.ts"),m=S("./src/utils/mp4-tools.ts"),b=S("./src/utils/logger.ts"),g;try{g=self.performance.now.bind(self.performance)}catch(O){b.logger.debug("Unable to use Performance API on this environment"),g=self.Date.now}var v=[{demux:i.default,remux:r.default},{demux:l.default,remux:u.default},{demux:w.default,remux:r.default},{demux:a.default,remux:r.default}],n=1024;v.forEach(function(O){var y=O.demux;n=Math.max(n,y.minProbeByteLength)});var d=function(){function O(x,E,_,N,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=x,this.typeSupported=E,this.config=_,this.vendor=N,this.id=j}var y=O.prototype;return y.configure=function(E){this.transmuxConfig=E,this.decrypter&&this.decrypter.reset()},y.push=function(E,_,N,j){var M=this,H=N.transmuxing;H.executeStart=g();var z=new Uint8Array(E),F=this.cache,G=this.config,B=this.currentTransmuxState,K=this.transmuxConfig;j&&(this.currentTransmuxState=j);var W=h(z,_);if(W&&W.method==="AES-128"){var J=this.getDecrypter();if(G.enableSoftwareAES){var ee=J.softwareDecrypt(z,W.key.buffer,W.iv.buffer);if(!ee)return H.executeEnd=g(),C(N);z=new Uint8Array(ee)}else return this.decryptionPromise=J.webCryptoDecrypt(z,W.key.buffer,W.iv.buffer).then(function(Q){var X=M.push(Q,null,N);return M.decryptionPromise=null,X}),this.decryptionPromise}var Z=j||B,he=Z.contiguous,ge=Z.discontinuity,ie=Z.trackSwitch,we=Z.accurateTimeOffset,me=Z.timeOffset,oe=K.audioCodec,se=K.videoCodec,te=K.defaultInitPts,be=K.duration,q=K.initSegmentData;if((ge||ie)&&this.resetInitSegment(q,oe,se,be),ge&&this.resetInitialTimestamp(te),he||this.resetContiguity(),this.needsProbing(z,ge,ie)){if(F.dataLength){var ae=F.flush();z=Object(m.appendUint8Array)(ae,z)}this.configureTransmuxer(z,K)}var xe=this.transmux(z,W,me,we,N),ne=this.currentTransmuxState;return ne.contiguous=!0,ne.discontinuity=!1,ne.trackSwitch=!1,H.executeEnd=g(),xe},y.flush=function(E){var _=this,N=E.transmuxing;N.executeStart=g();var j=this.decrypter,M=this.cache,H=this.currentTransmuxState,z=this.decryptionPromise;if(z)return z.then(function(){return _.flush(E)});var F=[],G=H.timeOffset;if(j){var B=j.flush();B&&F.push(this.push(B,null,E))}var K=M.dataLength;M.reset();var W=this.demuxer,J=this.remuxer;if(!W||!J)return K>=n&&this.observer.emit(R.Events.ERROR,R.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),N.executeEnd=g(),[C(E)];var ee=W.flush(G);return T(ee)?ee.then(function(Z){return _.flushRemux(F,Z,E),F}):(this.flushRemux(F,ee,E),F)},y.flushRemux=function(E,_,N){var j=_.audioTrack,M=_.avcTrack,H=_.id3Track,z=_.textTrack,F=this.currentTransmuxState,G=F.accurateTimeOffset,B=F.timeOffset;b.logger.log("[transmuxer.ts]: Flushed fragment "+N.sn+(N.part>-1?" p: "+N.part:"")+" of level "+N.level);var K=this.remuxer.remux(j,M,H,z,B,G,!0,this.id);E.push({remuxResult:K,chunkMeta:N}),N.transmuxing.executeEnd=g()},y.resetInitialTimestamp=function(E){var _=this.demuxer,N=this.remuxer;if(!_||!N)return;_.resetTimeStamp(E),N.resetTimeStamp(E)},y.resetContiguity=function(){var E=this.demuxer,_=this.remuxer;if(!E||!_)return;E.resetContiguity(),_.resetNextTimestamp()},y.resetInitSegment=function(E,_,N,j){var M=this.demuxer,H=this.remuxer;if(!M||!H)return;M.resetInitSegment(_,N,j),H.resetInitSegment(E,_,N)},y.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},y.transmux=function(E,_,N,j,M){var H;return _&&_.method==="SAMPLE-AES"?H=this.transmuxSampleAes(E,_,N,j,M):H=this.transmuxUnencrypted(E,N,j,M),H},y.transmuxUnencrypted=function(E,_,N,j){var M=this.demuxer.demux(E,_,!1,!this.config.progressive),H=M.audioTrack,z=M.avcTrack,F=M.id3Track,G=M.textTrack,B=this.remuxer.remux(H,z,F,G,_,N,!1,this.id);return{remuxResult:B,chunkMeta:j}},y.transmuxSampleAes=function(E,_,N,j,M){var H=this;return this.demuxer.demuxSampleAes(E,_,N).then(function(z){var F=H.remuxer.remux(z.audioTrack,z.avcTrack,z.id3Track,z.textTrack,N,j,!1,H.id);return{remuxResult:F,chunkMeta:M}})},y.configureTransmuxer=function(E,_){for(var N=this.config,j=this.observer,M=this.typeSupported,H=this.vendor,z=_.audioCodec,F=_.defaultInitPts,G=_.duration,B=_.initSegmentData,K=_.videoCodec,W,J=0,ee=v.length;J<ee;J++)if(v[J].demux.probe(E)){W=v[J];break}W||(b.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),W={demux:l.default,remux:u.default});var Z=this.demuxer,he=this.remuxer,ge=W.remux,ie=W.demux;(!he||!(he instanceof ge))&&(this.remuxer=new ge(j,N,M,H)),(!Z||!(Z instanceof ie))&&(this.demuxer=new ie(j,N,M),this.probe=ie.probe),this.resetInitSegment(B,z,K,G),this.resetInitialTimestamp(F)},y.needsProbing=function(E,_,N){return!this.demuxer||!this.remuxer||_||N},y.getDecrypter=function(){var E=this.decrypter;return E||(E=this.decrypter=new s.default(this.observer,this.config)),E},O}();function h(O,y){var x=null;return O.byteLength>0&&y!=null&&y.key!=null&&y.iv!==null&&y.method!=null&&(x=y),x}var C=function(y){return{remuxResult:{},chunkMeta:y}};function T(O){return"then"in O&&O.then instanceof Function}var o=function(y,x,E,_,N){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=y,this.videoCodec=x,this.initSegmentData=E,this.duration=_,this.defaultInitPts=N},P=function(y,x,E,_,N){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=y,this.contiguous=x,this.accurateTimeOffset=E,this.trackSwitch=_,this.timeOffset=N}},"./src/demux/tsdemuxer.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"discardEPB",function(){return C});var R=S("./src/demux/adts.ts"),f=S("./src/demux/mpegaudio.ts"),s=S("./src/demux/exp-golomb.ts"),w=S("./src/demux/id3.ts"),l=S("./src/demux/sample-aes.ts"),i=S("./src/events.ts"),a=S("./src/utils/mp4-tools.ts"),r=S("./src/utils/logger.ts"),u=S("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},m=function(){function T(P,O,y){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=P,this.config=O,this.typeSupported=y}T.probe=function(O){var y=T.syncOffset(O);return y<0?!1:(y&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+y+", junk ahead ?"),!0)},T.syncOffset=function(O){for(var y=Math.min(1e3,O.length-3*188),x=0;x<y;){if(O[x]===71&&O[x+188]===71&&O[x+2*188]===71)return x;x++}return-1},T.createTrack=function(O,y){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:p[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?y:void 0}};var o=T.prototype;return o.resetInitSegment=function(O,y,x){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=T.createTrack("video",x),this._audioTrack=T.createTrack("audio",x),this._id3Track=T.createTrack("id3",x),this._txtTrack=T.createTrack("text",x),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=y,this._duration=x},o.resetTimeStamp=function(){},o.resetContiguity=function(){var O=this._audioTrack,y=this._avcTrack,x=this._id3Track;O&&(O.pesData=null),y&&(y.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},o.demux=function(O,y,x,E){x===void 0&&(x=!1),E===void 0&&(E=!1),x||(this.sampleAes=null);var _,N=this._avcTrack,j=this._audioTrack,M=this._id3Track,H=N.pid,z=N.pesData,F=j.pid,G=M.pid,B=j.pesData,K=M.pesData,W=!1,J=this.pmtParsed,ee=this._pmtId,Z=O.length;if(this.remainderData&&(O=Object(a.appendUint8Array)(this.remainderData,O),Z=O.length,this.remainderData=null),Z<188&&!E)return this.remainderData=O,{audioTrack:j,avcTrack:N,id3Track:M,textTrack:this._txtTrack};var he=Math.max(0,T.syncOffset(O));Z-=(Z+he)%188,Z<O.byteLength&&!E&&(this.remainderData=new Uint8Array(O.buffer,Z,O.buffer.byteLength-Z));for(var ge=he;ge<Z;ge+=188)if(O[ge]===71){var ie=!!(O[ge+1]&64),we=((O[ge+1]&31)<<8)+O[ge+2],me=(O[ge+3]&48)>>4,oe=void 0;if(me>1){if(oe=ge+5+O[ge+4],oe===ge+188)continue}else oe=ge+4;switch(we){case H:ie&&(z&&(_=n(z))&&this.parseAVCPES(_,!1),z={data:[],size:0}),z&&(z.data.push(O.subarray(oe,ge+188)),z.size+=ge+188-oe);break;case F:ie&&(B&&(_=n(B))&&(j.isAAC?this.parseAACPES(_):this.parseMPEGPES(_)),B={data:[],size:0}),B&&(B.data.push(O.subarray(oe,ge+188)),B.size+=ge+188-oe);break;case G:ie&&(K&&(_=n(K))&&this.parseID3PES(_),K={data:[],size:0}),K&&(K.data.push(O.subarray(oe,ge+188)),K.size+=ge+188-oe);break;case 0:ie&&(oe+=O[oe]+1),ee=this._pmtId=g(O,oe);break;case ee:{ie&&(oe+=O[oe]+1);var se=v(O,oe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);H=se.avc,H>0&&(N.pid=H),F=se.audio,F>0&&(j.pid=F,j.isAAC=se.isAAC),G=se.id3,G>0&&(M.pid=G),W&&!J&&(r.logger.log("reparse from beginning"),W=!1,ge=he-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:W=!0;break}}else this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});N.pesData=z,j.pesData=B,M.pesData=K;var te={audioTrack:j,avcTrack:N,id3Track:M,textTrack:this._txtTrack};return E&&this.extractRemainingSamples(te),te},o.flush=function(){var O=this.remainderData;this.remainderData=null;var y;return O?y=this.demux(O,-1,!1,!0):y={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(y),this.sampleAes?this.decrypt(y,this.sampleAes):y},o.extractRemainingSamples=function(O){var y=O.audioTrack,x=O.avcTrack,E=O.id3Track,_=x.pesData,N=y.pesData,j=E.pesData,M;_&&(M=n(_))?(this.parseAVCPES(M,!0),x.pesData=null):x.pesData=_,N&&(M=n(N))?(y.isAAC?this.parseAACPES(M):this.parseMPEGPES(M),y.pesData=null):(N!=null&&N.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=N),j&&(M=n(j))?(this.parseID3PES(M),E.pesData=null):E.pesData=j},o.demuxSampleAes=function(O,y,x){var E=this.demux(O,x,!0,!this.config.progressive),_=this.sampleAes=new l.default(this.observer,this.config,y);return this.decrypt(E,_)},o.decrypt=function(O,y){return new Promise(function(x){var E=O.audioTrack,_=O.avcTrack;E.samples&&E.isAAC?y.decryptAacSamples(E.samples,0,function(){_.samples?y.decryptAvcSamples(_.samples,0,0,function(){x(O)}):x(O)}):_.samples&&y.decryptAvcSamples(_.samples,0,0,function(){x(O)})})},o.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},o.parseAVCPES=function(O,y){var x=this,E=this._avcTrack,_=this.parseAVCNALu(O.data),N=!1,j=this.avcSample,M,H=!1;O.data=null,j&&_.length&&!E.audFound&&(d(j,E),j=this.avcSample=b(!1,O.pts,O.dts,"")),_.forEach(function(z){switch(z.type){case 1:{M=!0,j||(j=x.avcSample=b(!0,O.pts,O.dts,"")),N&&(j.debug+="NDR "),j.frame=!0;var F=z.data;if(H&&F.length>4){var G=new s.default(F).readSliceType();(G===2||G===4||G===7||G===9)&&(j.key=!0)}break}case 5:M=!0,j||(j=x.avcSample=b(!0,O.pts,O.dts,"")),N&&(j.debug+="IDR "),j.key=!0,j.frame=!0;break;case 6:{M=!0,N&&j&&(j.debug+="SEI ");var B=new s.default(C(z.data));B.readUByte();for(var K=0,W=0,J=!1,ee=0;!J&&B.bytesAvailable>1;){K=0;do ee=B.readUByte(),K+=ee;while(ee===255);W=0;do ee=B.readUByte(),W+=ee;while(ee===255);if(K===4&&B.bytesAvailable!==0){J=!0;var Z=B.readUByte();if(Z===181){var he=B.readUShort();if(he===49){var ge=B.readUInt();if(ge===1195456820){var ie=B.readUByte();if(ie===3){for(var we=B.readUByte(),me=B.readUByte(),oe=31&we,se=[we,me],te=0;te<oe;te++)se.push(B.readUByte()),se.push(B.readUByte()),se.push(B.readUByte());h(x._txtTrack.samples,{type:3,pts:O.pts,bytes:se})}}}}}else if(K===5&&B.bytesAvailable!==0){if(J=!0,W>16){for(var be=[],q=0;q<16;q++)be.push(B.readUByte().toString(16)),(q===3||q===5||q===7||q===9)&&be.push("-");for(var ae=W-16,xe=new Uint8Array(ae),ne=0;ne<ae;ne++)xe[ne]=B.readUByte();h(x._txtTrack.samples,{pts:O.pts,payloadType:K,uuid:be.join(""),userData:Object(w.utf8ArrayToStr)(xe),userDataBytes:xe})}}else if(W<B.bytesAvailable)for(var Q=0;Q<W;Q++)B.readUByte()}break}case 7:if(M=!0,H=!0,N&&j&&(j.debug+="SPS "),!E.sps){var X=new s.default(z.data),$=X.readSPS();E.width=$.width,E.height=$.height,E.pixelRatio=$.pixelRatio,E.sps=[z.data],E.duration=x._duration;for(var pe=z.data.subarray(1,4),de="avc1.",Ce=0;Ce<3;Ce++){var ze=pe[Ce].toString(16);ze.length<2&&(ze="0"+ze),de+=ze}E.codec=de}break;case 8:M=!0,N&&j&&(j.debug+="PPS "),E.pps||(E.pps=[z.data]);break;case 9:M=!1,E.audFound=!0,j&&d(j,E),j=x.avcSample=b(!1,O.pts,O.dts,N?"AUD ":"");break;case 12:M=!1;break;default:M=!1,j&&(j.debug+="unknown NAL "+z.type+" ");break}if(j&&M){var qe=j.units;qe.push(z)}}),y&&j&&(d(j,E),this.avcSample=null)},o.getLastNalUnit=function(){var O,y=this.avcSample,x;if(!y||y.units.length===0){var E=this._avcTrack.samples;y=E[E.length-1]}if((O=y)!==null&&O!==void 0&&O.units){var _=y.units;x=_[_.length-1]}return x},o.parseAVCNALu=function(O){var y=O.byteLength,x=this._avcTrack,E=x.naluState||0,_=E,N=[],j=0,M,H,z,F=-1,G=0;for(E===-1&&(F=0,G=O[0]&31,E=0,j=1);j<y;){if(M=O[j++],!E){E=M?0:1;continue}if(E===1){E=M?0:2;continue}if(!M)E=3;else if(M===1){if(F>=0){var B={data:O.subarray(F,j-E-1),type:G};N.push(B)}else{var K=this.getLastNalUnit();if(K&&(_&&j<=4-_&&(K.state&&(K.data=K.data.subarray(0,K.data.byteLength-_))),H=j-E-1,H>0)){var W=new Uint8Array(K.data.byteLength+H);W.set(K.data,0),W.set(O.subarray(0,H),K.data.byteLength),K.data=W,K.state=0}}j<y?(z=O[j]&31,F=j,G=z,E=0):E=-1}else E=0}if(F>=0&&E>=0){var J={data:O.subarray(F,y),type:G,state:E};N.push(J)}if(N.length===0){var ee=this.getLastNalUnit();if(ee){var Z=new Uint8Array(ee.data.byteLength+O.byteLength);Z.set(ee.data,0),Z.set(O,ee.data.byteLength),ee.data=Z}}return x.naluState=E,N},o.parseAACPES=function(O){var y=0,x=this._audioTrack,E=this.aacOverFlow,_=O.data;if(E){this.aacOverFlow=null;var N=E.sample.unit.byteLength,j=Math.min(E.missing,N),M=N-j;E.sample.unit.set(_.subarray(0,j),M),x.samples.push(E.sample),y=E.missing}var H,z;for(H=y,z=_.length;H<z-1&&!R.isHeader(_,H);H++);if(H!==y){var F,G;if(H<z-1?(F="AAC PES did not start with ADTS header,offset:"+H,G=!1):(F="no ADTS header found in AAC PES",G=!0),r.logger.warn("parsing error:"+F),this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:G,reason:F}),G)return}R.initTrackConfig(x,this.observer,_,H,this.audioCodec);var B;if(O.pts!==void 0)B=O.pts;else if(E){var K=R.getFrameDuration(x.samplerate);B=E.sample.pts+K}else{r.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var W=0;H<z;)if(R.isHeader(_,H)){if(H+5<z){var J=R.appendFrame(x,_,H,B,W);if(J)if(J.missing)this.aacOverFlow=J;else{H+=J.length,W++;continue}}break}else H++},o.parseMPEGPES=function(O){var y=O.data,x=y.length,E=0,_=0,N=O.pts;if(N===void 0){r.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;_<x;)if(f.isHeader(y,_)){var j=f.appendFrame(this._audioTrack,y,_,N,E);if(j)_+=j.length,E++;else break}else _++},o.parseID3PES=function(O){if(O.pts===void 0){r.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},T}();m.minProbeByteLength=188;function b(T,o,P,O){return{key:T,frame:!1,pts:o,dts:P,units:[],debug:O,length:0}}function g(T,o){return(T[o+10]&31)<<8|T[o+11]}function v(T,o,P,O){var y={audio:-1,avc:-1,id3:-1,isAAC:!0},x=(T[o+1]&15)<<8|T[o+2],E=o+3+x-4,_=(T[o+10]&15)<<8|T[o+11];for(o+=12+_;o<E;){var N=(T[o+1]&31)<<8|T[o+2];switch(T[o]){case 207:if(!O){r.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:y.audio===-1&&(y.audio=N);break;case 21:y.id3===-1&&(y.id3=N);break;case 219:if(!O){r.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:y.avc===-1&&(y.avc=N);break;case 3:case 4:P?y.audio===-1&&(y.audio=N,y.isAAC=!1):r.logger.log("MPEG audio found, not supported in this browser");break;case 36:r.logger.warn("Unsupported HEVC stream type found");break;default:break}o+=((T[o+3]&15)<<8|T[o+4])+5}return y}function n(T){var o=0,P,O,y,x,E,_=T.data;if(!T||T.size===0)return null;for(;_[0].length<19&&_.length>1;){var N=new Uint8Array(_[0].length+_[1].length);N.set(_[0]),N.set(_[1],_[0].length),_[0]=N,_.splice(1,1)}P=_[0];var j=(P[0]<<16)+(P[1]<<8)+P[2];if(j===1){if(O=(P[4]<<8)+P[5],O&&O>T.size-6)return null;var M=P[7];M&192&&(x=(P[9]&14)*536870912+(P[10]&255)*4194304+(P[11]&254)*16384+(P[12]&255)*128+(P[13]&254)/2,M&64?(E=(P[14]&14)*536870912+(P[15]&255)*4194304+(P[16]&254)*16384+(P[17]&255)*128+(P[18]&254)/2,x-E>60*9e4&&(r.logger.warn(Math.round((x-E)/9e4)+"s delta between PTS and DTS, align them"),x=E)):E=x),y=P[8];var H=y+9;if(T.size<=H)return null;T.size-=H;for(var z=new Uint8Array(T.size),F=0,G=_.length;F<G;F++){P=_[F];var B=P.byteLength;if(H)if(H>B){H-=B;continue}else P=P.subarray(H),B-=H,H=0;z.set(P,o),o+=B}return O&&(O-=y+3),{data:z,pts:x,dts:E,len:O}}return null}function d(T,o){if(T.units.length&&T.frame){if(T.pts===void 0){var P=o.samples,O=P.length;if(O){var y=P[O-1];T.pts=y.pts,T.dts=y.dts}else{o.dropped++;return}}o.samples.push(T)}T.debug.length&&r.logger.log(T.pts+"/"+T.dts+":"+T.debug)}function h(T,o){var P=T.length;if(P>0){if(o.pts>=T[P-1].pts)T.push(o);else for(var O=P-1;O>=0;O--)if(o.pts<T[O].pts){T.splice(O,0,o);break}}else T.push(o)}function C(T){for(var o=T.byteLength,P=[],O=1;O<o-2;)T[O]===0&&T[O+1]===0&&T[O+2]===3?(P.push(O+2),O+=2):O++;if(P.length===0)return T;var y=o-P.length,x=new Uint8Array(y),E=0;for(O=0;O<y;E++,O++)E===P[0]&&(E++,P.shift()),x[O]=T[E];return x}c.default=m},"./src/errors.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"ErrorTypes",function(){return R}),S.d(c,"ErrorDetails",function(){return f});var R;(function(s){s.NETWORK_ERROR="networkError",s.MEDIA_ERROR="mediaError",s.KEY_SYSTEM_ERROR="keySystemError",s.MUX_ERROR="muxError",s.OTHER_ERROR="otherError"})(R||(R={}));var f;(function(s){s.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",s.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",s.KEY_SYSTEM_NO_SESSION="keySystemNoSession",s.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",s.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",s.MANIFEST_LOAD_ERROR="manifestLoadError",s.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",s.MANIFEST_PARSING_ERROR="manifestParsingError",s.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",s.LEVEL_EMPTY_ERROR="levelEmptyError",s.LEVEL_LOAD_ERROR="levelLoadError",s.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",s.LEVEL_SWITCH_ERROR="levelSwitchError",s.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",s.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",s.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",s.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",s.FRAG_LOAD_ERROR="fragLoadError",s.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",s.FRAG_DECRYPT_ERROR="fragDecryptError",s.FRAG_PARSING_ERROR="fragParsingError",s.REMUX_ALLOC_ERROR="remuxAllocError",s.KEY_LOAD_ERROR="keyLoadError",s.KEY_LOAD_TIMEOUT="keyLoadTimeOut",s.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",s.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",s.BUFFER_APPEND_ERROR="bufferAppendError",s.BUFFER_APPENDING_ERROR="bufferAppendingError",s.BUFFER_STALLED_ERROR="bufferStalledError",s.BUFFER_FULL_ERROR="bufferFullError",s.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",s.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",s.INTERNAL_EXCEPTION="internalException",s.INTERNAL_ABORTED="aborted",s.UNKNOWN="unknown"})(f||(f={}))},"./src/events.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"Events",function(){return R});var R;(function(f){f.MEDIA_ATTACHING="hlsMediaAttaching",f.MEDIA_ATTACHED="hlsMediaAttached",f.MEDIA_DETACHING="hlsMediaDetaching",f.MEDIA_DETACHED="hlsMediaDetached",f.BUFFER_RESET="hlsBufferReset",f.BUFFER_CODECS="hlsBufferCodecs",f.BUFFER_CREATED="hlsBufferCreated",f.BUFFER_APPENDING="hlsBufferAppending",f.BUFFER_APPENDED="hlsBufferAppended",f.BUFFER_EOS="hlsBufferEos",f.BUFFER_FLUSHING="hlsBufferFlushing",f.BUFFER_FLUSHED="hlsBufferFlushed",f.MANIFEST_LOADING="hlsManifestLoading",f.MANIFEST_LOADED="hlsManifestLoaded",f.MANIFEST_PARSED="hlsManifestParsed",f.LEVEL_SWITCHING="hlsLevelSwitching",f.LEVEL_SWITCHED="hlsLevelSwitched",f.LEVEL_LOADING="hlsLevelLoading",f.LEVEL_LOADED="hlsLevelLoaded",f.LEVEL_UPDATED="hlsLevelUpdated",f.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",f.LEVELS_UPDATED="hlsLevelsUpdated",f.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",f.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",f.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",f.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",f.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",f.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",f.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",f.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",f.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",f.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",f.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",f.CUES_PARSED="hlsCuesParsed",f.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",f.INIT_PTS_FOUND="hlsInitPtsFound",f.FRAG_LOADING="hlsFragLoading",f.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",f.FRAG_LOADED="hlsFragLoaded",f.FRAG_DECRYPTED="hlsFragDecrypted",f.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",f.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",f.FRAG_PARSING_METADATA="hlsFragParsingMetadata",f.FRAG_PARSED="hlsFragParsed",f.FRAG_BUFFERED="hlsFragBuffered",f.FRAG_CHANGED="hlsFragChanged",f.FPS_DROP="hlsFpsDrop",f.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",f.ERROR="hlsError",f.DESTROYING="hlsDestroying",f.KEY_LOADING="hlsKeyLoading",f.KEY_LOADED="hlsKeyLoaded",f.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",f.BACK_BUFFER_REACHED="hlsBackBufferReached"})(R||(R={}))},"./src/hls.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return T});var R=S("./node_modules/url-toolkit/src/url-toolkit.js"),f=S.n(R),s=S("./src/loader/playlist-loader.ts"),w=S("./src/loader/key-loader.ts"),l=S("./src/controller/id3-track-controller.ts"),i=S("./src/controller/latency-controller.ts"),a=S("./src/controller/level-controller.ts"),r=S("./src/controller/fragment-tracker.ts"),u=S("./src/controller/stream-controller.ts"),p=S("./src/is-supported.ts"),m=S("./src/utils/logger.ts"),b=S("./src/config.ts"),g=S("./node_modules/eventemitter3/index.js"),v=S.n(g),n=S("./src/events.ts"),d=S("./src/errors.ts");function h(o,P){for(var O=0;O<P.length;O++){var y=P[O];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(o,y.key,y)}}function C(o,P,O){return P&&h(o.prototype,P),O&&h(o,O),o}var T=function(){o.isSupported=function(){return Object(p.isSupported)()};function o(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new g.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var y=this.config=Object(b.mergeConfig)(o.DefaultConfig,O);this.userConfig=O,Object(m.enableLogs)(y.debug),this._autoLevelCapping=-1,y.progressive&&Object(b.enableStreamingMode)(y);var x=y.abrController,E=y.bufferController,_=y.capLevelController,N=y.fpsController,j=this.abrController=new x(this),M=this.bufferController=new E(this),H=this.capLevelController=new _(this),z=new N(this),F=new s.default(this),G=new w.default(this),B=new l.default(this),K=this.levelController=new a.default(this),W=new r.FragmentTracker(this),J=this.streamController=new u.default(this,W);H.setStreamController(J),z.setStreamController(J);var ee=[K,J];this.networkControllers=ee;var Z=[F,G,j,M,H,z,B,W];this.audioTrackController=this.createController(y.audioTrackController,null,ee),this.createController(y.audioStreamController,W,ee),this.subtitleTrackController=this.createController(y.subtitleTrackController,null,ee),this.createController(y.subtitleStreamController,W,ee),this.createController(y.timelineController,null,Z),this.emeController=this.createController(y.emeController,null,Z),this.cmcdController=this.createController(y.cmcdController,null,Z),this.latencyController=this.createController(i.default,null,Z),this.coreComponents=Z}var P=o.prototype;return P.createController=function(y,x,E){if(y){var _=x?new y(this,x):new y(this);return E&&E.push(_),_}return null},P.on=function(y,x,E){E===void 0&&(E=this),this._emitter.on(y,x,E)},P.once=function(y,x,E){E===void 0&&(E=this),this._emitter.once(y,x,E)},P.removeAllListeners=function(y){this._emitter.removeAllListeners(y)},P.off=function(y,x,E,_){E===void 0&&(E=this),this._emitter.off(y,x,E,_)},P.listeners=function(y){return this._emitter.listeners(y)},P.emit=function(y,x,E){return this._emitter.emit(y,x,E)},P.trigger=function(y,x){if(this.config.debug)return this.emit(y,y,x);try{return this.emit(y,y,x)}catch(E){m.logger.error("An internal error happened while handling event "+y+'. Error message: "'+E.message+'". Here is a stacktrace:',E),this.trigger(n.Events.ERROR,{type:d.ErrorTypes.OTHER_ERROR,details:d.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:y,error:E})}return!1},P.listenerCount=function(y){return this._emitter.listenerCount(y)},P.destroy=function(){m.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(y){return y.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(y){return y.destroy()}),this.coreComponents.length=0},P.attachMedia=function(y){m.logger.log("attachMedia"),this._media=y,this.trigger(n.Events.MEDIA_ATTACHING,{media:y})},P.detachMedia=function(){m.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},P.loadSource=function(y){this.stopLoad();var x=this.media,E=this.url,_=this.url=R.buildAbsoluteURL(self.location.href,y,{alwaysNormalize:!0});m.logger.log("loadSource:"+_),x&&E&&E!==_&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(x)),this.trigger(n.Events.MANIFEST_LOADING,{url:y})},P.startLoad=function(y){y===void 0&&(y=-1),m.logger.log("startLoad("+y+")"),this.networkControllers.forEach(function(x){x.startLoad(y)})},P.stopLoad=function(){m.logger.log("stopLoad"),this.networkControllers.forEach(function(y){y.stopLoad()})},P.swapAudioCodec=function(){m.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},P.recoverMediaError=function(){m.logger.log("recoverMediaError");var y=this._media;this.detachMedia(),y&&this.attachMedia(y)},P.removeLevel=function(y,x){x===void 0&&(x=0),this.levelController.removeLevel(y,x)},C(o,[{key:"levels",get:function(){var y=this.levelController.levels;return y||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(y){m.logger.log("set currentLevel:"+y),this.loadLevel=y,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(y){m.logger.log("set nextLevel:"+y),this.levelController.manualLevel=y,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(y){m.logger.log("set loadLevel:"+y),this.levelController.manualLevel=y}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(y){this.levelController.nextLoadLevel=y}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(y){m.logger.log("set firstLevel:"+y),this.levelController.firstLevel=y}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(y){m.logger.log("set startLevel:"+y),y!==-1&&(y=Math.max(y,this.minAutoLevel)),this.levelController.startLevel=y}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(y){var x=!!y;x!==this.config.capLevelToPlayerSize&&(x?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=x)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(y){this._autoLevelCapping!==y&&(m.logger.log("set autoLevelCapping:"+y),this._autoLevelCapping=y)}},{key:"bandwidthEstimate",get:function(){var y=this.abrController.bwEstimator;return y?y.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var y=this.levels,x=this.config.minAutoBitrate;if(!y)return 0;for(var E=y.length,_=0;_<E;_++)if(y[_].maxBitrate>x)return _;return 0}},{key:"maxAutoLevel",get:function(){var y=this.levels,x=this.autoLevelCapping,E;return x===-1&&y&&y.length?E=y.length-1:E=x,E}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(y){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,y)}},{key:"audioTracks",get:function(){var y=this.audioTrackController;return y?y.audioTracks:[]}},{key:"audioTrack",get:function(){var y=this.audioTrackController;return y?y.audioTrack:-1},set:function(y){var x=this.audioTrackController;x&&(x.audioTrack=y)}},{key:"subtitleTracks",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTrack:-1},set:function(y){var x=this.subtitleTrackController;x&&(x.subtitleTrack=y)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var y=this.subtitleTrackController;return y?y.subtitleDisplay:!1},set:function(y){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=y)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(y){this.config.lowLatencyMode=y}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return n.Events}},{key:"ErrorTypes",get:function(){return d.ErrorTypes}},{key:"ErrorDetails",get:function(){return d.ErrorDetails}},{key:"DefaultConfig",get:function(){return o.defaultConfig?o.defaultConfig:b.hlsDefaultConfig},set:function(y){o.defaultConfig=y}}]),o}();T.defaultConfig=void 0},"./src/is-supported.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"isSupported",function(){return s}),S.d(c,"changeTypeSupported",function(){return w});var R=S("./src/utils/mediasource-helper.ts");function f(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var l=Object(R.getMediaSource)();if(!l)return!1;var i=f(),a=l&&typeof l.isTypeSupported=="function"&&l.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!i||i.prototype&&typeof i.prototype.appendBuffer=="function"&&typeof i.prototype.remove=="function";return!!a&&!!r}function w(){var l,i=f();return typeof(i==null||((l=i.prototype)===null||l===void 0)?void 0:l.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return m}),S.d(c,"LoadError",function(){return g});var R=S("./src/polyfills/number.ts"),f=S("./src/errors.ts");function s(v,n){v.prototype=Object.create(n.prototype),v.prototype.constructor=v,r(v,n)}function w(v){var n=typeof Map=="function"?new Map:void 0;return w=function(h){if(h===null||!a(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(h))return n.get(h);n.set(h,C)}function C(){return l(h,arguments,u(this).constructor)}return C.prototype=Object.create(h.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),r(C,h)},w(v)}function l(v,n,d){return i()?l=Reflect.construct:l=function(C,T,o){var P=[null];P.push.apply(P,T);var O=Function.bind.apply(C,P),y=new O;return o&&r(y,o.prototype),y},l.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(v){return!1}}function a(v){return Function.toString.call(v).indexOf("[native code]")!==-1}function r(v,n){return r=Object.setPrototypeOf||function(h,C){return h.__proto__=C,h},r(v,n)}function u(v){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)},u(v)}var p=Math.pow(2,17),m=function(){function v(d){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=d}var n=v.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(h,C){var T=this,o=h.url;if(!o)return Promise.reject(new g({type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,networkDetails:null},"Fragment does not have a "+(o?"part list":"url")));this.abort();var P=this.config,O=P.fLoader,y=P.loader;return new Promise(function(x,E){T.loader&&T.loader.destroy();var _=T.loader=h.loader=O?new O(P):new y(P),N=b(h),j={timeout:P.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:P.fragLoadingMaxRetryTimeout,highWaterMark:p};h.stats=_.stats,_.load(N,j,{onSuccess:function(H,z,F,G){T.resetLoader(h,_),x({frag:h,part:null,payload:H.data,networkDetails:G})},onError:function(H,z,F){T.resetLoader(h,_),E(new g({type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,response:H,networkDetails:F}))},onAbort:function(H,z,F){T.resetLoader(h,_),E(new g({type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,networkDetails:F}))},onTimeout:function(H,z,F){T.resetLoader(h,_),E(new g({type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,networkDetails:F}))},onProgress:function(H,z,F,G){C&&C({frag:h,part:null,payload:F,networkDetails:G})}})})},n.loadPart=function(h,C,T){var o=this;this.abort();var P=this.config,O=P.fLoader,y=P.loader;return new Promise(function(x,E){o.loader&&o.loader.destroy();var _=o.loader=h.loader=O?new O(P):new y(P),N=b(h,C),j={timeout:P.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:P.fragLoadingMaxRetryTimeout,highWaterMark:p};C.stats=_.stats,_.load(N,j,{onSuccess:function(H,z,F,G){o.resetLoader(h,_),o.updateStatsFromPart(h,C);var B={frag:h,part:C,payload:H.data,networkDetails:G};T(B),x(B)},onError:function(H,z,F){o.resetLoader(h,_),E(new g({type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,part:C,response:H,networkDetails:F}))},onAbort:function(H,z,F){h.stats.aborted=C.stats.aborted,o.resetLoader(h,_),E(new g({type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,part:C,networkDetails:F}))},onTimeout:function(H,z,F){o.resetLoader(h,_),E(new g({type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,part:C,networkDetails:F}))}})})},n.updateStatsFromPart=function(h,C){var T=h.stats,o=C.stats,P=o.total;if(T.loaded+=o.loaded,P){var O=Math.round(h.duration/C.duration),y=Math.min(Math.round(T.loaded/P),O),x=O-y,E=x*Math.round(T.loaded/y);T.total=T.loaded+E}else T.total=Math.max(T.loaded,T.total);var _=T.loading,N=o.loading;_.start?_.first+=N.first-N.start:(_.start=N.start,_.first=N.first),_.end=N.end},n.resetLoader=function(h,C){h.loader=null,this.loader===C&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),C.destroy()},v}();function b(v,n){n===void 0&&(n=null);var d=n||v,h={frag:v,part:n,responseType:"arraybuffer",url:d.url,headers:{},rangeStart:0,rangeEnd:0},C=d.byteRangeStartOffset,T=d.byteRangeEndOffset;return Object(R.isFiniteNumber)(C)&&Object(R.isFiniteNumber)(T)&&(h.rangeStart=C,h.rangeEnd=T),h}var g=function(v){s(n,v);function n(d){for(var h,C=arguments.length,T=new Array(C>1?C-1:0),o=1;o<C;o++)T[o-1]=arguments[o];return h=v.call.apply(v,[this].concat(T))||this,h.data=void 0,h.data=d,h}return n}(w(Error))},"./src/loader/fragment.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"ElementaryStreamTypes",function(){return m}),S.d(c,"BaseSegment",function(){return b}),S.d(c,"Fragment",function(){return g}),S.d(c,"Part",function(){return v});var R=S("./src/polyfills/number.ts"),f=S("./node_modules/url-toolkit/src/url-toolkit.js"),s=S.n(f),w=S("./src/utils/logger.ts"),l=S("./src/loader/level-key.ts"),i=S("./src/loader/load-stats.ts");function a(n,d){n.prototype=Object.create(d.prototype),n.prototype.constructor=n,r(n,d)}function r(n,d){return r=Object.setPrototypeOf||function(C,T){return C.__proto__=T,C},r(n,d)}function u(n,d){for(var h=0;h<d.length;h++){var C=d[h];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(n,C.key,C)}}function p(n,d,h){return d&&u(n.prototype,d),h&&u(n,h),n}var m;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(m||(m={}));var b=function(){function n(h){var C;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(C={},C[m.AUDIO]=null,C[m.VIDEO]=null,C[m.AUDIOVIDEO]=null,C),this.baseurl=h}var d=n.prototype;return d.setByteRange=function(C,T){var o=C.split("@",2),P=[];o.length===1?P[0]=T?T.byteRangeEndOffset:0:P[0]=parseInt(o[1]),P[1]=parseInt(o[0])+P[0],this._byteRange=P},p(n,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(f.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(C){this._url=C}}]),n}(),g=function(n){a(d,n);function d(C,T){var o;return o=n.call(this,T)||this,o._decryptdata=null,o.rawProgramDateTime=null,o.programDateTime=null,o.tagList=[],o.duration=0,o.sn=0,o.levelkey=void 0,o.type=void 0,o.loader=null,o.level=-1,o.cc=0,o.startPTS=void 0,o.endPTS=void 0,o.appendedPTS=void 0,o.startDTS=void 0,o.endDTS=void 0,o.start=0,o.deltaPTS=void 0,o.maxStartPTS=void 0,o.minEndPTS=void 0,o.stats=new i.LoadStats,o.urlId=0,o.data=void 0,o.bitrateTest=!1,o.title=null,o.initSegment=null,o.type=C,o}var h=d.prototype;return h.createInitializationVector=function(T){for(var o=new Uint8Array(16),P=12;P<16;P++)o[P]=T>>8*(15-P)&255;return o},h.setDecryptDataFromLevelKey=function(T,o){var P=T;return(T==null?void 0:T.method)==="AES-128"&&T.uri&&!T.iv&&(P=l.LevelKey.fromURI(T.uri),P.method=T.method,P.iv=this.createInitializationVector(o),P.keyFormat="identity"),P},h.setElementaryStreamInfo=function(T,o,P,O,y,x){x===void 0&&(x=!1);var E=this.elementaryStreams,_=E[T];if(!_){E[T]={startPTS:o,endPTS:P,startDTS:O,endDTS:y,partial:x};return}_.startPTS=Math.min(_.startPTS,o),_.endPTS=Math.max(_.endPTS,P),_.startDTS=Math.min(_.startDTS,O),_.endDTS=Math.max(_.endDTS,y)},h.clearElementaryStreamInfo=function(){var T=this.elementaryStreams;T[m.AUDIO]=null,T[m.VIDEO]=null,T[m.AUDIOVIDEO]=null},p(d,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var T=this.sn;typeof T!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&w.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),T=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,T)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(R.isFiniteNumber)(this.programDateTime))return null;var T=Object(R.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+T*1e3}},{key:"encrypted",get:function(){var T;return!!((T=this.decryptdata)!==null&&T!==void 0&&T.keyFormat&&this.decryptdata.uri)}}]),d}(b),v=function(n){a(d,n);function d(h,C,T,o,P){var O;O=n.call(this,T)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new i.LoadStats,O.duration=h.decimalFloatingPoint("DURATION"),O.gap=h.bool("GAP"),O.independent=h.bool("INDEPENDENT"),O.relurl=h.enumeratedString("URI"),O.fragment=C,O.index=o;var y=h.enumeratedString("BYTERANGE");return y&&O.setByteRange(y,P),P&&(O.fragOffset=P.fragOffset+P.duration),O}return p(d,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var C=this.elementaryStreams;return!!(C.audio||C.video||C.audiovideo)}}]),d}(b)},"./src/loader/key-loader.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return w});var R=S("./src/events.ts"),f=S("./src/errors.ts"),s=S("./src/utils/logger.ts"),w=function(){function l(a){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=a,this._registerListeners()}var i=l.prototype;return i._registerListeners=function(){this.hls.on(R.Events.KEY_LOADING,this.onKeyLoading,this)},i._unregisterListeners=function(){this.hls.off(R.Events.KEY_LOADING,this.onKeyLoading)},i.destroy=function(){this._unregisterListeners();for(var r in this.loaders){var u=this.loaders[r];u&&u.destroy()}this.loaders={}},i.onKeyLoading=function(r,u){var p=u.frag,m=p.type,b=this.loaders[m];if(!p.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var g=p.decryptdata.uri;if(g!==this.decrypturl||this.decryptkey===null){var v=this.hls.config;if(b&&(s.logger.warn("abort previous key loader for type:"+m),b.abort()),!g){s.logger.warn("key uri is falsy");return}var n=v.loader,d=p.loader=this.loaders[m]=new n(v);this.decrypturl=g,this.decryptkey=null;var h={url:g,frag:p,responseType:"arraybuffer"},C={timeout:v.fragLoadingTimeOut,maxRetry:0,retryDelay:v.fragLoadingRetryDelay,maxRetryDelay:v.fragLoadingMaxRetryTimeout,highWaterMark:0},T={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};d.load(h,C,T)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(R.Events.KEY_LOADED,{frag:p}))},i.loadsuccess=function(r,u,p){var m=p.frag;if(!m.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=m.decryptdata.key=new Uint8Array(r.data),m.loader=null,delete this.loaders[m.type],this.hls.trigger(R.Events.KEY_LOADED,{frag:m})},i.loaderror=function(r,u){var p=u.frag,m=p.loader;m&&m.abort(),delete this.loaders[p.type],this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:r})},i.loadtimeout=function(r,u){var p=u.frag,m=p.loader;m&&m.abort(),delete this.loaders[p.type],this.hls.trigger(R.Events.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},l}()},"./src/loader/level-details.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"LevelDetails",function(){return l});var R=S("./src/polyfills/number.ts");function f(i,a){for(var r=0;r<a.length;r++){var u=a[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function s(i,a,r){return a&&f(i.prototype,a),r&&f(i,r),i}var w=10,l=function(){function i(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 a=i.prototype;return a.reloaded=function(u){if(!u){this.advanced=!0,this.updated=!0;return}var p=this.lastPartSn-u.lastPartSn,m=this.lastPartIndex-u.lastPartIndex;this.updated=this.endSN!==u.endSN||!!m||!!p,this.advanced=this.endSN>u.endSN||p>0||p===0&&m>0,this.updated||this.advanced?this.misses=Math.floor(u.misses*.6):this.misses=u.misses+1,this.availabilityDelay=u.availabilityDelay},s(i,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(R.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||w}},{key:"drift",get:function(){var u=this.driftEndTime-this.driftStartTime;if(u>0){var p=this.driftEnd-this.driftStart;return p*1e3/u}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var u;return(u=this.fragments)!==null&&u!==void 0&&u.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 u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),i}()},"./src/loader/level-key.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"LevelKey",function(){return l});var R=S("./node_modules/url-toolkit/src/url-toolkit.js"),f=S.n(R);function s(i,a){for(var r=0;r<a.length;r++){var u=a[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function w(i,a,r){return a&&s(i.prototype,a),r&&s(i,r),i}var l=function(){i.fromURL=function(r,u){return new i(r,u)},i.fromURI=function(r){return new i(r)};function i(a,r){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,r?this._uri=Object(R.buildAbsoluteURL)(a,r,{alwaysNormalize:!0}):this._uri=a}return w(i,[{key:"uri",get:function(){return this._uri}}]),i}()},"./src/loader/load-stats.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"LoadStats",function(){return R});var R=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return d});var R=S("./src/polyfills/number.ts"),f=S("./node_modules/url-toolkit/src/url-toolkit.js"),s=S.n(f),w=S("./src/loader/fragment.ts"),l=S("./src/loader/level-details.ts"),i=S("./src/loader/level-key.ts"),a=S("./src/utils/attr-list.ts"),r=S("./src/utils/logger.ts"),u=S("./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,m=/#EXT-X-MEDIA:(.*)/g,b=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),g=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),v=/\.(mp4|m4s|m4v|m4a)$/i;function n(P){var O,y;return v.test((O=(y=f.parseURL(P))===null||y===void 0?void 0:y.path)!=null?O:"")}var d=function(){function P(){}return P.findGroup=function(y,x){for(var E=0;E<y.length;E++){var _=y[E];if(_.id===x)return _}},P.convertAVC1ToAVCOTI=function(y){var x=y.split(".");if(x.length>2){var E=x.shift()+".";return E+=parseInt(x.shift()).toString(16),E+=("000"+parseInt(x.shift()).toString(16)).substr(-4),E}return y},P.resolve=function(y,x){return f.buildAbsoluteURL(x,y,{alwaysNormalize:!0})},P.parseMasterPlaylist=function(y,x){var E=[],_={},N=!1;p.lastIndex=0;for(var j;(j=p.exec(y))!=null;)if(j[1]){var M=new a.AttrList(j[1]),H={attrs:M,bitrate:M.decimalInteger("AVERAGE-BANDWIDTH")||M.decimalInteger("BANDWIDTH"),name:M.NAME,url:P.resolve(j[2],x)},z=M.decimalResolution("RESOLUTION");z&&(H.width=z.width,H.height=z.height),h((M.CODECS||"").split(/[ ,]+/).filter(function(G){return G}),H),H.videoCodec&&H.videoCodec.indexOf("avc1")!==-1&&(H.videoCodec=P.convertAVC1ToAVCOTI(H.videoCodec)),E.push(H)}else if(j[3]){var F=new a.AttrList(j[3]);F["DATA-ID"]&&(N=!0,_[F["DATA-ID"]]=F)}return{levels:E,sessionData:N?_:null}},P.parseMasterPlaylistMedia=function(y,x,E,_){_===void 0&&(_=[]);var N,j=[],M=0;for(m.lastIndex=0;(N=m.exec(y))!==null;){var H=new a.AttrList(N[1]);if(H.TYPE===E){var z={attrs:H,bitrate:0,id:M++,groupId:H["GROUP-ID"],instreamId:H["INSTREAM-ID"],name:H.NAME||H.LANGUAGE||"",type:E,default:H.bool("DEFAULT"),autoselect:H.bool("AUTOSELECT"),forced:H.bool("FORCED"),lang:H.LANGUAGE,url:H.URI?P.resolve(H.URI,x):""};if(_.length){var F=P.findGroup(_,z.groupId)||_[0];C(z,F,"audioCodec"),C(z,F,"textCodec")}j.push(z)}}return j},P.parseLevelPlaylist=function(y,x,E,_,N){var j=new l.LevelDetails(x),M=j.fragments,H=null,z=0,F=0,G=0,B=0,K=null,W=new w.Fragment(_,x),J,ee,Z,he=-1,ge=!1;for(b.lastIndex=0,j.m3u8=y;(J=b.exec(y))!==null;){ge&&(ge=!1,W=new w.Fragment(_,x),W.start=G,W.sn=z,W.cc=B,W.level=E,H&&(W.initSegment=H,W.rawProgramDateTime=H.rawProgramDateTime));var ie=J[1];if(ie){W.duration=parseFloat(ie);var we=(" "+J[2]).slice(1);W.title=we||null,W.tagList.push(we?["INF",ie,we]:["INF",ie])}else if(J[3])Object(R.isFiniteNumber)(W.duration)&&(W.start=G,Z&&(W.levelkey=Z),W.sn=z,W.level=E,W.cc=B,W.urlId=N,M.push(W),W.relurl=(" "+J[3]).slice(1),o(W,K),K=W,G+=W.duration,z++,F=0,ge=!0);else if(J[4]){var me=(" "+J[4]).slice(1);K?W.setByteRange(me,K):W.setByteRange(me)}else if(J[5])W.rawProgramDateTime=(" "+J[5]).slice(1),W.tagList.push(["PROGRAM-DATE-TIME",W.rawProgramDateTime]),he===-1&&(he=M.length);else{if(J=J[0].match(g),!J){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(ee=1;ee<J.length&&!(typeof J[ee]!="undefined");ee++);var oe=(" "+J[ee]).slice(1),se=(" "+J[ee+1]).slice(1),te=J[ee+2]?(" "+J[ee+2]).slice(1):"";switch(oe){case"PLAYLIST-TYPE":j.type=se.toUpperCase();break;case"MEDIA-SEQUENCE":z=j.startSN=parseInt(se);break;case"SKIP":{var be=new a.AttrList(se),q=be.decimalInteger("SKIPPED-SEGMENTS");if(Object(R.isFiniteNumber)(q)){j.skippedSegments=q;for(var ae=q;ae--;)M.unshift(null);z+=q}var xe=be.enumeratedString("RECENTLY-REMOVED-DATERANGES");xe&&(j.recentlyRemovedDateranges=xe.split(" "));break}case"TARGETDURATION":j.targetduration=parseFloat(se);break;case"VERSION":j.version=parseInt(se);break;case"EXTM3U":break;case"ENDLIST":j.live=!1;break;case"#":(se||te)&&W.tagList.push(te?[se,te]:[se]);break;case"DIS":B++;case"GAP":W.tagList.push([oe]);break;case"BITRATE":W.tagList.push([oe,se]);break;case"DISCONTINUITY-SEQ":B=parseInt(se);break;case"KEY":{var ne,Q=new a.AttrList(se),X=Q.enumeratedString("METHOD"),$=Q.URI,pe=Q.hexadecimalInteger("IV"),de=Q.enumeratedString("KEYFORMATVERSIONS"),Ce=Q.enumeratedString("KEYID"),ze=(ne=Q.enumeratedString("KEYFORMAT"))!=null?ne:"identity",qe=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(qe.indexOf(ze)>-1){r.logger.warn("Keyformat "+ze+" is not supported from the manifest");continue}else if(ze!=="identity")continue;X&&(Z=i.LevelKey.fromURL(x,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(Z.method=X,Z.keyFormat=ze,Ce&&(Z.keyID=Ce),de&&(Z.keyFormatVersions=de),Z.iv=pe));break}case"START":{var Ye=new a.AttrList(se),Ve=Ye.decimalFloatingPoint("TIME-OFFSET");Object(R.isFiniteNumber)(Ve)&&(j.startTimeOffset=Ve);break}case"MAP":{var et=new a.AttrList(se);W.relurl=et.URI,et.BYTERANGE&&W.setByteRange(et.BYTERANGE),W.level=E,W.sn="initSegment",Z&&(W.levelkey=Z),W.initSegment=null,H=W,ge=!0;break}case"SERVER-CONTROL":{var rt=new a.AttrList(se);j.canBlockReload=rt.bool("CAN-BLOCK-RELOAD"),j.canSkipUntil=rt.optionalFloat("CAN-SKIP-UNTIL",0),j.canSkipDateRanges=j.canSkipUntil>0&&rt.bool("CAN-SKIP-DATERANGES"),j.partHoldBack=rt.optionalFloat("PART-HOLD-BACK",0),j.holdBack=rt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Me=new a.AttrList(se);j.partTarget=Me.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Se=j.partList;Se||(Se=j.partList=[]);var Ge=F>0?Se[Se.length-1]:void 0,tt=F++,Ue=new w.Part(new a.AttrList(se),W,x,tt,Ge);Se.push(Ue),W.duration+=Ue.duration;break}case"PRELOAD-HINT":{var Xe=new a.AttrList(se);j.preloadHint=Xe;break}case"RENDITION-REPORT":{var Pe=new a.AttrList(se);j.renditionReports=j.renditionReports||[],j.renditionReports.push(Pe);break}default:r.logger.warn("line parsed but not handled: "+J);break}}}K&&!K.relurl?(M.pop(),G-=K.duration,j.partList&&(j.fragmentHint=K)):j.partList&&(o(W,K),W.cc=B,j.fragmentHint=W);var Te=M.length,Ae=M[0],ce=M[Te-1];if(G+=j.skippedSegments*j.targetduration,G>0&&Te&&ce){j.averagetargetduration=G/Te;var Ee=ce.sn;j.endSN=Ee!=="initSegment"?Ee:0,Ae&&(j.startCC=Ae.cc,Ae.initSegment||j.fragments.every(function(_e){return _e.relurl&&n(_e.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),W=new w.Fragment(_,x),W.relurl=ce.relurl,W.level=E,W.sn="initSegment",Ae.initSegment=W,j.needSidxRanges=!0))}else j.endSN=0,j.startCC=0;return j.fragmentHint&&(G+=j.fragmentHint.duration),j.totalduration=G,j.endCC=B,he>0&&T(M,he),j},P}();function h(P,O){["video","audio","text"].forEach(function(y){var x=P.filter(function(_){return Object(u.isCodecType)(_,y)});if(x.length){var E=x.filter(function(_){return _.lastIndexOf("avc1",0)===0||_.lastIndexOf("mp4a",0)===0});O[y+"Codec"]=E.length>0?E[0]:x[0],P=P.filter(function(_){return x.indexOf(_)===-1})}}),O.unknownCodecs=P}function C(P,O,y){var x=O[y];x&&(P[y]=x)}function T(P,O){for(var y=P[O],x=O;x--;){var E=P[x];if(!E)return;E.programDateTime=y.programDateTime-E.duration*1e3,y=E}}function o(P,O){P.rawProgramDateTime?P.programDateTime=Date.parse(P.rawProgramDateTime):O!=null&&O.programDateTime&&(P.programDateTime=O.endProgramDateTime),Object(R.isFiniteNumber)(P.programDateTime)||(P.programDateTime=null,P.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/polyfills/number.ts"),f=S("./src/events.ts"),s=S("./src/errors.ts"),w=S("./src/utils/logger.ts"),l=S("./src/utils/mp4-tools.ts"),i=S("./src/loader/m3u8-parser.ts"),a=S("./src/types/loader.ts"),r=S("./src/utils/attr-list.ts");function u(b){var g=b.type;switch(g){case a.PlaylistContextType.AUDIO_TRACK:return a.PlaylistLevelType.AUDIO;case a.PlaylistContextType.SUBTITLE_TRACK:return a.PlaylistLevelType.SUBTITLE;default:return a.PlaylistLevelType.MAIN}}function p(b,g){var v=b.url;return(v===void 0||v.indexOf("data:")===0)&&(v=g.url),v}var m=function(){function b(v){this.hls=void 0,this.loaders=Object.create(null),this.hls=v,this.registerListeners()}var g=b.prototype;return g.registerListeners=function(){var n=this.hls;n.on(f.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(f.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(f.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(f.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},g.unregisterListeners=function(){var n=this.hls;n.off(f.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(f.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(f.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(f.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},g.createInternalLoader=function(n){var d=this.hls.config,h=d.pLoader,C=d.loader,T=h||C,o=new T(d);return n.loader=o,this.loaders[n.type]=o,o},g.getInternalLoader=function(n){return this.loaders[n.type]},g.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},g.destroyInternalLoaders=function(){for(var n in this.loaders){var d=this.loaders[n];d&&d.destroy(),this.resetInternalLoader(n)}},g.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},g.onManifestLoading=function(n,d){var h=d.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:a.PlaylistContextType.MANIFEST,url:h,deliveryDirectives:null})},g.onLevelLoading=function(n,d){var h=d.id,C=d.level,T=d.url,o=d.deliveryDirectives;this.load({id:h,groupId:null,level:C,responseType:"text",type:a.PlaylistContextType.LEVEL,url:T,deliveryDirectives:o})},g.onAudioTrackLoading=function(n,d){var h=d.id,C=d.groupId,T=d.url,o=d.deliveryDirectives;this.load({id:h,groupId:C,level:null,responseType:"text",type:a.PlaylistContextType.AUDIO_TRACK,url:T,deliveryDirectives:o})},g.onSubtitleTrackLoading=function(n,d){var h=d.id,C=d.groupId,T=d.url,o=d.deliveryDirectives;this.load({id:h,groupId:C,level:null,responseType:"text",type:a.PlaylistContextType.SUBTITLE_TRACK,url:T,deliveryDirectives:o})},g.load=function(n){var d,h=this.hls.config,C=this.getInternalLoader(n);if(C){var T=C.context;if(T&&T.url===n.url){w.logger.trace("[playlist-loader]: playlist request ongoing");return}w.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),C.abort()}var o,P,O,y;switch(n.type){case a.PlaylistContextType.MANIFEST:o=h.manifestLoadingMaxRetry,P=h.manifestLoadingTimeOut,O=h.manifestLoadingRetryDelay,y=h.manifestLoadingMaxRetryTimeout;break;case a.PlaylistContextType.LEVEL:case a.PlaylistContextType.AUDIO_TRACK:case a.PlaylistContextType.SUBTITLE_TRACK:o=0,P=h.levelLoadingTimeOut;break;default:o=h.levelLoadingMaxRetry,P=h.levelLoadingTimeOut,O=h.levelLoadingRetryDelay,y=h.levelLoadingMaxRetryTimeout;break}if(C=this.createInternalLoader(n),(d=n.deliveryDirectives)!==null&&d!==void 0&&d.part){var x;if(n.type===a.PlaylistContextType.LEVEL&&n.level!==null?x=this.hls.levels[n.level].details:n.type===a.PlaylistContextType.AUDIO_TRACK&&n.id!==null?x=this.hls.audioTracks[n.id].details:n.type===a.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(x=this.hls.subtitleTracks[n.id].details),x){var E=x.partTarget,_=x.targetduration;E&&_&&(P=Math.min(Math.max(E*3,_*.8)*1e3,P))}}var N={timeout:P,maxRetry:o,retryDelay:O,maxRetryDelay:y,highWaterMark:0},j={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};C.load(n,N,j)},g.loadsuccess=function(n,d,h,C){if(C===void 0&&(C=null),h.isSidxRequest){this.handleSidxRequest(n,h),this.handlePlaylistLoaded(n,d,h,C);return}this.resetInternalLoader(h.type);var T=n.data;if(T.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,h,"no EXTM3U delimiter",C);return}d.parsing.start=performance.now(),T.indexOf("#EXTINF:")>0||T.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,d,h,C):this.handleMasterPlaylist(n,d,h,C)},g.loaderror=function(n,d,h){h===void 0&&(h=null),this.handleNetworkError(d,h,!1,n)},g.loadtimeout=function(n,d,h){h===void 0&&(h=null),this.handleNetworkError(d,h,!0)},g.handleMasterPlaylist=function(n,d,h,C){var T=this.hls,o=n.data,P=p(n,h),O=i.default.parseMasterPlaylist(o,P),y=O.levels,x=O.sessionData;if(!y.length){this.handleManifestParsingError(n,h,"no level found in manifest",C);return}var E=y.map(function(z){return{id:z.attrs.AUDIO,audioCodec:z.audioCodec}}),_=y.map(function(z){return{id:z.attrs.SUBTITLES,textCodec:z.textCodec}}),N=i.default.parseMasterPlaylistMedia(o,P,"AUDIO",E),j=i.default.parseMasterPlaylistMedia(o,P,"SUBTITLES",_),M=i.default.parseMasterPlaylistMedia(o,P,"CLOSED-CAPTIONS");if(N.length){var H=N.some(function(z){return!z.url});!H&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(w.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),N.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new r.AttrList({}),bitrate:0,url:""}))}T.trigger(f.Events.MANIFEST_LOADED,{levels:y,audioTracks:N,subtitles:j,captions:M,url:P,stats:d,networkDetails:C,sessionData:x})},g.handleTrackOrLevelPlaylist=function(n,d,h,C){var T=this.hls,o=h.id,P=h.level,O=h.type,y=p(n,h),x=Object(R.isFiniteNumber)(o)?o:0,E=Object(R.isFiniteNumber)(P)?P:x,_=u(h),N=i.default.parseLevelPlaylist(n.data,y,E,_,x);if(!N.fragments.length){T.trigger(f.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:y,reason:"no fragments found in level",level:typeof h.level=="number"?h.level:void 0});return}if(O===a.PlaylistContextType.MANIFEST){var j={attrs:new r.AttrList({}),bitrate:0,details:N,name:"",url:y};T.trigger(f.Events.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:y,stats:d,networkDetails:C,sessionData:null})}if(d.parsing.end=performance.now(),N.needSidxRanges){var M,H=(M=N.fragments[0].initSegment)===null||M===void 0?void 0:M.url;this.load({url:H,isSidxRequest:!0,type:O,level:P,levelDetails:N,id:o,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}h.levelDetails=N,this.handlePlaylistLoaded(n,d,h,C)},g.handleSidxRequest=function(n,d){var h=Object(l.parseSegmentIndex)(new Uint8Array(n.data));if(!h)return;var C=h.references,T=d.levelDetails;C.forEach(function(o,P){var O=o.info,y=T.fragments[P];y.byteRange.length===0&&y.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),y.initSegment&&y.initSegment.setByteRange(String(h.moovEndOffset)+"@0")})},g.handleManifestParsingError=function(n,d,h,C){this.hls.trigger(f.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:d.type===a.PlaylistContextType.MANIFEST,url:n.url,reason:h,response:n,context:d,networkDetails:C})},g.handleNetworkError=function(n,d,h,C){h===void 0&&(h=!1),w.logger.warn("[playlist-loader]: A network "+(h?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var T=s.ErrorDetails.UNKNOWN,o=!1,P=this.getInternalLoader(n);switch(n.type){case a.PlaylistContextType.MANIFEST:T=h?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,o=!0;break;case a.PlaylistContextType.LEVEL:T=h?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,o=!1;break;case a.PlaylistContextType.AUDIO_TRACK:T=h?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,o=!1;break;case a.PlaylistContextType.SUBTITLE_TRACK:T=h?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,o=!1;break}P&&this.resetInternalLoader(n.type);var O={type:s.ErrorTypes.NETWORK_ERROR,details:T,fatal:o,url:n.url,loader:P,context:n,networkDetails:d};C&&(O.response=C),this.hls.trigger(f.Events.ERROR,O)},g.handlePlaylistLoaded=function(n,d,h,C){var T=h.type,o=h.level,P=h.id,O=h.groupId,y=h.loader,x=h.levelDetails,E=h.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(n,h,"invalid target duration",C);return}if(!y)return;x.live&&(y.getCacheAge&&(x.ageHeader=y.getCacheAge()||0),(!y.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(T){case a.PlaylistContextType.MANIFEST:case a.PlaylistContextType.LEVEL:this.hls.trigger(f.Events.LEVEL_LOADED,{details:x,level:o||0,id:P||0,stats:d,networkDetails:C,deliveryDirectives:E});break;case a.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(f.Events.AUDIO_TRACK_LOADED,{details:x,id:P||0,groupId:O||"",stats:d,networkDetails:C,deliveryDirectives:E});break;case a.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(f.Events.SUBTITLE_TRACK_LOADED,{details:x,id:P||0,groupId:O||"",stats:d,networkDetails:C,deliveryDirectives:E});break}},b}();c.default=m},"./src/polyfills/number.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"isFiniteNumber",function(){return R}),S.d(c,"MAX_SAFE_INTEGER",function(){return f});var R=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},f=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(L,c,S){"use strict";S.r(c);var R=function(){function f(){}return f.getSilentFrame=function(w,l){switch(w){case"mp4a.40.2":if(l===1)return new Uint8Array([0,200,0,128,35,128]);if(l===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(l===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(l===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(l===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(l===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(l===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(l===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(l===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},f}();c.default=R},"./src/remux/mp4-generator.ts":function(L,c,S){"use strict";S.r(c);var R=Math.pow(2,32)-1,f=function(){function s(){}return s.init=function(){s.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var l;for(l in s.types)s.types.hasOwnProperty(l)&&(s.types[l]=[l.charCodeAt(0),l.charCodeAt(1),l.charCodeAt(2),l.charCodeAt(3)]);var i=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),a=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);s.HDLR_TYPES={video:i,audio:a};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),u=new Uint8Array([0,0,0,0,0,0,0,0]);s.STTS=s.STSC=s.STCO=u,s.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),s.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),s.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),s.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),m=new Uint8Array([97,118,99,49]),b=new Uint8Array([0,0,0,1]);s.FTYP=s.box(s.types.ftyp,p,b,p,m),s.DINF=s.box(s.types.dinf,s.box(s.types.dref,r))},s.box=function(l){for(var i=8,a=arguments.length,r=new Array(a>1?a-1:0),u=1;u<a;u++)r[u-1]=arguments[u];for(var p=r.length,m=p;p--;)i+=r[p].byteLength;var b=new Uint8Array(i);for(b[0]=i>>24&255,b[1]=i>>16&255,b[2]=i>>8&255,b[3]=i&255,b.set(l,4),p=0,i=8;p<m;p++)b.set(r[p],i),i+=r[p].byteLength;return b},s.hdlr=function(l){return s.box(s.types.hdlr,s.HDLR_TYPES[l])},s.mdat=function(l){return s.box(s.types.mdat,l)},s.mdhd=function(l,i){i*=l;var a=Math.floor(i/(R+1)),r=Math.floor(i%(R+1));return s.box(s.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,l&255,a>>24,a>>16&255,a>>8&255,a&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))},s.mdia=function(l){return s.box(s.types.mdia,s.mdhd(l.timescale,l.duration),s.hdlr(l.type),s.minf(l))},s.mfhd=function(l){return s.box(s.types.mfhd,new Uint8Array([0,0,0,0,l>>24,l>>16&255,l>>8&255,l&255]))},s.minf=function(l){return l.type==="audio"?s.box(s.types.minf,s.box(s.types.smhd,s.SMHD),s.DINF,s.stbl(l)):s.box(s.types.minf,s.box(s.types.vmhd,s.VMHD),s.DINF,s.stbl(l))},s.moof=function(l,i,a){return s.box(s.types.moof,s.mfhd(l),s.traf(a,i))},s.moov=function(l){for(var i=l.length,a=[];i--;)a[i]=s.trak(l[i]);return s.box.apply(null,[s.types.moov,s.mvhd(l[0].timescale,l[0].duration)].concat(a).concat(s.mvex(l)))},s.mvex=function(l){for(var i=l.length,a=[];i--;)a[i]=s.trex(l[i]);return s.box.apply(null,[s.types.mvex].concat(a))},s.mvhd=function(l,i){i*=l;var a=Math.floor(i/(R+1)),r=Math.floor(i%(R+1)),u=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,l&255,a>>24,a>>16&255,a>>8&255,a&255,r>>24,r>>16&255,r>>8&255,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return s.box(s.types.mvhd,u)},s.sdtp=function(l){var i=l.samples||[],a=new Uint8Array(4+i.length),r,u;for(r=0;r<i.length;r++)u=i[r].flags,a[r+4]=u.dependsOn<<4|u.isDependedOn<<2|u.hasRedundancy;return s.box(s.types.sdtp,a)},s.stbl=function(l){return s.box(s.types.stbl,s.stsd(l),s.box(s.types.stts,s.STTS),s.box(s.types.stsc,s.STSC),s.box(s.types.stsz,s.STSZ),s.box(s.types.stco,s.STCO))},s.avc1=function(l){var i=[],a=[],r,u,p;for(r=0;r<l.sps.length;r++)u=l.sps[r],p=u.byteLength,i.push(p>>>8&255),i.push(p&255),i=i.concat(Array.prototype.slice.call(u));for(r=0;r<l.pps.length;r++)u=l.pps[r],p=u.byteLength,a.push(p>>>8&255),a.push(p&255),a=a.concat(Array.prototype.slice.call(u));var m=s.box(s.types.avcC,new Uint8Array([1,i[3],i[4],i[5],252|3,224|l.sps.length].concat(i).concat([l.pps.length]).concat(a))),b=l.width,g=l.height,v=l.pixelRatio[0],n=l.pixelRatio[1];return s.box(s.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b>>8&255,b&255,g>>8&255,g&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),m,s.box(s.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),s.box(s.types.pasp,new Uint8Array([v>>24,v>>16&255,v>>8&255,v&255,n>>24,n>>16&255,n>>8&255,n&255])))},s.esds=function(l){var i=l.config.length;return new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(l.config).concat([6,1,2]))},s.mp4a=function(l){var i=l.samplerate;return s.box(s.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,l.channelCount,0,16,0,0,0,0,i>>8&255,i&255,0,0]),s.box(s.types.esds,s.esds(l)))},s.mp3=function(l){var i=l.samplerate;return s.box(s.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,l.channelCount,0,16,0,0,0,0,i>>8&255,i&255,0,0]))},s.stsd=function(l){return l.type==="audio"?!l.isAAC&&l.codec==="mp3"?s.box(s.types.stsd,s.STSD,s.mp3(l)):s.box(s.types.stsd,s.STSD,s.mp4a(l)):s.box(s.types.stsd,s.STSD,s.avc1(l))},s.tkhd=function(l){var i=l.id,a=l.duration*l.timescale,r=l.width,u=l.height,p=Math.floor(a/(R+1)),m=Math.floor(a%(R+1));return s.box(s.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,i&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,m>>24,m>>16&255,m>>8&255,m&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,u>>8&255,u&255,0,0]))},s.traf=function(l,i){var a=s.sdtp(l),r=l.id,u=Math.floor(i/(R+1)),p=Math.floor(i%(R+1));return s.box(s.types.traf,s.box(s.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),s.box(s.types.tfdt,new Uint8Array([1,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,p>>24,p>>16&255,p>>8&255,p&255])),s.trun(l,a.length+16+20+8+16+8+8),a)},s.trak=function(l){return l.duration=l.duration||4294967295,s.box(s.types.trak,s.tkhd(l),s.mdia(l))},s.trex=function(l){var i=l.id;return s.box(s.types.trex,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},s.trun=function(l,i){var a=l.samples||[],r=a.length,u=12+16*r,p=new Uint8Array(u),m,b,g,v,n,d;for(i+=8+u,p.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255],0),m=0;m<r;m++)b=a[m],g=b.duration,v=b.size,n=b.flags,d=b.cts,p.set([g>>>24&255,g>>>16&255,g>>>8&255,g&255,v>>>24&255,v>>>16&255,v>>>8&255,v&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,d>>>24&255,d>>>16&255,d>>>8&255,d&255],12+16*m);return s.box(s.types.trun,p)},s.initSegment=function(l){s.types||s.init();var i=s.moov(l),a=new Uint8Array(s.FTYP.byteLength+i.byteLength);return a.set(s.FTYP),a.set(i,s.FTYP.byteLength),a},s}();f.types=void 0,f.HDLR_TYPES=void 0,f.STTS=void 0,f.STSC=void 0,f.STCO=void 0,f.STSZ=void 0,f.VMHD=void 0,f.SMHD=void 0,f.STSD=void 0,f.FTYP=void 0,f.DINF=void 0,c.default=f},"./src/remux/mp4-remuxer.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return d}),S.d(c,"normalizePts",function(){return h});var R=S("./src/polyfills/number.ts"),f=S("./src/remux/aac-helper.ts"),s=S("./src/remux/mp4-generator.ts"),w=S("./src/events.ts"),l=S("./src/errors.ts"),i=S("./src/utils/logger.ts"),a=S("./src/types/loader.ts"),r=S("./src/utils/timescale-conversion.ts");function u(){return u=Object.assign||function(P){for(var O=1;O<arguments.length;O++){var y=arguments[O];for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(P[x]=y[x])}return P},u.apply(this,arguments)}var p=10*1e3,m=1024,b=1152,g=null,v=null,n=!1,d=function(){function P(y,x,E,_){if(_===void 0&&(_=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=y,this.config=x,this.typeSupported=E,this.ISGenerated=!1,g===null){var N=navigator.userAgent||"",j=N.match(/Chrome\/(\d+)/i);g=j?parseInt(j[1]):0}if(v===null){var M=navigator.userAgent.match(/Safari\/(\d+)/i);v=M?parseInt(M[1]):0}n=!!g&&g<75||!!v&&v<600}var O=P.prototype;return O.destroy=function(){},O.resetTimeStamp=function(x){i.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=x},O.resetNextTimestamp=function(){i.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){i.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(x){var E=!1,_=x.reduce(function(N,j){var M=j.pts-N;return M<-4294967296?(E=!0,h(N,j.pts)):M>0?N:j.pts},x[0].pts);return E&&i.logger.debug("PTS rollover detected"),_},O.remux=function(x,E,_,N,j,M,H,z){var F,G,B,K,W,J,ee=j,Z=j,he=x.pid>-1,ge=E.pid>-1,ie=E.samples.length,we=x.samples.length>0,me=ie>1,oe=(!he||we)&&(!ge||me)||this.ISGenerated||H;if(oe){this.ISGenerated||(B=this.generateIS(x,E,j));var se=this.isVideoContiguous,te=-1;if(me&&(te=C(E.samples),!se&&this.config.forceKeyFrameOnDiscontinuity))if(J=!0,te>0){i.logger.warn("[mp4-remuxer]: Dropped "+te+" out of "+ie+" video samples due to a missing keyframe");var be=this.getVideoStartPts(E.samples);E.samples=E.samples.slice(te),E.dropped+=te,Z+=(E.samples[0].pts-be)/(E.timescale||9e4)}else te===-1&&(i.logger.warn("[mp4-remuxer]: No keyframe found out of "+ie+" video samples"),J=!1);if(this.ISGenerated){if(we&&me){var q=this.getVideoStartPts(E.samples),ae=h(x.samples[0].pts,q)-q,xe=ae/E.inputTimeScale;ee+=Math.max(0,xe),Z+=Math.max(0,-xe)}if(we){if(x.samplerate||(i.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(x,E,j)),G=this.remuxAudio(x,ee,this.isAudioContiguous,M,ge||me||z===a.PlaylistLevelType.AUDIO?Z:void 0),me){var ne=G?G.endPTS-G.startPTS:0;E.inputTimeScale||(i.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(x,E,j)),F=this.remuxVideo(E,Z,se,ne)}}else me&&(F=this.remuxVideo(E,Z,se,0));F&&(F.firstKeyFrame=te,F.independent=te!==-1)}}return this.ISGenerated&&(_.samples.length&&(W=this.remuxID3(_,j)),N.samples.length&&(K=this.remuxText(N,j))),{audio:G,video:F,initSegment:B,independent:J,text:K,id3:W}},O.generateIS=function(x,E,_){var N=x.samples,j=E.samples,M=this.typeSupported,H={},z=!Object(R.isFiniteNumber)(this._initPTS),F="audio/mp4",G,B,K;if(z&&(G=B=Infinity),x.config&&N.length&&(x.timescale=x.samplerate,x.isAAC||(M.mpeg?(F="audio/mpeg",x.codec=""):M.mp3&&(x.codec="mp3")),H.audio={id:"audio",container:F,codec:x.codec,initSegment:!x.isAAC&&M.mpeg?new Uint8Array(0):s.default.initSegment([x]),metadata:{channelCount:x.channelCount}},z&&(K=x.inputTimeScale,G=B=N[0].pts-Math.round(K*_))),E.sps&&E.pps&&j.length&&(E.timescale=E.inputTimeScale,H.video={id:"main",container:"video/mp4",codec:E.codec,initSegment:s.default.initSegment([E]),metadata:{width:E.width,height:E.height}},z)){K=E.inputTimeScale;var W=this.getVideoStartPts(j),J=Math.round(K*_);B=Math.min(B,h(j[0].dts,W)-J),G=Math.min(G,W-J)}if(Object.keys(H).length)return this.ISGenerated=!0,z&&(this._initPTS=G,this._initDTS=B),{tracks:H,initPTS:G,timescale:K}},O.remuxVideo=function(x,E,_,N){var j=x.inputTimeScale,M=x.samples,H=[],z=M.length,F=this._initPTS,G=this.nextAvcDts,B=8,K,W,J,ee=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,he=0,ge=!1;if(!_||G===null){var ie=E*j,we=M[0].pts-h(M[0].dts,M[0].pts);G=ie-we}for(var me=0;me<z;me++){var oe=M[me];if(oe.pts=h(oe.pts-F,G),oe.dts=h(oe.dts-F,G),oe.dts>oe.pts){var se=9e4*.2;he=Math.max(Math.min(he,oe.pts-oe.dts),-1*se)}oe.dts<M[me>0?me-1:me].dts&&(ge=!0)}ge&&M.sort(function(gt,yt){var ct=gt.dts-yt.dts,Lt=gt.pts-yt.pts;return ct||Lt}),W=M[0].dts,J=M[M.length-1].dts;var te=Math.round((J-W)/(z-1));if(he<0){if(he<te*-2){i.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(r.toMsFromMpegTsClock)(-te,!0)+" ms");for(var be=he,q=0;q<z;q++)M[q].dts=be=Math.max(be,M[q].pts-te),M[q].pts=Math.max(be,M[q].pts)}else{i.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(r.toMsFromMpegTsClock)(he,!0)+" ms to overcome this issue");for(var ae=0;ae<z;ae++)M[ae].dts=M[ae].dts+he}W=M[0].dts}if(_){var xe=W-G,ne=xe>te,Q=xe<-1;if(ne||Q){ne?i.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(xe,!0)+" ms ("+xe+"dts) hole between fragments detected, filling it"):i.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-xe,!0)+" ms ("+xe+"dts) overlapping between fragments detected"),W=G;var X=M[0].pts-xe;M[0].dts=W,M[0].pts=X,i.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(X,!0)+"/"+Object(r.toMsFromMpegTsClock)(W,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(xe,!0)+" ms")}}n&&(W=Math.max(0,W));for(var $=0,pe=0,de=0;de<z;de++){for(var Ce=M[de],ze=Ce.units,qe=ze.length,Ye=0,Ve=0;Ve<qe;Ve++)Ye+=ze[Ve].data.length;pe+=Ye,$+=qe,Ce.length=Ye,Ce.dts=Math.max(Ce.dts,W),Ce.pts=Math.max(Ce.pts,Ce.dts,0),ee=Math.min(Ce.pts,ee),Z=Math.max(Ce.pts,Z)}J=M[z-1].dts;var et=pe+4*$+8,rt;try{rt=new Uint8Array(et)}catch(gt){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:l.ErrorTypes.MUX_ERROR,details:l.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:et,reason:"fail allocating video mdat "+et});return}var Me=new DataView(rt.buffer);Me.setUint32(0,et),rt.set(s.default.types.mdat,4);for(var Se=0;Se<z;Se++){for(var Ge=M[Se],tt=Ge.units,Ue=0,Xe=0,Pe=tt.length;Xe<Pe;Xe++){var Te=tt[Xe],Ae=Te.data,ce=Te.data.byteLength;Me.setUint32(B,ce),B+=4,rt.set(Ae,B),B+=ce,Ue+=4+ce}if(Se<z-1)K=M[Se+1].dts-Ge.dts;else{var Ee=this.config,_e=Ge.dts-M[Se>0?Se-1:Se].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var De=Math.floor(Ee.maxBufferHole*j),je=(N?ee+N*j:this.nextAudioPts)-Ge.pts;je>De?(K=je-_e,K<0&&(K=_e),i.logger.log("[mp4-remuxer]: It is approximately "+je/90+" ms to the next segment; using duration "+K/90+" ms for the last video frame.")):K=_e}else K=_e}var $e=Math.round(Ge.pts-Ge.dts);H.push(new T(Ge.key,K,Ue,$e))}if(H.length&&g&&g<70){var at=H[0].flags;at.dependsOn=2,at.isNonSync=0}console.assert(K!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=G=J+K,this.isVideoContiguous=!0;var it=s.default.moof(x.sequenceNumber++,W,u({},x,{samples:H})),st="video",Je={data1:it,data2:rt,startPTS:ee/j,endPTS:(Z+K)/j,startDTS:W/j,endDTS:G/j,type:st,hasAudio:!1,hasVideo:!0,nb:H.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(rt.length,"MDAT length must not be zero"),Je},O.remuxAudio=function(x,E,_,N,j){var M=x.inputTimeScale,H=x.samplerate?x.samplerate:M,z=M/H,F=x.isAAC?m:b,G=F*z,B=this._initPTS,K=!x.isAAC&&this.typeSupported.mpeg,W=[],J=x.samples,ee=K?0:8,Z=this.nextAudioPts||-1,he=E*M;if(this.isAudioContiguous=_=_||J.length&&Z>0&&(N&&Math.abs(he-Z)<9e3||Math.abs(h(J[0].pts-B,he)-Z)<20*G),J.forEach(function(Ae){Ae.pts=h(Ae.pts-B,he)}),!_||Z<0){if(J=J.filter(function(Ae){return Ae.pts>=0}),!J.length)return;j===0?Z=0:N?Z=Math.max(0,he):Z=J[0].pts}if(x.isAAC)for(var ge=j!==void 0,ie=this.config.maxAudioFramesDrift,we=0,me=Z;we<J.length;we++){var oe=J[we],se=oe.pts,te=se-me,be=Math.abs(1e3*te/M);if(te<=-ie*G&&ge)we===0&&(i.logger.warn("Audio frame @ "+(se/M).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*te/M)+" ms."),this.nextAudioPts=Z=me=se);else if(te>=ie*G&&be<p&&ge){var q=Math.round(te/G);me=se-q*G,me<0&&(q--,me+=G),we===0&&(this.nextAudioPts=Z=me),i.logger.warn("[mp4-remuxer]: Injecting "+q+" audio frame @ "+(me/M).toFixed(3)+"s due to "+Math.round(1e3*te/M)+" ms gap.");for(var ae=0;ae<q;ae++){var xe=Math.max(me,0),ne=f.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);ne||(i.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ne=oe.unit.subarray()),J.splice(we,0,{unit:ne,pts:xe}),me+=G,we++}}oe.pts=me,me+=G}for(var Q=null,X=null,$,pe=0,de=J.length;de--;)pe+=J[de].unit.byteLength;for(var Ce=0,ze=J.length;Ce<ze;Ce++){var qe=J[Ce],Ye=qe.unit,Ve=qe.pts;if(X!==null){var et=W[Ce-1];et.duration=Math.round((Ve-X)/z)}else if(_&&x.isAAC&&(Ve=Z),Q=Ve,pe>0){pe+=ee;try{$=new Uint8Array(pe)}catch(Ae){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:l.ErrorTypes.MUX_ERROR,details:l.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:pe,reason:"fail allocating audio mdat "+pe});return}if(!K){var rt=new DataView($.buffer);rt.setUint32(0,pe),$.set(s.default.types.mdat,4)}}else return;$.set(Ye,ee);var Me=Ye.byteLength;ee+=Me,W.push(new T(!0,F,Me,0)),X=Ve}var Se=W.length;if(!Se)return;var Ge=W[W.length-1];this.nextAudioPts=Z=X+z*Ge.duration;var tt=K?new Uint8Array(0):s.default.moof(x.sequenceNumber++,Q/z,u({},x,{samples:W}));x.samples=[];var Ue=Q/M,Xe=Z/M,Pe="audio",Te={data1:tt,data2:$,startPTS:Ue,endPTS:Xe,startDTS:Ue,endDTS:Xe,type:Pe,hasAudio:!0,hasVideo:!1,nb:Se};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),Te},O.remuxEmptyAudio=function(x,E,_,N){var j=x.inputTimeScale,M=x.samplerate?x.samplerate:j,H=j/M,z=this.nextAudioPts,F=(z!==null?z:N.startDTS*j)+this._initDTS,G=N.endDTS*j+this._initDTS,B=H*m,K=Math.ceil((G-F)/B),W=f.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(i.logger.warn("[mp4-remuxer]: remux empty Audio"),!W){i.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var J=[],ee=0;ee<K;ee++){var Z=F+ee*B;J.push({unit:W,pts:Z,dts:Z})}return x.samples=J,this.remuxAudio(x,E,_,!1)},O.remuxID3=function(x,E){var _=x.samples.length;if(!_)return;for(var N=x.inputTimeScale,j=this._initPTS,M=this._initDTS,H=0;H<_;H++){var z=x.samples[H];z.pts=h(z.pts-j,E*N)/N,z.dts=h(z.dts-M,E*N)/N}var F=x.samples;return x.samples=[],{samples:F}},O.remuxText=function(x,E){var _=x.samples.length;if(!_)return;for(var N=x.inputTimeScale,j=this._initPTS,M=0;M<_;M++){var H=x.samples[M];H.pts=h(H.pts-j,E*N)/N}x.samples.sort(function(F,G){return F.pts-G.pts});var z=x.samples;return x.samples=[],{samples:z}},P}();function h(P,O){var y;if(O===null)return P;for(O<P?y=-8589934592:y=8589934592;Math.abs(P-O)>4294967296;)P+=y;return P}function C(P){for(var O=0;O<P.length;O++)if(P[O].key)return O;return-1}var T=function(O,y,x,E){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=y,this.size=x,this.cts=E,this.flags=new o(O)},o=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/polyfills/number.ts"),f=S("./src/utils/mp4-tools.ts"),s=S("./src/loader/fragment.ts"),w=S("./src/utils/logger.ts"),l=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 u=r.prototype;return u.destroy=function(){},u.resetTimeStamp=function(m){this.initPTS=m,this.lastEndDTS=null},u.resetNextTimestamp=function(){this.lastEndDTS=null},u.resetInitSegment=function(m,b,g){this.audioCodec=b,this.videoCodec=g,this.generateInitSegment(m),this.emitInitSegment=!0},u.generateInitSegment=function(m){var b=this.audioCodec,g=this.videoCodec;if(!m||!m.byteLength){this.initTracks=void 0,this.initData=void 0;return}var v=this.initData=Object(f.parseInitSegment)(m);b||(b=a(v.audio,s.ElementaryStreamTypes.AUDIO)),g||(g=a(v.video,s.ElementaryStreamTypes.VIDEO));var n={};v.audio&&v.video?n.audiovideo={container:"video/mp4",codec:b+","+g,initSegment:m,id:"main"}:v.audio?n.audio={container:"audio/mp4",codec:b,initSegment:m,id:"audio"}:v.video?n.video={container:"video/mp4",codec:g,initSegment:m,id:"main"}:w.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},u.remux=function(m,b,g,v,n){var d=this.initPTS,h=this.lastEndDTS,C={audio:void 0,video:void 0,text:v,id3:g,initSegment:void 0};Object(R.isFiniteNumber)(h)||(h=this.lastEndDTS=n||0);var T=b.samples;if(!T||!T.length)return C;var o={initPTS:void 0,timescale:1},P=this.initData;if((!P||!P.length)&&(this.generateInitSegment(T),P=this.initData),!P||!P.length)return w.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),C;this.emitInitSegment&&(o.tracks=this.initTracks,this.emitInitSegment=!1),Object(R.isFiniteNumber)(d)||(this.initPTS=o.initPTS=d=i(P,T,h));var O=Object(f.getDuration)(T,P),y=h,x=O+y;Object(f.offsetStartDTS)(P,T,d),O>0?this.lastEndDTS=x:(w.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var E=!!P.audio,_=!!P.video,N="";E&&(N+="audio"),_&&(N+="video");var j={data1:T,startPTS:y,startDTS:y,endPTS:x,endDTS:x,type:N,hasAudio:E,hasVideo:_,nb:1,dropped:0};return C.audio=j.type==="audio"?j:void 0,C.video=j.type!=="audio"?j:void 0,C.text=v,C.id3=g,C.initSegment=o,C},r}(),i=function(u,p,m){return Object(f.getStartDTS)(u,p)-m};function a(r,u){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"||u===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}c.default=l},"./src/task-loop.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return R});var R=function(){function f(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var s=f.prototype;return s.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},s.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},s.onHandlerDestroyed=function(){},s.hasInterval=function(){return!!this._tickInterval},s.hasNextTick=function(){return!!this._tickTimer},s.setInterval=function(l){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,l),!0)},s.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},s.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},s.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},s.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},s.doTick=function(){},f}()},"./src/types/cmcd.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"CMCDVersion",function(){return R}),S.d(c,"CMCDObjectType",function(){return f}),S.d(c,"CMCDStreamingFormat",function(){return s}),S.d(c,"CMCDStreamType",function(){return w});var R=1,f;(function(l){l.MANIFEST="m",l.AUDIO="a",l.VIDEO="v",l.MUXED="av",l.INIT="i",l.CAPTION="c",l.TIMED_TEXT="tt",l.KEY="k",l.OTHER="o"})(f||(f={}));var s;(function(l){l.DASH="d",l.HLS="h",l.SMOOTH="s",l.OTHER="o"})(s||(s={}));var w;(function(l){l.VOD="v",l.LIVE="l"})(w||(w={}))},"./src/types/level.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"HlsSkip",function(){return s}),S.d(c,"getSkipValue",function(){return w}),S.d(c,"HlsUrlParameters",function(){return l}),S.d(c,"Level",function(){return i});function R(a,r){for(var u=0;u<r.length;u++){var p=r[u];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}function f(a,r,u){return r&&R(a.prototype,r),u&&R(a,u),a}var s;(function(a){a.No="",a.Yes="YES",a.v2="v2"})(s||(s={}));function w(a,r){var u=a.canSkipUntil,p=a.canSkipDateRanges,m=a.endSN,b=r!==void 0?r-m:0;return u&&b<u?p?s.v2:s.Yes:s.No}var l=function(){function a(u,p,m){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=u,this.part=p,this.skip=m}var r=a.prototype;return r.addDirectives=function(p){var m=new self.URL(p);return this.msn!==void 0&&m.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&m.searchParams.set("_HLS_part",this.part.toString()),this.skip&&m.searchParams.set("_HLS_skip",this.skip),m.toString()},a}(),i=function(){function a(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(u){return u}).join(",").replace(/\.[^.,]+/g,"")}return f(a,[{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(u){var p=u%this.url.length;this._urlId!==p&&(this.details=void 0,this._urlId=p)}}]),a}()},"./src/types/loader.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"PlaylistContextType",function(){return R}),S.d(c,"PlaylistLevelType",function(){return f});var R;(function(s){s.MANIFEST="manifest",s.LEVEL="level",s.AUDIO_TRACK="audioTrack",s.SUBTITLE_TRACK="subtitleTrack"})(R||(R={}));var f;(function(s){s.MAIN="main",s.AUDIO="audio",s.SUBTITLE="subtitle"})(f||(f={}))},"./src/types/transmuxer.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"ChunkMetadata",function(){return R});var R=function(w,l,i,a,r,u){a===void 0&&(a=0),r===void 0&&(r=-1),u===void 0&&(u=!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=f(),this.buffering={audio:f(),video:f(),audiovideo:f()},this.level=w,this.sn=l,this.id=i,this.size=a,this.part=r,this.partial=u};function f(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"AttrList",function(){return s});var R=/^(\d+)x(\d+)$/,f=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,s=function(){function w(i){typeof i=="string"&&(i=w.parseAttrList(i));for(var a in i)i.hasOwnProperty(a)&&(this[a]=i[a])}var l=w.prototype;return l.decimalInteger=function(a){var r=parseInt(this[a],10);return r>Number.MAX_SAFE_INTEGER?Infinity:r},l.hexadecimalInteger=function(a){if(this[a]){var r=(this[a]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var u=new Uint8Array(r.length/2),p=0;p<r.length/2;p++)u[p]=parseInt(r.slice(p*2,p*2+2),16);return u}else return null},l.hexadecimalIntegerAsNumber=function(a){var r=parseInt(this[a],16);return r>Number.MAX_SAFE_INTEGER?Infinity:r},l.decimalFloatingPoint=function(a){return parseFloat(this[a])},l.optionalFloat=function(a,r){var u=this[a];return u?parseFloat(u):r},l.enumeratedString=function(a){return this[a]},l.bool=function(a){return this[a]==="YES"},l.decimalResolution=function(a){var r=R.exec(this[a]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},w.parseAttrList=function(a){var r,u={},p='"';for(f.lastIndex=0;(r=f.exec(a))!==null;){var m=r[2];m.indexOf(p)===0&&m.lastIndexOf(p)===m.length-1&&(m=m.slice(1,-1)),u[r[1]]=m}return u},w}()},"./src/utils/binary-search.ts":function(L,c,S){"use strict";S.r(c);var R={search:function(s,w){for(var l=0,i=s.length-1,a=null,r=null;l<=i;){a=(l+i)/2|0,r=s[a];var u=w(r);if(u>0)l=a+1;else if(u<0)i=a-1;else return r}return null}};c.default=R},"./src/utils/buffer-helper.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"BufferHelper",function(){return s});var R=S("./src/utils/logger.ts"),f={length:0,start:function(){return 0},end:function(){return 0}},s=function(){function w(){}return w.isBuffered=function(i,a){try{if(i){for(var r=w.getBuffered(i),u=0;u<r.length;u++)if(a>=r.start(u)&&a<=r.end(u))return!0}}catch(p){}return!1},w.bufferInfo=function(i,a,r){try{if(i){var u=w.getBuffered(i),p=[],m;for(m=0;m<u.length;m++)p.push({start:u.start(m),end:u.end(m)});return this.bufferedInfo(p,a,r)}}catch(b){}return{len:0,start:a,end:a,nextStart:void 0}},w.bufferedInfo=function(i,a,r){a=Math.max(0,a),i.sort(function(o,P){var O=o.start-P.start;return O||P.end-o.end});var u=[];if(r)for(var p=0;p<i.length;p++){var m=u.length;if(m){var b=u[m-1].end;i[p].start-b<r?i[p].end>b&&(u[m-1].end=i[p].end):u.push(i[p])}else u.push(i[p])}else u=i;for(var g=0,v,n=a,d=a,h=0;h<u.length;h++){var C=u[h].start,T=u[h].end;if(a+r>=C&&a<T)n=C,d=T,g=d-a;else if(a+r<C){v=C;break}}return{len:g,start:n||0,end:d||0,nextStart:v}},w.getBuffered=function(i){try{return i.buffered}catch(a){return R.logger.log("failed to get media.buffered",a),f}},w}()},"./src/utils/cea-608-parser.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"Row",function(){return d}),S.d(c,"CaptionScreen",function(){return h});var R=S("./src/utils/logger.ts"),f={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},s=function(x){var E=x;return f.hasOwnProperty(x)&&(E=f[x]),String.fromCharCode(E)},w=15,l=100,i={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},a={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},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],m;(function(y){y[y.ERROR=0]="ERROR",y[y.TEXT=1]="TEXT",y[y.WARNING=2]="WARNING",y[y.INFO=2]="INFO",y[y.DEBUG=3]="DEBUG",y[y.DATA=3]="DATA"})(m||(m={}));var b=function(){function y(){this.time=null,this.verboseLevel=m.ERROR}var x=y.prototype;return x.log=function(_,N){this.verboseLevel>=_&&R.logger.log(this.time+" ["+_+"] "+N)},y}(),g=function(x){for(var E=[],_=0;_<x.length;_++)E.push(x[_].toString(16));return E},v=function(){function y(E,_,N,j,M){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=_||!1,this.italics=N||!1,this.background=j||"black",this.flash=M||!1}var x=y.prototype;return x.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},x.setStyles=function(_){for(var N=["foreground","underline","italics","background","flash"],j=0;j<N.length;j++){var M=N[j];_.hasOwnProperty(M)&&(this[M]=_[M])}},x.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},x.equals=function(_){return this.foreground===_.foreground&&this.underline===_.underline&&this.italics===_.italics&&this.background===_.background&&this.flash===_.flash},x.copy=function(_){this.foreground=_.foreground,this.underline=_.underline,this.italics=_.italics,this.background=_.background,this.flash=_.flash},x.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},y}(),n=function(){function y(E,_,N,j,M,H){this.uchar=void 0,this.penState=void 0,this.uchar=E||" ",this.penState=new v(_,N,j,M,H)}var x=y.prototype;return x.reset=function(){this.uchar=" ",this.penState.reset()},x.setChar=function(_,N){this.uchar=_,this.penState.copy(N)},x.setPenState=function(_){this.penState.copy(_)},x.equals=function(_){return this.uchar===_.uchar&&this.penState.equals(_.penState)},x.copy=function(_){this.uchar=_.uchar,this.penState.copy(_.penState)},x.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},y}(),d=function(){function y(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 _=0;_<l;_++)this.chars.push(new n);this.logger=E,this.pos=0,this.currPenState=new v}var x=y.prototype;return x.equals=function(_){for(var N=!0,j=0;j<l;j++)if(!this.chars[j].equals(_.chars[j])){N=!1;break}return N},x.copy=function(_){for(var N=0;N<l;N++)this.chars[N].copy(_.chars[N])},x.isEmpty=function(){for(var _=!0,N=0;N<l;N++)if(!this.chars[N].isEmpty()){_=!1;break}return _},x.setCursor=function(_){this.pos!==_&&(this.pos=_),this.pos<0?(this.logger.log(m.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>l&&(this.logger.log(m.DEBUG,"Too large cursor position "+this.pos),this.pos=l)},x.moveCursor=function(_){var N=this.pos+_;if(_>1)for(var j=this.pos+1;j<N+1;j++)this.chars[j].setPenState(this.currPenState);this.setCursor(N)},x.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},x.insertChar=function(_){_>=144&&this.backSpace();var N=s(_);if(this.pos>=l){this.logger.log(m.ERROR,"Cannot insert "+_.toString(16)+" ("+N+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(N,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(_){var N;for(N=_;N<l;N++)this.chars[N].reset()},x.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},x.clearToEndOfRow=function(){this.clearFromPos(this.pos)},x.getTextString=function(){for(var _=[],N=!0,j=0;j<l;j++){var M=this.chars[j].uchar;M!==" "&&(N=!1),_.push(M)}return N?"":_.join("")},x.setPenStyles=function(_){this.currPenState.setStyles(_);var N=this.chars[this.pos];N.setPenState(this.currPenState)},y}(),h=function(){function y(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 _=0;_<w;_++)this.rows.push(new d(E));this.logger=E,this.currRow=w-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=y.prototype;return x.reset=function(){for(var _=0;_<w;_++)this.rows[_].clear();this.currRow=w-1},x.equals=function(_){for(var N=!0,j=0;j<w;j++)if(!this.rows[j].equals(_.rows[j])){N=!1;break}return N},x.copy=function(_){for(var N=0;N<w;N++)this.rows[N].copy(_.rows[N])},x.isEmpty=function(){for(var _=!0,N=0;N<w;N++)if(!this.rows[N].isEmpty()){_=!1;break}return _},x.backSpace=function(){var _=this.rows[this.currRow];_.backSpace()},x.clearToEndOfRow=function(){var _=this.rows[this.currRow];_.clearToEndOfRow()},x.insertChar=function(_){var N=this.rows[this.currRow];N.insertChar(_)},x.setPen=function(_){var N=this.rows[this.currRow];N.setPenStyles(_)},x.moveCursor=function(_){var N=this.rows[this.currRow];N.moveCursor(_)},x.setCursor=function(_){this.logger.log(m.INFO,"setCursor: "+_);var N=this.rows[this.currRow];N.setCursor(_)},x.setPAC=function(_){this.logger.log(m.INFO,"pacData = "+JSON.stringify(_));var N=_.row-1;if(this.nrRollUpRows&&N<this.nrRollUpRows-1&&(N=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==N){for(var j=0;j<w;j++)this.rows[j].clear();var M=this.currRow+1-this.nrRollUpRows,H=this.lastOutputScreen;if(H){var z=H.rows[M].cueStartTime,F=this.logger.time;if(z&&F!==null&&z<F)for(var G=0;G<this.nrRollUpRows;G++)this.rows[N-this.nrRollUpRows+G+1].copy(H.rows[M+G])}}this.currRow=N;var B=this.rows[this.currRow];if(_.indent!==null){var K=_.indent,W=Math.max(K-1,0);B.setCursor(_.indent),_.color=B.chars[W].penState.foreground}var J={foreground:_.color,underline:_.underline,italics:_.italics,background:"black",flash:!1};this.setPen(J)},x.setBkgData=function(_){this.logger.log(m.INFO,"bkgData = "+JSON.stringify(_)),this.backSpace(),this.setPen(_),this.insertChar(32)},x.setRollUpRows=function(_){this.nrRollUpRows=_},x.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(m.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(m.TEXT,this.getDisplayText());var _=this.currRow+1-this.nrRollUpRows,N=this.rows.splice(_,1)[0];N.clear(),this.rows.splice(this.currRow,0,N),this.logger.log(m.INFO,"Rolling up")},x.getDisplayText=function(_){_=_||!1;for(var N=[],j="",M=-1,H=0;H<w;H++){var z=this.rows[H].getTextString();z&&(M=H+1,_?N.push("Row "+M+": '"+z+"'"):N.push(z.trim()))}return N.length>0&&(_?j="["+N.join(" | ")+"]":j=N.join(`
`)),j},x.getTextAndFormat=function(){return this.rows},y}(),C=function(){function y(E,_,N){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=_,this.mode=null,this.verbose=0,this.displayedMemory=new h(N),this.nonDisplayedMemory=new h(N),this.lastOutputScreen=new h(N),this.currRollUpRow=this.displayedMemory.rows[w-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=N}var x=y.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[w-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(_){this.outputFilter=_},x.setPAC=function(_){this.writeScreen.setPAC(_)},x.setBkgData=function(_){this.writeScreen.setBkgData(_)},x.setMode=function(_){if(_===this.mode)return;this.mode=_,this.logger.log(m.INFO,"MODE="+_),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=_},x.insertChars=function(_){for(var N=0;N<_.length;N++)this.writeScreen.insertChar(_[N]);var j=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(m.INFO,j+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(m.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},x.ccRCL=function(){this.logger.log(m.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(m.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},x.ccAOF=function(){},x.ccAON=function(){},x.ccDER=function(){this.logger.log(m.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(_){this.logger.log(m.INFO,"RU("+_+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(_)},x.ccFON=function(){this.logger.log(m.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(m.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(m.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(m.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(m.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(m.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(m.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.ccEOC=function(){if(this.logger.log(m.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var _=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=_,this.writeScreen=this.nonDisplayedMemory,this.logger.log(m.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},x.ccTO=function(_){this.logger.log(m.INFO,"TO("+_+") - Tab Offset"),this.writeScreen.moveCursor(_)},x.ccMIDROW=function(_){var N={flash:!1};if(N.underline=_%2===1,N.italics=_>=46,N.italics)N.foreground="white";else{var j=Math.floor(_/2)-16,M=["white","green","blue","cyan","red","yellow","magenta"];N.foreground=M[j]}this.logger.log(m.INFO,"MIDROW: "+JSON.stringify(N)),this.writeScreen.setPen(N)},x.outputDataUpdate=function(_){_===void 0&&(_=!1);var N=this.logger.time;if(N===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=N:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,N,this.lastOutputScreen),_&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:N),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(_){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,_,this.displayedMemory),this.cueStartTime=_))},y}(),T=function(){function y(E,_,N){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var j=new b;this.channels=[null,new C(E,_,j),new C(E+1,N,j)],this.cmdHistory=O(),this.logger=j}var x=y.prototype;return x.getHandler=function(_){return this.channels[_].getHandler()},x.setHandler=function(_,N){this.channels[_].setHandler(N)},x.addData=function(_,N){var j,M,H,z=!1;this.logger.time=_;for(var F=0;F<N.length;F+=2){if(M=N[F]&127,H=N[F+1]&127,M===0&&H===0)continue;if(this.logger.log(m.DATA,"["+g([N[F],N[F+1]])+"] -> ("+g([M,H])+")"),j=this.parseCmd(M,H),j||(j=this.parseMidrow(M,H)),j||(j=this.parsePAC(M,H)),j||(j=this.parseBackgroundAttributes(M,H)),!j&&(z=this.parseChars(M,H),z)){var G=this.currentChannel;if(G&&G>0){var B=this.channels[G];B.insertChars(z)}else this.logger.log(m.WARNING,"No channel found yet. TEXT-MODE?")}!j&&!z&&this.logger.log(m.WARNING,"Couldn't parse cleaned data "+g([M,H])+" orig: "+g([N[F],N[F+1]]))}},x.parseCmd=function(_,N){var j=this.cmdHistory,M=(_===20||_===28||_===21||_===29)&&N>=32&&N<=47,H=(_===23||_===31)&&N>=33&&N<=35;if(!(M||H))return!1;if(P(_,N,j))return o(null,null,j),this.logger.log(m.DEBUG,"Repeated command ("+g([_,N])+") is dropped"),!0;var z=_===20||_===21||_===23?1:2,F=this.channels[z];return _===20||_===21||_===28||_===29?N===32?F.ccRCL():N===33?F.ccBS():N===34?F.ccAOF():N===35?F.ccAON():N===36?F.ccDER():N===37?F.ccRU(2):N===38?F.ccRU(3):N===39?F.ccRU(4):N===40?F.ccFON():N===41?F.ccRDC():N===42?F.ccTR():N===43?F.ccRTD():N===44?F.ccEDM():N===45?F.ccCR():N===46?F.ccENM():N===47&&F.ccEOC():F.ccTO(N-32),o(_,N,j),this.currentChannel=z,!0},x.parseMidrow=function(_,N){var j=0;if((_===17||_===25)&&N>=32&&N<=47){if(_===17?j=1:j=2,j!==this.currentChannel)return this.logger.log(m.ERROR,"Mismatch channel in midrow parsing"),!1;var M=this.channels[j];return M?(M.ccMIDROW(N),this.logger.log(m.DEBUG,"MIDROW ("+g([_,N])+")"),!0):!1}return!1},x.parsePAC=function(_,N){var j,M=this.cmdHistory,H=(_>=17&&_<=23||_>=25&&_<=31)&&N>=64&&N<=127,z=(_===16||_===24)&&N>=64&&N<=95;if(!(H||z))return!1;if(P(_,N,M))return o(null,null,M),!0;var F=_<=23?1:2;N>=64&&N<=95?j=F===1?i[_]:r[_]:j=F===1?a[_]:u[_];var G=this.channels[F];return G?(G.setPAC(this.interpretPAC(j,N)),o(_,N,M),this.currentChannel=F,!0):!1},x.interpretPAC=function(_,N){var j,M={color:null,italics:!1,indent:null,underline:!1,row:_};return N>95?j=N-96:j=N-64,M.underline=(j&1)===1,j<=13?M.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(j/2)]:j<=15?(M.italics=!0,M.color="white"):M.indent=Math.floor((j-16)/2)*4,M},x.parseChars=function(_,N){var j,M=null,H=null;if(_>=25?(j=2,H=_-8):(j=1,H=_),H>=17&&H<=19){var z;H===17?z=N+80:H===18?z=N+112:z=N+144,this.logger.log(m.INFO,"Special char '"+s(z)+"' in channel "+j),M=[z]}else _>=32&&_<=127&&(M=N===0?[_]:[_,N]);if(M){var F=g(M);this.logger.log(m.DEBUG,"Char codes = "+F.join(",")),o(_,N,this.cmdHistory)}return M},x.parseBackgroundAttributes=function(_,N){var j=(_===16||_===24)&&N>=32&&N<=47,M=(_===23||_===31)&&N>=45&&N<=47;if(!(j||M))return!1;var H,z={};_===16||_===24?(H=Math.floor((N-32)/2),z.background=p[H],N%2===1&&(z.background=z.background+"_semi")):N===45?z.background="transparent":(z.foreground="black",N===47&&(z.underline=!0));var F=_<=23?1:2,G=this.channels[F];return G.setBkgData(z),o(_,N,this.cmdHistory),!0},x.reset=function(){for(var _=0;_<Object.keys(this.channels).length;_++){var N=this.channels[_];N&&N.reset()}this.cmdHistory=O()},x.cueSplitAtTime=function(_){for(var N=0;N<this.channels.length;N++){var j=this.channels[N];j&&j.cueSplitAtTime(_)}},y}();function o(y,x,E){E.a=y,E.b=x}function P(y,x,E){return E.a===y&&E.b===x}function O(){return{a:null,b:null}}c.default=T},"./src/utils/codecs.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"isCodecType",function(){return f}),S.d(c,"isCodecSupportedInMp4",function(){return s});var R={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function f(w,l){var i=R[l];return!!i&&i[w.slice(0,4)]===!0}function s(w,l){return MediaSource.isTypeSupported((l||"video")+'/mp4;codecs="'+w+'"')}},"./src/utils/cues.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/utils/vttparser.ts"),f=S("./src/utils/webvtt-parser.ts"),s=S("./src/utils/texttrack-utils.ts"),w=/\s/,l={newCue:function(a,r,u,p){for(var m=[],b,g,v,n,d,h=self.VTTCue||self.TextTrackCue,C=0;C<p.rows.length;C++)if(b=p.rows[C],v=!0,n=0,d="",!b.isEmpty()){for(var T=0;T<b.chars.length;T++)w.test(b.chars[T].uchar)&&v?n++:(d+=b.chars[T].uchar,v=!1);b.cueStartTime=r,r===u&&(u+=1e-4),n>=16?n--:n++;var o=Object(R.fixLineBreaks)(d.trim()),P=Object(f.generateCueId)(r,u,o);(!a||!a.cues||!a.cues.getCueById(P))&&(g=new h(r,u,o),g.id=P,g.line=C+1,g.align="left",g.position=10+Math.min(80,Math.floor(n*8/32)*10),m.push(g))}return a&&m.length&&(m.sort(function(O,y){return O.line==="auto"||y.line==="auto"?0:O.line>8&&y.line>8?y.line-O.line:O.line-y.line}),m.forEach(function(O){return Object(s.addCueToTrack)(a,O)})),m}};c.default=l},"./src/utils/discontinuities.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"findFirstFragWithCC",function(){return w}),S.d(c,"shouldAlignOnDiscontinuities",function(){return l}),S.d(c,"findDiscontinuousReferenceFrag",function(){return i}),S.d(c,"adjustSlidingStart",function(){return r}),S.d(c,"alignStream",function(){return u}),S.d(c,"alignPDT",function(){return m}),S.d(c,"alignFragmentByPDTDelta",function(){return b}),S.d(c,"alignMediaPlaylistByPDT",function(){return g});var R=S("./src/polyfills/number.ts"),f=S("./src/utils/logger.ts"),s=S("./src/controller/level-helper.ts");function w(v,n){for(var d=null,h=0,C=v.length;h<C;h++){var T=v[h];if(T&&T.cc===n){d=T;break}}return d}function l(v,n,d){return!!(n.details&&(d.endCC>d.startCC||v&&v.cc<d.startCC))}function i(v,n){var d=v.fragments,h=n.fragments;if(!h.length||!d.length){f.logger.log("No fragments to align");return}var C=w(d,h[0].cc);if(!C||C&&!C.startPTS){f.logger.log("No frag in previous level to align on");return}return C}function a(v,n){if(v){var d=v.start+n;v.start=v.startPTS=d,v.endPTS=d+v.duration}}function r(v,n){for(var d=n.fragments,h=0,C=d.length;h<C;h++)a(d[h],v);n.fragmentHint&&a(n.fragmentHint,v),n.alignedSliding=!0}function u(v,n,d){if(!n)return;p(v,d,n),!d.alignedSliding&&n.details&&m(d,n.details),!d.alignedSliding&&n.details&&!d.skippedSegments&&Object(s.adjustSliding)(n.details,d)}function p(v,n,d){if(l(v,d,n)){var h=i(d.details,n);h&&Object(R.isFiniteNumber)(h.start)&&(f.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),r(h.start,n))}}function m(v,n){if(!n.fragments.length||!v.hasProgramDateTime||!n.hasProgramDateTime)return;var d=n.fragments[0].programDateTime,h=v.fragments[0].programDateTime,C=(h-d)/1e3+n.fragments[0].start;C&&Object(R.isFiniteNumber)(C)&&(f.logger.log("Adjusting PTS using programDateTime delta "+(h-d)+"ms, sliding:"+C.toFixed(3)+" "+v.url+" "),r(C,v))}function b(v,n){var d=v.programDateTime;if(!d)return;var h=(d-n)/1e3;v.start=v.startPTS=h,v.endPTS=h+v.duration}function g(v,n){if(!n.fragments.length||!v.hasProgramDateTime||!n.hasProgramDateTime)return;var d=n.fragments[0].programDateTime,h=n.fragments[0].start,C=d-h*1e3;v.fragments.forEach(function(T){b(T,C)}),v.fragmentHint&&b(v.fragmentHint,C),v.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/utils/ewma.ts"),f=function(){function s(l,i,a){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=a,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new R.default(l),this.fast_=new R.default(i)}var w=s.prototype;return w.update=function(i,a){var r=this.slow_,u=this.fast_;this.slow_.halfLife!==i&&(this.slow_=new R.default(i,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==a&&(this.fast_=new R.default(a,u.getEstimate(),u.getTotalWeight()))},w.sample=function(i,a){i=Math.max(i,this.minDelayMs_);var r=8*a,u=i/1e3,p=r/u;this.fast_.sample(u,p),this.slow_.sample(u,p)},w.canEstimate=function(){var i=this.fast_;return i&&i.getTotalWeight()>=this.minWeight_},w.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},w.destroy=function(){},s}();c.default=f},"./src/utils/ewma.ts":function(L,c,S){"use strict";S.r(c);var R=function(){function f(w,l,i){l===void 0&&(l=0),i===void 0&&(i=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=w,this.alpha_=w?Math.exp(Math.log(.5)/w):0,this.estimate_=l,this.totalWeight_=i}var s=f.prototype;return s.sample=function(l,i){var a=Math.pow(this.alpha_,l);this.estimate_=i*(1-a)+a*this.estimate_,this.totalWeight_+=l},s.getTotalWeight=function(){return this.totalWeight_},s.getEstimate=function(){if(this.alpha_){var l=1-Math.pow(this.alpha_,this.totalWeight_);if(l)return this.estimate_/l}return this.estimate_},f}();c.default=R},"./src/utils/fetch-loader.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"fetchSupported",function(){return b});var R=S("./src/polyfills/number.ts"),f=S("./src/loader/load-stats.ts"),s=S("./src/demux/chunk-cache.ts");function w(h,C){h.prototype=Object.create(C.prototype),h.prototype.constructor=h,u(h,C)}function l(h){var C=typeof Map=="function"?new Map:void 0;return l=function(o){if(o===null||!r(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof C!="undefined"){if(C.has(o))return C.get(o);C.set(o,P)}function P(){return i(o,arguments,p(this).constructor)}return P.prototype=Object.create(o.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),u(P,o)},l(h)}function i(h,C,T){return a()?i=Reflect.construct:i=function(P,O,y){var x=[null];x.push.apply(x,O);var E=Function.bind.apply(P,x),_=new E;return y&&u(_,y.prototype),_},i.apply(null,arguments)}function a(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(h){return!1}}function r(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function u(h,C){return u=Object.setPrototypeOf||function(o,P){return o.__proto__=P,o},u(h,C)}function p(h){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},p(h)}function m(){return m=Object.assign||function(h){for(var C=1;C<arguments.length;C++){var T=arguments[C];for(var o in T)Object.prototype.hasOwnProperty.call(T,o)&&(h[o]=T[o])}return h},m.apply(this,arguments)}function b(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(h){}return!1}var g=function(){function h(T){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=T.fetchSetup||n,this.controller=new self.AbortController,this.stats=new f.LoadStats}var C=h.prototype;return C.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},C.abortInternal=function(){var o=this.response;(!o||!o.ok)&&(this.stats.aborted=!0,this.controller.abort())},C.abort=function(){var o;this.abortInternal(),(o=this.callbacks)!==null&&o!==void 0&&o.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},C.load=function(o,P,O){var y=this,x=this.stats;if(x.loading.start)throw new Error("Loader can only be used once.");x.loading.start=self.performance.now();var E=v(o,this.controller.signal),_=O.onProgress,N=o.responseType==="arraybuffer",j=N?"byteLength":"length";this.context=o,this.config=P,this.callbacks=O,this.request=this.fetchSetup(o,E),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){y.abortInternal(),O.onTimeout(x,o,y.response)},P.timeout),self.fetch(this.request).then(function(M){if(y.response=y.loader=M,!M.ok){var H=M.status,z=M.statusText;throw new d(z||"fetch, bad network response",H,M)}return x.loading.first=Math.max(self.performance.now(),x.loading.start),x.total=parseInt(M.headers.get("Content-Length")||"0"),_&&Object(R.isFiniteNumber)(P.highWaterMark)?y.loadProgressively(M,x,o,P.highWaterMark,_):N?M.arrayBuffer():M.text()}).then(function(M){var H=y.response;self.clearTimeout(y.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=M[j];var z={url:H.url,data:M};_&&!Object(R.isFiniteNumber)(P.highWaterMark)&&_(x,o,M,H),O.onSuccess(z,x,o,H)}).catch(function(M){if(self.clearTimeout(y.requestTimeout),x.aborted)return;var H=M.code||0;O.onError({code:H,text:M.message},o,M.details)})},C.getCacheAge=function(){var o=null;if(this.response){var P=this.response.headers.get("age");o=P?parseFloat(P):null}return o},C.loadProgressively=function(o,P,O,y,x){y===void 0&&(y=0);var E=new s.default,_=o.body.getReader(),N=function j(){return _.read().then(function(M){if(M.done)return E.dataLength&&x(P,O,E.flush(),o),Promise.resolve(new ArrayBuffer(0));var H=M.value,z=H.length;return P.loaded+=z,z<y||E.dataLength?(E.push(H),E.dataLength>=y&&x(P,O,E.flush(),o)):x(P,O,H,o),j()}).catch(function(){return Promise.reject()})};return N()},h}();function v(h,C){var T={method:"GET",mode:"cors",credentials:"same-origin",signal:C,headers:new self.Headers(m({},h.headers))};return h.rangeEnd&&T.headers.set("Range","bytes="+h.rangeStart+"-"+String(h.rangeEnd-1)),T}function n(h,C){return new self.Request(h.url,C)}var d=function(h){w(C,h);function C(T,o,P){var O;return O=h.call(this,T)||this,O.code=void 0,O.details=void 0,O.code=o,O.details=P,O}return C}(l(Error));c.default=g},"./src/utils/imsc1-ttml-parser.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"IMSC1_CODEC",function(){return r}),S.d(c,"parseIMSC1",function(){return b});var R=S("./src/utils/mp4-tools.ts"),f=S("./src/utils/vttparser.ts"),s=S("./src/utils/vttcue.ts"),w=S("./src/demux/id3.ts"),l=S("./src/utils/timescale-conversion.ts"),i=S("./src/utils/webvtt-parser.ts");function a(){return a=Object.assign||function(y){for(var x=1;x<arguments.length;x++){var E=arguments[x];for(var _ in E)Object.prototype.hasOwnProperty.call(E,_)&&(y[_]=E[_])}return y},a.apply(this,arguments)}var r="stpp.ttml.im1t",u=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,p=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,m={left:"start",center:"center",right:"end",start:"start",end:"end"};function b(y,x,E,_,N){var j=Object(R.findBox)(new Uint8Array(y),["mdat"]);if(j.length===0){N(new Error("Could not parse IMSC1 mdat"));return}var M=j[0],H=Object(w.utf8ArrayToStr)(new Uint8Array(y,M.start,M.end-M.start)),z=Object(l.toTimescaleFromScale)(x,1,E);try{_(g(H,z))}catch(F){N(F)}}function g(y,x){var E=new DOMParser,_=E.parseFromString(y,"text/xml"),N=_.getElementsByTagName("tt")[0];if(!N)throw new Error("Invalid ttml");var j={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},M=Object.keys(j).reduce(function(B,K){return B[K]=N.getAttribute("ttp:"+K)||j[K],B},{}),H=N.getAttribute("xml:space")!=="preserve",z=n(v(N,"styling","style")),F=n(v(N,"layout","region")),G=v(N,"body","[begin]");return[].map.call(G,function(B){var K=d(B,H);if(!K||!B.hasAttribute("begin"))return null;var W=o(B.getAttribute("begin"),M),J=o(B.getAttribute("dur"),M),ee=o(B.getAttribute("end"),M);if(W===null)throw T(B);if(ee===null){if(J===null)throw T(B);ee=W+J}var Z=new s.default(W-x,ee-x,K);Z.id=Object(i.generateCueId)(Z.startTime,Z.endTime,Z.text);var he=F[B.getAttribute("region")],ge=z[B.getAttribute("style")];Z.position=10,Z.size=80;var ie=h(he,ge),we=ie.textAlign;if(we){var me=m[we];me&&(Z.lineAlign=me),Z.align=we}return a(Z,ie),Z}).filter(function(B){return B!==null})}function v(y,x,E){var _=y.getElementsByTagName(x)[0];return _?[].slice.call(_.querySelectorAll(E)):[]}function n(y){return y.reduce(function(x,E){var _=E.getAttribute("xml:id");return _&&(x[_]=E),x},{})}function d(y,x){return[].slice.call(y.childNodes).reduce(function(E,_,N){var j;return _.nodeName==="br"&&N?E+`
`:(j=_.childNodes)!==null&&j!==void 0&&j.length?d(_,x):x?E+_.textContent.trim().replace(/\s+/g," "):E+_.textContent},"")}function h(y,x){var E="http://www.w3.org/ns/ttml#styling",_=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return _.reduce(function(N,j){var M=C(x,E,j)||C(y,E,j);return M&&(N[j]=M),N},{})}function C(y,x,E){return y.hasAttributeNS(x,E)?y.getAttributeNS(x,E):null}function T(y){return new Error("Could not parse ttml timestamp "+y)}function o(y,x){if(!y)return null;var E=Object(f.parseTimeStamp)(y);return E===null&&(u.test(y)?E=P(y,x):p.test(y)&&(E=O(y,x))),E}function P(y,x){var E=u.exec(y),_=(E[4]|0)+(E[5]|0)/x.subFrameRate;return(E[1]|0)*3600+(E[2]|0)*60+(E[3]|0)+_/x.frameRate}function O(y,x){var E=p.exec(y),_=Number(E[1]),N=E[2];switch(N){case"h":return _*3600;case"m":return _*60;case"ms":return _*1e3;case"f":return _/x.frameRate;case"t":return _/x.tickRate}return _}},"./src/utils/logger.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"enableLogs",function(){return i}),S.d(c,"logger",function(){return a});var R=function(){},f={trace:R,debug:R,log:R,warn:R,info:R,error:R},s=f;function w(r){var u=self.console[r];return u?u.bind(self.console,"["+r+"] >"):R}function l(r){for(var u=arguments.length,p=new Array(u>1?u-1:0),m=1;m<u;m++)p[m-1]=arguments[m];p.forEach(function(b){s[b]=r[b]?r[b].bind(r):w(b)})}function i(r){if(self.console&&r===!0||typeof r=="object"){l(r,"debug","log","info","warn","error");try{s.log()}catch(u){s=f}}else s=f}var a=s},"./src/utils/mediakeys-helper.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"KeySystems",function(){return R}),S.d(c,"requestMediaKeySystemAccess",function(){return f});var R;(function(s){s.WIDEVINE="com.widevine.alpha",s.PLAYREADY="com.microsoft.playready"})(R||(R={}));var f=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"getMediaSource",function(){return R});function R(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"bin2str",function(){return l}),S.d(c,"readUint16",function(){return i}),S.d(c,"readUint32",function(){return a}),S.d(c,"writeUint32",function(){return r}),S.d(c,"findBox",function(){return u}),S.d(c,"parseSegmentIndex",function(){return p}),S.d(c,"parseInitSegment",function(){return m}),S.d(c,"getStartDTS",function(){return b}),S.d(c,"getDuration",function(){return g}),S.d(c,"computeRawDurationFromSamples",function(){return v}),S.d(c,"offsetStartDTS",function(){return n}),S.d(c,"segmentValidRange",function(){return d}),S.d(c,"appendUint8Array",function(){return h});var R=S("./src/utils/typed-array.ts"),f=S("./src/loader/fragment.ts"),s=Math.pow(2,32)-1,w=[].push;function l(C){return String.fromCharCode.apply(null,C)}function i(C,T){"data"in C&&(T+=C.start,C=C.data);var o=C[T]<<8|C[T+1];return o<0?65536+o:o}function a(C,T){"data"in C&&(T+=C.start,C=C.data);var o=C[T]<<24|C[T+1]<<16|C[T+2]<<8|C[T+3];return o<0?4294967296+o:o}function r(C,T,o){"data"in C&&(T+=C.start,C=C.data),C[T]=o>>24,C[T+1]=o>>16&255,C[T+2]=o>>8&255,C[T+3]=o&255}function u(C,T){var o=[];if(!T.length)return o;var P,O,y;"data"in C?(P=C.data,O=C.start,y=C.end):(P=C,O=0,y=P.byteLength);for(var x=O;x<y;){var E=a(P,x),_=l(P.subarray(x+4,x+8)),N=E>1?x+E:y;if(_===T[0])if(T.length===1)o.push({data:P,start:x+8,end:N});else{var j=u({data:P,start:x+8,end:N},T.slice(1));j.length&&w.apply(o,j)}x=N}return o}function p(C){var T=u(C,["moov"]),o=T[0],P=o?o.end:null,O=u(C,["sidx"]);if(!O||!O[0])return null;var y=[],x=O[0],E=x.data[0],_=E===0?8:16,N=a(x,_);_+=4;var j=0,M=0;E===0?_+=8:_+=16,_+=2;var H=x.end+M,z=i(x,_);_+=2;for(var F=0;F<z;F++){var G=_,B=a(x,G);G+=4;var K=B&2147483647,W=(B&2147483648)>>>31;if(W===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var J=a(x,G);G+=4,y.push({referenceSize:K,subsegmentDuration:J,info:{duration:J/N,start:H,end:H+K-1}}),H+=K,G+=4,_=G}return{earliestPresentationTime:j,timescale:N,version:E,referencesCount:z,references:y,moovEndOffset:P}}function m(C){for(var T=[],o=u(C,["moov","trak"]),P=0;P<o.length;P++){var O=o[P],y=u(O,["tkhd"])[0];if(y){var x=y.data[y.start],E=x===0?12:20,_=a(y,E),N=u(O,["mdia","mdhd"])[0];if(N){x=N.data[N.start],E=x===0?12:20;var j=a(N,E),M=u(O,["mdia","hdlr"])[0];if(M){var H=l(M.data.subarray(M.start+8,M.start+12)),z={soun:f.ElementaryStreamTypes.AUDIO,vide:f.ElementaryStreamTypes.VIDEO}[H];if(z){var F=u(O,["mdia","minf","stbl","stsd"])[0],G=void 0;F&&(G=l(F.data.subarray(F.start+12,F.start+16))),T[_]={timescale:j,type:z},T[z]={timescale:j,id:_,codec:G}}}}}}var B=u(C,["moov","mvex","trex"]);return B.forEach(function(K){var W=a(K,4),J=T[W];J&&(J.default={duration:a(K,12),flags:a(K,20)})}),T}function b(C,T){return u(T,["moof","traf"]).reduce(function(o,P){var O=u(P,["tfdt"])[0],y=O.data[O.start],x=u(P,["tfhd"]).reduce(function(E,_){var N=a(_,4),j=C[N];if(j){var M=a(O,4);y===1&&(M*=Math.pow(2,32),M+=a(O,8));var H=j.timescale||9e4,z=M/H;if(isFinite(z)&&(E===null||z<E))return z}return E},null);return x!==null&&isFinite(x)&&(o===null||x<o)?x:o},null)||0}function g(C,T){for(var o=0,P=0,O=0,y=u(C,["moof","traf"]),x=0;x<y.length;x++){var E=y[x],_=u(E,["tfhd"])[0],N=a(_,4),j=T[N];if(!j)continue;var M=j.default,H=a(_,0)|(M==null?void 0:M.flags),z=M==null?void 0:M.duration;H&8&&(H&2?z=a(_,12):z=a(_,8));for(var F=j.timescale||9e4,G=u(E,["trun"]),B=0;B<G.length;B++){if(z){var K=a(G[B],4);o=z*K}else o=v(G[B]);j.type===f.ElementaryStreamTypes.VIDEO?P+=o/F:j.type===f.ElementaryStreamTypes.AUDIO&&(O+=o/F)}}if(P===0&&O===0){var W=p(C);if(W!=null&&W.references)return W.references.reduce(function(J,ee){return J+ee.info.duration||0},0)}return P||O}function v(C){var T=a(C,0),o=8;T&1&&(o+=4),T&4&&(o+=4);for(var P=0,O=a(C,4),y=0;y<O;y++){if(T&256){var x=a(C,o);P+=x,o+=4}T&512&&(o+=4),T&1024&&(o+=4),T&2048&&(o+=4)}return P}function n(C,T,o){u(T,["moof","traf"]).forEach(function(P){u(P,["tfhd"]).forEach(function(O){var y=a(O,4),x=C[y];if(!x)return;var E=x.timescale||9e4;u(P,["tfdt"]).forEach(function(_){var N=_.data[_.start],j=a(_,4);if(N===0)r(_,4,j-o*E);else{j*=Math.pow(2,32),j+=a(_,8),j-=o*E,j=Math.max(j,0);var M=Math.floor(j/(s+1)),H=Math.floor(j%(s+1));r(_,4,M),r(_,8,H)}})})})}function d(C){var T={valid:null,remainder:null},o=u(C,["moof"]);if(o){if(o.length<2)return T.remainder=C,T}else return T;var P=o[o.length-1];return T.valid=Object(R.sliceUint8)(C,0,P.start-8),T.remainder=Object(R.sliceUint8)(C,P.start-8),T}function h(C,T){var o=new Uint8Array(C.length+T.length);return o.set(C),o.set(T,C.length),o}},"./src/utils/output-filter.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"default",function(){return R});var R=function(){function f(w,l){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=w,this.trackName=l}var s=f.prototype;return s.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},s.newCue=function(l,i,a){(this.startTime===null||this.startTime>l)&&(this.startTime=l),this.endTime=i,this.screen=a,this.timelineController.createCaptionsTrack(this.trackName)},s.reset=function(){this.cueRanges=[]},f}()},"./src/utils/texttrack-utils.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"sendAddTrackEvent",function(){return f}),S.d(c,"addCueToTrack",function(){return s}),S.d(c,"clearCurrentCues",function(){return w}),S.d(c,"removeCuesInRange",function(){return l}),S.d(c,"getCuesInRange",function(){return a});var R=S("./src/utils/logger.ts");function f(r,u){var p;try{p=new Event("addtrack")}catch(m){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=r,u.dispatchEvent(p)}function s(r,u){var p=r.mode;if(p==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(u.id))try{if(r.addCue(u),!r.cues.getCueById(u.id))throw new Error("addCue is failed for: "+u)}catch(b){R.logger.debug("[texttrack-utils]: "+b);var m=new self.TextTrackCue(u.startTime,u.endTime,u.text);m.id=u.id,r.addCue(m)}p==="disabled"&&(r.mode=p)}function w(r){var u=r.mode;if(u==="disabled"&&(r.mode="hidden"),r.cues)for(var p=r.cues.length;p--;)r.removeCue(r.cues[p]);u==="disabled"&&(r.mode=u)}function l(r,u,p){var m=r.mode;if(m==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var b=a(r.cues,u,p),g=0;g<b.length;g++)r.removeCue(b[g]);m==="disabled"&&(r.mode=m)}function i(r,u){if(u<r[0].startTime)return 0;var p=r.length-1;if(u>r[p].endTime)return-1;for(var m=0,b=p;m<=b;){var g=Math.floor((b+m)/2);if(u<r[g].startTime)b=g-1;else if(u>r[g].startTime&&m<p)m=g+1;else return g}return r[m].startTime-u<u-r[b].startTime?m:b}function a(r,u,p){var m=[],b=i(r,u);if(b>-1)for(var g=b,v=r.length;g<v;g++){var n=r[g];if(n.startTime>=u&&n.endTime<=p)m.push(n);else if(n.startTime>p)return m}return m}},"./src/utils/time-ranges.ts":function(L,c,S){"use strict";S.r(c);var R={toString:function(s){for(var w="",l=s.length,i=0;i<l;i++)w+="["+s.start(i).toFixed(3)+","+s.end(i).toFixed(3)+"]";return w}};c.default=R},"./src/utils/timescale-conversion.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"toTimescaleFromBase",function(){return f}),S.d(c,"toTimescaleFromScale",function(){return s}),S.d(c,"toMsFromMpegTsClock",function(){return w}),S.d(c,"toMpegTsClockFromTimescale",function(){return l});var R=9e4;function f(i,a,r,u){r===void 0&&(r=1),u===void 0&&(u=!1);var p=i*a*r;return u?Math.round(p):p}function s(i,a,r,u){return r===void 0&&(r=1),u===void 0&&(u=!1),f(i,a,1/r,u)}function w(i,a){return a===void 0&&(a=!1),f(i,1e3,1/R,a)}function l(i,a){return a===void 0&&(a=1),f(i,R,1/a)}},"./src/utils/typed-array.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"sliceUint8",function(){return R});function R(f,s,w){return Uint8Array.prototype.slice?f.slice(s,w):new Uint8Array(Array.prototype.slice.call(f,s,w))}},"./src/utils/vttcue.ts":function(L,c,S){"use strict";S.r(c),c.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var R=["","lr","rl"],f=["start","middle","end","left","right"];function s(r,u){if(typeof u!="string")return!1;if(!Array.isArray(r))return!1;var p=u.toLowerCase();return~r.indexOf(p)?p:!1}function w(r){return s(R,r)}function l(r){return s(f,r)}function i(r){for(var u=arguments.length,p=new Array(u>1?u-1:0),m=1;m<u;m++)p[m-1]=arguments[m];for(var b=1;b<arguments.length;b++){var g=arguments[b];for(var v in g)r[v]=g[v]}return r}function a(r,u,p){var m=this,b={enumerable:!0};m.hasBeenReset=!1;var g="",v=!1,n=r,d=u,h=p,C=null,T="",o=!0,P="auto",O="start",y=50,x="middle",E=50,_="middle";Object.defineProperty(m,"id",i({},b,{get:function(){return g},set:function(j){g=""+j}})),Object.defineProperty(m,"pauseOnExit",i({},b,{get:function(){return v},set:function(j){v=!!j}})),Object.defineProperty(m,"startTime",i({},b,{get:function(){return n},set:function(j){if(typeof j!="number")throw new TypeError("Start time must be set to a number.");n=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"endTime",i({},b,{get:function(){return d},set:function(j){if(typeof j!="number")throw new TypeError("End time must be set to a number.");d=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"text",i({},b,{get:function(){return h},set:function(j){h=""+j,this.hasBeenReset=!0}})),Object.defineProperty(m,"region",i({},b,{get:function(){return C},set:function(j){C=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"vertical",i({},b,{get:function(){return T},set:function(j){var M=w(j);if(M===!1)throw new SyntaxError("An invalid or illegal string was specified.");T=M,this.hasBeenReset=!0}})),Object.defineProperty(m,"snapToLines",i({},b,{get:function(){return o},set:function(j){o=!!j,this.hasBeenReset=!0}})),Object.defineProperty(m,"line",i({},b,{get:function(){return P},set:function(j){if(typeof j!="number"&&j!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");P=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"lineAlign",i({},b,{get:function(){return O},set:function(j){var M=l(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");O=M,this.hasBeenReset=!0}})),Object.defineProperty(m,"position",i({},b,{get:function(){return y},set:function(j){if(j<0||j>100)throw new Error("Position must be between 0 and 100.");y=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"positionAlign",i({},b,{get:function(){return x},set:function(j){var M=l(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");x=M,this.hasBeenReset=!0}})),Object.defineProperty(m,"size",i({},b,{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(m,"align",i({},b,{get:function(){return _},set:function(j){var M=l(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");_=M,this.hasBeenReset=!0}})),m.displayState=void 0}return a.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"parseTimeStamp",function(){return s}),S.d(c,"fixLineBreaks",function(){return u}),S.d(c,"VTTParser",function(){return p});var R=S("./src/utils/vttcue.ts"),f=function(){function m(){}var b=m.prototype;return b.decode=function(v,n){if(!v)return"";if(typeof v!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(v))},m}();function s(m){function b(v,n,d,h){return(v|0)*3600+(n|0)*60+(d|0)+parseFloat(h||0)}var g=m.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return g?parseFloat(g[2])>59?b(g[2],g[3],0,g[4]):b(g[1],g[2],g[3],g[4]):null}var w=function(){function m(){this.values=Object.create(null)}var b=m.prototype;return b.set=function(v,n){!this.get(v)&&n!==""&&(this.values[v]=n)},b.get=function(v,n,d){return d?this.has(v)?this.values[v]:n[d]:this.has(v)?this.values[v]:n},b.has=function(v){return v in this.values},b.alt=function(v,n,d){for(var h=0;h<d.length;++h)if(n===d[h]){this.set(v,n);break}},b.integer=function(v,n){/^-?\d+$/.test(n)&&this.set(v,parseInt(n,10))},b.percent=function(v,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var d=parseFloat(n);if(d>=0&&d<=100)return this.set(v,d),!0}return!1},m}();function l(m,b,g,v){var n=v?m.split(v):[m];for(var d in n){if(typeof n[d]!="string")continue;var h=n[d].split(g);if(h.length!==2)continue;var C=h[0],T=h[1];b(C,T)}}var i=new R.default(0,0,""),a=i.align==="middle"?"middle":"center";function r(m,b,g){var v=m;function n(){var C=s(m);if(C===null)throw new Error("Malformed timestamp: "+v);return m=m.replace(/^[^\sa-zA-Z-]+/,""),C}function d(C,T){var o=new w;l(C,function(y,x){var E;switch(y){case"region":for(var _=g.length-1;_>=0;_--)if(g[_].id===x){o.set(y,g[_].region);break}break;case"vertical":o.alt(y,x,["rl","lr"]);break;case"line":E=x.split(","),o.integer(y,E[0]),o.percent(y,E[0])&&o.set("snapToLines",!1),o.alt(y,E[0],["auto"]),E.length===2&&o.alt("lineAlign",E[1],["start",a,"end"]);break;case"position":E=x.split(","),o.percent(y,E[0]),E.length===2&&o.alt("positionAlign",E[1],["start",a,"end","line-left","line-right","auto"]);break;case"size":o.percent(y,x);break;case"align":o.alt(y,x,["start",a,"end","left","right"]);break}},/:/,/\s/),T.region=o.get("region",null),T.vertical=o.get("vertical","");var P=o.get("line","auto");P==="auto"&&i.line===-1&&(P=-1),T.line=P,T.lineAlign=o.get("lineAlign","start"),T.snapToLines=o.get("snapToLines",!0),T.size=o.get("size",100),T.align=o.get("align",a);var O=o.get("position","auto");O==="auto"&&i.position===50&&(O=T.align==="start"||T.align==="left"?0:T.align==="end"||T.align==="right"?100:50),T.position=O}function h(){m=m.replace(/^\s+/,"")}if(h(),b.startTime=n(),h(),m.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+v);m=m.substr(3),h(),b.endTime=n(),h(),d(m,b)}function u(m){return m.replace(/<br(?: \/)?>/gi,`
`)}var p=function(){function m(){this.state="INITIAL",this.buffer="",this.decoder=new f,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var b=m.prototype;return b.parse=function(v){var n=this;v&&(n.buffer+=n.decoder.decode(v,{stream:!0}));function d(){var O=n.buffer,y=0;for(O=u(O);y<O.length&&O[y]!=="\r"&&O[y]!==`
`;)++y;var x=O.substr(0,y);return O[y]==="\r"&&++y,O[y]===`
`&&++y,n.buffer=O.substr(y),x}function h(O){l(O,function(y,x){},/:/)}try{var C="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;C=d();var T=C.match(/^()?WEBVTT([ \t].*)?$/);if(!T||!T[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var o=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;o?o=!1:C=d();switch(n.state){case"HEADER":/:/.test(C)?h(C):C||(n.state="ID");continue;case"NOTE":C||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(C)){n.state="NOTE";break}if(!C)continue;if(n.cue=new R.default(0,0,""),n.state="CUE",C.indexOf("-->")===-1){n.cue.id=C;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{r(C,n.cue,n.regionList)}catch(O){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var P=C.indexOf("-->")!==-1;if(!C||P&&(o=!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+=C}continue;case"BADCUE":C||(n.state="ID")}}}catch(O){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},b.flush=function(){var v=this;try{if((v.cue||v.state==="HEADER")&&(v.buffer+=`
`,v.parse()),v.state==="INITIAL"||v.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){v.onparsingerror&&v.onparsingerror(n)}return v.onflush&&v.onflush(),this},m}()},"./src/utils/webvtt-parser.ts":function(L,c,S){"use strict";S.r(c),S.d(c,"generateCueId",function(){return p}),S.d(c,"parseWebVTT",function(){return b});var R=S("./src/polyfills/number.ts"),f=S("./src/utils/vttparser.ts"),s=S("./src/demux/id3.ts"),w=S("./src/utils/timescale-conversion.ts"),l=S("./src/remux/mp4-remuxer.ts"),i=/\r\n|\n\r|\n|\r/g,a=function(v,n,d){return d===void 0&&(d=0),v.substr(d,n.length)===n},r=function(v){var n=parseInt(v.substr(-3)),d=parseInt(v.substr(-6,2)),h=parseInt(v.substr(-9,2)),C=v.length>9?parseInt(v.substr(0,v.indexOf(":"))):0;if(!Object(R.isFiniteNumber)(n)||!Object(R.isFiniteNumber)(d)||!Object(R.isFiniteNumber)(h)||!Object(R.isFiniteNumber)(C))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+v);return n+=1e3*d,n+=60*1e3*h,n+=60*60*1e3*C,n},u=function(v){for(var n=5381,d=v.length;d;)n=n*33^v.charCodeAt(--d);return(n>>>0).toString()};function p(g,v,n){return u(g.toString())+u(v.toString())+u(n)}var m=function(v,n,d){var h=v[n],C=v[h.prevCC];if(!C||!C.new&&h.new){v.ccOffset=v.presentationOffset=h.start,h.new=!1;return}for(;(T=C)!==null&&T!==void 0&&T.new;){var T;v.ccOffset+=h.start-C.start,h.new=!1,h=C,C=v[h.prevCC]}v.presentationOffset=d};function b(g,v,n,d,h,C,T,o){var P=new f.VTTParser,O=Object(s.utf8ArrayToStr)(new Uint8Array(g)).trim().replace(i,`
`).split(`
`),y=[],x=Object(w.toMpegTsClockFromTimescale)(v,n),E="00:00.000",_=0,N=0,j,M=!0,H=!1;P.oncue=function(z){var F=d[h],G=d.ccOffset,B=(_-x)/9e4;if(F!=null&&F.new&&(N!==void 0?G=d.ccOffset=F.start:m(d,h,B)),B&&(G=B-d.presentationOffset),H){var K=z.endTime-z.startTime,W=Object(l.normalizePts)((z.startTime+G-N)*9e4,C*9e4)/9e4;z.startTime=W,z.endTime=W+K}var J=z.text.trim();z.text=decodeURIComponent(encodeURIComponent(J)),z.id||(z.id=p(z.startTime,z.endTime,J)),z.endTime>0&&y.push(z)},P.onparsingerror=function(z){j=z},P.onflush=function(){if(j){o(j);return}T(y)},O.forEach(function(z){if(M)if(a(z,"X-TIMESTAMP-MAP=")){M=!1,H=!0,z.substr(16).split(",").forEach(function(F){a(F,"LOCAL:")?E=F.substr(6):a(F,"MPEGTS:")&&(_=parseInt(F.substr(7)))});try{N=r(E)/1e3}catch(F){H=!1,j=F}return}else z===""&&(M=!1);P.parse(z+`
`)}),P.flush()}},"./src/utils/xhr-loader.ts":function(L,c,S){"use strict";S.r(c);var R=S("./src/utils/logger.ts"),f=S("./src/loader/load-stats.ts"),s=/^age:\s*[\d.]+\s*$/m,w=function(){function l(a){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=a?a.xhrSetup:null,this.stats=new f.LoadStats,this.retryDelay=0}var i=l.prototype;return i.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},i.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()))},i.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!==null&&r!==void 0&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},i.load=function(r,u,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=u,this.callbacks=p,this.retryDelay=u.retryDelay,this.loadInternal()},i.loadInternal=function(){var r=this.config,u=this.context;if(!r)return;var p=this.loader=new self.XMLHttpRequest,m=this.stats;m.loading.first=0,m.loaded=0;var b=this.xhrSetup;try{if(b)try{b(p,u.url)}catch(n){p.open("GET",u.url,!0),b(p,u.url)}p.readyState||p.open("GET",u.url,!0);var g=this.context.headers;if(g)for(var v in g)p.setRequestHeader(v,g[v])}catch(n){this.callbacks.onError({code:p.status,text:n.message},u,p);return}u.rangeEnd&&p.setRequestHeader("Range","bytes="+u.rangeStart+"-"+(u.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=u.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),p.send()},i.readystatechange=function(){var r=this.context,u=this.loader,p=this.stats;if(!r||!u)return;var m=u.readyState,b=this.config;if(p.aborted)return;if(m>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),m===4){u.onreadystatechange=null,u.onprogress=null;var g=u.status;if(g>=200&&g<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var v,n;if(r.responseType==="arraybuffer"?(v=u.response,n=v.byteLength):(v=u.responseText,n=v.length),p.loaded=p.total=n,!this.callbacks)return;var d=this.callbacks.onProgress;if(d&&d(p,r,v,u),!this.callbacks)return;var h={url:u.responseURL,data:v};this.callbacks.onSuccess(h,p,r,u)}else p.retry>=b.maxRetry||g>=400&&g<499?(R.logger.error(g+" while loading "+r.url),this.callbacks.onError({code:g,text:u.statusText},r,u)):(R.logger.warn(g+" 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,b.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),b.timeout)},i.loadtimeout=function(){R.logger.warn("timeout while loading "+this.context.url);var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))},i.loadprogress=function(r){var u=this.stats;u.loaded=r.loaded,r.lengthComputable&&(u.total=r.total)},i.getCacheAge=function(){var r=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var u=this.loader.getResponseHeader("age");r=u?parseFloat(u):null}return r},l}();c.default=w}}).default})},vHTk:function(I,Y,k){I.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.StreamCipher,f=c.algo,s=f.RC4=R.extend({_doReset:function(){for(var i=this._key,a=i.words,r=i.sigBytes,u=this._S=[],p=0;p<256;p++)u[p]=p;for(var p=0,m=0;p<256;p++){var b=p%r,g=a[b>>>2]>>>24-b%4*8&255;m=(m+u[p]+g)%256;var v=u[p];u[p]=u[m],u[m]=v}this._i=this._j=0},_doProcessBlock:function(i,a){i[a]^=w.call(this)},keySize:256/32,ivSize:0});function w(){for(var i=this._S,a=this._i,r=this._j,u=0,p=0;p<4;p++){a=(a+1)%256,r=(r+i[a])%256;var m=i[a];i[a]=i[r],i[r]=m,u|=i[(i[a]+i[r])%256]<<24-p*8}return this._i=a,this._j=r,u}c.RC4=R._createHelper(s);var l=f.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var i=this.cfg.drop;i>0;i--)w.call(this)}});c.RC4Drop=R._createHelper(l)}(),L.RC4})},wCXF:function(I,Y,k){"use strict";k.d(Y,"a",function(){return Ye});var L=k("rePB"),c=k("VTBJ"),S=k("KQm4"),R=k("U8pU"),f=k("ODXe"),s=k("cDcd"),w=k("TSYQ"),l=k.n(w),i=k("Gytx"),a=k.n(i),r=k("Kwbf"),u=k("t23M"),p=k("qx4F"),m=k("6eGT"),b=k("IBYe"),g=k("Ff2n"),v=k("c+Xe"),n=k("fyJ8"),d=k("biw7");function h(Me,Se,Ge,tt,Ue){var Xe=Ge[Me]||{},Pe=Ge[Se]||{},Te,Ae;Xe.fixed==="left"?Te=tt.left[Me]:Pe.fixed==="right"&&(Ae=tt.right[Se]);var ce=!1,Ee=!1,_e=!1,De=!1,je=Ge[Se+1],$e=Ge[Me-1];if(Ue==="rtl"){if(Te!==void 0){var at=$e&&$e.fixed==="left";De=!at}else if(Ae!==void 0){var it=je&&je.fixed==="right";_e=!it}}else if(Te!==void 0){var st=je&&je.fixed==="left";ce=!st}else if(Ae!==void 0){var Je=$e&&$e.fixed==="right";Ee=!Je}return{fixLeft:Te,fixRight:Ae,lastFixLeft:ce,firstFixRight:Ee,lastFixRight:_e,firstFixLeft:De,isSticky:tt.isSticky}}var C=k("sR1s");function T(Me){var Se=Me.cells,Ge=Me.stickyOffsets,tt=Me.flattenColumns,Ue=Me.rowComponent,Xe=Me.cellComponent,Pe=Me.onHeaderRow,Te=Me.index,Ae=s.useContext(d.a),ce=Ae.prefixCls,Ee=Ae.direction,_e;Pe&&(_e=Pe(Se.map(function(je){return je.column}),Te));var De=Object(C.a)(Se.map(function(je){return je.column}));return s.createElement(Ue,Object.assign({},_e),Se.map(function(je,$e){var at=je.column,it=h(je.colStart,je.colEnd,tt,Ge,Ee),st;return at&&at.onHeaderCell&&(st=je.column.onHeaderCell(at)),s.createElement(n.a,Object.assign({},je,{ellipsis:at.ellipsis,align:at.align,component:Xe,prefixCls:ce,key:De[$e]},it,{additionalProps:st,rowType:"header"}))}))}T.displayName="HeaderRow";var o=T;function P(Me){var Se=[];function Ge(Pe,Te){var Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Se[Ae]=Se[Ae]||[];var ce=Te,Ee=Pe.filter(Boolean).map(function(_e){var De={key:_e.key,className:_e.className||"",children:_e.title,column:_e,colStart:ce},je=1,$e=_e.children;return $e&&$e.length>0&&(je=Ge($e,ce,Ae+1).reduce(function(at,it){return at+it},0),De.hasSubColumns=!0),"colSpan"in _e&&(je=_e.colSpan),"rowSpan"in _e&&(De.rowSpan=_e.rowSpan),De.colSpan=je,De.colEnd=De.colStart+je-1,Se[Ae].push(De),ce+=je,je});return Ee}Ge(Me,0);for(var tt=Se.length,Ue=function(Te){Se[Te].forEach(function(Ae){!("rowSpan"in Ae)&&!Ae.hasSubColumns&&(Ae.rowSpan=tt-Te)})},Xe=0;Xe<tt;Xe+=1)Ue(Xe);return Se}function O(Me){var Se=Me.stickyOffsets,Ge=Me.columns,tt=Me.flattenColumns,Ue=Me.onHeaderRow,Xe=s.useContext(d.a),Pe=Xe.prefixCls,Te=Xe.getComponent,Ae=s.useMemo(function(){return P(Ge)},[Ge]),ce=Te(["header","wrapper"],"thead"),Ee=Te(["header","row"],"tr"),_e=Te(["header","cell"],"th");return s.createElement(ce,{className:"".concat(Pe,"-thead")},Ae.map(function(De,je){var $e=s.createElement(o,{key:je,flattenColumns:tt,cells:De,stickyOffsets:Se,rowComponent:Ee,cellComponent:_e,onHeaderRow:Ue,index:je});return $e}))}var y=O,x=k("hW8S");function E(Me){for(var Se=Me.colWidths,Ge=Me.columns,tt=Me.columCount,Ue=[],Xe=tt||Ge.length,Pe=!1,Te=Xe-1;Te>=0;Te-=1){var Ae=Se[Te],ce=Ge&&Ge[Te],Ee=ce&&ce[x.a];(Ae||Ee||Pe)&&(Ue.unshift(s.createElement("col",Object.assign({key:Te,style:{width:Ae,minWidth:Ae}},Ee))),Pe=!0)}return s.createElement("colgroup",null,Ue)}var _=E;function N(Me,Se){return Object(s.useMemo)(function(){for(var Ge=[],tt=0;tt<Se;tt+=1){var Ue=Me[tt];if(Ue!==void 0)Ge[tt]=Ue;else return null}return Ge},[Me.join("_"),Se])}var j=s.forwardRef(function(Me,Se){var Ge=Me.noData,tt=Me.columns,Ue=Me.flattenColumns,Xe=Me.colWidths,Pe=Me.columCount,Te=Me.stickyOffsets,Ae=Me.direction,ce=Me.fixHeader,Ee=Me.offsetHeader,_e=Me.stickyClassName,De=Me.onScroll,je=Object(g.a)(Me,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),$e=s.useContext(d.a),at=$e.prefixCls,it=$e.scrollbarSize,st=$e.isSticky,Je=st&&!ce?0:it,gt=s.useRef(null),yt=s.useCallback(function(ir){Object(v.b)(Se,ir),Object(v.b)(gt,ir)},[]);s.useEffect(function(){var ir;function Yt(It){var Ht=It.currentTarget,Ur=It.deltaX;Ur&&(De({currentTarget:Ht,scrollLeft:Ht.scrollLeft+Ur}),It.preventDefault())}return(ir=gt.current)===null||ir===void 0||ir.addEventListener("wheel",Yt),function(){var It;(It=gt.current)===null||It===void 0||It.removeEventListener("wheel",Yt)}},[]);var ct=Ue[Ue.length-1],Lt={fixed:ct?ct.fixed:null,onHeaderCell:function(){return{className:"".concat(at,"-cell-scrollbar")}}},kt=Object(s.useMemo)(function(){return Je?[].concat(Object(S.a)(tt),[Lt]):tt},[Je,tt]),Ct=Object(s.useMemo)(function(){return Je?[].concat(Object(S.a)(Ue),[Lt]):Ue},[Je,Ue]),Ft=Object(s.useMemo)(function(){var ir=Te.right,Yt=Te.left;return Object(c.a)(Object(c.a)({},Te),{},{left:Ae==="rtl"?[].concat(Object(S.a)(Yt.map(function(It){return It+Je})),[0]):Yt,right:Ae==="rtl"?ir:[].concat(Object(S.a)(ir.map(function(It){return It+Je})),[0]),isSticky:st})},[Je,Te,st]),Et=N(Xe,Pe);return s.createElement("div",{style:Object(c.a)({overflow:"hidden"},st?{top:Ee}:{}),ref:yt,className:l()("".concat(at,"-header"),Object(L.a)({},_e,!!_e))},s.createElement("table",{style:{tableLayout:"fixed",visibility:Ge||Et?null:"hidden"}},s.createElement(_,{colWidths:Et?[].concat(Object(S.a)(Et),[Je]):[],columCount:Pe+1,columns:Ct}),s.createElement(y,Object.assign({},je,{stickyOffsets:Ft,columns:kt,flattenColumns:Ct}))))});j.displayName="FixedHeader";var M=j,H=s.createContext(null),z=H;function F(Me){var Se=Me.prefixCls,Ge=Me.children,tt=Me.component,Ue=Me.cellComponent,Xe=Me.fixHeader,Pe=Me.fixColumn,Te=Me.horizonScroll,Ae=Me.className,ce=Me.expanded,Ee=Me.componentWidth,_e=Me.colSpan,De=s.useContext(d.a),je=De.scrollbarSize;return s.useMemo(function(){var $e=Ge;return Pe&&($e=s.createElement("div",{style:{width:Ee-(Xe?je:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Se,"-expanded-row-fixed")},$e)),s.createElement(tt,{className:Ae,style:{display:ce?null:"none"}},s.createElement(n.a,{component:Ue,prefixCls:Se,colSpan:_e},$e))},[Ge,tt,Xe,Te,Ae,ce,Ee,_e,je])}var G=F;function B(Me){var Se=Me.className,Ge=Me.style,tt=Me.record,Ue=Me.index,Xe=Me.rowKey,Pe=Me.getRowKey,Te=Me.rowExpandable,Ae=Me.expandedKeys,ce=Me.onRow,Ee=Me.indent,_e=Ee===void 0?0:Ee,De=Me.rowComponent,je=Me.cellComponent,$e=Me.childrenColumnName,at=s.useContext(d.a),it=at.prefixCls,st=at.fixedInfoList,Je=s.useContext(z),gt=Je.fixHeader,yt=Je.fixColumn,ct=Je.horizonScroll,Lt=Je.componentWidth,kt=Je.flattenColumns,Ct=Je.expandableType,Ft=Je.expandRowByClick,Et=Je.onTriggerExpand,ir=Je.rowClassName,Yt=Je.expandedRowClassName,It=Je.indentSize,Ht=Je.expandIcon,Ur=Je.expandedRowRender,cn=Je.expandIconColumnIndex,gr=s.useState(!1),zn=Object(f.a)(gr,2),vt=zn[0],_t=zn[1],mt=Ae&&Ae.has(Me.recordKey);s.useEffect(function(){mt&&_t(!0)},[mt]);var mr=Ct==="row"&&(!Te||Te(tt)),Cr=Ct==="nest",Bt=$e&&tt&&tt[$e],Rt=mr||Cr,Er;ce&&(Er=ce(tt,Ue));var yn=function(Ot){if(Ft&&Rt&&Et(tt,Ot),Er&&Er.onClick){for(var dn,Kr=arguments.length,Or=new Array(Kr>1?Kr-1:0),sr=1;sr<Kr;sr++)Or[sr-1]=arguments[sr];(dn=Er).onClick.apply(dn,[Ot].concat(Or))}},Ir;typeof ir=="string"?Ir=ir:typeof ir=="function"&&(Ir=ir(tt,Ue,_e));var ut=Object(C.a)(kt),Mt=s.createElement(De,Object.assign({},Er,{"data-row-key":Xe,className:l()(Se,"".concat(it,"-row"),"".concat(it,"-row-level-").concat(_e),Ir,Er&&Er.className),style:Object(c.a)(Object(c.a)({},Ge),Er?Er.style:null),onClick:yn}),kt.map(function(Hr,Ot){var dn=Hr.render,Kr=Hr.dataIndex,Or=Hr.className,sr=ut[Ot],ta=st[Ot],Ln;Ot===(cn||0)&&Cr&&(Ln=s.createElement(s.Fragment,null,s.createElement("span",{style:{paddingLeft:"".concat(It*_e,"px")},className:"".concat(it,"-row-indent indent-level-").concat(_e)}),Ht({prefixCls:it,expanded:mt,expandable:Bt,record:tt,onExpand:Et})));var ft;return Hr.onCell&&(ft=Hr.onCell(tt,Ue)),s.createElement(n.a,Object.assign({className:Or,ellipsis:Hr.ellipsis,align:Hr.align,component:je,prefixCls:it,key:sr,record:tt,index:Ue,dataIndex:Kr,render:dn,shouldCellUpdate:Hr.shouldCellUpdate},ta,{appendNode:Ln,additionalProps:ft}))})),Wr;if(mr&&(vt||mt)){var tn=Ur(tt,Ue,_e+1,mt),Sn=Yt&&Yt(tt,Ue,_e);Wr=s.createElement(G,{expanded:mt,className:l()("".concat(it,"-expanded-row"),"".concat(it,"-expanded-row-level-").concat(_e+1),Sn),prefixCls:it,fixHeader:gt,fixColumn:yt,horizonScroll:ct,component:De,componentWidth:Lt,cellComponent:je,colSpan:kt.length},tn)}var bn;return Bt&&mt&&(bn=(tt[$e]||[]).map(function(Hr,Ot){var dn=Pe(Hr,Ot);return s.createElement(B,Object.assign({},Me,{key:dn,rowKey:dn,record:Hr,recordKey:dn,index:Ot,indent:_e+1}))})),s.createElement(s.Fragment,null,Mt,Wr,bn)}B.displayName="BodyRow";var K=B,W=s.createContext(null),J=W;function ee(Me){var Se=Me.columnKey,Ge=Me.onColumnResize,tt=s.useRef();return s.useEffect(function(){tt.current&&Ge(Se,tt.current.offsetWidth)},[]),s.createElement(u.a,{onResize:function(Xe){var Pe=Xe.offsetWidth;Ge(Se,Pe)}},s.createElement("td",{ref:tt,style:{padding:0,border:0,height:0}},s.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Z(Me){var Se=Me.data,Ge=Me.getRowKey,tt=Me.measureColumnWidth,Ue=Me.expandedKeys,Xe=Me.onRow,Pe=Me.rowExpandable,Te=Me.emptyNode,Ae=Me.childrenColumnName,ce=s.useContext(J),Ee=ce.onColumnResize,_e=s.useContext(d.a),De=_e.prefixCls,je=_e.getComponent,$e=s.useContext(z),at=$e.fixHeader,it=$e.horizonScroll,st=$e.flattenColumns,Je=$e.componentWidth;return s.useMemo(function(){var gt=je(["body","wrapper"],"tbody"),yt=je(["body","row"],"tr"),ct=je(["body","cell"],"td"),Lt;Se.length?Lt=Se.map(function(Ct,Ft){var Et=Ge(Ct,Ft);return s.createElement(K,{key:Et,rowKey:Et,record:Ct,recordKey:Et,index:Ft,rowComponent:yt,cellComponent:ct,expandedKeys:Ue,onRow:Xe,getRowKey:Ge,rowExpandable:Pe,childrenColumnName:Ae})}):Lt=s.createElement(G,{expanded:!0,className:"".concat(De,"-placeholder"),prefixCls:De,fixHeader:at,fixColumn:it,horizonScroll:it,component:yt,componentWidth:Je,cellComponent:ct,colSpan:st.length},Te);var kt=Object(C.a)(st);return s.createElement(gt,{className:"".concat(De,"-tbody")},tt&&s.createElement("tr",{"aria-hidden":"true",className:"".concat(De,"-measure-row"),style:{height:0}},kt.map(function(Ct){return s.createElement(ee,{key:Ct,columnKey:Ct,onColumnResize:Ee})})),Lt)},[Se,De,Xe,tt,Ue,Ge,je,Je,Te,st])}var he=s.memo(Z);he.displayName="Body";var ge=he,ie=k("wRmb"),we=k("xEkU"),me=k.n(we);function oe(Me){var Se=Object(s.useRef)(Me),Ge=Object(s.useState)({}),tt=Object(f.a)(Ge,2),Ue=tt[1],Xe=Object(s.useRef)(null),Pe=Object(s.useRef)([]);function Te(Ae){Xe.current===null&&(Pe.current=[],Xe.current=me()(function(){Pe.current.forEach(function(ce){Se.current=ce(Se.current)}),Xe.current=null,Ue({})})),Pe.current.push(Ae)}return Object(s.useEffect)(function(){return function(){me.a.cancel(Xe.current)}},[]),[Se.current,Te]}function se(Me){var Se=Object(s.useRef)(Me),Ge=Object(s.useRef)(null);function tt(){window.clearTimeout(Ge.current)}function Ue(Pe){Se.current=Pe,tt(),Ge.current=window.setTimeout(function(){Se.current=null,Ge.current=null},100)}function Xe(){return Se.current}return Object(s.useEffect)(function(){return tt},[]),[Ue,Xe]}function te(Me,Se,Ge){var tt=Object(s.useMemo)(function(){for(var Ue=[],Xe=[],Pe=0,Te=0,Ae=0;Ae<Se;Ae+=1)if(Ge==="rtl"){Xe[Ae]=Te,Te+=Me[Ae]||0;var ce=Se-Ae-1;Ue[ce]=Pe,Pe+=Me[ce]||0}else{Ue[Ae]=Pe,Pe+=Me[Ae]||0;var Ee=Se-Ae-1;Xe[Ee]=Te,Te+=Me[Ee]||0}return{left:Ue,right:Xe}},[Me,Se,Ge]);return tt}var be=te;function q(Me){var Se=Me.className,Ge=Me.children;return s.createElement("div",{className:Se},Ge)}var ae=q,xe=k("n6Qo");function ne(Me){var Se,Ge=Me.prefixCls,tt=Me.record,Ue=Me.onExpand,Xe=Me.expanded,Pe=Me.expandable,Te="".concat(Ge,"-row-expand-icon");if(!Pe)return s.createElement("span",{className:l()(Te,"".concat(Ge,"-row-spaced"))});var Ae=function(Ee){Ue(tt,Ee),Ee.stopPropagation()};return s.createElement("span",{className:l()(Te,(Se={},Object(L.a)(Se,"".concat(Ge,"-row-expanded"),Xe),Object(L.a)(Se,"".concat(Ge,"-row-collapsed"),!Xe),Se)),onClick:Ae})}function Q(Me,Se,Ge){var tt=[];function Ue(Xe){(Xe||[]).forEach(function(Pe,Te){tt.push(Se(Pe,Te)),Ue(Pe[Ge])})}return Ue(Me),tt}var X=k("zT1h"),$=k("y0+3"),pe=function(Se,Ge){var tt,Ue,Xe=Se.scrollBodyRef,Pe=Se.onScroll,Te=Se.offsetScroll,Ae=s.useContext(d.a),ce=Ae.prefixCls,Ee=((tt=Xe.current)===null||tt===void 0?void 0:tt.scrollWidth)||0,_e=((Ue=Xe.current)===null||Ue===void 0?void 0:Ue.clientWidth)||0,De=Ee&&_e*(_e/Ee),je=s.useRef(),$e=oe({scrollLeft:0,isHiddenScrollBar:!1}),at=Object(f.a)($e,2),it=at[0],st=at[1],Je=s.useRef({delta:0,x:0}),gt=s.useState(!1),yt=Object(f.a)(gt,2),ct=yt[0],Lt=yt[1],kt=function(){Lt(!1)},Ct=function(It){It.persist(),Je.current.delta=It.pageX-it.scrollLeft,Je.current.x=0,Lt(!0),It.preventDefault()},Ft=function(It){var Ht,Ur=It||((Ht=window)===null||Ht===void 0?void 0:Ht.event),cn=Ur.buttons;if(!ct||cn===0){ct&&Lt(!1);return}var gr=Je.current.x+It.pageX-Je.current.x-Je.current.delta;gr<=0&&(gr=0),gr+De>=_e&&(gr=_e-De),Pe({scrollLeft:gr/_e*(Ee+2)}),Je.current.x=It.pageX},Et=function(){var It=Object($.b)(Xe.current).top,Ht=It+Xe.current.offsetHeight,Ur=document.documentElement.scrollTop+window.innerHeight;Ht-Object(p.a)()<=Ur||It>=Ur-Te?st(function(cn){return Object(c.a)(Object(c.a)({},cn),{},{isHiddenScrollBar:!0})}):st(function(cn){return Object(c.a)(Object(c.a)({},cn),{},{isHiddenScrollBar:!1})})},ir=function(It){st(function(Ht){return Object(c.a)(Object(c.a)({},Ht),{},{scrollLeft:It/Ee*_e||0})})};return s.useImperativeHandle(Ge,function(){return{setScrollLeft:ir}}),s.useEffect(function(){var Yt=Object(X.a)(document.body,"mouseup",kt,!1),It=Object(X.a)(document.body,"mousemove",Ft,!1);return Et(),function(){Yt.remove(),It.remove()}},[De,ct]),s.useEffect(function(){var Yt=Object(X.a)(window,"scroll",Et,!1),It=Object(X.a)(window,"resize",Et,!1);return function(){Yt.remove(),It.remove()}},[]),s.useEffect(function(){it.isHiddenScrollBar||st(function(Yt){var It,Ht;return Object(c.a)(Object(c.a)({},Yt),{},{scrollLeft:Xe.current.scrollLeft/((It=Xe.current)===null||It===void 0?void 0:It.scrollWidth)*((Ht=Xe.current)===null||Ht===void 0?void 0:Ht.clientWidth)})})},[it.isHiddenScrollBar]),Ee<=_e||!De||it.isHiddenScrollBar?null:s.createElement("div",{style:{height:Object(p.a)(),width:_e,bottom:Te},className:"".concat(ce,"-sticky-scroll")},s.createElement("div",{onMouseDown:Ct,ref:je,className:l()("".concat(ce,"-sticky-scroll-bar"),Object(L.a)({},"".concat(ce,"-sticky-scroll-bar-active"),ct)),style:{width:"".concat(De,"px"),transform:"translate3d(".concat(it.scrollLeft,"px, 0, 0)")}}))},de=s.forwardRef(pe);function Ce(Me,Se){return s.useMemo(function(){var Ge=!!Me;return{isSticky:Ge,stickyClassName:Ge?"".concat(Se,"-sticky-header"):"",offsetHeader:Object(R.a)(Me)==="object"&&Me.offsetHeader||0,offsetScroll:Object(R.a)(Me)==="object"&&Me.offsetScroll||0}},[Me,Se])}var ze=[],qe={},Ye="rc-table-internal-hook",Ve=s.memo(function(Me){var Se=Me.children;return Se},function(Me,Se){return a()(Me.props,Se.props)?Me.pingLeft!==Se.pingLeft||Me.pingRight!==Se.pingRight:!1});function et(Me){var Se,Ge=Me.prefixCls,tt=Me.className,Ue=Me.rowClassName,Xe=Me.style,Pe=Me.data,Te=Me.rowKey,Ae=Me.scroll,ce=Me.tableLayout,Ee=Me.direction,_e=Me.title,De=Me.footer,je=Me.summary,$e=Me.id,at=Me.showHeader,it=Me.components,st=Me.emptyText,Je=Me.onRow,gt=Me.onHeaderRow,yt=Me.internalHooks,ct=Me.transformColumns,Lt=Me.internalRefs,kt=Me.sticky,Ct=Pe||ze,Ft=!!Ct.length,Et=s.useState(0),ir=Object(f.a)(Et,2),Yt=ir[0],It=ir[1];s.useEffect(function(){It(Object(p.a)())});var Ht=s.useMemo(function(){return Object(C.c)(it,{})},[it]),Ur=s.useCallback(function(Nt,qt){return Object(C.b)(Ht,Nt)||qt},[Ht]),cn=s.useMemo(function(){return typeof Te=="function"?Te:function(Nt){var qt=Nt&&Nt[Te];return qt}},[Te]),gr=Object(x.c)(Me),zn=gr.expandIcon,vt=gr.expandedRowKeys,_t=gr.defaultExpandedRowKeys,mt=gr.defaultExpandAllRows,mr=gr.expandedRowRender,Cr=gr.onExpand,Bt=gr.onExpandedRowsChange,Rt=gr.expandRowByClick,Er=gr.rowExpandable,yn=gr.expandIconColumnIndex,Ir=gr.expandedRowClassName,ut=gr.childrenColumnName,Mt=gr.indentSize,Wr=zn||ne,tn=ut||"children",Sn=s.useMemo(function(){return mr?"row":Me.expandable&&yt===Ye&&Me.expandable.__PARENT_RENDER_ICON__||Ct.some(function(Nt){return Nt&&Object(R.a)(Nt)==="object"&&Nt[tn]})?"nest":!1},[!!mr,Ct]),bn=s.useState(function(){return _t||(mt?Q(Ct,cn,tn):[])}),Hr=Object(f.a)(bn,2),Ot=Hr[0],dn=Hr[1],Kr=s.useMemo(function(){return new Set(vt||Ot||[])},[vt,Ot]),Or=s.useCallback(function(Nt){var qt=cn(Nt,Ct.indexOf(Nt)),Jt,Qr=Kr.has(qt);Qr?(Kr.delete(qt),Jt=Object(S.a)(Kr)):Jt=[].concat(Object(S.a)(Kr),[qt]),dn(Jt),Cr&&Cr(!Qr,Nt),Bt&&Bt(Jt)},[cn,Kr,Ct,Cr,Bt]),sr=s.useState(0),ta=Object(f.a)(sr,2),Ln=ta[0],ft=ta[1],ca=Object(ie.b)(Object(c.a)(Object(c.a)(Object(c.a)({},Me),gr),{},{expandable:!!mr,expandedKeys:Kr,getRowKey:cn,onTriggerExpand:Or,expandIcon:Wr,expandIconColumnIndex:yn,direction:Ee}),yt===Ye?ct:null),ra=Object(f.a)(ca,2),An=ra[0],Lr=ra[1],Fn=s.useMemo(function(){return{columns:An,flattenColumns:Lr}},[An,Lr]),En=s.useRef(),an=s.useRef(),rr=s.useRef(),$r=s.useState(!1),tr=Object(f.a)($r,2),Kt=tr[0],Zt=tr[1],xr=s.useState(!1),Nr=Object(f.a)(xr,2),Jr=Nr[0],on=Nr[1],Ma=oe(new Map),ei=Object(f.a)(Ma,2),Ga=ei[0],na=ei[1],sn=Object(C.a)(Lr),Xa=sn.map(function(Nt){return Ga.get(Nt)}),zr=s.useMemo(function(){return Xa},[Xa.join("_")]),aa=be(zr,Lr.length,Ee),Pn=Ae&&Object(C.d)(Ae.y),fn=Ae&&Object(C.d)(Ae.x),Cn=fn&&Lr.some(function(Nt){var qt=Nt.fixed;return qt}),Va=s.useRef(),da=Ce(kt,Ge),ia=da.isSticky,Fa=da.offsetHeader,Sa=da.offsetScroll,_n=da.stickyClassName,fa,ha,Gn;Pn&&(ha={overflowY:"scroll",maxHeight:Ae.y}),fn&&(fa={overflowX:"auto"},Pn||(ha={overflowY:"hidden"}),Gn={width:Ae.x===!0?"auto":Ae.x,minWidth:"100%"});var ya=s.useCallback(function(Nt,qt){na(function(Jt){var Qr=new Map(Jt);return Qr.set(Nt,qt),Qr})},[]),Bn=se(null),Ca=Object(f.a)(Bn,2),kn=Ca[0],oa=Ca[1];function sa(Nt,qt){if(!qt)return;typeof qt=="function"?qt(Nt):qt.scrollLeft!==Nt&&(qt.scrollLeft=Nt)}var Xn=function(qt){var Jt=qt.currentTarget,Qr=qt.scrollLeft,Wa=typeof Qr=="number"?Qr:Jt.scrollLeft,Ha=Jt||qe;if(!oa()||oa()===Ha){var Xt;kn(Ha),sa(Wa,an.current),sa(Wa,rr.current),sa(Wa,(Xt=Va.current)===null||Xt===void 0?void 0:Xt.setScrollLeft)}if(Jt){var St=Jt.scrollWidth,er=Jt.clientWidth;Zt(Wa>0),on(Wa<St-er)}},Dr=function(){rr.current&&Xn({currentTarget:rr.current})},Ya=function(qt){var Jt=qt.width;Dr(),ft(En.current?En.current.offsetWidth:Jt)};s.useEffect(function(){return Dr},[]),s.useEffect(function(){fn&&Dr()},[fn]),s.useEffect(function(){yt===Ye&&Lt&&(Lt.body.current=rr.current)});var ti=Ur(["table"],"table"),La=s.useMemo(function(){return ce||(Cn?Ae.x==="max-content"?"auto":"fixed":Pn||Lr.some(function(Nt){var qt=Nt.ellipsis;return qt})?"fixed":"auto")},[Pn,Cn,Lr,ce]),$a,Ba={colWidths:zr,columCount:Lr.length,stickyOffsets:aa,onHeaderRow:gt,fixHeader:Pn},Dt=s.useMemo(function(){return Ft?null:typeof st=="function"?st():st},[Ft,st]),$t=s.createElement(ge,{data:Ct,measureColumnWidth:Pn||fn||ia,expandedKeys:Kr,rowExpandable:Er,getRowKey:cn,onRow:Je,emptyNode:Dt,childrenColumnName:tn}),Ut=s.createElement(_,{colWidths:Lr.map(function(Nt){var qt=Nt.width;return qt}),columns:Lr}),lr=je&&s.createElement(xe.b,null,je(Ct)),yr=Ur(["body"]);if(Pn||ia){var Pr;typeof yr=="function"?(Pr=yr(Ct,{scrollbarSize:Yt,ref:rr,onScroll:Xn}),Ba.colWidths=Lr.map(function(Nt,qt){var Jt=Nt.width,Qr=qt===An.length-1?Jt-Yt:Jt;return typeof Qr=="number"&&!Number.isNaN(Qr)?Qr:(Object(r.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Pr=s.createElement("div",{style:Object(c.a)(Object(c.a)({},fa),ha),onScroll:Xn,ref:rr,className:l()("".concat(Ge,"-body"))},s.createElement(ti,{style:Object(c.a)(Object(c.a)({},Gn),{},{tableLayout:La})},Ut,$t,lr),ia&&s.createElement(de,{ref:Va,offsetScroll:Sa,scrollBodyRef:rr,onScroll:Xn})),$a=s.createElement(s.Fragment,null,at!==!1&&s.createElement(M,Object.assign({noData:!Ct.length},Ba,Fn,{direction:Ee,offsetHeader:Fa,stickyClassName:_n,ref:an,onScroll:Xn})),Pr)}else $a=s.createElement("div",{style:Object(c.a)(Object(c.a)({},fa),ha),className:l()("".concat(Ge,"-content")),onScroll:Xn,ref:rr},s.createElement(ti,{style:Object(c.a)(Object(c.a)({},Gn),{},{tableLayout:La})},Ut,at!==!1&&s.createElement(y,Object.assign({},Ba,Fn)),$t,lr));var dr=Object(x.b)(Me),Gr=s.createElement("div",Object.assign({className:l()(Ge,tt,(Se={},Object(L.a)(Se,"".concat(Ge,"-rtl"),Ee==="rtl"),Object(L.a)(Se,"".concat(Ge,"-ping-left"),Kt),Object(L.a)(Se,"".concat(Ge,"-ping-right"),Jr),Object(L.a)(Se,"".concat(Ge,"-layout-fixed"),ce==="fixed"),Object(L.a)(Se,"".concat(Ge,"-fixed-header"),Pn),Object(L.a)(Se,"".concat(Ge,"-fixed-column"),Cn),Object(L.a)(Se,"".concat(Ge,"-scroll-horizontal"),fn),Object(L.a)(Se,"".concat(Ge,"-has-fix-left"),Lr[0]&&Lr[0].fixed),Object(L.a)(Se,"".concat(Ge,"-has-fix-right"),Lr[Lr.length-1]&&Lr[Lr.length-1].fixed==="right"),Se)),style:Xe,id:$e,ref:En},dr),s.createElement(Ve,{pingLeft:Kt,pingRight:Jr,props:Object(c.a)(Object(c.a)({},Me),{},{stickyOffsets:aa,mergedExpandedKeys:Kr})},_e&&s.createElement(ae,{className:"".concat(Ge,"-title")},_e(Ct)),s.createElement("div",{className:"".concat(Ge,"-container")},$a),De&&s.createElement(ae,{className:"".concat(Ge,"-footer")},De(Ct))));fn&&(Gr=s.createElement(u.a,{onResize:Ya},Gr));var hn=s.useMemo(function(){return{prefixCls:Ge,getComponent:Ur,scrollbarSize:Yt,direction:Ee,fixedInfoList:Lr.map(function(Nt,qt){return h(qt,qt,Lr,aa,Ee)}),isSticky:ia}},[Ge,Ur,Yt,Ee,Lr,aa,Ee,ia]),fr=s.useMemo(function(){return Object(c.a)(Object(c.a)({},Fn),{},{tableLayout:La,rowClassName:Ue,expandedRowClassName:Ir,componentWidth:Ln,fixHeader:Pn,fixColumn:Cn,horizonScroll:fn,expandIcon:Wr,expandableType:Sn,expandRowByClick:Rt,expandedRowRender:mr,onTriggerExpand:Or,expandIconColumnIndex:yn,indentSize:Mt})},[Fn,La,Ue,Ir,Ln,Pn,Cn,fn,Wr,Sn,Rt,mr,Or,yn,Mt]),pa=s.useMemo(function(){return{onColumnResize:ya}},[ya]);return s.createElement(d.a.Provider,{value:hn},s.createElement(z.Provider,{value:fr},s.createElement(J.Provider,{value:pa},Gr)))}et.Column=b.a,et.ColumnGroup=m.a,et.Summary=xe.a,et.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var rt=Y.b=et},wRmb:function(I,Y,k){"use strict";k.d(Y,"a",function(){return a});var L=k("rePB"),c=k("KQm4"),S=k("VTBJ"),R=k("Ff2n"),f=k("cDcd"),s=k.n(f),w=k("Kwbf"),l=k("Zm9Q"),i=k("hW8S");function a(b){return Object(l.a)(b).filter(function(g){return f.isValidElement(g)}).map(function(g){var v=g.key,n=g.props,d=n.children,h=Object(R.a)(n,["children"]),C=Object(S.a)({key:v},h);return d&&(C.children=a(d)),C})}function r(b){return b.reduce(function(g,v){var n=v.fixed,d=n===!0?"left":n,h=v.children;return h&&h.length>0?[].concat(Object(c.a)(g),Object(c.a)(r(h).map(function(C){return Object(S.a)({fixed:d},C)}))):[].concat(Object(c.a)(g),[Object(S.a)(Object(S.a)({},v),{},{fixed:d})])},[])}function u(b){for(var g=!0,v=0;v<b.length;v+=1){var n=b[v];if(g&&n.fixed!=="left")g=!1;else if(!g&&n.fixed==="left"){Object(w.a)(!1,"Index ".concat(v-1," of `columns` missing `fixed='left'` prop."));break}}for(var d=!0,h=b.length-1;h>=0;h-=1){var C=b[h];if(d&&C.fixed!=="right")d=!1;else if(!d&&C.fixed==="right"){Object(w.a)(!1,"Index ".concat(h+1," of `columns` missing `fixed='right'` prop."));break}}}function p(b){return b.map(function(g){var v=g.fixed,n=Object(R.a)(g,["fixed"]),d=v;return v==="left"?d="right":v==="right"&&(d="left"),Object(S.a)({fixed:d},n)})}function m(b,g){var v=b.prefixCls,n=b.columns,d=b.children,h=b.expandable,C=b.expandedKeys,T=b.getRowKey,o=b.onTriggerExpand,P=b.expandIcon,O=b.rowExpandable,y=b.expandIconColumnIndex,x=b.direction,E=b.expandRowByClick,_=f.useMemo(function(){return n||a(d)},[n,d]),N=f.useMemo(function(){if(h){var H,z=y||0,F=_[z],G=(H={},Object(L.a)(H,i.a,{className:"".concat(v,"-expand-icon-col")}),Object(L.a)(H,"title",""),Object(L.a)(H,"fixed",F?F.fixed:null),Object(L.a)(H,"className","".concat(v,"-row-expand-icon-cell")),Object(L.a)(H,"render",function(W,J,ee){var Z=T(J,ee),he=C.has(Z),ge=O?O(J):!0,ie=P({prefixCls:v,expanded:he,expandable:ge,record:J,onExpand:o});return E?f.createElement("span",{onClick:function(me){return me.stopPropagation()}},ie):ie}),H),B=_.slice();return z>=0&&B.splice(z,0,G),B}return _},[h,_,T,C,P,x]),j=f.useMemo(function(){var H=N;return g&&(H=g(H)),H.length||(H=[{render:function(){return null}}]),H},[g,N,x]),M=f.useMemo(function(){return x==="rtl"?p(r(j)):r(j)},[j,x]);return[j,M]}Y.b=m},wU8J:function(I,Y){function k(){this.buffer=new Array,this.length=0}k.prototype={get:function(L){var c=Math.floor(L/8);return(this.buffer[c]>>>7-L%8&1)==1},put:function(L,c){for(var S=0;S<c;S++)this.putBit((L>>>c-S-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(L){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0),L&&(this.buffer[c]|=128>>>this.length%8),this.length++}},I.exports=k},wZgz:function(I,Y,k){(function(L,c,S){I.exports=Y=c(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.BlockCipher,f=c.algo,s=[],w=[],l=[],i=[],a=[],r=[],u=[],p=[],m=[],b=[];(function(){for(var n=[],d=0;d<256;d++)d<128?n[d]=d<<1:n[d]=d<<1^283;for(var h=0,C=0,d=0;d<256;d++){var T=C^C<<1^C<<2^C<<3^C<<4;T=T>>>8^T&255^99,s[h]=T,w[T]=h;var o=n[h],P=n[o],O=n[P],y=n[T]*257^T*16843008;l[h]=y<<24|y>>>8,i[h]=y<<16|y>>>16,a[h]=y<<8|y>>>24,r[h]=y;var y=O*16843009^P*65537^o*257^h*16843008;u[T]=y<<24|y>>>8,p[T]=y<<16|y>>>16,m[T]=y<<8|y>>>24,b[T]=y,h?(h=o^n[n[n[O^o]]],C^=n[n[C]]):h=C=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],v=f.AES=R.extend({_doReset:function(){var n;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var d=this._keyPriorReset=this._key,h=d.words,C=d.sigBytes/4,T=this._nRounds=C+6,o=(T+1)*4,P=this._keySchedule=[],O=0;O<o;O++)O<C?P[O]=h[O]:(n=P[O-1],O%C?C>6&&O%C==4&&(n=s[n>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[n&255]):(n=n<<8|n>>>24,n=s[n>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[n&255],n^=g[O/C|0]<<24),P[O]=P[O-C]^n);for(var y=this._invKeySchedule=[],x=0;x<o;x++){var O=o-x;if(x%4)var n=P[O];else var n=P[O-4];x<4||O<=4?y[x]=n:y[x]=u[s[n>>>24]]^p[s[n>>>16&255]]^m[s[n>>>8&255]]^b[s[n&255]]}},encryptBlock:function(n,d){this._doCryptBlock(n,d,this._keySchedule,l,i,a,r,s)},decryptBlock:function(n,d){var h=n[d+1];n[d+1]=n[d+3],n[d+3]=h,this._doCryptBlock(n,d,this._invKeySchedule,u,p,m,b,w);var h=n[d+1];n[d+1]=n[d+3],n[d+3]=h},_doCryptBlock:function(n,d,h,C,T,o,P,O){for(var y=this._nRounds,x=n[d]^h[0],E=n[d+1]^h[1],_=n[d+2]^h[2],N=n[d+3]^h[3],j=4,M=1;M<y;M++){var H=C[x>>>24]^T[E>>>16&255]^o[_>>>8&255]^P[N&255]^h[j++],z=C[E>>>24]^T[_>>>16&255]^o[N>>>8&255]^P[x&255]^h[j++],F=C[_>>>24]^T[N>>>16&255]^o[x>>>8&255]^P[E&255]^h[j++],G=C[N>>>24]^T[x>>>16&255]^o[E>>>8&255]^P[_&255]^h[j++];x=H,E=z,_=F,N=G}var H=(O[x>>>24]<<24|O[E>>>16&255]<<16|O[_>>>8&255]<<8|O[N&255])^h[j++],z=(O[E>>>24]<<24|O[_>>>16&255]<<16|O[N>>>8&255]<<8|O[x&255])^h[j++],F=(O[_>>>24]<<24|O[N>>>16&255]<<16|O[x>>>8&255]<<8|O[E&255])^h[j++],G=(O[N>>>24]<<24|O[x>>>16&255]<<16|O[E>>>8&255]<<8|O[_&255])^h[j++];n[d]=H,n[d+1]=z,n[d+2]=F,n[d+3]=G},keySize:256/32});c.AES=R._createHelper(v)}(),L.AES})},wbyO:function(I,Y,k){(function(L,c){I.exports=Y=c(k("Ib8C"))})(this,function(L){return function(){var c=L,S=c.lib,R=S.WordArray,f=c.enc,s=f.Base64url={stringify:function(l,i=!0){var a=l.words,r=l.sigBytes,u=i?this._safe_map:this._map;l.clamp();for(var p=[],m=0;m<r;m+=3)for(var b=a[m>>>2]>>>24-m%4*8&255,g=a[m+1>>>2]>>>24-(m+1)%4*8&255,v=a[m+2>>>2]>>>24-(m+2)%4*8&255,n=b<<16|g<<8|v,d=0;d<4&&m+d*.75<r;d++)p.push(u.charAt(n>>>6*(3-d)&63));var h=u.charAt(64);if(h)for(;p.length%4;)p.push(h);return p.join("")},parse:function(l,i=!0){var a=l.length,r=i?this._safe_map:this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var p=0;p<r.length;p++)u[r.charCodeAt(p)]=p}var m=r.charAt(64);if(m){var b=l.indexOf(m);b!==-1&&(a=b)}return w(l,a,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function w(l,i,a){for(var r=[],u=0,p=0;p<i;p++)if(p%4){var m=a[l.charCodeAt(p-1)]<<p%4*2,b=a[l.charCodeAt(p)]>>>6-p%4*2,g=m|b;r[u>>>2]|=g<<24-u%4*8,u++}return R.create(r,u)}}(),L.enc.Base64url})},"y0+3":function(I,Y,k){"use strict";k.d(Y,"a",function(){return r}),k.d(Y,"b",function(){return p});var L=/margin|padding|width|height|max|min|offset/,c={left:!0,top:!0},S={cssFloat:1,styleFloat:1,float:1};function R(m){return m.nodeType===1?m.ownerDocument.defaultView.getComputedStyle(m,null):{}}function f(m,b,g){if(b=b.toLowerCase(),g==="auto"){if(b==="height")return m.offsetHeight;if(b==="width")return m.offsetWidth}return b in c||(c[b]=L.test(b)),c[b]?parseFloat(g)||0:g}function s(m,b){var g=arguments.length,v=R(m);return b=S[b]?"cssFloat"in m.style?"cssFloat":"styleFloat":b,g===1?v:f(m,b,v[b]||m.style[b])}function w(m,b,g){var v=arguments.length;if(b=S[b]?"cssFloat"in m.style?"cssFloat":"styleFloat":b,v===3)return typeof g=="number"&&L.test(b)&&(g="".concat(g,"px")),m.style[b]=g,g;for(var n in b)b.hasOwnProperty(n)&&w(m,n,b[n]);return R(m)}function l(m){return m===document.body?document.documentElement.clientWidth:m.offsetWidth}function i(m){return m===document.body?window.innerHeight||document.documentElement.clientHeight:m.offsetHeight}function a(){var m=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:m,height:b}}function r(){var m=document.documentElement.clientWidth,b=window.innerHeight||document.documentElement.clientHeight;return{width:m,height:b}}function u(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function p(m){var b=m.getBoundingClientRect(),g=document.documentElement;return{left:b.left+(window.pageXOffset||g.scrollLeft)-(g.clientLeft||document.body.clientLeft||0),top:b.top+(window.pageYOffset||g.scrollTop)-(g.clientTop||document.body.clientTop||0)}}},ynwM:function(I,Y,k){var L=k("MFOe"),c=L.Global;I.exports={name:"oldFF-globalStorage",read:R,write:f,each:s,remove:w,clearAll:l};var S=c.globalStorage;function R(i){return S[i]}function f(i,a){S[i]=a}function s(i){for(var a=S.length-1;a>=0;a--){var r=S.key(a);i(S[r],r)}}function w(i){return S.removeItem(i)}function l(){s(function(i,a){delete S[i]})}}}]);