(window.webpackJsonp=window.webpackJsonp||[]).push([[211,5,6,7,8,13],{"+NIl":function(F,Q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";N.defineMode("stex",function(v,C){"use strict";function k(i,o){i.cmdState.push(o)}function y(i){return i.cmdState.length>0?i.cmdState[i.cmdState.length-1]:null}function m(i){var o=i.cmdState.pop();o&&o.closeBracket()}function S(i){for(var o=i.cmdState,s=o.length-1;s>=0;s--){var c=o[s];if(c.name=="DEFAULT")continue;return c}return{styleIdentifier:function(){return null}}}function b(i,o,s){return function(){this.name=i,this.bracketNo=0,this.style=o,this.styles=s,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var p={};p.importmodule=b("importmodule","tag",["string","builtin"]),p.documentclass=b("documentclass","tag",["","atom"]),p.usepackage=b("usepackage","tag",["atom"]),p.begin=b("begin","tag",["atom"]),p.end=b("end","tag",["atom"]),p.label=b("label","tag",["atom"]),p.ref=b("ref","tag",["atom"]),p.eqref=b("eqref","tag",["atom"]),p.cite=b("cite","tag",["atom"]),p.bibitem=b("bibitem","tag",["atom"]),p.Bibitem=b("Bibitem","tag",["atom"]),p.RBibitem=b("RBibitem","tag",["atom"]),p.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function d(i,o){i.f=o}function t(i,o){var s;if(i.match(/^\\[a-zA-Z@]+/)){var c=i.current().slice(1);return s=p.hasOwnProperty(c)?p[c]:p.DEFAULT,s=new s,k(o,s),d(o,r),s.style}if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/\\]/))return"tag";if(i.match("\\["))return d(o,function(u,f){return l(u,f,"\\]")}),"keyword";if(i.match("\\("))return d(o,function(u,f){return l(u,f,"\\)")}),"keyword";if(i.match("$$"))return d(o,function(u,f){return l(u,f,"$$")}),"keyword";if(i.match("$"))return d(o,function(u,f){return l(u,f,"$")}),"keyword";var a=i.next();if(a=="%")return i.skipToEnd(),"comment";if(a=="}"||a=="]"){if(s=y(o),s)s.closeBracket(a),d(o,r);else return"error";return"bracket"}else return a=="{"||a=="["?(s=p.DEFAULT,s=new s,k(o,s),"bracket"):/\d/.test(a)?(i.eatWhile(/[\w.%]/),"atom"):(i.eatWhile(/[\w\-_]/),s=S(o),s.name=="begin"&&(s.argument=i.current()),s.styleIdentifier())}function l(i,o,s){if(i.eatSpace())return null;if(s&&i.match(s))return d(o,t),"keyword";if(i.match(/^\\[a-zA-Z@]+/))return"tag";if(i.match(/^[a-zA-Z]+/))return"variable-2";if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/]/))return"tag";if(i.match(/^[\^_&]/))return"tag";if(i.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(i.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var c=i.next();return c=="{"||c=="}"||c=="["||c=="]"||c=="("||c==")"?"bracket":c=="%"?(i.skipToEnd(),"comment"):"error"}function r(i,o){var s=i.peek(),c;return s=="{"||s=="["?(c=y(o),c.openBracket(s),i.eat(s),d(o,t),"bracket"):/[ \t\r]/.test(s)?(i.eat(s),null):(d(o,t),m(o),t(i,o))}return{startState:function(){var i=C.inMathMode?function(o,s){return l(o,s)}:t;return{cmdState:[],f:i}},copyState:function(i){return{cmdState:i.cmdState.slice(),f:i.f}},token:function(i,o){return o.f(i,o)},blankLine:function(i){i.f=t,i.cmdState.length=0},lineComment:"%"}}),N.defineMIME("text/x-stex","stex"),N.defineMIME("text/x-latex","stex")})},"+ua5":function(F,Q,j){},"19Vz":function(F,Q,j){(function(N){N(j("VrN/"))})(function(N){N.defineOption("placeholder","",function(b,p,d){var t=d&&d!=N.Init;if(p&&!t)b.on("blur",y),b.on("change",m),b.on("swapDoc",m),N.on(b.getInputField(),"compositionupdate",b.state.placeholderCompose=function(){k(b)}),m(b);else if(!p&&t){b.off("blur",y),b.off("change",m),b.off("swapDoc",m),N.off(b.getInputField(),"compositionupdate",b.state.placeholderCompose),v(b);var l=b.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}p&&!b.hasFocus()&&y(b)});function v(b){b.state.placeholder&&(b.state.placeholder.parentNode.removeChild(b.state.placeholder),b.state.placeholder=null)}function C(b){v(b);var p=b.state.placeholder=document.createElement("pre");p.style.cssText="height: 0; overflow: visible",p.style.direction=b.getOption("direction"),p.className="CodeMirror-placeholder CodeMirror-line-like";var d=b.getOption("placeholder");typeof d=="string"&&(d=document.createTextNode(d)),p.appendChild(d),b.display.lineSpace.insertBefore(p,b.display.lineSpace.firstChild)}function k(b){setTimeout(function(){var p=!1,d=b.getInputField();d.nodeName=="TEXTAREA"?p=!d.value:b.lineCount()==1&&(p=!/[^\u200b]/.test(d.querySelector(".CodeMirror-line").textContent)),p?C(b):v(b)},20)}function y(b){S(b)&&C(b)}function m(b){var p=b.getWrapperElement(),d=S(b);p.className=p.className.replace(" CodeMirror-empty","")+(d?" CodeMirror-empty":""),d?C(b):v(b)}function S(b){return b.lineCount()===1&&b.getLine(0)===""}})},"1T2W":function(F,Q,j){F.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(F,Q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";var v={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},C={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};N.defineMode("xml",function(k,y){var m=k.indentUnit,S={},b=y.htmlMode?v:C;for(var p in b)S[p]=b[p];for(var p in y)S[p]=y[p];var d,t;function l(T,M){function L(z){return M.tokenize=z,z(T,M)}var A=T.next();if(A=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?L(o("atom","]]>")):null:T.match("--")?L(o("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),L(s(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),M.tokenize=o("meta","?>"),"meta"):(d=T.eat("/")?"closeTag":"openTag",M.tokenize=r,"tag bracket");if(A=="&"){var V;return T.eat("#")?T.eat("x")?V=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):V=T.eatWhile(/[\d]/)&&T.eat(";"):V=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),V?"atom":"error"}else return T.eatWhile(/[^&<]/),null}l.isInText=!0;function r(T,M){var L=T.next();if(L==">"||L=="/"&&T.eat(">"))return M.tokenize=l,d=L==">"?"endTag":"selfcloseTag","tag bracket";if(L=="=")return d="equals",null;if(L=="<"){M.tokenize=l,M.state=f,M.tagName=M.tagStart=null;var A=M.tokenize(T,M);return A?A+" tag error":"tag error"}else return/[\'\"]/.test(L)?(M.tokenize=i(L),M.stringStartCol=T.column(),M.tokenize(T,M)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function i(T){var M=function(L,A){for(;!L.eol();)if(L.next()==T){A.tokenize=r;break}return"string"};return M.isInAttribute=!0,M}function o(T,M){return function(L,A){for(;!L.eol();){if(L.match(M)){A.tokenize=l;break}L.next()}return T}}function s(T){return function(M,L){for(var A;(A=M.next())!=null;){if(A=="<")return L.tokenize=s(T+1),L.tokenize(M,L);if(A==">")if(T==1){L.tokenize=l;break}else return L.tokenize=s(T-1),L.tokenize(M,L)}return"meta"}}function c(T,M,L){this.prev=T.context,this.tagName=M,this.indent=T.indented,this.startOfLine=L,(S.doNotIndent.hasOwnProperty(M)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function a(T){T.context&&(T.context=T.context.prev)}function u(T,M){for(var L;;){if(!T.context)return;if(L=T.context.tagName,!S.contextGrabbers.hasOwnProperty(L)||!S.contextGrabbers[L].hasOwnProperty(M))return;a(T)}}function f(T,M,L){return T=="openTag"?(L.tagStart=M.column(),w):T=="closeTag"?_:f}function w(T,M,L){return T=="word"?(L.tagName=M.current(),t="tag",O):S.allowMissingTagName&&T=="endTag"?(t="tag bracket",O(T,M,L)):(t="error",w)}function _(T,M,L){if(T=="word"){var A=M.current();return L.context&&L.context.tagName!=A&&S.implicitlyClosed.hasOwnProperty(L.context.tagName)&&a(L),L.context&&L.context.tagName==A||S.matchClosing===!1?(t="tag",h):(t="tag error",R)}else return S.allowMissingTagName&&T=="endTag"?(t="tag bracket",h(T,M,L)):(t="error",R)}function h(T,M,L){return T!="endTag"?(t="error",h):(a(L),f)}function R(T,M,L){return t="error",h(T,M,L)}function O(T,M,L){if(T=="word")return t="attribute",g;if(T=="endTag"||T=="selfcloseTag"){var A=L.tagName,V=L.tagStart;return L.tagName=L.tagStart=null,T=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(A)?u(L,A):(u(L,A),L.context=new c(L,A,V==L.indented)),f}return t="error",O}function g(T,M,L){return T=="equals"?x:(S.allowMissing||(t="error"),O(T,M,L))}function x(T,M,L){return T=="string"?E:T=="word"&&S.allowUnquoted?(t="string",O):(t="error",O(T,M,L))}function E(T,M,L){return T=="string"?E:O(T,M,L)}return{startState:function(T){var M={tokenize:l,state:f,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(M.baseIndent=T),M},token:function(T,M){if(!M.tagName&&T.sol()&&(M.indented=T.indentation()),T.eatSpace())return null;d=null;var L=M.tokenize(T,M);return(L||d)&&L!="comment"&&(t=null,M.state=M.state(d||L,T,M),t&&(L=t=="error"?L+" error":t)),L},indent:function(T,M,L){var A=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+m;if(A&&A.noIndent)return N.Pass;if(T.tokenize!=r&&T.tokenize!=l)return L?L.match(/^(\s*)/)[0].length:0;if(T.tagName)return S.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+m*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/$/,blockCommentStart:"",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(T){T.state==x&&(T.state=O)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var M=[],L=T.context;L;L=L.prev)L.tagName&&M.push(L.tagName);return M.reverse()}}}),N.defineMIME("text/xml","xml"),N.defineMIME("application/xml","xml"),N.mimeModes.hasOwnProperty("text/html")||N.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("MlIO"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.Hasher,y=v.x64,m=y.Word,S=y.WordArray,b=v.algo;function p(){return m.create.apply(m,arguments)}var d=[p(1116352408,3609767458),p(1899447441,602891725),p(3049323471,3964484399),p(3921009573,2173295548),p(961987163,4081628472),p(1508970993,3053834265),p(2453635748,2937671579),p(2870763221,3664609560),p(3624381080,2734883394),p(310598401,1164996542),p(607225278,1323610764),p(1426881987,3590304994),p(1925078388,4068182383),p(2162078206,991336113),p(2614888103,633803317),p(3248222580,3479774868),p(3835390401,2666613458),p(4022224774,944711139),p(264347078,2341262773),p(604807628,2007800933),p(770255983,1495990901),p(1249150122,1856431235),p(1555081692,3175218132),p(1996064986,2198950837),p(2554220882,3999719339),p(2821834349,766784016),p(2952996808,2566594879),p(3210313671,3203337956),p(3336571891,1034457026),p(3584528711,2466948901),p(113926993,3758326383),p(338241895,168717936),p(666307205,1188179964),p(773529912,1546045734),p(1294757372,1522805485),p(1396182291,2643833823),p(1695183700,2343527390),p(1986661051,1014477480),p(2177026350,1206759142),p(2456956037,344077627),p(2730485921,1290863460),p(2820302411,3158454273),p(3259730800,3505952657),p(3345764771,106217008),p(3516065817,3606008344),p(3600352804,1432725776),p(4094571909,1467031594),p(275423344,851169720),p(430227734,3100823752),p(506948616,1363258195),p(659060556,3750685593),p(883997877,3785050280),p(958139571,3318307427),p(1322822218,3812723403),p(1537002063,2003034995),p(1747873779,3602036899),p(1955562222,1575990012),p(2024104815,1125592928),p(2227730452,2716904306),p(2361852424,442776044),p(2428436474,593698344),p(2756734187,3733110249),p(3204031479,2999351573),p(3329325298,3815920427),p(3391569614,3928383900),p(3515267271,566280711),p(3940187606,3454069534),p(4118630271,4000239992),p(116418474,1914138554),p(174292421,2731055270),p(289380356,3203993006),p(460393269,320620315),p(685471733,587496836),p(852142971,1086792851),p(1017036298,365543100),p(1126000580,2618297676),p(1288033470,3409855158),p(1501505948,4234509866),p(1607167915,987167468),p(1816402316,1246189591)],t=[];(function(){for(var r=0;r<80;r++)t[r]=p()})();var l=b.SHA512=k.extend({_doReset:function(){this._hash=new S.init([new m.init(1779033703,4089235720),new m.init(3144134277,2227873595),new m.init(1013904242,4271175723),new m.init(2773480762,1595750129),new m.init(1359893119,2917565137),new m.init(2600822924,725511199),new m.init(528734635,4215389547),new m.init(1541459225,327033209)])},_doProcessBlock:function(r,i){for(var o=this._hash.words,s=o[0],c=o[1],a=o[2],u=o[3],f=o[4],w=o[5],_=o[6],h=o[7],R=s.high,O=s.low,g=c.high,x=c.low,E=a.high,T=a.low,M=u.high,L=u.low,A=f.high,V=f.low,z=w.high,W=w.low,G=_.high,U=_.low,P=h.high,H=h.low,$=R,re=O,te=g,ge=x,ve=E,de=T,De=M,Te=L,he=A,ue=V,ie=z,Se=W,ne=G,ce=U,Oe=P,oe=H,q=0;q<80;q++){var Y,Z,ye=t[q];if(q<16)Z=ye.high=r[i+q*2]|0,Y=ye.low=r[i+q*2+1]|0;else{var be=t[q-15],Re=be.high,Qe=be.low,rt=(Re>>>1|Qe<<31)^(Re>>>8|Qe<<24)^Re>>>7,at=(Qe>>>1|Re<<31)^(Qe>>>8|Re<<24)^(Qe>>>7|Re<<25),qe=t[q-2],st=qe.high,lt=qe.low,je=(st>>>19|lt<<13)^(st<<3|lt>>>29)^st>>>6,Ie=(lt>>>19|st<<13)^(lt<<3|st>>>29)^(lt>>>6|st<<26),tt=t[q-7],ot=tt.high,ze=tt.low,Ze=t[q-16],Ne=Ze.high,Ae=Ze.low;Y=at+ze,Z=rt+ot+(Y>>>0>>0?1:0),Y=Y+Ie,Z=Z+je+(Y>>>0>>0?1:0),Y=Y+Ae,Z=Z+Ne+(Y>>>0>>0?1:0),ye.high=Z,ye.low=Y}var Me=he&ie^~he&ne,Ee=ue&Se^~ue&ce,Ce=$&te^$&ve^te&ve,ke=re&ge^re&de^ge&de,Fe=($>>>28|re<<4)^($<<30|re>>>2)^($<<25|re>>>7),Be=(re>>>28|$<<4)^(re<<30|$>>>2)^(re<<25|$>>>7),et=(he>>>14|ue<<18)^(he>>>18|ue<<14)^(he<<23|ue>>>9),ct=(ue>>>14|he<<18)^(ue>>>18|he<<14)^(ue<<23|he>>>9),yt=d[q],ft=yt.high,mt=yt.low,It=oe+ct,At=Oe+et+(It>>>0>>0?1:0),It=It+Ee,At=At+Me+(It>>>0>>0?1:0),It=It+mt,At=At+ft+(It>>>0>>0?1:0),It=It+Y,At=At+Z+(It>>>0>>0?1:0),_t=Be+ke,Vt=Fe+Ce+(_t>>>0>>0?1:0);Oe=ne,oe=ce,ne=ie,ce=Se,ie=he,Se=ue,ue=Te+It|0,he=De+At+(ue>>>0>>0?1:0)|0,De=ve,Te=de,ve=te,de=ge,te=$,ge=re,re=It+_t|0,$=At+Vt+(re>>>0>>0?1:0)|0}O=s.low=O+re,s.high=R+$+(O>>>0>>0?1:0),x=c.low=x+ge,c.high=g+te+(x>>>0>>0?1:0),T=a.low=T+de,a.high=E+ve+(T>>>0>>0?1:0),L=u.low=L+Te,u.high=M+De+(L>>>0>>0?1:0),V=f.low=V+ue,f.high=A+he+(V>>>0>>0?1:0),W=w.low=W+Se,w.high=z+ie+(W>>>0>>0?1:0),U=_.low=U+ce,_.high=G+ne+(U>>>0>>0?1:0),H=h.low=H+oe,h.high=P+Oe+(H>>>0>>0?1:0)},_doFinalize:function(){var r=this._data,i=r.words,o=this._nDataBytes*8,s=r.sigBytes*8;i[s>>>5]|=128<<24-s%32,i[(s+128>>>10<<5)+30]=Math.floor(o/4294967296),i[(s+128>>>10<<5)+31]=o,r.sigBytes=i.length*4,this._process();var c=this._hash.toX32();return c},clone:function(){var r=k.clone.call(this);return r._hash=this._hash.clone(),r},blockSize:1024/32});v.SHA512=k._createHelper(l),v.HmacSHA512=k._createHmacHelper(l)}(),N.SHA512})},"3y9D":function(F,Q,j){(function(N,v){F.exports=Q=v(j("Ib8C"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.WordArray,y=C.Hasher,m=v.algo,S=[],b=m.SHA1=y.extend({_doReset:function(){this._hash=new k.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(p,d){for(var t=this._hash.words,l=t[0],r=t[1],i=t[2],o=t[3],s=t[4],c=0;c<80;c++){if(c<16)S[c]=p[d+c]|0;else{var a=S[c-3]^S[c-8]^S[c-14]^S[c-16];S[c]=a<<1|a>>>31}var u=(l<<5|l>>>27)+s+S[c];c<20?u+=(r&i|~r&o)+1518500249:c<40?u+=(r^i^o)+1859775393:c<60?u+=(r&i|r&o|i&o)-1894007588:u+=(r^i^o)-899497514,s=o,o=i,i=r<<30|r>>>2,r=l,l=u}t[0]=t[0]+l|0,t[1]=t[1]+r|0,t[2]=t[2]+i|0,t[3]=t[3]+o|0,t[4]=t[4]+s|0},_doFinalize:function(){var p=this._data,d=p.words,t=this._nDataBytes*8,l=p.sigBytes*8;return d[l>>>5]|=128<<24-l%32,d[(l+64>>>9<<4)+14]=Math.floor(t/4294967296),d[(l+64>>>9<<4)+15]=t,p.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var p=y.clone.call(this);return p._hash=this._hash.clone(),p}});v.SHA1=y._createHelper(b),v.HmacSHA1=y._createHmacHelper(b)}(),N.SHA1})},4:function(F,Q){},"5VLF":function(F,Q,j){"use strict";var N,v;function C(k,y,m){var S=function(b,p){return k.js_beautify(b,p)};return S.js=k.js_beautify,S.css=y.css_beautify,S.html=m.html_beautify,S.js_beautify=k.js_beautify,S.css_beautify=y.css_beautify,S.html_beautify=m.html_beautify,S}!(N=[j("6UM0"),j("TXwP"),j("psGv")],v=function(k,y,m){return C(k,y,m)}.apply(Q,N),v!==void 0&&(F.exports=v))},"5hvy":function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("MlIO"))})(this,function(N){return function(v){var C=N,k=C.lib,y=k.WordArray,m=k.Hasher,S=C.x64,b=S.Word,p=C.algo,d=[],t=[],l=[];(function(){for(var o=1,s=0,c=0;c<24;c++){d[o+5*s]=(c+1)*(c+2)/2%64;var a=s%5,u=(2*o+3*s)%5;o=a,s=u}for(var o=0;o<5;o++)for(var s=0;s<5;s++)t[o+5*s]=s+(2*o+3*s)%5*5;for(var f=1,w=0;w<24;w++){for(var _=0,h=0,R=0;R<7;R++){if(f&1){var O=(1<>>24)&16711935|(f<<24|f>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;var _=c[u];_.high^=w,_.low^=f}for(var h=0;h<24;h++){for(var R=0;R<5;R++){for(var O=0,g=0,x=0;x<5;x++){var _=c[R+5*x];O^=_.high,g^=_.low}var E=r[R];E.high=O,E.low=g}for(var R=0;R<5;R++)for(var T=r[(R+4)%5],M=r[(R+1)%5],L=M.high,A=M.low,O=T.high^(L<<1|A>>>31),g=T.low^(A<<1|L>>>31),x=0;x<5;x++){var _=c[R+5*x];_.high^=O,_.low^=g}for(var V=1;V<25;V++){var O,g,_=c[V],z=_.high,W=_.low,G=d[V];G<32?(O=z<>>32-G,g=W<>>32-G):(O=W<>>64-G,g=z<>>64-G);var U=r[t[V]];U.high=O,U.low=g}var P=r[0],H=c[0];P.high=H.high,P.low=H.low;for(var R=0;R<5;R++)for(var x=0;x<5;x++){var V=R+5*x,_=c[V],$=r[V],re=r[(R+1)%5+5*x],te=r[(R+2)%5+5*x];_.high=$.high^~re.high&te.high,_.low=$.low^~re.low&te.low}var _=c[0],ge=l[h];_.high^=ge.high,_.low^=ge.low}},_doFinalize:function(){var o=this._data,s=o.words,c=this._nDataBytes*8,a=o.sigBytes*8,u=this.blockSize*32;s[a>>>5]|=1<<24-a%32,s[(v.ceil((a+1)/u)*u>>>5)-1]|=128,o.sigBytes=s.length*4,this._process();for(var f=this._state,w=this.cfg.outputLength/8,_=w/8,h=[],R=0;R<_;R++){var O=f[R],g=O.high,x=O.low;g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,h.push(x),h.push(g)}return new y.init(h,w)},clone:function(){for(var o=m.clone.call(this),s=o._state=this._state.slice(0),c=0;c<25;c++)s[c]=s[c].clone();return o}});C.SHA3=m._createHelper(i),C.HmacSHA3=m._createHmacHelper(i)}(Math),N.SHA3})},"5nXd":function(F,Q,j){var N=j("MFOe"),v=N.slice,C=N.pluck,k=N.each,y=N.bind,m=N.create,S=N.isList,b=N.isFunction,p=N.isObject;F.exports={createStore:l};var d={version:"2.0.12",enabled:!1,get:function(r,i){var o=this.storage.read(this._namespacePrefix+r);return this._deserialize(o,i)},set:function(r,i){return i===void 0?this.remove(r):(this.storage.write(this._namespacePrefix+r,this._serialize(i)),i)},remove:function(r){this.storage.remove(this._namespacePrefix+r)},each:function(r){var i=this;this.storage.each(function(o,s){r.call(i,i._deserialize(o),(s||"").replace(i._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(r){return this._namespacePrefix=="__storejs_"+r+"_"},createStore:function(){return l.apply(this,arguments)},addPlugin:function(r){this._addPlugin(r)},namespace:function(r){return l(this.storage,this.plugins,r)}};function t(){var r=typeof console=="undefined"?null:console;if(!r)return;var i=r.warn?r.warn:r.log;i.apply(r,arguments)}function l(r,i,o){o||(o=""),r&&!S(r)&&(r=[r]),i&&!S(i)&&(i=[i]);var s=o?"__storejs_"+o+"_":"",c=o?new RegExp("^"+s):null,a=/^[a-zA-Z0-9_\-]*$/;if(!a.test(o))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var u={_namespacePrefix:s,_namespaceRegexp:c,_testStorage:function(w){try{var _="__storejs__test__";w.write(_,_);var h=w.read(_)===_;return w.remove(_),h}catch(R){return!1}},_assignPluginFnProp:function(w,_){var h=this[_];this[_]=function(){var O=v(arguments,0),g=this;function x(){return h?(k(arguments,function(T,M){O[M]=T}),h.apply(g,O)):void 0}var E=[x].concat(O);return w.apply(g,E)}},_serialize:function(w){return JSON.stringify(w)},_deserialize:function(w,_){if(!w)return _;var h="";try{h=JSON.parse(w)}catch(R){h=w}return h!==void 0?h:_},_addStorage:function(w){if(this.enabled)return;this._testStorage(w)&&(this.storage=w,this.enabled=!0)},_addPlugin:function(w){var _=this;if(S(w)){k(w,function(O){_._addPlugin(O)});return}var h=C(this.plugins,function(O){return w===O});if(h)return;if(this.plugins.push(w),!b(w))throw new Error("Plugins must be function values that return objects");var R=w.call(this);if(!p(R))throw new Error("Plugins must return an object of function properties");k(R,function(O,g){if(!b(O))throw new Error("Bad plugin property: "+g+" from plugin "+w.name+". Plugins should only return functions.");_._assignPluginFnProp(O,g)})},addStorage:function(w){t("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(w)}},f=m(u,d,{plugins:[]});return f.raw={},k(f,function(w,_){b(w)&&(f.raw[_]=y(f,w))}),k(r,function(w){f._addStorage(w)}),k(i,function(w){f._addPlugin(w)}),f}},"6+eU":function(F,Q,j){"use strict";j.d(Q,"a",function(){return h});var N=j("wx14"),v=j("rePB"),C=j("VTBJ"),k=j("1OyB"),y=j("vuIU"),m=j("Ji7U"),S=j("LK+K"),b=j("cDcd"),p=j.n(b),d=j("TSYQ"),t=j.n(d),l=function(O){var g,x="".concat(O.rootPrefixCls,"-item"),E=t()(x,"".concat(x,"-").concat(O.page),(g={},Object(v.a)(g,"".concat(x,"-active"),O.active),Object(v.a)(g,O.className,!!O.className),Object(v.a)(g,"".concat(x,"-disabled"),!O.page),g)),T=function(){O.onClick(O.page)},M=function(A){O.onKeyPress(A,O.onClick,O.page)};return p.a.createElement("li",{title:O.showTitle?O.page:null,className:E,onClick:T,onKeyPress:M,tabIndex:"0"},O.itemRender(O.page,"page",p.a.createElement("a",{rel:"nofollow"},O.page)))},r=l,i={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},o=function(R){Object(m.a)(g,R);var O=Object(S.a)(g);function g(){var x;Object(k.a)(this,g);for(var E=arguments.length,T=new Array(E),M=0;M=0||L.relatedTarget.className.indexOf("".concat(W,"-next"))>=0))return;x.setState({goInputText:""}),z(x.getValidValue())},x.go=function(L){var A=x.state.goInputText;if(A==="")return;(L.keyCode===i.ENTER||L.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(y.a)(g,[{key:"getValidValue",value:function(){var E=this.state,T=E.goInputText,M=E.current;return!T||isNaN(T)?M:Number(T)}},{key:"getPageSizeOptions",value:function(){var E=this.props,T=E.pageSize,M=E.pageSizeOptions;return M.some(function(L){return L.toString()===T.toString()})?M:M.concat([T.toString()]).sort(function(L,A){var V=isNaN(Number(L))?0:Number(L),z=isNaN(Number(A))?0:Number(A);return V-z})}},{key:"render",value:function(){var E=this,T=this.props,M=T.pageSize,L=T.locale,A=T.rootPrefixCls,V=T.changeSize,z=T.quickGo,W=T.goButton,G=T.selectComponentClass,U=T.buildOptionText,P=T.selectPrefixCls,H=T.disabled,$=this.state.goInputText,re="".concat(A,"-options"),te=G,ge=null,ve=null,de=null;if(!V&&!z)return null;var De=this.getPageSizeOptions();if(V&&te){var Te=De.map(function(he,ue){return p.a.createElement(te.Option,{key:ue,value:he.toString()},(U||E.buildOptionText)(he))});ge=p.a.createElement(te,{disabled:H,prefixCls:P,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||De[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ue){return ue.parentNode}},Te)}return z&&(W&&(de=typeof W=="boolean"?p.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:H,className:"".concat(re,"-quick-jumper-button")},L.jump_to_confirm):p.a.createElement("span",{onClick:this.go,onKeyUp:this.go},W)),ve=p.a.createElement("div",{className:"".concat(re,"-quick-jumper")},L.jump_to,p.a.createElement("input",{disabled:H,type:"text",value:$,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),L.page,de)),p.a.createElement("li",{className:"".concat(re)},ge,ve)}}]),g}(p.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var s=o,c=j("N2Kk");function a(){}function u(R){return typeof R=="number"&&isFinite(R)&&Math.floor(R)===R}function f(R,O,g){return g}function w(R,O,g){var x=typeof R=="undefined"?O.pageSize:R;return Math.floor((g.total-1)/x)+1}var _=function(R){Object(m.a)(g,R);var O=Object(S.a)(g);function g(x){var E;Object(k.a)(this,g),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(w(void 0,E.state,E.props),E.state.current+(E.props.showLessItems?3:5))},E.getItemIcon=function(V,z){var W=E.props.prefixCls,G=V||p.a.createElement("button",{type:"button","aria-label":z,className:"".concat(W,"-item-link")});return typeof V=="function"&&(G=p.a.createElement(V,Object(C.a)({},E.props))),G},E.savePaginationNode=function(V){E.paginationNode=V},E.isValid=function(V){return u(V)&&V!==E.state.current},E.shouldDisplayQuickJumper=function(){var V=E.props,z=V.showQuickJumper,W=V.pageSize,G=V.total;return G<=W?!1:z},E.handleKeyDown=function(V){(V.keyCode===i.ARROW_UP||V.keyCode===i.ARROW_DOWN)&&V.preventDefault()},E.handleKeyUp=function(V){var z=E.getValidValue(V),W=E.state.currentInputValue;z!==W&&E.setState({currentInputValue:z}),V.keyCode===i.ENTER?E.handleChange(z):V.keyCode===i.ARROW_UP?E.handleChange(z-1):V.keyCode===i.ARROW_DOWN&&E.handleChange(z+1)},E.changePageSize=function(V){var z=E.state.current,W=w(V,E.state,E.props);z=z>W?W:z,W===0&&(z=E.state.current),typeof V=="number"&&("pageSize"in E.props||E.setState({pageSize:V}),"current"in E.props||E.setState({current:z,currentInputValue:z})),E.props.onShowSizeChange(z,V),"onChange"in E.props&&E.props.onChange&&E.props.onChange(z,V)},E.handleChange=function(V){var z=E.props.disabled,W=V;if(E.isValid(W)&&!z){var G=w(void 0,E.state,E.props);W>G?W=G:W<1&&(W=1),"current"in E.props||E.setState({current:W,currentInputValue:W});var U=E.state.pageSize;return E.props.onChange(W,U),W}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?W-2:0),U=2;U=M?A=M:A=Number(T),A}},{key:"getShowSizeChanger",value:function(){var E=this.props,T=E.showSizeChanger,M=E.total,L=E.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:M>L}},{key:"renderPrev",value:function(E){var T=this.props,M=T.prevIcon,L=T.itemRender,A=L(E,"prev",this.getItemIcon(M,"prev page")),V=!this.hasPrev();return Object(b.isValidElement)(A)?Object(b.cloneElement)(A,{disabled:V}):A}},{key:"renderNext",value:function(E){var T=this.props,M=T.nextIcon,L=T.itemRender,A=L(E,"next",this.getItemIcon(M,"next page")),V=!this.hasNext();return Object(b.isValidElement)(A)?Object(b.cloneElement)(A,{disabled:V}):A}},{key:"render",value:function(){var E=this,T=this.props,M=T.prefixCls,L=T.className,A=T.style,V=T.disabled,z=T.hideOnSinglePage,W=T.total,G=T.locale,U=T.showQuickJumper,P=T.showLessItems,H=T.showTitle,$=T.showTotal,re=T.simple,te=T.itemRender,ge=T.showPrevNextJumpers,ve=T.jumpPrevIcon,de=T.jumpNextIcon,De=T.selectComponentClass,Te=T.selectPrefixCls,he=T.pageSizeOptions,ue=this.state,ie=ue.current,Se=ue.pageSize,ne=ue.currentInputValue;if(z===!0&&W<=Se)return null;var ce=w(void 0,this.state,this.props),Oe=[],oe=null,q=null,Y=null,Z=null,ye=null,be=U&&U.goButton,Re=P?1:2,Qe=ie-1>0?ie-1:0,rt=ie+1=Re*2&&ie!==1+2&&(Oe[0]=Object(b.cloneElement)(Oe[0],{className:"".concat(M,"-item-after-jump-prev")}),Oe.unshift(oe)),ce-ie>=Re*2&&ie!==ce-2&&(Oe[Oe.length-1]=Object(b.cloneElement)(Oe[Oe.length-1],{className:"".concat(M,"-item-before-jump-next")}),Oe.push(q)),tt!==1&&Oe.unshift(Y),ot!==ce&&Oe.push(Z)}var Ne=null;$&&(Ne=p.a.createElement("li",{className:"".concat(M,"-total-text")},$(W,[W===0?0:(ie-1)*Se+1,ie*Se>W?W:ie*Se])));var Ae=!this.hasPrev()||!ce,Me=!this.hasNext()||!ce;return p.a.createElement("ul",Object(N.a)({className:t()(M,L,Object(v.a)({},"".concat(M,"-disabled"),V)),style:A,unselectable:"unselectable",ref:this.savePaginationNode},at),Ne,p.a.createElement("li",{title:H?G.prev_page:null,onClick:this.prev,tabIndex:Ae?null:0,onKeyPress:this.runIfEnterPrev,className:t()("".concat(M,"-prev"),Object(v.a)({},"".concat(M,"-disabled"),Ae)),"aria-disabled":Ae},this.renderPrev(Qe)),Oe,p.a.createElement("li",{title:H?G.next_page:null,onClick:this.next,tabIndex:Me?null:0,onKeyPress:this.runIfEnterNext,className:t()("".concat(M,"-next"),Object(v.a)({},"".concat(M,"-disabled"),Me)),"aria-disabled":Me},this.renderNext(rt)),p.a.createElement(s,{disabled:V,locale:G,rootPrefixCls:M,selectComponentClass:De,selectPrefixCls:Te,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ie,pageSize:Se,pageSizeOptions:he,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:be}))}}],[{key:"getDerivedStateFromProps",value:function(E,T){var M={};if("current"in E&&(M.current=E.current,E.current!==T.current&&(M.currentInputValue=M.current)),"pageSize"in E&&E.pageSize!==T.pageSize){var L=T.current,A=w(E.pageSize,T,E);L=L>A?A:L,"current"in E||(M.current=L,M.currentInputValue=L),M.pageSize=E.pageSize}return M}}]),g}(p.a.Component);_.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:c.a,style:{},itemRender:f,totalBoundaryShowSizeChanger:50};var h=_},"6RRn":function(F,Q,j){"use strict";var N=j("wCXF"),v=j("n6Qo");j.d(Q,"b",function(){return v.a});var C=j("IBYe"),k=j("6eGT"),y=j("hW8S");j.d(Q,"a",function(){return y.a}),Q.c=N.b},"6UM0":function(F,Q,j){var N,v;(function(){var C;(function(){"use strict";var y=[function(p,d,t){var l=t(1).Beautifier,r=t(5).Options;function i(o,s){var c=new l(o,s);return c.beautify()}p.exports=i,p.exports.defaultOptions=function(){return new r}},function(p,d,t){var l=t(2).Output,r=t(3).Token,i=t(4),o=t(5).Options,s=t(7).Tokenizer,c=t(7).line_starters,a=t(7).positionable_operators,u=t(7).TOKEN;function f(P,H){return H.indexOf(P)!==-1}function w(P){return P.replace(/^\s+/g,"")}function _(P){for(var H={},$=0;$$&&($=P.line_indent_level));var re={mode:H,parent:P,last_token:P?P.last_token:new r(u.START_BLOCK,""),last_word:P?P.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:$,alignment:0,line_indent_level:P?P.line_indent_level:$,start_line_index:this._output.get_line_number(),ternary_depth:0};return re},G.prototype._reset=function(P){var H=P.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new l(this._options,H),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(T.BlockStatement);var $=new s(P,this._options);return this._tokens=$.tokenize(),P},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var P,H=this._reset(this._source_text),$=this._options.eol;this._options.eol==="auto"&&($=` `,H&&i.lineBreak.test(H||"")&&($=H.match(i.lineBreak)[0]));for(var re=this._tokens.next();re;)this.handle_token(re),this._last_last_text=this._flags.last_token.text,this._flags.last_token=re,re=this._tokens.next();return P=this._output.get_code($),P},G.prototype.handle_token=function(P,H){P.type===u.START_EXPR?this.handle_start_expr(P):P.type===u.END_EXPR?this.handle_end_expr(P):P.type===u.START_BLOCK?this.handle_start_block(P):P.type===u.END_BLOCK?this.handle_end_block(P):P.type===u.WORD?this.handle_word(P):P.type===u.RESERVED?this.handle_word(P):P.type===u.SEMICOLON?this.handle_semicolon(P):P.type===u.STRING?this.handle_string(P):P.type===u.EQUALS?this.handle_equals(P):P.type===u.OPERATOR?this.handle_operator(P):P.type===u.COMMA?this.handle_comma(P):P.type===u.BLOCK_COMMENT?this.handle_block_comment(P,H):P.type===u.COMMENT?this.handle_comment(P,H):P.type===u.DOT?this.handle_dot(P):P.type===u.EOF?this.handle_eof(P):P.type===u.UNKNOWN?this.handle_unknown(P,H):this.handle_unknown(P,H)},G.prototype.handle_whitespace_and_comments=function(P,H){var $=P.newlines,re=this._options.keep_array_indentation&&A(this._flags.mode);if(P.comments_before)for(var te=P.comments_before.next();te;)this.handle_whitespace_and_comments(te,H),this.handle_token(te,H),te=P.comments_before.next();if(re)for(var ge=0;ge<$;ge+=1)this.print_newline(ge>0,H);else if(this._options.max_preserve_newlines&&$>this._options.max_preserve_newlines&&($=this._options.max_preserve_newlines),this._options.preserve_newlines&&$>1){this.print_newline(!1,H);for(var ve=1;ve<$;ve+=1)this.print_newline(!0,H)}};var U=["async","break","continue","return","throw","yield"];G.prototype.allow_wrap_or_preserved_newline=function(P,H){if(H=H===void 0?!1:H,this._output.just_added_newline())return;var $=this._options.preserve_newlines&&P.newlines||H,re=f(this._flags.last_token.text,a)||f(P.text,a);if(re){var te=f(this._flags.last_token.text,a)&&f(this._options.operator_position,E)||f(P.text,a);$=$&&te}if($)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(R(this._flags.last_token,U))return;this._output.set_wrap_point()}},G.prototype.print_newline=function(P,H){if(!H&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==u.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var $=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&h($,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(P)&&(this._flags.multiline_frame=!0)},G.prototype.print_token_line_indentation=function(P){this._output.just_added_newline()&&(this._options.keep_array_indentation&&P.newlines&&(P.text==="["||A(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(P.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},G.prototype.print_token=function(P){if(this._output.raw){this._output.add_raw_token(P);return}if(this._options.comma_first&&P.previous&&P.previous.type===u.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var H=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(H),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(P),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(P),this._output.non_breaking_space=!0,this._output.add_token(P.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},G.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.set_mode=function(P){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,P),this._flags=this.create_flags(this._previous_flags,P),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===T.Statement&&M(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.start_of_object_property=function(){return this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"]))},G.prototype.start_of_statement=function(P){var H=!1;return H=H||R(this._flags.last_token,["var","let","const"])&&P.type===u.WORD,H=H||h(this._flags.last_token,"do"),H=H||!(this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement)&&R(this._flags.last_token,U)&&!P.newlines,H=H||h(this._flags.last_token,"else")&&!(h(P,"if")&&!P.comments_before),H=H||this._flags.last_token.type===u.END_EXPR&&(this._previous_flags.mode===T.ForInitializer||this._previous_flags.mode===T.Conditional),H=H||this._flags.last_token.type===u.WORD&&this._flags.mode===T.BlockStatement&&!this._flags.in_case&&!(P.text==="--"||P.text==="++")&&this._last_last_text!=="function"&&P.type!==u.WORD&&P.type!==u.RESERVED,H=H||this._flags.mode===T.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"])),H?(this.set_mode(T.Statement),this.indent(),this.handle_whitespace_and_comments(P,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P,R(P,["do","for","if","while"])),!0):!1},G.prototype.handle_start_expr=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P);var H=T.Expression;if(P.text==="["){if(this._flags.last_token.type===u.WORD||this._flags.last_token.text===")"){R(this._flags.last_token,c)&&(this._output.space_before_token=!0),this.print_token(P),this.set_mode(H),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}H=T.ArrayLiteral,A(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),f(this._flags.last_token.type,[u.START_EXPR,u.END_EXPR,u.WORD,u.OPERATOR,u.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===u.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,H=T.ForInitializer):f(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,H=T.Conditional):f(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&P.whitespace_before===""?this._output.space_before_token=!1:(f(this._flags.last_token.text,c)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===u.EQUALS||this._flags.last_token.type===u.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P);else if(this._flags.last_token.type===u.WORD){this._output.space_before_token=!1;var $=this._tokens.peek(-3);if(this._options.space_after_named_function&&$){var re=this._tokens.peek(-4);R($,["async","function"])||$.text==="*"&&R(re,["async","function"])?this._output.space_before_token=!0:this._flags.mode===T.ObjectLiteral?($.text==="{"||$.text===","||$.text==="*"&&(re.text==="{"||re.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(P);(this._flags.last_token.type===u.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(f(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&f(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===u.START_BLOCK?this.print_newline():(this._flags.last_token.type===u.END_EXPR||this._flags.last_token.type===u.START_EXPR||this._flags.last_token.type===u.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===u.COMMA)&&this.allow_wrap_or_preserved_newline(P,P.newlines),this.print_token(P),this.set_mode(H),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(P){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(P,P.text==="]"&&A(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===u.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(P),this.restore_mode(),M(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===T.Conditional&&(this._previous_flags.mode=T.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},G.prototype.handle_start_block=function(P){this.handle_whitespace_and_comments(P);var H=this._tokens.peek(),$=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===u.END_EXPR?(this.set_mode(T.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(T.BlockStatement):$&&(f($.text,[":",","])&&f(H.type,[u.STRING,u.WORD,u.RESERVED])||f(H.text,["get","set","..."])&&f($.type,[u.WORD,u.RESERVED]))?f(this._last_last_text,["class","interface"])&&!f($.text,[":",","])?this.set_mode(T.BlockStatement):this.set_mode(T.ObjectLiteral):this._flags.last_token.type===u.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(T.BlockStatement):f(this._flags.last_token.type,[u.EQUALS,u.START_EXPR,u.COMMA,u.OPERATOR])||R(this._flags.last_token,["return","throw","import","default"])?this.set_mode(T.ObjectLiteral):this.set_mode(T.BlockStatement),this._flags.last_token&&(R(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var re=!H.comments_before&&H.text==="}",te=re&&this._flags.last_word==="function"&&this._flags.last_token.type===u.END_EXPR;if(this._options.brace_preserve_inline){var ge=0,ve=null;this._flags.inline_frame=!0;do if(ge+=1,ve=this._tokens.peek(ge-1),ve.newlines){this._flags.inline_frame=!1;break}while(ve.type!==u.EOF&&!(ve.type===u.END_BLOCK&&ve.opened===P))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==u.OPERATOR&&(te||this._flags.last_token.type===u.EQUALS||R(this._flags.last_token,O)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(A(this._previous_flags.mode)&&(this._flags.last_token.type===u.START_EXPR||this._flags.last_token.type===u.COMMA)&&((this._flags.last_token.type===u.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===u.COMMA||this._flags.last_token.type===u.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(P),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==u.OPERATOR&&this._flags.last_token.type!==u.START_EXPR&&(this._flags.last_token.type===u.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(P),this.indent(),!re&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},G.prototype.handle_end_block=function(P){for(this.handle_whitespace_and_comments(P);this._flags.mode===T.Statement;)this.restore_mode();var H=this._flags.last_token.type===u.START_BLOCK;this._flags.inline_frame&&!H?this._output.space_before_token=!0:this._options.brace_style==="expand"?H||this.print_newline():H||(A(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(P)},G.prototype.handle_word=function(P){if(P.type===u.RESERVED){if(f(P.text,["set","get"])&&this._flags.mode!==T.ObjectLiteral)P.type=u.WORD;else if(P.text==="import"&&f(this._tokens.peek().text,["(","."]))P.type=u.WORD;else if(f(P.text,["as","from"])&&!this._flags.import_block)P.type=u.WORD;else if(this._flags.mode===T.ObjectLiteral){var H=this._tokens.peek();H.text===":"&&(P.type=u.WORD)}}if(this.start_of_statement(P)?R(this._flags.last_token,["var","let","const"])&&P.type===u.WORD&&(this._flags.declaration_statement=!0):P.newlines&&!V(this._flags.mode)&&(this._flags.last_token.type!==u.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==u.EQUALS&&(this._options.preserve_newlines||!R(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(P),this.print_newline()):this.handle_whitespace_and_comments(P),this._flags.do_block&&!this._flags.do_while)if(h(P,"while")){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&h(P,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===T.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&R(P,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(P),this._flags.in_case=!0;return}if((this._flags.last_token.type===u.COMMA||this._flags.last_token.type===u.START_EXPR||this._flags.last_token.type===u.EQUALS||this._flags.last_token.type===u.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P)),h(P,"function")){(f(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(f(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===u.OPERATOR))&&(!this._output.just_added_blankline()&&!P.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===u.RESERVED||this._flags.last_token.type===u.WORD?R(this._flags.last_token,["get","set","new","export"])||R(this._flags.last_token,U)?this._output.space_before_token=!0:h(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===u.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(V(this._flags.mode)||A(this._flags.mode))||this.print_newline(),this.print_token(P),this._flags.last_word=P.text;return}var $="NONE";if(this._flags.last_token.type===u.END_BLOCK?this._previous_flags.inline_frame?$="SPACE":R(P,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines?$="NEWLINE":($="SPACE",this._output.space_before_token=!0):$="NEWLINE":this._flags.last_token.type===u.SEMICOLON&&this._flags.mode===T.BlockStatement?$="NEWLINE":this._flags.last_token.type===u.SEMICOLON&&V(this._flags.mode)?$="SPACE":this._flags.last_token.type===u.STRING?$="NEWLINE":this._flags.last_token.type===u.RESERVED||this._flags.last_token.type===u.WORD||this._flags.last_token.text==="*"&&(f(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&f(this._last_last_text,["{",","]))?$="SPACE":this._flags.last_token.type===u.START_BLOCK?this._flags.inline_frame?$="SPACE":$="NEWLINE":this._flags.last_token.type===u.END_EXPR&&(this._output.space_before_token=!0,$="NEWLINE"),R(P,c)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?$="SPACE":$="NEWLINE"),R(P,["else","catch","finally"]))if((!(this._flags.last_token.type===u.END_BLOCK&&this._previous_flags.mode===T.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var re=this._output.current_line;re.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else $==="NEWLINE"?R(this._flags.last_token,O)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&R(P,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==u.END_EXPR?(this._flags.last_token.type!==u.START_EXPR||!R(P,["var","let","const"]))&&this._flags.last_token.text!==":"&&(h(P,"if")&&h(P.previous,"else")?this._output.space_before_token=!0:this.print_newline()):R(P,c)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&A(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():$==="SPACE"&&(this._output.space_before_token=!0);P.previous&&(P.previous.type===u.WORD||P.previous.type===u.RESERVED)&&(this._output.space_before_token=!0),this.print_token(P),this._flags.last_word=P.text,P.type===u.RESERVED&&(P.text==="do"?this._flags.do_block=!0:P.text==="if"?this._flags.if_block=!0:P.text==="import"?this._flags.import_block=!0:this._flags.import_block&&h(P,"from")&&(this._flags.import_block=!1))},G.prototype.handle_semicolon=function(P){this.start_of_statement(P)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(P);for(var H=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&h(H,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(P)},G.prototype.handle_string=function(P){P.text.startsWith("`")&&P.newlines===0&&P.whitespace_before===""&&(P.previous.text===")"||this._flags.last_token.type===u.WORD)||(this.start_of_statement(P)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(P),this._flags.last_token.type===u.RESERVED||this._flags.last_token.type===u.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===u.COMMA||this._flags.last_token.type===u.START_EXPR||this._flags.last_token.type===u.EQUALS||this._flags.last_token.type===u.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P):P.text.startsWith("`")&&this._flags.last_token.type===u.END_EXPR&&(P.previous.text==="]"||P.previous.text===")")&&P.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(P)},G.prototype.handle_equals=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0},G.prototype.handle_comma=function(P){this.handle_whitespace_and_comments(P,!0),this.print_token(P),this._output.space_before_token=!0,this._flags.declaration_statement?(V(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)):this._flags.mode===T.ObjectLiteral||this._flags.mode===T.Statement&&this._flags.parent.mode===T.ObjectLiteral?(this._flags.mode===T.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)},G.prototype.handle_operator=function(P){var H=P.text==="*"&&(R(this._flags.last_token,["function","yield"])||f(this._flags.last_token.type,[u.START_BLOCK,u.COMMA,u.END_BLOCK,u.SEMICOLON])),$=f(P.text,["-","+"])&&(f(this._flags.last_token.type,[u.START_BLOCK,u.START_EXPR,u.EQUALS,u.OPERATOR])||f(this._flags.last_token.text,c)||this._flags.last_token.text===",");if(!this.start_of_statement(P)){var re=!H;this.handle_whitespace_and_comments(P,re)}if(P.text==="*"&&this._flags.last_token.type===u.DOT){this.print_token(P);return}if(P.text==="::"){this.print_token(P);return}if(this._flags.last_token.type===u.OPERATOR&&f(this._options.operator_position,E)&&this.allow_wrap_or_preserved_newline(P),P.text===":"&&this._flags.in_case){this.print_token(P),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==u.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var te=!0,ge=!0,ve=!1;if(P.text===":"?this._flags.ternary_depth===0?te=!1:(this._flags.ternary_depth-=1,ve=!0):P.text==="?"&&(this._flags.ternary_depth+=1),!$&&!H&&this._options.preserve_newlines&&f(P.text,a)){var de=P.text===":",De=de&&ve,Te=de&&!ve;switch(this._options.operator_position){case x.before_newline:this._output.space_before_token=!Te,this.print_token(P),(!de||De)&&this.allow_wrap_or_preserved_newline(P),this._output.space_before_token=!0;return;case x.after_newline:this._output.space_before_token=!0,!de||De?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(P):this._output.space_before_token=!1,this.print_token(P),this._output.space_before_token=!0;return;case x.preserve_newline:Te||this.allow_wrap_or_preserved_newline(P),te=!(this._output.just_added_newline()||Te),this._output.space_before_token=te,this.print_token(P),this._output.space_before_token=!0;return}}if(H){this.allow_wrap_or_preserved_newline(P),te=!1;var he=this._tokens.peek();ge=he&&f(he.type,[u.WORD,u.RESERVED])}else if(P.text==="...")this.allow_wrap_or_preserved_newline(P),te=this._flags.last_token.type===u.START_BLOCK,ge=!1;else if(f(P.text,["--","++","!","~"])||$){if((this._flags.last_token.type===u.COMMA||this._flags.last_token.type===u.START_EXPR)&&this.allow_wrap_or_preserved_newline(P),te=!1,ge=!1,P.newlines&&(P.text==="--"||P.text==="++"||P.text==="~")){var ue=R(this._flags.last_token,O)&&P.newlines;ue&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ue,!0)}this._flags.last_token.text===";"&&V(this._flags.mode)&&(te=!0),this._flags.last_token.type===u.RESERVED?te=!0:this._flags.last_token.type===u.END_EXPR?te=!(this._flags.last_token.text==="]"&&(P.text==="--"||P.text==="++")):this._flags.last_token.type===u.OPERATOR&&(te=f(P.text,["--","-","++","+"])&&f(this._flags.last_token.text,["--","-","++","+"]),f(P.text,["+","-"])&&f(this._flags.last_token.text,["--","++"])&&(ge=!0)),(this._flags.mode===T.BlockStatement&&!this._flags.inline_frame||this._flags.mode===T.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||te,this.print_token(P),this._output.space_before_token=ge},G.prototype.handle_block_comment=function(P,H){if(this._output.raw){this._output.add_raw_token(P),P.directives&&P.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(P.directives){this.print_newline(!1,H),this.print_token(P),P.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!i.newline.test(P.text)&&!P.newlines){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0;return}else this.print_block_commment(P,H)},G.prototype.print_block_commment=function(P,H){var $=L(P.text),re,te=!1,ge=!1,ve=P.whitespace_before,de=ve.length;if(this.print_newline(!1,H),this.print_token_line_indentation(P),this._output.add_token($[0]),this.print_newline(!1,H),$.length>1){for($=$.slice(1),te=z($,"*"),ge=W($,ve),te&&(this._flags.alignment=1),re=0;re<$.length;re++)te?(this.print_token_line_indentation(P),this._output.add_token(w($[re]))):ge&&$[re]?(this.print_token_line_indentation(P),this._output.add_token($[re].substring(de))):(this._output.current_line.set_indent(-1),this._output.add_token($[re])),this.print_newline(!1,H);this._flags.alignment=0}},G.prototype.handle_comment=function(P,H){P.newlines?this.print_newline(!1,H):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(P),this.print_newline(!1,H)},G.prototype.handle_dot=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),R(this._flags.last_token,O)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(P,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(P)},G.prototype.handle_unknown=function(P,H){this.print_token(P),P.text[P.text.length-1]===` `&&this.print_newline(!1,H)},G.prototype.handle_eof=function(P){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P)},p.exports.Beautifier=G},function(p){function d(r){this.__parent=r,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}d.prototype.clone_empty=function(){var r=new d(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},d.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},d.prototype.has_match=function(r){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(r))return!0;return!1},d.prototype.set_indent=function(r,i){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(r){this.__items.push(r);var i=r.lastIndexOf(` `);i!==-1?this.__character_count=r.length-i:this.__character_count+=r.length},d.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function t(r,i){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),i=i||"",r.indent_level>0&&(i=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}t.prototype.get_indent_size=function(r,i){var o=this.__base_string_length;return i=i||0,r<0&&(o=0),o+=r*this.__indent_size,o+=i,o},t.prototype.get_indent_string=function(r,i){var o=this.__base_string;return i=i||0,r<0&&(r=0,o=""),i+=r*this.__indent_size,this.__ensure_cache(i),o+=this.__cache[i],o},t.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var r=this.__cache.length,i=0,o="";this.__indent_size&&r>=this.__indent_size&&(i=Math.floor(r/this.__indent_size),r-=i*this.__indent_size,o=new Array(i+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function l(r,i){this.__indent_cache=new t(r,i),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(r,i){return this.__indent_cache.get_indent_string(r,i)},l.prototype.get_indent_size=function(r,i){return this.__indent_cache.get_indent_size(r,i)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(r){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===` `&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(` `);return r!==` `&&(o=o.replace(/[\n]/g,r)),o},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(r,i){return r=r||0,i=i||0,this.next_line.set_indent(r,i),this.__lines.length>1?(this.current_line.set_indent(r,i),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(r){for(var i=0;i1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(r,i){for(var o=this.__lines.length-2;o>=0;){var s=this.__lines[o];if(s.is_empty())break;if(s.item(0).indexOf(r)!==0&&s.item(-1)!==i){this.__lines.splice(o+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},p.exports.Output=l},function(p){function d(t,l,r,i){this.type=t,this.text=l,this.comments_before=null,this.newlines=r||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}p.exports.Token=d},function(p,d){var t="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",l="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",i="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="(?:\\\\u[0-9a-fA-F]{4}|["+t+r+"])",s="(?:\\\\u[0-9a-fA-F]{4}|["+l+r+i+"])*";d.identifier=new RegExp(o+s,"g"),d.identifierStart=new RegExp(o),d.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+l+r+i+"])+");var c=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;d.newline=/[\n\r\u2028\u2029]/,d.lineBreak=new RegExp(`\r |`+d.newline.source),d.allLineBreaks=new RegExp(d.lineBreak.source,"g")},function(p,d,t){var l=t(6).Options,r=["before-newline","after-newline","preserve-newline"];function i(o){l.call(this,o,"js");var s=this.raw_options.brace_style||null;s==="expand-strict"?this.raw_options.brace_style="expand":s==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var c=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),g=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";g=g.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),g="\\?\\.(?!\\d) "+g,g=g.replace(/ /g,"|");var x=new RegExp(g),E="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),T=E.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),M=new RegExp("^(?:"+T.join("|")+")$"),L,A=function(z,W){r.call(this,z,W),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new c(this._input),U=new a(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(s.identifier).matching(s.identifierMatch),number:G.matching(_),punct:G.matching(x),comment:G.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:G.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:G.matching(//),include:G.starting_with(/#include/).until_after(s.lineBreak),shebang:G.starting_with(/#!/).until_after(s.lineBreak),xml:G.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};A.prototype=new r,A.prototype._is_comment=function(z){return z.type===f.COMMENT||z.type===f.BLOCK_COMMENT||z.type===f.UNKNOWN},A.prototype._is_opening=function(z){return z.type===f.START_BLOCK||z.type===f.START_EXPR},A.prototype._is_closing=function(z,W){return(z.type===f.END_BLOCK||z.type===f.END_EXPR)&&W&&(z.text==="]"&&W.text==="["||z.text===")"&&W.text==="("||z.text==="}"&&W.text==="{")},A.prototype._reset=function(){L=!1},A.prototype._get_next_token=function(z,W){var G=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(f.EOF,""):(G=G||this._read_non_javascript(U),G=G||this._read_string(U),G=G||this._read_word(z),G=G||this._read_singles(U),G=G||this._read_comment(U),G=G||this._read_regexp(U,z),G=G||this._read_xml(U,z),G=G||this._read_punctuation(),G=G||this._create_token(f.UNKNOWN,this._input.next()),G)},A.prototype._read_word=function(z){var W;if(W=this.__patterns.identifier.read(),W!=="")return W=W.replace(s.allLineBreaks,` `),!(z.type===f.DOT||z.type===f.RESERVED&&(z.text==="set"||z.text==="get"))&&M.test(W)?(W==="in"||W==="of")&&(z.type===f.WORD||z.type===f.STRING)?this._create_token(f.OPERATOR,W):this._create_token(f.RESERVED,W):this._create_token(f.WORD,W);if(W=this.__patterns.number.read(),W!=="")return this._create_token(f.WORD,W)},A.prototype._read_singles=function(z){var W=null;return z==="("||z==="["?W=this._create_token(f.START_EXPR,z):z===")"||z==="]"?W=this._create_token(f.END_EXPR,z):z==="{"?W=this._create_token(f.START_BLOCK,z):z==="}"?W=this._create_token(f.END_BLOCK,z):z===";"?W=this._create_token(f.SEMICOLON,z):z==="."&&R.test(this._input.peek(1))?W=this._create_token(f.DOT,z):z===","&&(W=this._create_token(f.COMMA,z)),W&&this._input.next(),W},A.prototype._read_punctuation=function(){var z=this.__patterns.punct.read();if(z!=="")return z==="="?this._create_token(f.EQUALS,z):z==="?."?this._create_token(f.DOT,z):this._create_token(f.OPERATOR,z)},A.prototype._read_non_javascript=function(z){var W="";if(z==="#"){if(this._is_first_token()&&(W=this.__patterns.shebang.read(),W))return this._create_token(f.UNKNOWN,W.trim()+` `);if(W=this.__patterns.include.read(),W)return this._create_token(f.UNKNOWN,W.trim()+` `);z=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(h)){do z=this._input.next(),G+=z;while(this._input.hasNext()&&z!=="#"&&z!=="=");return z==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(G+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(G+="{}",this._input.next(),this._input.next())),this._create_token(f.WORD,G)}this._input.back()}else if(z==="<"&&this._is_first_token()){if(W=this.__patterns.html_comment_start.read(),W){for(;this._input.hasNext()&&!this._input.testChar(s.newline);)W+=this._input.next();return L=!0,this._create_token(f.COMMENT,W)}}else if(L&&z==="-"&&(W=this.__patterns.html_comment_end.read(),W))return L=!1,this._create_token(f.COMMENT,W);return null},A.prototype._read_comment=function(z){var W=null;if(z==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var U=w.get_directives(G);U&&U.ignore==="start"&&(G+=w.readIgnored(this._input)),G=G.replace(s.allLineBreaks,` `),W=this._create_token(f.BLOCK_COMMENT,G),W.directives=U}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),W=this._create_token(f.COMMENT,G))}return W},A.prototype._read_string=function(z){if(z==="`"||z==="'"||z==='"'){var W=this._input.next();return this.has_char_escapes=!1,z==="`"?W+=this._read_string_recursive("`",!0,"${"):W+=this._read_string_recursive(z),this.has_char_escapes&&this._options.unescape_strings&&(W=V(W)),this._input.peek()===z&&(W+=this._input.next()),W=W.replace(s.allLineBreaks,` `),this._create_token(f.STRING,W)}return null},A.prototype._allow_regexp_or_xml=function(z){return z.type===f.RESERVED&&u(z.text,["return","case","throw","else","do","typeof","yield"])||z.type===f.END_EXPR&&z.text===")"&&z.opened.previous.type===f.RESERVED&&u(z.opened.previous.text,["if","while","for"])||u(z.type,[f.COMMENT,f.START_EXPR,f.START_BLOCK,f.START,f.END_BLOCK,f.OPERATOR,f.EQUALS,f.EOF,f.SEMICOLON,f.COMMA])},A.prototype._read_regexp=function(z,W){if(z==="/"&&this._allow_regexp_or_xml(W)){for(var G=this._input.next(),U=!1,P=!1;this._input.hasNext()&&(U||P||this._input.peek()!==z)&&!this._input.testChar(s.newline);)G+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?P=!0:this._input.peek()==="]"&&(P=!1)),this._input.next();return this._input.peek()===z&&(G+=this._input.next(),G+=this._input.read(s.identifier)),this._create_token(f.STRING,G)}return null},A.prototype._read_xml=function(z,W){if(this._options.e4x&&z==="<"&&this._allow_regexp_or_xml(W)){var G="",U=this.__patterns.xml.read_match();if(U){for(var P=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),H=P.indexOf("{")===0,$=0;U;){var re=!!U[1],te=U[2],ge=!!U[U.length-1]||te.slice(0,8)==="![CDATA[";if(!ge&&(te===P||H&&te.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--$:++$),G+=U[0],$<=0)break;U=this.__patterns.xml.read_match()}return U||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(s.allLineBreaks,` `),this._create_token(f.STRING,G)}}return null};function V(z){for(var W="",G=0,U=new l(z),P=null;U.hasNext();)if(P=U.match(/([\s]|[^\\]|\\\\)+/g),P&&(W+=P[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")P=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")P=U.match(/u([0-9A-Fa-f]{4})/g);else{W+="\\",U.hasNext()&&(W+=U.next());continue}if(!P)return z;if(G=parseInt(P[1],16),G>126&&G<=255&&P[0].indexOf("x")===0)return z;if(G>=0&&G<32){W+="\\"+P[0];continue}else G===34||G===39||G===92?W+="\\"+String.fromCharCode(G):W+=String.fromCharCode(G)}return W}A.prototype._read_string_recursive=function(z,W,G){var U,P;z==="'"?P=this.__patterns.single_quote:z==='"'?P=this.__patterns.double_quote:z==="`"?P=this.__patterns.template_text:z==="}"&&(P=this.__patterns.template_expression);for(var H=P.read(),$="";this._input.hasNext();){if($=this._input.next(),$===z||!W&&s.newline.test($)){this._input.back();break}else $==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===` `&&this._input.next(),$+=this._input.next()):G&&(G==="${"&&$==="$"&&this._input.peek()==="{"&&($+=this._input.next()),G===$&&(z==="`"?$+=this._read_string_recursive("}",W,"`"):$+=this._read_string_recursive("`",W,"${"),this._input.hasNext()&&($+=this._input.next())));$+=P.read(),H+=$}return H},p.exports.Tokenizer=A,p.exports.TOKEN=f,p.exports.positionable_operators=O.slice(),p.exports.line_starters=E.slice()},function(p){var d=RegExp.prototype.hasOwnProperty("sticky");function t(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position=0&&l=0&&r=l.length&&this.__input.substring(r-l.length,r).toLowerCase()===l},p.exports.InputScanner=t},function(p,d,t){var l=t(8).InputScanner,r=t(3).Token,i=t(10).TokenStream,o=t(11).WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},c=function(a,u){this._input=new l(a),this._options=u||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};c.prototype.tokenize=function(){this._input.restart(),this.__tokens=new i,this._reset();for(var a,u=new r(s.START,""),f=null,w=[],_=new i;u.type!==s.EOF;){for(a=this._get_next_token(u,f);this._is_comment(a);)_.add(a),a=this._get_next_token(u,f);_.isEmpty()||(a.comments_before=_,_=new i),a.parent=f,this._is_opening(a)?(w.push(f),f=a):f&&this._is_closing(a,f)&&(a.opened=f,f.closed=a,f=w.pop(),a.parent=f),a.previous=u,u.next=a,this.__tokens.add(a),u=a}return this.__tokens},c.prototype._is_first_token=function(){return this.__tokens.isEmpty()},c.prototype._reset=function(){},c.prototype._get_next_token=function(a,u){this._readWhitespace();var f=this._input.read(/.+/g);return f?this._create_token(s.RAW,f):this._create_token(s.EOF,"")},c.prototype._is_comment=function(a){return!1},c.prototype._is_opening=function(a){return!1},c.prototype._is_closing=function(a,u){return!1},c.prototype._create_token=function(a,u){var f=new r(a,u,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return f},c.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},p.exports.Tokenizer=c,p.exports.TOKEN=s},function(p){function d(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}d.prototype.restart=function(){this.__position=0},d.prototype.isEmpty=function(){return this.__tokens_length===0},d.prototype.hasNext=function(){return this.__position=0&&t/),erb:c.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:c.starting_with(/{%/).until_after(/%}/),django_value:c.starting_with(/{{/).until_after(/}}/),django_comment:c.starting_with(/{#/).until_after(/#}/),smarty:c.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:c.starting_with(/{\*/).until_after(/\*}/),smarty_literal:c.starting_with(/{literal}/).until_after(/{\/literal}/)}}i.prototype=new l,i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){this.__set_templated_pattern()},i.prototype.disable=function(o){var s=this._create();return s._disabled[o]=!0,s._update(),s},i.prototype.read_options=function(o){var s=this._create();for(var c in r)s._disabled[c]=o.templating.indexOf(c)===-1;return s._update(),s},i.prototype.exclude=function(o){var s=this._create();return s._excluded[o]=!0,s._update(),s},i.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var s=this._read_template();s;)this._match_pattern?s+=this._input.read(this._match_pattern):s+=this._input.readUntil(this.__template_pattern),o+=s,s=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},i.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},i.prototype._read_template=function(){var o="",s=this._input.peek();if(s==="<"){var c=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&c==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&c==="%"&&(o=o||this.__patterns.erb.read())}else s==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},p.exports.TemplatablePattern=i}],m={};function S(p){var d=m[p];if(d!==void 0)return d.exports;var t=m[p]={exports:{}};return y[p](t,t.exports,S),t.exports}var b=S(0);C=b})();var k=C;!(N=[],v=function(){return{js_beautify:k}}.apply(Q,N),v!==void 0&&(F.exports=v))})()},"6eGT":function(F,Q,j){"use strict";function N(v){return null}Q.a=N},"7Cbv":function(F,Q,j){"use strict";var N=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),v=new Uint8Array(16);function C(){if(!N)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(v)}var k=/^(?:[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 y(r){return typeof r=="string"&&k.test(r)}for(var m=y,S=[],b=0;b<256;++b)S.push((b+256).toString(16).substr(1));function p(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(S[r[i+0]]+S[r[i+1]]+S[r[i+2]]+S[r[i+3]]+"-"+S[r[i+4]]+S[r[i+5]]+"-"+S[r[i+6]]+S[r[i+7]]+"-"+S[r[i+8]]+S[r[i+9]]+"-"+S[r[i+10]]+S[r[i+11]]+S[r[i+12]]+S[r[i+13]]+S[r[i+14]]+S[r[i+15]]).toLowerCase();if(!m(o))throw TypeError("Stringified UUID is invalid");return o}var d=p;function t(r,i,o){r=r||{};var s=r.random||(r.rng||C)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,i){o=o||0;for(var c=0;c<16;++c)i[o+c]=s[c];return i}return d(s)}var l=Q.a=t},"7ahc":function(F,Q,j){"use strict";j.d(Q,"a",function(){return w});var N=j("k1fw"),v=j("0Owb"),C=j("+L6B"),k=j("2/Rp"),y=j("y8nQ"),m=j("Vl3Y"),S=j("tJVT"),b=j("OaEy"),p=j("2fM7"),d=j("cDcd"),t=j.n(d),l=j("VrN/"),r=j.n(l),i=j("p77/"),o=j.n(i),s=j("c5Ni"),c=j.n(s),a=p.a.Option,u={labelCol:{span:4},wrapperCol:{span:20}},f={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"]};Q.b=function(_){var h=_.callback,R=_.onCancel,O=Object(d.useState)("python"),g=Object(S.a)(O,2),x=g[0],E=g[1];function T(L){E(f[L][1])}function M(L){h(L)}return t.a.createElement(m.a,Object(v.a)({},u,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),t.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},t.a.createElement(p.a,{onChange:T},Object.keys(f).map(function(L){return t.a.createElement(a,{key:L,value:L},f[L][0])}))),t.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},t.a.createElement(w,{mode:x})),t.a.createElement("div",{className:"flex-container flex-end"},t.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),t.a.createElement(k.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function w(_){var h=_.value,R=_.onChange,O=_.mode,g=_.options,x=g===void 0?{}:g,E=Object(d.useRef)(),T=Object(d.useState)(),M=Object(S.a)(T,2),L=M[0],A=M[1];return Object(d.useEffect)(function(){if(L){function V(z){var W=z.getValue();R&&R(W)}return L.on("change",V),function(){L.off("change",V)}}},[L,R]),Object(d.useEffect)(function(){L&&L.setOption("mode",O)},[L,O]),Object(d.useEffect)(function(){L&&((h!==L.getValue()||h==="")&&setTimeout(function(){L.setValue(h||" ")},300))},[L,h]),Object(d.useEffect)(function(){if(E.current&&!L){var V=r.a.fromTextArea(E.current,Object(N.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));A(V)}},[E.current,L]),t.a.createElement("div",{className:"my-codemirror-container"},t.a.createElement("textarea",{ref:E}))}},"815F":function(F,Q,j){"use strict";j.d(Q,"e",function(){return S}),j.d(Q,"c",function(){return p}),j.d(Q,"d",function(){return d}),j.d(Q,"a",function(){return l}),j.d(Q,"f",function(){return r}),j.d(Q,"b",function(){return i});var N=j("KQm4"),v=j("VTBJ"),C=j("Ff2n"),k=j("Zm9Q"),y=j("Kwbf"),m=j("OZM5");function S(o,s){return o!=null?o:s}function b(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=new Map;function c(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(f){var w=f.key,_=f.children;Object(y.a)(w!=null,"Tree node must have a certain key: [".concat(u).concat(w,"]"));var h=String(w);Object(y.a)(!s.has(h)||w===null||w===void 0,"Same 'key' exist in the Tree: ".concat(h)),s.set(h,!0),c(_,"".concat(u).concat(h," > "))})}c(o)}function p(o){function s(c){var a=Object(k.a)(c);return a.map(function(u){if(!Object(m.i)(u))return Object(y.a)(!u,"Tree/TreeNode can only accept TreeNode as children."),null;var f=u.key,w=u.props,_=w.children,h=Object(C.a)(w,["children"]),R=Object(v.a)({key:f},h),O=s(_);return O.length&&(R.children=O),R}).filter(function(u){return u})}return s(o)}function d(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=new Set(s===!0?[]:s),a=[];function u(f){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return f.map(function(_,h){var R=Object(m.h)(w?w.pos:"0",h),O=S(_.key,R),g=Object(v.a)(Object(v.a)({},_),{},{parent:w,pos:R,children:null,data:_,isStart:[].concat(Object(N.a)(w?w.isStart:[]),[h===0]),isEnd:[].concat(Object(N.a)(w?w.isEnd:[]),[h===f.length-1])});return a.push(g),s===!0||c.has(O)?g.children=u(_.children||[],g):g.children=[],g})}return u(o),a}function t(o,s,c){var a;c?typeof c=="string"?a=function(w){return w[c]}:typeof c=="function"&&(a=function(w){return c(w)}):a=function(w,_){return S(w.key,_)};function u(f,w,_){var h=f?f.children:o,R=f?Object(m.h)(_.pos,w):"0";if(f){var O=a(f,R),g={node:f,index:w,pos:R,key:O,parentPos:_.node?_.pos:null,level:_.level+1};s(g)}h&&h.forEach(function(x,E){u(x,E,{node:f,pos:R,level:_?_.level+1:-1})})}u(null)}function l(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=s.initWrapper,a=s.processEntity,u=s.onProcessFinished,f=arguments.length>2?arguments[2]:void 0,w={},_={},h={posEntities:w,keyEntities:_};return c&&(h=c(h)||h),t(o,function(R){var O=R.node,g=R.index,x=R.pos,E=R.key,T=R.parentPos,M=R.level,L={node:O,index:g,key:E,pos:x,level:M},A=S(E,x);w[x]=L,_[A]=L,L.parent=w[T],L.parent&&(L.parent.children=L.parent.children||[],L.parent.children.push(L)),a&&a(L,h)},f),u&&u(h),h}function r(o,s){var c=s.expandedKeys,a=s.selectedKeys,u=s.loadedKeys,f=s.loadingKeys,w=s.checkedKeys,_=s.halfCheckedKeys,h=s.dragOverNodeKey,R=s.dropPosition,O=s.keyEntities,g=O[o],x={eventKey:o,expanded:c.indexOf(o)!==-1,selected:a.indexOf(o)!==-1,loaded:u.indexOf(o)!==-1,loading:f.indexOf(o)!==-1,checked:w.indexOf(o)!==-1,halfChecked:_.indexOf(o)!==-1,pos:String(g?g.pos:""),dragOver:h===o&&R===0,dragOverGapTop:h===o&&R===-1,dragOverGapBottom:h===o&&R===1};return x}function i(o){var s=o.data,c=o.expanded,a=o.selected,u=o.checked,f=o.loaded,w=o.loading,_=o.halfChecked,h=o.dragOver,R=o.dragOverGapTop,O=o.dragOverGapBottom,g=o.pos,x=o.active,E=Object(v.a)(Object(v.a)({},s),{},{expanded:c,selected:a,checked:u,loaded:f,loading:w,halfChecked:_,dragOver:h,dragOverGapTop:R,dragOverGapBottom:O,pos:g,active:x});return"props"in E||Object.defineProperty(E,"props",{get:function(){return Object(y.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),E}},"8EBN":function(F,Q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";N.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 v=0;v-1&&k.substring(S+1,k.length);if(b)return N.findModeByExtension(b)},N.findModeByName=function(k){k=k.toLowerCase();for(var y=0;y=ee.length?me.slice(ee.length):me}).join(` `)}var c=[],a=["
    "],u=new i.a.Renderer,f=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function w(){c.length=0,a=["
      "]}var _={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function h(le,K,X,ee){if(K>=le.length||le[K].level<=X)return K;var me=le[K];ee.push("
    • "+me.text+""),K++;var ae=[];return K=h(le,K,me.level,ae),ae.length>0&&(ee.push("
        "),ae.forEach(function(Ke){ee.push(Ke)}),ee.push("
      ")),ee.push("
    • "),K=h(le,K,X,ee),K}function R(){return h(c,0,0,a),a.push("
    "),a.join("")}var O={heading:function(K){var X=f.exec(K);if(X)return{type:"heading",raw:X[0],depth:X[1].length,text:X[2]}},fences:function(K){var X=this.rules.block.fences.exec(K);if(X){var ee=X[0],me=s(ee,X[3]||""),ae=X[2]?X[2].trim():X[2];if(["latex","katex","math"].indexOf(ae)>=0){var Ke=E(),pt=me;me=Ke,T[Ke]={type:"block",expression:pt}}return{type:"code",raw:ee,lang:ae,text:me}}}},g=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,E=function(){return"__special_katext_id_".concat(x++,"__")},T={};function M(){return T}function L(){x=0,T={}}function A(le){return le=le.replace(g,function(K,X){var ee=E();return T[ee]={type:"inline",expression:X},ee}),le}var V=u.listitem;u.listitem=function(le){return V(A(le))};var z=u.paragraph;u.paragraph=function(le){return z(A(le))};var W=u.tablecell;u.tablecell=function(le,K){return W(A(le),K)},u.code=function(le,K,X){var ee=(K||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"

    ".concat(le,"

    "):'
    ').concat(X?le:Object(o.escape)(le,!0),`
    `):'
    '+(X?le:Object(o.escape)(le,!0))+"
    "},u.heading=function(le,K,X){var ee=this.options.headerPrefix+X.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:ee,level:K,text:le}),"'+le+""},i.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),i.a.use({tokenizer:O,renderer:u});var G=i.a,U=j("SJMd"),P=j("ulZh"),H=j.n(P),$=j("m3rI"),re=j("Oy/b"),te=j("p5ED"),ge=j("ErOA");/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var ve=function(le,K){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(X,ee){X.__proto__=ee}||function(X,ee){for(var me in ee)Object.prototype.hasOwnProperty.call(ee,me)&&(X[me]=ee[me])})(le,K)};function de(le,K){function X(){this.constructor=le}ve(le,K),le.prototype=K===null?Object.create(K):(X.prototype=K.prototype,new X)}function De(le,K,X,ee){return new(X||(X=Promise))(function(me,ae){function Ke(Ht){try{Ot(ee.next(Ht))}catch(vt){ae(vt)}}function pt(Ht){try{Ot(ee.throw(Ht))}catch(vt){ae(vt)}}function Ot(Ht){var vt;Ht.done?me(Ht.value):(vt=Ht.value,vt instanceof X?vt:new X(function(Xt){Xt(vt)})).then(Ke,pt)}Ot((ee=ee.apply(le,K||[])).next())})}function Te(le,K){var X,ee,me,ae,Ke={label:0,sent:function(){if(1&me[0])throw me[1];return me[1]},trys:[],ops:[]};return ae={next:pt(0),throw:pt(1),return:pt(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function pt(Ot){return function(Ht){return function(vt){if(X)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(X=1,ee&&(me=2&vt[0]?ee.return:vt[0]?ee.throw||((me=ee.return)&&me.call(ee),0):ee.next)&&!(me=me.call(ee,vt[1])).done)return me;switch(ee=0,me&&(vt=[2&vt[0],me.value]),vt[0]){case 0:case 1:me=vt;break;case 4:return Ke.label++,{value:vt[1],done:!1};case 5:Ke.label++,ee=vt[1],vt=[0];continue;case 7:vt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(me=Ke.trys,(me=me.length>0&&me[me.length-1])||vt[0]!==6&&vt[0]!==2)){Ke=0;continue}if(vt[0]===3&&(!me||vt[1]>me[0]&&vt[1]',"select"),this.addActionButton(ee,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ee,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ee,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ee,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ee,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ee,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ee,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(ae){var Ke=document.createElement("div");Ke.className=""+X.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",ae.typeName),Ke.innerHTML=ae.icon,Ke.addEventListener("click",function(){X.markerToolbarButtonClicked(Ke,ae)}),X.buttons.push(Ke),X.markerButtons.push(Ke)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var me=document.createElement("div");me.className=this.toolbarBlockStyleClass.name,me.style.whiteSpace="nowrap",me.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(me),this.addActionButton(me,'',"render"),this.addActionButton(me,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},le.prototype.addButtonClickListener=function(K){this.buttonClickListeners.push(K)},le.prototype.removeButtonClickListener=function(K){this.buttonClickListeners.indexOf(K)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(K),1)},le.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},le.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var K=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var X=0;X0&&this.buttonClickListeners.forEach(function(ee){return ee("marker",X)}),this.markerButtonOverflowBlock.style.display="none"},le.prototype.actionToolbarButtonClicked=function(K,X){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("action",X)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},le.prototype.setActiveButton=function(K){this.resetButtonStyles(),K.className=K.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),K.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},le.prototype.setActiveMarkerButton=function(K){var X=this.markerButtons.find(function(ee){return ee.getAttribute("data-type-name")===K});X&&this.setActiveButton(X)},le.prototype.setCurrentMarker=function(K){var X=this;this.currentMarker=K,this.buttons.filter(function(ee){return/delete|notes/.test(ee.getAttribute("data-action"))}).forEach(function(ee){X.currentMarker===void 0?(ee.style.fillOpacity="0.4",ee.style.pointerEvents="none"):(ee.style.fillOpacity="1",ee.style.pointerEvents="all")})},le}(),Y=function(){function le(K,X,ee,me){this.panels=[],this.panelButtons=[],this.markerjsContainer=K,this.displayMode=X,this.uiStyleSettings=ee,this.styles=me,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return le.prototype.addStyles=function(){var K;this.toolboxStyleClass=this.styles.addClass(new oe("toolbox",` width: 100%; flex-shrink: 0; display: flex; flex-direction: column; font-family: sans-serif; `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+` box-sizing: content-box; `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+` `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` overflow: hidden; `)),this.toolboxStyleColorsClass=this.styles.addClass(new oe("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var X=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new oe("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new oe("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new oe("toolbox-panel-row",` display: flex; `+(this.displayMode==="inline"?"position: absolute;":"")+` `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+` cursor: default; height: `+1.5*this.uiStyleSettings.toolbarHeight+`px; `+(this.displayMode==="inline"?"width: 100%;":"")+` box-sizing: content-box; `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new oe("toolbox-panel-row_colors",` background-color: `+((K=this.uiStyleSettings.toolboxBackgroundColor)!==null&&K!==void 0?K:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new oe("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*X)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*X)+`px; padding: `+X+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new oe("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new oe("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},le.prototype.show=function(K){var X;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=K,this.uiContainer.className=this.toolboxStyleClass.name+" "+((X=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&X!==void 0?X:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},le.prototype.setPanelButtons=function(K){var X,ee,me=this;this.panels=K,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((X=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&X!==void 0?X:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ae){var Ke;ae.uiStyleSettings=me.uiStyleSettings;var pt=document.createElement("div");pt.className=me.toolboxButtonStyleClass.name+" "+((Ke=me.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:me.toolboxButtonStyleColorsClass.name),pt.innerHTML=ae.icon,pt.title=ae.title,pt.addEventListener("click",function(){me.panelButtonClick(ae)}),me.panelButtons.push(pt),me.buttonRow.appendChild(pt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},le.prototype.panelButtonClick=function(K){var X=this,ee=-1;if(K!==this.activePanel){ee=this.panels.indexOf(K),this.panelRow.innerHTML="";var me=K.getUi();me.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(me),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=K}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){X.displayMode==="inline"?X.panelRow.style.display="none":X.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ae,Ke){var pt,Ot;ae.className=X.toolboxButtonStyleClass.name+" "+(Ke===ee?""+((pt=X.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&pt!==void 0?pt:X.toolboxActiveButtonStyleColorsClass.name):""+((Ot=X.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ot!==void 0?Ot:X.toolboxButtonStyleColorsClass.name))})},le}(),Z=function(le,K){this.title=le,this.icon=K},ye=function(le){function K(X,ee,me,ae){var Ke=le.call(this,X,ae||'')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=ee,Ke.currentColor=me,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return de(K,le),K.prototype.getUi=function(){var X=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(me){var ae=X.getColorBox(me);ee.appendChild(ae),X.colorBoxes.push(ae)}),ee},K.prototype.getColorBox=function(X){var ee=this,me=this.uiStyleSettings.toolbarHeight/4,ae=this.uiStyleSettings.toolbarHeight-me,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=ae-2+"px",Ke.style.height=ae-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(ae+2)/2+"px",Ke.style.borderColor=X===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){ee.setCurrentColor(X,Ke)});var pt=document.createElement("div");return pt.style.display="inline-block",pt.style.width=ae-2+"px",pt.style.height=ae-2+"px",pt.style.backgroundColor=X,pt.style.borderRadius=ae/2+"px",X==="transparent"&&(pt.style.fill=this.uiStyleSettings.toolboxAccentColor,pt.innerHTML=` `),Ke.appendChild(pt),Ke},K.prototype.setCurrentColor=function(X,ee){var me=this;this.currentColor=X,this.colorBoxes.forEach(function(ae){ae.style.borderColor=ae===ee?me.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(X)},K}(Z),be=function(){function le(K,X,ee){this._state="new",this._isSelected=!1,this._container=K,this._overlayContainer=X,this.globalSettings=ee,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(le.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),le.prototype.ownsTarget=function(K){return!1},Object.defineProperty(le.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),le.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},le.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},le.prototype.pointerDown=function(K,X){},le.prototype.dblClick=function(K,X){},le.prototype.manipulate=function(K){},le.prototype.pointerUp=function(K){this.stateChanged()},le.prototype.dispose=function(){},le.prototype.addMarkerVisualToContainer=function(K){this.container.childNodes.length>0?this.container.insertBefore(K,this.container.childNodes[0]):this.container.appendChild(K)},le.prototype.getState=function(){return{typeName:le.typeName,state:this.state,notes:this.notes}},le.prototype.restoreState=function(K){this._state=K.state,this.notes=K.notes},le.prototype.scale=function(K,X){},le.prototype.colorChanged=function(K){this.onColorChanged&&this.onColorChanged(K),this.stateChanged()},le.prototype.fillColorChanged=function(K){this.onFillColorChanged&&this.onFillColorChanged(K),this.stateChanged()},le.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var K=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),K.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(K)&&this.onStateChanged(this)}},le.typeName="MarkerBase",le}(),Re=function(){function le(){this.findGripByVisual=this.findGripByVisual.bind(this)}return le.prototype.findGripByVisual=function(K){return this.topLeft.ownsTarget(K)?this.topLeft:this.topCenter.ownsTarget(K)?this.topCenter:this.topRight.ownsTarget(K)?this.topRight:this.centerLeft.ownsTarget(K)?this.centerLeft:this.centerRight.ownsTarget(K)?this.centerRight:this.bottomLeft.ownsTarget(K)?this.bottomLeft:this.bottomCenter.ownsTarget(K)?this.bottomCenter:this.bottomRight.ownsTarget(K)?this.bottomRight:void 0},le}(),Qe=function(){function le(){this.GRIP_SIZE=10,this.visual=ue.createGroup(),this.visual.appendChild(ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},le}(),rt=function(){function le(){}return le.toITransformMatrix=function(K){return{a:K.a,b:K.b,c:K.c,d:K.d,e:K.e,f:K.f}},le.toSVGMatrix=function(K,X){return K.a=X.a,K.b=X.b,K.c=X.c,K.d=X.d,K.e=X.e,K.f=X.f,K},le}(),at=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.left=0,ae.top=0,ae.width=0,ae.height=0,ae.defaultSize={x:50,y:20},ae.offsetX=0,ae.offsetY=0,ae.rotationAngle=0,ae.CB_DISTANCE=10,ae._suppressMarkerCreateEvent=!1,ae.container.transform.baseVal.appendItem(ue.createTransform()),ae.setupControlBox(),ae}return de(K,le),Object.defineProperty(K.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"visual",{get:function(){return this._visual},set:function(X){this._visual=X;var ee=ue.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function(X){return!!le.prototype.ownsTarget.call(this,X)||!!(this.controlGrips.findGripByVisual(X)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(X))},K.prototype.pointerDown=function(X,ee){le.prototype.pointerDown.call(this,X,ee),this.state==="new"&&(this.left=X.x,this.top=X.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var me=this.unrotatePoint(X);if(this.manipulationStartX=me.x,this.manipulationStartY=me.y,this.offsetX=me.x-this.left,this.offsetY=me.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ee),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee)){this.activeGrip=this.rotatorGrip;var ae=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ae.x-this.width/2,this.top=ae.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},K.prototype.pointerUp=function(X){var ee=this.state;le.prototype.pointerUp.call(this,X),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(X),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},K.prototype.moveVisual=function(X){this.visual.style.transform="translate("+X.x+"px, "+X.y+"px)"},K.prototype.manipulate=function(X){var ee=this.unrotatePoint(X);this.state==="creating"?this.resize(X):this.state==="move"?(this.left=this.manipulationStartLeft+(ee.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ee.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ee):this.state==="rotate"&&this.rotate(X)},K.prototype.resize=function(X){var ee=this.manipulationStartLeft,me=this.manipulationStartWidth,ae=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+X.x-this.manipulationStartX,me=this.manipulationStartWidth+this.manipulationStartLeft-ee;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:me=this.manipulationStartWidth+X.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ae=this.manipulationStartTop+X.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-ae;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+X.y-this.manipulationStartY}me>=0?(this.left=ee,this.width=me):(this.left=ee+me,this.width=-me),Ke>=0?(this.top=ae,this.height=Ke):(this.top=ae+Ke,this.height=-Ke),this.setSize()},K.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},K.prototype.rotate=function(X){if(Math.abs(X.x-this.centerX)>.1){var ee=Math.sign(X.x-this.centerX);this.rotationAngle=180*Math.atan((X.y-this.centerY)/(X.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},K.prototype.applyRotation=function(){var X=this.container.transform.baseVal.getItem(0);X.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(X,0)},K.prototype.rotatePoint=function(X){if(this.rotationAngle===0)return X;var ee=this.container.getCTM(),me=ue.createPoint(X.x,X.y);return{x:(me=me.matrixTransform(ee)).x,y:me.y}},K.prototype.unrotatePoint=function(X){if(this.rotationAngle===0)return X;var ee=this.container.getCTM();ee=ee.inverse();var me=ue.createPoint(X.x,X.y);return{x:(me=me.matrixTransform(ee)).x,y:me.y}},K.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},K.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},K.prototype.setupControlBox=function(){this.controlBox=ue.createGroup();var X=ue.createTransform();X.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(X),this.container.appendChild(this.controlBox),this.controlRect=ue.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ue.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Re,this.addControlGrips(),this.controlBox.style.display="none"},K.prototype.adjustControlBox=function(){var X=this.controlBox.transform.baseVal.getItem(0);X.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(X,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},K.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},K.prototype.createGrip=function(){var X=new Qe;return X.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(X.visual),X},K.prototype.positionGrips=function(){var X=this.controlGrips.topLeft.GRIP_SIZE,ee=-X/2,me=ee,ae=(this.width+this.CB_DISTANCE)/2-X/2,Ke=(this.height+this.CB_DISTANCE)/2-X/2,pt=this.height+this.CB_DISTANCE-X/2,Ot=this.width+this.CB_DISTANCE-X/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,me),this.positionGrip(this.controlGrips.topCenter.visual,ae,me),this.positionGrip(this.controlGrips.topRight.visual,Ot,me),this.positionGrip(this.controlGrips.centerLeft.visual,ee,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Ot,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,pt),this.positionGrip(this.controlGrips.bottomCenter.visual,ae,pt),this.positionGrip(this.controlGrips.bottomRight.visual,Ot,pt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ae,me-3*this.CB_DISTANCE)},K.prototype.positionGrip=function(X,ee,me){var ae=X.transform.baseVal.getItem(0);ae.setTranslate(ee,me),X.transform.baseVal.replaceItem(ae,0)},K.prototype.hideControlBox=function(){this.controlBox.style.display="none"},K.prototype.showControlBox=function(){this.controlBox.style.display=""},K.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:rt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:rt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},le.prototype.getState.call(this))},K.prototype.restoreState=function(X){le.prototype.restoreState.call(this,X);var ee=X;this.left=ee.left,this.top=ee.top,this.width=ee.width,this.height=ee.height,this.rotationAngle=ee.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},K.prototype.scale=function(X,ee){le.prototype.scale.call(this,X,ee);var me=this.rotatePoint({x:this.left,y:this.top}),ae=this.unrotatePoint({x:me.x*X,y:me.y*ee});this.left=ae.x,this.top=ae.y,this.width=this.width*X,this.height=this.height*ee,this.adjustControlBox()},K}(be),qe=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.fillColor="transparent",ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.opacity=1,ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setFillColor=ae.setFillColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.createVisual=ae.createVisual.bind(ae),ae}return de(K,le),K.prototype.ownsTarget=function(X){return!(!le.prototype.ownsTarget.call(this,X)&&X!==this.visual)},K.prototype.createVisual=function(){this.visual=ue.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function(X,ee){le.prototype.pointerDown.call(this,X,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(X),this._state="creating")},K.prototype.manipulate=function(X){le.prototype.manipulate.call(this,X)},K.prototype.resize=function(X){le.prototype.resize.call(this,X),this.setSize()},K.prototype.setSize=function(){le.prototype.setSize.call(this),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function(X){le.prototype.pointerUp.call(this,X),this.setSize()},K.prototype.setStrokeColor=function(X){this.strokeColor=X,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(X),this.stateChanged()},K.prototype.setFillColor=function(X){this.fillColor=X,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},K.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},K.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},K.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this))},K.prototype.restoreState=function(X){var ee=X;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),le.prototype.restoreState.call(this,X),this.setSize()},K.prototype.scale=function(X,ee){le.prototype.scale.call(this,X,ee),this.setSize()},K.title="Rectangle marker",K}(at),st=function(le){function K(X,ee,me,ae){var Ke=le.call(this,X,ae||'')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=ee,Ke.currentWidth=me,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return de(K,le),K.prototype.getUi=function(){var X=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(me){var ae=document.createElement("div");ae.style.display="flex",ae.style.flexGrow="2",ae.style.alignItems="center",ae.style.justifyContent="space-between",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.borderColor=me===X.currentWidth?X.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){X.setCurrentWidth(me,ae)}),ee.appendChild(ae);var Ke=document.createElement("div");Ke.innerText=me.toString(),Ke.style.marginRight="5px",ae.appendChild(Ke);var pt=document.createElement("div");pt.style.minHeight="20px",pt.style.flexGrow="2",pt.style.display="flex",pt.style.alignItems="center";var Ot=document.createElement("hr");Ot.style.minWidth="20px",Ot.style.border="0px",Ot.style.borderTop=me+"px solid "+X.uiStyleSettings.toolboxColor,Ot.style.flexGrow="2",pt.appendChild(Ot),ae.appendChild(pt),X.widthBoxes.push(ae)}),ee},K.prototype.setCurrentWidth=function(X,ee){var me=this;this.currentWidth=X,this.widthBoxes.forEach(function(ae){ae.style.borderColor=ae===ee?me.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},K}(Z),lt=function(le){function K(X,ee,me,ae){var Ke=le.call(this,X,ae||'')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=ee,Ke.currentStyle=me,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return de(K,le),K.prototype.getUi=function(){var X=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(me){var ae=document.createElement("div");ae.style.display="flex",ae.style.alignItems="center",ae.style.justifyContent="space-between",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.overflow="hidden",ae.style.maxWidth=100/X.styles.length-5+"%",ae.style.borderColor=me===X.currentStyle?X.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){X.setCurrentStyle(me,ae)}),ee.appendChild(ae);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var pt=` `;Ke.innerHTML=pt,ae.appendChild(Ke),X.styleBoxes.push(ae)}),ee},K.prototype.setCurrentStyle=function(X,ee){var me=this;this.currentStyle=X,this.styleBoxes.forEach(function(ae){ae.style.borderColor=ae===ee?me.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},K}(Z),je=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.strokeColor=me.defaultColor,ae.strokeWidth=me.defaultStrokeWidth,ae.strokeDasharray=me.defaultStrokeDasharray,ae.strokePanel=new ye("Line color",me.defaultColorSet,me.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.strokeWidthPanel=new st("Line width",me.defaultStrokeWidths,me.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new lt("Line style",me.defaultStrokeDasharrays,me.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae}return de(K,le),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var X=le.prototype.getState.call(this);return X.typeName=K.typeName,X},K.typeName="FrameMarker",K.title="Frame marker",K.icon='',K}(qe),Ie=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},tt=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.x1=0,ae.y1=0,ae.x2=0,ae.y2=0,ae.defaultLength=50,ae.manipulationStartX=0,ae.manipulationStartY=0,ae.manipulationStartX1=0,ae.manipulationStartY1=0,ae.manipulationStartX2=0,ae.manipulationStartY2=0,ae.setupControlBox(),ae}return de(K,le),K.prototype.ownsTarget=function(X){return!!le.prototype.ownsTarget.call(this,X)||!(!this.grip1.ownsTarget(X)&&!this.grip2.ownsTarget(X))},K.prototype.pointerDown=function(X,ee){le.prototype.pointerDown.call(this,X,ee),this.manipulationStartX=X.x,this.manipulationStartY=X.y,this.state==="new"&&(this.x1=X.x,this.y1=X.y,this.x2=X.x,this.y2=X.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ee)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ee)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},K.prototype.pointerUp=function(X){var ee=this.state;le.prototype.pointerUp.call(this,X),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(X),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},K.prototype.adjustVisual=function(){},K.prototype.manipulate=function(X){this.state==="creating"?this.resize(X):this.state==="move"?(this.x1=this.manipulationStartX1+X.x-this.manipulationStartX,this.y1=this.manipulationStartY1+X.y-this.manipulationStartY,this.x2=this.manipulationStartX2+X.x-this.manipulationStartX,this.y2=this.manipulationStartY2+X.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(X)},K.prototype.resize=function(X){switch(this.activeGrip){case this.grip1:this.x1=X.x,this.y1=X.y;break;case this.grip2:case void 0:this.x2=X.x,this.y2=X.y}this.adjustVisual(),this.adjustControlBox()},K.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},K.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},K.prototype.setupControlBox=function(){this.controlBox=ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},K.prototype.adjustControlBox=function(){this.positionGrips()},K.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},K.prototype.createGrip=function(){var X=new Qe;return X.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(X.visual),X},K.prototype.positionGrips=function(){var X=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-X/2,this.y1-X/2),this.positionGrip(this.grip2.visual,this.x2-X/2,this.y2-X/2)},K.prototype.positionGrip=function(X,ee,me){var ae=X.transform.baseVal.getItem(0);ae.setTranslate(ee,me),X.transform.baseVal.replaceItem(ae,0)},K.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},le.prototype.getState.call(this))},K.prototype.restoreState=function(X){le.prototype.restoreState.call(this,X);var ee=X;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},K.prototype.scale=function(X,ee){le.prototype.scale.call(this,X,ee),this.x1=this.x1*X,this.y1=this.y1*ee,this.x2=this.x2*X,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},K}(be),ot=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.strokeColor=me.defaultColor,ae.strokeWidth=me.defaultStrokeWidth,ae.strokeDasharray=me.defaultStrokeDasharray,ae.strokePanel=new ye("Line color",me.defaultColorSet,me.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.strokeWidthPanel=new st("Line width",me.defaultStrokeWidths,me.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new lt("Line style",me.defaultStrokeDasharrays,me.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae}return de(K,le),K.prototype.ownsTarget=function(X){return!(!le.prototype.ownsTarget.call(this,X)&&X!==this.visual&&X!==this.selectorLine&&X!==this.visibleLine)},K.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function(X,ee){le.prototype.pointerDown.call(this,X,ee),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},K.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setStrokeColor=function(X){this.strokeColor=X,this.adjustVisual(),this.colorChanged(X)},K.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.adjustVisual()},K.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.adjustVisual(),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var X=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},le.prototype.getState.call(this));return X.typeName=K.typeName,X},K.prototype.restoreState=function(X){le.prototype.restoreState.call(this,X);var ee=X;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.createVisual(),this.adjustVisual()},K.typeName="LineMarker",K.title="Line marker",K.icon='',K}(tt),ze=function(le){function K(X,ee,me,ae){var Ke=le.call(this,X,ae||'')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=ee,Ke.currentFont=me,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return de(K,le),K.prototype.getUi=function(){var X=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(me){var ae=document.createElement("div");ae.style.display="inline-block",ae.style.alignItems="center",ae.style.justifyContent="space-between",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.overflow="hidden",ae.style.maxWidth=100/X.fonts.length-5+"%",ae.style.borderColor=me===X.currentFont?X.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){X.setCurrentFont(me,ae)}),ee.appendChild(ae);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=me,Ke.style.overflow="hidden";var pt=document.createElement("div");pt.style.whiteSpace="nowrap",pt.style.overflow="hidden",pt.style.textOverflow="ellipsis",pt.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(pt),ae.appendChild(Ke),X.fontBoxes.push(ae)}),ee},K.prototype.setCurrentFont=function(X,ee){var me=this;this.currentFont=X,this.fontBoxes.forEach(function(ae){ae.style.borderColor=ae===ee?me.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},K}(Z),Ze=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.color="transparent",ae.padding=5,ae.DEFAULT_TEXT="your text here",ae.text=ae.DEFAULT_TEXT,ae.isMoved=!1,ae.color=me.defaultColor,ae.fontFamily=me.defaultFontFamily,ae.defaultSize={x:100,y:30},ae.setColor=ae.setColor.bind(ae),ae.setFont=ae.setFont.bind(ae),ae.renderText=ae.renderText.bind(ae),ae.sizeText=ae.sizeText.bind(ae),ae.textEditDivClicked=ae.textEditDivClicked.bind(ae),ae.showTextEditor=ae.showTextEditor.bind(ae),ae.setSize=ae.setSize.bind(ae),ae.positionTextEditor=ae.positionTextEditor.bind(ae),ae.colorPanel=new ye("Color",me.defaultColorSet,me.defaultColor),ae.colorPanel.onColorChanged=ae.setColor,ae.fontFamilyPanel=new ze("Font",me.defaultFontFamilies,me.defaultFontFamily),ae.fontFamilyPanel.onFontChanged=ae.setFont,ae}return de(K,le),K.prototype.ownsTarget=function(X){if(le.prototype.ownsTarget.call(this,X)||X===this.visual||X===this.textElement||X===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(me){me===X&&(ee=!0)}),ee},K.prototype.createVisual=function(){this.visual=ue.createGroup(),this.bgRectangle=ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},K.prototype.pointerDown=function(X,ee){le.prototype.pointerDown.call(this,X,ee),this.isMoved=!1,this.pointerDownPoint=X,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(X),this._state="creating")},K.prototype.renderText=function(){var X=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ee){X.textElement.appendChild(ue.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},K.prototype.getTextScale=function(){var X=this.textElement.getBBox(),ee=1;if(X.width>0&&X.height>0){var me=(1*this.width-this.width*this.padding*2/100)/X.width,ae=(1*this.height-this.height*this.padding*2/100)/X.height;ee=Math.min(me,ae)}return ee},K.prototype.getTextPosition=function(X){var ee=this.textElement.getBBox(),me=0,ae=0;return ee.width>0&&ee.height>0&&(me=(this.width-ee.width*X)/2,ae=this.height/2-ee.height*X/2),{x:me,y:ae}},K.prototype.sizeText=function(){var X=this.textElement.getBBox(),ee=this.getTextScale(),me=this.getTextPosition(ee);me.y-=X.y*ee,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+me.x+"px, "+me.y+"px) scale("+ee+", "+ee+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(me.x,me.y),this.textElement.transform.baseVal.getItem(1).setScale(ee,ee))},K.prototype.manipulate=function(X){le.prototype.manipulate.call(this,X),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(X.x-this.pointerDownPoint.x)>5||Math.abs(X.y-this.pointerDownPoint.y)>5)},K.prototype.resize=function(X){le.prototype.resize.call(this,X),this.isMoved=!0,this.setSize(),this.sizeText()},K.prototype.setSize=function(){le.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},K.prototype.pointerUp=function(X){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),le.prototype.pointerUp.call(this,X),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},K.prototype.showTextEditor=function(){var X=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ee){ee.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ee=Number.parseFloat(X.textEditor.style.fontSize);X.textEditor.clientWidth>=Number.parseInt(X.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,X.textEditor.style.fontSize=Math.max(ee,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ee){ee.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ee){if(ee.clipboardData){var me=ee.clipboardData.getData("text"),ae=window.getSelection();if(!ae.rangeCount)return!1;ae.deleteFromDocument(),ae.getRangeAt(0).insertNode(document.createTextNode(me)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){X.textEditDivClicked(X.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},K.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var X=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),me=this.textElement.getBBox(),ae={x:me.width*X,y:me.height*X};ee.x-=ae.x/2,ee.y-=ae.y/2,this.textEditor.style.top=ee.y+"px",this.textEditor.style.left=ee.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ee.x+"px",this.textEditor.style.fontSize=Math.max(16*X,12)+"px",this.textElement.style.display="none"}},K.prototype.textEditDivClicked=function(X){this.text=X.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},K.prototype.select=function(){le.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},K.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),le.prototype.deselect.call(this)},K.prototype.dblClick=function(X,ee){le.prototype.dblClick.call(this,X,ee),this.showTextEditor()},K.prototype.setColor=function(X){this.textElement&&ue.setAttributes(this.textElement,[["fill",X]]),this.color=X,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(X)},K.prototype.setFont=function(X){this.textElement&&ue.setAttributes(this.textElement,[["font-family",X]]),this.fontFamily=X,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},K.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},K.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var X=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},le.prototype.getState.call(this));return X.typeName=K.typeName,X},K.prototype.restoreState=function(X){var ee=X;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),le.prototype.restoreState.call(this,X),this.setSize()},K.prototype.scale=function(X,ee){le.prototype.scale.call(this,X,ee),this.setSize(),this.sizeText(),this.positionTextEditor()},K.typeName="TextMarker",K.title="Text marker",K.icon='',K}(at),Ne=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.color="transparent",ae.lineWidth=3,ae.drawing=!1,ae.pixelRatio=1,ae.color=me.defaultColor,ae.lineWidth=me.defaultStrokeWidth,ae.pixelRatio=me.freehandPixelRatio,ae.setColor=ae.setColor.bind(ae),ae.addCanvas=ae.addCanvas.bind(ae),ae.finishCreation=ae.finishCreation.bind(ae),ae.setLineWidth=ae.setLineWidth.bind(ae),ae.colorPanel=new ye("Color",me.defaultColorSet,me.defaultColor),ae.colorPanel.onColorChanged=ae.setColor,ae.lineWidthPanel=new st("Line width",me.defaultStrokeWidths,me.defaultStrokeWidth),ae.lineWidthPanel.onWidthChanged=ae.setLineWidth,ae}return de(K,le),K.prototype.ownsTarget=function(X){return!(!le.prototype.ownsTarget.call(this,X)&&X!==this.visual&&X!==this.drawingImage)},K.prototype.createVisual=function(){this.visual=ue.createGroup(),this.drawingImage=ue.createImage(),this.visual.appendChild(this.drawingImage);var X=ue.createTransform();this.visual.transform.baseVal.appendItem(X),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function(X,ee){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(X.x,X.y),this.drawing=!0):le.prototype.pointerDown.call(this,X,ee)},K.prototype.manipulate=function(X){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(X.x,X.y),this.canvasContext.stroke()):le.prototype.manipulate.call(this,X)},K.prototype.resize=function(X){le.prototype.resize.call(this,X),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function(X){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):le.prototype.pointerUp.call(this,X)},K.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},K.prototype.select=function(){this.state==="creating"&&this.finishCreation(),le.prototype.select.call(this)},K.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),le.prototype.deselect.call(this)},K.prototype.finishCreation=function(){for(var X=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ee=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],me=ee[0],ae=ee[1],Ke=ee[2],pt=ee[3],Ot=!1,Ht=0;Ht0&&(Ot=!0,Htpt&&(pt=Ht),vt>Ke&&(Ke=vt));if(Ot){this.left=me/this.pixelRatio,this.top=ae/this.pixelRatio,this.width=(Ke-me)/this.pixelRatio,this.height=(pt-ae)/this.pixelRatio;var Xt=document.createElement("canvas");Xt.width=Ke-me,Xt.height=pt-ae,Xt.getContext("2d").putImageData(this.canvasContext.getImageData(me,ae,Ke-me,pt-ae),0,0),this.drawingImgUrl=Xt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},K.prototype.setDrawingImage=function(){ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},K.prototype.setColor=function(X){this.color=X,this.colorChanged(X)},K.prototype.setLineWidth=function(X){this.lineWidth=X},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var X=Object.assign({drawingImgUrl:this.drawingImgUrl},le.prototype.getState.call(this));return X.typeName=K.typeName,X},K.prototype.restoreState=function(X){this.createVisual(),le.prototype.restoreState.call(this,X),this.drawingImgUrl=X.drawingImgUrl,this.setDrawingImage()},K.prototype.scale=function(X,ee){le.prototype.scale.call(this,X,ee),this.setDrawingImage()},K.typeName="FreehandMarker",K.title="Freehand marker",K.icon='',K}(at),Ae=function(le){function K(X,ee,me){var ae=le.call(this,X,me||'')||this;return ae.typeBoxes=[],ae.currentType=ee,ae.setCurrentType=ae.setCurrentType.bind(ae),ae}return de(K,le),K.prototype.getUi=function(){var X=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var me=function(pt){var Ot="both";switch(pt){case 0:Ot="both";break;case 1:Ot="start";break;case 2:Ot="end";break;case 3:Ot="none"}var Ht=document.createElement("div");if(Ht.style.display="flex",Ht.style.flexGrow="2",Ht.style.alignItems="center",Ht.style.justifyContent="space-between",Ht.style.padding="5px",Ht.style.borderWidth="2px",Ht.style.borderStyle="solid",Ht.style.borderColor=Ot===ae.currentType?ae.uiStyleSettings.toolboxAccentColor:"transparent",Ht.addEventListener("click",function(){X.setCurrentType(Ot,Ht)}),ee.appendChild(Ht),Ot==="both"||Ot==="start"){var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.minHeight="20px",vt.innerHTML=` `,vt.style.marginLeft="5px",Ht.appendChild(vt)}var Xt=document.createElement("div");Xt.style.display="flex",Xt.style.alignItems="center",Xt.style.minHeight="20px",Xt.style.flexGrow="2";var qt=document.createElement("hr");if(qt.style.minWidth="20px",qt.style.border="0px",qt.style.borderTop="3px solid "+(ae.uiStyleSettings!==void 0?ae.uiStyleSettings.toolboxColor:"#eeeeee"),qt.style.flexGrow="2",Xt.appendChild(qt),Ht.appendChild(Xt),Ot==="both"||Ot==="end"){var Hr=document.createElement("div");Hr.style.display="flex",Hr.style.alignItems="center",Hr.style.minHeight="20px",Hr.innerHTML=` `,Hr.style.marginRight="5px",Ht.appendChild(Hr)}ae.typeBoxes.push(Ht)},ae=this,Ke=0;Ke<4;Ke++)me(Ke);return ee},K.prototype.setCurrentType=function(X,ee){var me=this;this.currentType=X,this.typeBoxes.forEach(function(ae){ae.style.borderColor=ae===ee?me.uiStyleSettings!==void 0?me.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},K}(Z),Me=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.arrowType="end",ae.arrowBaseHeight=10,ae.arrowBaseWidth=10,ae.getArrowPoints=ae.getArrowPoints.bind(ae),ae.setArrowType=ae.setArrowType.bind(ae),ae.arrowTypePanel=new Ae("Arrow type","end"),ae.arrowTypePanel.onArrowTypeChanged=ae.setArrowType,ae}return de(K,le),K.prototype.ownsTarget=function(X){return!(!le.prototype.ownsTarget.call(this,X)&&X!==this.arrow1&&X!==this.arrow2)},K.prototype.getArrowPoints=function(X,ee){var me=this.arrowBaseWidth+2*this.strokeWidth,ae=this.arrowBaseHeight+2*this.strokeWidth;return X-me/2+","+(ee+ae/2)+" "+X+","+(ee-ae/2)+" "+(X+me/2)+","+(ee+ae/2)},K.prototype.createTips=function(){this.arrow1=ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow2)},K.prototype.pointerDown=function(X,ee){le.prototype.pointerDown.call(this,X,ee),this.state==="creating"&&this.createTips()},K.prototype.adjustVisual=function(){if(le.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ue.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var X=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.arrow1.transform.baseVal.getItem(0);ee.setRotate(X,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var me=this.arrow2.transform.baseVal.getItem(0);me.setRotate(X+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(me,0)}},K.prototype.setArrowType=function(X){this.arrowType=X,this.adjustVisual(),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var X=Object.assign({arrowType:this.arrowType},le.prototype.getState.call(this));return X.typeName=K.typeName,X},K.prototype.restoreState=function(X){le.prototype.restoreState.call(this,X);var ee=X;this.arrowType=ee.arrowType,this.createTips(),this.adjustVisual()},K.typeName="ArrowMarker",K.title="Arrow marker",K.icon='',K}(ot),Ee=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.fillColor=me.defaultFillColor,ae.strokeWidth=0,ae.fillPanel=new ye("Color",me.defaultColorSet,me.defaultFillColor),ae.fillPanel.onColorChanged=ae.setFillColor,ae}return de(K,le),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var X=le.prototype.getState.call(this);return X.typeName=K.typeName,X},K.typeName="CoverMarker",K.title="Cover marker",K.icon='',K}(qe),Ce=function(le){function K(X,ee,me,ae){var Ke=le.call(this,X,ae||'')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=ee,Ke.currentOpacity=me,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return de(K,le),K.prototype.getUi=function(){var X=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",ee.style.justifyContent="space-between",this.opacities.forEach(function(me){var ae=document.createElement("div");ae.style.display="flex",ae.style.alignItems="center",ae.style.justifyContent="center",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.borderColor=me===X.currentOpacity?X.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){X.setCurrentOpacity(me,ae)}),ee.appendChild(ae);var Ke=document.createElement("div");Ke.innerText=100*me+"%",ae.appendChild(Ke),X.opacityBoxes.push(ae)}),ee},K.prototype.setCurrentOpacity=function(X,ee){var me=this;this.currentOpacity=X,this.opacityBoxes.forEach(function(ae){ae.style.borderColor=ae===ee?me.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},K}(Z),ke=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.setOpacity=ae.setOpacity.bind(ae),ae.fillColor=me.defaultHighlightColor,ae.strokeWidth=0,ae.opacity=me.defaultHighlightOpacity,ae.fillPanel=new ye("Color",me.defaultColorSet,ae.fillColor),ae.fillPanel.onColorChanged=ae.setFillColor,ae.opacityPanel=new Ce("Opacity",me.defaultOpacitySteps,ae.opacity),ae.opacityPanel.onOpacityChanged=ae.setOpacity,ae}return de(K,le),K.prototype.setOpacity=function(X){this.opacity=X,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var X=le.prototype.getState.call(this);return X.typeName=K.typeName,X},K.typeName="HighlightMarker",K.title="Highlight marker",K.icon='',K}(Ee),Fe='',Be=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.bgColor="transparent",ae.tipPosition={x:0,y:0},ae.tipBase1Position={x:0,y:0},ae.tipBase2Position={x:0,y:0},ae.tipMoving=!1,ae.color=me.defaultStrokeColor,ae.bgColor=me.defaultFillColor,ae.fontFamily=me.defaultFontFamily,ae.defaultSize={x:100,y:30},ae.setBgColor=ae.setBgColor.bind(ae),ae.getTipPoints=ae.getTipPoints.bind(ae),ae.positionTip=ae.positionTip.bind(ae),ae.setTipPoints=ae.setTipPoints.bind(ae),ae.colorPanel=new ye("Text color",me.defaultColorSet,ae.color,''),ae.colorPanel.onColorChanged=ae.setColor,ae.bgColorPanel=new ye("Fill color",me.defaultColorSet,ae.bgColor,Fe),ae.bgColorPanel.onColorChanged=ae.setBgColor,ae.fontFamilyPanel=new ze("Font",me.defaultFontFamilies,me.defaultFontFamily),ae.fontFamilyPanel.onFontChanged=ae.setFont,ae.tipGrip=new Qe,ae.tipGrip.visual.transform.baseVal.appendItem(ue.createTransform()),ae.controlBox.appendChild(ae.tipGrip.visual),ae}return de(K,le),K.prototype.ownsTarget=function(X){return le.prototype.ownsTarget.call(this,X)||this.tipGrip.ownsTarget(X)||this.tip===X},K.prototype.createTip=function(){ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},K.prototype.pointerDown=function(X,ee){this.state==="new"&&le.prototype.pointerDown.call(this,X,ee),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ee)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):le.prototype.pointerDown.call(this,X,ee)},K.prototype.pointerUp=function(X){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,le.prototype.pointerUp.call(this,X);else{var ee=this.state==="creating";le.prototype.pointerUp.call(this,X),this.setTipPoints(ee),this.positionTip()}},K.prototype.manipulate=function(X){if(this.tipMoving){var ee=this.unrotatePoint(X);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else le.prototype.manipulate.call(this,X)},K.prototype.setBgColor=function(X){this.bgRectangle&&this.tip&&(ue.setAttributes(this.bgRectangle,[["fill",X]]),ue.setAttributes(this.tip,[["fill",X]])),this.bgColor=X,this.fillColorChanged(X)},K.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},K.prototype.setTipPoints=function(X){X===void 0&&(X=!1);var ee=Math.min(this.height/2,15),me=this.height/5;X&&(this.tipPosition={x:ee+me/2,y:this.height+20});var ae=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?ae.1)){var X=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.tip1.transform.baseVal.getItem(0);ee.setRotate(X,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var me=this.tip2.transform.baseVal.getItem(0);me.setRotate(X+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(me,0)}},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var X=le.prototype.getState.call(this);return X.typeName=K.typeName,X},K.prototype.restoreState=function(X){le.prototype.restoreState.call(this,X),this.createTips(),this.adjustVisual()},K.typeName="MeasurementMarker",K.title="Measurement marker",K.icon='',K}(ot),yt=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.strokePanel.colors=me.defaultColorSet,ae.fillColor="transparent",ae}return de(K,le),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var X=le.prototype.getState.call(this);return X.typeName=K.typeName,X},K.typeName="EllipseFrameMarker",K.title="Ellipse frame marker",K.icon='',K}(et),ft=function(){function le(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),le.prototype.addUndoStep=function(K){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(K)||(this.undoStack.push(K),JSON.stringify(this.lastRedoStep)!==JSON.stringify(K)&&this.redoStack.splice(0,this.redoStack.length))},le.prototype.replaceLastUndoStep=function(K){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=K)},le.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},le.prototype.undo=function(){if(this.undoStack.length>1){var K=this.undoStack.pop();return K!==void 0&&this.redoStack.push(K),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},le.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},le}(),mt=function(le){function K(X,ee,me){var ae=le.call(this,X,ee,me)||this;return ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.curveX=0,ae.curveY=0,ae.manipulationStartCurveX=0,ae.manipulationStartCurveY=0,ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.positionGrips=ae.positionGrips.bind(ae),ae.addControlGrips=ae.addControlGrips.bind(ae),ae.adjustVisual=ae.adjustVisual.bind(ae),ae.setupControlBox=ae.setupControlBox.bind(ae),ae.resize=ae.resize.bind(ae),ae.strokeColor=me.defaultColor,ae.strokeWidth=me.defaultStrokeWidth,ae.strokeDasharray=me.defaultStrokeDasharray,ae.strokePanel=new ye("Line color",me.defaultColorSet,me.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.strokeWidthPanel=new st("Line width",me.defaultStrokeWidths,me.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new lt("Line style",me.defaultStrokeDasharrays,me.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae}return de(K,le),K.prototype.ownsTarget=function(X){return!(!le.prototype.ownsTarget.call(this,X)&&X!==this.visual&&X!==this.selectorCurve&&X!==this.visibleCurve&&!this.curveGrip.ownsTarget(X))},K.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},K.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorCurve=ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ue.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function(X,ee){le.prototype.pointerDown.call(this,X,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=X.x,this.curveY=X.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ee)&&(this.activeGrip=this.curveGrip,this._state="resize")},K.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setupControlBox=function(){le.prototype.setupControlBox.call(this),this.curveControlLine1=ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ue.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},K.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,le.prototype.addControlGrips.call(this)},K.prototype.positionGrips=function(){le.prototype.positionGrips.call(this);var X=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-X/2,this.curveY-X/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},K.prototype.manipulate=function(X){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+X.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+X.y-this.manipulationStartY),le.prototype.manipulate.call(this,X)},K.prototype.resize=function(X){this.activeGrip===this.curveGrip&&(this.curveX=X.x,this.curveY=X.y),le.prototype.resize.call(this,X),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},K.prototype.setStrokeColor=function(X){this.strokeColor=X,this.adjustVisual(),this.colorChanged(X)},K.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.adjustVisual()},K.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.adjustVisual()},K.prototype.scale=function(X,ee){this.curveX=this.curveX*X,this.curveY=this.curveY*ee,le.prototype.scale.call(this,X,ee)},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var X=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},le.prototype.getState.call(this));return X.typeName=K.typeName,X},K.prototype.restoreState=function(X){le.prototype.restoreState.call(this,X);var ee=X;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.curveX=ee.curveX,this.curveY=ee.curveY,this.createVisual(),this.adjustVisual()},K.typeName="CurveMarker",K.title="Curve marker",K.icon='',K}(tt),It=function(){function le(K,X){X===void 0&&(X=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=K,this.cancelable=X}return Object.defineProperty(le.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),le.prototype.preventDefault=function(){this._defaultPrevented=!0},le}(),At=function(le){function K(X,ee,me){var ae=le.call(this,X,!1)||this;return ae.dataUrl=ee,ae.state=me,ae}return de(K,le),K}(It),_t=function(le){function K(X,ee,me){me===void 0&&(me=!1);var ae=le.call(this,X,me)||this;return ae.marker=ee,ae}return de(K,le),K}(It),Vt=function(){function le(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return le.prototype.addEventListener=function(K,X){this[K].push(X)},le.prototype.removeEventListener=function(K,X){var ee=this[K].indexOf(X);ee>-1&&this[K].splice(ee,1)},le}(),Kt=function(){function le(K){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ie,this._isOpen=!1,this.undoRedoManager=new ft,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Vt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=le.instanceCounter++,this.styles=new ce(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=K,this.targetRoot=document.body,this.width=K.clientWidth,this.height=K.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(le.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,Ne,Me,Ze,yt,et,ke,Be,ct,Ee,ot,mt]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,Ne,Me,Ze,et,ke,Be]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,Ne,Me,Ze,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(K){var X=this;this._availableMarkerTypes.splice(0),K.forEach(function(ee){if(typeof ee=="string"){var me=X.ALL_MARKER_TYPES.find(function(ae){return ae.typeName===ee});me!==void 0&&X._availableMarkerTypes.push(me)}else X._availableMarkerTypes.push(ee)})},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(K){this._zoomLevel=K,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),le.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ie.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},le.prototype.show=function(){var K=this;this.styles.styleSheetRoot===void 0&&ne.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ne.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(X){return X(new It(K))})},le.prototype.render=function(){return De(this,void 0,void 0,function(){var K;return Te(this,function(X){switch(X.label){case 0:return this.setCurrentMarker(),(K=new Se).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.markersOnly=this.renderMarkersOnly,K.width=this.renderWidth,K.height=this.renderHeight,[4,K.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return X.sent(),[4,K.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,X.sent()]}})})},le.prototype.close=function(K){var X=this;if(K===void 0&&(K=!1),this.isOpen){var ee=!1;K||this.eventListeners.beforeclose.forEach(function(me){var ae=new It(X,!0);me(ae),ae.defaultPrevented&&(ee=!0)}),ee||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(me){return me(new It(X))}),this.detachEvents(),this._isOpen=!1)}},le.prototype.addMarkersToToolbar=function(){for(var K,X=[],ee=0;eethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*K:this.editorCanvas.clientWidth,ee=X',K.title="Powered by marker.js",K.style.display="grid",K.style.alignItems="center",K.style.justifyItems="center",K.style.padding="3px",K.style.width="20px",K.style.height="20px",this.logoUI.appendChild(K),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},le.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},le.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},le.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},le.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var K=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=K+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(K),1),K.dispose()},le.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},le.prototype.toolbarButtonClicked=function(K,X){if(K==="marker"&&X!==void 0)this.createNewMarker(X);else if(K==="action")switch(X){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},le.prototype.deleteSelectedMarker=function(){var K=this;if(this._currentMarker!==void 0){var X=!1;if(this.eventListeners.markerbeforedelete.forEach(function(me){var ae=new _t(K,K._currentMarker,!0);me(ae),ae.defaultPrevented&&(X=!0)}),!X){var ee=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(me){return me(new _t(K,ee))})}}},le.prototype.clear=function(){var K=this,X=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var pt=new _t(K,void 0,!0);Ke(pt),pt.defaultPrevented&&(X=!0)}),!X)){this.setCurrentMarker();for(var ee=function(Ke){var pt=me.markers[Ke];me.setCurrentMarker(me.markers[Ke]),me._currentMarker.dispose(),me.markerImage.removeChild(me._currentMarker.container),me.markers.splice(me.markers.indexOf(me._currentMarker),1),me.eventListeners.markerdelete.forEach(function(Ot){return Ot(new _t(K,pt))})},me=this,ae=this.markers.length-1;ae>=0;ae--)ee(ae);this.addUndoStep()}},Object.defineProperty(le.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),le.prototype.showNotesEditor=function(){var K;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(K=this._currentMarker.notes)!==null&&K!==void 0?K:"",this.overlayContainer.appendChild(this.notesArea))},le.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},le.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},le.prototype.addUndoStep=function(){var K=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var X=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===X.width&&ee.height===X.height){var me=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(X),me1&&this.panTo({x:K.clientX,y:K.clientY}))},le.prototype.onPointerUp=function(K){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(K.clientX,K.clientY)),this.isDragging=!1,this.addUndoStep()},le.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},le.prototype.onKeyUp=function(K){this._currentMarker===void 0||this.notesArea!==void 0||K.key!=="Delete"&&K.key!=="Backspace"||this.deleteSelectedMarker()},le.prototype.clientToLocalCoordinates=function(K,X){var ee=this.markerImage.getBoundingClientRect();return{x:(K-ee.left)/this.zoomLevel,y:(X-ee.top)/this.zoomLevel}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var K=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=K+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},le.prototype.addLicenseKey=function(K){ie.addKey(K)},le.prototype.addEventListener=function(K,X){this.eventListeners.addEventListener(K,X)},le.prototype.removeEventListener=function(K,X){this.eventListeners.removeEventListener(K,X)},le.prototype.renderState=function(K){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(K),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(le.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),le.prototype.focus=function(){var K=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(X){return X(new It(K))}))},le.prototype.blur=function(){var K=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(X){return X(new It(K))}))},le.instanceCounter=0,le}();/* ********************************** cropro version 1.2.0 @license SEE LICENSE IN LICENSE copyright Alan Mendelevich see README and LICENSE for details ********************************** *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var tr=function(le,K){return(tr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(X,ee){X.__proto__=ee}||function(X,ee){for(var me in ee)Object.prototype.hasOwnProperty.call(ee,me)&&(X[me]=ee[me])})(le,K)};function rr(le,K){if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function X(){this.constructor=le}tr(le,K),le.prototype=K===null?Object.create(K):(X.prototype=K.prototype,new X)}function Wt(le,K,X,ee){return new(X||(X=Promise))(function(me,ae){function Ke(Ht){try{Ot(ee.next(Ht))}catch(vt){ae(vt)}}function pt(Ht){try{Ot(ee.throw(Ht))}catch(vt){ae(vt)}}function Ot(Ht){var vt;Ht.done?me(Ht.value):(vt=Ht.value,vt instanceof X?vt:new X(function(Xt){Xt(vt)})).then(Ke,pt)}Ot((ee=ee.apply(le,K||[])).next())})}function Lt(le,K){var X,ee,me,ae,Ke={label:0,sent:function(){if(1&me[0])throw me[1];return me[1]},trys:[],ops:[]};return ae={next:pt(0),throw:pt(1),return:pt(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function pt(Ot){return function(Ht){return function(vt){if(X)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(X=1,ee&&(me=2&vt[0]?ee.return:vt[0]?ee.throw||((me=ee.return)&&me.call(ee),0):ee.next)&&!(me=me.call(ee,vt[1])).done)return me;switch(ee=0,me&&(vt=[2&vt[0],me.value]),vt[0]){case 0:case 1:me=vt;break;case 4:return Ke.label++,{value:vt[1],done:!1};case 5:Ke.label++,ee=vt[1],vt=[0];continue;case 7:vt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(me=Ke.trys,(me=me.length>0&&me[me.length-1])||vt[0]!==6&&vt[0]!==2)){Ke=0;continue}if(vt[0]===3&&(!me||vt[1]>me[0]&&vt[1]0&&X>0){var ee=new wr(K,X),me=ee.ratio>=1?20:ee.getHorizontalLength(20),ae=ee.ratio<1?20:ee.getVerticalLength(20),Ke=document.createElementNS("http://www.w3.org/2000/svg","svg");Ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ke.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ke);var pt=dt.createDefs();Ke.appendChild(pt);var Ot=dt.createElement("clipPath",[["id","text-bg-clip"]]);pt.appendChild(Ot);var Ht=dt.createPath(dt.getHollowRectanglePath((24-me)/2,(24-ae)/2,me,ae,(24-me)/2+2,(24-ae)/2+2,me-4,ae-4));Ke.appendChild(Ht);var vt=dt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);vt.appendChild(dt.createTSpan(K+":"+X)),Ke.appendChild(vt);var Xt=vt.getBBox();dt.setAttributes(vt,[["x",((24-Xt.width)/2).toString()],["y",((24-Xt.height)/2-Xt.y).toString()]]);var qt=dt.createPath(dt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Xt.width))/2,(24-Math.ceil(Xt.height))/2,Math.ceil(Xt.width),Math.ceil(Xt.height)));return Ot.appendChild(qt),dt.setAttributes(Ht,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.outerHTML}return''},le}(),Jt=function(le){function K(X,ee,me){var ae=le.call(this,X,ee)||this;return ae.isDropdownOpen=!1,ae.onClick=ae.dropdownButtonClicked,ae.dropdownButtons=me,ae}return rr(K,le),K.prototype.setupDropdown=function(){var X=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ee){ee.className=X.className,ee.colorsClassName=X.colorsClassName,X.dropdownBlock.appendChild(ee.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},K.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},K.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},K.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},K.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},K.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},K}(Dt),Ut=function(){function le(K,X){this.GRIP_SIZE=10,this.color=K,this.fillColor=X,this.visual=dt.createGroup(),this.visual.appendChild(dt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(dt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},le.prototype.setCenter=function(K,X){this.visual.childNodes.forEach(function(ee){return dt.setAttributes(ee,[["cx",K.toString()],["cy",X.toString()]])})},le}(),Or=function(){function le(K,X,ee,me){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=K,this.canvasHeight=X,this.margin=ee,this.container=me,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(le.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(K){this._aspectRatio=K,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.gridContainer&&dt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(K){this._zoomFactor=K,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),le.prototype.open=function(){var K=this;this.cropShadeElement=dt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=dt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var X=0;Xthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-X.height/2),dt.setAttributes(this.cropRectElement,[["x",X.x.toString()],["y",X.y.toString()],["width",X.width.toString()],["height",X.height.toString()]]);var ee=X.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ae,Ke){var pt=X.y+ee*(Ke+1);dt.setAttributes(ae,[["x1",""+X.x],["y1",""+pt],["x2",""+(X.x+X.width)],["y2",""+pt]])});var me=X.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ae,Ke){var pt=X.x+me*(Ke+1);dt.setAttributes(ae,[["x1",""+pt],["y1",""+X.y],["x2",""+pt],["y2",""+(X.y+X.height)]])}),dt.setAttributes(this.cropShadeElement,[["d",dt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,X.x,X.y,X.width,X.height)]]),this.topLeftGrip.setCenter(X.x,X.y),this.topRightGrip.setCenter(X.x+X.width,X.y),this.bottomLeftGrip.setCenter(X.x,X.y+X.height),this.bottomRightGrip.setCenter(X.x+X.width,X.y+X.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},le.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},le.prototype.clientToLocalCoordinates=function(K,X){var ee=this.container.getBoundingClientRect();return{x:K-ee.left+this.margin,y:X-ee.top+this.margin}},le.prototype.onPointerDown=function(K){this.container.setPointerCapture(K.pointerId),this.previousPoint=this.clientToLocalCoordinates(K.clientX,K.clientY),this.cropRectElement===K.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(K.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(K.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(K.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(K.target)&&(this.activeGrip=this.bottomRightGrip)},le.prototype.onPointerMove=function(K){if(this.isMoving)this.move(this.clientToLocalCoordinates(K.clientX,K.clientY));else if(this.activeGrip){var X=this.clientToLocalCoordinates(K.clientX,K.clientY);this.resize(X)}K.preventDefault()},le.prototype.onPointerUp=function(K){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(K.pointerId)},le.prototype.move=function(K){var X=K.x-this.previousPoint.x,ee=K.y-this.previousPoint.y;this.zoomFactor!==1&&(X=-X/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+X),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ee),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=K},le.prototype.resize=function(K){var X=Object.assign({},this.cropRect),ee=K.x-this.previousPoint.x,me=K.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:X.x+eethis.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-X.width),X.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(X.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),X.height=this.aspectRatio.getVerticalLength(X.width)):(X.y+=me,X.height=this.cropRect.y+this.cropRect.height-X.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?X.height=this.aspectRatio.getVerticalLength(X.width):X.height+=me}X.width<10&&(X.x=this.cropRect.x,X.width=10),X.height<10&&(X.y=this.cropRect.y,X.height=10),this.previousPoint=K,X.x>=this.margin&&X.y>=this.margin&&X.x-this.margin+X.width<=this.canvasWidth&&X.y-this.margin+X.height<=this.canvasHeight&&(this.cropRect=X,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},le.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var K=this.cropRect.x+this.cropRect.width/2,X=this.cropRect.y+this.cropRect.height/2,ee=this.aspectRatio.getHorizontalLength(this.cropRect.height),me=this.aspectRatio.getVerticalLength(this.cropRect.width);ee/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=K-this.cropRect.width/2,this.cropRect.y=X-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},le.prototype.getRescaledRect=function(K,X,ee,me,ae,Ke){var pt=ee/K,Ot=me/X;return{x:(ae.x-Ke)*pt+Ke,y:(ae.y-Ke)*Ot+Ke,width:ae.width*pt,height:ae.height*Ot}},le.prototype.scaleCanvas=function(K,X){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,K,X,this.cropRect,this.margin);this.canvasWidth=K,this.canvasHeight=X,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},le}(),un=function(){function le(K){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=K,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(le.prototype,"angle",{get:function(){return this._angle},set:function(K){this._angle=K,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),le.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},le.prototype.onPointerDown=function(K){this.controlContainer.setPointerCapture(K.pointerId),this.isDragging=!0,this.previousPoint={x:K.clientX,y:K.clientY}},le.prototype.onPointerMove=function(K){this.isDragging&&(this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.previousPoint.x=K.clientX)},le.prototype.onPointerUp=function(K){this.isDragging&&this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(K.pointerId)},le.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var K=this.angleLabelText.getBBox();dt.setAttributes(this.angleLabelElement,[["x",((this.width-K.width)/2).toString()],["y",(this.height/2).toString()]])}},le.prototype.positionScaleShape=function(){if(this.scaleShape){var K=this.scaleShape.transform.baseVal.getItem(0);K.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(K,0)}},le.prototype.getVisual=function(){var K=document.createElementNS("http://www.w3.org/2000/svg","svg");K.setAttribute("xmlns","http://www.w3.org/2000/svg"),K.setAttribute("width",this.width+"px"),K.setAttribute("height",this.height+"px"),K.setAttribute("viewBox","0 0 "+this.width+" "+this.height),K.style.flexShrink="0",document.body.appendChild(K);for(var X="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ee=1;ee<=this.width/5+10;ee++){var me=ee%5==0?this.height/3:this.height/6;X+="h4v"+-me+"h1v"+me}X+="v1H0Z",this.scaleShape=dt.createPath(X);var ae=dt.createTransform();this.scaleShape.transform.baseVal.appendItem(ae),K.appendChild(this.scaleShape),this.angleLabelElement=dt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=dt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=dt.createTSpan("");return Ke.innerHTML="°",this.angleLabelElement.appendChild(Ke),K.appendChild(this.angleLabelElement),document.body.removeChild(K),K},le}(),Nr=function(){function le(){this.naturalSize=!1,this.imageType="image/png"}return le.prototype.rasterize=function(K,X,ee,me,ae,Ke,pt){var Ot=this;return new Promise(function(Ht){var vt=document.createElement("canvas");vt.width=K.width.baseVal.value-2*me,vt.height=K.height.baseVal.value-2*me;var Xt=1,qt=1;Ot.naturalSize===!0?(Xt=X.naturalWidth/(K.width.baseVal.value-2*me)/Ke,qt=X.naturalHeight/(K.height.baseVal.value-2*me)/pt,vt.width=X.naturalWidth/Ke,vt.height=X.naturalHeight/pt):Ot.width!==void 0&&Ot.height!==void 0&&(Xt=Ot.width/ee.width,qt=Ot.height/ee.height,vt.width*=Xt,vt.height*=qt);var Hr=vt.getContext("2d");Hr.translate(vt.width/2,vt.height/2),Hr.rotate(ae*Math.PI/180),Hr.scale(Ke,pt),Hr.translate(-vt.width/2,-vt.height/2),Hr.drawImage(X,0,0,vt.width,vt.height);var nn=document.createElement("canvas");nn.width=ee.width*Xt,nn.height=ee.height*qt,nn.getContext("2d").putImageData(Hr.getImageData((ee.x-me)*Xt,(ee.y-me)*qt,ee.width*Xt,ee.height*qt),0,0),Ht(nn.toDataURL(Ot.imageType,Ot.imageQuality))})},le}(),bt=function(){function le(K){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=le.instanceCounter++,this.styles=new Et(this.instanceNo),this.target=K,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(K){this._zoomToCropEnabled=K,K?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"gridLines",{get:function(){return this._gridLines},set:function(K){this._gridLines=K,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(K){this._rotationAngle=K,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"aspectRatio",{get:function(){var K;return(K=this._aspectRatio)!==null&&K!==void 0?K:this.aspectRatios[0]},set:function(K){this._aspectRatio=K},enumerable:!1,configurable:!0}),le.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},le.prototype.show=function(){this.showUI(),this.open()},le.prototype.close=function(K){K===void 0&&(K=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),K||this.closeEventListeners.forEach(function(X){return X()}),this._isOpen=!1)},le.prototype.addRenderEventListener=function(K){this.renderEventListeners.push(K)},le.prototype.removeRenderEventListener=function(K){this.renderEventListeners.indexOf(K)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(K),1)},le.prototype.addCloseEventListener=function(K){this.closeEventListeners.push(K)},le.prototype.removeCloseEventListener=function(K){this.closeEventListeners.indexOf(K)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(K),1)},le.prototype.setupResizeObserver=function(){var K=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){K.resize(K.target.clientWidth,K.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},le.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var K=1*this.target.clientWidth/this.target.clientHeight,X=this.contentDiv.clientWidth/K>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*K:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=X+2*this.CANVAS_MARGINK+this.CANVAS_MARGIN?this.target.offsetTop-(K+this.CANVAS_MARGIN):0;this.coverDiv.style.top=X+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},le.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},le.prototype.addTopToolbar=function(){var K=this;this.topToolbar=new hr,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var X=new Ct;X.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(X);var ee=[];this.aspectRatios.forEach(function(qt){var Hr=new Dt(Cr.getIcon(qt.horizontal,qt.vertical),qt.horizontal===0&&qt.vertical===0?"FREE":qt.horizontal+":"+qt.vertical);Hr.onClick=function(){return K.ratioButtonClicked(qt)},ee.push(Hr)}),this.aspectRatioButton=new Jt(Cr.getIcon(0,0),"Aspect ratio",ee),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,X.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var me=new Dt('',"Toggle grid");me.isActive=this.isGridVisible,me.onClick=function(){K.isGridVisible=!K.isGridVisible,me.isActive=K.isGridVisible},X.addButton(me);var ae=new Dt('',"Zoom to selection");if(ae.isActive=this.zoomToCropEnabled,ae.onClick=function(){K.zoomToCropEnabled=!K.zoomToCropEnabled,ae.isActive=K.zoomToCropEnabled},X.addButton(ae),!nr.isLicensed){var Ke=new wt;this.topToolbar.addElementBlock(Ke);var pt=document.createElement("div");pt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ot=document.createElement("a");Ot.style.color="currentColor",Ot.href="https://markerjs.com/products/cropro",Ot.target="_blank",Ot.innerHTML='',pt.appendChild(Ot),Ke.addElement(pt)}var Ht=new Ct;Ht.minWidth=3*this.toolbarHeight+"px",Ht.contentAlign="end",this.topToolbar.addButtonBlock(Ht);var vt=new Dt('',"OK");vt.onClick=this.startRenderAndClose,Ht.addButton(vt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(vt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Xt=new Dt('',"Close");Xt.onClick=this.close,Ht.addButton(Xt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Xt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},le.prototype.addBottomToolbar=function(){var K=this;this.bottomToolbar=new hr,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var X=new Ct;X.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(X);var ee=new Dt('',"Rotate left");ee.onClick=this.rotateLeftButtonClicked,X.addButton(ee);var me=new Dt('',"Rotate right");me.onClick=this.rotateRightButtonClicked,X.addButton(me);var ae=new wt;ae.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ae),this.straightener=new un("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Ht){K.rotateBy(Ht),K.straightener.angle=K.rotationAngle},ae.addElement(this.straightener.getUI());var Ke=new Ct;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var pt=new Dt('',"Flip horizontal");pt.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(pt);var Ot=new Dt('',"Flip vertical");Ot.onClick=this.flipVerticallyButtonClicked,Ke.addButton(Ot)},le.prototype.ratioButtonClicked=function(K){this.aspectRatio=K,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},le.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Cr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},le.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new wr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},le.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},le.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},le.prototype.restoreState=function(K){if(K){var X=this.cropLayer.getRescaledRect(K.width,K.height,this.imageWidth,this.imageHeight,K.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(X),this.cropRectChanged(X),this.flippedHorizontally=K.flippedHorizontally,this.flippedVertically=K.flippedVertically,this.applyFlip(),this.rotationAngle=K.rotationAngle,this.applyRotation()}},le.prototype.clientToLocalCoordinates=function(K,X){var ee=this.cropImage.getBoundingClientRect();return{x:K-ee.left,y:X-ee.top}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var K=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=K+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},le.prototype.rotateLeftButtonClicked=function(){var K=this.rotationAngle-90;this.rotationAngle%90!=0&&(K+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(K)},le.prototype.rotateRightButtonClicked=function(){var K=this.rotationAngle+90;this.rotationAngle%90!=0&&(K-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(K)},le.prototype.rotateTo=function(K){K=(K=K>180?K-360:K)<=-180?K+360:K,this.rotationAngle=K,this.applyRotation()},le.prototype.rotateBy=function(K){this.rotateTo((this.rotationAngle+K)%360)},le.prototype.applyRotation=function(){var K=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var X=this.editingTargetRotationContainer.transform.baseVal.getItem(0);X.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(X,0);var ee=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ee.width,this.imageHeight/ee.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=K},le.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},le.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},le.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},le.prototype.startRenderAndClose=function(){return Wt(this,void 0,void 0,function(){var K,X;return Lt(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return K=ee.sent(),X=this.getState(),this.renderEventListeners.forEach(function(me){return me(K,X)}),this.close(!0),[2]}})})},le.prototype.render=function(){return Wt(this,void 0,void 0,function(){var K;return Lt(this,function(X){switch(X.label){case 0:return(K=new Nr).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.width=this.renderWidth,K.height=this.renderHeight,this.unzoomFromCrop(),dt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,K.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return X.sent(),[4,K.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,X.sent()]}})})},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new kt("toolbar",` width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`; flex-shrink: 0; display: flex; flex-direction: row; justify-content: space-between; height: `+this.toolbarHeight+`px; box-sizing: content-box; overflow: hidden; line-height: 0px; `)),this.toolbarStyleColorsClass=this.styles.addClass(new kt("toolbar_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarBlockStyleClass=this.styles.addClass(new kt("toolbar-block",` display: flex; align-items: center; box-sizing: content-box; `));var K=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new kt("toolbar_button",` display: inline-block; width: `+(this.toolbarHeight-2*K)+`px; height: `+(this.toolbarHeight-2*K)+`px; padding: `+K+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new kt("toolbar_button_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new kt("toolbar_active_button",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; background-color: `+this.styles.settings.toolbarBackgroundActiveColor+` `)),this.styles.addRule(new jt("."+this.toolbarButtonStyleClass.name+" svg",` height: `+this.toolbarHeight/2+`px; `)),this.styles.addRule(new jt("."+this.toolbarButtonStyleColorsClass.name+":hover",` background-color: `+this.styles.settings.toolbarBackgroundHoverColor+` `)),this.toolbarDropdownStyleClass=this.styles.addClass(new kt("toolbar_dropdown",` position: absolute; max-width: `+4*this.toolbarHeight+`px; z-index: 20; white-space: normal; box-sizing: content-box; box-shadow: 3px 3px rgba(33, 33, 33, 0.1); margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px; line-height: 0px; `)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new kt("toolbar_dropdown_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new kt("toolbar_straightener_block",` display: flex; overflow: hidden; justify-content: center; -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%); `)),this.toolbarStraightenerStyleClass=this.styles.addClass(new kt("toolbar_straightener",` display: flex; overflow: hidden; justify-content: center; height: `+(this.toolbarHeight-2*K)+`px; padding: `+K+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new kt("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `))},le.instanceCounter=0,le}(),Bt=j("8hTe"),Jr=j.n(Bt),on=/]*>/g;function Ln(le){var K=document.createElement("div");return K.innerHTML=le,K.childNodes.length===0?"":K.childNodes[0].nodeValue}var Sn=Q.a=function(le){var K=le.value,X=K===void 0?"":K,ee=le.edit,me=ee===void 0?!1:ee,ae=le.className,Ke=le.showTextOnly,pt=le.showLines,Ot=le.replaces,Ht=le.zoomImg,vt=le.hasMask,Xt=le.style,qt=Xt===void 0?{}:Xt,Hr=le.stylesPrev,nn=Hr===void 0?{}:Hr,zr=String(X),or=Object(d.useRef)(),Qr=Object(d.useRef)(),Cn=Object(d.useState)(""),zt=Object(S.a)(Cn,2),pr=zt[0],fr=zt[1],jr=Object(d.useState)("office"),Er=Object(S.a)(jr,2),li=Er[0],On=Er[1],Ui=function(){var cr=new bt(Qr.current);cr.displayMode="popup",cr.addRenderEventListener(function(){var tn=Object(m.a)(p.a.mark(function br(hn){var Fr;return p.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return or.current.style.display="none",_n.next=3,Object(ge.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:hn}});case 3:Fr=_n.sent,Fr!=null&&Fr.id&&Ot(Qr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Fr==null?void 0:Fr.id,"?type=").concat(Fr.content_type));case 5:case"end":return _n.stop()}},br)}));return function(br){return tn.apply(this,arguments)}}()),cr.show()},Bi=function(){var cr=new Kt(Qr.current);cr.settings.displayMode="popup",cr.addEventListener("render",function(){var tn=Object(m.a)(p.a.mark(function br(hn){var Fr;return p.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:if(or.current.style.display="none",!Qr.current){_n.next=6;break}return _n.next=4,Object(ge.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:hn.dataUrl}});case 4:Fr=_n.sent,Fr!=null&&Fr.id&&Ot(Qr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Fr==null?void 0:Fr.id,"?type=").concat(Fr.content_type));case 6:case"end":return _n.stop()}},br)}));return function(br){return tn.apply(this,arguments)}}()),cr.show(),window.markerArea=cr},qn=Object(d.useMemo)(function(){or.current&&(or.current.style.zIndex=-1);try{var Zr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,cr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,tn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;zr=zr.replace(Zr,"("+$.a.API_SERVER+"/api/attachments/").replace(cr,'"'+$.a.API_SERVER+"/api/attachments/").replace(tn,'"'+$.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(mi){}var br=G(zr),hn=M();if(zr.match(/\[TOC\]/)&&(br=br.replace("

    [TOC]

    ",R()),w()),br=br.replace(/(__special_katext_id_\d+__)/g,function(mi,_n){var Un=hn[_n],Di=Un.type,ui=Un.expression;return Object(re.renderToString)(Ln(ui)||"",{displayMode:Di==="block",throwOnError:!1,output:"html"})}),br=br.replace(/▁/g,"\u2581\u2581\u2581"),L(),Ke){var Fr=document.createElement("div");return Fr.innerHTML=br,Fr.innerText}return setTimeout(function(){return dn()},500),br},[zr]),sn=Object(d.useRef)();_.WebkitLineClamp=pt,pt&&(qt=Object(y.a)(Object(y.a)({},qt),_));function Si(Zr){var cr=Zr.target;if(cr.tagName.toUpperCase()==="IMG"){if(Ht){var tn=cr.getAttribute("src");fr(tn),On("image")}}else if(cr.tagName.toUpperCase()==="A"){var br=cr.getAttribute("href");if(br.indexOf("office")>-1)Zr.preventDefault(),fr(br),On("office");else if(br.indexOf("application/pdf")>-1)Zr.preventDefault(),fr(br),On("pdf");else if(br.indexOf("text/html")>-1)Zr.preventDefault(),fr(br),On("html");else if(br.startsWith("#")){Zr.preventDefault();var hn=document.getElementById(br.replace("#",""));hn&&hn.scrollIntoView(!0)}}}var dn=function(){var cr,tn=(cr=sn.current)===null||cr===void 0?void 0:cr.querySelectorAll("video");tn==null||tn.forEach(function(br){if(br.oncontextmenu=function(){return!1},br.src.indexOf(".m3u8")>-1&&!br.canPlayType("application/vnd.apple.mpegurl")){if(H.a.isSupported()){var hn=new H.a;hn.loadSource(br.src),hn.attachMedia(br)}}})};Object(d.useEffect)(function(){if(sn.current&&qn&&(qn.match(on)&&window.PR.prettyPrint()),sn.current)return sn.current.addEventListener("click",Si),function(){sn.current.removeEventListener("click",Si),L(),w()}},[qn,sn.current,Si]);var Yn=function(cr){if(!me)return;cr.target.nodeName==="IMG"?(or.current.style.zIndex=1,or.current.style.display="flex",or.current.style.width=cr.target.clientWidth+"px",or.current.style.height=cr.target.clientHeight+"px",or.current.style.top=cr.target.offsetTop+"px",or.current.style.left=cr.target.offsetLeft+"px",Qr.current.src=cr.target.getAttribute("src")):or.current.style.display="none"};return t.a.createElement("div",{style:{position:"relative"}},t.a.createElement("div",{ref:sn,style:Object(y.a)({},qt),className:"".concat(ae||""," markdown-body ").concat(Jr.a.mdBody),onMouseOver:Yn,dangerouslySetInnerHTML:{__html:qn}}),t.a.createElement("div",{ref:or,className:Jr.a.button},t.a.createElement(v.a,null,t.a.createElement(k.a,{onClick:function(){return Ui()}},"\u88C1\u526A"),t.a.createElement(k.a,{onClick:function(){return Bi()}},"\u7F16\u8F91"))),t.a.createElement("img",{ref:Qr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),t.a.createElement(te.a,{close:!0,data:pr,type:pr!=null&&pr.length?li:"",style:Object(y.a)({},nn),onClose:function(){return fr("")}}))}},"9OqN":function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.CTR=function(){var v=N.lib.BlockCipherMode.extend(),C=v.Encryptor=v.extend({processBlock:function(k,y){var m=this._cipher,S=m.blockSize,b=this._iv,p=this._counter;b&&(p=this._counter=b.slice(0),this._iv=void 0);var d=p.slice(0);m.encryptBlock(d,0),p[S-1]=p[S-1]+1|0;for(var t=0;t0&&Ne.current===oe.length){at(!1);var dt=H(nr);dt=dt.filter(function(Et){var jt,kt;return!!((jt=Et[0])!==null&&jt!==void 0&&jt.name&&(kt=Et[1])!==null&&kt!==void 0&&kt.name)}),dt=dt.map(function(Et){return Object(c.a)(Object(c.a)(Object(c.a)({},Et[0]),Et[1]),{},{is_file:!1})}),de(dt),ve()}}else at(!1),ve()});return}if(ot){var At=new FormData;At.append("file",ft.file),At.append("identifier",he);var _t=Object(z.a)("/api/attachments.json",{method:"post",body:At},!0);_t.then(function(Lt){if(Lt.filename){Ne.current=Ne.current+1;var nr=Ze.current.map(function(Et){if(Et.name===(Lt==null?void 0:Lt.filename)){var jt,kt=Object(c.a)(Object(c.a)({},Et),{},{is_oss:!ot});return Lt!=null&&(jt=Lt.filename)!==null&&jt!==void 0&&jt.includes(".in")?(kt.in_object_key=Lt==null?void 0:Lt.object,kt.in_object_size=Lt==null?void 0:Lt.size,kt.input=Lt==null?void 0:Lt.filename,kt.in_file=ft):(kt.out_object_key=Lt==null?void 0:Lt.object,kt.out_object_size=Lt==null?void 0:Lt.size,kt.output=Lt==null?void 0:Lt.filename,kt.out_file=ft),kt}return Et});if(Ze.current=Object(f.a)(nr),q(Object(f.a)(nr)),Ne.current>0&&Ne.current===oe.length){at(!1);var dt=H(nr);dt=dt.filter(function(Et){var jt,kt;return!!((jt=Et[0])!==null&&jt!==void 0&&jt.name&&(kt=Et[1])!==null&&kt!==void 0&&kt.name)}),dt=dt.map(function(Et){return Object(c.a)(Object(c.a)(Object(c.a)({},Et[0]),Et[1]),{},{is_file:!0})}),de(dt),ve()}}else at(!1),ve()});return}var Vt=new A.a({endpoint:ye.end_point,region:ye.region,accessKeyId:ye.access_key_id,accessKeySecret:ye.access_key_secret,bucket:ye.bucket,stsToken:ye.security_token}),Kt=ft.name,tr={container_type:"TestSet",file_name:Kt},rr=Object(W.a)(),Wt="testsets/".concat(he,"/").concat(rr).concat(Kt.indexOf(".")>-1?"."+Kt.split(".").pop():"");he===null&&(Wt="testsets/".concat(rr).concat(Kt.indexOf(".")>-1?"."+Kt.split(".").pop():"")),Vt.multipartUpload(Wt,new Blob([ft.file],{type:ft.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Kt+""},url:ye==null?void 0:ye.callback_url,host:ye==null?void 0:ye.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(z.e)(tr)}}).then(function(Lt){if(Lt.data.status===0){Ne.current=Ne.current+1;var nr=Ze.current.map(function(Et){var jt,kt;if(Et.name===((jt=Lt.data)===null||jt===void 0||((kt=jt.data)===null||kt===void 0)?void 0:kt.file_name)){var hr,Nn,Ct,Dt=Object(c.a)(Object(c.a)({},Et),{},{is_oss:!ot});if((hr=Lt.data)!==null&&hr!==void 0&&(Nn=hr.data)!==null&&Nn!==void 0&&(Ct=Nn.file_name)!==null&&Ct!==void 0&&Ct.includes(".in")){var wt,wr,Cr,Jt,Ut,Or;Dt.in_object_key=(wt=Lt.data)===null||wt===void 0||((wr=wt.data)===null||wr===void 0)?void 0:wr.object,Dt.in_object_size=(Cr=Lt.data)===null||Cr===void 0||((Jt=Cr.data)===null||Jt===void 0)?void 0:Jt.size,Dt.input=(Ut=Lt.data)===null||Ut===void 0||((Or=Ut.data)===null||Or===void 0)?void 0:Or.file_name,Dt.in_file=ft}else{var un,Nr,bt,Bt,Jr,on;Dt.out_object_key=(un=Lt.data)===null||un===void 0||((Nr=un.data)===null||Nr===void 0)?void 0:Nr.object,Dt.out_object_size=(bt=Lt.data)===null||bt===void 0||((Bt=bt.data)===null||Bt===void 0)?void 0:Bt.size,Dt.output=(Jr=Lt.data)===null||Jr===void 0||((on=Jr.data)===null||on===void 0)?void 0:on.file_name,Dt.out_file=ft}return Dt}return Et});if(Ze.current=Object(f.a)(nr),q(Object(f.a)(nr)),Ne.current>0&&Ne.current===oe.length){at(!1);var dt=H(nr);dt=dt.filter(function(Et){var jt,kt;return!!((jt=Et[0])!==null&&jt!==void 0&&jt.name&&(kt=Et[1])!==null&&kt!==void 0&&kt.name)}),dt=dt.map(function(Et){return Object(c.a)(Object(c.a)(Object(c.a)({},Et[0]),Et[1]),{},{is_file:!0})}),de(dt),ve()}}})},Fe=function(ft){return new Promise(function(mt,It){for(var At=0,_t=[],Vt=function(rr){ft[rr].file.slice(0,1).arrayBuffer().then(function(){At++,At===ft.length&&(_t.length?(s.b.warn("".concat(_t.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),It()):mt(ft))}).catch(function(Wt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Wt),At++,_t.push(ft[rr].name),At===ft.length&&(_t.length?(s.b.warn("".concat(_t.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),It()):mt(ft))})},Kt=0;Kt100)return s.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(ft.name))return s.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var mt={name:ft.name,uid:ft.uid,file:ft,percent:0};return oe.push(mt),Ze.current=Object(f.a)(oe),q(Object(f.a)(oe)),!1}},ct=H(oe);return console.log(oe,ct,"fileList"),g.a.createElement(i.a,{visible:De,wrapClassName:Te,onOk:Be,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:rt},onCancel:Ae,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},g.a.createElement("div",{className:E.a.wrap},oe.length?g.a.createElement("div",null,g.a.createElement(b.a,{justify:"space-between",align:"middle",className:"mb20"},g.a.createElement("div",{style:{visibility:ie?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",g.a.createElement(d.a.Group,{className:"ml10",value:lt,onChange:function(ft){return je(ft.target.value)}},g.a.createElement(d.a,{value:!1},"\u6587\u672C"),g.a.createElement(d.a,{value:!0},"\u6587\u4EF6"))),g.a.createElement(_.a,et,g.a.createElement(l.a,{className:E.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),g.a.createElement(re,{data:ct,onRemove:Ce})):g.a.createElement("div",{className:E.a.noData},g.a.createElement("img",{src:M.a,alt:""}),g.a.createElement(_.a,et,g.a.createElement(l.a,{className:E.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),g.a.createElement("div",{className:E.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",g.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",g.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",g.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",g.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",g.a.createElement("br",null))))},re=function(ge){var ve=ge.data,de=ve===void 0?[]:ve,De=ge.onRemove,Te=ge.width,he=Te===void 0?"auto":Te,ue=ge.showScore,ie=ue===void 0?!1:ue,Se=ge.disabled,ne=Se===void 0?!1:Se,ce=ge.inputChange,Oe=ge.onEvaluatingChange,oe=ge.showEvaluatingSetting,q=oe===void 0?!1:oe,Y={value:"",filename:"",dataUrl:""},Z=Object(O.useState)(Object(c.a)({},Y)),ye=Object(u.a)(Z,2),be=ye[0],Re=ye[1],Qe=function(st){var lt=document.createElement("a");document.body.appendChild(lt);var je=URL.createObjectURL(st.file);lt.href=je,lt.download=st.name,lt.click(),URL.revokeObjectURL(je),document.body.removeChild(lt)},rt=function(st,lt){Object(G.y)(st,lt)},at=function(st,lt){i.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:g.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){De(st,lt)},onCancel:function(){}})};return de.length?g.a.createElement("div",{style:{width:he}},g.a.createElement("div",{className:E.a.head},q&&g.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",g.a.createElement(m.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},g.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),g.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),g.a.createElement("div",{style:{width:ie?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),g.a.createElement("div",{style:{width:ie?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),ie&&g.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),q&&g.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",g.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},g.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),q&&g.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",g.a.createElement(m.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"},g.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),g.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),de.map(function(qe,st){var lt,je,Ie,tt;return g.a.createElement("div",{key:st,className:E.a.list},q&&g.a.createElement("div",{style:{width:"10%"}},g.a.createElement(k.a,{checked:!!qe.hidden,onChange:function(ze){Oe(ze.target.checked?1:0,st,"hidden")}})),g.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",st+1),g.a.createElement("div",{className:E.a.info,style:{width:ie?"25%":"35%"}},g.a.createElement("span",{title:qe.input||((lt=qe[0])===null||lt===void 0?void 0:lt.name),onClick:Object(a.a)(R.a.mark(function ot(){var ze,Ze;return R.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(qe.input?qe.input_file_url?ze=qe.input_file_url:ze=qe.in_file:ze=qe[0],!(typeof ze=="string")){Ae.next=14;break}return Ae.next=4,fetch(ze,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Ze=Ae.sent,Ae.t0=Re,Ae.next=8,Ze.text();case 8:Ae.t1=Ae.sent,Ae.t2=ze,Ae.t3={value:Ae.t1,filename:"",dataUrl:Ae.t2},(0,Ae.t0)(Ae.t3),Ae.next=18;break;case 14:return Ae.next=16,Object(G.H)(ze.file);case 16:Ze=Ae.sent,Re({value:Ze.text,filename:ze.name,dataUrl:Ze.link});case 18:case"end":return Ae.stop()}},ot)}))},qe.input||((je=qe[0])===null||je===void 0?void 0:je.name))),g.a.createElement("div",{className:E.a.info,style:{width:ie?"25%":"35%"}},g.a.createElement("span",{title:qe.output||((Ie=qe[1])===null||Ie===void 0?void 0:Ie.name),onClick:Object(a.a)(R.a.mark(function ot(){var ze,Ze;return R.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(qe.input?qe.output_file_url?ze=qe.output_file_url:ze=qe.out_file:ze=qe[1],!(typeof ze=="string")){Ae.next=14;break}return Ae.next=4,fetch(ze,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Ze=Ae.sent,Ae.t0=Re,Ae.next=8,Ze.text();case 8:Ae.t1=Ae.sent,Ae.t2=ze,Ae.t3={value:Ae.t1,filename:"",dataUrl:Ae.t2},(0,Ae.t0)(Ae.t3),Ae.next=18;break;case 14:return Ae.next=16,Object(G.H)(ze.file);case 16:Ze=Ae.sent,Re({value:Ze.text,filename:ze.name,dataUrl:Ze.link});case 18:case"end":return Ae.stop()}},ot)}))},qe.output||((tt=qe[1])===null||tt===void 0?void 0:tt.name))),ie&&g.a.createElement("div",{style:{width:"20%"}},g.a.createElement(v.a,{disabled:ne,style:{width:"70%"},onChange:function(ze){return ce(ze,st)},value:qe.score}),g.a.createElement("span",null,"\xA0%")),q&&g.a.createElement("div",{style:{width:"20%"}},g.a.createElement(k.a,{checked:qe.is_invisible||!1,onChange:function(ze){Oe(ze.target.checked,st,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),q&&g.a.createElement("div",{style:{width:"20%"}},g.a.createElement(k.a,{checked:qe.last_match_rule||!1,onChange:function(ze){Oe(ze.target.checked,st,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),g.a.createElement("div",{onClick:function(){return at(qe,st)},style:{width:"10%"}},g.a.createElement("span",{className:E.a.del},"\u5220\u9664")))}),g.a.createElement(U.a,{close:!0,data:be.dataUrl,filename:be.filename,type:be.dataUrl.length?"txt":"",onClose:function(){return Re(Object(c.a)({},Y))},monacoEditor:{value:be.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):g.a.createElement(g.a.Fragment,null)};Q.b=$},BU3w:function(F,Q,j){"use strict";j.d(Q,"a",function(){return m});var N=j("MNnm"),v="rc-util-key";function C(S){if(S.attachTo)return S.attachTo;var b=document.querySelector("head");return b||document.body}function k(S){var b,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(N.a)())return null;var d=document.createElement("style");if((b=p.csp)===null||b===void 0?void 0:b.nonce){var t;d.nonce=(t=p.csp)===null||t===void 0?void 0:t.nonce}d.innerHTML=S;var l=C(p),r=l.firstChild;return p.prepend&&l.prepend?l.prepend(d):p.prepend&&r?l.insertBefore(d,r):l.appendChild(d),d}var y=new Map;function m(S,b){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=C(p);if(!y.has(d)){var t=k("",p),l=t.parentNode;y.set(d,l),l.removeChild(t)}var r=Array.from(y.get(d).children).find(function(a){return a.tagName==="STYLE"&&a[v]===b});if(r){var i,o;if(((i=p.csp)===null||i===void 0?void 0:i.nonce)&&r.nonce!==((o=p.csp)===null||o===void 0?void 0:o.nonce)){var s;r.nonce=(s=p.csp)===null||s===void 0?void 0:s.nonce}return r.innerHTML!==S&&(r.innerHTML=S),r}var c=k(S,p);return c[v]=b,c}},Bd2K:function(F,Q,j){(function(N){N(j("VrN/"),j("osHv"))})(function(N){N.defineOption("autoCloseTags",!1,function(p,d,t){if(t!=N.Init&&t&&p.removeKeyMap("autoCloseTags"),!d)return;var l={name:"autoCloseTags"};(typeof d!="object"||d.whenClosing!==!1)&&(l["'/'"]=function(r){return m(r)}),(typeof d!="object"||d.whenOpening!==!1)&&(l["'>'"]=function(r){return k(r)}),p.addKeyMap(l)});var v=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],C=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function k(p){if(p.getOption("disableInput"))return N.Pass;for(var d=p.listSelections(),t=[],l=p.getOption("autoCloseTags"),r=0;ri.ch&&(u=u.slice(0,u.length-o.end+i.ch));var h=u.toLowerCase();if(!u||o.type=="string"&&(o.end!=i.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&a.close||o.string.indexOf("/")==i.ch-o.start-1||w&&S(w,h)>-1||b(p,s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(c)||[],u,i,!0))return N.Pass;var R=typeof l=="object"&&l.emptyTags;if(R&&S(R,u)>-1){t[r]={text:"/>",newPos:N.Pos(i.line,i.ch+2)};continue}var O=_&&S(_,h)>-1;t[r]={indent:O,text:">"+(O?` `:"")+"",newPos:O?N.Pos(i.line+1,0):N.Pos(i.line,i.ch+1)}}for(var g=typeof l=="object"&&l.dontIndentOnAutoClose,r=d.length-1;r>=0;r--){var x=t[r];p.replaceRange(x.text,d[r].head,d[r].anchor,"+insert");var E=p.listSelections().slice(0);E[r]={head:x.newPos,anchor:x.newPos},p.setSelections(E),!g&&x.indent&&(p.indentLine(x.newPos.line,null,!0),p.indentLine(x.newPos.line+1,null,!0))}}function y(p,d){for(var t=p.listSelections(),l=[],r=d?"/":""&&(w+=">"),l[s]=w}if(p.replaceSelections(l),t=p.listSelections(),!o)for(var s=0;s=0&&d[c]==t;c--)++s;l=o.to;for(var c=1;c0){for(var d=0;d1&&arguments[1]!==void 0?arguments[1]:"",d=[],t=0;t=0;d--){var t=C().key(d);p(k(t),t)}}function S(p){return C().removeItem(p)}function b(){return C().clear()}},DlQD:function(F,Q,j){(function(N,v){F.exports=v()})(this,function(){"use strict";function N(Ne,Ae){for(var Me=0;MeNe.length)&&(Ae=Ne.length);for(var Me=0,Ee=new Array(Ae);Me=Ne.length?{done:!0}:{done:!1,value:Ne[Ee++]}}}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 Me=Ne[Symbol.iterator](),Me.next.bind(Me)}function m(Ne,Ae){return Ae={exports:{}},Ne(Ae,Ae.exports),Ae.exports}var S=m(function(Ne){function Ae(){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 Me(Ee){Ne.exports.defaults=Ee}Ne.exports={defaults:Ae(),getDefaults:Ae,changeDefaults:Me}}),b=S.defaults,p=S.getDefaults,d=S.changeDefaults,t=/[&<>"']/,l=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,i=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=function(Ae){return o[Ae]};function c(Ne,Ae){if(Ae){if(t.test(Ne))return Ne.replace(l,s)}else if(r.test(Ne))return Ne.replace(i,s);return Ne}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function u(Ne){return Ne.replace(a,function(Ae,Me){return Me=Me.toLowerCase(),Me==="colon"?":":Me.charAt(0)==="#"?Me.charAt(1)==="x"?String.fromCharCode(parseInt(Me.substring(2),16)):String.fromCharCode(+Me.substring(1)):""})}var f=/(^|[^\[])\^/g;function w(Ne,Ae){Ne=Ne.source||Ne,Ae=Ae||"";var Me={replace:function(Ce,ke){return ke=ke.source||ke,ke=ke.replace(f,"$1"),Ne=Ne.replace(Ce,ke),Me},getRegex:function(){return new RegExp(Ne,Ae)}};return Me}var _=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(Ne,Ae,Me){if(Ne){var Ee;try{Ee=decodeURIComponent(u(Me)).replace(_,"").toLowerCase()}catch(Ce){return null}if(Ee.indexOf("javascript:")===0||Ee.indexOf("vbscript:")===0||Ee.indexOf("data:")===0)return null}Ae&&!h.test(Me)&&(Me=T(Ae,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(Ce){return null}return Me}var O={},g=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(Ne,Ae){O[" "+Ne]||(g.test(Ne)?O[" "+Ne]=Ne+"/":O[" "+Ne]=V(Ne,"/",!0)),Ne=O[" "+Ne];var Me=Ne.indexOf(":")===-1;return Ae.substring(0,2)==="//"?Me?Ae:Ne.replace(x,"$1")+Ae:Ae.charAt(0)==="/"?Me?Ae:Ne.replace(E,"$1")+Ae:Ne+Ae}var M={exec:function(){}};function L(Ne){for(var Ae=1,Me,Ee;Ae=0&&Be[ct]==="\\";)et=!et;return et?"|":" |"}),Ee=Me.split(/ \|/),Ce=0;if(Ee.length>Ae)Ee.splice(Ae);else for(;Ee.length=Ee.length?Ce.slice(Ee.length):Ce}).join(` `)}var ve=function(){function Ne(Me){this.options=Me||U}var Ae=Ne.prototype;return Ae.space=function(Ee){var Ce=this.rules.block.newline.exec(Ee);if(Ce)return Ce[0].length>1?{type:"space",raw:Ce[0]}:{raw:` `}},Ae.code=function(Ee,Ce){var ke=this.rules.block.code.exec(Ee);if(ke){var Fe=Ce[Ce.length-1];if(Fe&&Fe.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var Be=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?Be:P(Be,` `)}}},Ae.fences=function(Ee){var Ce=this.rules.block.fences.exec(Ee);if(Ce){var ke=Ce[0],Fe=ge(ke,Ce[3]||"");return{type:"code",raw:ke,lang:Ce[2]?Ce[2].trim():Ce[2],text:Fe}}},Ae.heading=function(Ee){var Ce=this.rules.block.heading.exec(Ee);if(Ce)return{type:"heading",raw:Ce[0],depth:Ce[1].length,text:Ce[2]}},Ae.nptable=function(Ee){var Ce=this.rules.block.nptable.exec(Ee);if(Ce){var ke={type:"table",header:H(Ce[1].replace(/^ *| *\| *$/g,"")),align:Ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ce[3]?Ce[3].replace(/\n$/,"").split(` `):[],raw:Ce[0]};if(ke.header.length===ke.align.length){var Fe=ke.align.length,Be;for(Be=0;Be ?/gm,"");return{type:"blockquote",raw:Ce[0],text:ke}}},Ae.list=function(Ee){var Ce=this.rules.block.list.exec(Ee);if(Ce){for(var ke=Ce[0],Fe=Ce[2],Be=Fe.length>1,et=Fe[Fe.length-1]===")",ct={type:"list",raw:ke,ordered:Be,start:Be?+Fe.slice(0,-1):"",loose:!1,items:[]},yt=Ce[0].match(this.rules.block.item),ft=!1,mt,It,At,_t,Vt,Kt,tr,rr=yt.length,Wt=0;Wt1||this.options.smartLists&&At!==Fe)&&(_t=yt.slice(Wt+1).join(` `),ct.raw=ct.raw.substring(0,ct.raw.length-_t.length),Wt=rr-1)),Vt=ft||/\n\n(?!\s*$)/.test(mt),Wt!==rr-1&&(ft=mt.charAt(mt.length-1)===` `,Vt||(Vt=ft)),Vt&&(ct.loose=!0),Kt=/^\[[ xX]\] /.test(mt),tr=void 0,Kt&&(tr=mt[1]!==" ",mt=mt.replace(/^\[[ xX]\] +/,"")),ct.items.push({type:"list_item",raw:ke,task:Kt,checked:tr,loose:Vt,text:mt});return ct}},Ae.html=function(Ee){var Ce=this.rules.block.html.exec(Ee);if(Ce)return{type:this.options.sanitize?"paragraph":"html",raw:Ce[0],pre:!this.options.sanitizer&&(Ce[1]==="pre"||Ce[1]==="script"||Ce[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):$(Ce[0]):Ce[0]}},Ae.def=function(Ee){var Ce=this.rules.block.def.exec(Ee);if(Ce){Ce[3]&&(Ce[3]=Ce[3].substring(1,Ce[3].length-1));var ke=Ce[1].toLowerCase().replace(/\s+/g," ");return{tag:ke,raw:Ce[0],href:Ce[2],title:Ce[3]}}},Ae.table=function(Ee){var Ce=this.rules.block.table.exec(Ee);if(Ce){var ke={type:"table",header:H(Ce[1].replace(/^ *| *\| *$/g,"")),align:Ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ce[3]?Ce[3].replace(/\n$/,"").split(` `):[]};if(ke.header.length===ke.align.length){ke.raw=Ce[0];var Fe=ke.align.length,Be;for(Be=0;Be/i.test(Fe[0])&&(Ce=!1),!ke&&/^<(pre|code|kbd|script)(\s|>)/i.test(Fe[0])?ke=!0:ke&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Fe[0])&&(ke=!1),{type:this.options.sanitize?"text":"html",raw:Fe[0],inLink:Ce,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Fe[0]):$(Fe[0]):Fe[0]}},Ae.link=function(Ee){var Ce=this.rules.inline.link.exec(Ee);if(Ce){var ke=re(Ce[2],"()");if(ke>-1){var Fe=Ce[0].indexOf("!")===0?5:4,Be=Fe+Ce[1].length+ke;Ce[2]=Ce[2].substring(0,ke),Ce[0]=Ce[0].substring(0,Be).trim(),Ce[3]=""}var et=Ce[2],ct="";if(this.options.pedantic){var yt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(et);yt?(et=yt[1],ct=yt[3]):ct=""}else ct=Ce[3]?Ce[3].slice(1,-1):"";et=et.trim().replace(/^<([\s\S]*)>$/,"$1");var ft=te(Ce,{href:et&&et.replace(this.rules.inline._escapes,"$1"),title:ct&&ct.replace(this.rules.inline._escapes,"$1")},Ce[0]);return ft}},Ae.reflink=function(Ee,Ce){var ke;if((ke=this.rules.inline.reflink.exec(Ee))||(ke=this.rules.inline.nolink.exec(Ee))){var Fe=(ke[2]||ke[1]).replace(/\s+/g," ");if(Fe=Ce[Fe.toLowerCase()],!Fe||!Fe.href){var Be=ke[0].charAt(0);return{type:"text",raw:Be,text:Be}}var et=te(ke,Fe,ke[0]);return et}},Ae.strong=function(Ee,Ce,ke){ke===void 0&&(ke="");var Fe=this.rules.inline.strong.start.exec(Ee);if(Fe&&(!Fe[1]||Fe[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Ce=Ce.slice(-1*Ee.length);var Be=Fe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Be.lastIndex=0;for(var et;(Fe=Be.exec(Ce))!=null;)if(et=this.rules.inline.strong.middle.exec(Ce.slice(0,Fe.index+3)),et)return{type:"strong",raw:Ee.slice(0,et[0].length),text:Ee.slice(2,et[0].length-2)}}},Ae.em=function(Ee,Ce,ke){ke===void 0&&(ke="");var Fe=this.rules.inline.em.start.exec(Ee);if(Fe&&(!Fe[1]||Fe[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Ce=Ce.slice(-1*Ee.length);var Be=Fe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Be.lastIndex=0;for(var et;(Fe=Be.exec(Ce))!=null;)if(et=this.rules.inline.em.middle.exec(Ce.slice(0,Fe.index+2)),et)return{type:"em",raw:Ee.slice(0,et[0].length),text:Ee.slice(1,et[0].length-1)}}},Ae.codespan=function(Ee){var Ce=this.rules.inline.code.exec(Ee);if(Ce){var ke=Ce[2].replace(/\n/g," "),Fe=/[^ ]/.test(ke),Be=ke.startsWith(" ")&&ke.endsWith(" ");return Fe&&Be&&(ke=ke.substring(1,ke.length-1)),ke=$(ke,!0),{type:"codespan",raw:Ce[0],text:ke}}},Ae.br=function(Ee){var Ce=this.rules.inline.br.exec(Ee);if(Ce)return{type:"br",raw:Ce[0]}},Ae.del=function(Ee){var Ce=this.rules.inline.del.exec(Ee);if(Ce)return{type:"del",raw:Ce[0],text:Ce[1]}},Ae.autolink=function(Ee,Ce){var ke=this.rules.inline.autolink.exec(Ee);if(ke){var Fe,Be;return ke[2]==="@"?(Fe=$(this.options.mangle?Ce(ke[1]):ke[1]),Be="mailto:"+Fe):(Fe=$(ke[1]),Be=Fe),{type:"link",raw:ke[0],text:Fe,href:Be,tokens:[{type:"text",raw:Fe,text:Fe}]}}},Ae.url=function(Ee,Ce){var ke;if(ke=this.rules.inline.url.exec(Ee)){var Fe,Be;if(ke[2]==="@")Fe=$(this.options.mangle?Ce(ke[0]):ke[0]),Be="mailto:"+Fe;else{var et;do et=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while(et!==ke[0]);Fe=$(ke[0]),ke[1]==="www."?Be="http://"+Fe:Be=Fe}return{type:"link",raw:ke[0],text:Fe,href:Be,tokens:[{type:"text",raw:Fe,text:Fe}]}}},Ae.inlineText=function(Ee,Ce,ke){var Fe=this.rules.inline.text.exec(Ee);if(Fe){var Be;return Ce?Be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Fe[0]):$(Fe[0]):Fe[0]:Be=$(this.options.smartypants?ke(Fe[0]):Fe[0]),{type:"text",raw:Fe[0],text:Be}}},Ne}(),de=G.noopTest,De=G.edit,Te=G.merge,he={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:de,table:de,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};he._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,he._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,he.def=De(he.def).replace("label",he._label).replace("title",he._title).getRegex(),he.bullet=/(?:[*+-]|\d{1,9}[.)])/,he.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,he.item=De(he.item,"gm").replace(/bull/g,he.bullet).getRegex(),he.list=De(he.list).replace(/bull/g,he.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+he.def.source+")").getRegex(),he._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",he._comment=//,he.html=De(he.html,"i").replace("comment",he._comment).replace("tag",he._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he.paragraph=De(he._paragraph).replace("hr",he.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",he._tag).getRegex(),he.blockquote=De(he.blockquote).replace("paragraph",he.paragraph).getRegex(),he.normal=Te({},he),he.gfm=Te({},he.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*|$)"}),he.gfm.nptable=De(he.gfm.nptable).replace("hr",he.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",he._tag).getRegex(),he.gfm.table=De(he.gfm.table).replace("hr",he.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",he._tag).getRegex(),he.pedantic=Te({},he.normal,{html:De(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",he._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:de,paragraph:De(he.normal._paragraph).replace("hr",he.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",he.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:de,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:de,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ue.punctuation=De(ue.punctuation).replace(/punctuation/g,ue._punctuation).getRegex(),ue._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ue._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ue.em.start=De(ue.em.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.middle=De(ue.em.middle).replace(/punctuation/g,ue._punctuation).replace(/overlapSkip/g,ue._overlapSkip).getRegex(),ue.em.endAst=De(ue.em.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.endUnd=De(ue.em.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.start=De(ue.strong.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.middle=De(ue.strong.middle).replace(/punctuation/g,ue._punctuation).replace(/blockSkip/g,ue._blockSkip).getRegex(),ue.strong.endAst=De(ue.strong.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.endUnd=De(ue.strong.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.blockSkip=De(ue._blockSkip,"g").getRegex(),ue.overlapSkip=De(ue._overlapSkip,"g").getRegex(),ue._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ue._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])?)+(?![-_])/,ue.autolink=De(ue.autolink).replace("scheme",ue._scheme).replace("email",ue._email).getRegex(),ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ue.tag=De(ue.tag).replace("comment",he._comment).replace("attribute",ue._attribute).getRegex(),ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ue._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ue.link=De(ue.link).replace("label",ue._label).replace("href",ue._href).replace("title",ue._title).getRegex(),ue.reflink=De(ue.reflink).replace("label",ue._label).getRegex(),ue.reflinkSearch=De(ue.reflinkSearch,"g").replace("reflink",ue.reflink).replace("nolink",ue.nolink).getRegex(),ue.normal=Te({},ue),ue.pedantic=Te({},ue.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:De(/^!?\[(label)\]\((.*?)\)/).replace("label",ue._label).getRegex(),reflink:De(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue._label).getRegex()}),ue.gfm=Te({},ue.normal,{escape:De(ue.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&&(Ee="x"+Ee.toString(16)),Ae+="&#"+Ee+";";return Ae}var q=function(){function Ne(Me){this.tokens=[],this.tokens.links=Object.create(null),this.options=Me||Se,this.options.tokenizer=this.options.tokenizer||new ve,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ee={block:ne.normal,inline:ce.normal};this.options.pedantic?(Ee.block=ne.pedantic,Ee.inline=ce.pedantic):this.options.gfm&&(Ee.block=ne.gfm,this.options.breaks?Ee.inline=ce.breaks:Ee.inline=ce.gfm),this.tokenizer.rules=Ee}Ne.lex=function(Ee,Ce){var ke=new Ne(Ce);return ke.lex(Ee)};var Ae=Ne.prototype;return Ae.lex=function(Ee){return Ee=Ee.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(Ee,this.tokens,!0),this.inline(this.tokens),this.tokens},Ae.blockTokens=function(Ee,Ce,ke){Ce===void 0&&(Ce=[]),ke===void 0&&(ke=!0),Ee=Ee.replace(/^ +$/gm,"");for(var Fe,Be,et,ct;Ee;){if(Fe=this.tokenizer.space(Ee)){Ee=Ee.substring(Fe.raw.length),Fe.type&&Ce.push(Fe);continue}if(Fe=this.tokenizer.code(Ee,Ce)){Ee=Ee.substring(Fe.raw.length),Fe.type?Ce.push(Fe):(ct=Ce[Ce.length-1],ct.raw+=` `+Fe.raw,ct.text+=` `+Fe.text);continue}if(Fe=this.tokenizer.fences(Ee)){Ee=Ee.substring(Fe.raw.length),Ce.push(Fe);continue}if(Fe=this.tokenizer.heading(Ee)){Ee=Ee.substring(Fe.raw.length),Ce.push(Fe);continue}if(Fe=this.tokenizer.nptable(Ee)){Ee=Ee.substring(Fe.raw.length),Ce.push(Fe);continue}if(Fe=this.tokenizer.hr(Ee)){Ee=Ee.substring(Fe.raw.length),Ce.push(Fe);continue}if(Fe=this.tokenizer.blockquote(Ee)){Ee=Ee.substring(Fe.raw.length),Fe.tokens=this.blockTokens(Fe.text,[],ke),Ce.push(Fe);continue}if(Fe=this.tokenizer.list(Ee)){for(Ee=Ee.substring(Fe.raw.length),et=Fe.items.length,Be=0;Be0)for(;(yt=this.tokenizer.rules.inline.reflinkSearch.exec(ct))!=null;)ft.includes(yt[0].slice(yt[0].lastIndexOf("[")+1,-1))&&(ct=ct.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+ct.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(yt=this.tokenizer.rules.inline.blockSkip.exec(ct))!=null;)ct=ct.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+ct.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Ee;){if(et=this.tokenizer.escape(Ee)){Ee=Ee.substring(et.raw.length),Ce.push(et);continue}if(et=this.tokenizer.tag(Ee,ke,Fe)){Ee=Ee.substring(et.raw.length),ke=et.inLink,Fe=et.inRawBlock,Ce.push(et);continue}if(et=this.tokenizer.link(Ee)){Ee=Ee.substring(et.raw.length),et.type==="link"&&(et.tokens=this.inlineTokens(et.text,[],!0,Fe)),Ce.push(et);continue}if(et=this.tokenizer.reflink(Ee,this.tokens.links)){Ee=Ee.substring(et.raw.length),et.type==="link"&&(et.tokens=this.inlineTokens(et.text,[],!0,Fe)),Ce.push(et);continue}if(et=this.tokenizer.strong(Ee,ct,Be)){Ee=Ee.substring(et.raw.length),et.tokens=this.inlineTokens(et.text,[],ke,Fe),Ce.push(et);continue}if(et=this.tokenizer.em(Ee,ct,Be)){Ee=Ee.substring(et.raw.length),et.tokens=this.inlineTokens(et.text,[],ke,Fe),Ce.push(et);continue}if(et=this.tokenizer.codespan(Ee)){Ee=Ee.substring(et.raw.length),Ce.push(et);continue}if(et=this.tokenizer.br(Ee)){Ee=Ee.substring(et.raw.length),Ce.push(et);continue}if(et=this.tokenizer.del(Ee)){Ee=Ee.substring(et.raw.length),et.tokens=this.inlineTokens(et.text,[],ke,Fe),Ce.push(et);continue}if(et=this.tokenizer.autolink(Ee,oe)){Ee=Ee.substring(et.raw.length),Ce.push(et);continue}if(!ke&&(et=this.tokenizer.url(Ee,oe))){Ee=Ee.substring(et.raw.length),Ce.push(et);continue}if(et=this.tokenizer.inlineText(Ee,Fe,Oe)){Ee=Ee.substring(et.raw.length),Be=et.raw.slice(-1),Ce.push(et);continue}if(Ee){var mt="Infinite loop on byte: "+Ee.charCodeAt(0);if(this.options.silent){console.error(mt);break}else throw new Error(mt)}}return Ce},v(Ne,null,[{key:"rules",get:function(){return{block:ne,inline:ce}}}]),Ne}(),Y=S.defaults,Z=G.cleanUrl,ye=G.escape,be=function(){function Ne(Me){this.options=Me||Y}var Ae=Ne.prototype;return Ae.code=function(Ee,Ce,ke){var Fe=(Ce||"").match(/\S*/)[0];if(this.options.highlight){var Be=this.options.highlight(Ee,Fe);Be!=null&&Be!==Ee&&(ke=!0,Ee=Be)}return Fe?'
    '+(ke?Ee:ye(Ee,!0))+`
    `:"
    "+(ke?Ee:ye(Ee,!0))+`
    `},Ae.blockquote=function(Ee){return`
    `+Ee+`
    `},Ae.html=function(Ee){return Ee},Ae.heading=function(Ee,Ce,ke,Fe){return this.options.headerIds?"'+Ee+" `:""+Ee+" `},Ae.hr=function(){return this.options.xhtml?`
    `:`
    `},Ae.list=function(Ee,Ce,ke){var Fe=Ce?"ol":"ul",Be=Ce&&ke!==1?' start="'+ke+'"':"";return"<"+Fe+Be+`> `+Ee+" `},Ae.listitem=function(Ee){return"
  • "+Ee+`
  • `},Ae.checkbox=function(Ee){return" "},Ae.paragraph=function(Ee){return"

    "+Ee+`

    `},Ae.table=function(Ee,Ce){return Ce&&(Ce=""+Ce+""),` `+Ee+` `+Ce+`
    `},Ae.tablerow=function(Ee){return` `+Ee+` `},Ae.tablecell=function(Ee,Ce){var ke=Ce.header?"th":"td",Fe=Ce.align?"<"+ke+' align="'+Ce.align+'">':"<"+ke+">";return Fe+Ee+" `},Ae.strong=function(Ee){return""+Ee+""},Ae.em=function(Ee){return""+Ee+""},Ae.codespan=function(Ee){return""+Ee+""},Ae.br=function(){return this.options.xhtml?"
    ":"
    "},Ae.del=function(Ee){return""+Ee+""},Ae.link=function(Ee,Ce,ke){if(Ee=Z(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return ke;var Fe='",Fe},Ae.image=function(Ee,Ce,ke){if(Ee=Z(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return ke;var Fe=''+ke+'":">",Fe},Ae.text=function(Ee){return Ee},Ne}(),Re=function(){function Ne(){}var Ae=Ne.prototype;return Ae.strong=function(Ee){return Ee},Ae.em=function(Ee){return Ee},Ae.codespan=function(Ee){return Ee},Ae.del=function(Ee){return Ee},Ae.html=function(Ee){return Ee},Ae.text=function(Ee){return Ee},Ae.link=function(Ee,Ce,ke){return""+ke},Ae.image=function(Ee,Ce,ke){return""+ke},Ae.br=function(){return""},Ne}(),Qe=function(){function Ne(){this.seen={}}var Ae=Ne.prototype;return Ae.slug=function(Ee){var Ce=Ee.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ce)){var ke=Ce;do this.seen[ke]++,Ce=ke+"-"+this.seen[ke];while(this.seen.hasOwnProperty(Ce))}return this.seen[Ce]=0,Ce},Ne}(),rt=S.defaults,at=G.unescape,qe=function(){function Ne(Me){this.options=Me||rt,this.options.renderer=this.options.renderer||new be,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Re,this.slugger=new Qe}Ne.parse=function(Ee,Ce){var ke=new Ne(Ce);return ke.parse(Ee)};var Ae=Ne.prototype;return Ae.parse=function(Ee,Ce){Ce===void 0&&(Ce=!0);var ke="",Fe,Be,et,ct,yt,ft,mt,It,At,_t,Vt,Kt,tr,rr,Wt,Lt,nr,dt,Et=Ee.length;for(Fe=0;Fe0&&Wt.tokens[0].type==="text"?(Wt.tokens[0].text=dt+" "+Wt.tokens[0].text,Wt.tokens[0].tokens&&Wt.tokens[0].tokens.length>0&&Wt.tokens[0].tokens[0].type==="text"&&(Wt.tokens[0].tokens[0].text=dt+" "+Wt.tokens[0].tokens[0].text)):Wt.tokens.unshift({type:"text",text:dt}):rr+=dt),rr+=this.parse(Wt.tokens,tr),At+=this.renderer.listitem(rr,nr,Lt);ke+=this.renderer.list(At,Vt,Kt);continue}case"html":{ke+=this.renderer.html(_t.text);continue}case"paragraph":{ke+=this.renderer.paragraph(this.parseInline(_t.tokens));continue}case"text":{for(At=_t.tokens?this.parseInline(_t.tokens):_t.text;Fe+1An error occurred:

    "+je(et.message+"",!0)+"
    ";throw et}}ze.options=ze.setOptions=function(Ne){return st(ze.defaults,Ne),tt(ze.defaults),ze},ze.getDefaults=Ie,ze.defaults=ot,ze.use=function(Ne){var Ae=st({},Ne);if(Ne.renderer&&function(){var Ee=ze.defaults.renderer||new be,Ce=function(Be){var et=Ee[Be];Ee[Be]=function(){for(var ct=arguments.length,yt=new Array(ct),ft=0;ft=0;r--){if(!C(l[r]))continue;var i=l[r].split("="),o=unescape(i[0]),s=unescape(i[1]);t(s,o)}}function S(t,l){if(!t)return;k.cookie=escape(t)+"="+escape(l)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function b(t){if(!t||!d(t))return;k.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function p(){m(function(t,l){b(l)})}function d(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(k.cookie)}},E4JC:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.StreamCipher,y=v.algo,m=[],S=[],b=[],p=y.Rabbit=k.extend({_doReset:function(){for(var t=this._key.words,l=this.cfg.iv,r=0;r<4;r++)t[r]=(t[r]<<8|t[r]>>>24)&16711935|(t[r]<<24|t[r]>>>8)&4278255360;var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],o=this._C=[t[2]<<16|t[2]>>>16,t[0]&4294901760|t[1]&65535,t[3]<<16|t[3]>>>16,t[1]&4294901760|t[2]&65535,t[0]<<16|t[0]>>>16,t[2]&4294901760|t[3]&65535,t[1]<<16|t[1]>>>16,t[3]&4294901760|t[0]&65535];this._b=0;for(var r=0;r<4;r++)d.call(this);for(var r=0;r<8;r++)o[r]^=i[r+4&7];if(l){var s=l.words,c=s[0],a=s[1],u=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,f=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,w=u>>>16|f&4294901760,_=f<<16|u&65535;o[0]^=u,o[1]^=w,o[2]^=f,o[3]^=_,o[4]^=u,o[5]^=w,o[6]^=f,o[7]^=_;for(var r=0;r<4;r++)d.call(this)}},_doProcessBlock:function(t,l){var r=this._X;d.call(this),m[0]=r[0]^r[5]>>>16^r[3]<<16,m[1]=r[2]^r[7]>>>16^r[5]<<16,m[2]=r[4]^r[1]>>>16^r[7]<<16,m[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)m[i]=(m[i]<<8|m[i]>>>24)&16711935|(m[i]<<24|m[i]>>>8)&4278255360,t[l+i]^=m[i]},blockSize:128/32,ivSize:64/32});function d(){for(var t=this._X,l=this._C,r=0;r<8;r++)S[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0>>0?1:0)|0,this._b=l[7]>>>0>>0?1:0;for(var r=0;r<8;r++){var i=t[r]+l[r],o=i&65535,s=i>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,a=((i&4294901760)*i|0)+((i&65535)*i|0);b[r]=c^a}t[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,t[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,t[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,t[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,t[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,t[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,t[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,t[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}v.Rabbit=k._createHelper(p)}(),N.Rabbit})},ELLl:function(F,Q,j){(function(N){N(j("VrN/"))})(function(N){var v={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},C=N.Pos;N.defineOption("autoCloseBrackets",!1,function(o,s,c){c&&c!=N.Init&&(o.removeKeyMap(y),o.state.closeBrackets=null),s&&(m(k(s,"pairs")),o.state.closeBrackets=s,o.addKeyMap(y))});function k(o,s){return s=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[s]!=null?o[s]:v[s]}var y={Backspace:p,Enter:d};function m(o){for(var s=0;s=0;u--){var w=a[u].head;o.replaceRange("",C(w.line,w.ch-1),C(w.line,w.ch+1),"+delete")}}function d(o){var s=b(o),c=s&&k(s,"explode");if(!c||o.getOption("disableInput"))return N.Pass;for(var a=o.listSelections(),u=0;u0;return{anchor:new C(o.anchor.line,o.anchor.ch+(s?-1:1)),head:new C(o.head.line,o.head.ch+(s?1:-1))}}function l(o,s){var c=b(o);if(!c||o.getOption("disableInput"))return N.Pass;var a=k(c,"pairs"),u=a.indexOf(s);if(u==-1)return N.Pass;for(var f=k(c,"closeBefore"),w=k(c,"triples"),_=a.charAt(u+1)==s,h=o.listSelections(),R=u%2==0,O,g=0;g=0&&o.getRange(E,C(E.line,E.ch+3))==s+s+s?T="skipThree":T="skip";else if(_&&E.ch>1&&w.indexOf(s)>=0&&o.getRange(C(E.line,E.ch-2),E)==s+s){if(E.ch>2&&/\bstring/.test(o.getTokenTypeAt(C(E.line,E.ch-2))))return N.Pass;T="addFour"}else if(_){var L=E.ch==0?" ":o.getRange(C(E.line,E.ch-1),E);if(!N.isWordChar(M)&&L!=s&&!N.isWordChar(L))T="both";else return N.Pass}else if(R&&(M.length===0||/\s/.test(M)||f.indexOf(M)>-1))T="both";else return N.Pass;if(!O)O=T;else if(O!=T)return N.Pass}var A=u%2?a.charAt(u-1):s,V=u%2?s:a.charAt(u+1);o.operation(function(){if(O=="skip")o.execCommand("goCharRight");else if(O=="skipThree")for(var z=0;z<3;z++)o.execCommand("goCharRight");else if(O=="surround"){for(var W=o.getSelections(),z=0;z>>24)&16711935|(O<<24|O>>>8)&4278255360}var g=this._hash.words,x=l.words,E=r.words,T=b.words,M=p.words,L=d.words,A=t.words,V,z,W,G,U,P,H,$,re,te;P=V=g[0],H=z=g[1],$=W=g[2],re=G=g[3],te=U=g[4];for(var ge,h=0;h<80;h+=1)ge=V+w[_+T[h]]|0,h<16?ge+=o(z,W,G)+x[0]:h<32?ge+=s(z,W,G)+x[1]:h<48?ge+=c(z,W,G)+x[2]:h<64?ge+=a(z,W,G)+x[3]:ge+=u(z,W,G)+x[4],ge=ge|0,ge=f(ge,L[h]),ge=ge+U|0,V=U,U=G,G=f(W,10),W=z,z=ge,ge=P+w[_+M[h]]|0,h<16?ge+=u(H,$,re)+E[0]:h<32?ge+=a(H,$,re)+E[1]:h<48?ge+=c(H,$,re)+E[2]:h<64?ge+=s(H,$,re)+E[3]:ge+=o(H,$,re)+E[4],ge=ge|0,ge=f(ge,A[h]),ge=ge+te|0,P=te,te=re,re=f($,10),$=H,H=ge;ge=g[1]+W+re|0,g[1]=g[2]+G+te|0,g[2]=g[3]+U+P|0,g[3]=g[4]+V+H|0,g[4]=g[0]+z+$|0,g[0]=ge},_doFinalize:function(){var w=this._data,_=w.words,h=this._nDataBytes*8,R=w.sigBytes*8;_[R>>>5]|=128<<24-R%32,_[(R+64>>>9<<4)+14]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,w.sigBytes=(_.length+1)*4,this._process();for(var O=this._hash,g=O.words,x=0;x<5;x++){var E=g[x];g[x]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return O},clone:function(){var w=m.clone.call(this);return w._hash=this._hash.clone(),w}});function o(w,_,h){return w^_^h}function s(w,_,h){return w&_|~w&h}function c(w,_,h){return(w|~_)^h}function a(w,_,h){return w&h|_&~h}function u(w,_,h){return w^(_|~h)}function f(w,_){return w<<_|w>>>32-_}C.RIPEMD160=m._createHelper(i),C.HmacRIPEMD160=m._createHmacHelper(i)}(Math),N.RIPEMD160})},ETIr:function(F,Q,j){(function(N,v){F.exports=Q=v(j("Ib8C"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.WordArray,y=v.enc,m=y.Base64={stringify:function(b){var p=b.words,d=b.sigBytes,t=this._map;b.clamp();for(var l=[],r=0;r>>2]>>>24-r%4*8&255,o=p[r+1>>>2]>>>24-(r+1)%4*8&255,s=p[r+2>>>2]>>>24-(r+2)%4*8&255,c=i<<16|o<<8|s,a=0;a<4&&r+a*.75>>6*(3-a)&63));var u=t.charAt(64);if(u)for(;l.length%4;)l.push(u);return l.join("")},parse:function(b){var p=b.length,d=this._map,t=this._reverseMap;if(!t){t=this._reverseMap=[];for(var l=0;l>>6-r%4*2,s=i|o;t[l>>>2]|=s<<24-l%4*8,l++}return k.create(t,l)}}(),N.enc.Base64})},"F+F2":function(F,Q,j){(function(N,v){F.exports=Q=v(j("Ib8C"))})(this,function(N){return function(){if(typeof ArrayBuffer!="function")return;var v=N,C=v.lib,k=C.WordArray,y=k.init,m=k.init=function(S){if(S instanceof ArrayBuffer&&(S=new Uint8Array(S)),(S instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array)&&(S=new Uint8Array(S.buffer,S.byteOffset,S.byteLength)),S instanceof Uint8Array){for(var b=S.byteLength,p=[],d=0;d>>2]|=S[d]<<24-d%4*8;y.call(this,p,b)}else y.apply(this,arguments)};m.prototype=k}(),N.lib.WordArray})},GRuw:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("lPiR"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.WordArray,y=v.algo,m=y.SHA256,S=y.SHA224=m.extend({_doReset:function(){this._hash=new k.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var b=m._doFinalize.call(this);return b.sigBytes-=4,b}});v.SHA224=m._createHelper(S),v.HmacSHA224=m._createHmacHelper(S)}(),N.SHA224})},GfqC:function(F,Q,j){"use strict";var N=j("cDcd"),v=j.n(N),C=j("TSYQ"),k=j.n(C);function y(G,U){var P="cannot "+G.method+" "+G.action+" "+U.status+"'",H=new Error(P);return H.status=U.status,H.method=G.method,H.url=G.action,H}function m(G){var U=G.responseText||G.response;if(!U)return U;try{return JSON.parse(U)}catch(P){return U}}function S(G){var U=new XMLHttpRequest;G.onProgress&&U.upload&&(U.upload.onprogress=function(re){re.total>0&&(re.percent=re.loaded/re.total*100),G.onProgress(re)});var P=new FormData;G.data&&Object.keys(G.data).forEach(function($){var re=G.data[$];if(Array.isArray(re)){re.forEach(function(te){P.append($+"[]",te)});return}P.append($,G.data[$])}),G.file instanceof Blob?P.append(G.filename,G.file,G.file.name):P.append(G.filename,G.file),U.onerror=function(re){G.onError(re)},U.onload=function(){return U.status<200||U.status>=300?G.onError(y(G,U),m(U)):G.onSuccess(m(U),U)},U.open(G.method,G.action,!0),G.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var H=G.headers||{};return H["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function($){H[$]!==null&&U.setRequestHeader($,H[$])}),U.send(P),{abort:function(){U.abort()}}}var b=+new Date,p=0;function d(){return"rc-upload-"+b+"-"+ ++p}function t(G,U){return G.indexOf(U,G.length-U.length)!==-1}var l=function(G,U){if(G&&U){var P=Array.isArray(U)?U:U.split(","),H=G.name||"",$=G.type||"",re=$.replace(/\/.*$/,"");return P.some(function(te){var ge=te.trim();return ge.charAt(0)==="."?t(H.toLowerCase(),ge.toLowerCase()):/\/\*$/.test(ge)?re===ge.replace(/\/.*$/,""):$===ge})}return!0};function r(G,U){var P=G.createReader(),H=[];function $(){P.readEntries(function(re){var te=Array.prototype.slice.apply(re);H=H.concat(te);var ge=!te.length;ge?U(H):$()})}$()}var i=function(U,P,H){var $=function re(te,ge){ge=ge||"",te.isFile?te.file(function(ve){H(ve)&&(te.fullPath&&!ve.webkitRelativePath&&(Object.defineProperties(ve,{webkitRelativePath:{writable:!0}}),ve.webkitRelativePath=te.fullPath.replace(/^\//,""),Object.defineProperties(ve,{webkitRelativePath:{writable:!1}})),P([ve]))}):te.isDirectory&&r(te,function(ve){ve.forEach(function(de){re(de,""+ge+te.name+"/")})})};U.forEach(function(re){$(re.webkitGetAsEntry())})},o=i,s=Object.assign||function(G){for(var U=1;U=0)continue;if(!Object.prototype.hasOwnProperty.call(G,H))continue;P[H]=G[H]}return P}function w(G,U){if(!(G instanceof U))throw new TypeError("Cannot call a class as a function")}function _(G,U){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:G}function h(G,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);G.prototype=Object.create(U&&U.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(G,U):G.__proto__=U)}var R=function(U){return Object.keys(U).reduce(function(P,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(P[H]=U[H]),P},{})},O=function(G){h(U,G);function U(){var P,H,$,re;w(this,U);for(var te=arguments.length,ge=Array(te),ve=0;ve>>2]>>>24-R%4*8&255;f[_+R>>>2]|=O<<24-(_+R)%4*8}else for(var g=0;g>>2]=w[g>>>2];return this.sigBytes+=h,this},clamp:function(){var u=this.words,f=this.sigBytes;u[f>>>2]&=4294967295<<32-f%4*8,u.length=C.ceil(f/4)},clone:function(){var u=d.clone.call(this);return u.words=this.words.slice(0),u},random:function(u){for(var f=[],w=0;w>>2]>>>24-h%4*8&255;_.push((R>>>4).toString(16)),_.push((R&15).toString(16))}return _.join("")},parse:function(u){for(var f=u.length,w=[],_=0;_>>3]|=parseInt(u.substr(_,2),16)<<24-_%8*4;return new t.init(w,f/2)}},i=l.Latin1={stringify:function(u){for(var f=u.words,w=u.sigBytes,_=[],h=0;h>>2]>>>24-h%4*8&255;_.push(String.fromCharCode(R))}return _.join("")},parse:function(u){for(var f=u.length,w=[],_=0;_>>2]|=(u.charCodeAt(_)&255)<<24-_%4*8;return new t.init(w,f)}},o=l.Utf8={stringify:function(u){try{return decodeURIComponent(escape(i.stringify(u)))}catch(f){throw new Error("Malformed UTF-8 data")}},parse:function(u){return i.parse(unescape(encodeURIComponent(u)))}},s=p.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new t.init,this._nDataBytes=0},_append:function(u){typeof u=="string"&&(u=o.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},_process:function(u){var f,w=this._data,_=w.words,h=w.sigBytes,R=this.blockSize,O=R*4,g=h/O;u?g=C.ceil(g):g=C.max((g|0)-this._minBufferSize,0);var x=g*R,E=C.min(x*4,h);if(x){for(var T=0;T>>6)+p(128|V&63):p(224|V>>>12&15)+p(128|V>>>6&63)+p(128|V&63)}else{var V=65536+(A.charCodeAt(0)-55296)*1024+(A.charCodeAt(1)-56320);return p(240|V>>>18&7)+p(128|V>>>12&63)+p(128|V>>>6&63)+p(128|V&63)}},t=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(A){return A.replace(t,d)},r=function(A){var V=[0,2,1][A.length%3],z=A.charCodeAt(0)<<16|(A.length>1?A.charCodeAt(1):0)<<8|(A.length>2?A.charCodeAt(2):0),W=[S.charAt(z>>>18),S.charAt(z>>>12&63),V>=2?"=":S.charAt(z>>>6&63),V>=1?"=":S.charAt(z&63)];return W.join("")},i=k.btoa&&typeof k.btoa=="function"?function(A){return k.btoa(A)}:function(A){if(A.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return A.replace(/[\s\S]{1,3}/g,r)},o=function(A){return i(l(String(A)))},s=function(A){return A.replace(/[+\/]/g,function(V){return V=="+"?"-":"_"}).replace(/=/g,"")},c=function(A,V){return V?s(o(A)):o(A)},a=function(A){return c(A,!0)},u;k.Uint8Array&&(u=function(A,V){for(var z="",W=0,G=A.length;W>>18)+S.charAt($>>>12&63)+(typeof P!="undefined"?S.charAt($>>>6&63):"=")+(typeof H!="undefined"?S.charAt($&63):"=")}return V?s(z):z});var f=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=function(A){switch(A.length){case 4:var V=(7&A.charCodeAt(0))<<18|(63&A.charCodeAt(1))<<12|(63&A.charCodeAt(2))<<6|63&A.charCodeAt(3),z=V-65536;return p((z>>>10)+55296)+p((z&1023)+56320);case 3:return p((15&A.charCodeAt(0))<<12|(63&A.charCodeAt(1))<<6|63&A.charCodeAt(2));default:return p((31&A.charCodeAt(0))<<6|63&A.charCodeAt(1))}},_=function(A){return A.replace(f,w)},h=function(A){var V=A.length,z=V%4,W=(V>0?b[A.charAt(0)]<<18:0)|(V>1?b[A.charAt(1)]<<12:0)|(V>2?b[A.charAt(2)]<<6:0)|(V>3?b[A.charAt(3)]:0),G=[p(W>>>16),p(W>>>8&255),p(W&255)];return G.length-=[0,0,2,1][z],G.join("")},R=k.atob&&typeof k.atob=="function"?function(A){return k.atob(A)}:function(A){return A.replace(/\S{1,4}/g,h)},O=function(A){return R(String(A).replace(/[^A-Za-z0-9\+\/]/g,""))},g=function(A){return _(R(A))},x=function(A){return String(A).replace(/[-_]/g,function(V){return V=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},E=function(A){return g(x(A))},T;k.Uint8Array&&(T=function(A){return Uint8Array.from(O(x(A)),function(V){return V.charCodeAt(0)})});var M=function(){var A=k.Base64;return k.Base64=y,A};if(k.Base64={VERSION:m,atob:O,btoa:i,fromBase64:E,toBase64:c,utob:l,encode:c,encodeURI:a,btou:_,decode:E,noConflict:M,fromUint8Array:u,toUint8Array:T},typeof Object.defineProperty=="function"){var L=function(A){return{value:A,enumerable:!1,writable:!0,configurable:!0}};k.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",L(function(){return E(this)})),Object.defineProperty(String.prototype,"toBase64",L(function(A){return c(this,A)})),Object.defineProperty(String.prototype,"toBase64URI",L(function(){return c(this,!0)}))}}return k.Meteor&&(Base64=k.Base64),F.exports?F.exports.Base64=k.Base64:!(v=[],C=function(){return k.Base64}.apply(Q,v),C!==void 0&&(F.exports=C)),{Base64:k.Base64}})}).call(this,j("IyRk"))},K3mO:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("3y9D"),j("WYAk"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.Base,y=C.WordArray,m=v.algo,S=m.MD5,b=m.EvpKDF=k.extend({cfg:k.extend({keySize:128/32,hasher:S,iterations:1}),init:function(p){this.cfg=this.cfg.extend(p)},compute:function(p,d){for(var t,l=this.cfg,r=l.hasher.create(),i=y.create(),o=i.words,s=l.keySize,c=l.iterations;o.lengthTe)){ue.next=7;break}return C.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Te/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ue.abrupt("return",!1);case 7:return W.push({name:De.name,file:De}),G(Object(k.a)(W)),A.onChange(W),ue.abrupt("return",!1);case 11:case"end":return ue.stop()}},de)}));function ve(de){return ge.apply(this,arguments)}return ve}()},te=function(){var ge=Object(b.a)(l.a.mark(function ve(de,De){var Te,he,ue,ie,Se,ne,ce,Oe,oe,q;return l.a.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return De.file_name=de.name,ce=de.name,Z.next=4,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Oe=Z.sent,Oe.data=JSON.parse(h(Oe.data)),!((Oe==null?void 0:Oe.status)!==0)){Z.next=12;break}return W[W.findIndex(function(ye){return ye.name===ce})].status="error",W[W.findIndex(function(ye){return ye.name===ce})].file.status="error",A.onChange(W),C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Z.abrupt("return");case 12:return H=new w.a({endpoint:Oe==null||((Te=Oe.data)===null||Te===void 0)?void 0:Te.end_point,region:Oe==null||((he=Oe.data)===null||he===void 0)?void 0:he.region,accessKeyId:Oe==null||((ue=Oe.data)===null||ue===void 0)?void 0:ue.access_key_id,accessKeySecret:Oe==null||((ie=Oe.data)===null||ie===void 0)?void 0:ie.access_key_secret,bucket:Oe==null||((Se=Oe.data)===null||Se===void 0)?void 0:Se.bucket,stsToken:Oe==null||((ne=Oe.data)===null||ne===void 0)?void 0:ne.security_token}),console.log(de,"file"),$(H),oe=de.name.split("."),oe.pop(),q=De.realFileName?oe:Object(a.a)(),Z.abrupt("return",new Promise(function(ye,be){try{var Re;H.multipartUpload("".concat(A.identifier,"/").concat(q).concat(ce.indexOf(".")>-1?"."+ce.split(".").pop():""),new Blob([de.file],{type:de.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(rt,at,qe){try{console.log("\u8FDB\u5EA6",rt,at,qe);var st=W.findIndex(function(lt){return lt.name===ce});W[st].file.percent=rt*100,W[st].tempCheckpoint=at,G(Object(k.a)(W))}catch(lt){}},checkpoint:W[W.findIndex(function(Qe){return Qe.name===ce})].tempCheckpoint,callback:{customValue:{id:ce+""},url:Oe==null||((Re=Oe.data)===null||Re===void 0)?void 0:Re.callback_url,host:Oe==null?void 0:Oe.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(De)}}).then(function(Qe){var rt,at=W.findIndex(function(Ie){return Ie.name===ce}),qe="done";if(((rt=Qe.data)===null||rt===void 0?void 0:rt.status)===0){var st;de.response=(st=Qe.data)===null||st===void 0?void 0:st.data;var lt=W.findIndex(function(Ie){return Ie.name===ce});W[lt].status="done",W[lt].file.status="done"}else{var je;C.b.warn((je=Qe.data)===null||je===void 0?void 0:je.message),qe="error"}W[at].status=qe,W[at].file.status=qe,A.onChange(W),ye(Qe==null?void 0:Qe.data)}).catch(function(Qe){W[W.findIndex(function(rt){return rt.name===ce})].status="error",W[W.findIndex(function(rt){return rt.name===ce})].file.status="error",C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),G(Object(k.a)(W)),A.onChange(W),be(Qe),console.log("err:",Qe)})}catch(Qe){}}));case 19:case"end":return Z.stop()}},ve)}));return function(de,De){return ge.apply(this,arguments)}}();return Object(r.useEffect)(function(){W.every(function(ge){return ge==="done"||ge==="error"})&&A.onComplete(W)},[W]),Object(r.useEffect)(function(){if(L){var ge;(ge=H)===null||ge===void 0||ge.cancel()}},[L]),Object(r.useEffect)(function(){A.uploading&&W.map(function(){var ge=Object(b.a)(l.a.mark(function ve(de){var De,Te;return l.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!((!de.status||de.status==="error")&&!L)){ue.next=6;break}return de.status="uploading",de.file.status="uploading",ue.next=5,te(de,{login:M==null||((De=M.userInfo)===null||De===void 0)?void 0:De.login,container_type:A.container_type,container_id:A.container_id,description:A.description,realFileName:A.realFileName});case 5:Te=ue.sent;case 6:case"end":return ue.stop()}},ve)}));return function(ve){return ge.apply(this,arguments)}}())},[A.uploading]),i.a.createElement(_,Object(N.a)({},re,{height:A.height,className:A.className}),i.a.createElement("p",{className:"ant-upload-hint"},A.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Q.b=Object(u.a)(function(E){var T=E.loading,M=E.globalSetting,L=E.user;return{globalSetting:M,loading:T.models.competitions,user:L}})(x)},KmYQ:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.ZeroPadding={pad:function(v,C){var k=C*4;v.clamp(),v.sigBytes+=k-(v.sigBytes%k||k)},unpad:function(v){for(var C=v.words,k=v.sigBytes-1,k=v.sigBytes-1;k>=0;k--)if(C[k>>>2]>>>24-k%4*8&255){v.sigBytes=k+1;break}}},N.pad.ZeroPadding})},L9qf:function(F,Q,j){F.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(F,Q,j){"use strict";j.d(Q,"b",function(){return f}),j.d(Q,"a",function(){return _});var N=j("1OyB"),v=j("vuIU"),C=j("Ji7U"),k=j("LK+K"),y=j("cDcd"),m=j("rePB"),S=j("Ff2n"),b=j("ODXe"),p=j("4IlW"),d=j("bX4T"),t=j("YrtM"),l=j("TSYQ"),r=j.n(l),i=j("+nKL"),o=j("8OUc"),s=function(H,$){var re=H.prefixCls,te=H.id,ge=H.flattenOptions,ve=H.childrenAsData,de=H.values,De=H.searchValue,Te=H.multiple,he=H.defaultActiveFirstOption,ue=H.height,ie=H.itemHeight,Se=H.notFoundContent,ne=H.open,ce=H.menuItemSelectedIcon,Oe=H.virtual,oe=H.onSelect,q=H.onToggleOpen,Y=H.onActiveValue,Z=H.onScroll,ye=H.onMouseEnter,be="".concat(re,"-item"),Re=Object(t.a)(function(){return ge},[ne,ge],function(Ze,Ne){return Ne[0]&&Ze[1]!==Ne[1]}),Qe=y.useRef(null),rt=function(Ne){Ne.preventDefault()},at=function(Ne){Qe.current&&Qe.current.scrollTo({index:Ne})},qe=function(Ne){for(var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Me=Re.length,Ee=0;Ee1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(P).map(function($,re){if(!y.isValidElement($)||!$.type)return null;var te=$.type.isSelectOptGroup,ge=$.key,ve=$.props,de=ve.children,De=Object(S.a)(ve,["children"]);return H||!te?O($):Object(h.a)(Object(h.a)({key:"__RC_SELECT_GRP__".concat(ge===null?re:ge,"__"),label:ge},De),{},{options:g(de)})}).filter(function($){return $})}var x=j("2Qr1"),E=j("qNPg"),T=j("U8pU"),M=j("Kwbf"),L=j("WKfj");function A(P){var H=P.mode,$=P.options,re=P.children,te=P.backfill,ge=P.allowClear,ve=P.placeholder,de=P.getInputElement,De=P.showSearch,Te=P.onSearch,he=P.defaultOpen,ue=P.autoFocus,ie=P.labelInValue,Se=P.value,ne=P.inputValue,ce=P.optionLabelProp,Oe=H==="multiple"||H==="tags",oe=De!==void 0?De:Oe||H==="combobox",q=$||g(re);if(Object(M.a)(H!=="tags"||q.every(function(be){return!be.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var Y=q.some(function(be){return be.options?be.options.some(function(Re){return typeof("value"in Re?Re.value:Re.key)=="number"}):typeof("value"in be?be.value:be.key)=="number"});Object(M.a)(!Y,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(H!=="combobox"||!ce,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(H==="combobox"||!te,"`backfill` only works with `combobox` mode."),Object(M.a)(H==="combobox"||!de,"`getInputElement` only work with `combobox` mode."),Object(M.b)(H!=="combobox"||!de||!ge||!ve,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Te&&!oe&&H!=="combobox"&&H!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!he||ue,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Se!=null){var Z=Object(L.d)(Se);Object(M.a)(!ie||Z.every(function(be){return Object(T.a)(be)==="object"&&("key"in be||"value"in be)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!Oe||Array.isArray(Se),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var ye=null;Object(R.a)(re).some(function(be){if(!y.isValidElement(be)||!be.type)return!1;var Re=be.type;if(Re.isSelectOption)return!1;if(Re.isSelectOptGroup){var Qe=Object(R.a)(be.props.children).every(function(rt){return!y.isValidElement(rt)||!be.type||rt.type.isSelectOption?!0:(ye=rt.type,!1)});return!Qe}return ye=Re,!0}),ye&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ye.displayName||ye.name||ye,"`.")),Object(M.a)(ne===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var V=A,z=Object(E.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:g,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:V,fillOptionsWithMissingValue:x.a}),W=function(P){Object(C.a)($,P);var H=Object(k.a)($);function $(){var re;return Object(N.a)(this,$),re=H.apply(this,arguments),re.selectRef=y.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(v.a)($,[{key:"render",value:function(){return y.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),$}(y.Component);W.Option=f,W.OptGroup=_;var G=W,U=Q.c=G},M8RZ:function(F,Q,j){"use strict";j.d(Q,"a",function(){return p});var N=j("fWQN"),v=j("mtLc"),C=j("yKVA"),k=j("879j"),y=j("cDcd"),m=j.n(y),S=j("faye"),b=j.n(S),p=function(d){Object(C.a)(l,d);var t=Object(k.a)(l);function l(r){var i;Object(N.a)(this,l),i=t.call(this,r);var o=window.document;return i.node=o.createElement("div"),o.body.appendChild(i.node),i}return Object(v.a)(l,[{key:"render",value:function(){var i=this.props.children;return Object(S.createPortal)(i,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),l}(m.a.Component)},MFOe:function(F,Q,j){(function(N){var v=m(),C=S(),k=b(),y=typeof window!="undefined"?window:N;F.exports={assign:v,create:C,trim:k,bind:p,slice:d,each:t,map:l,pluck:r,isList:i,isFunction:o,isObject:s,Global:y};function m(){return Object.assign?Object.assign:function(a,u,f,w){for(var _=1;_=0;s-=1){var c=b.get(s)||new Set;c.forEach(function(a){var u=a.parent,f=a.node;if(d(f)||!a.parent||o.has(a.parent.key))return;if(d(a.parent.node)){o.add(u.key);return}var w=!0,_=!1;(u.children||[]).filter(function(h){return!d(h.node)}).forEach(function(h){var R=h.key,O=t.has(R);w&&!O&&(w=!1),!_&&(O||l.has(R))&&(_=!0)}),w&&t.add(u.key),_&&l.add(u.key),o.add(u.key)})}return{checkedKeys:Array.from(t),halfCheckedKeys:Array.from(v(l,t))}}function y(S,b,p,d,t){for(var l=new Set(S),r=new Set(b),i=0;i<=d;i+=1){var o=p.get(i)||new Set;o.forEach(function(u){var f=u.key,w=u.node,_=u.children,h=_===void 0?[]:_;!l.has(f)&&!r.has(f)&&!t(w)&&h.filter(function(R){return!t(R.node)}).forEach(function(R){l.delete(R.key)})})}r=new Set;for(var s=new Set,c=d;c>=0;c-=1){var a=p.get(c)||new Set;a.forEach(function(u){var f=u.parent,w=u.node;if(t(w)||!u.parent||s.has(u.parent.key))return;if(t(u.parent.node)){s.add(f.key);return}var _=!0,h=!1;(f.children||[]).filter(function(R){return!t(R.node)}).forEach(function(R){var O=R.key,g=l.has(O);_&&!g&&(_=!1),!h&&(g||r.has(O))&&(h=!0)}),_||l.delete(f.key),h&&r.add(f.key),s.add(f.key)})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(v(r,l))}}function m(S,b,p,d){var t=[],l;d?l=d:l=C;var r=new Set(S.filter(function(c){var a=!!p[c];return a||t.push(c),a})),i=new Map,o=0;Object.keys(p).forEach(function(c){var a=p[c],u=a.level,f=i.get(u);f||(f=new Set,i.set(u,f)),f.add(a),o=Math.max(o,u)}),Object(N.a)(!t.length,"Tree missing follow keys: ".concat(t.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var s;return b===!0?s=k(r,i,o,l):s=y(r,b.halfCheckedKeys,i,o,l),s}},OLod:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("K3mO"))})(this,function(N){N.lib.Cipher||function(v){var C=N,k=C.lib,y=k.Base,m=k.WordArray,S=k.BufferedBlockAlgorithm,b=C.enc,p=b.Utf8,d=b.Base64,t=C.algo,l=t.EvpKDF,r=k.Cipher=S.extend({cfg:y.extend(),createEncryptor:function(E,T){return this.create(this._ENC_XFORM_MODE,E,T)},createDecryptor:function(E,T){return this.create(this._DEC_XFORM_MODE,E,T)},init:function(E,T,M){this.cfg=this.cfg.extend(M),this._xformMode=E,this._key=T,this.reset()},reset:function(){S.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function E(T){return typeof T=="string"?x:R}return function(T){return{encrypt:function(M,L,A){return E(L).encrypt(T,M,L,A)},decrypt:function(M,L,A){return E(L).decrypt(T,M,L,A)}}}}()}),i=k.StreamCipher=r.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),o=C.mode={},s=k.BlockCipherMode=y.extend({createEncryptor:function(E,T){return this.Encryptor.create(E,T)},createDecryptor:function(E,T){return this.Decryptor.create(E,T)},init:function(E,T){this._cipher=E,this._iv=T}}),c=o.CBC=function(){var E=s.extend();E.Encryptor=E.extend({processBlock:function(M,L){var A=this._cipher,V=A.blockSize;T.call(this,M,L,V),A.encryptBlock(M,L),this._prevBlock=M.slice(L,L+V)}}),E.Decryptor=E.extend({processBlock:function(M,L){var A=this._cipher,V=A.blockSize,z=M.slice(L,L+V);A.decryptBlock(M,L),T.call(this,M,L,V),this._prevBlock=z}});function T(M,L,A){var V,z=this._iv;z?(V=z,this._iv=v):V=this._prevBlock;for(var W=0;W>>2]&255;E.sigBytes-=T}},f=k.BlockCipher=r.extend({cfg:r.cfg.extend({mode:c,padding:u}),reset:function(){var E;r.reset.call(this);var T=this.cfg,M=T.iv,L=T.mode;this._xformMode==this._ENC_XFORM_MODE?E=L.createEncryptor:(E=L.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,M&&M.words):(this._mode=E.call(L,this,M&&M.words),this._mode.__creator=E)},_doProcessBlock:function(E,T){this._mode.processBlock(E,T)},_doFinalize:function(){var E,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),T.unpad(E)),E},blockSize:128/32}),w=k.CipherParams=y.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),_=C.format={},h=_.OpenSSL={stringify:function(E){var T,M=E.ciphertext,L=E.salt;return L?T=m.create([1398893684,1701076831]).concat(L).concat(M):T=M,T.toString(d)},parse:function(E){var T,M=d.parse(E),L=M.words;return L[0]==1398893684&&L[1]==1701076831&&(T=m.create(L.slice(2,4)),L.splice(0,4),M.sigBytes-=16),w.create({ciphertext:M,salt:T})}},R=k.SerializableCipher=y.extend({cfg:y.extend({format:h}),encrypt:function(E,T,M,L){L=this.cfg.extend(L);var A=E.createEncryptor(M,L),V=A.finalize(T),z=A.cfg;return w.create({ciphertext:V,key:M,iv:z.iv,algorithm:E,mode:z.mode,padding:z.padding,blockSize:E.blockSize,formatter:L.format})},decrypt:function(E,T,M,L){L=this.cfg.extend(L),T=this._parse(T,L.format);var A=E.createDecryptor(M,L).finalize(T.ciphertext);return A},_parse:function(E,T){return typeof E=="string"?T.parse(E,this):E}}),O=C.kdf={},g=O.OpenSSL={execute:function(E,T,M,L){L||(L=m.random(64/8));var A=l.create({keySize:T+M}).compute(E,L),V=m.create(A.words.slice(T),M*4);return A.sigBytes=T*4,w.create({key:A,iv:V,salt:L})}},x=k.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:g}),encrypt:function(E,T,M,L){L=this.cfg.extend(L);var A=L.kdf.execute(M,E.keySize,E.ivSize);L.iv=A.iv;var V=R.encrypt.call(this,E,T,A.key,L);return V.mixIn(A),V},decrypt:function(E,T,M,L){L=this.cfg.extend(L),T=this._parse(T,L.format);var A=L.kdf.execute(M,E.keySize,E.ivSize,T.salt);L.iv=A.iv;var V=R.decrypt.call(this,E,T,A.key,L);return V}})}()})},OZM5:function(F,Q,j){"use strict";j.d(Q,"b",function(){return d}),j.d(Q,"a",function(){return t}),j.d(Q,"k",function(){return l}),j.d(Q,"h",function(){return r}),j.d(Q,"i",function(){return i}),j.d(Q,"g",function(){return o}),j.d(Q,"c",function(){return s}),j.d(Q,"d",function(){return c}),j.d(Q,"j",function(){return f}),j.d(Q,"e",function(){return w}),j.d(Q,"f",function(){return _});var N=j("KQm4"),v=j("U8pU"),C=j("Ff2n"),k=j("cDcd"),y=j.n(k),m=j("Kwbf"),S=j("WaYH"),b=.25,p=2;function d(h,R){var O=h.slice(),g=O.indexOf(R);return g>=0&&O.splice(g,1),O}function t(h,R){var O=h.slice();return O.indexOf(R)===-1&&O.push(R),O}function l(h){return h.split("-")}function r(h,R){return"".concat(h,"-").concat(R)}function i(h){return h&&h.type&&h.type.isTreeNode}function o(h,R){var O=[h],g=R[h];function x(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];E.forEach(function(T){var M=T.key,L=T.children;O.push(M),x(L)})}return x(g.children),O}function s(h,R){var O=h.clientY,g=R.selectHandle.getBoundingClientRect(),x=g.top,E=g.bottom,T=g.height,M=Math.max(T*b,p);return O<=x+M?-1:O>=E-M?1:0}function c(h,R){if(!h)return;var O=R.multiple;return O?h.slice():h.length?[h[0]]:h}var a=function(R){return R};function u(h,R){if(!h)return[];var O=R||{},g=O.processProps,x=g===void 0?a:g,E=Array.isArray(h)?h:[h];return E.map(function(T){var M=T.children,L=Object(C.a)(T,["children"]),A=u(M,R);return y.a.createElement(S.a,Object.assign({},x(L)),A)})}function f(h){if(!h)return null;var R;if(Array.isArray(h))R={checkedKeys:h,halfCheckedKeys:void 0};else if(Object(v.a)(h)==="object")R={checkedKeys:h.checked||void 0,halfCheckedKeys:h.halfChecked||void 0};else return Object(m.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function w(h,R){var O=new Set;function g(x){if(O.has(x))return;var E=R[x];if(!E)return;O.add(x);var T=E.parent,M=E.node;if(M.disabled)return;T&&g(T.key)}return(h||[]).forEach(function(x){g(x)}),Object(N.a)(O)}function _(h){var R={};return Object.keys(h).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(R[O]=h[O])}),R}},Ot1p:function(F,Q,j){"use strict";var N=j("2qtc"),v=j("kLXV"),C=j("rAM+"),k=j("miYZ"),y=j("tsqr"),m=j("9og8"),S=j("tJVT"),b=j("jrin"),p=j("WmNS"),d=j.n(p),t=j("cDcd"),l=j.n(t),r=j("VrN/"),i=j.n(r),o=j("bdgK"),s=j("p77/"),c=j("Bd2K"),a=j("ELLl"),u=j("19Vz"),f=j("lZu9"),w=j("+NIl"),_=j("kSUc"),h=j("9Bee"),R=function(Be){var et=Be.value,ct=et===void 0?"":et,yt=Be.className,ft=Be.showTextOnly,mt=Be.showLines,It=Be.style,At=It===void 0?{}:It,_t=Object(t.useMemo)(function(){return""},[ct]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:_t}}))},O=j("0Owb"),g=j("dejd"),x=j("C+DQ"),E=j("1vsH"),T=j("m3rI"),M=[{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 L(Be){var et=Be.onActionCallback,ct=Be.title,yt=Be.icon,ft=Be.actionName,mt=Be.className,It=mt===void 0?"":mt,At=Be.children;function _t(){et(ft)}return l.a.createElement("a",{title:ct,className:It,onClick:_t},l.a.createElement("i",{className:"md-iconfont ".concat(yt)}),At)}var A=function(Be){var et=Be.watch,ct=Be.showNullButton,yt=Be.onActionCallback,ft=Be.fullScreen,mt=Be.insertTemp,It=Be.hidetoolBar,At=Be.uuid,_t=Be.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(E.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(E.G)("_educoder_session"),"&key=").concat(At,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var Vt=[].concat(M,[{title:"".concat(et?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(et?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!It&&Vt.map(function(Kt,tr){return l.a.createElement("li",{key:tr},Kt.actionName?l.a.createElement(L,Object(O.a)({},Kt,{onActionCallback:yt})):l.a.createElement("span",{className:"v-line"}))}),ct?l.a.createElement("li",null,l.a.createElement(L,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:yt},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,mt&&l.a.createElement("li",null,l.a.createElement(L,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(mt),onActionCallback:yt},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(L,{icon:"".concat(ft?"icon-shrink":"icon-enlarge"),title:ft?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:yt})))},V=j("M8RZ"),z=j("+L6B"),W=j("2/Rp"),G=j("y8nQ"),U=j("Vl3Y"),P=j("5NDa"),H=j("5rEg"),$={labelCol:{span:4},wrapperCol:{span:20}},re=function(Be){var et=Be.callback,ct=Be.onCancel;function yt(ft){et(ft)}return l.a.createElement(U.a,Object(O.a)({},$,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:yt}),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(H.a,null)),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(H.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:ct},"\u53D6\u6D88")))},te=j("7ahc"),ge=j("HmJG"),ve=j("BjJ7"),de=U.a.useForm,De={width:280,marginRight:10},Te={labelCol:{span:5},wrapperCol:{span:19}},he=function(Be){var et=Be.callback,ct=Be.onCancel,yt=de(),ft=Object(S.a)(yt,1),mt=ft[0];function It(Vt){et(Vt)}function At(Vt,Kt){if(Vt.status===-1){y.b.error(Vt.message);return}mt.setFieldsValue({src:"/api/attachments/".concat(Vt.id),type:Kt.type})}function _t(Vt){var Kt=Vt.target.files[0];ie(Kt,At)}return l.a.createElement(U.a,Object(O.a)({form:mt},Te,{className:"upload-image-panel",onFinish:It}),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(H.a,{style:De})),l.a.createElement(ue,{onFileChange:_t}))),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},l.a.createElement(H.a,{style:{width:264}})),l.a.createElement(U.a.Item,{style:{textAlign:"right"}},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:ct},"\u53D6\u6D88")))};function ue(Be){var et=Be.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:et}))}function ie(Be,et){if(!Be)throw new String("\u6CA1\u6709\u6587\u4EF6");var ct=new FormData;ct.append("editormd-image-file",Be),ct.append("file_param_name","editormd-image-file"),ct.append("byxhr","true");var yt=new window.XMLHttpRequest;yt.withCredentials=!0,yt.addEventListener("load",function(ft){et(JSON.parse(ft.target.responseText),Be)},!1),yt.addEventListener("error",function(ft){console.error(ft)},!1),yt.open("POST","".concat(ve.a,"/api/attachments.json")),yt.send(ct)}var Se=j("giR+"),ne=j("fyUT"),ce=j("7Kak"),Oe=j("9yH6"),oe=Oe.a.Group,q={margin:"0 8px"},Y=function(Be){var et=Be.callback,ct=Be.onCancel;function yt(ft){et(ft)}return l.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:yt},l.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},l.a.createElement("span",{style:q},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:q},"\u884C\u6570"),l.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(ne.a,null)),l.a.createElement("span",{style:q},"\u5217\u6570"),l.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(ne.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},l.a.createElement("span",{style:q},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(U.a.Item,{name:"align"},l.a.createElement(oe,null,l.a.createElement(Oe.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Oe.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Oe.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Oe.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:ct},"\u53D6\u6D88")))},Z=j("ErOA"),ye=j("7Cbv"),be="link",Re="upload-image",Qe="code-block",rt="add-table",at="------------",qe={default:at,left:":".concat(at),center:":".concat(at,":"),right:"".concat(at,":")},st=j("9VGf"),lt,je;function Ie(){}var tt=0,ot=1e4,ze="\u2581",Ze=` **\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 Ne(Be){return/^\d+$/.test(Be)?"".concat(Be,"px"):Be}var Ae=navigator.platform.toUpperCase().indexOf("MAC")>=0,Me=Ae?"Cmd":"Ctrl",Ee=["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"],Ce=(lt={},Object(b.a)(lt,Me+"-B","bold"),Object(b.a)(lt,Me+"-I","italic"),lt),ke=(je={},Object(b.a)(je,be,"\u6DFB\u52A0\u94FE\u63A5"),Object(b.a)(je,Qe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(b.a)(je,Re,"\u6DFB\u52A0\u6587\u4EF6"),Object(b.a)(je,rt,"\u6DFB\u52A0\u8868\u683C"),je),Fe=Q.a=function(Be){var et=Be.defaultValue,ct=et===void 0?"":et,yt=Be.onChange,ft=Be.width,mt=ft===void 0?"100%":ft,It=Be.height,At=It===void 0?400:It,_t=Be.miniToolbar,Vt=_t===void 0?!1:_t,Kt=Be.isFocus,tr=Kt===void 0?!1:Kt,rr=Be.watch,Wt=Be.insertTemp,Lt=Be.mode,nr=Lt===void 0?"markdown":Lt,dt=Be.id,Et=dt===void 0?"markdown-editor-id":dt,jt=Be.showResizeBar,kt=jt===void 0?!1:jt,hr=Be.noStorage,Nn=hr===void 0?!1:hr,Ct=Be.showNullButton,Dt=Ct===void 0?!1:Ct,wt=Be.hidetoolBar,wr=wt===void 0?!1:wt,Cr=Be.fullScreen,Jt=Cr===void 0?!1:Cr,Ut=Be.onBlur,Or=Be.onCMBeforeChange,un=Be.onFullScreen,Nr=Be.className,bt=Nr===void 0?"":Nr,Bt=Be.disablePaste,Jr=Bt===void 0?!1:Bt,on=Be.placeholder,Ln=on===void 0?"":on,Sn=Be.values,le=Sn===void 0?"":Sn,K=Object(t.useState)(null),X=Object(S.a)(K,2),ee=X[0],me=X[1],ae=Object(t.useState)(ct),Ke=Object(S.a)(ae,2),pt=Ke[0],Ot=Ke[1],Ht=Object(t.useState)(rr),vt=Object(S.a)(Ht,2),Xt=vt[0],qt=vt[1],Hr=Object(t.useState)(Jt),nn=Object(S.a)(Hr,2),zr=nn[0],or=nn[1],Qr=Object(t.useState)(""),Cn=Object(S.a)(Qr,2),zt=Cn[0],pr=Cn[1],fr=Object(t.useState)(0),jr=Object(S.a)(fr,2),Er=jr[0],li=jr[1],On=Object(t.useState)(At),Ui=Object(S.a)(On,2),Bi=Ui[0],qn=Ui[1],sn=Object(t.useState)(!1),Si=Object(S.a)(sn,2),dn=Si[0],Yn=Si[1],Zr=Object(t.useRef)(Object(ye.a)()),cr=Object(t.useRef)(!1),tn=Object(t.useRef)(),br=Object(t.useRef)(),hn=Object(t.useRef)(),Fr=Object(t.useRef)(),mi=Object(t.useRef)(),_n=function(){var Yt=Object(m.a)(d.a.mark(function sr(){var Qt,gr;return d.a.wrap(function(Kr){for(;;)switch(Kr.prev=Kr.next){case 0:return Kr.next=2,Object(Z.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Zr.current}});case 2:gr=Kr.sent,gr!=null&&(Qt=gr.attachments)!==null&&Qt!==void 0&&Qt.length&&(console.log("cm:",ee,br),gr.attachments.map(function(Ar){Ar.content_type.indexOf("image")>-1?ee.replaceSelection("![,](/api/attachments/".concat(Ar.id,"?type=").concat(Ar.content_type,")")):Ar.content_type.indexOf("video")>-1?ee.replaceSelection('')):Ar.content_type.indexOf("pdf")>-1?ee.replaceSelection('
    ').concat(Ar.name,"")):ee.replaceSelection("[".concat(Ar.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Ar.id,"?type=").concat(Ar.content_type,")"))}));case 4:case"end":return Kr.stop()}},sr)}));return function(){return Yt.apply(this,arguments)}}();Object(t.useEffect)(function(){Ot(le),ee==null||ee.setValue(le)},[le]),Object(t.useEffect)(function(){un==null||un(zr)},[zr]),Object(t.useEffect)(function(){if(br.current){var Yt=i.a.fromTextArea(br.current,{mode:nr,lineNumbers:!Vt,lineWrapping:!0,value:ct,autoCloseTags:!0,autoCloseBrackets:!0});tr&&Yt.focus();function sr(Qt,gr){if(Jr){gr.preventDefault();return}var Lr=gr.clipboardData;if(Lr){var Kr=Lr.types.toString(),Ar=Lr.items;if(Kr==="Files"||Lr.types.indexOf("Files")>-1){if(gr.preventDefault(),nr=="stex")return;try{var gn,$n=Ar[1];((gn=Ar[0])===null||gn===void 0?void 0:gn.kind)==="file"&&($n=Ar[0]);var xr=$n.getAsFile(),Ei=xr.name.split(".").pop();ie(xr,function(Vr){if(Vr.id){var jn,Bn,gi;(xr==null||((jn=xr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?Yt.replaceSelection("![,](/api/attachments/".concat(Vr.id,"?type=").concat(Vr.content_type,")")):(xr==null||((Bn=xr.type)===null||Bn===void 0)?void 0:Bn.indexOf("video"))>-1?Yt.replaceSelection('')):(xr==null||((gi=xr.type)===null||gi===void 0)?void 0:gi.indexOf("pdf"))>-1?Yt.replaceSelection('').concat(xr.name,"")):Ee.includes(Ei)?Yt.replaceSelection('').concat(xr.name,"")):Yt.replaceSelection("[".concat(xr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,"?type=").concat(Vr.content_type,")"))}else(Vr==null?void 0:Vr.status)===401&&(document.location.href="/user/login")})}catch(Vr){y.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Yt.on("paste",sr),Yt.on("dragleave",function(Qt,gr){hn.current.classList.remove("mouse-hover-md")}),Yt.on("dragover",function(Qt,gr){hn.current.classList.add("mouse-hover-md")}),Yt.on("drop",function(Qt,gr){hn.current.classList.add("mouse-hover-md");var Lr;if(Lr=gr.dataTransfer.files,Lr.length>0){gr.preventDefault(),gr.stopPropagation();for(var Kr=function($n){var xr=Lr[$n],Ei=xr.name.split(".").pop();ie(xr,function(Vr){if(Vr.id){var jn,Bn,gi;(xr==null||((jn=xr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?Yt.replaceSelection("![,](/api/attachments/".concat(Vr.id,"?type=").concat(Vr.content_type,")")):(xr==null||((Bn=xr.type)===null||Bn===void 0)?void 0:Bn.indexOf("video"))>-1?Yt.replaceSelection('')):(xr==null||((gi=xr.type)===null||gi===void 0)?void 0:gi.indexOf("pdf"))>-1?Yt.replaceSelection('').concat(xr.name,"")):Ee.includes(Ei)?Yt.replaceSelection('').concat(xr.name,"")):Yt.replaceSelection("[".concat(xr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,"?type=").concat(Vr.content_type,")"))}else(Vr==null?void 0:Vr.status)===401&&(document.location.href="/user/login")})},Ar=0;Ar0||Ar.target.offsetWidth>0)&&(Un(),ee.setSize("100%","100%"),ee.refresh())}}catch(gn){Lr.e(gn)}finally{Lr.f()}});return Qt.observe(br.current.parentElement),Qt}if(ee){var sr=Yt();return function(){sr.unobserve(br.current.parentElement)}}},[ee,Un]),Object(t.useEffect)(function(){if(ee){for(var Yt=[],sr=function(){var Ar=gr[Qt];Lr=Object(S.a)(Ar,2);var gn=Lr[0],$n=Lr[1],xr=Object(b.a)({},gn,function(){Di($n)});Yt.push(xr),ee.addKeyMap(xr)},Qt=0,gr=Object.entries(Ce);Qt0){var Yt=new Date().getTime(),sr=window.sessionStorage.getItem(Et);Yt>=Er+ot&&(!sr||sr!==pt)&&(window.sessionStorage.setItem(Et,pt),Yn(!0))}},ot),Object(t.useEffect)(function(){qt(rr)},[ee,rr]),Object(t.useEffect)(function(){ee&&(tr&&ee.focus())},[ee,tr]),Object(t.useEffect)(function(){if(Xt&&ee){var Yt=ee.getScrollerElement();function sr(Qt){var gr=Qt.target;if(mi.current){var Lr=gr.scrollTop/gr.scrollHeight;mi.current.scrollTop=mi.current.scrollHeight*Lr}}return Yt.addEventListener("scroll",sr),function(){Yt.removeEventListener("scroll",sr)}}},[ee,Xt]),Object(t.useEffect)(function(){if(ee&&Or){function Yt(sr,Qt){Or(sr,Qt)}return ee.on("beforeChange",Yt),function(){ee.off("beforeChange",Yt)}}},[ee,Or]),Object(t.useEffect)(function(){if(ee&&Ut){function Yt(){Ut(ee.getValue())}return ee.on("blur",Yt),function(){ee.off("blur",Yt)}}},[ee,Ut]),Object(t.useEffect)(function(){if(ee){function Yt(sr){var Qt=sr.getValue();Ot(Qt),li(new Date().getTime()),sr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),yt&&yt(Qt)}return ee.on("change",Yt),function(){ee.off("change",Yt)}}},[ee,yt]),Object(t.useEffect)(function(){ee&&(ct==null?(ee.setValue(""),Ot("")):ct!==ee.getValue()&&(ee.setValue(ct),Ot(ct),ee.setCursor(ee.lineCount(),0)))},[ee,ct]);var Di=Object(t.useCallback)(function(Yt){var sr=ee.getCursor(),Qt=ee.getSelection(),gr=Qt.split(` `);switch(Yt){case"bold":return ee.replaceSelection("**"+Qt+"**"),Qt===""&&ee.setCursor(sr.line,sr.ch+2),ee.focus();case"italic":return ee.replaceSelection("*"+Qt+"*"),Qt===""&&ee.setCursor(sr.line,sr.ch+1),ee.focus();case"code":return ee.replaceSelection("`"+Qt+"`"),Qt===""&&ee.setCursor(sr.line,sr.ch+1),ee.focus();case"inline-latex":return ee.replaceSelection("`$$"+Qt+"$$`"),Qt===""&&ee.setCursor(sr.line,sr.ch+3),ee.focus();case"latex":return ee.replaceSelection("```latex\n"+Qt+"\n```"),ee.setCursor(sr.line+1,Qt.length+1),ee.focus();case"line-break":return ee.replaceSelection(`
    `),ee.focus();case"list-ul":return Qt===""?ee.replaceSelection("- "+Qt):ee.replaceSelection(gr.map(function(Lr){return Lr===""?"":"- ".concat(Lr)}).join(` `)),ee.focus();case"list-ol":return Qt===""?ee.replaceSelection("1. "+Qt):ee.replaceSelection(gr.map(function(Lr,Kr){return Lr===""?"":"".concat(Kr+1,". ").concat(Lr)}).join(` `)),ee.focus();case"add-null-ch":return Qt===""&&ee.setCursor(sr.line,sr.ch+1),ee.replaceSelection(ze),ee.focus();case"inster-template-1":return Qt===""&&ee.setCursor(sr.line,sr.ch),ee.replaceSelection(Ze),ee.focus();case"eraser":return ee.setValue(""),ee.focus();case"trigger-watch":return qt(!Xt),ee.focus();case"trigger-full-screen":return or(!zr),ee.focus();case be:pr(be);return;case Qe:pr(Qe);return;case Re:pr(Re);return;case rt:pr(rt);return;default:throw new Error}},[ee,Xt,zr]),ui=Object(t.useCallback)(function(Yt){pr("");switch(zt){case be:var sr=Yt.title,Qt=Yt.link;return ee.replaceSelection("[".concat(sr,"](").concat(Qt,")")),ee.focus();case Qe:var gr=Yt.language,Lr=Yt.content;return ee.replaceSelection(["```"+gr,Lr,"```"].join(` `)),ee.focus();case Re:var Kr=Yt.src,Ar=Yt.alt;return Ar?ee.replaceSelection("![ ".concat(Ar," ]( ").concat(Kr,' "').concat(Ar,'" )')):ee.replaceSelection("![,](".concat(Kr,")")),ee.focus();case rt:for(var gn=Yt.row,$n=Yt.col,xr=Yt.align,Ei=` `,Vr=0;Vr300&&(gn=300);var $n=At+gn+"px";qn($n)}}return Yt.addEventListener("mousedown",gr),document.addEventListener("mousemove",Kr),document.addEventListener("mouseup",Lr),function(){Yt.removeEventListener("mousedown",gr),document.removeEventListener("mousemove",Kr),document.removeEventListener("mouseup",Lr)}}},[ee,Fr]),Object(t.useEffect)(function(){qn(At)},[At]);var ti=Ne(mt),ji=Ne(Bi),ci={width:ti,height:ji},_i=Object(t.useMemo)(function(){if(Er){var Yt=new Date(Er),sr=Yt.getHours(),Qt=Yt.getMinutes(),gr=Yt.getSeconds();return sr=sr<10?"0"+sr:sr,Qt=Qt<10?"0"+Qt:Qt,gr=gr<10?"0"+gr:gr,"".concat(sr,":").concat(Qt,":").concat(gr)}return 0},[Er]);function Hi(){window.sessionStorage.removeItem(Et),Yn(!1),li(0)}function di(){Yn(!1),li(0),ee.setValue(window.sessionStorage.getItem(Et))}function qr(Yt,sr){var Qt=ee.getValue();Qt=Qt.replace(Yt,sr),Ot(Qt),ee==null||ee.setValue(Qt)}return l.a.createElement(t.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:hn},l.a.createElement("div",{className:"markdown-editor-container ".concat(bt," ").concat(Xt?"on-preview":""," ").concat(Vt?"mini":""," ").concat(zr?"full-screen":""),style:ci},l.a.createElement(A,{insertTemp:Wt,watch:Xt,fullScreen:zr,showNullButton:Dt,onActionCallback:Di,hidetoolBar:wr,uuid:Zr.current,setOpenPhones:function(){cr.current=!0}}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:br,placeholder:Ln})),Xt?l.a.createElement("div",{ref:mi,className:"preview-container"},nr==="stex"&&l.a.createElement(R,{value:pt}),nr!=="stex"&&l.a.createElement(h.a,{edit:!0,value:pt,replaces:qr})):null))),kt?l.a.createElement("a",{ref:Fr,className:"editor-resize"}):null,l.a.createElement(V.a,null,ke[zt]?l.a.createElement(v.a,{centered:!0,title:ke[zt],visible:!0,onCancel:ei,footer:null,className:"markdown-popup-form"},bi):null))}},PD8m:function(F,Q){F.exports={name:"memoryStorage",read:N,write:v,each:C,remove:k,clearAll:y};var j={};function N(m){return j[m]}function v(m,S){j[m]=S}function C(m){for(var S in j)j.hasOwnProperty(S)&&m(j[S],S)}function k(m){delete j[m]}function y(m){j={}}},PVpz:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.StreamCipher,y=v.algo,m=[],S=[],b=[],p=y.RabbitLegacy=k.extend({_doReset:function(){var t=this._key.words,l=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,t[0]&4294901760|t[1]&65535,t[3]<<16|t[3]>>>16,t[1]&4294901760|t[2]&65535,t[0]<<16|t[0]>>>16,t[2]&4294901760|t[3]&65535,t[1]<<16|t[1]>>>16,t[3]&4294901760|t[0]&65535];this._b=0;for(var o=0;o<4;o++)d.call(this);for(var o=0;o<8;o++)i[o]^=r[o+4&7];if(l){var s=l.words,c=s[0],a=s[1],u=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,f=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,w=u>>>16|f&4294901760,_=f<<16|u&65535;i[0]^=u,i[1]^=w,i[2]^=f,i[3]^=_,i[4]^=u,i[5]^=w,i[6]^=f,i[7]^=_;for(var o=0;o<4;o++)d.call(this)}},_doProcessBlock:function(t,l){var r=this._X;d.call(this),m[0]=r[0]^r[5]>>>16^r[3]<<16,m[1]=r[2]^r[7]>>>16^r[5]<<16,m[2]=r[4]^r[1]>>>16^r[7]<<16,m[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)m[i]=(m[i]<<8|m[i]>>>24)&16711935|(m[i]<<24|m[i]>>>8)&4278255360,t[l+i]^=m[i]},blockSize:128/32,ivSize:64/32});function d(){for(var t=this._X,l=this._C,r=0;r<8;r++)S[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0>>0?1:0)|0,this._b=l[7]>>>0>>0?1:0;for(var r=0;r<8;r++){var i=t[r]+l[r],o=i&65535,s=i>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,a=((i&4294901760)*i|0)+((i&65535)*i|0);b[r]=c^a}t[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,t[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,t[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,t[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,t[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,t[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,t[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,t[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}v.RabbitLegacy=k._createHelper(p)}(),N.RabbitLegacy})},RELg:function(F,Q,j){var N=j("MFOe"),v=N.Global;F.exports={name:"oldIE-userDataStorage",write:S,read:b,each:p,remove:d,clearAll:t};var C="storejs",k=v.document,y=i(),m=(v.navigator?v.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function S(o,s){if(m)return;var c=r(o);y(function(a){a.setAttribute(c,s),a.save(C)})}function b(o){if(m)return;var s=r(o),c=null;return y(function(a){c=a.getAttribute(s)}),c}function p(o){y(function(s){for(var c=s.XMLDocument.documentElement.attributes,a=c.length-1;a>=0;a--){var u=c[a];o(s.getAttribute(u.name),u.name)}})}function d(o){var s=r(o);y(function(c){c.removeAttribute(s),c.save(C)})}function t(){y(function(o){var s=o.XMLDocument.documentElement.attributes;o.load(C);for(var c=s.length-1;c>=0;c--)o.removeAttribute(s[c].name);o.save(C)})}var l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function r(o){return o.replace(/^\d/,"___$&").replace(l,"___")}function i(){if(!k||!k.documentElement||!k.documentElement.addBehavior)return null;var o="script",s,c,a;try{c=new ActiveXObject("htmlfile"),c.open(),c.write("<"+o+">document.w=window'),c.close(),s=c.w.frames[0].document,a=s.createElement("div")}catch(u){a=k.createElement("div"),s=k.body}return function(u){var f=[].slice.call(arguments,0);f.unshift(a),s.appendChild(a),a.addBehavior("#default#userData"),a.load(C),u.apply(this,f),s.removeChild(a);return}}},S6kV:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.OFB=function(){var v=N.lib.BlockCipherMode.extend(),C=v.Encryptor=v.extend({processBlock:function(k,y){var m=this._cipher,S=m.blockSize,b=this._iv,p=this._keystream;b&&(p=this._keystream=b.slice(0),this._iv=void 0),m.encryptBlock(p,0);for(var d=0;d|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(oe){for(var q=0,Y=!1,Z=!1,ye=0,be=oe.length;ye122||(Ee<65||Me>90||tt.push([Math.max(65,Me)|32,Math.min(Ee,90)|32]),Ee<97||Me>122||tt.push([Math.max(97,Me)&~32,Math.min(Ee,122)&~32]))}}tt.sort(function(Be,et){return Be[0]-et[0]||et[1]-Be[1]});for(var Ce=[],ke=[],Ze=0;ZeFe[0]&&(Fe[1]+1>Fe[0]&&ze.push("-"),ze.push(at(Fe[1])))}return ze.push("]"),ze.join("")}function st(je){for(var Ie=je.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")),tt=Ie.length,ot=[],ze=0,Ze=0;ze=2&&Me==="["?Ie[ze]=qe(Ne):Me!=="\\"&&(Ie[ze]=Ne.replace(/[a-zA-Z]/g,function(ke){var Fe=ke.charCodeAt(0);return"["+String.fromCharCode(Fe&~32,Fe|32)+"]"}))}return Ie.join("")}for(var lt=[],ye=0,be=oe.length;ye=0;)Y[lt.charAt(je)]=st;var Ie=st[1],tt=""+Ie;rt.hasOwnProperty(tt)||(Qe.push(Ie),rt[tt]=null)}Qe.push(/[\0-\uffff]/),Z=U(Qe)})();var ye=q.length,be=function(Re){for(var Qe=Re.sourceCode,rt=Re.basePos,at=Re.sourceNode,qe=[rt,T],st=0,lt=Qe.match(Z)||[],je={},Ie=0,tt=lt.length;Ie=5&&ze.substring(0,5)==="lang-",Ne&&!(Ze&&typeof Ze[1]=="string")&&(Ne=!1,ze=A),Ne||(je[ot]=ze)}var Ee=st;if(st+=ot.length,!Ne)qe.push(rt+Ee,ze);else{var Ce=Ze[1],ke=ot.indexOf(Ce),Fe=ke+Ce.length;Ze[2]&&(Fe=ot.length-Ze[2].length,ke=Fe-Ce.length);var Be=ze.substring(5);H(at,rt+Ee,ot.substring(0,ke),be,qe),H(at,rt+Ee+ke,Ce,ue(Be,Ce),qe),H(at,rt+Ee+Fe,ot.substring(Fe),be,qe)}}Re.decorations=qe};return be}function ge(oe){var q=[],Y=[];oe.tripleQuotedStrings?q.push([h,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):oe.multiLineStrings?q.push([h,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):q.push([h,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),oe.verbatimStrings&&Y.push([h,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Z=oe.hashComments;Z&&(oe.cStyleComments?(Z>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,"#"]),Y.push([h,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):q.push([O,/^#[^\r\n]*/,null,"#"])),oe.cStyleComments&&(Y.push([O,/^\/\/[^\r\n]*/,null]),Y.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ye=oe.regexLiterals;if(ye){var be=ye>1?"":` \r`,Re=be?".":"[\\S\\s]",Qe="/(?=[^/*"+be+"])(?:[^/\\x5B\\x5C"+be+"]|\\x5C"+Re+"|\\x5B(?:[^\\x5C\\x5D"+be+"]|\\x5C"+Re+")*(?:\\x5D|$))+/";Y.push(["lang-regex",RegExp("^"+G+"("+Qe+")")])}var rt=oe.types;rt&&Y.push([g,rt]);var at=(""+oe.keywords).replace(/^ | $/g,"");at.length&&Y.push([R,new RegExp("^(?:"+at.replace(/[\s,]+/g,"|")+")\\b"),null]),q.push([T,/^\s+/,null,` \r \xA0`]);var qe="^.[^\\s\\w.$@'\"`/\\\\]*";return oe.regexLiterals&&(qe+="(?!s*/)"),Y.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[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"],[T,/^\\[\s\S]?/,null],[E,new RegExp(qe),null]),te(q,Y)}var ve=ge({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function de(oe,q,Y){for(var Z=/(?:^|\s)nocode(?:\s|$)/,ye=/\r\n?|\n/,be=oe.ownerDocument,Re=be.createElement("li");oe.firstChild;)Re.appendChild(oe.firstChild);var Qe=[Re];function rt(Ie){var tt=Ie.nodeType;if(tt==1&&!Z.test(Ie.className))if(Ie.nodeName==="br")at(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var ot=Ie.firstChild;ot;ot=ot.nextSibling)rt(ot);else if((tt==3||tt==4)&&Y){var ze=Ie.nodeValue,Ze=ze.match(ye);if(Ze){var Ne=ze.substring(0,Ze.index);Ie.nodeValue=Ne;var Ae=ze.substring(Ze.index+Ze[0].length);if(Ae){var Me=Ie.parentNode;Me.insertBefore(be.createTextNode(Ae),Ie.nextSibling)}at(Ie),Ne||Ie.parentNode.removeChild(Ie)}}}function at(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function tt(Ze,Ne){var Ae=Ne?Ze.cloneNode(!1):Ze,Me=Ze.parentNode;if(Me){var Ee=tt(Me,1),Ce=Ze.nextSibling;Ee.appendChild(Ae);for(var ke=Ce;ke;ke=Ce)Ce=ke.nextSibling,Ee.appendChild(ke)}return Ae}for(var ot=tt(Ie.nextSibling,0),ze;(ze=ot.parentNode)&&ze.nodeType===1;)ot=ze;Qe.push(ot)}for(var qe=0;qe=Me&&(rt+=2),be>=Ee&&(st+=2)}}finally{ze&&(ze.style.display=Ze)}}var Te={};function he(oe,q){for(var Y=q.length;--Y>=0;){var Z=q[Y];Te.hasOwnProperty(Z)?b.console&&console.warn("cannot override language handler %s",Z):Te[Z]=oe}}function ue(oe,q){return oe&&Te.hasOwnProperty(oe)||(oe=/^\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"]),he(te([[T,/^[\s]+/,null,` \r `],[z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[V,/^(?!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"]),he(te([],[[z,/^[\s\S]+/]]),["uq.val"]),he(ge({keywords:l,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),he(ge({keywords:"null,true,false"}),["json"]),he(ge({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),he(ge({keywords:r,cStyleComments:!0}),["java"]),he(ge({keywords:f,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),he(ge({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),he(ge({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),he(ge({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),he(ge({keywords:s,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),he(ge({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),he(te([],[[h,/^[\s\S]+/]]),["regex"]);function ie(oe){var q=oe.langExtension;try{var Y=P(oe.sourceNode,oe.pre),Z=Y.sourceCode;oe.sourceCode=Z,oe.spans=Y.spans,oe.basePos=0,ue(q,Z)(oe),De(oe)}catch(ye){b.console&&console.log(ye&&ye.stack||ye)}}function Se(oe,q,Y){var Z=Y||!1,ye=q||null,be=document.createElement("div");be.innerHTML="
    "+oe+"
    ",be=be.firstChild,Z&&de(be,Z,!0);var Re={langExtension:ye,numberLines:Z,sourceNode:be,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ie(Re),be.innerHTML}function ne(oe,q){var Y=q||document.body,Z=Y.ownerDocument||document;function ye(Ae){return Y.getElementsByTagName(Ae)}for(var be=[ye("pre"),ye("code"),ye("xmp")],Re=[],Qe=0;Qe=0;i--)if(this.__items[i].match(r))return!0;return!1},d.prototype.set_indent=function(r,i){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(r){this.__items.push(r);var i=r.lastIndexOf(` `);i!==-1?this.__character_count=r.length-i:this.__character_count+=r.length},d.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function t(r,i){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),i=i||"",r.indent_level>0&&(i=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}t.prototype.get_indent_size=function(r,i){var o=this.__base_string_length;return i=i||0,r<0&&(o=0),o+=r*this.__indent_size,o+=i,o},t.prototype.get_indent_string=function(r,i){var o=this.__base_string;return i=i||0,r<0&&(r=0,o=""),i+=r*this.__indent_size,this.__ensure_cache(i),o+=this.__cache[i],o},t.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var r=this.__cache.length,i=0,o="";this.__indent_size&&r>=this.__indent_size&&(i=Math.floor(r/this.__indent_size),r-=i*this.__indent_size,o=new Array(i+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function l(r,i){this.__indent_cache=new t(r,i),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(r,i){return this.__indent_cache.get_indent_string(r,i)},l.prototype.get_indent_size=function(r,i){return this.__indent_cache.get_indent_size(r,i)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(r){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===` `&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(` `);return r!==` `&&(o=o.replace(/[\n]/g,r)),o},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(r,i){return r=r||0,i=i||0,this.next_line.set_indent(r,i),this.__lines.length>1?(this.current_line.set_indent(r,i),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(r){for(var i=0;i1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(r,i){for(var o=this.__lines.length-2;o>=0;){var s=this.__lines[o];if(s.is_empty())break;if(s.item(0).indexOf(r)!==0&&s.item(-1)!==i){this.__lines.splice(o+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},p.exports.Output=l},,,,function(p){function d(r,i){this.raw_options=t(r,i),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}d.prototype._get_array=function(r,i){var o=this.raw_options[r],s=i||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(s=o.concat()):typeof o=="string"&&(s=o.split(/[^a-zA-Z0-9_\/\-]+/)),s},d.prototype._get_boolean=function(r,i){var o=this.raw_options[r],s=o===void 0?!!i:!!o;return s},d.prototype._get_characters=function(r,i){var o=this.raw_options[r],s=i||"";return typeof o=="string"&&(s=o.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),s},d.prototype._get_number=function(r,i){var o=this.raw_options[r];i=parseInt(i,10),isNaN(i)&&(i=0);var s=parseInt(o,10);return isNaN(s)&&(s=i),s},d.prototype._get_selection=function(r,i,o){var s=this._get_selection_list(r,i,o);if(s.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values: `+i+` You passed in: '`+this.raw_options[r]+"'");return s[0]},d.prototype._get_selection_list=function(r,i,o){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[i[0]],!this._is_valid_selection(o,i))throw new Error("Invalid Default Value!");var s=this._get_array(r,o);if(!this._is_valid_selection(s,i))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values: `+i+` You passed in: '`+this.raw_options[r]+"'");return s},d.prototype._is_valid_selection=function(r,i){return r.length&&i.length&&!r.some(function(o){return i.indexOf(o)===-1})};function t(r,i){var o={};r=l(r);var s;for(s in r)s!==i&&(o[s]=r[s]);if(i&&r[i])for(s in r[i])o[s]=r[i][s];return o}function l(r){var i={},o;for(o in r){var s=o.replace(/-/g,"_");i[s]=r[o]}return i}p.exports.Options=d,p.exports.normalizeOpts=l,p.exports.mergeOpts=t},,function(p){var d=RegExp.prototype.hasOwnProperty("sticky");function t(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position=0&&l=0&&r=l.length&&this.__input.substring(r-l.length,r).toLowerCase()===l},p.exports.InputScanner=t},,,,,function(p){function d(t,l){t=typeof t=="string"?t:t.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+l,"g")}d.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(t);r;)l[r[1]]=r[2],r=this.__directive_pattern.exec(t);return l},d.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},p.exports.Directives=d},,function(p,d,t){var l=t(16).Beautifier,r=t(17).Options;function i(o,s){var c=new l(o,s);return c.beautify()}p.exports=i,p.exports.defaultOptions=function(){return new r}},function(p,d,t){var l=t(17).Options,r=t(2).Output,i=t(8).InputScanner,o=t(13).Directives,s=new o(/\/\*/,/\*\//),c=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,u=/\s/,f=/(?:\s|\n)+/g,w=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function h(R,O){this._source_text=R||"",this._options=new l(O),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}h.prototype.eatString=function(R){var O="";for(this._ch=this._input.next();this._ch;){if(O+=this._ch,this._ch==="\\")O+=this._input.next();else if(R.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return O},h.prototype.eatWhitespace=function(R){for(var O=u.test(this._input.peek()),g=0;u.test(this._input.peek());)this._ch=this._input.next(),R&&this._ch===` `&&((g===0||g0&&this._indentLevel--},h.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R=this._source_text,O=this._options.eol;O==="auto"&&(O=` `,R&&c.test(R||"")&&(O=R.match(c)[0])),R=R.replace(a,` `);var g=R.match(/^[\t ]*/)[0];this._output=new r(this._options,g),this._input=new i(R),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var x=0,E=!1,T=!1,M=!1,L=!1,A=!1,V=!1,z=this._ch,W=!1,G,U,P;G=this._input.read(f),U=G!=="",P=z,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),z=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var H=this._input.read(w),$=s.get_directives(H);$&&$.ignore==="start"&&(H+=s.readIgnored(this._input)),this.print_string(H),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(_)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var re=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);re.match(/[ :]$/)&&(re=this.eatString(": ").replace(/\s$/,""),this.print_string(re),this._output.space_before_token=!0),re=re.replace(/\s$/,""),re==="extend"?L=!0:re==="import"&&(A=!0),re in this.NESTED_AT_RULE?(this._nestedLevel+=1,re in this.CONDITIONAL_GROUP_RULE&&(M=!0)):!E&&x===0&&re.indexOf(":")!==-1&&(T=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")T&&(T=!1,this.outdent()),M?(M=!1,E=this._indentLevel>=this._nestedLevel):E=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&E&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(P==="("?this._output.space_before_token=!1:P!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),P==="{"&&this._output.trim(!0),A=!1,L=!1,T&&(this.outdent(),T=!1),this.print_string(this._ch),E=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var te=0;te"||this._ch==="+"||this._ch==="~")&&!T&&x===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&u.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),u.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var de=P==='"'||P==="'";this.preserveSingleSpace(de||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&W&&this._output.add_new_line()}var De=this._output.get_code(O);return De},p.exports.Beautifier=h},function(p,d,t){var l=t(6).Options;function r(i){l.call(this,i,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var c=0;c=15&&(l=!1,p=!0);var h=u&&(d||l&&(_==null||_<12.11)),R=C||S&&b>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var g=function(e,n){var D=e.className,I=O(n).exec(D);if(I){var B=D.slice(I.index+I[0].length);e.className=D.slice(0,I.index)+(B?I[1]+B:"")}};function x(e){for(var n=e.childNodes.length;n>0;--n)e.removeChild(e.firstChild);return e}function E(e,n){return x(e).appendChild(n)}function T(e,n,D,I){var B=document.createElement(e);if(D&&(B.className=D),I&&(B.style.cssText=I),typeof n=="string")B.appendChild(document.createTextNode(n));else if(n)for(var J=0;J=n)return se+(n-J);se+=fe-J,se+=D-se%D,J=fe+1}}var $=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};$.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},$.prototype.set=function(e,n){this.f=n;var D=+new Date+e;(!this.id||D=n)return I+Math.min(se,n-B);if(B+=J-I,B+=D-B%D,I=J+1,B>=n)return I}}var he=[""];function ue(e){for(;he.length<=e;)he.push(ie(he)+" ");return he[e]}function ie(e){return e[e.length-1]}function Se(e,n){for(var D=[],I=0;I"\x80"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function Y(e,n){return n?n.source.indexOf("\\w")>-1&&q(e)?!0:n.test(e):q(e)}function Z(e){for(var n in e)if(e.hasOwnProperty(n)&&e[n])return!1;return!0}var ye=/[\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 be(e){return e.charCodeAt(0)>=768&&ye.test(e)}function Re(e,n,D){for(;(D<0?n>0:nD?-1:1;;){if(n==D)return n;var B=(n+D)/2,J=I<0?Math.ceil(B):Math.floor(B);if(J==n)return e(J)?n:D;e(J)?D=J:n=J+I}}function rt(e,n,D,I){if(!e)return I(n,D,"ltr",0);for(var B=!1,J=0;Jn||n==D&&se.to==n)&&(I(Math.max(se.from,n),Math.min(se.to,D),se.level==1?"rtl":"ltr",J),B=!0)}B||I(n,D,"ltr")}var at=null;function qe(e,n,D){var I;at=null;for(var B=0;Bn)return B;J.to==n&&(J.from!=J.to&&D=="before"?I=B:at=B),J.from==n&&(J.from!=J.to&&D!="before"?I=B:at=B)}return I!=null?I:at}var st=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(xe){return xe<=247?e.charAt(xe):1424<=xe&&xe<=1524?"R":1536<=xe&&xe<=1785?n.charAt(xe-1536):1774<=xe&&xe<=2220?"r":8192<=xe&&xe<=8203?"w":xe==8204?"b":"L"}var I=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,B=/[stwN]/,J=/[LRr]/,se=/[Lb1n]/,fe=/[1n]/;function pe(xe,We,Ve){this.level=xe,this.from=We,this.to=Ve}return function(xe,We){var Ve=We=="ltr"?"L":"R";if(xe.length==0||We=="ltr"&&!I.test(xe))return!1;for(var ut=xe.length,it=[],gt=0;gt-1&&(I[n]=B.slice(0,J).concat(B.slice(J+1)))}}}function ze(e,n){var D=tt(e,n);if(!D.length)return;for(var I=Array.prototype.slice.call(arguments,2),B=0;B0}function Me(e){e.prototype.on=function(n,D){Ie(this,n,D)},e.prototype.off=function(n,D){ot(this,n,D)}}function Ee(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Fe(e){Ee(e),Ce(e)}function Be(e){return e.target||e.srcElement}function et(e){var n=e.which;return n==null&&(e.button&1?n=1:e.button&2?n=3:e.button&4&&(n=2)),u&&e.ctrlKey&&n==1&&(n=3),n}var ct=function(){if(S&&b<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),yt;function ft(e){if(yt==null){var n=T("span","\u200B");E(e,T("span",[n,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(yt=n.offsetWidth<=1&&n.offsetHeight>2&&!(S&&b<8))}var D=yt?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var mt;function It(e){if(mt!=null)return mt;var n=E(e,document.createTextNode("A\u062EA")),D=L(n,0,1).getBoundingClientRect(),I=L(n,1,2).getBoundingClientRect();return x(e),!D||D.left==D.right?!1:mt=I.right-D.right<3}var At=` b`.split(/\n/).length!=3?function(e){for(var n=0,D=[],I=e.length;n<=I;){var B=e.indexOf(` `,n);B==-1&&(B=e.length);var J=e.slice(n,e.charAt(B-1)=="\r"?B-1:B),se=J.indexOf("\r");se!=-1?(D.push(J.slice(0,se)),n+=se+1):(D.push(J),n=B+1)}return D}:function(e){return e.split(/\r\n?|\n/)},_t=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(n){return!1}}:function(e){var n;try{n=e.ownerDocument.selection.createRange()}catch(D){}return!n||n.parentElement()!=e?!1:n.compareEndPoints("StartToEnd",n)!=0},Vt=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Kt=null;function tr(e){if(Kt!=null)return Kt;var n=E(e,T("span","x")),D=n.getBoundingClientRect(),I=L(n,0,1).getBoundingClientRect();return Kt=Math.abs(D.left-I.left)>1}var rr={},Wt={};function Lt(e,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),rr[e]=n}function nr(e,n){Wt[e]=n}function dt(e){if(typeof e=="string"&&Wt.hasOwnProperty(e))e=Wt[e];else if(e&&typeof e.name=="string"&&Wt.hasOwnProperty(e.name)){var n=Wt[e.name];typeof n=="string"&&(n={name:n}),e=Oe(n,e),e.name=n.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return dt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return dt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Et(e,n){n=dt(n);var D=rr[n.name];if(!D)return Et(e,"text/plain");var I=D(e,n);if(jt.hasOwnProperty(n.name)){var B=jt[n.name];for(var J in B){if(!B.hasOwnProperty(J))continue;I.hasOwnProperty(J)&&(I["_"+J]=I[J]),I[J]=B[J]}}if(I.name=n.name,n.helperType&&(I.helperType=n.helperType),n.modeProps)for(var se in n.modeProps)I[se]=n.modeProps[se];return I}var jt={};function kt(e,n){var D=jt.hasOwnProperty(e)?jt[e]:jt[e]={};P(n,D)}function hr(e,n){if(n===!0)return n;if(e.copyState)return e.copyState(n);var D={};for(var I in n){var B=n[I];B instanceof Array&&(B=B.concat([])),D[I]=B}return D}function Nn(e,n){for(var D;e.innerMode&&!(D=e.innerMode(n),!D||D.mode==e);)n=D.state,e=D.mode;return D||{mode:e,state:n}}function Ct(e,n,D){return e.startState?e.startState(n,D):!0}var Dt=function(e,n,D){this.pos=this.start=0,this.string=e,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};Dt.prototype.eol=function(){return this.pos>=this.string.length},Dt.prototype.sol=function(){return this.pos==this.lineStart},Dt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Dt.prototype.next=function(){if(this.posn},Dt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Dt.prototype.skipToEnd=function(){this.pos=this.string.length},Dt.prototype.skipTo=function(e){var n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0},Dt.prototype.backUp=function(e){this.pos-=e},Dt.prototype.column=function(){return this.lastColumnPos0?null:(J&&n!==!1&&(this.pos+=J[0].length),J)}},Dt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Dt.prototype.hideFirstChars=function(e,n){this.lineStart+=e;try{return n()}finally{this.lineStart-=e}},Dt.prototype.lookAhead=function(e){var n=this.lineOracle;return n&&n.lookAhead(e)},Dt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function wt(e,n){if(n-=e.first,n<0||n>=e.size)throw new Error("There is no line "+(n+e.first)+" in the document.");for(var D=e;!D.lines;)for(var I=0;;++I){var B=D.children[I],J=B.chunkSize();if(n=e.first&&nD?bt(D,wt(e,D).text.length):X(n,wt(e,n.line).text.length)}function X(e,n){var D=e.ch;return D==null||D>n?bt(e.line,n):D<0?bt(e.line,0):e}function ee(e,n){for(var D=[],I=0;Ithis.maxLookAhead&&(this.maxLookAhead=e),n},ae.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ae.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ae.fromSaved=function(e,n,D){return n instanceof me?new ae(e,hr(e.mode,n.state),D,n.lookAhead):new ae(e,hr(e.mode,n),D)},ae.prototype.save=function(e){var n=e!==!1?hr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new me(n,this.maxLookAhead):n};function Ke(e,n,D,I){var B=[e.state.modeGen],J={};zr(e,n.text,e.doc.mode,D,function(xe,We){return B.push(xe,We)},J,I);for(var se=D.state,fe=function(xe){D.baseTokens=B;var We=e.state.overlays[xe],Ve=1,ut=0;D.state=!0,zr(e,n.text,We.mode,D,function(it,gt){for(var xt=Ve;utit&&B.splice(Ve,1,it,B[Ve+1],Rt),Ve+=2,ut=Math.min(it,Rt)}if(!gt)return;if(We.opaque)B.splice(xt,Ve-xt,it,"overlay "+gt),Ve=xt+2;else for(;xte.options.maxHighlightLength&&hr(e.doc.mode,I.state),J=Ke(e,n,I);B&&(I.state=B),n.stateAfter=I.save(!B),n.styles=J.styles,J.classes?n.styleClasses=J.classes:n.styleClasses&&(n.styleClasses=null),D===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return n.styles}function Ot(e,n,D){var I=e.doc,B=e.display;if(!I.mode.startState)return new ae(I,!0,n);var J=or(e,n,D),se=J>I.first&&wt(I,J-1).stateAfter,fe=se?ae.fromSaved(I,se,J):new ae(I,Ct(I.mode),J);return I.iter(J,n,function(pe){Ht(e,pe.text,fe);var xe=fe.line;pe.stateAfter=xe==n-1||xe%5==0||xe>=B.viewFrom&&xen.start)return J}throw new Error("Mode "+e.name+" failed to advance stream.")}var qt=function(e,n,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=n||null,this.state=D};function Hr(e,n,D,I){var B=e.doc,J=B.mode,se;n=K(B,n);var fe=wt(B,n.line),pe=Ot(e,n.line,D),xe=new Dt(fe.text,e.options.tabSize,pe),We;for(I&&(We=[]);(I||xe.pose.options.maxHighlightLength?(fe=!1,se&&Ht(e,n,I,We.pos),We.pos=n.length,Ve=null):Ve=nn(Xt(D,We,I.state,ut),J),ut){var it=ut[0].name;it&&(Ve="m-"+(Ve?it+" "+Ve:it))}if(!fe||xe!=Ve){for(;pese;--fe){if(fe<=J.first)return J.first;var pe=wt(J,fe-1),xe=pe.stateAfter;if(xe&&(!D||fe+(xe instanceof me?xe.lookAhead:0)<=J.modeFrontier))return fe;var We=H(pe.text,null,e.options.tabSize);(B==null||I>We)&&(B=fe-1,I=We)}return B}function Qr(e,n){if(e.modeFrontier=Math.min(e.modeFrontier,n),e.highlightFrontierD;I--){var B=wt(e,I).stateAfter;if(B&&(!(B instanceof me)||I+B.lookAhead=n:J.to>n);(I||(I=[])).push(new jr(se,J.from,pe?null:J.to))}}return I}function Bi(e,n,D){var I;if(e)for(var B=0;B=n:J.to>n);if(fe||J.from==n&&se.type=="bookmark"&&(!D||J.marker.insertLeft)){var pe=J.from==null||(se.inclusiveLeft?J.from<=n:J.from0&&fe)for(var $t=0;$t0)continue;var We=[pe,1],Ve=Bt(xe.from,fe.from),ut=Bt(xe.to,fe.to);(Ve<0||!se.inclusiveLeft&&!Ve)&&We.push({from:xe.from,to:fe.from}),(ut>0||!se.inclusiveRight&&!ut)&&We.push({from:fe.to,to:xe.to}),B.splice.apply(B,We),pe+=We.length-3}return B}function dn(e){var n=e.markedSpans;if(!n)return;for(var D=0;Dn)&&(!I||tn(I,J.marker)<0)&&(I=J.marker)}return I}function _n(e,n,D,I,B){var J=wt(e,n),se=zt&&J.markedSpans;if(se)for(var fe=0;fe=0&&Ve<=0||We<=0&&Ve>=0)continue;if(We<=0&&(pe.marker.inclusiveRight&&B.inclusiveLeft?Bt(xe.to,D)>=0:Bt(xe.to,D)>0)||We>=0&&(pe.marker.inclusiveRight&&B.inclusiveLeft?Bt(xe.from,I)<=0:Bt(xe.from,I)<0))return!0}}function Un(e){for(var n;n=hn(e);)e=n.find(-1,!0).line;return e}function Di(e){for(var n;n=Fr(e);)e=n.find(1,!0).line;return e}function ui(e){for(var n,D;n=Fr(e);)e=n.find(1,!0).line,(D||(D=[])).push(e);return D}function bi(e,n){var D=wt(e,n),I=Un(D);return D==I?n:Ut(I)}function ei(e,n){if(n>e.lastLine())return n;var D=wt(e,n),I;if(!ti(e,D))return n;for(;I=Fr(D);)D=I.find(1,!0).line;return Ut(D)+1}function ti(e,n){var D=zt&&n.markedSpans;if(D)for(var I=void 0,B=0;Bn.maxLineLength&&(n.maxLineLength=B,n.maxLine=I)})}var di=function(e,n,D){this.text=e,Yn(this,n),this.height=D?D(this):1};di.prototype.lineNo=function(){return Ut(this)},Me(di);function qr(e,n,D,I){e.text=n,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),dn(e),Yn(e,D);var B=I?I(e):1;B!=e.height&&Jt(e,B)}function Yt(e){e.parent=null,dn(e)}var sr={},Qt={};function gr(e,n){if(!e||/^\s*$/.test(e))return null;var D=n.addModeClass?Qt:sr;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function Lr(e,n){var D=M("span",null,null,p?"padding-right: .1px":null),I={pre:M("pre",[D],"CodeMirror-line"),content:D,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};n.measure={};for(var B=0;B<=(n.rest?n.rest.length:0);B++){var J=B?n.rest[B-1]:n.line,se=void 0;I.pos=0,I.addToken=Ar,It(e.display.measure)&&(se=lt(J,e.doc.direction))&&(I.addToken=$n(I.addToken,se)),I.map=[];var fe=n!=e.display.externalMeasured&&Ut(J);Ei(J,I,pt(e,J,fe)),J.styleClasses&&(J.styleClasses.bgClass&&(I.bgClass=W(J.styleClasses.bgClass,I.bgClass||"")),J.styleClasses.textClass&&(I.textClass=W(J.styleClasses.textClass,I.textClass||""))),I.map.length==0&&I.map.push(0,0,I.content.appendChild(ft(e.display.measure))),B==0?(n.measure.map=I.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(I.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(p){var pe=I.content.lastChild;(/\bcm-tab\b/.test(pe.className)||pe.querySelector&&pe.querySelector(".cm-tab"))&&(I.content.className="cm-tab-wrap-hack")}return ze(e,"renderLine",e,n.line,I.pre),I.pre.className&&(I.textClass=W(I.pre.className,I.textClass||"")),I}function Kr(e){var n=T("span","\u2022","cm-invalidchar");return n.title="\\u"+e.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function Ar(e,n,D,I,B,J,se){if(!n)return;var fe=e.splitSpaces?gn(n,e.trailingSpace):n,pe=e.cm.state.specialChars,xe=!1,We;if(!pe.test(n))e.col+=n.length,We=document.createTextNode(fe),e.map.push(e.pos,e.pos+n.length,We),S&&b<9&&(xe=!0),e.pos+=n.length;else{We=document.createDocumentFragment();for(var Ve=0;;){pe.lastIndex=Ve;var ut=pe.exec(n),it=ut?ut.index-Ve:n.length-Ve;if(it){var gt=document.createTextNode(fe.slice(Ve,Ve+it));S&&b<9?We.appendChild(T("span",[gt])):We.appendChild(gt),e.map.push(e.pos,e.pos+it,gt),e.col+=it,e.pos+=it}if(!ut)break;Ve+=it+1;var xt=void 0;if(ut[0]==" "){var Rt=e.cm.options.tabSize,Pt=Rt-e.col%Rt;xt=We.appendChild(T("span",ue(Pt),"cm-tab")),xt.setAttribute("role","presentation"),xt.setAttribute("cm-text"," "),e.col+=Pt}else ut[0]=="\r"||ut[0]==` `?(xt=We.appendChild(T("span",ut[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),xt.setAttribute("cm-text",ut[0]),e.col+=1):(xt=e.cm.options.specialCharPlaceholder(ut[0]),xt.setAttribute("cm-text",ut[0]),S&&b<9?We.appendChild(T("span",[xt])):We.appendChild(xt),e.col+=1);e.map.push(e.pos,e.pos+1,xt),e.pos++}}if(e.trailingSpace=fe.charCodeAt(n.length-1)==32,D||I||B||xe||J||se){var Gt=D||"";I&&(Gt+=I),B&&(Gt+=B);var Nt=T("span",[We],Gt,J);if(se)for(var $t in se)se.hasOwnProperty($t)&&$t!="style"&&$t!="class"&&Nt.setAttribute($t,se[$t]);return e.content.appendChild(Nt)}e.content.appendChild(We)}function gn(e,n){if(e.length>1&&!/ /.test(e))return e;for(var D=n,I="",B=0;Bxe&&Ve.from<=xe);ut++);if(Ve.to>=We)return e(D,I,B,J,se,fe,pe);e(D,I.slice(0,Ve.to-xe),B,J,null,fe,pe),J=null,I=I.slice(Ve.to-xe),xe=Ve.to}}}function xr(e,n,D,I){var B=!I&&D.widgetNode;B&&e.map.push(e.pos,e.pos+n,B),!I&&e.cm.display.input.needsContentAttribute&&(B||(B=e.content.appendChild(document.createElement("span"))),B.setAttribute("cm-marker",D.id)),B&&(e.cm.display.input.setUneditable(B),e.content.appendChild(B)),e.pos+=n,e.trailingSpace=!1}function Ei(e,n,D){var I=e.markedSpans,B=e.text,J=0;if(!I){for(var se=1;sepe||Pr.collapsed&&ar.to==pe&&ar.from==pe)){if(ar.to!=null&&ar.to!=pe&&it>ar.to&&(it=ar.to,xt=""),Pr.className&&(gt+=" "+Pr.className),Pr.css&&(ut=(ut?ut+";":"")+Pr.css),Pr.startStyle&&ar.from==pe&&(Rt+=" "+Pr.startStyle),Pr.endStyle&&ar.to==it&&($t||($t=[])).push(Pr.endStyle,ar.to),Pr.title&&((Gt||(Gt={})).title=Pr.title),Pr.attributes)for(var Tn in Pr.attributes)(Gt||(Gt={}))[Tn]=Pr.attributes[Tn];Pr.collapsed&&(!Pt||tn(Pt.marker,Pr)<0)&&(Pt=ar)}else ar.from>pe&&it>ar.from&&(it=ar.from)}if($t)for(var fi=0;fi<$t.length;fi+=2)$t[fi+1]==it&&(xt+=" "+$t[fi]);if(!Pt||Pt.from==pe)for(var Fn=0;Fn=fe)break;for(var Fi=Math.min(fe,it);;){if(We){var Mi=pe+We.length;if(!Pt){var Qn=Mi>Fi?We.slice(0,Fi-pe):We;n.addToken(n,Qn,Ve?Ve+gt:gt,Rt,pe+Qn.length==it?xt:"",ut,Gt)}if(Mi>=Fi){We=We.slice(Fi-pe),pe=Fi;break}pe=Mi,Rt=""}We=B.slice(J,J=D[xe++]),Ve=gr(D[xe++],n.cm.options)}}}function Vr(e,n,D){this.line=n,this.rest=ui(n),this.size=this.rest?Ut(ie(this.rest))-D+1:1,this.node=this.text=null,this.hidden=ti(e,n)}function jn(e,n,D){for(var I=[],B,J=n;J2&&J.push((pe.bottom+xe.top)/2-D.top)}}J.push(D.bottom-D.top)}}function we(e,n,D){if(e.line==n)return{map:e.measure.map,cache:e.measure.cache};for(var I=0;ID)return{map:e.measure.maps[B],cache:e.measure.caches[B],before:!0}}function He(e,n){n=Un(n);var D=Ut(n),I=e.display.externalMeasured=new Vr(e.doc,n,D);I.lineN=D;var B=I.built=Lr(e,I);return I.text=B.pre,E(e.display.lineMeasure,B.pre),I}function Ge(e,n,D,I){return nt(e,Ye(e,n),D,I)}function $e(e,n){if(n>=e.display.viewFrom&&n=D.lineN&&nn)&&(J=pe-fe,B=J-1,n>=pe&&(se="right")),B!=null){if(I=e[xe+2],fe==pe&&D==(I.insertLeft?"left":"right")&&(se=D),D=="left"&&B==0)for(;xe&&e[xe-2]==e[xe-3]&&e[xe-1].insertLeft;)I=e[(xe-=3)+2],se="left";if(D=="right"&&B==pe-fe)for(;xe=0&&!((D=e[B]).left!=D.right);B--);return D}function Mt(e,n,D,I){var B=St(n.map,D,I),J=B.node,se=B.start,fe=B.end,pe=B.collapse,xe;if(J.nodeType==3){for(var We=0;We<4;We++){for(;se&&be(n.line.text.charAt(B.coverStart+se));)--se;for(;B.coverStart+fe0&&(pe=I="right");var Ve;e.options.lineWrapping&&(Ve=J.getClientRects()).length>1?xe=Ve[I=="right"?Ve.length-1:0]:xe=J.getBoundingClientRect()}if(S&&b<9&&!se&&(!xe||!xe.left&&!xe.right)){var ut=J.parentNode.getClientRects()[0];ut?xe={left:ut.left,right:ut.left+ri(e.display),top:ut.top,bottom:ut.bottom}:xe=ht}for(var it=xe.top-n.rect.top,gt=xe.bottom-n.rect.top,xt=(it+gt)/2,Rt=n.view.measure.heights,Pt=0;Pt=I.text.length?(pe=I.text.length,xe="before"):pe<=0&&(pe=0,xe="after"),!fe)return se(xe=="before"?pe-1:pe,xe=="before");function We(gt,xt,Rt){var Pt=fe[xt],Gt=Pt.level==1;return se(Rt?gt-1:gt,Gt!=Rt)}var Ve=qe(fe,pe,xe),ut=at,it=We(pe,Ve,xe=="before");return ut!=null&&(it.other=We(pe,ut,xe!="before")),it}function ur(e,n){var D=0;n=K(e.doc,n),e.options.lineWrapping||(D=ri(e.display)*n.ch);var I=wt(e.doc,n.line),B=ci(I)+$i(e.display);return{left:D,right:D,top:B,bottom:B+I.height}}function ir(e,n,D,I,B){var J=bt(e,n,D);return J.xRel=B,I&&(J.outside=I),J}function Wr(e,n,D){var I=e.doc;if(D+=e.display.viewOffset,D<0)return ir(I.first,0,null,-1,-1);var B=Or(I,D),J=I.first+I.size-1;if(B>J)return ir(I.first+I.size-1,wt(I,J).text.length,null,1,1);n<0&&(n=0);for(var se=wt(I,B);;){var fe=In(e,se,B,n,D),pe=mi(se,fe.ch+(fe.xRel>0||fe.outside>0?1:0));if(!pe)return fe;var xe=pe.find(1);if(xe.line==B)return xe;se=wt(I,B=xe.line)}}function $r(e,n,D,I){I-=Sr(n);var B=n.text.length,J=Qe(function(se){return nt(e,D,se-1).bottom<=I},B,0);return B=Qe(function(se){return nt(e,D,se).top>I},J,B),{begin:J,end:B}}function Zt(e,n,D,I){D||(D=Ye(e,n));var B=Yr(e,n,nt(e,D,I),"line").top;return $r(e,n,D,B)}function en(e,n,D,I){return e.bottom<=D?!1:e.top>D?!0:(I?e.left:e.right)>n}function In(e,n,D,I,B){B-=ci(n);var J=Ye(e,n),se=Sr(n),fe=0,pe=n.text.length,xe=!0,We=lt(n,e.doc.direction);if(We){var Ve=(e.options.lineWrapping?vn:an)(e,n,D,J,We,I,B);xe=Ve.level!=1,fe=xe?Ve.from:Ve.to-1,pe=xe?Ve.to:Ve.from-1}var ut=null,it=null,gt=Qe(function(dr){var ar=nt(e,J,dr);return ar.top+=se,ar.bottom+=se,en(ar,I,B,!1)?(ar.top<=B&&ar.left<=I&&(ut=dr,it=ar),!0):!1},fe,pe),xt,Rt,Pt=!1;if(it){var Gt=I-it.left=$t.bottom?1:0}return gt=Re(n.text,gt,1),ir(D,gt,Rt,Pt,I-xt)}function an(e,n,D,I,B,J,se){var fe=Qe(function(Ve){var ut=B[Ve],it=ut.level!=1;return en(Br(e,bt(D,it?ut.to:ut.from,it?"before":"after"),"line",n,I),J,se,!0)},0,B.length-1),pe=B[fe];if(fe>0){var xe=pe.level!=1,We=Br(e,bt(D,xe?pe.from:pe.to,xe?"after":"before"),"line",n,I);en(We,J,se,!0)&&We.top>se&&(pe=B[fe-1])}return pe}function vn(e,n,D,I,B,J,se){var fe=$r(e,n,I,se),pe=fe.begin,xe=fe.end;/\s/.test(n.text.charAt(xe-1))&&xe--;for(var We=null,Ve=null,ut=0;ut=xe||it.to<=pe)continue;var gt=it.level!=1,xt=nt(e,I,gt?Math.min(xe,it.to)-1:Math.max(pe,it.from)).right,Rt=xtRt)&&(We=it,Ve=Rt)}return We||(We=B[B.length-1]),We.fromxe&&(We={from:We.from,to:xe,level:We.level}),We}var pn;function Wn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(pn==null){pn=T("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)pn.appendChild(document.createTextNode("x")),pn.appendChild(T("br"));pn.appendChild(document.createTextNode("x"))}E(e.measure,pn);var D=pn.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),x(e.measure),D||1}function ri(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var n=T("span","xxxxxxxxxx"),D=T("pre",[n],"CodeMirror-line-like");E(e.measure,D);var I=n.getBoundingClientRect(),B=(I.right-I.left)/10;return B>2&&(e.cachedCharWidth=B),B||10}function kn(e){for(var n=e.display,D={},I={},B=n.gutters.clientLeft,J=n.gutters.firstChild,se=0;J;J=J.nextSibling,++se){var fe=e.display.gutterSpecs[se].className;D[fe]=J.offsetLeft+J.clientLeft+B,I[fe]=J.clientWidth}return{fixedPos:xi(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:D,gutterWidth:I,wrapperWidth:n.wrapper.clientWidth}}function xi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Wi(e){var n=Wn(e.display),D=e.options.lineWrapping,I=D&&Math.max(5,e.display.scroller.clientWidth/ri(e.display)-3);return function(B){if(ti(e.doc,B))return 0;var J=0;if(B.widgets)for(var se=0;se0&&(xe=wt(e.doc,pe.line).text).length==pe.ch){var We=H(xe,xe.length,e.options.tabSize)-xe.length;pe=bt(pe.line,Math.max(0,Math.round((J-Xe(e.display).left)/ri(e.display))-We))}return pe}function wn(e,n){if(n>=e.display.viewTo)return null;if(n-=e.display.viewFrom,n<0)return null;for(var D=e.display.view,I=0;In)&&(B.updateLineNumbers=n),e.curOp.viewChanged=!0,n>=B.viewTo)zt&&bi(e.doc,n)B.viewFrom?Dn(e):(B.viewFrom+=I,B.viewTo+=I);else if(n<=B.viewFrom&&D>=B.viewTo)Dn(e);else if(n<=B.viewFrom){var J=zi(e,D,D+I,1);J?(B.view=B.view.slice(J.index),B.viewFrom=J.lineN,B.viewTo+=I):Dn(e)}else if(D>=B.viewTo){var se=zi(e,n,n,-1);se?(B.view=B.view.slice(0,se.index),B.viewTo=se.lineN):Dn(e)}else{var fe=zi(e,n,n,-1),pe=zi(e,D,D+I,1);fe&&pe?(B.view=B.view.slice(0,fe.index).concat(jn(e,fe.lineN,pe.lineN)).concat(B.view.slice(pe.index)),B.viewTo+=I):Dn(e)}var xe=B.externalMeasured;xe&&(D=B.lineN&&n=I.viewTo)return;var J=I.view[wn(e,n)];if(J.node==null)return;var se=J.changes||(J.changes=[]);re(se,D)==-1&&se.push(D)}function Dn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function zi(e,n,D,I){var B=wn(e,n),J,se=e.display.view;if(!zt||D==e.doc.first+e.doc.size)return{index:B,lineN:D};for(var fe=e.display.viewFrom,pe=0;pe0){if(B==se.length-1)return null;J=fe+se[B].size-n,B++}else J=fe-n;n+=J,D+=J}for(;bi(e.doc,D)!=D;){if(B==(I<0?0:se.length-1))return null;D+=I*se[B-(I<0?1:0)].size,B+=I}return{index:B,lineN:D}}function ta(e,n,D){var I=e.display,B=I.view;B.length==0||n>=I.viewTo||D<=I.viewFrom?(I.view=jn(e,n,D),I.viewFrom=n):(I.viewFrom>n?I.view=jn(e,n,I.viewFrom).concat(I.view):I.viewFromD&&(I.view=I.view.slice(0,wn(e,D)))),I.viewTo=D}function ra(e){for(var n=e.display.view,D=0,I=0;I=e.display.viewTo||fe.to().line0?n.blinker=setInterval(function(){e.hasFocus()||va(e),n.cursorDiv.style.visibility=(D=!D)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}function So(e){e.state.focused||(e.display.input.focus(),ia(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,va(e))},100)}function ia(e,n){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ze(e,"focus",e,n),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),p&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ii(e)}function va(e,n){if(e.state.delayingBlurEvent)return;e.state.focused&&(ze(e,"blur",e,n),e.state.focused=!1,g(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Ma(e){for(var n=e.display,D=n.lineDiv.offsetTop,I=0;I.005||We<-.005)&&(Jt(B.line,se),to(B.line),B.rest))for(var Ve=0;Vee.display.sizerWidth){var ut=Math.ceil(fe/ri(e.display));ut>e.display.maxLineLength&&(e.display.maxLineLength=ut,e.display.maxLine=B.line,e.display.maxLineChanged=!0)}}}function to(e){if(e.widgets)for(var n=0;n=se&&(J=Or(n,ci(wt(n,pe))-e.wrapper.clientHeight),se=pe)}return{from:J,to:Math.max(se,J+1)}}function Xo(e,n){if(Ze(e,"scrollCursorIntoView"))return;var D=e.display,I=D.sizer.getBoundingClientRect(),B=null;if(n.top+I.top<0?B=!0:n.bottom+I.top>(window.innerHeight||document.documentElement.clientHeight)&&(B=!1),B!=null&&!o){var J=T("div","\u200B",null,`position: absolute; top: `+(n.top-D.viewOffset-$i(e.display))+`px; height: `+(n.bottom-n.top+Je(e)+D.barHeight)+`px; left: `+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");e.display.lineSpace.appendChild(J),J.scrollIntoView(B),e.display.lineSpace.removeChild(J)}}function Yo(e,n,D,I){I==null&&(I=0);var B;!e.options.lineWrapping&&n==D&&(n=n.ch?bt(n.line,n.sticky=="before"?n.ch-1:n.ch,"after"):n,D=n.sticky=="before"?bt(n.line,n.ch+1,"before"):n);for(var J=0;J<5;J++){var se=!1,fe=Br(e,n),pe=!D||D==n?fe:Br(e,D);B={left:Math.min(fe.left,pe.left),top:Math.min(fe.top,pe.top)-I,right:Math.max(fe.left,pe.left),bottom:Math.max(fe.bottom,pe.bottom)+I};var xe=ro(e,B),We=e.doc.scrollTop,Ve=e.doc.scrollLeft;if(xe.scrollTop!=null&&(_a(e,xe.scrollTop),Math.abs(e.doc.scrollTop-We)>1&&(se=!0)),xe.scrollLeft!=null&&(Gi(e,xe.scrollLeft),Math.abs(e.doc.scrollLeft-Ve)>1&&(se=!0)),!se)break}return B}function Co(e,n){var D=ro(e,n);D.scrollTop!=null&&_a(e,D.scrollTop),D.scrollLeft!=null&&Gi(e,D.scrollLeft)}function ro(e,n){var D=e.display,I=Wn(e.display);n.top<0&&(n.top=0);var B=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:D.scroller.scrollTop,J=_e(e),se={};n.bottom-n.top>J&&(n.bottom=n.top+J);var fe=e.doc.height+Pe(D),pe=n.topfe-I;if(n.topB+J){var We=Math.min(n.top,(xe?fe:n.bottom)-J);We!=B&&(se.scrollTop=We)}var Ve=e.options.fixedGutter?0:D.gutters.offsetWidth,ut=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-Ve,it=Ue(e)-D.gutters.offsetWidth,gt=n.right-n.left>it;return gt&&(n.right=n.left+it),n.left<10?se.scrollLeft=0:n.leftit+ut-3&&(se.scrollLeft=n.right+(gt?0:10)-it),se}function no(e,n){if(n==null)return;Na(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+n}function ya(e){Na(e);var n=e.getCursor();e.curOp.scrollToPos={from:n,to:n,margin:e.options.cursorScrollMargin}}function ba(e,n,D){(n!=null||D!=null)&&Na(e),n!=null&&(e.curOp.scrollLeft=n),D!=null&&(e.curOp.scrollTop=D)}function $o(e,n){Na(e),e.curOp.scrollToPos=n}function Na(e){var n=e.curOp.scrollToPos;if(n){e.curOp.scrollToPos=null;var D=ur(e,n.from),I=ur(e,n.to);Oa(e,D,I,n.margin)}}function Oa(e,n,D,I){var B=ro(e,{left:Math.min(n.left,D.left),top:Math.min(n.top,D.top)-I,right:Math.max(n.right,D.right),bottom:Math.max(n.bottom,D.bottom)+I});ba(e,B.scrollLeft,B.scrollTop)}function _a(e,n){if(Math.abs(e.doc.scrollTop-n)<2)return;C||Ia(e,{top:n}),Ea(e,n,!0),C&&Ia(e),Ra(e,100)}function Ea(e,n,D){if(n=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,n)),e.display.scroller.scrollTop==n&&!D)return;e.doc.scrollTop=n,e.display.scrollbars.setScrollTop(n),e.display.scroller.scrollTop!=n&&(e.display.scroller.scrollTop=n)}function Gi(e,n,D,I){if(n=Math.max(0,Math.min(n,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(D?n==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-n)<2)&&!I)return;e.doc.scrollLeft=n,Gr(e),e.display.scroller.scrollLeft!=n&&(e.display.scroller.scrollLeft=n),e.display.scrollbars.setScrollLeft(n)}function ca(e){var n=e.display,D=n.gutters.offsetWidth,I=Math.round(e.doc.height+Pe(e.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:e.options.fixedGutter?D:0,docHeight:I,scrollHeight:I+Je(e)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:D}}var aa=function(e,n,D){this.cm=D;var I=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),B=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");I.tabIndex=B.tabIndex=-1,e(I),e(B),Ie(I,"scroll",function(){I.clientHeight&&n(I.scrollTop,"vertical")}),Ie(B,"scroll",function(){B.clientWidth&&n(B.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&b<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};aa.prototype.update=function(e){var n=e.scrollWidth>e.clientWidth+1,D=e.scrollHeight>e.clientHeight+1,I=e.nativeBarWidth;if(D){this.vert.style.display="block",this.vert.style.bottom=n?I+"px":"0";var B=e.viewHeight-(n?I:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+B)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=D?I+"px":"0",this.horiz.style.left=e.barLeft+"px";var J=e.viewWidth-e.barLeft-(D?I:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+J)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(I==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:D?I:0,bottom:n?I:0}},aa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},aa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},aa.prototype.zeroWidthHack=function(){var e=u&&!i?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},aa.prototype.enableZeroWidthBar=function(e,n,D){e.style.pointerEvents="auto";function I(){var B=e.getBoundingClientRect(),J=D=="vert"?document.elementFromPoint(B.right-1,(B.top+B.bottom)/2):document.elementFromPoint((B.right+B.left)/2,B.bottom-1);J!=e?e.style.pointerEvents="none":n.set(1e3,I)}n.set(1e3,I)},aa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Aa=function(){};Aa.prototype.update=function(){return{bottom:0,right:0}},Aa.prototype.setScrollLeft=function(){},Aa.prototype.setScrollTop=function(){},Aa.prototype.clear=function(){};function da(e,n){n||(n=ca(e));var D=e.display.barWidth,I=e.display.barHeight;ja(e,n);for(var B=0;B<4&&D!=e.display.barWidth||I!=e.display.barHeight;B++)D!=e.display.barWidth&&e.options.lineWrapping&&Ma(e),ja(e,ca(e)),D=e.display.barWidth,I=e.display.barHeight}function ja(e,n){var D=e.display,I=D.scrollbars.update(n);D.sizer.style.paddingRight=(D.barWidth=I.right)+"px",D.sizer.style.paddingBottom=(D.barHeight=I.bottom)+"px",D.heightForcer.style.borderBottom=I.bottom+"px solid transparent",I.right&&I.bottom?(D.scrollbarFiller.style.display="block",D.scrollbarFiller.style.height=I.bottom+"px",D.scrollbarFiller.style.width=I.right+"px"):D.scrollbarFiller.style.display="",I.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(D.gutterFiller.style.display="block",D.gutterFiller.style.height=I.bottom+"px",D.gutterFiller.style.width=n.gutterWidth+"px"):D.gutterFiller.style.display=""}var io={native:aa,null:Aa};function Fa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&g(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new io[e.options.scrollbarStyle](function(n){e.display.wrapper.insertBefore(n,e.display.scrollbarFiller),Ie(n,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,D){D=="horizontal"?Gi(e,n):_a(e,n)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var ao=0;function oa(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:++ao},gi(e.curOp)}function ha(e){var n=e.curOp;n&&Xr(n,function(D){for(var I=0;I=D.viewTo)||D.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new Ki(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&fa(e.cm,e.update)}function Zo(e){var n=e.cm,D=n.display;e.updatedDisplay&&Ma(n),e.barMeasure=ca(n),D.maxLineChanged&&!n.options.lineWrapping&&(e.adjustWidthTo=Ge(n,D.maxLine,D.maxLine.text.length).left+3,n.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(D.scroller.clientWidth,D.sizer.offsetLeft+e.adjustWidthTo+Je(n)+n.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-Ue(n))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=D.input.prepareSelection())}function oo(e){var n=e.cm;e.adjustWidthTo!=null&&(n.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var D=+new Date+e.options.workTime,I=Ot(e,n.highlightFrontier),B=[];n.iter(I.line,Math.min(n.first+n.size,e.display.viewTo+500),function(J){if(I.line>=e.display.viewFrom){var se=J.styles,fe=J.text.length>e.options.maxHighlightLength?hr(n.mode,I.state):null,pe=Ke(e,J,I,!0);fe&&(I.state=fe),J.styles=pe.styles;var xe=J.styleClasses,We=pe.classes;We?J.styleClasses=We:xe&&(J.styleClasses=null);for(var Ve=!se||se.length!=J.styles.length||xe!=We&&(!xe||!We||xe.bgClass!=We.bgClass||xe.textClass!=We.textClass),ut=0;!Ve&&utD)return Ra(e,e.options.workDelay),!0}),n.highlightFrontier=I.line,n.modeFrontier=Math.max(n.modeFrontier,I.line),B.length&&Oi(e,function(){for(var J=0;J=D.viewFrom&&n.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&ra(e)==0)return!1;ai(e)&&(Dn(e),n.dims=kn(e));var B=I.first+I.size,J=Math.max(n.visible.from-e.options.viewportMargin,I.first),se=Math.min(B,n.visible.to+e.options.viewportMargin);D.viewFromse&&D.viewTo-se<20&&(se=Math.min(B,D.viewTo)),zt&&(J=bi(e.doc,J),se=ei(e.doc,se));var fe=J!=D.viewFrom||se!=D.viewTo||D.lastWrapHeight!=n.wrapperHeight||D.lastWrapWidth!=n.wrapperWidth;ta(e,J,se),D.viewOffset=ci(wt(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var pe=ra(e);if(!fe&&pe==0&&!n.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var xe=Ro(e);return pe>4&&(D.lineDiv.style.display="none"),Do(e,D.updateLineNumbers,n.dims),pe>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,Io(xe),x(D.cursorDiv),x(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,fe&&(D.lastWrapHeight=n.wrapperHeight,D.lastWrapWidth=n.wrapperWidth,Ra(e,400)),D.updateLineNumbers=null,!0}function Ua(e,n){for(var D=n.viewport,I=!0;;I=!1){if(!I||!e.options.lineWrapping||n.oldDisplayWidth==Ue(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+Pe(e.display)-_e(e),D.top)}),n.visible=Pa(e.display,e.doc,D),n.visible.from>=e.display.viewFrom&&n.visible.to<=e.display.viewTo)break}else I&&(n.visible=Pa(e.display,e.doc,D));if(!fa(e,n))break;Ma(e);var B=ca(e);mn(e),da(e,B),cn(e,B),n.force=!1}n.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(n.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ia(e,n){var D=new Ki(e,n);if(fa(e,D)){Ma(e),Ua(e,D);var I=ca(e);mn(e),da(e,I),cn(e,I),D.finish()}}function Do(e,n,D){var I=e.display,B=e.options.lineNumbers,J=I.lineDiv,se=J.firstChild;function fe(gt){var xt=gt.nextSibling;return p&&u&&e.display.currentWheelTarget==gt?gt.style.display="none":gt.parentNode.removeChild(gt),xt}for(var pe=I.view,xe=I.viewFrom,We=0;We-1&&(it=!1),Xi(e,Ve,xe,D)),it&&(x(Ve.lineNumber),Ve.lineNumber.appendChild(document.createTextNode(Nr(e.options,xe)))),se=Ve.node.nextSibling}xe+=Ve.size}for(;se;)se=fe(se)}function Ba(e){var n=e.gutters.offsetWidth;e.sizer.style.marginLeft=n+"px"}function cn(e,n){e.display.sizer.style.minHeight=n.docHeight+"px",e.display.heightForcer.style.top=n.docHeight+"px",e.display.gutters.style.height=n.docHeight+e.display.barHeight+Je(e)+"px"}function Gr(e){var n=e.display,D=n.view;if(!n.alignWidgets&&(!n.gutters.firstChild||!e.options.fixedGutter))return;for(var I=xi(n)-n.scroller.scrollLeft+e.doc.scrollLeft,B=n.gutters.offsetWidth,J=I+"px",se=0;sese.clientWidth,pe=se.scrollHeight>se.clientHeight;if(!(I&&fe||B&&pe))return;if(B&&u&&p){e:for(var xe=n.target,We=J.view;xe!=se;xe=xe.parentNode)for(var Ve=0;Ve=0&&Bt(e,I.to())<=0)return D}return-1};var ln=function(e,n){this.anchor=e,this.head=n};ln.prototype.from=function(){return Sn(this.anchor,this.head)},ln.prototype.to=function(){return Ln(this.anchor,this.head)},ln.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Vi(e,n,D){var I=e&&e.options.selectionsMayTouch,B=n[D];n.sort(function(ut,it){return Bt(ut.from(),it.from())}),D=re(n,B);for(var J=1;J0:pe>=0){var xe=Sn(fe.from(),se.from()),We=Ln(fe.to(),se.to()),Ve=fe.empty()?se.from()==se.head:fe.from()==fe.head;J<=D&&--D,n.splice(--J,2,new ln(Ve?We:xe,Ve?xe:We))}}return new Ri(n,D)}function Zi(e,n){return new Ri([new ln(e,n||e)],0)}function qi(e){return e.text?bt(e.from.line+e.text.length-1,ie(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function uo(e,n){if(Bt(e,n.from)<0)return e;if(Bt(e,n.to)<=0)return qi(n);var D=e.line+n.text.length-(n.to.line-n.from.line)-1,I=e.ch;return e.line==n.to.line&&(I+=qi(n).ch-n.to.ch),bt(D,I)}function Wa(e,n){for(var D=[],I=0;I1&&e.remove(fe.line+1,gt-1),e.insert(fe.line+1,Pt)}Rr(e,"change",e,n)}function wa(e,n,D){function I(B,J,se){if(B.linked)for(var fe=0;fe1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ie(e.done)}function _s(e,n,D,I){var B=e.history;B.undone.length=0;var J=+new Date,se,fe;if((B.lastOp==I||B.lastOrigin==n.origin&&n.origin&&(n.origin.charAt(0)=="+"&&B.lastModTime>J-(e.cm?e.cm.options.historyEventDelay:500)||n.origin.charAt(0)=="*"))&&(se=ml(B,B.lastOp==I)))fe=ie(se.changes),Bt(n.from,n.to)==0&&Bt(n.from,fe.to)==0?fe.to=qi(n):se.changes.push(rs(e,n));else{var pe=ie(B.done);for((!pe||!pe.ranges)&&Po(e.sel,B.done),se={changes:[rs(e,n)],generation:B.generation},B.done.push(se);B.done.length>B.undoDepth;)B.done.shift(),B.done[0].ranges||B.done.shift()}B.done.push(D),B.generation=++B.maxGeneration,B.lastModTime=B.lastSelTime=J,B.lastOp=B.lastSelOp=I,B.lastOrigin=B.lastSelOrigin=n.origin,fe||ze(e,"historyAdded")}function gl(e,n,D,I){var B=n.charAt(0);return B=="*"||B=="+"&&D.ranges.length==I.ranges.length&&D.somethingSelected()==I.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,n,D,I){var B=e.history,J=I&&I.origin;D==B.lastSelOp||J&&B.lastSelOrigin==J&&(B.lastModTime==B.lastSelTime&&B.lastOrigin==J||gl(e,J,ie(B.done),n))?B.done[B.done.length-1]=n:Po(n,B.done),B.lastSelTime=+new Date,B.lastSelOrigin=J,B.lastSelOp=D,I&&I.clearRedo!==!1&&bs(B.undone)}function Po(e,n){var D=ie(n);D&&D.ranges&&D.equals(e)||n.push(e)}function Es(e,n,D,I){var B=n["spans_"+e.id],J=0;e.iter(Math.max(e.first,D),Math.min(e.first+e.size,I),function(se){se.markedSpans&&((B||(B=n["spans_"+e.id]={}))[J]=se.markedSpans),++J})}function yl(e){if(!e)return null;for(var n,D=0;D-1&&(ie(fe)[Ve]=xe[Ve],delete xe[Ve]))}}return I}function ns(e,n,D,I){if(I){var B=e.anchor;if(D){var J=Bt(n,B)<0;J!=Bt(D,B)<0?(B=n,n=D):J!=Bt(n,D)<0&&(n=D)}return new ln(B,n)}else return new ln(D||n,n)}function No(e,n,D,I,B){B==null&&(B=e.cm&&(e.cm.display.shift||e.extend)),wi(e,new Ri([ns(e.sel.primary(),n,D,B)],0),I)}function ws(e,n,D){for(var I=[],B=e.cm&&(e.cm.display.shift||e.extend),J=0;J=n.ch:fe.to>n.ch))){if(B&&(ze(pe,"beforeCursorEnter"),pe.explicitlyCleared))if(J.markedSpans){--se;continue}else break;if(!pe.atomic)continue;if(D){var Ve=pe.find(I<0?1:-1),ut=void 0;if((I<0?We:xe)&&(Ve=Rs(e,Ve,-I,Ve&&Ve.line==n.line?J:null)),Ve&&Ve.line==n.line&&(ut=Bt(Ve,D))&&(I<0?ut<0:ut>0))return Ga(e,Ve,n,I,B)}var it=pe.find(I<0?-1:1);return(I<0?xe:We)&&(it=Rs(e,it,I,it.line==n.line?J:null)),it?Ga(e,it,n,I,B):null}}return n}function Fo(e,n,D,I,B){var J=I||1,se=Ga(e,n,D,J,B)||!B&&Ga(e,n,D,J,!0)||Ga(e,n,D,-J,B)||!B&&Ga(e,n,D,-J,!0);return se||(e.cantEdit=!0,bt(e.first,0))}function Rs(e,n,D,I){return D<0&&n.ch==0?n.line>e.first?K(e,bt(n.line-1)):null:D>0&&n.ch==(I||wt(e,n.line)).text.length?n.line=0;--B)Ls(e,{from:I[B].from,to:I[B].to,text:B?[""]:n.text,origin:n.origin});else Ls(e,n)}function Ls(e,n){if(n.text.length==1&&n.text[0]==""&&Bt(n.from,n.to)==0)return;var D=Wa(e,n);_s(e,n,D,e.cm?e.cm.curOp.id:NaN),ho(e,n,D,qn(e,n));var I=[];wa(e,function(B,J){!J&&re(I,B.history)==-1&&(Ns(B.history,n),I.push(B.history)),ho(B,n,null,qn(B,n))})}function Uo(e,n,D){var I=e.cm&&e.cm.state.suppressEdits;if(I&&!D)return;for(var B=e.history,J,se=e.sel,fe=n=="undo"?B.done:B.undone,pe=n=="undo"?B.undone:B.done,xe=0;xe=0;--it){var gt=ut(it);if(gt)return gt.v}}function ks(e,n){if(n==0)return;if(e.first+=n,e.sel=new Ri(Se(e.sel.ranges,function(B){return new ln(bt(B.anchor.line+n,B.anchor.ch),bt(B.head.line+n,B.head.ch))}),e.sel.primIndex),e.cm){yn(e.cm,e.first,e.first-n,n);for(var D=e.cm.display,I=D.viewFrom;Ie.lastLine())return;if(n.from.lineJ&&(n={from:n.from,to:bt(J,wt(e,J).text.length),text:[n.text[0]],origin:n.origin}),n.removed=wr(e,n.from,n.to),D||(D=Wa(e,n)),e.cm?El(e.cm,n,I):ts(e,n,I),jo(e,D,ve),e.cantEdit&&Fo(e,bt(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,n,D){var I=e.doc,B=e.display,J=n.from,se=n.to,fe=!1,pe=J.line;e.options.lineWrapping||(pe=Ut(Un(wt(I,J.line))),I.iter(pe,se.line+1,function(it){if(it==B.maxLine)return fe=!0,!0})),I.sel.contains(n.from,n.to)>-1&&Ne(e),ts(I,n,D,Wi(e)),e.options.lineWrapping||(I.iter(pe,J.line+n.text.length,function(it){var gt=_i(it);gt>B.maxLineLength&&(B.maxLine=it,B.maxLineLength=gt,B.maxLineChanged=!0,fe=!1)}),fe&&(e.curOp.updateMaxLine=!0)),Qr(I,J.line),Ra(e,400);var xe=n.text.length-(se.line-J.line)-1;n.full?yn(e):J.line==se.line&&n.text.length==1&&!gs(e.doc,n)?Mn(e,J.line,"text"):yn(e,J.line,se.line+1,xe);var We=Ae(e,"changes"),Ve=Ae(e,"change");if(Ve||We){var ut={from:J,to:se,text:n.text,removed:n.removed,origin:n.origin};Ve&&Rr(e,"change",e,ut),We&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ut)}e.display.selForContextMenu=null}function Va(e,n,D,I,B){var J;I||(I=D),Bt(I,D)<0&&(J=[I,D],D=J[0],I=J[1]),typeof n=="string"&&(n=e.splitLines(n)),Ka(e,{from:D,to:I,text:n,origin:B})}function Ms(e,n,D,I){D1||!(this.children[0]instanceof po))){var fe=[];this.collapse(fe),this.children=[new po(fe)],this.children[0].parent=this}},collapse:function(e){for(var n=0;n50){for(var se=B.lines.length%25+25,fe=se;fe10);e.parent.maybeSpill()},iterN:function(e,n,D){for(var I=0;Ie.display.maxLineLength&&(e.display.maxLine=xe,e.display.maxLineLength=We,e.display.maxLineChanged=!0)}I!=null&&e&&this.collapsed&&yn(e,I,B+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Rr(e,"markerCleared",e,this,I,B),n&&ha(e),this.parent&&this.parent.clear()},Ta.prototype.find=function(e,n){e==null&&this.type=="bookmark"&&(e=1);for(var D,I,B=0;B0||se==0&&J.clearWhenEmpty!==!1)return J;if(J.replacedWith&&(J.collapsed=!0,J.widgetNode=M("span",[J.replacedWith],"CodeMirror-widget"),I.handleMouseEvents||J.widgetNode.setAttribute("cm-ignore-events","true"),I.insertLeft&&(J.widgetNode.insertLeft=!0)),J.collapsed){if(_n(e,n.line,n,D,J)||n.line!=D.line&&_n(e,D.line,n,D,J))throw new Error("Inserting collapsed marker partially overlapping an existing one");fr()}J.addToHistory&&_s(e,{from:n,to:D,origin:"markText"},e.sel,NaN);var fe=n.line,pe=e.cm,xe;if(e.iter(fe,D.line+1,function(Ve){pe&&J.collapsed&&!pe.options.lineWrapping&&Un(Ve)==pe.display.maxLine&&(xe=!0),J.collapsed&&fe!=n.line&&Jt(Ve,0),On(Ve,new jr(J,fe==n.line?n.ch:null,fe==D.line?D.ch:null)),++fe}),J.collapsed&&e.iter(n.line,D.line+1,function(Ve){ti(e,Ve)&&Jt(Ve,0)}),J.clearOnEnter&&Ie(J,"beforeCursorEnter",function(){return J.clear()}),J.readOnly&&(pr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),J.collapsed&&(J.id=++Fs,J.atomic=!0),pe){if(xe&&(pe.curOp.updateMaxLine=!0),J.collapsed)yn(pe,n.line,D.line+1);else if(J.className||J.startStyle||J.endStyle||J.css||J.attributes||J.title)for(var We=n.line;We<=D.line;We++)Mn(pe,We,"text");J.atomic&&Os(pe.doc),Rr(pe,"markerAdded",pe,J)}return J}var vo=function(e,n){this.markers=e,this.primary=n;for(var D=0;D=0;pe--)Ka(this,I[pe]);fe?Ss(this,fe):this.cm&&ya(this.cm)}),undo:Vn(function(){Uo(this,"undo")}),redo:Vn(function(){Uo(this,"redo")}),undoSelection:Vn(function(){Uo(this,"undo",!0)}),redoSelection:Vn(function(){Uo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,n=0,D=0,I=0;I=e.ch)&&n.push(B.marker.parent||B.marker)}return n},findMarks:function(e,n,D){e=K(this,e),n=K(this,n);var I=[],B=e.line;return this.iter(e.line,n.line+1,function(J){var se=J.markedSpans;if(se)for(var fe=0;fe=pe.to||pe.from==null&&B!=e.line||pe.from!=null&&B==n.line&&pe.from>=n.ch)&&(!D||D(pe.marker))&&I.push(pe.marker.parent||pe.marker)}++B}),I},getAllMarks:function(){var e=[];return this.iter(function(n){var D=n.markedSpans;if(D)for(var I=0;Ie)return n=e,!0;e-=J,++D}),K(this,bt(D,n))},indexFromPos:function(e){e=K(this,e);var n=e.ch;if(e.linen&&(n=e.from),e.to!=null&&e.to-1){n.state.draggingText(e),setTimeout(function(){return n.display.input.focus()},20);return}try{var We=e.dataTransfer.getData("Text");if(We){var Ve;if(n.state.draggingText&&!n.state.draggingText.copy&&(Ve=n.listSelections()),jo(n.doc,Zi(D,D)),Ve)for(var ut=0;ut=0;fe--)Va(e.doc,"",I[fe].from,I[fe].to,"+delete");ya(e)})}function as(e,n,D){var I=Re(e.text,n+D,D);return I<0||I>e.text.length?null:I}function os(e,n,D){var I=as(e,n.ch,D);return I==null?null:new bt(n.line,I,D<0?"after":"before")}function ss(e,n,D,I,B){if(e){n.doc.direction=="rtl"&&(B=-B);var J=lt(D,n.doc.direction);if(J){var se=B<0?ie(J):J[0],fe=B<0==(se.level==1),pe=fe?"after":"before",xe;if(se.level>0||n.doc.direction=="rtl"){var We=Ye(n,D);xe=B<0?D.text.length-1:0;var Ve=nt(n,We,xe).top;xe=Qe(function(ut){return nt(n,We,ut).top==Ve},B<0==(se.level==1)?se.from:se.to-1,xe),pe=="before"&&(xe=as(D,xe,1))}else xe=B<0?se.to:se.from;return new bt(I,xe,pe)}}return new bt(I,B<0?D.text.length:0,B<0?"before":"after")}function Pl(e,n,D,I){var B=lt(n,e.doc.direction);if(!B)return os(n,D,I);D.ch>=n.text.length?(D.ch=n.text.length,D.sticky="before"):D.ch<=0&&(D.ch=0,D.sticky="after");var J=qe(B,D.ch,D.sticky),se=B[J];if(e.doc.direction=="ltr"&&se.level%2==0&&(I>0?se.to>D.ch:se.from=se.from&&ut>=We.begin)){var it=Ve?"before":"after";return new bt(D.line,ut,it)}}var gt=function(Pt,Gt,Nt){for(var $t=function(Tn,fi){return fi?new bt(D.line,fe(Tn,1),"before"):new bt(D.line,Tn,"after")};Pt>=0&&Pt0==(dr.level!=1),Pr=ar?Nt.begin:fe(Nt.end,-1);if(dr.from<=Pr&&Pr0?We.end:fe(We.begin,-1);return Rt!=null&&!(I>0&&Rt==n.text.length)&&(xt=gt(I>0?0:B.length-1,I,xe(Rt)),xt)?xt:null}var _o={selectAll:Is,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ve)},killLine:function(e){return $a(e,function(n){if(n.empty()){var D=wt(e.doc,n.head.line).text.length;return n.head.ch==D&&n.head.line0)B=new bt(B.line,B.ch+1),e.replaceRange(J.charAt(B.ch-1)+J.charAt(B.ch-2),bt(B.line,B.ch-2),B,"+transpose");else if(B.line>e.doc.first){var se=wt(e.doc,B.line-1).text;se&&(B=new bt(B.line,1),e.replaceRange(J.charAt(0)+e.doc.lineSeparator()+se.charAt(se.length-1),bt(B.line-1,se.length-1),B,"+transpose"))}}D.push(new ln(B,B))}e.setSelections(D)})},newlineAndIndent:function(e){return Oi(e,function(){for(var n=e.listSelections(),D=n.length-1;D>=0;D--)e.replaceRange(e.doc.lineSeparator(),n[D].anchor,n[D].head,"+input");n=e.listSelections();for(var I=0;Ie&&Bt(n,this.pos)==0&&D==this.button};var xo,wo;function Wl(e,n){var D=+new Date;return wo&&wo.compare(D,e,n)?(xo=wo=null,"triple"):xo&&xo.compare(D,e,n)?(wo=new us(D,e,n),xo=null,"double"):(xo=new us(D,e,n),wo=null,"single")}function tl(e){var n=this,D=n.display;if(Ze(n,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,Jn(D,e)){p||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(n,e))return;var I=ni(n,e),B=et(e),J=I?Wl(I,B):"single";if(window.focus(),B==1&&n.state.selectingText&&n.state.selectingText(e),I&&zl(n,B,I,J,e))return;B==1?I?Kl(n,I,J,e):Be(e)==D.scroller&&Ee(e):B==2?(I&&No(n.doc,I),setTimeout(function(){return D.input.focus()},20)):B==3&&(R?n.display.input.onContextMenu(e):eo(n))}function zl(e,n,D,I,B){var J="Click";return I=="double"?J="Double"+J:I=="triple"&&(J="Triple"+J),J=(n==1?"Left":n==2?"Middle":"Right")+J,Eo(e,Ks(J,B),B,function(se){if(typeof se=="string"&&(se=_o[se]),!se)return!1;var fe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),fe=se(e,D)!=ge}finally{e.state.suppressEdits=!1}return fe})}function Gl(e,n,D){var I=e.getOption("configureMouse"),B=I?I(e,n,D):{};if(B.unit==null){var J=f?D.shiftKey&&D.metaKey:D.altKey;B.unit=J?"rectangle":n=="single"?"char":n=="double"?"word":"line"}return(B.extend==null||e.doc.extend)&&(B.extend=e.doc.extend||D.shiftKey),B.addNew==null&&(B.addNew=u?D.metaKey:D.ctrlKey),B.moveOnDrag==null&&(B.moveOnDrag=!(u?D.altKey:D.ctrlKey)),B}function Kl(e,n,D,I){S?setTimeout(U(So,e),0):e.curOp.focus=V();var B=Gl(e,D,I),J=e.doc.sel,se;e.options.dragDrop&&ct&&!e.isReadOnly()&&D=="single"&&(se=J.contains(n))>-1&&(Bt((se=J.ranges[se]).from(),n)<0||n.xRel>0)&&(Bt(se.to(),n)>0||n.xRel<0)?Vl(e,I,n,B):Xl(e,I,n,B)}function Vl(e,n,D,I){var B=e.display,J=!1,se=Kn(e,function(xe){p&&(B.scroller.draggable=!1),e.state.draggingText=!1,ot(B.wrapper.ownerDocument,"mouseup",se),ot(B.wrapper.ownerDocument,"mousemove",fe),ot(B.scroller,"dragstart",pe),ot(B.scroller,"drop",se),J||(Ee(xe),I.addNew||No(e.doc,D,null,null,I.extend),p&&!r||S&&b==9?setTimeout(function(){B.wrapper.ownerDocument.body.focus({preventScroll:!0}),B.input.focus()},20):B.input.focus())}),fe=function(xe){J=J||Math.abs(n.clientX-xe.clientX)+Math.abs(n.clientY-xe.clientY)>=10},pe=function(){return J=!0};p&&(B.scroller.draggable=!0),e.state.draggingText=se,se.copy=!I.moveOnDrag,B.scroller.dragDrop&&B.scroller.dragDrop(),Ie(B.wrapper.ownerDocument,"mouseup",se),Ie(B.wrapper.ownerDocument,"mousemove",fe),Ie(B.scroller,"dragstart",pe),Ie(B.scroller,"drop",se),eo(e),setTimeout(function(){return B.input.focus()},20)}function rl(e,n,D){if(D=="char")return new ln(n,n);if(D=="word")return e.findWordAt(n);if(D=="line")return new ln(bt(n.line,0),K(e.doc,bt(n.line+1,0)));var I=D(e,n);return new ln(I.from,I.to)}function Xl(e,n,D,I){var B=e.display,J=e.doc;Ee(n);var se,fe,pe=J.sel,xe=pe.ranges;if(I.addNew&&!I.extend?(fe=J.sel.contains(D),fe>-1?se=xe[fe]:se=new ln(D,D)):(se=J.sel.primary(),fe=J.sel.primIndex),I.unit=="rectangle")I.addNew||(se=new ln(D,D)),D=ni(e,n,!0,!0),fe=-1;else{var We=rl(e,D,I.unit);I.extend?se=ns(se,We.anchor,We.head,I.extend):se=We}I.addNew?fe==-1?(fe=xe.length,wi(J,Vi(e,xe.concat([se]),fe),{scroll:!1,origin:"*mouse"})):xe.length>1&&xe[fe].empty()&&I.unit=="char"&&!I.extend?(wi(J,Vi(e,xe.slice(0,fe).concat(xe.slice(fe+1)),0),{scroll:!1,origin:"*mouse"}),pe=J.sel):is(J,fe,se,de):(fe=0,wi(J,new Ri([se],0),de),pe=J.sel);var Ve=D;function ut(Nt){if(Bt(Ve,Nt)==0)return;if(Ve=Nt,I.unit=="rectangle"){for(var $t=[],dr=e.options.tabSize,ar=H(wt(J,D.line).text,D.ch,dr),Pr=H(wt(J,Nt.line).text,Nt.ch,dr),Tn=Math.min(ar,Pr),fi=Math.max(ar,Pr),Fn=Math.min(D.line,Nt.line),Fi=Math.min(e.lastLine(),Math.max(D.line,Nt.line));Fn<=Fi;Fn++){var Mi=wt(J,Fn).text,Qn=Te(Mi,Tn,dr);Tn==fi?$t.push(new ln(bt(Fn,Qn),bt(Fn,Qn))):Mi.length>Qn&&$t.push(new ln(bt(Fn,Qn),bt(Fn,Te(Mi,fi,dr))))}$t.length||$t.push(new ln(D,D)),wi(J,Vi(e,pe.ranges.slice(0,fe).concat($t),fe),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Nt)}else{var Pi=se,yi=rl(e,Nt,I.unit),si=Pi.anchor,Zn;Bt(yi.anchor,si)>0?(Zn=yi.head,si=Sn(Pi.from(),yi.anchor)):(Zn=yi.anchor,si=Ln(Pi.to(),yi.head));var zn=pe.ranges.slice(0);zn[fe]=Yl(e,new ln(K(J,si),Zn)),wi(J,Vi(e,zn,fe),de)}}var it=B.wrapper.getBoundingClientRect(),gt=0;function xt(Nt){var $t=++gt,dr=ni(e,Nt,!0,I.unit=="rectangle");if(!dr)return;if(Bt(dr,Ve)!=0){e.curOp.focus=V(),ut(dr);var ar=Pa(B,J);(dr.line>=ar.to||dr.lineit.bottom?20:0;Pr&&setTimeout(Kn(e,function(){if(gt!=$t)return;B.scroller.scrollTop+=Pr,xt(Nt)}),50)}}function Rt(Nt){e.state.selectingText=!1,gt=Infinity,Nt&&(Ee(Nt),B.input.focus()),ot(B.wrapper.ownerDocument,"mousemove",Pt),ot(B.wrapper.ownerDocument,"mouseup",Gt),J.history.lastSelOrigin=null}var Pt=Kn(e,function(Nt){Nt.buttons===0||!et(Nt)?Rt(Nt):xt(Nt)}),Gt=Kn(e,Rt);e.state.selectingText=Gt,Ie(B.wrapper.ownerDocument,"mousemove",Pt),Ie(B.wrapper.ownerDocument,"mouseup",Gt)}function Yl(e,n){var D=n.anchor,I=n.head,B=wt(e.doc,D.line);if(Bt(D,I)==0&&D.sticky==I.sticky)return n;var J=lt(B);if(!J)return n;var se=qe(J,D.ch,D.sticky),fe=J[se];if(fe.from!=D.ch&&fe.to!=D.ch)return n;var pe=se+(fe.from==D.ch==(fe.level!=1)?0:1);if(pe==0||pe==J.length)return n;var xe;if(I.line!=D.line)xe=(I.line-D.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var We=qe(J,I.ch,I.sticky),Ve=We-se||(I.ch-D.ch)*(fe.level==1?-1:1);We==pe-1||We==pe?xe=Ve<0:xe=Ve>0}var ut=J[pe+(xe?-1:0)],it=xe==(ut.level==1),gt=it?ut.from:ut.to,xt=it?"after":"before";return D.ch==gt&&D.sticky==xt?n:new ln(new bt(D.line,gt,xt),I)}function nl(e,n,D,I){var B,J;if(n.touches)B=n.touches[0].clientX,J=n.touches[0].clientY;else try{B=n.clientX,J=n.clientY}catch(ut){return!1}if(B>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;I&&Ee(n);var se=e.display,fe=se.lineDiv.getBoundingClientRect();if(J>fe.bottom||!Ae(e,D))return ke(n);J-=fe.top-se.viewOffset;for(var pe=0;pe=B){var We=Or(e.doc,J),Ve=e.display.gutterSpecs[pe];return ze(e,D,e,We,Ve.className,n),ke(n)}}}function cs(e,n){return nl(e,n,"gutterClick",!0)}function il(e,n){if(Jn(e.display,n)||$l(e,n))return;if(Ze(e,n,"contextmenu"))return;R||e.display.input.onContextMenu(n)}function $l(e,n){return Ae(e,"gutterContextMenu")?nl(e,n,"gutterContextMenu",!1):!1}function al(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Tr(e)}var Ja={toString:function(){return"CodeMirror.Init"}},ol={},zo={};function Jl(e){var n=e.optionHandlers;function D(I,B,J,se){e.defaults[I]=B,J&&(n[I]=se?function(fe,pe,xe){xe!=Ja&&J(fe,pe,xe)}:J)}e.defineOption=D,e.Init=Ja,D("value","",function(I,B){return I.setValue(B)},!0),D("mode",null,function(I,B){I.doc.modeOption=B,pa(I)},!0),D("indentUnit",2,pa,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(I){co(I),Tr(I),yn(I)},!0),D("lineSeparator",null,function(I,B){if(I.doc.lineSep=B,!B)return;var J=[],se=I.doc.first;I.doc.iter(function(pe){for(var xe=0;;){var We=pe.text.indexOf(B,xe);if(We==-1)break;xe=We+B.length,J.push(bt(se,We))}se++});for(var fe=J.length-1;fe>=0;fe--)Va(I.doc,B,J[fe],bt(J[fe].line,J[fe].ch+B.length))}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(I,B,J){I.state.specialChars=new RegExp(B.source+(B.test(" ")?"":"| "),"g"),J!=Ja&&I.refresh()}),D("specialCharPlaceholder",Kr,function(I){return I.refresh()},!0),D("electricChars",!0),D("inputStyle",a?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),D("spellcheck",!1,function(I,B){return I.getInputField().spellcheck=B},!0),D("autocorrect",!1,function(I,B){return I.getInputField().autocorrect=B},!0),D("autocapitalize",!1,function(I,B){return I.getInputField().autocapitalize=B},!0),D("rtlMoveVisually",!w),D("wholeLineUpdateBefore",!0),D("theme","default",function(I){al(I),Qi(I)},!0),D("keyMap","default",function(I,B,J){var se=Ho(B),fe=J!=Ja&&Ho(J);fe&&fe.detach&&fe.detach(I,se),se.attach&&se.attach(I,fe||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Zl,!0),D("gutters",[],function(I,B){I.display.gutterSpecs=Ai(B,I.options.lineNumbers),Qi(I)},!0),D("fixedGutter",!0,function(I,B){I.display.gutters.style.left=B?xi(I.display)+"px":"0",I.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(I){return da(I)},!0),D("scrollbarStyle","native",function(I){Fa(I),da(I),I.display.scrollbars.setScrollTop(I.doc.scrollTop),I.display.scrollbars.setScrollLeft(I.doc.scrollLeft)},!0),D("lineNumbers",!1,function(I,B){I.display.gutterSpecs=Ai(I.options.gutters,B),Qi(I)},!0),D("firstLineNumber",1,Qi,!0),D("lineNumberFormatter",function(I){return I},Qi,!0),D("showCursorWhenSelecting",!1,mn,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(I,B){B=="nocursor"&&(va(I),I.display.input.blur()),I.display.input.readOnlyChanged(B)}),D("screenReaderLabel",null,function(I,B){B=B===""?null:B,I.display.input.screenReaderLabelChanged(B)}),D("disableInput",!1,function(I,B){B||I.display.input.reset()},!0),D("dragDrop",!0,Ql),D("allowDropFileTypes",null),D("cursorBlinkRate",530),D("cursorScrollMargin",0),D("cursorHeight",1,mn,!0),D("singleCursorHeightPerLine",!0,mn,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,co,!0),D("addModeClass",!1,co,!0),D("pollInterval",100),D("undoDepth",200,function(I,B){return I.doc.history.undoDepth=B}),D("historyEventDelay",1250),D("viewportMargin",10,function(I){return I.refresh()},!0),D("maxHighlightLength",1e4,co,!0),D("moveInputWithCursor",!0,function(I,B){B||I.display.input.resetPosition()}),D("tabindex",null,function(I,B){return I.display.input.getField().tabIndex=B||""}),D("autofocus",null),D("direction","ltr",function(I,B){return I.doc.setDirection(B)},!0),D("phrases",null)}function Ql(e,n,D){var I=D&&D!=Ja;if(!n!=!I){var B=e.display.dragFunctions,J=n?Ie:ot;J(e.display.scroller,"dragstart",B.start),J(e.display.scroller,"dragenter",B.enter),J(e.display.scroller,"dragover",B.over),J(e.display.scroller,"dragleave",B.leave),J(e.display.scroller,"drop",B.drop)}}function Zl(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(g(e.display.wrapper,"CodeMirror-wrap"),Hi(e)),Ci(e),yn(e),Tr(e),setTimeout(function(){return da(e)},100)}function Pn(e,n){var D=this;if(!(this instanceof Pn))return new Pn(e,n);this.options=n=n?P(n):{},P(ol,n,!1);var I=n.value;typeof I=="string"?I=new ki(I,n.mode,null,n.lineSeparator,n.direction):n.mode&&(I.modeOption=n.mode),this.doc=I;var B=new Pn.inputStyles[n.inputStyle](this),J=this.display=new Da(e,I,B,n);J.wrapper.CodeMirror=this,al(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fa(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new $,keySeq:null,specialChars:null},n.autofocus&&!a&&J.input.focus(),S&&b<11&&setTimeout(function(){return D.display.input.reset(!0)},20),ql(this),Il(),oa(this),this.curOp.forceUpdate=!0,vs(this,I),n.autofocus&&!a||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&ia(D)},20):va(this);for(var se in zo)zo.hasOwnProperty(se)&&zo[se](this,n[se],Ja);ai(this),n.finishInit&&n.finishInit(this);for(var fe=0;fe20*20}Ie(n.scroller,"touchstart",function(pe){if(!Ze(e,pe)&&!J(pe)&&!cs(e,pe)){n.input.ensurePolled(),clearTimeout(D);var xe=+new Date;n.activeTouch={start:xe,moved:!1,prev:xe-I.end<=300?I:null},pe.touches.length==1&&(n.activeTouch.left=pe.touches[0].pageX,n.activeTouch.top=pe.touches[0].pageY)}}),Ie(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),Ie(n.scroller,"touchend",function(pe){var xe=n.activeTouch;if(xe&&!Jn(n,pe)&&xe.left!=null&&!xe.moved&&new Date-xe.start<300){var We=e.coordsChar(n.activeTouch,"page"),Ve;!xe.prev||se(xe,xe.prev)?Ve=new ln(We,We):!xe.prev.prev||se(xe,xe.prev.prev)?Ve=e.findWordAt(We):Ve=new ln(bt(We.line,0),K(e.doc,bt(We.line+1,0))),e.setSelection(Ve.anchor,Ve.head),e.focus(),Ee(pe)}B()}),Ie(n.scroller,"touchcancel",B),Ie(n.scroller,"scroll",function(){n.scroller.clientHeight&&(_a(e,n.scroller.scrollTop),Gi(e,n.scroller.scrollLeft,!0),ze(e,"scroll",e))}),Ie(n.scroller,"mousewheel",function(pe){return lo(e,pe)}),Ie(n.scroller,"DOMMouseScroll",function(pe){return lo(e,pe)}),Ie(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(pe){Ze(e,pe)||Fe(pe)},over:function(pe){Ze(e,pe)||(Rl(e,pe),Fe(pe))},start:function(pe){return Al(e,pe)},drop:Kn(e,Ol),leave:function(pe){Ze(e,pe)||Hs(e)}};var fe=n.input.getField();Ie(fe,"keyup",function(pe){return Zs.call(e,pe)}),Ie(fe,"keydown",Kn(e,Qs)),Ie(fe,"keypress",Kn(e,el)),Ie(fe,"focus",function(pe){return ia(e,pe)}),Ie(fe,"blur",function(pe){return va(e,pe)})}var ds=[];Pn.defineInitHook=function(e){return ds.push(e)};function To(e,n,D,I){var B=e.doc,J;D==null&&(D="add"),D=="smart"&&(B.mode.indent?J=Ot(e,n).state:D="prev");var se=e.options.tabSize,fe=wt(B,n),pe=H(fe.text,null,se);fe.stateAfter&&(fe.stateAfter=null);var xe=fe.text.match(/^\s*/)[0],We;if(!I&&!/\S/.test(fe.text))We=0,D="not";else if(D=="smart"&&(We=B.mode.indent(J,fe.text.slice(xe.length),fe.text),We==ge||We>150)){if(!I)return;D="prev"}D=="prev"?n>B.first?We=H(wt(B,n-1).text,null,se):We=0:D=="add"?We=pe+e.options.indentUnit:D=="subtract"?We=pe-e.options.indentUnit:typeof D=="number"&&(We=pe+D),We=Math.max(0,We);var Ve="",ut=0;if(e.options.indentWithTabs)for(var it=Math.floor(We/se);it;--it)ut+=se,Ve+=" ";if(utse,pe=At(n),xe=null;if(fe&&I.ranges.length>1)if(ea&&ea.text.join(` `)==n){if(I.ranges.length%ea.text.length==0){xe=[];for(var We=0;We=0;ut--){var it=I.ranges[ut],gt=it.from(),xt=it.to();it.empty()&&(D&&D>0?gt=bt(gt.line,gt.ch-D):e.state.overwrite&&!fe?xt=bt(xt.line,Math.min(wt(J,xt.line).text.length,xt.ch+ie(pe).length)):fe&&ea&&ea.lineWise&&ea.text.join(` `)==pe.join(` `)&&(gt=xt=bt(gt.line,0)));var Rt={from:gt,to:xt,text:xe?xe[ut%xe.length]:pe,origin:B||(fe?"paste":e.state.cutIncoming>se?"cut":"+input")};Ka(e.doc,Rt),Rr(e,"inputRead",e,Rt)}n&&!fe&&ll(e,n),ya(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ve),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,n){var D=e.clipboardData&&e.clipboardData.getData("Text");if(D)return e.preventDefault(),!n.isReadOnly()&&!n.options.disableInput&&Oi(n,function(){return hs(n,D,0,null,"paste")}),!0}function ll(e,n){if(!e.options.electricChars||!e.options.smartIndent)return;for(var D=e.doc.sel,I=D.ranges.length-1;I>=0;I--){var B=D.ranges[I];if(B.head.ch>100||I&&D.ranges[I-1].head.line==B.head.line)continue;var J=e.getModeAt(B.head),se=!1;if(J.electricChars){for(var fe=0;fe-1){se=To(e,B.head.line,"smart");break}}else J.electricInput&&(J.electricInput.test(wt(e.doc,B.head.line).text.slice(0,B.head.ch))&&(se=To(e,B.head.line,"smart")));se&&Rr(e,"electricInput",e,B.head.line)}}function ul(e){for(var n=[],D=[],I=0;IJ&&(To(this,fe.head.line,I,!0),J=fe.head.line,se==this.doc.sel.primIndex&&ya(this));else{var pe=fe.from(),xe=fe.to(),We=Math.max(J,pe.line);J=Math.min(this.lastLine(),xe.line-(xe.ch?0:1))+1;for(var Ve=We;Ve0&&is(this.doc,se,new ln(pe,ut[se].to()),ve)}}}),getTokenAt:function(I,B){return Hr(this,I,B)},getLineTokens:function(I,B){return Hr(this,bt(I),B,!0)},getTokenTypeAt:function(I){I=K(this.doc,I);var B=pt(this,wt(this.doc,I.line)),J=0,se=(B.length-1)/2,fe=I.ch,pe;if(fe==0)pe=B[2];else for(;;){var xe=J+se>>1;if((xe?B[xe*2-1]:0)>=fe)se=xe;else if(B[xe*2+1]pe&&(I=pe,se=!0),fe=wt(this.doc,I)}else fe=I;return Yr(this,fe,{top:0,left:0},B||"page",J||se).top+(se?this.doc.height-ci(fe):0)},defaultTextHeight:function(){return Wn(this.display)},defaultCharWidth:function(){return ri(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(I,B,J,se,fe){var pe=this.display;I=Br(this,K(this.doc,I));var xe=I.bottom,We=I.left;if(B.style.position="absolute",B.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(B),pe.sizer.appendChild(B),se=="over")xe=I.top;else if(se=="above"||se=="near"){var Ve=Math.max(pe.wrapper.clientHeight,this.doc.height),ut=Math.max(pe.sizer.clientWidth,pe.lineSpace.clientWidth);(se=="above"||I.bottom+B.offsetHeight>Ve)&&I.top>B.offsetHeight?xe=I.top-B.offsetHeight:I.bottom+B.offsetHeight<=Ve&&(xe=I.bottom),We+B.offsetWidth>ut&&(We=ut-B.offsetWidth)}B.style.top=xe+"px",B.style.left=B.style.right="",fe=="right"?(We=pe.sizer.clientWidth-B.offsetWidth,B.style.right="0px"):(fe=="left"?We=0:fe=="middle"&&(We=(pe.sizer.clientWidth-B.offsetWidth)/2),B.style.left=We+"px"),J&&Co(this,{left:We,top:xe,right:We+B.offsetWidth,bottom:xe+B.offsetHeight})},triggerOnKeyDown:vi(Qs),triggerOnKeyPress:vi(el),triggerOnKeyUp:Zs,triggerOnMouseDown:vi(tl),execCommand:function(I){if(_o.hasOwnProperty(I))return _o[I].call(null,this)},triggerElectric:vi(function(I){ll(this,I)}),findPosH:function(I,B,J,se){var fe=1;B<0&&(fe=-1,B=-B);for(var pe=K(this.doc,I),xe=0;xe0&&We(J.charAt(se-1));)--se;for(;fe.5||this.options.lineWrapping)&&Ci(this),ze(this,"refresh",this)}),swapDoc:vi(function(I){var B=this.doc;return B.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,I),Tr(this),this.display.input.reset(),ba(this,I.scrollLeft,I.scrollTop),this.curOp.forceScroll=!0,Rr(this,"swapDoc",this,B),B}),phrase:function(I){var B=this.options.phrases;return B&&Object.prototype.hasOwnProperty.call(B,I)?B[I]:I},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}},Me(e),e.registerHelper=function(I,B,J){D.hasOwnProperty(I)||(D[I]=e[I]={_global:[]}),D[I][B]=J},e.registerGlobalHelper=function(I,B,J,se){e.registerHelper(I,B,se),D[I]._global.push({pred:J,val:se})}}function fs(e,n,D,I,B){var J=n,se=D,fe=wt(e,n.line),pe=B&&e.direction=="rtl"?-D:D;function xe(){var Gt=n.line+pe;return Gt=e.first+e.size?!1:(n=new bt(Gt,n.ch,n.sticky),fe=wt(e,Gt))}function We(Gt){var Nt;if(I=="codepoint"){var $t=fe.text.charCodeAt(n.ch+(I>0?0:-1));isNaN($t)?Nt=null:Nt=new bt(n.line,Math.max(0,Math.min(fe.text.length,n.ch+D*($t>=55296&&$t<56320?2:1))),-D)}else B?Nt=Pl(e.cm,fe,n,D):Nt=os(fe,n,D);if(Nt==null)if(!Gt&&xe())n=ss(B,e.cm,fe,n.line,pe);else return!1;else n=Nt;return!0}if(I=="char"||I=="codepoint")We();else if(I=="column")We(!0);else if(I=="word"||I=="group")for(var Ve=null,ut=I=="group",it=e.cm&&e.cm.getHelper(n,"wordChars"),gt=!0;!(D<0&&!We(!gt));gt=!1){var xt=fe.text.charAt(n.ch)||` `,Rt=Y(xt,it)?"w":ut&&xt==` `?"n":!ut||/\s/.test(xt)?null:"p";if(ut&&!gt&&!Rt&&(Rt="s"),Ve&&Ve!=Rt){D<0&&(D=1,We(),n.sticky="after");break}if(Rt&&(Ve=Rt),D>0&&!We(!gt))break}var Pt=Fo(e,n,J,se,!0);return Jr(J,Pt)&&(Pt.hitSide=!0),Pt}function hl(e,n,D,I){var B=e.doc,J=n.left,se;if(I=="page"){var fe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),pe=Math.max(fe-.5*Wn(e.display),3);se=(D>0?n.bottom:n.top)+D*pe}else I=="line"&&(se=D>0?n.bottom+3:n.top-3);for(var xe;!(xe=Wr(e,J,se),!xe.outside);){if(D<0?se<=0:se>=B.height){xe.hitSide=!0;break}se+=D*5}return xe}var bn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};bn.prototype.init=function(e){var n=this,D=this,I=D.cm,B=D.div=e.lineDiv;cl(B,I.options.spellcheck,I.options.autocorrect,I.options.autocapitalize);function J(fe){for(var pe=fe.target;pe;pe=pe.parentNode){if(pe==B)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(pe.className))break}return!1}Ie(B,"paste",function(fe){if(!J(fe)||Ze(I,fe)||sl(fe,I))return;b<=11&&setTimeout(Kn(I,function(){return n.updateFromDOM()}),20)}),Ie(B,"compositionstart",function(fe){n.composing={data:fe.data,done:!1}}),Ie(B,"compositionupdate",function(fe){n.composing||(n.composing={data:fe.data,done:!1})}),Ie(B,"compositionend",function(fe){n.composing&&(fe.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Ie(B,"touchstart",function(){return D.forceCompositionEnd()}),Ie(B,"input",function(){n.composing||n.readFromDOMSoon()});function se(fe){if(!J(fe)||Ze(I,fe))return;if(I.somethingSelected())Go({lineWise:!1,text:I.getSelections()}),fe.type=="cut"&&I.replaceSelection("",null,"cut");else if(I.options.lineWiseCopyCut){var pe=ul(I);Go({lineWise:!0,text:pe.text}),fe.type=="cut"&&I.operation(function(){I.setSelections(pe.ranges,0,ve),I.replaceSelection("",null,"cut")})}else return;if(fe.clipboardData){fe.clipboardData.clearData();var xe=ea.text.join(` `);if(fe.clipboardData.setData("Text",xe),fe.clipboardData.getData("Text")==xe){fe.preventDefault();return}}var We=dl(),Ve=We.firstChild;I.display.lineSpace.insertBefore(We,I.display.lineSpace.firstChild),Ve.value=ea.text.join(` `);var ut=document.activeElement;G(Ve),setTimeout(function(){I.display.lineSpace.removeChild(We),ut.focus(),ut==B&&D.showPrimarySelection()},50)}Ie(B,"copy",se),Ie(B,"cut",se)},bn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},bn.prototype.prepareSelection=function(){var e=Ji(this.cm,!1);return e.focus=document.activeElement==this.div,e},bn.prototype.showSelection=function(e,n){if(!e||!this.cm.display.view.length)return;(e.focus||n)&&this.showPrimarySelection(),this.showMultipleSelections(e)},bn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},bn.prototype.showPrimarySelection=function(){var e=this.getSelection(),n=this.cm,D=n.doc.sel.primary(),I=D.from(),B=D.to();if(n.display.viewTo==n.display.viewFrom||I.line>=n.display.viewTo||B.line=n.display.viewFrom&&fl(n,I)||{node:fe[0].measure.map[2],offset:0},xe=B.linee.firstLine()&&(I=bt(I.line-1,wt(e.doc,I.line-1).length)),B.ch==wt(e.doc,B.line).text.length&&B.linen.viewTo-1)return!1;var J,se,fe;I.line==n.viewFrom||(J=wn(e,I.line))==0?(se=Ut(n.view[0].line),fe=n.view[0].node):(se=Ut(n.view[J].line),fe=n.view[J-1].node.nextSibling);var pe=wn(e,B.line),xe,We;if(pe==n.view.length-1?(xe=n.viewTo-1,We=n.lineDiv.lastChild):(xe=Ut(n.view[pe+1].line)-1,We=n.view[pe+1].node.previousSibling),!fe)return!1;for(var Ve=e.doc.splitLines(ru(e,fe,We,se,xe)),ut=wr(e.doc,bt(se,0),bt(xe,wt(e.doc,xe).text.length));Ve.length>1&&ut.length>1;)if(ie(Ve)==ie(ut))Ve.pop(),ut.pop(),xe--;else if(Ve[0]==ut[0])Ve.shift(),ut.shift(),se++;else break;for(var it=0,gt=0,xt=Ve[0],Rt=ut[0],Pt=Math.min(xt.length,Rt.length);itI.ch&&Gt.charCodeAt(Gt.length-gt-1)==Nt.charCodeAt(Nt.length-gt-1);)it--,gt++;Ve[Ve.length-1]=Gt.slice(0,Gt.length-gt).replace(/^\u200b+/,""),Ve[0]=Ve[0].slice(it).replace(/\u200b+$/,"");var dr=bt(se,it),ar=bt(xe,ut.length?ie(ut).length-gt:0);if(Ve.length>1||Ve[0]||Bt(dr,ar))return Va(e.doc,Ve,dr,ar,"+input"),!0},bn.prototype.ensurePolled=function(){this.forceCompositionEnd()},bn.prototype.reset=function(){this.forceCompositionEnd()},bn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},bn.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)},bn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Oi(this.cm,function(){return yn(e.cm)})},bn.prototype.setUneditable=function(e){e.contentEditable="false"},bn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Kn(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},bn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},bn.prototype.onContextMenu=function(){},bn.prototype.resetPosition=function(){},bn.prototype.needsContentAttribute=!0;function fl(e,n){var D=$e(e,n.line);if(!D||D.hidden)return null;var I=wt(e.doc,n.line),B=we(D,I,n.line),J=lt(I,e.doc.direction),se="left";if(J){var fe=qe(J,n.ch);se=fe%2?"right":"left"}var pe=St(B.map,n.ch,se);return pe.offset=pe.collapse=="right"?pe.end:pe.start,pe}function tu(e){for(var n=e;n;n=n.parentNode)if(/CodeMirror-gutter-wrapper/.test(n.className))return!0;return!1}function Qa(e,n){return n&&(e.bad=!0),e}function ru(e,n,D,I,B){var J="",se=!1,fe=e.doc.lineSeparator(),pe=!1;function xe(it){return function(gt){return gt.id==it}}function We(){se&&(J+=fe,pe&&(J+=fe),se=pe=!1)}function Ve(it){it&&(We(),J+=it)}function ut(it){if(it.nodeType==1){var gt=it.getAttribute("cm-text");if(gt){Ve(gt);return}var xt=it.getAttribute("cm-marker"),Rt;if(xt){var Pt=e.findMarks(bt(I,0),bt(B+1,0),xe(+xt));Pt.length&&(Rt=Pt[0].find(0))&&Ve(wr(e.doc,Rt.from,Rt.to).join(fe));return}if(it.getAttribute("contenteditable")=="false")return;var Gt=/^(pre|div|p|li|table|br)$/i.test(it.nodeName);if(!/^br$/i.test(it.nodeName)&&it.textContent.length==0)return;Gt&&We();for(var Nt=0;Nt=9&&n.hasSelection&&(n.hasSelection=null),D.poll()}),Ie(B,"paste",function(se){if(Ze(I,se)||sl(se,I))return;I.state.pasteIncoming=+new Date,D.fastPoll()});function J(se){if(Ze(I,se))return;if(I.somethingSelected())Go({lineWise:!1,text:I.getSelections()});else if(I.options.lineWiseCopyCut){var fe=ul(I);Go({lineWise:!0,text:fe.text}),se.type=="cut"?I.setSelections(fe.ranges,null,ve):(D.prevInput="",B.value=fe.text.join(` `),G(B))}else return;se.type=="cut"&&(I.state.cutIncoming=+new Date)}Ie(B,"cut",J),Ie(B,"copy",J),Ie(e.scroller,"paste",function(se){if(Jn(e,se)||Ze(I,se))return;if(!B.dispatchEvent){I.state.pasteIncoming=+new Date,D.focus();return}var fe=new Event("paste");fe.clipboardData=se.clipboardData,B.dispatchEvent(fe)}),Ie(e.lineSpace,"selectstart",function(se){Jn(e,se)||Ee(se)}),Ie(B,"compositionstart",function(){var se=I.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:se,range:I.markText(se,I.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(B,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},Xn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Xn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Xn.prototype.prepareSelection=function(){var e=this.cm,n=e.display,D=e.doc,I=Ji(e);if(e.options.moveInputWithCursor){var B=Br(e,D.sel.primary().head,"div"),J=n.wrapper.getBoundingClientRect(),se=n.lineDiv.getBoundingClientRect();I.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,B.top+se.top-J.top)),I.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,B.left+se.left-J.left))}return I},Xn.prototype.showSelection=function(e){var n=this.cm,D=n.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")},Xn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var n=this.cm;if(n.somethingSelected()){this.prevInput="";var D=n.getSelection();this.textarea.value=D,n.state.focused&&G(this.textarea),S&&b>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",S&&b>=9&&(this.hasSelection=null))},Xn.prototype.getField=function(){return this.textarea},Xn.prototype.supportsTouch=function(){return!1},Xn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!a||V()!=this.textarea))try{this.textarea.focus()}catch(e){}},Xn.prototype.blur=function(){this.textarea.blur()},Xn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xn.prototype.receivedFocus=function(){this.slowPoll()},Xn.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()})},Xn.prototype.fastPoll=function(){var e=!1,n=this;n.pollingFast=!0;function D(){var I=n.poll();!I&&!e?(e=!0,n.polling.set(60,D)):(n.pollingFast=!1,n.slowPoll())}n.polling.set(20,D)},Xn.prototype.poll=function(){var e=this,n=this.cm,D=this.textarea,I=this.prevInput;if(this.contextMenuPending||!n.state.focused||_t(D)&&!I&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var B=D.value;if(B==I&&!n.somethingSelected())return!1;if(S&&b>=9&&this.hasSelection===B||u&&/[\uf700-\uf7ff]/.test(B))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var J=B.charCodeAt(0);if(J==8203&&!I&&(I="\u200B"),J==8666)return this.reset(),this.cm.execCommand("undo")}for(var se=0,fe=Math.min(I.length,B.length);se1e3||B.indexOf(` `)>-1?D.value=e.prevInput="":e.prevInput=B,e.composing&&(e.composing.range.clear(),e.composing.range=n.markText(e.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Xn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xn.prototype.onKeyPress=function(){S&&b>=9&&(this.hasSelection=null),this.fastPoll()},Xn.prototype.onContextMenu=function(e){var n=this,D=n.cm,I=D.display,B=n.textarea;n.contextMenuPending&&n.contextMenuPending();var J=ni(D,e),se=I.scroller.scrollTop;if(!J||l)return;var fe=D.options.resetSelectionOnContextMenu;fe&&D.doc.sel.contains(J)==-1&&Kn(D,wi)(D.doc,Zi(J),ve);var pe=B.style.cssText,xe=n.wrapper.style.cssText,We=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",B.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-We.top-5)+"px; left: "+(e.clientX-We.left-5)+`px; z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ve;p&&(Ve=window.scrollY),I.input.focus(),p&&window.scrollTo(null,Ve),I.input.reset(),D.somethingSelected()||(B.value=n.prevInput=" "),n.contextMenuPending=it,I.selForContextMenu=D.doc.sel,clearTimeout(I.detectingSelectAll);function ut(){if(B.selectionStart!=null){var xt=D.somethingSelected(),Rt="\u200B"+(xt?B.value:"");B.value="\u21DA",B.value=Rt,n.prevInput=xt?"":"\u200B",B.selectionStart=1,B.selectionEnd=Rt.length,I.selForContextMenu=D.doc.sel}}function it(){if(n.contextMenuPending!=it)return;if(n.contextMenuPending=!1,n.wrapper.style.cssText=xe,B.style.cssText=pe,S&&b<9&&I.scrollbars.setScrollTop(I.scroller.scrollTop=se),B.selectionStart!=null){(!S||S&&b<9)&&ut();var xt=0,Rt=function(){I.selForContextMenu==D.doc.sel&&B.selectionStart==0&&B.selectionEnd>0&&n.prevInput=="\u200B"?Kn(D,Is)(D):xt++<10?I.detectingSelectAll=setTimeout(Rt,500):(I.selForContextMenu=null,I.input.reset())};I.detectingSelectAll=setTimeout(Rt,200)}}if(S&&b>=9&&ut(),R){Fe(e);var gt=function(){ot(window,"mouseup",gt),setTimeout(it,20)};Ie(window,"mouseup",gt)}else setTimeout(it,50)},Xn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Xn.prototype.setUneditable=function(){},Xn.prototype.needsContentAttribute=!1;function iu(e,n){if(n=n?P(n):{},n.value=e.value,!n.tabindex&&e.tabIndex&&(n.tabindex=e.tabIndex),!n.placeholder&&e.placeholder&&(n.placeholder=e.placeholder),n.autofocus==null){var D=V();n.autofocus=D==e||e.getAttribute("autofocus")!=null&&D==document.body}function I(){e.value=fe.getValue()}var B;if(e.form&&(Ie(e.form,"submit",I),!n.leaveSubmitMethodAlone)){var J=e.form;B=J.submit;try{var se=J.submit=function(){I(),J.submit=B,J.submit(),J.submit=se}}catch(pe){}}n.finishInit=function(pe){pe.save=I,pe.getTextArea=function(){return e},pe.toTextArea=function(){pe.toTextArea=isNaN,I(),e.parentNode.removeChild(pe.getWrapperElement()),e.style.display="",e.form&&(ot(e.form,"submit",I),!n.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=B))}},e.style.display="none";var fe=Pn(function(pe){return e.parentNode.insertBefore(pe,e.nextSibling)},n);return fe}function au(e){e.off=ot,e.on=Ie,e.wheelEventPixels=so,e.Doc=ki,e.splitLines=At,e.countColumn=H,e.findColumn=Te,e.isWordChar=q,e.Pass=ge,e.signal=ze,e.Line=di,e.changeEnd=qi,e.scrollbarModel=io,e.Pos=bt,e.cmpPos=Bt,e.modes=rr,e.mimeModes=Wt,e.resolveMode=dt,e.getMode=Et,e.modeExtensions=jt,e.extendMode=kt,e.copyState=hr,e.startState=Ct,e.innerMode=Nn,e.commands=_o,e.keyMap=ma,e.keyName=Vs,e.isModifierKey=Gs,e.lookupKey=Ya,e.normalizeKeyMap=Ml,e.StringStream=Dt,e.SharedTextMarker=vo,e.TextMarker=Ta,e.LineWidget=go,e.e_preventDefault=Ee,e.e_stopPropagation=Ce,e.e_stop=Fe,e.addClass=z,e.contains=A,e.rmClass=g,e.keyNames=Sa}Jl(Pn),eu(Pn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Vo in ki.prototype)ki.prototype.hasOwnProperty(Vo)&&re(ou,Vo)<0&&(Pn.prototype[Vo]=function(e){return function(){return e.apply(this.doc,arguments)}}(ki.prototype[Vo]));return Me(ki),Pn.inputStyles={textarea:Xn,contenteditable:bn},Pn.defineMode=function(e){!Pn.defaults.mode&&e!="null"&&(Pn.defaults.mode=e),Lt.apply(this,arguments)},Pn.defineMIME=nr,Pn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Pn.defineMIME("text/plain","null"),Pn.defineExtension=function(e,n){Pn.prototype[e]=n},Pn.defineDocExtension=function(e,n){ki.prototype[e]=n},Pn.fromTextArea=iu,au(Pn),Pn.version="5.58.2",Pn})},WYAk:function(F,Q,j){(function(N,v){F.exports=Q=v(j("Ib8C"))})(this,function(N){(function(){var v=N,C=v.lib,k=C.Base,y=v.enc,m=y.Utf8,S=v.algo,b=S.HMAC=k.extend({init:function(p,d){p=this._hasher=new p.init,typeof d=="string"&&(d=m.parse(d));var t=p.blockSize,l=t*4;d.sigBytes>l&&(d=p.finalize(d)),d.clamp();for(var r=this._oKey=d.clone(),i=this._iKey=d.clone(),o=r.words,s=i.words,c=0;c1&&arguments[1]!==void 0?arguments[1]:!1,De=ve.getAttribute("id")||ve.getAttribute("data-reactid")||ve.getAttribute("name");if(de&&V[De])return V[De];var Te=window.getComputedStyle(ve),he=Te.getPropertyValue("box-sizing")||Te.getPropertyValue("-moz-box-sizing")||Te.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(Te.getPropertyValue("padding-bottom"))+parseFloat(Te.getPropertyValue("padding-top")),ie=parseFloat(Te.getPropertyValue("border-bottom-width"))+parseFloat(Te.getPropertyValue("border-top-width")),Se=A.map(function(ce){return"".concat(ce,":").concat(Te.getPropertyValue(ce))}).join(";"),ne={sizingStyle:Se,paddingSize:ue,borderSize:ie,boxSizing:he};return de&&De&&(V[De]=ne),ne}function G(ve){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Te=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)),ve.getAttribute("wrap")?z.setAttribute("wrap",ve.getAttribute("wrap")):z.removeAttribute("wrap");var he=W(ve,de),ue=he.paddingSize,ie=he.borderSize,Se=he.boxSizing,ne=he.sizingStyle;z.setAttribute("style","".concat(ne,";").concat(L)),z.value=ve.value||ve.placeholder||"";var ce=Number.MIN_SAFE_INTEGER,Oe=Number.MAX_SAFE_INTEGER,oe=z.scrollHeight,q;if(Se==="border-box"?oe+=ie:Se==="content-box"&&(oe-=ue),De!==null||Te!==null){z.value=" ";var Y=z.scrollHeight-ue;De!==null&&(ce=Y*De,Se==="border-box"&&(ce=ce+ue+ie),oe=Math.max(ce,oe)),Te!==null&&(Oe=Y*Te,Se==="border-box"&&(Oe=Oe+ue+ie),q=oe>Oe?"":"hidden",oe=Math.min(Oe,oe))}return{height:oe,minHeight:ce,maxHeight:Oe,overflowY:q,resize:"none"}}var U=j("Gytx"),P=j.n(U),H;(function(ve){ve[ve.NONE=0]="NONE",ve[ve.RESIZING=1]="RESIZING",ve[ve.RESIZED=2]="RESIZED"})(H||(H={}));var $=function(ve){Object(k.a)(De,ve);var de=Object(y.a)(De);function De(Te){var he;return Object(v.a)(this,De),he=de.call(this,Te),he.nextFrameActionId=void 0,he.resizeFrameId=void 0,he.textArea=void 0,he.saveTextArea=function(ue){he.textArea=ue},he.handleResize=function(ue){var ie=he.state.resizeStatus,Se=he.props,ne=Se.autoSize,ce=Se.onResize;if(ie!==H.NONE)return;typeof ce=="function"&&ce(ue),ne&&he.resizeOnNextFrame()},he.resizeOnNextFrame=function(){cancelAnimationFrame(he.nextFrameActionId),he.nextFrameActionId=requestAnimationFrame(he.resizeTextarea)},he.resizeTextarea=function(){var ue=he.props.autoSize;if(!ue||!he.textArea)return;var ie=ue.minRows,Se=ue.maxRows,ne=G(he.textArea,!1,ie,Se);he.setState({textareaStyles:ne,resizeStatus:H.RESIZING},function(){cancelAnimationFrame(he.resizeFrameId),he.resizeFrameId=requestAnimationFrame(function(){he.setState({resizeStatus:H.RESIZED},function(){he.resizeFrameId=requestAnimationFrame(function(){he.setState({resizeStatus:H.NONE}),he.fixFirefoxAutoScroll()})})})})},he.renderTextArea=function(){var ue=he.props,ie=ue.prefixCls,Se=ie===void 0?"rc-textarea":ie,ne=ue.autoSize,ce=ue.onResize,Oe=ue.className,oe=ue.disabled,q=he.state,Y=q.textareaStyles,Z=q.resizeStatus,ye=Object(E.a)(he.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),be=M()(Se,Oe,Object(b.a)({},"".concat(Se,"-disabled"),oe));"value"in ye&&(ye.value=ye.value||"");var Re=Object(S.a)(Object(S.a)(Object(S.a)({},he.props.style),Y),Z===H.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(x,{onResize:he.handleResize,disabled:!(ne||ce)},m.createElement("textarea",Object(N.a)({},ye,{className:be,style:Re,ref:he.saveTextArea})))},he.state={textareaStyles:{},resizeStatus:H.NONE},he}return Object(C.a)(De,[{key:"componentDidUpdate",value:function(he){(he.value!==this.props.value||!P()(he.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 he=this.textArea.selectionStart,ue=this.textArea.selectionEnd;this.textArea.setSelectionRange(he,ue)}}catch(ie){}}},{key:"render",value:function(){return this.renderTextArea()}}]),De}(m.Component),re=$,te=function(ve){Object(k.a)(De,ve);var de=Object(y.a)(De);function De(Te){var he;Object(v.a)(this,De),he=de.call(this,Te),he.resizableTextArea=void 0,he.focus=function(){he.resizableTextArea.textArea.focus()},he.saveTextArea=function(ie){he.resizableTextArea=ie},he.handleChange=function(ie){var Se=he.props.onChange;he.setValue(ie.target.value,function(){he.resizableTextArea.resizeTextarea()}),Se&&Se(ie)},he.handleKeyDown=function(ie){var Se=he.props,ne=Se.onPressEnter,ce=Se.onKeyDown;ie.keyCode===13&&ne&&ne(ie),ce&&ce(ie)};var ue=typeof Te.value=="undefined"||Te.value===null?Te.defaultValue:Te.value;return he.state={value:ue},he}return Object(C.a)(De,[{key:"setValue",value:function(he,ue){"value"in this.props||this.setState({value:he},ue)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(re,Object(N.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(he){return"value"in he?{value:he.value}:null}}]),De}(m.Component),ge=Q.default=te},ZD9Y:function(F,Q,j){"use strict";var N=j("BoS7"),v=j("Sdc0"),C=j("OaEy"),k=j("2fM7"),y=j("cDcd"),m=j.n(y),S=j("lOMy"),b=j.n(S),p=k.a.Option;Q.a=function(d){var t=d.onFontSizeChange,l=d.cmFontSize,r=d.cmCodeMode,i=d.onCodeModeChange,o=d.onTabToSpace,s=d.className,c=s===void 0?"":s,a=d.tabToSpace,u=d.children;return m.a.createElement("div",{className:"tpi-code-setting ".concat(c)},m.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),m.a.createElement(k.a,{bordered:!1,size:"small",value:r,onChange:i},m.a.createElement(p,{value:"vs"},"\u767D\u8272\u80CC\u666F"),m.a.createElement(p,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),m.a.createElement(k.a,{bordered:!1,size:"small",value:l,onChange:t},m.a.createElement(p,{value:12},"12px"),m.a.createElement(p,{value:14},"14px"),m.a.createElement(p,{value:16},"16px"),m.a.createElement(p,{value:18},"18px"),m.a.createElement(p,{value:20},"20px"),m.a.createElement(p,{value:22},"22px"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"Tab\u8F6C\u6362"),m.a.createElement(v.a,{checked:a,onChange:o}))),m.a.createElement("h3",null,"\u5FEB\u6377\u952E"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),m.a.createElement("span",null,"Ctrl + S")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),m.a.createElement("span",null,"F1 / Alt + F1")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),m.a.createElement("span",null,"Ctrl + ]/[")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),m.a.createElement("span",null,"Ctrl + Shift + \\")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),m.a.createElement("span",null,"Home")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),m.a.createElement("span",null,"End"))),u)}},ZW9T:function(F,Q,j){"use strict";j.d(Q,"a",function(){return G});var N=j("k1fw"),v=j("miYZ"),C=j("tsqr"),k=j("rAM+"),y=j("tJVT"),m=j("PpiC"),S=j("cDcd"),b=j.n(S),p=j("bdgK"),d=j("oBTY"),t=j("9og8"),l=j("WmNS"),r=j.n(l),i={keywords:["print","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"]},o={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},s={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"#include",content:'include "$0"'},{label:"printf",content:"printf($0)"},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"for",content:["for( ; ; ){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)}]},c={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},a=j("5VLF"),u=j.n(a),f={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},w=function(P,H){return H.map(function($){return{label:$,kind:P.languages.CompletionItemKind.Keyword,insertText:$}})},_=function(P){return Object.keys(f.tables).map(function(H){return{label:H,kind:P.languages.CompletionItemKind.Variable,insertText:H}})},h=function(P,H){var $=f.tables[P];return $?$.map(function(re){return{label:re,kind:H.languages.CompletionItemKind.Field,insertText:re}}):[]};function R(U,P,H,$,re){var te=P.getWordUntilPosition(H),ge={startLineNumber:H.lineNumber,endLineNumber:H.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn},ve=$.map(function(de){return{label:de,kind:U.languages.CompletionItemKind.Keyword,insertText:de,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ge}});return re.map(function(de){ve.push(Object(N.a)(Object(N.a)({},de),{},{range:ge}))}),ve}var O=function(U){f.languages.map(function(re){return U.languages.registerDocumentFormattingEditProvider(re,{provideDocumentFormattingEdits:function(ge,ve,de){return Object(t.a)(r.a.mark(function De(){var Te;return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return Te=u()(ge.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),ue.abrupt("return",[{range:ge.getFullModelRange(),text:Te}]);case 2:case"end":return ue.stop()}},De)}))()}}),re});var P=s.quickKey.map(function(re){return{label:re.label,kind:U.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),H=c.quickKey.map(function(re){return{label:re.label,kind:U.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),$=o.quickKey.map(function(re){return{label:re.label,kind:U.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}});U.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(d.a)(s.keywords),Object(d.a)(s.quickKey.map(function(re){return re.label}))),provideCompletionItems:function(te,ge){var ve=te.getValueInRange({startLineNumber:ge.lineNumber,startColumn:1,endLineNumber:ge.lineNumber,endColumn:ge.column}),de=ve.match(/cu/gim);console.log("match:",de,ge,ve,te);var De=[],Te=ge.lineNumber,he=ge.column,ue=te.getValueInRange({startLineNumber:Te,startColumn:0,endLineNumber:Te,endColumn:he}),ie=ue.trim().split(/\s+/),Se=ie[ie.length-1];if(Se.endsWith(".")){var ne=Se.slice(0,Se.length-1);Object.keys(f.tables).includes(ne)&&(De=Object(d.a)(h(ne,U)))}else Se==="."?De=[]:De=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,s.keywords)),Object(d.a)(P));return{suggestions:De}}}),U.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(d.a)(i.keywords)),provideCompletionItems:function(te,ge){var ve=te.getValueInRange({startLineNumber:ge.lineNumber,startColumn:1,endLineNumber:ge.lineNumber,endColumn:ge.column}),de=ve.match(/cu/gim);console.log("match:",de,ge,ve,te);var De=[],Te=ge.lineNumber,he=ge.column,ue=te.getValueInRange({startLineNumber:Te,startColumn:0,endLineNumber:Te,endColumn:he}),ie=ue.trim().split(/\s+/),Se=ie[ie.length-1];if(Se.endsWith(".")){var ne=Se.slice(0,Se.length-1);Object.keys(f.tables).includes(ne)&&(De=Object(d.a)(h(ne,U)))}else Se==="."?De=[]:De=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,i.keywords)));return{suggestions:De}}}),U.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(d.a)(o.keywords)),provideCompletionItems:function(te,ge){var ve=[],de=ge.lineNumber,De=ge.column,Te=te.getValueInRange({startLineNumber:de,startColumn:0,endLineNumber:de,endColumn:De}),he=Te.trim().split(/\s+/),ue=he[he.length-1];if(ue.endsWith(".")){var ie=ue.slice(0,ue.length-1);Object.keys(f.tables).includes(ie)&&(ve=Object(d.a)(h(ie,U)))}else ue==="."?ve=[]:ve=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,o.keywords)),Object(d.a)($));return{suggestions:ve}}}),U.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(d.a)(c.keywords)),provideCompletionItems:function(te,ge){var ve=[],de=ge.lineNumber,De=ge.column,Te=te.getValueInRange({startLineNumber:de,startColumn:0,endLineNumber:de,endColumn:De}),he=Te.trim().split(/\s+/),ue=he[he.length-1];if(ue.endsWith(".")){var ie=ue.slice(0,ue.length-1);Object.keys(f.tables).includes(ie)&&(ve=Object(d.a)(h(ie,U)))}else ue==="."?ve=[]:ve=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,c.keywords)),Object(d.a)(H));return{suggestions:ve}}})},g="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",x=j("LvDl"),E=j("+ua5");function T(U){return/^\d+$/.test(U)?"".concat(U,"px"):U}function M(){}var L=!1,A={"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 V(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=U;if(Array.isArray(U)){for(var H=0;H0||hr.target.offsetWidth>0)&&ze.current.instance.layout()}}catch(Nn){jt.e(Nn)}finally{jt.f()}}),dt.observe(ot.current)),dt}function Be(){C.b.warn(decodeURIComponent(g))}var et=function(){var Et=ze.current.instance;if(te!=null&&Et&&Ce){var jt=Et.getModel();jt&&te!==jt.getValue()&&(L=!0,jt.setValue(te),Et.layout(),L=!1)}};Object(S.useEffect)(function(){Ze.current&&clearTimeout(Ze.current),Ze.current=setTimeout(function(){et()},500)},[te,Ce,ze.current]),Object(S.useEffect)(function(){if(lt&&ze.current&&ze.current.instance){var dt=ze.current.instance;dt.changeViewZones(function(jt){var kt=document.createElement("div");kt.style.padding="10px 20px",kt.style.width="calc(100% - 20px)",kt.className="my-error-line-wrp",kt.innerHTML=Ie,jt.addZone({afterLineNumber:lt||11,heightInLines:3,domNode:kt})});var Et={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}};dt.addOverlayWidget(Et),dt.revealPositionInCenter({lineNumber:20,column:1})}},[lt,ze.current,Ce]);function ct(){var dt=ze.current.instance;if(dt){var Et=dt.getSelection(),jt=ze.current.pastePos||{},kt=new z.Range(jt.startLineNumber||Et.endLineNumber,jt.startColumn||Et.endColumn,jt.endLineNumber||Et.endLineNumber,jt.endColumn||Et.endColumn);setTimeout(function(){dt.executeEdits("",[{range:kt,text:""}])},300)}}function yt(dt){(window.navigator.platform.match("Mac")?dt.metaKey:dt.ctrlKey)&&dt.keyCode==83&&(dt.preventDefault(),Oe())}var ft=function(){if(q&&ze.current.instance){var Et=ze.current.instance.getContentHeight();Lt(Et0||Re.target.offsetWidth>0)&&q.layout()}}catch(Qe){ye.e(Qe)}finally{ye.f()}}),Y.observe(Te.current)),Y}Object(S.useEffect)(function(){Te.current&&j.e(27).then(j.t.bind(null,"M/lh",7)).then(function(q){z=q;var Y=z.editor.createDiffEditor(Te.current,Object(N.a)(Object(N.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},De),{},{wordWrap:!0}));Se(Y);var Z=ne(Y);return function(){Y.dispose();var ye=Y.getModel();ye&&ye.dispose(),Z.unobserve(Te.current)}})},[]),Object(S.useEffect)(function(){ie&&ie.setModel({original:z.editor.createModel(te,ve),modified:z.editor.createModel(ge,ve)})},[te,ge,ve,ie]);var ce=T(H),Oe=T(re),oe={width:ce,height:Oe};return b.a.createElement("div",{className:"my-diff-editor",ref:Te,style:oe})}},ZpRC:function(F,Q,j){"use strict";function N(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function v(t,l){return(!l||t!=="hidden")&&t!=="visible"&&t!=="clip"}function C(t,l){if(t.clientHeightl||s>t&&c=l&&a>=r?s-t-i:c>l&&ar?c-l+o:0}var y=function(t,l){var r=window,i=l.scrollMode,o=l.block,s=l.inline,c=l.boundary,a=l.skipOverflowHiddenElements,u=typeof c=="function"?c:function(Y){return Y!==c};if(!N(t))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,w=[],_=t;N(_)&&u(_);){if((_=_.parentElement)===f){w.push(_);break}_!=null&&_===document.body&&C(_)&&!C(document.documentElement)||_!=null&&C(_,a)&&w.push(_)}for(var h=r.visualViewport?r.visualViewport.width:innerWidth,R=r.visualViewport?r.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,x=t.getBoundingClientRect(),E=x.height,T=x.width,M=x.top,L=x.right,A=x.bottom,V=x.left,z=o==="start"||o==="nearest"?M:o==="end"?A:M+E/2,W=s==="center"?V+T/2:s==="end"?L:V,G=[],U=0;U=0&&V>=0&&A<=R&&L<=h&&M>=te&&A<=ve&&V>=de&&L<=ge)return G;var De=getComputedStyle(P),Te=parseInt(De.borderLeftWidth,10),he=parseInt(De.borderTopWidth,10),ue=parseInt(De.borderRightWidth,10),ie=parseInt(De.borderBottomWidth,10),Se=0,ne=0,ce="offsetWidth"in P?P.offsetWidth-P.clientWidth-Te-ue:0,Oe="offsetHeight"in P?P.offsetHeight-P.clientHeight-he-ie:0;if(f===P)Se=o==="start"?z:o==="end"?z-R:o==="nearest"?k(g,g+R,R,he,ie,g+z,g+z+E,E):z-R/2,ne=s==="start"?W:s==="center"?W-h/2:s==="end"?W-h:k(O,O+h,h,Te,ue,O+W,O+W+T,T),Se=Math.max(0,Se+g),ne=Math.max(0,ne+O);else{Se=o==="start"?z-te-he:o==="end"?z-ve+ie+Oe:o==="nearest"?k(te,ve,$,he,ie+Oe,z,z+E,E):z-(te+$/2)+Oe/2,ne=s==="start"?W-de-Te:s==="center"?W-(de+re/2)+ce/2:s==="end"?W-ge+ue+ce:k(de,ge,re,Te,ue+ce,W,W+T,T);var oe=P.scrollLeft,q=P.scrollTop;z+=q-(Se=Math.max(0,Math.min(q+Se,P.scrollHeight-$+Oe))),W+=oe-(ne=Math.max(0,Math.min(oe+ne,P.scrollWidth-re+ce)))}G.push({el:P,top:Se,left:ne})}return G};function m(t){return t===Object(t)&&Object.keys(t).length!==0}function S(t,l){l===void 0&&(l="auto");var r="scrollBehavior"in document.body.style;t.forEach(function(i){var o=i.el,s=i.top,c=i.left;o.scroll&&r?o.scroll({top:s,left:c,behavior:l}):(o.scrollTop=s,o.scrollLeft=c)})}function b(t){return t===!1?{block:"end",inline:"nearest"}:m(t)?t:{block:"start",inline:"nearest"}}function p(t,l){var r=!t.ownerDocument.documentElement.contains(t);if(m(l)&&typeof l.behavior=="function")return l.behavior(r?[]:y(t,l));if(r)return;var i=b(l);return S(y(t,i),i.behavior)}var d=Q.a=p},Zss7:function(F,Q,j){var N;(function(v){var C=/^\s+/,k=/\s+$/,y=0,m=v.round,S=v.min,b=v.max,p=v.random;function d(ie,Se){if(ie=ie||"",Se=Se||{},ie instanceof d)return ie;if(!(this instanceof d))return new d(ie,Se);var ne=t(ie);this._originalInput=ie,this._r=ne.r,this._g=ne.g,this._b=ne.b,this._a=ne.a,this._roundA=m(100*this._a)/100,this._format=Se.format||ne.format,this._gradientType=Se.gradientType,this._r<1&&(this._r=m(this._r)),this._g<1&&(this._g=m(this._g)),this._b<1&&(this._b=m(this._b)),this._ok=ne.ok,this._tc_id=y++}d.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 ie=this.toRgb();return(ie.r*299+ie.g*587+ie.b*114)/1e3},getLuminance:function(){var ie=this.toRgb(),Se,ne,ce,Oe,oe,q;return Se=ie.r/255,ne=ie.g/255,ce=ie.b/255,Se<=.03928?Oe=Se/12.92:Oe=v.pow((Se+.055)/1.055,2.4),ne<=.03928?oe=ne/12.92:oe=v.pow((ne+.055)/1.055,2.4),ce<=.03928?q=ce/12.92:q=v.pow((ce+.055)/1.055,2.4),.2126*Oe+.7152*oe+.0722*q},setAlpha:function(ie){return this._a=G(ie),this._roundA=m(100*this._a)/100,this},toHsv:function(){var ie=o(this._r,this._g,this._b);return{h:ie.h*360,s:ie.s,v:ie.v,a:this._a}},toHsvString:function(){var ie=o(this._r,this._g,this._b),Se=m(ie.h*360),ne=m(ie.s*100),ce=m(ie.v*100);return this._a==1?"hsv("+Se+", "+ne+"%, "+ce+"%)":"hsva("+Se+", "+ne+"%, "+ce+"%, "+this._roundA+")"},toHsl:function(){var ie=r(this._r,this._g,this._b);return{h:ie.h*360,s:ie.s,l:ie.l,a:this._a}},toHslString:function(){var ie=r(this._r,this._g,this._b),Se=m(ie.h*360),ne=m(ie.s*100),ce=m(ie.l*100);return this._a==1?"hsl("+Se+", "+ne+"%, "+ce+"%)":"hsla("+Se+", "+ne+"%, "+ce+"%, "+this._roundA+")"},toHex:function(ie){return c(this._r,this._g,this._b,ie)},toHexString:function(ie){return"#"+this.toHex(ie)},toHex8:function(ie){return a(this._r,this._g,this._b,this._a,ie)},toHex8String:function(ie){return"#"+this.toHex8(ie)},toRgb:function(){return{r:m(this._r),g:m(this._g),b:m(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+m(this._r)+", "+m(this._g)+", "+m(this._b)+")":"rgba("+m(this._r)+", "+m(this._g)+", "+m(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:m(U(this._r,255)*100)+"%",g:m(U(this._g,255)*100)+"%",b:m(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%)":"rgba("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(ie){var Se="#"+u(this._r,this._g,this._b,this._a),ne=Se,ce=this._gradientType?"GradientType = 1, ":"";if(ie){var Oe=d(ie);ne="#"+u(Oe._r,Oe._g,Oe._b,Oe._a)}return"progid:DXImageTransform.Microsoft.gradient("+ce+"startColorstr="+Se+",endColorstr="+ne+")"},toString:function(ie){var Se=!!ie;ie=ie||this._format;var ne=!1,ce=this._a<1&&this._a>=0,Oe=!Se&&ce&&(ie==="hex"||ie==="hex6"||ie==="hex3"||ie==="hex4"||ie==="hex8"||ie==="name");return Oe?ie==="name"&&this._a===0?this.toName():this.toRgbString():(ie==="rgb"&&(ne=this.toRgbString()),ie==="prgb"&&(ne=this.toPercentageRgbString()),(ie==="hex"||ie==="hex6")&&(ne=this.toHexString()),ie==="hex3"&&(ne=this.toHexString(!0)),ie==="hex4"&&(ne=this.toHex8String(!0)),ie==="hex8"&&(ne=this.toHex8String()),ie==="name"&&(ne=this.toName()),ie==="hsl"&&(ne=this.toHslString()),ie==="hsv"&&(ne=this.toHsvString()),ne||this.toHexString())},clone:function(){return d(this.toString())},_applyModification:function(ie,Se){var ne=ie.apply(null,[this].concat([].slice.call(Se)));return this._r=ne._r,this._g=ne._g,this._b=ne._b,this.setAlpha(ne._a),this},lighten:function(){return this._applyModification(h,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(ie,Se){return ie.apply(null,[this].concat([].slice.call(Se)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},d.fromRatio=function(ie,Se){if(typeof ie=="object"){var ne={};for(var ce in ie)ie.hasOwnProperty(ce)&&(ce==="a"?ne[ce]=ie[ce]:ne[ce]=ge(ie[ce]));ie=ne}return d(ie,Se)};function t(ie){var Se={r:0,g:0,b:0},ne=1,ce=null,Oe=null,oe=null,q=!1,Y=!1;return typeof ie=="string"&&(ie=he(ie)),typeof ie=="object"&&(Te(ie.r)&&Te(ie.g)&&Te(ie.b)?(Se=l(ie.r,ie.g,ie.b),q=!0,Y=String(ie.r).substr(-1)==="%"?"prgb":"rgb"):Te(ie.h)&&Te(ie.s)&&Te(ie.v)?(ce=ge(ie.s),Oe=ge(ie.v),Se=s(ie.h,ce,Oe),q=!0,Y="hsv"):Te(ie.h)&&Te(ie.s)&&Te(ie.l)&&(ce=ge(ie.s),oe=ge(ie.l),Se=i(ie.h,ce,oe),q=!0,Y="hsl"),ie.hasOwnProperty("a")&&(ne=ie.a)),ne=G(ne),{ok:q,format:ie.format||Y,r:S(255,b(Se.r,0)),g:S(255,b(Se.g,0)),b:S(255,b(Se.b,0)),a:ne}}function l(ie,Se,ne){return{r:U(ie,255)*255,g:U(Se,255)*255,b:U(ne,255)*255}}function r(ie,Se,ne){ie=U(ie,255),Se=U(Se,255),ne=U(ne,255);var ce=b(ie,Se,ne),Oe=S(ie,Se,ne),oe,q,Y=(ce+Oe)/2;if(ce==Oe)oe=q=0;else{var Z=ce-Oe;q=Y>.5?Z/(2-ce-Oe):Z/(ce+Oe);switch(ce){case ie:oe=(Se-ne)/Z+(Se1&&(Re-=1),Re<1/6?ye+(be-ye)*6*Re:Re<1/2?be:Re<2/3?ye+(be-ye)*(2/3-Re)*6:ye}if(Se===0)ce=Oe=oe=ne;else{var Y=ne<.5?ne*(1+Se):ne+Se-ne*Se,Z=2*ne-Y;ce=q(Z,Y,ie+1/3),Oe=q(Z,Y,ie),oe=q(Z,Y,ie-1/3)}return{r:ce*255,g:Oe*255,b:oe*255}}function o(ie,Se,ne){ie=U(ie,255),Se=U(Se,255),ne=U(ne,255);var ce=b(ie,Se,ne),Oe=S(ie,Se,ne),oe,q,Y=ce,Z=ce-Oe;if(q=ce===0?0:Z/ce,ce==Oe)oe=0;else{switch(ce){case ie:oe=(Se-ne)/Z+(Se>1)+720)%360;--Se;)ce.h=(ce.h+Oe)%360,oe.push(d(ce));return oe}function A(ie,Se){Se=Se||6;for(var ne=d(ie).toHsv(),ce=ne.h,Oe=ne.s,oe=ne.v,q=[],Y=1/Se;Se--;)q.push(d({h:ce,s:Oe,v:oe})),oe=(oe+Y)%1;return q}d.mix=function(ie,Se,ne){ne=ne===0?0:ne||50;var ce=d(ie).toRgb(),Oe=d(Se).toRgb(),oe=ne/100,q={r:(Oe.r-ce.r)*oe+ce.r,g:(Oe.g-ce.g)*oe+ce.g,b:(Oe.b-ce.b)*oe+ce.b,a:(Oe.a-ce.a)*oe+ce.a};return d(q)},d.readability=function(ie,Se){var ne=d(ie),ce=d(Se);return(v.max(ne.getLuminance(),ce.getLuminance())+.05)/(v.min(ne.getLuminance(),ce.getLuminance())+.05)},d.isReadable=function(ie,Se,ne){var ce=d.readability(ie,Se),Oe,oe;oe=!1,Oe=ue(ne);switch(Oe.level+Oe.size){case"AAsmall":case"AAAlarge":oe=ce>=4.5;break;case"AAlarge":oe=ce>=3;break;case"AAAsmall":oe=ce>=7;break}return oe},d.mostReadable=function(ie,Se,ne){var ce=null,Oe=0,oe,q,Y,Z;ne=ne||{},q=ne.includeFallbackColors,Y=ne.level,Z=ne.size;for(var ye=0;yeOe&&(Oe=oe,ce=d(Se[ye]));return d.isReadable(ie,ce,{level:Y,size:Z})||!q?ce:(ne.includeFallbackColors=!1,d.mostReadable(ie,["#fff","#000"],ne))};var V=d.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=d.hexNames=W(V);function W(ie){var Se={};for(var ne in ie)ie.hasOwnProperty(ne)&&(Se[ie[ne]]=ne);return Se}function G(ie){return ie=parseFloat(ie),(isNaN(ie)||ie<0||ie>1)&&(ie=1),ie}function U(ie,Se){$(ie)&&(ie="100%");var ne=re(ie);return ie=S(Se,b(0,parseFloat(ie))),ne&&(ie=parseInt(ie*Se,10)/100),v.abs(ie-Se)<1e-6?1:ie%Se/parseFloat(Se)}function P(ie){return S(1,b(0,ie))}function H(ie){return parseInt(ie,16)}function $(ie){return typeof ie=="string"&&ie.indexOf(".")!=-1&&parseFloat(ie)===1}function re(ie){return typeof ie=="string"&&ie.indexOf("%")!=-1}function te(ie){return ie.length==1?"0"+ie:""+ie}function ge(ie){return ie<=1&&(ie=ie*100+"%"),ie}function ve(ie){return v.round(parseFloat(ie)*255).toString(16)}function de(ie){return H(ie)/255}var De=function(){var ie="[-\\+]?\\d+%?",Se="[-\\+]?\\d*\\.\\d+%?",ne="(?:"+Se+")|(?:"+ie+")",ce="[\\s|\\(]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")\\s*\\)?",Oe="[\\s|\\(]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")\\s*\\)?";return{CSS_UNIT:new RegExp(ne),rgb:new RegExp("rgb"+ce),rgba:new RegExp("rgba"+Oe),hsl:new RegExp("hsl"+ce),hsla:new RegExp("hsla"+Oe),hsv:new RegExp("hsv"+ce),hsva:new RegExp("hsva"+Oe),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 Te(ie){return!!De.CSS_UNIT.exec(ie)}function he(ie){ie=ie.replace(C,"").replace(k,"").toLowerCase();var Se=!1;if(V[ie])ie=V[ie],Se=!0;else if(ie=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ne;return(ne=De.rgb.exec(ie))?{r:ne[1],g:ne[2],b:ne[3]}:(ne=De.rgba.exec(ie))?{r:ne[1],g:ne[2],b:ne[3],a:ne[4]}:(ne=De.hsl.exec(ie))?{h:ne[1],s:ne[2],l:ne[3]}:(ne=De.hsla.exec(ie))?{h:ne[1],s:ne[2],l:ne[3],a:ne[4]}:(ne=De.hsv.exec(ie))?{h:ne[1],s:ne[2],v:ne[3]}:(ne=De.hsva.exec(ie))?{h:ne[1],s:ne[2],v:ne[3],a:ne[4]}:(ne=De.hex8.exec(ie))?{r:H(ne[1]),g:H(ne[2]),b:H(ne[3]),a:de(ne[4]),format:Se?"name":"hex8"}:(ne=De.hex6.exec(ie))?{r:H(ne[1]),g:H(ne[2]),b:H(ne[3]),format:Se?"name":"hex"}:(ne=De.hex4.exec(ie))?{r:H(ne[1]+""+ne[1]),g:H(ne[2]+""+ne[2]),b:H(ne[3]+""+ne[3]),a:de(ne[4]+""+ne[4]),format:Se?"name":"hex8"}:(ne=De.hex3.exec(ie))?{r:H(ne[1]+""+ne[1]),g:H(ne[2]+""+ne[2]),b:H(ne[3]+""+ne[3]),format:Se?"name":"hex"}:!1}function ue(ie){var Se,ne;return ie=ie||{level:"AA",size:"small"},Se=(ie.level||"AA").toUpperCase(),ne=(ie.size||"small").toLowerCase(),Se!=="AA"&&Se!=="AAA"&&(Se="AA"),ne!=="small"&&ne!=="large"&&(ne="small"),{level:Se,size:ne}}F.exports?F.exports=d:!(N=function(){return d}.call(Q,j,Q,F),N!==void 0&&(F.exports=N))})(Math)},bCnd:function(F,Q,j){"use strict";j.d(Q,"b",function(){return k}),j.d(Q,"a",function(){return y});var N=j("je13"),v=j.n(N),C=!1;function k(m,S){var b=v.a.get("__ec");b||(b={}),b[m]=S,v.a.set("__ec",b)}function y(m,S){var b=v.a.get("__ec");return b?b[m]===void 0?S:b[m]:S}},bQjk:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("OLod"))})(this,function(N){return function(v){var C=N,k=C.lib,y=k.CipherParams,m=C.enc,S=m.Hex,b=C.format,p=b.Hex={stringify:function(d){return d.ciphertext.toString(S)},parse:function(d){var t=S.parse(d);return y.create({ciphertext:t})}}}(),N.format.Hex})},bT9E:function(F,Q,j){"use strict";j.d(Q,"a",function(){return v});var N=j("VTBJ");function v(C,k){var y=Object(N.a)({},C);return Array.isArray(k)&&k.forEach(function(m){delete y[m]}),y}},biw7:function(F,Q,j){"use strict";var N=j("cDcd"),v=j.n(N),C=N.createContext(null);Q.a=C},c5Ni:function(F,Q,j){},cDPC:function(F,Q,j){"use strict";var N=j("tJVT"),v=j("cDcd"),C=j.n(v),k=j("i3hx"),y=j.n(k);Q.a=function(m){var S=m.defaultX,b=S===void 0?"40%":S,p=m.leftChild,d=m.rightChild,t=m.className,l=m.hideResize,r=l===void 0?!1:l,i=Object(v.useState)(b),o=Object(N.a)(i,2),s=o[0],c=o[1],a=Object(v.useRef)();function u(){a.current=!0}Object(v.useEffect)(function(){function _(R){a.current&&c(R.pageX)}function h(){a.current=!1}return window.addEventListener("mousemove",_),window.addEventListener("mouseup",h),function(){window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",h)}},[]);var f=typeof s=="number"&&s!==.01?"".concat(s,"px"):b,w="calc(100% - ".concat(r?"0px":"4px"," - ").concat(f,")");return C.a.createElement("div",{className:"split-panel-container ".concat(t)},C.a.createElement("section",{style:{width:f,display:s===.01?"none":""}},p),C.a.createElement("section",{className:"resize-x-bar",onMouseDown:u},C.a.createElement("a",{className:"btn-resize"},C.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},C.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),C.a.createElement("section",{style:{width:w}},d))}},cv67:function(F,Q,j){(function(N,v){F.exports=Q=v(j("Ib8C"))})(this,function(N){return function(v){var C=N,k=C.lib,y=k.WordArray,m=k.Hasher,S=C.algo,b=[];(function(){for(var i=0;i<64;i++)b[i]=v.abs(v.sin(i+1))*4294967296|0})();var p=S.MD5=m.extend({_doReset:function(){this._hash=new y.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(i,o){for(var s=0;s<16;s++){var c=o+s,a=i[c];i[c]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360}var u=this._hash.words,f=i[o+0],w=i[o+1],_=i[o+2],h=i[o+3],R=i[o+4],O=i[o+5],g=i[o+6],x=i[o+7],E=i[o+8],T=i[o+9],M=i[o+10],L=i[o+11],A=i[o+12],V=i[o+13],z=i[o+14],W=i[o+15],G=u[0],U=u[1],P=u[2],H=u[3];G=d(G,U,P,H,f,7,b[0]),H=d(H,G,U,P,w,12,b[1]),P=d(P,H,G,U,_,17,b[2]),U=d(U,P,H,G,h,22,b[3]),G=d(G,U,P,H,R,7,b[4]),H=d(H,G,U,P,O,12,b[5]),P=d(P,H,G,U,g,17,b[6]),U=d(U,P,H,G,x,22,b[7]),G=d(G,U,P,H,E,7,b[8]),H=d(H,G,U,P,T,12,b[9]),P=d(P,H,G,U,M,17,b[10]),U=d(U,P,H,G,L,22,b[11]),G=d(G,U,P,H,A,7,b[12]),H=d(H,G,U,P,V,12,b[13]),P=d(P,H,G,U,z,17,b[14]),U=d(U,P,H,G,W,22,b[15]),G=t(G,U,P,H,w,5,b[16]),H=t(H,G,U,P,g,9,b[17]),P=t(P,H,G,U,L,14,b[18]),U=t(U,P,H,G,f,20,b[19]),G=t(G,U,P,H,O,5,b[20]),H=t(H,G,U,P,M,9,b[21]),P=t(P,H,G,U,W,14,b[22]),U=t(U,P,H,G,R,20,b[23]),G=t(G,U,P,H,T,5,b[24]),H=t(H,G,U,P,z,9,b[25]),P=t(P,H,G,U,h,14,b[26]),U=t(U,P,H,G,E,20,b[27]),G=t(G,U,P,H,V,5,b[28]),H=t(H,G,U,P,_,9,b[29]),P=t(P,H,G,U,x,14,b[30]),U=t(U,P,H,G,A,20,b[31]),G=l(G,U,P,H,O,4,b[32]),H=l(H,G,U,P,E,11,b[33]),P=l(P,H,G,U,L,16,b[34]),U=l(U,P,H,G,z,23,b[35]),G=l(G,U,P,H,w,4,b[36]),H=l(H,G,U,P,R,11,b[37]),P=l(P,H,G,U,x,16,b[38]),U=l(U,P,H,G,M,23,b[39]),G=l(G,U,P,H,V,4,b[40]),H=l(H,G,U,P,f,11,b[41]),P=l(P,H,G,U,h,16,b[42]),U=l(U,P,H,G,g,23,b[43]),G=l(G,U,P,H,T,4,b[44]),H=l(H,G,U,P,A,11,b[45]),P=l(P,H,G,U,W,16,b[46]),U=l(U,P,H,G,_,23,b[47]),G=r(G,U,P,H,f,6,b[48]),H=r(H,G,U,P,x,10,b[49]),P=r(P,H,G,U,z,15,b[50]),U=r(U,P,H,G,O,21,b[51]),G=r(G,U,P,H,A,6,b[52]),H=r(H,G,U,P,h,10,b[53]),P=r(P,H,G,U,M,15,b[54]),U=r(U,P,H,G,w,21,b[55]),G=r(G,U,P,H,E,6,b[56]),H=r(H,G,U,P,W,10,b[57]),P=r(P,H,G,U,g,15,b[58]),U=r(U,P,H,G,V,21,b[59]),G=r(G,U,P,H,R,6,b[60]),H=r(H,G,U,P,L,10,b[61]),P=r(P,H,G,U,_,15,b[62]),U=r(U,P,H,G,T,21,b[63]),u[0]=u[0]+G|0,u[1]=u[1]+U|0,u[2]=u[2]+P|0,u[3]=u[3]+H|0},_doFinalize:function(){var i=this._data,o=i.words,s=this._nDataBytes*8,c=i.sigBytes*8;o[c>>>5]|=128<<24-c%32;var a=v.floor(s/4294967296),u=s;o[(c+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,o[(c+64>>>9<<4)+14]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,i.sigBytes=(o.length+1)*4,this._process();for(var f=this._hash,w=f.words,_=0;_<4;_++){var h=w[_];w[_]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360}return f},clone:function(){var i=m.clone.call(this);return i._hash=this._hash.clone(),i}});function d(i,o,s,c,a,u,f){var w=i+(o&s|~o&c)+a+f;return(w<>>32-u)+o}function t(i,o,s,c,a,u,f){var w=i+(o&c|s&~c)+a+f;return(w<>>32-u)+o}function l(i,o,s,c,a,u,f){var w=i+(o^s^c)+a+f;return(w<>>32-u)+o}function r(i,o,s,c,a,u,f){var w=i+(s^(o|~c))+a+f;return(w<>>32-u)+o}C.MD5=m._createHelper(p),C.HmacMD5=m._createHmacHelper(p)}(Math),N.MD5})},dejd:function(F,Q,j){},dmUQ:function(F,Q,j){"use strict";var N=j("Ff2n"),v=j("rePB"),C=j("1OyB"),k=j("vuIU"),y=j("Ji7U"),m=j("md7G"),S=j("foSv"),b=j("cDcd"),p=j.n(b),d=j("TSYQ"),t=j.n(d),l=j("4IlW");function r(E,T){var M=Object.keys(E);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(E);T&&(L=L.filter(function(A){return Object.getOwnPropertyDescriptor(E,A).enumerable})),M.push.apply(M,L)}return M}function i(E){for(var T=1;T1?re-1:0),ge=1;ge1?U-1:0),H=1;H=0)return parseInt(G.slice(G.indexOf("e-")+2),10);var U=0;return G.indexOf(".")>=0&&(U=G.length-G.indexOf(".")-1),U},A.getInputDisplayValue=function(W){var G=W||A.state,U=G.focused,P=G.inputValue,H=G.value,$;U?$=P:$=A.toPrecisionAsStep(H),$==null&&($="");var re=A.formatWrapper($);return h(A.props.decimalSeparator)&&(re=re.toString().replace(".",A.props.decimalSeparator)),re},A.recordCursorPosition=function(){try{A.cursorStart=A.input.selectionStart,A.cursorEnd=A.input.selectionEnd,A.currentValue=A.input.value,A.cursorBefore=A.input.value.substring(0,A.cursorStart),A.cursorAfter=A.input.value.substring(A.cursorEnd)}catch(W){}},A.restoreByAfter=function(W){if(W===void 0)return!1;var G=A.input.value,U=G.lastIndexOf(W);if(U===-1)return!1;var P=A.cursorBefore.length;return A.lastKeyCode===l.a.DELETE&&A.cursorBefore.charAt(P-1)===W[0]?(A.fixCaret(P,P),!0):U+W.length===G.length?(A.fixCaret(U,U),!0):!1},A.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(G,U){var P=W.substring(U);return A.restoreByAfter(P)})},A.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},A.stop=function(){A.autoStepTimer&&clearTimeout(A.autoStepTimer)},A.down=function(W,G,U){A.pressingUpOrDown=!0,A.step("down",W,G,U)},A.up=function(W,G,U){A.pressingUpOrDown=!0,A.step("up",W,G,U)},A.saveInput=function(W){A.input=W};var V=L.value;V===void 0&&(V=L.defaultValue),A.state={focused:L.autoFocus};var z=A.getValidValue(A.toNumber(V));return A.state=i(i({},A.state),{},{inputValue:A.toPrecisionAsStep(z),value:z}),A}return Object(k.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(A){var V=this.props,z=V.value,W=V.onChange,G=V.max,U=V.min,P=this.state.focused;if(A){if(!R(A.value,z)||!R(A.max,G)||!R(A.min,U)){var H=P?z:this.getValidValue(z),$;this.pressingUpOrDown?$=H:this.inputting?$=this.rawInput:$=this.toPrecisionAsStep(H),this.setState({value:H,inputValue:$})}var re="value"in this.props?z:this.state.value;"max"in this.props&&A.max!==G&&typeof re=="number"&&re>G&&W&&W(G),"min"in this.props&&A.min!==U&&typeof re=="number"&&re1&&arguments[1]!==void 0?arguments[1]:this.props.min,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,W=parseFloat(A);return isNaN(W)?A:(Wz&&(W=z),W)}},{key:"setValue",value:function(A,V){var z=this.props.precision,W=this.isNotCompleteNumber(parseFloat(A))?null:parseFloat(A),G=this.state.value,U=G===void 0?null:G,P=this.state.inputValue,H=P===void 0?null:P,$=typeof W=="number"?W.toFixed(z):"".concat(W),re=W!==U||$!=="".concat(H);return"value"in this.props?(H=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:H},V)):this.setState({value:W,inputValue:this.toPrecisionAsStep(A)},V),re&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(A){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.props,W=z.precision,G=z.step;if(h(W))return W;var U=this.getPrecision(V),P=this.getPrecision(G),H=this.getPrecision(A);return A?Math.max(H,U+P):U+P}},{key:"getPrecisionFactor",value:function(A){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.getMaxPrecision(A,V);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(A){return this.props.formatter?this.props.formatter(A):A}},{key:"toPrecisionAsStep",value:function(A){if(this.isNotCompleteNumber(A)||A==="")return A;var V=Math.abs(this.getMaxPrecision(A));return isNaN(V)?A.toString():Number(A).toFixed(V)}},{key:"toNumber",value:function(A){var V=this.props.precision,z=this.state.focused,W=A&&A.length>16&&z;return this.isNotCompleteNumber(A)||W?A:h(V)?Math.round(A*Math.pow(10,V))/Math.pow(10,V):Number(A)}},{key:"upStep",value:function(A,V){var z=this.props.step,W=this.getPrecisionFactor(A,V),G=Math.abs(this.getMaxPrecision(A,V)),U=((W*A+W*z*V)/W).toFixed(G);return this.toNumber(U)}},{key:"downStep",value:function(A,V){var z=this.props.step,W=this.getPrecisionFactor(A,V),G=Math.abs(this.getMaxPrecision(A,V)),U=((W*A-W*z*V)/W).toFixed(G);return this.toNumber(U)}},{key:"step",value:function(A,V){var z=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,G=arguments.length>3?arguments[3]:void 0;this.stop(),V&&(V.persist(),V.preventDefault());var U=this.props;if(U.disabled)return;var P=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(P))return;var H=this["".concat(A,"Step")](P,W),$=H>U.max||HU.max?H=U.max:H=te),Ze=(st||st===0)&&(isNaN(st)||Number(st)<=ge),Ne=ze||W||G,Ae=Ze||W||G,Me=t()("".concat(z,"-handler"),"".concat(z,"-handler-up"),Object(v.a)({},"".concat(z,"-handler-up-disabled"),Ne)),Ee=t()("".concat(z,"-handler"),"".concat(z,"-handler-down"),Object(v.a)({},"".concat(z,"-handler-down-disabled"),Ae)),Ce=U?{onTouchStart:Ne?c:this.up,onTouchEnd:this.stop}:{onMouseDown:Ne?c:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ke=U?{onTouchStart:Ae?c:this.down,onTouchEnd:this.stop}:{onMouseDown:Ae?c:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return p.a.createElement("div",{className:je,style:ve,title:de,onMouseEnter:De,onMouseLeave:Te,onMouseOver:he,onMouseOut:ue,onFocus:function(){return null},onBlur:function(){return null}},p.a.createElement("div",{className:"".concat(z,"-handler-wrap")},p.a.createElement("span",Object.assign({unselectable:"on"},Ce,{role:"button","aria-label":"Increase Value","aria-disabled":Ne,className:Me}),H||p.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner"),onClick:a})),p.a.createElement("span",Object.assign({unselectable:"on"},ke,{role:"button","aria-label":"Decrease Value","aria-disabled":Ae,className:Ee}),$||p.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner"),onClick:a}))),p.a.createElement("div",{className:"".concat(z,"-input-wrap")},p.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ge,"aria-valuemax":te,"aria-valuenow":st,required:ie,type:ce,placeholder:Oe,onPaste:Qe,onClick:Se,onMouseUp:this.onMouseUp,className:"".concat(z,"-input"),tabIndex:ne,autoComplete:P,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:tt?this.onKeyDown:c,onKeyUp:tt?this.onKeyUp:c,autoFocus:be,maxLength:ye,readOnly:G,disabled:W,max:te,min:ge,step:Z,name:Re,title:de,id:oe,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ot),pattern:Y,inputMode:q,onInput:rt},Ie))))}}]),M}(p.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:_,min:-_,step:1,style:{},onChange:c,onKeyDown:c,onPressEnter:c,onFocus:c,onBlur:c,parser:u,required:!1,autoComplete:"off"};var g=O,x=Q.a=g},e7zE:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("3y9D"),j("WYAk"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.Base,y=C.WordArray,m=v.algo,S=m.SHA1,b=m.HMAC,p=m.PBKDF2=k.extend({cfg:k.extend({keySize:128/32,hasher:S,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,t){for(var l=this.cfg,r=b.create(l.hasher,d),i=y.create(),o=y.create([1]),s=i.words,c=o.words,a=l.keySize,u=l.iterations;s.length=te&&H<0||U.scrollTop<=0&&H>0))||re&&(!he||he&&(U.scrollLeft>=ge&&P<0||U.scrollLeft<=0&&P>0))?W(G,U.parentNode,P,H):!1};function O(W){var G=g();return function(){var P=Object(m.a)(W),H;if(G){var $=Object(m.a)(this).constructor;H=Reflect.construct(P,arguments,$)}else H=P.apply(this,arguments);return Object(y.a)(this,H)}}function g(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(W){return!1}}var x={},E=function(W){Object(k.a)(U,W);var G=O(U);function U(P){var H;return Object(v.a)(this,U),H=G.call(this,P),H.domFocus=function(){H.dom&&H.dom.focus()},H.removeStartHandler=function($){if($.touches.length>1)return;H.startPos={x:$.touches[0].clientX,y:$.touches[0].clientY}},H.removeMoveHandler=function($){if($.changedTouches.length>1)return;var re=$.currentTarget,te=$.changedTouches[0].clientX-H.startPos.x,ge=$.changedTouches[0].clientY-H.startPos.y;(re===H.maskDom||re===H.handlerDom||re===H.contentDom&&R(re,$.target,te,ge))&&$.cancelable&&$.preventDefault()},H.transitionEnd=function($){var re=$.target;f(re,a,H.transitionEnd),re.style.transition=""},H.onKeyDown=function($){if($.keyCode===i.a.ESC){var re=H.props.onClose;$.stopPropagation(),re&&re($)}},H.onWrapperTransitionEnd=function($){var re=H.props,te=re.open,ge=re.afterVisibleChange;$.target===H.contentWrapper&&$.propertyName.match(/transform$/)&&(H.dom.style.transition="",!te&&H.getCurrentDrawerSome()&&(document.body.style.overflowX="",H.maskDom&&(H.maskDom.style.left="",H.maskDom.style.width="")),ge&&ge(!!te))},H.openLevelTransition=function(){var $=H.props,re=$.open,te=$.width,ge=$.height,ve=H.getHorizontalBoolAndPlacementName(),de=ve.isHorizontal,De=ve.placementName,Te=H.contentDom?H.contentDom.getBoundingClientRect()[de?"width":"height"]:0,he=(de?te:ge)||Te;H.setLevelAndScrolling(re,De,he)},H.setLevelTransform=function($,re,te,ge){var ve=H.props,de=ve.placement,De=ve.levelMove,Te=ve.duration,he=ve.ease,ue=ve.showMask;H.levelDom.forEach(function(ie){ie.style.transition="transform ".concat(Te," ").concat(he),u(ie,a,H.transitionEnd);var Se=$?te:0;if(De){var ne=w(De,{target:ie,open:$});Se=$?ne[0]:ne[1]||0}var ce=typeof Se=="number"?"".concat(Se,"px"):Se,Oe=de==="left"||de==="top"?ce:"-".concat(ce);Oe=ue&&de==="right"&&ge?"calc(".concat(Oe," + ").concat(ge,"px)"):Oe,ie.style.transform=Se?"".concat(re,"(").concat(Oe,")"):""})},H.setLevelAndScrolling=function($,re,te){var ge=H.props.onChange;if(!h){var ve=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(r.a)(!0):0;H.setLevelTransform($,re,te,ve),H.toggleScrollingToDrawerAndBody(ve)}ge&&ge($)},H.toggleScrollingToDrawerAndBody=function($){var re=H.props,te=re.getOpenCount,ge=re.getContainer,ve=re.showMask,de=re.open,De=ge&&ge(),Te=te&&te();if(De&&De.parentNode===document.body&&ve){var he=["touchstart"],ue=[document.body,H.maskDom,H.handlerDom,H.contentDom];de&&document.body.style.overflow!=="hidden"?($&&H.addScrollingEffect($),Te===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",ue.forEach(function(ie,Se){if(!ie)return;u(ie,he[Se]||"touchmove",Se?H.removeMoveHandler:H.removeStartHandler,H.passive)})):H.getCurrentDrawerSome()&&(Te||(document.body.style.overflow=""),document.body.style.touchAction="",$&&H.remScrollingEffect($),ue.forEach(function(ie,Se){if(!ie)return;f(ie,he[Se]||"touchmove",Se?H.removeMoveHandler:H.removeStartHandler,H.passive)}))}},H.addScrollingEffect=function($){var re=H.props,te=re.placement,ge=re.duration,ve=re.ease,de=re.getOpenCount,De=re.switchScrollingEffect,Te=de&&de();Te===1&&De();var he="width ".concat(ge," ").concat(ve),ue="transform ".concat(ge," ").concat(ve);H.dom.style.transition="none";switch(te){case"right":H.dom.style.transform="translateX(-".concat($,"px)");break;case"top":case"bottom":H.dom.style.width="calc(100% - ".concat($,"px)"),H.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(H.timeout),H.timeout=setTimeout(function(){H.dom&&(H.dom.style.transition="".concat(ue,",").concat(he),H.dom.style.width="",H.dom.style.transform="")})},H.remScrollingEffect=function($){var re=H.props,te=re.placement,ge=re.duration,ve=re.ease,de=re.getOpenCount,De=re.switchScrollingEffect,Te=de&&de();Te||De(!0),c&&(document.body.style.overflowX="hidden"),H.dom.style.transition="none";var he,ue="width ".concat(ge," ").concat(ve),ie="transform ".concat(ge," ").concat(ve);switch(te){case"left":{H.dom.style.width="100%",ue="width 0s ".concat(ve," ").concat(ge);break}case"right":{H.dom.style.transform="translateX(".concat($,"px)"),H.dom.style.width="100%",ue="width 0s ".concat(ve," ").concat(ge),H.maskDom&&(H.maskDom.style.left="-".concat($,"px"),H.maskDom.style.width="calc(100% + ".concat($,"px)"));break}case"top":case"bottom":{H.dom.style.width="calc(100% + ".concat($,"px)"),H.dom.style.height="100%",H.dom.style.transform="translateZ(0)",he="height 0s ".concat(ve," ").concat(ge);break}default:break}clearTimeout(H.timeout),H.timeout=setTimeout(function(){H.dom&&(H.dom.style.transition="".concat(ie,",").concat(he?"".concat(he,","):"").concat(ue),H.dom.style.transform="",H.dom.style.width="",H.dom.style.height="")})},H.getCurrentDrawerSome=function(){return!Object.keys(x).some(function($){return x[$]})},H.getLevelDom=function($){var re=$.level,te=$.getContainer;if(h)return;var ge=te&&te(),ve=ge?ge.parentNode:null;if(H.levelDom=[],re==="all"){var de=ve?Array.prototype.slice.call(ve.children):[];de.forEach(function(De){De.nodeName!=="SCRIPT"&&De.nodeName!=="STYLE"&&De.nodeName!=="LINK"&&De!==ge&&H.levelDom.push(De)})}else re&&o(re).forEach(function(De){document.querySelectorAll(De).forEach(function(Te){H.levelDom.push(Te)})})},H.getHorizontalBoolAndPlacementName=function(){var $=H.props.placement,re=$==="left"||$==="right",te="translate".concat(re?"X":"Y");return{isHorizontal:re,placementName:te}},H.state={_self:Object(d.a)(H)},H}return Object(C.a)(U,[{key:"componentDidMount",value:function(){var H=this;if(!h){var $=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return $=!0,null}}))}catch(de){}this.passive=$?{passive:!1}:!1}var re=this.props,te=re.open,ge=re.getContainer,ve=ge&&ge();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),te&&(ve&&ve.parentNode===document.body&&(x[this.drawerId]=te),this.openLevelTransition(),this.forceUpdate(function(){H.domFocus()}))}},{key:"componentDidUpdate",value:function(H){var $=this.props,re=$.open,te=$.getContainer,ge=te&&te();re!==H.open&&(re&&this.domFocus(),ge&&ge.parentNode===document.body&&(x[this.drawerId]=!!re),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var H=this.props,$=H.getOpenCount,re=H.open,te=H.switchScrollingEffect,ge=typeof $=="function"&&$();delete x[this.drawerId],re&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ge||(document.body.style.overflow="",te(!0))}},{key:"render",value:function(){var H,$=this,re=this.props,te=re.className,ge=re.children,ve=re.style,de=re.width,De=re.height,Te=re.defaultOpen,he=re.open,ue=re.prefixCls,ie=re.placement,Se=re.level,ne=re.levelMove,ce=re.ease,Oe=re.duration,oe=re.getContainer,q=re.handler,Y=re.onChange,Z=re.afterVisibleChange,ye=re.showMask,be=re.maskClosable,Re=re.maskStyle,Qe=re.onClose,rt=re.onHandleClick,at=re.keyboard,qe=re.getOpenCount,st=re.switchScrollingEffect,lt=Object(N.a)(re,["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"]),je=this.dom?he:!1,Ie=l()(ue,(H={},Object(p.a)(H,"".concat(ue,"-").concat(ie),!0),Object(p.a)(H,"".concat(ue,"-open"),je),Object(p.a)(H,te||"",!!te),Object(p.a)(H,"no-mask",!ye),H)),tt=this.getHorizontalBoolAndPlacementName(),ot=tt.placementName,ze=ie==="left"||ie==="top"?"-100%":"100%",Ze=je?"":"".concat(ot,"(").concat(ze,")"),Ne=q&&b.cloneElement(q,{onClick:function(Me){q.props.onClick&&q.props.onClick(),rt&&rt(Me)},ref:function(Me){$.handlerDom=Me}});return b.createElement("div",Object.assign({},lt,{tabIndex:-1,className:Ie,style:ve,ref:function(Me){$.dom=Me},onKeyDown:je&&at?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),ye&&b.createElement("div",{className:"".concat(ue,"-mask"),onClick:be?Qe:void 0,style:Re,ref:function(Me){$.maskDom=Me}}),b.createElement("div",{className:"".concat(ue,"-content-wrapper"),style:{transform:Ze,msTransform:Ze,width:_(de)?"".concat(de,"px"):de,height:_(De)?"".concat(De,"px"):De},ref:function(Me){$.contentWrapper=Me}},b.createElement("div",{className:"".concat(ue,"-content"),ref:function(Me){$.contentDom=Me},onTouchStart:je&&ye?this.removeStartHandler:void 0,onTouchMove:je&&ye?this.removeMoveHandler:void 0},ge),Ne))}}],[{key:"getDerivedStateFromProps",value:function(H,$){var re=$.prevProps,te=$._self,ge={prevProps:H};if(re!==void 0){var ve=H.placement,de=H.level;ve!==re.placement&&(te.contentDom=null),de!==re.level&&te.getLevelDom(H)}return ge}}]),U}(b.Component);E.defaultProps={switchScrollingEffect:function(){}};var T=E;function M(W){var G=L();return function(){var P=Object(m.a)(W),H;if(G){var $=Object(m.a)(this).constructor;H=Reflect.construct(P,arguments,$)}else H=P.apply(this,arguments);return Object(y.a)(this,H)}}function L(){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(W){return!1}}var A=function(W){Object(k.a)(U,W);var G=M(U);function U(P){var H;Object(v.a)(this,U),H=G.call(this,P),H.onHandleClick=function(re){var te=H.props,ge=te.onHandleClick,ve=te.open;if(ge&&ge(re),typeof ve=="undefined"){var de=H.state.open;H.setState({open:!de})}},H.onClose=function(re){var te=H.props,ge=te.onClose,ve=te.open;ge&&ge(re),typeof ve=="undefined"&&H.setState({open:!1})};var $=typeof P.open!="undefined"?P.open:!!P.defaultOpen;return H.state={open:$},"onMaskClick"in P&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),H}return Object(C.a)(U,[{key:"render",value:function(){var H=this,$=this.props,re=$.defaultOpen,te=$.getContainer,ge=$.wrapperClassName,ve=$.forceRender,de=$.handler,De=Object(N.a)($,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Te=this.state.open;if(!te)return b.createElement("div",{className:ge,ref:function(ie){H.dom=ie}},b.createElement(T,Object.assign({},De,{open:Te,handler:de,getContainer:function(){return H.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var he=!!de||ve;return b.createElement(S.a,{visible:Te,forceRender:he,getContainer:te,wrapperClassName:ge},function(ue){var ie=ue.visible,Se=ue.afterClose,ne=Object(N.a)(ue,["visible","afterClose"]);return b.createElement(T,Object.assign({},De,ne,{open:ie!==void 0?ie:Te,afterVisibleChange:Se!==void 0?Se:De.afterVisibleChange,handler:de,onClose:H.onClose,onHandleClick:H.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(H,$){var re=$.prevProps,te={prevProps:H};return typeof re!="undefined"&&H.open!==re.open&&(te.open=H.open),te}}]),U}(b.Component);A.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:b.createElement("div",{className:"drawer-handle"},b.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var V=A,z=Q.a=V},fyJ8:function(F,Q,j){"use strict";var N=j("rePB"),v=j("VTBJ"),C=j("Ff2n"),k=j("U8pU"),y=j("cDcd"),m=j.n(y),S=j("TSYQ"),b=j.n(S),p=j("c+Xe"),d=j("sR1s");function t(s){return s&&Object(k.a)(s)==="object"&&!Array.isArray(s)&&!y.isValidElement(s)}function l(s){return typeof s=="string"?!0:Object(p.c)(s)}function r(s,c){var a,u=s.prefixCls,f=s.className,w=s.record,_=s.index,h=s.dataIndex,R=s.render,O=s.children,g=s.component,x=g===void 0?"td":g,E=s.colSpan,T=s.rowSpan,M=s.fixLeft,L=s.fixRight,A=s.firstFixLeft,V=s.lastFixLeft,z=s.firstFixRight,W=s.lastFixRight,G=s.appendNode,U=s.additionalProps,P=U===void 0?{}:U,H=s.ellipsis,$=s.align,re=s.rowType,te=s.isSticky,ge="".concat(u,"-cell"),ve,de;if(O)de=O;else{var De=Object(d.b)(w,h);if(de=De,R){var Te=R(De,w,_);t(Te)?(de=Te.children,ve=Te.props):de=Te}}Object(k.a)(de)==="object"&&!Array.isArray(de)&&!y.isValidElement(de)&&(de=null),H&&(V||z)&&(de=y.createElement("span",{className:"".concat(ge,"-content")},de));var he=ve||{},ue=he.colSpan,ie=he.rowSpan,Se=he.style,ne=he.className,ce=Object(C.a)(he,["colSpan","rowSpan","style","className"]),Oe=ue!==void 0?ue:E,oe=ie!==void 0?ie:T;if(Oe===0||oe===0)return null;var q={},Y=typeof M=="number",Z=typeof L=="number";Y&&(q.position="sticky",q.left=M),Z&&(q.position="sticky",q.right=L);var ye={};$&&(ye.textAlign=$);var be,Re=H===!0?{showTitle:!0}:H;Re&&(Re.showTitle||re==="header")&&(typeof de=="string"||typeof de=="number"?be=de.toString():y.isValidElement(de)&&typeof de.props.children=="string"&&(be=de.props.children));var Qe=Object(v.a)(Object(v.a)(Object(v.a)({title:be},ce),P),{},{colSpan:Oe&&Oe!==1?Oe:null,rowSpan:oe&&oe!==1?oe:null,className:b()(ge,f,(a={},Object(N.a)(a,"".concat(ge,"-fix-left"),Y),Object(N.a)(a,"".concat(ge,"-fix-left-first"),A),Object(N.a)(a,"".concat(ge,"-fix-left-last"),V),Object(N.a)(a,"".concat(ge,"-fix-right"),Z),Object(N.a)(a,"".concat(ge,"-fix-right-first"),z),Object(N.a)(a,"".concat(ge,"-fix-right-last"),W),Object(N.a)(a,"".concat(ge,"-ellipsis"),H),Object(N.a)(a,"".concat(ge,"-with-append"),G),Object(N.a)(a,"".concat(ge,"-fix-sticky"),(Y||Z)&&te),a),P.className,ne),style:Object(v.a)(Object(v.a)(Object(v.a)(Object(v.a)({},P.style),ye),q),Se),ref:l(x)?c:null});return y.createElement(x,Object.assign({},Qe),G,de)}var i=y.forwardRef(r);i.displayName="Cell";var o=y.memo(i,function(s,c){return c.shouldCellUpdate?!c.shouldCellUpdate(c.record,s.record):!1});Q.a=o},gRFJ:function(F,Q,j){F.exports=[j("rdUC"),j("ynwM"),j("RELg"),j("DlR+"),j("CrYA"),j("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(F){return F<10?"0"+F:F}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(F){return rx_escapable.lastIndex=0,rx_escapable.test(F)?'"'+F.replace(rx_escapable,function(Q){var j=meta[Q];return typeof j=="string"?j:"\\u"+("0000"+Q.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+F+'"'}function str(F,Q){var j,N,v,C,k=gap,y,m=Q[F];m&&typeof m=="object"&&typeof m.toJSON=="function"&&(m=m.toJSON(F)),typeof rep=="function"&&(m=rep.call(Q,F,m));switch(typeof m){case"string":return quote(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":return String(m);case"object":if(!m)return"null";if(gap+=indent,y=[],Object.prototype.toString.apply(m)==="[object Array]"){for(C=m.length,j=0;jz.length)&&(W=z.length);for(var G=0,U=new Array(W);G=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;G[U]=z[U]}}return G}function o(z,W){if(z==null)return{};var G={},U=Object.keys(z),P,H;for(H=0;H=0)continue;G[P]=z[P]}return G}var s=function(W){var G=W.className,U=W.percent,P=W.prefixCls,H=W.strokeColor,$=W.strokeLinecap,re=W.strokeWidth,te=W.style,ge=W.trailColor,ve=W.trailWidth,de=W.transition,De=i(W,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete De.gapPosition;var Te=Array.isArray(U)?U:[U],he=Array.isArray(H)?H:[H],ue=m(Te),ie=b(ue,1),Se=ie[0],ne=re/2,ce=100-re/2,Oe="M ".concat($==="round"?ne:0,",").concat(ne,` L `).concat($==="round"?ce:100,",").concat(ne),oe="0 0 100 ".concat(re),q=0;return v.a.createElement("svg",S({className:k()("".concat(P,"-line"),G),viewBox:oe,preserveAspectRatio:"none",style:te},De),v.a.createElement("path",{className:"".concat(P,"-line-trail"),d:Oe,strokeLinecap:$,stroke:ge,strokeWidth:ve||re,fillOpacity:"0"}),Te.map(function(Y,Z){var ye={strokeDasharray:"".concat(Y,"px, 100px"),strokeDashoffset:"-".concat(q,"px"),transition:de||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},be=he[Z]||he[he.length-1];return q+=Y,v.a.createElement("path",{key:Z,className:"".concat(P,"-line-path"),d:Oe,strokeLinecap:$,stroke:be,strokeWidth:re,fillOpacity:"0",ref:Se[Z],style:ye})}))};s.defaultProps=y;var c=s;function a(){return a=Object.assign||function(z){for(var W=1;Wz.length)&&(W=z.length);for(var G=0,U=new Array(W);G=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;G[U]=z[U]}}return G}function g(z,W){if(z==null)return{};var G={},U=Object.keys(z),P,H;for(H=0;H=0)continue;G[P]=z[P]}return G}var x=0;function E(z){return+z.replace("%","")}function T(z){return Array.isArray(z)?z:[z]}function M(z,W,G,U){var P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,H=arguments.length>5?arguments[5]:void 0,$=50-U/2,re=0,te=-$,ge=0,ve=-2*$;switch(H){case"left":re=-$,te=0,ge=2*$,ve=0;break;case"right":re=$,te=0,ge=-2*$,ve=0;break;case"bottom":te=$,ve=2*$;break;default:}var de="M 50,50 m ".concat(re,",").concat(te,` a `).concat($,",").concat($," 0 1 1 ").concat(ge,",").concat(-ve,` a `).concat($,",").concat($," 0 1 1 ").concat(-ge,",").concat(ve),De=Math.PI*2*$,Te={stroke:G,strokeDasharray:"".concat(W/100*(De-P),"px ").concat(De,"px"),strokeDashoffset:"-".concat(P/2+z/100*(De-P),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:de,pathStyle:Te}}var L=function(W){var G=W.prefixCls,U=W.strokeWidth,P=W.trailWidth,H=W.gapDegree,$=W.gapPosition,re=W.trailColor,te=W.strokeLinecap,ge=W.style,ve=W.className,de=W.strokeColor,De=W.percent,Te=O(W,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),he=Object(N.useMemo)(function(){return x+=1,x},[]),ue=M(0,100,re,U,H,$),ie=ue.pathString,Se=ue.pathStyle,ne=T(De),ce=T(de),Oe=ce.find(function(ye){return Object.prototype.toString.call(ye)==="[object Object]"}),oe=m(ne),q=u(oe,1),Y=q[0],Z=function(){var be=0;return ne.map(function(Re,Qe){var rt=ce[Qe]||ce[ce.length-1],at=Object.prototype.toString.call(rt)==="[object Object]"?"url(#".concat(G,"-gradient-").concat(he,")"):"",qe=M(be,Re,rt,U,H,$);return be+=Re,v.a.createElement("path",{key:Qe,className:"".concat(G,"-circle-path"),d:qe.pathString,stroke:at,strokeLinecap:te,strokeWidth:U,opacity:Re===0?0:1,fillOpacity:"0",style:qe.pathStyle,ref:Y[Qe]})})};return v.a.createElement("svg",a({className:k()("".concat(G,"-circle"),ve),viewBox:"0 0 100 100",style:ge},Te),Oe&&v.a.createElement("defs",null,v.a.createElement("linearGradient",{id:"".concat(G,"-gradient-").concat(he),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Oe).sort(function(ye,be){return E(ye)-E(be)}).map(function(ye,be){return v.a.createElement("stop",{key:be,offset:ye,stopColor:Oe[ye]})}))),v.a.createElement("path",{className:"".concat(G,"-circle-trail"),d:ie,stroke:re,strokeLinecap:te,strokeWidth:P||U,fillOpacity:"0",style:Se}),Z().reverse())};L.defaultProps=y;var A=L,V={Line:c,Circle:A}},hW8S:function(F,Q,j){"use strict";j.d(Q,"a",function(){return k}),j.d(Q,"c",function(){return y}),j.d(Q,"b",function(){return m});var N=j("VTBJ"),v=j("Ff2n"),C=j("Kwbf"),k="RC_TABLE_INTERNAL_COL_DEFINE";function y(S){var b=S.expandable,p=Object(v.a)(S,["expandable"]);return"expandable"in S?Object(N.a)(Object(N.a)({},p),b):p}function m(S){return Object.keys(S).reduce(function(b,p){return(p.substr(0,5)==="data-"||p.substr(0,5)==="aria-")&&(b[p]=S[p]),b},{})}},i3hx:function(F,Q,j){},jO9C:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.Iso97971={pad:function(v,C){v.concat(N.lib.WordArray.create([2147483648],1)),N.pad.ZeroPadding.pad(v,C)},unpad:function(v){N.pad.ZeroPadding.unpad(v),v.sigBytes--}},N.pad.Iso97971})},je13:function(F,Q,j){var N=j("5nXd"),v=j("gRFJ"),C=[j("uQRt")];F.exports=N.createStore(v,C)},k3GJ:function(F,Q,j){"use strict";j.d(Q,"a",function(){return An});var N=j("rePB"),v=j("ODXe"),C=j("Ff2n"),k=j("VTBJ"),y=j("cDcd"),m=j("TSYQ"),S=j.n(m),b=j("Zm9Q"),p=j("6cGi"),d=j("KQm4"),t=j("xEkU"),l=j.n(t),r=j("t23M");function i(Pe){var Xe=Object(y.useRef)(),Je=Object(y.useRef)(!1);function Ue(){for(var _e=arguments.length,Le=new Array(_e),we=0;we<_e;we++)Le[we]=arguments[we];Je.current||(l.a.cancel(Xe.current),Xe.current=l()(function(){Pe.apply(void 0,Le)}))}return Object(y.useEffect)(function(){return function(){Je.current=!0,l.a.cancel(Xe.current)}},[]),Ue}function o(Pe){var Xe=Object(y.useRef)([]),Je=Object(y.useState)({}),Ue=Object(v.a)(Je,2),_e=Ue[1],Le=Object(y.useRef)(typeof Pe=="function"?Pe():Pe),we=i(function(){var Ge=Le.current;Xe.current.forEach(function($e){Ge=$e(Ge)}),Xe.current=[],Le.current=Ge,_e({})});function He(Ge){Xe.current.push(Ge),we()}return[Le.current,He]}var s=j("4IlW");function c(Pe,Xe){var Je,Ue=Pe.prefixCls,_e=Pe.id,Le=Pe.active,we=Pe.rtl,He=Pe.tab,Ge=He.key,$e=He.tab,Ye=He.disabled,nt=He.closeIcon,ht=Pe.tabBarGutter,St=Pe.tabPosition,Tt=Pe.closable,Mt=Pe.renderWrapper,er=Pe.removeAriaLabel,yr=Pe.editable,_r=Pe.onClick,Tr=Pe.onRemove,kr=Pe.onFocus,Dr="".concat(Ue,"-tab");y.useEffect(function(){return Tr},[]);var Sr={};St==="top"||St==="bottom"?Sr[we?"marginLeft":"marginRight"]=ht:Sr.marginBottom=ht;var Yr=yr&&Tt!==!1&&!Ye;function Ur(ur){if(Ye)return;_r(ur)}function Rn(ur){ur.preventDefault(),ur.stopPropagation(),yr.onEdit("remove",{key:Ge,event:ur})}var Br=y.createElement("div",{key:Ge,ref:Xe,className:S()(Dr,(Je={},Object(N.a)(Je,"".concat(Dr,"-with-remove"),Yr),Object(N.a)(Je,"".concat(Dr,"-active"),Le),Object(N.a)(Je,"".concat(Dr,"-disabled"),Ye),Je)),style:Sr,onClick:Ur},y.createElement("div",{role:"tab","aria-selected":Le,id:_e&&"".concat(_e,"-tab-").concat(Ge),className:"".concat(Dr,"-btn"),"aria-controls":_e&&"".concat(_e,"-panel-").concat(Ge),"aria-disabled":Ye,tabIndex:Ye?null:0,onClick:function(ir){ir.stopPropagation(),Ur(ir)},onKeyDown:function(ir){[s.a.SPACE,s.a.ENTER].includes(ir.which)&&(ir.preventDefault(),Ur(ir))},onFocus:kr},$e),Yr&&y.createElement("button",{type:"button","aria-label":er||"remove",tabIndex:0,className:"".concat(Dr,"-remove"),onClick:function(ir){ir.stopPropagation(),Rn(ir)}},nt||yr.removeIcon||"\xD7"));return Mt&&(Br=Mt(Br)),Br}var a=y.forwardRef(c),u={width:0,height:0,left:0,top:0};function f(Pe,Xe,Je){return Object(y.useMemo)(function(){for(var Ue,_e=new Map,Le=Xe.get((Ue=Pe[0])===null||Ue===void 0?void 0:Ue.key)||u,we=Le.left+Le.width,He=0;Hent&&(Tt=nt-St),Object(y.useMemo)(function(){if(!Le.length)return[0,0];for(var Mt=Le.length,er=Mt,yr=0;yrYe+Tt){er=yr-1;break}}for(var Tr=0,kr=Mt-1;kr>=0;kr-=1){var Dr=Pe.get(Le[kr].key)||w;if(Dr[$e]1&&arguments[1]!==void 0?arguments[1]:!1,Ue=Xe&&typeof Xe.getBoundingClientRect=="function"&&Xe.getBoundingClientRect().width;if(Ue){if(Je){var _e=getComputedStyle(Xe),Le=_e.marginLeft,we=_e.marginRight;Ue+=+Le.replace("px","")+ +we.replace("px","")}Ue=+Ue.toFixed(6)}return Ue||0},be=function(Xe,Je,Ue){Xe&&Object(z.a)(Xe.style)==="object"&&(Xe.style[Je]=Ue)},Re=function(){return ne.any},Qe=j("bdgK"),rt=j("faye"),at=j.n(rt),qe=j("wgJM"),st=j("l4aY"),lt=j("m+aA"),je=j("c+Xe"),Ie=j("zT1h"),tt=j("QC+M");function ot(Pe,Xe,Je){return Je?Pe[0]===Xe[0]:Pe[0]===Xe[0]&&Pe[1]===Xe[1]}function ze(Pe,Xe,Je){var Ue=Pe[Xe]||{};return Object(k.a)(Object(k.a)({},Ue),Je)}function Ze(Pe,Xe,Je,Ue){for(var _e=Je.points,Le=Object.keys(Pe),we=0;we1&&arguments[1]!==void 0?arguments[1]:2;Xe();var Le=Object(qe.a)(function(){_e<=1?Ue({isCanceled:function(){return Le!==Pe.current}}):Je(Ue,_e-1)});Pe.current=Le}return y.useEffect(function(){return function(){Xe()}},[]),[Je,Xe]},Nn=[Wt,Lt,nr,dt],Ct=!1,Dt=!0;function wt(Pe){return Pe===nr||Pe===dt}var wr=function(Pe,Xe){var Je=y.useState(rr),Ue=Object(v.a)(Je,2),_e=Ue[0],Le=Ue[1],we=hr(),He=Object(v.a)(we,2),Ge=He[0],$e=He[1];function Ye(){Le(Wt)}return kt(function(){if(_e!==rr&&_e!==dt){var nt=Nn.indexOf(_e),ht=Nn[nt+1],St=Xe(_e);St===Ct?Le(ht):Ge(function(Tt){function Mt(){if(Tt.isCanceled())return;Le(ht)}St===!0?Mt():Promise.resolve(St).then(Mt)})}},[Pe,_e]),y.useEffect(function(){return function(){$e()}},[]),[Ye,_e]},Cr=function(Pe){var Xe=Object(y.useRef)(),Je=Object(y.useRef)(Pe);Je.current=Pe;var Ue=y.useCallback(function(we){Je.current(we)},[]);function _e(we){we&&(we.removeEventListener(It,Ue),we.removeEventListener(mt,Ue))}function Le(we){Xe.current&&Xe.current!==we&&_e(Xe.current),we&&we!==Xe.current&&(we.addEventListener(It,Ue),we.addEventListener(mt,Ue),Xe.current=we)}return y.useEffect(function(){return function(){_e(Xe.current)}},[]),[Le,_e]};function Jt(Pe,Xe,Je,Ue){var _e=Ue.motionEnter,Le=_e===void 0?!0:_e,we=Ue.motionAppear,He=we===void 0?!0:we,Ge=Ue.motionLeave,$e=Ge===void 0?!0:Ge,Ye=Ue.motionDeadline,nt=Ue.motionLeaveImmediately,ht=Ue.onAppearPrepare,St=Ue.onEnterPrepare,Tt=Ue.onLeavePrepare,Mt=Ue.onAppearStart,er=Ue.onEnterStart,yr=Ue.onLeaveStart,_r=Ue.onAppearActive,Tr=Ue.onEnterActive,kr=Ue.onLeaveActive,Dr=Ue.onAppearEnd,Sr=Ue.onEnterEnd,Yr=Ue.onLeaveEnd,Ur=Ue.onVisibleChanged,Rn=Et(),Br=Object(v.a)(Rn,2),ur=Br[0],ir=Br[1],Wr=Et(_t),$r=Object(v.a)(Wr,2),Zt=$r[0],en=$r[1],In=Et(null),an=Object(v.a)(In,2),vn=an[0],pn=an[1],Wn=Object(y.useRef)(!1),ri=Object(y.useRef)(null),kn=Object(y.useRef)(!1),xi=Object(y.useRef)(null);function Wi(){var xn=Je();return xn||xi.current}var Ci=Object(y.useRef)(!1);function ni(xn){var fn=Wi();if(xn&&!xn.deadline&&xn.target!==fn)return;var ii;Zt===Vt&&Ci.current?ii=Dr==null?void 0:Dr(fn,xn):Zt===Kt&&Ci.current?ii=Sr==null?void 0:Sr(fn,xn):Zt===tr&&Ci.current&&(ii=Yr==null?void 0:Yr(fn,xn)),ii!==!1&&!kn.current&&(en(_t),pn(null))}var wn=Cr(ni),yn=Object(v.a)(wn,1),Mn=yn[0],Dn=y.useMemo(function(){var xn,fn,ii;switch(Zt){case"appear":return xn={},Object(N.a)(xn,Wt,ht),Object(N.a)(xn,Lt,Mt),Object(N.a)(xn,nr,_r),xn;case"enter":return fn={},Object(N.a)(fn,Wt,St),Object(N.a)(fn,Lt,er),Object(N.a)(fn,nr,Tr),fn;case"leave":return ii={},Object(N.a)(ii,Wt,Tt),Object(N.a)(ii,Lt,yr),Object(N.a)(ii,nr,kr),ii;default:return{}}},[Zt]),zi=wr(Zt,function(xn){if(xn===Wt){var fn=Dn[Wt];return fn?fn(Wi()):Ct}if(mn in Dn){var ii;pn(((ii=Dn[mn])===null||ii===void 0?void 0:ii.call(Dn,Wi(),null))||null)}return mn===nr&&(Mn(Wi()),Ye>0&&(clearTimeout(ri.current),ri.current=setTimeout(function(){ni({deadline:!0})},Ye))),Dt}),ta=Object(v.a)(zi,2),ra=ta[0],mn=ta[1],Ji=wt(mn);Ci.current=Ji,kt(function(){ir(Xe);var xn=Wn.current;if(Wn.current=!0,!Pe)return;var fn;!xn&&Xe&&He&&(fn=Vt),xn&&Xe&&Le&&(fn=Kt),(xn&&!Xe&&$e||!xn&&nt&&!Xe&&$e)&&(fn=tr),fn&&(en(fn),ra())},[Xe]),Object(y.useEffect)(function(){(Zt===Vt&&!He||Zt===Kt&&!Le||Zt===tr&&!$e)&&en(_t)},[He,Le,$e]),Object(y.useEffect)(function(){return function(){clearTimeout(ri.current),kn.current=!0}},[]),Object(y.useEffect)(function(){ur!==void 0&&Zt===_t&&(Ur==null||Ur(ur))},[ur,Zt]);var na=vn;return Dn[Wt]&&mn===Lt&&(na=Object(k.a)({transition:"none"},na)),[Zt,mn,na,ur!=null?ur:Xe]}var Ut=function(Pe){Object(x.a)(Je,Pe);var Xe=Object(E.a)(Je);function Je(){return Object(R.a)(this,Je),Xe.apply(this,arguments)}return Object(O.a)(Je,[{key:"render",value:function(){return this.props.children}}]),Je}(y.Component),Or=Ut;function un(Pe){var Xe=Pe;Object(z.a)(Pe)==="object"&&(Xe=Pe.transitionSupport);function Je(_e){return!!(_e.motionName&&Xe)}var Ue=y.forwardRef(function(_e,Le){var we=_e.visible,He=we===void 0?!0:we,Ge=_e.removeOnLeave,$e=Ge===void 0?!0:Ge,Ye=_e.forceRender,nt=_e.children,ht=_e.motionName,St=_e.leavedClassName,Tt=_e.eventProps,Mt=Je(_e),er=Object(y.useRef)(),yr=Object(y.useRef)();function _r(){try{return Object(lt.a)(er.current||yr.current)}catch(en){return null}}var Tr=Jt(Mt,He,_r,_e),kr=Object(v.a)(Tr,4),Dr=kr[0],Sr=kr[1],Yr=kr[2],Ur=kr[3],Rn=y.useRef(Ur);Ur&&(Rn.current=!0);var Br=Object(y.useRef)(Le);Br.current=Le;var ur=y.useCallback(function(en){er.current=en,Object(je.b)(Br.current,en)},[]),ir,Wr=Object(k.a)(Object(k.a)({},Tt),{},{visible:He});if(!nt)ir=null;else if(Dr===_t||!Je(_e))Ur?ir=nt(Object(k.a)({},Wr),ur):!$e&&Rn.current?ir=nt(Object(k.a)(Object(k.a)({},Wr),{},{className:St}),ur):Ye?ir=nt(Object(k.a)(Object(k.a)({},Wr),{},{style:{display:"none"}}),ur):ir=null;else{var $r,Zt;Sr===Wt?Zt="prepare":wt(Sr)?Zt="active":Sr===Lt&&(Zt="start"),ir=nt(Object(k.a)(Object(k.a)({},Wr),{},{className:S()(At(ht,Dr),($r={},Object(N.a)($r,At(ht,"".concat(Dr,"-").concat(Zt)),Zt),Object(N.a)($r,ht,typeof ht=="string"),$r)),style:Yr}),ur)}return y.createElement(Or,{ref:yr},ir)});return Ue.displayName="CSSMotion",Ue}var Nr=un(ft),bt="add",Bt="keep",Jr="remove",on="removed";function Ln(Pe){var Xe;return Pe&&Object(z.a)(Pe)==="object"&&"key"in Pe?Xe=Pe:Xe={key:Pe},Object(k.a)(Object(k.a)({},Xe),{},{key:String(Xe.key)})}function Sn(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Pe.map(Ln)}function le(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Je=[],Ue=0,_e=Xe.length,Le=Sn(Pe),we=Sn(Xe);Le.forEach(function($e){for(var Ye=!1,nt=Ue;nt<_e;nt+=1){var ht=we[nt];if(ht.key===$e.key){Ue1});return Ge.forEach(function($e){Je=Je.filter(function(Ye){var nt=Ye.key,ht=Ye.status;return nt!==$e||ht!==Jr}),Je.forEach(function(Ye){Ye.key===$e&&(Ye.status=Bt)})}),Je}var K=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function X(Pe){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Nr,Je=function(Ue){Object(x.a)(Le,Ue);var _e=Object(E.a)(Le);function Le(){var we;return Object(R.a)(this,Le),we=_e.apply(this,arguments),we.state={keyEntities:[]},we.removeKey=function(He){we.setState(function(Ge){var $e=Ge.keyEntities;return{keyEntities:$e.map(function(Ye){return Ye.key!==He?Ye:Object(k.a)(Object(k.a)({},Ye),{},{status:on})})}})},we}return Object(O.a)(Le,[{key:"render",value:function(){var He=this,Ge=this.state.keyEntities,$e=this.props,Ye=$e.component,nt=$e.children,ht=$e.onVisibleChanged,St=Object(C.a)($e,["component","children","onVisibleChanged"]),Tt=Ye||y.Fragment,Mt={};return K.forEach(function(er){Mt[er]=St[er],delete St[er]}),delete St.keys,y.createElement(Tt,St,Ge.map(function(er){var yr=er.status,_r=Object(C.a)(er,["status"]),Tr=yr===bt||yr===Bt;return y.createElement(Xe,Object(h.a)({},Mt,{key:_r.key,visible:Tr,eventProps:_r,onVisibleChanged:function(Dr){ht==null||ht(Dr,{key:_r.key}),Dr||He.removeKey(_r.key)}}),nt)}))}}],[{key:"getDerivedStateFromProps",value:function(He,Ge){var $e=He.keys,Ye=Ge.keyEntities,nt=Sn($e),ht=le(Ye,nt);return{keyEntities:ht.filter(function(St){var Tt=Ye.find(function(Mt){var er=Mt.key;return St.key===er});return!(Tt&&Tt.status===on&&St.status===Jr)})}}}]),Le}(y.Component);return Je.defaultProps={component:"div"},Je}var ee=X(ft),me=Nr;function ae(Pe){var Xe=Pe.prefixCls,Je=Pe.motion,Ue=Pe.animation,_e=Pe.transitionName;return Je||(Ue?{motionName:"".concat(Xe,"-").concat(Ue)}:_e?{motionName:_e}:null)}function Ke(Pe){var Xe=Pe.prefixCls,Je=Pe.visible,Ue=Pe.zIndex,_e=Pe.mask,Le=Pe.maskMotion,we=Pe.maskAnimation,He=Pe.maskTransitionName;if(!_e)return null;var Ge={};return(Le||He||we)&&(Ge=Object(k.a)({motionAppear:!0},ae({motion:Le,prefixCls:Xe,transitionName:He,animation:we}))),y.createElement(me,Object(h.a)({},Ge,{visible:Je,removeOnLeave:!0}),function($e){var Ye=$e.className;return y.createElement("div",{style:{zIndex:Ue},className:S()("".concat(Xe,"-mask"),Ye)})})}var pt=j("9mu1"),Ot=j("o0o1"),Ht=j.n(Ot),vt=j("HaE+"),Xt=["measure","align",null,"motion"],qt=function(Pe,Xe){var Je=Object(y.useState)(null),Ue=Object(v.a)(Je,2),_e=Ue[0],Le=Ue[1],we=Object(y.useRef)(),He=Object(y.useRef)(!1);function Ge(nt){He.current||Le(nt)}function $e(){qe.a.cancel(we.current)}function Ye(nt){$e(),we.current=Object(qe.a)(function(){Ge(function(ht){switch(_e){case"align":return"motion";case"motion":return"stable";default:}return ht}),nt==null||nt()})}return Object(y.useEffect)(function(){Ge("measure")},[Pe]),Object(y.useEffect)(function(){switch(_e){case"measure":Xe();break;default:}_e&&(we.current=Object(qe.a)(Object(vt.a)(Ht.a.mark(function nt(){var ht,St;return Ht.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:ht=Xt.indexOf(_e),St=Xt[ht+1],St&&ht!==-1&&Ge(St);case 3:case"end":return Mt.stop()}},nt)}))))},[_e]),Object(y.useEffect)(function(){return function(){He.current=!0,$e()}},[]),[_e,Ye]},Hr=function(Pe){var Xe=y.useState({width:0,height:0}),Je=Object(v.a)(Xe,2),Ue=Je[0],_e=Je[1];function Le(He){_e({width:He.offsetWidth,height:He.offsetHeight})}var we=y.useMemo(function(){var He={};if(Pe){var Ge=Ue.width,$e=Ue.height;Pe.indexOf("height")!==-1&&$e?He.height=$e:Pe.indexOf("minHeight")!==-1&&$e&&(He.minHeight=$e),Pe.indexOf("width")!==-1&&Ge?He.width=Ge:Pe.indexOf("minWidth")!==-1&&Ge&&(He.minWidth=Ge)}return He},[Pe,Ue]);return[we,Le]},nn=y.forwardRef(function(Pe,Xe){var Je=Pe.visible,Ue=Pe.prefixCls,_e=Pe.className,Le=Pe.style,we=Pe.children,He=Pe.zIndex,Ge=Pe.stretch,$e=Pe.destroyPopupOnHide,Ye=Pe.forceRender,nt=Pe.align,ht=Pe.point,St=Pe.getRootDomNode,Tt=Pe.getClassNameFromAlign,Mt=Pe.onAlign,er=Pe.onMouseEnter,yr=Pe.onMouseLeave,_r=Pe.onMouseDown,Tr=Pe.onTouchStart,kr=Object(y.useRef)(),Dr=Object(y.useRef)(),Sr=Object(y.useState)(),Yr=Object(v.a)(Sr,2),Ur=Yr[0],Rn=Yr[1],Br=Hr(Ge),ur=Object(v.a)(Br,2),ir=ur[0],Wr=ur[1];function $r(){Ge&&Wr(St())}var Zt=qt(Je,$r),en=Object(v.a)(Zt,2),In=en[0],an=en[1],vn=Object(y.useRef)();function pn(){return ht||St}function Wn(){var wn;(wn=kr.current)===null||wn===void 0||wn.forceAlign()}function ri(wn,yn){var Mn=Tt(yn);Ur!==Mn&&Rn(Mn),In==="align"&&(Ur!==Mn?Promise.resolve().then(function(){Wn()}):an(function(){var Dn;(Dn=vn.current)===null||Dn===void 0||Dn.call(vn)}),Mt==null||Mt(wn,yn))}var kn=Object(k.a)({},ae(Pe));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(wn){var yn=kn[wn];kn[wn]=function(Mn,Dn){return an(),yn==null?void 0:yn(Mn,Dn)}});function xi(){return new Promise(function(wn){vn.current=wn})}y.useEffect(function(){!kn.motionName&&In==="motion"&&an()},[kn.motionName,In]),y.useImperativeHandle(Xe,function(){return{forceAlign:Wn,getElement:function(){return Dr.current}}});var Wi=Object(k.a)(Object(k.a)({},ir),{},{zIndex:He,opacity:In==="motion"||In==="stable"||!Je?void 0:0,pointerEvents:In==="stable"?void 0:"none"},Le),Ci=!0;(nt==null?void 0:nt.points)&&(In==="align"||In==="stable")&&(Ci=!1);var ni=we;return y.Children.count(we)>1&&(ni=y.createElement("div",{className:"".concat(Ue,"-content")},we)),y.createElement(me,Object(h.a)({visible:Je,ref:Dr,leavedClassName:"".concat(Ue,"-hidden")},kn,{onAppearPrepare:xi,onEnterPrepare:xi,removeOnLeave:$e,forceRender:Ye}),function(wn,yn){var Mn=wn.className,Dn=wn.style,zi=S()(Ue,_e,Ur,Mn);return y.createElement(pt.a,{target:pn(),key:"popup",ref:kr,monitorWindowResize:!0,disabled:Ci,align:nt,onAlign:ri},y.createElement("div",{ref:yn,className:zi,onMouseEnter:er,onMouseLeave:yr,onMouseDownCapture:_r,onTouchStartCapture:Tr,style:Object(k.a)(Object(k.a)({},Dn),Wi)},ni))})});nn.displayName="PopupInner";var zr=nn,or=y.forwardRef(function(Pe,Xe){var Je=Pe.prefixCls,Ue=Pe.visible,_e=Pe.zIndex,Le=Pe.children,we=Pe.mobile;we=we===void 0?{}:we;var He=we.popupClassName,Ge=we.popupStyle,$e=we.popupMotion,Ye=$e===void 0?{}:$e,nt=we.popupRender,ht=y.useRef();y.useImperativeHandle(Xe,function(){return{forceAlign:function(){},getElement:function(){return ht.current}}});var St=Object(k.a)({zIndex:_e},Ge),Tt=Le;return y.Children.count(Le)>1&&(Tt=y.createElement("div",{className:"".concat(Je,"-content")},Le)),nt&&(Tt=nt(Tt)),y.createElement(me,Object(h.a)({visible:Ue,ref:ht,removeOnLeave:!0},Ye),function(Mt,er){var yr=Mt.className,_r=Mt.style,Tr=S()(Je,He,yr);return y.createElement("div",{ref:er,className:Tr,style:Object(k.a)(Object(k.a)({},_r),St)},Tt)})});or.displayName="MobilePopupInner";var Qr=or,Cn=["visible","mobile"],zt=y.forwardRef(function(Pe,Xe){var Je=Pe.visible,Ue=Pe.mobile,_e=Object(C.a)(Pe,Cn),Le=Object(y.useState)(Je),we=Object(v.a)(Le,2),He=we[0],Ge=we[1],$e=Object(y.useState)(!1),Ye=Object(v.a)($e,2),nt=Ye[0],ht=Ye[1],St=Object(k.a)(Object(k.a)({},_e),{},{visible:He});Object(y.useEffect)(function(){Ge(Je),Je&&Ue&&ht(Ne())},[Je,Ue]);var Tt=nt?y.createElement(Qr,Object(h.a)({},St,{mobile:Ue,ref:Xe})):y.createElement(zr,Object(h.a)({},St,{ref:Xe}));return y.createElement("div",null,y.createElement(Ke,St),Tt)});zt.displayName="Popup";var pr=zt,fr=y.createContext(null),jr=fr;function Er(){}function li(){return""}function On(Pe){return Pe?Pe.ownerDocument:window.document}var Ui=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Bi(Pe){var Xe=function(Je){Object(x.a)(_e,Je);var Ue=Object(E.a)(_e);function _e(Le){var we;Object(R.a)(this,_e),we=Ue.call(this,Le),we.popupRef=y.createRef(),we.triggerRef=y.createRef(),we.attachId=void 0,we.clickOutsideHandler=void 0,we.touchOutsideHandler=void 0,we.contextMenuOutsideHandler1=void 0,we.contextMenuOutsideHandler2=void 0,we.mouseDownTimeout=void 0,we.focusTime=void 0,we.preClickTime=void 0,we.preTouchTime=void 0,we.delayTimer=void 0,we.hasPopupMouseDown=void 0,we.onMouseEnter=function(Ge){var $e=we.props.mouseEnterDelay;we.fireEvents("onMouseEnter",Ge),we.delaySetPopupVisible(!0,$e,$e?null:Ge)},we.onMouseMove=function(Ge){we.fireEvents("onMouseMove",Ge),we.setPoint(Ge)},we.onMouseLeave=function(Ge){we.fireEvents("onMouseLeave",Ge),we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onPopupMouseEnter=function(){we.clearDelayTimer()},we.onPopupMouseLeave=function(Ge){var $e;if(Ge.relatedTarget&&!Ge.relatedTarget.setTimeout&&Object(st.a)(($e=we.popupRef.current)===null||$e===void 0?void 0:$e.getElement(),Ge.relatedTarget))return;we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onFocus=function(Ge){we.fireEvents("onFocus",Ge),we.clearDelayTimer(),we.isFocusToShow()&&(we.focusTime=Date.now(),we.delaySetPopupVisible(!0,we.props.focusDelay))},we.onMouseDown=function(Ge){we.fireEvents("onMouseDown",Ge),we.preClickTime=Date.now()},we.onTouchStart=function(Ge){we.fireEvents("onTouchStart",Ge),we.preTouchTime=Date.now()},we.onBlur=function(Ge){we.fireEvents("onBlur",Ge),we.clearDelayTimer(),we.isBlurToHide()&&we.delaySetPopupVisible(!1,we.props.blurDelay)},we.onContextMenu=function(Ge){Ge.preventDefault(),we.fireEvents("onContextMenu",Ge),we.setPopupVisible(!0,Ge)},we.onContextMenuClose=function(){we.isContextMenuToShow()&&we.close()},we.onClick=function(Ge){if(we.fireEvents("onClick",Ge),we.focusTime){var $e;if(we.preClickTime&&we.preTouchTime?$e=Math.min(we.preClickTime,we.preTouchTime):we.preClickTime?$e=we.preClickTime:we.preTouchTime&&($e=we.preTouchTime),Math.abs($e-we.focusTime)<20)return;we.focusTime=0}we.preClickTime=0,we.preTouchTime=0,we.isClickToShow()&&(we.isClickToHide()||we.isBlurToHide())&&Ge&&Ge.preventDefault&&Ge.preventDefault();var Ye=!we.state.popupVisible;(we.isClickToHide()&&!Ye||Ye&&we.isClickToShow())&&we.setPopupVisible(!we.state.popupVisible,Ge)},we.onPopupMouseDown=function(){if(we.hasPopupMouseDown=!0,clearTimeout(we.mouseDownTimeout),we.mouseDownTimeout=window.setTimeout(function(){we.hasPopupMouseDown=!1},0),we.context){var Ge;(Ge=we.context).onPopupMouseDown.apply(Ge,arguments)}},we.onDocumentClick=function(Ge){if(we.props.mask&&!we.props.maskClosable)return;var $e=Ge.target,Ye=we.getRootDomNode(),nt=we.getPopupDomNode();(!Object(st.a)(Ye,$e)||we.isContextMenuOnly())&&!Object(st.a)(nt,$e)&&!we.hasPopupMouseDown&&we.close()},we.getRootDomNode=function(){var Ge=we.props.getTriggerDOMNode;if(Ge)return Ge(we.triggerRef.current);try{var $e=Object(lt.a)(we.triggerRef.current);if($e)return $e}catch(Ye){}return at.a.findDOMNode(Object(g.a)(we))},we.getPopupClassNameFromAlign=function(Ge){var $e=[],Ye=we.props,nt=Ye.popupPlacement,ht=Ye.builtinPlacements,St=Ye.prefixCls,Tt=Ye.alignPoint,Mt=Ye.getPopupClassNameFromAlign;return nt&&ht&&$e.push(Ze(ht,St,Ge,Tt)),Mt&&$e.push(Mt(Ge)),$e.join(" ")},we.getComponent=function(){var Ge=we.props,$e=Ge.prefixCls,Ye=Ge.destroyPopupOnHide,nt=Ge.popupClassName,ht=Ge.onPopupAlign,St=Ge.popupMotion,Tt=Ge.popupAnimation,Mt=Ge.popupTransitionName,er=Ge.popupStyle,yr=Ge.mask,_r=Ge.maskAnimation,Tr=Ge.maskTransitionName,kr=Ge.maskMotion,Dr=Ge.zIndex,Sr=Ge.popup,Yr=Ge.stretch,Ur=Ge.alignPoint,Rn=Ge.mobile,Br=Ge.forceRender,ur=we.state,ir=ur.popupVisible,Wr=ur.point,$r=we.getPopupAlign(),Zt={};return we.isMouseEnterToShow()&&(Zt.onMouseEnter=we.onPopupMouseEnter),we.isMouseLeaveToHide()&&(Zt.onMouseLeave=we.onPopupMouseLeave),Zt.onMouseDown=we.onPopupMouseDown,Zt.onTouchStart=we.onPopupMouseDown,y.createElement(pr,Object(h.a)({prefixCls:$e,destroyPopupOnHide:Ye,visible:ir,point:Ur&&Wr,className:nt,align:$r,onAlign:ht,animation:Tt,getClassNameFromAlign:we.getPopupClassNameFromAlign},Zt,{stretch:Yr,getRootDomNode:we.getRootDomNode,style:er,mask:yr,zIndex:Dr,transitionName:Mt,maskAnimation:_r,maskTransitionName:Tr,maskMotion:kr,ref:we.popupRef,motion:St,mobile:Rn,forceRender:Br}),typeof Sr=="function"?Sr():Sr)},we.attachParent=function(Ge){qe.a.cancel(we.attachId);var $e=we.props,Ye=$e.getPopupContainer,nt=$e.getDocument,ht=we.getRootDomNode(),St;Ye?(ht||Ye.length===0)&&(St=Ye(ht)):St=nt(we.getRootDomNode()).body,St?St.appendChild(Ge):we.attachId=Object(qe.a)(function(){we.attachParent(Ge)})},we.getContainer=function(){var Ge=we.props.getDocument,$e=Ge(we.getRootDomNode()).createElement("div");return $e.style.position="absolute",$e.style.top="0",$e.style.left="0",$e.style.width="100%",we.attachParent($e),$e},we.setPoint=function(Ge){var $e=we.props.alignPoint;if(!$e||!Ge)return;we.setState({point:{pageX:Ge.pageX,pageY:Ge.pageY}})},we.handlePortalUpdate=function(){we.state.prevPopupVisible!==we.state.popupVisible&&we.props.afterPopupVisibleChange(we.state.popupVisible)},we.triggerContextValue={onPopupMouseDown:we.onPopupMouseDown};var He;return"popupVisible"in Le?He=!!Le.popupVisible:He=!!Le.defaultPopupVisible,we.state={prevPopupVisible:He,popupVisible:He},Ui.forEach(function(Ge){we["fire".concat(Ge)]=function($e){we.fireEvents(Ge,$e)}}),we}return Object(O.a)(_e,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var we=this.props,He=this.state;if(He.popupVisible){var Ge;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ge=we.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ie.a)(Ge,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ge=Ge||we.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ie.a)(Ge,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ge=Ge||we.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ie.a)(Ge,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ie.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),qe.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var we;return((we=this.popupRef.current)===null||we===void 0?void 0:we.getElement())||null}},{key:"getPopupAlign",value:function(){var we=this.props,He=we.popupPlacement,Ge=we.popupAlign,$e=we.builtinPlacements;return He&&$e?ze($e,He,Ge):Ge}},{key:"setPopupVisible",value:function(we,He){var Ge=this.props.alignPoint,$e=this.state.popupVisible;this.clearDelayTimer(),$e!==we&&("popupVisible"in this.props||this.setState({popupVisible:we,prevPopupVisible:$e}),this.props.onPopupVisibleChange(we)),Ge&&He&&we&&this.setPoint(He)}},{key:"delaySetPopupVisible",value:function(we,He,Ge){var $e=this,Ye=He*1e3;if(this.clearDelayTimer(),Ye){var nt=Ge?{pageX:Ge.pageX,pageY:Ge.pageY}:null;this.delayTimer=window.setTimeout(function(){$e.setPopupVisible(we,nt),$e.clearDelayTimer()},Ye)}else this.setPopupVisible(we,Ge)}},{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(we){var He=this.props.children.props,Ge=this.props;return He[we]&&Ge[we]?this["fire".concat(we)]:He[we]||Ge[we]}},{key:"isClickToShow",value:function(){var we=this.props,He=we.action,Ge=we.showAction;return He.indexOf("click")!==-1||Ge.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var we=this.props.action;return we==="contextMenu"||we.length===1&&we[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var we=this.props,He=we.action,Ge=we.showAction;return He.indexOf("contextMenu")!==-1||Ge.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var we=this.props,He=we.action,Ge=we.hideAction;return He.indexOf("click")!==-1||Ge.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var we=this.props,He=we.action,Ge=we.showAction;return He.indexOf("hover")!==-1||Ge.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var we=this.props,He=we.action,Ge=we.hideAction;return He.indexOf("hover")!==-1||Ge.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var we=this.props,He=we.action,Ge=we.showAction;return He.indexOf("focus")!==-1||Ge.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var we=this.props,He=we.action,Ge=we.hideAction;return He.indexOf("focus")!==-1||Ge.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var we;(we=this.popupRef.current)===null||we===void 0||we.forceAlign()}}},{key:"fireEvents",value:function(we,He){var Ge=this.props.children.props[we];Ge&&Ge(He);var $e=this.props[we];$e&&$e(He)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var we=this.state.popupVisible,He=this.props,Ge=He.children,$e=He.forceRender,Ye=He.alignPoint,nt=He.className,ht=He.autoDestroy,St=y.Children.only(Ge),Tt={key:"trigger"};this.isContextMenuToShow()?Tt.onContextMenu=this.onContextMenu:Tt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Tt.onClick=this.onClick,Tt.onMouseDown=this.onMouseDown,Tt.onTouchStart=this.onTouchStart):(Tt.onClick=this.createTwoChains("onClick"),Tt.onMouseDown=this.createTwoChains("onMouseDown"),Tt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Tt.onMouseEnter=this.onMouseEnter,Ye&&(Tt.onMouseMove=this.onMouseMove)):Tt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Tt.onMouseLeave=this.onMouseLeave:Tt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Tt.onFocus=this.onFocus,Tt.onBlur=this.onBlur):(Tt.onFocus=this.createTwoChains("onFocus"),Tt.onBlur=this.createTwoChains("onBlur"));var Mt=S()(St&&St.props&&St.props.className,nt);Mt&&(Tt.className=Mt);var er=Object(k.a)({},Tt);Object(je.c)(St)&&(er.ref=Object(je.a)(this.triggerRef,St.ref));var yr=y.cloneElement(St,er),_r;return(we||this.popupRef.current||$e)&&(_r=y.createElement(Pe,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!we&&ht&&(_r=null),y.createElement(jr.Provider,{value:this.triggerContextValue},yr,_r)}}],[{key:"getDerivedStateFromProps",value:function(we,He){var Ge=we.popupVisible,$e={};return Ge!==void 0&&He.popupVisible!==Ge&&($e.popupVisible=Ge,$e.prevPopupVisible=He.popupVisible),$e}}]),_e}(y.Component);return Xe.contextType=jr,Xe.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:li,getDocument:On,onPopupVisibleChange:Er,afterPopupVisibleChange:Er,onPopupAlign:Er,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Xe}var qn=Bi(tt.a),sn={adjustX:1,adjustY:1},Si={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]}},dn={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]}},Yn=Si,Zr=0,cr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},tn=function(Xe,Je,Ue){var _e=oe(Je),Le=Xe.getState();Xe.setState({defaultActiveFirst:Object(k.a)(Object(k.a)({},Le.defaultActiveFirst),{},Object(N.a)({},_e,Ue))})},br=function(Pe){Object(x.a)(Je,Pe);var Xe=Object(E.a)(Je);function Je(Ue){var _e;Object(R.a)(this,Je),_e=Xe.call(this,Ue),_e.onDestroy=function(Ye){_e.props.onDestroy(Ye)},_e.onKeyDown=function(Ye){var nt=Ye.keyCode,ht=_e.menuInstance,St=_e.props.store,Tt=_e.getVisible();if(nt===s.a.ENTER)return _e.onTitleClick(Ye),tn(St,_e.props.eventKey,!0),!0;if(nt===s.a.RIGHT)return Tt?ht.onKeyDown(Ye):(_e.triggerOpenChange(!0),tn(St,_e.props.eventKey,!0)),!0;if(nt===s.a.LEFT){var Mt;if(Tt)Mt=ht.onKeyDown(Ye);else return;return Mt||(_e.triggerOpenChange(!1),Mt=!0),Mt}return Tt&&(nt===s.a.UP||nt===s.a.DOWN)?ht.onKeyDown(Ye):void 0},_e.onOpenChange=function(Ye){_e.props.onOpenChange(Ye)},_e.onPopupVisibleChange=function(Ye){_e.triggerOpenChange(Ye,Ye?"mouseenter":"mouseleave")},_e.onMouseEnter=function(Ye){var nt=_e.props,ht=nt.eventKey,St=nt.onMouseEnter,Tt=nt.store;tn(Tt,_e.props.eventKey,!1),St({key:ht,domEvent:Ye})},_e.onMouseLeave=function(Ye){var nt=_e.props,ht=nt.parentMenu,St=nt.eventKey,Tt=nt.onMouseLeave;ht.subMenuInstance=Object(g.a)(_e),Tt({key:St,domEvent:Ye})},_e.onTitleMouseEnter=function(Ye){var nt=_e.props,ht=nt.eventKey,St=nt.onItemHover,Tt=nt.onTitleMouseEnter;St({key:ht,hover:!0}),Tt({key:ht,domEvent:Ye})},_e.onTitleMouseLeave=function(Ye){var nt=_e.props,ht=nt.parentMenu,St=nt.eventKey,Tt=nt.onItemHover,Mt=nt.onTitleMouseLeave;ht.subMenuInstance=Object(g.a)(_e),Tt({key:St,hover:!1}),Mt({key:St,domEvent:Ye})},_e.onTitleClick=function(Ye){var nt=Object(g.a)(_e),ht=nt.props;if(ht.onTitleClick({key:ht.eventKey,domEvent:Ye}),ht.triggerSubMenuAction==="hover")return;_e.triggerOpenChange(!_e.getVisible(),"click"),tn(ht.store,_e.props.eventKey,!1)},_e.onSubMenuClick=function(Ye){typeof _e.props.onClick=="function"&&_e.props.onClick(_e.addKeyPath(Ye))},_e.onSelect=function(Ye){_e.props.onSelect(Ye)},_e.onDeselect=function(Ye){_e.props.onDeselect(Ye)},_e.getPrefixCls=function(){return"".concat(_e.props.rootPrefixCls,"-submenu")},_e.getActiveClassName=function(){return"".concat(_e.getPrefixCls(),"-active")},_e.getDisabledClassName=function(){return"".concat(_e.getPrefixCls(),"-disabled")},_e.getSelectedClassName=function(){return"".concat(_e.getPrefixCls(),"-selected")},_e.getOpenClassName=function(){return"".concat(_e.props.rootPrefixCls,"-submenu-open")},_e.getVisible=function(){return _e.state.isOpen},_e.getMode=function(){return _e.state.mode},_e.saveMenuInstance=function(Ye){_e.menuInstance=Ye},_e.addKeyPath=function(Ye){return Object(k.a)(Object(k.a)({},Ye),{},{keyPath:(Ye.keyPath||[]).concat(_e.props.eventKey)})},_e.triggerOpenChange=function(Ye,nt){var ht=_e.props.eventKey,St=function(){_e.onOpenChange({key:ht,item:Object(g.a)(_e),trigger:nt,open:Ye})};nt==="mouseenter"?_e.mouseenterTimeout=setTimeout(function(){St()},0):St()},_e.isChildrenSelected=function(){var Ye={find:!1};return Y(_e.props.children,_e.props.selectedKeys,Ye),Ye.find},_e.isInlineMode=function(){return _e.getMode()==="inline"},_e.adjustWidth=function(){if(!_e.subMenuTitle||!_e.menuInstance)return;var Ye=rt.findDOMNode(_e.menuInstance);if(Ye.offsetWidth>=_e.subMenuTitle.offsetWidth)return;Ye.style.minWidth="".concat(_e.subMenuTitle.offsetWidth,"px")},_e.saveSubMenuTitle=function(Ye){_e.subMenuTitle=Ye},_e.getBaseProps=function(){var Ye=Object(g.a)(_e),nt=Ye.props,ht=_e.getMode();return{mode:ht==="horizontal"?"vertical":ht,visible:_e.getVisible(),level:nt.level+1,inlineIndent:nt.inlineIndent,focusable:!1,onClick:_e.onSubMenuClick,onSelect:_e.onSelect,onDeselect:_e.onDeselect,onDestroy:_e.onDestroy,selectedKeys:nt.selectedKeys,eventKey:"".concat(nt.eventKey,"-menu-"),openKeys:nt.openKeys,motion:nt.motion,onOpenChange:_e.onOpenChange,subMenuOpenDelay:nt.subMenuOpenDelay,parentMenu:Object(g.a)(_e),subMenuCloseDelay:nt.subMenuCloseDelay,forceSubMenuRender:nt.forceSubMenuRender,triggerSubMenuAction:nt.triggerSubMenuAction,builtinPlacements:nt.builtinPlacements,defaultActiveFirst:nt.store.getState().defaultActiveFirst[oe(nt.eventKey)],multiple:nt.multiple,prefixCls:nt.rootPrefixCls,id:_e.internalMenuId,manualRef:_e.saveMenuInstance,itemIcon:nt.itemIcon,expandIcon:nt.expandIcon,direction:nt.direction}},_e.getMotion=function(Ye,nt){var ht=Object(g.a)(_e),St=ht.haveRendered,Tt=_e.props,Mt=Tt.motion,er=Tt.rootPrefixCls,yr=Object(k.a)(Object(k.a)({},Mt),{},{leavedClassName:"".concat(er,"-hidden"),removeOnLeave:!1,motionAppear:St||!nt||Ye!=="inline"});return yr};var Le=Ue.store,we=Ue.eventKey,He=Le.getState(),Ge=He.defaultActiveFirst;_e.isRootMenu=!1;var $e=!1;return Ge&&($e=Ge[we]),tn(Le,we,$e),_e.state={mode:Ue.mode,isOpen:Ue.isOpen},_e}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var _e=this,Le=this.props,we=Le.mode,He=Le.parentMenu,Ge=Le.manualRef,$e=Le.isOpen,Ye=function(){_e.setState({mode:we,isOpen:$e})},nt=$e!==this.state.isOpen,ht=we!==this.state.mode;if((ht||nt)&&(qe.a.cancel(this.updateStateRaf),ht?this.updateStateRaf=Object(qe.a)(Ye):Ye()),Ge&&Ge(this),we!=="horizontal"||!(He==null?void 0:He.isRootMenu)||!$e)return;this.minWidthTimeout=setTimeout(function(){return _e.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var _e=this.props,Le=_e.onDestroy,we=_e.eventKey;Le&&Le(we),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),qe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(_e,Le){var we=this.getBaseProps();return y.createElement(Hi,Object(h.a)({},we,{id:this.internalMenuId,className:_e,style:Le}),this.props.children)}},{key:"renderChildren",value:function(){var _e=this,Le=this.getBaseProps(),we=Le.mode,He=Le.visible,Ge=Le.forceSubMenuRender,$e=Le.direction,Ye=this.getMotion(we,He);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||He||Ge,!this.haveOpened)return y.createElement("div",null);var nt=S()("".concat(Le.prefixCls,"-sub"),Object(N.a)({},"".concat(Le.prefixCls,"-rtl"),$e==="rtl"));return this.isInlineMode()?y.createElement(me,Object(h.a)({visible:Le.visible,forceRender:Ge},Ye),function(ht){var St=ht.className,Tt=ht.style,Mt=S()(nt,St);return _e.renderPopupMenu(Mt,Tt)}):this.renderPopupMenu(nt)}},{key:"render",value:function(){var _e,Le,we,He=Object(k.a)({},this.props),Ge=this.getVisible(),$e=this.getPrefixCls(),Ye=this.isInlineMode(),nt=this.getMode(),ht=S()($e,"".concat($e,"-").concat(nt),(_e={},Object(N.a)(_e,He.className,!!He.className),Object(N.a)(_e,this.getOpenClassName(),Ge),Object(N.a)(_e,this.getActiveClassName(),He.active||Ge&&!Ye),Object(N.a)(_e,this.getDisabledClassName(),He.disabled),Object(N.a)(_e,this.getSelectedClassName(),this.isChildrenSelected()),_e));this.internalMenuId||(He.eventKey?this.internalMenuId="".concat(He.eventKey,"$Menu"):(Zr+=1,this.internalMenuId="$__$".concat(Zr,"$Menu")));var St={},Tt={},Mt={};He.disabled||(St={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Tt={onClick:this.onTitleClick},Mt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var er={},yr=He.direction,_r=yr==="rtl";Ye&&(_r?er.paddingRight=He.inlineIndent*He.level:er.paddingLeft=He.inlineIndent*He.level);var Tr={};this.getVisible()&&(Tr={"aria-owns":this.internalMenuId});var kr=null;nt!=="horizontal"&&(kr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(kr=y.createElement(this.props.expandIcon,Object(k.a)({},this.props))));var Dr=y.createElement("div",Object(h.a)({ref:this.saveSubMenuTitle,style:er,className:"".concat($e,"-title"),role:"button"},Mt,Tt,{"aria-expanded":Ge},Tr,{"aria-haspopup":"true",title:typeof He.title=="string"?He.title:void 0}),He.title,kr||y.createElement("i",{className:"".concat($e,"-arrow")})),Sr=this.renderChildren(),Yr=((Le=He.parentMenu)===null||Le===void 0?void 0:Le.isRootMenu)?He.parentMenu.props.getPopupContainer:function(pn){return pn.parentNode},Ur=cr[nt],Rn=He.popupOffset?{offset:He.popupOffset}:{},Br=S()((we={},Object(N.a)(we,He.popupClassName,He.popupClassName&&!Ye),Object(N.a)(we,"".concat($e,"-rtl"),_r),we)),ur=He.disabled,ir=He.triggerSubMenuAction,Wr=He.subMenuOpenDelay,$r=He.forceSubMenuRender,Zt=He.subMenuCloseDelay,en=He.builtinPlacements;Z.forEach(function(pn){return delete He[pn]}),delete He.onClick;var In=_r?Object(k.a)(Object(k.a)({},dn),en):Object(k.a)(Object(k.a)({},Si),en);delete He.direction;var an=this.getBaseProps(),vn=Ye?null:this.getMotion(an.mode,an.visible);return y.createElement("li",Object(h.a)({},He,St,{className:ht,role:"menuitem"}),y.createElement(qn,{prefixCls:$e,popupClassName:S()("".concat($e,"-popup"),Br),getPopupContainer:Yr,builtinPlacements:In,popupPlacement:Ur,popupVisible:Ye?!1:Ge,popupAlign:Rn,popup:Ye?null:Sr,action:ur||Ye?[]:[ir],mouseEnterDelay:Wr,mouseLeaveDelay:Zt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:$r,popupMotion:vn},Dr),Ye?Sr:null)}}]),Je}(y.Component);br.defaultProps={onMouseEnter:ce,onMouseLeave:ce,onTitleMouseEnter:ce,onTitleMouseLeave:ce,onTitleClick:ce,manualRef:ce,mode:"vertical",title:""};var hn=Object(T.b)(function(Pe,Xe){var Je=Pe.openKeys,Ue=Pe.activeKey,_e=Pe.selectedKeys,Le=Xe.eventKey,we=Xe.subMenuKey;return{isOpen:Je.indexOf(Le)>-1,active:Ue[we]===Le,selectedKeys:_e}})(br);hn.isSubMenu=!0;var Fr=hn,mi="menuitem-overflowed",_n=.5,Un=function(Pe){Object(x.a)(Je,Pe);var Xe=Object(E.a)(Je);function Je(){var Ue;return Object(R.a)(this,Je),Ue=Xe.apply(this,arguments),Ue.resizeObserver=null,Ue.mutationObserver=null,Ue.originalTotalWidth=0,Ue.overflowedItems=[],Ue.menuItemSizes=[],Ue.cancelFrameId=null,Ue.state={lastVisibleIndex:void 0},Ue.childRef=y.createRef(),Ue.getMenuItemNodes=function(){var _e=Ue.props.prefixCls,Le=Ue.childRef.current;return Le?[].slice.call(Le.children).filter(function(we){return we.className.split(" ").indexOf("".concat(_e,"-overflowed-submenu"))<0}):[]},Ue.getOverflowedSubMenuItem=function(_e,Le,we){var He=Ue.props,Ge=He.overflowedIndicator,$e=He.level,Ye=He.mode,nt=He.prefixCls,ht=He.theme;if($e!==1||Ye!=="horizontal")return null;var St=Ue.props.children[0],Tt=St.props,Mt=Tt.children,er=Tt.title,yr=Tt.style,_r=Object(C.a)(Tt,["children","title","style"]),Tr=Object(k.a)({},yr),kr="".concat(_e,"-overflowed-indicator"),Dr="".concat(_e,"-overflowed-indicator");Le.length===0&&we!==!0?Tr=Object(k.a)(Object(k.a)({},Tr),{},{display:"none"}):we&&(Tr=Object(k.a)(Object(k.a)({},Tr),{},{visibility:"hidden",position:"absolute"}),kr="".concat(kr,"-placeholder"),Dr="".concat(Dr,"-placeholder"));var Sr=ht?"".concat(nt,"-").concat(ht):"",Yr={};return Z.forEach(function(Ur){_r[Ur]!==void 0&&(Yr[Ur]=_r[Ur])}),y.createElement(Fr,Object(h.a)({title:Ge,className:"".concat(nt,"-overflowed-submenu"),popupClassName:Sr},Yr,{key:kr,eventKey:Dr,disabled:!1,style:Tr}),Le)},Ue.setChildrenWidthAndResize=function(){if(Ue.props.mode!=="horizontal")return;var _e=Ue.childRef.current;if(!_e)return;var Le=_e.children;if(!Le||Le.length===0)return;var we=_e.children[Le.length-1];be(we,"display","inline-block");var He=Ue.getMenuItemNodes(),Ge=He.filter(function($e){return $e.className.split(" ").indexOf(mi)>=0});Ge.forEach(function($e){be($e,"display","inline-block")}),Ue.menuItemSizes=He.map(function($e){return ye($e,!0)}),Ge.forEach(function($e){be($e,"display","none")}),Ue.overflowedIndicatorWidth=ye(_e.children[_e.children.length-1],!0),Ue.originalTotalWidth=Ue.menuItemSizes.reduce(function($e,Ye){return $e+Ye},0),Ue.handleResize(),be(we,"display","none")},Ue.handleResize=function(){if(Ue.props.mode!=="horizontal")return;var _e=Ue.childRef.current;if(!_e)return;var Le=ye(_e);Ue.overflowedItems=[];var we=0,He;Ue.originalTotalWidth>Le+_n&&(He=-1,Ue.menuItemSizes.forEach(function(Ge){we+=Ge,we+Ue.overflowedIndicatorWidth<=Le&&(He+=1)})),Ue.setState({lastVisibleIndex:He})},Ue}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){var _e=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Le=this.childRef.current;if(!Le)return;this.resizeObserver=new Qe.default(function(we){we.forEach(function(){var He=_e.cancelFrameId;cancelAnimationFrame(He),_e.cancelFrameId=requestAnimationFrame(_e.setChildrenWidthAndResize)})}),[].slice.call(Le.children).concat(Le).forEach(function(we){_e.resizeObserver.observe(we)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){_e.resizeObserver.disconnect(),[].slice.call(Le.children).concat(Le).forEach(function(we){_e.resizeObserver.observe(we)}),_e.setChildrenWidthAndResize()}),this.mutationObserver.observe(Le,{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(_e){var Le=this,we=this.state.lastVisibleIndex;return(_e||[]).reduce(function(He,Ge,$e){var Ye=Ge;if(Le.props.mode==="horizontal"){var nt=Le.getOverflowedSubMenuItem(Ge.props.eventKey,[]);we!==void 0&&Le.props.className.indexOf("".concat(Le.props.prefixCls,"-root"))!==-1&&($e>we&&(Ye=y.cloneElement(Ge,{style:{display:"none"},eventKey:"".concat(Ge.props.eventKey,"-hidden"),className:"".concat(mi)})),$e===we+1&&(Le.overflowedItems=_e.slice(we+1).map(function(St){return y.cloneElement(St,{key:St.props.eventKey,mode:"vertical-left"})}),nt=Le.getOverflowedSubMenuItem(Ge.props.eventKey,Le.overflowedItems)));var ht=[].concat(Object(d.a)(He),[nt,Ye]);return $e===_e.length-1&&ht.push(Le.getOverflowedSubMenuItem(Ge.props.eventKey,[],!0)),ht}return[].concat(Object(d.a)(He),[Ye])},[])}},{key:"render",value:function(){var _e=this.props,Le=_e.visible,we=_e.prefixCls,He=_e.overflowedIndicator,Ge=_e.mode,$e=_e.level,Ye=_e.tag,nt=_e.children,ht=_e.theme,St=Object(C.a)(_e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Tt=Ye;return y.createElement(Tt,Object(h.a)({ref:this.childRef},St),this.renderChildren(nt))}}]),Je}(y.Component);Un.defaultProps={tag:"div",className:""};var Di=Un;function ui(Pe){return Pe.length?Pe.every(function(Xe){return!!Xe.props.disabled}):!0}function bi(Pe,Xe,Je){var Ue=Pe.getState();Pe.setState({activeKey:Object(k.a)(Object(k.a)({},Ue.activeKey),{},Object(N.a)({},Xe,Je))})}function ei(Pe){return Pe.eventKey||"0-menu-"}function ti(Pe,Xe){var Je=Xe,Ue=Pe.children,_e=Pe.eventKey;if(Je){var Le;if(q(Ue,function(we,He){we&&we.props&&!we.props.disabled&&Je===Oe(we,_e,He)&&(Le=!0)}),Le)return Je}return Je=null,Pe.defaultActiveFirst&&q(Ue,function(we,He){!Je&&we&&!we.props.disabled&&(Je=Oe(we,_e,He))}),Je}function ji(Pe){if(!Pe)return;var Xe=this.instanceArray.indexOf(Pe);Xe!==-1?this.instanceArray[Xe]=Pe:this.instanceArray.push(Pe)}var ci=function(Pe){Object(x.a)(Je,Pe);var Xe=Object(E.a)(Je);function Je(Ue){var _e;return Object(R.a)(this,Je),_e=Xe.call(this,Ue),_e.onKeyDown=function(Le,we){var He=Le.keyCode,Ge;if(_e.getFlatInstanceArray().forEach(function(Ye){Ye&&Ye.props.active&&Ye.onKeyDown&&(Ge=Ye.onKeyDown(Le))}),Ge)return 1;var $e=null;return(He===s.a.UP||He===s.a.DOWN)&&($e=_e.step(He===s.a.UP?-1:1)),$e?(Le.preventDefault(),bi(_e.props.store,ei(_e.props),$e.props.eventKey),typeof we=="function"&&we($e),1):void 0},_e.onItemHover=function(Le){var we=Le.key,He=Le.hover;bi(_e.props.store,ei(_e.props),He?we:null)},_e.onDeselect=function(Le){_e.props.onDeselect(Le)},_e.onSelect=function(Le){_e.props.onSelect(Le)},_e.onClick=function(Le){_e.props.onClick(Le)},_e.onOpenChange=function(Le){_e.props.onOpenChange(Le)},_e.onDestroy=function(Le){_e.props.onDestroy(Le)},_e.getFlatInstanceArray=function(){return _e.instanceArray},_e.step=function(Le){var we=_e.getFlatInstanceArray(),He=_e.props.store.getState().activeKey[ei(_e.props)],Ge=we.length;if(!Ge)return null;Le<0&&(we=we.concat().reverse());var $e=-1;if(we.every(function(St,Tt){return St&&St.props.eventKey===He?($e=Tt,!1):!0}),!_e.props.defaultActiveFirst&&$e!==-1&&ui(we.slice($e,Ge-1)))return;var Ye=($e+1)%Ge,nt=Ye;do{var ht=we[nt];if(!ht||ht.props.disabled)nt=(nt+1)%Ge;else return ht}while(nt!==Ye);return null},_e.renderCommonMenuItem=function(Le,we,He){var Ge=_e.props.store.getState(),$e=Object(g.a)(_e),Ye=$e.props,nt=Oe(Le,Ye.eventKey,we),ht=Le.props;if(!ht||typeof Le.type=="string")return Le;var St=nt===Ge.activeKey,Tt=Object(k.a)(Object(k.a)({mode:ht.mode||Ye.mode,level:Ye.level,inlineIndent:Ye.inlineIndent,renderMenuItem:_e.renderMenuItem,rootPrefixCls:Ye.prefixCls,index:we,parentMenu:Ye.parentMenu,manualRef:ht.disabled?void 0:Object(L.a)(Le.ref,ji.bind(Object(g.a)(_e))),eventKey:nt,active:!ht.disabled&&St,multiple:Ye.multiple,onClick:function(er){(ht.onClick||ce)(er),_e.onClick(er)},onItemHover:_e.onItemHover,motion:Ye.motion,subMenuOpenDelay:Ye.subMenuOpenDelay,subMenuCloseDelay:Ye.subMenuCloseDelay,forceSubMenuRender:Ye.forceSubMenuRender,onOpenChange:_e.onOpenChange,onDeselect:_e.onDeselect,onSelect:_e.onSelect,builtinPlacements:Ye.builtinPlacements,itemIcon:ht.itemIcon||_e.props.itemIcon,expandIcon:ht.expandIcon||_e.props.expandIcon},He),{},{direction:Ye.direction});return(Ye.mode==="inline"||Re())&&(Tt.triggerSubMenuAction="click"),y.cloneElement(Le,Object(k.a)(Object(k.a)({},Tt),{},{key:nt||we}))},_e.renderMenuItem=function(Le,we,He){if(!Le)return null;var Ge=_e.props.store.getState(),$e={openKeys:Ge.openKeys,selectedKeys:Ge.selectedKeys,triggerSubMenuAction:_e.props.triggerSubMenuAction,subMenuKey:He};return _e.renderCommonMenuItem(Le,we,$e)},Ue.store.setState({activeKey:Object(k.a)(Object(k.a)({},Ue.store.getState().activeKey),{},Object(N.a)({},Ue.eventKey,ti(Ue,Ue.activeKey)))}),_e.instanceArray=[],_e}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(_e){return this.props.visible||_e.visible||this.props.className!==_e.className||!V()(this.props.style,_e.style)}},{key:"componentDidUpdate",value:function(_e){var Le=this.props,we="activeKey"in Le?Le.activeKey:Le.store.getState().activeKey[ei(Le)],He=ti(Le,we);if(He!==we)bi(Le.store,ei(Le),He);else if("activeKey"in _e){var Ge=ti(_e,_e.activeKey);He!==Ge&&bi(Le.store,ei(Le),He)}}},{key:"render",value:function(){var _e=this,Le=Object(h.a)({},this.props);this.instanceArray=[];var we=S()(Le.prefixCls,Le.className,"".concat(Le.prefixCls,"-").concat(Le.mode)),He={className:we,role:Le.role||"menu"};Le.id&&(He.id=Le.id),Le.focusable&&(He.tabIndex=0,He.onKeyDown=this.onKeyDown);var Ge=Le.prefixCls,$e=Le.eventKey,Ye=Le.visible,nt=Le.level,ht=Le.mode,St=Le.overflowedIndicator,Tt=Le.theme;return Z.forEach(function(Mt){return delete Le[Mt]}),delete Le.onClick,y.createElement(Di,Object(h.a)({},Le,{prefixCls:Ge,mode:ht,tag:"ul",level:nt,theme:Tt,visible:Ye,overflowedIndicator:St},He),Object(b.a)(Le.children).map(function(Mt,er){return _e.renderMenuItem(Mt,er,$e||"0-menu-")}))}}]),Je}(y.Component);ci.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ce};var _i=Object(T.b)()(ci),Hi=_i,di=j("Kwbf");function qr(Pe,Xe,Je){var Ue=Pe.prefixCls,_e=Pe.motion,Le=Pe.defaultMotions,we=Le===void 0?{}:Le,He=Pe.openAnimation,Ge=Pe.openTransitionName,$e=Xe.switchingModeFromInline;if(_e)return _e;if(Object(z.a)(He)==="object"&&He)Object(di.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof He=="string")return{motionName:"".concat(Ue,"-open-").concat(He)};if(Ge)return{motionName:Ge};var Ye=we[Je];return Ye||($e?null:we.other)}var Yt=function(Pe){Object(x.a)(Je,Pe);var Xe=Object(E.a)(Je);function Je(Ue){var _e;Object(R.a)(this,Je),_e=Xe.call(this,Ue),_e.onSelect=function(He){var Ge=Object(g.a)(_e),$e=Ge.props;if($e.selectable){var Ye=_e.store.getState(),nt=Ye.selectedKeys,ht=He.key;$e.multiple?nt=nt.concat([ht]):nt=[ht],"selectedKeys"in $e||_e.store.setState({selectedKeys:nt}),$e.onSelect(Object(k.a)(Object(k.a)({},He),{},{selectedKeys:nt}))}},_e.onClick=function(He){var Ge=_e.getRealMenuMode(),$e=Object(g.a)(_e),Ye=$e.store,nt=$e.props.onOpenChange;Ge!=="inline"&&!("openKeys"in _e.props)&&(Ye.setState({openKeys:[]}),nt([])),_e.props.onClick(He)},_e.onKeyDown=function(He,Ge){_e.innerMenu.getWrappedInstance().onKeyDown(He,Ge)},_e.onOpenChange=function(He){var Ge=Object(g.a)(_e),$e=Ge.props,Ye=_e.store.getState().openKeys.concat(),nt=!1,ht=function(Tt){var Mt=!1;if(Tt.open)Mt=Ye.indexOf(Tt.key)===-1,Mt&&Ye.push(Tt.key);else{var er=Ye.indexOf(Tt.key);Mt=er!==-1,Mt&&Ye.splice(er,1)}nt=nt||Mt};Array.isArray(He)?He.forEach(ht):ht(He),nt&&("openKeys"in _e.props||_e.store.setState({openKeys:Ye}),$e.onOpenChange(Ye))},_e.onDeselect=function(He){var Ge=Object(g.a)(_e),$e=Ge.props;if($e.selectable){var Ye=_e.store.getState().selectedKeys.concat(),nt=He.key,ht=Ye.indexOf(nt);ht!==-1&&Ye.splice(ht,1),"selectedKeys"in $e||_e.store.setState({selectedKeys:Ye}),$e.onDeselect(Object(k.a)(Object(k.a)({},He),{},{selectedKeys:Ye}))}},_e.onMouseEnter=function(He){_e.restoreModeVerticalFromInline();var Ge=_e.props.onMouseEnter;Ge&&Ge(He)},_e.onTransitionEnd=function(He){var Ge=He.propertyName==="width"&&He.target===He.currentTarget,$e=He.target.className,Ye=Object.prototype.toString.call($e)==="[object SVGAnimatedString]"?$e.animVal:$e,nt=He.propertyName==="font-size"&&Ye.indexOf("anticon")>=0;(Ge||nt)&&_e.restoreModeVerticalFromInline()},_e.setInnerMenu=function(He){_e.innerMenu=He},_e.isRootMenu=!0;var Le=Ue.defaultSelectedKeys,we=Ue.defaultOpenKeys;return"selectedKeys"in Ue&&(Le=Ue.selectedKeys||[]),"openKeys"in Ue&&(we=Ue.openKeys||[]),_e.store=Object(T.c)({selectedKeys:Le,openKeys:we,activeKey:{"0-menu-":ti(Ue,Ue.activeKey)}}),_e.state={switchingModeFromInline:!1,prevProps:Ue,inlineOpenKeys:[],store:_e.store},_e}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(_e){var Le=this.props,we=Le.siderCollapsed,He=Le.inlineCollapsed,Ge=Le.onOpenChange;(!_e.inlineCollapsed&&He||!_e.siderCollapsed&&we)&&Ge([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var _e=this.props.collapsedWidth,Le=this.store,we=this.prevOpenKeys,He=this.getInlineCollapsed()&&(_e===0||_e==="0"||_e==="0px");He?(this.prevOpenKeys=Le.getState().openKeys.concat(),this.store.setState({openKeys:[]})):we&&(this.store.setState({openKeys:we}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var _e=this.props.mode,Le=this.state.switchingModeFromInline,we=this.getInlineCollapsed();return Le&&we?"inline":we?"vertical":_e}},{key:"getInlineCollapsed",value:function(){var _e=this.props,Le=_e.inlineCollapsed,we=_e.siderCollapsed;return we!==void 0?we:Le}},{key:"restoreModeVerticalFromInline",value:function(){var _e=this.state.switchingModeFromInline;_e&&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 _e=Object(k.a)({},Object(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Le=this.getRealMenuMode();return _e.className+=" ".concat(_e.prefixCls,"-root"),_e.direction==="rtl"&&(_e.className+=" ".concat(_e.prefixCls,"-rtl")),_e=Object(k.a)(Object(k.a)({},_e),{},{mode:Le,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:qr(this.props,this.state,Le)}),delete _e.openAnimation,delete _e.openTransitionName,y.createElement(T.a,{store:this.store},y.createElement(Hi,Object(h.a)({},_e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(_e,Le){var we=Le.prevProps,He=Le.store,Ge=He.getState(),$e={},Ye={prevProps:_e};return we.mode==="inline"&&_e.mode!=="inline"&&(Ye.switchingModeFromInline=!0),"openKeys"in _e?$e.openKeys=_e.openKeys||[]:((_e.inlineCollapsed&&!we.inlineCollapsed||_e.siderCollapsed&&!we.siderCollapsed)&&(Ye.switchingModeFromInline=!0,Ye.inlineOpenKeys=Ge.openKeys,$e.openKeys=[]),(!_e.inlineCollapsed&&we.inlineCollapsed||!_e.siderCollapsed&&we.siderCollapsed)&&($e.openKeys=Le.inlineOpenKeys,Ye.inlineOpenKeys=[])),Object.keys($e).length&&He.setState($e),Ye}}]),Je}(y.Component);Yt.defaultProps={selectable:!0,onClick:ce,onSelect:ce,onOpenChange:ce,onDeselect:ce,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:y.createElement("span",null,"\xB7\xB7\xB7")};var sr=Yt,Qt=function(Pe){Object(x.a)(Je,Pe);var Xe=Object(E.a)(Je);function Je(){var Ue;return Object(R.a)(this,Je),Ue=Xe.apply(this,arguments),Ue.onKeyDown=function(_e){var Le=_e.keyCode;return Le===s.a.ENTER?(Ue.onClick(_e),!0):void 0},Ue.onMouseLeave=function(_e){var Le=Ue.props,we=Le.eventKey,He=Le.onItemHover,Ge=Le.onMouseLeave;He({key:we,hover:!1}),Ge({key:we,domEvent:_e})},Ue.onMouseEnter=function(_e){var Le=Ue.props,we=Le.eventKey,He=Le.onItemHover,Ge=Le.onMouseEnter;He({key:we,hover:!0}),Ge({key:we,domEvent:_e})},Ue.onClick=function(_e){var Le=Ue.props,we=Le.eventKey,He=Le.multiple,Ge=Le.onClick,$e=Le.onSelect,Ye=Le.onDeselect,nt=Le.isSelected,ht={key:we,keyPath:[we],item:Object(g.a)(Ue),domEvent:_e};Ge(ht),He?nt?Ye(ht):$e(ht):nt||$e(ht)},Ue.saveNode=function(_e){Ue.node=_e},Ue}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var _e=this.props;_e.onDestroy&&_e.onDestroy(_e.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 _e,Le=Object(k.a)({},this.props),we=S()(this.getPrefixCls(),Le.className,(_e={},Object(N.a)(_e,this.getActiveClassName(),!Le.disabled&&Le.active),Object(N.a)(_e,this.getSelectedClassName(),Le.isSelected),Object(N.a)(_e,this.getDisabledClassName(),Le.disabled),_e)),He=Object(k.a)(Object(k.a)({},Le.attribute),{},{title:typeof Le.title=="string"?Le.title:void 0,className:we,role:Le.role||"menuitem","aria-disabled":Le.disabled});Le.role==="option"?He=Object(k.a)(Object(k.a)({},He),{},{role:"option","aria-selected":Le.isSelected}):(Le.role===null||Le.role==="none")&&(He.role="none");var Ge={onClick:Le.disabled?null:this.onClick,onMouseLeave:Le.disabled?null:this.onMouseLeave,onMouseEnter:Le.disabled?null:this.onMouseEnter},$e=Object(k.a)({},Le.style);Le.mode==="inline"&&(Le.direction==="rtl"?$e.paddingRight=Le.inlineIndent*Le.level:$e.paddingLeft=Le.inlineIndent*Le.level),Z.forEach(function(nt){return delete Le[nt]}),delete Le.direction;var Ye=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ye=y.createElement(this.props.itemIcon,this.props)),y.createElement("li",Object(h.a)({},Object(M.a)(Le,["onClick","onMouseEnter","onMouseLeave","onSelect"]),He,Ge,{style:$e,ref:this.saveNode}),Le.children,Ye)}}]),Je}(y.Component);Qt.isMenuItem=!0,Qt.defaultProps={onSelect:ce,onMouseEnter:ce,onMouseLeave:ce,manualRef:ce};var gr=Object(T.b)(function(Pe,Xe){var Je=Pe.activeKey,Ue=Pe.selectedKeys,_e=Xe.eventKey,Le=Xe.subMenuKey;return{active:Je[Le]===_e,isSelected:Array.isArray(Ue)?Ue.indexOf(_e)!==-1:Ue===_e}})(Qt),Lr=gr,Kr=function(Pe){Object(x.a)(Je,Pe);var Xe=Object(E.a)(Je);function Je(){var Ue;return Object(R.a)(this,Je),Ue=Xe.apply(this,arguments),Ue.renderInnerMenuItem=function(_e){var Le=Ue.props,we=Le.renderMenuItem,He=Le.index;return we(_e,He,Ue.props.subMenuKey)},Ue}return Object(O.a)(Je,[{key:"render",value:function(){var _e=Object(h.a)({},this.props),Le=_e.className,we=Le===void 0?"":Le,He=_e.rootPrefixCls,Ge="".concat(He,"-item-group-title"),$e="".concat(He,"-item-group-list"),Ye=_e.title,nt=_e.children;return Z.forEach(function(ht){return delete _e[ht]}),delete _e.direction,y.createElement("li",Object(h.a)({},_e,{onClick:function(St){return St.stopPropagation()},className:"".concat(we," ").concat(He,"-item-group")}),y.createElement("div",{className:Ge,title:typeof Ye=="string"?Ye:void 0},Ye),y.createElement("ul",{className:$e},y.Children.map(nt,this.renderInnerMenuItem)))}}]),Je}(y.Component);Kr.isMenuItemGroup=!0,Kr.defaultProps={disabled:!0};var Ar=Kr,gn=function(Xe){var Je=Xe.className,Ue=Xe.rootPrefixCls,_e=Xe.style;return y.createElement("li",{className:"".concat(Je," ").concat(Ue,"-item-divider"),style:_e})};gn.defaultProps={disabled:!0,className:"",style:{}};var $n=gn,xr=sr,Ei=j("eDIo");function Vr(Pe,Xe){var Je=Pe.prefixCls,Ue=Pe.editable,_e=Pe.locale,Le=Pe.style;return!Ue||Ue.showAdd===!1?null:y.createElement("button",{ref:Xe,type:"button",className:"".concat(Je,"-nav-add"),style:Le,"aria-label":(_e==null?void 0:_e.addAriaLabel)||"Add tab",onClick:function(He){Ue.onEdit("add",{event:He})}},Ue.addIcon||"+")}var jn=y.forwardRef(Vr);function Bn(Pe,Xe){var Je=Pe.prefixCls,Ue=Pe.id,_e=Pe.tabs,Le=Pe.locale,we=Pe.mobile,He=Pe.moreIcon,Ge=He===void 0?"More":He,$e=Pe.moreTransitionName,Ye=Pe.style,nt=Pe.className,ht=Pe.editable,St=Pe.tabBarGutter,Tt=Pe.rtl,Mt=Pe.onTabClick,er=Object(y.useState)(!1),yr=Object(v.a)(er,2),_r=yr[0],Tr=yr[1],kr=Object(y.useState)(null),Dr=Object(v.a)(kr,2),Sr=Dr[0],Yr=Dr[1],Ur="".concat(Ue,"-more-popup"),Rn="".concat(Je,"-dropdown"),Br=Sr!==null?"".concat(Ur,"-").concat(Sr):null,ur=Le==null?void 0:Le.dropdownAriaLabel,ir=y.createElement(xr,{onClick:function(vn){var pn=vn.key,Wn=vn.domEvent;Mt(pn,Wn),Tr(!1)},id:Ur,tabIndex:-1,role:"listbox","aria-activedescendant":Br,selectedKeys:[Sr],"aria-label":ur!==void 0?ur:"expanded dropdown"},_e.map(function(an){return y.createElement(Lr,{key:an.key,id:"".concat(Ur,"-").concat(an.key),role:"option","aria-controls":Ue&&"".concat(Ue,"-panel-").concat(an.key),disabled:an.disabled},an.tab)}));function Wr(an){for(var vn=_e.filter(function(xi){return!xi.disabled}),pn=vn.findIndex(function(xi){return xi.key===Sr})||0,Wn=vn.length,ri=0;rien?($r=ir,Ur.current="x"):($r=Wr,Ur.current="y");var In=Date.now();In-Sr.current>100&&(Yr.current=!1),(Xe(-$r,-$r)||Yr.current)&&(ur.preventDefault(),Yr.current=!0),Sr.current=In}var Br=Object(y.useRef)(null);Br.current={onTouchStart:Tr,onTouchMove:kr,onTouchEnd:Dr,onWheel:Rn},y.useEffect(function(){function ur(Zt){Br.current.onTouchStart(Zt)}function ir(Zt){Br.current.onTouchMove(Zt)}function Wr(Zt){Br.current.onTouchEnd(Zt)}function $r(Zt){Br.current.onWheel(Zt)}return document.addEventListener("touchmove",ir,{passive:!1}),document.addEventListener("touchend",Wr,{passive:!1}),Pe.current.addEventListener("touchstart",ur,{passive:!1}),Pe.current.addEventListener("wheel",$r),function(){document.removeEventListener("touchmove",ir),document.removeEventListener("touchend",Wr)}},[])}function lr(){var Pe=Object(y.useRef)(new Map);function Xe(Ue){return Pe.current.has(Ue)||Pe.current.set(Ue,y.createRef()),Pe.current.get(Ue)}function Je(Ue){Pe.current.delete(Ue)}return[Xe,Je]}function Ft(Pe,Xe){var Je=y.useRef(Pe),Ue=y.useState({}),_e=Object(v.a)(Ue,2),Le=_e[1];function we(He){var Ge=typeof He=="function"?He(Je.current):He;Ge!==Je.current&&Xe(Ge,Je.current),Je.current=Ge,Le({})}return[Je.current,we]}var mr=function(Xe){var Je=Xe.position,Ue=Xe.prefixCls,_e=Xe.extra;if(!_e)return null;var Le,we=_e;return Je==="right"&&(Le=we.right||!we.left&&we||null),Je==="left"&&(Le=we.left||null),Le?y.createElement("div",{className:"".concat(Ue,"-extra-content")},Le):null};function vr(Pe,Xe){var Je,Ue=y.useContext(ua),_e=Ue.prefixCls,Le=Ue.tabs,we=Pe.className,He=Pe.style,Ge=Pe.id,$e=Pe.animated,Ye=Pe.activeKey,nt=Pe.rtl,ht=Pe.extra,St=Pe.editable,Tt=Pe.locale,Mt=Pe.tabPosition,er=Pe.tabBarGutter,yr=Pe.children,_r=Pe.onTabClick,Tr=Pe.onTabScroll,kr=Object(y.useRef)(),Dr=Object(y.useRef)(),Sr=Object(y.useRef)(),Yr=Object(y.useRef)(),Ur=lr(),Rn=Object(v.a)(Ur,2),Br=Rn[0],ur=Rn[1],ir=Mt==="top"||Mt==="bottom",Wr=Ft(0,function(cn,Gr){ir&&Tr&&Tr({direction:cn>Gr?"left":"right"})}),$r=Object(v.a)(Wr,2),Zt=$r[0],en=$r[1],In=Ft(0,function(cn,Gr){!ir&&Tr&&Tr({direction:cn>Gr?"top":"bottom"})}),an=Object(v.a)(In,2),vn=an[0],pn=an[1],Wn=Object(y.useState)(0),ri=Object(v.a)(Wn,2),kn=ri[0],xi=ri[1],Wi=Object(y.useState)(0),Ci=Object(v.a)(Wi,2),ni=Ci[0],wn=Ci[1],yn=Object(y.useState)(0),Mn=Object(v.a)(yn,2),Dn=Mn[0],zi=Mn[1],ta=Object(y.useState)(0),ra=Object(v.a)(ta,2),mn=ra[0],Ji=ra[1],na=Object(y.useState)(null),xn=Object(v.a)(na,2),fn=xn[0],ii=xn[1],So=Object(y.useState)(null),eo=Object(v.a)(So,2),ia=eo[0],va=eo[1],Ma=Object(y.useState)(0),to=Object(v.a)(Ma,2),Pa=to[0],Xo=to[1],Yo=Object(y.useState)(0),Co=Object(v.a)(Yo,2),ro=Co[0],no=Co[1],ya=o(new Map),ba=Object(v.a)(ya,2),$o=ba[0],Na=ba[1],Oa=f(Le,$o,kn),_a="".concat(_e,"-nav-operations-hidden"),Ea=0,Gi=0;ir?nt?(Ea=0,Gi=Math.max(0,kn-fn)):(Ea=Math.min(0,fn-kn),Gi=0):(Ea=Math.min(0,ia-ni),Gi=0);function ca(cn){return cnGi?[Gi,!1]:[cn,!0]}var aa=Object(y.useRef)(),Aa=Object(y.useState)(),da=Object(v.a)(Aa,2),ja=da[0],io=da[1];function Fa(){io(Date.now())}function ao(){window.clearTimeout(aa.current)}Yi(kr,function(cn,Gr){var ai=!1;function Ai(xa,Qi){xa(function(Da){var sa=ca(Da+Qi),oi=Object(v.a)(sa,2),Ha=oi[0],so=oi[1];return ai=so,Ha})}if(ir){if(fn>=kn)return ai;Ai(en,cn)}else{if(ia>=ni)return ai;Ai(pn,Gr)}return ao(),Fa(),ai}),Object(y.useEffect)(function(){return ao(),ja&&(aa.current=window.setTimeout(function(){io(0)},100)),ao},[ja]);function oa(){var cn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ye,Gr=Oa.get(cn);if(!Gr)return;if(ir){var ai=Zt;nt?Gr.rightZt+fn&&(ai=Gr.right+Gr.width-fn):Gr.left<-Zt?ai=-Gr.left:Gr.left+Gr.width>-Zt+fn&&(ai=-(Gr.left+Gr.width-fn)),pn(0),en(ca(ai)[0])}else{var Ai=vn;Gr.top<-vn?Ai=-Gr.top:Gr.top+Gr.height>-vn+ia&&(Ai=-(Gr.top+Gr.height-ia)),en(0),pn(ca(Ai)[0])}}var ha=_(Oa,{width:fn,height:ia,left:Zt,top:vn},{width:Dn,height:mn},{width:Pa,height:ro},Object(k.a)(Object(k.a)({},Pe),{},{tabs:Le})),Oo=Object(v.a)(ha,2),Jo=Oo[0],Qo=Oo[1],Zo=Le.map(function(cn){var Gr=cn.key;return y.createElement(a,{id:Ge,prefixCls:_e,key:Gr,rtl:nt,tab:cn,closable:cn.closable,editable:St,active:Gr===Ye,tabPosition:Mt,tabBarGutter:er,renderWrapper:yr,removeAriaLabel:Tt==null?void 0:Tt.removeAriaLabel,ref:Br(Gr),onClick:function(Ai){_r(Gr,Ai)},onRemove:function(){ur(Gr)},onFocus:function(){oa(Gr),Fa(),nt||(kr.current.scrollLeft=0),kr.current.scrollTop=0}})}),oo=i(function(){var cn,Gr,ai,Ai,xa,Qi,Da,sa,oi,Ha=((cn=kr.current)===null||cn===void 0?void 0:cn.offsetWidth)||0,so=((Gr=kr.current)===null||Gr===void 0?void 0:Gr.offsetHeight)||0,lo=((ai=Yr.current)===null||ai===void 0?void 0:ai.offsetWidth)||0,Ri=((Ai=Yr.current)===null||Ai===void 0?void 0:Ai.offsetHeight)||0,ln=((xa=Sr.current)===null||xa===void 0?void 0:xa.offsetWidth)||0,Vi=((Qi=Sr.current)===null||Qi===void 0?void 0:Qi.offsetHeight)||0;ii(Ha),va(so),Xo(lo),no(Ri);var Zi=(((Da=Dr.current)===null||Da===void 0?void 0:Da.offsetWidth)||0)-lo,qi=(((sa=Dr.current)===null||sa===void 0?void 0:sa.offsetHeight)||0)-Ri;xi(Zi),wn(qi);var uo=(oi=Sr.current)===null||oi===void 0?void 0:oi.className.includes(_a);zi(Zi-(uo?0:ln)),Ji(qi-(uo?0:Vi)),Na(function(){var Wa=new Map;return Le.forEach(function(Lo){var ko=Lo.key,pa=Br(ko).current;pa&&Wa.set(ko,{width:pa.offsetWidth,height:pa.offsetHeight,left:pa.offsetLeft,top:pa.offsetTop})}),Wa})}),qo=Le.slice(0,Jo),Oi=Le.slice(Qo+1),Kn=[].concat(Object(d.a)(qo),Object(d.a)(Oi)),vi=Object(y.useState)(),Vn=Object(v.a)(vi,2),Ra=Vn[0],es=Vn[1],Ki=Oa.get(Ye),Ao=Object(y.useRef)();function Ro(){l.a.cancel(Ao.current)}Object(y.useEffect)(function(){var cn={};return Ki&&(ir?(nt?cn.right=Ki.right:cn.left=Ki.left,cn.width=Ki.width):(cn.top=Ki.top,cn.height=Ki.height)),Ro(),Ao.current=l()(function(){es(cn)}),Ro},[Ki,ir,nt]),Object(y.useEffect)(function(){oa()},[Ye,Ki,Oa,ir]),Object(y.useEffect)(function(){oo()},[nt,er,Ye,Le.map(function(cn){return cn.key}).join("_")]);var Io=!!Kn.length,fa="".concat(_e,"-nav-wrap"),Ua,Ia,Do,Ba;return ir?nt?(Ia=Zt>0,Ua=Zt+fn>>7)^(R<<14|R>>>18)^R>>>3,g=d[h-2],x=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;d[h]=O+d[h-7]+x+d[h-16]}var E=u&f^~u&w,T=o&s^o&c^s&c,M=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),L=(u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25),A=_+L+E+p[h]+d[h],V=M+T;_=w,w=f,f=u,u=a+A|0,a=c,c=s,s=o,o=A+V|0}i[0]=i[0]+o|0,i[1]=i[1]+s|0,i[2]=i[2]+c|0,i[3]=i[3]+a|0,i[4]=i[4]+u|0,i[5]=i[5]+f|0,i[6]=i[6]+w|0,i[7]=i[7]+_|0},_doFinalize:function(){var l=this._data,r=l.words,i=this._nDataBytes*8,o=l.sigBytes*8;return r[o>>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+14]=v.floor(i/4294967296),r[(o+64>>>9<<4)+15]=i,l.sigBytes=r.length*4,this._process(),this._hash},clone:function(){var l=m.clone.call(this);return l._hash=this._hash.clone(),l}});C.SHA256=m._createHelper(t),C.HmacSHA256=m._createHmacHelper(t)}(Math),N.SHA256})},lZu9:function(F,Q,j){(function(N){N(j("VrN/"),j("1eCo"),j("8EBN"))})(function(N){"use strict";N.defineMode("markdown",function(v,C){var k=N.getMode(v,"text/html"),y=k.name=="null";function m(U){if(N.findModeByName){var P=N.findModeByName(U);P&&(U=P.mime||P.mimes[0])}var H=N.getMode(v,U);return H.name=="null"?null:H}C.highlightFormatting===void 0&&(C.highlightFormatting=!1),C.maxBlockquoteDepth===void 0&&(C.maxBlockquoteDepth=0),C.taskLists===void 0&&(C.taskLists=!1),C.strikethrough===void 0&&(C.strikethrough=!1),C.emoji===void 0&&(C.emoji=!1),C.fencedCodeBlockHighlighting===void 0&&(C.fencedCodeBlockHighlighting=!0),C.fencedCodeBlockDefaultMode===void 0&&(C.fencedCodeBlockDefaultMode="text/plain"),C.xml===void 0&&(C.xml=!0),C.tokenTypeOverrides===void 0&&(C.tokenTypeOverrides={});var S={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var b in S)S.hasOwnProperty(b)&&C.tokenTypeOverrides[b]&&(S[b]=C.tokenTypeOverrides[b]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,d=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,t=/^\[(x| )\](?=\s)/i,l=C.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,r=/^ {0,3}(?:\={1,}|-{2,})\s*$/,i=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,s=/^\s*\[[^\]]+?\]:.*$/,c=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,a=" ";function u(U,P,H){return P.f=P.inline=H,H(U,P)}function f(U,P,H){return P.f=P.block=H,H(U,P)}function w(U){return!U||!/\S/.test(U.string)}function _(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==R){var P=y;if(!P){var H=N.innerMode(k,U.htmlState);P=H.mode.name=="xml"&&H.state.tagStart===null&&!H.state.context&&H.state.tokenize.isInText}P&&(U.f=E,U.block=h,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function h(U,P){var H=U.column()===P.indentation,$=w(P.prevLine.stream),re=P.indentedCode,te=P.prevLine.hr,ge=P.list!==!1,ve=(P.listStack[P.listStack.length-1]||0)+3;P.indentedCode=!1;var de=P.indentation;if(P.indentationDiff===null&&(P.indentationDiff=P.indentation,ge)){for(P.list=null;de=4&&(re||P.prevLine.fencedCodeEnd||P.prevLine.header||$))return U.skipToEnd(),P.indentedCode=!0,S.code;if(U.eatSpace())return null;if(H&&P.indentation<=ve&&(he=U.match(l))&&he[1].length<=6)return P.quote=0,P.header=he[1].length,P.thisLine.header=!0,C.highlightFormatting&&(P.formatting="header"),P.f=P.inline,g(P);if(P.indentation<=ve&&U.eat(">"))return P.quote=H?1:P.quote+1,C.highlightFormatting&&(P.formatting="quote"),U.eatSpace(),g(P);if(!Te&&!P.setext&&H&&P.indentation<=ve&&(he=U.match(d))){var ue=he[1]?"ol":"ul";return P.indentation=de+U.current().length,P.list=!0,P.quote=0,P.listStack.push(P.indentation),P.em=!1,P.strong=!1,P.code=!1,P.strikethrough=!1,C.taskLists&&U.match(t,!1)&&(P.taskList=!0),P.f=P.inline,C.highlightFormatting&&(P.formatting=["list","list-"+ue]),g(P)}else{if(H&&P.indentation<=ve&&(he=U.match(o,!0)))return P.quote=0,P.fencedEndRE=new RegExp(he[1]+"+ *$"),P.localMode=C.fencedCodeBlockHighlighting&&m(he[2]||C.fencedCodeBlockDefaultMode),P.localMode&&(P.localState=N.startState(P.localMode)),P.f=P.block=O,C.highlightFormatting&&(P.formatting="code-block"),P.code=-1,g(P);if(P.setext||(!De||!ge)&&!P.quote&&P.list===!1&&!P.code&&!Te&&!s.test(U.string)&&(he=U.lookAhead(1))&&(he=he.match(r)))return P.setext?(P.header=P.setext,P.setext=0,U.skipToEnd(),C.highlightFormatting&&(P.formatting="header")):(P.header=he[0].charAt(0)=="="?1:2,P.setext=P.header),P.thisLine.header=!0,P.f=P.inline,g(P);if(Te)return U.skipToEnd(),P.hr=!0,P.thisLine.hr=!0,S.hr;if(U.peek()==="[")return u(U,P,V)}return u(U,P,P.inline)}function R(U,P){var H=k.token(U,P.htmlState);if(!y){var $=N.innerMode(k,P.htmlState);($.mode.name=="xml"&&$.state.tagStart===null&&!$.state.context&&$.state.tokenize.isInText||P.md_inside&&U.current().indexOf(">")>-1)&&(P.f=E,P.block=h,P.htmlState=null)}return H}function O(U,P){var H=P.listStack[P.listStack.length-1]||0,$=P.indentation=U.quote?P.push(S.formatting+"-"+U.formatting[H]+"-"+U.quote):P.push("error"))}if(U.taskOpen)return P.push("meta"),P.length?P.join(" "):null;if(U.taskClosed)return P.push("property"),P.length?P.join(" "):null;if(U.linkHref?P.push(S.linkHref,"url"):(U.strong&&P.push(S.strong),U.em&&P.push(S.em),U.strikethrough&&P.push(S.strikethrough),U.emoji&&P.push(S.emoji),U.linkText&&P.push(S.linkText),U.code&&P.push(S.code),U.image&&P.push(S.image),U.imageAltText&&P.push(S.imageAltText,"link"),U.imageMarker&&P.push(S.imageMarker)),U.header&&P.push(S.header,S.header+"-"+U.header),U.quote&&(P.push(S.quote),!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?P.push(S.quote+"-"+U.quote):P.push(S.quote+"-"+C.maxBlockquoteDepth)),U.list!==!1){var $=(U.listStack.length-1)%3;$?$===1?P.push(S.list2):P.push(S.list3):P.push(S.list1)}return U.trailingSpaceNewLine?P.push("trailing-space-new-line"):U.trailingSpace&&P.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),P.length?P.join(" "):null}function x(U,P){return U.match(i,!0)?g(P):void 0}function E(U,P){var H=P.text(U,P);if(typeof H!="undefined")return H;if(P.list)return P.list=null,g(P);if(P.taskList){var $=U.match(t,!0)[1]===" ";return $?P.taskOpen=!0:P.taskClosed=!0,C.highlightFormatting&&(P.formatting="task"),P.taskList=!1,g(P)}if(P.taskOpen=!1,P.taskClosed=!1,P.header&&U.match(/^#+$/,!0))return C.highlightFormatting&&(P.formatting="header"),g(P);var re=U.next();if(P.linkTitle){P.linkTitle=!1;var te=re;re==="("&&(te=")"),te=(te+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ge="^\\s*(?:[^"+te+"\\\\]+|\\\\\\\\|\\\\.)"+te;if(U.match(new RegExp(ge),!0))return S.linkHref}if(re==="`"){var ve=P.formatting;C.highlightFormatting&&(P.formatting="code"),U.eatWhile("`");var de=U.current().length;if(P.code==0&&(!P.quote||de==1))return P.code=de,g(P);if(de==P.code){var De=g(P);return P.code=0,De}else return P.formatting=ve,g(P)}else if(P.code)return g(P);if(re==="\\"&&(U.next(),C.highlightFormatting)){var Te=g(P),he=S.formatting+"-escape";return Te?Te+" "+he:he}if(re==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return P.imageMarker=!0,P.image=!0,C.highlightFormatting&&(P.formatting="image"),g(P);if(re==="["&&P.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return P.imageMarker=!1,P.imageAltText=!0,C.highlightFormatting&&(P.formatting="image"),g(P);if(re==="]"&&P.imageAltText){C.highlightFormatting&&(P.formatting="image");var Te=g(P);return P.imageAltText=!1,P.image=!1,P.inline=P.f=M,Te}if(re==="["&&!P.image)return P.linkText&&U.match(/^.*?\]/)||(P.linkText=!0,C.highlightFormatting&&(P.formatting="link")),g(P);if(re==="]"&&P.linkText){C.highlightFormatting&&(P.formatting="link");var Te=g(P);return P.linkText=!1,P.inline=P.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:E,Te}if(re==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=T,C.highlightFormatting&&(P.formatting="link");var Te=g(P);return Te?Te+=" ":Te="",Te+S.linkInline}if(re==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=T,C.highlightFormatting&&(P.formatting="link");var Te=g(P);return Te?Te+=" ":Te="",Te+S.linkEmail}if(C.xml&&re==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ue=U.string.indexOf(">",U.pos);if(ue!=-1){var ie=U.string.substring(U.start,ue);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ie)&&(P.md_inside=!0)}return U.backUp(1),P.htmlState=N.startState(k),f(U,P,R)}if(C.xml&&re==="<"&&U.match(/^\/\w*?>/))return P.md_inside=!1,"tag";if(re==="*"||re==="_"){for(var Se=1,ne=U.pos==1?" ":U.string.charAt(U.pos-2);Se<3&&U.eat(re);)Se++;var ce=U.peek()||" ",Oe=!/\s/.test(ce)&&(!c.test(ce)||/\s/.test(ne)||c.test(ne)),oe=!/\s/.test(ne)&&(!c.test(ne)||/\s/.test(ce)||c.test(ce)),q=null,Y=null;if(Se%2&&(!P.em&&Oe&&(re==="*"||!oe||c.test(ne))?q=!0:P.em==re&&oe&&(re==="*"||!Oe||c.test(ce))&&(q=!1)),Se>1&&(!P.strong&&Oe&&(re==="*"||!oe||c.test(ne))?Y=!0:P.strong==re&&oe&&(re==="*"||!Oe||c.test(ce))&&(Y=!1)),Y!=null||q!=null){C.highlightFormatting&&(P.formatting=q==null?"strong":Y==null?"em":"strong em"),q===!0&&(P.em=re),Y===!0&&(P.strong=re);var De=g(P);return q===!1&&(P.em=!1),Y===!1&&(P.strong=!1),De}}else if(re===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return g(P);U.backUp(1)}if(C.strikethrough){if(re==="~"&&U.eatWhile(re)){if(P.strikethrough){C.highlightFormatting&&(P.formatting="strikethrough");var De=g(P);return P.strikethrough=!1,De}else if(U.match(/^[^\s]/,!1))return P.strikethrough=!0,C.highlightFormatting&&(P.formatting="strikethrough"),g(P)}else if(re===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return g(P);U.backUp(2)}}if(C.emoji&&re===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){P.emoji=!0,C.highlightFormatting&&(P.formatting="emoji");var Z=g(P);return P.emoji=!1,Z}return re===" "&&(U.match(/^ +$/,!1)?P.trailingSpace++:P.trailingSpace&&(P.trailingSpaceNewLine=!0)),g(P)}function T(U,P){var H=U.next();if(H===">"){P.f=P.inline=E,C.highlightFormatting&&(P.formatting="link");var $=g(P);return $?$+=" ":$="",$+S.linkInline}return U.match(/^[^>]+/,!0),S.linkInline}function M(U,P){if(U.eatSpace())return null;var H=U.next();return H==="("||H==="["?(P.f=P.inline=A(H==="("?")":"]"),C.highlightFormatting&&(P.formatting="link-string"),P.linkHref=!0,g(P)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(U){return function(P,H){var $=P.next();if($===U){H.f=H.inline=E,C.highlightFormatting&&(H.formatting="link-string");var re=g(H);return H.linkHref=!1,re}return P.match(L[U]),H.linkHref=!0,g(H)}}function V(U,P){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(P.f=z,U.next(),C.highlightFormatting&&(P.formatting="link"),P.linkText=!0,g(P)):u(U,P,E)}function z(U,P){if(U.match(/^\]:/,!0)){P.f=P.inline=W,C.highlightFormatting&&(P.formatting="link");var H=g(P);return P.linkText=!1,H}return U.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function W(U,P){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?P.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),P.f=P.inline=E,S.linkHref+" url")}var G={startState:function(){return{f:h,prevLine:{stream:null},thisLine:{stream:null},block:h,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(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&N.copyState(k,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?N.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,P){if(P.formatting=!1,U!=P.thisLine.stream){if(P.header=0,P.hr=!1,U.match(/^\s*$/,!0))return _(P),null;if(P.prevLine=P.thisLine,P.thisLine={stream:U},P.taskList=!1,P.trailingSpace=0,P.trailingSpaceNewLine=!1,!P.localState&&(P.f=P.block,P.f!=R)){var H=U.match(/^\s*/,!0)[0].replace(/\t/g,a).length;if(P.indentation=H,P.indentationDiff=null,H>0)return null}}return P.f(U,P)},innerMode:function(U){return U.block==R?{state:U.htmlState,mode:k}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:G}},indent:function(U,P,H){return U.block==R&&k.indent?k.indent(U.htmlState,P,H):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,P,H):N.Pass},blankLine:_,getType:g,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return G},"xml"),N.defineMIME("text/markdown","markdown"),N.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(F){if(!0)module.exports=F();else var Q})(function(){var define,module,exports;return function(){function F(Q,j,N){function v(y,m){if(!j[y]){if(!Q[y]){var S=typeof require=="function"&&require;if(!m&&S)return require(y,!0);if(C)return C(y,!0);var b=new Error("Cannot find module '"+y+"'");throw b.code="MODULE_NOT_FOUND",b}var p=j[y]={exports:{}};Q[y][0].call(p.exports,function(d){var t=Q[y][1][d];return v(t||d)},p,p.exports,F,Q,j,N)}return j[y].exports}for(var C=typeof require=="function"&&require,k=0;k0&&r(M).to(A),V=this._divideParts(x,E),z=V.length,W=!1,G=function(De,Te){var he=this;return new y.default(function(ie,Se){var ne,ce,Oe,oe;return S.default.async(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(Y.prev=0,De.isCancel()){Y.next=18;break}return ne=V[Te-1],ce={stream:De._createStream(g,ne.start,ne.end),size:ne.end-ne.start},Y.next=6,S.default.awrap(De._uploadPart(L,T,Te,ce));case 6:if(Oe=Y.sent,!(!De.isCancel()&&!W)){Y.next=15;break}if(h.doneParts.push({number:Te,etag:Oe.res.headers.etag}),!R.progress){Y.next=12;break}return Y.next=12,S.default.awrap(R.progress(M.length/z,h,Oe.res));case 12:ie({number:Te,etag:Oe.res.headers.etag}),Y.next=16;break;case 15:ie();case 16:Y.next=19;break;case 18:ie();case 19:Y.next=30;break;case 21:Y.prev=21,Y.t0=Y.catch(0),oe=new Error,oe.name=Y.t0.name,oe.message=Y.t0.message,oe.stack=Y.t0.stack,oe.partNum=Te,r(Y.t0).to(oe),Se(oe);case 30:case"end":return Y.stop()}},null,he,[[0,21]])})},U=(0,C.default)(new Array(z),function(de,De){return De+1}),P=A.map(function(de){return de.number}),H=U.filter(function(de){return P.indexOf(de)<0}),$=5,re=R.parallel||$,ve.next=17,S.default.awrap(this._parallel(H,re,function(de){return new y.default(function(De,Te){G(O,de).then(function(he){he&&A.push(he),De()}).catch(function(he){Te(he)})})}));case 17:if(te=ve.sent,W=!0,!this.isCancel()){ve.next=22;break}throw G=null,this._makeCancelEvent();case 22:if(!(te&&te.length>0)){ve.next=25;break}throw te[0].message="Failed to upload some parts with error: "+te[0].toString()+" part_num: "+te[0].partNum,te[0];case 25:return ve.next=27,S.default.awrap(this.completeMultipartUpload(L,T,A,R));case 27:return ve.abrupt("return",ve.sent);case 28:case"end":return ve.stop()}},null,this)},a._getFileSize=function(h){return S.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!p.buffer(h)){O.next=4;break}return O.abrupt("return",h.length);case 4:if(!(o(h)||c(h))){O.next=6;break}return O.abrupt("return",h.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var u=F("stream"),f=u.Readable;function w(_,h){if(!(this instanceof w))return new w(_,h);f.call(this,h),this.file=_,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}d.inherits(w,f),w.prototype.readFileAndPush=function(h){if(this.fileBuffer)for(var R=!0;R&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:g,this.start=g,R=this.push(this.fileBuffer.slice(O,g))}},w.prototype._read=function(h){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var R=16*1024;h=h||R;var O=this;this.reader.onload=function(x){O.fileBuffer=N.from(new Uint8Array(x.target.result)),O.file=null,O.readFileAndPush(h)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(h)},a._createStream=function(h,R,O){if(o(h)||c(h))return new w(h.slice(R,O));throw new Error("_createStream requires File/Blob.")},a._getPartSize=function(h,R){var O=10*1e3,g=1024*1024;return R?Math.max(Math.ceil(h/O),R):g},a._divideParts=function(h,R){for(var O=Math.ceil(h/R),g=[],x=0;x255)throw new Error("ID is composed of 255 bytes at most");if(h.prefix===""||h.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(h.status))throw new Error("Status must be Enabled or Disabled");if(h.transition){if(!["IA","Archive"].includes(h.transition.storageClass))throw new Error("StorageClass must be IA or Archive");f(h.transition,"Transition")}if(h.expiration){if(!h.expiration.expiredObjectDeleteMarker)f(h.expiration,"Expiration");else if(h.expiration.days||h.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(h.abortMultipartUpload&&f(h.abortMultipartUpload,"AbortMultipartUpload"),!h.expiration&&!h.abortMultipartUpload&&!h.transition&&!h.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(h.tag){if(h.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");w(h.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(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=C(N);function C(p){return p&&p.__esModule?p:{default:p}}var k=F("../utils/checkBucketName"),y=k.checkBucketName,m=F("../utils/obj2xml"),S=m.obj2xml,b=j;b.putBucketVersioning=function(d,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,o;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:if(y(d),["Enabled","Suspended"].includes(t)){c.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return r=this._bucketRequestParams("PUT",d,"versioning",l),i={VersioningConfiguration:{Status:t}},r.mime="xml",r.content=S(i,{headers:!0}),c.next=9,v.default.awrap(this.request(r));case 9:return o=c.sent,c.abrupt("return",{res:o.res,status:o.status});case 11:case"end":return c.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=C(N);function C(t){return t&&t.__esModule?t:{default:t}}var k=F("../utils/checkBucketName"),y=k.checkBucketName,m=F("../utils/obj2xml"),S=m.obj2xml,b=F("../utils/isArray"),p=b.isArray,d=j;d.putBucketWebsite=function(l){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments[2],o,s,c,a,u;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:if(y(l),o=this._bucketRequestParams("PUT",l,"website",i),s={Suffix:r.index||"index.html"},c={IndexDocument:s},a={WebsiteConfiguration:c},r.supportSubDir&&(s.SupportSubDir=r.supportSubDir),r.type&&(s.Type=r.type),r.error&&(c.ErrorDocument={Key:r.error}),!(r.routingRules!==void 0)){w.next=12;break}if(p(r.routingRules)){w.next=11;break}throw new Error("RoutingRules must be Array");case 11:c.RoutingRules={RoutingRule:r.routingRules};case 12:return a=S(a),o.content=a,o.mime="xml",o.successStatuses=[200],w.next=18,v.default.awrap(this.request(o));case 18:return u=w.sent,w.abrupt("return",{res:u.res});case 20:case"end":return w.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(F,Q,j){(function(N){"use strict";var v=F("babel-runtime/core-js/object/keys"),C=m(v),k=F("babel-runtime/core-js/json/stringify"),y=m(k);function m(S){return S&&S.__esModule?S:{default:S}}j.encodeCallback=function(b,p){if(b.headers=b.headers||{},!Object.prototype.hasOwnProperty.call(b.headers,"x-oss-callback")&&p.callback){var d={callbackUrl:encodeURI(p.callback.url),callbackBody:p.callback.body};p.callback.host&&(d.callbackHost=p.callback.host),p.callback.contentType&&(d.callbackBodyType=p.callback.contentType);var t=N.from((0,y.default)(d)).toString("base64");if(b.headers["x-oss-callback"]=t,p.callback.customValue){var l={};(0,C.default)(p.callback.customValue).forEach(function(r){l["x:"+r]=p.callback.customValue[r]}),b.headers["x-oss-callback-var"]=N.from((0,y.default)(l)).toString("base64")}}}}).call(this,F("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/assign"),v=C(N);function C(d){return d&&d.__esModule?d:{default:d}}var k=F("humanize-ms"),y=F("url"),m=F("../utils/checkBucketName"),S=m.checkBucketName;function b(d,t){var l=y.parse(d);if(l.protocol||(l=y.parse("http"+(t?"s":"")+"://"+d)),l.protocol!=="http:"&&l.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return l}function p(d,t,l){var r=l?"https://":"http://",i=t?"-internal.aliyuncs.com":".aliyuncs.com",o="vpc100-oss-cn-";return d.substr(0,o.length)===o&&(i=".aliyuncs.com"),y.parse(r+d+i)}Q.exports=function(d){if(!d||!d.accessKeyId||!d.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");d.bucket&&S(d.bucket);var t=(0,v.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},d);if(t.accessKeyId=t.accessKeyId.trim(),t.accessKeySecret=t.accessKeySecret.trim(),t.timeout&&(t.timeout=k(t.timeout)),t.endpoint)t.endpoint=b(t.endpoint,t.secure);else if(t.region)t.endpoint=p(t.region,t.internal,t.secure);else throw new Error("require options.endpoint or options.region");return t.inited=!0,t}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(F,Q,j){"use strict";var N=F("merge-descriptors"),v=j;N(v,F("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=C(N);function C(t){return t&&t.__esModule?t:{default:t}}var k=F("../utils/checkBucketName"),y=k.checkBucketName,m=F("querystring"),S=F("js-base64"),b=S.Base64.encode,p=j;p.processObjectSave=function(l,r,i,o){var s,c,a,u;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return d(l,"sourceObject"),d(r,"targetObject"),d(i,"process"),r=this._objectName(r),o&&y(o),s=this._objectRequestParams("POST",l,{subres:"x-oss-process"}),c=o?",b_"+b(o):"",r=b(r),a={"x-oss-process":i+"|sys/saveas,o_"+r+c},s.content=m.stringify(a),w.next=12,v.default.awrap(this.request(s));case 12:return u=w.sent,w.abrupt("return",{res:u.res,status:u.res.status});case 14:case"end":return w.stop()}},null,this)};function d(t,l){if(!t)throw new Error(l+" is required");if(typeof t!="string")throw new Error(l+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=C(N);function C(p){return p&&p.__esModule?p:{default:p}}var k=F("copy-to"),y=F("./callback"),m=F("./utils/deepCopy"),S=m.deepCopy,b=j;b.listUploads=function(d,t){var l,r,i,o;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return t=t||{},l={},k(t).to(l),l.subres="uploads",r=this._objectRequestParams("GET","",l),r.query=d,r.xmlResponse=!0,r.successStatuses=[200],c.next=10,v.default.awrap(this.request(r));case 10:return i=c.sent,o=i.data.Upload||[],Array.isArray(o)||(o=[o]),o=o.map(function(a){return{name:a.Key,uploadId:a.UploadId,initiated:a.Initiated}}),c.abrupt("return",{res:i.res,uploads:o,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return c.stop()}},null,this)},b.listParts=function(d,t,l,r){var i,o,s;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return r=r||{},i={},k(r).to(i),i.subres={uploadId:t},o=this._objectRequestParams("GET",d,i),o.query=l,o.xmlResponse=!0,o.successStatuses=[200],a.next=10,v.default.awrap(this.request(o));case 10:return s=a.sent,a.abrupt("return",{res:s.res,uploadId:s.data.UploadId,bucket:s.data.Bucket,name:s.data.Key,partNumberMarker:s.data.PartNumberMarker,nextPartNumberMarker:s.data.NextPartNumberMarker,maxParts:s.data.MaxParts,isTruncated:s.data.IsTruncated,parts:s.data.Part||[]});case 12:case"end":return a.stop()}},null,this)},b.abortMultipartUpload=function(d,t,l){var r,i,o;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return this._stop(),l=l||{},r={},k(l).to(r),r.subres={uploadId:t},i=this._objectRequestParams("DELETE",d,r),i.successStatuses=[204],c.next=9,v.default.awrap(this.request(i));case 9:return o=c.sent,c.abrupt("return",{res:o.res});case 11:case"end":return c.stop()}},null,this)},b.initMultipartUpload=function(d,t){var l,r,i;return v.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t=t||{},l={},k(t).to(l),l.headers=l.headers||{},this._convertMetaToHeaders(t.meta,l.headers),l.subres="uploads",r=this._objectRequestParams("POST",d,l),r.mime=t.mime,r.xmlResponse=!0,r.successStatuses=[200],s.next=12,v.default.awrap(this.request(r));case 12:return i=s.sent,s.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return s.stop()}},null,this)},b.uploadPart=function(d,t,l,r,i,o,s){var c;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return c={stream:this._createStream(r,i,o),size:o-i},u.next=3,v.default.awrap(this._uploadPart(d,t,l,c,s));case 3:return u.abrupt("return",u.sent);case 4:case"end":return u.stop()}},null,this)},b.completeMultipartUpload=function(d,t,l,r){var i,o,s,c,a,u,f,w;return v.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:for(i=l.concat().sort(function(R,O){return R.number-O.number}).filter(function(R,O,g){return!O||R.number!==g[O-1].number}),o=` `,s=0;s `,o+=""+c.number+` `,o+=""+c.etag+` `,o+=` `;return o+="",r=r||{},a={},a=S(r),a.headers&&delete a.headers["x-oss-server-side-encryption"],a.subres={uploadId:t},u=this._objectRequestParams("POST",d,a),y.encodeCallback(u,a),u.mime="xml",u.content=o,u.headers&&u.headers["x-oss-callback"]||(u.xmlResponse=!0),u.successStatuses=[200],h.next=17,v.default.awrap(this.request(u));case 17:return f=h.sent,w={res:f.res,bucket:u.bucket,name:d,etag:f.res.headers.etag},u.headers&&u.headers["x-oss-callback"]&&(w.data=JSON.parse(f.data.toString())),h.abrupt("return",w);case 21:case"end":return h.stop()}},null,this)},b._uploadPart=function(d,t,l,r,i){var o,s,c;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return i=i||{},o={},k(i).to(o),o.headers={"Content-Length":r.size},o.subres={partNumber:l,uploadId:t},s=this._objectRequestParams("PUT",d,o),s.mime=o.mime,s.stream=r.stream,s.successStatuses=[200],u.next=11,v.default.awrap(this.request(s));case 11:if(c=u.sent,c.res.headers.etag){u.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 r.stream=null,s.stream=null,u.abrupt("return",{name:d,etag:c.res.headers.etag,res:c.res});case 17:case"end":return u.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=S(N),C=F("babel-runtime/core-js/object/keys"),k=S(C),y=F("babel-runtime/helpers/typeof"),m=S(y);function S(t){return t&&t.__esModule?t:{default:t}}var b=F("../utils/checkBucketName"),p=b.checkBucketName,d=j;d.copy=function(l,r,i,o){var s,c,a;return v.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return(typeof i=="undefined"?"undefined":(0,m.default)(i))==="object"&&(o=i),o=o||{},o.headers=o.headers||{},(0,k.default)(o.headers).forEach(function(w){o.headers["x-oss-copy-source-"+w.toLowerCase()]=o.headers[w]}),o.meta&&(o.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(o.meta,o.headers),r=this._getSourceName(r,i),o.versionId&&(r=r+"?versionId="+o.versionId),o.headers["x-oss-copy-source"]=r,s=this._objectRequestParams("PUT",l,o),s.xmlResponse=!0,s.successStatuses=[200,304],f.next=14,v.default.awrap(this.request(s));case 14:return c=f.sent,a=c.data,a&&(a={etag:a.ETag,lastModified:a.LastModified}),f.abrupt("return",{data:a,res:c.res});case 18:case"end":return f.stop()}},null,this)},d._getSourceName=function(l,r){return typeof r=="string"?l=this._objectName(l):l[0]!=="/"?r=this.options.bucket:(r=l.replace(/\/(.+?)(\/.*)/,"$1"),l=l.replace(/(\/.+?\/)(.*)/,"$2")),p(r),l=encodeURI(l),l="/"+r+"/"+l,l}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),C=F("babel-runtime/core-js/object/assign"),k=y(C);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.delete=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,k.default)({},p.subres),p.versionId&&(p.subres.versionId=p.versionId),d=this._objectRequestParams("DELETE",b,p),d.successStatuses=[204],r.next=6,v.default.awrap(this.request(d));case 6:return t=r.sent,r.abrupt("return",{res:t.res});case 8:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),C=F("babel-runtime/core-js/object/assign"),k=y(C);function y(d){return d&&d.__esModule?d:{default:d}}var m=F("utility"),S=F("../utils/obj2xml"),b=S.obj2xml,p=j;p.deleteMulti=function(t){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,c,a,u,f,w,_,h,R;return v.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:if(r=[],!(!t||!t.length)){g.next=3;break}throw new Error("names is required");case 3:for(i=0;i1&&arguments[1]!==void 0?arguments[1]:{},d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,k.default)({tagging:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("DELETE",b,p),d.successStatuses=[204],r.next=7,v.default.awrap(this.request(d));case 7:return t=r.sent,r.abrupt("return",{status:t.status,res:t.res});case 9:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),C=F("babel-runtime/core-js/object/assign"),k=y(C);function y(p){return p&&p.__esModule?p:{default:p}}var m=F("fs"),S=F("is-type-of"),b=j;b.get=function(d,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,o,s;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return r=null,i=!1,S.writableStream(t)?r=t:S.string(t)?(r=m.createWriteStream(t),i=!0):l=t,l=l||{},l.subres=(0,k.default)({},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.process&&(l.subres["x-oss-process"]=l.process),o=void 0,a.prev=8,s=this._objectRequestParams("GET",d,l),s.writeStream=r,s.successStatuses=[200,206,304],a.next=14,v.default.awrap(this.request(s));case 14:o=a.sent,i&&r.destroy(),a.next=25;break;case 18:if(a.prev=18,a.t0=a.catch(8),!i){a.next=24;break}return r.destroy(),a.next=24,v.default.awrap(this._deleteFileSafe(t));case 24:throw a.t0;case 25:return a.abrupt("return",{res:o.res,content:o.data});case 26:case"end":return a.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),C=F("babel-runtime/core-js/object/assign"),k=y(C);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.getACL=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,k.default)({acl:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,p),d.successStatuses=[200],d.xmlResponse=!0,r.next=8,v.default.awrap(this.request(d));case 8:return t=r.sent,r.abrupt("return",{acl:t.data.AccessControlList.Grant,owner:{id:t.data.Owner.ID,displayName:t.data.Owner.DisplayName},res:t.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=S(N),C=F("babel-runtime/regenerator"),k=S(C),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(s){return s&&s.__esModule?s:{default:s}}var b=j,p=F("../utils/isObject"),d=p.isObject,t=F("../utils/isArray"),l=t.isArray;b.getBucketVersions=r,b.listObjectVersions=r;function r(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,u,f,w,_,h;return k.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(s.versionIdMarker&&s.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return c.subres=(0,m.default)({versions:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),a=this._objectRequestParams("GET","",c),a.xmlResponse=!0,a.successStatuses=[200],a.query=o(s),O.next=10,k.default.awrap(this.request(a));case 10:return u=O.sent,f=u.data.Version||[],w=u.data.DeleteMarker||[],_=this,f&&(Array.isArray(f)||(f=[f]),f=f.map(function(g){return{name:g.Key,url:_._objectUrl(g.Key),lastModified:g.LastModified,isLatest:g.IsLatest==="true",versionId:g.VersionId,etag:g.ETag,type:g.Type,size:Number(g.Size),storageClass:g.StorageClass,owner:{id:g.Owner.ID,displayName:g.Owner.DisplayName}}})),w&&(l(w)||(w=[w]),w=w.map(function(g){return{name:g.Key,lastModified:g.LastModified,versionId:g.VersionId,owner:{id:g.Owner.ID,displayName:g.Owner.DisplayName}}})),h=u.data.CommonPrefixes||null,h&&(l(h)||(h=[h]),h=h.map(function(g){return g.Prefix})),O.abrupt("return",{res:u.res,objects:f,deleteMarker:w,prefixes:h,nextMarker:u.data.NextMarker||null,NextVersionIdMarker:u.data.NextVersionIdMarker||null,isTruncated:u.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function i(s){return s.replace(/([A-Z])/g,"-$1").toLowerCase()}function o(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c={};return d(s)&&(0,v.default)(s).forEach(function(a){c[i(a)]=s[a]}),c}},{"../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(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),C=F("babel-runtime/core-js/object/assign"),k=y(C);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.getObjectMeta=function(b,p){var d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p=p||{},b=this._objectName(b),p.subres=(0,k.default)({objectMeta:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),d=this._objectRequestParams("HEAD",b,p),d.successStatuses=[200],r.next=8,v.default.awrap(this.request(d));case 8:return t=r.sent,r.abrupt("return",{status:t.status,res:t.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),C=F("babel-runtime/core-js/object/assign"),k=y(C);function y(p){return p&&p.__esModule?p:{default:p}}var m=j,S=F("../utils/isObject"),b=S.isObject;m.getObjectTagging=function(d){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,r,i,o,s;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t.subres=(0,k.default)({tagging:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),d=this._objectName(d),l=this._objectRequestParams("GET",d,t),l.successStatuses=[200],a.next=7,v.default.awrap(this.request(l));case 7:return r=a.sent,a.next=10,v.default.awrap(this.parseXML(r.data));case 10:return i=a.sent,o=i.TagSet.Tag,o=o&&b(o)?[o]:o||[],s={},o.forEach(function(u){s[u.Key]=u.Value}),a.abrupt("return",{status:r.status,res:r.res,tag:s});case 16:case"end":return a.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),C=F("babel-runtime/core-js/object/assign"),k=y(C);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.getSymlink=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,t,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return p.subres=(0,k.default)({symlink:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,p),d.successStatuses=[200],i.next=7,v.default.awrap(this.request(d));case 7:return t=i.sent,l=t.res.headers["x-oss-symlink-target"],i.abrupt("return",{targetName:decodeURIComponent(l),res:t.res});case 10:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=S(N),C=F("babel-runtime/core-js/object/keys"),k=S(C),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(p){return p&&p.__esModule?p:{default:p}}var b=j;b.head=function(d){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,r,i;return v.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t.subres=(0,m.default)({},t.subres),t.versionId&&(t.subres.versionId=t.versionId),l=this._objectRequestParams("HEAD",d,t),l.successStatuses=[200,304],s.next=6,v.default.awrap(this.request(l));case 6:return r=s.sent,i={meta:null,res:r.res,status:r.status},r.status===200&&(0,k.default)(r.headers).forEach(function(c){c.indexOf("x-oss-meta-")===0&&(i.meta||(i.meta={}),i.meta[c.substring(11)]=r.headers[c])}),s.abrupt("return",i);case 10:case"end":return s.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),C=F("babel-runtime/core-js/object/assign"),k=y(C);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.putACL=function(b,p,d){var t,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return d=d||{},d.subres=(0,k.default)({acl:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.headers=d.headers||{},d.headers["x-oss-object-acl"]=p,b=this._objectName(b),t=this._objectRequestParams("PUT",b,d),t.successStatuses=[200],i.next=10,v.default.awrap(this.request(t));case 10:return l=i.sent,i.abrupt("return",{res:l.res});case 12:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=S(N),C=F("babel-runtime/core-js/object/keys"),k=S(C),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(r){return r&&r.__esModule?r:{default:r}}var b=F("../utils/obj2xml"),p=b.obj2xml,d=F("../utils/checkObjectTag"),t=d.checkObjectTag,l=j;l.putObjectTagging=function(i,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c,a,u;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return t(o),s.subres=(0,m.default)({tagging:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),i=this._objectName(i),c=this._objectRequestParams("PUT",i,s),c.successStatuses=[200],o=(0,k.default)(o).map(function(_){return{Key:_,Value:o[_]}}),a={Tagging:{TagSet:{Tag:o}}},c.mime="xml",c.content=p(a),w.next=12,v.default.awrap(this.request(c));case 12:return u=w.sent,w.abrupt("return",{res:u.res,status:u.status});case 14:case"end":return w.stop()}},null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),C=F("babel-runtime/core-js/object/assign"),k=y(C);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.putSymlink=function(b,p,d){var t,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return d=d||{},d.headers=d.headers||{},p=this._escape(this._objectName(p)),this._convertMetaToHeaders(d.meta,d.headers),d.headers["x-oss-symlink-target"]=p,d.subres=(0,k.default)({symlink:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.storageClass&&(d.headers["x-oss-storage-class"]=d.storageClass),b=this._objectName(b),t=this._objectRequestParams("PUT",b,d),t.successStatuses=[200],i.next=13,v.default.awrap(this.request(t));case 13:return l=i.sent,i.abrupt("return",{res:l.res});case 15:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(F,Q,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),C=F("babel-runtime/core-js/promise"),k=y(C);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m._parallelNode=function(b,p,d,t){var l,r,i,o,s,c,a,u;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:l=this,r=[],i=[],o=b.length/p,s=b.length%p,c=s===0?o:(b.length-s)/p+1,a=1,u=0;case 8:if(!(u0){c=!0,a<=0&&l(r);return}a+=1,w(h.value,i(f))}u=!1}_()})},m.cancel=function(b){this.options.cancelFlag=!0,b&&this.abortMultipartUpload(b.name,b.uploadId,b.options)},m.isCancel=function(){return this.options.cancelFlag},m.resetCancelFlag=function(){this.options.cancelFlag=!1},m._stop=function(){this.options.cancelFlag=!0},m._makeCancelEvent=function(){var b={status:0,name:"cancel"};return b}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(F,Q,j){(function(N){"use strict";var v=F("babel-runtime/core-js/json/stringify"),C=m(v),k=F("babel-runtime/core-js/object/keys"),y=m(k);function m(p){return p&&p.__esModule?p:{default:p}}var S=F("./../../shims/crypto/crypto.js"),b=F("is-type-of");j.buildCanonicalizedResource=function(d,t){var l=""+d,r="?";if(b.string(t)&&t.trim()!=="")l+=r+t;else if(b.array(t))t.sort(),l+=r+t.join("&");else if(t){var i=function(c,a){return c[0]>a[0]?1:c[0]1&&arguments[1]!==void 0?arguments[1]:{},l=arguments[2],r=arguments[3],i={},o=t.subResource,s=o===void 0?{}:o;if(t.process){var c="x-oss-process";s[c]=t.process}if(t.trafficLimit){var a="x-oss-traffic-limit";s[a]=t.trafficLimit}if(t.response&&(0,y.default)(t.response).forEach(function(_){var h="response-"+_.toLowerCase();s[h]=t.response[_]}),(0,y.default)(t).forEach(function(_){var h=_.toLowerCase(),R=t[_];h.indexOf("x-oss-")===0?i[h]=R:(h.indexOf("content-md5")===0||h.indexOf("content-type")===0)&&(i[_]=R)}),Object.prototype.hasOwnProperty.call(t,"security-token")&&(s["security-token"]=t["security-token"]),Object.prototype.hasOwnProperty.call(t,"callback")){var u={callbackUrl:encodeURI(t.callback.url),callbackBody:t.callback.body};if(t.callback.host&&(u.callbackHost=t.callback.host),t.callback.contentType&&(u.callbackBodyType=t.callback.contentType),s.callback=N.from((0,C.default)(u)).toString("base64"),t.callback.customValue){var f={};(0,y.default)(t.callback.customValue).forEach(function(_){f["x:"+_]=t.callback.customValue[_]}),s["callback-var"]=N.from((0,C.default)(f)).toString("base64")}}var w=this.buildCanonicalString(t.method,l,{headers:i,parameters:s},r.toString());return{Signature:this.computeSignature(d,w),subResource:s}}}).call(this,F("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(F,Q,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.checkBucketName=void 0,j.checkBucketName=function(N,v){var C=v?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!C.test(N))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/entries"),v=C(N);function C(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(j,"__esModule",{value:!0}),j.checkObjectTag=void 0;var k=F("./checkValid"),y=k.checkValid,m=F("./isObject"),S=m.isObject,b=[{validator:function(l){if(typeof l!="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 (/)"}],p={key:[].concat(b,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(b,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function d(t){if(!S(t))throw new Error("tag must be Object");var l=(0,v.default)(t);if(l.length>10)throw new Error("maximum of 10 tags for a object");var r=["key","value"];l.forEach(function(i){i.forEach(function(o,s){y(o,p[r[s]])})})}j.checkObjectTag=d},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(F,Q,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.checkValid=void 0;function N(v,C){C.forEach(function(k){if(k.validator)k.validator(v);else if(k.pattern&&!k.pattern.test(v))throw new Error(k.msg)})}j.checkValid=N},{}],38:[function(F,Q,j){(function(N){"use strict";var v=F("babel-runtime/core-js/object/assign"),C=k(v);function k(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(j,"__esModule",{value:!0}),j.createRequest=void 0;var y=F("./../../../shims/crypto/crypto.js"),m=F("debug")("ali-oss"),S=F("mime"),b=F("dateformat"),p=F("copy-to"),d=F("path");function t(i,o){return i[o]||i[o.toLowerCase()]}function l(i,o){delete i[o],delete i[o.toLowerCase()]}function r(i){var o=new Date;this.options.amendTimeSkewed&&(o=+new Date+this.options.amendTimeSkewed);var s={"x-oss-date":b(o,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(s["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,C.default)(s,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(s["x-oss-security-token"]=this.options.stsToken),p(i.headers).to(s),t(s,"Content-Type")||(i.mime&&i.mime.indexOf("/")>0?s["Content-Type"]=i.mime:s["Content-Type"]=S.getType(i.mime||d.extname(i.object||""))),t(s,"Content-Type")||l(s,"Content-Type"),i.content&&(s["Content-Md5"]=y.createHash("md5").update(N.from(i.content,"utf8")).digest("base64"),s["Content-Length"]||(s["Content-Length"]=i.content.length));var c=this._getResource(i);s.authorization=this.authorization(i.method,c,i.subres,s);var a=this._getReqUrl(i);m("request %s %s, with headers %j, !!stream: %s",i.method,a,s,!!i.stream);var u=i.timeout||this.options.timeout,f={method:i.method,content:i.content,stream:i.stream,headers:s,timeout:u,writeStream:i.writeStream,customResponse:i.customResponse,ctx:i.ctx||this.ctx};return this.agent&&(f.agent=this.agent),this.httpsAgent&&(f.httpsAgent=this.httpsAgent),{url:a,params:f}}j.createRequest=r}).call(this,F("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(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=y(N),C=F("babel-runtime/helpers/typeof"),k=y(C);function y(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(j,"__esModule",{value:!0}),j.deepCopy=void 0,j.deepCopy=function(m){if(m===null||(typeof m=="undefined"?"undefined":(0,k.default)(m))!=="object")return m;var S=Array.isArray(m)?[]:{};return(0,v.default)(m).forEach(function(b){S[b]=j.deepCopy(m[b])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=y(N),C=F("babel-runtime/helpers/typeof"),k=y(C);function y(b){return b&&b.__esModule?b:{default:b}}Object.defineProperty(j,"__esModule",{value:!0}),j.formatObjKey=void 0;function m(b,p){if(b===null||(typeof b=="undefined"?"undefined":(0,k.default)(b))!=="object")return b;var d=void 0;if(Array.isArray(b)){d=[];for(var t=0;t `),b&&b.firstUpperCase&&(S=k.formatObjKey(S,"firstUpperCase")),y(S)==="object"?(0,v.default)(S).forEach(function(d){y(S[d])==="string"||y(S[d])==="number"?p+="<"+d+">"+S[d]+"":y(S[d])==="object"?p+="<"+d+">"+m(S[d])+"":y(S[d])==="array"?p+=S[d].map(function(t){return"<"+d+">"+m(t)+""}).join(""):p+="<"+d+">"+S[d].toString()+""}):p+=S.toString(),p}j.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(F,Q,j){Q.exports=N,Q.exports.HttpsAgent=N;function N(){}},{}],49:[function(F,Q,j){Q.exports=F("./register")().Promise},{"./register":51}],50:[function(F,Q,j){"use strict";var N="@@any-promise/REGISTRATION",v=null;Q.exports=function(C,k){return function(m,S){m=m||null,S=S||{};var b=S.global!==!1;if(v===null&&b&&(v=C[N]||null),v!==null&&m!==null&&v.implementation!==m)throw new Error('any-promise already defined as "'+v.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return v===null&&(m!==null&&typeof S.Promise!="undefined"?v={Promise:S.Promise,implementation:m}:v=k(m),b&&(C[N]=v)),v}}},{}],51:[function(F,Q,j){"use strict";Q.exports=F("./loader")(window,N);function N(){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(F,Q,j){Q.exports={default:F("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(F,Q,j){Q.exports={default:F("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(F,Q,j){"use strict";j.__esModule=!0;var N=F("../core-js/symbol/iterator"),v=m(N),C=F("../core-js/symbol"),k=m(C),y=typeof k.default=="function"&&typeof v.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof k.default=="function"&&S.constructor===k.default&&S!==k.default.prototype?"symbol":typeof S};function m(S){return S&&S.__esModule?S:{default:S}}j.default=typeof k.default=="function"&&y(v.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":y(S)}:function(S){return S&&typeof k.default=="function"&&S.constructor===k.default&&S!==k.default.prototype?"symbol":typeof S=="undefined"?"undefined":y(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(F,Q,j){Q.exports=F("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(F,Q,j){"use strict";j.byteLength=b,j.toByteArray=d,j.fromByteArray=r;for(var N=[],v=[],C=typeof Uint8Array!="undefined"?Uint8Array:Array,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=k.length;y0)throw new Error("Invalid string. Length must be a multiple of 4");var s=i.indexOf("=");s===-1&&(s=o);var c=s===o?0:4-s%4;return[s,c]}function b(i){var o=S(i),s=o[0],c=o[1];return(s+c)*3/4-c}function p(i,o,s){return(o+s)*3/4-s}function d(i){var o,s=S(i),c=s[0],a=s[1],u=new C(p(i,c,a)),f=0,w=a>0?c-4:c,_;for(_=0;_>16&255,u[f++]=o>>8&255,u[f++]=o&255;return a===2&&(o=v[i.charCodeAt(_)]<<2|v[i.charCodeAt(_+1)]>>4,u[f++]=o&255),a===1&&(o=v[i.charCodeAt(_)]<<10|v[i.charCodeAt(_+1)]<<4|v[i.charCodeAt(_+2)]>>2,u[f++]=o>>8&255,u[f++]=o&255),u}function t(i){return N[i>>18&63]+N[i>>12&63]+N[i>>6&63]+N[i&63]}function l(i,o,s){for(var c,a=[],u=o;uw?w:f+u));return c===1?(o=i[s-1],a.push(N[o>>2]+N[o<<4&63]+"==")):c===2&&(o=(i[s-2]<<8)+i[s-1],a.push(N[o>>10]+N[o>>4&63]+N[o<<2&63]+"=")),a.join("")}},{}],70:[function(F,Q,j){/*! * Bowser - a browser detector * https://github.com/ded/bowser * MIT License | (c) Dustin Diaz 2015 */!function(N,v,C){typeof Q!="undefined"&&Q.exports?Q.exports=C():typeof define=="function"&&define.amd?define(v,C):N[v]=C()}(this,"bowser",function(){var N=!0;function v(p){function d(G){var U=p.match(G);return U&&U.length>1&&U[1]||""}function t(G){var U=p.match(G);return U&&U.length>1&&U[2]||""}var l=d(/(ipod|iphone|ipad)/i).toLowerCase(),r=/like android/i.test(p),i=!r&&/android/i.test(p),o=/nexus\s*[0-6]\s*/i.test(p),s=!o&&/nexus\s*[0-9]+/i.test(p),c=/CrOS/.test(p),a=/silk/i.test(p),u=/sailfish/i.test(p),f=/tizen/i.test(p),w=/(web|hpw)(o|0)s/i.test(p),_=/windows phone/i.test(p),h=/SamsungBrowser/i.test(p),R=!_&&/windows/i.test(p),O=!l&&!a&&/macintosh/i.test(p),g=!i&&!u&&!f&&!w&&/linux/i.test(p),x=t(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),E=d(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(p)&&!/tablet pc/i.test(p),M=!T&&/[^-]mobi/i.test(p),L=/xbox/i.test(p),A;/opera/i.test(p)?A={name:"Opera",opera:N,version:E||d(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(p)?A={name:"Opera",opera:N,version:d(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||E}:/SamsungBrowser/i.test(p)?A={name:"Samsung Internet for Android",samsungBrowser:N,version:E||d(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(p)?A={name:"NAVER Whale browser",whale:N,version:d(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(p)?A={name:"MZ Browser",mzbrowser:N,version:d(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(p)?A={name:"Opera Coast",coast:N,version:E||d(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(p)?A={name:"Focus",focus:N,version:d(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(p)?A={name:"Yandex Browser",yandexbrowser:N,version:E||d(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(p)?A={name:"UC Browser",ucbrowser:N,version:d(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(p)?A={name:"Maxthon",maxthon:N,version:d(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(p)?A={name:"Epiphany",epiphany:N,version:d(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(p)?A={name:"Puffin",puffin:N,version:d(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(p)?A={name:"Sleipnir",sleipnir:N,version:d(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(p)?A={name:"K-Meleon",kMeleon:N,version:d(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:_?(A={name:"Windows Phone",osname:"Windows Phone",windowsphone:N},x?(A.msedge=N,A.version=x):(A.msie=N,A.version=d(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(p)?A={name:"Internet Explorer",msie:N,version:d(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:c?A={name:"Chrome",osname:"Chrome OS",chromeos:N,chromeBook:N,chrome:N,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(p)?A={name:"Microsoft Edge",msedge:N,version:x}:/vivaldi/i.test(p)?A={name:"Vivaldi",vivaldi:N,version:d(/vivaldi\/(\d+(\.\d+)?)/i)||E}:u?A={name:"Sailfish",osname:"Sailfish OS",sailfish:N,version:d(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(p)?A={name:"SeaMonkey",seamonkey:N,version:d(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(p)?(A={name:"Firefox",firefox:N,version:d(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(p)&&(A.firefoxos=N,A.osname="Firefox OS")):a?A={name:"Amazon Silk",silk:N,version:d(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(p)?A={name:"PhantomJS",phantom:N,version:d(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(p)?A={name:"SlimerJS",slimer:N,version:d(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(p)||/rim\stablet/i.test(p)?A={name:"BlackBerry",osname:"BlackBerry OS",blackberry:N,version:E||d(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:w?(A={name:"WebOS",osname:"WebOS",webos:N,version:E||d(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(p)&&(A.touchpad=N)):/bada/i.test(p)?A={name:"Bada",osname:"Bada",bada:N,version:d(/dolfin\/(\d+(\.\d+)?)/i)}:f?A={name:"Tizen",osname:"Tizen",tizen:N,version:d(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||E}:/qupzilla/i.test(p)?A={name:"QupZilla",qupzilla:N,version:d(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||E}:/chromium/i.test(p)?A={name:"Chromium",chromium:N,version:d(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||E}:/chrome|crios|crmo/i.test(p)?A={name:"Chrome",chrome:N,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:i?A={name:"Android",version:E}:/safari|applewebkit/i.test(p)?(A={name:"Safari",safari:N},E&&(A.version=E)):l?(A={name:l=="iphone"?"iPhone":l=="ipad"?"iPad":"iPod"},E&&(A.version=E)):/googlebot/i.test(p)?A={name:"Googlebot",googlebot:N,version:d(/googlebot\/(\d+(\.\d+))/i)||E}:A={name:d(/^(.*)\/(.*) /),version:t(/^(.*)\/(.*) /)},!A.msedge&&/(apple)?webkit/i.test(p)?(/(apple)?webkit\/537\.36/i.test(p)?(A.name=A.name||"Blink",A.blink=N):(A.name=A.name||"Webkit",A.webkit=N),!A.version&&E&&(A.version=E)):!A.opera&&/gecko\//i.test(p)&&(A.name=A.name||"Gecko",A.gecko=N,A.version=A.version||d(/gecko\/(\d+(\.\d+)?)/i)),!A.windowsphone&&(i||A.silk)?(A.android=N,A.osname="Android"):!A.windowsphone&&l?(A[l]=N,A.ios=N,A.osname="iOS"):O?(A.mac=N,A.osname="macOS"):L?(A.xbox=N,A.osname="Xbox"):R?(A.windows=N,A.osname="Windows"):g&&(A.linux=N,A.osname="Linux");function V(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="";A.windows?z=V(d(/Windows ((NT|XP)( \d\d?.\d)?)/i)):A.windowsphone?z=d(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):A.mac?(z=d(/Mac OS X (\d+([_\.\s]\d+)*)/i),z=z.replace(/[_\s]/g,".")):l?(z=d(/os (\d+([_\s]\d+)*) like mac os x/i),z=z.replace(/[_\s]/g,".")):i?z=d(/android[ \/-](\d+(\.\d+)*)/i):A.webos?z=d(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):A.blackberry?z=d(/rim\stablet\sos\s(\d+(\.\d+)*)/i):A.bada?z=d(/bada\/(\d+(\.\d+)*)/i):A.tizen&&(z=d(/tizen[\/\s](\d+(\.\d+)*)/i)),z&&(A.osversion=z);var W=!A.windows&&z.split(".")[0];return T||s||l=="ipad"||i&&(W==3||W>=4&&!M)||A.silk?A.tablet=N:(M||l=="iphone"||l=="ipod"||i||o||A.blackberry||A.webos||A.bada)&&(A.mobile=N),A.msedge||A.msie&&A.version>=10||A.yandexbrowser&&A.version>=15||A.vivaldi&&A.version>=1||A.chrome&&A.version>=20||A.samsungBrowser&&A.version>=4||A.whale&&m([A.version,"1.0"])===1||A.mzbrowser&&m([A.version,"6.0"])===1||A.focus&&m([A.version,"1.0"])===1||A.firefox&&A.version>=20||A.safari&&A.version>=6||A.opera&&A.version>=10||A.ios&&A.osversion&&A.osversion.split(".")[0]>=6||A.blackberry&&A.version>=10.1||A.chromium&&A.version>=20?A.a=N:A.msie&&A.version<10||A.chrome&&A.version<20||A.firefox&&A.version<20||A.safari&&A.version<6||A.opera&&A.version<10||A.ios&&A.osversion&&A.osversion.split(".")[0]<6||A.chromium&&A.version<20?A.c=N:A.x=N,A}var C=v(typeof navigator!="undefined"&&navigator.userAgent||"");C.test=function(p){for(var d=0;d=0;){if(t[0][d]>t[1][d])return 1;if(t[0][d]===t[1][d]){if(d===0)return 0}else return-1}}function S(p,d,t){var l=C;typeof d=="string"&&(t=d,d=void 0),d===void 0&&(d=!1),t&&(l=v(t));var r=""+l.version;for(var i in p)if(p.hasOwnProperty(i)&&l[i]){if(typeof p[i]!="string")throw new Error("Browser version in the minVersion map should be a string: "+i+": "+String(p));return m([r,p[i]])<0}return d}function b(p,d,t){return!S(p,d,t)}return C.isUnsupportedBrowser=S,C.compareVersions=m,C.check=b,C._detect=v,C.detect=v,C})},{}],71:[function(F,Q,j){},{}],72:[function(F,Q,j){var N=F("buffer").Buffer,v=N.isEncoding||function(b){switch(b&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function C(b){if(b&&!v(b))throw new Error("Unknown encoding: "+b)}var k=j.StringDecoder=function(b){this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,""),C(b);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=m;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=S;break;default:this.write=y;return}this.charBuffer=new N(6),this.charReceived=0,this.charLength=0};k.prototype.write=function(b){for(var p="";this.charLength;){var d=b.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;if(b.copy(this.charBuffer,this.charReceived,0,d),this.charReceived+=d,this.charReceived=55296&&l<=56319){this.charLength+=this.surrogateSize,p="";continue}if(this.charReceived=this.charLength=0,b.length===0)return p;break}this.detectIncompleteChar(b);var t=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,t),t-=this.charReceived),p+=b.toString(this.encoding,0,t);var t=p.length-1,l=p.charCodeAt(t);if(l>=55296&&l<=56319){var r=this.surrogateSize;return this.charLength+=r,this.charReceived+=r,this.charBuffer.copy(this.charBuffer,r,0,r),b.copy(this.charBuffer,0,0,r),p.substring(0,t)}return p},k.prototype.detectIncompleteChar=function(b){for(var p=b.length>=3?3:b.length;p>0;p--){var d=b[b.length-p];if(p==1&&d>>5==6){this.charLength=2;break}if(p<=2&&d>>4==14){this.charLength=3;break}if(p<=3&&d>>3==30){this.charLength=4;break}}this.charReceived=p},k.prototype.end=function(b){var p="";if(b&&b.length&&(p=this.write(b)),this.charReceived){var d=this.charReceived,t=this.charBuffer,l=this.encoding;p+=t.slice(0,d).toString(l)}return p};function y(b){return b.toString(this.encoding)}function m(b){this.charReceived=b.length%2,this.charLength=this.charReceived?2:0}function S(b){this.charReceived=b.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(F,Q,j){(function(N,v){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */"use strict";var C=F("base64-js"),k=F("ieee754"),y=F("isarray");j.Buffer=v,j.SlowBuffer=a,j.INSPECT_MAX_BYTES=50,v.TYPED_ARRAY_SUPPORT=N.TYPED_ARRAY_SUPPORT!==void 0?N.TYPED_ARRAY_SUPPORT:m(),j.kMaxLength=S();function m(){try{var oe=new Uint8Array(1);return oe.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},oe.foo()===42&&typeof oe.subarray=="function"&&oe.subarray(1,1).byteLength===0}catch(q){return!1}}function S(){return v.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(oe,q){if(S()=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return oe|0}function a(oe){return+oe!=oe&&(oe=0),v.alloc(+oe)}v.isBuffer=function(q){return!!(q!=null&&q._isBuffer)},v.compare=function(q,Y){if(!v.isBuffer(q)||!v.isBuffer(Y))throw new TypeError("Arguments must be Buffers");if(q===Y)return 0;for(var Z=q.length,ye=Y.length,be=0,Re=Math.min(Z,ye);be>>1;case"base64":return ne(oe).length;default:if(Z)return ue(oe).length;q=(""+q).toLowerCase(),Z=!0}}v.byteLength=u;function f(oe,q,Y){var Z=!1;if((q===void 0||q<0)&&(q=0),q>this.length)return"";if((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)return"";if(Y>>>=0,q>>>=0,Y<=q)return"";for(oe||(oe="utf8");;)switch(oe){case"hex":return G(this,q,Y);case"utf8":case"utf-8":return L(this,q,Y);case"ascii":return z(this,q,Y);case"latin1":case"binary":return W(this,q,Y);case"base64":return M(this,q,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,q,Y);default:if(Z)throw new TypeError("Unknown encoding: "+oe);oe=(oe+"").toLowerCase(),Z=!0}}v.prototype._isBuffer=!0;function w(oe,q,Y){var Z=oe[q];oe[q]=oe[Y],oe[Y]=Z}v.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 Y=0;Y0&&(q=this.toString("hex",0,Y).match(/.{2}/g).join(" "),this.length>Y&&(q+=" ... ")),""},v.prototype.compare=function(q,Y,Z,ye,be){if(!v.isBuffer(q))throw new TypeError("Argument must be a Buffer");if(Y===void 0&&(Y=0),Z===void 0&&(Z=q?q.length:0),ye===void 0&&(ye=0),be===void 0&&(be=this.length),Y<0||Z>q.length||ye<0||be>this.length)throw new RangeError("out of range index");if(ye>=be&&Y>=Z)return 0;if(ye>=be)return-1;if(Y>=Z)return 1;if(Y>>>=0,Z>>>=0,ye>>>=0,be>>>=0,this===q)return 0;for(var Re=be-ye,Qe=Z-Y,rt=Math.min(Re,Qe),at=this.slice(ye,be),qe=q.slice(Y,Z),st=0;st2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,isNaN(Y)&&(Y=ye?0:oe.length-1),Y<0&&(Y=oe.length+Y),Y>=oe.length){if(ye)return-1;Y=oe.length-1}else if(Y<0)if(ye)Y=0;else return-1;if(typeof q=="string"&&(q=v.from(q,Z)),v.isBuffer(q))return q.length===0?-1:h(oe,q,Y,Z,ye);if(typeof q=="number")return q=q&255,v.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ye?Uint8Array.prototype.indexOf.call(oe,q,Y):Uint8Array.prototype.lastIndexOf.call(oe,q,Y):h(oe,[q],Y,Z,ye);throw new TypeError("val must be string, number or Buffer")}function h(oe,q,Y,Z,ye){var be=1,Re=oe.length,Qe=q.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(oe.length<2||q.length<2)return-1;be=2,Re/=2,Qe/=2,Y/=2}function rt(je,Ie){return be===1?je[Ie]:je.readUInt16BE(Ie*be)}var at;if(ye){var qe=-1;for(at=Y;atRe&&(Y=Re-Qe),at=Y;at>=0;at--){for(var st=!0,lt=0;ltye&&(Z=ye)):Z=ye;var be=q.length;if(be%2!==0)throw new TypeError("Invalid hex string");Z>be/2&&(Z=be/2);for(var Re=0;Rebe)&&(Z=be),q.length>0&&(Z<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");ye||(ye="utf8");for(var Re=!1;;)switch(ye){case"hex":return R(this,q,Y,Z);case"utf8":case"utf-8":return O(this,q,Y,Z);case"ascii":return g(this,q,Y,Z);case"latin1":case"binary":return x(this,q,Y,Z);case"base64":return E(this,q,Y,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,q,Y,Z);default:if(Re)throw new TypeError("Unknown encoding: "+ye);ye=(""+ye).toLowerCase(),Re=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(oe,q,Y){return q===0&&Y===oe.length?C.fromByteArray(oe):C.fromByteArray(oe.slice(q,Y))}function L(oe,q,Y){Y=Math.min(oe.length,Y);for(var Z=[],ye=q;ye239?4:be>223?3:be>191?2:1;if(ye+Qe<=Y){var rt,at,qe,st;switch(Qe){case 1:be<128&&(Re=be);break;case 2:rt=oe[ye+1],(rt&192)===128&&(st=(be&31)<<6|rt&63,st>127&&(Re=st));break;case 3:rt=oe[ye+1],at=oe[ye+2],(rt&192)===128&&(at&192)===128&&(st=(be&15)<<12|(rt&63)<<6|at&63,st>2047&&(st<55296||st>57343)&&(Re=st));break;case 4:rt=oe[ye+1],at=oe[ye+2],qe=oe[ye+3],(rt&192)===128&&(at&192)===128&&(qe&192)===128&&(st=(be&15)<<18|(rt&63)<<12|(at&63)<<6|qe&63,st>65535&&st<1114112&&(Re=st))}}Re===null?(Re=65533,Qe=1):Re>65535&&(Re-=65536,Z.push(Re>>>10&1023|55296),Re=56320|Re&1023),Z.push(Re),ye+=Qe}return V(Z)}var A=4096;function V(oe){var q=oe.length;if(q<=A)return String.fromCharCode.apply(String,oe);for(var Y="",Z=0;ZZ)&&(Y=Z);for(var ye="",be=q;beZ&&(q=Z),Y<0?(Y+=Z,Y<0&&(Y=0)):Y>Z&&(Y=Z),YY)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUIntLE=function(q,Y,Z){q=q|0,Y=Y|0,Z||P(q,Y,this.length);for(var ye=this[q],be=1,Re=0;++Re0&&(be*=256);)ye+=this[q+--Y]*be;return ye},v.prototype.readUInt8=function(q,Y){return Y||P(q,1,this.length),this[q]},v.prototype.readUInt16LE=function(q,Y){return Y||P(q,2,this.length),this[q]|this[q+1]<<8},v.prototype.readUInt16BE=function(q,Y){return Y||P(q,2,this.length),this[q]<<8|this[q+1]},v.prototype.readUInt32LE=function(q,Y){return Y||P(q,4,this.length),(this[q]|this[q+1]<<8|this[q+2]<<16)+this[q+3]*16777216},v.prototype.readUInt32BE=function(q,Y){return Y||P(q,4,this.length),this[q]*16777216+(this[q+1]<<16|this[q+2]<<8|this[q+3])},v.prototype.readIntLE=function(q,Y,Z){q=q|0,Y=Y|0,Z||P(q,Y,this.length);for(var ye=this[q],be=1,Re=0;++Re=be&&(ye-=Math.pow(2,8*Y)),ye},v.prototype.readIntBE=function(q,Y,Z){q=q|0,Y=Y|0,Z||P(q,Y,this.length);for(var ye=Y,be=1,Re=this[q+--ye];ye>0&&(be*=256);)Re+=this[q+--ye]*be;return be*=128,Re>=be&&(Re-=Math.pow(2,8*Y)),Re},v.prototype.readInt8=function(q,Y){return Y||P(q,1,this.length),this[q]&128?(255-this[q]+1)*-1:this[q]},v.prototype.readInt16LE=function(q,Y){Y||P(q,2,this.length);var Z=this[q]|this[q+1]<<8;return Z&32768?Z|4294901760:Z},v.prototype.readInt16BE=function(q,Y){Y||P(q,2,this.length);var Z=this[q+1]|this[q]<<8;return Z&32768?Z|4294901760:Z},v.prototype.readInt32LE=function(q,Y){return Y||P(q,4,this.length),this[q]|this[q+1]<<8|this[q+2]<<16|this[q+3]<<24},v.prototype.readInt32BE=function(q,Y){return Y||P(q,4,this.length),this[q]<<24|this[q+1]<<16|this[q+2]<<8|this[q+3]},v.prototype.readFloatLE=function(q,Y){return Y||P(q,4,this.length),k.read(this,q,!0,23,4)},v.prototype.readFloatBE=function(q,Y){return Y||P(q,4,this.length),k.read(this,q,!1,23,4)},v.prototype.readDoubleLE=function(q,Y){return Y||P(q,8,this.length),k.read(this,q,!0,52,8)},v.prototype.readDoubleBE=function(q,Y){return Y||P(q,8,this.length),k.read(this,q,!1,52,8)};function H(oe,q,Y,Z,ye,be){if(!v.isBuffer(oe))throw new TypeError('"buffer" argument must be a Buffer instance');if(q>ye||qoe.length)throw new RangeError("Index out of range")}v.prototype.writeUIntLE=function(q,Y,Z,ye){if(q=+q,Y=Y|0,Z=Z|0,!ye){var be=Math.pow(2,8*Z)-1;H(this,q,Y,Z,be,0)}var Re=1,Qe=0;for(this[Y]=q&255;++Qe=0&&(Qe*=256);)this[Y+Re]=q/Qe&255;return Y+Z},v.prototype.writeUInt8=function(q,Y,Z){return q=+q,Y=Y|0,Z||H(this,q,Y,1,255,0),v.TYPED_ARRAY_SUPPORT||(q=Math.floor(q)),this[Y]=q&255,Y+1};function $(oe,q,Y,Z){q<0&&(q=65535+q+1);for(var ye=0,be=Math.min(oe.length-Y,2);ye>>(Z?ye:1-ye)*8}v.prototype.writeUInt16LE=function(q,Y,Z){return q=+q,Y=Y|0,Z||H(this,q,Y,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[Y]=q&255,this[Y+1]=q>>>8):$(this,q,Y,!0),Y+2},v.prototype.writeUInt16BE=function(q,Y,Z){return q=+q,Y=Y|0,Z||H(this,q,Y,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>8,this[Y+1]=q&255):$(this,q,Y,!1),Y+2};function re(oe,q,Y,Z){q<0&&(q=4294967295+q+1);for(var ye=0,be=Math.min(oe.length-Y,4);ye>>(Z?ye:3-ye)*8&255}v.prototype.writeUInt32LE=function(q,Y,Z){return q=+q,Y=Y|0,Z||H(this,q,Y,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[Y+3]=q>>>24,this[Y+2]=q>>>16,this[Y+1]=q>>>8,this[Y]=q&255):re(this,q,Y,!0),Y+4},v.prototype.writeUInt32BE=function(q,Y,Z){return q=+q,Y=Y|0,Z||H(this,q,Y,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>24,this[Y+1]=q>>>16,this[Y+2]=q>>>8,this[Y+3]=q&255):re(this,q,Y,!1),Y+4},v.prototype.writeIntLE=function(q,Y,Z,ye){if(q=+q,Y=Y|0,!ye){var be=Math.pow(2,8*Z-1);H(this,q,Y,Z,be-1,-be)}var Re=0,Qe=1,rt=0;for(this[Y]=q&255;++Re>0)-rt&255;return Y+Z},v.prototype.writeIntBE=function(q,Y,Z,ye){if(q=+q,Y=Y|0,!ye){var be=Math.pow(2,8*Z-1);H(this,q,Y,Z,be-1,-be)}var Re=Z-1,Qe=1,rt=0;for(this[Y+Re]=q&255;--Re>=0&&(Qe*=256);)q<0&&rt===0&&this[Y+Re+1]!==0&&(rt=1),this[Y+Re]=(q/Qe>>0)-rt&255;return Y+Z},v.prototype.writeInt8=function(q,Y,Z){return q=+q,Y=Y|0,Z||H(this,q,Y,1,127,-128),v.TYPED_ARRAY_SUPPORT||(q=Math.floor(q)),q<0&&(q=255+q+1),this[Y]=q&255,Y+1},v.prototype.writeInt16LE=function(q,Y,Z){return q=+q,Y=Y|0,Z||H(this,q,Y,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[Y]=q&255,this[Y+1]=q>>>8):$(this,q,Y,!0),Y+2},v.prototype.writeInt16BE=function(q,Y,Z){return q=+q,Y=Y|0,Z||H(this,q,Y,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>8,this[Y+1]=q&255):$(this,q,Y,!1),Y+2},v.prototype.writeInt32LE=function(q,Y,Z){return q=+q,Y=Y|0,Z||H(this,q,Y,4,2147483647,-2147483648),v.TYPED_ARRAY_SUPPORT?(this[Y]=q&255,this[Y+1]=q>>>8,this[Y+2]=q>>>16,this[Y+3]=q>>>24):re(this,q,Y,!0),Y+4},v.prototype.writeInt32BE=function(q,Y,Z){return q=+q,Y=Y|0,Z||H(this,q,Y,4,2147483647,-2147483648),q<0&&(q=4294967295+q+1),v.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>24,this[Y+1]=q>>>16,this[Y+2]=q>>>8,this[Y+3]=q&255):re(this,q,Y,!1),Y+4};function te(oe,q,Y,Z,ye,be){if(Y+Z>oe.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function ge(oe,q,Y,Z,ye){return ye||te(oe,q,Y,4,34028234663852886e22,-34028234663852886e22),k.write(oe,q,Y,Z,23,4),Y+4}v.prototype.writeFloatLE=function(q,Y,Z){return ge(this,q,Y,!0,Z)},v.prototype.writeFloatBE=function(q,Y,Z){return ge(this,q,Y,!1,Z)};function ve(oe,q,Y,Z,ye){return ye||te(oe,q,Y,8,17976931348623157e292,-17976931348623157e292),k.write(oe,q,Y,Z,52,8),Y+8}v.prototype.writeDoubleLE=function(q,Y,Z){return ve(this,q,Y,!0,Z)},v.prototype.writeDoubleBE=function(q,Y,Z){return ve(this,q,Y,!1,Z)},v.prototype.copy=function(q,Y,Z,ye){if(Z||(Z=0),!ye&&ye!==0&&(ye=this.length),Y>=q.length&&(Y=q.length),Y||(Y=0),ye>0&&ye=this.length)throw new RangeError("sourceStart out of bounds");if(ye<0)throw new RangeError("sourceEnd out of bounds");ye>this.length&&(ye=this.length),q.length-Y=0;--Re)q[Re+Y]=this[Re+Z];else if(be<1e3||!v.TYPED_ARRAY_SUPPORT)for(Re=0;Re>>0,Z=Z===void 0?this.length:Z>>>0,q||(q=0);var Re;if(typeof q=="number")for(Re=Y;Re55295&&Y<57344){if(!ye){if(Y>56319){(q-=3)>-1&&be.push(239,191,189);continue}else if(Re+1===Z){(q-=3)>-1&&be.push(239,191,189);continue}ye=Y;continue}if(Y<56320){(q-=3)>-1&&be.push(239,191,189),ye=Y;continue}Y=(ye-55296<<10|Y-56320)+65536}else ye&&((q-=3)>-1&&be.push(239,191,189));if(ye=null,Y<128){if((q-=1)<0)break;be.push(Y)}else if(Y<2048){if((q-=2)<0)break;be.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((q-=3)<0)break;be.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((q-=4)<0)break;be.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return be}function ie(oe){for(var q=[],Y=0;Y>8,ye=Y%256,be.push(ye),be.push(Z);return be}function ne(oe){return C.toByteArray(De(oe))}function ce(oe,q,Y,Z){for(var ye=0;ye=q.length||ye>=oe.length);++ye)q[ye+Y]=oe[ye];return ye}function Oe(oe){return oe!==oe}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(F,Q,j){Q.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(F,Q,j){Q.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(F,Q,j){/*! * copy-to - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var N=Array.prototype.slice;Q.exports=v;function v(k,y){if(!(this instanceof v))return new v(k,y);this.src=k,this._withAccess=y}v.prototype.withAccess=function(k){return this._withAccess=k!==!1,this},v.prototype.pick=function(k){return Array.isArray(k)||(k=N.call(arguments)),k.length&&(this.keys=k),this},v.prototype.to=function(k){if(k=k||{},!this.src)return k;var y=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;md;)if(t=b[d++],t!=t)return!0}else for(;p>d;d++)if((k||d in b)&&b[d]===m)return k||d||0;return!k&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(F,Q,j){var N=F("./_cof"),v=F("./_wks")("toStringTag"),C=N(function(){return arguments}())=="Arguments",k=function(y,m){try{return y[m]}catch(S){}};Q.exports=function(y){var m,S,b;return y===void 0?"Undefined":y===null?"Null":typeof(S=k(m=Object(y),v))=="string"?S:C?N(m):(b=N(m))=="Object"&&typeof m.callee=="function"?"Arguments":b}},{"./_cof":98,"./_wks":166}],98:[function(F,Q,j){var N={}.toString;Q.exports=function(v){return N.call(v).slice(8,-1)}},{}],99:[function(F,Q,j){var N=Q.exports={version:"2.6.11"};typeof __e=="number"&&(__e=N)},{}],100:[function(F,Q,j){"use strict";var N=F("./_object-dp"),v=F("./_property-desc");Q.exports=function(C,k,y){k in C?N.f(C,k,v(0,y)):C[k]=y}},{"./_object-dp":132,"./_property-desc":146}],101:[function(F,Q,j){var N=F("./_a-function");Q.exports=function(v,C,k){if(N(v),C===void 0)return v;switch(k){case 1:return function(y){return v.call(C,y)};case 2:return function(y,m){return v.call(C,y,m)};case 3:return function(y,m,S){return v.call(C,y,m,S)}}return function(){return v.apply(C,arguments)}}},{"./_a-function":92}],102:[function(F,Q,j){Q.exports=function(N){if(N==null)throw TypeError("Can't call method on "+N);return N}},{}],103:[function(F,Q,j){Q.exports=!F("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(F,Q,j){var N=F("./_is-object"),v=F("./_global").document,C=N(v)&&N(v.createElement);Q.exports=function(k){return C?v.createElement(k):{}}},{"./_global":110,"./_is-object":119}],105:[function(F,Q,j){Q.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(F,Q,j){var N=F("./_object-keys"),v=F("./_object-gops"),C=F("./_object-pie");Q.exports=function(k){var y=N(k),m=v.f;if(m)for(var S=m(k),b=C.f,p=0,d;S.length>p;)b.call(k,d=S[p++])&&y.push(d);return y}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(F,Q,j){var N=F("./_global"),v=F("./_core"),C=F("./_ctx"),k=F("./_hide"),y=F("./_has"),m="prototype",S=function(b,p,d){var t=b&S.F,l=b&S.G,r=b&S.S,i=b&S.P,o=b&S.B,s=b&S.W,c=l?v:v[p]||(v[p]={}),a=c[m],u=l?N:r?N[p]:(N[p]||{})[m],f,w,_;l&&(d=p);for(f in d){if(w=!t&&u&&u[f]!==void 0,w&&y(c,f))continue;_=w?u[f]:d[f],c[f]=l&&typeof u[f]!="function"?d[f]:o&&w?C(_,N):s&&u[f]==_?function(h){var R=function(O,g,x){if(this instanceof h){switch(arguments.length){case 0:return new h;case 1:return new h(O);case 2:return new h(O,g)}return new h(O,g,x)}return h.apply(this,arguments)};return R[m]=h[m],R}(_):i&&typeof _=="function"?C(Function.call,_):_,i&&((c.virtual||(c.virtual={}))[f]=_,b&S.R&&a&&!a[f]&&k(a,f,_))}};S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,Q.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(F,Q,j){Q.exports=function(N){try{return!!N()}catch(v){return!0}}},{}],109:[function(F,Q,j){var N=F("./_ctx"),v=F("./_iter-call"),C=F("./_is-array-iter"),k=F("./_an-object"),y=F("./_to-length"),m=F("./core.get-iterator-method"),S={},b={},j=Q.exports=function(p,d,t,l,r){var i=r?function(){return p}:m(p),o=N(t,l,d?2:1),s=0,c,a,u,f;if(typeof i!="function")throw TypeError(p+" is not iterable!");if(C(i)){for(c=y(p.length);c>s;s++)if(f=d?o(k(a=p[s])[0],a[1]):o(p[s]),f===S||f===b)return f}else for(u=i.call(p);!(a=u.next()).done;)if(f=v(u,o,a.value,d),f===S||f===b)return f};j.BREAK=S,j.RETURN=b},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(F,Q,j){var N=Q.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=N)},{}],111:[function(F,Q,j){var N={}.hasOwnProperty;Q.exports=function(v,C){return N.call(v,C)}},{}],112:[function(F,Q,j){var N=F("./_object-dp"),v=F("./_property-desc");Q.exports=F("./_descriptors")?function(C,k,y){return N.f(C,k,v(1,y))}:function(C,k,y){return C[k]=y,C}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(F,Q,j){var N=F("./_global").document;Q.exports=N&&N.documentElement},{"./_global":110}],114:[function(F,Q,j){Q.exports=!F("./_descriptors")&&!F("./_fails")(function(){return Object.defineProperty(F("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(F,Q,j){Q.exports=function(N,v,C){var k=C===void 0;switch(v.length){case 0:return k?N():N.call(C);case 1:return k?N(v[0]):N.call(C,v[0]);case 2:return k?N(v[0],v[1]):N.call(C,v[0],v[1]);case 3:return k?N(v[0],v[1],v[2]):N.call(C,v[0],v[1],v[2]);case 4:return k?N(v[0],v[1],v[2],v[3]):N.call(C,v[0],v[1],v[2],v[3])}return N.apply(C,v)}},{}],116:[function(F,Q,j){var N=F("./_cof");Q.exports=Object("z").propertyIsEnumerable(0)?Object:function(v){return N(v)=="String"?v.split(""):Object(v)}},{"./_cof":98}],117:[function(F,Q,j){var N=F("./_iterators"),v=F("./_wks")("iterator"),C=Array.prototype;Q.exports=function(k){return k!==void 0&&(N.Array===k||C[v]===k)}},{"./_iterators":125,"./_wks":166}],118:[function(F,Q,j){var N=F("./_cof");Q.exports=Array.isArray||function(C){return N(C)=="Array"}},{"./_cof":98}],119:[function(F,Q,j){Q.exports=function(N){return typeof N=="object"?N!==null:typeof N=="function"}},{}],120:[function(F,Q,j){var N=F("./_an-object");Q.exports=function(v,C,k,y){try{return y?C(N(k)[0],k[1]):C(k)}catch(S){var m=v.return;throw m!==void 0&&N(m.call(v)),S}}},{"./_an-object":95}],121:[function(F,Q,j){"use strict";var N=F("./_object-create"),v=F("./_property-desc"),C=F("./_set-to-string-tag"),k={};F("./_hide")(k,F("./_wks")("iterator"),function(){return this}),Q.exports=function(y,m,S){y.prototype=N(k,{next:v(1,S)}),C(y,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(F,Q,j){"use strict";var N=F("./_library"),v=F("./_export"),C=F("./_redefine"),k=F("./_hide"),y=F("./_iterators"),m=F("./_iter-create"),S=F("./_set-to-string-tag"),b=F("./_object-gpo"),p=F("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),t="@@iterator",l="keys",r="values",i=function(){return this};Q.exports=function(o,s,c,a,u,f,w){m(c,s,a);var _=function(z){if(!d&&z in g)return g[z];switch(z){case l:return function(){return new c(this,z)};case r:return function(){return new c(this,z)}}return function(){return new c(this,z)}},h=s+" Iterator",R=u==r,O=!1,g=o.prototype,x=g[p]||g[t]||u&&g[u],E=x||_(u),T=u?R?_("entries"):E:void 0,M=s=="Array"&&g.entries||x,L,A,V;if(M&&(V=b(M.call(new o)),V!==Object.prototype&&V.next&&(S(V,h,!0),!N&&typeof V[p]!="function"&&k(V,p,i))),R&&x&&x.name!==r&&(O=!0,E=function(){return x.call(this)}),(!N||w)&&(d||O||!g[p])&&k(g,p,E),y[s]=E,y[h]=i,u)if(L={values:R?E:_(r),keys:f?E:_(l),entries:T},w)for(A in L)A in g||C(g,A,L[A]);else v(v.P+v.F*(d||O),s,L);return L}},{"./_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(F,Q,j){var N=F("./_wks")("iterator"),v=!1;try{var C=[7][N]();C.return=function(){v=!0},Array.from(C,function(){throw 2})}catch(k){}Q.exports=function(k,y){if(!y&&!v)return!1;var m=!1;try{var S=[7],b=S[N]();b.next=function(){return{done:m=!0}},S[N]=function(){return b},k(S)}catch(p){}return m}},{"./_wks":166}],124:[function(F,Q,j){Q.exports=function(N,v){return{value:v,done:!!N}}},{}],125:[function(F,Q,j){Q.exports={}},{}],126:[function(F,Q,j){Q.exports=!0},{}],127:[function(F,Q,j){var N=F("./_uid")("meta"),v=F("./_is-object"),C=F("./_has"),k=F("./_object-dp").f,y=0,m=Object.isExtensible||function(){return!0},S=!F("./_fails")(function(){return m(Object.preventExtensions({}))}),b=function(r){k(r,N,{value:{i:"O"+ ++y,w:{}}})},p=function(r,i){if(!v(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!C(r,N)){if(!m(r))return"F";if(!i)return"E";b(r)}return r[N].i},d=function(r,i){if(!C(r,N)){if(!m(r))return!0;if(!i)return!1;b(r)}return r[N].w},t=function(r){return S&&l.NEED&&m(r)&&!C(r,N)&&b(r),r},l=Q.exports={KEY:N,NEED:!1,fastKey:p,getWeak:d,onFreeze:t}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(F,Q,j){var N=F("./_global"),v=F("./_task").set,C=N.MutationObserver||N.WebKitMutationObserver,k=N.process,y=N.Promise,m=F("./_cof")(k)=="process";Q.exports=function(){var S,b,p,d=function(){var i,o;for(m&&(i=k.domain)&&i.exit();S;){o=S.fn,S=S.next;try{o()}catch(s){throw S?p():b=void 0,s}}b=void 0,i&&i.enter()};if(m)p=function(){k.nextTick(d)};else if(C&&!(N.navigator&&N.navigator.standalone)){var t=!0,l=document.createTextNode("");new C(d).observe(l,{characterData:!0}),p=function(){l.data=t=!t}}else if(y&&y.resolve){var r=y.resolve(void 0);p=function(){r.then(d)}}else p=function(){v.call(N,d)};return function(i){var o={fn:i,next:void 0};b&&(b.next=o),S||(S=o,p()),b=o}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(F,Q,j){"use strict";var N=F("./_a-function");function v(C){var k,y;this.promise=new C(function(m,S){if(k!==void 0||y!==void 0)throw TypeError("Bad Promise constructor");k=m,y=S}),this.resolve=N(k),this.reject=N(y)}Q.exports.f=function(C){return new v(C)}},{"./_a-function":92}],130:[function(F,Q,j){"use strict";var N=F("./_descriptors"),v=F("./_object-keys"),C=F("./_object-gops"),k=F("./_object-pie"),y=F("./_to-object"),m=F("./_iobject"),S=Object.assign;Q.exports=!S||F("./_fails")(function(){var b={},p={},d=Symbol(),t="abcdefghijklmnopqrst";return b[d]=7,t.split("").forEach(function(l){p[l]=l}),S({},b)[d]!=7||Object.keys(S({},p)).join("")!=t})?function(p,d){for(var t=y(p),l=arguments.length,r=1,i=C.f,o=k.f;l>r;)for(var s=m(arguments[r++]),c=i?v(s).concat(i(s)):v(s),a=c.length,u=0,f;a>u;)f=c[u++],(!N||o.call(s,f))&&(t[f]=s[f]);return t}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(F,Q,j){var N=F("./_an-object"),v=F("./_object-dps"),C=F("./_enum-bug-keys"),k=F("./_shared-key")("IE_PROTO"),y=function(){},m="prototype",S=function(){var b=F("./_dom-create")("iframe"),p=C.length,d="<",t=">",l;for(b.style.display="none",F("./_html").appendChild(b),b.src="javascript:",l=b.contentWindow.document,l.open(),l.write(d+"script"+t+"document.F=Object"+d+"/script"+t),l.close(),S=l.F;p--;)delete S[m][C[p]];return S()};Q.exports=Object.create||function(p,d){var t;return p!==null?(y[m]=N(p),t=new y,y[m]=null,t[k]=p):t=S(),d===void 0?t:v(t,d)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(F,Q,j){var N=F("./_an-object"),v=F("./_ie8-dom-define"),C=F("./_to-primitive"),k=Object.defineProperty;j.f=F("./_descriptors")?Object.defineProperty:function(m,S,b){if(N(m),S=C(S,!0),N(b),v)try{return k(m,S,b)}catch(p){}if("get"in b||"set"in b)throw TypeError("Accessors not supported!");return"value"in b&&(m[S]=b.value),m}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(F,Q,j){var N=F("./_object-dp"),v=F("./_an-object"),C=F("./_object-keys");Q.exports=F("./_descriptors")?Object.defineProperties:function(y,m){v(y);for(var S=C(m),b=S.length,p=0,d;b>p;)N.f(y,d=S[p++],m[d]);return y}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(F,Q,j){var N=F("./_object-pie"),v=F("./_property-desc"),C=F("./_to-iobject"),k=F("./_to-primitive"),y=F("./_has"),m=F("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;j.f=F("./_descriptors")?S:function(p,d){if(p=C(p),d=k(d,!0),m)try{return S(p,d)}catch(t){}if(y(p,d))return v(!N.f.call(p,d),p[d])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(F,Q,j){var N=F("./_to-iobject"),v=F("./_object-gopn").f,C={}.toString,k=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],y=function(m){try{return v(m)}catch(S){return k.slice()}};Q.exports.f=function(S){return k&&C.call(S)=="[object Window]"?y(S):v(N(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(F,Q,j){var N=F("./_object-keys-internal"),v=F("./_enum-bug-keys").concat("length","prototype");j.f=Object.getOwnPropertyNames||function(k){return N(k,v)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(F,Q,j){j.f=Object.getOwnPropertySymbols},{}],138:[function(F,Q,j){var N=F("./_has"),v=F("./_to-object"),C=F("./_shared-key")("IE_PROTO"),k=Object.prototype;Q.exports=Object.getPrototypeOf||function(y){return y=v(y),N(y,C)?y[C]:typeof y.constructor=="function"&&y instanceof y.constructor?y.constructor.prototype:y instanceof Object?k:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(F,Q,j){var N=F("./_has"),v=F("./_to-iobject"),C=F("./_array-includes")(!1),k=F("./_shared-key")("IE_PROTO");Q.exports=function(y,m){var S=v(y),b=0,p=[],d;for(d in S)d!=k&&(N(S,d)&&p.push(d));for(;m.length>b;)N(S,d=m[b++])&&(~C(p,d)||p.push(d));return p}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(F,Q,j){var N=F("./_object-keys-internal"),v=F("./_enum-bug-keys");Q.exports=Object.keys||function(k){return N(k,v)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(F,Q,j){j.f={}.propertyIsEnumerable},{}],142:[function(F,Q,j){var N=F("./_export"),v=F("./_core"),C=F("./_fails");Q.exports=function(k,y){var m=(v.Object||{})[k]||Object[k],S={};S[k]=y(m),N(N.S+N.F*C(function(){m(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(F,Q,j){var N=F("./_descriptors"),v=F("./_object-keys"),C=F("./_to-iobject"),k=F("./_object-pie").f;Q.exports=function(y){return function(m){for(var S=C(m),b=v(S),p=b.length,d=0,t=[],l;p>d;)l=b[d++],(!N||k.call(S,l))&&t.push(y?[l,S[l]]:S[l]);return t}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(F,Q,j){Q.exports=function(N){try{return{e:!1,v:N()}}catch(v){return{e:!0,v}}}},{}],145:[function(F,Q,j){var N=F("./_an-object"),v=F("./_is-object"),C=F("./_new-promise-capability");Q.exports=function(k,y){if(N(k),v(y)&&y.constructor===k)return y;var m=C.f(k),S=m.resolve;return S(y),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(F,Q,j){Q.exports=function(N,v){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:v}}},{}],147:[function(F,Q,j){var N=F("./_hide");Q.exports=function(v,C,k){for(var y in C)k&&v[y]?v[y]=C[y]:N(v,y,C[y]);return v}},{"./_hide":112}],148:[function(F,Q,j){Q.exports=F("./_hide")},{"./_hide":112}],149:[function(F,Q,j){"use strict";var N=F("./_global"),v=F("./_core"),C=F("./_object-dp"),k=F("./_descriptors"),y=F("./_wks")("species");Q.exports=function(m){var S=typeof v[m]=="function"?v[m]:N[m];k&&S&&!S[y]&&C.f(S,y,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(F,Q,j){var N=F("./_object-dp").f,v=F("./_has"),C=F("./_wks")("toStringTag");Q.exports=function(k,y,m){k&&!v(k=m?k:k.prototype,C)&&N(k,C,{configurable:!0,value:y})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(F,Q,j){var N=F("./_shared")("keys"),v=F("./_uid");Q.exports=function(C){return N[C]||(N[C]=v(C))}},{"./_shared":152,"./_uid":162}],152:[function(F,Q,j){var N=F("./_core"),v=F("./_global"),C="__core-js_shared__",k=v[C]||(v[C]={});(Q.exports=function(y,m){return k[y]||(k[y]=m!==void 0?m:{})})("versions",[]).push({version:N.version,mode:F("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(F,Q,j){var N=F("./_an-object"),v=F("./_a-function"),C=F("./_wks")("species");Q.exports=function(k,y){var m=N(k).constructor,S;return m===void 0||(S=N(m)[C])==null?y:v(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(F,Q,j){var N=F("./_to-integer"),v=F("./_defined");Q.exports=function(C){return function(k,y){var m=String(v(k)),S=N(y),b=m.length,p,d;return S<0||S>=b?C?"":void 0:(p=m.charCodeAt(S),p<55296||p>56319||S+1===b||(d=m.charCodeAt(S+1))<56320||d>57343?C?m.charAt(S):p:C?m.slice(S,S+2):(p-55296<<10)+(d-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(F,Q,j){var N=F("./_ctx"),v=F("./_invoke"),C=F("./_html"),k=F("./_dom-create"),y=F("./_global"),m=y.process,S=y.setImmediate,b=y.clearImmediate,p=y.MessageChannel,d=y.Dispatch,t=0,l={},r="onreadystatechange",i,o,s,c=function(){var u=+this;if(l.hasOwnProperty(u)){var f=l[u];delete l[u],f()}},a=function(u){c.call(u.data)};(!S||!b)&&(S=function(f){for(var w=[],_=1;arguments.length>_;)w.push(arguments[_++]);return l[++t]=function(){v(typeof f=="function"?f:Function(f),w)},i(t),t},b=function(f){delete l[f]},F("./_cof")(m)=="process"?i=function(u){m.nextTick(N(c,u,1))}:d&&d.now?i=function(u){d.now(N(c,u,1))}:p?(o=new p,s=o.port2,o.port1.onmessage=a,i=N(s.postMessage,s,1)):y.addEventListener&&typeof postMessage=="function"&&!y.importScripts?(i=function(u){y.postMessage(u+"","*")},y.addEventListener("message",a,!1)):r in k("script")?i=function(u){C.appendChild(k("script"))[r]=function(){C.removeChild(this),c.call(u)}}:i=function(u){setTimeout(N(c,u,1),0)}),Q.exports={set:S,clear:b}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(F,Q,j){var N=F("./_to-integer"),v=Math.max,C=Math.min;Q.exports=function(k,y){return k=N(k),k<0?v(k+y,0):C(k,y)}},{"./_to-integer":157}],157:[function(F,Q,j){var N=Math.ceil,v=Math.floor;Q.exports=function(C){return isNaN(C=+C)?0:(C>0?v:N)(C)}},{}],158:[function(F,Q,j){var N=F("./_iobject"),v=F("./_defined");Q.exports=function(C){return N(v(C))}},{"./_defined":102,"./_iobject":116}],159:[function(F,Q,j){var N=F("./_to-integer"),v=Math.min;Q.exports=function(C){return C>0?v(N(C),9007199254740991):0}},{"./_to-integer":157}],160:[function(F,Q,j){var N=F("./_defined");Q.exports=function(v){return Object(N(v))}},{"./_defined":102}],161:[function(F,Q,j){var N=F("./_is-object");Q.exports=function(v,C){if(!N(v))return v;var k,y;if(C&&typeof(k=v.toString)=="function"&&!N(y=k.call(v)))return y;if(typeof(k=v.valueOf)=="function"&&!N(y=k.call(v)))return y;if(!C&&typeof(k=v.toString)=="function"&&!N(y=k.call(v)))return y;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(F,Q,j){var N=0,v=Math.random();Q.exports=function(C){return"Symbol(".concat(C===void 0?"":C,")_",(++N+v).toString(36))}},{}],163:[function(F,Q,j){var N=F("./_global"),v=N.navigator;Q.exports=v&&v.userAgent||""},{"./_global":110}],164:[function(F,Q,j){var N=F("./_global"),v=F("./_core"),C=F("./_library"),k=F("./_wks-ext"),y=F("./_object-dp").f;Q.exports=function(m){var S=v.Symbol||(v.Symbol=C?{}:N.Symbol||{});m.charAt(0)!="_"&&!(m in S)&&y(S,m,{value:k.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(F,Q,j){j.f=F("./_wks")},{"./_wks":166}],166:[function(F,Q,j){var N=F("./_shared")("wks"),v=F("./_uid"),C=F("./_global").Symbol,k=typeof C=="function",y=Q.exports=function(m){return N[m]||(N[m]=k&&C[m]||(k?C:v)("Symbol."+m))};y.store=N},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(F,Q,j){var N=F("./_classof"),v=F("./_wks")("iterator"),C=F("./_iterators");Q.exports=F("./_core").getIteratorMethod=function(k){if(k!=null)return k[v]||k["@@iterator"]||C[N(k)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(F,Q,j){"use strict";var N=F("./_ctx"),v=F("./_export"),C=F("./_to-object"),k=F("./_iter-call"),y=F("./_is-array-iter"),m=F("./_to-length"),S=F("./_create-property"),b=F("./core.get-iterator-method");v(v.S+v.F*!F("./_iter-detect")(function(p){Array.from(p)}),"Array",{from:function(d){var t=C(d),l=typeof this=="function"?this:Array,r=arguments.length,i=r>1?arguments[1]:void 0,o=i!==void 0,s=0,c=b(t),a,u,f,w;if(o&&(i=N(i,r>2?arguments[2]:void 0,2)),c!=null&&!(l==Array&&y(c)))for(w=c.call(t),u=new l;!(f=w.next()).done;s++)S(u,s,o?k(w,i,[f.value,s],!0):f.value);else for(a=m(t.length),u=new l(a);a>s;s++)S(u,s,o?i(t[s],s):t[s]);return u.length=s,u}})},{"./_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(F,Q,j){"use strict";var N=F("./_add-to-unscopables"),v=F("./_iter-step"),C=F("./_iterators"),k=F("./_to-iobject");Q.exports=F("./_iter-define")(Array,"Array",function(y,m){this._t=k(y),this._i=0,this._k=m},function(){var y=this._t,m=this._k,S=this._i++;return!y||S>=y.length?(this._t=void 0,v(1)):m=="keys"?v(0,S):m=="values"?v(0,y[S]):v(0,[S,y[S]])},"values"),C.Arguments=C.Array,N("keys"),N("values"),N("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(F,Q,j){"use strict";var N=F("./_is-object"),v=F("./_object-gpo"),C=F("./_wks")("hasInstance"),k=Function.prototype;C in k||F("./_object-dp").f(k,C,{value:function(y){if(typeof this!="function"||!N(y))return!1;if(!N(this.prototype))return y instanceof this;for(;y=v(y);)if(this.prototype===y)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(F,Q,j){var N=F("./_export");N(N.S+N.F,"Object",{assign:F("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(F,Q,j){var N=F("./_export");N(N.S,"Object",{create:F("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(F,Q,j){var N=F("./_export");N(N.S+N.F*!F("./_descriptors"),"Object",{defineProperty:F("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(F,Q,j){F("./_object-sap")("getOwnPropertyNames",function(){return F("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(F,Q,j){var N=F("./_to-object"),v=F("./_object-gpo");F("./_object-sap")("getPrototypeOf",function(){return function(k){return v(N(k))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(F,Q,j){var N=F("./_to-object"),v=F("./_object-keys");F("./_object-sap")("keys",function(){return function(k){return v(N(k))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(F,Q,j){arguments[4][71][0].apply(j,arguments)},{dup:71}],178:[function(F,Q,j){"use strict";var N=F("./_library"),v=F("./_global"),C=F("./_ctx"),k=F("./_classof"),y=F("./_export"),m=F("./_is-object"),S=F("./_a-function"),b=F("./_an-instance"),p=F("./_for-of"),d=F("./_species-constructor"),t=F("./_task").set,l=F("./_microtask")(),r=F("./_new-promise-capability"),i=F("./_perform"),o=F("./_user-agent"),s=F("./_promise-resolve"),c="Promise",a=v.TypeError,u=v.process,f=u&&u.versions,w=f&&f.v8||"",_=v[c],h=k(u)=="process",R=function(){},O,g,x,E,T=g=r.f,M=!!function(){try{var P=_.resolve(1),H=(P.constructor={})[F("./_wks")("species")]=function($){$(R,R)};return(h||typeof PromiseRejectionEvent=="function")&&P.then(R)instanceof H&&w.indexOf("6.6")!==0&&o.indexOf("Chrome/66")===-1}catch($){}}(),L=function(P){var H;return m(P)&&typeof(H=P.then)=="function"?H:!1},A=function(P,H){if(P._n)return;P._n=!0;var $=P._c;l(function(){for(var re=P._v,te=P._s==1,ge=0,ve=function(de){var De=te?de.ok:de.fail,Te=de.resolve,he=de.reject,ue=de.domain,ie,Se,ne;try{De?(te||(P._h==2&&W(P),P._h=1),De===!0?ie=re:(ue&&ue.enter(),ie=De(re),ue&&(ue.exit(),ne=!0)),ie===de.promise?he(a("Promise-chain cycle")):(Se=L(ie))?Se.call(ie,Te,he):Te(ie)):he(re)}catch(ce){ue&&!ne&&ue.exit(),he(ce)}};$.length>ge;)ve($[ge++]);P._c=[],P._n=!1,H&&!P._h&&V(P)})},V=function(P){t.call(v,function(){var H=P._v,$=z(P),re,te,ge;if($&&(re=i(function(){h?u.emit("unhandledRejection",H,P):(te=v.onunhandledrejection)?te({promise:P,reason:H}):(ge=v.console)&&ge.error&&ge.error("Unhandled promise rejection",H)}),P._h=h||z(P)?2:1),P._a=void 0,$&&re.e)throw re.v})},z=function(P){return P._h!==1&&(P._a||P._c).length===0},W=function(P){t.call(v,function(){var H;h?u.emit("rejectionHandled",P):(H=v.onrejectionhandled)&&H({promise:P,reason:P._v})})},G=function(P){var H=this;if(H._d)return;H._d=!0,H=H._w||H,H._v=P,H._s=2,H._a||(H._a=H._c.slice()),A(H,!0)},U=function(P){var H=this,$;if(H._d)return;H._d=!0,H=H._w||H;try{if(H===P)throw a("Promise can't be resolved itself");($=L(P))?l(function(){var re={_w:H,_d:!1};try{$.call(P,C(U,re,1),C(G,re,1))}catch(te){G.call(re,te)}}):(H._v=P,H._s=1,A(H,!1))}catch(re){G.call({_w:H,_d:!1},re)}};M||(_=function(H){b(this,_,c,"_h"),S(H),O.call(this);try{H(C(U,this,1),C(G,this,1))}catch($){G.call(this,$)}},O=function(H){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=F("./_redefine-all")(_.prototype,{then:function(H,$){var re=T(d(this,_));return re.ok=typeof H=="function"?H:!0,re.fail=typeof $=="function"&&$,re.domain=h?u.domain:void 0,this._c.push(re),this._a&&this._a.push(re),this._s&&A(this,!1),re.promise},catch:function(P){return this.then(void 0,P)}}),x=function(){var P=new O;this.promise=P,this.resolve=C(U,P,1),this.reject=C(G,P,1)},r.f=T=function(P){return P===_||P===E?new x(P):g(P)}),y(y.G+y.W+y.F*!M,{Promise:_}),F("./_set-to-string-tag")(_,c),F("./_set-species")(c),E=F("./_core")[c],y(y.S+y.F*!M,c,{reject:function(H){var $=T(this),re=$.reject;return re(H),$.promise}}),y(y.S+y.F*(N||!M),c,{resolve:function(H){return s(N&&this===E?_:this,H)}}),y(y.S+y.F*!(M&&F("./_iter-detect")(function(P){_.all(P).catch(R)})),c,{all:function(H){var $=this,re=T($),te=re.resolve,ge=re.reject,ve=i(function(){var de=[],De=0,Te=1;p(H,!1,function(he){var ue=De++,ie=!1;de.push(void 0),Te++,$.resolve(he).then(function(Se){if(ie)return;ie=!0,de[ue]=Se,--Te||te(de)},ge)}),--Te||te(de)});return ve.e&&ge(ve.v),re.promise},race:function(H){var $=this,re=T($),te=re.reject,ge=i(function(){p(H,!1,function(ve){$.resolve(ve).then(re.resolve,te)})});return ge.e&&te(ge.v),re.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(F,Q,j){var N=F("./_export"),v=F("./_to-absolute-index"),C=String.fromCharCode,k=String.fromCodePoint;N(N.S+N.F*(!!k&&k.length!=1),"String",{fromCodePoint:function(m){for(var S=[],b=arguments.length,p=0,d;b>p;){if(d=+arguments[p++],v(d,1114111)!==d)throw RangeError(d+" is not a valid code point");S.push(d<65536?C(d):C(((d-=65536)>>10)+55296,d%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(F,Q,j){"use strict";var N=F("./_string-at")(!0);F("./_iter-define")(String,"String",function(v){this._t=String(v),this._i=0},function(){var v=this._t,C=this._i,k;return C>=v.length?{value:void 0,done:!0}:(k=N(v,C),this._i+=k.length,{value:k,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(F,Q,j){"use strict";var N=F("./_global"),v=F("./_has"),C=F("./_descriptors"),k=F("./_export"),y=F("./_redefine"),m=F("./_meta").KEY,S=F("./_fails"),b=F("./_shared"),p=F("./_set-to-string-tag"),d=F("./_uid"),t=F("./_wks"),l=F("./_wks-ext"),r=F("./_wks-define"),i=F("./_enum-keys"),o=F("./_is-array"),s=F("./_an-object"),c=F("./_is-object"),a=F("./_to-object"),u=F("./_to-iobject"),f=F("./_to-primitive"),w=F("./_property-desc"),_=F("./_object-create"),h=F("./_object-gopn-ext"),R=F("./_object-gopd"),O=F("./_object-gops"),g=F("./_object-dp"),x=F("./_object-keys"),E=R.f,T=g.f,M=h.f,L=N.Symbol,A=N.JSON,V=A&&A.stringify,z="prototype",W=t("_hidden"),G=t("toPrimitive"),U={}.propertyIsEnumerable,P=b("symbol-registry"),H=b("symbols"),$=b("op-symbols"),re=Object[z],te=typeof L=="function"&&!!O.f,ge=N.QObject,ve=!ge||!ge[z]||!ge[z].findChild,de=C&&S(function(){return _(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(be,Re,Qe){var rt=E(re,Re);rt&&delete re[Re],T(be,Re,Qe),rt&&be!==re&&T(re,Re,rt)}:T,De=function(be){var Re=H[be]=_(L[z]);return Re._k=be,Re},Te=te&&typeof L.iterator=="symbol"?function(be){return typeof be=="symbol"}:function(be){return be instanceof L},he=function(Re,Qe,rt){return Re===re&&he($,Qe,rt),s(Re),Qe=f(Qe,!0),s(rt),v(H,Qe)?(rt.enumerable?(v(Re,W)&&Re[W][Qe]&&(Re[W][Qe]=!1),rt=_(rt,{enumerable:w(0,!1)})):(v(Re,W)||T(Re,W,w(1,{})),Re[W][Qe]=!0),de(Re,Qe,rt)):T(Re,Qe,rt)},ue=function(Re,Qe){s(Re);for(var rt=i(Qe=u(Qe)),at=0,qe=rt.length,st;qe>at;)he(Re,st=rt[at++],Qe[st]);return Re},ie=function(Re,Qe){return Qe===void 0?_(Re):ue(_(Re),Qe)},Se=function(Re){var Qe=U.call(this,Re=f(Re,!0));return this===re&&v(H,Re)&&!v($,Re)?!1:Qe||!v(this,Re)||!v(H,Re)||v(this,W)&&this[W][Re]?Qe:!0},ne=function(Re,Qe){if(Re=u(Re),Qe=f(Qe,!0),Re===re&&v(H,Qe)&&!v($,Qe))return;var rt=E(Re,Qe);return rt&&v(H,Qe)&&!(v(Re,W)&&Re[W][Qe])&&(rt.enumerable=!0),rt},ce=function(Re){for(var Qe=M(u(Re)),rt=[],at=0,qe;Qe.length>at;)!v(H,qe=Qe[at++])&&qe!=W&&qe!=m&&rt.push(qe);return rt},Oe=function(Re){for(var Qe=Re===re,rt=M(Qe?$:u(Re)),at=[],qe=0,st;rt.length>qe;)v(H,st=rt[qe++])&&(Qe?v(re,st):!0)&&at.push(H[st]);return at};te||(L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var Re=d(arguments.length>0?arguments[0]:void 0),Qe=function(rt){this===re&&Qe.call($,rt),v(this,W)&&v(this[W],Re)&&(this[W][Re]=!1),de(this,Re,w(1,rt))};return C&&ve&&de(re,Re,{configurable:!0,set:Qe}),De(Re)},y(L[z],"toString",function(){return this._k}),R.f=ne,g.f=he,F("./_object-gopn").f=h.f=ce,F("./_object-pie").f=Se,O.f=Oe,C&&!F("./_library")&&y(re,"propertyIsEnumerable",Se,!0),l.f=function(be){return De(t(be))}),k(k.G+k.W+k.F*!te,{Symbol:L});for(var oe="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),q=0;oe.length>q;)t(oe[q++]);for(var Y=x(t.store),Z=0;Y.length>Z;)r(Y[Z++]);k(k.S+k.F*!te,"Symbol",{for:function(be){return v(P,be+="")?P[be]:P[be]=L(be)},keyFor:function(Re){if(!Te(Re))throw TypeError(Re+" is not a symbol!");for(var Qe in P)if(P[Qe]===Re)return Qe},useSetter:function(){ve=!0},useSimple:function(){ve=!1}}),k(k.S+k.F*!te,"Object",{create:ie,defineProperty:he,defineProperties:ue,getOwnPropertyDescriptor:ne,getOwnPropertyNames:ce,getOwnPropertySymbols:Oe});var ye=S(function(){O.f(1)});k(k.S+k.F*ye,"Object",{getOwnPropertySymbols:function(Re){return O.f(a(Re))}}),A&&k(k.S+k.F*(!te||S(function(){var be=L();return V([be])!="[null]"||V({a:be})!="{}"||V(Object(be))!="{}"})),"JSON",{stringify:function(Re){for(var Qe=[Re],rt=1,at,qe;arguments.length>rt;)Qe.push(arguments[rt++]);return qe=at=Qe[1],!c(at)&&Re===void 0||Te(Re)?void 0:(o(at)||(at=function(st,lt){if(typeof qe=="function"&&(lt=qe.call(this,st,lt)),!Te(lt))return lt}),Qe[1]=at,V.apply(A,Qe))}}),L[z][G]||F("./_hide")(L[z],G,L[z].valueOf),p(L,"Symbol"),p(Math,"Math",!0),p(N.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(F,Q,j){var N=F("./_export"),v=F("./_object-to-array")(!0);N(N.S,"Object",{entries:function(k){return v(k)}})},{"./_export":107,"./_object-to-array":143}],183:[function(F,Q,j){"use strict";var N=F("./_export"),v=F("./_core"),C=F("./_global"),k=F("./_species-constructor"),y=F("./_promise-resolve");N(N.P+N.R,"Promise",{finally:function(m){var S=k(this,v.Promise||C.Promise),b=typeof m=="function";return this.then(b?function(p){return y(S,m()).then(function(){return p})}:m,b?function(p){return y(S,m()).then(function(){throw p})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(F,Q,j){"use strict";var N=F("./_export"),v=F("./_new-promise-capability"),C=F("./_perform");N(N.S,"Promise",{try:function(k){var y=v.f(this),m=C(k);return(m.e?y.reject:y.resolve)(m.v),y.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(F,Q,j){F("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(F,Q,j){F("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(F,Q,j){F("./es6.array.iterator");for(var N=F("./_global"),v=F("./_hide"),C=F("./_iterators"),k=F("./_wks")("toStringTag"),y="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(","),m=0;m0?"-":"+")+m(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][u%10>3?0:(u%100-u%10!=10)*u%10],W:E,N:T};return i.replace(d,function(L){return L in M?M[L]:L.slice(1,L.length-1)})}}();y.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"},y.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 m(d,t){for(d=String(d),t=t||2;d.length]/;Q.exports=v;function v(C){var k=""+C,y=N.exec(k);if(!y)return k;var m,S="",b=0,p=0;for(b=y.index;b0&&this._events[m].length>b&&(this._events[m].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[m].length),typeof console.trace=="function"&&console.trace())),this},N.prototype.on=N.prototype.addListener,N.prototype.once=function(m,S){if(!v(S))throw TypeError("listener must be a function");var b=!1;function p(){this.removeListener(m,p),b||(b=!0,S.apply(this,arguments))}return p.listener=S,this.on(m,p),this},N.prototype.removeListener=function(m,S){var b,p,d,t;if(!v(S))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(b=this._events[m],d=b.length,p=-1,b===S||v(b.listener)&&b.listener===S)delete this._events[m],this._events.removeListener&&this.emit("removeListener",m,S);else if(k(b)){for(t=d;t-- >0;)if(b[t]===S||b[t].listener&&b[t].listener===S){p=t;break}if(p<0)return this;b.length===1?(b.length=0,delete this._events[m]):b.splice(p,1),this._events.removeListener&&this.emit("removeListener",m,S)}return this},N.prototype.removeAllListeners=function(m){var S,b;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[m]&&delete this._events[m],this;if(arguments.length===0){for(S in this._events){if(S==="removeListener")continue;this.removeAllListeners(S)}return this.removeAllListeners("removeListener"),this._events={},this}if(b=this._events[m],v(b))this.removeListener(m,b);else if(b)for(;b.length;)this.removeListener(m,b[b.length-1]);return delete this._events[m],this},N.prototype.listeners=function(m){var S;return!this._events||!this._events[m]?S=[]:v(this._events[m])?S=[this._events[m]]:S=this._events[m].slice(),S},N.prototype.listenerCount=function(m){if(this._events){var S=this._events[m];if(v(S))return 1;if(S)return S.length}return 0},N.listenerCount=function(m,S){return m.listenerCount(S)};function v(m){return typeof m=="function"}function C(m){return typeof m=="number"}function k(m){return typeof m=="object"&&m!==null}function y(m){return m===void 0}},{}],193:[function(F,Q,j){var N=F("http"),v=Q.exports;for(var C in N)N.hasOwnProperty(C)&&(v[C]=N[C]);v.request=function(k,y){return k||(k={}),k.scheme="https",k.protocol="https:",N.request.call(this,k,y)}},{http:231}],194:[function(F,Q,j){/*! * humanize-ms - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var N=F("util"),v=F("ms");Q.exports=function(C){if(typeof C=="number")return C;var k=v(C);if(k===void 0){var y=new Error(N.format("humanize-ms(%j) result undefined",C));console.warn(y.stack)}return k}},{ms:204,util:243}],195:[function(F,Q,j){j.read=function(N,v,C,k,y){var m,S,b=y*8-k-1,p=(1<>1,t=-7,l=C?y-1:0,r=C?-1:1,i=N[v+l];for(l+=r,m=i&(1<<-t)-1,i>>=-t,t+=b;t>0;m=m*256+N[v+l],l+=r,t-=8);for(S=m&(1<<-t)-1,m>>=-t,t+=k;t>0;S=S*256+N[v+l],l+=r,t-=8);if(m===0)m=1-d;else{if(m===p)return S?NaN:(i?-1:1)*Infinity;S=S+Math.pow(2,k),m=m-d}return(i?-1:1)*S*Math.pow(2,m-k)},j.write=function(N,v,C,k,y,m){var S,b,p,d=m*8-y-1,t=(1<>1,r=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=k?0:m-1,o=k?1:-1,s=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===Infinity?(b=isNaN(v)?1:0,S=t):(S=Math.floor(Math.log(v)/Math.LN2),v*(p=Math.pow(2,-S))<1&&(S--,p*=2),S+l>=1?v+=r/p:v+=r*Math.pow(2,1-l),v*p>=2&&(S++,p/=2),S+l>=t?(b=0,S=t):S+l>=1?(b=(v*p-1)*Math.pow(2,y),S=S+l):(b=v*Math.pow(2,l-1)*Math.pow(2,y),S=0));y>=8;N[C+i]=b&255,i+=o,b/=256,y-=8);for(S=S<0;N[C+i]=S&255,i+=o,S/=256,d-=8);N[C+i-o]|=s*128}},{}],196:[function(F,Q,j){typeof Object.create=="function"?Q.exports=function(v,C){C&&(v.super_=C,v.prototype=Object.create(C.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:Q.exports=function(v,C){if(C){v.super_=C;var k=function(){};k.prototype=C.prototype,v.prototype=new k,v.prototype.constructor=v}}},{}],197:[function(F,Q,j){/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */Q.exports=function(C){return C!=null&&(N(C)||v(C)||!!C._isBuffer)};function N(C){return!!C.constructor&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}function v(C){return typeof C.readFloatLE=="function"&&typeof C.slice=="function"&&N(C.slice(0,0))}},{}],198:[function(F,Q,j){var N={}.toString;Q.exports=Array.isArray||function(v){return N.call(v)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(F,Q){typeof exports=="object"&&typeof module!="undefined"?module.exports=Q(F):typeof define=="function"&&define.amd?define(Q):Q(F)})(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(F){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(F){for(var Q={},j=0,N=F.length;j>>6)+fromCharCode(128|Q&63):fromCharCode(224|Q>>>12&15)+fromCharCode(128|Q>>>6&63)+fromCharCode(128|Q&63)}else{var Q=65536+(F.charCodeAt(0)-55296)*1024+(F.charCodeAt(1)-56320);return fromCharCode(240|Q>>>18&7)+fromCharCode(128|Q>>>12&63)+fromCharCode(128|Q>>>6&63)+fromCharCode(128|Q&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(F){return F.replace(re_utob,cb_utob)},cb_encode=function(F){var Q=[0,2,1][F.length%3],j=F.charCodeAt(0)<<16|(F.length>1?F.charCodeAt(1):0)<<8|(F.length>2?F.charCodeAt(2):0),N=[b64chars.charAt(j>>>18),b64chars.charAt(j>>>12&63),Q>=2?"=":b64chars.charAt(j>>>6&63),Q>=1?"=":b64chars.charAt(j&63)];return N.join("")},btoa=global.btoa?function(F){return global.btoa(F)}:function(F){return F.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(F){var Q=Object.prototype.toString.call(F)==="[object Uint8Array]";return Q?F.toString("base64"):btoa(utob(String(F)))},encode=function(F,Q){return Q?_encode(String(F)).replace(/[+\/]/g,function(j){return j=="+"?"-":"_"}).replace(/=/g,""):_encode(F)},encodeURI=function(F){return encode(F,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(F){switch(F.length){case 4:var Q=(7&F.charCodeAt(0))<<18|(63&F.charCodeAt(1))<<12|(63&F.charCodeAt(2))<<6|63&F.charCodeAt(3),j=Q-65536;return fromCharCode((j>>>10)+55296)+fromCharCode((j&1023)+56320);case 3:return fromCharCode((15&F.charCodeAt(0))<<12|(63&F.charCodeAt(1))<<6|63&F.charCodeAt(2));default:return fromCharCode((31&F.charCodeAt(0))<<6|63&F.charCodeAt(1))}},btou=function(F){return F.replace(re_btou,cb_btou)},cb_decode=function(F){var Q=F.length,j=Q%4,N=(Q>0?b64tab[F.charAt(0)]<<18:0)|(Q>1?b64tab[F.charAt(1)]<<12:0)|(Q>2?b64tab[F.charAt(2)]<<6:0)|(Q>3?b64tab[F.charAt(3)]:0),v=[fromCharCode(N>>>16),fromCharCode(N>>>8&255),fromCharCode(N&255)];return v.length-=[0,0,2,1][j],v.join("")},_atob=global.atob?function(F){return global.atob(F)}:function(F){return F.replace(/\S{1,4}/g,cb_decode)},atob=function(F){return _atob(String(F).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(F){return(F.constructor===buffer.constructor?F:buffer.from(F,"base64")).toString()}:function(F){return(F.constructor===buffer.constructor?F:new buffer(F,"base64")).toString()}:function(F){return btou(_atob(F))},decode=function(F){return _decode(String(F).replace(/[-_]/g,function(Q){return Q=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var F=global.Base64;return global.Base64=_Base64,F};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(F){return{value:F,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(F){return encode(this,F)})),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(F,Q,j){/*! * merge-descriptors * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */"use strict";Q.exports=v;var N=Object.prototype.hasOwnProperty;function v(C,k,y){if(!C)throw new TypeError("argument dest is required");if(!k)throw new TypeError("argument src is required");return y===void 0&&(y=!0),Object.getOwnPropertyNames(k).forEach(function(S){if(!y&&N.call(C,S))return;var b=Object.getOwnPropertyDescriptor(k,S);Object.defineProperty(C,S,b)}),C}},{}],201:[function(F,Q,j){"use strict";function N(){this._types=Object.create(null),this._extensions=Object.create(null);for(var v=0;v0)return S(t);if(r==="number"&&isFinite(t))return l.long?p(t):b(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function S(t){if(t=String(t),t.length>100)return;var l=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!l)return;var r=parseFloat(l[1]),i=(l[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*m;case"weeks":case"week":case"w":return r*y;case"days":case"day":case"d":return r*k;case"hours":case"hour":case"hrs":case"hr":case"h":return r*C;case"minutes":case"minute":case"mins":case"min":case"m":return r*v;case"seconds":case"second":case"secs":case"sec":case"s":return r*N;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function b(t){var l=Math.abs(t);return l>=k?Math.round(t/k)+"d":l>=C?Math.round(t/C)+"h":l>=v?Math.round(t/v)+"m":l>=N?Math.round(t/N)+"s":t+"ms"}function p(t){var l=Math.abs(t);return l>=k?d(t,l,k,"day"):l>=C?d(t,l,C,"hour"):l>=v?d(t,l,v,"minute"):l>=N?d(t,l,N,"second"):t+" ms"}function d(t,l,r,i){var o=l>=r*1.5;return Math.round(t/r)+" "+i+(o?"s":"")}},{}],205:[function(F,Q,j){(function(N){function v(m,S){for(var b=0,p=m.length-1;p>=0;p--){var d=m[p];d==="."?m.splice(p,1):d===".."?(m.splice(p,1),b++):b&&(m.splice(p,1),b--)}if(S)for(;b--;b)m.unshift("..");return m}j.resolve=function(){for(var m="",S=!1,b=arguments.length-1;b>=-1&&!S;b--){var p=b>=0?arguments[b]:N.cwd();if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;m=p+"/"+m,S=p.charAt(0)==="/"}return m=v(k(m.split("/"),function(d){return!!d}),!S).join("/"),(S?"/":"")+m||"."},j.normalize=function(m){var S=j.isAbsolute(m),b=y(m,-1)==="/";return m=v(k(m.split("/"),function(p){return!!p}),!S).join("/"),!m&&!S&&(m="."),m&&b&&(m+="/"),(S?"/":"")+m},j.isAbsolute=function(m){return m.charAt(0)==="/"},j.join=function(){var m=Array.prototype.slice.call(arguments,0);return j.normalize(k(m,function(S,b){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},j.relative=function(m,S){m=j.resolve(m).substr(1),S=j.resolve(S).substr(1);function b(o){for(var s=0;s=0&&!(o[c]!=="");c--);return s>c?[]:o.slice(s,c-s+1)}for(var p=b(m.split("/")),d=b(S.split("/")),t=Math.min(p.length,d.length),l=t,r=0;r=1;--t)if(S=m.charCodeAt(t),S===47){if(!d){p=t;break}}else d=!1;return p===-1?b?"/":".":b&&p===1?"/":m.slice(0,p)};function C(m){typeof m!="string"&&(m=m+"");var S=0,b=-1,p=!0,d;for(d=m.length-1;d>=0;--d)if(m.charCodeAt(d)===47){if(!p){S=d+1;break}}else b===-1&&(p=!1,b=d+1);return b===-1?"":m.slice(S,b)}j.basename=function(m,S){var b=C(m);return S&&b.substr(-1*S.length)===S&&(b=b.substr(0,b.length-S.length)),b},j.extname=function(m){typeof m!="string"&&(m=m+"");for(var S=-1,b=0,p=-1,d=!0,t=0,l=m.length-1;l>=0;--l){var r=m.charCodeAt(l);if(r===47){if(!d){b=l+1;break}continue}p===-1&&(d=!1,p=l+1),r===46?S===-1?S=l:t!==1&&(t=1):S!==-1&&(t=-1)}return S===-1||p===-1||t===0||t===1&&S===p-1&&S===b+1?"":m.slice(S,p)};function k(m,S){if(m.filter)return m.filter(S);for(var b=[],p=0;p * Copyright 2014-2018 Benjamin Tan * Copyright 2011-2013 John-David Dalton * Available under MIT license */(function(){"use strict";var v={function:!0,object:!0},C=v[typeof window]&&window||this,k=C,y=v[typeof j]&&j,m=v[typeof Q]&&Q&&!Q.nodeType&&Q,S=y&&m&&typeof N=="object"&&N;S&&(S.global===S||S.window===S||S.self===S)&&(C=S);var b=Math.pow(2,53)-1,p=/\bOpera/,d=this,t=Object.prototype,l=t.hasOwnProperty,r=t.toString;function i(g){return g=String(g),g.charAt(0).toUpperCase()+g.slice(1)}function o(g,x,E){var T={"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(g)&&!/^Windows Phone /i.test(g)&&(T=T[/[\d.]+$/.exec(g)])&&(g="Windows "+T),g=String(g),x&&E&&(g=g.replace(RegExp(x,"i"),E)),g=c(g.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]),g}function s(g,x){var E=-1,T=g?g.length:0;if(typeof T=="number"&&T>-1&&T<=b)for(;++E3&&"WebKit"||/\bOpera\b/.test(ce)&&(/\bOPR\b/.test(g)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(g)&&!/^(?:Trident|EdgeHTML)$/.test(ne)&&"WebKit"||!ne&&/\bMSIE\b/i.test(g)&&(q=="Mac OS"?"Tasman":"Trident")||ne=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ce)&&"NetFront")&&(ne=[de]),ce=="IE"&&(de=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(g)||0)[1])?(ce+=" Mobile",q="Windows Phone "+(/\+$/.test(de)?de:de+".x"),Te.unshift("desktop mode")):/\bWPDesktop\b/i.test(g)?(ce="IE Mobile",q="Windows Phone 8.x",Te.unshift("desktop mode"),ie||(ie=(/\brv:([\d.]+)/.exec(g)||0)[1])):ce!="IE"&&ne=="Trident"&&(de=/\brv:([\d.]+)/.exec(g))&&(ce&&Te.push("identifying as "+ce+(ie?" "+ie:"")),ce="IE",ie=de[1]),ue){if(f(x,"global"))if(P&&(de=P.lang.System,De=de.getProperty("os.arch"),q=q||de.getProperty("os.name")+" "+de.getProperty("os.version")),H){try{ie=x.require("ringo/engine").version.join("."),ce="RingoJS"}catch(qe){(de=x.system)&&de.global.system==x.system&&(ce="Narwhal",q||(q=de[0].os||null))}ce||(ce="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(de=x.process)&&(typeof de.versions=="object"&&(typeof de.versions.electron=="string"?(Te.push("Node "+de.versions.node),ce="Electron",ie=de.versions.electron):typeof de.versions.nw=="string"&&(Te.push("Chromium "+ie,"Node "+de.versions.node),ce="NW.js",ie=de.versions.nw)),ce||(ce="Node.js",De=de.arch,q=de.platform,ie=/[\d.]+/.exec(de.version),ie=ie?ie[0]:null));else u(de=x.runtime)==z?(ce="Adobe AIR",q=de.flash.system.Capabilities.os):u(de=x.phantom)==U?(ce="PhantomJS",ie=(de=de.version||null)&&de.major+"."+de.minor+"."+de.patch):typeof te.documentMode=="number"&&(de=/\bTrident\/(\d+)/i.exec(g))?(ie=[ie,te.documentMode],(de=+de[1]+4)!=ie[1]&&(Te.push("IE "+ie[1]+" mode"),ne&&(ne[1]=""),ie[1]=de),ie=ce=="IE"?String(ie[1].toFixed(1)):ie[0]):typeof te.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ce)&&(Te.push("masking as "+ce+" "+ie),ce="IE",ie="11.0",ne=["Trident"],q="Windows");q=q&&c(q)}if(ie&&(de=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ie)||/(?:alpha|beta)(?: ?\d)?/i.exec(g+";"+(ue&&T.appMinorVersion))||/\bMinefield\b/i.test(g)&&"a")&&(he=/b/i.test(de)?"beta":"alpha",ie=ie.replace(RegExp(de+"\\+?$"),"")+(he=="beta"?re:$)+(/\d+\+?/.exec(de)||"")),ce=="Fennec"||ce=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(q))ce="Firefox Mobile";else if(ce=="Maxthon"&&ie)ie=ie.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Oe))Oe=="Xbox 360"&&(q=null),Oe=="Xbox 360"&&/\bIEMobile\b/.test(g)&&Te.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ce)||ce&&!Oe&&!/Browser|Mobi/.test(ce))&&(q=="Windows CE"||/Mobi/i.test(g)))ce+=" Mobile";else if(ce=="IE"&&ue)try{x.external===null&&Te.unshift("platform preview")}catch(qe){Te.unshift("embedded")}else(/\bBlackBerry\b/.test(Oe)||/\bBB10\b/.test(g))&&(de=(RegExp(Oe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(g)||0)[1]||ie)?(de=[de,/BB10/.test(g)],q=(de[1]?(Oe=null,oe="BlackBerry"):"Device Software")+" "+de[0],ie=null):this!=a&&Oe!="Wii"&&(ue&&ge||/Opera/.test(ce)&&/\b(?:MSIE|Firefox)\b/i.test(g)||ce=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(q)||ce=="IE"&&(q&&!/^Win/.test(q)&&ie>5.5||/\bWindows XP\b/.test(q)&&ie>8||ie==8&&!/\bTrident\b/.test(g)))&&!p.test(de=R.call(a,g.replace(p,"")+";"))&&de.name&&(de="ing as "+de.name+((de=de.version)?" "+de:""),p.test(ce)?(/\bIE\b/.test(de)&&q=="Mac OS"&&(q=null),de="identify"+de):(de="mask"+de,ve?ce=c(ve.replace(/([a-z])([A-Z])/g,"$1 $2")):ce="Opera",/\bIE\b/.test(de)&&(q=null),ue||(ie=null)),ne=["Presto"],Te.push(de));(de=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(g)||0)[1])&&(de=[parseFloat(de.replace(/\.(\d)$/,".0$1")),de],ce=="Safari"&&de[1].slice(-1)=="+"?(ce="WebKit Nightly",he="alpha",ie=de[1].slice(0,-1)):(ie==de[1]||ie==(de[2]=(/\bSafari\/([\d.]+\+?)/i.exec(g)||0)[1]))&&(ie=null),de[1]=(/\bChrome\/([\d.]+)/i.exec(g)||0)[1],de[0]==537.36&&de[2]==537.36&&parseFloat(de[1])>=28&&ne=="WebKit"&&(ne=["Blink"]),!ue||!A&&!de[1]?(ne&&(ne[1]="like Safari"),de=(de=de[0],de<400?1:de<500?2:de<526?3:de<533?4:de<534?"4+":de<535?5:de<537?6:de<538?7:de<601?8:"8")):(ne&&(ne[1]="like Chrome"),de=de[1]||(de=de[0],de<530?1:de<532?2:de<532.05?3:de<533?4:de<534.03?5:de<534.07?6:de<534.1?7:de<534.13?8:de<534.16?9:de<534.24?10:de<534.3?11:de<535.01?12:de<535.02?"13+":de<535.07?15:de<535.11?16:de<535.19?17:de<536.05?18:de<536.1?19:de<537.01?20:de<537.11?"21+":de<537.13?23:de<537.18?24:de<537.24?25:de<537.36?26:ne!="Blink"?"27":"28")),ne&&(ne[1]+=" "+(de+=typeof de=="number"?".x":/[.+]/.test(de)?"":"+")),ce=="Safari"&&(!ie||parseInt(ie)>45)&&(ie=de)),ce=="Opera"&&(de=/\bzbov|zvav$/.exec(q))?(ce+=" ",Te.unshift("desktop mode"),de=="zvav"?(ce+="Mini",ie=null):ce+="Mobile",q=q.replace(RegExp(" *"+de+"$"),"")):ce=="Safari"&&/\bChrome\b/.exec(ne&&ne[1])&&(Te.unshift("desktop mode"),ce="Chrome Mobile",ie=null,/\bOS X\b/.test(q)?(oe="Apple",q="iOS 4.3+"):q=null),ie&&ie.indexOf(de=/[\d.]+$/.exec(q))==0&&g.indexOf("/"+de+"-")>-1&&(q=h(q.replace(de,""))),ne&&!/\b(?:Avant|Nook)\b/.test(ce)&&(/Browser|Lunascape|Maxthon/.test(ce)||ce!="Safari"&&/^iOS/.test(q)&&/\bSafari\b/.test(ne[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ce)&&ne[1])&&((de=ne[ne.length-1])&&Te.push(de)),Te.length&&(Te=["("+Te.join("; ")+")"]),oe&&Oe&&Oe.indexOf(oe)<0&&Te.push("on "+oe),Oe&&Te.push((/^on /.test(Te[Te.length-1])?"":"on ")+Oe),q&&(de=/ ([\d.+]+)$/.exec(q),Se=de&&q.charAt(q.length-de[0].length-1)=="/",q={architecture:32,family:de&&!Se?q.replace(de[0],""):q,version:de?de[1]:null,toString:function(){var qe=this.version;return this.family+(qe&&!Se?" "+qe:"")+(this.architecture==64?" 64-bit":"")}}),(de=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(De))&&!/\bi686\b/i.test(De)?(q&&(q.architecture=64,q.family=q.family.replace(RegExp(" *"+de),"")),ce&&(/\bWOW64\b/i.test(g)||ue&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(g))&&Te.unshift("32-bit")):q&&/^OS X/.test(q.family)&&ce=="Chrome"&&parseFloat(ie)>=39&&(q.architecture=64),g||(g=null);var at={};return at.description=g,at.layout=ne&&ne[0],at.manufacturer=oe,at.name=ce,at.prerelease=he,at.product=Oe,at.ua=g,at.version=ce&&ie,at.os=q||{architecture:null,family:null,version:null,toString:function(){return"null"}},at.parse=R,at.toString=rt,at.version&&Te.unshift(ie),at.name&&Te.unshift(ce),q&&ce&&!(q==String(q).split(" ")[0]&&(q==ce.split(" ")[0]||Oe))&&Te.push(Oe?"("+q+")":"on "+q),Te.length&&(at.description=Te.join(" ")),at}var O=R();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(C.platform=O,define(function(){return O})):y&&m?a(O,function(g,x){y[x]=g}):C.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(F,Q,j){(function(N){"use strict";typeof N=="undefined"||!N.version||N.version.indexOf("v0.")===0||N.version.indexOf("v1.")===0&&N.version.indexOf("v1.8.")!==0?Q.exports={nextTick:v}:Q.exports=N;function v(C,k,y,m){if(typeof C!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,b,p;switch(S){case 0:case 1:return N.nextTick(C);case 2:return N.nextTick(function(){C.call(null,k)});case 3:return N.nextTick(function(){C.call(null,k,y)});case 4:return N.nextTick(function(){C.call(null,k,y,m)});default:for(b=new Array(S-1),p=0;p1)for(var a=1;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=b-p,w=Math.floor,_=String.fromCharCode,h;function R(G){throw new RangeError(u[G])}function O(G,U){for(var P=G.length,H=[];P--;)H[P]=U(G[P]);return H}function g(G,U){var P=G.split("@"),H="";P.length>1&&(H=P[0]+"@",G=P[1]),G=G.replace(a,".");var $=G.split("."),re=O($,U).join(".");return H+re}function x(G){for(var U=[],P=0,H=G.length,$,re;P=55296&&$<=56319&&P65535&&(U-=65536,P+=_(U>>>10&1023|55296),U=56320|U&1023),P+=_(U),P}).join("")}function T(G){return G-48<10?G-22:G-65<26?G-65:G-97<26?G-97:b}function M(G,U){return G+22+75*(G<26)-((U!=0)<<5)}function L(G,U,P){var H=0;for(G=P?w(G/l):G>>1,G+=w(G/U);G>f*d>>1;H+=b)G=w(G/f);return w(H+(f+1)*G/(G+t))}function A(G){var U=[],P=G.length,H,$=0,re=i,te=r,ge,ve,de,De,Te,he,ue,ie,Se;for(ge=G.lastIndexOf(o),ge<0&&(ge=0),ve=0;ve=128&&R("not-basic"),U.push(G.charCodeAt(ve));for(de=ge>0?ge+1:0;de=P&&R("invalid-input"),ue=T(G.charCodeAt(de++)),(ue>=b||ue>w((S-$)/Te))&&R("overflow"),$+=ue*Te,ie=he<=te?p:he>=te+d?d:he-te,uew(S/Se)&&R("overflow"),Te*=Se;H=U.length+1,te=L($-De,H,De==0),w($/H)>S-re&&R("overflow"),re+=w($/H),$%=H,U.splice($++,0,re)}return E(U)}function V(G){var U,P,H,$,re,te,ge,ve,de,De,Te,he=[],ue,ie,Se,ne;for(G=x(G),ue=G.length,U=i,P=0,re=r,te=0;te=U&&Tew((S-P)/ie)&&R("overflow"),P+=(ge-U)*ie,U=ge,te=0;teS&&R("overflow"),Te==U){for(ve=P,de=b;!(De=de<=re?p:de>=re+d?d:de-re,ve0&&d>p&&(d=p);for(var t=0;t=0?(i=l.substr(0,r),o=l.substr(r+1)):(i=l,o=""),s=decodeURIComponent(i),c=decodeURIComponent(o),N(S,s)?v(S[s])?S[s].push(c):S[s]=[S[s],c]:S[s]=c}return S};var v=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"}},{}],211:[function(F,Q,j){"use strict";var N=function(y){switch(typeof y){case"string":return y;case"boolean":return y?"true":"false";case"number":return isFinite(y)?y:"";default:return""}};Q.exports=function(y,m,S,b){return m=m||"&",S=S||"=",y===null&&(y=void 0),typeof y=="object"?C(k(y),function(p){var d=encodeURIComponent(N(p))+S;return v(y[p])?C(y[p],function(t){return d+encodeURIComponent(N(t))}).join(m):d+encodeURIComponent(N(y[p]))}).join(m):b?encodeURIComponent(N(b))+S+encodeURIComponent(N(y)):""};var v=Array.isArray||function(y){return Object.prototype.toString.call(y)==="[object Array]"};function C(y,m){if(y.map)return y.map(m);for(var S=[],b=0;b0?(typeof ce!="string"&&!Y.objectMode&&(0,k.default)(ce)!==i.prototype&&(ce=s(ce)),oe?Y.endEmitted?ne.emit("error",new Error("stream.unshift() after end event")):T(ne,Y,ce,!0):Y.ended?ne.emit("error",new Error("stream.push() after EOF")):(Y.reading=!1,Y.decoder&&!Oe?(ce=Y.decoder.write(ce),Y.objectMode||ce.length!==0?T(ne,Y,ce,!1):P(ne,Y)):T(ne,Y,ce,!1))):oe||(Y.reading=!1)}return L(Y)}function T(ne,ce,Oe,oe){ce.flowing&&ce.length===0&&!ce.sync?(ne.emit("data",Oe),ne.read(0)):(ce.length+=ce.objectMode?1:Oe.length,oe?ce.buffer.unshift(Oe):ce.buffer.push(Oe),ce.needReadable&&G(ne)),P(ne,ce)}function M(ne,ce){var Oe;return!c(ce)&&typeof ce!="string"&&ce!==void 0&&!ne.objectMode&&(Oe=new TypeError("Invalid non-string/buffer chunk")),Oe}function L(ne){return!ne.ended&&(ne.needReadable||ne.length=A?ne=A:(ne--,ne|=ne>>>1,ne|=ne>>>2,ne|=ne>>>4,ne|=ne>>>8,ne|=ne>>>16,ne++),ne}function z(ne,ce){return ne<=0||ce.length===0&&ce.ended?0:ce.objectMode?1:ne!==ne?ce.flowing&&ce.length?ce.buffer.head.data.length:ce.length:(ne>ce.highWaterMark&&(ce.highWaterMark=V(ne)),ne<=ce.length?ne:ce.ended?ce.length:(ce.needReadable=!0,0))}x.prototype.read=function(ne){f("read",ne),ne=parseInt(ne,10);var ce=this._readableState,Oe=ne;if(ne!==0&&(ce.emittedReadable=!1),ne===0&&ce.needReadable&&(ce.length>=ce.highWaterMark||ce.ended))return f("read: emitReadable",ce.length,ce.ended),ce.length===0&&ce.ended?ue(this):G(this),null;if(ne=z(ne,ce),ne===0&&ce.ended)return ce.length===0&&ue(this),null;var oe=ce.needReadable;f("need readable",oe),(ce.length===0||ce.length-ne0?q=de(ne,ce):q=null,q===null?(ce.needReadable=!0,ne=0):ce.length-=ne,ce.length===0&&(ce.ended||(ce.needReadable=!0),Oe!==ne&&ce.ended&&ue(this)),q!==null&&this.emit("data",q),q};function W(ne,ce){if(ce.ended)return;if(ce.decoder){var Oe=ce.decoder.end();Oe&&Oe.length&&(ce.buffer.push(Oe),ce.length+=ce.objectMode?1:Oe.length)}ce.ended=!0,G(ne)}function G(ne){var ce=ne._readableState;ce.needReadable=!1,ce.emittedReadable||(f("emitReadable",ce.flowing),ce.emittedReadable=!0,ce.sync?b.nextTick(U,ne):U(ne))}function U(ne){f("emit readable"),ne.emit("readable"),ve(ne)}function P(ne,ce){ce.readingMore||(ce.readingMore=!0,b.nextTick(H,ne,ce))}function H(ne,ce){for(var Oe=ce.length;!ce.reading&&!ce.flowing&&!ce.ended&&ce.length1&&Se(oe.pipes,ne)!==-1)&&!Re&&(f("false write response, pause",Oe._readableState.awaitDrain),Oe._readableState.awaitDrain++,rt=!0),Oe.pause())}function qe(Ie){f("onerror",Ie),je(),ne.removeListener("error",qe),l(ne,"error")===0&&ne.emit("error",Ie)}O(ne,"error",qe);function st(){ne.removeListener("finish",lt),je()}ne.once("close",st);function lt(){f("onfinish"),ne.removeListener("close",st),je()}ne.once("finish",lt);function je(){f("unpipe"),Oe.unpipe(ne)}return ne.emit("pipe",Oe),oe.flowing||(f("pipe resume"),Oe.resume()),ne};function $(ne){return function(){var ce=ne._readableState;f("pipeOnDrain",ce.awaitDrain),ce.awaitDrain&&ce.awaitDrain--,ce.awaitDrain===0&&l(ne,"data")&&(ce.flowing=!0,ve(ne))}}x.prototype.unpipe=function(ne){var ce=this._readableState,Oe={hasUnpiped:!1};if(ce.pipesCount===0)return this;if(ce.pipesCount===1)return ne&&ne!==ce.pipes?this:(ne||(ne=ce.pipes),ce.pipes=null,ce.pipesCount=0,ce.flowing=!1,ne&&ne.emit("unpipe",this,Oe),this);if(!ne){var oe=ce.pipes,q=ce.pipesCount;ce.pipes=null,ce.pipesCount=0,ce.flowing=!1;for(var Y=0;Y=ce.length?(ce.decoder?Oe=ce.buffer.join(""):ce.buffer.length===1?Oe=ce.buffer.head.data:Oe=ce.buffer.concat(ce.length),ce.buffer.clear()):Oe=De(ne,ce.buffer,ce.decoder),Oe}function De(ne,ce,Oe){var oe;return neY.length?Y.length:ne;if(Z===Y.length?q+=Y:q+=Y.slice(0,ne),ne-=Z,ne===0){Z===Y.length?(++oe,Oe.next?ce.head=Oe.next:ce.head=ce.tail=null):(ce.head=Oe,Oe.data=Y.slice(Z));break}++oe}return ce.length-=oe,q}function he(ne,ce){var Oe=i.allocUnsafe(ne),oe=ce.head,q=1;for(oe.data.copy(Oe),ne-=oe.data.length;oe=oe.next;){var Y=oe.data,Z=ne>Y.length?Y.length:ne;if(Y.copy(Oe,Oe.length-ne,0,Z),ne-=Z,ne===0){Z===Y.length?(++q,oe.next?ce.head=oe.next:ce.head=ce.tail=null):(ce.head=oe,oe.data=Y.slice(Z));break}++q}return ce.length-=q,Oe}function ue(ne){var ce=ne._readableState;if(ce.length>0)throw new Error('"endReadable()" called on non-empty stream');ce.endEmitted||(ce.ended=!0,b.nextTick(ie,ce,ne))}function ie(ne,ce){!ne.endEmitted&&ne.length===0&&(ne.endEmitted=!0,ce.readable=!1,ce.emit("end"))}function Se(ne,ce){for(var Oe=0,oe=ne.length;Oe-1?l.default:i.nextTick,a;M.WritableState=E;var u=(0,d.default)(F("core-util-is"));u.inherits=F("inherits");var f={deprecate:F("util-deprecate")},w=F("./internal/streams/stream"),_=F("safe-buffer").Buffer,h=v.Uint8Array||function(){};function R(he){return _.from(he)}function O(he){return _.isBuffer(he)||he instanceof h}var g=F("./internal/streams/destroy");u.inherits(M,w);function x(){}function E(he,ue){a=a||F("./_stream_duplex"),he=he||{};var ie=ue instanceof a;this.objectMode=!!he.objectMode,ie&&(this.objectMode=this.objectMode||!!he.writableObjectMode);var Se=he.highWaterMark,ne=he.writableHighWaterMark,ce=this.objectMode?16:16*1024;Se||Se===0?this.highWaterMark=Se:ie&&(ne||ne===0)?this.highWaterMark=ne:this.highWaterMark=ce,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 Oe=he.decodeStrings===!1;this.decodeStrings=!Oe,this.defaultEncoding=he.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(oe){P(ue,oe)},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 s(this)}E.prototype.getBuffer=function(){for(var ue=this.bufferedRequest,ie=[];ue;)ie.push(ue),ue=ue.next;return ie},function(){try{Object.defineProperty(E.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(he){}}();var T;typeof b.default=="function"&&m.default&&typeof Function.prototype[m.default]=="function"?(T=Function.prototype[m.default],(0,k.default)(M,m.default,{value:function(ue){return T.call(this,ue)?!0:this!==M?!1:ue&&ue._writableState instanceof E}})):T=function(ue){return ue instanceof this};function M(he){if(a=a||F("./_stream_duplex"),!T.call(M,this)&&!(this instanceof a))return new M(he);this._writableState=new E(he,this),this.writable=!0,he&&(typeof he.write=="function"&&(this._write=he.write),typeof he.writev=="function"&&(this._writev=he.writev),typeof he.destroy=="function"&&(this._destroy=he.destroy),typeof he.final=="function"&&(this._final=he.final)),w.call(this)}M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function L(he,ue){var ie=new Error("write after end");he.emit("error",ie),i.nextTick(ue,ie)}function A(he,ue,ie,Se){var ne=!0,ce=!1;return ie===null?ce=new TypeError("May not write null values to stream"):typeof ie!="string"&&ie!==void 0&&!ue.objectMode&&(ce=new TypeError("Invalid non-string/buffer chunk")),ce&&(he.emit("error",ce),i.nextTick(Se,ce),ne=!1),ne}M.prototype.write=function(he,ue,ie){var Se=this._writableState,ne=!1,ce=!Se.objectMode&&O(he);return ce&&!_.isBuffer(he)&&(he=R(he)),typeof ue=="function"&&(ie=ue,ue=null),ce?ue="buffer":ue||(ue=Se.defaultEncoding),typeof ie!="function"&&(ie=x),Se.ended?L(this,ie):(ce||A(this,Se,he,ie))&&(Se.pendingcb++,ne=z(this,Se,ce,he,ue,ie)),ne},M.prototype.cork=function(){var he=this._writableState;he.corked++},M.prototype.uncork=function(){var he=this._writableState;he.corked&&(he.corked--,!he.writing&&!he.corked&&!he.finished&&!he.bufferProcessing&&he.bufferedRequest&&re(this,he))},M.prototype.setDefaultEncoding=function(ue){if(typeof ue=="string"&&(ue=ue.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ue+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ue);return this._writableState.defaultEncoding=ue,this};function V(he,ue,ie){return!he.objectMode&&he.decodeStrings!==!1&&typeof ue=="string"&&(ue=_.from(ue,ie)),ue}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(he,ue,ie,Se,ne,ce){if(!ie){var Oe=V(ue,Se,ne);Se!==Oe&&(ie=!0,ne="buffer",Se=Oe)}var oe=ue.objectMode?1:Se.length;ue.length+=oe;var q=ue.length0?this.tail.next=b:this.head=b,this.tail=b,++this.length},y.prototype.unshift=function(S){var b={data:S,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},y.prototype.shift=function(){if(this.length===0)return;var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S},y.prototype.clear=function(){this.head=this.tail=null,this.length=0},y.prototype.join=function(S){if(this.length===0)return"";for(var b=this.head,p=""+b.data;b=b.next;)p+=S+b.data;return p},y.prototype.concat=function(S){if(this.length===0)return v.alloc(0);if(this.length===1)return this.head.data;for(var b=v.allocUnsafe(S>>>0),p=this.head,d=0;p;)k(p.data,b,d),d+=p.data.length,p=p.next;return b},y}(),C&&C.inspect&&C.inspect.custom&&(Q.exports.prototype[C.inspect.custom]=function(){var y=C.inspect({length:this.length});return this.constructor.name+" "+y})},{"safe-buffer":228,util:71}],220:[function(F,Q,j){"use strict";var N=F("process-nextick-args");function v(y,m){var S=this,b=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return b||p?(m?m(y):y&&(!this._writableState||!this._writableState.errorEmitted)&&N.nextTick(k,this,y),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(y||null,function(d){!m&&d?(N.nextTick(k,S,d),S._writableState&&(S._writableState.errorEmitted=!0)):m&&m(d)}),this)}function C(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function k(y,m){y.emit("error",m)}Q.exports={destroy:v,undestroy:C}},{"process-nextick-args":207}],221:[function(F,Q,j){"use strict";Q.exports=F("events").EventEmitter},{events:192}],222:[function(F,Q,j){Q.exports=F("./readable").PassThrough},{"./readable":223}],223:[function(F,Q,j){j=Q.exports=F("./lib/_stream_readable.js"),j.Stream=j,j.Readable=j,j.Writable=F("./lib/_stream_writable.js"),j.Duplex=F("./lib/_stream_duplex.js"),j.Transform=F("./lib/_stream_transform.js"),j.PassThrough=F("./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(F,Q,j){Q.exports=F("./readable").Transform},{"./readable":223}],225:[function(F,Q,j){Q.exports=F("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(F,Q,j){var N=function(){return this}()||Function("return this")(),v=N.regeneratorRuntime&&Object.getOwnPropertyNames(N).indexOf("regeneratorRuntime")>=0,C=v&&N.regeneratorRuntime;if(N.regeneratorRuntime=void 0,Q.exports=F("./runtime"),v)N.regeneratorRuntime=C;else try{delete N.regeneratorRuntime}catch(k){N.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(F,Q,j){!function(N){"use strict";var v=Object.prototype,C=v.hasOwnProperty,k,y=typeof Symbol=="function"?Symbol:{},m=y.iterator||"@@iterator",S=y.asyncIterator||"@@asyncIterator",b=y.toStringTag||"@@toStringTag",p=typeof Q=="object",d=N.regeneratorRuntime;if(d){p&&(Q.exports=d);return}d=N.regeneratorRuntime=p?Q.exports:{};function t(z,W,G,U){var P=W&&W.prototype instanceof a?W:a,H=Object.create(P.prototype),$=new L(U||[]);return H._invoke=x(z,G,$),H}d.wrap=t;function l(z,W,G){try{return{type:"normal",arg:z.call(W,G)}}catch(U){return{type:"throw",arg:U}}}var r="suspendedStart",i="suspendedYield",o="executing",s="completed",c={};function a(){}function u(){}function f(){}var w={};w[m]=function(){return this};var _=Object.getPrototypeOf,h=_&&_(_(A([])));h&&h!==v&&C.call(h,m)&&(w=h);var R=f.prototype=a.prototype=Object.create(w);u.prototype=R.constructor=f,f.constructor=u,f[b]=u.displayName="GeneratorFunction";function O(z){["next","throw","return"].forEach(function(W){z[W]=function(G){return this._invoke(W,G)}})}d.isGeneratorFunction=function(z){var W=typeof z=="function"&&z.constructor;return W?W===u||(W.displayName||W.name)==="GeneratorFunction":!1},d.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,f):(z.__proto__=f,b in z||(z[b]="GeneratorFunction")),z.prototype=Object.create(R),z},d.awrap=function(z){return{__await:z}};function g(z){function W(P,H,$,re){var te=l(z[P],z,H);if(te.type==="throw")re(te.arg);else{var ge=te.arg,ve=ge.value;return ve&&typeof ve=="object"&&C.call(ve,"__await")?Promise.resolve(ve.__await).then(function(de){W("next",de,$,re)},function(de){W("throw",de,$,re)}):Promise.resolve(ve).then(function(de){ge.value=de,$(ge)},re)}}var G;function U(P,H){function $(){return new Promise(function(re,te){W(P,H,re,te)})}return G=G?G.then($,$):$()}this._invoke=U}O(g.prototype),g.prototype[S]=function(){return this},d.AsyncIterator=g,d.async=function(z,W,G,U){var P=new g(t(z,W,G,U));return d.isGeneratorFunction(W)?P:P.next().then(function(H){return H.done?H.value:P.next()})};function x(z,W,G){var U=r;return function(H,$){if(U===o)throw new Error("Generator is already running");if(U===s){if(H==="throw")throw $;return V()}for(G.method=H,G.arg=$;;){var re=G.delegate;if(re){var te=E(re,G);if(te){if(te===c)continue;return te}}if(G.method==="next")G.sent=G._sent=G.arg;else if(G.method==="throw"){if(U===r)throw U=s,G.arg;G.dispatchException(G.arg)}else G.method==="return"&&G.abrupt("return",G.arg);U=o;var ge=l(z,W,G);if(ge.type==="normal"){if(U=G.done?s:i,ge.arg===c)continue;return{value:ge.arg,done:G.done}}else ge.type==="throw"&&(U=s,G.method="throw",G.arg=ge.arg)}}}function E(z,W){var G=z.iterator[W.method];if(G===k){if(W.delegate=null,W.method==="throw"){if(z.iterator.return&&(W.method="return",W.arg=k,E(z,W),W.method==="throw"))return c;W.method="throw",W.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var U=l(G,z.iterator,W.arg);if(U.type==="throw")return W.method="throw",W.arg=U.arg,W.delegate=null,c;var P=U.arg;if(!P)return W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,c;if(P.done)W[z.resultName]=P.value,W.next=z.nextLoc,W.method!=="return"&&(W.method="next",W.arg=k);else return P;return W.delegate=null,c}O(R),R[b]="Generator",R[m]=function(){return this},R.toString=function(){return"[object Generator]"};function T(z){var W={tryLoc:z[0]};1 in z&&(W.catchLoc=z[1]),2 in z&&(W.finallyLoc=z[2],W.afterLoc=z[3]),this.tryEntries.push(W)}function M(z){var W=z.completion||{};W.type="normal",delete W.arg,z.completion=W}function L(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(T,this),this.reset(!0)}d.keys=function(z){var W=[];for(var G in z)W.push(G);return W.reverse(),function U(){for(;W.length;){var P=W.pop();if(P in z)return U.value=P,U.done=!1,U}return U.done=!0,U}};function A(z){if(z){var W=z[m];if(W)return W.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var G=-1,U=function P(){for(;++G=0;--U){var P=this.tryEntries[U],H=P.completion;if(P.tryLoc==="root")return G("end");if(P.tryLoc<=this.prev){var $=C.call(P,"catchLoc"),re=C.call(P,"finallyLoc");if($&&re){if(this.prev=0;--G){var U=this.tryEntries[G];if(U.tryLoc<=this.prev&&C.call(U,"finallyLoc")&&this.prev=0;--W){var G=this.tryEntries[W];if(G.finallyLoc===z)return this.complete(G.completion,G.afterLoc),M(G),c}},catch:function(z){for(var W=this.tryEntries.length-1;W>=0;--W){var G=this.tryEntries[W];if(G.tryLoc===z){var U=G.completion;if(U.type==="throw"){var P=U.arg;M(G)}return P}}throw new Error("illegal catch attempt")},delegateYield:function(z,W,G){return this.delegate={iterator:A(z),resultName:W,nextLoc:G},this.method==="next"&&(this.arg=k),c}}}(function(){return this}()||Function("return this")())},{}],228:[function(F,Q,j){var N=F("buffer"),v=N.Buffer;function C(y,m){for(var S in y)m[S]=y[S]}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?Q.exports=N:(C(N,j),j.Buffer=k);function k(y,m,S){return v(y,m,S)}C(v,k),k.from=function(y,m,S){if(typeof y=="number")throw new TypeError("Argument must not be a number");return v(y,m,S)},k.alloc=function(y,m,S){if(typeof y!="number")throw new TypeError("Argument must be a number");var b=v(y);return m!==void 0?typeof S=="string"?b.fill(m,S):b.fill(m):b.fill(0),b},k.allocUnsafe=function(y){if(typeof y!="number")throw new TypeError("Argument must be a number");return v(y)},k.allocUnsafeSlow=function(y){if(typeof y!="number")throw new TypeError("Argument must be a number");return N.SlowBuffer(y)}},{buffer:73}],229:[function(F,Q,j){(function(N){"use strict";var v=F("babel-runtime/core-js/string/from-code-point"),C=i(v),k=F("babel-runtime/core-js/json/stringify"),y=i(k),m=F("babel-runtime/helpers/typeof"),S=i(m),b=F("babel-runtime/core-js/object/define-property"),p=i(b),d=F("babel-runtime/core-js/object/keys"),t=i(d),l=F("babel-runtime/core-js/object/create"),r=i(l);function i(o){return o&&o.__esModule?o:{default:o}}(function(o){o.parser=function(Y,Z){return new c(Y,Z)},o.SAXParser=c,o.SAXStream=R,o.createStream=h,o.MAX_BUFFER_LENGTH=64*1024;var s=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];o.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function c(Y,Z){if(!(this instanceof c))return new c(Y,Z);var ye=this;u(ye),ye.q=ye.c="",ye.bufferCheckPosition=o.MAX_BUFFER_LENGTH,ye.opt=Z||{},ye.opt.lowercase=ye.opt.lowercase||ye.opt.lowercasetags,ye.looseCase=ye.opt.lowercase?"toLowerCase":"toUpperCase",ye.tags=[],ye.closed=ye.closedRoot=ye.sawRoot=!1,ye.tag=ye.error=null,ye.strict=!!Y,ye.noscript=!!(Y||ye.opt.noscript),ye.state=H.BEGIN,ye.strictEntities=ye.opt.strictEntities,ye.ENTITIES=ye.strictEntities?(0,r.default)(o.XML_ENTITIES):(0,r.default)(o.ENTITIES),ye.attribList=[],ye.opt.xmlns&&(ye.ns=(0,r.default)(T)),ye.trackPosition=ye.opt.position!==!1,ye.trackPosition&&(ye.position=ye.line=ye.column=0),re(ye,"onready")}r.default||(Object.create=function(Y){function Z(){}Z.prototype=Y;var ye=new Z;return ye}),t.default||(Object.keys=function(Y){var Z=[];for(var ye in Y)Y.hasOwnProperty(ye)&&Z.push(ye);return Z});function a(Y){for(var Z=Math.max(o.MAX_BUFFER_LENGTH,10),ye=0,be=0,Re=s.length;beZ)switch(s[be]){case"textNode":ge(Y);break;case"cdata":te(Y,"oncdata",Y.cdata),Y.cdata="";break;case"script":te(Y,"onscript",Y.script),Y.script="";break;default:de(Y,"Max buffer length exceeded: "+s[be])}ye=Math.max(ye,Qe)}var rt=o.MAX_BUFFER_LENGTH-ye;Y.bufferCheckPosition=rt+Y.position}function u(Y){for(var Z=0,ye=s.length;Z"||z(Y)}function U(Y,Z){return Y.test(Z)}function P(Y,Z){return!U(Y,Z)}var H=0;o.STATE={BEGIN:H++,BEGIN_WHITESPACE:H++,TEXT:H++,TEXT_ENTITY:H++,OPEN_WAKA:H++,SGML_DECL:H++,SGML_DECL_QUOTED:H++,DOCTYPE:H++,DOCTYPE_QUOTED:H++,DOCTYPE_DTD:H++,DOCTYPE_DTD_QUOTED:H++,COMMENT_STARTING:H++,COMMENT:H++,COMMENT_ENDING:H++,COMMENT_ENDED:H++,CDATA:H++,CDATA_ENDING:H++,CDATA_ENDING_2:H++,PROC_INST:H++,PROC_INST_BODY:H++,PROC_INST_ENDING:H++,OPEN_TAG:H++,OPEN_TAG_SLASH:H++,ATTRIB:H++,ATTRIB_NAME:H++,ATTRIB_NAME_SAW_WHITE:H++,ATTRIB_VALUE:H++,ATTRIB_VALUE_QUOTED:H++,ATTRIB_VALUE_CLOSED:H++,ATTRIB_VALUE_UNQUOTED:H++,ATTRIB_VALUE_ENTITY_Q:H++,ATTRIB_VALUE_ENTITY_U:H++,CLOSE_TAG:H++,CLOSE_TAG_SAW_WHITE:H++,SCRIPT:H++,SCRIPT_ENDING:H++},o.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},o.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,t.default)(o.ENTITIES).forEach(function(Y){var Z=o.ENTITIES[Y],ye=typeof Z=="number"?String.fromCharCode(Z):Z;o.ENTITIES[Y]=ye});for(var $ in o.STATE)o.STATE[o.STATE[$]]=$;H=o.STATE;function re(Y,Z,ye){Y[Z]&&Y[Z](ye)}function te(Y,Z,ye){Y.textNode&&ge(Y),re(Y,Z,ye)}function ge(Y){Y.textNode=ve(Y.opt,Y.textNode),Y.textNode&&re(Y,"ontext",Y.textNode),Y.textNode=""}function ve(Y,Z){return Y.trim&&(Z=Z.trim()),Y.normalize&&(Z=Z.replace(/\s+/g," ")),Z}function de(Y,Z){return ge(Y),Y.trackPosition&&(Z+=` Line: `+Y.line+` Column: `+Y.column+` Char: `+Y.c),Z=new Error(Z),Y.error=Z,re(Y,"onerror",Z),Y}function De(Y){return Y.sawRoot&&!Y.closedRoot&&Te(Y,"Unclosed root tag"),Y.state!==H.BEGIN&&Y.state!==H.BEGIN_WHITESPACE&&Y.state!==H.TEXT&&de(Y,"Unexpected end"),ge(Y),Y.c="",Y.closed=!0,re(Y,"onend"),c.call(Y,Y.strict,Y.opt),Y}function Te(Y,Z){if((typeof Y=="undefined"?"undefined":(0,S.default)(Y))!=="object"||!(Y instanceof c))throw new Error("bad call to strictFail");Y.strict&&de(Y,Z)}function he(Y){Y.strict||(Y.tagName=Y.tagName[Y.looseCase]());var Z=Y.tags[Y.tags.length-1]||Y,ye=Y.tag={name:Y.tagName,attributes:{}};Y.opt.xmlns&&(ye.ns=Z.ns),Y.attribList.length=0,te(Y,"onopentagstart",ye)}function ue(Y,Z){var ye=Y.indexOf(":"),be=ye<0?["",Y]:Y.split(":"),Re=be[0],Qe=be[1];return Z&&Y==="xmlns"&&(Re="xmlns",Qe=""),{prefix:Re,local:Qe}}function ie(Y){if(Y.strict||(Y.attribName=Y.attribName[Y.looseCase]()),Y.attribList.indexOf(Y.attribName)!==-1||Y.tag.attributes.hasOwnProperty(Y.attribName)){Y.attribName=Y.attribValue="";return}if(Y.opt.xmlns){var Z=ue(Y.attribName,!0),ye=Z.prefix,be=Z.local;if(ye==="xmlns")if(be==="xml"&&Y.attribValue!==x)Te(Y,"xml: prefix must be bound to "+x+` Actual: `+Y.attribValue);else if(be==="xmlns"&&Y.attribValue!==E)Te(Y,"xmlns: prefix must be bound to "+E+` Actual: `+Y.attribValue);else{var Re=Y.tag,Qe=Y.tags[Y.tags.length-1]||Y;Re.ns===Qe.ns&&(Re.ns=(0,r.default)(Qe.ns)),Re.ns[be]=Y.attribValue}Y.attribList.push([Y.attribName,Y.attribValue])}else Y.tag.attributes[Y.attribName]=Y.attribValue,te(Y,"onattribute",{name:Y.attribName,value:Y.attribValue});Y.attribName=Y.attribValue=""}function Se(Y,Z){if(Y.opt.xmlns){var ye=Y.tag,be=ue(Y.tagName);ye.prefix=be.prefix,ye.local=be.local,ye.uri=ye.ns[be.prefix]||"",ye.prefix&&!ye.uri&&(Te(Y,"Unbound namespace prefix: "+(0,y.default)(Y.tagName)),ye.uri=be.prefix);var Re=Y.tags[Y.tags.length-1]||Y;ye.ns&&Re.ns!==ye.ns&&(0,t.default)(ye.ns).forEach(function(ze){te(Y,"onopennamespace",{prefix:ze,uri:ye.ns[ze]})});for(var Qe=0,rt=Y.attribList.length;Qe",Y.tagName="",Y.state=H.SCRIPT;return}te(Y,"onscript",Y.script),Y.script=""}var Z=Y.tags.length,ye=Y.tagName;Y.strict||(ye=ye[Y.looseCase]());for(var be=ye;Z--;){var Re=Y.tags[Z];if(Re.name!==be)Te(Y,"Unexpected close tag");else break}if(Z<0){Te(Y,"Unmatched closing tag: "+Y.tagName),Y.textNode+="",Y.state=H.TEXT;return}Y.tagName=ye;for(var Qe=Y.tags.length;Qe-- >Z;){var rt=Y.tag=Y.tags.pop();Y.tagName=Y.tag.name,te(Y,"onclosetag",Y.tagName);var at={};for(var qe in rt.ns)at[qe]=rt.ns[qe];var st=Y.tags[Y.tags.length-1]||Y;Y.opt.xmlns&&rt.ns!==st.ns&&(0,t.default)(rt.ns).forEach(function(lt){var je=rt.ns[lt];te(Y,"onclosenamespace",{prefix:lt,uri:je})})}Z===0&&(Y.closedRoot=!0),Y.tagName=Y.attribValue=Y.attribName="",Y.attribList.length=0,Y.state=H.TEXT}function ce(Y){var Z=Y.entity,ye=Z.toLowerCase(),be,Re="";return Y.ENTITIES[Z]?Y.ENTITIES[Z]:Y.ENTITIES[ye]?Y.ENTITIES[ye]:(Z=ye,Z.charAt(0)==="#"&&(Z.charAt(1)==="x"?(Z=Z.slice(2),be=parseInt(Z,16),Re=be.toString(16)):(Z=Z.slice(1),be=parseInt(Z,10),Re=be.toString(10))),Z=Z.replace(/^0+/,""),isNaN(be)||Re.toLowerCase()!==Z?(Te(Y,"Invalid character entity"),"&"+Y.entity+";"):(0,C.default)(be))}function Oe(Y,Z){Z==="<"?(Y.state=H.OPEN_WAKA,Y.startTagPosition=Y.position):z(Z)||(Te(Y,"Non-whitespace before first tag."),Y.textNode=Z,Y.state=H.TEXT)}function oe(Y,Z){var ye="";return Z"?(te(Z,"onsgmldeclaration",Z.sgmlDecl),Z.sgmlDecl="",Z.state=H.TEXT):(W(be)&&(Z.state=H.SGML_DECL_QUOTED),Z.sgmlDecl+=be);continue;case H.SGML_DECL_QUOTED:be===Z.q&&(Z.state=H.SGML_DECL,Z.q=""),Z.sgmlDecl+=be;continue;case H.DOCTYPE:be===">"?(Z.state=H.TEXT,te(Z,"ondoctype",Z.doctype),Z.doctype=!0):(Z.doctype+=be,be==="["?Z.state=H.DOCTYPE_DTD:W(be)&&(Z.state=H.DOCTYPE_QUOTED,Z.q=be));continue;case H.DOCTYPE_QUOTED:Z.doctype+=be,be===Z.q&&(Z.q="",Z.state=H.DOCTYPE);continue;case H.DOCTYPE_DTD:Z.doctype+=be,be==="]"?Z.state=H.DOCTYPE:W(be)&&(Z.state=H.DOCTYPE_DTD_QUOTED,Z.q=be);continue;case H.DOCTYPE_DTD_QUOTED:Z.doctype+=be,be===Z.q&&(Z.state=H.DOCTYPE_DTD,Z.q="");continue;case H.COMMENT:be==="-"?Z.state=H.COMMENT_ENDING:Z.comment+=be;continue;case H.COMMENT_ENDING:be==="-"?(Z.state=H.COMMENT_ENDED,Z.comment=ve(Z.opt,Z.comment),Z.comment&&te(Z,"oncomment",Z.comment),Z.comment=""):(Z.comment+="-"+be,Z.state=H.COMMENT);continue;case H.COMMENT_ENDED:be!==">"?(Te(Z,"Malformed comment"),Z.comment+="--"+be,Z.state=H.COMMENT):Z.state=H.TEXT;continue;case H.CDATA:be==="]"?Z.state=H.CDATA_ENDING:Z.cdata+=be;continue;case H.CDATA_ENDING:be==="]"?Z.state=H.CDATA_ENDING_2:(Z.cdata+="]"+be,Z.state=H.CDATA);continue;case H.CDATA_ENDING_2:be===">"?(Z.cdata&&te(Z,"oncdata",Z.cdata),te(Z,"onclosecdata"),Z.cdata="",Z.state=H.TEXT):be==="]"?Z.cdata+="]":(Z.cdata+="]]"+be,Z.state=H.CDATA);continue;case H.PROC_INST:be==="?"?Z.state=H.PROC_INST_ENDING:z(be)?Z.state=H.PROC_INST_BODY:Z.procInstName+=be;continue;case H.PROC_INST_BODY:if(!Z.procInstBody&&z(be))continue;be==="?"?Z.state=H.PROC_INST_ENDING:Z.procInstBody+=be;continue;case H.PROC_INST_ENDING:be===">"?(te(Z,"onprocessinginstruction",{name:Z.procInstName,body:Z.procInstBody}),Z.procInstName=Z.procInstBody="",Z.state=H.TEXT):(Z.procInstBody+="?"+be,Z.state=H.PROC_INST_BODY);continue;case H.OPEN_TAG:U(L,be)?Z.tagName+=be:(he(Z),be===">"?Se(Z):be==="/"?Z.state=H.OPEN_TAG_SLASH:(z(be)||Te(Z,"Invalid character in tag name"),Z.state=H.ATTRIB));continue;case H.OPEN_TAG_SLASH:be===">"?(Se(Z,!0),ne(Z)):(Te(Z,"Forward-slash in opening tag not followed by >"),Z.state=H.ATTRIB);continue;case H.ATTRIB:if(z(be))continue;be===">"?Se(Z):be==="/"?Z.state=H.OPEN_TAG_SLASH:U(M,be)?(Z.attribName=be,Z.attribValue="",Z.state=H.ATTRIB_NAME):Te(Z,"Invalid attribute name");continue;case H.ATTRIB_NAME:be==="="?Z.state=H.ATTRIB_VALUE:be===">"?(Te(Z,"Attribute without value"),Z.attribValue=Z.attribName,ie(Z),Se(Z)):z(be)?Z.state=H.ATTRIB_NAME_SAW_WHITE:U(L,be)?Z.attribName+=be:Te(Z,"Invalid attribute name");continue;case H.ATTRIB_NAME_SAW_WHITE:if(be==="=")Z.state=H.ATTRIB_VALUE;else{if(z(be))continue;Te(Z,"Attribute without value"),Z.tag.attributes[Z.attribName]="",Z.attribValue="",te(Z,"onattribute",{name:Z.attribName,value:""}),Z.attribName="",be===">"?Se(Z):U(M,be)?(Z.attribName=be,Z.state=H.ATTRIB_NAME):(Te(Z,"Invalid attribute name"),Z.state=H.ATTRIB)}continue;case H.ATTRIB_VALUE:if(z(be))continue;W(be)?(Z.q=be,Z.state=H.ATTRIB_VALUE_QUOTED):(Te(Z,"Unquoted attribute value"),Z.state=H.ATTRIB_VALUE_UNQUOTED,Z.attribValue=be);continue;case H.ATTRIB_VALUE_QUOTED:if(be!==Z.q){be==="&"?Z.state=H.ATTRIB_VALUE_ENTITY_Q:Z.attribValue+=be;continue}ie(Z),Z.q="",Z.state=H.ATTRIB_VALUE_CLOSED;continue;case H.ATTRIB_VALUE_CLOSED:z(be)?Z.state=H.ATTRIB:be===">"?Se(Z):be==="/"?Z.state=H.OPEN_TAG_SLASH:U(M,be)?(Te(Z,"No whitespace between attributes"),Z.attribName=be,Z.attribValue="",Z.state=H.ATTRIB_NAME):Te(Z,"Invalid attribute name");continue;case H.ATTRIB_VALUE_UNQUOTED:if(!G(be)){be==="&"?Z.state=H.ATTRIB_VALUE_ENTITY_U:Z.attribValue+=be;continue}ie(Z),be===">"?Se(Z):Z.state=H.ATTRIB;continue;case H.CLOSE_TAG:if(Z.tagName)be===">"?ne(Z):U(L,be)?Z.tagName+=be:Z.script?(Z.script+=""?ne(Z):Te(Z,"Invalid characters in closing tag");continue;case H.TEXT_ENTITY:case H.ATTRIB_VALUE_ENTITY_Q:case H.ATTRIB_VALUE_ENTITY_U:var rt,at;switch(Z.state){case H.TEXT_ENTITY:rt=H.TEXT,at="textNode";break;case H.ATTRIB_VALUE_ENTITY_Q:rt=H.ATTRIB_VALUE_QUOTED,at="attribValue";break;case H.ATTRIB_VALUE_ENTITY_U:rt=H.ATTRIB_VALUE_UNQUOTED,at="attribValue";break}be===";"?(Z[at]+=ce(Z),Z.entity="",Z.state=rt):U(Z.entity.length?V:A,be)?Z.entity+=be:(Te(Z,"Invalid character in entity name"),Z[at]+="&"+Z.entity+be,Z.entity="",Z.state=rt);continue;default:throw new Error(Z,"Unknown state: "+Z.state)}}return Z.position>=Z.bufferCheckPosition&&a(Z),Z}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */C.default||function(){var Y=String.fromCharCode,Z=Math.floor,ye=function(){var Re=16384,Qe=[],rt,at,qe=-1,st=arguments.length;if(!st)return"";for(var lt="";++qe1114111||Z(je)!==je)throw RangeError("Invalid code point: "+je);je<=65535?Qe.push(je):(je-=65536,rt=(je>>10)+55296,at=je%1024+56320,Qe.push(rt,at)),(qe+1===st||Qe.length>Re)&&(lt+=Y.apply(null,Qe),Qe.length=0)}return lt};p.default?Object.defineProperty(String,"fromCodePoint",{value:ye,configurable:!0,writable:!0}):String.fromCodePoint=ye}()})(typeof j=="undefined"?(void 0).sax={}:j)}).call(this,F("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(F,Q,j){Q.exports=C;var N=F("events").EventEmitter,v=F("inherits");v(C,N),C.Readable=F("readable-stream/readable.js"),C.Writable=F("readable-stream/writable.js"),C.Duplex=F("readable-stream/duplex.js"),C.Transform=F("readable-stream/transform.js"),C.PassThrough=F("readable-stream/passthrough.js"),C.Stream=C;function C(){N.call(this)}C.prototype.pipe=function(k,y){var m=this;function S(i){k.writable&&(k.write(i)===!1&&m.pause&&m.pause())}m.on("data",S);function b(){m.readable&&m.resume&&m.resume()}k.on("drain",b),!k._isStdio&&(!y||y.end!==!1)&&(m.on("end",d),m.on("close",t));var p=!1;function d(){if(p)return;p=!0,k.end()}function t(){if(p)return;p=!0,typeof k.destroy=="function"&&k.destroy()}function l(i){if(r(),N.listenerCount(this,"error")===0)throw i}m.on("error",l),k.on("error",l);function r(){m.removeListener("data",S),k.removeListener("drain",b),m.removeListener("end",d),m.removeListener("close",t),m.removeListener("error",l),k.removeListener("error",l),m.removeListener("end",r),m.removeListener("close",r),k.removeListener("close",r)}return m.on("end",r),m.on("close",r),k.on("close",r),k.emit("pipe",m),k}},{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(F,Q,j){(function(N){var v=F("./lib/request"),C=F("./lib/response"),k=F("xtend"),y=F("builtin-status-codes"),m=F("url"),S=j;S.request=function(b,p){typeof b=="string"?b=m.parse(b):b=k(b);var d=N.location.protocol.search(/^https?:$/)===-1?"http:":"",t=b.protocol||d,l=b.hostname||b.host,r=b.port,i=b.path||"/";l&&l.indexOf(":")!==-1&&(l="["+l+"]"),b.url=(l?t+"//"+l:"")+(r?":"+r:"")+i,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var o=new v(b);return p&&o.on("response",p),o},S.get=function(p,d){var t=S.request(p,d);return t.end(),t},S.ClientRequest=v,S.IncomingMessage=C.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=y,S.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(F,Q,j){(function(N){"use strict";j.fetch=S(N.fetch)&&S(N.ReadableStream),j.writableStream=S(N.WritableStream),j.abortController=S(N.AbortController),j.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),j.blobConstructor=!0}catch(b){}var v;function C(){if(v!==void 0)return v;if(N.XMLHttpRequest){v=new N.XMLHttpRequest;try{v.open("GET",N.XDomainRequest?"/":"https://example.com")}catch(b){v=null}}else v=null;return v}function k(b){var p=C();if(!p)return!1;try{return p.responseType=b,p.responseType===b}catch(d){}return!1}var y=typeof N.ArrayBuffer!="undefined",m=y&&S(N.ArrayBuffer.prototype.slice);j.arraybuffer=j.fetch||y&&k("arraybuffer"),j.msstream=!j.fetch&&m&&k("ms-stream"),j.mozchunkedarraybuffer=!j.fetch&&y&&k("moz-chunked-arraybuffer"),j.overrideMimeType=j.fetch||(C()?S(C().overrideMimeType):!1),j.vbArray=S(N.VBArray);function S(b){return typeof b=="function"}v=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(F,Q,j){(function(N,v,C){"use strict";var k=F("babel-runtime/core-js/object/keys"),y=m(k);function m(a){return a&&a.__esModule?a:{default:a}}var S=F("./capability"),b=F("inherits"),p=F("./response"),d=F("readable-stream"),t=F("to-arraybuffer"),l=p.IncomingMessage,r=p.readyStates;function i(a,u){return S.fetch&&u?"fetch":S.mozchunkedarraybuffer?"moz-chunked-arraybuffer":S.msstream?"ms-stream":S.arraybuffer&&a?"arraybuffer":S.vbArray&&a?"text:vbarray":"text"}var o=Q.exports=function(a){var u=this;d.Writable.call(u),u._opts=a,u._body=[],u._headers={},a.auth&&u.setHeader("Authorization","Basic "+new C(a.auth).toString("base64")),(0,y.default)(a.headers).forEach(function(_){u.setHeader(_,a.headers[_])});var f,w=!0;if(a.mode==="disable-fetch"||"requestTimeout"in a&&!S.abortController)w=!1,f=!0;else if(a.mode==="prefer-streaming")f=!1;else if(a.mode==="allow-wrong-content-type")f=!S.overrideMimeType;else if(!a.mode||a.mode==="default"||a.mode==="prefer-fast")f=!0;else throw new Error("Invalid value for opts.mode");u._mode=i(f,w),u._fetchTimer=null,u.on("finish",function(){u._onFinish()})};b(o,d.Writable),o.prototype.setHeader=function(a,u){var f=this,w=a.toLowerCase();if(c.indexOf(w)!==-1)return;f._headers[w]={name:a,value:u}},o.prototype.getHeader=function(a){var u=this._headers[a.toLowerCase()];return u?u.value:null},o.prototype.removeHeader=function(a){var u=this;delete u._headers[a.toLowerCase()]},o.prototype._onFinish=function(){var a=this;if(a._destroyed)return;var u=a._opts,f=a._headers,w=null;u.method!=="GET"&&u.method!=="HEAD"&&(S.arraybuffer?w=t(C.concat(a._body)):S.blobConstructor?w=new v.Blob(a._body.map(function(x){return t(x)}),{type:(f["content-type"]||{}).value||""}):w=C.concat(a._body).toString());var _=[];if((0,y.default)(f).forEach(function(x){var E=f[x].name,T=f[x].value;Array.isArray(T)?T.forEach(function(M){_.push([E,M])}):_.push([E,T])}),a._mode==="fetch"){var h=null,R=null;if(S.abortController){var O=new AbortController;h=O.signal,a._fetchAbortController=O,"requestTimeout"in u&&u.requestTimeout!==0&&(a._fetchTimer=v.setTimeout(function(){a.emit("requestTimeout"),a._fetchAbortController&&a._fetchAbortController.abort()},u.requestTimeout))}v.fetch(a._opts.url,{method:a._opts.method,headers:_,body:w||void 0,mode:"cors",credentials:u.withCredentials?"include":"same-origin",signal:h}).then(function(x){a._fetchResponse=x,a._connect()},function(x){v.clearTimeout(a._fetchTimer),a._destroyed||a.emit("error",x)})}else{var g=a._xhr=new v.XMLHttpRequest;try{g.open(a._opts.method,a._opts.url,!0)}catch(x){N.nextTick(function(){a.emit("error",x)});return}"responseType"in g&&(g.responseType=a._mode.split(":")[0]),"withCredentials"in g&&(g.withCredentials=!!u.withCredentials),a._mode==="text"&&"overrideMimeType"in g&&g.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in u&&(g.timeout=u.requestTimeout,g.ontimeout=function(){a.emit("requestTimeout")}),_.forEach(function(x){g.setRequestHeader(x[0],x[1])}),a._response=null,g.onreadystatechange=function(){switch(g.readyState){case r.LOADING:case r.DONE:a._onXHRProgress();break}},a._mode==="moz-chunked-arraybuffer"&&(g.onprogress=function(){a._onXHRProgress()}),g.onerror=function(){if(a._destroyed)return;a.emit("error",new Error("XHR error"))};try{g.send(w)}catch(x){N.nextTick(function(){a.emit("error",x)});return}}};function s(a){try{var u=a.status;return u!==null&&u!==0}catch(f){return!1}}o.prototype._onXHRProgress=function(){var a=this;if(!s(a._xhr)||a._destroyed)return;a._response||a._connect(),a._response._onXHRProgress()},o.prototype._connect=function(){var a=this;if(a._destroyed)return;a._response=new l(a._xhr,a._fetchResponse,a._mode,a._fetchTimer),a._response.on("error",function(u){a.emit("error",u)}),a.emit("response",a._response)},o.prototype._write=function(a,u,f){var w=this;w._body.push(a),f()},o.prototype.abort=o.prototype.destroy=function(){var a=this;a._destroyed=!0,v.clearTimeout(a._fetchTimer),a._response&&(a._response._destroyed=!0),a._xhr?a._xhr.abort():a._fetchAbortController&&a._fetchAbortController.abort()},o.prototype.end=function(a,u,f){var w=this;typeof a=="function"&&(f=a,a=void 0),d.Writable.prototype.end.call(w,a,u,f)},o.prototype.flushHeaders=function(){},o.prototype.setTimeout=function(){},o.prototype.setNoDelay=function(){},o.prototype.setSocketKeepAlive=function(){};var c=["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,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("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(F,Q,j){(function(N,v,C){"use strict";var k=F("babel-runtime/core-js/promise"),y=m(k);function m(l){return l&&l.__esModule?l:{default:l}}var S=F("./capability"),b=F("inherits"),p=F("readable-stream"),d=j.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},t=j.IncomingMessage=function(l,r,i,o){var s=this;if(p.Readable.call(s),s._mode=i,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",function(){N.nextTick(function(){s.emit("close")})}),i==="fetch"){var c=function h(){u.read().then(function(R){if(s._destroyed)return;if(R.done){v.clearTimeout(o),s.push(null);return}s.push(new C(R.value)),h()}).catch(function(R){v.clearTimeout(o),s._destroyed||s.emit("error",R)})};if(s._fetchResponse=r,s.url=r.url,s.statusCode=r.status,s.statusMessage=r.statusText,r.headers.forEach(function(h,R){s.headers[R.toLowerCase()]=h,s.rawHeaders.push(R,h)}),S.writableStream){var a=new WritableStream({write:function(R){return new y.default(function(O,g){s._destroyed?g():s.push(new C(R))?O():s._resumeFetch=O})},close:function(){v.clearTimeout(o),s._destroyed||s.push(null)},abort:function(R){s._destroyed||s.emit("error",R)}});try{r.body.pipeTo(a).catch(function(h){v.clearTimeout(o),s._destroyed||s.emit("error",h)});return}catch(h){}}var u=r.body.getReader();c()}else{s._xhr=l,s._pos=0,s.url=l.responseURL,s.statusCode=l.status,s.statusMessage=l.statusText;var f=l.getAllResponseHeaders().split(/\r?\n/);if(f.forEach(function(h){var R=h.match(/^([^:]+):\s*(.*)/);if(R){var O=R[1].toLowerCase();O==="set-cookie"?(s.headers[O]===void 0&&(s.headers[O]=[]),s.headers[O].push(R[2])):s.headers[O]!==void 0?s.headers[O]+=", "+R[2]:s.headers[O]=R[2],s.rawHeaders.push(R[1],R[2])}}),s._charset="x-user-defined",!S.overrideMimeType){var w=s.rawHeaders["mime-type"];if(w){var _=w.match(/;\s*charset=([^;])(;|$)/);_&&(s._charset=_[1].toLowerCase())}s._charset||(s._charset="utf-8")}}};b(t,p.Readable),t.prototype._read=function(){var l=this,r=l._resumeFetch;r&&(l._resumeFetch=null,r())},t.prototype._onXHRProgress=function(){var l=this,r=l._xhr,i=null;switch(l._mode){case"text:vbarray":if(r.readyState!==d.DONE)break;try{i=new v.VBArray(r.responseBody).toArray()}catch(u){}if(i!==null){l.push(new C(i));break}case"text":try{i=r.responseText}catch(u){l._mode="text:vbarray";break}if(i.length>l._pos){var o=i.substr(l._pos);if(l._charset==="x-user-defined"){for(var s=new C(o.length),c=0;cl._pos&&(l.push(new C(new Uint8Array(a.result.slice(l._pos)))),l._pos=a.result.byteLength)},a.onload=function(){l.push(null)},a.readAsArrayBuffer(i);break}l._xhr.readyState===d.DONE&&l._mode!=="ms-stream"&&l.push(null)}}).call(this,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(F,Q,j){"use strict";var N=F("safe-buffer").Buffer,v=N.isEncoding||function(a){a=""+a;switch(a&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function C(a){if(!a)return"utf8";for(var u;;)switch(a){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 a;default:if(u)return;a=(""+a).toLowerCase(),u=!0}}function k(a){var u=C(a);if(typeof u!="string"&&(N.isEncoding===v||!v(a)))throw new Error("Unknown encoding: "+a);return u||a}j.StringDecoder=y;function y(a){this.encoding=k(a);var u;switch(this.encoding){case"utf16le":this.text=l,this.end=r,u=4;break;case"utf8":this.fillLast=p,u=4;break;case"base64":this.text=i,this.end=o,u=3;break;default:this.write=s,this.end=c;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=N.allocUnsafe(u)}y.prototype.write=function(a){if(a.length===0)return"";var u,f;if(this.lastNeed){if(u=this.fillLast(a),u===void 0)return"";f=this.lastNeed,this.lastNeed=0}else f=0;return f>5===6?2:a>>4===14?3:a>>3===30?4:a>>6===2?-1:-2}function S(a,u,f){var w=u.length-1;if(w=0?(_>0&&(a.lastNeed=_-1),_):--w=0?(_>0&&(a.lastNeed=_-2),_):--w=0?(_>0&&(_===2?_=0:a.lastNeed=_-3),_):0))}function b(a,u,f){if((u[0]&192)!==128)return a.lastNeed=0,"\uFFFD";if(a.lastNeed>1&&u.length>1){if((u[1]&192)!==128)return a.lastNeed=1,"\uFFFD";if(a.lastNeed>2&&u.length>2&&(u[2]&192)!==128)return a.lastNeed=2,"\uFFFD"}}function p(a){var u=this.lastTotal-this.lastNeed,f=b(this,a,u);if(f!==void 0)return f;if(this.lastNeed<=a.length)return a.copy(this.lastChar,u,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,u,0,a.length),this.lastNeed-=a.length}function d(a,u){var f=S(this,a,u);if(!this.lastNeed)return a.toString("utf8",u);this.lastTotal=f;var w=a.length-(f-this.lastNeed);return a.copy(this.lastChar,0,w),a.toString("utf8",u,w)}function t(a){var u=a&&a.length?this.write(a):"";return this.lastNeed?u+"\uFFFD":u}function l(a,u){if((a.length-u)%2===0){var f=a.toString("utf16le",u);if(f){var w=f.charCodeAt(f.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],f.slice(0,-1)}return f}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",u,a.length-1)}function r(a){var u=a&&a.length?this.write(a):"";if(this.lastNeed){var f=this.lastTotal-this.lastNeed;return u+this.lastChar.toString("utf16le",0,f)}return u}function i(a,u){var f=(a.length-u)%3;return f===0?a.toString("base64",u):(this.lastNeed=3-f,this.lastTotal=3,f===1?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",u,a.length-f))}function o(a){var u=a&&a.length?this.write(a):"";return this.lastNeed?u+this.lastChar.toString("base64",0,3-this.lastNeed):u}function s(a){return a.toString(this.encoding)}function c(a){return a&&a.length?this.write(a):""}},{"safe-buffer":228}],236:[function(F,Q,j){(function(N,v){var C=F("process/browser.js").nextTick,k=Function.prototype.apply,y=Array.prototype.slice,m={},S=0;j.setTimeout=function(){return new b(k.call(setTimeout,window,arguments),clearTimeout)},j.setInterval=function(){return new b(k.call(setInterval,window,arguments),clearInterval)},j.clearTimeout=j.clearInterval=function(p){p.close()};function b(p,d){this._id=p,this._clearFn=d}b.prototype.unref=b.prototype.ref=function(){},b.prototype.close=function(){this._clearFn.call(window,this._id)},j.enroll=function(p,d){clearTimeout(p._idleTimeoutId),p._idleTimeout=d},j.unenroll=function(p){clearTimeout(p._idleTimeoutId),p._idleTimeout=-1},j._unrefActive=j.active=function(p){clearTimeout(p._idleTimeoutId);var d=p._idleTimeout;d>=0&&(p._idleTimeoutId=setTimeout(function(){p._onTimeout&&p._onTimeout()},d))},j.setImmediate=typeof N=="function"?N:function(p){var d=S++,t=arguments.length<2?!1:y.call(arguments,1);return m[d]=!0,C(function(){m[d]&&(t?p.apply(null,t):p.call(null),j.clearImmediate(d))}),d},j.clearImmediate=typeof v=="function"?v:function(p){delete m[p]}}).call(this,F("timers").setImmediate,F("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(F,Q,j){var N=F("buffer").Buffer;Q.exports=function(v){if(v instanceof Uint8Array){if(v.byteOffset===0&&v.byteLength===v.buffer.byteLength)return v.buffer;if(typeof v.buffer.slice=="function")return v.buffer.slice(v.byteOffset,v.byteOffset+v.byteLength)}if(N.isBuffer(v)){for(var C=new Uint8Array(v.length),k=v.length,y=0;y",'"',"`"," ","\r",` `," "],b=["{","}","|","\\","^","`"].concat(S),p=["'"].concat(b),d=["%","/","?",";","#"].concat(p),t=["/","?","#"],l=255,r=/^[+a-z0-9A-Z_-]{0,63}$/,i=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,o={javascript:!0,"javascript:":!0},s={javascript:!0,"javascript:":!0},c={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},a=F("querystring");function u(h,R,O){if(h&&v.isObject(h)&&h instanceof C)return h;var g=new C;return g.parse(h,R,O),g}C.prototype.parse=function(h,R,O){if(!v.isString(h))throw new TypeError("Parameter 'url' must be a string, not "+typeof h);var g=h.indexOf("?"),x=g!==-1&&g127?ve+="x":ve+=ge[de];if(!ve.match(r)){var Te=re.slice(0,G),he=re.slice(G+1),ue=ge.match(i);ue&&(Te.push(ue[1]),he.unshift(ue[2])),he.length&&(M="/"+he.join(".")+M),this.hostname=Te.join(".");break}}}this.hostname.length>l?this.hostname="":this.hostname=this.hostname.toLowerCase(),$||(this.hostname=N.toASCII(this.hostname));var ie=this.port?":"+this.port:"",Se=this.hostname||"";this.host=Se+ie,this.href+=this.host,$&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!o[V])for(var G=0,te=p.length;G0?O.host.split("@"):!1;ve&&(O.auth=ve.shift(),O.host=O.hostname=ve.shift())}return O.search=h.search,O.query=h.query,(!v.isNull(O.pathname)||!v.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!re.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var de=re.slice(-1)[0],De=(O.host||h.host||re.length>1)&&(de==="."||de==="..")||de==="",Te=0,he=re.length;he>=0;he--)de=re[he],de==="."?re.splice(he,1):de===".."?(re.splice(he,1),Te++):Te&&(re.splice(he,1),Te--);if(!H&&!$)for(;Te--;Te)re.unshift("..");H&&re[0]!==""&&(!re[0]||re[0].charAt(0)!=="/")&&re.unshift(""),De&&re.join("/").substr(-1)!=="/"&&re.push("");var ue=re[0]===""||re[0]&&re[0].charAt(0)==="/";if(ge){O.hostname=O.host=ue?"":re.length?re.shift():"";var ve=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;ve&&(O.auth=ve.shift(),O.host=O.hostname=ve.shift())}return H=H||O.host&&re.length,H&&!ue&&re.unshift(""),re.length?O.pathname=re.join("/"):(O.pathname=null,O.path=null),(!v.isNull(O.pathname)||!v.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=h.auth||O.auth,O.slashes=O.slashes||h.slashes,O.href=O.format(),O},C.prototype.parseHost=function(){var h=this.host,R=y.exec(h);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),h=h.substr(0,h.length-R.length)),h&&(this.hostname=h)}},{"./util":239,punycode:209,querystring:212}],239:[function(F,Q,j){"use strict";Q.exports={isString:function(N){return typeof N=="string"},isObject:function(N){return typeof N=="object"&&N!==null},isNull:function(N){return N===null},isNullOrUndefined:function(N){return N==null}}},{}],240:[function(F,Q,j){(function(N){Q.exports=v;function v(k,y){if(C("noDeprecation"))return k;var m=!1;function S(){if(!m){if(C("throwDeprecation"))throw new Error(y);C("traceDeprecation")?console.trace(y):console.warn(y),m=!0}return k.apply(this,arguments)}return S}function C(k){try{if(!N.localStorage)return!1}catch(m){return!1}var y=N.localStorage[k];return y==null?!1:String(y).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(F,Q,j){typeof Object.create=="function"?Q.exports=function(v,C){v.super_=C,v.prototype=Object.create(C.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}})}:Q.exports=function(v,C){v.super_=C;var k=function(){};k.prototype=C.prototype,v.prototype=new k,v.prototype.constructor=v}},{}],242:[function(F,Q,j){Q.exports=function(v){return v&&typeof v=="object"&&typeof v.copy=="function"&&typeof v.fill=="function"&&typeof v.readUInt8=="function"}},{}],243:[function(F,Q,j){(function(N,v){var C=/%[sdj%]/g;j.format=function(W){if(!w(W)){for(var G=[],U=0;U=H)return te;switch(te){case"%s":return String(P[U++]);case"%d":return Number(P[U++]);case"%j":try{return JSON.stringify(P[U++])}catch(ge){return"[Circular]"}default:return te}}),re=P[U];U=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),c(G)?U.showHidden=G:G&&j._extend(U,G),h(U.showHidden)&&(U.showHidden=!1),h(U.depth)&&(U.depth=2),h(U.colors)&&(U.colors=!1),h(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=S),d(U,W,U.depth)}j.inspect=m,m.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]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function S(W,G){var U=m.styles[G];return U?"["+m.colors[U][0]+"m"+W+"["+m.colors[U][1]+"m":W}function b(W,G){return W}function p(W){var G={};return W.forEach(function(U,P){G[U]=!0}),G}function d(W,G,U){if(W.customInspect&&G&&E(G.inspect)&&G.inspect!==j.inspect&&!(G.constructor&&G.constructor.prototype===G)){var P=G.inspect(U,W);return w(P)||(P=d(W,P,U)),P}var H=t(W,G);if(H)return H;var $=Object.keys(G),re=p($);if(W.showHidden&&($=Object.getOwnPropertyNames(G)),x(G)&&($.indexOf("message")>=0||$.indexOf("description")>=0))return l(G);if($.length===0){if(E(G)){var te=G.name?": "+G.name:"";return W.stylize("[Function"+te+"]","special")}if(R(G))return W.stylize(RegExp.prototype.toString.call(G),"regexp");if(g(G))return W.stylize(Date.prototype.toString.call(G),"date");if(x(G))return l(G)}var ge="",ve=!1,de=["{","}"];if(s(G)&&(ve=!0,de=["[","]"]),E(G)){var De=G.name?": "+G.name:"";ge=" [Function"+De+"]"}if(R(G)&&(ge=" "+RegExp.prototype.toString.call(G)),g(G)&&(ge=" "+Date.prototype.toUTCString.call(G)),x(G)&&(ge=" "+l(G)),$.length===0&&(!ve||G.length==0))return de[0]+ge+de[1];if(U<0)return R(G)?W.stylize(RegExp.prototype.toString.call(G),"regexp"):W.stylize("[Object]","special");W.seen.push(G);var Te;return ve?Te=r(W,G,U,re,$):Te=$.map(function(he){return i(W,G,U,re,he,ve)}),W.seen.pop(),o(Te,ge,de)}function t(W,G){if(h(G))return W.stylize("undefined","undefined");if(w(G)){var U="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(U,"string")}if(f(G))return W.stylize(""+G,"number");if(c(G))return W.stylize(""+G,"boolean");if(a(G))return W.stylize("null","null")}function l(W){return"["+Error.prototype.toString.call(W)+"]"}function r(W,G,U,P,H){for(var $=[],re=0,te=G.length;re-1&&($?te=te.split(` `).map(function(ve){return" "+ve}).join(` `).substr(2):te=` `+te.split(` `).map(function(ve){return" "+ve}).join(` `))):te=W.stylize("[Circular]","special")),h(re)){if($&&H.match(/^\d+$/))return te;re=JSON.stringify(""+H),re.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(re=re.substr(1,re.length-2),re=W.stylize(re,"name")):(re=re.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),re=W.stylize(re,"string"))}return re+": "+te}function o(W,G,U){var P=0,H=W.reduce(function($,re){return P++,re.indexOf(` `)>=0&&P++,$+re.replace(/\u001b\[\d\d?m/g,"").length+1},0);return H>60?U[0]+(G===""?"":G+` `)+" "+W.join(`, `)+" "+U[1]:U[0]+G+" "+W.join(", ")+" "+U[1]}function s(W){return Array.isArray(W)}j.isArray=s;function c(W){return typeof W=="boolean"}j.isBoolean=c;function a(W){return W===null}j.isNull=a;function u(W){return W==null}j.isNullOrUndefined=u;function f(W){return typeof W=="number"}j.isNumber=f;function w(W){return typeof W=="string"}j.isString=w;function _(W){return typeof W=="symbol"}j.isSymbol=_;function h(W){return W===void 0}j.isUndefined=h;function R(W){return O(W)&&M(W)==="[object RegExp]"}j.isRegExp=R;function O(W){return typeof W=="object"&&W!==null}j.isObject=O;function g(W){return O(W)&&M(W)==="[object Date]"}j.isDate=g;function x(W){return O(W)&&(M(W)==="[object Error]"||W instanceof Error)}j.isError=x;function E(W){return typeof W=="function"}j.isFunction=E;function T(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W=="undefined"}j.isPrimitive=T,j.isBuffer=F("./support/isBuffer");function M(W){return Object.prototype.toString.call(W)}function L(W){return W<10?"0"+W.toString(10):W.toString(10)}var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var W=new Date,G=[L(W.getHours()),L(W.getMinutes()),L(W.getSeconds())].join(":");return[W.getDate(),A[W.getMonth()],G].join(" ")}j.log=function(){console.log("%s - %s",V(),j.format.apply(j,arguments))},j.inherits=F("inherits"),j._extend=function(W,G){if(!G||!O(G))return W;for(var U=Object.keys(G),P=U.length;P--;)W[U[P]]=G[U[P]];return W};function z(W,G){return Object.prototype.hasOwnProperty.call(W,G)}}).call(this,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(F,Q,j){"use strict";(function(){"use strict";j.stripBOM=function(N){return N[0]==="\uFEFF"?N.substring(1):N}}).call(void 0)},{}],245:[function(F,Q,j){"use strict";var N=F("babel-runtime/helpers/typeof"),v=y(N),C=F("babel-runtime/core-js/object/keys"),k=y(C);function y(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,S,b,p,d,t={}.hasOwnProperty;m=F("xmlbuilder"),S=F("./defaults").defaults,p=function(r){return typeof r=="string"&&(r.indexOf("&")>=0||r.indexOf(">")>=0||r.indexOf("<")>=0)},d=function(r){return""},b=function(r){return r.replace("]]>","]]]]>")},j.Builder=function(){function l(r){var i,o,s;this.options={},o=S["0.2"];for(i in o){if(!t.call(o,i))continue;s=o[i],this.options[i]=s}for(i in r){if(!t.call(r,i))continue;s=r[i],this.options[i]=s}}return l.prototype.buildObject=function(r){var i,o,s,c,a;return i=this.options.attrkey,o=this.options.charkey,(0,k.default)(r).length===1&&this.options.rootName===S["0.2"].rootName?(a=(0,k.default)(r)[0],r=r[a]):a=this.options.rootName,s=function(u){return function(f,w){var _,h,R,O,g,x;if((typeof w=="undefined"?"undefined":(0,v.default)(w))!=="object")u.options.cdata&&p(w)?f.raw(d(w)):f.txt(w);else if(Array.isArray(w))for(O in w){if(!t.call(w,O))continue;h=w[O];for(g in h)R=h[g],f=s(f.ele(g),R).up()}else for(g in w){if(!t.call(w,g))continue;if(h=w[g],g===i){if((typeof h=="undefined"?"undefined":(0,v.default)(h))==="object")for(_ in h)x=h[_],f=f.att(_,x)}else if(g===o)u.options.cdata&&p(h)?f=f.raw(d(h)):f=f.txt(h);else if(Array.isArray(h))for(O in h){if(!t.call(h,O))continue;R=h[O],typeof R=="string"?u.options.cdata&&p(R)?f=f.ele(g).raw(d(R)).up():f=f.ele(g,R).up():f=s(f.ele(g),R).up()}else(typeof h=="undefined"?"undefined":(0,v.default)(h))==="object"?f=s(f.ele(g),h).up():typeof h=="string"&&u.options.cdata&&p(h)?f=f.ele(g).raw(d(h)).up():(h==null&&(h=""),f=f.ele(g,h.toString()).up())}return f}}(this),c=m.create(a,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),s(c,r).end(this.options.renderOpts)},l}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(F,Q,j){"use strict";(function(){j.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(F,Q,j){"use strict";var N=F("babel-runtime/core-js/promise"),v=p(N),C=F("babel-runtime/core-js/object/get-own-property-names"),k=p(C),y=F("babel-runtime/core-js/object/keys"),m=p(y),S=F("babel-runtime/helpers/typeof"),b=p(S);function p(d){return d&&d.__esModule?d:{default:d}}(function(){"use strict";var d,t,l,r,i,o,s,c,a=function(_,h){return function(){return _.apply(h,arguments)}},u=function(_,h){for(var R in h)f.call(h,R)&&(_[R]=h[R]);function O(){this.constructor=_}return O.prototype=h.prototype,_.prototype=new O,_.__super__=h.prototype,_},f={}.hasOwnProperty;s=F("sax"),l=F("events"),d=F("./bom"),o=F("./processors"),c=F("timers").setImmediate,t=F("./defaults").defaults,r=function(_){return(typeof _=="undefined"?"undefined":(0,b.default)(_))==="object"&&_!=null&&(0,m.default)(_).length===0},i=function(_,h,R){var O,g,x;for(O=0,g=_.length;O0&&(L[x.options.childkey]=V),V=L;else if(G){G[x.options.childkey]=G[x.options.childkey]||[],z={};for(M in V){if(!f.call(V,M))continue;z[M]=V[M]}G[x.options.childkey].push(z),delete V["#name"],(0,m.default)(V).length===1&&R in V&&!x.EXPLICIT_CHARKEY&&(V=V[R])}}return g.length>0?x.assignOrPush(G,A,V):(x.options.explicitRoot&&(W=V,V={},V[A]=W),x.resultObject=V,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),O=function(x){return function(E){var T,M;if(M=g[g.length-1],M)return M[R]+=E,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||E.replace(/\\n/g,"").trim()!=="")&&(M[x.options.childkey]=M[x.options.childkey]||[],T={"#name":"__text__"},T[R]=E,x.options.normalize&&(T[R]=T[R].replace(/\s{2,}/g," ").trim()),M[x.options.childkey].push(T)),M}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(x){return function(E){var T;if(T=O(E),T)return T.cdata=!0}}(this)},_.prototype.parseString=function(h,R){var O;R!=null&&typeof R=="function"&&(this.on("end",function(g){return this.reset(),R(null,g)}),this.on("error",function(g){return this.reset(),R(g)}));try{return h=h.toString(),h.trim()===""?(this.emit("end",null),!0):(h=d.stripBOM(h),this.options.async?(this.remaining=h,c(this.processAsync),this.saxParser):this.saxParser.write(h).close())}catch(g){if(O=g,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},_.prototype.parseStringPromise=function(h){return new v.default(function(R){return function(O,g){return R.parseString(h,function(x,E){return x?g(x):O(E)})}}(this))},_}(l),j.parseString=function(w,_,h){var R,O,g;return h!=null?(typeof h=="function"&&(R=h),(typeof _=="undefined"?"undefined":(0,b.default)(_))==="object"&&(O=_)):(typeof _=="function"&&(R=_),O={}),g=new j.Parser(O),g.parseString(w,R)},j.parseStringPromise=function(w,_){var h,R;return(typeof _=="undefined"?"undefined":(0,b.default)(_))==="object"&&(h=_),R=new j.Parser(h),R.parseStringPromise(w)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(F,Q,j){"use strict";(function(){"use strict";var N;N=new RegExp(/(?!xmlns)^.*:/),j.normalize=function(v){return v.toLowerCase()},j.firstCharLowerCase=function(v){return v.charAt(0).toLowerCase()+v.slice(1)},j.stripPrefix=function(v){return v.replace(N,"")},j.parseNumbers=function(v){return isNaN(v)||(v=v%1===0?parseInt(v,10):parseFloat(v)),v},j.parseBooleans=function(v){return/^(?:true|false)$/i.test(v)&&(v=v.toLowerCase()==="true"),v}}).call(void 0)},{}],249:[function(F,Q,j){"use strict";(function(){"use strict";var N,v,C,k,y=function(b,p){for(var d in p)m.call(p,d)&&(b[d]=p[d]);function t(){this.constructor=b}return t.prototype=p.prototype,b.prototype=new t,b.__super__=p.prototype,b},m={}.hasOwnProperty;v=F("./defaults"),N=F("./builder"),C=F("./parser"),k=F("./processors"),j.defaults=v.defaults,j.processors=k,j.ValidationError=function(S){y(b,S);function b(p){this.message=p}return b}(Error),j.Builder=N.Builder,j.Parser=C.Parser,j.parseString=C.parseString,j.parseStringPromise=C.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(F,Q,j){"use strict";(function(){Q.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(F,Q,j){"use strict";(function(){Q.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(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/get-prototype-of"),v=S(N),C=F("babel-runtime/helpers/typeof"),k=S(C),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(b){return b&&b.__esModule?b:{default:b}}(function(){var b,p,d,t,l,r,i,o=[].slice,s={}.hasOwnProperty;b=function(){var a,u,f,w,_,h;if(h=arguments[0],_=2<=arguments.length?o.call(arguments,1):[],l(m.default))m.default.apply(null,arguments);else for(a=0,f=_.length;a":"attribute: {"+b+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(b){return b.namespaceURI!==this.namespaceURI||(b.prefix!==this.prefix||b.localName!==this.localName)?!1:!(b.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=C(N);function C(k){return k&&k.__esModule?k:{default:k}}(function(){var k,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;k=F("./NodeType"),m=F("./XMLCharacterData"),Q.exports=y=function(p){S(d,p);function d(t,l){if(d.__super__.constructor.call(this,t),l==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=k.CData,this.value=this.stringify.cdata(l)}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=C(N);function C(k){return k&&k.__esModule?k:{default:k}}(function(){var k,y,m=function(p,d){for(var t in d)S.call(d,t)&&(p[t]=d[t]);function l(){this.constructor=p}return l.prototype=d.prototype,p.prototype=new l,p.__super__=d.prototype,p},S={}.hasOwnProperty;y=F("./XMLNode"),Q.exports=k=function(b){m(p,b);function p(d){p.__super__.constructor.call(this,d),this.value=""}return Object.defineProperty(p.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(p.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(p.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),p.prototype.clone=function(){return(0,v.default)(this)},p.prototype.substringData=function(d,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.appendData=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.insertData=function(d,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.deleteData=function(d,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.replaceData=function(d,t,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.isEqualNode=function(d){return p.__super__.isEqualNode.apply(this,arguments).isEqualNode(d)?!(d.data!==this.data):!1},p}(y)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=C(N);function C(k){return k&&k.__esModule?k:{default:k}}(function(){var k,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;k=F("./NodeType"),y=F("./XMLCharacterData"),Q.exports=m=function(p){S(d,p);function d(t,l){if(d.__super__.constructor.call(this,t),l==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=k.Comment,this.value=this.stringify.comment(l)}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))},d}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=y(N),C=F("babel-runtime/core-js/object/create"),k=y(C);function y(m){return m&&m.__esModule?m:{default:m}}(function(){var m,S,b;S=F("./XMLDOMErrorHandler"),b=F("./XMLDOMStringList"),Q.exports=m=function(){function p(){var d;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new S,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=d=(0,k.default)(this.defaultParams)}return Object.defineProperty(p.prototype,"parameterNames",{get:function(){return new b((0,v.default)(this.defaultParams))}}),p.prototype.getParameter=function(d){return this.params.hasOwnProperty(d)?this.params[d]:null},p.prototype.canSetParameter=function(d,t){return!0},p.prototype.setParameter=function(d,t){return t!=null?this.params[d]=t:delete this.params[d]},p}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(F,Q,j){"use strict";(function(){var N;Q.exports=N=function(){function v(){}return v.prototype.handleError=function(C){throw new Error(C)},v}()}).call(void 0)},{}],260:[function(F,Q,j){"use strict";(function(){var N;Q.exports=N=function(){function v(){}return v.prototype.hasFeature=function(C,k){return!0},v.prototype.createDocumentType=function(C,k,y){throw new Error("This DOM method is not implemented.")},v.prototype.createDocument=function(C,k,y){throw new Error("This DOM method is not implemented.")},v.prototype.createHTMLDocument=function(C){throw new Error("This DOM method is not implemented.")},v.prototype.getFeature=function(C,k){throw new Error("This DOM method is not implemented.")},v}()}).call(void 0)},{}],261:[function(F,Q,j){"use strict";(function(){var N;Q.exports=N=function(){function v(C){this.arr=C||[]}return Object.defineProperty(v.prototype,"length",{get:function(){return this.arr.length}}),v.prototype.item=function(C){return this.arr[C]||null},v.prototype.contains=function(C){return this.arr.indexOf(C)!==-1},v}()}).call(void 0)},{}],262:[function(F,Q,j){"use strict";(function(){var N,v,C,k=function(S,b){for(var p in b)y.call(b,p)&&(S[p]=b[p]);function d(){this.constructor=S}return d.prototype=b.prototype,S.prototype=new d,S.__super__=b.prototype,S},y={}.hasOwnProperty;C=F("./XMLNode"),N=F("./NodeType"),Q.exports=v=function(m){k(S,m);function S(b,p,d,t,l,r){if(S.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(d==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(p));if(!t)throw new Error("Missing DTD attribute type. "+this.debugInfo(p));if(!l)throw new Error("Missing DTD attribute default. "+this.debugInfo(p));if(l.indexOf("#")!==0&&(l="#"+l),!l.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(p));if(r&&!l.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(p));this.elementName=this.stringify.name(p),this.type=N.AttributeDeclaration,this.attributeName=this.stringify.name(d),this.attributeType=this.stringify.dtdAttType(t),r&&(this.defaultValue=this.stringify.dtdAttDefault(r)),this.defaultValueType=l}return S.prototype.toString=function(b){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(b))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(F,Q,j){"use strict";(function(){var N,v,C,k=function(S,b){for(var p in b)y.call(b,p)&&(S[p]=b[p]);function d(){this.constructor=S}return d.prototype=b.prototype,S.prototype=new d,S.__super__=b.prototype,S},y={}.hasOwnProperty;C=F("./XMLNode"),N=F("./NodeType"),Q.exports=v=function(m){k(S,m);function S(b,p,d){if(S.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());d||(d="(#PCDATA)"),Array.isArray(d)&&(d="("+d.join(",")+")"),this.name=this.stringify.name(p),this.type=N.ElementDeclaration,this.value=this.stringify.dtdElementValue(d)}return S.prototype.toString=function(b){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(b))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(F,Q,j){"use strict";(function(){var N,v,C,k,y=function(b,p){for(var d in p)m.call(p,d)&&(b[d]=p[d]);function t(){this.constructor=b}return t.prototype=p.prototype,b.prototype=new t,b.__super__=p.prototype,b},m={}.hasOwnProperty;k=F("./Utility").isObject,C=F("./XMLNode"),N=F("./NodeType"),Q.exports=v=function(S){y(b,S);function b(p,d,t,l){if(b.__super__.constructor.call(this,p),t==null)throw new Error("Missing DTD entity name. "+this.debugInfo(t));if(l==null)throw new Error("Missing DTD entity value. "+this.debugInfo(t));if(this.pe=!!d,this.name=this.stringify.name(t),this.type=N.EntityDeclaration,!k(l))this.value=this.stringify.dtdEntityValue(l),this.internal=!0;else{if(!l.pubID&&!l.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(t));if(l.pubID&&!l.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(t));if(this.internal=!1,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID)),l.nData!=null&&(this.nData=this.stringify.dtdNData(l.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(t))}}return Object.defineProperty(b.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(b.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(b.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(b.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(b.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(b.prototype,"xmlVersion",{get:function(){return null}}),b.prototype.toString=function(p){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(p))},b}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(F,Q,j){"use strict";(function(){var N,v,C,k=function(S,b){for(var p in b)y.call(b,p)&&(S[p]=b[p]);function d(){this.constructor=S}return d.prototype=b.prototype,S.prototype=new d,S.__super__=b.prototype,S},y={}.hasOwnProperty;C=F("./XMLNode"),N=F("./NodeType"),Q.exports=v=function(m){k(S,m);function S(b,p,d){if(S.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD notation name. "+this.debugInfo(p));if(!d.pubID&&!d.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(p));this.name=this.stringify.name(p),this.type=N.NotationDeclaration,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID))}return Object.defineProperty(S.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(S.prototype,"systemId",{get:function(){return this.sysID}}),S.prototype.toString=function(b){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(b))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(F,Q,j){"use strict";(function(){var N,v,C,k,y=function(b,p){for(var d in p)m.call(p,d)&&(b[d]=p[d]);function t(){this.constructor=b}return t.prototype=p.prototype,b.prototype=new t,b.__super__=p.prototype,b},m={}.hasOwnProperty;k=F("./Utility").isObject,C=F("./XMLNode"),N=F("./NodeType"),Q.exports=v=function(S){y(b,S);function b(p,d,t,l){var r;b.__super__.constructor.call(this,p),k(d)&&(r=d,d=r.version,t=r.encoding,l=r.standalone),d||(d="1.0"),this.type=N.Declaration,this.version=this.stringify.xmlVersion(d),t!=null&&(this.encoding=this.stringify.xmlEncoding(t)),l!=null&&(this.standalone=this.stringify.xmlStandalone(l))}return b.prototype.toString=function(p){return this.options.writer.declaration(this,this.options.writer.filterOptions(p))},b}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(F,Q,j){"use strict";(function(){var N,v,C,k,y,m,S,b,p,d=function(r,i){for(var o in i)t.call(i,o)&&(r[o]=i[o]);function s(){this.constructor=r}return s.prototype=i.prototype,r.prototype=new s,r.__super__=i.prototype,r},t={}.hasOwnProperty;p=F("./Utility").isObject,b=F("./XMLNode"),N=F("./NodeType"),v=F("./XMLDTDAttList"),k=F("./XMLDTDEntity"),C=F("./XMLDTDElement"),y=F("./XMLDTDNotation"),S=F("./XMLNamedNodeMap"),Q.exports=m=function(l){d(r,l);function r(i,o,s){var c,a,u,f,w,_;if(r.__super__.constructor.call(this,i),this.type=N.DocType,i.children){for(f=i.children,a=0,u=f.length;a=0;)this.up();return this.onEnd()},g.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},g.prototype.openNode=function(x){var E,T,M,L;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===N.Element&&(this.root=x),T="",x.type===N.Element){this.writerOptions.state=v.OpenTag,T=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,L=x.attribs;for(M in L){if(!O.call(L,M))continue;E=L[M],T+=this.writer.attribute(E,this.writerOptions,this.currentLevel)}T+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=v.InsideTag}else this.writerOptions.state=v.OpenTag,T=this.writer.indent(x,this.writerOptions,this.currentLevel)+""),T+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),x.isOpen=!0}},g.prototype.closeNode=function(x){var E;if(!x.isClosed)return E="",this.writerOptions.state=v.CloseTag,x.type===N.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=v.None,this.onData(E,this.currentLevel),x.isClosed=!0},g.prototype.onData=function(x,E){return this.documentStarted=!0,this.onDataCallback(x,E+1)},g.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},g.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},g.prototype.ele=function(){return this.element.apply(this,arguments)},g.prototype.nod=function(x,E,T){return this.node(x,E,T)},g.prototype.txt=function(x){return this.text(x)},g.prototype.dat=function(x){return this.cdata(x)},g.prototype.com=function(x){return this.comment(x)},g.prototype.ins=function(x,E){return this.instruction(x,E)},g.prototype.dec=function(x,E,T){return this.declaration(x,E,T)},g.prototype.dtd=function(x,E,T){return this.doctype(x,E,T)},g.prototype.e=function(x,E,T){return this.element(x,E,T)},g.prototype.n=function(x,E,T){return this.node(x,E,T)},g.prototype.t=function(x){return this.text(x)},g.prototype.d=function(x){return this.cdata(x)},g.prototype.c=function(x){return this.comment(x)},g.prototype.r=function(x){return this.raw(x)},g.prototype.i=function(x,E){return this.instruction(x,E)},g.prototype.att=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},g.prototype.a=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},g.prototype.ent=function(x,E){return this.entity(x,E)},g.prototype.pent=function(x,E){return this.pEntity(x,E)},g.prototype.not=function(x,E){return this.notation(x,E)},g}()}).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(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=C(N);function C(k){return k&&k.__esModule?k:{default:k}}(function(){var k,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;m=F("./XMLNode"),k=F("./NodeType"),Q.exports=y=function(p){S(d,p);function d(t){d.__super__.constructor.call(this,t),this.type=k.Dummy}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return""},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=C(N);function C(k){return k&&k.__esModule?k:{default:k}}(function(){var k,y,m,S,b,p,d,t,l,r=function(s,c){for(var a in c)i.call(c,a)&&(s[a]=c[a]);function u(){this.constructor=s}return u.prototype=c.prototype,s.prototype=new u,s.__super__=c.prototype,s},i={}.hasOwnProperty;l=F("./Utility"),t=l.isObject,d=l.isFunction,p=l.getValue,b=F("./XMLNode"),k=F("./NodeType"),y=F("./XMLAttribute"),S=F("./XMLNamedNodeMap"),Q.exports=m=function(o){r(s,o);function s(c,a,u){var f,w,_,h;if(s.__super__.constructor.call(this,c),a==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(a),this.type=k.Element,this.attribs={},this.schemaTypeInfo=null,u!=null&&this.attribute(u),c.type===k.Document&&(this.isRoot=!0,this.documentObject=c,c.rootObject=this,c.children)){for(h=c.children,w=0,_=h.length;w<_;w++)if(f=h[w],f.type===k.DocType){f.name=this.name;break}}}return Object.defineProperty(s.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(s.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(s.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(s.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(s.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new S(this.attribs)),this.attributeMap}}),s.prototype.clone=function(){var c,a,u,f;u=(0,v.default)(this),u.isRoot&&(u.documentObject=null),u.attribs={},f=this.attribs;for(a in f){if(!i.call(f,a))continue;c=f[a],u.attribs[a]=c.clone()}return u.children=[],this.children.forEach(function(w){var _;return _=w.clone(),_.parent=u,u.children.push(_)}),u},s.prototype.attribute=function(c,a){var u,f;if(c!=null&&(c=p(c)),t(c))for(u in c){if(!i.call(c,u))continue;f=c[u],this.attribute(u,f)}else d(a)&&(a=a.apply()),this.options.keepNullAttributes&&a==null?this.attribs[c]=new y(this,c,""):a!=null&&(this.attribs[c]=new y(this,c,a));return this},s.prototype.removeAttribute=function(c){var a,u,f;if(c==null)throw new Error("Missing attribute name. "+this.debugInfo());if(c=p(c),Array.isArray(c))for(u=0,f=c.length;u=f;a=0<=f?++u:--u)if(!this.attribs[a].isEqualNode(c.attribs[a]))return!1;return!0},s}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(F,Q,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=C(N);function C(k){return k&&k.__esModule?k:{default:k}}(function(){var k;Q.exports=k=function(){function y(m){this.nodes=m}return Object.defineProperty(y.prototype,"length",{get:function(){return(0,v.default)(this.nodes).length||0}}),y.prototype.clone=function(){return this.nodes=null},y.prototype.getNamedItem=function(m){return this.nodes[m]},y.prototype.setNamedItem=function(m){var S;return S=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,S||null},y.prototype.removeNamedItem=function(m){var S;return S=this.nodes[m],delete this.nodes[m],S||null},y.prototype.item=function(m){return this.nodes[(0,v.default)(this.nodes)[m]]||null},y.prototype.getNamedItemNS=function(m,S){throw new Error("This DOM method is not implemented.")},y.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},y.prototype.removeNamedItemNS=function(m,S){throw new Error("This DOM method is not implemented.")},y}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(F,Q,j){"use strict";(function(){var N,v,C,k,y,m,S,b,p,d,t,l,r,i,o,s,c,a,u,f={}.hasOwnProperty;u=F("./Utility"),a=u.isObject,c=u.isFunction,s=u.isEmpty,o=u.getValue,b=null,C=null,k=null,y=null,m=null,r=null,i=null,l=null,S=null,v=null,t=null,p=null,N=null,Q.exports=d=function(){function w(_){this.parent=_,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,b||(b=F("./XMLElement"),C=F("./XMLCData"),k=F("./XMLComment"),y=F("./XMLDeclaration"),m=F("./XMLDocType"),r=F("./XMLRaw"),i=F("./XMLText"),l=F("./XMLProcessingInstruction"),S=F("./XMLDummy"),v=F("./NodeType"),t=F("./XMLNodeList"),p=F("./XMLNamedNodeMap"),N=F("./DocumentPosition"))}return Object.defineProperty(w.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(w.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(w.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(w.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(w.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new t(this.children)),this.childNodeList}}),Object.defineProperty(w.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(w.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(w.prototype,"previousSibling",{get:function(){var h;return h=this.parent.children.indexOf(this),this.parent.children[h-1]||null}}),Object.defineProperty(w.prototype,"nextSibling",{get:function(){var h;return h=this.parent.children.indexOf(this),this.parent.children[h+1]||null}}),Object.defineProperty(w.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(w.prototype,"textContent",{get:function(){var h,R,O,g,x;if(this.nodeType===v.Element||this.nodeType===v.DocumentFragment){for(x="",g=this.children,R=0,O=g.length;R":((R=this.parent)!=null?R.name:void 0)?"node: <"+_+">, parent: <"+this.parent.name+">":"node: <"+_+">"},w.prototype.ele=function(_,h,R){return this.element(_,h,R)},w.prototype.nod=function(_,h,R){return this.node(_,h,R)},w.prototype.txt=function(_){return this.text(_)},w.prototype.dat=function(_){return this.cdata(_)},w.prototype.com=function(_){return this.comment(_)},w.prototype.ins=function(_,h){return this.instruction(_,h)},w.prototype.doc=function(){return this.document()},w.prototype.dec=function(_,h,R){return this.declaration(_,h,R)},w.prototype.e=function(_,h,R){return this.element(_,h,R)},w.prototype.n=function(_,h,R){return this.node(_,h,R)},w.prototype.t=function(_){return this.text(_)},w.prototype.d=function(_){return this.cdata(_)},w.prototype.c=function(_){return this.comment(_)},w.prototype.r=function(_){return this.raw(_)},w.prototype.i=function(_,h){return this.instruction(_,h)},w.prototype.u=function(){return this.up()},w.prototype.importXMLBuilder=function(_){return this.importDocument(_)},w.prototype.replaceChild=function(_,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.removeChild=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendChild=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.hasChildNodes=function(){return this.children.length!==0},w.prototype.cloneNode=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isSupported=function(_,h){return!0},w.prototype.hasAttributes=function(){return this.attribs.length!==0},w.prototype.compareDocumentPosition=function(_){var h,R;return h=this,h===_?0:this.document()!==_.document()?(R=N.Disconnected|N.ImplementationSpecific,Math.random()<.5?R|=N.Preceding:R|=N.Following,R):h.isAncestor(_)?N.Contains|N.Preceding:h.isDescendant(_)?N.Contains|N.Following:h.isPreceding(_)?N.Preceding:N.Following},w.prototype.isSameNode=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupPrefix=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isDefaultNamespace=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupNamespaceURI=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(_){var h,R,O;if(_.nodeType!==this.nodeType)return!1;if(_.children.length!==this.children.length)return!1;for(h=R=0,O=this.children.length-1;0<=O?R<=O:R>=O;h=0<=O?++R:--R)if(!this.children[h].isEqualNode(_.children[h]))return!1;return!0},w.prototype.getFeature=function(_,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.setUserData=function(_,h,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getUserData=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.contains=function(_){return _?_===this||this.isDescendant(_):!1},w.prototype.isDescendant=function(_){var h,R,O,g,x;for(x=this.children,O=0,g=x.length;OR},w.prototype.treePosition=function(_){var h,R;return R=0,h=!1,this.foreachTreeNode(this.document(),function(O){if(R++,!h&&O===_)return h=!0}),h?R:-1},w.prototype.foreachTreeNode=function(_,h){var R,O,g,x,E;for(_||(_=this.document()),x=_.children,O=0,g=x.length;O0){for(this.stream.write(" ["),this.stream.write(this.endline(p,d,t)),d.state=v.InsideTag,o=p.children,r=0,i=o.length;r"),this.stream.write(this.endline(p,d,t)),d.state=v.None,this.closeNode(p,d,t)},b.prototype.element=function(p,d,t){var l,r,i,o,s,c,a,u,f,w;t||(t=0),this.openNode(p,d,t),d.state=v.OpenTag,this.stream.write(this.indent(p,d,t)+"<"+p.name),f=p.attribs;for(a in f){if(!m.call(f,a))continue;l=f[a],this.attribute(l,d,t)}if(i=p.children.length,o=i===0?null:p.children[0],i===0||p.children.every(function(_){return(_.type===N.Text||_.type===N.Raw)&&_.value===""}))d.allowEmpty?(this.stream.write(">"),d.state=v.CloseTag,this.stream.write("")):(d.state=v.CloseTag,this.stream.write(d.spaceBeforeSlash+"/>"));else if(d.pretty&&i===1&&(o.type===N.Text||o.type===N.Raw)&&o.value!=null)this.stream.write(">"),d.state=v.InsideTag,d.suppressPrettyCount++,u=!0,this.writeChildNode(o,d,t+1),d.suppressPrettyCount--,u=!1,d.state=v.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(p,d,t)),d.state=v.InsideTag,w=p.children,s=0,c=w.length;s")}return this.stream.write(this.endline(p,d,t)),d.state=v.None,this.closeNode(p,d,t)},b.prototype.processingInstruction=function(p,d,t){return this.stream.write(b.__super__.processingInstruction.call(this,p,d,t))},b.prototype.raw=function(p,d,t){return this.stream.write(b.__super__.raw.call(this,p,d,t))},b.prototype.text=function(p,d,t){return this.stream.write(b.__super__.text.call(this,p,d,t))},b.prototype.dtdAttList=function(p,d,t){return this.stream.write(b.__super__.dtdAttList.call(this,p,d,t))},b.prototype.dtdElement=function(p,d,t){return this.stream.write(b.__super__.dtdElement.call(this,p,d,t))},b.prototype.dtdEntity=function(p,d,t){return this.stream.write(b.__super__.dtdEntity.call(this,p,d,t))},b.prototype.dtdNotation=function(p,d,t){return this.stream.write(b.__super__.dtdNotation.call(this,p,d,t))},b}(k)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(F,Q,j){"use strict";(function(){var N,v,C=function(m,S){for(var b in S)k.call(S,b)&&(m[b]=S[b]);function p(){this.constructor=m}return p.prototype=S.prototype,m.prototype=new p,m.__super__=S.prototype,m},k={}.hasOwnProperty;v=F("./XMLWriterBase"),Q.exports=N=function(y){C(m,y);function m(S){m.__super__.constructor.call(this,S)}return m.prototype.document=function(S,b){var p,d,t,l,r;for(b=this.filterOptions(b),l="",r=S.children,d=0,t=r.length;d","]]]]>"),this.assertLegalChar(y))},k.prototype.comment=function(y){if(this.options.noValidation)return y;if(y=""+y||"",y.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+y);return this.assertLegalChar(y)},k.prototype.raw=function(y){return this.options.noValidation?y:""+y||""},k.prototype.attValue=function(y){return this.options.noValidation?y:this.assertLegalChar(this.attEscape(y=""+y||""))},k.prototype.insTarget=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.insValue=function(y){if(this.options.noValidation)return y;if(y=""+y||"",y.match(/\?>/))throw new Error("Invalid processing instruction value: "+y);return this.assertLegalChar(y)},k.prototype.xmlVersion=function(y){if(this.options.noValidation)return y;if(y=""+y||"",!y.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+y);return y},k.prototype.xmlEncoding=function(y){if(this.options.noValidation)return y;if(y=""+y||"",!y.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+y);return this.assertLegalChar(y)},k.prototype.xmlStandalone=function(y){return this.options.noValidation?y:y?"yes":"no"},k.prototype.dtdPubID=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdSysID=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdElementValue=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdAttType=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdAttDefault=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdEntityValue=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdNData=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.convertAttKey="@",k.prototype.convertPIKey="?",k.prototype.convertTextKey="#text",k.prototype.convertCDataKey="#cdata",k.prototype.convertCommentKey="#comment",k.prototype.convertRawKey="#raw",k.prototype.assertLegalChar=function(y){var m,S;if(this.options.noValidation)return y;if(m="",this.options.version==="1.0"){if(m=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=y.match(m))throw new Error("Invalid character in string: "+y+" at index "+S.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=y.match(m)))throw new Error("Invalid character in string: "+y+" at index "+S.index);return y},k.prototype.assertLegalName=function(y){var m;if(this.options.noValidation)return y;if(this.assertLegalChar(y),m=/^([: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])*$/,!y.match(m))throw new Error("Invalid character in name");return y},k.prototype.textEscape=function(y){var m;return this.options.noValidation?y:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,y.replace(m,"&").replace(//g,">").replace(/\r/g," "))},k.prototype.attEscape=function(y){var m;return this.options.noValidation?y:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,y.replace(m,"&").replace(/0)?new Array(h).join(w.indent):""},u.prototype.endline=function(f,w,_){return!w.pretty||w.suppressPrettyCount?"":w.newline},u.prototype.attribute=function(f,w,_){var h;return this.openAttribute(f,w,_),h=" "+f.name+'="'+f.value+'"',this.closeAttribute(f,w,_),h},u.prototype.cdata=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},u.prototype.comment=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},u.prototype.declaration=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"",h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},u.prototype.docType=function(f,w,_){var h,R,O,g,x;if(_||(_=0),this.openNode(f,w,_),w.state=v.OpenTag,g=this.indent(f,w,_),g+="0){for(g+=" [",g+=this.endline(f,w,_),w.state=v.InsideTag,x=f.children,R=0,O=x.length;R",g+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),g},u.prototype.element=function(f,w,_){var h,R,O,g,x,E,T,M,L,A,V,z,W,G;_||(_=0),A=!1,V="",this.openNode(f,w,_),w.state=v.OpenTag,V+=this.indent(f,w,_)+"<"+f.name,z=f.attribs;for(L in z){if(!a.call(z,L))continue;h=z[L],V+=this.attribute(h,w,_)}if(O=f.children.length,g=O===0?null:f.children[0],O===0||f.children.every(function(U){return(U.type===N.Text||U.type===N.Raw)&&U.value===""}))w.allowEmpty?(V+=">",w.state=v.CloseTag,V+=""+this.endline(f,w,_)):(w.state=v.CloseTag,V+=w.spaceBeforeSlash+"/>"+this.endline(f,w,_));else if(w.pretty&&O===1&&(g.type===N.Text||g.type===N.Raw)&&g.value!=null)V+=">",w.state=v.InsideTag,w.suppressPrettyCount++,A=!0,V+=this.writeChildNode(g,w,_+1),w.suppressPrettyCount--,A=!1,w.state=v.CloseTag,V+=""+this.endline(f,w,_);else{if(w.dontPrettyTextNodes){for(W=f.children,x=0,T=W.length;x"+this.endline(f,w,_),w.state=v.InsideTag,G=f.children,E=0,M=G.length;E",A&&w.suppressPrettyCount--,V+=this.endline(f,w,_),w.state=v.None}return this.closeNode(f,w,_),V},u.prototype.writeChildNode=function(f,w,_){switch(f.type){case N.CData:return this.cdata(f,w,_);case N.Comment:return this.comment(f,w,_);case N.Element:return this.element(f,w,_);case N.Raw:return this.raw(f,w,_);case N.Text:return this.text(f,w,_);case N.ProcessingInstruction:return this.processingInstruction(f,w,_);case N.Dummy:return"";case N.Declaration:return this.declaration(f,w,_);case N.DocType:return this.docType(f,w,_);case N.AttributeDeclaration:return this.dtdAttList(f,w,_);case N.ElementDeclaration:return this.dtdElement(f,w,_);case N.EntityDeclaration:return this.dtdEntity(f,w,_);case N.NotationDeclaration:return this.dtdNotation(f,w,_);default:throw new Error("Unknown XML node type: "+f.constructor.name)}},u.prototype.processingInstruction=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"",h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},u.prototype.raw=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_),w.state=v.InsideTag,h+=f.value,w.state=v.CloseTag,h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},u.prototype.text=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_),w.state=v.InsideTag,h+=f.value,w.state=v.CloseTag,h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},u.prototype.dtdAttList=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},u.prototype.dtdElement=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},u.prototype.dtdEntity=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},u.prototype.dtdNotation=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},u.prototype.openNode=function(f,w,_){},u.prototype.closeNode=function(f,w,_){},u.prototype.openAttribute=function(f,w,_){},u.prototype.closeAttribute=function(f,w,_){},u}()}).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(F,Q,j){"use strict";(function(){var N,v,C,k,y,m,S,b,p,d;d=F("./Utility"),b=d.assign,p=d.isFunction,C=F("./XMLDOMImplementation"),k=F("./XMLDocument"),y=F("./XMLDocumentCB"),S=F("./XMLStringWriter"),m=F("./XMLStreamWriter"),N=F("./NodeType"),v=F("./WriterState"),Q.exports.create=function(t,l,r,i){var o,s;if(t==null)throw new Error("Root element needs a name.");return i=b({},l,r,i),o=new k(i),s=o.element(t),i.headless||(o.declaration(i),(i.pubID!=null||i.sysID!=null)&&o.dtd(i)),s},Q.exports.begin=function(t,l,r){var i;return p(t)&&(i=[t,l],l=i[0],r=i[1],t={}),l?new y(t,l,r):new k(t)},Q.exports.stringWriter=function(t){return new S(t)},Q.exports.streamWriter=function(t,l){return new m(t,l)},Q.exports.implementation=new C,Q.exports.nodeType=N,Q.exports.writerState=v}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(F,Q,j){Q.exports=v;var N=Object.prototype.hasOwnProperty;function v(){for(var C={},k=0;ky?t=d(t):t.length>5]|=128<>>9<<4)+14]=l;for(var r=1732584193,i=-271733879,o=-1732584194,s=271733878,c=0;c>16)+(l>>16)+(r>>16);return i<<16|r&65535}function d(t,l){return t<>>32-l}Q.exports=function(l){return N.hash(l,C,16)}},{"./helpers":285}],287:[function(F,Q,j){"use strict";var N=F("./helpers");function v(S,b){S[b>>5]|=128<<24-b%32,S[(b+64>>9<<4)+15]=b;for(var p=Array(80),d=1732584193,t=-271733879,l=-1732584194,r=271733878,i=-1009589776,o=0;o>16)+(b>>16)+(p>>16);return d<<16|p&65535}function m(S,b){return S<>>32-b}Q.exports=function(b){return N.hash(b,v,20,!0)}},{"./helpers":285}],288:[function(F,Q,j){"use strict";Q.exports=function(){return function(){}}},{}],289:[function(F,Q,j){(function(N){"use strict";var v=F("babel-runtime/helpers/typeof"),C=k(v);function k(d){return d&&d.__esModule?d:{default:d}}var y=F("stream"),m=y.Stream,S=F("../lib/common/utils/isArray"),b=S.isArray;Q.exports.string=function(t){return typeof t=="string"},Q.exports.array=b,Q.exports.buffer=N.isBuffer;function p(d){return d instanceof m}Q.exports.writableStream=function(t){return p(t)&&typeof t._write=="function"&&(0,C.default)(t._writableState)==="object"}}).call(this,{isBuffer:F("../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(F,Q,j){"use strict";j.encodeURIComponent=function(N){try{return encodeURIComponent(N)}catch(v){return N}},j.escape=F("escape-html"),j.timestamp=function(v){if(v){var C=v;return typeof C=="string"&&(C=Number(C)),String(v).length===10&&(C*=1e3),new Date(C)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(F,Q,j){(function(N,v){"use strict";var C=F("babel-runtime/core-js/json/stringify"),k=S(C),y=F("babel-runtime/helpers/typeof"),m=S(y);function S(w){return w&&w.__esModule?w:{default:w}}var b=F("util"),p=F("url"),d=F("http"),t=F("https"),l=F("debug")("urllib"),r=F("humanize-ms"),i,o=0,s=Math.pow(2,31)-10,c=/^https?:\/\//i;function a(w,_){return w===void 0?_:w}function u(w,_){return function(h,R,O){if(h)return _(h);w({data:R,status:O.statusCode,headers:O.headers,res:O})}}j.TIMEOUTS=[r("300s"),r("300s")];var f=["json","text"];j.request=function(_,h,R){return arguments.length===2&&typeof h=="function"&&(R=h,h=null),typeof R=="function"?j.requestWithCallback(_,h,R):(i||(i=F("any-promise")),new i(function(O,g){j.requestWithCallback(_,h,u(O,g))}))},j.requestWithCallback=function(_,h,R){if(!_||typeof _!="string"&&(typeof _=="undefined"?"undefined":(0,m.default)(_))!=="object"){var O=b.format("expect request url to be a string or a http request options, but got %j",_);throw new Error(O)}arguments.length===2&&typeof h=="function"&&(R=h,h=null),h=h||{},o>=s&&(o=0);var g=++o;h.requestUrls=h.requestUrls||[];var x={requestId:g,url:_,args:h,ctx:h.ctx};h.emitter&&h.emitter.emit("request",x),h.timeout=h.timeout||j.TIMEOUTS,h.maxRedirects=h.maxRedirects||10,h.streaming=h.streaming||h.customResponse;var E=Date.now(),T;typeof _=="string"?(c.test(_)||(_="http://"+_),T=p.parse(_)):T=_;var M=(h.type||h.method||T.method||"GET").toUpperCase(),L=T.port||80,A=d,V=a(h.agent,j.agent),z=h.fixJSONCtlChars;T.protocol==="https:"&&(A=t,V=a(h.httpsAgent,j.httpsAgent),T.port||(L=443));var W={host:T.hostname||T.host||"localhost",path:T.path||"/",method:M,port:L,agent:V,headers:h.headers||{},lookup:h.lookup};Array.isArray(h.timeout)?W.requestTimeout=h.timeout[h.timeout.length-1]:typeof h.timeout!="undefined"&&(W.requestTimeout=h.timeout);for(var G=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U=0)return l("Request#%d %s: got digest auth header WWW-Authenticate: %s",g,_,Ne),h.headers=h.headers||{},h.headers.Authorization=digestAuthHeader(W.method,W.path,Ne,h.digestAuth),l("Request#%d %s: auth with digest header: %s",g,_,h.headers.Authorization),ot.headers["set-cookie"]&&(h.headers.Cookie=ot.headers["set-cookie"].join(";")),j.requestWithCallback(_,h,ze)}var Ae=Date.now()-E;oe&&(oe.contentDownload=Ae),l("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ae,ie,Se,W.method,W.host,W.path,ue,oe);var Me={status:Se,statusCode:Se,headers:Ze,size:ie,aborted:ne,rt:Ae,keepAliveSocket:ue,data:tt,requestUrls:h.requestUrls,timing:oe,remoteAddress:ce,remotePort:Oe};if(Ie){var Ee="";V&&typeof V.getCurrentStatus=="function"&&(Ee=", agent status: "+(0,k.default)(V.getCurrentStatus())),Ie.message+=", "+W.method+" "+_+" "+Se+" (connected: "+he+", keepalive socket: "+ue+Ee+`) headers: `+(0,k.default)(Ze),Ie.data=tt,Ie.path=W.path,Ie.status=Se,Ie.headers=Ze,Ie.res=Me}ze(Ie,tt,h.streaming?ot:Me),h.emitter&&(x.url=_,x.socket=lt&<.connection,x.options=W,x.size=ge,h.emitter.emit("response",{requestId:g,error:Ie,ctx:h.ctx,req:x,res:Me}))}function ye(Ie){var tt=null;if(h.followRedirect&&statuses.redirect[Ie.statusCode]){h._followRedirectCount=(h._followRedirectCount||0)+1;var ot=Ie.headers.location;if(!ot)tt=new Error("Got statusCode "+Ie.statusCode+" but cannot resolve next location from headers"),tt.name="FollowRedirectError";else if(h._followRedirectCount>h.maxRedirects)tt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+_),tt.name="MaxRedirectError";else{var ze=h.formatRedirectUrl?h.formatRedirectUrl(_,ot):p.resolve(_,ot);l("Request#%d %s: `redirected` from %s to %s",g,W.path,_,ze),Y(),h.headers&&h.headers.Host&&c.test(ot)&&(h.headers.Host=null);var Ze=R;return R=null,j.requestWithCallback(ze,h,Ze),{redirect:!0,error:null}}}return{redirect:!1,error:tt}}!W.headers["User-Agent"]&&!W.headers["user-agent"]&&(W.headers["User-Agent"]=navigator.userAgent),h.gzip&&(!W.headers["Accept-Encoding"]&&!W.headers["accept-encoding"]&&(W.headers["Accept-Encoding"]="gzip"));function be(Ie,tt,ot){var ze=Ie.headers["content-encoding"];return ot(null,tt,ze)}var Re=h.writeStream;l("Request#%d %s %s with headers %j, options.path: %s",g,M,_,W.headers,W.path),h.requestUrls.push(_);function Qe(Ie){if(oe&&(oe.waiting=Date.now()-E),l("Request#%d %s `req response` event emit: status %d, headers: %j",g,_,Ie.statusCode,Ie.headers),h.streaming){var tt=ye(Ie);if(tt.redirect){Ie.resume();return}return tt.error?(Ie.resume(),Z(tt.error,null,Ie)):Z(null,null,Ie)}if(Ie.on("close",function(){l("Request#%d %s: `res close` event emit, total size %d",g,_,ie)}),Ie.on("error",function(){l("Request#%d %s: `res error` event emit, total size %d",g,_,ie)}),Ie.on("aborted",function(){ne=!0,l("Request#%d %s: `res aborted` event emit, total size %d",g,_,ie)}),Re){var tt=ye(Ie);if(tt.redirect){Ie.resume();return}return tt.error?(Ie.resume(),Re.end(),Z(tt.error,null,Ie)):(h.consumeWriteStream===!1?Ie.on("end",Z.bind(null,null,null,Ie)):isNode010||isNode012?first([[Re,"close"],[Ie,"aborted"]],function(Ze,Ne,Ae){l("Request#%d %s: writeStream or res %s event emitted",g,_,Ae),Z(Te||null,null,Ie)}):Re.on("close",function(){l("Request#%d %s: writeStream close event emitted",g,_),Z(Te||null,null,Ie)}),Ie.pipe(Re))}var ot=[];Ie.on("data",function(ze){l("Request#%d %s: `res data` event emit, size %d",g,_,ze.length),ie+=ze.length,ot.push(ze)}),Ie.on("end",function(){var ze=v.concat(ot,ie);if(l("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",g,_,ie,Ie._dumped),Te)return Z(Te,ze,Ie);var Ze=ye(Ie);if(Ze.error)return Z(Ze.error,ze,Ie);if(Ze.redirect)return;be(Ie,ze,function(Ne,Ae,Me){if(Ne)return Z(Ne,ze,Ie);if(!Me&&f.indexOf(h.dataType)>=0){try{Ae=decodeBodyByCharset(Ae,Ie)}catch(Ce){return l("decodeBodyByCharset error: %s",Ce),Z(null,Ae,Ie)}if(h.dataType==="json")if(ie===0)Ae=null;else{var Ee=parseJSON(Ae,z);Ee.error?Ne=Ee.error:Ae=Ee.data}}ne&&l("Request#%d %s: Remote socket was terminated before `response.end()` was called",g,_),Z(Ne,Ae,Ie)})})}var rt,at;Array.isArray(h.timeout)?(rt=r(h.timeout[0]),at=r(h.timeout[1])):rt=at=r(h.timeout),l("ConnectTimeout: %d, ResponseTimeout: %d",rt,at);function qe(){l("Connect timer ticking, timeout: %d",rt),de=setTimeout(function(){de=null,Se===-1&&(Se=-2);var Ie="Connect timeout for "+rt+"ms",tt="ConnectionTimeoutError";lt.socket||(tt="SocketAssignTimeoutError",Ie+=", working sockets is full"),Te=new Error(Ie),Te.name=tt,Te.requestId=g,l("ConnectTimeout: Request#%d %s %s: %s, connected: %s",g,_,Te.name,Ie,he),je()},rt)}function st(){l("Response timer ticking, timeout: %d",at),De=setTimeout(function(){De=null;var Ie="Response timeout for "+at+"ms",tt="ResponseTimeoutError";Te=new Error(Ie),Te.name=tt,Te.requestId=g,l("ResponseTimeout: Request#%d %s %s: %s, connected: %s",g,_,Te.name,Ie,he),je()},at)}var lt;W.mode=h.mode?h.mode:"";try{lt=A.request(W,Qe)}catch(Ie){return Z(Ie)}typeof window=="undefined"?qe():lt.on("requestTimeout",function(){Se===-1&&(Se=-2);var Ie="Connect timeout for "+rt+"ms",tt="ConnectionTimeoutError";Te=new Error(Ie),Te.name=tt,Te.requestId=g,je()});function je(){l("Request#%d %s abort, connected: %s",g,_,he),lt.socket||(Te.noSocket=!0,Z(Te)),lt.abort()}return oe&<.on("finish",function(){oe.requestSent=Date.now()-E}),lt.once("socket",function(Ie){oe&&(oe.queuing=Date.now()-E),isNode010&&Ie.socket&&(Ie=Ie.socket);var tt=Ie.readyState;if(tt==="opening"){Ie.once("lookup",function(ot,ze,Ze){l("Request#%d %s lookup: %s, %s, %s",g,_,ot,ze,Ze),oe&&(oe.dnslookup=Date.now()-E),ze&&(ce=ze)}),Ie.once("connect",function(){oe&&(oe.connected=Date.now()-E),q(),st(),l("Request#%d %s new socket connected",g,_),he=!0,ce||(ce=Ie.remoteAddress),Oe=Ie.remotePort});return}l("Request#%d %s reuse socket connected, readyState: %s",g,_,tt),he=!0,ue=!0,ce||(ce=Ie.remoteAddress),Oe=Ie.remotePort,q(),st()}),lt.on("error",function(Ie){(Ie.name==="Error"||Ie.name==="TypeError")&&(Ie.name=he?"ResponseError":"RequestError"),Ie.message+=' (req "error")',l("Request#%d %s `req error` event emit, %s: %s",g,_,Ie.name,Ie.message),Z(Te||Ie)}),Re&&Re.once("error",function(Ie){Ie.message+=' (writeStream "error")',Te=Ie,l("Request#%d %s `writeStream error` event emit, %s: %s",g,_,Ie.name,Ie.message),je()}),h.stream?(h.stream.pipe(lt),h.stream.once("error",function(Ie){Ie.message+=' (stream "error")',Te=Ie,l("Request#%d %s `readStream error` event emit, %s: %s",g,_,Ie.name,Ie.message),je()})):lt.end($),lt.requestId=g,lt}}).call(this,F("_process"),F("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(F,Q,j){"use strict";j.d(Q,"a",function(){return b});var N=j("cDcd"),v=j("biw7"),C=j("fyJ8");function k(p){var d=p.className,t=p.index,l=p.children,r=p.colSpan,i=p.rowSpan,o=N.useContext(v.a),s=o.prefixCls,c=o.fixedInfoList,a=c[t];return N.createElement(C.a,Object.assign({className:d,index:t,component:"td",prefixCls:s,record:null,dataIndex:null,render:function(){return{children:l,props:{colSpan:r,rowSpan:i}}}},a))}function y(p){return N.createElement("tr",Object.assign({},p))}function m(p){var d=p.children,t=N.useContext(v.a),l=t.prefixCls;return N.createElement("tfoot",{className:"".concat(l,"-summary")},d)}var S=Q.b=m,b={Cell:k,Row:y}},nj2k:function(F,Q,j){F.exports=j.p+"static/nodata.c3b0b86c.svg"},oRuE:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.Iso10126={pad:function(v,C){var k=C*4,y=k-v.sigBytes%k;v.concat(N.lib.WordArray.random(y-1)).concat(N.lib.WordArray.create([y<<24],1))},unpad:function(v){var C=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=C}},N.pad.Iso10126})},osHv:function(F,Q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";var v=N.Pos;function C(c,a){return c.line-a.line||c.ch-a.ch}var k="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",y=k+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+k+"]["+y+"]*)","g");function S(c,a,u,f){this.line=a,this.ch=u,this.cm=c,this.text=c.getLine(a),this.min=f?Math.max(f.from,c.firstLine()):c.firstLine(),this.max=f?Math.min(f.to-1,c.lastLine()):c.lastLine()}function b(c,a){var u=c.cm.getTokenTypeAt(v(c.line,a));return u&&/\btag\b/.test(u)}function p(c){return c.line>=c.max?void 0:(c.ch=0,c.text=c.cm.getLine(++c.line),!0)}function d(c){return c.line<=c.min?void 0:(c.text=c.cm.getLine(--c.line),c.ch=c.text.length,!0)}function t(c){for(;;){var a=c.text.indexOf(">",c.ch);if(a==-1){if(p(c))continue;return}if(!b(c,a+1)){c.ch=a+1;continue}var u=c.text.lastIndexOf("/",a),f=u>-1&&!/\S/.test(c.text.slice(u+1,a));return c.ch=a+1,f?"selfClose":"regular"}}function l(c){for(;;){var a=c.ch?c.text.lastIndexOf("<",c.ch-1):-1;if(a==-1){if(d(c))continue;return}if(!b(c,a+1)){c.ch=a;continue}m.lastIndex=a,c.ch=a;var u=m.exec(c.text);if(u&&u.index==a)return u}}function r(c){for(;;){m.lastIndex=c.ch;var a=m.exec(c.text);if(!a){if(p(c))continue;return}if(!b(c,a.index+1)){c.ch=a.index+1;continue}return c.ch=a.index+a[0].length,a}}function i(c){for(;;){var a=c.ch?c.text.lastIndexOf(">",c.ch-1):-1;if(a==-1){if(d(c))continue;return}if(!b(c,a+1)){c.ch=a;continue}var u=c.text.lastIndexOf("/",a),f=u>-1&&!/\S/.test(c.text.slice(u+1,a));return c.ch=a+1,f?"selfClose":"regular"}}function o(c,a){for(var u=[];;){var f=r(c),w,_=c.line,h=c.ch-(f?f[0].length:0);if(!f||!(w=t(c)))return;if(w=="selfClose")continue;if(f[1]){for(var R=u.length-1;R>=0;--R)if(u[R]==f[2]){u.length=R;break}if(R<0&&(!a||a==f[2]))return{tag:f[2],from:v(_,h),to:v(c.line,c.ch)}}else u.push(f[2])}}function s(c,a){for(var u=[];;){var f=i(c);if(!f)return;if(f=="selfClose"){l(c);continue}var w=c.line,_=c.ch,h=l(c);if(!h)return;if(h[1])u.push(h[2]);else{for(var R=u.length-1;R>=0;--R)if(u[R]==h[2]){u.length=R;break}if(R<0&&(!a||a==h[2]))return{tag:h[2],from:v(c.line,c.ch),to:v(w,_)}}}}N.registerHelper("fold","xml",function(c,a){for(var u=new S(c,a.line,0);;){var f=r(u);if(!f||u.line!=a.line)return;var w=t(u);if(!w)return;if(!f[1]&&w!="selfClose"){var _=v(u.line,u.ch),h=o(u,f[2]);return h&&C(h.from,_)>0?{from:_,to:h.from}:null}}}),N.findMatchingTag=function(c,a,u){var f=new S(c,a.line,a.ch,u);if(f.text.indexOf(">")==-1&&f.text.indexOf("<")==-1)return;var w=t(f),_=w&&v(f.line,f.ch),h=w&&l(f);if(!w||!h||C(f,a)>0)return;var R={from:v(f.line,f.ch),to:_,tag:h[2]};return w=="selfClose"?{open:R,close:null,at:"open"}:h[1]?{open:s(f,h[2]),close:R,at:"close"}:(f=new S(c,_.line,_.ch,u),{open:R,close:o(f,h[2]),at:"open"})},N.findEnclosingTag=function(c,a,u,f){for(var w=new S(c,a.line,a.ch,u);;){var _=s(w,f);if(!_)break;var h=new S(c,a.line,a.ch,u),R=o(h,_.tag);if(R)return{open:_,close:R}}},N.scanForClosingTag=function(c,a,u,f){var w=new S(c,a.line,a.ch,f?{from:0,to:f}:null);return o(w,u)}})},p5ED:function(F,Q,j){"use strict";var N=j("+L6B"),v=j("2/Rp"),C=j("5Dmo"),k=j("3S7+"),y=j("k1fw"),m=j("tJVT"),S=j("cDcd"),b=j.n(S),p=j("vHTk"),d=j.n(p),t=j("yEEn"),l=j("ZW9T"),r=j("1vsH");Q.a=function(i){var o=i.name,s=i.data,c=i.theme,a=i.type,u=i.filename,f=i.monacoEditor,w=i.className,_=i.style,h=i.close,R=i.onClose,O=i.hasMask,g=Object(S.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),x=Object(m.a)(g,2),E=x[0],T=x[1],M=Object(S.useState)(""),L=Object(m.a)(M,2),A=L[0],V=L[1],z,W=1024*1024,G=10*W,U=Object(S.useRef)();a==="office"&&(z=Object(r.V)(s).filesize,z>G&&(a="other")),u&&(f.filename=u),Object(S.useEffect)(function(){var $,re,te=($=document.cookie)===null||$===void 0||((re=$.replace(/\s/g,""))===null||re===void 0)?void 0:re.split(";");te==null||te.map(function(ge){var ve=ge.split("=");ve[0]==="_educoder_session"&&V(ve[1])})},[]);var P=function(){if(s.startsWith("http")||s.startsWith("/")){H();return}Object(r.z)(u||"educoder",s,u)},H=function(){Object(r.x)(u||o,s)};return console.log("data:",s,"fileanme:",u," name:",o),b.a.createElement("div",{style:Object(y.a)({},_||{}),className:"".concat(O&&d.a.bgBlack," ").concat(a?d.a.wrp:"hide")},h&&b.a.createElement("div",{className:d.a.close,ref:U},b.a.createElement(k.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return U.current}},b.a.createElement("span",{onClick:H},b.a.createElement("i",{className:"icon-quxiaozhiding"}))),b.a.createElement(k.a,{title:"\u5173\u95ED",getPopupContainer:function(){return U.current}},b.a.createElement("span",{className:"",onClick:R},b.a.createElement("i",{className:"icon-guanbi1"})))),b.a.createElement("div",{className:"".concat(d.a[w]," ").concat(w," ").concat(d.a.monaco," ").concat(a==="txt"?"show":"hide")},a==="txt"&&b.a.createElement(l.b,f)),a==="audio"&&b.a.createElement("audio",{src:"".concat(s!=null&&s.startsWith("/")||(s==null?void 0:s.indexOf("https://"))>-1?s:"data:audio/mp3;base64,").concat(s),autoPlay:!0}),a==="video"&&b.a.createElement(b.a.Fragment,null,s!=null&&s.startsWith("/")?b.a.createElement("video",{controls:!0,src:"".concat(s),autoPlay:!0}):b.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(s),autoPlay:!0})),a==="html"&&b.a.createElement("iframe",{src:s+"&disposition=inline"}),a==="pdf"&&b.a.createElement("embed",{className:d.a.embed,src:s}),a==="image"&&b.a.createElement(b.a.Fragment,null,b.a.createElement("img",{src:"".concat(s!=null&&s.startsWith("/")||(s==null?void 0:s.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(s)})),a==="other"&&b.a.createElement("div",null,b.a.createElement(v.a,{type:"primary",size:"large",onClick:P},b.a.createElement(t.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(a==="download"||a==="office")&&b.a.createElement(v.a,{type:"primary",size:"large",onClick:P},b.a.createElement(t.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(F,Q,j){},pA7S:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.WordArray,y=C.BlockCipher,m=v.algo,S=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],b=[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],p=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{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}],t=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=m.DES=y.extend({_doReset:function(){for(var s=this._key,c=s.words,a=[],u=0;u<56;u++){var f=S[u]-1;a[u]=c[f>>>5]>>>31-f%32&1}for(var w=this._subKeys=[],_=0;_<16;_++){for(var h=w[_]=[],R=p[_],u=0;u<24;u++)h[u/6|0]|=a[(b[u]-1+R)%28]<<31-u%6,h[4+(u/6|0)]|=a[28+(b[u+24]-1+R)%28]<<31-u%6;h[0]=h[0]<<1|h[0]>>>31;for(var u=1;u<7;u++)h[u]=h[u]>>>(u-1)*4+3;h[7]=h[7]<<5|h[7]>>>27}for(var O=this._invSubKeys=[],u=0;u<16;u++)O[u]=w[15-u]},encryptBlock:function(s,c){this._doCryptBlock(s,c,this._subKeys)},decryptBlock:function(s,c){this._doCryptBlock(s,c,this._invSubKeys)},_doCryptBlock:function(s,c,a){this._lBlock=s[c],this._rBlock=s[c+1],r.call(this,4,252645135),r.call(this,16,65535),i.call(this,2,858993459),i.call(this,8,16711935),r.call(this,1,1431655765);for(var u=0;u<16;u++){for(var f=a[u],w=this._lBlock,_=this._rBlock,h=0,R=0;R<8;R++)h|=d[R][((_^f[R])&t[R])>>>0];this._lBlock=_,this._rBlock=w^h}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,r.call(this,1,1431655765),i.call(this,8,16711935),i.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),s[c]=this._lBlock,s[c+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function r(s,c){var a=(this._lBlock>>>s^this._rBlock)&c;this._rBlock^=a,this._lBlock^=a<>>s^this._lBlock)&c;this._lBlock^=a,this._rBlock^=a<192.");var a=c.slice(0,2),u=c.length<4?c.slice(0,2):c.slice(2,4),f=c.length<6?c.slice(0,2):c.slice(4,6);this._des1=l.createEncryptor(k.create(a)),this._des2=l.createEncryptor(k.create(u)),this._des3=l.createEncryptor(k.create(f))},encryptBlock:function(s,c){this._des1.encryptBlock(s,c),this._des2.decryptBlock(s,c),this._des3.encryptBlock(s,c)},decryptBlock:function(s,c){this._des3.decryptBlock(s,c),this._des2.encryptBlock(s,c),this._des1.decryptBlock(s,c)},keySize:192/32,ivSize:64/32,blockSize:64/32});v.TripleDES=y._createHelper(o)}(),N.TripleDES})},psGv:function(F,Q,j){var N,v;(function(){var C;(function(){"use strict";var S=[,,function(t){function l(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}l.prototype.clone_empty=function(){var o=new l(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},l.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},l.prototype.has_match=function(o){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(o))return!0;return!1},l.prototype.set_indent=function(o,s){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},l.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(o){this.__items.push(o);var s=o.lastIndexOf(` `);s!==-1?this.__character_count=o.length-s:this.__character_count+=o.length},l.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function r(o,s){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),s=s||"",o.indent_level>0&&(s=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}r.prototype.get_indent_size=function(o,s){var c=this.__base_string_length;return s=s||0,o<0&&(c=0),c+=o*this.__indent_size,c+=s,c},r.prototype.get_indent_string=function(o,s){var c=this.__base_string;return s=s||0,o<0&&(o=0,c=""),s+=o*this.__indent_size,this.__ensure_cache(s),c+=this.__cache[s],c},r.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var o=this.__cache.length,s=0,c="";this.__indent_size&&o>=this.__indent_size&&(s=Math.floor(o/this.__indent_size),o-=s*this.__indent_size,c=new Array(s+1).join(this.__indent_string)),o&&(c+=new Array(o+1).join(" ")),this.__cache.push(c)};function i(o,s){this.__indent_cache=new r(o,s),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(o,s){return this.__indent_cache.get_indent_string(o,s)},i.prototype.get_indent_size=function(o,s){return this.__indent_cache.get_indent_size(o,s)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(o){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===` `&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(` `);return o!==` `&&(c=c.replace(/[\n]/g,o)),c},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(o,s){return o=o||0,s=s||0,this.next_line.set_indent(o,s),this.__lines.length>1?(this.current_line.set_indent(o,s),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(o){for(var s=0;s1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(o,s){for(var c=this.__lines.length-2;c>=0;){var a=this.__lines[c];if(a.is_empty())break;if(a.item(0).indexOf(o)!==0&&a.item(-1)!==s){this.__lines.splice(c+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},t.exports.Output=i},function(t){function l(r,i,o,s){this.type=r,this.text=i,this.comments_before=null,this.newlines=o||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=l},,,function(t){function l(o,s){this.raw_options=r(o,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}l.prototype._get_array=function(o,s){var c=this.raw_options[o],a=s||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(a=c.concat()):typeof c=="string"&&(a=c.split(/[^a-zA-Z0-9_\/\-]+/)),a},l.prototype._get_boolean=function(o,s){var c=this.raw_options[o],a=c===void 0?!!s:!!c;return a},l.prototype._get_characters=function(o,s){var c=this.raw_options[o],a=s||"";return typeof c=="string"&&(a=c.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),a},l.prototype._get_number=function(o,s){var c=this.raw_options[o];s=parseInt(s,10),isNaN(s)&&(s=0);var a=parseInt(c,10);return isNaN(a)&&(a=s),a},l.prototype._get_selection=function(o,s,c){var a=this._get_selection_list(o,s,c);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values: `+s+` You passed in: '`+this.raw_options[o]+"'");return a[0]},l.prototype._get_selection_list=function(o,s,c){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[s[0]],!this._is_valid_selection(c,s))throw new Error("Invalid Default Value!");var a=this._get_array(o,c);if(!this._is_valid_selection(a,s))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values: `+s+` You passed in: '`+this.raw_options[o]+"'");return a},l.prototype._is_valid_selection=function(o,s){return o.length&&s.length&&!o.some(function(c){return s.indexOf(c)===-1})};function r(o,s){var c={};o=i(o);var a;for(a in o)a!==s&&(c[a]=o[a]);if(s&&o[s])for(a in o[s])c[a]=o[s][a];return c}function i(o){var s={},c;for(c in o){var a=c.replace(/-/g,"_");s[a]=o[c]}return s}t.exports.Options=l,t.exports.normalizeOpts=i,t.exports.mergeOpts=r},,function(t){var l=RegExp.prototype.hasOwnProperty("sticky");function r(i){this.__input=i||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&i=0&&o=i.length&&this.__input.substring(o-i.length,o).toLowerCase()===i},t.exports.InputScanner=r},function(t,l,r){var i=r(8).InputScanner,o=r(3).Token,s=r(10).TokenStream,c=r(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(f,w){this._input=new i(f),this._options=w||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new c(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var f,w=new o(a.START,""),_=null,h=[],R=new s;w.type!==a.EOF;){for(f=this._get_next_token(w,_);this._is_comment(f);)R.add(f),f=this._get_next_token(w,_);R.isEmpty()||(f.comments_before=R,R=new s),f.parent=_,this._is_opening(f)?(h.push(_),_=f):_&&this._is_closing(f,_)&&(f.opened=_,_.closed=f,_=h.pop(),f.parent=_),f.previous=w,w.next=f,this.__tokens.add(f),w=f}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(f,w){this._readWhitespace();var _=this._input.read(/.+/g);return _?this._create_token(a.RAW,_):this._create_token(a.EOF,"")},u.prototype._is_comment=function(f){return!1},u.prototype._is_opening=function(f){return!1},u.prototype._is_closing=function(f,w){return!1},u.prototype._create_token=function(f,w){var _=new o(f,w,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return _},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=u,t.exports.TOKEN=a},function(t){function l(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}l.prototype.restart=function(){this.__position=0},l.prototype.isEmpty=function(){return this.__tokens_length===0},l.prototype.hasNext=function(){return this.__position=0&&r/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/),smarty:u.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:u.starting_with(/{\*/).until_after(/\*}/),smarty_literal:u.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new i,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(c){var a=this._create();return a._disabled[c]=!0,a._update(),a},s.prototype.read_options=function(c){var a=this._create();for(var u in o)a._disabled[u]=c.templating.indexOf(u)===-1;return a._update(),a},s.prototype.exclude=function(c){var a=this._create();return a._excluded[c]=!0,a._update(),a},s.prototype.read=function(){var c="";this._match_pattern?c=this._input.read(this._starting_pattern):c=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),c+=a,a=this._read_template();return this._until_after&&(c+=this._input.readUntilAfter(this._until_pattern)),c},s.prototype.__set_templated_pattern=function(){var c=[];this._disabled.php||c.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||c.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||c.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(c.push(this.__patterns.django._starting_pattern.source),c.push(this.__patterns.django_value._starting_pattern.source),c.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||c.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&c.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+c.join("|")+")")},s.prototype._read_template=function(){var c="",a=this._input.peek();if(a==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(c=c||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(c=c||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(c=c||this.__patterns.handlebars_comment.read(),c=c||this.__patterns.handlebars_unescaped.read(),c=c||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(c=c||this.__patterns.django_value.read()),this._excluded.django||(c=c||this.__patterns.django_comment.read(),c=c||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(c=c||this.__patterns.smarty_comment.read(),c=c||this.__patterns.smarty_literal.read(),c=c||this.__patterns.smarty.read()));return c},t.exports.TemplatablePattern=s},,,,function(t,l,r){var i=r(19).Beautifier,o=r(20).Options;function s(c,a,u,f){var w=new i(c,a,u,f);return w.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new o}},function(t,l,r){var i=r(20).Options,o=r(2).Output,s=r(21).Tokenizer,c=r(21).TOKEN,a=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,f=function(M,L){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=M.max_preserve_newlines,this.preserve_newlines=M.preserve_newlines,this._output=new o(M,L)};f.prototype.current_line_has_match=function(M){return this._output.current_line.has_match(M)},f.prototype.set_space_before_token=function(M,L){this._output.space_before_token=M,this._output.non_breaking_space=L},f.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},f.prototype.add_raw_token=function(M){this._output.add_raw_token(M)},f.prototype.print_preserved_newlines=function(M){var L=0;M.type!==c.TEXT&&M.previous.type!==c.TEXT&&(L=M.newlines?1:0),this.preserve_newlines&&(L=M.newlines0);return L!==0},f.prototype.traverse_whitespace=function(M){return M.whitespace_before||M.newlines?(this.print_preserved_newlines(M)||(this._output.space_before_token=!0),!0):!1},f.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},f.prototype.print_newline=function(M){this._output.add_new_line(M)},f.prototype.print_token=function(M){M.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(M.text))},f.prototype.indent=function(){this.indent_level++},f.prototype.get_full_indent=function(M){return M=this.indent_level+(M||0),M<1?"":this._output.get_indent_string(M)};var w=function(M){for(var L=null,A=M.next;A.type!==c.EOF&&M.closed!==A;){if(A.type===c.ATTRIBUTE&&A.text==="type"){A.next&&A.next.type===c.EQUALS&&A.next.next&&A.next.next.type===c.VALUE&&(L=A.next.next.text);break}A=A.next}return L},_=function(M,L){var A=null,V=null;return L.closed?(M==="script"?A="text/javascript":M==="style"&&(A="text/css"),A=w(L)||A,A.search("text/css")>-1?V="css":A.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?V="javascript":A.search(/(text|application|dojo)\/(x-)?(html)/)>-1?V="html":A.search(/test\/null/)>-1&&(V="null"),V):null};function h(M,L){return L.indexOf(M)!==-1}function R(M,L,A){this.parent=M||null,this.tag=L?L.tag_name:"",this.indent_level=A||0,this.parser_token=L||null}function O(M){this._printer=M,this._current_frame=null}O.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},O.prototype.record_tag=function(M){var L=new R(this._current_frame,M,this._printer.indent_level);this._current_frame=L},O.prototype._try_pop_frame=function(M){var L=null;return M&&(L=M.parser_token,this._printer.indent_level=M.indent_level,this._current_frame=M.parent),L},O.prototype._get_frame=function(M,L){for(var A=this._current_frame;A&&!(M.indexOf(A.tag)!==-1);){if(L&&L.indexOf(A.tag)!==-1){A=null;break}A=A.parent}return A},O.prototype.try_pop=function(M,L){var A=this._get_frame([M],L);return this._try_pop_frame(A)},O.prototype.indent_to_tag=function(M){var L=this._get_frame(M);L&&(this._printer.indent_level=L.indent_level)};function g(M,L,A,V){this._source_text=M||"",L=L||{},this._js_beautify=A,this._css_beautify=V,this._tag_stack=null;var z=new i(L,"html");this._options=z,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}g.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var M=this._source_text,L=this._options.eol;this._options.eol==="auto"&&(L=` `,M&&a.test(M)&&(L=M.match(a)[0])),M=M.replace(u,` `);var A=M.match(/^[\t ]*/)[0],V={text:"",type:""},z=new x,W=new f(this._options,A),G=new s(M,this._options).tokenize();this._tag_stack=new O(W);for(var U=null,P=G.next();P.type!==c.EOF;)P.type===c.TAG_OPEN||P.type===c.COMMENT?(U=this._handle_tag_open(W,P,z,V),z=U):P.type===c.ATTRIBUTE||P.type===c.EQUALS||P.type===c.VALUE||P.type===c.TEXT&&!z.tag_complete?U=this._handle_inside_tag(W,P,z,G):P.type===c.TAG_CLOSE?U=this._handle_tag_close(W,P,z):P.type===c.TEXT?U=this._handle_text(W,P,z):W.add_raw_token(P),V=U,P=G.next();var H=W._output.get_code(L);return H},g.prototype._handle_tag_close=function(M,L,A){var V={text:L.text,type:L.type};return M.alignment_size=0,A.tag_complete=!0,M.set_space_before_token(L.newlines||L.whitespace_before!=="",!0),A.is_unformatted?M.add_raw_token(L):(A.tag_start_char==="<"&&(M.set_space_before_token(L.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&A.has_wrapped_attrs&&M.print_newline(!1)),M.print_token(L)),A.indent_content&&!(A.is_unformatted||A.is_content_unformatted)&&(M.indent(),A.indent_content=!1),!A.is_inline_element&&!(A.is_unformatted||A.is_content_unformatted)&&M.set_wrap_point(),V},g.prototype._handle_inside_tag=function(M,L,A,V){var z=A.has_wrapped_attrs,W={text:L.text,type:L.type};if(M.set_space_before_token(L.newlines||L.whitespace_before!=="",!0),A.is_unformatted)M.add_raw_token(L);else if(A.tag_start_char==="{"&&L.type===c.TEXT)M.print_preserved_newlines(L)?(L.newlines=0,M.add_raw_token(L)):M.print_token(L);else{if(L.type===c.ATTRIBUTE?(M.set_space_before_token(!0),A.attr_count+=1):(L.type===c.EQUALS||L.type===c.VALUE&&L.previous.type===c.EQUALS)&&M.set_space_before_token(!1),L.type===c.ATTRIBUTE&&A.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(M.traverse_whitespace(L),z=z||L.newlines!==0),this._is_wrap_attributes_force)){var G=A.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&A.attr_count===1){var U=!0,P=0,H;do{if(H=V.peek(P),H.type===c.ATTRIBUTE){U=!1;break}P+=1}while(P<4&&H.type!==c.EOF&&H.type!==c.TAG_CLOSE);G=!U}G&&(M.print_newline(!1),z=!0)}M.print_token(L),z=z||M.previous_token_wrapped(),A.has_wrapped_attrs=z}return W},g.prototype._handle_text=function(M,L,A){var V={text:L.text,type:"TK_CONTENT"};return A.custom_beautifier_name?this._print_custom_beatifier_text(M,L,A):A.is_unformatted||A.is_content_unformatted?M.add_raw_token(L):(M.traverse_whitespace(L),M.print_token(L)),V},g.prototype._print_custom_beatifier_text=function(M,L,A){var V=this;if(L.text!==""){var z=L.text,W,G=1,U="",P="";A.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?W=this._js_beautify:A.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?W=this._css_beautify:A.custom_beautifier_name==="html"&&(W=function(ve,de){var De=new g(ve,de,V._js_beautify,V._css_beautify);return De.beautify()}),this._options.indent_scripts==="keep"?G=0:this._options.indent_scripts==="separate"&&(G=-M.indent_level);var H=M.get_full_indent(G);if(z=z.replace(/\n[ \t]*$/,""),A.custom_beautifier_name!=="html"&&z[0]==="<"&&z.match(/^(|]]>)$/.exec(z);if(!$){M.add_raw_token(L);return}U=H+$[1]+` `,z=$[4],$[5]&&(P=H+$[5]),z=z.replace(/\n[ \t]*$/,""),($[2]||$[3].indexOf(` `)!==-1)&&($=$[3].match(/[ \t]+$/),$&&(L.whitespace_before=$[0]))}if(z)if(W){var re=function(){this.eol=` `};re.prototype=this._options.raw_options;var te=new re;z=W(H+z,te)}else{var ge=L.whitespace_before;ge&&(z=z.replace(new RegExp(` (`+ge+")?","g"),` `)),z=H+z.replace(/\n/g,` `+H)}U&&(z?z=U+z+` `+P:z=U+P),M.print_newline(!1),z&&(L.text=z,L.whitespace_before="",L.newlines=0,M.add_raw_token(L),M.print_newline(!0))}},g.prototype._handle_tag_open=function(M,L,A,V){var z=this._get_tag_open_token(L);return(A.is_unformatted||A.is_content_unformatted)&&!A.is_empty_element&&L.type===c.TAG_OPEN&&L.text.indexOf("]*)/),this.tag_check=A?A[1]:""):(A=L.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=A?A[1]:"",(L.text.startsWith("{{#>")||L.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&L.next!==null?this.tag_check=L.next.text.split(" ")[0]:this.tag_check=L.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),L.type===c.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||L.closed&&L.closed.text==="/>";var V=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(V=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(V)))}};g.prototype._get_tag_open_token=function(M){var L=new x(this._tag_stack.get_parser_token(),M);return L.alignment_size=this._options.wrap_attributes_indent_size,L.is_end_tag=L.is_end_tag||h(L.tag_check,this._options.void_elements),L.is_empty_element=L.tag_complete||L.is_start_tag&&L.is_end_tag,L.is_unformatted=!L.tag_complete&&h(L.tag_check,this._options.unformatted),L.is_content_unformatted=!L.is_empty_element&&h(L.tag_check,this._options.content_unformatted),L.is_inline_element=h(L.tag_name,this._options.inline)||L.tag_name.includes("-")||L.tag_start_char==="{",L},g.prototype._set_tag_position=function(M,L,A,V,z){if(A.is_empty_element||(A.is_end_tag?A.start_tag_token=this._tag_stack.try_pop(A.tag_name):(this._do_optional_end_element(A)&&(A.is_inline_element||M.print_newline(!1)),this._tag_stack.record_tag(A),(A.tag_name==="script"||A.tag_name==="style")&&!(A.is_unformatted||A.is_content_unformatted)&&(A.custom_beautifier_name=_(A.tag_check,L)))),h(A.tag_check,this._options.extra_liners)&&(M.print_newline(!1),M._output.just_added_blankline()||M.print_newline(!0)),A.is_empty_element){if(A.tag_start_char==="{"&&A.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),A.indent_content=!0;var W=M.current_line_has_match(/{{#if/);W||M.print_newline(!1)}A.tag_name==="!--"&&z.type===c.TAG_CLOSE&&V.is_end_tag&&A.text.indexOf(` `)===-1||(A.is_inline_element||A.is_unformatted||M.print_newline(!1),this._calcluate_parent_multiline(M,A))}else if(A.is_end_tag){var G=!1;G=A.start_tag_token&&A.start_tag_token.multiline_content,G=G||!A.is_inline_element&&!(V.is_inline_element||V.is_unformatted)&&!(z.type===c.TAG_CLOSE&&A.start_tag_token===V)&&z.type!=="TK_CONTENT",(A.is_content_unformatted||A.is_unformatted)&&(G=!1),G&&M.print_newline(!1)}else A.indent_content=!A.custom_beautifier_name,A.tag_start_char==="<"&&(A.tag_name==="html"?A.indent_content=this._options.indent_inner_html:A.tag_name==="head"?A.indent_content=this._options.indent_head_inner_html:A.tag_name==="body"&&(A.indent_content=this._options.indent_body_inner_html)),!(A.is_inline_element||A.is_unformatted)&&(z.type!=="TK_CONTENT"||A.is_content_unformatted)&&M.print_newline(!1),this._calcluate_parent_multiline(M,A)},g.prototype._calcluate_parent_multiline=function(M,L){L.parent&&M._output.just_added_newline()&&!((L.is_inline_element||L.is_unformatted)&&L.parent.is_inline_element)&&(L.parent.multiline_content=!0)};var E=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],T=["a","audio","del","ins","map","noscript","video"];g.prototype._do_optional_end_element=function(M){var L=null;if(M.is_empty_element||!M.is_start_tag||!M.parent)return;if(M.tag_name==="body")L=L||this._tag_stack.try_pop("head");else if(M.tag_name==="li")L=L||this._tag_stack.try_pop("li",["ol","ul"]);else if(M.tag_name==="dd"||M.tag_name==="dt")L=L||this._tag_stack.try_pop("dt",["dl"]),L=L||this._tag_stack.try_pop("dd",["dl"]);else if(M.parent.tag_name==="p"&&E.indexOf(M.tag_name)!==-1){var A=M.parent.parent;(!A||T.indexOf(A.tag_name)===-1)&&(L=L||this._tag_stack.try_pop("p"))}else M.tag_name==="rp"||M.tag_name==="rt"?(L=L||this._tag_stack.try_pop("rt",["ruby","rtc"]),L=L||this._tag_stack.try_pop("rp",["ruby","rtc"])):M.tag_name==="optgroup"?L=L||this._tag_stack.try_pop("optgroup",["select"]):M.tag_name==="option"?L=L||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):M.tag_name==="colgroup"?L=L||this._tag_stack.try_pop("caption",["table"]):M.tag_name==="thead"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"])):M.tag_name==="tbody"||M.tag_name==="tfoot"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"]),L=L||this._tag_stack.try_pop("thead",["table"]),L=L||this._tag_stack.try_pop("tbody",["table"])):M.tag_name==="tr"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"]),L=L||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(M.tag_name==="th"||M.tag_name==="td")&&(L=L||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),L=L||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return M.parent=this._tag_stack.get_parser_token(),L},t.exports.Beautifier=g},function(t,l,r){var i=r(6).Options;function o(s){i.call(this,s,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}o.prototype=new i,t.exports.Options=o},function(t,l,r){var i=r(9).Tokenizer,o=r(9).TOKEN,s=r(13).Directives,c=r(14).TemplatablePattern,a=r(12).Pattern,u={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},f=new s(/<\!--/,/-->/),w=function(_,h){i.call(this,_,h),this._current_tag_name="";var R=new c(this._input).read_options(this._options),O=new a(this._input);if(this.__patterns={word:R.until(/[\n\r\t <]/),single_quote:R.until_after(/'/),double_quote:R.until_after(/"/),attribute:R.until(/[\n\r\t =>]|\/>/),element_name:R.until(/[\n\r\t >\/]/),handlebars_comment:O.starting_with(/{{!--/).until_after(/--}}/),handlebars:O.starting_with(/{{/).until_after(/}}/),handlebars_open:O.until(/[\n\r\t }]/),handlebars_raw_close:O.until(/}}/),comment:O.starting_with(//),cdata:O.starting_with(//),conditional_comment:O.starting_with(//),processing:O.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var g=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=O.matching(g).until_after(g)}};w.prototype=new i,w.prototype._is_comment=function(_){return!1},w.prototype._is_opening=function(_){return _.type===u.TAG_OPEN},w.prototype._is_closing=function(_,h){return _.type===u.TAG_CLOSE&&h&&((_.text===">"||_.text==="/>")&&h.text[0]==="<"||_.text==="}}"&&h.text[0]==="{"&&h.text[1]==="{")},w.prototype._reset=function(){this._current_tag_name=""},w.prototype._get_next_token=function(_,h){var R=null;this._readWhitespace();var O=this._input.peek();return O===null?this._create_token(u.EOF,""):(R=R||this._read_open_handlebars(O,h),R=R||this._read_attribute(O,_,h),R=R||this._read_close(O,h),R=R||this._read_raw_content(O,_,h),R=R||this._read_content_word(O),R=R||this._read_comment_or_cdata(O),R=R||this._read_processing(O),R=R||this._read_open(O,h),R=R||this._create_token(u.UNKNOWN,this._input.next()),R)},w.prototype._read_comment_or_cdata=function(_){var h=null,R=null,O=null;if(_==="<"){var g=this._input.peek(1);g==="!"&&(R=this.__patterns.comment.read(),R?(O=f.get_directives(R),O&&O.ignore==="start"&&(R+=f.readIgnored(this._input))):R=this.__patterns.cdata.read()),R&&(h=this._create_token(u.COMMENT,R),h.directives=O)}return h},w.prototype._read_processing=function(_){var h=null,R=null,O=null;if(_==="<"){var g=this._input.peek(1);(g==="!"||g==="?")&&(R=this.__patterns.conditional_comment.read(),R=R||this.__patterns.processing.read()),R&&(h=this._create_token(u.COMMENT,R),h.directives=O)}return h},w.prototype._read_open=function(_,h){var R=null,O=null;return h||_==="<"&&(R=this._input.next(),this._input.peek()==="/"&&(R+=this._input.next()),R+=this.__patterns.element_name.read(),O=this._create_token(u.TAG_OPEN,R)),O},w.prototype._read_open_handlebars=function(_,h){var R=null,O=null;return h||this._options.indent_handlebars&&_==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(R=this.__patterns.handlebars_comment.read(),R=R||this.__patterns.handlebars.read(),O=this._create_token(u.COMMENT,R)):(R=this.__patterns.handlebars_open.read(),O=this._create_token(u.TAG_OPEN,R))),O},w.prototype._read_close=function(_,h){var R=null,O=null;return h&&(h.text[0]==="<"&&(_===">"||_==="/"&&this._input.peek(1)===">")?(R=this._input.next(),_==="/"&&(R+=this._input.next()),O=this._create_token(u.TAG_CLOSE,R)):h.text[0]==="{"&&_==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),O=this._create_token(u.TAG_CLOSE,"}}"))),O},w.prototype._read_attribute=function(_,h,R){var O=null,g="";if(R&&R.text[0]==="<")if(_==="=")O=this._create_token(u.EQUALS,this._input.next());else if(_==='"'||_==="'"){var x=this._input.next();_==='"'?x+=this.__patterns.double_quote.read():x+=this.__patterns.single_quote.read(),O=this._create_token(u.VALUE,x)}else g=this.__patterns.attribute.read(),g&&(h.type===u.EQUALS?O=this._create_token(u.VALUE,g):O=this._create_token(u.ATTRIBUTE,g));return O},w.prototype._is_content_unformatted=function(_){return this._options.void_elements.indexOf(_)===-1&&(this._options.content_unformatted.indexOf(_)!==-1||this._options.unformatted.indexOf(_)!==-1)},w.prototype._read_raw_content=function(_,h,R){var O="";if(R&&R.text[0]==="{")O=this.__patterns.handlebars_raw_close.read();else if(h.type===u.TAG_CLOSE&&h.opened.text[0]==="<"&&h.text[0]!=="/"){var g=h.opened.text.substr(1).toLowerCase();if(g==="script"||g==="style"){var x=this._read_comment_or_cdata(_);if(x)return x.type=u.TEXT,x;O=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(g)&&(O=this._input.readUntil(new RegExp("","ig")))}return O?this._create_token(u.TEXT,O):null},w.prototype._read_content_word=function(_){var h="";if(this._options.unformatted_content_delimiter&&(_===this._options.unformatted_content_delimiter[0]&&(h=this.__patterns.unformatted_content_delimiter.read())),h||(h=this.__patterns.word.read()),h)return this._create_token(u.TEXT,h)},t.exports.Tokenizer=w,t.exports.TOKEN=u}],b={};function p(t){var l=b[t];if(l!==void 0)return l.exports;var r=b[t]={exports:{}};return S[t](r,r.exports,p),r.exports}var d=p(18);C=d})();var k=C;if(!0)!(N=[j,j("6UM0"),j("TXwP")],v=function(S){var b=j("6UM0"),p=j("TXwP");return{html_beautify:function(d,t){return k(d,t,b.js_beautify,p.css_beautify)}}}.apply(Q,N),v!==void 0&&(F.exports=v));else var y,m})()},qBft:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.AnsiX923={pad:function(v,C){var k=v.sigBytes,y=C*4,m=y-k%y,S=k+m-1;v.clamp(),v.words[S>>>2]|=m<<24-S%4*8,v.sigBytes+=m},unpad:function(v){var C=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=C}},N.pad.Ansix923})},qM6L:function(F,Q,j){(function(N,v){F.exports=Q=v(j("Ib8C"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.WordArray,y=v.enc,m=y.Utf16=y.Utf16BE={stringify:function(b){for(var p=b.words,d=b.sigBytes,t=[],l=0;l>>2]>>>16-l%4*8&65535;t.push(String.fromCharCode(r))}return t.join("")},parse:function(b){for(var p=b.length,d=[],t=0;t>>1]|=b.charCodeAt(t)<<16-t%2*16;return k.create(d,p*2)}};y.Utf16LE={stringify:function(b){for(var p=b.words,d=b.sigBytes,t=[],l=0;l>>2]>>>16-l%4*8&65535);t.push(String.fromCharCode(r))}return t.join("")},parse:function(b){for(var p=b.length,d=[],t=0;t>>1]|=S(b.charCodeAt(t)<<16-t%2*16);return k.create(d,p*2)}};function S(b){return b<<8&4278255360|b>>>8&16711935}}(),N.enc.Utf16})},qu8F:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("OLod"))})(this,function(N){/** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */return N.mode.CTRGladman=function(){var v=N.lib.BlockCipherMode.extend();function C(m){if((m>>24&255)===255){var S=m>>16&255,b=m>>8&255,p=m&255;S===255?(S=0,b===255?(b=0,p===255?p=0:++p):++b):++S,m=0,m+=S<<16,m+=b<<8,m+=p}else m+=1<<24;return m}function k(m){return(m[0]=C(m[0]))===0&&(m[1]=C(m[1])),m}var y=v.Encryptor=v.extend({processBlock:function(m,S){var b=this._cipher,p=b.blockSize,d=this._iv,t=this._counter;d&&(t=this._counter=d.slice(0),this._iv=void 0),k(t);var l=t.slice(0);b.encryptBlock(l,0);for(var r=0;r=C.length?{done:!0}:{done:!1,value:C[m++]}},e:function(l){throw l},f:S}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b=!0,p=!1,d;return{s:function(){y=C[Symbol.iterator]()},n:function(){var l=y.next();return b=l.done,l},e:function(l){p=!0,d=l},f:function(){try{!b&&y.return!=null&&y.return()}finally{if(p)throw d}}}}},rUJ1:function(F,Q){const j=/[&<>"']/,N=/[&<>"']/g,v=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,k={"&":"&","<":"<",">":">",'"':""","'":"'"},y=O=>k[O];function m(O,g){if(g){if(j.test(O))return O.replace(N,y)}else if(v.test(O))return O.replace(C,y);return O}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(O){return O.replace(S,(g,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 p=/(^|[^\[])\^/g;function d(O,g){O=O.source||O,g=g||"";const x={replace:(E,T)=>(T=T.source||T,T=T.replace(p,"$1"),O=O.replace(E,T),x),getRegex:()=>new RegExp(O,g)};return x}const t=/[^\w:]/g,l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function r(O,g,x){if(O){let E;try{E=decodeURIComponent(b(x)).replace(t,"").toLowerCase()}catch(T){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}g&&!l.test(x)&&(x=a(g,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(E){return null}return x}const i={},o=/^[^:]+:\/*[^/]*$/,s=/^([^:]+:)[\s\S]*$/,c=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(O,g){i[" "+O]||(o.test(O)?i[" "+O]=O+"/":i[" "+O]=_(O,"/",!0)),O=i[" "+O];const x=O.indexOf(":")===-1;return g.substring(0,2)==="//"?x?g:O.replace(s,"$1")+g:g.charAt(0)==="/"?x?g:O.replace(c,"$1")+g:O+g}const u={exec:function(){}};function f(O){let g=1,x,E;for(;g{let V=!1,z=L;for(;--z>=0&&A[z]==="\\";)V=!V;return V?"|":" |"}),E=x.split(/ \|/);let T=0;if(E.length>g)E.splice(g);else for(;E.length0&&(Ut.children=[],Se(Jt,Ut.children))})}function ne(Ct,Dt){for(var wt=[],wr=0;wr0){wt[0]=Jt.id;for(var Ut=0;Ut0&&zt[0]!==void 0?zt[0]:"",un(!0),fr.next=4,Object(ye.a)("/api/tag_disciplines.json",{method:"get",params:{target:wt,search:Qr}});case 4:Cn=fr.sent,Ot(Cn.tag_disciplines||[]),un(!1);case 7:case"end":return fr.stop()}},or)}));return function(){return zr.apply(this,arguments)}}(),Xt=function(or){var Qr=or.name;G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:te.a.createElement("div",null,te.a.createElement(P.a,{defaultValue:Qr,placeholder:"\u8BF7\u8F93\u5165".concat(nn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(zt){Qr=zt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Cn=Object(E.a)($.a.mark(function pr(){var fr;return $.a.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:if(Qr){Er.next=3;break}return x.b.warn("\u9898\u76EE".concat(nn,"\u4E0D\u80FD\u4E3A\u7A7A")),Er.abrupt("return",Promise.reject());case 3:return Er.next=5,Object(ye.a)("/api/tag_disciplines/".concat(or.id,"/rename.json"),{method:"post",body:{id:or.id,name:Qr}});case 5:fr=Er.sent,(fr==null?void 0:fr.status)===0&&vt();case 7:case"end":return Er.stop()}},pr)}));function zt(){return Cn.apply(this,arguments)}return zt}()})},qt=function(or){G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:wt==="practice"?te.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",te.a.createElement("span",{className:"c-light-primary"},or.name),"\u201D\u5220\u9664\u5417\uFF1F",te.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):te.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",te.a.createElement("span",{className:"c-light-primary"},or.name),"\u201D\u5220\u9664\u5417\uFF1F",te.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 Qr=Object(E.a)($.a.mark(function zt(){var pr;return $.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:return jr.next=2,Object(ye.a)("/api/tag_disciplines/".concat(or.id,".json"),{method:"delete",body:{id:or.id}});case 2:pr=jr.sent,(pr==null?void 0:pr.status)===0&&vt();case 4:case"end":return jr.stop()}},zt)}));function Cn(){return Qr.apply(this,arguments)}return Cn}()})},Hr=function(or){vt(or)},nn=wt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return te.a.createElement(G.a,{afterClose:function(){Jr(!1),un(!1),me(""),le("1"),Ot([])},centered:!0,keyboard:!1,width:600,title:"".concat(nn,"\u7BA1\u7406"),visible:!!wt,className:yt.a.customModal,footer:null,onCancel:Cr},te.a.createElement("section",{className:yt.a.wrap},te.a.createElement(et.a,{activeKey:Sn,onChange:function(or){me(""),le(or),vt()}},te.a.createElement(et.a.TabPane,{tab:"\u65B0\u589E".concat(nn),key:"1"},te.a.createElement(P.a,{value:ee,onChange:function(or){return me(or.target.value)},className:yt.a.in,placeholder:"\u8F93\u5165".concat(nn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),te.a.createElement("div",{className:yt.a.btns},te.a.createElement(w.a,{onClick:Cr,className:"mr20"},"\u53D6\u6D88 "),te.a.createElement(w.a,{loading:Bt,onClick:Ht,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),te.a.createElement(et.a.TabPane,{tab:"\u5DF2\u6709".concat(nn),key:"2"},te.a.createElement(P.a.Search,{allowClear:!0,onSearch:Hr,value:ee,onChange:function(or){return me(or.target.value)},className:yt.a.in,placeholder:"\u8F93\u5165".concat(nn,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),te.a.createElement(u.a,{dataSource:pt,bordered:!1,loading:Or,scroll:pt.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(nn,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(or,Qr){return te.a.createElement("span",null,te.a.createElement("span",{onClick:function(){return Xt(Qr)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),te.a.createElement("span",{onClick:function(){return qt(Qr)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},mt=ft,It=j("m3rI"),At=j("B7Ph"),_t=j("wd/R"),Vt=j.n(_t),Kt=j("1vsH"),tr=j("9Bee"),rr=j("xKgJ"),Wt=P.a.TextArea,Lt=G.a.confirm,nr=z.a.Panel,dt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},Et;(function(Ct){Ct[Ct.SET_INITAL_DATA=0]="SET_INITAL_DATA",Ct[Ct.SET_LOADING=1]="SET_LOADING",Ct[Ct.SET_STATUS=2]="SET_STATUS"})(Et||(Et={}));var jt="#### \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 kt(Ct,Dt){switch(Dt.type){case Et.SET_INITAL_DATA:return Object(A.a)(Object(A.a)({},Ct),Dt.payload);case Et.SET_LOADING:return Object(A.a)(Object(A.a)({},Ct),{},{loading:Dt.payload});case Et.SET_STATUS:return Object(A.a)(Object(A.a)({},Ct),{},{status:Dt.payload});default:throw new Error}}var hr=Q.default=function(){var Ct,Dt,wt,wr=Object(ce.h)(),Cr=Object(ce.g)(),Jt=Object(ce.i)(),Ut=Jt.id,Or=M.a.useForm(),un=Object(L.a)(Or,1),Nr=un[0],bt=Object(re.useState)(),Bt=Object(L.a)(bt,2),Jr=Bt[0],on=Bt[1],Ln=Object(re.useState)(!1),Sn=Object(L.a)(Ln,2),le=Sn[0],K=Sn[1],X=Object(re.useState)([]),ee=Object(L.a)(X,2),me=ee[0],ae=ee[1],Ke=Object(re.useState)([]),pt=Object(L.a)(Ke,2),Ot=pt[0],Ht=pt[1],vt=Object(re.useState)([]),Xt=Object(L.a)(vt,2),qt=Xt[0],Hr=Xt[1],nn=Object(re.useState)([]),zr=Object(L.a)(nn,2),or=zr[0],Qr=zr[1],Cn=Object(re.useState)([]),zt=Object(L.a)(Cn,2),pr=zt[0],fr=zt[1],jr=Object(re.useState)("C"),Er=Object(L.a)(jr,2),li=Er[0],On=Er[1],Ui=Object(re.useReducer)(kt,dt),Bi=Object(L.a)(Ui,2),qn=Bi[0],sn=Bi[1],Si=qn.loading,dn=qn.data,Yn=qn.user,Zr=qn.status,cr=dn==null?void 0:dn.hack_sets,tn=dn==null||((Ct=dn.hack)===null||Ct===void 0)?void 0:Ct.test_set_average,br=Object(re.useState)(!1),hn=Object(L.a)(br,2),Fr=hn[0],mi=hn[1],_n=Object(re.useRef)([]),Un=Object(re.useState)(!1),Di=Object(L.a)(Un,2),ui=Di[0],bi=Di[1],ei=Object(re.useState)(!1),ti=Object(L.a)(ei,2),ji=ti[0],ci=ti[1],_i=Object(re.useRef)(!0),Hi=Object(re.useState)({}),di=Object(L.a)(Hi,2),qr=di[0],Yt=di[1];Object(re.useEffect)(function(){return Object(Oe.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(Oe.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(Oe.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(Oe.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(re.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var sr=function(){var lr=Object(E.a)($.a.mark(function Ft(){var mr,vr;return $.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return Ir.next=2,Object(ye.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return mr=Ir.sent,Ir.next=5,Object(ye.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:vr=Ir.sent,Ht(mr.tag_disciplines||[]),Hr(vr.tag_disciplines||[]);case 8:case"end":return Ir.stop()}},Ft)}));return function(){return lr.apply(this,arguments)}}(),Qt=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],gr=Object(re.useCallback)(Object(E.a)($.a.mark(function lr(){var Ft,mr,vr,rn,Ir,An,En,Li,Hn,Gn,Jn,$i,Pe,Xe,Je,Ue,_e,Le,we,He,Ge,$e,Ye,nt,ht,St,Tt;return $.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(sn({type:Et.SET_LOADING,payload:!0}),!Ut){er.next=19;break}return er.next=4,Qe(Ut);case 4:Ft=er.sent,mr=Ft.user,vr=Ft.language,rn=Ft.practice_sets,Ir=Ft.practice_codes,An=Ft.description,En=Ft.difficulty,Li=Ft.name,Hn=Ft.open_or_not,Gn=Ft.time_limit,Jn=Ft.test_set_average,$i=Ft.test_set_score,Pe=Ft.status,Xe=Ft.tag_discipline_ids,Je=Ft.source_discipline_ids,Ue=Ft.item_banks_group_id,_e=Ft.is_file,Le=_e===void 0?!1:_e,we=Ft.hide_actual_output,He=Ft.review_privilege,Ge=Ft.review_description,$e={review_privilege:He,status:Pe,review_description:Ge,name:Li},Yt($e),mi(we),Ye=Le?[{input:"",output:"",score:100,position:1}]:rn,Le?(ae(rn),Nr.setFieldsValue({hack_sets:Ye})):ae([]),nt={loading:!0,user:mr,status:Pe,data:{hack:{difficulty:En,name:Li,description:An,open_or_not:Hn,time_limit:Gn,test_set_average:Jn,test_set_score:$i,tag_discipline_ids:Xe,source_discipline_ids:Je,is_file:Le},hack_sets:Ye}},sn({type:Et.SET_INITAL_DATA,payload:nt}),on({hack:{difficulty:En,name:Li,description:An,open_or_not:Hn,time_limit:Gn,test_set_average:Jn,test_set_score:$i,tag_discipline_ids:Xe,source_discipline_ids:Je,is_file:Le}}),ht=Ir==null?void 0:Ir.map(function(yr){return Object(A.a)(Object(A.a)({},yr),{},{code:oe.Base64.decode(yr==null?void 0:yr.code)})}),fr(ht),_n.current=ht,er.next=27;break;case 19:return er.next=21,Re();case 21:St=er.sent,Tt=St.user,sn({type:Et.SET_INITAL_DATA,payload:{loading:!0,status:0,user:Tt,data:{hack:{difficulty:"",time_limit:3,description:jt,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),on({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),fr(Qt),_n.current=Qt;case 27:sn({type:Et.SET_LOADING,payload:!1});case 28:case"end":return er.stop()}},lr)})),[Ut]);Object(re.useEffect)(function(){try{gr(),sr()}catch(lr){console.log(lr,"----")}},[]);function Lr(lr,Ft){return Kr.apply(this,arguments)}function Kr(){return Kr=Object(E.a)($.a.mark(function lr(Ft,mr){var vr,rn,Ir,An,En,Li,Hn,Gn,Jn,$i,Pe,Xe,Je,Ue,_e,Le,we,He;return $.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:rn=Object(A.a)({},Ft),Ir=rn.hack_sets,An=rn.hack,An.hide_actual_output=Fr,En=[],Li=[],Hn=0,Gn=An!=null&&An.is_file?me.map(function(Ye,nt){return Object(A.a)(Object(A.a)({},Ye),{},{position:nt+1})}):Ir.map(function(Ye){return Object(A.a)(Object(A.a)({},Ye),{},{is_file:!1})}),Jn=Object(o.a)(Gn);try{for(Jn.s();!($i=Jn.n()).done;)Pe=$i.value,Hn+=Pe.score,Pe.id&&Pe.id>=0?En.push(Pe):Li.push(Pe)}catch(Ye){Jn.e(Ye)}finally{Jn.f()}if(Gn!=null&&Gn.length){$e.next=11;break}return x.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),$e.abrupt("return");case 11:if(!(Hn!==100&&!An.test_set_score)){$e.next=14;break}return x.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),$e.abrupt("return");case 14:if(!(Gn!=null&&Gn.some(function(Ye){return!Ye.output}))){$e.next=17;break}return x.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),$e.abrupt("return");case 17:if(_i.current?bi(!0):ci(!0),Je=pr==null?void 0:pr.map(function(Ye){return Object(A.a)(Object(A.a)({},Ye),{},{code:oe.Base64.encode(Ye==null?void 0:Ye.code)})}),!Ut){$e.next=25;break}return $e.next=22,rt(Ut,{practice:An,practice_codes:Je,practice_sets:Li,update_practice_sets:En});case 22:Xe=$e.sent,$e.next=28;break;case 25:return $e.next=27,be({practice:An,practice_codes:Je,practice_sets:Gn,publish:!_i.current});case 27:Xe=$e.sent;case 28:if(bi(!1),ci(!1),!(((vr=Xe)===null||vr===void 0?void 0:vr.status)===0)){$e.next=46;break}if(!((Ue=Xe)!==null&&Ue!==void 0&&(_e=Ue.similar_practice)!==null&&_e!==void 0&&_e.length)){$e.next=35;break}return K(!0),Qr((Le=Xe)===null||Le===void 0?void 0:Le.similar_practice),$e.abrupt("return");case 35:if(!Ut){$e.next=44;break}if(x.b.success("\u4FDD\u5B58\u6210\u529F"),_i.current){$e.next=42;break}return $e.next=40,Object(ye.a)("/api/practices/".concat(Ut,"/start"),{method:"get"});case 40:we=$e.sent,(we==null?void 0:we.status)===0&&Cr.push("/problems/".concat(we==null?void 0:we.identifier,"/oj/").concat(Ut));case 42:$e.next=46;break;case 44:x.b.success("\u65B0\u5EFA\u6210\u529F"),Cr.replace("/problems/".concat((He=Xe)===null||He===void 0?void 0:He.identifier,"/ojedit"));case 46:case"end":return $e.stop()}},lr)})),Kr.apply(this,arguments)}function Ar(){Cr.replace("/problems")}var gn=function(Ft){var mr=Math.floor(100/Ft.length),vr=mr+100%Ft.length;Ft=Ft.map(function(rn,Ir){return Ir===Ft.length-1?Object(A.a)(Object(A.a)({},rn),{},{score:vr}):Object(A.a)(Object(A.a)({},rn),{},{score:mr})}),ae(Ft)};function $n(lr){lr.target.value||gn(me),sn({type:Et.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},dn),{},{hack:Object(A.a)(Object(A.a)({},dn.hack),{},{test_set_score:lr.target.value})})}})}function xr(lr){sn({type:Et.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},dn),{},{hack:Object(A.a)(Object(A.a)({},dn.hack),{},{is_file:lr.target.value})})}})}function Ei(lr){mi(lr.target.checked)}function Vr(lr){var Ft=lr.target.value;Ft&&gn(me),sn({type:Et.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},dn),{},{hack:Object(A.a)(Object(A.a)({},dn.hack),{},{test_set_average:Ft})})}})}function jn(){var lr=Nr.getFieldValue("hack_sets"),Ft=lr.length+1,mr=Math.floor(100/Ft),vr=100%Ft;lr.map(function(rn,Ir){return tn&&(rn.score=mr),rn.position=Ir+1,rn}),lr.push({input:"",output:"",position:Ft,score:tn?mr+vr:0}),Nr.setFieldsValue({hack_sets:lr}),sn({type:Et.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},dn),{},{hack_sets:lr})}})}Object(re.useEffect)(function(){if(tn){var lr=cr==null?void 0:cr.length,Ft=Math.floor(100/lr),mr=100%lr;cr==null||cr.map(function(vr,rn){return vr.score=Ft,vr.position=rn+1,rn===lr-1&&(vr.score=Ft+mr),vr}),sn({type:Et.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},dn),{},{hack_sets:cr})}}),Nr.setFieldsValue({hack_sets:cr})}},[tn]);function Bn(lr){var Ft=Nr.getFieldValue("hack_sets"),mr=(Ft==null?void 0:Ft.length)-1,vr=Math.ceil(100/mr),rn=100%mr;Ft.splice(lr,1),Ft==null||Ft.map(function(Ir,An){return tn&&(Ir.score=vr,An===mr-1&&(Ir.score=vr+rn)),Ir.position=An+1,Ir}),sn({type:Et.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},dn),{},{hack_sets:Ft})}}),Nr.setFieldsValue({hack_sets:Ft})}function gi(lr){On(lr)}var ua=function(Ft){var mr,vr=(mr=_n.current)===null||mr===void 0?void 0:mr.findIndex(function(rn){return rn.language===li});_n.current[vr].code=Ft,fr(_n.current)},Xr=function(Ft){on(Object(A.a)({},Nr.getFieldsValue()))},Mr=function(){var lr=Object(E.a)($.a.mark(function Ft(mr){var vr;return $.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return Ir.next=2,Object(ye.a)("/api/practices/".concat(mr,"/start"),{method:"get"});case 2:vr=Ir.sent,(vr==null?void 0:vr.status)===0&&Object(Kt.U)("/problems/".concat(vr==null?void 0:vr.identifier,"/oj/").concat(mr));case 4:case"end":return Ir.stop()}},Ft)}));return function(mr){return lr.apply(this,arguments)}}(),Rr=function(){var lr=Object(E.a)($.a.mark(function Ft(){var mr,vr,rn,Ir,An,En;return $.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.next=2,Qe(Ut);case 2:mr=Hn.sent,vr=mr.name,rn=mr.status,Ir=mr.review_privilege,An=mr.review_description,En={review_privilege:Ir,status:rn,review_description:An,name:vr},Yt(En);case 6:case"end":return Hn.stop()}},Ft)}));return function(){return lr.apply(this,arguments)}}(),hi=function(){var Ft="";G.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:te.a.createElement("div",{className:"mt20"},te.a.createElement(Z.a,{className:ve.a.MdEditor,defaultValue:Ft,onChange:function(vr){Ft=vr}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var mr=Object(E.a)($.a.mark(function rn(){var Ir;return $.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:if(Ft){En.next=3;break}return x.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),En.abrupt("return",Promise.reject());case 3:return En.next=5,Object(ye.a)("/api/practices/".concat(Ut,"/review.json"),{method:"post",body:{op:"fail",description:Ft}});case 5:Ir=En.sent,(Ir==null?void 0:Ir.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),Rr());case 7:case"end":return En.stop()}},rn)}));function vr(){return mr.apply(this,arguments)}return vr}()})},Xi=function(){var lr=Object(E.a)($.a.mark(function Ft(){return $.a.wrap(function(vr){for(;;)switch(vr.prev=vr.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(qr==null?void 0:qr.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var rn=Object(E.a)($.a.mark(function An(){var En;return $.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.next=2,Object(ye.a)("/api/practices/".concat(Ut,"/review.json"),{method:"post",body:{op:"pass"}});case 2:En=Hn.sent,(En==null?void 0:En.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),Rr());case 4:case"end":return Hn.stop()}},An)}));function Ir(){return rn.apply(this,arguments)}return Ir}()});case 1:case"end":return vr.stop()}},Ft)}));return function(){return lr.apply(this,arguments)}}(),Yi=function(){var Ft=G.a.confirm({icon:null,width:700,className:"".concat(ve.a.cusModal," custom-modal-divider"),centered:!0,title:te.a.createElement(h.a,null,te.a.createElement(O.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),te.a.createElement(O.a,null,te.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return Ft.destroy()}}))),content:te.a.createElement("div",null,te.a.createElement(tr.a,{className:"mt20",value:(qr==null?void 0:qr.review_description)||""}))})};return te.a.createElement(c.a,{spinning:Si,size:"large",className:ve.a["oj-custom-large-spin"]},dn?te.a.createElement(re.Fragment,null,te.a.createElement("header",{className:ve.a.header},te.a.createElement("div",null,te.a.createElement("img",{src:"".concat(It.a.IMG_SERVER,"/images/").concat(Yn==null?void 0:Yn.image_url),alt:"user",width:30}),te.a.createElement("span",null,Yn==null?void 0:Yn.name)),te.a.createElement("h2",null," ",dn==null||((Dt=dn.hack)===null||Dt===void 0)?void 0:Dt.name," "),Ut?te.a.createElement("a",{className:ve.a.btn_back,onClick:Ar}," ",te.a.createElement(q.a,null),"\u9000\u51FA"):null),te.a.createElement(M.a,{form:Nr,initialValues:dn,layout:"vertical",className:ve.a["oj-form-container"],onValuesChange:Xr,onFinish:Lr},te.a.createElement(st.a,{hideResize:!0,className:ve.a["oj-problems"],leftChild:te.a.createElement(Nn,{formValue:Jr,onRemoveTestCase:Bn,onAddTestCase:jn,hack:dn.hack,onChangeScore:$n,onChangehide:Ei,onChangeAverage:Vr,onChangeFile:xr,uploadData:me,setUploadData:ae,handleUploadRatio:gn,ischecked:Fr,pointData:Ot,sourceData:qt,getPointData:sr,id:Ut}),rightChild:te.a.createElement(ke,{value:pr==null||((wt=pr.find(function(lr){return lr.language===li}))===null||wt===void 0)?void 0:wt.code,onChange:ua,onLanguage:gi,languageItems:pr,language:li})}),te.a.createElement("div",{className:ve.a.footer},!!Ut&&te.a.createElement("div",{className:ve.a.result},te.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),qr!=null&&qr.review_privilege?te.a.createElement(te.a.Fragment,null,te.a.createElement("div",{onClick:Xi,className:ve.a.pass},"\u901A\u8FC7"),te.a.createElement("div",{onClick:hi,className:ve.a.noPass},"\u4E0D\u901A\u8FC7")):te.a.createElement(te.a.Fragment,null,(qr==null?void 0:qr.status)===0&&te.a.createElement("div",{className:ve.a.passText},te.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(qr==null?void 0:qr.status)===1&&te.a.createElement("div",{className:ve.a.passText},te.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(qr==null?void 0:qr.status)===2&&te.a.createElement("div",{className:ve.a.passText},te.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(qr==null?void 0:qr.status)===3&&te.a.createElement("div",{className:ve.a.passText},te.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(qr==null?void 0:qr.status)===4&&te.a.createElement("div",{className:ve.a.passText},te.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(qr==null?void 0:qr.status)===5&&te.a.createElement("div",{className:ve.a.noPassText},te.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",te.a.createElement("span",{onClick:Yi},"\u67E5\u770B\u539F\u56E0")))),te.a.createElement(w.a,{type:"primary",ghost:!0,onClick:Ar},"\u9000\u51FA\u7F16\u8F91"),te.a.createElement(w.a,{disabled:ji,loading:ui,type:"primary",onClick:function(){_i.current=!0,Nr.submit()}},"\u4FDD\u5B58 "),Ut?te.a.createElement(w.a,{disabled:ui,loading:ji,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){_i.current=!1,Nr.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):te.a.createElement(w.a,{disabled:ui,loading:ji,type:"primary",onClick:function(){_i.current=!1,Nr.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,te.a.createElement(G.a,{centered:!0,destroyOnClose:!0,footer:null,visible:le,onCancel:function(){return K(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},te.a.createElement("div",null,te.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"),te.a.createElement(u.a,{dataSource:or,bordered:!1,scroll:or.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(Ft,mr){return te.a.createElement("span",{onClick:function(){return Mr(mr==null?void 0:mr.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},Ft)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(Ft){var mr;return(mr=Vt()(Ft))===null||mr===void 0?void 0:mr.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Nn(Ct){var Dt,wt,wr=Ct.ischecked,Cr=Ct.formValue,Jt=Ct.hack,Ut=Ct.onChangeAverage,Or=Ct.onChangeScore,un=Ct.onChangehide,Nr=Ct.onChangeFile,bt=Ct.onAddTestCase,Bt=Ct.onRemoveTestCase,Jr=Ct.uploadData,on=Ct.setUploadData,Ln=Ct.handleUploadRatio,Sn=Ct.pointData,le=Ct.sourceData,K=Ct.getPointData,X=Ct.id,ee=Jt.test_set_average,me=Jt.test_set_score,ae=Object(re.useState)(!1),Ke=Object(L.a)(ae,2),pt=Ke[0],Ot=Ke[1],Ht=Object(re.useState)(!1),vt=Object(L.a)(Ht,2),Xt=vt[0],qt=vt[1],Hr=function(pr,fr){var jr=Object(i.a)(Jr);jr.splice(fr,1),ee?Ln(jr):on(jr)},nn=function(pr,fr){console.log(pr,fr);var jr=Jr.map(function(Er,li){return li===fr?Object(A.a)(Object(A.a)({},Er),{},{score:pr.target.value?Number(pr.target.value):0}):Er});on(jr)},zr=function(pr){var fr=Jr.concat(pr);Jt.test_set_average?Ln(fr):on(fr)};function or(zt){zt.stopPropagation()}function Qr(){if(Object(rr.v)()){qt("practice");return}var zt="";G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:te.a.createElement("div",null,te.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(fr){zt=fr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var pr=Object(E.a)($.a.mark(function jr(){var Er;return $.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,Object(ye.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:zt}});case 2:Er=On.sent,(Er==null?void 0:Er.status)===0&&K();case 4:case"end":return On.stop()}},jr)}));function fr(){return pr.apply(this,arguments)}return fr}()})}function Cn(){if(Object(rr.v)()){qt("practice_source");return}var zt="";G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:te.a.createElement("div",null,te.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(fr){zt=fr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var pr=Object(E.a)($.a.mark(function jr(){var Er;return $.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,Object(ye.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:zt}});case 2:Er=On.sent,(Er==null?void 0:Er.status)===0&&K();case 4:case"end":return On.stop()}},jr)}));function fr(){return pr.apply(this,arguments)}return fr}()})}return te.a.createElement("div",{className:ve.a["oj-left-panel"]},te.a.createElement("div",{className:ve.a["oj-form-info"]},te.a.createElement(M.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:ve.a.inputOne},te.a.createElement(P.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:te.a.createElement("span",null,(Cr==null||((Dt=Cr.hack)===null||Dt===void 0||((wt=Dt.name)===null||wt===void 0))?void 0:wt.length)||0,"/",te.a.createElement("span",{className:"c-grey-999"},"60"))})),te.a.createElement(M.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},te.a.createElement(Z.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),te.a.createElement("div",{className:ve.a.row},te.a.createElement("div",{className:ve.a.a},te.a.createElement(M.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},te.a.createElement(r.a,null,ie(he.difficulty)))),te.a.createElement("div",{className:ve.a.b},te.a.createElement(M.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},te.a.createElement(r.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(pr){return pr.parentNode}},le.map(function(zt){return te.a.createElement(r.a.Option,{key:zt.id,value:zt.id},zt.name)}))),te.a.createElement(w.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return Cn()}},Object(rr.v)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),te.a.createElement("div",{className:ve.a.row},te.a.createElement("div",{className:ve.a.b,style:{width:"100%",marginLeft:0}},te.a.createElement(M.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},te.a.createElement(r.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(pr){return pr.parentNode}},Sn.map(function(zt){return te.a.createElement(r.a.Option,{key:zt.id,value:zt.id},zt.name)}))),te.a.createElement(w.a,{type:"primary",ghost:!0,onClick:function(){return Qr()}},Object(rr.v)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),te.a.createElement("div",{className:ve.a.field},te.a.createElement(M.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:ve.a.inputTwo,extra:te.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",te.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},te.a.createElement(t.a,{style:{width:185},min:3}))),te.a.createElement("div",{className:"tst-case-info"},te.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Jt.is_file&&te.a.createElement(w.a,{style:{height:40},type:"primary",ghost:!0,onClick:bt},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),te.a.createElement(M.a.Item,{name:["hack","test_set_score"]},te.a.createElement(p.a.Group,{onChange:Or},te.a.createElement(p.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",te.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")),te.a.createElement(p.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",te.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")))),te.a.createElement(S.a,{style:{marginBottom:"5px"},checked:wr,onChange:un},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),te.a.createElement(M.a.Item,{className:ve.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},te.a.createElement(p.a.Group,{onChange:Nr},te.a.createElement(y.a,{direction:"horizontal"},te.a.createElement(p.a,{value:!1},"\u6587\u672C"),te.a.createElement(p.a,{value:!0},"\u6587\u4EF6")))),!Jt.test_set_score&&te.a.createElement(M.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},te.a.createElement(p.a.Group,{onChange:Ut},te.a.createElement(p.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),te.a.createElement(p.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Jt.is_file&&te.a.createElement("div",{className:ve.a.upBtn},te.a.createElement(w.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return Ot(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),te.a.createElement(At.a,{disabled:Jt==null?void 0:Jt.test_set_average,inputChange:nn,showScore:!Jt.test_set_score,data:Jr,onRemove:Hr})),!Jt.is_file&&te.a.createElement(M.a.List,{name:"hack_sets"},function(zt,pr){return Object(C.a)(pr),te.a.createElement(z.a,{accordion:!0},zt.map(function(fr,jr){return te.a.createElement(nr,{key:"".concat(fr.key,"--").concat(jr),header:te.a.createElement("a",{className:ve.a["test-case-name"]},te.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",jr+1),me?null:te.a.createElement(te.a.Fragment,null,te.a.createElement(M.a.Item,{name:[fr.name,"score"],fieldKey:[fr.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(jr+1,"\u8BC4\u5206")}]},te.a.createElement(t.a,{onClick:or,min:0,max:100,disabled:ee})),te.a.createElement("span",null,"%"))),extra:jr>0?te.a.createElement("div",{onClick:or},te.a.createElement(v.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(jr+1),onConfirm:function(){Bt(jr)}},te.a.createElement(Y.a,{className:ve.a["btn-remove-case"]}))):null},te.a.createElement(M.a.Item,{label:"\u8F93\u5165",name:[fr.name,"input"],fieldKey:[fr.fieldKey,"input"]},te.a.createElement(Wt,null)),te.a.createElement(M.a.Item,{label:"\u8F93\u51FA",name:[fr.name,"output"],fieldKey:[fr.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},te.a.createElement(Wt,null)))}))}))),te.a.createElement(At.b,{rootIdentifier:X,visible:pt,onClose:function(){return Ot(!1)},onOK:zr}),te.a.createElement(mt,{visible:Xt,onCancel:function(){qt(!1),K()},onOK:function(){qt(!1),K()}}))}},rdUC:function(F,Q,j){var N=j("MFOe"),v=N.Global;F.exports={name:"localStorage",read:k,write:y,each:m,remove:S,clearAll:b};function C(){return v.localStorage}function k(p){return C().getItem(p)}function y(p,d){return C().setItem(p,d)}function m(p){for(var d=C().length-1;d>=0;d--){var t=C().key(d);p(k(t),t)}}function S(p){return C().removeItem(p)}function b(){return C().clear()}},sR1s:function(F,Q,j){"use strict";j.d(Q,"b",function(){return k}),j.d(Q,"a",function(){return y}),j.d(Q,"c",function(){return m}),j.d(Q,"d",function(){return S});var N=j("U8pU"),v="RC_TABLE_KEY";function C(b){return b==null?[]:Array.isArray(b)?b:[b]}function k(b,p){if(!p&&typeof p!="number")return b;for(var d=C(p),t=b,l=0;l1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(f.length===0)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var w=f[0];if(m.isValidElement(w)&&Object(t.c)(w)){var _=w.ref;f[0]=m.cloneElement(w,{ref:Object(t.a)(_,this.setChildNode)})}return f.length===1?f[0]:f.map(function(h,R){return!m.isValidElement(h)||"key"in h&&h.key!==null?h:m.cloneElement(h,{key:"".concat(r,"-").concat(R)})})}}]),c}(m.Component);i.displayName="ResizeObserver",Q.a=i},uGsb:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("MlIO"),j("1uat"))})(this,function(N){return function(){var v=N,C=v.x64,k=C.Word,y=C.WordArray,m=v.algo,S=m.SHA512,b=m.SHA384=S.extend({_doReset:function(){this._hash=new y.init([new k.init(3418070365,3238371032),new k.init(1654270250,914150663),new k.init(2438529370,812702999),new k.init(355462360,4144912697),new k.init(1731405415,4290775857),new k.init(2394180231,1750603025),new k.init(3675008525,1694076839),new k.init(1203062813,3204075428)])},_doFinalize:function(){var p=S._doFinalize.call(this);return p.sigBytes-=16,p}});v.SHA384=S._createHelper(b),v.HmacSHA384=S._createHmacHelper(b)}(),N.SHA384})},uGxW:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.NoPadding={pad:function(){},unpad:function(){}},N.pad.NoPadding})},uQRt:function(F,Q,j){F.exports=N;function N(){return j("gaXo"),{}}},ulZh:function(F,Q,j){typeof window!="undefined"&&function(v,C){F.exports=C()}(this,function(){return function(N){var v={};function C(k){if(v[k])return v[k].exports;var y=v[k]={i:k,l:!1,exports:{}};return N[k].call(y.exports,y,y.exports,C),y.l=!0,y.exports}return C.m=N,C.c=v,C.d=function(k,y,m){C.o(k,y)||Object.defineProperty(k,y,{enumerable:!0,get:m})},C.r=function(k){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})},C.t=function(k,y){if(y&1&&(k=C(k)),y&8)return k;if(y&4&&typeof k=="object"&&k&&k.__esModule)return k;var m=Object.create(null);if(C.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:k}),y&2&&typeof k!="string")for(var S in k)C.d(m,S,function(b){return k[b]}.bind(null,S));return m},C.n=function(k){var y=k&&k.__esModule?function(){return k.default}:function(){return k};return C.d(y,"a",y),y},C.o=function(k,y){return Object.prototype.hasOwnProperty.call(k,y)},C.p="/dist/",C(C.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(N,v,C){"use strict";var k=Object.prototype.hasOwnProperty,y="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(y=!1));function S(t,l,r){this.fn=t,this.context=l,this.once=r||!1}function b(t,l,r,i,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new S(r,i||t,o),c=y?y+l:l;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],s]:t._events[c].push(s):(t._events[c]=s,t._eventsCount++),t}function p(t,l){--t._eventsCount===0?t._events=new m:delete t._events[l]}function d(){this._events=new m,this._eventsCount=0}d.prototype.eventNames=function(){var l=[],r,i;if(this._eventsCount===0)return l;for(i in r=this._events)k.call(r,i)&&l.push(y?i.slice(1):i);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(r)):l},d.prototype.listeners=function(l){var r=y?y+l:l,i=this._events[r];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,s=i.length,c=new Array(s);o0},!1)}function t(l,r){for(var i={main:[r]},o={main:[]},s={main:{}};d(i);)for(var c=Object.keys(i),a=0;a=2*R/g||A<=z)return;var W=Number.POSITIVE_INFINITY,G;for(G=c.level-1;G>E;G--){var U=x[G].maxBitrate;if(W=R*U/(8*.8*L),W=A)return;var P=this.bwEstimator.getEstimate();d.logger.warn("Fragment "+c.sn+(a?" part "+a.index:"")+" of level "+c.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+G+` Current BW estimate: `+(Object(k.isFiniteNumber)(P)?(P/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+A.toFixed(3)+` s Estimated load time for the next fragment: `+W.toFixed(3)+` s Time to underbuffer: `+z.toFixed(3)+" s"),u.nextLoadLevel=G,this.bwEstimator.sample(O,h.loaded),this.clearTimer(),c.loader&&(this.fragCurrent=this.partCurrent=null,c.loader.abort()),u.trigger(m.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:c,part:a,stats:h})},o.onFragLoaded=function(c,a){var u=a.frag,f=a.part;if(u.type===p.PlaylistLevelType.MAIN&&Object(k.isFiniteNumber)(u.sn)){var w=f?f.stats:u.stats,_=f?f.duration:u.duration;if(this.clearTimer(),this.lastLoadedFragLevel=u.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var h=this.hls.levels[u.level],R=(h.loaded?h.loaded.bytes:0)+w.loaded,O=(h.loaded?h.loaded.duration:0)+_;h.loaded={bytes:R,duration:O},h.realBitrate=Math.round(8*R/O)}if(u.bitrateTest){var g={stats:w,frag:u,part:f,id:u.type};this.onFragBuffered(m.Events.FRAG_BUFFERED,g),u.bitrateTest=!1}}},o.onFragBuffered=function(c,a){var u=a.frag,f=a.part,w=f?f.stats:u.stats;if(w.aborted)return;if(u.type!==p.PlaylistLevelType.MAIN||u.sn==="initSegment")return;var _=w.parsing.end-w.loading.start;this.bwEstimator.sample(_,w.loaded),w.bwEstimate=this.bwEstimator.getEstimate(),u.bitrateTest?this.bitrateTestDelay=_/1e3:this.bitrateTestDelay=0},o.onError=function(c,a){switch(a.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var c=this.fragCurrent,a=this.partCurrent,u=this.hls,f=u.maxAutoLevel,w=u.config,_=u.minAutoLevel,h=u.media,R=a?a.duration:c?c.duration:0,O=h?h.currentTime:0,g=h&&h.playbackRate!==0?Math.abs(h.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():w.abrEwmaDefaultEstimate,E=(S.BufferHelper.bufferInfo(h,O,w.maxBufferHole).end-O)/g,T=this.findBestLevel(x,_,f,E,w.abrBandWidthFactor,w.abrBandWidthUpFactor);if(T>=0)return T;d.logger.trace((E?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var M=R?Math.min(R,w.maxStarvationDelay):w.maxStarvationDelay,L=w.abrBandWidthFactor,A=w.abrBandWidthUpFactor;if(!E){var V=this.bitrateTestDelay;if(V){var z=R?Math.min(R,w.maxLoadingDelay):w.maxLoadingDelay;M=z-V,d.logger.trace("bitrate test took "+Math.round(1e3*V)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*M)+" ms"),L=A=1}}return T=this.findBestLevel(x,_,f,E+M,L,A),Math.max(T,0)},o.findBestLevel=function(c,a,u,f,w,_){for(var h,R=this.fragCurrent,O=this.partCurrent,g=this.lastLoadedFragLevel,x=this.hls.levels,E=x[g],T=!!(E!=null&&(h=E.details)!==null&&h!==void 0&&h.live),M=E==null?void 0:E.codecSet,L=O?O.duration:R?R.duration:0,A=u;A>=a;A--){var V=x[A];if(!V||M&&V.codecSet!==M)continue;var z=V.details,W=(O?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||L,G=void 0;A<=g?G=w*c:G=_*c;var U=x[A].maxBitrate,P=U*W/G;if(d.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+A+"/"+Math.round(G)+"/"+U+"/"+W+"/"+f+"/"+P),G>U&&(!P||T&&!this.bitrateTestDelay||P0&&E===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=y.State.IDLE):(this.loadedmetadata=!1,this.state=y.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()},g.doTick=function(){switch(this.state){case y.State.IDLE:this.doTickIdle();break;case y.State.WAITING_TRACK:{var E,T=this.levels,M=this.trackId,L=T==null||((E=T[M])===null||E===void 0)?void 0:E.details;if(L){if(this.waitForCdnTuneIn(L))break;this.state=y.State.WAITING_INIT_PTS}break}case y.State.FRAG_LOADING_WAITING_RETRY:{var A,V=performance.now(),z=this.retryDate;(!z||V>=z||(A=this.media)!==null&&A!==void 0&&A.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=y.State.IDLE);break}case y.State.WAITING_INIT_PTS:{var W=this.waitingData;if(W){var G=W.frag,U=W.part,P=W.cache,H=W.complete;if(this.initPTS[G.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=y.State.FRAG_LOADING;var $=P.flush(),re={frag:G,part:U,payload:$,networkDetails:null};this._handleFragmentLoadProgress(re),H&&R.prototype._handleFragmentLoadComplete.call(this,re)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+G.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var te=this.getLoadPosition(),ge=S.BufferHelper.bufferInfo(this.mediaBuffer,te,this.config.maxBufferHole),ve=Object(o.fragmentWithinToleranceTest)(ge.end,this.config.maxFragLookUpTolerance,G);ve<0&&(a.logger.log("Waiting fragment cc ("+G.cc+") @ "+G.start+" cancelled because another fragment at "+ge.end+" is needed"),this.clearWaitingFragment())}}else this.state=y.State.IDLE}}this.onTickEnd()},g.clearWaitingFragment=function(){var E=this.waitingData;E&&(this.fragmentTracker.removeFragment(E.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=y.State.IDLE)},g.onTickEnd=function(){var E=this.media;if(!E||!E.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:E,M=T.buffered;!this.loadedmetadata&&M.length&&(this.loadedmetadata=!0),this.lastCurrentTime=E.currentTime},g.doTickIdle=function(){var E,T,M=this.hls,L=this.levels,A=this.media,V=this.trackId,z=M.config;if(!L||!L[V])return;if(!A&&(this.startFragRequested||!z.startFragPrefetch))return;var W=L[V],G=W.details;if(!G||G.live&&this.levelLastLoaded!==V||this.waitForCdnTuneIn(G)){this.state=y.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,t.ElementaryStreamTypes.AUDIO,d.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,d.PlaylistLevelType.AUDIO);if(U===null)return;var P=U.len,H=this.getMaxBufferLength(),$=this.audioSwitch;if(P>=H&&!$)return;if(!$&&this._streamEnded(U,G)){M.trigger(m.Events.BUFFER_EOS,{type:"audio"}),this.state=y.State.ENDED;return}var re=G.fragments,te=re[0].start,ge=U.end;if($){var ve=this.getLoadPosition();ge=ve,G.PTSKnown&&vete||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),A.currentTime=te+.05))}var de=this.getNextFragment(ge,G);if(!de){this.bufferFlushed=!0;return}((E=de.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((T=de.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(de,G):this.loadFragment(de,G,ge)},g.getMaxBufferLength=function(){var E=R.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,d.PlaylistLevelType.MAIN);return T===null?E:Math.max(E,T.len)},g.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},g.onAudioTracksUpdated=function(E,T){var M=T.audioTracks;this.resetTransmuxer(),this.levels=M.map(function(L){return new p.Level(L)})},g.onAudioTrackSwitching=function(E,T){var M=!!T.url;this.trackId=T.id;var L=this.fragCurrent;L!=null&&L.loader&&L.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),M?this.setInterval(_):this.resetTransmuxer(),M?(this.audioSwitch=!0,this.state=y.State.IDLE):this.state=y.State.STOPPED,this.tick()},g.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},g.onLevelLoaded=function(E,T){this.mainDetails=T.details},g.onAudioTrackLoaded=function(E,T){var M,L=this.levels,A=T.details,V=T.id;if(!L){this.warn("Audio tracks were reset while loading level "+V);return}this.log("Track "+V+" loaded ["+A.startSN+","+A.endSN+"],duration:"+A.totalduration);var z=L[V],W=0;if(A.live||(M=z.details)!==null&&M!==void 0&&M.live){var G=this.mainDetails;if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed||!G)return;!z.details&&A.hasProgramDateTime&&G.hasProgramDateTime?(Object(s.alignMediaPlaylistByPDT)(A,G),W=A.fragments[0].start):W=this.alignPlaylists(A,z.details)}z.details=A,this.levelLastLoaded=V,!this.startFragRequested&&(this.mainDetails||!A.live)&&this.setStartPosition(z.details,W),this.state===y.State.WAITING_TRACK&&!this.waitForCdnTuneIn(A)&&(this.state=y.State.IDLE),this.tick()},g._handleFragmentLoadProgress=function(E){var T,M=E.frag,L=E.part,A=E.payload,V=this.config,z=this.trackId,W=this.levels;if(!W){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+M.sn+" of level "+M.level+" will not be buffered");return}var G=W[z];console.assert(G,"Audio track is defined on fragment load progress");var U=G.details;console.assert(U,"Audio track details are defined on fragment load progress");var P=V.defaultAudioCodec||G.audioCodec||"mp4a.40.2",H=this.transmuxer;H||(H=this.transmuxer=new r.default(this.hls,d.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var $=this.initPTS[M.cc],re=(T=M.initSegment)===null||T===void 0?void 0:T.data;if($!==void 0){var te=!1,ge=L?L.index:-1,ve=ge!==-1,de=new i.ChunkMetadata(M.level,M.sn,M.stats.chunkCount,A.byteLength,ge,ve);H.push(A,re,P,"",M,L,U.totalduration,te,de,$)}else{a.logger.log("Unknown video PTS for cc "+M.cc+", waiting for video PTS before demuxing audio frag "+M.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+z);var De=this.waitingData=this.waitingData||{frag:M,part:L,cache:new l.default,complete:!1},Te=De.cache;Te.push(new Uint8Array(A)),this.waitingVideoCC=this.videoTrackCC,this.state=y.State.WAITING_INIT_PTS}},g._handleFragmentLoadComplete=function(E){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,E)},g.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},g.onBufferCreated=function(E,T){var M=T.tracks.audio;M&&(this.mediaBuffer=M.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},g.onFragBuffered=function(E,T){var M=T.frag,L=T.part;if(M.type!==d.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(M)){this.warn("Fragment "+M.sn+(L?" p: "+L.index:"")+" of level "+M.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}M.sn!=="initSegment"&&(this.fragPrevious=M,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(M,L)},g.onError=function(E,T){switch(T.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:case c.ErrorDetails.KEY_LOAD_ERROR:case c.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.AUDIO,T);break;case c.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case c.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==y.State.ERROR&&this.state!==y.State.STOPPED&&(this.state=T.fatal?y.State.ERROR:y.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case c.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===y.State.PARSING||this.state===y.State.PARSED)){var M=!0,L=this.getFwdBufferInfo(this.mediaBuffer,d.PlaylistLevelType.AUDIO);L&&L.len>.5&&(M=!this.reduceMaxBufferLength(L.len)),M&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},g.onBufferFlushed=function(E,T){var M=T.type;M===t.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},g._handleTransmuxComplete=function(E){var T,M="audio",L=this.hls,A=E.remuxResult,V=E.chunkMeta,z=this.getCurrentContext(V);if(!z){this.warn("The loading context changed while buffering fragment "+V.sn+" of level "+V.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(V.level);return}var W=z.frag,G=z.part,U=A.audio,P=A.text,H=A.id3,$=A.initSegment;if(this.fragContextChanged(W))return;if(this.state=y.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),$!=null&&$.tracks&&(this._bufferInitSegment($.tracks,W,V),L.trigger(m.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:M,tracks:$.tracks})),U){var re=U.startPTS,te=U.endPTS,ge=U.startDTS,ve=U.endDTS;G&&(G.elementaryStreams[t.ElementaryStreamTypes.AUDIO]={startPTS:re,endPTS:te,startDTS:ge,endDTS:ve}),W.setElementaryStreamInfo(t.ElementaryStreamTypes.AUDIO,re,te,ge,ve),this.bufferFragmentData(U,W,G,V)}if(H!=null&&(T=H.samples)!==null&&T!==void 0&&T.length){var de=u({frag:W,id:M},H);L.trigger(m.Events.FRAG_PARSING_METADATA,de)}if(P){var De=u({frag:W,id:M},P);L.trigger(m.Events.FRAG_PARSING_USERDATA,De)}},g._bufferInitSegment=function(E,T,M){if(this.state!==y.State.PARSING)return;E.video&&delete E.video;var L=E.audio;if(!L)return;L.levelCodec=L.codec,L.id="audio",this.log("Init audio buffer, container:"+L.container+", codecs[parsed]=["+L.codec+"]"),this.hls.trigger(m.Events.BUFFER_CODECS,E);var A=L.initSegment;if(A!=null&&A.byteLength){var V={type:"audio",frag:T,part:null,chunkMeta:M,parent:T.type,data:A};this.hls.trigger(m.Events.BUFFER_APPENDING,V)}this.tick()},g.loadFragment=function(E,T,M){var L=this.fragmentTracker.getState(E);this.fragCurrent=E,(this.audioSwitch||L===b.FragmentState.NOT_LOADED||L===b.FragmentState.PARTIAL)&&(E.sn==="initSegment"?this._loadInitSegment(E):T.live&&!Object(k.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=y.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,E,T,M)))},g.completeAudioSwitch=function(){var E=this.hls,T=this.media,M=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,E.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:M})},O}(y.default);v.default=h},"./src/controller/audio-track-controller.ts":function(N,v,C){"use strict";C.r(v);var k=C("./src/events.ts"),y=C("./src/errors.ts"),m=C("./src/controller/base-playlist-controller.ts"),S=C("./src/types/loader.ts");function b(r,i){for(var o=0;o=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var u=a[this.trackId];this.log("Now switching to audio-track index "+c);var f=a[c],w=f.id,_=f.groupId,h=_===void 0?"":_,R=f.name,O=f.type,g=f.url;if(this.trackId=c,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(k.Events.AUDIO_TRACK_SWITCHING,{id:w,groupId:h,name:R,type:O,url:g}),f.details&&!f.details.live)return;var x=this.switchParams(f.url,u==null?void 0:u.details);this.loadPlaylist(x)},o.selectInitialTrack=function(){var c=this.tracksInGroup;console.assert(c.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,u=this.findTrackId(a)||this.findTrackId();u!==-1?this.setAudioTrack(u):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(c){for(var a=this.tracksInGroup,u=0;ui.partTarget&&(f+=1)}if(Object(k.isFiniteNumber)(u))return new y.HlsUrlParameters(u,Object(k.isFiniteNumber)(f)?f:void 0,y.HlsSkip.No)}}},t.loadPlaylist=function(r){},t.shouldLoadTrack=function(r){return this.canLoad&&r&&!!r.url&&(!r.details||r.details.live)},t.playlistLoaded=function(r,i,o){var s=this,c=i.details,a=i.stats,u=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(c.advancedDateTime=Date.now()-u,c.live||o!=null&&o.live){if(c.reloaded(o),o&&this.log("live playlist "+r+" "+(c.advanced?"REFRESHED "+c.lastPartSn+"-"+c.lastPartIndex:"MISSED")),o&&c.fragments.length>0&&Object(m.mergeDetails)(o,c),!this.canLoad||!c.live)return;var f,w=void 0,_=void 0;if(c.canBlockReload&&c.endSN&&c.advanced){var h=this.hls.config.lowLatencyMode,R=c.lastPartSn,O=c.endSN,g=c.lastPartIndex,x=g!==-1,E=R===O,T=h?0:g;x?(w=E?O+1:R,_=E?T:g+1):w=O+1;var M=c.age,L=M+c.ageHeader,A=Math.min(L-c.partTarget,c.targetduration*1.5);if(A>0){if(o&&A>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+A+" with playlist age: "+c.age),A=0;else{var V=Math.floor(A/c.targetduration);if(w+=V,_!==void 0){var z=Math.round(A%c.targetduration/c.partTarget);_+=z}this.log("CDN Tune-in age: "+c.ageHeader+"s last advanced "+M.toFixed(2)+"s goal: "+A+" skip sn "+V+" to part "+_)}c.tuneInGoal=A}if(f=this.getDeliveryDirectives(c,i.deliveryDirectives,w,_),h||!E){this.loadPlaylist(f);return}}else f=this.getDeliveryDirectives(c,i.deliveryDirectives,w,_);var W=Object(m.computeReloadInterval)(c,a);w!==void 0&&c.canBlockReload&&(W-=c.partTarget||1),this.log("reload live playlist "+r+" in "+Math.round(W)+" ms"),this.timer=self.setTimeout(function(){return s.loadPlaylist(f)},W)}else this.clearTimer()},t.getDeliveryDirectives=function(r,i,o,s){var c=Object(y.getSkipValue)(r,o);return i!=null&&i.skip&&r.deltaUpdateFailed&&(o=i.msn,s=i.part,c=y.HlsSkip.No),new y.HlsUrlParameters(o,s,c)},t.retryLoadingOrFail=function(r){var i=this,o=this.hls.config,s=this.retryCount-1&&(c=r.context)!==null&&c!==void 0&&c.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+r.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return i.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+r.details+'"')}}else this.warn('cannot recover from error "'+r.details+'"'),this.clearTimer(),r.fatal=!0;return s},d}()},"./src/controller/base-stream-controller.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"State",function(){return O}),C.d(v,"default",function(){return g});var k=C("./src/polyfills/number.ts"),y=C("./src/task-loop.ts"),m=C("./src/controller/fragment-tracker.ts"),S=C("./src/utils/buffer-helper.ts"),b=C("./src/utils/logger.ts"),p=C("./src/events.ts"),d=C("./src/errors.ts"),t=C("./src/types/transmuxer.ts"),l=C("./src/utils/mp4-tools.ts"),r=C("./src/utils/discontinuities.ts"),i=C("./src/controller/fragment-finders.ts"),o=C("./src/controller/level-helper.ts"),s=C("./src/loader/fragment-loader.ts"),c=C("./src/crypt/decrypter.ts"),a=C("./src/utils/time-ranges.ts"),u=C("./src/types/loader.ts");function f(x,E){for(var T=0;T$;(G0&&G&&G.key&&G.iv&&G.method==="AES-128"){var U=self.performance.now();return A.decrypter.webCryptoDecrypt(new Uint8Array(W),G.key.buffer,G.iv.buffer).then(function(P){var H=self.performance.now();return z.trigger(p.Events.FRAG_DECRYPTED,{frag:L,payload:P,stats:{tstart:U,tdecrypt:H}}),V.payload=P,V})}return V}).then(function(V){var z=A.fragCurrent,W=A.hls,G=A.levels;if(!G)throw new Error("init load aborted, missing levels");var U=G[L.level].details;console.assert(U,"Level details are defined when init segment is loaded");var P=L.stats;A.state=O.IDLE,A.fragLoadError=0,L.data=new Uint8Array(V.payload),P.parsing.start=P.buffering.start=self.performance.now(),P.parsing.end=P.buffering.end=self.performance.now(),V.frag===z&&W.trigger(p.Events.FRAG_BUFFERED,{stats:P,frag:z,part:null,id:L.type}),A.tick()}).catch(function(V){A.warn(V),A.resetFragmentLoading(L)})},T.fragContextChanged=function(L){var A=this.fragCurrent;return!L||!A||L.level!==A.level||L.sn!==A.sn||L.urlId!==A.urlId},T.fragBufferedComplete=function(L,A){var V=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+L.type+" sn: "+L.sn+(A?" part: "+A.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+L.level+" "+a.default.toString(S.BufferHelper.getBuffered(V))),this.state=O.IDLE,this.tick()},T._handleFragmentLoadComplete=function(L){var A=this.transmuxer;if(!A)return;var V=L.frag,z=L.part,W=L.partsLoaded,G=!W||W.length===0||W.some(function(P){return!P}),U=new t.ChunkMetadata(V.level,V.sn,V.stats.chunkCount+1,0,z?z.index:-1,!G);A.flush(U)},T._handleFragmentLoadProgress=function(L){},T._doFragLoad=function(L,A,V,z){var W=this;if(V===void 0&&(V=null),!this.levels)throw new Error("frag load aborted, missing levels");if(V=Math.max(L.start,V||0),this.config.lowLatencyMode&&A){var G=A.partList;if(G&&z){V>L.end&&A.fragmentHint&&(L=A.fragmentHint);var U=this.getNextPart(G,L,V);if(U>-1){var P=G[U];return this.log("Loading part sn: "+L.sn+" p: "+P.index+" cc: "+L.cc+" of playlist ["+A.startSN+"-"+A.endSN+"] parts [0-"+U+"-"+(G.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+L.level+", target: "+parseFloat(V.toFixed(3))),this.nextLoadPosition=P.start+P.duration,this.state=O.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:L,part:G[U],targetBufferTime:V}),this.doFragPartsLoad(L,G,U,z).catch(function(H){return W.handleFragLoadError(H)})}else if(!L.url||this.loadedEndOfParts(G,V))return Promise.resolve(null)}}return this.log("Loading fragment "+L.sn+" cc: "+L.cc+" "+(A?"of ["+A.startSN+"-"+A.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+L.level+", target: "+parseFloat(V.toFixed(3))),Object(k.isFiniteNumber)(L.sn)&&!this.bitrateTest&&(this.nextLoadPosition=L.start+L.duration),this.state=O.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:L,targetBufferTime:V}),this.fragmentLoader.load(L,z).catch(function(H){return W.handleFragLoadError(H)})},T.doFragPartsLoad=function(L,A,V,z){var W=this;return new Promise(function(G,U){var P=[],H=function $(re){var te=A[re];W.fragmentLoader.loadPart(L,te,z).then(function(ge){P[te.index]=ge;var ve=ge.part;W.hls.trigger(p.Events.FRAG_LOADED,ge);var de=A[re+1];if(de&&de.fragment===L)$(re+1);else return G({frag:L,part:ve,partsLoaded:P})}).catch(U)};H(V)})},T.handleFragLoadError=function(L){var A=L.data;return A&&A.details===d.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(A.frag,A.part):this.hls.trigger(p.Events.ERROR,A),null},T._handleTransmuxerFlush=function(L){var A=this.getCurrentContext(L);if(!A||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var V=A.frag,z=A.part,W=A.level,G=self.performance.now();V.stats.parsing.end=G,z&&(z.stats.parsing.end=G),this.updateLevelTiming(V,z,W,L.partial)},T.getCurrentContext=function(L){var A=this.levels,V=L.level,z=L.sn,W=L.part;if(!A||!A[V])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+V+". The current chunk will not be buffered."),null;var G=A[V],U=W>-1?Object(o.getPartWith)(G,z,W):null,P=U?U.fragment:Object(o.getFragmentWithSN)(G,z,this.fragCurrent);return P?{frag:P,part:U,level:G}:null},T.bufferFragmentData=function(L,A,V,z){if(!L||this.state!==O.PARSING)return;var W=L.data1,G=L.data2,U=W;if(W&&G&&(U=Object(l.appendUint8Array)(W,G)),!U||!U.length)return;var P={type:L.type,frag:A,part:V,chunkMeta:z,parent:A.type,data:U};this.hls.trigger(p.Events.BUFFER_APPENDING,P),L.dropped&&L.independent&&!V&&this.flushBufferGap(A)},T.flushBufferGap=function(L){var A=this.media;if(!A)return;if(!S.BufferHelper.isBuffered(A,A.currentTime)){this.flushMainBuffer(0,L.start);return}var V=A.currentTime,z=S.BufferHelper.bufferInfo(A,V,0),W=L.duration,G=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),U=Math.max(Math.min(L.start-G,z.end-G),V+G);L.start-U>G&&this.flushMainBuffer(U,L.start)},T.getFwdBufferInfo=function(L,A){var V=this.config,z=this.getLoadPosition();if(!Object(k.isFiniteNumber)(z))return null;var W=S.BufferHelper.bufferInfo(L,z,V.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var G=this.fragmentTracker.getBufferedFrag(z,A);if(G&&W.nextStart=V?(A.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+A.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(L,A){var V,z,W=A.fragments,G=W.length;if(!G)return null;var U=this.config,P=W[0].start,H;if(A.live){var $=U.initialLiveManifestSize;if(G<$)return this.warn("Not enough fragments to start playback (have: "+G+", need: "+$+")"),null;!A.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(H=this.getInitialLiveFragment(A,W),this.startPosition=H?this.hls.liveSyncPosition||H.start:L)}else L<=P&&(H=W[0]);if(!H){var re=U.lowLatencyMode?A.partEnd:A.fragmentEnd;H=this.getFragmentAtPosition(L,re,A)}return(V=H)!==null&&V!==void 0&&V.initSegment&&!((z=H)!==null&&z!==void 0&&z.initSegment.data)&&!this.bitrateTest&&(H=H.initSegment),H},T.getNextPart=function(L,A,V){for(var z=-1,W=!1,G=!0,U=0,P=L.length;U-1&&VV.start&&V.loaded},T.getInitialLiveFragment=function(L,A){var V=this.fragPrevious,z=null;if(V){if(L.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+V.programDateTime),z=Object(i.findFragmentByPDT)(A,V.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var W=V.sn+1;if(W>=L.startSN&&W<=L.endSN){var G=A[W-L.startSN];V.cc===G.cc&&(z=G,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=Object(i.findFragWithCC)(A,V.cc),z&&this.log("Live playlist, switching playlist, load frag with same CC: "+z.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(z=this.getFragmentAtPosition(U,this.bitrateTest?L.fragmentEnd:L.edge,L))}return z},T.getFragmentAtPosition=function(L,A,V){var z=this.config,W=this.fragPrevious,G=V.fragments,U=V.endSN,P=V.fragmentHint,H=z.maxFragLookUpTolerance,$=!!(z.lowLatencyMode&&V.partList&&P);$&&P&&!this.bitrateTest&&(G=G.concat(P),U=P.sn);var re;if(LA-H?0:H;re=Object(i.findFragmentByPTS)(W,G,L,te)}else re=G[G.length-1];if(re){var ge=re.sn-V.startSN,ve=W&&re.level===W.level,de=G[ge+1],De=this.fragmentTracker.getState(re);if(De===m.FragmentState.BACKTRACKED){re=null;for(var Te=ge;G[Te]&&this.fragmentTracker.getState(G[Te])===m.FragmentState.BACKTRACKED;)W?re=G[Te--]:re=G[--Te];re||(re=de)}else W&&re.sn===W.sn&&!$&&(ve&&(re.sn=G-A.maxFragLookUpTolerance&&W<=U;if(z!==null&&V.duration>z&&(W"+L.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+U),re}return P},T.waitForCdnTuneIn=function(L){var A=3;return L.live&&L.canBlockReload&&L.tuneInGoal>Math.max(L.partHoldBack,L.partTarget*A)},T.setStartPosition=function(L,A){var V=this.startPosition;if(V"+L))}}]),E}(y.default)},"./src/controller/buffer-controller.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return i});var k=C("./src/polyfills/number.ts"),y=C("./src/events.ts"),m=C("./src/utils/logger.ts"),S=C("./src/errors.ts"),b=C("./src/utils/buffer-helper.ts"),p=C("./src/utils/mediasource-helper.ts"),d=C("./src/loader/fragment.ts"),t=C("./src/controller/buffer-operation-queue.ts"),l=Object(p.getMediaSource)(),r=/([ha]vc.)(?:\.[^.,]+)+/,i=function(){function o(c){var a=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 u=a.hls,f=a.media,w=a.mediaSource;m.logger.log("[buffer-controller]: Media source opened"),f&&(a.updateMediaElementDuration(),u.trigger(y.Events.MEDIA_ATTACHED,{media:f})),w&&w.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){m.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){m.logger.log("[buffer-controller]: Media source ended")},this.hls=c,this._initSourceBuffer(),this.registerListeners()}var s=o.prototype;return s.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},s.destroy=function(){this.unregisterListeners(),this.details=null},s.registerListeners=function(){var a=this.hls;a.on(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(y.Events.BUFFER_RESET,this.onBufferReset,this),a.on(y.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(y.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(y.Events.BUFFER_EOS,this.onBufferEos,this),a.on(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(y.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(y.Events.FRAG_PARSED,this.onFragParsed,this),a.on(y.Events.FRAG_CHANGED,this.onFragChanged,this)},s.unregisterListeners=function(){var a=this.hls;a.off(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(y.Events.BUFFER_RESET,this.onBufferReset,this),a.off(y.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(y.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(y.Events.BUFFER_EOS,this.onBufferEos,this),a.off(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(y.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(y.Events.FRAG_PARSED,this.onFragParsed,this),a.off(y.Events.FRAG_CHANGED,this.onFragChanged,this)},s._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new t.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},s.onManifestParsed=function(a,u){var f=2;(u.audio&&!u.video||!u.altAudio)&&(f=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=f,this.details=null,m.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},s.onMediaAttaching=function(a,u){var f=this.media=u.media;if(f&&l){var w=this.mediaSource=new l;w.addEventListener("sourceopen",this._onMediaSourceOpen),w.addEventListener("sourceended",this._onMediaSourceEnded),w.addEventListener("sourceclose",this._onMediaSourceClose),f.src=self.URL.createObjectURL(w),this._objectUrl=f.src}},s.onMediaDetaching=function(){var a=this.media,u=this.mediaSource,f=this._objectUrl;if(u){if(m.logger.log("[buffer-controller]: media source detaching"),u.readyState==="open")try{u.endOfStream()}catch(w){m.logger.warn("[buffer-controller]: onMediaDetaching: "+w.message+" while calling endOfStream")}this.onBufferReset(),u.removeEventListener("sourceopen",this._onMediaSourceOpen),u.removeEventListener("sourceended",this._onMediaSourceEnded),u.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(f&&self.URL.revokeObjectURL(f),a.src===f?(a.removeAttribute("src"),a.load()):m.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(y.Events.MEDIA_DETACHED,void 0)},s.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(u){var f=a.sourceBuffer[u];try{f&&(a.removeBufferListeners(u),a.mediaSource&&a.mediaSource.removeSourceBuffer(f),a.sourceBuffer[u]=void 0)}catch(w){m.logger.warn("[buffer-controller]: Failed to reset the "+u+" buffer",w)}}),this._initSourceBuffer()},s.onBufferCodecs=function(a,u){var f=this,w=this.getSourceBufferTypes().length;if(Object.keys(u).forEach(function(_){if(w){var h=f.tracks[_];if(h&&typeof h.buffer.changeType=="function"){var R=u[_],O=R.codec,g=R.levelCodec,x=R.container,E=(h.levelCodec||h.codec).replace(r,"$1"),T=(g||O).replace(r,"$1");if(E!==T){var M=x+";codecs="+(g||O);f.appendChangeType(_,M)}}}else f.pendingTracks[_]=u[_]}),w)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},s.appendChangeType=function(a,u){var f=this,w=this.operationQueue,_={execute:function(){var R=f.sourceBuffer[a];R&&(m.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+u),R.changeType(u)),w.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(R){m.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",R)}};w.append(_,a)},s.onBufferAppending=function(a,u){var f=this,w=this.hls,_=this.operationQueue,h=this.tracks,R=u.data,O=u.type,g=u.frag,x=u.part,E=u.chunkMeta,T=E.buffering[O],M=self.performance.now();T.start=M;var L=g.stats.buffering,A=x?x.stats.buffering:null;L.start===0&&(L.start=M),A&&A.start===0&&(A.start=M);var V=h.audio,z=O==="audio"&&E.id===1&&(V==null?void 0:V.container)==="audio/mpeg",W={execute:function(){if(T.executeStart=self.performance.now(),z){var U=f.sourceBuffer[O];if(U){var P=g.start-U.timestampOffset;Math.abs(P)>=.1&&(m.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+g.start+" (delta: "+P+") sn: "+g.sn+")"),U.timestampOffset=g.start)}}f.appendExecutor(R,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();T.executeEnd=T.end=U,L.first===0&&(L.first=U),A&&A.first===0&&(A.first=U);var P=f.sourceBuffer,H={};for(var $ in P)H[$]=b.BufferHelper.getBuffered(P[$]);f.appendError=0,f.hls.trigger(y.Events.BUFFER_APPENDED,{type:O,frag:g,part:x,chunkMeta:E,parent:g.type,timeRanges:H})},onError:function(U){m.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var P={type:S.ErrorTypes.MEDIA_ERROR,parent:g.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?P.details=S.ErrorDetails.BUFFER_FULL_ERROR:(f.appendError++,P.details=S.ErrorDetails.BUFFER_APPEND_ERROR,f.appendError>w.config.appendErrorMaxRetry&&(m.logger.error("[buffer-controller]: Failed "+w.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),P.fatal=!0)),w.trigger(y.Events.ERROR,P)}};_.append(W,O)},s.onBufferFlushing=function(a,u){var f=this,w=this.operationQueue,_=function(R){return{execute:f.removeExecutor.bind(f,R,u.startOffset,u.endOffset),onStart:function(){},onComplete:function(){f.hls.trigger(y.Events.BUFFER_FLUSHED,{type:R})},onError:function(g){m.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",g)}}};u.type?w.append(_(u.type),u.type):this.getSourceBufferTypes().forEach(function(h){w.append(_(h),h)})},s.onFragParsed=function(a,u){var f=this,w=u.frag,_=u.part,h=[],R=_?_.elementaryStreams:w.elementaryStreams;R[d.ElementaryStreamTypes.AUDIOVIDEO]?h.push("audiovideo"):(R[d.ElementaryStreamTypes.AUDIO]&&h.push("audio"),R[d.ElementaryStreamTypes.VIDEO]&&h.push("video"));var O=function(){var x=self.performance.now();w.stats.buffering.end=x,_&&(_.stats.buffering.end=x);var E=_?_.stats:w.stats;f.hls.trigger(y.Events.FRAG_BUFFERED,{frag:w,part:_,stats:E,id:w.type})};h.length===0&&m.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+w.type+" level: "+w.level+" sn: "+w.sn),this.blockBuffers(O,h)},s.onFragChanged=function(a,u){this.flushBackBuffer()},s.onBufferEos=function(a,u){var f=this,w=this.getSourceBufferTypes().reduce(function(_,h){var R=f.sourceBuffer[h];return(!u.type||u.type===h)&&(R&&!R.ended&&(R.ended=!0,m.logger.log("[buffer-controller]: "+h+" sourceBuffer now EOS"))),_&&!!(!R||R.ended)},!0);w&&this.blockBuffers(function(){var _=f.mediaSource;if(!_||_.readyState!=="open")return;_.endOfStream()})},s.onLevelUpdated=function(a,u){var f=u.details;if(!f.fragments.length)return;this.details=f,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},s.flushBackBuffer=function(){var a=this.hls,u=this.details,f=this.media,w=this.sourceBuffer;if(!f||u===null)return;var _=this.getSourceBufferTypes();if(!_.length)return;var h=u.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(k.isFiniteNumber)(h)||h<0)return;var R=f.currentTime,O=u.levelTargetDuration,g=Math.max(h,O),x=Math.floor(R/O)*O-g;_.forEach(function(E){var T=w[E];if(T){var M=b.BufferHelper.getBuffered(T);M.length>0&&x>M.start(0)&&(a.trigger(y.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),u.live&&a.trigger(y.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),a.trigger(y.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:E}))}})},s.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var a=this.details,u=this.hls,f=this.media,w=this.mediaSource,_=a.fragments[0].start+a.totalduration,h=f.duration,R=Object(k.isFiniteNumber)(w.duration)?w.duration:0;a.live&&u.config.liveDurationInfinity?(m.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),w.duration=Infinity,this.updateSeekableRange(a)):(_>R&&_>h||!Object(k.isFiniteNumber)(h))&&(m.logger.log("[buffer-controller]: Updating Media Source duration to "+_.toFixed(3)),w.duration=_)},s.updateSeekableRange=function(a){var u=this.mediaSource,f=a.fragments,w=f.length;if(w&&a.live&&u!==null&&u!==void 0&&u.setLiveSeekableRange){var _=Math.max(0,f[0].start),h=Math.max(_,_+a.totalduration);u.setLiveSeekableRange(_,h)}},s.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,u=this.operationQueue,f=this.pendingTracks,w=Object.keys(f).length;if(w&&!a||w===2){this.createSourceBuffers(f),this.pendingTracks={};var _=this.getSourceBufferTypes();if(_.length===0){this.hls.trigger(y.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}_.forEach(function(h){u.executeNext(h)})}},s.createSourceBuffers=function(a){var u=this.sourceBuffer,f=this.mediaSource;if(!f)throw Error("createSourceBuffers called when mediaSource was null");var w=0;for(var _ in a)if(!u[_]){var h=a[_];if(!h)throw Error("source buffer exists for track "+_+", however track does not");var R=h.levelCodec||h.codec,O=h.container+";codecs="+R;m.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var g=u[_]=f.addSourceBuffer(O),x=_;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[_]={buffer:g,codec:R,container:h.container,levelCodec:h.levelCodec,id:h.id},w++}catch(E){m.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+E.message),this.hls.trigger(y.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:E,mimeType:O})}}w&&this.hls.trigger(y.Events.BUFFER_CREATED,{tracks:this.tracks})},s._onSBUpdateStart=function(a){var u=this.operationQueue,f=u.current(a);f.onStart()},s._onSBUpdateEnd=function(a){var u=this.operationQueue,f=u.current(a);f.onComplete(),u.shiftAndExecuteNext(a)},s._onSBUpdateError=function(a,u){m.logger.error("[buffer-controller]: "+a+" SourceBuffer error",u),this.hls.trigger(y.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var f=this.operationQueue.current(a);f&&f.onError(u)},s.removeExecutor=function(a,u,f){var w=this.media,_=this.mediaSource,h=this.operationQueue,R=this.sourceBuffer,O=R[a];if(!w||!_||!O){m.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),h.shiftAndExecuteNext(a);return}var g=Object(k.isFiniteNumber)(w.duration)?w.duration:Infinity,x=Object(k.isFiniteNumber)(_.duration)?_.duration:Infinity,E=Math.max(0,u),T=Math.min(f,g,x);T>E?(m.logger.log("[buffer-controller]: Removing ["+E+","+T+"] from the "+a+" SourceBuffer"),console.assert(!O.updating,a+" sourceBuffer must not be updating"),O.remove(E,T)):h.shiftAndExecuteNext(a)},s.appendExecutor=function(a,u){var f=this.operationQueue,w=this.sourceBuffer,_=w[u];if(!_){m.logger.warn("[buffer-controller]: Attempting to append to the "+u+" SourceBuffer, but it does not exist"),f.shiftAndExecuteNext(u);return}_.ended=!1,console.assert(!_.updating,u+" sourceBuffer must not be updating"),_.appendBuffer(a)},s.blockBuffers=function(a,u){var f=this;if(u===void 0&&(u=this.getSourceBufferTypes()),!u.length){m.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(a);return}var w=this.operationQueue,_=u.map(function(h){return w.appendBlocker(h)});Promise.all(_).then(function(){a(),u.forEach(function(h){var R=f.sourceBuffer[h];(!R||!R.updating)&&w.shiftAndExecuteNext(h)})})},s.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},s.addBufferListener=function(a,u,f){var w=this.sourceBuffer[a];if(!w)return;var _=f.bind(this,a);this.listeners[a].push({event:u,listener:_}),w.addEventListener(u,_)},s.removeBufferListeners=function(a){var u=this.sourceBuffer[a];if(!u)return;this.listeners[a].forEach(function(f){u.removeEventListener(f.event,f.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return y});var k=C("./src/utils/logger.ts"),y=function(){function m(b){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=b}var S=m.prototype;return S.append=function(p,d){var t=this.queues[d];t.push(p),t.length===1&&this.buffers[d]&&this.executeNext(d)},S.insertAbort=function(p,d){var t=this.queues[d];t.unshift(p),this.executeNext(d)},S.appendBlocker=function(p){var d,t=new Promise(function(r){d=r}),l={execute:d,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(l,p),t},S.executeNext=function(p){var d=this.buffers,t=this.queues,l=d[p],r=t[p];if(r.length){var i=r[0];try{i.execute()}catch(o){k.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),i.onError(o),(!l||!l.updating)&&(r.shift(),this.executeNext(p))}}},S.shiftAndExecuteNext=function(p){this.queues[p].shift(),this.executeNext(p)},S.current=function(p){return this.queues[p][0]},m}()},"./src/controller/cap-level-controller.ts":function(N,v,C){"use strict";C.r(v);var k=C("./src/events.ts");function y(b,p){for(var d=0;d0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var l=this.hls;l.autoLevelCapping=this.getMaxLevel(t.length-1),l.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=l.autoLevelCapping}}},p.getMaxLevel=function(t){var l=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter(function(o,s){return b.isLevelAllowed(s,l.restrictedLevels)&&s<=t});return this.clientRect=null,b.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},p.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()},p.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},p.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,l={width:0,height:0};if(t){var r=t.getBoundingClientRect();l.width=r.width,l.height=r.height,!l.width&&!l.height&&(l.width=r.right-r.left||t.width||0,l.height=r.bottom-r.top||t.height||0)}return this.clientRect=l,l},b.isLevelAllowed=function(t,l){return l===void 0&&(l=[]),l.indexOf(t)===-1},b.getMaxLevelByMediaSize=function(t,l,r){if(!t||!t.length)return-1;for(var i=function(u,f){return f?u.width!==f.width||u.height!==f.height:!0},o=t.length-1,s=0;s=l||c.height>=r)&&i(c,t[s+1])){o=s;break}}return o},m(b,[{key:"mediaWidth",get:function(){return this.getDimensions().width*b.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*b.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(l){}return t}}]),b}();v.default=S},"./src/controller/cmcd-controller.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return i});var k=C("./src/events.ts"),y=C("./src/types/cmcd.ts"),m=C("./src/utils/buffer-helper.ts"),S=C("./src/utils/logger.ts");function b(o,s){for(var c=0;c=o.length?{done:!0}:{done:!1,value:o[a++]}}}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 t(o,s){if(!o)return;if(typeof o=="string")return l(o,s);var c=Object.prototype.toString.call(o).slice(8,-1);if(c==="Object"&&o.constructor&&(c=o.constructor.name),c==="Map"||c==="Set")return Array.from(o);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return l(o,s)}function l(o,s){(s==null||s>o.length)&&(s=o.length);for(var c=0,a=new Array(s);cu&&(u=h.bitrate)}return u>0?u:NaN},s.getBufferLength=function(a){var u=this.hls.media,f=a===y.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!f||!u)return NaN;var w=m.BufferHelper.bufferInfo(f,u.currentTime,this.config.maxBufferHole);return w.len*1e3},s.createPlaylistLoader=function(){var a=this.config.pLoader,u=this.applyPlaylistData,f=a||this.config.loader;return function(){function w(h){this.loader=void 0,this.loader=new f(h)}var _=w.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(R,O,g){u(R),this.loader.load(R,O,g)},p(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},s.createFragmentLoader=function(){var a=this.config.fLoader,u=this.applyFragmentData,f=a||this.config.loader;return function(){function w(h){this.loader=void 0,this.loader=new f(h)}var _=w.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(R,O,g){u(R),this.loader.load(R,O,g)},p(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},o.uuid=function(){var a=URL.createObjectURL(new Blob),u=a.toString();return URL.revokeObjectURL(a),u.substr(u.lastIndexOf("/")+1)},o.serialize=function(a){for(var u=[],f=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},w=function(z){return Math.round(z)},_=function(z){return w(z/100)*100},h=function(z){return encodeURIComponent(z)},R={br:w,d:w,bl:_,dl:_,mtp:_,nor:h,rtp:_,tb:w},O=Object.keys(a||{}).sort(),g=d(O),x;!(x=g()).done;){var E=x.value,T=a[E];if(!f(T))continue;if(E==="v"&&T===1)continue;if(E=="pr"&&T===1)continue;var M=R[E];M&&(T=M(T));var L=typeof T,A=void 0;E==="ot"||E==="sf"||E==="st"?A=E+"="+T:L==="boolean"?A=E:L==="number"?A=E+"="+T:A=E+"="+JSON.stringify(T),u.push(A)}return u.join(",")},o.toHeaders=function(a){for(var u=Object.keys(a),f={},w=["Object","Request","Session","Status"],_=[{},{},{},{}],h={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},R=0,O=u;Rd){this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var h=d-this._requestLicenseFailureCount+1;m.logger.warn("Retrying license request, "+h+" attempts left"),this._requestLicense(u,f)}break}},o._generateLicenseRequestChallenge=function(c,a){switch(c.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+c.mediaKeySystemDomain)},o._requestLicense=function(c,a){m.logger.log("Requesting content license for key-system");var u=this._mediaKeysList[0];if(!u){m.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var f=this.getLicenseServerUrl(u.mediaKeySystemDomain),w=this._createLicenseXhr(f,c,a);m.logger.log("Sending license request to URL: "+f);var _=this._generateLicenseRequestChallenge(u,c);w.send(_)}catch(h){m.logger.error("Failure requesting DRM license: "+h),this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(c,a){if(!this._emeEnabled)return;var u=a.media;this._media=u,u.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var c=this._media,a=this._mediaKeysList;if(!c)return;c.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(u){if(u.mediaKeysSession)return u.mediaKeysSession.close().catch(function(){})})).then(function(){return c.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(c,a){if(!this._emeEnabled)return;var u=a.levels.map(function(w){return w.audioCodec}).filter(function(w){return!!w}),f=a.levels.map(function(w){return w.videoCodec}).filter(function(w){return!!w});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,u,f)},p(i,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),i}();v.default=r},"./src/controller/fps-controller.ts":function(N,v,C){"use strict";C.r(v);var k=C("./src/events.ts"),y=C("./src/utils/logger.ts"),m=function(){function S(p){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=p,this.registerListeners()}var b=S.prototype;return b.setStreamController=function(d){this.streamController=d},b.registerListeners=function(){this.hls.on(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},b.unregisterListeners=function(){this.hls.off(k.Events.MEDIA_ATTACHING,this.onMediaAttaching)},b.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},b.onMediaAttaching=function(d,t){var l=this.hls.config;if(l.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),l.fpsDroppedMonitoringPeriod)}},b.checkFPS=function(d,t,l){var r=performance.now();if(t){if(this.lastTime){var i=r-this.lastTime,o=l-this.lastDroppedFrames,s=t-this.lastDecodedFrames,c=1e3*o/i,a=this.hls;if(a.trigger(k.Events.FPS_DROP,{currentDropped:o,currentDecoded:s,totalDroppedFrames:l}),c>0&&o>a.config.fpsDroppedMonitoringThreshold*s){var u=a.currentLevel;y.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=u)&&(u=u-1,a.trigger(k.Events.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:a.currentLevel}),a.autoLevelCapping=u,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=l,this.lastDecodedFrames=t}},b.checkFPSInterval=function(){var d=this.media;if(d)if(this.isVideoPlaybackQualityAvailable){var t=d.getVideoPlaybackQuality();this.checkFPS(d,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(d,d.webkitDecodedFrameCount,d.webkitDroppedFrameCount)},S}();v.default=m},"./src/controller/fragment-finders.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"findFragmentByPDT",function(){return m}),C.d(v,"findFragmentByPTS",function(){return S}),C.d(v,"fragmentWithinToleranceTest",function(){return b}),C.d(v,"pdtWithinToleranceTest",function(){return p}),C.d(v,"findFragWithCC",function(){return d});var k=C("./src/polyfills/number.ts"),y=C("./src/utils/binary-search.ts");function m(t,l,r){if(l===null||!Array.isArray(t)||!t.length||!Object(k.isFiniteNumber)(l))return null;var i=t[0].programDateTime;if(l<(i||0))return null;var o=t[t.length-1].endProgramDateTime;if(l>=(o||0))return null;r=r||0;for(var s=0;st&&r.start?-1:0}function p(t,l,r){var i=Math.min(l,r.duration+(r.deltaPTS?r.deltaPTS:0))*1e3,o=r.endProgramDateTime||0;return o-i>t}function d(t,l){return y.default.search(t,function(r){return r.ccl?-1:0})}},"./src/controller/fragment-tracker.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"FragmentState",function(){return m}),C.d(v,"FragmentTracker",function(){return S});var k=C("./src/events.ts"),y=C("./src/types/loader.ts"),m;(function(d){d.NOT_LOADED="NOT_LOADED",d.BACKTRACKED="BACKTRACKED",d.APPENDING="APPENDING",d.PARTIAL="PARTIAL",d.OK="OK"})(m||(m={}));var S=function(){function d(l){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=l,this._registerListeners()}var t=d.prototype;return t._registerListeners=function(){var r=this.hls;r.on(k.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.on(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.on(k.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var r=this.hls;r.off(k.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.off(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.off(k.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(r,i){if(i===y.PlaylistLevelType.MAIN){var o=this.activeFragment,s=this.activeParts;if(!o)return null;if(s)for(var c=s.length;c--;){var a=s[c],u=a?a.end:o.appendedPTS;if(a.start<=r&&u!==void 0&&r<=u)return c>9&&(this.activeParts=s.slice(c-9)),a}else if(o.start<=r&&o.appendedPTS!==void 0&&r<=o.appendedPTS)return o}return this.getBufferedFrag(r,i)},t.getBufferedFrag=function(r,i){for(var o=this.fragments,s=Object.keys(o),c=s.length;c--;){var a=o[s[c]];if((a==null?void 0:a.body.type)===i&&a.buffered){var u=a.body;if(u.start<=r&&r<=u.end)return u}}return null},t.detectEvictedFragments=function(r,i,o){var s=this;Object.keys(this.fragments).forEach(function(c){var a=s.fragments[c];if(!a)return;if(!a.buffered){a.body.type===o&&s.removeFragment(a.body);return}var u=a.range[r];if(!u)return;u.time.some(function(f){var w=!s.isTimeBuffered(f.startPTS,f.endPTS,i);return w&&s.removeFragment(a.body),w})})},t.detectPartialFragments=function(r){var i=this,o=this.timeRanges,s=r.frag,c=r.part;if(!o||s.sn==="initSegment")return;var a=p(s),u=this.fragments[a];if(!u)return;Object.keys(o).forEach(function(f){var w=s.elementaryStreams[f];if(!w)return;var _=o[f],h=c!==null||w.partial===!0;u.range[f]=i.getBufferedTimes(s,c,h,_)}),u.backtrack=u.loaded=null,Object.keys(u.range).length?u.buffered=!0:this.removeFragment(u.body)},t.fragBuffered=function(r){var i=p(r),o=this.fragments[i];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},t.getBufferedTimes=function(r,i,o,s){for(var c={time:[],partial:o},a=i?i.start:r.start,u=i?i.end:r.end,f=r.minEndPTS||u,w=r.maxStartPTS||a,_=0;_=h&&f<=R){c.time.push({startPTS:Math.max(a,s.start(_)),endPTS:Math.min(u,s.end(_))});break}else if(ah)c.partial=!0,c.time.push({startPTS:Math.max(a,s.start(_)),endPTS:Math.min(u,s.end(_))});else if(u<=h)break}return c},t.getPartialFragment=function(r){var i=null,o,s,c,a=0,u=this.bufferPadding,f=this.fragments;return Object.keys(f).forEach(function(w){var _=f[w];if(!_)return;b(_)&&(s=_.body.start-u,c=_.body.end+u,r>=s&&r<=c&&(o=Math.min(r-s,c-r),a<=o&&(i=_.body,a=o)))}),i},t.getState=function(r){var i=p(r),o=this.fragments[i];return o?o.buffered?b(o)?m.PARTIAL:m.OK:o.backtrack?m.BACKTRACKED:m.APPENDING:m.NOT_LOADED},t.backtrack=function(r,i){var o=p(r),s=this.fragments[o];if(!s||s.backtrack)return null;var c=s.backtrack=i||s.loaded;return s.loaded=null,c},t.getBacktrackData=function(r){var i=p(r),o=this.fragments[i];if(o){var s,c=o.backtrack;if(c!=null&&(s=c.payload)!==null&&s!==void 0&&s.byteLength)return c;this.removeFragment(r)}return null},t.isTimeBuffered=function(r,i,o){for(var s,c,a=0;a=s&&i<=c)return!0;if(i<=s)return!1}return!1},t.onFragLoaded=function(r,i){var o=i.frag,s=i.part;if(o.sn==="initSegment"||o.bitrateTest||s)return;var c=p(o);this.fragments[c]={body:o,loaded:i,backtrack:null,buffered:!1,range:Object.create(null)}},t.onBufferAppended=function(r,i){var o=this,s=i.frag,c=i.part,a=i.timeRanges;if(s.type===y.PlaylistLevelType.MAIN)if(this.activeFragment=s,c){var u=this.activeParts;u||(this.activeParts=u=[]),u.push(c)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(f){var w=a[f];if(o.detectEvictedFragments(f,w),!c)for(var _=0;_r&&s.removeFragment(u)}})},t.removeFragment=function(r){var i=p(r);r.stats.loaded=0,r.clearElementaryStreamInfo(),delete this.fragments[i]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},d}();function b(d){var t,l;return d.buffered&&(((t=d.range.video)===null||t===void 0?void 0:t.partial)||((l=d.range.audio)===null||l===void 0?void 0:l.partial))}function p(d){return d.type+"_"+d.level+"_"+d.urlId+"_"+d.sn}},"./src/controller/gap-controller.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"STALL_MINIMUM_DURATION_MS",function(){return b}),C.d(v,"MAX_START_GAP_JUMP",function(){return p}),C.d(v,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return d}),C.d(v,"SKIP_BUFFER_RANGE_START",function(){return t}),C.d(v,"default",function(){return l});var k=C("./src/utils/buffer-helper.ts"),y=C("./src/errors.ts"),m=C("./src/events.ts"),S=C("./src/utils/logger.ts"),b=250,p=2,d=.1,t=.05,l=function(){function r(o,s,c,a){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=o,this.media=s,this.fragmentTracker=c,this.hls=a}var i=r.prototype;return i.destroy=function(){this.hls=this.fragmentTracker=this.media=null},i.poll=function(s){var c=this.config,a=this.media,u=this.stalled,f=a.currentTime,w=a.seeking,_=this.seeking&&!w,h=!this.seeking&&w;if(this.seeking=w,f!==s){if(this.moved=!0,u!==null){if(this.stallReported){var R=self.performance.now()-u;S.logger.warn("playback not stuck anymore @"+f+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((h||_)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!k.BufferHelper.getBuffered(a).length)return;var O=k.BufferHelper.bufferInfo(a,f,0),g=O.len>0,x=O.nextStart||0;if(!g&&!x)return;if(w){var E=O.len>p,T=!x||x-f>p&&!this.fragmentTracker.getPartialFragment(f);if(E||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,L=Math.max(x,O.start||0)-f,A=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,V=A==null||((M=A.details)===null||M===void 0)?void 0:M.live,z=V?A.details.targetduration*2:p;if(L>0&&L<=z){this._trySkipBufferHole(null);return}}var W=self.performance.now();if(u===null){this.stalled=W;return}var G=W-u;!w&&G>=b&&this._reportStall(O.len);var U=k.BufferHelper.bufferInfo(a,f,c.maxBufferHole);this._tryFixBufferStall(U,G)},i._tryFixBufferStall=function(s,c){var a=this.config,u=this.fragmentTracker,f=this.media,w=f.currentTime,_=u.getPartialFragment(w);if(_){var h=this._trySkipBufferHole(_);if(h)return}s.len>a.maxBufferHole&&c>a.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},i._reportStall=function(s){var c=this.hls,a=this.media,u=this.stallReported;u||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+s+")"),c.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:s}))},i._trySkipBufferHole=function(s){for(var c=this.config,a=this.hls,u=this.media,f=u.currentTime,w=0,_=k.BufferHelper.getBuffered(u),h=0;h<_.length;h++){var R=_.start(h);if(f+c.maxBufferHole>=w&&f.05&&this.forwardBufferLength>1){var h=Math.min(2,Math.max(1,a)),R=Math.round(2/(1+Math.exp(-.75*f-this.edgeStalled))*20)/20;r.playbackRate=Math.min(h,Math.max(1,R))}else r.playbackRate!==1&&r.playbackRate!==0&&(r.playbackRate=1)},t.estimateLiveEdge=function(){var r=this.levelDetails;return r===null?null:r.edge+r.age},t.computeLatency=function(){var r=this.estimateLiveEdge();return r===null?null:r-this.currentTime},b(d,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var r=this.config,i=this.levelDetails;return r.liveMaxLatencyDuration!==void 0?r.liveMaxLatencyDuration:i?r.liveMaxLatencyDurationCount*i.targetduration:0}},{key:"targetLatency",get:function(){var r=this.levelDetails;if(r===null)return null;var i=r.holdBack,o=r.partHoldBack,s=r.targetduration,c=this.config,a=c.liveSyncDuration,u=c.liveSyncDurationCount,f=c.lowLatencyMode,w=this.hls.userConfig,_=f&&o||i;(w.liveSyncDuration||w.liveSyncDurationCount||_===0)&&(_=a!==void 0?a:u*s);var h=s,R=1;return _+Math.min(this.stallCount*R,h)}},{key:"liveSyncPosition",get:function(){var r=this.estimateLiveEdge(),i=this.targetLatency,o=this.levelDetails;if(r===null||i===null||o===null)return null;var s=o.edge,c=r-i-this.edgeStalled,a=s-o.totalduration,u=s-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(a,c),u)}},{key:"drift",get:function(){var r=this.levelDetails;return r===null?1:r.drift}},{key:"edgeStalled",get:function(){var r=this.levelDetails;if(r===null)return 0;var i=(this.config.lowLatencyMode&&r.partTarget||r.targetduration)*3;return Math.max(r.age-i,0)}},{key:"forwardBufferLength",get:function(){var r=this.media,i=this.levelDetails;if(!r||!i)return 0;var o=r.buffered.length;return o?r.buffered.end(o-1):i.edge-this.currentTime}}]),d}()},"./src/controller/level-controller.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return c});var k=C("./src/types/level.ts"),y=C("./src/events.ts"),m=C("./src/errors.ts"),S=C("./src/utils/codecs.ts"),b=C("./src/controller/level-helper.ts"),p=C("./src/controller/base-playlist-controller.ts"),d=C("./src/types/loader.ts");function t(){return t=Object.assign||function(a){for(var u=1;u0){x=R[0].bitrate,R.sort(function(G,U){return G.bitrate-U.bitrate}),this._levels=R;for(var V=0;Vthis.hls.config.fragLoadingMaxRetry&&(E=h.frag.level)):E=h.frag.level}break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(x=!1),E=R.level),g=!0;break;case m.ErrorDetails.REMUX_ALLOC_ERROR:E=h.level,g=!0;break}E!==void 0&&this.recoverLevel(h,E,g,x)},f.recoverLevel=function(_,h,R,O){var g=_.details,x=this._levels[h];if(x.loadError++,R){var E=this.retryLoadingOrFail(_);if(E)_.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var T=x.url.length;if(T>1&&x.loadError1){var O=(h.urlId+1)%R;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(g){g.urlId=O}),this.level=_}},f.onFragLoaded=function(_,h){var R=h.frag;if(R!==void 0&&R.type===d.PlaylistLevelType.MAIN){var O=this._levels[R.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},f.onLevelLoaded=function(_,h){var R,O=h.level,g=h.details,x=this._levels[O];if(!x){var E;this.warn("Invalid level index "+O),(E=h.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(g.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(O,h,x.details)):(R=h.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(g.deltaUpdateFailed=!0)},f.onAudioTrackSwitched=function(_,h){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var O=-1,g=this.hls.audioTracks[h.id].groupId,x=0;x0){var O=R.urlId,g=R.url[O];if(_)try{g=_.addDirectives(g)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+h+(_?" at sn "+_.msn+" part "+_.part:"")+" with URL-id "+O+" "+g),this.clearTimer(),this.hls.trigger(y.Events.LEVEL_LOADING,{url:g,level:h,id:O,deliveryDirectives:_||null})}},f.removeLevel=function(_,h){var R=function(x,E){return E!==h},O=this._levels.filter(function(g,x){return x!==_?!0:g.url.length>1&&h!==void 0?(g.url=g.url.filter(R),g.audioGroupIds&&(g.audioGroupIds=g.audioGroupIds.filter(R)),g.textGroupIds&&(g.textGroupIds=g.textGroupIds.filter(R)),g.urlId=0,!0):!1}).map(function(g,x){var E=g.details;return E!=null&&E.fragments&&E.fragments.forEach(function(T){T.level=x}),g});this._levels=O,this.hls.trigger(y.Events.LEVELS_UPDATED,{levels:O})},r(u,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(_){var h,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===_&&(h=R[_])!==null&&h!==void 0&&h.details)return;if(_<0||_>=R.length){var O=_<0;if(this.hls.trigger(y.Events.ERROR,{type:m.ErrorTypes.OTHER_ERROR,details:m.ErrorDetails.LEVEL_SWITCH_ERROR,level:_,fatal:O,reason:"invalid level idx"}),O)return;_=Math.min(_,R.length-1)}this.clearTimer();var g=this.currentLevelIndex,x=R[g],E=R[_];this.log("switching to level "+_+" from "+g),this.currentLevelIndex=_;var T=t({},E,{level:_,maxBitrate:E.maxBitrate,uri:E.uri,urlId:E.urlId});delete T._urlId,this.hls.trigger(y.Events.LEVEL_SWITCHING,T);var M=E.details;if(!M||M.live){var L=this.switchParams(E.uri,x==null?void 0:x.details);this.loadPlaylist(L)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(_){this.manualLevelIndex=_,this._startLevel===void 0&&(this._startLevel=_),_!==-1&&(this.level=_)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(_){this._firstLevel=_}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var _=this.hls.config.startLevel;return _!==void 0?_:this._firstLevel}else return this._startLevel},set:function(_){this._startLevel=_}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(_){this.level=_,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=_)}}]),u}(p.default)},"./src/controller/level-helper.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"addGroupId",function(){return m}),C.d(v,"assignTrackIdsByGroup",function(){return S}),C.d(v,"updatePTS",function(){return b}),C.d(v,"updateFragPTSDTS",function(){return d}),C.d(v,"mergeDetails",function(){return t}),C.d(v,"mapPartIntersection",function(){return l}),C.d(v,"mapFragmentIntersection",function(){return r}),C.d(v,"adjustSliding",function(){return i}),C.d(v,"addSliding",function(){return o}),C.d(v,"computeReloadInterval",function(){return s}),C.d(v,"getFragmentWithSN",function(){return c}),C.d(v,"getPartWith",function(){return a});var k=C("./src/polyfills/number.ts"),y=C("./src/utils/logger.ts");function m(u,f,w){switch(f){case"audio":u.audioGroupIds||(u.audioGroupIds=[]),u.audioGroupIds.push(w);break;case"text":u.textGroupIds||(u.textGroupIds=[]),u.textGroupIds.push(w);break}}function S(u){var f={};u.forEach(function(w){var _=w.groupId||"";w.id=f[_]=f[_]||0,f[_]++})}function b(u,f,w){var _=u[f],h=u[w];p(_,h)}function p(u,f){var w=f.startPTS;if(Object(k.isFiniteNumber)(w)){var _=0,h;f.sn>u.sn?(_=w-u.start,h=u):(_=u.start-w,h=f),h.duration!==_&&(h.duration=_)}else if(f.sn>u.sn){var R=u.cc===f.cc;R&&u.minEndPTS?f.start=u.start+(u.minEndPTS-u.start):f.start=u.start+u.duration}else f.start=Math.max(u.start-f.duration,0)}function d(u,f,w,_,h,R){var O=_-w;O<=0&&(y.logger.warn("Fragment should have a positive duration",f),_=w+f.duration,R=h+f.duration);var g=w,x=_,E=f.startPTS,T=f.endPTS;if(Object(k.isFiniteNumber)(E)){var M=Math.abs(E-w);Object(k.isFiniteNumber)(f.deltaPTS)?f.deltaPTS=Math.max(M,f.deltaPTS):f.deltaPTS=M,g=Math.max(w,E),w=Math.min(w,E),h=Math.min(h,f.startDTS),x=Math.min(_,T),_=Math.max(_,T),R=Math.max(R,f.endDTS)}f.duration=_-w;var L=w-f.start;f.appendedPTS=_,f.start=f.startPTS=w,f.maxStartPTS=g,f.startDTS=h,f.endPTS=_,f.minEndPTS=x,f.endDTS=R;var A=f.sn;if(!u||Au.endSN)return 0;var V,z=A-u.startSN,W=u.fragments;for(W[z]=f,V=z;V>0;V--)p(W[V],W[V-1]);for(V=z;V=0;h--){var R=_[h].initSegment;if(R){w=R;break}}u.fragmentHint&&delete u.fragmentHint.endPTS;var O=0,g;if(r(u,f,function(V,z){V.relurl&&(O=V.cc-z.cc),Object(k.isFiniteNumber)(V.startPTS)&&Object(k.isFiniteNumber)(V.endPTS)&&(z.start=z.startPTS=V.startPTS,z.startDTS=V.startDTS,z.appendedPTS=V.appendedPTS,z.maxStartPTS=V.maxStartPTS,z.endPTS=V.endPTS,z.endDTS=V.endDTS,z.minEndPTS=V.minEndPTS,z.duration=V.endPTS-V.startPTS,z.duration&&(g=z),f.PTSKnown=f.alignedSliding=!0),z.elementaryStreams=V.elementaryStreams,z.loader=V.loader,z.stats=V.stats,z.urlId=V.urlId,V.initSegment&&(z.initSegment=V.initSegment,w=V.initSegment)}),w){var x=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments;x.forEach(function(V){var z;(!V.initSegment||V.initSegment.relurl===((z=w)===null||z===void 0?void 0:z.relurl))&&(V.initSegment=w)})}if(f.skippedSegments&&(f.deltaUpdateFailed=f.fragments.some(function(V){return!V}),f.deltaUpdateFailed)){y.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var E=f.skippedSegments;E--;)f.fragments.shift();f.startSN=f.fragments[0].sn,f.startCC=f.fragments[0].cc}var T=f.fragments;if(O){y.logger.warn("discontinuity sliding from playlist, take drift into account");for(var M=0;M=_.length)return;o(f,_[w].start)}function o(u,f){if(f){for(var w=u.fragments,_=u.skippedSegments;_0&&h0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+E.toFixed(3)),x=E),this.state=y.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=y.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,h.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case y.State.IDLE:this.doTickIdle();break;case y.State.WAITING_LEVEL:{var x,E=this.levels,T=this.level,M=E==null||((x=E[T])===null||x===void 0)?void 0:x.details;if(M&&(!M.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(M))break;this.state=y.State.IDLE;break}break}case y.State.FRAG_LOADING_WAITING_RETRY:{var L,A=self.performance.now(),V=this.retryDate;(!V||A>=V||(L=this.media)!==null&&L!==void 0&&L.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=y.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){h.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var x,E,T=this.hls,M=this.levelLastLoaded,L=this.levels,A=this.media,V=T.config,z=T.nextLoadLevel;if(M===null||!A&&(this.startFragRequested||!V.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!L||!L[z])return;var W=L[z];this.level=T.nextLoadLevel=z;var G=W.details;if(!G||this.state===y.State.WAITING_LEVEL||G.live&&this.levelLastLoaded!==z){this.state=y.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:A,d.PlaylistLevelType.MAIN);if(U===null)return;var P=U.len,H=this.getMaxBufferLength(W.maxBitrate);if(P>=H)return;if(this._streamEnded(U,G)){var $={};this.altAudio&&($.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,$),this.state=y.State.ENDED;return}var re=U.end,te=this.getNextFragment(re,G);if(this.couldBacktrack&&!this.fragPrevious&&te&&te.sn!=="initSegment"){var ge=te.sn-G.startSN;ge>1&&(te=G.fragments[ge-1],this.fragmentTracker.removeFragment(te))}if(te&&this.fragmentTracker.getState(te)===p.FragmentState.OK&&this.nextLoadPosition>re){var ve=this.audioOnly&&!this.altAudio?t.ElementaryStreamTypes.AUDIO:t.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(A,ve,d.PlaylistLevelType.MAIN),te=this.getNextFragment(this.nextLoadPosition,G)}if(!te)return;te.initSegment&&!te.initSegment.data&&!this.bitrateTest&&(te=te.initSegment),((x=te.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((E=te.decryptdata)!==null&&E!==void 0&&E.key)?this.loadKey(te,G):this.loadFragment(te,G,re)},O.loadFragment=function(x,E,T){var M,L=this.fragmentTracker.getState(x);if(this.fragCurrent=x,L===p.FragmentState.BACKTRACKED){var A=this.fragmentTracker.getBacktrackData(x);if(A){this._handleFragmentLoadProgress(A),this._handleFragmentLoadComplete(A);return}else L=p.FragmentState.NOT_LOADED}L===p.FragmentState.NOT_LOADED||L===p.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,h.prototype.loadFragment.call(this,x,E,T)):L===p.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((M=this.media)===null||M===void 0?void 0:M.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(x){var E=this.fragmentTracker.getAppendedFrag(x,d.PlaylistLevelType.MAIN);return E&&"fragment"in E?E.fragment:E},O.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,d.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 T,M=this.getAppendedFrag(E.currentTime);if(M&&M.start>1&&this.flushMainBuffer(0,M.start-1),!E.paused&&x){var L=this.hls.nextLoadLevel,A=x[L],V=this.fragLastKbps;V&&this.fragCurrent?T=this.fragCurrent.duration*A.maxBitrate/(1e3*V)+1:T=0}else T=0;var z=this.getBufferedFrag(E.currentTime+T);if(z){var W=this.followingBufferedFrag(z);if(W){this.abortCurrentFrag();var G=W.maxStartPTS?W.maxStartPTS:W.start,U=W.duration,P=Math.max(z.end,G+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(P,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===y.State.KEY_LOADING&&(this.state=y.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(x,E){h.prototype.flushMainBuffer.call(this,x,E,this.altAudio?"video":null)},O.onMediaAttached=function(x,E){h.prototype.onMediaAttached.call(this,x,E);var T=E.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),T.addEventListener("playing",this.onvplaying),T.addEventListener("seeked",this.onvseeked),this.gapController=new i.default(this.config,T,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),h.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var x=this.media,E=x?x.currentTime:null;Object(k.isFiniteNumber)(E)&&this.log("Media seeked to "+E.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(S.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(x,E){var T=!1,M=!1,L;E.levels.forEach(function(A){L=A.audioCodec,L&&(L.indexOf("mp4a.40.2")!==-1&&(T=!0),L.indexOf("mp4a.40.5")!==-1&&(M=!0))}),this.audioCodecSwitch=T&&M&&!Object(m.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 T=this.levels;if(!T||this.state!==y.State.IDLE)return;var M=T[E.level];(!M.details||M.details.live&&this.levelLastLoaded!==E.level||this.waitForCdnTuneIn(M.details))&&(this.state=y.State.WAITING_LEVEL)},O.onLevelLoaded=function(x,E){var T,M=this.levels,L=E.level,A=E.details,V=A.totalduration;if(!M){this.warn("Levels were reset while loading level "+L);return}this.log("Level "+L+" loaded ["+A.startSN+","+A.endSN+"], cc ["+A.startCC+", "+A.endCC+"] duration:"+V);var z=this.fragCurrent;z&&(this.state===y.State.FRAG_LOADING||this.state===y.State.FRAG_LOADING_WAITING_RETRY)&&(z.level!==E.level&&z.loader&&(this.state=y.State.IDLE,z.loader.abort()));var W=M[L],G=0;if(A.live||(T=W.details)!==null&&T!==void 0&&T.live){if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed)return;G=this.alignPlaylists(A,W.details)}if(W.details=A,this.levelLastLoaded=L,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:A,level:L}),this.state===y.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(A))return;this.state=y.State.IDLE}this.startFragRequested?A.live&&this.synchronizeToLiveEdge(A):this.setStartPosition(A,G),this.tick()},O._handleFragmentLoadProgress=function(x){var E,T=x.frag,M=x.part,L=x.payload,A=this.levels;if(!A){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var V=A[T.level],z=V.details;if(!z){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var W=V.videoCodec,G=z.PTSKnown||!z.live,U=(E=T.initSegment)===null||E===void 0?void 0:E.data,P=this._getAudioCodec(V),H=this.transmuxer=this.transmuxer||new l.default(this.hls,d.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),$=M?M.index:-1,re=$!==-1,te=new r.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,L.byteLength,$,re),ge=this.initPTS[T.cc];H.push(L,U,P,W,T,M,z.totalduration,G,te,ge)},O.onAudioTrackSwitching=function(x,E){var T=this.altAudio,M=!!E.url,L=E.id;if(!M){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var A=this.fragCurrent;A!=null&&A.loader&&(this.log("Switching to main audio track, cancel main fragment load"),A.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var V=this.hls;T&&V.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),V.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:L})}},O.onAudioTrackSwitched=function(x,E){var T=E.id,M=!!this.hls.audioTracks[T].url;if(M){var L=this.videoBuffer;L&&this.mediaBuffer!==L&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=L)}this.altAudio=M,this.tick()},O.onBufferCreated=function(x,E){var T=E.tracks,M,L,A=!1;for(var V in T){var z=T[V];if(z.id==="main"){if(L=V,M=z,V==="video"){var W=T[V];W&&(this.videoBuffer=W.buffer)}}else A=!0}A&&M?(this.log("Alternate track found, use "+L+".buffered to schedule main fragment loading"),this.mediaBuffer=M.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(x,E){var T=E.frag,M=E.part;if(T&&T.type!==d.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(M?" p: "+M.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state),this.state===y.State.PARSED&&(this.state=y.State.IDLE);return}var L=M?M.stats:T.stats;this.fragLastKbps=Math.round(8*L.total/(L.buffering.end-L.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,M)},O.onError=function(x,E){switch(E.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.MAIN,E);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==y.State.ERROR&&(E.fatal?(this.warn(""+E.details),this.state=y.State.ERROR):!E.levelRetry&&this.state===y.State.WAITING_LEVEL&&(this.state=y.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(E.parent==="main"&&(this.state===y.State.PARSING||this.state===y.State.PARSED)){var T=!0,M=this.getFwdBufferInfo(this.media,d.PlaylistLevelType.MAIN);M&&M.len>.5&&(T=!this.reduceMaxBufferLength(M.len)),T&&(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 T=b.BufferHelper.getBuffered(x);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):E.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=y.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(x,E){var T=E.type;if(T!==t.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var M=(T===t.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(M,T,d.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,T=this.startPosition;if(T>=0&&E0&&(A1&&x.seeking===!1){var T=x.currentTime;if(b.BufferHelper.isBuffered(x,T)?E=this.getAppendedFrag(T):b.BufferHelper.isBuffered(x,T+.1)&&(E=this.getAppendedFrag(T+.1)),E){var M=this.fragPlaying,L=E.level;(!M||E.sn!==M.sn||M.level!==L||E.urlId!==M.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:E}),(!M||M.level!==L)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:L}),this.fragPlaying=E)}}},a(R,[{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}}]),R}(y.default)},"./src/controller/subtitle-stream-controller.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"SubtitleStreamController",function(){return u});var k=C("./src/events.ts"),y=C("./src/utils/logger.ts"),m=C("./src/utils/buffer-helper.ts"),S=C("./src/controller/fragment-finders.ts"),b=C("./src/utils/discontinuities.ts"),p=C("./src/controller/level-helper.ts"),d=C("./src/controller/fragment-tracker.ts"),t=C("./src/controller/base-stream-controller.ts"),l=C("./src/types/loader.ts"),r=C("./src/types/level.ts");function i(f,w){for(var _=0;_=E[L].start&&M<=E[L].end){T=E[L];break}var A=g.start+g.duration;T?T.end=A:(T={start:M,end:A},E.push(T)),this.fragmentTracker.fragBuffered(g)},_.onBufferFlushing=function(R,O){var g=O.startOffset,x=O.endOffset;if(g===0&&x!==Number.POSITIVE_INFINITY){var E=this.currentTrackId,T=this.levels;if(!T.length||!T[E]||!T[E].details)return;var M=T[E].details,L=M.targetduration,A=x-L;if(A<=0)return;O.endOffsetSubtitles=Math.max(0,A),this.tracksBuffered.forEach(function(V){for(var z=0;z=M.length||E!==T||!L)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(g=L.details)!==null&&g!==void 0&&g.live){var A=this.mainDetails;if(x.deltaUpdateFailed||!A)return;var V=A.fragments[0];if(!L.details)x.hasProgramDateTime&&A.hasProgramDateTime?Object(b.alignMediaPlaylistByPDT)(x,A):V&&Object(p.addSliding)(x,V.start);else{var z=this.alignPlaylists(x,L.details);z===0&&V&&Object(p.addSliding)(x,V.start)}}if(L.details=x,this.levelLastLoaded=E,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===t.State.IDLE){var W=Object(S.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),L.details=void 0)}},_._handleFragmentLoadComplete=function(R){var O=R.frag,g=R.payload,x=O.decryptdata,E=this.hls;if(this.fragContextChanged(O))return;if(g&&g.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(g),x.key.buffer,x.iv.buffer).then(function(M){var L=performance.now();E.trigger(k.Events.FRAG_DECRYPTED,{frag:O,payload:M,stats:{tstart:T,tdecrypt:L}})})}},_.doTick=function(){if(!this.media){this.state=t.State.IDLE;return}if(this.state===t.State.IDLE){var R,O=this.currentTrackId,g=this.levels;if(!g.length||!g[O]||!g[O].details)return;var x=g[O].details,E=x.targetduration,T=this.config,M=this.media,L=m.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,M.currentTime-E,T.maxBufferHole),A=L.end,V=L.len,z=this.getMaxBufferLength()+E;if(V>z)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var W=x.fragments,G=W.length,U=x.edge,P,H=this.fragPrevious;if(A-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)},s.pollTrackChange=function(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},s.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 a=r(this.media.textTracks);a.forEach(function(u){Object(y.clearCurrentCues)(u)}),this.subtitleTrack=-1,this.media=null},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},s.onManifestParsed=function(a,u){this.tracks=u.subtitleTracks},s.onSubtitleTrackLoaded=function(a,u){var f=u.id,w=u.details,_=this.trackId,h=this.tracksInGroup[_];if(!h){this.warn("Invalid subtitle track id "+f);return}var R=h.details;h.details=u.details,this.log("subtitle track "+f+" loaded ["+w.startSN+"-"+w.endSN+"]"),f===this.trackId&&(this.retryCount=0,this.playlistLoaded(f,u,R))},s.onLevelLoading=function(a,u){this.switchLevel(u.level)},s.onLevelSwitching=function(a,u){this.switchLevel(u.level)},s.switchLevel=function(a){var u=this.hls.levels[a];if(!(u!=null&&u.textGroupIds))return;var f=u.textGroupIds[u.urlId];if(this.groupId!==f){var w=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,_=this.tracks.filter(function(O){return!f||O.groupId===f});this.tracksInGroup=_;var h=this.findTrackId(w==null?void 0:w.name)||this.findTrackId();this.groupId=f;var R={subtitleTracks:_};this.log("Updating subtitle tracks, "+_.length+' track(s) found in "'+f+'" group-id'),this.hls.trigger(k.Events.SUBTITLE_TRACKS_UPDATED,R),h!==-1&&this.setSubtitleTrack(h,w)}},s.findTrackId=function(a){for(var u=this.tracksInGroup,f=0;f=w.length)return;this.clearTimer();var _=w[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,_){var h=_.id,R=_.groupId,O=R===void 0?"":R,g=_.name,x=_.type,E=_.url;this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:h,groupId:O,name:g,type:x,url:E});var T=this.switchParams(_.url,u==null?void 0:u.details);this.loadPlaylist(T)}else this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:a})},s.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,u=r(this.media.textTracks),f=0;f=0&&(x[0]=Math.min(x[0],w),x[1]=Math.max(x[1],_),O=!0,E/(_-w)>.5))return}if(O||R.push([w,_]),this.config.renderTextTracksNatively){var T=this.captionsTracks[f];this.Cues.newCue(T,w,_,h)}else{var M=this.Cues.newCue(null,w,_,h);this.hls.trigger(y.Events.CUES_PARSED,{type:"captions",cues:M,track:f})}},a.onInitPtsFound=function(f,w){var _=this,h=w.frag,R=w.id,O=w.initPTS,g=w.timescale,x=this.unparsedVttFrags;R==="main"&&(this.initPTS[h.cc]=O,this.timescale[h.cc]=g),x.length&&(this.unparsedVttFrags=[],x.forEach(function(E){_.onFragLoaded(y.Events.FRAG_LOADED,E)}))},a.getExistingTrack=function(f){var w=this.media;if(w)for(var _=0;_>>8^g&255^99,d[h]=g,t[g]=h;var x=_[h],E=_[x],T=_[E],M=_[g]*257^g*16843008;r[h]=M<<24|M>>>8,i[h]=M<<16|M>>>16,o[h]=M<<8|M>>>24,s[h]=M,M=T*16843009^E*65537^x*257^h*16843008,a[g]=M<<24|M>>>8,u[g]=M<<16|M>>>16,f[g]=M<<8|M>>>24,w[g]=M,h?(h=x^_[_[_[T^x]]],R^=_[_[R]]):h=R=1}},b.expandKey=function(d){for(var t=this.uint8ArrayToUint32Array_(d),l=!0,r=0;r>>6)+1;var M=(f[w+2]&60)>>>2;if(M>T.length-1){u.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+M});return}return O=(f[w+2]&1)<<2,O|=(f[w+3]&192)>>>6,k.logger.log("manifest codec:"+_+", ADTS type:"+h+", samplingIndex:"+M),/firefox/i.test(x)?M>=6?(h=5,g=new Array(4),R=M-3):(h=2,g=new Array(2),R=M):x.indexOf("android")!==-1?(h=2,g=new Array(2),R=M):(h=5,g=new Array(4),_&&(_.indexOf("mp4a.40.29")!==-1||_.indexOf("mp4a.40.5")!==-1)||!_&&M>=6?R=M-3:((_&&_.indexOf("mp4a.40.2")!==-1&&(M>=6&&O===1||/vivaldi/i.test(x))||!_&&O===1)&&(h=2,g=new Array(2)),R=M)),g[0]=h<<3,g[0]|=(M&14)>>1,g[1]|=(M&1)<<7,g[1]|=O<<3,h===5&&(g[1]|=(R&14)>>1,g[2]=(R&1)<<7,g[2]|=2<<2,g[3]=0),{config:g,samplerate:T[M],channelCount:O,codec:"mp4a.40."+h,manifestCodec:E}}function b(u,f){return u[f]===255&&(u[f+1]&246)===240}function p(u,f){return u[f+1]&1?7:9}function d(u,f){return(u[f+3]&3)<<11|u[f+4]<<3|(u[f+5]&224)>>>5}function t(u,f){return f+5=u.length)return!1;var _=d(u,f);if(_<=w)return!1;var h=f+_;return h===u.length||l(u,h)}return!1}function o(u,f,w,_,h){if(!u.samplerate){var R=S(f,w,_,h);if(!R)return;u.config=R.config,u.samplerate=R.samplerate,u.channelCount=R.channelCount,u.codec=R.codec,u.manifestCodec=R.manifestCodec,k.logger.log("parsed codec:"+u.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function s(u){return 1024*9e4/u}function c(u,f,w,_,h){var R=p(u,f),O=d(u,f);if(O-=R,O>0){var g=w+_*h;return{headerLength:R,frameLength:O,stamp:g}}}function a(u,f,w,_,h){var R=s(u.samplerate),O=c(f,w,_,h,R);if(O){var g=O.frameLength,x=O.headerLength,E=O.stamp,T=x+g,M=Math.max(0,w+T-f.length),L;M?(L=new Uint8Array(T-x),L.set(f.subarray(w+x,f.length),0)):L=f.subarray(w+x,w+T);var A={unit:L,pts:E};return M||u.samples.push(A),{sample:A,length:T,missing:M}}}},"./src/demux/base-audio-demuxer.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"initPTSFn",function(){return d});var k=C("./src/polyfills/number.ts"),y=C("./src/demux/id3.ts"),m=C("./src/demux/dummy-demuxed-track.ts"),S=C("./src/utils/mp4-tools.ts"),b=C("./src/utils/typed-array.ts"),p=function(){function t(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var l=t.prototype;return l.resetInitSegment=function(i,o,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},l.resetTimeStamp=function(){},l.resetContiguity=function(){},l.canParse=function(i,o){return!1},l.appendFrame=function(i,o,s){},l.demux=function(i,o){this.cachedData&&(i=Object(S.appendUint8Array)(this.cachedData,i),this.cachedData=null);var s=y.getID3Data(i,0),c=s?s.length:0,a,u,f=this._audioTrack,w=this._id3Track,_=s?y.getTimeStamp(s):void 0,h=i.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=d(_,o)),s&&s.length>0&&w.samples.push({pts:this.initPTS,dts:this.initPTS,data:s}),u=this.initPTS;cp?(this.word<<=p,this.bitsAvailable-=p):(p-=this.bitsAvailable,d=p>>3,p-=d>>3,this.bytesAvailable-=d,this.loadWord(),this.word<<=p,this.bitsAvailable-=p)},S.readBits=function(p){var d=Math.min(this.bitsAvailable,p),t=this.word>>>32-d;return p>32&&k.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=d,this.bitsAvailable>0?this.word<<=d:this.bytesAvailable>0&&this.loadWord(),d=p-d,d>0&&this.bitsAvailable?t<>>p)!==0)return this.word<<=p,this.bitsAvailable-=p,p;return this.loadWord(),p+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var p=this.skipLZ();return this.readBits(p+1)-1},S.readEG=function(){var p=this.readUEG();return 1&p?1+p>>>1:-1*(p>>>1)},S.readBoolean=function(){return this.readBits(1)===1},S.readUByte=function(){return this.readBits(8)},S.readUShort=function(){return this.readBits(16)},S.readUInt=function(){return this.readBits(32)},S.skipScalingList=function(p){for(var d=8,t=8,l,r=0;r0?h.subarray(O,O+g):void 0},S=function(h,R){var O=0;return O=(h[R]&127)<<21,O|=(h[R+1]&127)<<14,O|=(h[R+2]&127)<<7,O|=h[R+3]&127,O},b=function(h,R){return k(h,R)&&S(h,R+6)+10<=h.length-R},p=function(h){for(var R=l(h),O=0;O>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:A+=String.fromCharCode(T);break;case 12:case 13:M=h[V++],A+=String.fromCharCode((T&31)<<6|M&63);break;case 14:M=h[V++],L=h[V++],A+=String.fromCharCode((T&15)<<12|(M&63)<<6|(L&63)<<0);break;default:}}return A},u={decodeTextFrame:o},f;function w(){return!f&&typeof self.TextDecoder!="undefined"&&(f=new self.TextDecoder("utf-8")),f}},"./src/demux/mp3demuxer.ts":function(N,v,C){"use strict";C.r(v);var k=C("./src/demux/base-audio-demuxer.ts"),y=C("./src/demux/id3.ts"),m=C("./src/utils/logger.ts"),S=C("./src/demux/mpegaudio.ts");function b(t,l){t.prototype=Object.create(l.prototype),t.prototype.constructor=t,p(t,l)}function p(t,l){return p=Object.setPrototypeOf||function(i,o){return i.__proto__=o,i},p(t,l)}var d=function(t){b(l,t);function l(){return t.apply(this,arguments)||this}var r=l.prototype;return r.resetInitSegment=function(o,s,c){t.prototype.resetInitSegment.call(this,o,s,c),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:c,inputTimeScale:9e4,dropped:0}},l.probe=function(o){if(!o)return!1;for(var s=y.getID3Data(o,0)||[],c=s.length,a=o.length;c0},b.demux=function(d){var t=d,l=Object(y.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(k.appendUint8Array)(this.remainderData,d));var r=Object(k.segmentValidRange)(t);this.remainderData=r.remainder,l.samples=r.valid||new Uint8Array}else l.samples=t;return{audioTrack:Object(y.dummyTrack)(),avcTrack:l,id3Track:Object(y.dummyTrack)(),textTrack:Object(y.dummyTrack)()}},b.flush=function(){var d=Object(y.dummyTrack)();return d.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(y.dummyTrack)(),avcTrack:d,id3Track:Object(y.dummyTrack)(),textTrack:Object(y.dummyTrack)()}},b.demuxSampleAes=function(d,t,l){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},b.destroy=function(){},S}();m.minProbeByteLength=1024,v.default=m},"./src/demux/mpegaudio.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"appendFrame",function(){return p}),C.d(v,"parseHeader",function(){return d}),C.d(v,"isHeaderPattern",function(){return t}),C.d(v,"isHeader",function(){return l}),C.d(v,"canParse",function(){return r}),C.d(v,"probe",function(){return i});var k=null,y=[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],m=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],S=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],b=[0,1,1,4];function p(o,s,c,a,u){if(c+24>s.length)return;var f=d(s,c);if(f&&c+f.frameLength<=s.length){var w=f.samplesPerFrame*9e4/f.sampleRate,_=a+u*w,h={unit:s.subarray(c,c+f.frameLength),pts:_,dts:_};return o.config=[],o.channelCount=f.channelCount,o.samplerate=f.sampleRate,o.samples.push(h),{sample:h,length:f.frameLength,missing:0}}}function d(o,s){var c=o[s+1]>>3&3,a=o[s+1]>>1&3,u=o[s+2]>>4&15,f=o[s+2]>>2&3;if(c!==1&&u!==0&&u!==15&&f!==3){var w=o[s+2]>>1&1,_=o[s+3]>>6,h=c===3?3-a:a===3?3:4,R=y[h*14+u-1]*1e3,O=c===3?0:c===2?1:2,g=m[O*3+f],x=_===3?1:2,E=S[c][a],T=b[a],M=E*8*T,L=Math.floor(E*R/g+w)*T;if(k===null){var A=navigator.userAgent||"",V=A.match(/Chrome\/(\d+)/i);k=V?parseInt(V[1]):0}var z=!!k&&k<=87;return z&&a===2&&R>=224e3&&_===0&&(o[s+3]=o[s+3]|128),{sampleRate:g,channelCount:x,frameLength:L,samplesPerFrame:M}}}function t(o,s){return o[s]===255&&(o[s+1]&224)===224&&(o[s+1]&6)!==0}function l(o,s){return s+1=d.length){l();return}if(d[t].unit.length<32)continue;var r=this.decrypter.isSync();if(this.decryptAacSample(d,t,l,r),!r)return}},b.getAvcEncryptedData=function(d){for(var t=Math.floor((d.length-48)/160)*16+16,l=new Int8Array(t),r=0,i=32;i<=d.length-16;i+=160,r+=16)l.set(d.subarray(i,i+16),r);return l},b.getAvcDecryptedUnit=function(d,t){for(var l=new Uint8Array(t),r=0,i=32;i<=d.length-16;i+=160,r+=16)d.set(l.subarray(r,r+16),i);return d},b.decryptAvcSample=function(d,t,l,r,i,o){var s=Object(y.discardEPB)(i.data),c=this.getAvcEncryptedData(s),a=this;this.decryptBuffer(c.buffer,function(u){i.data=a.getAvcDecryptedUnit(s,u),o||a.decryptAvcSamples(d,t,l+1,r)})},b.decryptAvcSamples=function(d,t,l,r){if(d instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,l=0){if(t>=d.length){r();return}for(var i=d[t].units;!(l>=i.length);l++){var o=i[l];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var s=this.decrypter.isSync();if(this.decryptAvcSample(d,t,l,r,o,s),!s)return}}},S}();v.default=m},"./src/demux/transmuxer-interface.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return i});var k=C("./node_modules/webworkify-webpack/index.js"),y=C.n(k),m=C("./src/events.ts"),S=C("./src/demux/transmuxer.ts"),b=C("./src/utils/logger.ts"),p=C("./src/errors.ts"),d=C("./src/utils/mediasource-helper.ts"),t=C("./node_modules/eventemitter3/index.js"),l=C.n(t),r=Object(d.getMediaSource)()||{isTypeSupported:function(){return!1}},i=function(){function o(c,a,u,f){var w=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=c,this.id=a,this.onTransmuxComplete=u,this.onFlush=f;var _=c.config,h=function(E,T){T=T||{},T.frag=w.frag,T.id=w.id,c.trigger(E,T)};this.observer=new t.EventEmitter,this.observer.on(m.Events.FRAG_DECRYPTED,h),this.observer.on(m.Events.ERROR,h);var R={mp4:r.isTypeSupported("video/mp4"),mpeg:r.isTypeSupported("audio/mpeg"),mp3:r.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(_.enableWorker&&typeof Worker!="undefined"){b.logger.log("demuxing in webworker");var g;try{g=this.worker=k("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(x){c.trigger(m.Events.ERROR,{type:p.ErrorTypes.OTHER_ERROR,details:p.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},g.postMessage({cmd:"init",typeSupported:R,vendor:O,id:a,config:JSON.stringify(_)})}catch(x){b.logger.warn("Error in worker:",x),b.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new S.default(this.observer,R,_,O,a),this.worker=null}}else this.transmuxer=new S.default(this.observer,R,_,O,a)}var s=o.prototype;return s.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.terminate(),this.worker=null;else{var u=this.transmuxer;u&&(u.destroy(),this.transmuxer=null)}var f=this.observer;f&&f.removeAllListeners(),this.observer=null},s.push=function(a,u,f,w,_,h,R,O,g,x){var E=this;g.transmuxing.start=self.performance.now();var T=this.transmuxer,M=this.worker,L=h?h.start:_.start,A=_.decryptdata,V=this.frag,z=!(V&&_.cc===V.cc),W=!(V&&g.level===V.level),G=V?g.sn-V.sn:-1,U=this.part?g.part-this.part.index:1,P=!W&&(G===1||G===0&&U===1),H=self.performance.now();(W||G||_.stats.parsing.start===0)&&(_.stats.parsing.start=H),h&&(U||!P)&&(h.stats.parsing.start=H);var $=new S.TransmuxState(z,P,O,W,L);if(!P||z){b.logger.log("[transmuxer-interface, "+_.type+"]: Starting new transmux session for sn: "+g.sn+" p: "+g.part+" level: "+g.level+" id: "+g.id+` discontinuity: `+z+` trackSwitch: `+W+` contiguous: `+P+` accurateTimeOffset: `+O+` timeOffset: `+L);var re=new S.TransmuxConfig(f,w,u,R,x);this.configureTransmuxer(re)}if(this.frag=_,this.part=h,M)M.postMessage({cmd:"demux",data:a,decryptdata:A,chunkMeta:g,state:$},a instanceof ArrayBuffer?[a]:[]);else if(T){var te=T.push(a,A,g,$);Object(S.isPromise)(te)?te.then(function(ge){E.handleTransmuxComplete(ge)}):this.handleTransmuxComplete(te)}},s.flush=function(a){var u=this;a.transmuxing.start=self.performance.now();var f=this.transmuxer,w=this.worker;if(w)w.postMessage({cmd:"flush",chunkMeta:a});else if(f){var _=f.flush(a);Object(S.isPromise)(_)?_.then(function(h){u.handleFlushResult(h,a)}):this.handleFlushResult(_,a)}},s.handleFlushResult=function(a,u){var f=this;a.forEach(function(w){f.handleTransmuxComplete(w)}),this.onFlush(u)},s.onWorkerMessage=function(a){var u=a.data,f=this.hls;switch(u.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(u.data);break}case"flush":{this.onFlush(u.data);break}default:{u.data=u.data||{},u.data.frag=this.frag,u.data.id=this.id,f.trigger(u.event,u.data);break}}},s.configureTransmuxer=function(a){var u=this.worker,f=this.transmuxer;u?u.postMessage({cmd:"configure",config:a}):f&&f.configure(a)},s.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},o}()},"./src/demux/transmuxer-worker.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return p});var k=C("./src/demux/transmuxer.ts"),y=C("./src/events.ts"),m=C("./src/utils/logger.ts"),S=C("./node_modules/eventemitter3/index.js"),b=C.n(S);function p(i){var o=new S.EventEmitter,s=function(a,u){i.postMessage({event:a,data:u})};o.on(y.Events.FRAG_DECRYPTED,s),o.on(y.Events.ERROR,s),i.addEventListener("message",function(c){var a=c.data;switch(a.cmd){case"init":{var u=JSON.parse(a.config);i.transmuxer=new k.default(o,a.typeSupported,u,a.vendor,a.id),Object(m.enableLogs)(u.debug),s("init",null);break}case"configure":{i.transmuxer.configure(a.config);break}case"demux":{var f=i.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(k.isPromise)(f)?f.then(function(h){d(i,h)}):d(i,f);break}case"flush":{var w=a.chunkMeta,_=i.transmuxer.flush(w);Object(k.isPromise)(_)?_.then(function(h){l(i,h,w)}):l(i,_,w);break}default:break}})}function d(i,o){if(r(o.remuxResult))return;var s=[],c=o.remuxResult,a=c.audio,u=c.video;a&&t(s,a),u&&t(s,u),i.postMessage({event:"transmuxComplete",data:o},s)}function t(i,o){o.data1&&i.push(o.data1.buffer),o.data2&&i.push(o.data2.buffer)}function l(i,o,s){o.forEach(function(c){d(i,c)}),i.postMessage({event:"flush",data:s})}function r(i){return!i.audio&&!i.video&&!i.text&&!i.id3&&!i.initSegment}},"./src/demux/transmuxer.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return u}),C.d(v,"isPromise",function(){return _}),C.d(v,"TransmuxConfig",function(){return h}),C.d(v,"TransmuxState",function(){return R});var k=C("./src/events.ts"),y=C("./src/errors.ts"),m=C("./src/crypt/decrypter.ts"),S=C("./src/demux/aacdemuxer.ts"),b=C("./src/demux/mp4demuxer.ts"),p=C("./src/demux/tsdemuxer.ts"),d=C("./src/demux/mp3demuxer.ts"),t=C("./src/remux/mp4-remuxer.ts"),l=C("./src/remux/passthrough-remuxer.ts"),r=C("./src/demux/chunk-cache.ts"),i=C("./src/utils/mp4-tools.ts"),o=C("./src/utils/logger.ts"),s;try{s=self.performance.now.bind(self.performance)}catch(O){o.logger.debug("Unable to use Performance API on this environment"),s=self.Date.now}var c=[{demux:p.default,remux:t.default},{demux:b.default,remux:l.default},{demux:S.default,remux:t.default},{demux:d.default,remux:t.default}],a=1024;c.forEach(function(O){var g=O.demux;a=Math.max(a,g.minProbeByteLength)});var u=function(){function O(x,E,T,M,L){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 r.default,this.observer=x,this.typeSupported=E,this.config=T,this.vendor=M,this.id=L}var g=O.prototype;return g.configure=function(E){this.transmuxConfig=E,this.decrypter&&this.decrypter.reset()},g.push=function(E,T,M,L){var A=this,V=M.transmuxing;V.executeStart=s();var z=new Uint8Array(E),W=this.cache,G=this.config,U=this.currentTransmuxState,P=this.transmuxConfig;L&&(this.currentTransmuxState=L);var H=f(z,T);if(H&&H.method==="AES-128"){var $=this.getDecrypter();if(G.enableSoftwareAES){var re=$.softwareDecrypt(z,H.key.buffer,H.iv.buffer);if(!re)return V.executeEnd=s(),w(M);z=new Uint8Array(re)}else return this.decryptionPromise=$.webCryptoDecrypt(z,H.key.buffer,H.iv.buffer).then(function(q){var Y=A.push(q,null,M);return A.decryptionPromise=null,Y}),this.decryptionPromise}var te=L||U,ge=te.contiguous,ve=te.discontinuity,de=te.trackSwitch,De=te.accurateTimeOffset,Te=te.timeOffset,he=P.audioCodec,ue=P.videoCodec,ie=P.defaultInitPts,Se=P.duration,ne=P.initSegmentData;if((ve||de)&&this.resetInitSegment(ne,he,ue,Se),ve&&this.resetInitialTimestamp(ie),ge||this.resetContiguity(),this.needsProbing(z,ve,de)){if(W.dataLength){var ce=W.flush();z=Object(i.appendUint8Array)(ce,z)}this.configureTransmuxer(z,P)}var Oe=this.transmux(z,H,Te,De,M),oe=this.currentTransmuxState;return oe.contiguous=!0,oe.discontinuity=!1,oe.trackSwitch=!1,V.executeEnd=s(),Oe},g.flush=function(E){var T=this,M=E.transmuxing;M.executeStart=s();var L=this.decrypter,A=this.cache,V=this.currentTransmuxState,z=this.decryptionPromise;if(z)return z.then(function(){return T.flush(E)});var W=[],G=V.timeOffset;if(L){var U=L.flush();U&&W.push(this.push(U,null,E))}var P=A.dataLength;A.reset();var H=this.demuxer,$=this.remuxer;if(!H||!$)return P>=a&&this.observer.emit(k.Events.ERROR,k.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),M.executeEnd=s(),[w(E)];var re=H.flush(G);return _(re)?re.then(function(te){return T.flushRemux(W,te,E),W}):(this.flushRemux(W,re,E),W)},g.flushRemux=function(E,T,M){var L=T.audioTrack,A=T.avcTrack,V=T.id3Track,z=T.textTrack,W=this.currentTransmuxState,G=W.accurateTimeOffset,U=W.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var P=this.remuxer.remux(L,A,V,z,U,G,!0,this.id);E.push({remuxResult:P,chunkMeta:M}),M.transmuxing.executeEnd=s()},g.resetInitialTimestamp=function(E){var T=this.demuxer,M=this.remuxer;if(!T||!M)return;T.resetTimeStamp(E),M.resetTimeStamp(E)},g.resetContiguity=function(){var E=this.demuxer,T=this.remuxer;if(!E||!T)return;E.resetContiguity(),T.resetNextTimestamp()},g.resetInitSegment=function(E,T,M,L){var A=this.demuxer,V=this.remuxer;if(!A||!V)return;A.resetInitSegment(T,M,L),V.resetInitSegment(E,T,M)},g.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},g.transmux=function(E,T,M,L,A){var V;return T&&T.method==="SAMPLE-AES"?V=this.transmuxSampleAes(E,T,M,L,A):V=this.transmuxUnencrypted(E,M,L,A),V},g.transmuxUnencrypted=function(E,T,M,L){var A=this.demuxer.demux(E,T,!1,!this.config.progressive),V=A.audioTrack,z=A.avcTrack,W=A.id3Track,G=A.textTrack,U=this.remuxer.remux(V,z,W,G,T,M,!1,this.id);return{remuxResult:U,chunkMeta:L}},g.transmuxSampleAes=function(E,T,M,L,A){var V=this;return this.demuxer.demuxSampleAes(E,T,M).then(function(z){var W=V.remuxer.remux(z.audioTrack,z.avcTrack,z.id3Track,z.textTrack,M,L,!1,V.id);return{remuxResult:W,chunkMeta:A}})},g.configureTransmuxer=function(E,T){for(var M=this.config,L=this.observer,A=this.typeSupported,V=this.vendor,z=T.audioCodec,W=T.defaultInitPts,G=T.duration,U=T.initSegmentData,P=T.videoCodec,H,$=0,re=c.length;$0&&g!=null&&g.key!=null&&g.iv!==null&&g.method!=null&&(x=g),x}var w=function(g){return{remuxResult:{},chunkMeta:g}};function _(O){return"then"in O&&O.then instanceof Function}var h=function(g,x,E,T,M){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=g,this.videoCodec=x,this.initSegmentData=E,this.duration=T,this.defaultInitPts=M},R=function(g,x,E,T,M){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=g,this.contiguous=x,this.accurateTimeOffset=E,this.trackSwitch=T,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"discardEPB",function(){return w});var k=C("./src/demux/adts.ts"),y=C("./src/demux/mpegaudio.ts"),m=C("./src/demux/exp-golomb.ts"),S=C("./src/demux/id3.ts"),b=C("./src/demux/sample-aes.ts"),p=C("./src/events.ts"),d=C("./src/utils/mp4-tools.ts"),t=C("./src/utils/logger.ts"),l=C("./src/errors.ts"),r={video:1,audio:2,id3:3,text:4},i=function(){function _(R,O,g){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=R,this.config=O,this.typeSupported=g}_.probe=function(O){var g=_.syncOffset(O);return g<0?!1:(g&&t.logger.warn("MPEG2-TS detected but first sync word found @ offset "+g+", junk ahead ?"),!0)},_.syncOffset=function(O){for(var g=Math.min(1e3,O.length-3*188),x=0;x>4,he=void 0;if(Te>1){if(he=ve+5+O[ve+4],he===ve+188)continue}else he=ve+4;switch(De){case V:de&&(z&&(T=a(z))&&this.parseAVCPES(T,!1),z={data:[],size:0}),z&&(z.data.push(O.subarray(he,ve+188)),z.size+=ve+188-he);break;case W:de&&(U&&(T=a(U))&&(L.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(O.subarray(he,ve+188)),U.size+=ve+188-he);break;case G:de&&(P&&(T=a(P))&&this.parseID3PES(T),P={data:[],size:0}),P&&(P.data.push(O.subarray(he,ve+188)),P.size+=ve+188-he);break;case 0:de&&(he+=O[he]+1),re=this._pmtId=s(O,he);break;case re:{de&&(he+=O[he]+1);var ue=c(O,he,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);V=ue.avc,V>0&&(M.pid=V),W=ue.audio,W>0&&(L.pid=W,L.isAAC=ue.isAAC),G=ue.id3,G>0&&(A.pid=G),H&&!$&&(t.logger.log("reparse from beginning"),H=!1,ve=ge-188),$=this.pmtParsed=!0;break}case 17:case 8191:break;default:H=!0;break}}else this.observer.emit(p.Events.ERROR,p.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=z,L.pesData=U,A.pesData=P;var ie={audioTrack:L,avcTrack:M,id3Track:A,textTrack:this._txtTrack};return E&&this.extractRemainingSamples(ie),ie},h.flush=function(){var O=this.remainderData;this.remainderData=null;var g;return O?g=this.demux(O,-1,!1,!0):g={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(g),this.sampleAes?this.decrypt(g,this.sampleAes):g},h.extractRemainingSamples=function(O){var g=O.audioTrack,x=O.avcTrack,E=O.id3Track,T=x.pesData,M=g.pesData,L=E.pesData,A;T&&(A=a(T))?(this.parseAVCPES(A,!0),x.pesData=null):x.pesData=T,M&&(A=a(M))?(g.isAAC?this.parseAACPES(A):this.parseMPEGPES(A),g.pesData=null):(M!=null&&M.size&&t.logger.log("last AAC PES packet truncated,might overlap between fragments"),g.pesData=M),L&&(A=a(L))?(this.parseID3PES(A),E.pesData=null):E.pesData=L},h.demuxSampleAes=function(O,g,x){var E=this.demux(O,x,!0,!this.config.progressive),T=this.sampleAes=new b.default(this.observer,this.config,g);return this.decrypt(E,T)},h.decrypt=function(O,g){return new Promise(function(x){var E=O.audioTrack,T=O.avcTrack;E.samples&&E.isAAC?g.decryptAacSamples(E.samples,0,function(){T.samples?g.decryptAvcSamples(T.samples,0,0,function(){x(O)}):x(O)}):T.samples&&g.decryptAvcSamples(T.samples,0,0,function(){x(O)})})},h.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},h.parseAVCPES=function(O,g){var x=this,E=this._avcTrack,T=this.parseAVCNALu(O.data),M=!1,L=this.avcSample,A,V=!1;O.data=null,L&&T.length&&!E.audFound&&(u(L,E),L=this.avcSample=o(!1,O.pts,O.dts,"")),T.forEach(function(z){switch(z.type){case 1:{A=!0,L||(L=x.avcSample=o(!0,O.pts,O.dts,"")),M&&(L.debug+="NDR "),L.frame=!0;var W=z.data;if(V&&W.length>4){var G=new m.default(W).readSliceType();(G===2||G===4||G===7||G===9)&&(L.key=!0)}break}case 5:A=!0,L||(L=x.avcSample=o(!0,O.pts,O.dts,"")),M&&(L.debug+="IDR "),L.key=!0,L.frame=!0;break;case 6:{A=!0,M&&L&&(L.debug+="SEI ");var U=new m.default(w(z.data));U.readUByte();for(var P=0,H=0,$=!1,re=0;!$&&U.bytesAvailable>1;){P=0;do re=U.readUByte(),P+=re;while(re===255);H=0;do re=U.readUByte(),H+=re;while(re===255);if(P===4&&U.bytesAvailable!==0){$=!0;var te=U.readUByte();if(te===181){var ge=U.readUShort();if(ge===49){var ve=U.readUInt();if(ve===1195456820){var de=U.readUByte();if(de===3){for(var De=U.readUByte(),Te=U.readUByte(),he=31&De,ue=[De,Te],ie=0;ie16){for(var Se=[],ne=0;ne<16;ne++)Se.push(U.readUByte().toString(16)),(ne===3||ne===5||ne===7||ne===9)&&Se.push("-");for(var ce=H-16,Oe=new Uint8Array(ce),oe=0;oe=0){var U={data:O.subarray(W,L-E-1),type:G};M.push(U)}else{var P=this.getLastNalUnit();if(P&&(T&&L<=4-T&&(P.state&&(P.data=P.data.subarray(0,P.data.byteLength-T))),V=L-E-1,V>0)){var H=new Uint8Array(P.data.byteLength+V);H.set(P.data,0),H.set(O.subarray(0,V),P.data.byteLength),P.data=H,P.state=0}}L=0&&E>=0){var $={data:O.subarray(W,g),type:G,state:E};M.push($)}if(M.length===0){var re=this.getLastNalUnit();if(re){var te=new Uint8Array(re.data.byteLength+O.byteLength);te.set(re.data,0),te.set(O,re.data.byteLength),re.data=te}}return x.naluState=E,M},h.parseAACPES=function(O){var g=0,x=this._audioTrack,E=this.aacOverFlow,T=O.data;if(E){this.aacOverFlow=null;var M=E.sample.unit.byteLength,L=Math.min(E.missing,M),A=M-L;E.sample.unit.set(T.subarray(0,L),A),x.samples.push(E.sample),g=E.missing}var V,z;for(V=g,z=T.length;V1;){var M=new Uint8Array(T[0].length+T[1].length);M.set(T[0]),M.set(T[1],T[0].length),T[0]=M,T.splice(1,1)}R=T[0];var L=(R[0]<<16)+(R[1]<<8)+R[2];if(L===1){if(O=(R[4]<<8)+R[5],O&&O>_.size-6)return null;var A=R[7];A&192&&(x=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,A&64?(E=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,x-E>60*9e4&&(t.logger.warn(Math.round((x-E)/9e4)+"s delta between PTS and DTS, align them"),x=E)):E=x),g=R[8];var V=g+9;if(_.size<=V)return null;_.size-=V;for(var z=new Uint8Array(_.size),W=0,G=T.length;WU){V-=U;continue}else R=R.subarray(V),U-=V,V=0;z.set(R,h),h+=U}return O&&(O-=g+3),{data:z,pts:x,dts:E,len:O}}return null}function u(_,h){if(_.units.length&&_.frame){if(_.pts===void 0){var R=h.samples,O=R.length;if(O){var g=R[O-1];_.pts=g.pts,_.dts=g.dts}else{h.dropped++;return}}h.samples.push(_)}_.debug.length&&t.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function f(_,h){var R=_.length;if(R>0){if(h.pts>=_[R-1].pts)_.push(h);else for(var O=R-1;O>=0;O--)if(h.pts<_[O].pts){_.splice(O,0,h);break}}else _.push(h)}function w(_){for(var h=_.byteLength,R=[],O=1;Ox)return T;return 0}},{key:"maxAutoLevel",get:function(){var g=this.levels,x=this.autoLevelCapping,E;return x===-1&&g&&g.length?E=g.length-1:E=x,E}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(g){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,g)}},{key:"audioTracks",get:function(){var g=this.audioTrackController;return g?g.audioTracks:[]}},{key:"audioTrack",get:function(){var g=this.audioTrackController;return g?g.audioTrack:-1},set:function(g){var x=this.audioTrackController;x&&(x.audioTrack=g)}},{key:"subtitleTracks",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTrack:-1},set:function(g){var x=this.subtitleTrackController;x&&(x.subtitleTrack=g)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var g=this.subtitleTrackController;return g?g.subtitleDisplay:!1},set:function(g){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=g)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(g){this.config.lowLatencyMode=g}},{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 a.Events}},{key:"ErrorTypes",get:function(){return u.ErrorTypes}},{key:"ErrorDetails",get:function(){return u.ErrorDetails}},{key:"DefaultConfig",get:function(){return h.defaultConfig?h.defaultConfig:o.hlsDefaultConfig},set:function(g){h.defaultConfig=g}}]),h}();_.defaultConfig=void 0},"./src/is-supported.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"isSupported",function(){return m}),C.d(v,"changeTypeSupported",function(){return S});var k=C("./src/utils/mediasource-helper.ts");function y(){return self.SourceBuffer||self.WebKitSourceBuffer}function m(){var b=Object(k.getMediaSource)();if(!b)return!1;var p=y(),d=b&&typeof b.isTypeSupported=="function"&&b.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),t=!p||p.prototype&&typeof p.prototype.appendBuffer=="function"&&typeof p.prototype.remove=="function";return!!d&&!!t}function S(){var b,p=y();return typeof(p==null||((b=p.prototype)===null||b===void 0)?void 0:b.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return i}),C.d(v,"LoadError",function(){return s});var k=C("./src/polyfills/number.ts"),y=C("./src/errors.ts");function m(c,a){c.prototype=Object.create(a.prototype),c.prototype.constructor=c,t(c,a)}function S(c){var a=typeof Map=="function"?new Map:void 0;return S=function(f){if(f===null||!d(f))return f;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(f))return a.get(f);a.set(f,w)}function w(){return b(f,arguments,l(this).constructor)}return w.prototype=Object.create(f.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),t(w,f)},S(c)}function b(c,a,u){return p()?b=Reflect.construct:b=function(w,_,h){var R=[null];R.push.apply(R,_);var O=Function.bind.apply(w,R),g=new O;return h&&t(g,h.prototype),g},b.apply(null,arguments)}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(c){return!1}}function d(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function t(c,a){return t=Object.setPrototypeOf||function(f,w){return f.__proto__=w,f},t(c,a)}function l(c){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},l(c)}var r=Math.pow(2,17),i=function(){function c(u){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=u}var a=c.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(f,w){var _=this,h=f.url;if(!h)return Promise.reject(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,networkDetails:null},"Fragment does not have a "+(h?"part list":"url")));this.abort();var R=this.config,O=R.fLoader,g=R.loader;return new Promise(function(x,E){_.loader&&_.loader.destroy();var T=_.loader=f.loader=O?new O(R):new g(R),M=o(f),L={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:r};f.stats=T.stats,T.load(M,L,{onSuccess:function(V,z,W,G){_.resetLoader(f,T),x({frag:f,part:null,payload:V.data,networkDetails:G})},onError:function(V,z,W){_.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,response:V,networkDetails:W}))},onAbort:function(V,z,W){_.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,networkDetails:W}))},onTimeout:function(V,z,W){_.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,networkDetails:W}))},onProgress:function(V,z,W,G){w&&w({frag:f,part:null,payload:W,networkDetails:G})}})})},a.loadPart=function(f,w,_){var h=this;this.abort();var R=this.config,O=R.fLoader,g=R.loader;return new Promise(function(x,E){h.loader&&h.loader.destroy();var T=h.loader=f.loader=O?new O(R):new g(R),M=o(f,w),L={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:r};w.stats=T.stats,T.load(M,L,{onSuccess:function(V,z,W,G){h.resetLoader(f,T),h.updateStatsFromPart(f,w);var U={frag:f,part:w,payload:V.data,networkDetails:G};_(U),x(U)},onError:function(V,z,W){h.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,part:w,response:V,networkDetails:W}))},onAbort:function(V,z,W){f.stats.aborted=w.stats.aborted,h.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,part:w,networkDetails:W}))},onTimeout:function(V,z,W){h.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,part:w,networkDetails:W}))}})})},a.updateStatsFromPart=function(f,w){var _=f.stats,h=w.stats,R=h.total;if(_.loaded+=h.loaded,R){var O=Math.round(f.duration/w.duration),g=Math.min(Math.round(_.loaded/R),O),x=O-g,E=x*Math.round(_.loaded/g);_.total=_.loaded+E}else _.total=Math.max(_.loaded,_.total);var T=_.loading,M=h.loading;T.start?T.first+=M.first-M.start:(T.start=M.start,T.first=M.first),T.end=M.end},a.resetLoader=function(f,w){f.loader=null,this.loader===w&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),w.destroy()},c}();function o(c,a){a===void 0&&(a=null);var u=a||c,f={frag:c,part:a,responseType:"arraybuffer",url:u.url,headers:{},rangeStart:0,rangeEnd:0},w=u.byteRangeStartOffset,_=u.byteRangeEndOffset;return Object(k.isFiniteNumber)(w)&&Object(k.isFiniteNumber)(_)&&(f.rangeStart=w,f.rangeEnd=_),f}var s=function(c){m(a,c);function a(u){for(var f,w=arguments.length,_=new Array(w>1?w-1:0),h=1;h>8*(15-R)&255;return h},f.setDecryptDataFromLevelKey=function(_,h){var R=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(R=b.LevelKey.fromURI(_.uri),R.method=_.method,R.iv=this.createInitializationVector(h),R.keyFormat="identity"),R},f.setElementaryStreamInfo=function(_,h,R,O,g,x){x===void 0&&(x=!1);var E=this.elementaryStreams,T=E[_];if(!T){E[_]={startPTS:h,endPTS:R,startDTS:O,endDTS:g,partial:x};return}T.startPTS=Math.min(T.startPTS,h),T.endPTS=Math.max(T.endPTS,R),T.startDTS=Math.min(T.startDTS,O),T.endDTS=Math.max(T.endDTS,g)},f.clearElementaryStreamInfo=function(){var _=this.elementaryStreams;_[i.AUDIO]=null,_[i.VIDEO]=null,_[i.AUDIOVIDEO]=null},r(u,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var _=this.sn;typeof _!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&S.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),_=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,_)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(k.isFiniteNumber)(this.programDateTime))return null;var _=Object(k.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+_*1e3}},{key:"encrypted",get:function(){var _;return!!((_=this.decryptdata)!==null&&_!==void 0&&_.keyFormat&&this.decryptdata.uri)}}]),u}(o),c=function(a){d(u,a);function u(f,w,_,h,R){var O;O=a.call(this,_)||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 p.LoadStats,O.duration=f.decimalFloatingPoint("DURATION"),O.gap=f.bool("GAP"),O.independent=f.bool("INDEPENDENT"),O.relurl=f.enumeratedString("URI"),O.fragment=w,O.index=h;var g=f.enumeratedString("BYTERANGE");return g&&O.setByteRange(g,R),R&&(O.fragOffset=R.fragOffset+R.duration),O}return r(u,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var w=this.elementaryStreams;return!!(w.audio||w.video||w.audiovideo)}}]),u}(o)},"./src/loader/key-loader.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return S});var k=C("./src/events.ts"),y=C("./src/errors.ts"),m=C("./src/utils/logger.ts"),S=function(){function b(d){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=d,this._registerListeners()}var p=b.prototype;return p._registerListeners=function(){this.hls.on(k.Events.KEY_LOADING,this.onKeyLoading,this)},p._unregisterListeners=function(){this.hls.off(k.Events.KEY_LOADING,this.onKeyLoading)},p.destroy=function(){this._unregisterListeners();for(var t in this.loaders){var l=this.loaders[t];l&&l.destroy()}this.loaders={}},p.onKeyLoading=function(t,l){var r=l.frag,i=r.type,o=this.loaders[i];if(!r.decryptdata){m.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var s=r.decryptdata.uri;if(s!==this.decrypturl||this.decryptkey===null){var c=this.hls.config;if(o&&(m.logger.warn("abort previous key loader for type:"+i),o.abort()),!s){m.logger.warn("key uri is falsy");return}var a=c.loader,u=r.loader=this.loaders[i]=new a(c);this.decrypturl=s,this.decryptkey=null;var f={url:s,frag:r,responseType:"arraybuffer"},w={timeout:c.fragLoadingTimeOut,maxRetry:0,retryDelay:c.fragLoadingRetryDelay,maxRetryDelay:c.fragLoadingMaxRetryTimeout,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(f,w,_)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(k.Events.KEY_LOADED,{frag:r}))},p.loadsuccess=function(t,l,r){var i=r.frag;if(!i.decryptdata){m.logger.error("after key load, decryptdata unset");return}this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(k.Events.KEY_LOADED,{frag:i})},p.loaderror=function(t,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},p.loadtimeout=function(t,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},b}()},"./src/loader/level-details.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"LevelDetails",function(){return b});var k=C("./src/polyfills/number.ts");function y(p,d){for(var t=0;tl.endSN||r>0||r===0&&i>0,this.updated||this.advanced?this.misses=Math.floor(l.misses*.6):this.misses=l.misses+1,this.availabilityDelay=l.availabilityDelay},m(p,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(k.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||S}},{key:"drift",get:function(){var l=this.driftEndTime-this.driftStartTime;if(l>0){var r=this.driftEnd-this.driftStart;return r*1e3/l}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var l;return(l=this.fragments)!==null&&l!==void 0&&l.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 l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),p}()},"./src/loader/level-key.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"LevelKey",function(){return b});var k=C("./node_modules/url-toolkit/src/url-toolkit.js"),y=C.n(k);function m(p,d){for(var t=0;t2){var E=x.shift()+".";return E+=parseInt(x.shift()).toString(16),E+=("000"+parseInt(x.shift()).toString(16)).substr(-4),E}return g},R.resolve=function(g,x){return y.buildAbsoluteURL(x,g,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(g,x){var E=[],T={},M=!1;r.lastIndex=0;for(var L;(L=r.exec(g))!=null;)if(L[1]){var A=new d.AttrList(L[1]),V={attrs:A,bitrate:A.decimalInteger("AVERAGE-BANDWIDTH")||A.decimalInteger("BANDWIDTH"),name:A.NAME,url:R.resolve(L[2],x)},z=A.decimalResolution("RESOLUTION");z&&(V.width=z.width,V.height=z.height),f((A.CODECS||"").split(/[ ,]+/).filter(function(G){return G}),V),V.videoCodec&&V.videoCodec.indexOf("avc1")!==-1&&(V.videoCodec=R.convertAVC1ToAVCOTI(V.videoCodec)),E.push(V)}else if(L[3]){var W=new d.AttrList(L[3]);W["DATA-ID"]&&(M=!0,T[W["DATA-ID"]]=W)}return{levels:E,sessionData:M?T:null}},R.parseMasterPlaylistMedia=function(g,x,E,T){T===void 0&&(T=[]);var M,L=[],A=0;for(i.lastIndex=0;(M=i.exec(g))!==null;){var V=new d.AttrList(M[1]);if(V.TYPE===E){var z={attrs:V,bitrate:0,id:A++,groupId:V["GROUP-ID"],instreamId:V["INSTREAM-ID"],name:V.NAME||V.LANGUAGE||"",type:E,default:V.bool("DEFAULT"),autoselect:V.bool("AUTOSELECT"),forced:V.bool("FORCED"),lang:V.LANGUAGE,url:V.URI?R.resolve(V.URI,x):""};if(T.length){var W=R.findGroup(T,z.groupId)||T[0];w(z,W,"audioCodec"),w(z,W,"textCodec")}L.push(z)}}return L},R.parseLevelPlaylist=function(g,x,E,T,M){var L=new b.LevelDetails(x),A=L.fragments,V=null,z=0,W=0,G=0,U=0,P=null,H=new S.Fragment(T,x),$,re,te,ge=-1,ve=!1;for(o.lastIndex=0,L.m3u8=g;($=o.exec(g))!==null;){ve&&(ve=!1,H=new S.Fragment(T,x),H.start=G,H.sn=z,H.cc=U,H.level=E,V&&(H.initSegment=V,H.rawProgramDateTime=V.rawProgramDateTime));var de=$[1];if(de){H.duration=parseFloat(de);var De=(" "+$[2]).slice(1);H.title=De||null,H.tagList.push(De?["INF",de,De]:["INF",de])}else if($[3])Object(k.isFiniteNumber)(H.duration)&&(H.start=G,te&&(H.levelkey=te),H.sn=z,H.level=E,H.cc=U,H.urlId=M,A.push(H),H.relurl=(" "+$[3]).slice(1),h(H,P),P=H,G+=H.duration,z++,W=0,ve=!0);else if($[4]){var Te=(" "+$[4]).slice(1);P?H.setByteRange(Te,P):H.setByteRange(Te)}else if($[5])H.rawProgramDateTime=(" "+$[5]).slice(1),H.tagList.push(["PROGRAM-DATE-TIME",H.rawProgramDateTime]),ge===-1&&(ge=A.length);else{if($=$[0].match(s),!$){t.logger.warn("No matches on slow regex match for level playlist!");continue}for(re=1;re<$.length&&!(typeof $[re]!="undefined");re++);var he=(" "+$[re]).slice(1),ue=(" "+$[re+1]).slice(1),ie=$[re+2]?(" "+$[re+2]).slice(1):"";switch(he){case"PLAYLIST-TYPE":L.type=ue.toUpperCase();break;case"MEDIA-SEQUENCE":z=L.startSN=parseInt(ue);break;case"SKIP":{var Se=new d.AttrList(ue),ne=Se.decimalInteger("SKIPPED-SEGMENTS");if(Object(k.isFiniteNumber)(ne)){L.skippedSegments=ne;for(var ce=ne;ce--;)A.unshift(null);z+=ne}var Oe=Se.enumeratedString("RECENTLY-REMOVED-DATERANGES");Oe&&(L.recentlyRemovedDateranges=Oe.split(" "));break}case"TARGETDURATION":L.targetduration=parseFloat(ue);break;case"VERSION":L.version=parseInt(ue);break;case"EXTM3U":break;case"ENDLIST":L.live=!1;break;case"#":(ue||ie)&&H.tagList.push(ie?[ue,ie]:[ue]);break;case"DIS":U++;case"GAP":H.tagList.push([he]);break;case"BITRATE":H.tagList.push([he,ue]);break;case"DISCONTINUITY-SEQ":U=parseInt(ue);break;case"KEY":{var oe,q=new d.AttrList(ue),Y=q.enumeratedString("METHOD"),Z=q.URI,ye=q.hexadecimalInteger("IV"),be=q.enumeratedString("KEYFORMATVERSIONS"),Re=q.enumeratedString("KEYID"),Qe=(oe=q.enumeratedString("KEYFORMAT"))!=null?oe:"identity",rt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(rt.indexOf(Qe)>-1){t.logger.warn("Keyformat "+Qe+" is not supported from the manifest");continue}else if(Qe!=="identity")continue;Y&&(te=p.LevelKey.fromURL(x,Z),Z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Y)>=0&&(te.method=Y,te.keyFormat=Qe,Re&&(te.keyID=Re),be&&(te.keyFormatVersions=be),te.iv=ye));break}case"START":{var at=new d.AttrList(ue),qe=at.decimalFloatingPoint("TIME-OFFSET");Object(k.isFiniteNumber)(qe)&&(L.startTimeOffset=qe);break}case"MAP":{var st=new d.AttrList(ue);H.relurl=st.URI,st.BYTERANGE&&H.setByteRange(st.BYTERANGE),H.level=E,H.sn="initSegment",te&&(H.levelkey=te),H.initSegment=null,V=H,ve=!0;break}case"SERVER-CONTROL":{var lt=new d.AttrList(ue);L.canBlockReload=lt.bool("CAN-BLOCK-RELOAD"),L.canSkipUntil=lt.optionalFloat("CAN-SKIP-UNTIL",0),L.canSkipDateRanges=L.canSkipUntil>0&<.bool("CAN-SKIP-DATERANGES"),L.partHoldBack=lt.optionalFloat("PART-HOLD-BACK",0),L.holdBack=lt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var je=new d.AttrList(ue);L.partTarget=je.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=L.partList;Ie||(Ie=L.partList=[]);var tt=W>0?Ie[Ie.length-1]:void 0,ot=W++,ze=new S.Part(new d.AttrList(ue),H,x,ot,tt);Ie.push(ze),H.duration+=ze.duration;break}case"PRELOAD-HINT":{var Ze=new d.AttrList(ue);L.preloadHint=Ze;break}case"RENDITION-REPORT":{var Ne=new d.AttrList(ue);L.renditionReports=L.renditionReports||[],L.renditionReports.push(Ne);break}default:t.logger.warn("line parsed but not handled: "+$);break}}}P&&!P.relurl?(A.pop(),G-=P.duration,L.partList&&(L.fragmentHint=P)):L.partList&&(h(H,P),H.cc=U,L.fragmentHint=H);var Ae=A.length,Me=A[0],Ee=A[Ae-1];if(G+=L.skippedSegments*L.targetduration,G>0&&Ae&&Ee){L.averagetargetduration=G/Ae;var Ce=Ee.sn;L.endSN=Ce!=="initSegment"?Ce:0,Me&&(L.startCC=Me.cc,Me.initSegment||L.fragments.every(function(ke){return ke.relurl&&a(ke.relurl)})&&(t.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),H=new S.Fragment(T,x),H.relurl=Ee.relurl,H.level=E,H.sn="initSegment",Me.initSegment=H,L.needSidxRanges=!0))}else L.endSN=0,L.startCC=0;return L.fragmentHint&&(G+=L.fragmentHint.duration),L.totalduration=G,L.endCC=U,ge>0&&_(A,ge),L},R}();function f(R,O){["video","audio","text"].forEach(function(g){var x=R.filter(function(T){return Object(l.isCodecType)(T,g)});if(x.length){var E=x.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});O[g+"Codec"]=E.length>0?E[0]:x[0],R=R.filter(function(T){return x.indexOf(T)===-1})}}),O.unknownCodecs=R}function w(R,O,g){var x=O[g];x&&(R[g]=x)}function _(R,O){for(var g=R[O],x=O;x--;){var E=R[x];if(!E)return;E.programDateTime=g.programDateTime-E.duration*1e3,g=E}}function h(R,O){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):O!=null&&O.programDateTime&&(R.programDateTime=O.endProgramDateTime),Object(k.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(N,v,C){"use strict";C.r(v);var k=C("./src/polyfills/number.ts"),y=C("./src/events.ts"),m=C("./src/errors.ts"),S=C("./src/utils/logger.ts"),b=C("./src/utils/mp4-tools.ts"),p=C("./src/loader/m3u8-parser.ts"),d=C("./src/types/loader.ts"),t=C("./src/utils/attr-list.ts");function l(o){var s=o.type;switch(s){case d.PlaylistContextType.AUDIO_TRACK:return d.PlaylistLevelType.AUDIO;case d.PlaylistContextType.SUBTITLE_TRACK:return d.PlaylistLevelType.SUBTITLE;default:return d.PlaylistLevelType.MAIN}}function r(o,s){var c=o.url;return(c===void 0||c.indexOf("data:")===0)&&(c=s.url),c}var i=function(){function o(c){this.hls=void 0,this.loaders=Object.create(null),this.hls=c,this.registerListeners()}var s=o.prototype;return s.registerListeners=function(){var a=this.hls;a.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(y.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(y.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(y.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},s.unregisterListeners=function(){var a=this.hls;a.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(y.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(y.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(y.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},s.createInternalLoader=function(a){var u=this.hls.config,f=u.pLoader,w=u.loader,_=f||w,h=new _(u);return a.loader=h,this.loaders[a.type]=h,h},s.getInternalLoader=function(a){return this.loaders[a.type]},s.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},s.destroyInternalLoaders=function(){for(var a in this.loaders){var u=this.loaders[a];u&&u.destroy(),this.resetInternalLoader(a)}},s.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},s.onManifestLoading=function(a,u){var f=u.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:d.PlaylistContextType.MANIFEST,url:f,deliveryDirectives:null})},s.onLevelLoading=function(a,u){var f=u.id,w=u.level,_=u.url,h=u.deliveryDirectives;this.load({id:f,groupId:null,level:w,responseType:"text",type:d.PlaylistContextType.LEVEL,url:_,deliveryDirectives:h})},s.onAudioTrackLoading=function(a,u){var f=u.id,w=u.groupId,_=u.url,h=u.deliveryDirectives;this.load({id:f,groupId:w,level:null,responseType:"text",type:d.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:h})},s.onSubtitleTrackLoading=function(a,u){var f=u.id,w=u.groupId,_=u.url,h=u.deliveryDirectives;this.load({id:f,groupId:w,level:null,responseType:"text",type:d.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:h})},s.load=function(a){var u,f=this.hls.config,w=this.getInternalLoader(a);if(w){var _=w.context;if(_&&_.url===a.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),w.abort()}var h,R,O,g;switch(a.type){case d.PlaylistContextType.MANIFEST:h=f.manifestLoadingMaxRetry,R=f.manifestLoadingTimeOut,O=f.manifestLoadingRetryDelay,g=f.manifestLoadingMaxRetryTimeout;break;case d.PlaylistContextType.LEVEL:case d.PlaylistContextType.AUDIO_TRACK:case d.PlaylistContextType.SUBTITLE_TRACK:h=0,R=f.levelLoadingTimeOut;break;default:h=f.levelLoadingMaxRetry,R=f.levelLoadingTimeOut,O=f.levelLoadingRetryDelay,g=f.levelLoadingMaxRetryTimeout;break}if(w=this.createInternalLoader(a),(u=a.deliveryDirectives)!==null&&u!==void 0&&u.part){var x;if(a.type===d.PlaylistContextType.LEVEL&&a.level!==null?x=this.hls.levels[a.level].details:a.type===d.PlaylistContextType.AUDIO_TRACK&&a.id!==null?x=this.hls.audioTracks[a.id].details:a.type===d.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(x=this.hls.subtitleTracks[a.id].details),x){var E=x.partTarget,T=x.targetduration;E&&T&&(R=Math.min(Math.max(E*3,T*.8)*1e3,R))}}var M={timeout:R,maxRetry:h,retryDelay:O,maxRetryDelay:g,highWaterMark:0},L={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};w.load(a,M,L)},s.loadsuccess=function(a,u,f,w){if(w===void 0&&(w=null),f.isSidxRequest){this.handleSidxRequest(a,f),this.handlePlaylistLoaded(a,u,f,w);return}this.resetInternalLoader(f.type);var _=a.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,f,"no EXTM3U delimiter",w);return}u.parsing.start=performance.now(),_.indexOf("#EXTINF:")>0||_.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,u,f,w):this.handleMasterPlaylist(a,u,f,w)},s.loaderror=function(a,u,f){f===void 0&&(f=null),this.handleNetworkError(u,f,!1,a)},s.loadtimeout=function(a,u,f){f===void 0&&(f=null),this.handleNetworkError(u,f,!0)},s.handleMasterPlaylist=function(a,u,f,w){var _=this.hls,h=a.data,R=r(a,f),O=p.default.parseMasterPlaylist(h,R),g=O.levels,x=O.sessionData;if(!g.length){this.handleManifestParsingError(a,f,"no level found in manifest",w);return}var E=g.map(function(z){return{id:z.attrs.AUDIO,audioCodec:z.audioCodec}}),T=g.map(function(z){return{id:z.attrs.SUBTITLES,textCodec:z.textCodec}}),M=p.default.parseMasterPlaylistMedia(h,R,"AUDIO",E),L=p.default.parseMasterPlaylistMedia(h,R,"SUBTITLES",T),A=p.default.parseMasterPlaylistMedia(h,R,"CLOSED-CAPTIONS");if(M.length){var V=M.some(function(z){return!z.url});!V&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),M.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new t.AttrList({}),bitrate:0,url:""}))}_.trigger(y.Events.MANIFEST_LOADED,{levels:g,audioTracks:M,subtitles:L,captions:A,url:R,stats:u,networkDetails:w,sessionData:x})},s.handleTrackOrLevelPlaylist=function(a,u,f,w){var _=this.hls,h=f.id,R=f.level,O=f.type,g=r(a,f),x=Object(k.isFiniteNumber)(h)?h:0,E=Object(k.isFiniteNumber)(R)?R:x,T=l(f),M=p.default.parseLevelPlaylist(a.data,g,E,T,x);if(!M.fragments.length){_.trigger(y.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:typeof f.level=="number"?f.level:void 0});return}if(O===d.PlaylistContextType.MANIFEST){var L={attrs:new t.AttrList({}),bitrate:0,details:M,name:"",url:g};_.trigger(y.Events.MANIFEST_LOADED,{levels:[L],audioTracks:[],url:g,stats:u,networkDetails:w,sessionData:null})}if(u.parsing.end=performance.now(),M.needSidxRanges){var A,V=(A=M.fragments[0].initSegment)===null||A===void 0?void 0:A.url;this.load({url:V,isSidxRequest:!0,type:O,level:R,levelDetails:M,id:h,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}f.levelDetails=M,this.handlePlaylistLoaded(a,u,f,w)},s.handleSidxRequest=function(a,u){var f=Object(b.parseSegmentIndex)(new Uint8Array(a.data));if(!f)return;var w=f.references,_=u.levelDetails;w.forEach(function(h,R){var O=h.info,g=_.fragments[R];g.byteRange.length===0&&g.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),g.initSegment&&g.initSegment.setByteRange(String(f.moovEndOffset)+"@0")})},s.handleManifestParsingError=function(a,u,f,w){this.hls.trigger(y.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:u.type===d.PlaylistContextType.MANIFEST,url:a.url,reason:f,response:a,context:u,networkDetails:w})},s.handleNetworkError=function(a,u,f,w){f===void 0&&(f=!1),S.logger.warn("[playlist-loader]: A network "+(f?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var _=m.ErrorDetails.UNKNOWN,h=!1,R=this.getInternalLoader(a);switch(a.type){case d.PlaylistContextType.MANIFEST:_=f?m.ErrorDetails.MANIFEST_LOAD_TIMEOUT:m.ErrorDetails.MANIFEST_LOAD_ERROR,h=!0;break;case d.PlaylistContextType.LEVEL:_=f?m.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.ErrorDetails.LEVEL_LOAD_ERROR,h=!1;break;case d.PlaylistContextType.AUDIO_TRACK:_=f?m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,h=!1;break;case d.PlaylistContextType.SUBTITLE_TRACK:_=f?m.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:m.ErrorDetails.SUBTITLE_LOAD_ERROR,h=!1;break}R&&this.resetInternalLoader(a.type);var O={type:m.ErrorTypes.NETWORK_ERROR,details:_,fatal:h,url:a.url,loader:R,context:a,networkDetails:u};w&&(O.response=w),this.hls.trigger(y.Events.ERROR,O)},s.handlePlaylistLoaded=function(a,u,f,w){var _=f.type,h=f.level,R=f.id,O=f.groupId,g=f.loader,x=f.levelDetails,E=f.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(a,f,"invalid target duration",w);return}if(!g)return;x.live&&(g.getCacheAge&&(x.ageHeader=g.getCacheAge()||0),(!g.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(_){case d.PlaylistContextType.MANIFEST:case d.PlaylistContextType.LEVEL:this.hls.trigger(y.Events.LEVEL_LOADED,{details:x,level:h||0,id:R||0,stats:u,networkDetails:w,deliveryDirectives:E});break;case d.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(y.Events.AUDIO_TRACK_LOADED,{details:x,id:R||0,groupId:O||"",stats:u,networkDetails:w,deliveryDirectives:E});break;case d.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(y.Events.SUBTITLE_TRACK_LOADED,{details:x,id:R||0,groupId:O||"",stats:u,networkDetails:w,deliveryDirectives:E});break}},o}();v.default=i},"./src/polyfills/number.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"isFiniteNumber",function(){return k}),C.d(v,"MAX_SAFE_INTEGER",function(){return y});var k=Number.isFinite||function(m){return typeof m=="number"&&isFinite(m)},y=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(N,v,C){"use strict";C.r(v);var k=function(){function y(){}return y.getSilentFrame=function(S,b){switch(S){case"mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===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(b===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(b===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(b===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(b===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},y}();v.default=k},"./src/remux/mp4-generator.ts":function(N,v,C){"use strict";C.r(v);var k=Math.pow(2,32)-1,y=function(){function m(){}return m.init=function(){m.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 b;for(b in m.types)m.types.hasOwnProperty(b)&&(m.types[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.charCodeAt(3)]);var p=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]),d=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]);m.HDLR_TYPES={video:p,audio:d};var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),l=new Uint8Array([0,0,0,0,0,0,0,0]);m.STTS=m.STSC=m.STCO=l,m.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),m.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),m.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),m.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var r=new Uint8Array([105,115,111,109]),i=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);m.FTYP=m.box(m.types.ftyp,r,o,r,i),m.DINF=m.box(m.types.dinf,m.box(m.types.dref,t))},m.box=function(b){for(var p=8,d=arguments.length,t=new Array(d>1?d-1:0),l=1;l>24&255,o[1]=p>>16&255,o[2]=p>>8&255,o[3]=p&255,o.set(b,4),r=0,p=8;r>24&255,b>>16&255,b>>8&255,b&255,d>>24,d>>16&255,d>>8&255,d&255,t>>24,t>>16&255,t>>8&255,t&255,85,196,0,0]))},m.mdia=function(b){return m.box(m.types.mdia,m.mdhd(b.timescale,b.duration),m.hdlr(b.type),m.minf(b))},m.mfhd=function(b){return m.box(m.types.mfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255]))},m.minf=function(b){return b.type==="audio"?m.box(m.types.minf,m.box(m.types.smhd,m.SMHD),m.DINF,m.stbl(b)):m.box(m.types.minf,m.box(m.types.vmhd,m.VMHD),m.DINF,m.stbl(b))},m.moof=function(b,p,d){return m.box(m.types.moof,m.mfhd(b),m.traf(d,p))},m.moov=function(b){for(var p=b.length,d=[];p--;)d[p]=m.trak(b[p]);return m.box.apply(null,[m.types.moov,m.mvhd(b[0].timescale,b[0].duration)].concat(d).concat(m.mvex(b)))},m.mvex=function(b){for(var p=b.length,d=[];p--;)d[p]=m.trex(b[p]);return m.box.apply(null,[m.types.mvex].concat(d))},m.mvhd=function(b,p){p*=b;var d=Math.floor(p/(k+1)),t=Math.floor(p%(k+1)),l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,d>>24,d>>16&255,d>>8&255,d&255,t>>24,t>>16&255,t>>8&255,t&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 m.box(m.types.mvhd,l)},m.sdtp=function(b){var p=b.samples||[],d=new Uint8Array(4+p.length),t,l;for(t=0;t>>8&255),p.push(r&255),p=p.concat(Array.prototype.slice.call(l));for(t=0;t>>8&255),d.push(r&255),d=d.concat(Array.prototype.slice.call(l));var i=m.box(m.types.avcC,new Uint8Array([1,p[3],p[4],p[5],252|3,224|b.sps.length].concat(p).concat([b.pps.length]).concat(d))),o=b.width,s=b.height,c=b.pixelRatio[0],a=b.pixelRatio[1];return m.box(m.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,o>>8&255,o&255,s>>8&255,s&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]),i,m.box(m.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),m.box(m.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,c&255,a>>24,a>>16&255,a>>8&255,a&255])))},m.esds=function(b){var p=b.config.length;return new Uint8Array([0,0,0,0,3,23+p,0,1,0,4,15+p,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([p]).concat(b.config).concat([6,1,2]))},m.mp4a=function(b){var p=b.samplerate;return m.box(m.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,p>>8&255,p&255,0,0]),m.box(m.types.esds,m.esds(b)))},m.mp3=function(b){var p=b.samplerate;return m.box(m.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,p>>8&255,p&255,0,0]))},m.stsd=function(b){return b.type==="audio"?!b.isAAC&&b.codec==="mp3"?m.box(m.types.stsd,m.STSD,m.mp3(b)):m.box(m.types.stsd,m.STSD,m.mp4a(b)):m.box(m.types.stsd,m.STSD,m.avc1(b))},m.tkhd=function(b){var p=b.id,d=b.duration*b.timescale,t=b.width,l=b.height,r=Math.floor(d/(k+1)),i=Math.floor(d%(k+1));return m.box(m.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&255,0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,i>>24,i>>16&255,i>>8&255,i&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,t>>8&255,t&255,0,0,l>>8&255,l&255,0,0]))},m.traf=function(b,p){var d=m.sdtp(b),t=b.id,l=Math.floor(p/(k+1)),r=Math.floor(p%(k+1));return m.box(m.types.traf,m.box(m.types.tfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255])),m.box(m.types.tfdt,new Uint8Array([1,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,r>>24,r>>16&255,r>>8&255,r&255])),m.trun(b,d.length+16+20+8+16+8+8),d)},m.trak=function(b){return b.duration=b.duration||4294967295,m.box(m.types.trak,m.tkhd(b),m.mdia(b))},m.trex=function(b){var p=b.id;return m.box(m.types.trex,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},m.trun=function(b,p){var d=b.samples||[],t=d.length,l=12+16*t,r=new Uint8Array(l),i,o,s,c,a,u;for(p+=8+l,r.set([0,0,15,1,t>>>24&255,t>>>16&255,t>>>8&255,t&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255],0),i=0;i>>24&255,s>>>16&255,s>>>8&255,s&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,u>>>24&255,u>>>16&255,u>>>8&255,u&255],12+16*i);return m.box(m.types.trun,r)},m.initSegment=function(b){m.types||m.init();var p=m.moov(b),d=new Uint8Array(m.FTYP.byteLength+p.byteLength);return d.set(m.FTYP),d.set(p,m.FTYP.byteLength),d},m}();y.types=void 0,y.HDLR_TYPES=void 0,y.STTS=void 0,y.STSC=void 0,y.STCO=void 0,y.STSZ=void 0,y.VMHD=void 0,y.SMHD=void 0,y.STSD=void 0,y.FTYP=void 0,y.DINF=void 0,v.default=y},"./src/remux/mp4-remuxer.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return u}),C.d(v,"normalizePts",function(){return f});var k=C("./src/polyfills/number.ts"),y=C("./src/remux/aac-helper.ts"),m=C("./src/remux/mp4-generator.ts"),S=C("./src/events.ts"),b=C("./src/errors.ts"),p=C("./src/utils/logger.ts"),d=C("./src/types/loader.ts"),t=C("./src/utils/timescale-conversion.ts");function l(){return l=Object.assign||function(R){for(var O=1;O0?M:L.pts},x[0].pts);return E&&p.logger.debug("PTS rollover detected"),T},O.remux=function(x,E,T,M,L,A,V,z){var W,G,U,P,H,$,re=L,te=L,ge=x.pid>-1,ve=E.pid>-1,de=E.samples.length,De=x.samples.length>0,Te=de>1,he=(!ge||De)&&(!ve||Te)||this.ISGenerated||V;if(he){this.ISGenerated||(U=this.generateIS(x,E,L));var ue=this.isVideoContiguous,ie=-1;if(Te&&(ie=w(E.samples),!ue&&this.config.forceKeyFrameOnDiscontinuity))if($=!0,ie>0){p.logger.warn("[mp4-remuxer]: Dropped "+ie+" out of "+de+" video samples due to a missing keyframe");var Se=this.getVideoStartPts(E.samples);E.samples=E.samples.slice(ie),E.dropped+=ie,te+=(E.samples[0].pts-Se)/(E.timescale||9e4)}else ie===-1&&(p.logger.warn("[mp4-remuxer]: No keyframe found out of "+de+" video samples"),$=!1);if(this.ISGenerated){if(De&&Te){var ne=this.getVideoStartPts(E.samples),ce=f(x.samples[0].pts,ne)-ne,Oe=ce/E.inputTimeScale;re+=Math.max(0,Oe),te+=Math.max(0,-Oe)}if(De){if(x.samplerate||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(x,E,L)),G=this.remuxAudio(x,re,this.isAudioContiguous,A,ve||Te||z===d.PlaylistLevelType.AUDIO?te:void 0),Te){var oe=G?G.endPTS-G.startPTS:0;E.inputTimeScale||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(x,E,L)),W=this.remuxVideo(E,te,ue,oe)}}else Te&&(W=this.remuxVideo(E,te,ue,0));W&&(W.firstKeyFrame=ie,W.independent=ie!==-1)}}return this.ISGenerated&&(T.samples.length&&(H=this.remuxID3(T,L)),M.samples.length&&(P=this.remuxText(M,L))),{audio:G,video:W,initSegment:U,independent:$,text:P,id3:H}},O.generateIS=function(x,E,T){var M=x.samples,L=E.samples,A=this.typeSupported,V={},z=!Object(k.isFiniteNumber)(this._initPTS),W="audio/mp4",G,U,P;if(z&&(G=U=Infinity),x.config&&M.length&&(x.timescale=x.samplerate,x.isAAC||(A.mpeg?(W="audio/mpeg",x.codec=""):A.mp3&&(x.codec="mp3")),V.audio={id:"audio",container:W,codec:x.codec,initSegment:!x.isAAC&&A.mpeg?new Uint8Array(0):m.default.initSegment([x]),metadata:{channelCount:x.channelCount}},z&&(P=x.inputTimeScale,G=U=M[0].pts-Math.round(P*T))),E.sps&&E.pps&&L.length&&(E.timescale=E.inputTimeScale,V.video={id:"main",container:"video/mp4",codec:E.codec,initSegment:m.default.initSegment([E]),metadata:{width:E.width,height:E.height}},z)){P=E.inputTimeScale;var H=this.getVideoStartPts(L),$=Math.round(P*T);U=Math.min(U,f(L[0].dts,H)-$),G=Math.min(G,H-$)}if(Object.keys(V).length)return this.ISGenerated=!0,z&&(this._initPTS=G,this._initDTS=U),{tracks:V,initPTS:G,timescale:P}},O.remuxVideo=function(x,E,T,M){var L=x.inputTimeScale,A=x.samples,V=[],z=A.length,W=this._initPTS,G=this.nextAvcDts,U=8,P,H,$,re=Number.POSITIVE_INFINITY,te=Number.NEGATIVE_INFINITY,ge=0,ve=!1;if(!T||G===null){var de=E*L,De=A[0].pts-f(A[0].dts,A[0].pts);G=de-De}for(var Te=0;Tehe.pts){var ue=9e4*.2;ge=Math.max(Math.min(ge,he.pts-he.dts),-1*ue)}he.dts0?Te-1:Te].dts&&(ve=!0)}ve&&A.sort(function(It,At){var _t=It.dts-At.dts,Vt=It.pts-At.pts;return _t||Vt}),H=A[0].dts,$=A[A.length-1].dts;var ie=Math.round(($-H)/(z-1));if(ge<0){if(geie,q=Oe<-1;if(oe||q){oe?p.logger.warn("AVC: "+Object(t.toMsFromMpegTsClock)(Oe,!0)+" ms ("+Oe+"dts) hole between fragments detected, filling it"):p.logger.warn("AVC: "+Object(t.toMsFromMpegTsClock)(-Oe,!0)+" ms ("+Oe+"dts) overlapping between fragments detected"),H=G;var Y=A[0].pts-Oe;A[0].dts=H,A[0].pts=Y,p.logger.log("Video: First PTS/DTS adjusted: "+Object(t.toMsFromMpegTsClock)(Y,!0)+"/"+Object(t.toMsFromMpegTsClock)(H,!0)+", delta: "+Object(t.toMsFromMpegTsClock)(Oe,!0)+" ms")}}a&&(H=Math.max(0,H));for(var Z=0,ye=0,be=0;be0?Ie-1:Ie].dts;if(Ce.stretchShortVideoTrack&&this.nextAudioPts!==null){var Fe=Math.floor(Ce.maxBufferHole*L),Be=(M?re+M*L:this.nextAudioPts)-tt.pts;Be>Fe?(P=Be-ke,P<0&&(P=ke),p.logger.log("[mp4-remuxer]: It is approximately "+Be/90+" ms to the next segment; using duration "+P/90+" ms for the last video frame.")):P=ke}else P=ke}var et=Math.round(tt.pts-tt.dts);V.push(new _(tt.key,P,ze,et))}if(V.length&&s&&s<70){var ct=V[0].flags;ct.dependsOn=2,ct.isNonSync=0}console.assert(P!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=G=$+P,this.isVideoContiguous=!0;var yt=m.default.moof(x.sequenceNumber++,H,l({},x,{samples:V})),ft="video",mt={data1:yt,data2:lt,startPTS:re/L,endPTS:(te+P)/L,startDTS:H/L,endDTS:G/L,type:ft,hasAudio:!1,hasVideo:!0,nb:V.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(lt.length,"MDAT length must not be zero"),mt},O.remuxAudio=function(x,E,T,M,L){var A=x.inputTimeScale,V=x.samplerate?x.samplerate:A,z=A/V,W=x.isAAC?i:o,G=W*z,U=this._initPTS,P=!x.isAAC&&this.typeSupported.mpeg,H=[],$=x.samples,re=P?0:8,te=this.nextAudioPts||-1,ge=E*A;if(this.isAudioContiguous=T=T||$.length&&te>0&&(M&&Math.abs(ge-te)<9e3||Math.abs(f($[0].pts-U,ge)-te)<20*G),$.forEach(function(Me){Me.pts=f(Me.pts-U,ge)}),!T||te<0){if($=$.filter(function(Me){return Me.pts>=0}),!$.length)return;L===0?te=0:M?te=Math.max(0,ge):te=$[0].pts}if(x.isAAC)for(var ve=L!==void 0,de=this.config.maxAudioFramesDrift,De=0,Te=te;De<$.length;De++){var he=$[De],ue=he.pts,ie=ue-Te,Se=Math.abs(1e3*ie/A);if(ie<=-de*G&&ve)De===0&&(p.logger.warn("Audio frame @ "+(ue/A).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*ie/A)+" ms."),this.nextAudioPts=te=Te=ue);else if(ie>=de*G&&Se0){ye+=re;try{Z=new Uint8Array(ye)}catch(Me){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ye,reason:"fail allocating audio mdat "+ye});return}if(!P){var lt=new DataView(Z.buffer);lt.setUint32(0,ye),Z.set(m.default.types.mdat,4)}}else return;Z.set(at,re);var je=at.byteLength;re+=je,H.push(new _(!0,W,je,0)),Y=qe}var Ie=H.length;if(!Ie)return;var tt=H[H.length-1];this.nextAudioPts=te=Y+z*tt.duration;var ot=P?new Uint8Array(0):m.default.moof(x.sequenceNumber++,q/z,l({},x,{samples:H}));x.samples=[];var ze=q/A,Ze=te/A,Ne="audio",Ae={data1:ot,data2:Z,startPTS:ze,endPTS:Ze,startDTS:ze,endDTS:Ze,type:Ne,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(Z.length,"MDAT length must not be zero"),Ae},O.remuxEmptyAudio=function(x,E,T,M){var L=x.inputTimeScale,A=x.samplerate?x.samplerate:L,V=L/A,z=this.nextAudioPts,W=(z!==null?z:M.startDTS*L)+this._initDTS,G=M.endDTS*L+this._initDTS,U=V*i,P=Math.ceil((G-W)/U),H=y.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(p.logger.warn("[mp4-remuxer]: remux empty Audio"),!H){p.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var $=[],re=0;re4294967296;)R+=g;return R}function w(R){for(var O=0;O0?this.lastEndDTS=x:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var E=!!R.audio,T=!!R.video,M="";E&&(M+="audio"),T&&(M+="video");var L={data1:_,startPTS:g,startDTS:g,endPTS:x,endDTS:x,type:M,hasAudio:E,hasVideo:T,nb:1,dropped:0};return w.audio=L.type==="audio"?L:void 0,w.video=L.type!=="audio"?L:void 0,w.text=c,w.id3=s,w.initSegment=h,w},t}(),p=function(l,r,i){return Object(y.getStartDTS)(l,r)-i};function d(t,l){var r=t==null?void 0:t.codec;return r&&r.length>4?r:r==="hvc1"?"hvc1.1.c.L120.90":r==="av01"?"av01.0.04M.08":r==="avc1"||l===m.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}v.default=b},"./src/task-loop.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"default",function(){return k});var k=function(){function y(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var m=y.prototype;return m.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},m.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},m.onHandlerDestroyed=function(){},m.hasInterval=function(){return!!this._tickInterval},m.hasNextTick=function(){return!!this._tickTimer},m.setInterval=function(b){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,b),!0)},m.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},m.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},m.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},m.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},m.doTick=function(){},y}()},"./src/types/cmcd.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"CMCDVersion",function(){return k}),C.d(v,"CMCDObjectType",function(){return y}),C.d(v,"CMCDStreamingFormat",function(){return m}),C.d(v,"CMCDStreamType",function(){return S});var k=1,y;(function(b){b.MANIFEST="m",b.AUDIO="a",b.VIDEO="v",b.MUXED="av",b.INIT="i",b.CAPTION="c",b.TIMED_TEXT="tt",b.KEY="k",b.OTHER="o"})(y||(y={}));var m;(function(b){b.DASH="d",b.HLS="h",b.SMOOTH="s",b.OTHER="o"})(m||(m={}));var S;(function(b){b.VOD="v",b.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"HlsSkip",function(){return m}),C.d(v,"getSkipValue",function(){return S}),C.d(v,"HlsUrlParameters",function(){return b}),C.d(v,"Level",function(){return p});function k(d,t){for(var l=0;lNumber.MAX_SAFE_INTEGER?Infinity:t},b.hexadecimalInteger=function(d){if(this[d]){var t=(this[d]||"0x").slice(2);t=(t.length&1?"0":"")+t;for(var l=new Uint8Array(t.length/2),r=0;rNumber.MAX_SAFE_INTEGER?Infinity:t},b.decimalFloatingPoint=function(d){return parseFloat(this[d])},b.optionalFloat=function(d,t){var l=this[d];return l?parseFloat(l):t},b.enumeratedString=function(d){return this[d]},b.bool=function(d){return this[d]==="YES"},b.decimalResolution=function(d){var t=k.exec(this[d]);return t===null?void 0:{width:parseInt(t[1],10),height:parseInt(t[2],10)}},S.parseAttrList=function(d){var t,l={},r='"';for(y.lastIndex=0;(t=y.exec(d))!==null;){var i=t[2];i.indexOf(r)===0&&i.lastIndexOf(r)===i.length-1&&(i=i.slice(1,-1)),l[t[1]]=i}return l},S}()},"./src/utils/binary-search.ts":function(N,v,C){"use strict";C.r(v);var k={search:function(m,S){for(var b=0,p=m.length-1,d=null,t=null;b<=p;){d=(b+p)/2|0,t=m[d];var l=S(t);if(l>0)b=d+1;else if(l<0)p=d-1;else return t}return null}};v.default=k},"./src/utils/buffer-helper.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"BufferHelper",function(){return m});var k=C("./src/utils/logger.ts"),y={length:0,start:function(){return 0},end:function(){return 0}},m=function(){function S(){}return S.isBuffered=function(p,d){try{if(p){for(var t=S.getBuffered(p),l=0;l=t.start(l)&&d<=t.end(l))return!0}}catch(r){}return!1},S.bufferInfo=function(p,d,t){try{if(p){var l=S.getBuffered(p),r=[],i;for(i=0;io&&(l[i-1].end=p[r].end):l.push(p[r])}else l.push(p[r])}else l=p;for(var s=0,c,a=d,u=d,f=0;f=w&&d<_)a=w,u=_,s=u-d;else if(d+t=T&&k.logger.log(this.time+" ["+T+"] "+M)},g}(),s=function(x){for(var E=[],T=0;Tb&&(this.logger.log(i.DEBUG,"Too large cursor position "+this.pos),this.pos=b)},x.moveCursor=function(T){var M=this.pos+T;if(T>1)for(var L=this.pos+1;L=144&&this.backSpace();var M=m(T);if(this.pos>=b){this.logger.log(i.ERROR,"Cannot insert "+T.toString(16)+" ("+M+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(M,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(T){var M;for(M=T;M0&&(T?L="["+M.join(" | ")+"]":L=M.join(` `)),L},x.getTextAndFormat=function(){return this.rows},g}(),w=function(){function g(E,T,M){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=T,this.mode=null,this.verbose=0,this.displayedMemory=new f(M),this.nonDisplayedMemory=new f(M),this.lastOutputScreen=new f(M),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=M}var x=g.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(T){this.outputFilter=T},x.setPAC=function(T){this.writeScreen.setPAC(T)},x.setBkgData=function(T){this.writeScreen.setBkgData(T)},x.setMode=function(T){if(T===this.mode)return;this.mode=T,this.logger.log(i.INFO,"MODE="+T),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=T},x.insertChars=function(T){for(var M=0;M=46,M.italics)M.foreground="white";else{var L=Math.floor(T/2)-16,A=["white","green","blue","cyan","red","yellow","magenta"];M.foreground=A[L]}this.logger.log(i.INFO,"MIDROW: "+JSON.stringify(M)),this.writeScreen.setPen(M)},x.outputDataUpdate=function(T){T===void 0&&(T=!1);var M=this.logger.time;if(M===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=M:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,M,this.lastOutputScreen),T&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:M),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},g}(),_=function(){function g(E,T,M){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var L=new o;this.channels=[null,new w(E,T,L),new w(E+1,M,L)],this.cmdHistory=O(),this.logger=L}var x=g.prototype;return x.getHandler=function(T){return this.channels[T].getHandler()},x.setHandler=function(T,M){this.channels[T].setHandler(M)},x.addData=function(T,M){var L,A,V,z=!1;this.logger.time=T;for(var W=0;W ("+s([A,V])+")"),L=this.parseCmd(A,V),L||(L=this.parseMidrow(A,V)),L||(L=this.parsePAC(A,V)),L||(L=this.parseBackgroundAttributes(A,V)),!L&&(z=this.parseChars(A,V),z)){var G=this.currentChannel;if(G&&G>0){var U=this.channels[G];U.insertChars(z)}else this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}!L&&!z&&this.logger.log(i.WARNING,"Couldn't parse cleaned data "+s([A,V])+" orig: "+s([M[W],M[W+1]]))}},x.parseCmd=function(T,M){var L=this.cmdHistory,A=(T===20||T===28||T===21||T===29)&&M>=32&&M<=47,V=(T===23||T===31)&&M>=33&&M<=35;if(!(A||V))return!1;if(R(T,M,L))return h(null,null,L),this.logger.log(i.DEBUG,"Repeated command ("+s([T,M])+") is dropped"),!0;var z=T===20||T===21||T===23?1:2,W=this.channels[z];return T===20||T===21||T===28||T===29?M===32?W.ccRCL():M===33?W.ccBS():M===34?W.ccAOF():M===35?W.ccAON():M===36?W.ccDER():M===37?W.ccRU(2):M===38?W.ccRU(3):M===39?W.ccRU(4):M===40?W.ccFON():M===41?W.ccRDC():M===42?W.ccTR():M===43?W.ccRTD():M===44?W.ccEDM():M===45?W.ccCR():M===46?W.ccENM():M===47&&W.ccEOC():W.ccTO(M-32),h(T,M,L),this.currentChannel=z,!0},x.parseMidrow=function(T,M){var L=0;if((T===17||T===25)&&M>=32&&M<=47){if(T===17?L=1:L=2,L!==this.currentChannel)return this.logger.log(i.ERROR,"Mismatch channel in midrow parsing"),!1;var A=this.channels[L];return A?(A.ccMIDROW(M),this.logger.log(i.DEBUG,"MIDROW ("+s([T,M])+")"),!0):!1}return!1},x.parsePAC=function(T,M){var L,A=this.cmdHistory,V=(T>=17&&T<=23||T>=25&&T<=31)&&M>=64&&M<=127,z=(T===16||T===24)&&M>=64&&M<=95;if(!(V||z))return!1;if(R(T,M,A))return h(null,null,A),!0;var W=T<=23?1:2;M>=64&&M<=95?L=W===1?p[T]:t[T]:L=W===1?d[T]:l[T];var G=this.channels[W];return G?(G.setPAC(this.interpretPAC(L,M)),h(T,M,A),this.currentChannel=W,!0):!1},x.interpretPAC=function(T,M){var L,A={color:null,italics:!1,indent:null,underline:!1,row:T};return M>95?L=M-96:L=M-64,A.underline=(L&1)===1,L<=13?A.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(L/2)]:L<=15?(A.italics=!0,A.color="white"):A.indent=Math.floor((L-16)/2)*4,A},x.parseChars=function(T,M){var L,A=null,V=null;if(T>=25?(L=2,V=T-8):(L=1,V=T),V>=17&&V<=19){var z;V===17?z=M+80:V===18?z=M+112:z=M+144,this.logger.log(i.INFO,"Special char '"+m(z)+"' in channel "+L),A=[z]}else T>=32&&T<=127&&(A=M===0?[T]:[T,M]);if(A){var W=s(A);this.logger.log(i.DEBUG,"Char codes = "+W.join(",")),h(T,M,this.cmdHistory)}return A},x.parseBackgroundAttributes=function(T,M){var L=(T===16||T===24)&&M>=32&&M<=47,A=(T===23||T===31)&&M>=45&&M<=47;if(!(L||A))return!1;var V,z={};T===16||T===24?(V=Math.floor((M-32)/2),z.background=r[V],M%2===1&&(z.background=z.background+"_semi")):M===45?z.background="transparent":(z.foreground="black",M===47&&(z.underline=!0));var W=T<=23?1:2,G=this.channels[W];return G.setBkgData(z),h(T,M,this.cmdHistory),!0},x.reset=function(){for(var T=0;T=16?a--:a++;var h=Object(k.fixLineBreaks)(u.trim()),R=Object(y.generateCueId)(t,l,h);(!d||!d.cues||!d.cues.getCueById(R))&&(s=new f(t,l,h),s.id=R,s.line=w+1,s.align="left",s.position=10+Math.min(80,Math.floor(a*8/32)*10),i.push(s))}return d&&i.length&&(i.sort(function(O,g){return O.line==="auto"||g.line==="auto"?0:O.line>8&&g.line>8?g.line-O.line:O.line-g.line}),i.forEach(function(O){return Object(m.addCueToTrack)(d,O)})),i}};v.default=b},"./src/utils/discontinuities.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"findFirstFragWithCC",function(){return S}),C.d(v,"shouldAlignOnDiscontinuities",function(){return b}),C.d(v,"findDiscontinuousReferenceFrag",function(){return p}),C.d(v,"adjustSlidingStart",function(){return t}),C.d(v,"alignStream",function(){return l}),C.d(v,"alignPDT",function(){return i}),C.d(v,"alignFragmentByPDTDelta",function(){return o}),C.d(v,"alignMediaPlaylistByPDT",function(){return s});var k=C("./src/polyfills/number.ts"),y=C("./src/utils/logger.ts"),m=C("./src/controller/level-helper.ts");function S(c,a){for(var u=null,f=0,w=c.length;fu.startCC||c&&c.cc=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},m}();v.default=y},"./src/utils/ewma.ts":function(N,v,C){"use strict";C.r(v);var k=function(){function y(S,b,p){b===void 0&&(b=0),p===void 0&&(p=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=S,this.alpha_=S?Math.exp(Math.log(.5)/S):0,this.estimate_=b,this.totalWeight_=p}var m=y.prototype;return m.sample=function(b,p){var d=Math.pow(this.alpha_,b);this.estimate_=p*(1-d)+d*this.estimate_,this.totalWeight_+=b},m.getTotalWeight=function(){return this.totalWeight_},m.getEstimate=function(){if(this.alpha_){var b=1-Math.pow(this.alpha_,this.totalWeight_);if(b)return this.estimate_/b}return this.estimate_},y}();v.default=k},"./src/utils/fetch-loader.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"fetchSupported",function(){return o});var k=C("./src/polyfills/number.ts"),y=C("./src/loader/load-stats.ts"),m=C("./src/demux/chunk-cache.ts");function S(f,w){f.prototype=Object.create(w.prototype),f.prototype.constructor=f,l(f,w)}function b(f){var w=typeof Map=="function"?new Map:void 0;return b=function(h){if(h===null||!t(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof w!="undefined"){if(w.has(h))return w.get(h);w.set(h,R)}function R(){return p(h,arguments,r(this).constructor)}return R.prototype=Object.create(h.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),l(R,h)},b(f)}function p(f,w,_){return d()?p=Reflect.construct:p=function(R,O,g){var x=[null];x.push.apply(x,O);var E=Function.bind.apply(R,x),T=new E;return g&&l(T,g.prototype),T},p.apply(null,arguments)}function d(){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(f){return!1}}function t(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function l(f,w){return l=Object.setPrototypeOf||function(h,R){return h.__proto__=R,h},l(f,w)}function r(f){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},r(f)}function i(){return i=Object.assign||function(f){for(var w=1;w=g&&x(R,O,E.flush(),h)):x(R,O,V,h),L()}).catch(function(){return Promise.reject()})};return M()},f}();function c(f,w){var _={method:"GET",mode:"cors",credentials:"same-origin",signal:w,headers:new self.Headers(i({},f.headers))};return f.rangeEnd&&_.headers.set("Range","bytes="+f.rangeStart+"-"+String(f.rangeEnd-1)),_}function a(f,w){return new self.Request(f.url,w)}var u=function(f){S(w,f);function w(_,h,R){var O;return O=f.call(this,_)||this,O.code=void 0,O.details=void 0,O.code=h,O.details=R,O}return w}(b(Error));v.default=s},"./src/utils/imsc1-ttml-parser.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"IMSC1_CODEC",function(){return t}),C.d(v,"parseIMSC1",function(){return o});var k=C("./src/utils/mp4-tools.ts"),y=C("./src/utils/vttparser.ts"),m=C("./src/utils/vttcue.ts"),S=C("./src/demux/id3.ts"),b=C("./src/utils/timescale-conversion.ts"),p=C("./src/utils/webvtt-parser.ts");function d(){return d=Object.assign||function(g){for(var x=1;x"):k}function b(t){for(var l=arguments.length,r=new Array(l>1?l-1:0),i=1;i>24,w[_+1]=h>>16&255,w[_+2]=h>>8&255,w[_+3]=h&255}function l(w,_){var h=[];if(!_.length)return h;var R,O,g;"data"in w?(R=w.data,O=w.start,g=w.end):(R=w,O=0,g=R.byteLength);for(var x=O;x1?x+E:g;if(T===_[0])if(_.length===1)h.push({data:R,start:x+8,end:M});else{var L=l({data:R,start:x+8,end:M},_.slice(1));L.length&&S.apply(h,L)}x=M}return h}function r(w){var _=l(w,["moov"]),h=_[0],R=h?h.end:null,O=l(w,["sidx"]);if(!O||!O[0])return null;var g=[],x=O[0],E=x.data[0],T=E===0?8:16,M=d(x,T);T+=4;var L=0,A=0;E===0?T+=8:T+=16,T+=2;var V=x.end+A,z=p(x,T);T+=2;for(var W=0;W>>31;if(H===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var $=d(x,G);G+=4,g.push({referenceSize:P,subsegmentDuration:$,info:{duration:$/M,start:V,end:V+P-1}}),V+=P,G+=4,T=G}return{earliestPresentationTime:L,timescale:M,version:E,referencesCount:z,references:g,moovEndOffset:R}}function i(w){for(var _=[],h=l(w,["moov","trak"]),R=0;Rb)&&(this.startTime=b),this.endTime=p,this.screen=d,this.timelineController.createCaptionsTrack(this.trackName)},m.reset=function(){this.cueRanges=[]},y}()},"./src/utils/texttrack-utils.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"sendAddTrackEvent",function(){return y}),C.d(v,"addCueToTrack",function(){return m}),C.d(v,"clearCurrentCues",function(){return S}),C.d(v,"removeCuesInRange",function(){return b}),C.d(v,"getCuesInRange",function(){return d});var k=C("./src/utils/logger.ts");function y(t,l){var r;try{r=new Event("addtrack")}catch(i){r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=t,l.dispatchEvent(r)}function m(t,l){var r=t.mode;if(r==="disabled"&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(l.id))try{if(t.addCue(l),!t.cues.getCueById(l.id))throw new Error("addCue is failed for: "+l)}catch(o){k.logger.debug("[texttrack-utils]: "+o);var i=new self.TextTrackCue(l.startTime,l.endTime,l.text);i.id=l.id,t.addCue(i)}r==="disabled"&&(t.mode=r)}function S(t){var l=t.mode;if(l==="disabled"&&(t.mode="hidden"),t.cues)for(var r=t.cues.length;r--;)t.removeCue(t.cues[r]);l==="disabled"&&(t.mode=l)}function b(t,l,r){var i=t.mode;if(i==="disabled"&&(t.mode="hidden"),t.cues&&t.cues.length>0)for(var o=d(t.cues,l,r),s=0;st[r].endTime)return-1;for(var i=0,o=r;i<=o;){var s=Math.floor((o+i)/2);if(lt[s].startTime&&i-1)for(var s=o,c=t.length;s=l&&a.endTime<=r)i.push(a);else if(a.startTime>r)return i}return i}},"./src/utils/time-ranges.ts":function(N,v,C){"use strict";C.r(v);var k={toString:function(m){for(var S="",b=m.length,p=0;p1?l-1:0),i=1;i100)throw new Error("Position must be between 0 and 100.");g=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"positionAlign",p({},o,{get:function(){return x},set:function(L){var A=b(L);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");x=A,this.hasBeenReset=!0}})),Object.defineProperty(i,"size",p({},o,{get:function(){return E},set:function(L){if(L<0||L>100)throw new Error("Size must be between 0 and 100.");E=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"align",p({},o,{get:function(){return T},set:function(L){var A=b(L);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");T=A,this.hasBeenReset=!0}})),i.displayState=void 0}return d.prototype.getCueAsHTML=function(){var t=self.WebVTT;return t.convertCueToDOMTree(self,this.text)},d}()},"./src/utils/vttparser.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"parseTimeStamp",function(){return m}),C.d(v,"fixLineBreaks",function(){return l}),C.d(v,"VTTParser",function(){return r});var k=C("./src/utils/vttcue.ts"),y=function(){function i(){}var o=i.prototype;return o.decode=function(c,a){if(!c)return"";if(typeof c!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(c))},i}();function m(i){function o(c,a,u,f){return(c|0)*3600+(a|0)*60+(u|0)+parseFloat(f||0)}var s=i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return s?parseFloat(s[2])>59?o(s[2],s[3],0,s[4]):o(s[1],s[2],s[3],s[4]):null}var S=function(){function i(){this.values=Object.create(null)}var o=i.prototype;return o.set=function(c,a){!this.get(c)&&a!==""&&(this.values[c]=a)},o.get=function(c,a,u){return u?this.has(c)?this.values[c]:a[u]:this.has(c)?this.values[c]:a},o.has=function(c){return c in this.values},o.alt=function(c,a,u){for(var f=0;f=0&&u<=100)return this.set(c,u),!0}return!1},i}();function b(i,o,s,c){var a=c?i.split(c):[i];for(var u in a){if(typeof a[u]!="string")continue;var f=a[u].split(s);if(f.length!==2)continue;var w=f[0],_=f[1];o(w,_)}}var p=new k.default(0,0,""),d=p.align==="middle"?"middle":"center";function t(i,o,s){var c=i;function a(){var w=m(i);if(w===null)throw new Error("Malformed timestamp: "+c);return i=i.replace(/^[^\sa-zA-Z-]+/,""),w}function u(w,_){var h=new S;b(w,function(g,x){var E;switch(g){case"region":for(var T=s.length-1;T>=0;T--)if(s[T].id===x){h.set(g,s[T].region);break}break;case"vertical":h.alt(g,x,["rl","lr"]);break;case"line":E=x.split(","),h.integer(g,E[0]),h.percent(g,E[0])&&h.set("snapToLines",!1),h.alt(g,E[0],["auto"]),E.length===2&&h.alt("lineAlign",E[1],["start",d,"end"]);break;case"position":E=x.split(","),h.percent(g,E[0]),E.length===2&&h.alt("positionAlign",E[1],["start",d,"end","line-left","line-right","auto"]);break;case"size":h.percent(g,x);break;case"align":h.alt(g,x,["start",d,"end","left","right"]);break}},/:/,/\s/),_.region=h.get("region",null),_.vertical=h.get("vertical","");var R=h.get("line","auto");R==="auto"&&p.line===-1&&(R=-1),_.line=R,_.lineAlign=h.get("lineAlign","start"),_.snapToLines=h.get("snapToLines",!0),_.size=h.get("size",100),_.align=h.get("align",d);var O=h.get("position","auto");O==="auto"&&p.position===50&&(O=_.align==="start"||_.align==="left"?0:_.align==="end"||_.align==="right"?100:50),_.position=O}function f(){i=i.replace(/^\s+/,"")}if(f(),o.startTime=a(),f(),i.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+c);i=i.substr(3),f(),o.endTime=a(),f(),u(i,o)}function l(i){return i.replace(//gi,` `)}var r=function(){function i(){this.state="INITIAL",this.buffer="",this.decoder=new y,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=i.prototype;return o.parse=function(c){var a=this;c&&(a.buffer+=a.decoder.decode(c,{stream:!0}));function u(){var O=a.buffer,g=0;for(O=l(O);g")===-1){a.cue.id=w;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{t(w,a.cue,a.regionList)}catch(O){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var R=w.indexOf("-->")!==-1;if(!w||R&&(h=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=` `),a.cue.text+=w}continue;case"BADCUE":w||(a.state="ID")}}}catch(O){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},o.flush=function(){var c=this;try{if((c.cue||c.state==="HEADER")&&(c.buffer+=` `,c.parse()),c.state==="INITIAL"||c.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){c.onparsingerror&&c.onparsingerror(a)}return c.onflush&&c.onflush(),this},i}()},"./src/utils/webvtt-parser.ts":function(N,v,C){"use strict";C.r(v),C.d(v,"generateCueId",function(){return r}),C.d(v,"parseWebVTT",function(){return o});var k=C("./src/polyfills/number.ts"),y=C("./src/utils/vttparser.ts"),m=C("./src/demux/id3.ts"),S=C("./src/utils/timescale-conversion.ts"),b=C("./src/remux/mp4-remuxer.ts"),p=/\r\n|\n\r|\n|\r/g,d=function(c,a,u){return u===void 0&&(u=0),c.substr(u,a.length)===a},t=function(c){var a=parseInt(c.substr(-3)),u=parseInt(c.substr(-6,2)),f=parseInt(c.substr(-9,2)),w=c.length>9?parseInt(c.substr(0,c.indexOf(":"))):0;if(!Object(k.isFiniteNumber)(a)||!Object(k.isFiniteNumber)(u)||!Object(k.isFiniteNumber)(f)||!Object(k.isFiniteNumber)(w))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+c);return a+=1e3*u,a+=60*1e3*f,a+=60*60*1e3*w,a},l=function(c){for(var a=5381,u=c.length;u;)a=a*33^c.charCodeAt(--u);return(a>>>0).toString()};function r(s,c,a){return l(s.toString())+l(c.toString())+l(a)}var i=function(c,a,u){var f=c[a],w=c[f.prevCC];if(!w||!w.new&&f.new){c.ccOffset=c.presentationOffset=f.start,f.new=!1;return}for(;(_=w)!==null&&_!==void 0&&_.new;){var _;c.ccOffset+=f.start-w.start,f.new=!1,f=w,w=c[f.prevCC]}c.presentationOffset=u};function o(s,c,a,u,f,w,_,h){var R=new y.VTTParser,O=Object(m.utf8ArrayToStr)(new Uint8Array(s)).trim().replace(p,` `).split(` `),g=[],x=Object(S.toMpegTsClockFromTimescale)(c,a),E="00:00.000",T=0,M=0,L,A=!0,V=!1;R.oncue=function(z){var W=u[f],G=u.ccOffset,U=(T-x)/9e4;if(W!=null&&W.new&&(M!==void 0?G=u.ccOffset=W.start:i(u,f,U)),U&&(G=U-u.presentationOffset),V){var P=z.endTime-z.startTime,H=Object(b.normalizePts)((z.startTime+G-M)*9e4,w*9e4)/9e4;z.startTime=H,z.endTime=H+P}var $=z.text.trim();z.text=decodeURIComponent(encodeURIComponent($)),z.id||(z.id=r(z.startTime,z.endTime,$)),z.endTime>0&&g.push(z)},R.onparsingerror=function(z){L=z},R.onflush=function(){if(L){h(L);return}_(g)},O.forEach(function(z){if(A)if(d(z,"X-TIMESTAMP-MAP=")){A=!1,V=!0,z.substr(16).split(",").forEach(function(W){d(W,"LOCAL:")?E=W.substr(6):d(W,"MPEGTS:")&&(T=parseInt(W.substr(7)))});try{M=t(E)/1e3}catch(W){V=!1,L=W}return}else z===""&&(A=!1);R.parse(z+` `)}),R.flush()}},"./src/utils/xhr-loader.ts":function(N,v,C){"use strict";C.r(v);var k=C("./src/utils/logger.ts"),y=C("./src/loader/load-stats.ts"),m=/^age:\s*[\d.]+\s*$/m,S=function(){function b(d){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=d?d.xhrSetup:null,this.stats=new y.LoadStats,this.retryDelay=0}var p=b.prototype;return p.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},p.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,t.readyState!==4&&(this.stats.aborted=!0,t.abort()))},p.abort=function(){var t;this.abortInternal(),(t=this.callbacks)!==null&&t!==void 0&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},p.load=function(t,l,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=l,this.callbacks=r,this.retryDelay=l.retryDelay,this.loadInternal()},p.loadInternal=function(){var t=this.config,l=this.context;if(!t)return;var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var o=this.xhrSetup;try{if(o)try{o(r,l.url)}catch(a){r.open("GET",l.url,!0),o(r,l.url)}r.readyState||r.open("GET",l.url,!0);var s=this.context.headers;if(s)for(var c in s)r.setRequestHeader(c,s[c])}catch(a){this.callbacks.onError({code:r.status,text:a.message},l,r);return}l.rangeEnd&&r.setRequestHeader("Range","bytes="+l.rangeStart+"-"+(l.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=l.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),r.send()},p.readystatechange=function(){var t=this.context,l=this.loader,r=this.stats;if(!t||!l)return;var i=l.readyState,o=this.config;if(r.aborted)return;if(i>=2)if(self.clearTimeout(this.requestTimeout),r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),i===4){l.onreadystatechange=null,l.onprogress=null;var s=l.status;if(s>=200&&s<300){r.loading.end=Math.max(self.performance.now(),r.loading.first);var c,a;if(t.responseType==="arraybuffer"?(c=l.response,a=c.byteLength):(c=l.responseText,a=c.length),r.loaded=r.total=a,!this.callbacks)return;var u=this.callbacks.onProgress;if(u&&u(r,t,c,l),!this.callbacks)return;var f={url:l.responseURL,data:c};this.callbacks.onSuccess(f,r,t,l)}else r.retry>=o.maxRetry||s>=400&&s<499?(k.logger.error(s+" while loading "+t.url),this.callbacks.onError({code:s,text:l.statusText},t,l)):(k.logger.warn(s+" while loading "+t.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,o.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)},p.loadtimeout=function(){k.logger.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},p.loadprogress=function(t){var l=this.stats;l.loaded=t.loaded,t.lengthComputable&&(l.total=t.total)},p.getCacheAge=function(){var t=null;if(this.loader&&m.test(this.loader.getAllResponseHeaders())){var l=this.loader.getResponseHeader("age");t=l?parseFloat(l):null}return t},b}();v.default=S}}).default})},vHTk:function(F,Q,j){F.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.StreamCipher,y=v.algo,m=y.RC4=k.extend({_doReset:function(){for(var p=this._key,d=p.words,t=p.sigBytes,l=this._S=[],r=0;r<256;r++)l[r]=r;for(var r=0,i=0;r<256;r++){var o=r%t,s=d[o>>>2]>>>24-o%4*8&255;i=(i+l[r]+s)%256;var c=l[r];l[r]=l[i],l[i]=c}this._i=this._j=0},_doProcessBlock:function(p,d){p[d]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var p=this._S,d=this._i,t=this._j,l=0,r=0;r<4;r++){d=(d+1)%256,t=(t+p[d])%256;var i=p[d];p[d]=p[t],p[t]=i,l|=p[(p[d]+p[t])%256]<<24-r*8}return this._i=d,this._j=t,l}v.RC4=k._createHelper(m);var b=y.RC4Drop=m.extend({cfg:m.cfg.extend({drop:192}),_doReset:function(){m._doReset.call(this);for(var p=this.cfg.drop;p>0;p--)S.call(this)}});v.RC4Drop=k._createHelper(b)}(),N.RC4})},wCXF:function(F,Q,j){"use strict";j.d(Q,"a",function(){return at});var N=j("rePB"),v=j("VTBJ"),C=j("KQm4"),k=j("U8pU"),y=j("ODXe"),m=j("cDcd"),S=j("TSYQ"),b=j.n(S),p=j("Gytx"),d=j.n(p),t=j("Kwbf"),l=j("t23M"),r=j("qx4F"),i=j("6eGT"),o=j("IBYe"),s=j("Ff2n"),c=j("c+Xe"),a=j("fyJ8"),u=j("biw7");function f(je,Ie,tt,ot,ze){var Ze=tt[je]||{},Ne=tt[Ie]||{},Ae,Me;Ze.fixed==="left"?Ae=ot.left[je]:Ne.fixed==="right"&&(Me=ot.right[Ie]);var Ee=!1,Ce=!1,ke=!1,Fe=!1,Be=tt[Ie+1],et=tt[je-1];if(ze==="rtl"){if(Ae!==void 0){var ct=et&&et.fixed==="left";Fe=!ct}else if(Me!==void 0){var yt=Be&&Be.fixed==="right";ke=!yt}}else if(Ae!==void 0){var ft=Be&&Be.fixed==="left";Ee=!ft}else if(Me!==void 0){var mt=et&&et.fixed==="right";Ce=!mt}return{fixLeft:Ae,fixRight:Me,lastFixLeft:Ee,firstFixRight:Ce,lastFixRight:ke,firstFixLeft:Fe,isSticky:ot.isSticky}}var w=j("sR1s");function _(je){var Ie=je.cells,tt=je.stickyOffsets,ot=je.flattenColumns,ze=je.rowComponent,Ze=je.cellComponent,Ne=je.onHeaderRow,Ae=je.index,Me=m.useContext(u.a),Ee=Me.prefixCls,Ce=Me.direction,ke;Ne&&(ke=Ne(Ie.map(function(Be){return Be.column}),Ae));var Fe=Object(w.a)(Ie.map(function(Be){return Be.column}));return m.createElement(ze,Object.assign({},ke),Ie.map(function(Be,et){var ct=Be.column,yt=f(Be.colStart,Be.colEnd,ot,tt,Ce),ft;return ct&&ct.onHeaderCell&&(ft=Be.column.onHeaderCell(ct)),m.createElement(a.a,Object.assign({},Be,{ellipsis:ct.ellipsis,align:ct.align,component:Ze,prefixCls:Ee,key:Fe[et]},yt,{additionalProps:ft,rowType:"header"}))}))}_.displayName="HeaderRow";var h=_;function R(je){var Ie=[];function tt(Ne,Ae){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[Me]=Ie[Me]||[];var Ee=Ae,Ce=Ne.filter(Boolean).map(function(ke){var Fe={key:ke.key,className:ke.className||"",children:ke.title,column:ke,colStart:Ee},Be=1,et=ke.children;return et&&et.length>0&&(Be=tt(et,Ee,Me+1).reduce(function(ct,yt){return ct+yt},0),Fe.hasSubColumns=!0),"colSpan"in ke&&(Be=ke.colSpan),"rowSpan"in ke&&(Fe.rowSpan=ke.rowSpan),Fe.colSpan=Be,Fe.colEnd=Fe.colStart+Be-1,Ie[Me].push(Fe),Ee+=Be,Be});return Ce}tt(je,0);for(var ot=Ie.length,ze=function(Ae){Ie[Ae].forEach(function(Me){!("rowSpan"in Me)&&!Me.hasSubColumns&&(Me.rowSpan=ot-Ae)})},Ze=0;Ze=0;Ae-=1){var Me=Ie[Ae],Ee=tt&&tt[Ae],Ce=Ee&&Ee[x.a];(Me||Ce||Ne)&&(ze.unshift(m.createElement("col",Object.assign({key:Ae,style:{width:Me,minWidth:Me}},Ce))),Ne=!0)}return m.createElement("colgroup",null,ze)}var T=E;function M(je,Ie){return Object(m.useMemo)(function(){for(var tt=[],ot=0;ot1?ee-1:0),ae=1;ae=ke&&(hr=ke-Fe),Ne({scrollLeft:hr/ke*(Ce+2)}),mt.current.x=dt.pageX},Wt=function(){var dt=Object(Z.b)(Ze.current).top,Et=dt+Ze.current.offsetHeight,jt=document.documentElement.scrollTop+window.innerHeight;Et-Object(r.a)()<=jt||dt>=jt-Ae?ft(function(kt){return Object(v.a)(Object(v.a)({},kt),{},{isHiddenScrollBar:!0})}):ft(function(kt){return Object(v.a)(Object(v.a)({},kt),{},{isHiddenScrollBar:!1})})},Lt=function(dt){ft(function(Et){return Object(v.a)(Object(v.a)({},Et),{},{scrollLeft:dt/Ce*ke||0})})};return m.useImperativeHandle(tt,function(){return{setScrollLeft:Lt}}),m.useEffect(function(){var nr=Object(Y.a)(document.body,"mouseup",Kt,!1),dt=Object(Y.a)(document.body,"mousemove",rr,!1);return Wt(),function(){nr.remove(),dt.remove()}},[Fe,_t]),m.useEffect(function(){var nr=Object(Y.a)(window,"scroll",Wt,!1),dt=Object(Y.a)(window,"resize",Wt,!1);return function(){nr.remove(),dt.remove()}},[]),m.useEffect(function(){yt.isHiddenScrollBar||ft(function(nr){var dt,Et;return Object(v.a)(Object(v.a)({},nr),{},{scrollLeft:Ze.current.scrollLeft/((dt=Ze.current)===null||dt===void 0?void 0:dt.scrollWidth)*((Et=Ze.current)===null||Et===void 0?void 0:Et.clientWidth)})})},[yt.isHiddenScrollBar]),Ce<=ke||!Fe||yt.isHiddenScrollBar?null:m.createElement("div",{style:{height:Object(r.a)(),width:ke,bottom:Ae},className:"".concat(Ee,"-sticky-scroll")},m.createElement("div",{onMouseDown:tr,ref:Be,className:b()("".concat(Ee,"-sticky-scroll-bar"),Object(N.a)({},"".concat(Ee,"-sticky-scroll-bar-active"),_t)),style:{width:"".concat(Fe,"px"),transform:"translate3d(".concat(yt.scrollLeft,"px, 0, 0)")}}))},be=m.forwardRef(ye);function Re(je,Ie){return m.useMemo(function(){var tt=!!je;return{isSticky:tt,stickyClassName:tt?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(k.a)(je)==="object"&&je.offsetHeader||0,offsetScroll:Object(k.a)(je)==="object"&&je.offsetScroll||0}},[je,Ie])}var Qe=[],rt={},at="rc-table-internal-hook",qe=m.memo(function(je){var Ie=je.children;return Ie},function(je,Ie){return d()(je.props,Ie.props)?je.pingLeft!==Ie.pingLeft||je.pingRight!==Ie.pingRight:!1});function st(je){var Ie,tt=je.prefixCls,ot=je.className,ze=je.rowClassName,Ze=je.style,Ne=je.data,Ae=je.rowKey,Me=je.scroll,Ee=je.tableLayout,Ce=je.direction,ke=je.title,Fe=je.footer,Be=je.summary,et=je.id,ct=je.showHeader,yt=je.components,ft=je.emptyText,mt=je.onRow,It=je.onHeaderRow,At=je.internalHooks,_t=je.transformColumns,Vt=je.internalRefs,Kt=je.sticky,tr=Ne||Qe,rr=!!tr.length,Wt=m.useState(0),Lt=Object(y.a)(Wt,2),nr=Lt[0],dt=Lt[1];m.useEffect(function(){dt(Object(r.a)())});var Et=m.useMemo(function(){return Object(w.c)(yt,{})},[yt]),jt=m.useCallback(function(Xr,Mr){return Object(w.b)(Et,Xr)||Mr},[Et]),kt=m.useMemo(function(){return typeof Ae=="function"?Ae:function(Xr){var Mr=Xr&&Xr[Ae];return Mr}},[Ae]),hr=Object(x.c)(je),Nn=hr.expandIcon,Ct=hr.expandedRowKeys,Dt=hr.defaultExpandedRowKeys,wt=hr.defaultExpandAllRows,wr=hr.expandedRowRender,Cr=hr.onExpand,Jt=hr.onExpandedRowsChange,Ut=hr.expandRowByClick,Or=hr.rowExpandable,un=hr.expandIconColumnIndex,Nr=hr.expandedRowClassName,bt=hr.childrenColumnName,Bt=hr.indentSize,Jr=Nn||oe,on=bt||"children",Ln=m.useMemo(function(){return wr?"row":je.expandable&&At===at&&je.expandable.__PARENT_RENDER_ICON__||tr.some(function(Xr){return Xr&&Object(k.a)(Xr)==="object"&&Xr[on]})?"nest":!1},[!!wr,tr]),Sn=m.useState(function(){return Dt||(wt?q(tr,kt,on):[])}),le=Object(y.a)(Sn,2),K=le[0],X=le[1],ee=m.useMemo(function(){return new Set(Ct||K||[])},[Ct,K]),me=m.useCallback(function(Xr){var Mr=kt(Xr,tr.indexOf(Xr)),Rr,hi=ee.has(Mr);hi?(ee.delete(Mr),Rr=Object(C.a)(ee)):Rr=[].concat(Object(C.a)(ee),[Mr]),X(Rr),Cr&&Cr(!hi,Xr),Jt&&Jt(Rr)},[kt,ee,tr,Cr,Jt]),ae=m.useState(0),Ke=Object(y.a)(ae,2),pt=Ke[0],Ot=Ke[1],Ht=Object(de.b)(Object(v.a)(Object(v.a)(Object(v.a)({},je),hr),{},{expandable:!!wr,expandedKeys:ee,getRowKey:kt,onTriggerExpand:me,expandIcon:Jr,expandIconColumnIndex:un,direction:Ce}),At===at?_t:null),vt=Object(y.a)(Ht,2),Xt=vt[0],qt=vt[1],Hr=m.useMemo(function(){return{columns:Xt,flattenColumns:qt}},[Xt,qt]),nn=m.useRef(),zr=m.useRef(),or=m.useRef(),Qr=m.useState(!1),Cn=Object(y.a)(Qr,2),zt=Cn[0],pr=Cn[1],fr=m.useState(!1),jr=Object(y.a)(fr,2),Er=jr[0],li=jr[1],On=he(new Map),Ui=Object(y.a)(On,2),Bi=Ui[0],qn=Ui[1],sn=Object(w.a)(qt),Si=sn.map(function(Xr){return Bi.get(Xr)}),dn=m.useMemo(function(){return Si},[Si.join("_")]),Yn=Se(dn,qt.length,Ce),Zr=Me&&Object(w.d)(Me.y),cr=Me&&Object(w.d)(Me.x),tn=cr&&qt.some(function(Xr){var Mr=Xr.fixed;return Mr}),br=m.useRef(),hn=Re(Kt,tt),Fr=hn.isSticky,mi=hn.offsetHeader,_n=hn.offsetScroll,Un=hn.stickyClassName,Di,ui,bi;Zr&&(ui={overflowY:"scroll",maxHeight:Me.y}),cr&&(Di={overflowX:"auto"},Zr||(ui={overflowY:"hidden"}),bi={width:Me.x===!0?"auto":Me.x,minWidth:"100%"});var ei=m.useCallback(function(Xr,Mr){qn(function(Rr){var hi=new Map(Rr);return hi.set(Xr,Mr),hi})},[]),ti=ue(null),ji=Object(y.a)(ti,2),ci=ji[0],_i=ji[1];function Hi(Xr,Mr){if(!Mr)return;typeof Mr=="function"?Mr(Xr):Mr.scrollLeft!==Xr&&(Mr.scrollLeft=Xr)}var di=function(Mr){var Rr=Mr.currentTarget,hi=Mr.scrollLeft,Xi=typeof hi=="number"?hi:Rr.scrollLeft,Yi=Rr||rt;if(!_i()||_i()===Yi){var lr;ci(Yi),Hi(Xi,zr.current),Hi(Xi,or.current),Hi(Xi,(lr=br.current)===null||lr===void 0?void 0:lr.setScrollLeft)}if(Rr){var Ft=Rr.scrollWidth,mr=Rr.clientWidth;pr(Xi>0),li(Xi0?[].concat(Object(v.a)(s),Object(v.a)(t(f).map(function(w){return Object(C.a)({fixed:u},w)}))):[].concat(Object(v.a)(s),[Object(C.a)(Object(C.a)({},c),{},{fixed:u})])},[])}function l(o){for(var s=!0,c=0;c=0;f-=1){var w=o[f];if(u&&w.fixed!=="right")u=!1;else if(!u&&w.fixed==="right"){Object(S.a)(!1,"Index ".concat(f+1," of `columns` missing `fixed='right'` prop."));break}}}function r(o){return o.map(function(s){var c=s.fixed,a=Object(k.a)(s,["fixed"]),u=c;return c==="left"?u="right":c==="right"&&(u="left"),Object(C.a)({fixed:u},a)})}function i(o,s){var c=o.prefixCls,a=o.columns,u=o.children,f=o.expandable,w=o.expandedKeys,_=o.getRowKey,h=o.onTriggerExpand,R=o.expandIcon,O=o.rowExpandable,g=o.expandIconColumnIndex,x=o.direction,E=o.expandRowByClick,T=y.useMemo(function(){return a||d(u)},[a,u]),M=y.useMemo(function(){if(f){var V,z=g||0,W=T[z],G=(V={},Object(N.a)(V,p.a,{className:"".concat(c,"-expand-icon-col")}),Object(N.a)(V,"title",""),Object(N.a)(V,"fixed",W?W.fixed:null),Object(N.a)(V,"className","".concat(c,"-row-expand-icon-cell")),Object(N.a)(V,"render",function(H,$,re){var te=_($,re),ge=w.has(te),ve=O?O($):!0,de=R({prefixCls:c,expanded:ge,expandable:ve,record:$,onExpand:h});return E?y.createElement("span",{onClick:function(Te){return Te.stopPropagation()}},de):de}),V),U=T.slice();return z>=0&&U.splice(z,0,G),U}return T},[f,T,_,w,R,x]),L=y.useMemo(function(){var V=M;return s&&(V=s(V)),V.length||(V=[{render:function(){return null}}]),V},[s,M,x]),A=y.useMemo(function(){return x==="rtl"?r(t(L)):t(L)},[L,x]);return[L,A]}Q.b=i},wZgz:function(F,Q,j){(function(N,v,C){F.exports=Q=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.BlockCipher,y=v.algo,m=[],S=[],b=[],p=[],d=[],t=[],l=[],r=[],i=[],o=[];(function(){for(var a=[],u=0;u<256;u++)u<128?a[u]=u<<1:a[u]=u<<1^283;for(var f=0,w=0,u=0;u<256;u++){var _=w^w<<1^w<<2^w<<3^w<<4;_=_>>>8^_&255^99,m[f]=_,S[_]=f;var h=a[f],R=a[h],O=a[R],g=a[_]*257^_*16843008;b[f]=g<<24|g>>>8,p[f]=g<<16|g>>>16,d[f]=g<<8|g>>>24,t[f]=g;var g=O*16843009^R*65537^h*257^f*16843008;l[_]=g<<24|g>>>8,r[_]=g<<16|g>>>16,i[_]=g<<8|g>>>24,o[_]=g,f?(f=h^a[a[a[O^h]]],w^=a[a[w]]):f=w=1}})();var s=[0,1,2,4,8,16,32,64,128,27,54],c=y.AES=k.extend({_doReset:function(){var a;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var u=this._keyPriorReset=this._key,f=u.words,w=u.sigBytes/4,_=this._nRounds=w+6,h=(_+1)*4,R=this._keySchedule=[],O=0;O6&&O%w==4&&(a=m[a>>>24]<<24|m[a>>>16&255]<<16|m[a>>>8&255]<<8|m[a&255]):(a=a<<8|a>>>24,a=m[a>>>24]<<24|m[a>>>16&255]<<16|m[a>>>8&255]<<8|m[a&255],a^=s[O/w|0]<<24),R[O]=R[O-w]^a);for(var g=this._invKeySchedule=[],x=0;x>>24]]^r[m[a>>>16&255]]^i[m[a>>>8&255]]^o[m[a&255]]}},encryptBlock:function(a,u){this._doCryptBlock(a,u,this._keySchedule,b,p,d,t,m)},decryptBlock:function(a,u){var f=a[u+1];a[u+1]=a[u+3],a[u+3]=f,this._doCryptBlock(a,u,this._invKeySchedule,l,r,i,o,S);var f=a[u+1];a[u+1]=a[u+3],a[u+3]=f},_doCryptBlock:function(a,u,f,w,_,h,R,O){for(var g=this._nRounds,x=a[u]^f[0],E=a[u+1]^f[1],T=a[u+2]^f[2],M=a[u+3]^f[3],L=4,A=1;A>>24]^_[E>>>16&255]^h[T>>>8&255]^R[M&255]^f[L++],z=w[E>>>24]^_[T>>>16&255]^h[M>>>8&255]^R[x&255]^f[L++],W=w[T>>>24]^_[M>>>16&255]^h[x>>>8&255]^R[E&255]^f[L++],G=w[M>>>24]^_[x>>>16&255]^h[E>>>8&255]^R[T&255]^f[L++];x=V,E=z,T=W,M=G}var V=(O[x>>>24]<<24|O[E>>>16&255]<<16|O[T>>>8&255]<<8|O[M&255])^f[L++],z=(O[E>>>24]<<24|O[T>>>16&255]<<16|O[M>>>8&255]<<8|O[x&255])^f[L++],W=(O[T>>>24]<<24|O[M>>>16&255]<<16|O[x>>>8&255]<<8|O[E&255])^f[L++],G=(O[M>>>24]<<24|O[x>>>16&255]<<16|O[E>>>8&255]<<8|O[T&255])^f[L++];a[u]=V,a[u+1]=z,a[u+2]=W,a[u+3]=G},keySize:256/32});v.AES=k._createHelper(c)}(),N.AES})},wbyO:function(F,Q,j){(function(N,v){F.exports=Q=v(j("Ib8C"))})(this,function(N){return function(){var v=N,C=v.lib,k=C.WordArray,y=v.enc,m=y.Base64url={stringify:function(b,p=!0){var d=b.words,t=b.sigBytes,l=p?this._safe_map:this._map;b.clamp();for(var r=[],i=0;i>>2]>>>24-i%4*8&255,s=d[i+1>>>2]>>>24-(i+1)%4*8&255,c=d[i+2>>>2]>>>24-(i+2)%4*8&255,a=o<<16|s<<8|c,u=0;u<4&&i+u*.75>>6*(3-u)&63));var f=l.charAt(64);if(f)for(;r.length%4;)r.push(f);return r.join("")},parse:function(b,p=!0){var d=b.length,t=p?this._safe_map:this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var r=0;r>>6-r%4*2,s=i|o;t[l>>>2]|=s<<24-l%4*8,l++}return k.create(t,l)}}(),N.enc.Base64url})},"y0+3":function(F,Q,j){"use strict";j.d(Q,"a",function(){return t}),j.d(Q,"b",function(){return r});var N=/margin|padding|width|height|max|min|offset/,v={left:!0,top:!0},C={cssFloat:1,styleFloat:1,float:1};function k(i){return i.nodeType===1?i.ownerDocument.defaultView.getComputedStyle(i,null):{}}function y(i,o,s){if(o=o.toLowerCase(),s==="auto"){if(o==="height")return i.offsetHeight;if(o==="width")return i.offsetWidth}return o in v||(v[o]=N.test(o)),v[o]?parseFloat(s)||0:s}function m(i,o){var s=arguments.length,c=k(i);return o=C[o]?"cssFloat"in i.style?"cssFloat":"styleFloat":o,s===1?c:y(i,o,c[o]||i.style[o])}function S(i,o,s){var c=arguments.length;if(o=C[o]?"cssFloat"in i.style?"cssFloat":"styleFloat":o,c===3)return typeof s=="number"&&N.test(o)&&(s="".concat(s,"px")),i.style[o]=s,s;for(var a in o)o.hasOwnProperty(a)&&S(i,a,o[a]);return k(i)}function b(i){return i===document.body?document.documentElement.clientWidth:i.offsetWidth}function p(i){return i===document.body?window.innerHeight||document.documentElement.clientHeight:i.offsetHeight}function d(){var i=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:i,height:o}}function t(){var i=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:i,height:o}}function l(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function r(i){var o=i.getBoundingClientRect(),s=document.documentElement;return{left:o.left+(window.pageXOffset||s.scrollLeft)-(s.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||s.scrollTop)-(s.clientTop||document.body.clientTop||0)}}},ynwM:function(F,Q,j){var N=j("MFOe"),v=N.Global;F.exports={name:"oldFF-globalStorage",read:k,write:y,each:m,remove:S,clearAll:b};var C=v.globalStorage;function k(p){return C[p]}function y(p,d){C[p]=d}function m(p){for(var d=C.length-1;d>=0;d--){var t=C.key(d);p(C[t],t)}}function S(p){return C.removeItem(p)}function b(){m(function(p,d){delete C[p]})}}}]);