(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&&/$/,blockCommentStart:"",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>>0?1:0),X=X+Se,$=$+Me+(X>>>0>>0?1:0),X=X+Te,$=$+Pe+(X>>>0>>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>>0?1:0),gt=gt+ce,yt=yt+Ae+(gt>>>0>>0?1:0),gt=gt+Je,yt=yt+st+(gt>>>0>>0?1:0),gt=gt+X,yt=yt+$+(gt>>>0>>0?1:0),ct=je+_e,Lt=De+Ee+(ct>>>0>>0?1:0);xe=q,ne=ae,q=te,ae=be,te=oe,be=se,se=me+gt|0,oe=we+yt+(se>>>0>>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>>0?1:0)|0}O=g.low=O+ee,g.high=P+J+(O>>>0>>0?1:0),x=v.low=x+he,v.high=y+Z+(x>>>0>>0?1:0),_=n.low=_+ie,n.high=E+ge+(_>>>0>>0?1:0),j=d.low=j+me,d.high=N+we+(j>>>0>>0?1:0),H=h.low=H+se,h.high=M+oe+(H>>>0>>0?1:0),F=C.low=F+be,C.high=z+te+(F>>>0>>0?1:0),B=T.low=B+ae,T.high=G+q+(B>>>0>>0?1:0),W=o.low=W+ne,o.high=K+xe+(W>>>0>>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<>>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<>>32-G,y=F<>>32-G):(O=F<>>64-G,y=z<>>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>>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=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.current2?F-2:0),B=2;B=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=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-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=oe.length?se.slice(oe.length):se}).join(` `)}var m=[],b=["
    "],g=new r.a.Renderer,v=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function n(){m.length=0,b=["
      "]}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("
    • "+se.text+""),we++;var te=[];return we=h(ie,we,se.level,te),te.length>0&&(oe.push("
        "),te.forEach(function(be){oe.push(be)}),oe.push("
      ")),oe.push("
    • "),we=h(ie,we,me,oe),we}function C(){return h(m,0,0,b),b.push("
    "),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?"

    ".concat(ie,"

    "):'
    ').concat(me?ie:Object(u.escape)(ie,!0),`
    `):'
    '+(me?ie:Object(u.escape)(ie,!0))+"
    "},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}),"'+ie+""},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=/]*>/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("

    [TOC]

    ",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;r0&&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;gt100)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;pm.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?` `:"")+"",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?"/":""&&(C+=">"),u[g]=C}if(i.replaceSelections(u),r=i.listSelections(),!b)for(var g=0;g=0&&a[v]==r;v--)++g;u=b.to;for(var v=1;v0){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:"",a=[],r=0;r=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=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=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>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+H.h?z:z.map(function(G,B){return 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;KPe.length)&&(Te=Pe.length);for(var Ae=0,ce=new Array(Te);Ae=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={"&":"&","<":"<",">":">",'"':""","'":"'"},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=0&&je[at]==="\\";)$e=!$e;return $e?"|":" |"}),ce=Ae.split(/ \|/),Ee=0;if(ce.length>Te)ce.splice(Te);else for(;ce.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 ?/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;Et1||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/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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\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=//,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",")|<(?: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",")|<(?: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",")|<(?:script|pre|style|!--)").replace("tag",oe._tag).getRegex(),oe.pedantic=me({},oe.normal,{html:we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\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-]*(?:attribute)*?\\s*/?>|^<\\?[\\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]*?(?:(?=[\\?@\\[\\]`^{|}~",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]*?(?:(?=[\\.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;Ee0)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?'
    '+(_e?ce:pe(ce,!0))+`
    `:"
    "+(_e?ce:pe(ce,!0))+`
    `},Te.blockquote=function(ce){return`
    `+ce+`
    `},Te.html=function(ce){return ce},Te.heading=function(ce,Ee,_e,De){return this.options.headerIds?"'+ce+" `:""+ce+" `},Te.hr=function(){return this.options.xhtml?`
    `:`
    `},Te.list=function(ce,Ee,_e){var De=Ee?"ol":"ul",je=Ee&&_e!==1?' start="'+_e+'"':"";return"<"+De+je+`> `+ce+" `},Te.listitem=function(ce){return"
  • "+ce+`
  • `},Te.checkbox=function(ce){return" "},Te.paragraph=function(ce){return"

    "+ce+`

    `},Te.table=function(ce,Ee){return Ee&&(Ee=""+Ee+""),` `+ce+` `+Ee+`
    `},Te.tablerow=function(ce){return` `+ce+` `},Te.tablecell=function(ce,Ee){var _e=Ee.header?"th":"td",De=Ee.align?"<"+_e+' align="'+Ee.align+'">':"<"+_e+">";return De+ce+" `},Te.strong=function(ce){return""+ce+""},Te.em=function(ce){return""+ce+""},Te.codespan=function(ce){return""+ce+""},Te.br=function(){return this.options.xhtml?"
    ":"
    "},Te.del=function(ce){return""+ce+""},Te.link=function(ce,Ee,_e){if(ce=$(this.options.sanitize,this.options.baseUrl,ce),ce===null)return _e;var De='",De},Te.image=function(ce,Ee,_e){if(ce=$(this.options.sanitize,this.options.baseUrl,ce),ce===null)return _e;var De=''+_e+'":">",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;De0&&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+1An error occurred:

    "+Me($e.message+"",!0)+"
    ";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=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>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0>>0?1:0)|0,this._b=u[7]>>>0>>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=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;d0;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=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>>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<>>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>>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>>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>>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>>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=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=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>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>>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;pb*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=0?C.get(T):0}}for(var o=0,n=0;n>>2]>>>24-P%4*8&255;h[T+P>>>2]|=O<<24-(T+P)%4*8}else for(var y=0;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>>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>>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>>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>>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;_=0;)w^=f.G15<=0;)w^=f.G18<>>=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;l5&&(l+=3+r-5)}for(var i=0;i>>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>>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.lengthme)){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;ce1&&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=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>>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('')):dr.content_type.indexOf("pdf")>-1?ft.replaceSelection('
    ').concat(dr.name,"")):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('')):(fr==null||((Qr=fr.type)===null||Qr===void 0)?void 0:Qr.indexOf("pdf"))>-1?Dt.replaceSelection('').concat(fr.name,"")):$e.includes(pa)?Dt.replaceSelection('').concat(fr.name,"")):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('')):(fr==null||((Qr=fr.type)===null||Qr===void 0)?void 0:Qr.indexOf("pdf"))>-1?Dt.replaceSelection('').concat(fr.name,"")):$e.includes(pa)?Dt.replaceSelection('').concat(fr.name,"")):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;dr0||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);Ut0){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(`
    `),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;Nt300&&(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>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0>>0?1:0)|0,this._b=u[7]>>>0>>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'),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|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|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;pe122||(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;XeDe[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=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=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=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=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*]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\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="
    "+ne+"
    ",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=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)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=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"\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:tD?-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;Vt||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;Ut)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-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;U0}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.post},_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.lastColumnPos0?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=e.first&&tD?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;Athis.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;ntZe&&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(;dte.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&&vet.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.pose.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(;uere;--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.highlightFrontierD;A--){var U=mt(e,A).stateAfter;if(U&&(!(U instanceof Or)||A+U.lookAhead=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=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.from0&&le)for(var Pt=0;Pt0)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;Dt)&&(!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=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;Ut.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;Uve&&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;reue||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=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;V2&&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;AD)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=D.lineN&&tt)&&(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=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+le0&&(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=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=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=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=dtbt)&&(Ie=Ze,Fe=bt)}return Ie||(Ie=U[U.length-1]),Ie.fromve&&(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;re0&&(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;At)&&(U.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=U.viewTo)Kt&&Gn(e.doc,t)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=U.lineN&&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;ue0){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.viewFromD&&(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=e.display.viewTo||le.to().line0?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.005||Ie<-.005)&&(Bt(U.line,re),to(U.line),U.rest))for(var Fe=0;Fee.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=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.tople-A;if(t.topU+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.leftZe+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.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=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&&ntD)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=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.viewFromre&&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-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;rere.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=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;V0: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;A1&&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;le1&&!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-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=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=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=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;Ae.lastLine())return;if(t.from.lineV&&(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){D1||!(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;t50){for(var re=U.lines.length%25+25,le=re;le10);e.parent.maybeSpill()},iterN:function(e,t,D){for(var A=0;Ae.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;U0||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=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.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=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;Ae)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.linet&&(t=e.from),e.to!=null&&e.to-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=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=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&&wt0==(Qt.level!=1),br=Gt?Tt.begin:le(Tt.end,-1);if(Qt.from<=br&&br0?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.line0)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;Ae&&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.lineZe.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=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;le20*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(ntre,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=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-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;AV&&(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;Fe0&&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]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;ve0&&Ie(V.charAt(re-1));)--re;for(;le.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+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&&hl(t,A)||{node:le[0].measure.map[2],offset:0},ve=U.linee.firstLine()&&(A=ut(A.line-1,mt(e.doc,A.line-1).length)),U.ch==mt(e.doc,U.line).text.length&&U.linet.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);ZeA.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=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);re1e3||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;v1&&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;O0||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(it0||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.clientHeightu||g>r&&v=u&&n>=p?g-r-m:v>u&&np?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=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)/$+(be1&&(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>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;pexe&&(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<>>32-d)+b}function r(m,b,g,v,n,d,h){var C=m+(b&v|g&~v)+n+h;return(C<>>32-d)+b}function u(m,b,g,v,n,d,h){var C=m+(b^g^v)+n+h;return(C<>>32-d)+b}function p(m,b,g,v,n,d,h){var C=m+(g^(b|~v))+n+h;return(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<1?ee-1:0),he=1;he1?B-1:0),W=1;W=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"&&ee1&&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:(Fz&&(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||WB.max?W=B.max:W=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=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;kz.length)&&(F=z.length);for(var G=0,B=new Array(F);G=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=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;Fz.length)&&(F=z.length);for(var G=0,B=new Array(F);G=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=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;yeQe&&(ht=Qe-pt),Object(f.useMemo)(function(){if(!Oe.length)return[0,0];for(var xt=Oe.length,Wt=xt,ar=0;arWe+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]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;ye1&&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;Qe1});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;VnMr?(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 BrNa?[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.rightjt+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>>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=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=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:"",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;R0&&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.startthis.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;x255)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=` `,g=0;g `,b+=""+v.number+` `,b+=""+v.etag+` `,b+=` `;return b+="",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;m1&&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(!(d0){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]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&&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]+"":f(w[a])==="object"?i+="<"+a+">"+s(w[a])+"":f(w[a])==="array"?i+=w[a].map(function(r){return"<"+a+">"+s(r)+""}).join(""):i+="<"+a+">"+w[a].toString()+""}):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;f0)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>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;dC?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=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=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 * @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()=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>>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;X0&&(Q=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(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;et2147483647?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;YeCe&&(X=Ce-ze),Ye=X;Ye>=0;Ye--){for(var et=!0,rt=0;rtpe&&($=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;pe239?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;$$)&&(X=$);for(var pe="",de=Q;de$&&(Q=$),X<0?(X+=$,X<0&&(X=0)):X>$&&(X=$),XX)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;++Ce0&&(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=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||Qne.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>>($?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>>($?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=0;--Ce)Q[Ce+X]=this[Ce+$];else if(de<1e3||!c.TYPED_ARRAY_SUPPORT)for(Ce=0;Ce>>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>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 * 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;sa;)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;s0?"-":"+")+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]/;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;l0&&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 * 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<>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<>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<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 * @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>>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;c0)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=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=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 * Copyright 2014-2018 Benjamin Tan * Copyright 2011-2013 John-David Dalton * Available under MIT license */(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;i1)for(var n=1;n= 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=55296&&J<=56319&&K65535&&(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=128&&P("not-basic"),B.push(G.charCodeAt(ge));for(ie=he>0?he+1:0;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,seC(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=B&&meC((w-K)/te)&&P("overflow"),K+=(he-B)*te,B=he,Z=0;Zw&&P("overflow"),me==B){for(ge=K,ie=l;!(we=ie<=ee?i:ie>=ee+a?a:ie-ee,ge0&&a>i&&(a=i);for(var r=0;r=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;l0?(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=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-q0?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.length1&&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=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 qX.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-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.length0?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=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=0;--G){var B=this.tryEntries[G];if(B.tryLoc<=this.prev&&S.call(B,"finallyLoc")&&this.prev=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$)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;$"||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",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.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 $"?(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+=""?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="";++Ve1114111||$(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;vu._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>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=0?(T>0&&(n.lastNeed=T-1),T):--C=0?(T>0&&(n.lastNeed=T-2),T):--C=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",` `," "],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&&y127?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;G0?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=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=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-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""},l=function(p){return p.replace("]]>","]]]]>")},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;O0&&(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":"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=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)+""),_+=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)+""+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=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":((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;OP},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;O0){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"),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("")):(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("");else{for(this.stream.write(">"+this.endline(i,a,r)),a.state=c.InsideTag,C=i.children,g=0,v=C.length;g")}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","]]]]>"),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,"&").replace(//g,">").replace(/\r/g," "))},R.prototype.attEscape=function(f){var s;return this.options.noValidation?f:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,f.replace(s,"&").replace(/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)+""+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)+""+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)+"",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+="0){for(y+=" [",y+=this.endline(h,C,T),C.state=c.InsideTag,x=h.children,P=0,O=x.length;P",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+=""+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+=""+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",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)+"",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)+""+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)+""+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)+""+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)+""+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;Rf?r=a(r):r.length>5]|=128<>>9<<4)+14]=u;for(var p=1732584193,m=-271733879,b=-1732584194,g=271733878,v=0;v>16)+(u>>16)+(p>>16);return m<<16|p&65535}function a(r,u){return 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>16)+(l>>16)+(i>>16);return a<<16|i&65535}function s(w,l){return 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=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^this._lBlock)&v;this._lBlock^=n,this._rBlock^=n<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>>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>>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>>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>>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=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={"&":"&","<":"<",">":">",'"':""","'":"'"},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{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.length0&&(Rt.children=[],be(Bt,Rt.children))})}function q(vt,_t){for(var mt=[],mr=0;mr0){mt[0]=Bt.id;for(var Rt=0;Rt0&&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=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;u1)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);b0},!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=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=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||K0&&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&&geZ||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=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;dm.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-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;_J;(G0&&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=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-1&&HH.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(jM-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=G-M.maxFragLookUpTolerance&&F<=B;if(z!==null&&H.duration>z&&(F"+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"+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;a0&&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=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=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);vd&&(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;Pa){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;gr&&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.ccu?-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=o&&h<=P){v.time.push({startPTS:Math.max(n,g.start(T)),endPTS:Math.min(d,g.end(T))});break}else if(no)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=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;Tp&&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=C&&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;d0){x=P[0].bitrate,P.sort(function(G,B){return G.bitrate-B.bitrate}),this._levels=P;for(var H=0;Hthis.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;x0){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||Md.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=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.length)return;b(h,T[C].start)}function b(d,h){if(h){for(var C=d.fragments,T=d.skippedSegments;T0&&o0&&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&&(M1&&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=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=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-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=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=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>>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>>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)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;vi?(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<>>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;p0?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>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;v0},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=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;J0&&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>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;te16){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=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=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;H1;){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;FB){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.ptsx)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>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;ru.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;r2){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-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>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>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>>8&255),i.push(p&255),i=i.concat(Array.prototype.slice.call(u));for(r=0;r>>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>>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;O0?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;meoe.pts){var se=9e4*.2;he=Math.max(Math.min(he,oe.pts-oe.dts),-1*se)}oe.dts0?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(hete,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;de0?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=ie*G&&be0){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;ee4294967296;)P+=y;return P}function C(P){for(var O=0;O0?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;uNumber.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;pNumber.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.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;mb&&(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=C&&a=_&&R.logger.log(this.time+" ["+_+"] "+N)},y}(),g=function(x){for(var E=[],_=0;_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=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=_;N0&&(_?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 ("+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;_=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;hd.startCC||v&&v.cc=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=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"):R}function l(r){for(var u=arguments.length,p=new Array(u>1?u-1:0),m=1;m>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;x1?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>>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;Pl)&&(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;gr[p].endTime)return-1;for(var m=0,b=p;m<=b;){var g=Math.floor((b+m)/2);if(ur[g].startTime&&m-1)for(var g=b,v=r.length;g=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;i1?u-1:0),m=1;m100)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=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(//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")===-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=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;tt1?Kr-1:0),sr=1;sr=_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(Wa0?[].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=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-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;O6&&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>>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>>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>>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>>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>>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]})}}}]);