(window.webpackJsonp=window.webpackJsonp||[]).push([[134,5,6,7,8,13,20],{"+NIl":function(F,q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";N.defineMode("stex",function(g,O){"use strict";function M(a,o){a.cmdState.push(o)}function m(a){return a.cmdState.length>0?a.cmdState[a.cmdState.length-1]:null}function y(a){var o=a.cmdState.pop();o&&o.closeBracket()}function T(a){for(var o=a.cmdState,u=o.length-1;u>=0;u--){var h=o[u];if(h.name=="DEFAULT")continue;return h}return{styleIdentifier:function(){return null}}}function b(a,o,u){return function(){this.name=a,this.bracketNo=0,this.style=o,this.styles=u,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(a,o){a.f=o}function n(a,o){var u;if(a.match(/^\\[a-zA-Z@]+/)){var h=a.current().slice(1);return u=p.hasOwnProperty(h)?p[h]:p.DEFAULT,u=new u,M(o,u),d(o,r),u.style}if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/\\]/))return"tag";if(a.match("\\["))return d(o,function(l,t){return c(l,t,"\\]")}),"keyword";if(a.match("\\("))return d(o,function(l,t){return c(l,t,"\\)")}),"keyword";if(a.match("$$"))return d(o,function(l,t){return c(l,t,"$$")}),"keyword";if(a.match("$"))return d(o,function(l,t){return c(l,t,"$")}),"keyword";var s=a.next();if(s=="%")return a.skipToEnd(),"comment";if(s=="}"||s=="]"){if(u=m(o),u)u.closeBracket(s),d(o,r);else return"error";return"bracket"}else return s=="{"||s=="["?(u=p.DEFAULT,u=new u,M(o,u),"bracket"):/\d/.test(s)?(a.eatWhile(/[\w.%]/),"atom"):(a.eatWhile(/[\w\-_]/),u=T(o),u.name=="begin"&&(u.argument=a.current()),u.styleIdentifier())}function c(a,o,u){if(a.eatSpace())return null;if(u&&a.match(u))return d(o,n),"keyword";if(a.match(/^\\[a-zA-Z@]+/))return"tag";if(a.match(/^[a-zA-Z]+/))return"variable-2";if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/]/))return"tag";if(a.match(/^[\^_&]/))return"tag";if(a.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(a.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var h=a.next();return h=="{"||h=="}"||h=="["||h=="]"||h=="("||h==")"?"bracket":h=="%"?(a.skipToEnd(),"comment"):"error"}function r(a,o){var u=a.peek(),h;return u=="{"||u=="["?(h=m(o),h.openBracket(u),a.eat(u),d(o,n),"bracket"):/[ \t\r]/.test(u)?(a.eat(u),null):(d(o,n),y(o),n(a,o))}return{startState:function(){var a=O.inMathMode?function(o,u){return c(o,u)}:n;return{cmdState:[],f:a}},copyState:function(a){return{cmdState:a.cmdState.slice(),f:a.f}},token:function(a,o){return o.f(a,o)},blankLine:function(a){a.f=n,a.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 n=d&&d!=N.Init;if(p&&!n)b.on("blur",m),b.on("change",y),b.on("swapDoc",y),N.on(b.getInputField(),"compositionupdate",b.state.placeholderCompose=function(){M(b)}),y(b);else if(!p&&n){b.off("blur",m),b.off("change",y),b.off("swapDoc",y),N.off(b.getInputField(),"compositionupdate",b.state.placeholderCompose),g(b);var c=b.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}p&&!b.hasFocus()&&m(b)});function g(b){b.state.placeholder&&(b.state.placeholder.parentNode.removeChild(b.state.placeholder),b.state.placeholder=null)}function O(b){g(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 M(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?O(b):g(b)},20)}function m(b){T(b)&&O(b)}function y(b){var p=b.getWrapperElement(),d=T(b);p.className=p.className.replace(" CodeMirror-empty","")+(d?" CodeMirror-empty":""),d?O(b):g(b)}function T(b){return b.lineCount()===1&&b.getLine(0)===""}})},"1ZF9":function(F,q,j){F.exports=j.p+"static/Authorize.cc9c212f.png"},"1eCo":function(F,q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";var g={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},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};N.defineMode("xml",function(M,m){var y=M.indentUnit,T={},b=m.htmlMode?g:O;for(var p in b)T[p]=b[p];for(var p in m)T[p]=m[p];var d,n;function c(w,k){function I(W){return k.tokenize=W,W(w,k)}var L=w.next();if(L=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?I(o("atom","]]>")):null:w.match("--")?I(o("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),I(u(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),k.tokenize=o("meta","?>"),"meta"):(d=w.eat("/")?"closeTag":"openTag",k.tokenize=r,"tag bracket");if(L=="&"){var V;return w.eat("#")?w.eat("x")?V=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):V=w.eatWhile(/[\d]/)&&w.eat(";"):V=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),V?"atom":"error"}else return w.eatWhile(/[^&<]/),null}c.isInText=!0;function r(w,k){var I=w.next();if(I==">"||I=="/"&&w.eat(">"))return k.tokenize=c,d=I==">"?"endTag":"selfcloseTag","tag bracket";if(I=="=")return d="equals",null;if(I=="<"){k.tokenize=c,k.state=t,k.tagName=k.tagStart=null;var L=k.tokenize(w,k);return L?L+" tag error":"tag error"}else return/[\'\"]/.test(I)?(k.tokenize=a(I),k.stringStartCol=w.column(),k.tokenize(w,k)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(w){var k=function(I,L){for(;!I.eol();)if(I.next()==w){L.tokenize=r;break}return"string"};return k.isInAttribute=!0,k}function o(w,k){return function(I,L){for(;!I.eol();){if(I.match(k)){L.tokenize=c;break}I.next()}return w}}function u(w){return function(k,I){for(var L;(L=k.next())!=null;){if(L=="<")return I.tokenize=u(w+1),I.tokenize(k,I);if(L==">")if(w==1){I.tokenize=c;break}else return I.tokenize=u(w-1),I.tokenize(k,I)}return"meta"}}function h(w,k,I){this.prev=w.context,this.tagName=k,this.indent=w.indented,this.startOfLine=I,(T.doNotIndent.hasOwnProperty(k)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function s(w){w.context&&(w.context=w.context.prev)}function l(w,k){for(var I;;){if(!w.context)return;if(I=w.context.tagName,!T.contextGrabbers.hasOwnProperty(I)||!T.contextGrabbers[I].hasOwnProperty(k))return;s(w)}}function t(w,k,I){return w=="openTag"?(I.tagStart=k.column(),S):w=="closeTag"?x:t}function S(w,k,I){return w=="word"?(I.tagName=k.current(),n="tag",C):T.allowMissingTagName&&w=="endTag"?(n="tag bracket",C(w,k,I)):(n="error",S)}function x(w,k,I){if(w=="word"){var L=k.current();return I.context&&I.context.tagName!=L&&T.implicitlyClosed.hasOwnProperty(I.context.tagName)&&s(I),I.context&&I.context.tagName==L||T.matchClosing===!1?(n="tag",f):(n="tag error",R)}else return T.allowMissingTagName&&w=="endTag"?(n="tag bracket",f(w,k,I)):(n="error",R)}function f(w,k,I){return w!="endTag"?(n="error",f):(s(I),t)}function R(w,k,I){return n="error",f(w,k,I)}function C(w,k,I){if(w=="word")return n="attribute",v;if(w=="endTag"||w=="selfcloseTag"){var L=I.tagName,V=I.tagStart;return I.tagName=I.tagStart=null,w=="selfcloseTag"||T.autoSelfClosers.hasOwnProperty(L)?l(I,L):(l(I,L),I.context=new h(I,L,V==I.indented)),t}return n="error",C}function v(w,k,I){return w=="equals"?_:(T.allowMissing||(n="error"),C(w,k,I))}function _(w,k,I){return w=="string"?E:w=="word"&&T.allowUnquoted?(n="string",C):(n="error",C(w,k,I))}function E(w,k,I){return w=="string"?E:C(w,k,I)}return{startState:function(w){var k={tokenize:c,state:t,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(k.baseIndent=w),k},token:function(w,k){if(!k.tagName&&w.sol()&&(k.indented=w.indentation()),w.eatSpace())return null;d=null;var I=k.tokenize(w,k);return(I||d)&&I!="comment"&&(n=null,k.state=k.state(d||I,w,k),n&&(I=n=="error"?I+" error":n)),I},indent:function(w,k,I){var L=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+y;if(L&&L.noIndent)return N.Pass;if(w.tokenize!=r&&w.tokenize!=c)return I?I.match(/^(\s*)/)[0].length:0;if(w.tagName)return T.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+y*(T.multilineTagIndentFactor||1);if(T.alignCDATA&&/$/,blockCommentStart:"",configuration:T.htmlMode?"html":"xml",helperType:T.htmlMode?"html":"xml",skipAttribute:function(w){w.state==_&&(w.state=C)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var k=[],I=w.context;I;I=I.prev)I.tagName&&k.push(I.tagName);return k.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,g,O){F.exports=q=g(j("Ib8C"),j("MlIO"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.Hasher,m=g.x64,y=m.Word,T=m.WordArray,b=g.algo;function p(){return y.create.apply(y,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)],n=[];(function(){for(var r=0;r<80;r++)n[r]=p()})();var c=b.SHA512=M.extend({_doReset:function(){this._hash=new T.init([new y.init(1779033703,4089235720),new y.init(3144134277,2227873595),new y.init(1013904242,4271175723),new y.init(2773480762,1595750129),new y.init(1359893119,2917565137),new y.init(2600822924,725511199),new y.init(528734635,4215389547),new y.init(1541459225,327033209)])},_doProcessBlock:function(r,a){for(var o=this._hash.words,u=o[0],h=o[1],s=o[2],l=o[3],t=o[4],S=o[5],x=o[6],f=o[7],R=u.high,C=u.low,v=h.high,_=h.low,E=s.high,w=s.low,k=l.high,I=l.low,L=t.high,V=t.low,W=S.high,H=S.low,G=x.high,B=x.low,P=f.high,z=f.low,J=R,ue=C,de=v,Se=_,Ae=E,pe=w,Oe=k,ye=I,ce=L,ae=V,re=W,fe=H,te=G,ne=B,Te=P,ie=z,Z=0;Z<80;Z++){var X,Q,_e=n[Z];if(Z<16)Q=_e.high=r[a+Z*2]|0,X=_e.low=r[a+Z*2+1]|0;else{var ve=n[Z-15],Re=ve.high,Je=ve.low,qe=(Re>>>1|Je<<31)^(Re>>>8|Je<<24)^Re>>>7,rt=(Je>>>1|Re<<31)^(Je>>>8|Re<<24)^(Je>>>7|Re<<25),ut=n[Z-2],dt=ut.high,ft=ut.low,Be=(dt>>>19|ft<<13)^(dt<<3|ft>>>29)^dt>>>6,Ie=(ft>>>19|dt<<13)^(ft<<3|dt>>>29)^(ft>>>6|dt<<26),at=n[Z-7],ct=at.high,$e=at.low,st=n[Z-16],Ue=st.high,Le=st.low;X=rt+$e,Q=qe+ct+(X>>>0>>0?1:0),X=X+Ie,Q=Q+Be+(X>>>0>>0?1:0),X=X+Le,Q=Q+Ue+(X>>>0>>0?1:0),_e.high=Q,_e.low=X}var Me=ce&re^~ce&te,Ee=ae&fe^~ae&ne,Ce=J&de^J&Ae^de&Ae,ke=ue&Se^ue&pe^Se&pe,Ne=(J>>>28|ue<<4)^(J<<30|ue>>>2)^(J<<25|ue>>>7),He=(ue>>>28|J<<4)^(ue<<30|J>>>2)^(ue<<25|J>>>7),tt=(ce>>>14|ae<<18)^(ce>>>18|ae<<14)^(ce<<23|ae>>>9),vt=(ae>>>14|ce<<18)^(ae>>>18|ce<<14)^(ae<<23|ce>>>9),yt=d[Z],Wt=yt.high,Ht=yt.low,cr=ie+vt,dr=Te+tt+(cr>>>0>>0?1:0),cr=cr+Ee,dr=dr+Me+(cr>>>0>>0?1:0),cr=cr+Ht,dr=dr+Wt+(cr>>>0>>0?1:0),cr=cr+X,dr=dr+Q+(cr>>>0>>0?1:0),St=He+ke,Kr=Ne+Ce+(St>>>0>>0?1:0);Te=te,ie=ne,te=re,ne=fe,re=ce,fe=ae,ae=ye+cr|0,ce=Oe+dr+(ae>>>0>>0?1:0)|0,Oe=Ae,ye=pe,Ae=de,pe=Se,de=J,Se=ue,ue=cr+St|0,J=dr+Kr+(ue>>>0>>0?1:0)|0}C=u.low=C+ue,u.high=R+J+(C>>>0>>0?1:0),_=h.low=_+Se,h.high=v+de+(_>>>0>>0?1:0),w=s.low=w+pe,s.high=E+Ae+(w>>>0>>0?1:0),I=l.low=I+ye,l.high=k+Oe+(I>>>0>>0?1:0),V=t.low=V+ae,t.high=L+ce+(V>>>0>>0?1:0),H=S.low=H+fe,S.high=W+re+(H>>>0>>0?1:0),B=x.low=B+ne,x.high=G+te+(B>>>0>>0?1:0),z=f.low=z+ie,f.high=P+Te+(z>>>0>>0?1:0)},_doFinalize:function(){var r=this._data,a=r.words,o=this._nDataBytes*8,u=r.sigBytes*8;a[u>>>5]|=128<<24-u%32,a[(u+128>>>10<<5)+30]=Math.floor(o/4294967296),a[(u+128>>>10<<5)+31]=o,r.sigBytes=a.length*4,this._process();var h=this._hash.toX32();return h},clone:function(){var r=M.clone.call(this);return r._hash=this._hash.clone(),r},blockSize:1024/32});g.SHA512=M._createHelper(c),g.HmacSHA512=M._createHmacHelper(c)}(),N.SHA512})},"3y9D":function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=O.Hasher,y=g.algo,T=[],b=y.SHA1=m.extend({_doReset:function(){this._hash=new M.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(p,d){for(var n=this._hash.words,c=n[0],r=n[1],a=n[2],o=n[3],u=n[4],h=0;h<80;h++){if(h<16)T[h]=p[d+h]|0;else{var s=T[h-3]^T[h-8]^T[h-14]^T[h-16];T[h]=s<<1|s>>>31}var l=(c<<5|c>>>27)+u+T[h];h<20?l+=(r&a|~r&o)+1518500249:h<40?l+=(r^a^o)+1859775393:h<60?l+=(r&a|r&o|a&o)-1894007588:l+=(r^a^o)-899497514,u=o,o=a,a=r<<30|r>>>2,r=c,c=l}n[0]=n[0]+c|0,n[1]=n[1]+r|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+u|0},_doFinalize:function(){var p=this._data,d=p.words,n=this._nDataBytes*8,c=p.sigBytes*8;return d[c>>>5]|=128<<24-c%32,d[(c+64>>>9<<4)+14]=Math.floor(n/4294967296),d[(c+64>>>9<<4)+15]=n,p.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var p=m.clone.call(this);return p._hash=this._hash.clone(),p}});g.SHA1=m._createHelper(b),g.HmacSHA1=m._createHmacHelper(b)}(),N.SHA1})},4:function(F,q){},"55Ip":function(F,q,j){"use strict";j.d(q,"a",function(){return l});var N=j("Ty5D"),g=j("dI71"),O=j("q1tI"),M=j.n(O),m=j("YS25"),y=j("17x9"),T=j.n(y),b=j("wx14"),p=j("zLVn"),d=j("9R94"),n=function(_){Object(g.a)(E,_);function E(){for(var k,I=arguments.length,L=new Array(I),V=0;V>>24)&16711935|(t<<24|t>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var x=h[l];x.high^=S,x.low^=t}for(var f=0;f<24;f++){for(var R=0;R<5;R++){for(var C=0,v=0,_=0;_<5;_++){var x=h[R+5*_];C^=x.high,v^=x.low}var E=r[R];E.high=C,E.low=v}for(var R=0;R<5;R++)for(var w=r[(R+4)%5],k=r[(R+1)%5],I=k.high,L=k.low,C=w.high^(I<<1|L>>>31),v=w.low^(L<<1|I>>>31),_=0;_<5;_++){var x=h[R+5*_];x.high^=C,x.low^=v}for(var V=1;V<25;V++){var C,v,x=h[V],W=x.high,H=x.low,G=d[V];G<32?(C=W<>>32-G,v=H<>>32-G):(C=H<>>64-G,v=W<>>64-G);var B=r[n[V]];B.high=C,B.low=v}var P=r[0],z=h[0];P.high=z.high,P.low=z.low;for(var R=0;R<5;R++)for(var _=0;_<5;_++){var V=R+5*_,x=h[V],J=r[V],ue=r[(R+1)%5+5*_],de=r[(R+2)%5+5*_];x.high=J.high^~ue.high&de.high,x.low=J.low^~ue.low&de.low}var x=h[0],Se=c[f];x.high^=Se.high,x.low^=Se.low}},_doFinalize:function(){var o=this._data,u=o.words,h=this._nDataBytes*8,s=o.sigBytes*8,l=this.blockSize*32;u[s>>>5]|=1<<24-s%32,u[(g.ceil((s+1)/l)*l>>>5)-1]|=128,o.sigBytes=u.length*4,this._process();for(var t=this._state,S=this.cfg.outputLength/8,x=S/8,f=[],R=0;R>>24)&16711935|(v<<24|v>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,f.push(_),f.push(v)}return new m.init(f,S)},clone:function(){for(var o=y.clone.call(this),u=o._state=this._state.slice(0),h=0;h<25;h++)u[h]=u[h].clone();return o}});O.SHA3=y._createHelper(a),O.HmacSHA3=y._createHmacHelper(a)}(Math),N.SHA3})},"6+eU":function(F,q,j){"use strict";j.d(q,"a",function(){return f});var N=j("wx14"),g=j("rePB"),O=j("VTBJ"),M=j("1OyB"),m=j("vuIU"),y=j("Ji7U"),T=j("LK+K"),b=j("q1tI"),p=j.n(b),d=j("TSYQ"),n=j.n(d),c=function(C){var v,_="".concat(C.rootPrefixCls,"-item"),E=n()(_,"".concat(_,"-").concat(C.page),(v={},Object(g.a)(v,"".concat(_,"-active"),C.active),Object(g.a)(v,C.className,!!C.className),Object(g.a)(v,"".concat(_,"-disabled"),!C.page),v)),w=function(){C.onClick(C.page)},k=function(L){C.onKeyPress(L,C.onClick,C.page)};return p.a.createElement("li",{title:C.showTitle?C.page:null,className:E,onClick:w,onKeyPress:k,tabIndex:"0"},C.itemRender(C.page,"page",p.a.createElement("a",{rel:"nofollow"},C.page)))},r=c,a={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(y.a)(v,R);var C=Object(T.a)(v);function v(){var _;Object(M.a)(this,v);for(var E=arguments.length,w=new Array(E),k=0;k=0||I.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;_.setState({goInputText:""}),W(_.getValidValue())},_.go=function(I){var L=_.state.goInputText;if(L==="")return;(I.keyCode===a.ENTER||I.type==="click")&&(_.setState({goInputText:""}),_.props.quickGo(_.getValidValue()))},_}return Object(m.a)(v,[{key:"getValidValue",value:function(){var E=this.state,w=E.goInputText,k=E.current;return!w||isNaN(w)?k:Number(w)}},{key:"getPageSizeOptions",value:function(){var E=this.props,w=E.pageSize,k=E.pageSizeOptions;return k.some(function(I){return I.toString()===w.toString()})?k:k.concat([w.toString()]).sort(function(I,L){var V=isNaN(Number(I))?0:Number(I),W=isNaN(Number(L))?0:Number(L);return V-W})}},{key:"render",value:function(){var E=this,w=this.props,k=w.pageSize,I=w.locale,L=w.rootPrefixCls,V=w.changeSize,W=w.quickGo,H=w.goButton,G=w.selectComponentClass,B=w.buildOptionText,P=w.selectPrefixCls,z=w.disabled,J=this.state.goInputText,ue="".concat(L,"-options"),de=G,Se=null,Ae=null,pe=null;if(!V&&!W)return null;var Oe=this.getPageSizeOptions();if(V&&de){var ye=Oe.map(function(ce,ae){return p.a.createElement(de.Option,{key:ae,value:ce.toString()},(B||E.buildOptionText)(ce))});Se=p.a.createElement(de,{disabled:z,prefixCls:P,showSearch:!1,className:"".concat(ue,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(k||Oe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ae){return ae.parentNode}},ye)}return W&&(H&&(pe=typeof H=="boolean"?p.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:z,className:"".concat(ue,"-quick-jumper-button")},I.jump_to_confirm):p.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),Ae=p.a.createElement("div",{className:"".concat(ue,"-quick-jumper")},I.jump_to,p.a.createElement("input",{disabled:z,type:"text",value:J,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),I.page,pe)),p.a.createElement("li",{className:"".concat(ue)},Se,Ae)}}]),v}(p.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var u=o,h=j("N2Kk");function s(){}function l(R){return typeof R=="number"&&isFinite(R)&&Math.floor(R)===R}function t(R,C,v){return v}function S(R,C,v){var _=typeof R=="undefined"?C.pageSize:R;return Math.floor((v.total-1)/_)+1}var x=function(R){Object(y.a)(v,R);var C=Object(T.a)(v);function v(_){var E;Object(M.a)(this,v),E=C.call(this,_),E.getJumpPrevPage=function(){return Math.max(1,E.state.current-(E.props.showLessItems?3:5))},E.getJumpNextPage=function(){return Math.min(S(void 0,E.state,E.props),E.state.current+(E.props.showLessItems?3:5))},E.getItemIcon=function(V,W){var H=E.props.prefixCls,G=V||p.a.createElement("button",{type:"button","aria-label":W,className:"".concat(H,"-item-link")});return typeof V=="function"&&(G=p.a.createElement(V,Object(O.a)({},E.props))),G},E.savePaginationNode=function(V){E.paginationNode=V},E.isValid=function(V){return l(V)&&V!==E.state.current},E.shouldDisplayQuickJumper=function(){var V=E.props,W=V.showQuickJumper,H=V.pageSize,G=V.total;return G<=H?!1:W},E.handleKeyDown=function(V){(V.keyCode===a.ARROW_UP||V.keyCode===a.ARROW_DOWN)&&V.preventDefault()},E.handleKeyUp=function(V){var W=E.getValidValue(V),H=E.state.currentInputValue;W!==H&&E.setState({currentInputValue:W}),V.keyCode===a.ENTER?E.handleChange(W):V.keyCode===a.ARROW_UP?E.handleChange(W-1):V.keyCode===a.ARROW_DOWN&&E.handleChange(W+1)},E.changePageSize=function(V){var W=E.state.current,H=S(V,E.state,E.props);W=W>H?H:W,H===0&&(W=E.state.current),typeof V=="number"&&("pageSize"in E.props||E.setState({pageSize:V}),"current"in E.props||E.setState({current:W,currentInputValue:W})),E.props.onShowSizeChange(W,V),"onChange"in E.props&&E.props.onChange&&E.props.onChange(W,V)},E.handleChange=function(V){var W=E.props.disabled,H=V;if(E.isValid(H)&&!W){var G=S(void 0,E.state,E.props);H>G?H=G:H<1&&(H=1),"current"in E.props||E.setState({current:H,currentInputValue:H});var B=E.state.pageSize;return E.props.onChange(H,B),H}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?H-2:0),B=2;B=k?L=k:L=Number(w),L}},{key:"getShowSizeChanger",value:function(){var E=this.props,w=E.showSizeChanger,k=E.total,I=E.totalBoundaryShowSizeChanger;return typeof w!="undefined"?w:k>I}},{key:"renderPrev",value:function(E){var w=this.props,k=w.prevIcon,I=w.itemRender,L=I(E,"prev",this.getItemIcon(k,"prev page")),V=!this.hasPrev();return Object(b.isValidElement)(L)?Object(b.cloneElement)(L,{disabled:V}):L}},{key:"renderNext",value:function(E){var w=this.props,k=w.nextIcon,I=w.itemRender,L=I(E,"next",this.getItemIcon(k,"next page")),V=!this.hasNext();return Object(b.isValidElement)(L)?Object(b.cloneElement)(L,{disabled:V}):L}},{key:"render",value:function(){var E=this,w=this.props,k=w.prefixCls,I=w.className,L=w.style,V=w.disabled,W=w.hideOnSinglePage,H=w.total,G=w.locale,B=w.showQuickJumper,P=w.showLessItems,z=w.showTitle,J=w.showTotal,ue=w.simple,de=w.itemRender,Se=w.showPrevNextJumpers,Ae=w.jumpPrevIcon,pe=w.jumpNextIcon,Oe=w.selectComponentClass,ye=w.selectPrefixCls,ce=w.pageSizeOptions,ae=this.state,re=ae.current,fe=ae.pageSize,te=ae.currentInputValue;if(W===!0&&H<=fe)return null;var ne=S(void 0,this.state,this.props),Te=[],ie=null,Z=null,X=null,Q=null,_e=null,ve=B&&B.goButton,Re=P?1:2,Je=re-1>0?re-1:0,qe=re+1=Re*2&&re!==1+2&&(Te[0]=Object(b.cloneElement)(Te[0],{className:"".concat(k,"-item-after-jump-prev")}),Te.unshift(ie)),ne-re>=Re*2&&re!==ne-2&&(Te[Te.length-1]=Object(b.cloneElement)(Te[Te.length-1],{className:"".concat(k,"-item-before-jump-next")}),Te.push(Z)),at!==1&&Te.unshift(X),ct!==ne&&Te.push(Q)}var Ue=null;J&&(Ue=p.a.createElement("li",{className:"".concat(k,"-total-text")},J(H,[H===0?0:(re-1)*fe+1,re*fe>H?H:re*fe])));var Le=!this.hasPrev()||!ne,Me=!this.hasNext()||!ne;return p.a.createElement("ul",Object(N.a)({className:n()(k,I,Object(g.a)({},"".concat(k,"-disabled"),V)),style:L,unselectable:"unselectable",ref:this.savePaginationNode},rt),Ue,p.a.createElement("li",{title:z?G.prev_page:null,onClick:this.prev,tabIndex:Le?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(k,"-prev"),Object(g.a)({},"".concat(k,"-disabled"),Le)),"aria-disabled":Le},this.renderPrev(Je)),Te,p.a.createElement("li",{title:z?G.next_page:null,onClick:this.next,tabIndex:Me?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(k,"-next"),Object(g.a)({},"".concat(k,"-disabled"),Me)),"aria-disabled":Me},this.renderNext(qe)),p.a.createElement(u,{disabled:V,locale:G,rootPrefixCls:k,selectComponentClass:Oe,selectPrefixCls:ye,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:re,pageSize:fe,pageSizeOptions:ce,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ve}))}}],[{key:"getDerivedStateFromProps",value:function(E,w){var k={};if("current"in E&&(k.current=E.current,E.current!==w.current&&(k.currentInputValue=k.current)),"pageSize"in E&&E.pageSize!==w.pageSize){var I=w.current,L=S(E.pageSize,w,E);I=I>L?L:I,"current"in E||(k.current=I,k.currentInputValue=I),k.pageSize=E.pageSize}return k}}]),v}(p.a.Component);x.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:s,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:s,locale:h.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var f=x},"6RRn":function(F,q,j){"use strict";var N=j("wCXF"),g=j("n6Qo");j.d(q,"b",function(){return g.a});var O=j("IBYe"),M=j("6eGT"),m=j("hW8S");j.d(q,"a",function(){return m.a}),q.c=N.b},"6UM0":function(F,q,j){var N,g;(function(){var O;(function(){"use strict";var m=[function(p,d,n){var c=n(1).Beautifier,r=n(5).Options;function a(o,u){var h=new c(o,u);return h.beautify()}p.exports=a,p.exports.defaultOptions=function(){return new r}},function(p,d,n){var c=n(2).Output,r=n(3).Token,a=n(4),o=n(5).Options,u=n(7).Tokenizer,h=n(7).line_starters,s=n(7).positionable_operators,l=n(7).TOKEN;function t(P,z){return z.indexOf(P)!==-1}function S(P){return P.replace(/^\s+/g,"")}function x(P){for(var z={},J=0;JJ&&(J=P.line_indent_level));var ue={mode:z,parent:P,last_token:P?P.last_token:new r(l.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:J,alignment:0,line_indent_level:P?P.line_indent_level:J,start_line_index:this._output.get_line_number(),ternary_depth:0};return ue},G.prototype._reset=function(P){var z=P.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new c(this._options,z),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(w.BlockStatement);var J=new u(P,this._options);return this._tokens=J.tokenize(),P},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var P,z=this._reset(this._source_text),J=this._options.eol;this._options.eol==="auto"&&(J=` `,z&&a.lineBreak.test(z||"")&&(J=z.match(a.lineBreak)[0]));for(var ue=this._tokens.next();ue;)this.handle_token(ue),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ue,ue=this._tokens.next();return P=this._output.get_code(J),P},G.prototype.handle_token=function(P,z){P.type===l.START_EXPR?this.handle_start_expr(P):P.type===l.END_EXPR?this.handle_end_expr(P):P.type===l.START_BLOCK?this.handle_start_block(P):P.type===l.END_BLOCK?this.handle_end_block(P):P.type===l.WORD?this.handle_word(P):P.type===l.RESERVED?this.handle_word(P):P.type===l.SEMICOLON?this.handle_semicolon(P):P.type===l.STRING?this.handle_string(P):P.type===l.EQUALS?this.handle_equals(P):P.type===l.OPERATOR?this.handle_operator(P):P.type===l.COMMA?this.handle_comma(P):P.type===l.BLOCK_COMMENT?this.handle_block_comment(P,z):P.type===l.COMMENT?this.handle_comment(P,z):P.type===l.DOT?this.handle_dot(P):P.type===l.EOF?this.handle_eof(P):P.type===l.UNKNOWN?this.handle_unknown(P,z):this.handle_unknown(P,z)},G.prototype.handle_whitespace_and_comments=function(P,z){var J=P.newlines,ue=this._options.keep_array_indentation&&L(this._flags.mode);if(P.comments_before)for(var de=P.comments_before.next();de;)this.handle_whitespace_and_comments(de,z),this.handle_token(de,z),de=P.comments_before.next();if(ue)for(var Se=0;Se0,z);else if(this._options.max_preserve_newlines&&J>this._options.max_preserve_newlines&&(J=this._options.max_preserve_newlines),this._options.preserve_newlines&&J>1){this.print_newline(!1,z);for(var Ae=1;Ae0&&(!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===w.Statement&&k(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===w.ObjectLiteral&&this._flags.mode===w.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 z=!1;return z=z||R(this._flags.last_token,["var","let","const"])&&P.type===l.WORD,z=z||f(this._flags.last_token,"do"),z=z||!(this._flags.parent.mode===w.ObjectLiteral&&this._flags.mode===w.Statement)&&R(this._flags.last_token,B)&&!P.newlines,z=z||f(this._flags.last_token,"else")&&!(f(P,"if")&&!P.comments_before),z=z||this._flags.last_token.type===l.END_EXPR&&(this._previous_flags.mode===w.ForInitializer||this._previous_flags.mode===w.Conditional),z=z||this._flags.last_token.type===l.WORD&&this._flags.mode===w.BlockStatement&&!this._flags.in_case&&!(P.text==="--"||P.text==="++")&&this._last_last_text!=="function"&&P.type!==l.WORD&&P.type!==l.RESERVED,z=z||this._flags.mode===w.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"])),z?(this.set_mode(w.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 z=w.Expression;if(P.text==="["){if(this._flags.last_token.type===l.WORD||this._flags.last_token.text===")"){R(this._flags.last_token,h)&&(this._output.space_before_token=!0),this.print_token(P),this.set_mode(z),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}z=w.ArrayLiteral,L(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())),t(this._flags.last_token.type,[l.START_EXPR,l.END_EXPR,l.WORD,l.OPERATOR,l.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===l.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,z=w.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,z=w.Conditional):t(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:(t(this._flags.last_token.text,h)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P);else if(this._flags.last_token.type===l.WORD){this._output.space_before_token=!1;var J=this._tokens.peek(-3);if(this._options.space_after_named_function&&J){var ue=this._tokens.peek(-4);R(J,["async","function"])||J.text==="*"&&R(ue,["async","function"])?this._output.space_before_token=!0:this._flags.mode===w.ObjectLiteral?(J.text==="{"||J.text===","||J.text==="*"&&(ue.text==="{"||ue.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===l.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===w.ObjectLiteral&&t(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===l.START_BLOCK?this.print_newline():(this._flags.last_token.type===l.END_EXPR||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===l.COMMA)&&this.allow_wrap_or_preserved_newline(P,P.newlines),this.print_token(P),this.set_mode(z),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(P){for(;this._flags.mode===w.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(P,P.text==="]"&&L(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===l.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(),k(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===w.Conditional&&(this._previous_flags.mode=w.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 z=this._tokens.peek(),J=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===l.END_EXPR?(this.set_mode(w.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(w.BlockStatement):J&&(t(J.text,[":",","])&&t(z.type,[l.STRING,l.WORD,l.RESERVED])||t(z.text,["get","set","..."])&&t(J.type,[l.WORD,l.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(J.text,[":",","])?this.set_mode(w.BlockStatement):this.set_mode(w.ObjectLiteral):this._flags.last_token.type===l.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(w.BlockStatement):t(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])||R(this._flags.last_token,["return","throw","import","default"])?this.set_mode(w.ObjectLiteral):this.set_mode(w.BlockStatement),this._flags.last_token&&(R(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ue=!z.comments_before&&z.text==="}",de=ue&&this._flags.last_word==="function"&&this._flags.last_token.type===l.END_EXPR;if(this._options.brace_preserve_inline){var Se=0,Ae=null;this._flags.inline_frame=!0;do if(Se+=1,Ae=this._tokens.peek(Se-1),Ae.newlines){this._flags.inline_frame=!1;break}while(Ae.type!==l.EOF&&!(Ae.type===l.END_BLOCK&&Ae.opened===P))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(de||this._flags.last_token.type===l.EQUALS||R(this._flags.last_token,C)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(L(this._previous_flags.mode)&&(this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.COMMA)&&((this._flags.last_token.type===l.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.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!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(this._flags.last_token.type===l.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(P),this.indent(),!ue&&!(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===w.Statement;)this.restore_mode();var z=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!z?this._output.space_before_token=!0:this._options.brace_style==="expand"?z||this.print_newline():z||(L(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===l.RESERVED){if(t(P.text,["set","get"])&&this._flags.mode!==w.ObjectLiteral)P.type=l.WORD;else if(P.text==="import"&&t(this._tokens.peek().text,["(","."]))P.type=l.WORD;else if(t(P.text,["as","from"])&&!this._flags.import_block)P.type=l.WORD;else if(this._flags.mode===w.ObjectLiteral){var z=this._tokens.peek();z.text===":"&&(P.type=l.WORD)}}if(this.start_of_statement(P)?R(this._flags.last_token,["var","let","const"])&&P.type===l.WORD&&(this._flags.declaration_statement=!0):P.newlines&&!V(this._flags.mode)&&(this._flags.last_token.type!==l.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==l.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(f(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&&f(P,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===w.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===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P)),f(P,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===l.OPERATOR))&&(!this._output.just_added_blankline()&&!P.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?R(this._flags.last_token,["get","set","new","export"])||R(this._flags.last_token,B)?this._output.space_before_token=!0:f(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===l.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(V(this._flags.mode)||L(this._flags.mode))||this.print_newline(),this.print_token(P),this._flags.last_word=P.text;return}var J="NONE";if(this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?J="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?J="NEWLINE":(J="SPACE",this._output.space_before_token=!0):J="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&this._flags.mode===w.BlockStatement?J="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&V(this._flags.mode)?J="SPACE":this._flags.last_token.type===l.STRING?J="NEWLINE":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===w.ObjectLiteral&&t(this._last_last_text,["{",","]))?J="SPACE":this._flags.last_token.type===l.START_BLOCK?this._flags.inline_frame?J="SPACE":J="NEWLINE":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,J="NEWLINE"),R(P,h)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?J="SPACE":J="NEWLINE"),R(P,["else","catch","finally"]))if((!(this._flags.last_token.type===l.END_BLOCK&&this._previous_flags.mode===w.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 ue=this._output.current_line;ue.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else J==="NEWLINE"?R(this._flags.last_token,C)?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!==l.END_EXPR?(this._flags.last_token.type!==l.START_EXPR||!R(P,["var","let","const"]))&&this._flags.last_token.text!==":"&&(f(P,"if")&&f(P.previous,"else")?this._output.space_before_token=!0:this.print_newline()):R(P,h)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&L(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():J==="SPACE"&&(this._output.space_before_token=!0);P.previous&&(P.previous.type===l.WORD||P.previous.type===l.RESERVED)&&(this._output.space_before_token=!0),this.print_token(P),this._flags.last_word=P.text,P.type===l.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&&f(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 z=this._tokens.peek();this._flags.mode===w.Statement&&!(this._flags.if_block&&f(z,"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===l.WORD)||(this.start_of_statement(P)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(P),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P):P.text.startsWith("`")&&this._flags.last_token.type===l.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===w.ObjectLiteral||this._flags.mode===w.Statement&&this._flags.parent.mode===w.ObjectLiteral?(this._flags.mode===w.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 z=P.text==="*"&&(R(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),J=t(P.text,["-","+"])&&(t(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||t(this._flags.last_token.text,h)||this._flags.last_token.text===",");if(!this.start_of_statement(P)){var ue=!z;this.handle_whitespace_and_comments(P,ue)}if(P.text==="*"&&this._flags.last_token.type===l.DOT){this.print_token(P);return}if(P.text==="::"){this.print_token(P);return}if(this._flags.last_token.type===l.OPERATOR&&t(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!==l.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 de=!0,Se=!0,Ae=!1;if(P.text===":"?this._flags.ternary_depth===0?de=!1:(this._flags.ternary_depth-=1,Ae=!0):P.text==="?"&&(this._flags.ternary_depth+=1),!J&&!z&&this._options.preserve_newlines&&t(P.text,s)){var pe=P.text===":",Oe=pe&&Ae,ye=pe&&!Ae;switch(this._options.operator_position){case _.before_newline:this._output.space_before_token=!ye,this.print_token(P),(!pe||Oe)&&this.allow_wrap_or_preserved_newline(P),this._output.space_before_token=!0;return;case _.after_newline:this._output.space_before_token=!0,!pe||Oe?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 _.preserve_newline:ye||this.allow_wrap_or_preserved_newline(P),de=!(this._output.just_added_newline()||ye),this._output.space_before_token=de,this.print_token(P),this._output.space_before_token=!0;return}}if(z){this.allow_wrap_or_preserved_newline(P),de=!1;var ce=this._tokens.peek();Se=ce&&t(ce.type,[l.WORD,l.RESERVED])}else if(P.text==="...")this.allow_wrap_or_preserved_newline(P),de=this._flags.last_token.type===l.START_BLOCK,Se=!1;else if(t(P.text,["--","++","!","~"])||J){if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR)&&this.allow_wrap_or_preserved_newline(P),de=!1,Se=!1,P.newlines&&(P.text==="--"||P.text==="++"||P.text==="~")){var ae=R(this._flags.last_token,C)&&P.newlines;ae&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ae,!0)}this._flags.last_token.text===";"&&V(this._flags.mode)&&(de=!0),this._flags.last_token.type===l.RESERVED?de=!0:this._flags.last_token.type===l.END_EXPR?de=!(this._flags.last_token.text==="]"&&(P.text==="--"||P.text==="++")):this._flags.last_token.type===l.OPERATOR&&(de=t(P.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(P.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Se=!0)),(this._flags.mode===w.BlockStatement&&!this._flags.inline_frame||this._flags.mode===w.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||de,this.print_token(P),this._output.space_before_token=Se},G.prototype.handle_block_comment=function(P,z){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,z),this.print_token(P),P.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!a.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,z)},G.prototype.print_block_commment=function(P,z){var J=I(P.text),ue,de=!1,Se=!1,Ae=P.whitespace_before,pe=Ae.length;if(this.print_newline(!1,z),this.print_token_line_indentation(P),this._output.add_token(J[0]),this.print_newline(!1,z),J.length>1){for(J=J.slice(1),de=W(J,"*"),Se=H(J,Ae),de&&(this._flags.alignment=1),ue=0;ue=0;a--)if(this.__items[a].match(r))return!0;return!1},d.prototype.set_indent=function(r,a){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=a||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 a=r.lastIndexOf(` `);a!==-1?this.__character_count=r.length-a: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 n(r,a){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)),a=a||"",r.indent_level>0&&(a=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}n.prototype.get_indent_size=function(r,a){var o=this.__base_string_length;return a=a||0,r<0&&(o=0),o+=r*this.__indent_size,o+=a,o},n.prototype.get_indent_string=function(r,a){var o=this.__base_string;return a=a||0,r<0&&(r=0,o=""),a+=r*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a],o},n.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var r=this.__cache.length,a=0,o="";this.__indent_size&&r>=this.__indent_size&&(a=Math.floor(r/this.__indent_size),r-=a*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function c(r,a){this.__indent_cache=new n(r,a),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()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(r,a){return this.__indent_cache.get_indent_string(r,a)},c.prototype.get_indent_size=function(r,a){return this.__indent_cache.get_indent_size(r,a)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(r){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===` `&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(` `);return r!==` `&&(o=o.replace(/[\n]/g,r)),o},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(r,a){return r=r||0,a=a||0,this.next_line.set_indent(r,a),this.__lines.length>1?(this.current_line.set_indent(r,a),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(r){for(var a=0;a1&&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},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(r,a){for(var o=this.__lines.length-2;o>=0;){var u=this.__lines[o];if(u.is_empty())break;if(u.item(0).indexOf(r)!==0&&u.item(-1)!==a){this.__lines.splice(o+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},p.exports.Output=c},function(p){function d(n,c,r,a){this.type=n,this.text=c,this.comments_before=null,this.newlines=r||0,this.whitespace_before=a||"",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 n="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\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",a="\\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}|["+n+r+"])",u="(?:\\\\u[0-9a-fA-F]{4}|["+c+r+a+"])*";d.identifier=new RegExp(o+u,"g"),d.identifierStart=new RegExp(o),d.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+r+a+"])+");var h=/[\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,n){var c=n(6).Options,r=["before-newline","after-newline","preserve-newline"];function a(o){c.call(this,o,"js");var u=this.raw_options.brace_style||null;u==="expand-strict"?this.raw_options.brace_style="expand":u==="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 h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var s=0;s>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),v=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";v=v.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),v="\\?\\.(?!\\d) "+v,v=v.replace(/ /g,"|");var _=new RegExp(v),E="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),w=E.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),k=new RegExp("^(?:"+w.join("|")+")$"),I,L=function(W,H){r.call(this,W,H),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new h(this._input),B=new s(this._input).read_options(this._options);this.__patterns={template:B,identifier:B.starting_with(u.identifier).matching(u.identifierMatch),number:G.matching(x),punct:G.matching(_),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(u.lineBreak),shebang:G.starting_with(/#!/).until_after(u.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:B.until(/['\\\n\r\u2028\u2029]/),double_quote:B.until(/["\\\n\r\u2028\u2029]/),template_text:B.until(/[`\\$]/),template_expression:B.until(/[`}\\]/)}};L.prototype=new r,L.prototype._is_comment=function(W){return W.type===t.COMMENT||W.type===t.BLOCK_COMMENT||W.type===t.UNKNOWN},L.prototype._is_opening=function(W){return W.type===t.START_BLOCK||W.type===t.START_EXPR},L.prototype._is_closing=function(W,H){return(W.type===t.END_BLOCK||W.type===t.END_EXPR)&&H&&(W.text==="]"&&H.text==="["||W.text===")"&&H.text==="("||W.text==="}"&&H.text==="{")},L.prototype._reset=function(){I=!1},L.prototype._get_next_token=function(W,H){var G=null;this._readWhitespace();var B=this._input.peek();return B===null?this._create_token(t.EOF,""):(G=G||this._read_non_javascript(B),G=G||this._read_string(B),G=G||this._read_word(W),G=G||this._read_singles(B),G=G||this._read_comment(B),G=G||this._read_regexp(B,W),G=G||this._read_xml(B,W),G=G||this._read_punctuation(),G=G||this._create_token(t.UNKNOWN,this._input.next()),G)},L.prototype._read_word=function(W){var H;if(H=this.__patterns.identifier.read(),H!=="")return H=H.replace(u.allLineBreaks,` `),!(W.type===t.DOT||W.type===t.RESERVED&&(W.text==="set"||W.text==="get"))&&k.test(H)?(H==="in"||H==="of")&&(W.type===t.WORD||W.type===t.STRING)?this._create_token(t.OPERATOR,H):this._create_token(t.RESERVED,H):this._create_token(t.WORD,H);if(H=this.__patterns.number.read(),H!=="")return this._create_token(t.WORD,H)},L.prototype._read_singles=function(W){var H=null;return W==="("||W==="["?H=this._create_token(t.START_EXPR,W):W===")"||W==="]"?H=this._create_token(t.END_EXPR,W):W==="{"?H=this._create_token(t.START_BLOCK,W):W==="}"?H=this._create_token(t.END_BLOCK,W):W===";"?H=this._create_token(t.SEMICOLON,W):W==="."&&R.test(this._input.peek(1))?H=this._create_token(t.DOT,W):W===","&&(H=this._create_token(t.COMMA,W)),H&&this._input.next(),H},L.prototype._read_punctuation=function(){var W=this.__patterns.punct.read();if(W!=="")return W==="="?this._create_token(t.EQUALS,W):W==="?."?this._create_token(t.DOT,W):this._create_token(t.OPERATOR,W)},L.prototype._read_non_javascript=function(W){var H="";if(W==="#"){if(this._is_first_token()&&(H=this.__patterns.shebang.read(),H))return this._create_token(t.UNKNOWN,H.trim()+` `);if(H=this.__patterns.include.read(),H)return this._create_token(t.UNKNOWN,H.trim()+` `);W=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(f)){do W=this._input.next(),G+=W;while(this._input.hasNext()&&W!=="#"&&W!=="=");return W==="#"||(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(t.WORD,G)}this._input.back()}else if(W==="<"&&this._is_first_token()){if(H=this.__patterns.html_comment_start.read(),H){for(;this._input.hasNext()&&!this._input.testChar(u.newline);)H+=this._input.next();return I=!0,this._create_token(t.COMMENT,H)}}else if(I&&W==="-"&&(H=this.__patterns.html_comment_end.read(),H))return I=!1,this._create_token(t.COMMENT,H);return null},L.prototype._read_comment=function(W){var H=null;if(W==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var B=S.get_directives(G);B&&B.ignore==="start"&&(G+=S.readIgnored(this._input)),G=G.replace(u.allLineBreaks,` `),H=this._create_token(t.BLOCK_COMMENT,G),H.directives=B}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),H=this._create_token(t.COMMENT,G))}return H},L.prototype._read_string=function(W){if(W==="`"||W==="'"||W==='"'){var H=this._input.next();return this.has_char_escapes=!1,W==="`"?H+=this._read_string_recursive("`",!0,"${"):H+=this._read_string_recursive(W),this.has_char_escapes&&this._options.unescape_strings&&(H=V(H)),this._input.peek()===W&&(H+=this._input.next()),H=H.replace(u.allLineBreaks,` `),this._create_token(t.STRING,H)}return null},L.prototype._allow_regexp_or_xml=function(W){return W.type===t.RESERVED&&l(W.text,["return","case","throw","else","do","typeof","yield"])||W.type===t.END_EXPR&&W.text===")"&&W.opened.previous.type===t.RESERVED&&l(W.opened.previous.text,["if","while","for"])||l(W.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},L.prototype._read_regexp=function(W,H){if(W==="/"&&this._allow_regexp_or_xml(H)){for(var G=this._input.next(),B=!1,P=!1;this._input.hasNext()&&(B||P||this._input.peek()!==W)&&!this._input.testChar(u.newline);)G+=this._input.peek(),B?B=!1:(B=this._input.peek()==="\\",this._input.peek()==="["?P=!0:this._input.peek()==="]"&&(P=!1)),this._input.next();return this._input.peek()===W&&(G+=this._input.next(),G+=this._input.read(u.identifier)),this._create_token(t.STRING,G)}return null},L.prototype._read_xml=function(W,H){if(this._options.e4x&&W==="<"&&this._allow_regexp_or_xml(H)){var G="",B=this.__patterns.xml.read_match();if(B){for(var P=B[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),z=P.indexOf("{")===0,J=0;B;){var ue=!!B[1],de=B[2],Se=!!B[B.length-1]||de.slice(0,8)==="![CDATA[";if(!Se&&(de===P||z&&de.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ue?--J:++J),G+=B[0],J<=0)break;B=this.__patterns.xml.read_match()}return B||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(u.allLineBreaks,` `),this._create_token(t.STRING,G)}}return null};function V(W){for(var H="",G=0,B=new c(W),P=null;B.hasNext();)if(P=B.match(/([\s]|[^\\]|\\\\)+/g),P&&(H+=P[0]),B.peek()==="\\"){if(B.next(),B.peek()==="x")P=B.match(/x([0-9A-Fa-f]{2})/g);else if(B.peek()==="u")P=B.match(/u([0-9A-Fa-f]{4})/g);else{H+="\\",B.hasNext()&&(H+=B.next());continue}if(!P)return W;if(G=parseInt(P[1],16),G>126&&G<=255&&P[0].indexOf("x")===0)return W;if(G>=0&&G<32){H+="\\"+P[0];continue}else G===34||G===39||G===92?H+="\\"+String.fromCharCode(G):H+=String.fromCharCode(G)}return H}L.prototype._read_string_recursive=function(W,H,G){var B,P;W==="'"?P=this.__patterns.single_quote:W==='"'?P=this.__patterns.double_quote:W==="`"?P=this.__patterns.template_text:W==="}"&&(P=this.__patterns.template_expression);for(var z=P.read(),J="";this._input.hasNext();){if(J=this._input.next(),J===W||!H&&u.newline.test(J)){this._input.back();break}else J==="\\"&&this._input.hasNext()?(B=this._input.peek(),B==="x"||B==="u"?this.has_char_escapes=!0:B==="\r"&&this._input.peek(1)===` `&&this._input.next(),J+=this._input.next()):G&&(G==="${"&&J==="$"&&this._input.peek()==="{"&&(J+=this._input.next()),G===J&&(W==="`"?J+=this._read_string_recursive("}",H,"`"):J+=this._read_string_recursive("`",H,"${"),this._input.hasNext()&&(J+=this._input.next())));J+=P.read(),z+=J}return z},p.exports.Tokenizer=L,p.exports.TOKEN=t,p.exports.positionable_operators=C.slice(),p.exports.line_starters=E.slice()},function(p){var d=RegExp.prototype.hasOwnProperty("sticky");function n(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&c=0&&r=c.length&&this.__input.substring(r-c.length,r).toLowerCase()===c},p.exports.InputScanner=n},function(p,d,n){var c=n(8).InputScanner,r=n(3).Token,a=n(10).TokenStream,o=n(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},h=function(s,l){this._input=new c(s),this._options=l||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};h.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var s,l=new r(u.START,""),t=null,S=[],x=new a;l.type!==u.EOF;){for(s=this._get_next_token(l,t);this._is_comment(s);)x.add(s),s=this._get_next_token(l,t);x.isEmpty()||(s.comments_before=x,x=new a),s.parent=t,this._is_opening(s)?(S.push(t),t=s):t&&this._is_closing(s,t)&&(s.opened=t,t.closed=s,t=S.pop(),s.parent=t),s.previous=l,l.next=s,this.__tokens.add(s),l=s}return this.__tokens},h.prototype._is_first_token=function(){return this.__tokens.isEmpty()},h.prototype._reset=function(){},h.prototype._get_next_token=function(s,l){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(u.RAW,t):this._create_token(u.EOF,"")},h.prototype._is_comment=function(s){return!1},h.prototype._is_opening=function(s){return!1},h.prototype._is_closing=function(s,l){return!1},h.prototype._create_token=function(s,l){var t=new r(s,l,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},h.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},p.exports.Tokenizer=h,p.exports.TOKEN=u},function(p){function d(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}d.prototype.restart=function(){this.__position=0},d.prototype.isEmpty=function(){return this.__tokens_length===0},d.prototype.hasNext=function(){return this.__position=0&&n/),erb:h.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:h.starting_with(/{%/).until_after(/%}/),django_value:h.starting_with(/{{/).until_after(/}}/),django_comment:h.starting_with(/{#/).until_after(/#}/),smarty:h.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:h.starting_with(/{\*/).until_after(/\*}/),smarty_literal:h.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new c,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(o){var u=this._create();return u._disabled[o]=!0,u._update(),u},a.prototype.read_options=function(o){var u=this._create();for(var h in r)u._disabled[h]=o.templating.indexOf(h)===-1;return u._update(),u},a.prototype.exclude=function(o){var u=this._create();return u._excluded[o]=!0,u._update(),u},a.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 u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),o+=u,u=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},a.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("|")+")")},a.prototype._read_template=function(){var o="",u=this._input.peek();if(u==="<"){var h=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&h==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&h==="%"&&(o=o||this.__patterns.erb.read())}else u==="{"&&(!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=a}],y={};function T(p){var d=y[p];if(d!==void 0)return d.exports;var n=y[p]={exports:{}};return m[p](n,n.exports,T),n.exports}var b=T(0);O=b})();var M=O;!(N=[],g=function(){return{js_beautify:M}}.apply(q,N),g!==void 0&&(F.exports=g))})()},"6eGT":function(F,q,j){"use strict";function N(g){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),g=new Uint8Array(16);function O(){if(!N)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(g)}var M=/^(?:[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 m(r){return typeof r=="string"&&M.test(r)}for(var y=m,T=[],b=0;b<256;++b)T.push((b+256).toString(16).substr(1));function p(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(T[r[a+0]]+T[r[a+1]]+T[r[a+2]]+T[r[a+3]]+"-"+T[r[a+4]]+T[r[a+5]]+"-"+T[r[a+6]]+T[r[a+7]]+"-"+T[r[a+8]]+T[r[a+9]]+"-"+T[r[a+10]]+T[r[a+11]]+T[r[a+12]]+T[r[a+13]]+T[r[a+14]]+T[r[a+15]]).toLowerCase();if(!y(o))throw TypeError("Stringified UUID is invalid");return o}var d=p;function n(r,a,o){r=r||{};var u=r.random||(r.rng||O)();if(u[6]=u[6]&15|64,u[8]=u[8]&63|128,a){o=o||0;for(var h=0;h<16;++h)a[o+h]=u[h];return a}return d(u)}var c=q.a=n},"7ahc":function(F,q,j){"use strict";j.d(q,"a",function(){return S});var N=j("k1fw"),g=j("0Owb"),O=j("+L6B"),M=j("2/Rp"),m=j("y8nQ"),y=j("Vl3Y"),T=j("tJVT"),b=j("OaEy"),p=j("2fM7"),d=j("q1tI"),n=j.n(d),c=j("VrN/"),r=j.n(c),a=j("p77/"),o=j.n(a),u=j("c5Ni"),h=j.n(u),s=p.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},t={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(x){var f=x.callback,R=x.onCancel,C=Object(d.useState)("python"),v=Object(T.a)(C,2),_=v[0],E=v[1];function w(I){E(t[I][1])}function k(I){f(I)}return n.a.createElement(y.a,Object(g.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:k}),n.a.createElement(y.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(p.a,{onChange:w},Object.keys(t).map(function(I){return n.a.createElement(s,{key:I,value:I},t[I][0])}))),n.a.createElement(y.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(S,{mode:_})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(M.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function S(x){var f=x.value,R=x.onChange,C=x.mode,v=x.options,_=v===void 0?{}:v,E=Object(d.useRef)(),w=Object(d.useState)(),k=Object(T.a)(w,2),I=k[0],L=k[1];return Object(d.useEffect)(function(){if(I){function V(W){var H=W.getValue();R&&R(H)}return I.on("change",V),function(){I.off("change",V)}}},[I,R]),Object(d.useEffect)(function(){I&&I.setOption("mode",C)},[I,C]),Object(d.useEffect)(function(){I&&((f!==I.getValue()||f==="")&&setTimeout(function(){I.setValue(f||" ")},300))},[I,f]),Object(d.useEffect)(function(){if(E.current&&!I){var V=r.a.fromTextArea(E.current,Object(N.a)({mode:C,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},_));L(V)}},[E.current,I]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:E}))}},"815F":function(F,q,j){"use strict";j.d(q,"e",function(){return T}),j.d(q,"c",function(){return p}),j.d(q,"d",function(){return d}),j.d(q,"a",function(){return c}),j.d(q,"f",function(){return r}),j.d(q,"b",function(){return a});var N=j("KQm4"),g=j("VTBJ"),O=j("Ff2n"),M=j("Zm9Q"),m=j("Kwbf"),y=j("OZM5");function T(o,u){return o!=null?o:u}function b(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],u=new Map;function h(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(s||[]).forEach(function(t){var S=t.key,x=t.children;Object(m.a)(S!=null,"Tree node must have a certain key: [".concat(l).concat(S,"]"));var f=String(S);Object(m.a)(!u.has(f)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(f)),u.set(f,!0),h(x,"".concat(l).concat(f," > "))})}h(o)}function p(o){function u(h){var s=Object(M.a)(h);return s.map(function(l){if(!Object(y.i)(l))return Object(m.a)(!l,"Tree/TreeNode can only accept TreeNode as children."),null;var t=l.key,S=l.props,x=S.children,f=Object(O.a)(S,["children"]),R=Object(g.a)({key:t},f),C=u(x);return C.length&&(R.children=C),R}).filter(function(l){return l})}return u(o)}function d(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],h=new Set(u===!0?[]:u),s=[];function l(t){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(x,f){var R=Object(y.h)(S?S.pos:"0",f),C=T(x.key,R),v=Object(g.a)(Object(g.a)({},x),{},{parent:S,pos:R,children:null,data:x,isStart:[].concat(Object(N.a)(S?S.isStart:[]),[f===0]),isEnd:[].concat(Object(N.a)(S?S.isEnd:[]),[f===t.length-1])});return s.push(v),u===!0||h.has(C)?v.children=l(x.children||[],v):v.children=[],v})}return l(o),s}function n(o,u,h){var s;h?typeof h=="string"?s=function(S){return S[h]}:typeof h=="function"&&(s=function(S){return h(S)}):s=function(S,x){return T(S.key,x)};function l(t,S,x){var f=t?t.children:o,R=t?Object(y.h)(x.pos,S):"0";if(t){var C=s(t,R),v={node:t,index:S,pos:R,key:C,parentPos:x.node?x.pos:null,level:x.level+1};u(v)}f&&f.forEach(function(_,E){l(_,E,{node:t,pos:R,level:x?x.level+1:-1})})}l(null)}function c(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=u.initWrapper,s=u.processEntity,l=u.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,S={},x={},f={posEntities:S,keyEntities:x};return h&&(f=h(f)||f),n(o,function(R){var C=R.node,v=R.index,_=R.pos,E=R.key,w=R.parentPos,k=R.level,I={node:C,index:v,key:E,pos:_,level:k},L=T(E,_);S[_]=I,x[L]=I,I.parent=S[w],I.parent&&(I.parent.children=I.parent.children||[],I.parent.children.push(I)),s&&s(I,f)},t),l&&l(f),f}function r(o,u){var h=u.expandedKeys,s=u.selectedKeys,l=u.loadedKeys,t=u.loadingKeys,S=u.checkedKeys,x=u.halfCheckedKeys,f=u.dragOverNodeKey,R=u.dropPosition,C=u.keyEntities,v=C[o],_={eventKey:o,expanded:h.indexOf(o)!==-1,selected:s.indexOf(o)!==-1,loaded:l.indexOf(o)!==-1,loading:t.indexOf(o)!==-1,checked:S.indexOf(o)!==-1,halfChecked:x.indexOf(o)!==-1,pos:String(v?v.pos:""),dragOver:f===o&&R===0,dragOverGapTop:f===o&&R===-1,dragOverGapBottom:f===o&&R===1};return _}function a(o){var u=o.data,h=o.expanded,s=o.selected,l=o.checked,t=o.loaded,S=o.loading,x=o.halfChecked,f=o.dragOver,R=o.dragOverGapTop,C=o.dragOverGapBottom,v=o.pos,_=o.active,E=Object(g.a)(Object(g.a)({},u),{},{expanded:h,selected:s,checked:l,loaded:t,loading:S,halfChecked:x,dragOver:f,dragOverGapTop:R,dragOverGapBottom:C,pos:v,active:_});return"props"in E||Object.defineProperty(E,"props",{get:function(){return Object(m.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 g=0;g-1&&M.substring(T+1,M.length);if(b)return N.findModeByExtension(b)},N.findModeByName=function(M){M=M.toLowerCase();for(var m=0;m=ee.length?ge.slice(ee.length):ge}).join(` `)}var h=[],s=["
    "],l=new a.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){h.length=0,s=["
      "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(le,K,Y,ee){if(K>=le.length||le[K].level<=Y)return K;var ge=le[K];ee.push("
    • "+ge.text+""),K++;var se=[];return K=f(le,K,ge.level,se),se.length>0&&(ee.push("
        "),se.forEach(function(Ke){ee.push(Ke)}),ee.push("
      ")),ee.push("
    • "),K=f(le,K,Y,ee),K}function R(){return f(h,0,0,s),s.push("
    "),s.join("")}var C={heading:function(K){var Y=t.exec(K);if(Y)return{type:"heading",raw:Y[0],depth:Y[1].length,text:Y[2]}},fences:function(K){var Y=this.rules.block.fences.exec(K);if(Y){var ee=Y[0],ge=u(ee,Y[3]||""),se=Y[2]?Y[2].trim():Y[2];if(["latex","katex","math"].indexOf(se)>=0){var Ke=E(),Ct=ge;ge=Ke,w[Ke]={type:"block",expression:Ct}}return{type:"code",raw:ee,lang:se,text:ge}}}},v=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_=0,E=function(){return"__special_katext_id_".concat(_++,"__")},w={};function k(){return w}function I(){_=0,w={}}function L(le){return le=le.replace(v,function(K,Y){var ee=E();return w[ee]={type:"inline",expression:Y},ee}),le}var V=l.listitem;l.listitem=function(le){return V(L(le))};var W=l.paragraph;l.paragraph=function(le){return W(L(le))};var H=l.tablecell;l.tablecell=function(le,K){return H(L(le),K)},l.code=function(le,K,Y){var ee=(K||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"

    ".concat(le,"

    "):'
    ').concat(Y?le:Object(o.escape)(le,!0),`
    `):'
    '+(Y?le:Object(o.escape)(le,!0))+"
    "},l.heading=function(le,K,Y){var ee=this.options.headerPrefix+Y.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return h.push({anchor:ee,level:K,text:le}),"'+le+""},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:C,renderer:l});var G=a.a,B=j("SJMd"),P=j("ulZh"),z=j.n(P),J=j("m3rI"),ue=j("Oy/b"),de=j("p5ED"),Se=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 Ae=function(le,K){return(Ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,ee){Y.__proto__=ee}||function(Y,ee){for(var ge in ee)Object.prototype.hasOwnProperty.call(ee,ge)&&(Y[ge]=ee[ge])})(le,K)};function pe(le,K){function Y(){this.constructor=le}Ae(le,K),le.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}function Oe(le,K,Y,ee){return new(Y||(Y=Promise))(function(ge,se){function Ke(Er){try{Xt(ee.next(Er))}catch(Pt){se(Pt)}}function Ct(Er){try{Xt(ee.throw(Er))}catch(Pt){se(Pt)}}function Xt(Er){var Pt;Er.done?ge(Er.value):(Pt=Er.value,Pt instanceof Y?Pt:new Y(function(Lr){Lr(Pt)})).then(Ke,Ct)}Xt((ee=ee.apply(le,K||[])).next())})}function ye(le,K){var Y,ee,ge,se,Ke={label:0,sent:function(){if(1&ge[0])throw ge[1];return ge[1]},trys:[],ops:[]};return se={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Ct(Xt){return function(Er){return function(Pt){if(Y)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(Y=1,ee&&(ge=2&Pt[0]?ee.return:Pt[0]?ee.throw||((ge=ee.return)&&ge.call(ee),0):ee.next)&&!(ge=ge.call(ee,Pt[1])).done)return ge;switch(ee=0,ge&&(Pt=[2&Pt[0],ge.value]),Pt[0]){case 0:case 1:ge=Pt;break;case 4:return Ke.label++,{value:Pt[1],done:!1};case 5:Ke.label++,ee=Pt[1],Pt=[0];continue;case 7:Pt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ge=Ke.trys,(ge=ge.length>0&&ge[ge.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ke=0;continue}if(Pt[0]===3&&(!ge||Pt[1]>ge[0]&&Pt[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(se){var Ke=document.createElement("div");Ke.className=""+Y.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",se.typeName),Ke.innerHTML=se.icon,Ke.addEventListener("click",function(){Y.markerToolbarButtonClicked(Ke,se)}),Y.buttons.push(Ke),Y.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 ge=document.createElement("div");ge.className=this.toolbarBlockStyleClass.name,ge.style.whiteSpace="nowrap",ge.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ge),this.addActionButton(ge,'',"render"),this.addActionButton(ge,'',"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 Y=0;Y0&&this.buttonClickListeners.forEach(function(ee){return ee("marker",Y)}),this.markerButtonOverflowBlock.style.display="none"},le.prototype.actionToolbarButtonClicked=function(K,Y){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("action",Y)}),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 Y=this.markerButtons.find(function(ee){return ee.getAttribute("data-type-name")===K});Y&&this.setActiveButton(Y)},le.prototype.setCurrentMarker=function(K){var Y=this;this.currentMarker=K,this.buttons.filter(function(ee){return/delete|notes/.test(ee.getAttribute("data-action"))}).forEach(function(ee){Y.currentMarker===void 0?(ee.style.fillOpacity="0.4",ee.style.pointerEvents="none"):(ee.style.fillOpacity="1",ee.style.pointerEvents="all")})},le}(),X=function(){function le(K,Y,ee,ge){this.panels=[],this.panelButtons=[],this.markerjsContainer=K,this.displayMode=Y,this.uiStyleSettings=ee,this.styles=ge,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return le.prototype.addStyles=function(){var K;this.toolboxStyleClass=this.styles.addClass(new ie("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 ie("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var Y=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ie("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ie("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ie("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 ie("toolbox-panel-row_colors",` background-color: `+((K=this.uiStyleSettings.toolboxBackgroundColor)!==null&&K!==void 0?K:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new ie("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px; padding: `+Y+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new Te("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new Te("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},le.prototype.show=function(K){var Y;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=K,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},le.prototype.setPanelButtons=function(K){var Y,ee,ge=this;this.panels=K,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Y!==void 0?Y: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(se){var Ke;se.uiStyleSettings=ge.uiStyleSettings;var Ct=document.createElement("div");Ct.className=ge.toolboxButtonStyleClass.name+" "+((Ke=ge.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:ge.toolboxButtonStyleColorsClass.name),Ct.innerHTML=se.icon,Ct.title=se.title,Ct.addEventListener("click",function(){ge.panelButtonClick(se)}),ge.panelButtons.push(Ct),ge.buttonRow.appendChild(Ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},le.prototype.panelButtonClick=function(K){var Y=this,ee=-1;if(K!==this.activePanel){ee=this.panels.indexOf(K),this.panelRow.innerHTML="";var ge=K.getUi();ge.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ge),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(){Y.displayMode==="inline"?Y.panelRow.style.display="none":Y.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(se,Ke){var Ct,Xt;se.className=Y.toolboxButtonStyleClass.name+" "+(Ke===ee?""+((Ct=Y.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ct!==void 0?Ct:Y.toolboxActiveButtonStyleColorsClass.name):""+((Xt=Y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xt!==void 0?Xt:Y.toolboxButtonStyleColorsClass.name))})},le}(),Q=function(le,K){this.title=le,this.icon=K},_e=function(le){function K(Y,ee,ge,se){var Ke=le.call(this,Y,se||'')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=ee,Ke.currentColor=ge,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return pe(K,le),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(ge){var se=Y.getColorBox(ge);ee.appendChild(se),Y.colorBoxes.push(se)}),ee},K.prototype.getColorBox=function(Y){var ee=this,ge=this.uiStyleSettings.toolbarHeight/4,se=this.uiStyleSettings.toolbarHeight-ge,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=se-2+"px",Ke.style.height=se-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=(se+2)/2+"px",Ke.style.borderColor=Y===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){ee.setCurrentColor(Y,Ke)});var Ct=document.createElement("div");return Ct.style.display="inline-block",Ct.style.width=se-2+"px",Ct.style.height=se-2+"px",Ct.style.backgroundColor=Y,Ct.style.borderRadius=se/2+"px",Y==="transparent"&&(Ct.style.fill=this.uiStyleSettings.toolboxAccentColor,Ct.innerHTML=` `),Ke.appendChild(Ct),Ke},K.prototype.setCurrentColor=function(Y,ee){var ge=this;this.currentColor=Y,this.colorBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Y)},K}(Q),ve=function(){function le(K,Y,ee){this._state="new",this._isSelected=!1,this._container=K,this._overlayContainer=Y,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,Y){},le.prototype.dblClick=function(K,Y){},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,Y){},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}(),Je=function(){function le(){this.GRIP_SIZE=10,this.visual=ae.createGroup(),this.visual.appendChild(ae.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ae.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}(),qe=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,Y){return K.a=Y.a,K.b=Y.b,K.c=Y.c,K.d=Y.d,K.e=Y.e,K.f=Y.f,K},le}(),rt=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.left=0,se.top=0,se.width=0,se.height=0,se.defaultSize={x:50,y:20},se.offsetX=0,se.offsetY=0,se.rotationAngle=0,se.CB_DISTANCE=10,se._suppressMarkerCreateEvent=!1,se.container.transform.baseVal.appendItem(ae.createTransform()),se.setupControlBox(),se}return pe(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(Y){this._visual=Y;var ee=ae.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function(Y){return!!le.prototype.ownsTarget.call(this,Y)||!!(this.controlGrips.findGripByVisual(Y)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Y))},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.state==="new"&&(this.left=Y.x,this.top=Y.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ge=this.unrotatePoint(Y);if(this.manipulationStartX=ge.x,this.manipulationStartY=ge.y,this.offsetX=ge.x-this.left,this.offsetY=ge.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 se=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=se.x-this.width/2,this.top=se.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(Y){var ee=this.state;le.prototype.pointerUp.call(this,Y),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Y),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},K.prototype.moveVisual=function(Y){this.visual.style.transform="translate("+Y.x+"px, "+Y.y+"px)"},K.prototype.manipulate=function(Y){var ee=this.unrotatePoint(Y);this.state==="creating"?this.resize(Y):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(Y)},K.prototype.resize=function(Y){var ee=this.manipulationStartLeft,ge=this.manipulationStartWidth,se=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+Y.x-this.manipulationStartX,ge=this.manipulationStartWidth+this.manipulationStartLeft-ee;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ge=this.manipulationStartWidth+Y.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:se=this.manipulationStartTop+Y.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-se;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+Y.y-this.manipulationStartY}ge>=0?(this.left=ee,this.width=ge):(this.left=ee+ge,this.width=-ge),Ke>=0?(this.top=se,this.height=Ke):(this.top=se+Ke,this.height=-Ke),this.setSize()},K.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},K.prototype.rotate=function(Y){if(Math.abs(Y.x-this.centerX)>.1){var ee=Math.sign(Y.x-this.centerX);this.rotationAngle=180*Math.atan((Y.y-this.centerY)/(Y.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},K.prototype.applyRotation=function(){var Y=this.container.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Y,0)},K.prototype.rotatePoint=function(Y){if(this.rotationAngle===0)return Y;var ee=this.container.getCTM(),ge=ae.createPoint(Y.x,Y.y);return{x:(ge=ge.matrixTransform(ee)).x,y:ge.y}},K.prototype.unrotatePoint=function(Y){if(this.rotationAngle===0)return Y;var ee=this.container.getCTM();ee=ee.inverse();var ge=ae.createPoint(Y.x,Y.y);return{x:(ge=ge.matrixTransform(ee)).x,y:ge.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=ae.createGroup();var Y=ae.createTransform();Y.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Y),this.container.appendChild(this.controlBox),this.controlRect=ae.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=ae.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 Y=this.controlBox.transform.baseVal.getItem(0);Y.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Y,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 Y=new Je;return Y.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(Y.visual),Y},K.prototype.positionGrips=function(){var Y=this.controlGrips.topLeft.GRIP_SIZE,ee=-Y/2,ge=ee,se=(this.width+this.CB_DISTANCE)/2-Y/2,Ke=(this.height+this.CB_DISTANCE)/2-Y/2,Ct=this.height+this.CB_DISTANCE-Y/2,Xt=this.width+this.CB_DISTANCE-Y/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,ge),this.positionGrip(this.controlGrips.topCenter.visual,se,ge),this.positionGrip(this.controlGrips.topRight.visual,Xt,ge),this.positionGrip(this.controlGrips.centerLeft.visual,ee,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Xt,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,Ct),this.positionGrip(this.controlGrips.bottomCenter.visual,se,Ct),this.positionGrip(this.controlGrips.bottomRight.visual,Xt,Ct),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,se,ge-3*this.CB_DISTANCE)},K.prototype.positionGrip=function(Y,ee,ge){var se=Y.transform.baseVal.getItem(0);se.setTranslate(ee,ge),Y.transform.baseVal.replaceItem(se,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:qe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:qe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},le.prototype.getState.call(this))},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var ee=Y;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(qe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee);var ge=this.rotatePoint({x:this.left,y:this.top}),se=this.unrotatePoint({x:ge.x*Y,y:ge.y*ee});this.left=se.x,this.top=se.y,this.width=this.width*Y,this.height=this.height*ee,this.adjustControlBox()},K}(ve),ut=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.createVisual=se.createVisual.bind(se),se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},K.prototype.createVisual=function(){this.visual=ae.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(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},K.prototype.manipulate=function(Y){le.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.setSize()},K.prototype.setSize=function(){le.prototype.setSize.call(this),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function(Y){le.prototype.pointerUp.call(this,Y),this.setSize()},K.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},K.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&ae.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(Y){var ee=Y;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,Y),this.setSize()},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee),this.setSize()},K.title="Rectangle marker",K}(rt),dt=function(le){function K(Y,ee,ge,se){var Ke=le.call(this,Y,se||'')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=ee,Ke.currentWidth=ge,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return pe(K,le),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(ge){var se=document.createElement("div");se.style.display="flex",se.style.flexGrow="2",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=ge===Y.currentWidth?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentWidth(ge,se)}),ee.appendChild(se);var Ke=document.createElement("div");Ke.innerText=ge.toString(),Ke.style.marginRight="5px",se.appendChild(Ke);var Ct=document.createElement("div");Ct.style.minHeight="20px",Ct.style.flexGrow="2",Ct.style.display="flex",Ct.style.alignItems="center";var Xt=document.createElement("hr");Xt.style.minWidth="20px",Xt.style.border="0px",Xt.style.borderTop=ge+"px solid "+Y.uiStyleSettings.toolboxColor,Xt.style.flexGrow="2",Ct.appendChild(Xt),se.appendChild(Ct),Y.widthBoxes.push(se)}),ee},K.prototype.setCurrentWidth=function(Y,ee){var ge=this;this.currentWidth=Y,this.widthBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},K}(Q),ft=function(le){function K(Y,ee,ge,se){var Ke=le.call(this,Y,se||'')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=ee,Ke.currentStyle=ge,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return pe(K,le),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(ge){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/Y.styles.length-5+"%",se.style.borderColor=ge===Y.currentStyle?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentStyle(ge,se)}),ee.appendChild(se);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var Ct=` `;Ke.innerHTML=Ct,se.appendChild(Ke),Y.styleBoxes.push(se)}),ee},K.prototype.setCurrentStyle=function(Y,ee){var ge=this;this.currentStyle=Y,this.styleBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},K}(Q),Be=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.strokeColor=ge.defaultColor,se.strokeWidth=ge.defaultStrokeWidth,se.strokeDasharray=ge.defaultStrokeDasharray,se.strokePanel=new _e("Line color",ge.defaultColorSet,ge.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ft("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return pe(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 Y=le.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="FrameMarker",K.title="Frame marker",K.icon='',K}(ut),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},at=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.x1=0,se.y1=0,se.x2=0,se.y2=0,se.defaultLength=50,se.manipulationStartX=0,se.manipulationStartY=0,se.manipulationStartX1=0,se.manipulationStartY1=0,se.manipulationStartX2=0,se.manipulationStartY2=0,se.setupControlBox(),se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!!le.prototype.ownsTarget.call(this,Y)||!(!this.grip1.ownsTarget(Y)&&!this.grip2.ownsTarget(Y))},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.manipulationStartX=Y.x,this.manipulationStartY=Y.y,this.state==="new"&&(this.x1=Y.x,this.y1=Y.y,this.x2=Y.x,this.y2=Y.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(Y){var ee=this.state;le.prototype.pointerUp.call(this,Y),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(Y),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},K.prototype.adjustVisual=function(){},K.prototype.manipulate=function(Y){this.state==="creating"?this.resize(Y):this.state==="move"?(this.x1=this.manipulationStartX1+Y.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Y.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Y.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Y.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Y)},K.prototype.resize=function(Y){switch(this.activeGrip){case this.grip1:this.x1=Y.x,this.y1=Y.y;break;case this.grip2:case void 0:this.x2=Y.x,this.y2=Y.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=ae.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 Y=new Je;return Y.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(Y.visual),Y},K.prototype.positionGrips=function(){var Y=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Y/2,this.y1-Y/2),this.positionGrip(this.grip2.visual,this.x2-Y/2,this.y2-Y/2)},K.prototype.positionGrip=function(Y,ee,ge){var se=Y.transform.baseVal.getItem(0);se.setTranslate(ee,ge),Y.transform.baseVal.replaceItem(se,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(Y){le.prototype.restoreState.call(this,Y);var ee=Y;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee),this.x1=this.x1*Y,this.y1=this.y1*ee,this.x2=this.x2*Y,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},K}(ve),ct=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.strokeColor=ge.defaultColor,se.strokeWidth=ge.defaultStrokeWidth,se.strokeDasharray=ge.defaultStrokeDasharray,se.strokePanel=new _e("Line color",ge.defaultColorSet,ge.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ft("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorLine&&Y!==this.visibleLine)},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ae.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(Y,ee){le.prototype.pointerDown.call(this,Y,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()),ae.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,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 Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var ee=Y;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}(at),$e=function(le){function K(Y,ee,ge,se){var Ke=le.call(this,Y,se||'')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=ee,Ke.currentFont=ge,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return pe(K,le),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(ge){var se=document.createElement("div");se.style.display="inline-block",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/Y.fonts.length-5+"%",se.style.borderColor=ge===Y.currentFont?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentFont(ge,se)}),ee.appendChild(se);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=ge,Ke.style.overflow="hidden";var Ct=document.createElement("div");Ct.style.whiteSpace="nowrap",Ct.style.overflow="hidden",Ct.style.textOverflow="ellipsis",Ct.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(Ct),se.appendChild(Ke),Y.fontBoxes.push(se)}),ee},K.prototype.setCurrentFont=function(Y,ee){var ge=this;this.currentFont=Y,this.fontBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},K}(Q),st=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.color="transparent",se.padding=5,se.DEFAULT_TEXT="your text here",se.text=se.DEFAULT_TEXT,se.isMoved=!1,se.color=ge.defaultColor,se.fontFamily=ge.defaultFontFamily,se.defaultSize={x:100,y:30},se.setColor=se.setColor.bind(se),se.setFont=se.setFont.bind(se),se.renderText=se.renderText.bind(se),se.sizeText=se.sizeText.bind(se),se.textEditDivClicked=se.textEditDivClicked.bind(se),se.showTextEditor=se.showTextEditor.bind(se),se.setSize=se.setSize.bind(se),se.positionTextEditor=se.positionTextEditor.bind(se),se.colorPanel=new _e("Color",ge.defaultColorSet,ge.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.fontFamilyPanel=new $e("Font",ge.defaultFontFamilies,ge.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se}return pe(K,le),K.prototype.ownsTarget=function(Y){if(le.prototype.ownsTarget.call(this,Y)||Y===this.visual||Y===this.textElement||Y===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(ge){ge===Y&&(ee=!0)}),ee},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.bgRectangle=ae.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ae.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.isMoved=!1,this.pointerDownPoint=Y,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},K.prototype.renderText=function(){var Y=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){Y.textElement.appendChild(ae.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},K.prototype.getTextScale=function(){var Y=this.textElement.getBBox(),ee=1;if(Y.width>0&&Y.height>0){var ge=(1*this.width-this.width*this.padding*2/100)/Y.width,se=(1*this.height-this.height*this.padding*2/100)/Y.height;ee=Math.min(ge,se)}return ee},K.prototype.getTextPosition=function(Y){var ee=this.textElement.getBBox(),ge=0,se=0;return ee.width>0&&ee.height>0&&(ge=(this.width-ee.width*Y)/2,se=this.height/2-ee.height*Y/2),{x:ge,y:se}},K.prototype.sizeText=function(){var Y=this.textElement.getBBox(),ee=this.getTextScale(),ge=this.getTextPosition(ee);ge.y-=Y.y*ee,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ge.x+"px, "+ge.y+"px) scale("+ee+", "+ee+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ge.x,ge.y),this.textElement.transform.baseVal.getItem(1).setScale(ee,ee))},K.prototype.manipulate=function(Y){le.prototype.manipulate.call(this,Y),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Y.x-this.pointerDownPoint.x)>5||Math.abs(Y.y-this.pointerDownPoint.y)>5)},K.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.isMoved=!0,this.setSize(),this.sizeText()},K.prototype.setSize=function(){le.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},K.prototype.pointerUp=function(Y){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),le.prototype.pointerUp.call(this,Y),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},K.prototype.showTextEditor=function(){var Y=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(Y.textEditor.style.fontSize);Y.textEditor.clientWidth>=Number.parseInt(Y.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,Y.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 ge=ee.clipboardData.getData("text"),se=window.getSelection();if(!se.rangeCount)return!1;se.deleteFromDocument(),se.getRangeAt(0).insertNode(document.createTextNode(ge)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Y.textEditDivClicked(Y.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 Y=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ge=this.textElement.getBBox(),se={x:ge.width*Y,y:ge.height*Y};ee.x-=se.x/2,ee.y-=se.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*Y,12)+"px",this.textElement.style.display="none"}},K.prototype.textEditDivClicked=function(Y){this.text=Y.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(Y,ee){le.prototype.dblClick.call(this,Y,ee),this.showTextEditor()},K.prototype.setColor=function(Y){this.textElement&&ae.setAttributes(this.textElement,[["fill",Y]]),this.color=Y,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Y)},K.prototype.setFont=function(Y){this.textElement&&ae.setAttributes(this.textElement,[["font-family",Y]]),this.fontFamily=Y,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 Y=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){var ee=Y;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),le.prototype.restoreState.call(this,Y),this.setSize()},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee),this.setSize(),this.sizeText(),this.positionTextEditor()},K.typeName="TextMarker",K.title="Text marker",K.icon='',K}(rt),Ue=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.color="transparent",se.lineWidth=3,se.drawing=!1,se.pixelRatio=1,se.color=ge.defaultColor,se.lineWidth=ge.defaultStrokeWidth,se.pixelRatio=ge.freehandPixelRatio,se.setColor=se.setColor.bind(se),se.addCanvas=se.addCanvas.bind(se),se.finishCreation=se.finishCreation.bind(se),se.setLineWidth=se.setLineWidth.bind(se),se.colorPanel=new _e("Color",ge.defaultColorSet,ge.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.lineWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),se.lineWidthPanel.onWidthChanged=se.setLineWidth,se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.drawingImage)},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.drawingImage=ae.createImage(),this.visual.appendChild(this.drawingImage);var Y=ae.createTransform();this.visual.transform.baseVal.appendItem(Y),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function(Y,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(Y.x,Y.y),this.drawing=!0):le.prototype.pointerDown.call(this,Y,ee)},K.prototype.manipulate=function(Y){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Y.x,Y.y),this.canvasContext.stroke()):le.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){le.prototype.resize.call(this,Y),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function(Y){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):le.prototype.pointerUp.call(this,Y)},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 Y=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ee=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ge=ee[0],se=ee[1],Ke=ee[2],Ct=ee[3],Xt=!1,Er=0;Er0&&(Xt=!0,ErCt&&(Ct=Er),Pt>Ke&&(Ke=Pt));if(Xt){this.left=ge/this.pixelRatio,this.top=se/this.pixelRatio,this.width=(Ke-ge)/this.pixelRatio,this.height=(Ct-se)/this.pixelRatio;var Lr=document.createElement("canvas");Lr.width=Ke-ge,Lr.height=Ct-se,Lr.getContext("2d").putImageData(this.canvasContext.getImageData(ge,se,Ke-ge,Ct-se),0,0),this.drawingImgUrl=Lr.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},K.prototype.setDrawingImage=function(){ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},K.prototype.setColor=function(Y){this.color=Y,this.colorChanged(Y)},K.prototype.setLineWidth=function(Y){this.lineWidth=Y},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 Y=Object.assign({drawingImgUrl:this.drawingImgUrl},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){this.createVisual(),le.prototype.restoreState.call(this,Y),this.drawingImgUrl=Y.drawingImgUrl,this.setDrawingImage()},K.prototype.scale=function(Y,ee){le.prototype.scale.call(this,Y,ee),this.setDrawingImage()},K.typeName="FreehandMarker",K.title="Freehand marker",K.icon='',K}(rt),Le=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ge||'')||this;return se.typeBoxes=[],se.currentType=ee,se.setCurrentType=se.setCurrentType.bind(se),se}return pe(K,le),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var ge=function(Ct){var Xt="both";switch(Ct){case 0:Xt="both";break;case 1:Xt="start";break;case 2:Xt="end";break;case 3:Xt="none"}var Er=document.createElement("div");if(Er.style.display="flex",Er.style.flexGrow="2",Er.style.alignItems="center",Er.style.justifyContent="space-between",Er.style.padding="5px",Er.style.borderWidth="2px",Er.style.borderStyle="solid",Er.style.borderColor=Xt===se.currentType?se.uiStyleSettings.toolboxAccentColor:"transparent",Er.addEventListener("click",function(){Y.setCurrentType(Xt,Er)}),ee.appendChild(Er),Xt==="both"||Xt==="start"){var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.innerHTML=` `,Pt.style.marginLeft="5px",Er.appendChild(Pt)}var Lr=document.createElement("div");Lr.style.display="flex",Lr.style.alignItems="center",Lr.style.minHeight="20px",Lr.style.flexGrow="2";var Gr=document.createElement("hr");if(Gr.style.minWidth="20px",Gr.style.border="0px",Gr.style.borderTop="3px solid "+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee"),Gr.style.flexGrow="2",Lr.appendChild(Gr),Er.appendChild(Lr),Xt==="both"||Xt==="end"){var _n=document.createElement("div");_n.style.display="flex",_n.style.alignItems="center",_n.style.minHeight="20px",_n.innerHTML=` `,_n.style.marginRight="5px",Er.appendChild(_n)}se.typeBoxes.push(Er)},se=this,Ke=0;Ke<4;Ke++)ge(Ke);return ee},K.prototype.setCurrentType=function(Y,ee){var ge=this;this.currentType=Y,this.typeBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings!==void 0?ge.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},K}(Q),Me=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.arrowType="end",se.arrowBaseHeight=10,se.arrowBaseWidth=10,se.getArrowPoints=se.getArrowPoints.bind(se),se.setArrowType=se.setArrowType.bind(se),se.arrowTypePanel=new Le("Arrow type","end"),se.arrowTypePanel.onArrowTypeChanged=se.setArrowType,se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.arrow1&&Y!==this.arrow2)},K.prototype.getArrowPoints=function(Y,ee){var ge=this.arrowBaseWidth+2*this.strokeWidth,se=this.arrowBaseHeight+2*this.strokeWidth;return Y-ge/2+","+(ee+se/2)+" "+Y+","+(ee-se/2)+" "+(Y+ge/2)+","+(ee+se/2)},K.prototype.createTips=function(){this.arrow1=ae.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ae.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow2)},K.prototype.pointerDown=function(Y,ee){le.prototype.pointerDown.call(this,Y,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",ae.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ae.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var Y=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(Y,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var ge=this.arrow2.transform.baseVal.getItem(0);ge.setRotate(Y+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ge,0)}},K.prototype.setArrowType=function(Y){this.arrowType=Y,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 Y=Object.assign({arrowType:this.arrowType},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var ee=Y;this.arrowType=ee.arrowType,this.createTips(),this.adjustVisual()},K.typeName="ArrowMarker",K.title="Arrow marker",K.icon='',K}(ct),Ee=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.fillColor=ge.defaultFillColor,se.strokeWidth=0,se.fillPanel=new _e("Color",ge.defaultColorSet,ge.defaultFillColor),se.fillPanel.onColorChanged=se.setFillColor,se}return pe(K,le),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="CoverMarker",K.title="Cover marker",K.icon='',K}(ut),Ce=function(le){function K(Y,ee,ge,se){var Ke=le.call(this,Y,se||'')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=ee,Ke.currentOpacity=ge,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return pe(K,le),K.prototype.getUi=function(){var Y=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(ge){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="center",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=ge===Y.currentOpacity?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentOpacity(ge,se)}),ee.appendChild(se);var Ke=document.createElement("div");Ke.innerText=100*ge+"%",se.appendChild(Ke),Y.opacityBoxes.push(se)}),ee},K.prototype.setCurrentOpacity=function(Y,ee){var ge=this;this.currentOpacity=Y,this.opacityBoxes.forEach(function(se){se.style.borderColor=se===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},K}(Q),ke=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.setOpacity=se.setOpacity.bind(se),se.fillColor=ge.defaultHighlightColor,se.strokeWidth=0,se.opacity=ge.defaultHighlightOpacity,se.fillPanel=new _e("Color",ge.defaultColorSet,se.fillColor),se.fillPanel.onColorChanged=se.setFillColor,se.opacityPanel=new Ce("Opacity",ge.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return pe(K,le),K.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&ae.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 Y=le.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="HighlightMarker",K.title="Highlight marker",K.icon='',K}(Ee),Ne='',He=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.bgColor="transparent",se.tipPosition={x:0,y:0},se.tipBase1Position={x:0,y:0},se.tipBase2Position={x:0,y:0},se.tipMoving=!1,se.color=ge.defaultStrokeColor,se.bgColor=ge.defaultFillColor,se.fontFamily=ge.defaultFontFamily,se.defaultSize={x:100,y:30},se.setBgColor=se.setBgColor.bind(se),se.getTipPoints=se.getTipPoints.bind(se),se.positionTip=se.positionTip.bind(se),se.setTipPoints=se.setTipPoints.bind(se),se.colorPanel=new _e("Text color",ge.defaultColorSet,se.color,''),se.colorPanel.onColorChanged=se.setColor,se.bgColorPanel=new _e("Fill color",ge.defaultColorSet,se.bgColor,Ne),se.bgColorPanel.onColorChanged=se.setBgColor,se.fontFamilyPanel=new $e("Font",ge.defaultFontFamilies,ge.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.tipGrip=new Je,se.tipGrip.visual.transform.baseVal.appendItem(ae.createTransform()),se.controlBox.appendChild(se.tipGrip.visual),se}return pe(K,le),K.prototype.ownsTarget=function(Y){return le.prototype.ownsTarget.call(this,Y)||this.tipGrip.ownsTarget(Y)||this.tip===Y},K.prototype.createTip=function(){ae.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ae.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},K.prototype.pointerDown=function(Y,ee){this.state==="new"&&le.prototype.pointerDown.call(this,Y,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,Y,ee)},K.prototype.pointerUp=function(Y){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,le.prototype.pointerUp.call(this,Y);else{var ee=this.state==="creating";le.prototype.pointerUp.call(this,Y),this.setTipPoints(ee),this.positionTip()}},K.prototype.manipulate=function(Y){if(this.tipMoving){var ee=this.unrotatePoint(Y);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else le.prototype.manipulate.call(this,Y)},K.prototype.setBgColor=function(Y){this.bgRectangle&&this.tip&&(ae.setAttributes(this.bgRectangle,[["fill",Y]]),ae.setAttributes(this.tip,[["fill",Y]])),this.bgColor=Y,this.fillColorChanged(Y)},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(Y){Y===void 0&&(Y=!1);var ee=Math.min(this.height/2,15),ge=this.height/5;Y&&(this.tipPosition={x:ee+ge/2,y:this.height+20});var se=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?se.1)){var Y=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(Y,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var ge=this.tip2.transform.baseVal.getItem(0);ge.setRotate(Y+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ge,0)}},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y),this.createTips(),this.adjustVisual()},K.typeName="MeasurementMarker",K.title="Measurement marker",K.icon='',K}(ct),yt=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.strokePanel.colors=ge.defaultColorSet,se.fillColor="transparent",se}return pe(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 Y=le.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="EllipseFrameMarker",K.title="Ellipse frame marker",K.icon='',K}(tt),Wt=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}(),Ht=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee,ge)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.curveX=0,se.curveY=0,se.manipulationStartCurveX=0,se.manipulationStartCurveY=0,se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.positionGrips=se.positionGrips.bind(se),se.addControlGrips=se.addControlGrips.bind(se),se.adjustVisual=se.adjustVisual.bind(se),se.setupControlBox=se.setupControlBox.bind(se),se.resize=se.resize.bind(se),se.strokeColor=ge.defaultColor,se.strokeWidth=ge.defaultStrokeWidth,se.strokeDasharray=ge.defaultStrokeDasharray,se.strokePanel=new _e("Line color",ge.defaultColorSet,ge.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new dt("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ft("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return pe(K,le),K.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorCurve&&Y!==this.visibleCurve&&!this.curveGrip.ownsTarget(Y))},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=ae.createGroup(),this.selectorCurve=ae.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ae.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(Y,ee){le.prototype.pointerDown.call(this,Y,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Y.x,this.curveY=Y.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()),ae.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setupControlBox=function(){le.prototype.setupControlBox.call(this),this.curveControlLine1=ae.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ae.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 Y=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Y/2,this.curveY-Y/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(Y){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Y.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Y.y-this.manipulationStartY),le.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){this.activeGrip===this.curveGrip&&(this.curveX=Y.x,this.curveY=Y.y),le.prototype.resize.call(this,Y),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(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual()},K.prototype.scale=function(Y,ee){this.curveX=this.curveX*Y,this.curveY=this.curveY*ee,le.prototype.scale.call(this,Y,ee)},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},le.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var ee=Y;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}(at),cr=function(){function le(K,Y){Y===void 0&&(Y=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=K,this.cancelable=Y}return Object.defineProperty(le.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),le.prototype.preventDefault=function(){this._defaultPrevented=!0},le}(),dr=function(le){function K(Y,ee,ge){var se=le.call(this,Y,!1)||this;return se.dataUrl=ee,se.state=ge,se}return pe(K,le),K}(cr),St=function(le){function K(Y,ee,ge){ge===void 0&&(ge=!1);var se=le.call(this,Y,ge)||this;return se.marker=ee,se}return pe(K,le),K}(cr),Kr=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,Y){this[K].push(Y)},le.prototype.removeEventListener=function(K,Y){var ee=this[K].indexOf(Y);ee>-1&&this[K].splice(ee,1)},le}(),Vr=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 Wt,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 Kr,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=le.instanceCounter++,this.styles=new ne(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[Be,Ue,Me,st,yt,tt,ke,He,vt,Ee,ct,Ht]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Be,Ue,Me,st,tt,ke,He]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Be,Ue,Me,st,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(K){var Y=this;this._availableMarkerTypes.splice(0),K.forEach(function(ee){if(typeof ee=="string"){var ge=Y.ALL_MARKER_TYPES.find(function(se){return se.typeName===ee});ge!==void 0&&Y._availableMarkerTypes.push(ge)}else Y._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(),re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},le.prototype.show=function(){var K=this;this.styles.styleSheetRoot===void 0&&te.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=te.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Y){return Y(new cr(K))})},le.prototype.render=function(){return Oe(this,void 0,void 0,function(){var K;return ye(this,function(Y){switch(Y.label){case 0:return this.setCurrentMarker(),(K=new fe).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 Y.sent(),[4,K.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Y.sent()]}})})},le.prototype.close=function(K){var Y=this;if(K===void 0&&(K=!1),this.isOpen){var ee=!1;K||this.eventListeners.beforeclose.forEach(function(ge){var se=new cr(Y,!0);ge(se),se.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(ge){return ge(new cr(Y))}),this.detachEvents(),this._isOpen=!1)}},le.prototype.addMarkersToToolbar=function(){for(var K,Y=[],ee=0;eethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*K:this.editorCanvas.clientWidth,ee=Y',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 Z(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,Y){if(K==="marker"&&Y!==void 0)this.createNewMarker(Y);else if(K==="action")switch(Y){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 Y=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ge){var se=new St(K,K._currentMarker,!0);ge(se),se.defaultPrevented&&(Y=!0)}),!Y){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(ge){return ge(new St(K,ee))})}}},le.prototype.clear=function(){var K=this,Y=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Ct=new St(K,void 0,!0);Ke(Ct),Ct.defaultPrevented&&(Y=!0)}),!Y)){this.setCurrentMarker();for(var ee=function(Ke){var Ct=ge.markers[Ke];ge.setCurrentMarker(ge.markers[Ke]),ge._currentMarker.dispose(),ge.markerImage.removeChild(ge._currentMarker.container),ge.markers.splice(ge.markers.indexOf(ge._currentMarker),1),ge.eventListeners.markerdelete.forEach(function(Xt){return Xt(new St(K,Ct))})},ge=this,se=this.markers.length-1;se>=0;se--)ee(se);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 Y=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===Y.width&&ee.height===Y.height){var ge=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Y),ge1&&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,Y){var ee=this.markerImage.getBoundingClientRect();return{x:(K-ee.left)/this.zoomLevel,y:(Y-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){re.addKey(K)},le.prototype.addEventListener=function(K,Y){this.eventListeners.addEventListener(K,Y)},le.prototype.removeEventListener=function(K,Y){this.eventListeners.removeEventListener(K,Y)},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(Y){return Y(new cr(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(Y){return Y(new cr(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 Yr=function(le,K){return(Yr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,ee){Y.__proto__=ee}||function(Y,ee){for(var ge in ee)Object.prototype.hasOwnProperty.call(ee,ge)&&(Y[ge]=ee[ge])})(le,K)};function vn(le,K){if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function Y(){this.constructor=le}Yr(le,K),le.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}function Or(le,K,Y,ee){return new(Y||(Y=Promise))(function(ge,se){function Ke(Er){try{Xt(ee.next(Er))}catch(Pt){se(Pt)}}function Ct(Er){try{Xt(ee.throw(Er))}catch(Pt){se(Pt)}}function Xt(Er){var Pt;Er.done?ge(Er.value):(Pt=Er.value,Pt instanceof Y?Pt:new Y(function(Lr){Lr(Pt)})).then(Ke,Ct)}Xt((ee=ee.apply(le,K||[])).next())})}function dn(le,K){var Y,ee,ge,se,Ke={label:0,sent:function(){if(1&ge[0])throw ge[1];return ge[1]},trys:[],ops:[]};return se={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Ct(Xt){return function(Er){return function(Pt){if(Y)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(Y=1,ee&&(ge=2&Pt[0]?ee.return:Pt[0]?ee.throw||((ge=ee.return)&&ge.call(ee),0):ee.next)&&!(ge=ge.call(ee,Pt[1])).done)return ge;switch(ee=0,ge&&(Pt=[2&Pt[0],ge.value]),Pt[0]){case 0:case 1:ge=Pt;break;case 4:return Ke.label++,{value:Pt[1],done:!1};case 5:Ke.label++,ee=Pt[1],Pt=[0];continue;case 7:Pt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ge=Ke.trys,(ge=ge.length>0&&ge[ge.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ke=0;continue}if(Pt[0]===3&&(!ge||Pt[1]>ge[0]&&Pt[1]0&&Y>0){var ee=new Yn(K,Y),ge=ee.ratio>=1?20:ee.getHorizontalLength(20),se=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 Ct=Tt.createDefs();Ke.appendChild(Ct);var Xt=Tt.createElement("clipPath",[["id","text-bg-clip"]]);Ct.appendChild(Xt);var Er=Tt.createPath(Tt.getHollowRectanglePath((24-ge)/2,(24-se)/2,ge,se,(24-ge)/2+2,(24-se)/2+2,ge-4,se-4));Ke.appendChild(Er);var Pt=Tt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Pt.appendChild(Tt.createTSpan(K+":"+Y)),Ke.appendChild(Pt);var Lr=Pt.getBBox();Tt.setAttributes(Pt,[["x",((24-Lr.width)/2).toString()],["y",((24-Lr.height)/2-Lr.y).toString()]]);var Gr=Tt.createPath(Tt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Lr.width))/2,(24-Math.ceil(Lr.height))/2,Math.ceil(Lr.width),Math.ceil(Lr.height)));return Xt.appendChild(Gr),Tt.setAttributes(Er,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.outerHTML}return''},le}(),Hn=function(le){function K(Y,ee,ge){var se=le.call(this,Y,ee)||this;return se.isDropdownOpen=!1,se.onClick=se.dropdownButtonClicked,se.dropdownButtons=ge,se}return vn(K,le),K.prototype.setupDropdown=function(){var Y=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=Y.className,ee.colorsClassName=Y.colorsClassName,Y.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}(bn),qr=function(){function le(K,Y){this.GRIP_SIZE=10,this.color=K,this.fillColor=Y,this.visual=Tt.createGroup(),this.visual.appendChild(Tt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Tt.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,Y){this.visual.childNodes.forEach(function(ee){return Tt.setAttributes(ee,[["cx",K.toString()],["cy",Y.toString()]])})},le}(),Un=function(){function le(K,Y,ee,ge){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=K,this.canvasHeight=Y,this.margin=ee,this.container=ge,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&&Tt.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=Tt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Tt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var Y=0;Ythis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-Y.height/2),Tt.setAttributes(this.cropRectElement,[["x",Y.x.toString()],["y",Y.y.toString()],["width",Y.width.toString()],["height",Y.height.toString()]]);var ee=Y.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(se,Ke){var Ct=Y.y+ee*(Ke+1);Tt.setAttributes(se,[["x1",""+Y.x],["y1",""+Ct],["x2",""+(Y.x+Y.width)],["y2",""+Ct]])});var ge=Y.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(se,Ke){var Ct=Y.x+ge*(Ke+1);Tt.setAttributes(se,[["x1",""+Ct],["y1",""+Y.y],["x2",""+Ct],["y2",""+(Y.y+Y.height)]])}),Tt.setAttributes(this.cropShadeElement,[["d",Tt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,Y.x,Y.y,Y.width,Y.height)]]),this.topLeftGrip.setCenter(Y.x,Y.y),this.topRightGrip.setCenter(Y.x+Y.width,Y.y),this.bottomLeftGrip.setCenter(Y.x,Y.y+Y.height),this.bottomRightGrip.setCenter(Y.x+Y.width,Y.y+Y.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,Y){var ee=this.container.getBoundingClientRect();return{x:K-ee.left+this.margin,y:Y-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 Y=this.clientToLocalCoordinates(K.clientX,K.clientY);this.resize(Y)}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 Y=K.x-this.previousPoint.x,ee=K.y-this.previousPoint.y;this.zoomFactor!==1&&(Y=-Y/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+Y),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 Y=Object.assign({},this.cropRect),ee=K.x-this.previousPoint.x,ge=K.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:Y.x+eethis.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-Y.width),Y.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(Y.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),Y.height=this.aspectRatio.getVerticalLength(Y.width)):(Y.y+=ge,Y.height=this.cropRect.y+this.cropRect.height-Y.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?Y.height=this.aspectRatio.getVerticalLength(Y.width):Y.height+=ge}Y.width<10&&(Y.x=this.cropRect.x,Y.width=10),Y.height<10&&(Y.y=this.cropRect.y,Y.height=10),this.previousPoint=K,Y.x>=this.margin&&Y.y>=this.margin&&Y.x-this.margin+Y.width<=this.canvasWidth&&Y.y-this.margin+Y.height<=this.canvasHeight&&(this.cropRect=Y,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,Y=this.cropRect.y+this.cropRect.height/2,ee=this.aspectRatio.getHorizontalLength(this.cropRect.height),ge=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=Y-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,Y,ee,ge,se,Ke){var Ct=ee/K,Xt=ge/Y;return{x:(se.x-Ke)*Ct+Ke,y:(se.y-Ke)*Xt+Ke,width:se.width*Ct,height:se.height*Xt}},le.prototype.scaleCanvas=function(K,Y){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,K,Y,this.cropRect,this.margin);this.canvasWidth=K,this.canvasHeight=Y,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},le}(),di=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();Tt.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 Y="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ee=1;ee<=this.width/5+10;ee++){var ge=ee%5==0?this.height/3:this.height/6;Y+="h4v"+-ge+"h1v"+ge}Y+="v1H0Z",this.scaleShape=Tt.createPath(Y);var se=Tt.createTransform();this.scaleShape.transform.baseVal.appendItem(se),K.appendChild(this.scaleShape),this.angleLabelElement=Tt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Tt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=Tt.createTSpan("");return Ke.innerHTML="°",this.angleLabelElement.appendChild(Ke),K.appendChild(this.angleLabelElement),document.body.removeChild(K),K},le}(),vi=function(){function le(){this.naturalSize=!1,this.imageType="image/png"}return le.prototype.rasterize=function(K,Y,ee,ge,se,Ke,Ct){var Xt=this;return new Promise(function(Er){var Pt=document.createElement("canvas");Pt.width=K.width.baseVal.value-2*ge,Pt.height=K.height.baseVal.value-2*ge;var Lr=1,Gr=1;Xt.naturalSize===!0?(Lr=Y.naturalWidth/(K.width.baseVal.value-2*ge)/Ke,Gr=Y.naturalHeight/(K.height.baseVal.value-2*ge)/Ct,Pt.width=Y.naturalWidth/Ke,Pt.height=Y.naturalHeight/Ct):Xt.width!==void 0&&Xt.height!==void 0&&(Lr=Xt.width/ee.width,Gr=Xt.height/ee.height,Pt.width*=Lr,Pt.height*=Gr);var _n=Pt.getContext("2d");_n.translate(Pt.width/2,Pt.height/2),_n.rotate(se*Math.PI/180),_n.scale(Ke,Ct),_n.translate(-Pt.width/2,-Pt.height/2),_n.drawImage(Y,0,0,Pt.width,Pt.height);var Zn=document.createElement("canvas");Zn.width=ee.width*Lr,Zn.height=ee.height*Gr,Zn.getContext("2d").putImageData(_n.getImageData((ee.x-ge)*Lr,(ee.y-ge)*Gr,ee.width*Lr,ee.height*Gr),0,0),Er(Zn.toDataURL(Xt.imageType,Xt.imageQuality))})},le}(),Ut=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 gr(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(Y){return Y()}),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,Y=this.contentDiv.clientWidth/K>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*K:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=Y+2*this.CANVAS_MARGINK+this.CANVAS_MARGIN?this.target.offsetTop-(K+this.CANVAS_MARGIN):0;this.coverDiv.style.top=Y+"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 an,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 Y=new Ei;Y.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(Y);var ee=[];this.aspectRatios.forEach(function(Gr){var _n=new bn(ci.getIcon(Gr.horizontal,Gr.vertical),Gr.horizontal===0&&Gr.vertical===0?"FREE":Gr.horizontal+":"+Gr.vertical);_n.onClick=function(){return K.ratioButtonClicked(Gr)},ee.push(_n)}),this.aspectRatioButton=new Hn(ci.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,Y.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ge=new bn('',"Toggle grid");ge.isActive=this.isGridVisible,ge.onClick=function(){K.isGridVisible=!K.isGridVisible,ge.isActive=K.isGridVisible},Y.addButton(ge);var se=new bn('',"Zoom to selection");if(se.isActive=this.zoomToCropEnabled,se.onClick=function(){K.zoomToCropEnabled=!K.zoomToCropEnabled,se.isActive=K.zoomToCropEnabled},Y.addButton(se),!hn.isLicensed){var Ke=new lr;this.topToolbar.addElementBlock(Ke);var Ct=document.createElement("div");Ct.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Xt=document.createElement("a");Xt.style.color="currentColor",Xt.href="https://markerjs.com/products/cropro",Xt.target="_blank",Xt.innerHTML='',Ct.appendChild(Xt),Ke.addElement(Ct)}var Er=new Ei;Er.minWidth=3*this.toolbarHeight+"px",Er.contentAlign="end",this.topToolbar.addButtonBlock(Er);var Pt=new bn('',"OK");Pt.onClick=this.startRenderAndClose,Er.addButton(Pt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Pt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Lr=new bn('',"Close");Lr.onClick=this.close,Er.addButton(Lr),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Lr.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},le.prototype.addBottomToolbar=function(){var K=this;this.bottomToolbar=new an,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 Y=new Ei;Y.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(Y);var ee=new bn('',"Rotate left");ee.onClick=this.rotateLeftButtonClicked,Y.addButton(ee);var ge=new bn('',"Rotate right");ge.onClick=this.rotateRightButtonClicked,Y.addButton(ge);var se=new lr;se.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(se),this.straightener=new di("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(Er){K.rotateBy(Er),K.straightener.angle=K.rotationAngle},se.addElement(this.straightener.getUI());var Ke=new Ei;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var Ct=new bn('',"Flip horizontal");Ct.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(Ct);var Xt=new bn('',"Flip vertical");Xt.onClick=this.flipVerticallyButtonClicked,Ke.addButton(Xt)},le.prototype.ratioButtonClicked=function(K){this.aspectRatio=K,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},le.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ci.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 Yn(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 Y=this.cropLayer.getRescaledRect(K.width,K.height,this.imageWidth,this.imageHeight,K.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(Y),this.cropRectChanged(Y),this.flippedHorizontally=K.flippedHorizontally,this.flippedVertically=K.flippedVertically,this.applyFlip(),this.rotationAngle=K.rotationAngle,this.applyRotation()}},le.prototype.clientToLocalCoordinates=function(K,Y){var ee=this.cropImage.getBoundingClientRect();return{x:K-ee.left,y:Y-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 Y=this.editingTargetRotationContainer.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(Y,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 Or(this,void 0,void 0,function(){var K,Y;return dn(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return K=ee.sent(),Y=this.getState(),this.renderEventListeners.forEach(function(ge){return ge(K,Y)}),this.close(!0),[2]}})})},le.prototype.render=function(){return Or(this,void 0,void 0,function(){var K;return dn(this,function(Y){switch(Y.label){case 0:return(K=new vi).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.width=this.renderWidth,K.height=this.renderHeight,this.unzoomFromCrop(),Tt.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 Y.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,Y.sent()]}})})},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new zr("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 zr("toolbar_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarBlockStyleClass=this.styles.addClass(new zr("toolbar-block",` display: flex; align-items: center; box-sizing: content-box; `));var K=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new zr("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 zr("toolbar_button_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new zr("toolbar_active_button",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; background-color: `+this.styles.settings.toolbarBackgroundActiveColor+` `)),this.styles.addRule(new Br("."+this.toolbarButtonStyleClass.name+" svg",` height: `+this.toolbarHeight/2+`px; `)),this.styles.addRule(new Br("."+this.toolbarButtonStyleColorsClass.name+":hover",` background-color: `+this.styles.settings.toolbarBackgroundHoverColor+` `)),this.toolbarDropdownStyleClass=this.styles.addClass(new zr("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 zr("toolbar_dropdown_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new zr("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 zr("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 zr("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `))},le.instanceCounter=0,le}(),_r=j("8hTe"),hi=j.n(_r),xi=/]*>/g;function Di(le){var K=document.createElement("div");return K.innerHTML=le,K.childNodes.length===0?"":K.childNodes[0].nodeValue}var wi=q.a=function(le){var K=le.value,Y=K===void 0?"":K,ee=le.edit,ge=ee===void 0?!1:ee,se=le.className,Ke=le.showTextOnly,Ct=le.showLines,Xt=le.replaces,Er=le.zoomImg,Pt=le.hasMask,Lr=le.style,Gr=Lr===void 0?{}:Lr,_n=le.stylesPrev,Zn=_n===void 0?{}:_n,qn=String(Y),Nn=Object(d.useRef)(),Ni=Object(d.useRef)(),Gi=Object(d.useState)(""),Wn=Object(T.a)(Gi,2),Ti=Wn[0],Ki=Wn[1],ki=Object(d.useState)("office"),ni=Object(T.a)(ki,2),ea=ni[0],Vi=ni[1],ta=function(){var mt=new Ut(Ni.current);mt.displayMode="popup",mt.addRenderEventListener(function(){var wt=Object(y.a)(p.a.mark(function Lt(Dt){var Kt;return p.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Nn.current.style.display="none",ht.next=3,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt}});case 3:Kt=ht.sent,Kt!=null&&Kt.id&&Xt(Ni.current.getAttribute("src").replace(J.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return ht.stop()}},Lt)}));return function(Lt){return wt.apply(this,arguments)}}()),mt.show()},oa=function(){var mt=new Vr(Ni.current);mt.settings.displayMode="popup",mt.addEventListener("render",function(){var wt=Object(y.a)(p.a.mark(function Lt(Dt){var Kt;return p.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(Nn.current.style.display="none",!Ni.current){ht.next=6;break}return ht.next=4,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt.dataUrl}});case 4:Kt=ht.sent,Kt!=null&&Kt.id&&Xt(Ni.current.getAttribute("src").replace(J.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return ht.stop()}},Lt)}));return function(Lt){return wt.apply(this,arguments)}}()),mt.show(),window.markerArea=mt},Li=Object(d.useMemo)(function(){Nn.current&&(Nn.current.style.zIndex=-1);try{var et=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,mt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,wt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;qn=qn.replace(et,"("+J.a.API_SERVER+"/api/attachments/").replace(mt,'"'+J.a.API_SERVER+"/api/attachments/").replace(wt,'"'+J.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(zt){}var Lt=G(qn),Dt=k();if(qn.match(/\[TOC\]/)&&(Lt=Lt.replace("

    [TOC]

    ",R()),S()),Lt=Lt.replace(/(__special_katext_id_\d+__)/g,function(zt,ht){var Ot=Dt[ht],Rt=Ot.type,ur=Ot.expression;return Object(ue.renderToString)(Di(ur)||"",{displayMode:Rt==="block",throwOnError:!1,output:"html"})}),Lt=Lt.replace(/▁/g,"\u2581\u2581\u2581"),I(),Ke){var Kt=document.createElement("div");return Kt.innerHTML=Lt,Kt.innerText}return setTimeout(function(){return ha()},500),Lt},[qn]),$n=Object(d.useRef)();x.WebkitLineClamp=Ct,Ct&&(Gr=Object(m.a)(Object(m.a)({},Gr),x));function ji(et){var mt=et.target;if(mt.tagName.toUpperCase()==="IMG"){if(Er){var wt=mt.getAttribute("src");Ki(wt),Vi("image")}}else if(mt.tagName.toUpperCase()==="A"){var Lt=mt.getAttribute("href");if(Lt.indexOf("office")>-1)et.preventDefault(),Ki(Lt),Vi("office");else if(Lt.indexOf("application/pdf")>-1)et.preventDefault(),Ki(Lt),Vi("pdf");else if(Lt.indexOf("text/html")>-1)et.preventDefault(),Ki(Lt),Vi("html");else if(Lt.startsWith("#")){et.preventDefault();var Dt=document.getElementById(Lt.replace("#",""));Dt&&Dt.scrollIntoView(!0)}}}var ha=function(){var mt,wt=(mt=$n.current)===null||mt===void 0?void 0:mt.querySelectorAll("video");wt==null||wt.forEach(function(Lt){if(Lt.oncontextmenu=function(){return!1},Lt.src.indexOf(".m3u8")>-1&&!Lt.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var Dt=new z.a;Dt.loadSource(Lt.src),Dt.attachMedia(Lt)}}})};Object(d.useEffect)(function(){if($n.current&&Li&&(Li.match(xi)&&window.PR.prettyPrint()),$n.current)return $n.current.addEventListener("click",ji),function(){$n.current.removeEventListener("click",ji),I(),S()}},[Li,$n.current,ji]);var xt=function(mt){if(!ge)return;mt.target.nodeName==="IMG"?(Nn.current.style.zIndex=1,Nn.current.style.display="flex",Nn.current.style.width=mt.target.clientWidth+"px",Nn.current.style.height=mt.target.clientHeight+"px",Nn.current.style.top=mt.target.offsetTop+"px",Nn.current.style.left=mt.target.offsetLeft+"px",Ni.current.src=mt.target.getAttribute("src")):Nn.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:$n,style:Object(m.a)({},Gr),className:"".concat(se||""," markdown-body ").concat(hi.a.mdBody),onMouseOver:xt,dangerouslySetInnerHTML:{__html:Li}}),n.a.createElement("div",{ref:Nn,className:hi.a.button},n.a.createElement(g.a,null,n.a.createElement(M.a,{onClick:function(){return ta()}},"\u88C1\u526A"),n.a.createElement(M.a,{onClick:function(){return oa()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Ni,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(de.a,{close:!0,data:Ti,type:Ti!=null&&Ti.length?ea:"",style:Object(m.a)({},Zn),onClose:function(){return Ki("")}}))}},"9OqN":function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.CTR=function(){var g=N.lib.BlockCipherMode.extend(),O=g.Encryptor=g.extend({processBlock:function(M,m){var y=this._cipher,T=y.blockSize,b=this._iv,p=this._counter;b&&(p=this._counter=b.slice(0),this._iv=void 0);var d=p.slice(0);y.encryptBlock(d,0),p[T-1]=p[T-1]+1|0;for(var n=0;n1&&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 n;d.nonce=(n=p.csp)===null||n===void 0?void 0:n.nonce}d.innerHTML=T;var c=O(p),r=c.firstChild;return p.prepend&&c.prepend?c.prepend(d):p.prepend&&r?c.insertBefore(d,r):c.appendChild(d),d}var m=new Map;function y(T,b){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=O(p);if(!m.has(d)){var n=M("",p),c=n.parentNode;m.set(d,c),c.removeChild(n)}var r=Array.from(m.get(d).children).find(function(s){return s.tagName==="STYLE"&&s[g]===b});if(r){var a,o;if(((a=p.csp)===null||a===void 0?void 0:a.nonce)&&r.nonce!==((o=p.csp)===null||o===void 0?void 0:o.nonce)){var u;r.nonce=(u=p.csp)===null||u===void 0?void 0:u.nonce}return r.innerHTML!==T&&(r.innerHTML=T),r}var h=M(T,p);return h[g]=b,h}},Bd2K:function(F,q,j){(function(N){N(j("VrN/"),j("osHv"))})(function(N){N.defineOption("autoCloseTags",!1,function(p,d,n){if(n!=N.Init&&n&&p.removeKeyMap("autoCloseTags"),!d)return;var c={name:"autoCloseTags"};(typeof d!="object"||d.whenClosing!==!1)&&(c["'/'"]=function(r){return y(r)}),(typeof d!="object"||d.whenOpening!==!1)&&(c["'>'"]=function(r){return M(r)}),p.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["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 M(p){if(p.getOption("disableInput"))return N.Pass;for(var d=p.listSelections(),n=[],c=p.getOption("autoCloseTags"),r=0;ra.ch&&(l=l.slice(0,l.length-o.end+a.ch));var f=l.toLowerCase();if(!l||o.type=="string"&&(o.end!=a.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&s.close||o.string.indexOf("/")==a.ch-o.start-1||S&&T(S,f)>-1||b(p,u.mode.xmlCurrentContext&&u.mode.xmlCurrentContext(h)||[],l,a,!0))return N.Pass;var R=typeof c=="object"&&c.emptyTags;if(R&&T(R,l)>-1){n[r]={text:"/>",newPos:N.Pos(a.line,a.ch+2)};continue}var C=x&&T(x,f)>-1;n[r]={indent:C,text:">"+(C?` `:"")+"",newPos:C?N.Pos(a.line+1,0):N.Pos(a.line,a.ch+1)}}for(var v=typeof c=="object"&&c.dontIndentOnAutoClose,r=d.length-1;r>=0;r--){var _=n[r];p.replaceRange(_.text,d[r].head,d[r].anchor,"+insert");var E=p.listSelections().slice(0);E[r]={head:_.newPos,anchor:_.newPos},p.setSelections(E),!v&&_.indent&&(p.indentLine(_.newPos.line,null,!0),p.indentLine(_.newPos.line+1,null,!0))}}function m(p,d){for(var n=p.listSelections(),c=[],r=d?"/":""&&(S+=">"),c[u]=S}if(p.replaceSelections(c),n=p.listSelections(),!o)for(var u=0;u=0&&d[h]==n;h--)++u;c=o.to;for(var h=1;h0){for(var d=0;d1&&arguments[1]!==void 0?arguments[1]:"",d=[],n=0;nUe.length)&&(Le=Ue.length);for(var Me=0,Ee=new Array(Le);Me=Ue.length?{done:!0}:{done:!1,value:Ue[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=Ue[Symbol.iterator](),Me.next.bind(Me)}function y(Ue,Le){return Le={exports:{}},Ue(Le,Le.exports),Le.exports}var T=y(function(Ue){function Le(){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){Ue.exports.defaults=Ee}Ue.exports={defaults:Le(),getDefaults:Le,changeDefaults:Me}}),b=T.defaults,p=T.getDefaults,d=T.changeDefaults,n=/[&<>"']/,c=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},u=function(Le){return o[Le]};function h(Ue,Le){if(Le){if(n.test(Ue))return Ue.replace(c,u)}else if(r.test(Ue))return Ue.replace(a,u);return Ue}var s=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(Ue){return Ue.replace(s,function(Le,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 t=/(^|[^\[])\^/g;function S(Ue,Le){Ue=Ue.source||Ue,Le=Le||"";var Me={replace:function(Ce,ke){return ke=ke.source||ke,ke=ke.replace(t,"$1"),Ue=Ue.replace(Ce,ke),Me},getRegex:function(){return new RegExp(Ue,Le)}};return Me}var x=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(Ue,Le,Me){if(Ue){var Ee;try{Ee=decodeURIComponent(l(Me)).replace(x,"").toLowerCase()}catch(Ce){return null}if(Ee.indexOf("javascript:")===0||Ee.indexOf("vbscript:")===0||Ee.indexOf("data:")===0)return null}Le&&!f.test(Me)&&(Me=w(Le,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(Ce){return null}return Me}var C={},v=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function w(Ue,Le){C[" "+Ue]||(v.test(Ue)?C[" "+Ue]=Ue+"/":C[" "+Ue]=V(Ue,"/",!0)),Ue=C[" "+Ue];var Me=Ue.indexOf(":")===-1;return Le.substring(0,2)==="//"?Me?Le:Ue.replace(_,"$1")+Le:Le.charAt(0)==="/"?Me?Le:Ue.replace(E,"$1")+Le:Ue+Le}var k={exec:function(){}};function I(Ue){for(var Le=1,Me,Ee;Le=0&&He[vt]==="\\";)tt=!tt;return tt?"|":" |"}),Ee=Me.split(/ \|/),Ce=0;if(Ee.length>Le)Ee.splice(Le);else for(;Ee.length=Ee.length?Ce.slice(Ee.length):Ce}).join(` `)}var Ae=function(){function Ue(Me){this.options=Me||B}var Le=Ue.prototype;return Le.space=function(Ee){var Ce=this.rules.block.newline.exec(Ee);if(Ce)return Ce[0].length>1?{type:"space",raw:Ce[0]}:{raw:` `}},Le.code=function(Ee,Ce){var ke=this.rules.block.code.exec(Ee);if(ke){var Ne=Ce[Ce.length-1];if(Ne&&Ne.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var He=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?He:P(He,` `)}}},Le.fences=function(Ee){var Ce=this.rules.block.fences.exec(Ee);if(Ce){var ke=Ce[0],Ne=Se(ke,Ce[3]||"");return{type:"code",raw:ke,lang:Ce[2]?Ce[2].trim():Ce[2],text:Ne}}},Le.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]}},Le.nptable=function(Ee){var Ce=this.rules.block.nptable.exec(Ee);if(Ce){var ke={type:"table",header:z(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 Ne=ke.align.length,He;for(He=0;He ?/gm,"");return{type:"blockquote",raw:Ce[0],text:ke}}},Le.list=function(Ee){var Ce=this.rules.block.list.exec(Ee);if(Ce){for(var ke=Ce[0],Ne=Ce[2],He=Ne.length>1,tt=Ne[Ne.length-1]===")",vt={type:"list",raw:ke,ordered:He,start:He?+Ne.slice(0,-1):"",loose:!1,items:[]},yt=Ce[0].match(this.rules.block.item),Wt=!1,Ht,cr,dr,St,Kr,Vr,Yr,vn=yt.length,Or=0;Or1||this.options.smartLists&&dr!==Ne)&&(St=yt.slice(Or+1).join(` `),vt.raw=vt.raw.substring(0,vt.raw.length-St.length),Or=vn-1)),Kr=Wt||/\n\n(?!\s*$)/.test(Ht),Or!==vn-1&&(Wt=Ht.charAt(Ht.length-1)===` `,Kr||(Kr=Wt)),Kr&&(vt.loose=!0),Vr=/^\[[ xX]\] /.test(Ht),Yr=void 0,Vr&&(Yr=Ht[1]!==" ",Ht=Ht.replace(/^\[[ xX]\] +/,"")),vt.items.push({type:"list_item",raw:ke,task:Vr,checked:Yr,loose:Kr,text:Ht});return vt}},Le.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]):J(Ce[0]):Ce[0]}},Le.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]}}},Le.table=function(Ee){var Ce=this.rules.block.table.exec(Ee);if(Ce){var ke={type:"table",header:z(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 Ne=ke.align.length,He;for(He=0;He/i.test(Ne[0])&&(Ce=!1),!ke&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ne[0])?ke=!0:ke&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ne[0])&&(ke=!1),{type:this.options.sanitize?"text":"html",raw:Ne[0],inLink:Ce,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):J(Ne[0]):Ne[0]}},Le.link=function(Ee){var Ce=this.rules.inline.link.exec(Ee);if(Ce){var ke=ue(Ce[2],"()");if(ke>-1){var Ne=Ce[0].indexOf("!")===0?5:4,He=Ne+Ce[1].length+ke;Ce[2]=Ce[2].substring(0,ke),Ce[0]=Ce[0].substring(0,He).trim(),Ce[3]=""}var tt=Ce[2],vt="";if(this.options.pedantic){var yt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(tt);yt?(tt=yt[1],vt=yt[3]):vt=""}else vt=Ce[3]?Ce[3].slice(1,-1):"";tt=tt.trim().replace(/^<([\s\S]*)>$/,"$1");var Wt=de(Ce,{href:tt&&tt.replace(this.rules.inline._escapes,"$1"),title:vt&&vt.replace(this.rules.inline._escapes,"$1")},Ce[0]);return Wt}},Le.reflink=function(Ee,Ce){var ke;if((ke=this.rules.inline.reflink.exec(Ee))||(ke=this.rules.inline.nolink.exec(Ee))){var Ne=(ke[2]||ke[1]).replace(/\s+/g," ");if(Ne=Ce[Ne.toLowerCase()],!Ne||!Ne.href){var He=ke[0].charAt(0);return{type:"text",raw:He,text:He}}var tt=de(ke,Ne,ke[0]);return tt}},Le.strong=function(Ee,Ce,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.strong.start.exec(Ee);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Ce=Ce.slice(-1*Ee.length);var He=Ne[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;He.lastIndex=0;for(var tt;(Ne=He.exec(Ce))!=null;)if(tt=this.rules.inline.strong.middle.exec(Ce.slice(0,Ne.index+3)),tt)return{type:"strong",raw:Ee.slice(0,tt[0].length),text:Ee.slice(2,tt[0].length-2)}}},Le.em=function(Ee,Ce,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.em.start.exec(Ee);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Ce=Ce.slice(-1*Ee.length);var He=Ne[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;He.lastIndex=0;for(var tt;(Ne=He.exec(Ce))!=null;)if(tt=this.rules.inline.em.middle.exec(Ce.slice(0,Ne.index+2)),tt)return{type:"em",raw:Ee.slice(0,tt[0].length),text:Ee.slice(1,tt[0].length-1)}}},Le.codespan=function(Ee){var Ce=this.rules.inline.code.exec(Ee);if(Ce){var ke=Ce[2].replace(/\n/g," "),Ne=/[^ ]/.test(ke),He=ke.startsWith(" ")&&ke.endsWith(" ");return Ne&&He&&(ke=ke.substring(1,ke.length-1)),ke=J(ke,!0),{type:"codespan",raw:Ce[0],text:ke}}},Le.br=function(Ee){var Ce=this.rules.inline.br.exec(Ee);if(Ce)return{type:"br",raw:Ce[0]}},Le.del=function(Ee){var Ce=this.rules.inline.del.exec(Ee);if(Ce)return{type:"del",raw:Ce[0],text:Ce[1]}},Le.autolink=function(Ee,Ce){var ke=this.rules.inline.autolink.exec(Ee);if(ke){var Ne,He;return ke[2]==="@"?(Ne=J(this.options.mangle?Ce(ke[1]):ke[1]),He="mailto:"+Ne):(Ne=J(ke[1]),He=Ne),{type:"link",raw:ke[0],text:Ne,href:He,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Le.url=function(Ee,Ce){var ke;if(ke=this.rules.inline.url.exec(Ee)){var Ne,He;if(ke[2]==="@")Ne=J(this.options.mangle?Ce(ke[0]):ke[0]),He="mailto:"+Ne;else{var tt;do tt=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while(tt!==ke[0]);Ne=J(ke[0]),ke[1]==="www."?He="http://"+Ne:He=Ne}return{type:"link",raw:ke[0],text:Ne,href:He,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Le.inlineText=function(Ee,Ce,ke){var Ne=this.rules.inline.text.exec(Ee);if(Ne){var He;return Ce?He=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):J(Ne[0]):Ne[0]:He=J(this.options.smartypants?ke(Ne[0]):Ne[0]),{type:"text",raw:Ne[0],text:He}}},Ue}(),pe=G.noopTest,Oe=G.edit,ye=G.merge,ce={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:pe,table:pe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ce._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ce.def=Oe(ce.def).replace("label",ce._label).replace("title",ce._title).getRegex(),ce.bullet=/(?:[*+-]|\d{1,9}[.)])/,ce.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ce.item=Oe(ce.item,"gm").replace(/bull/g,ce.bullet).getRegex(),ce.list=Oe(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex(),ce._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",ce._comment=//,ce.html=Oe(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ce.paragraph=Oe(ce._paragraph).replace("hr",ce.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",ce._tag).getRegex(),ce.blockquote=Oe(ce.blockquote).replace("paragraph",ce.paragraph).getRegex(),ce.normal=ye({},ce),ce.gfm=ye({},ce.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*|$)"}),ce.gfm.nptable=Oe(ce.gfm.nptable).replace("hr",ce.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",ce._tag).getRegex(),ce.gfm.table=Oe(ce.gfm.table).replace("hr",ce.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",ce._tag).getRegex(),ce.pedantic=ye({},ce.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._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:pe,paragraph:Oe(ce.normal._paragraph).replace("hr",ce.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ae={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:pe,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:pe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ae.punctuation=Oe(ae.punctuation).replace(/punctuation/g,ae._punctuation).getRegex(),ae._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ae._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ae.em.start=Oe(ae.em.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.middle=Oe(ae.em.middle).replace(/punctuation/g,ae._punctuation).replace(/overlapSkip/g,ae._overlapSkip).getRegex(),ae.em.endAst=Oe(ae.em.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.endUnd=Oe(ae.em.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.start=Oe(ae.strong.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.middle=Oe(ae.strong.middle).replace(/punctuation/g,ae._punctuation).replace(/blockSkip/g,ae._blockSkip).getRegex(),ae.strong.endAst=Oe(ae.strong.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.endUnd=Oe(ae.strong.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.blockSkip=Oe(ae._blockSkip,"g").getRegex(),ae.overlapSkip=Oe(ae._overlapSkip,"g").getRegex(),ae._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ae._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ae._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])?)+(?![-_])/,ae.autolink=Oe(ae.autolink).replace("scheme",ae._scheme).replace("email",ae._email).getRegex(),ae._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ae.tag=Oe(ae.tag).replace("comment",ce._comment).replace("attribute",ae._attribute).getRegex(),ae._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ae._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ae._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ae.link=Oe(ae.link).replace("label",ae._label).replace("href",ae._href).replace("title",ae._title).getRegex(),ae.reflink=Oe(ae.reflink).replace("label",ae._label).getRegex(),ae.reflinkSearch=Oe(ae.reflinkSearch,"g").replace("reflink",ae.reflink).replace("nolink",ae.nolink).getRegex(),ae.normal=ye({},ae),ae.pedantic=ye({},ae.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:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",ae._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae._label).getRegex()}),ae.gfm=ye({},ae.normal,{escape:Oe(ae.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)),Le+="&#"+Ee+";";return Le}var Z=function(){function Ue(Me){this.tokens=[],this.tokens.links=Object.create(null),this.options=Me||fe,this.options.tokenizer=this.options.tokenizer||new Ae,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ee={block:te.normal,inline:ne.normal};this.options.pedantic?(Ee.block=te.pedantic,Ee.inline=ne.pedantic):this.options.gfm&&(Ee.block=te.gfm,this.options.breaks?Ee.inline=ne.breaks:Ee.inline=ne.gfm),this.tokenizer.rules=Ee}Ue.lex=function(Ee,Ce){var ke=new Ue(Ce);return ke.lex(Ee)};var Le=Ue.prototype;return Le.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},Le.blockTokens=function(Ee,Ce,ke){Ce===void 0&&(Ce=[]),ke===void 0&&(ke=!0),Ee=Ee.replace(/^ +$/gm,"");for(var Ne,He,tt,vt;Ee;){if(Ne=this.tokenizer.space(Ee)){Ee=Ee.substring(Ne.raw.length),Ne.type&&Ce.push(Ne);continue}if(Ne=this.tokenizer.code(Ee,Ce)){Ee=Ee.substring(Ne.raw.length),Ne.type?Ce.push(Ne):(vt=Ce[Ce.length-1],vt.raw+=` `+Ne.raw,vt.text+=` `+Ne.text);continue}if(Ne=this.tokenizer.fences(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(Ne=this.tokenizer.heading(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(Ne=this.tokenizer.nptable(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(Ne=this.tokenizer.hr(Ee)){Ee=Ee.substring(Ne.raw.length),Ce.push(Ne);continue}if(Ne=this.tokenizer.blockquote(Ee)){Ee=Ee.substring(Ne.raw.length),Ne.tokens=this.blockTokens(Ne.text,[],ke),Ce.push(Ne);continue}if(Ne=this.tokenizer.list(Ee)){for(Ee=Ee.substring(Ne.raw.length),tt=Ne.items.length,He=0;He0)for(;(yt=this.tokenizer.rules.inline.reflinkSearch.exec(vt))!=null;)Wt.includes(yt[0].slice(yt[0].lastIndexOf("[")+1,-1))&&(vt=vt.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+vt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(yt=this.tokenizer.rules.inline.blockSkip.exec(vt))!=null;)vt=vt.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+vt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Ee;){if(tt=this.tokenizer.escape(Ee)){Ee=Ee.substring(tt.raw.length),Ce.push(tt);continue}if(tt=this.tokenizer.tag(Ee,ke,Ne)){Ee=Ee.substring(tt.raw.length),ke=tt.inLink,Ne=tt.inRawBlock,Ce.push(tt);continue}if(tt=this.tokenizer.link(Ee)){Ee=Ee.substring(tt.raw.length),tt.type==="link"&&(tt.tokens=this.inlineTokens(tt.text,[],!0,Ne)),Ce.push(tt);continue}if(tt=this.tokenizer.reflink(Ee,this.tokens.links)){Ee=Ee.substring(tt.raw.length),tt.type==="link"&&(tt.tokens=this.inlineTokens(tt.text,[],!0,Ne)),Ce.push(tt);continue}if(tt=this.tokenizer.strong(Ee,vt,He)){Ee=Ee.substring(tt.raw.length),tt.tokens=this.inlineTokens(tt.text,[],ke,Ne),Ce.push(tt);continue}if(tt=this.tokenizer.em(Ee,vt,He)){Ee=Ee.substring(tt.raw.length),tt.tokens=this.inlineTokens(tt.text,[],ke,Ne),Ce.push(tt);continue}if(tt=this.tokenizer.codespan(Ee)){Ee=Ee.substring(tt.raw.length),Ce.push(tt);continue}if(tt=this.tokenizer.br(Ee)){Ee=Ee.substring(tt.raw.length),Ce.push(tt);continue}if(tt=this.tokenizer.del(Ee)){Ee=Ee.substring(tt.raw.length),tt.tokens=this.inlineTokens(tt.text,[],ke,Ne),Ce.push(tt);continue}if(tt=this.tokenizer.autolink(Ee,ie)){Ee=Ee.substring(tt.raw.length),Ce.push(tt);continue}if(!ke&&(tt=this.tokenizer.url(Ee,ie))){Ee=Ee.substring(tt.raw.length),Ce.push(tt);continue}if(tt=this.tokenizer.inlineText(Ee,Ne,Te)){Ee=Ee.substring(tt.raw.length),He=tt.raw.slice(-1),Ce.push(tt);continue}if(Ee){var Ht="Infinite loop on byte: "+Ee.charCodeAt(0);if(this.options.silent){console.error(Ht);break}else throw new Error(Ht)}}return Ce},g(Ue,null,[{key:"rules",get:function(){return{block:te,inline:ne}}}]),Ue}(),X=T.defaults,Q=G.cleanUrl,_e=G.escape,ve=function(){function Ue(Me){this.options=Me||X}var Le=Ue.prototype;return Le.code=function(Ee,Ce,ke){var Ne=(Ce||"").match(/\S*/)[0];if(this.options.highlight){var He=this.options.highlight(Ee,Ne);He!=null&&He!==Ee&&(ke=!0,Ee=He)}return Ne?'
    '+(ke?Ee:_e(Ee,!0))+`
    `:"
    "+(ke?Ee:_e(Ee,!0))+`
    `},Le.blockquote=function(Ee){return`
    `+Ee+`
    `},Le.html=function(Ee){return Ee},Le.heading=function(Ee,Ce,ke,Ne){return this.options.headerIds?"'+Ee+" `:""+Ee+" `},Le.hr=function(){return this.options.xhtml?`
    `:`
    `},Le.list=function(Ee,Ce,ke){var Ne=Ce?"ol":"ul",He=Ce&&ke!==1?' start="'+ke+'"':"";return"<"+Ne+He+`> `+Ee+" `},Le.listitem=function(Ee){return"
  • "+Ee+`
  • `},Le.checkbox=function(Ee){return" "},Le.paragraph=function(Ee){return"

    "+Ee+`

    `},Le.table=function(Ee,Ce){return Ce&&(Ce=""+Ce+""),` `+Ee+` `+Ce+`
    `},Le.tablerow=function(Ee){return` `+Ee+` `},Le.tablecell=function(Ee,Ce){var ke=Ce.header?"th":"td",Ne=Ce.align?"<"+ke+' align="'+Ce.align+'">':"<"+ke+">";return Ne+Ee+" `},Le.strong=function(Ee){return""+Ee+""},Le.em=function(Ee){return""+Ee+""},Le.codespan=function(Ee){return""+Ee+""},Le.br=function(){return this.options.xhtml?"
    ":"
    "},Le.del=function(Ee){return""+Ee+""},Le.link=function(Ee,Ce,ke){if(Ee=Q(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return ke;var Ne='",Ne},Le.image=function(Ee,Ce,ke){if(Ee=Q(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return ke;var Ne=''+ke+'":">",Ne},Le.text=function(Ee){return Ee},Ue}(),Re=function(){function Ue(){}var Le=Ue.prototype;return Le.strong=function(Ee){return Ee},Le.em=function(Ee){return Ee},Le.codespan=function(Ee){return Ee},Le.del=function(Ee){return Ee},Le.html=function(Ee){return Ee},Le.text=function(Ee){return Ee},Le.link=function(Ee,Ce,ke){return""+ke},Le.image=function(Ee,Ce,ke){return""+ke},Le.br=function(){return""},Ue}(),Je=function(){function Ue(){this.seen={}}var Le=Ue.prototype;return Le.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},Ue}(),qe=T.defaults,rt=G.unescape,ut=function(){function Ue(Me){this.options=Me||qe,this.options.renderer=this.options.renderer||new ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Re,this.slugger=new Je}Ue.parse=function(Ee,Ce){var ke=new Ue(Ce);return ke.parse(Ee)};var Le=Ue.prototype;return Le.parse=function(Ee,Ce){Ce===void 0&&(Ce=!0);var ke="",Ne,He,tt,vt,yt,Wt,Ht,cr,dr,St,Kr,Vr,Yr,vn,Or,dn,hn,Tt,gr=Ee.length;for(Ne=0;Ne0&&Or.tokens[0].type==="text"?(Or.tokens[0].text=Tt+" "+Or.tokens[0].text,Or.tokens[0].tokens&&Or.tokens[0].tokens.length>0&&Or.tokens[0].tokens[0].type==="text"&&(Or.tokens[0].tokens[0].text=Tt+" "+Or.tokens[0].tokens[0].text)):Or.tokens.unshift({type:"text",text:Tt}):vn+=Tt),vn+=this.parse(Or.tokens,Yr),dr+=this.renderer.listitem(vn,hn,dn);ke+=this.renderer.list(dr,Kr,Vr);continue}case"html":{ke+=this.renderer.html(St.text);continue}case"paragraph":{ke+=this.renderer.paragraph(this.parseInline(St.tokens));continue}case"text":{for(dr=St.tokens?this.parseInline(St.tokens):St.text;Ne+1An error occurred:

    "+Be(tt.message+"",!0)+"
    ";throw tt}}$e.options=$e.setOptions=function(Ue){return dt($e.defaults,Ue),at($e.defaults),$e},$e.getDefaults=Ie,$e.defaults=ct,$e.use=function(Ue){var Le=dt({},Ue);if(Ue.renderer&&function(){var Ee=$e.defaults.renderer||new ve,Ce=function(He){var tt=Ee[He];Ee[He]=function(){for(var vt=arguments.length,yt=new Array(vt),Wt=0;Wt>>24)&16711935|(n[r]<<24|n[r]>>>8)&4278255360;var a=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],o=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var r=0;r<4;r++)d.call(this);for(var r=0;r<8;r++)o[r]^=a[r+4&7];if(c){var u=c.words,h=u[0],s=u[1],l=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,t=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,S=l>>>16|t&4294901760,x=t<<16|l&65535;o[0]^=l,o[1]^=S,o[2]^=t,o[3]^=x,o[4]^=l,o[5]^=S,o[6]^=t,o[7]^=x;for(var r=0;r<4;r++)d.call(this)}},_doProcessBlock:function(n,c){var r=this._X;d.call(this),y[0]=r[0]^r[5]>>>16^r[3]<<16,y[1]=r[2]^r[7]>>>16^r[5]<<16,y[2]=r[4]^r[1]>>>16^r[7]<<16,y[3]=r[6]^r[3]>>>16^r[1]<<16;for(var a=0;a<4;a++)y[a]=(y[a]<<8|y[a]>>>24)&16711935|(y[a]<<24|y[a]>>>8)&4278255360,n[c+a]^=y[a]},blockSize:128/32,ivSize:64/32});function d(){for(var n=this._X,c=this._C,r=0;r<8;r++)T[r]=c[r];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0>>0?1:0)|0,this._b=c[7]>>>0>>0?1:0;for(var r=0;r<8;r++){var a=n[r]+c[r],o=a&65535,u=a>>>16,h=((o*o>>>17)+o*u>>>15)+u*u,s=((a&4294901760)*a|0)+((a&65535)*a|0);b[r]=h^s}n[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,n[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,n[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,n[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,n[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,n[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,n[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,n[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}g.Rabbit=M._createHelper(p)}(),N.Rabbit})},ELLl:function(F,q,j){(function(N){N(j("VrN/"))})(function(N){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=N.Pos;N.defineOption("autoCloseBrackets",!1,function(o,u,h){h&&h!=N.Init&&(o.removeKeyMap(m),o.state.closeBrackets=null),u&&(y(M(u,"pairs")),o.state.closeBrackets=u,o.addKeyMap(m))});function M(o,u){return u=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[u]!=null?o[u]:g[u]}var m={Backspace:p,Enter:d};function y(o){for(var u=0;u=0;l--){var S=s[l].head;o.replaceRange("",O(S.line,S.ch-1),O(S.line,S.ch+1),"+delete")}}function d(o){var u=b(o),h=u&&M(u,"explode");if(!h||o.getOption("disableInput"))return N.Pass;for(var s=o.listSelections(),l=0;l0;return{anchor:new O(o.anchor.line,o.anchor.ch+(u?-1:1)),head:new O(o.head.line,o.head.ch+(u?1:-1))}}function c(o,u){var h=b(o);if(!h||o.getOption("disableInput"))return N.Pass;var s=M(h,"pairs"),l=s.indexOf(u);if(l==-1)return N.Pass;for(var t=M(h,"closeBefore"),S=M(h,"triples"),x=s.charAt(l+1)==u,f=o.listSelections(),R=l%2==0,C,v=0;v=0&&o.getRange(E,O(E.line,E.ch+3))==u+u+u?w="skipThree":w="skip";else if(x&&E.ch>1&&S.indexOf(u)>=0&&o.getRange(O(E.line,E.ch-2),E)==u+u){if(E.ch>2&&/\bstring/.test(o.getTokenTypeAt(O(E.line,E.ch-2))))return N.Pass;w="addFour"}else if(x){var I=E.ch==0?" ":o.getRange(O(E.line,E.ch-1),E);if(!N.isWordChar(k)&&I!=u&&!N.isWordChar(I))w="both";else return N.Pass}else if(R&&(k.length===0||/\s/.test(k)||t.indexOf(k)>-1))w="both";else return N.Pass;if(!C)C=w;else if(C!=w)return N.Pass}var L=l%2?s.charAt(l-1):u,V=l%2?u:s.charAt(l+1);o.operation(function(){if(C=="skip")o.execCommand("goCharRight");else if(C=="skipThree")for(var W=0;W<3;W++)o.execCommand("goCharRight");else if(C=="surround"){for(var H=o.getSelections(),W=0;W>>24)&16711935|(C<<24|C>>>8)&4278255360}var v=this._hash.words,_=c.words,E=r.words,w=b.words,k=p.words,I=d.words,L=n.words,V,W,H,G,B,P,z,J,ue,de;P=V=v[0],z=W=v[1],J=H=v[2],ue=G=v[3],de=B=v[4];for(var Se,f=0;f<80;f+=1)Se=V+S[x+w[f]]|0,f<16?Se+=o(W,H,G)+_[0]:f<32?Se+=u(W,H,G)+_[1]:f<48?Se+=h(W,H,G)+_[2]:f<64?Se+=s(W,H,G)+_[3]:Se+=l(W,H,G)+_[4],Se=Se|0,Se=t(Se,I[f]),Se=Se+B|0,V=B,B=G,G=t(H,10),H=W,W=Se,Se=P+S[x+k[f]]|0,f<16?Se+=l(z,J,ue)+E[0]:f<32?Se+=s(z,J,ue)+E[1]:f<48?Se+=h(z,J,ue)+E[2]:f<64?Se+=u(z,J,ue)+E[3]:Se+=o(z,J,ue)+E[4],Se=Se|0,Se=t(Se,L[f]),Se=Se+de|0,P=de,de=ue,ue=t(J,10),J=z,z=Se;Se=v[1]+H+ue|0,v[1]=v[2]+G+de|0,v[2]=v[3]+B+P|0,v[3]=v[4]+V+z|0,v[4]=v[0]+W+J|0,v[0]=Se},_doFinalize:function(){var S=this._data,x=S.words,f=this._nDataBytes*8,R=S.sigBytes*8;x[R>>>5]|=128<<24-R%32,x[(R+64>>>9<<4)+14]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,S.sigBytes=(x.length+1)*4,this._process();for(var C=this._hash,v=C.words,_=0;_<5;_++){var E=v[_];v[_]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return C},clone:function(){var S=y.clone.call(this);return S._hash=this._hash.clone(),S}});function o(S,x,f){return S^x^f}function u(S,x,f){return S&x|~S&f}function h(S,x,f){return(S|~x)^f}function s(S,x,f){return S&f|x&~f}function l(S,x,f){return S^(x|~f)}function t(S,x){return S<>>32-x}O.RIPEMD160=y._createHelper(a),O.HmacRIPEMD160=y._createHmacHelper(a)}(Math),N.RIPEMD160})},ETIr:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=g.enc,y=m.Base64={stringify:function(b){var p=b.words,d=b.sigBytes,n=this._map;b.clamp();for(var c=[],r=0;r>>2]>>>24-r%4*8&255,o=p[r+1>>>2]>>>24-(r+1)%4*8&255,u=p[r+2>>>2]>>>24-(r+2)%4*8&255,h=a<<16|o<<8|u,s=0;s<4&&r+s*.75>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;c.length%4;)c.push(l);return c.join("")},parse:function(b){var p=b.length,d=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var c=0;c>>6-r%4*2,u=a|o;n[c>>>2]|=u<<24-c%4*8,c++}return M.create(n,c)}}(),N.enc.Base64})},"F+F2":function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(){if(typeof ArrayBuffer!="function")return;var g=N,O=g.lib,M=O.WordArray,m=M.init,y=M.init=function(T){if(T instanceof ArrayBuffer&&(T=new Uint8Array(T)),(T instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&T instanceof Uint8ClampedArray||T instanceof Int16Array||T instanceof Uint16Array||T instanceof Int32Array||T instanceof Uint32Array||T instanceof Float32Array||T instanceof Float64Array)&&(T=new Uint8Array(T.buffer,T.byteOffset,T.byteLength)),T instanceof Uint8Array){for(var b=T.byteLength,p=[],d=0;d>>2]|=T[d]<<24-d%4*8;m.call(this,p,b)}else m.apply(this,arguments)};y.prototype=M}(),N.lib.WordArray})},GRO8:function(F,q,j){"use strict";j.r(q);var N=j("k1fw"),g=j("2qtc"),O=j("kLXV"),M=j("lUTK"),m=j("BvKs"),y=j("+L6B"),T=j("2/Rp"),b=j("T2oS"),p=j("W9HT"),d=j("sPJy"),n=j("bE4q"),c=j("miYZ"),r=j("tsqr"),a=j("9og8"),o=j("tJVT"),u=j("PpiC"),h=j("WmNS"),s=j.n(h),l=j("q1tI"),t=j.n(l),S=j("Ty5D"),x=j("55Ip"),f=j("9kvl"),R=j("KeDT"),C=j.n(R),v=j("zrhs"),_=j("DZo9"),E=j("8z0m"),w=j("LtfV"),k=j("KhGG"),I=E.a.Dragger,L=function(et){var mt=et.user,wt=et.dispatch,Lt=et.classroomList,Dt=et.shixunsDetail,Kt=et.getResults,zt=Object(S.i)(),ht=Object(l.useState)(),Ot=Object(o.a)(ht,2),Rt=Ot[0],ur=Ot[1],ar=Object(l.useState)([]),Zt=Object(o.a)(ar,2),$t=Zt[0],rr=Zt[1],sr=Object(l.useState)(!1),ot=Object(o.a)(sr,2),Ar=ot[0],Nr=ot[1],fr={onRemove:function(){rr([])},beforeUpload:function(It){if(console.log(It),(It==null?void 0:It.size)>1024*1024*500)return r.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var Et=[];return Et.push(It),rr([].concat(Et)),!1},fileList:$t};return t.a.createElement(O.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Dt.actionTabs.key==="md-tab",confirmLoading:Ar,onOk:Object(a.a)(s.a.mark(function _t(){var It,Et,Nt;return s.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:if(!(($t==null?void 0:$t.length)<=0)){pr.next=3;break}return r.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),pr.abrupt("return");case 3:return Nr(!0),pr.next=6,Object(k.c)($t[0],{login:(It=mt.userInfo)===null||It===void 0?void 0:It.login,container_type:"Competition",container_id:Dt.actionTabs.params.id,stage_type:Dt.actionTabs.params.value,file_name:(Et=$t[0])===null||Et===void 0?void 0:Et.name});case 6:Nt=pr.sent,(Nt==null?void 0:Nt.status)===0?(r.b.info("\u63D0\u4EA4\u6210\u529F"),wt({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Nr(!1),rr([]),Kt(Dt.actionTabs.params.value)):(Nr(!1),r.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return pr.stop()}},_t)})),onCancel:function(){rr([]),wt({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(I,fr,t.a.createElement("p",{className:"ant-upload-drag-icon"},t.a.createElement(w.a,null)),t.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},V=Object(f.a)(function(xt){var et=xt.user,mt=xt.classroomList,wt=xt.shixunsDetail;return{user:et,classroomList:mt,shixunsDetail:wt}})(L),W=j("14J3"),H=j("BMrR"),G=j("5NDa"),B=j("5rEg"),P=j("9Bee"),z=j("m3rI"),J=j("ErOA"),ue=j("NLgs"),de=j("fV52"),Se=j("3I+P"),Ae=j("OaEy"),pe=j("2fM7"),Oe=j("5bA4"),ye=j("UESt"),ce=pe.a.Option;function ae(xt){var et=xt.rewarddata,mt=xt.getlistdatas,wt=xt.is_signed,Lt=xt.dispatch,Dt=xt.userlist,Kt=Object(l.useRef)(null),zt=Object(l.useState)(!1),ht=Object(o.a)(zt,2),Ot=ht[0],Rt=ht[1],ur=Object(l.useState)(void 0),ar=Object(o.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(l.useState)(""),sr=Object(o.a)(rr,2),ot=sr[0],Ar=sr[1],Nr=Object(l.useState)(void 0),fr=Object(o.a)(Nr,2),_t=fr[0],It=fr[1],Et=Object(l.useState)(void 0),Nt=Object(o.a)(Et,2),qt=Nt[0],pr=Nt[1],er=Object(l.useState)(void 0),Rr=Object(o.a)(er,2),Ur=Rr[0],br=Rr[1];function it(mr){return Gt.apply(this,arguments)}function Gt(){return Gt=Object(a.a)(s.a.mark(function mr(Ir){var Pr;return s.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:if(!Ir.user_received){Qt.next=3;break}return window.open(Ir.click_info),Qt.abrupt("return");case 3:if(Object(ue.f)(Lt)){Qt.next=5;break}return Qt.abrupt("return");case 5:if(!(wt===!1)){Qt.next=8;break}return r.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Qt.abrupt("return");case 8:if(!(Ir.click_event==="Pop")){Qt.next=14;break}return Ar(Ir.id),Rt(!0),Qt.abrupt("return");case 14:$t(void 0);case 15:return Qt.next=17,Lt({type:"competitions/Reward",payload:{competition_module_setting_id:Ir.id}});case 17:Pr=Qt.sent,Pr&&Pr.status===0&&(mt(),Ir.click_event==="Link"?(r.b.info("\u9886\u53D6\u6210\u529F"),window.open(Ir.click_info)):r.b.info(Ir.click_info));case 19:case"end":return Qt.stop()}},mr)})),Gt.apply(this,arguments)}function ln(){return en.apply(this,arguments)}function en(){return en=Object(a.a)(s.a.mark(function mr(){var Ir;return s.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(Dt&&!Dt.real_name)){Ft.next=4;break}if(_t){Ft.next=4;break}return r.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 4:if(!(Dt&&!Dt.email)){Ft.next=8;break}if(qt){Ft.next=8;break}return r.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 8:if(!(Dt&&!Dt.phone)){Ft.next=12;break}if(Ur){Ft.next=12;break}return r.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 12:if(Zt){Ft.next=15;break}return r.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Ft.abrupt("return");case 15:return Ft.next=17,Lt({type:"competitions/Reward",payload:{competition_module_setting_id:ot,className:Zt,name:_t,mail:qt,phone:Ur}});case 17:Ir=Ft.sent,Ir&&Ir.status===0&&(Rt(!1),mt(),r.b.info("HCIA\u8BA4\u8BC1\u8003\u8BD5\u4EE3\u91D1\u52B5\u5C06\u7531Educoder\u5E73\u53F0\u7EDF\u4E00\u53D1\u653E\uFF0C\u8BF7\u53CA\u65F6\u5173\u6CE8\u90AE\u7BB1\u6216\u7AD9\u5185\u77ED\u4FE1\u67E5\u6536"));case 19:case"end":return Ft.stop()}},mr)})),en.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(O.a,{visible:Ot,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return Rt(!1)},onOk:function(){ln()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(B.a,{className:Dt&&Dt.real_name?"":C.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.real_name||_t,disabled:Dt&&Dt.real_name||!1,onChange:function(Ir){return It(Ir.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(B.a,{className:Dt&&Dt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.email||qt,disabled:Dt&&Dt.email||!1,onChange:function(Ir){return pr(Ir.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(B.a,{style:{width:"300px"},className:Dt&&Dt.phone?"":"bkfff",value:Dt&&Dt.phone||Ur,disabled:Dt&&Dt.phone||!1,onChange:function(Ir){return br(Ir.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(pe.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(Ir){$t(Ir)}},t.a.createElement(ce,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ce,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ce,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ce,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ce,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ce,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ce,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ce,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ce,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ce,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ce,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ce,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ce,{value:"\u535A\u4E94"},"\u535A\u4E94")),t.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),et&&et.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:C.a.spanprev,onClick:function(){Kt.current.prev()}},t.a.createElement(Oe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(Se.a,{ref:Kt,className:C.a.divwidth,slidesToShow:3,slidesToScroll:1},et&&et.map(function(mr,Ir){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:z.a.IMG_SERVER+"/".concat(mr.image_url)}),mr.user_received===!1||mr.click_event==="Link"?t.a.createElement("p",{className:C.a.receiveclick,onClick:function(){return it(mr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:C.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),t.a.createElement("span",{className:C.a.spannext,onClick:function(){Kt.current.next()}},t.a.createElement(ye.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:C.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},et&&et.map(function(mr,Ir){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:z.a.IMG_SERVER+"/".concat(mr.image_url)}),mr.user_received===!1||mr.click_event==="Link"?t.a.createElement("p",{className:C.a.receiveclick,onClick:function(){return it(mr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:C.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var re=ae,fe=function(et,mt){var wt=et.StaffDetail,Lt=et.HeaderDetail,Dt=et.ItemData,Kt=et.setIssee,zt=et.ModelType,ht=et.dispatch,Ot=et.userinfo,Rt=et.Editable,ur=Object(l.useState)(!1),ar=Object(o.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(l.useState)([]),sr=Object(o.a)(rr,2),ot=sr[0],Ar=sr[1],Nr=Object(l.useState)(""),fr=Object(o.a)(Nr,2),_t=fr[0],It=fr[1],Et=Object(l.useState)(""),Nt=Object(o.a)(Et,2),qt=Nt[0],pr=Nt[1],er=Object(l.useState)(!1),Rr=Object(o.a)(er,2),Ur=Rr[0],br=Rr[1],it=Object(S.i)(),Gt=it.identifier,ln=Object(l.useRef)(null),en=Object(l.useRef)(null);ln.current=wt==null?void 0:wt.enrolled,Object(l.useEffect)(function(){var Ft;return(Ft=en.current)===null||Ft===void 0||Ft.addEventListener("click",mr),function(){var Qt;(Qt=en.current)===null||Qt===void 0||Qt.removeEventListener("click",mr)}},[]);var mr=function(Qt){var vr;if((Qt==null||((vr=Qt.target)===null||vr===void 0)?void 0:vr.id)==="modal-upload"){if(!Object(ue.e)(ht))return;if(!ln.current){O.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}$t(!0)}};Object(l.useEffect)(function(){if(Lt!=null&&Lt.upload_file){var Ft,Qt,vr;Ar([{name:Lt==null||((Ft=Lt.upload_file)===null||Ft===void 0)?void 0:Ft.title,status:"done",uid:"123456789"}]),pr(Lt==null?void 0:Lt.upload_file_url),It(Lt==null||((Qt=Lt.upload_file)===null||Qt===void 0||((vr=Qt.url)===null||vr===void 0))?void 0:vr.split("/")[3])}},[Lt==null?void 0:Lt.upload_file]);var Ir={name:"file",multiple:!1,withCredentials:!0,action:z.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:ot,onChange:function(Qt){var vr=Qt.file.status,tr=[Object(N.a)({},Qt.file)];if(Ar(tr),Qt.file.status==="uploading"&&br(!0),vr==="done"){var gt,bt;It((gt=tr[0])===null||gt===void 0||((bt=gt.response)===null||bt===void 0)?void 0:bt.id),br(!1)}vr==="error"&&(Ar([]),br(!1))},beforeUpload:function(Qt){var vr=Qt.size/1024/1024<1e3;return vr?Promise.resolve():(r.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Pr=function(){$t(!0)};return Object(l.useImperativeHandle)(mt,function(){return{handleVisible:Pr}}),t.a.createElement("div",{ref:en},zt==="reward"?t.a.createElement(re,{userlist:Ot,dispatch:ht,rewarddata:Dt.reward_setting,is_signed:Dt.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((Ot==null?void 0:Ot.admin)||(Ot==null?void 0:Ot.business)||Rt)&&t.a.createElement(T.a,{onClick:function(){return Kt(!1)}},"\u7F16\u8F91")),t.a.createElement(P.a,{value:Dt.md_content}),Dt&&Dt.attachments&&Dt.attachments.map(function(Ft,Qt){return t.a.createElement("div",null,t.a.createElement("a",{href:(z.a===null||z.a===void 0?void 0:z.a.API_SERVER)+Ft.url,target:"_self",download:Ft.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},Ft.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Ft.filesize)))}),t.a.createElement(O.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Zt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Ur,onCancel:function(){return $t(!1)},onOk:Object(a.a)(s.a.mark(function Ft(){var Qt;return s.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:if(!(!_t&&!qt)){tr.next=3;break}return $t(!1),tr.abrupt("return");case 3:return br(!0),tr.next=6,Object(J.a)("/api/competitions/".concat(Gt,"/upload_file.json"),{method:"post",body:{attachment_id:_t,upload_file_url:qt}});case 6:Qt=tr.sent,Qt.status===0&&($t(!1),br(!1));case 8:case"end":return tr.stop()}},Ft)}))},t.a.createElement("div",null,t.a.createElement(H.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(B.a,{style:{width:416},value:qt,onChange:function(Qt){var vr;return pr((vr=Qt.target)===null||vr===void 0?void 0:vr.value)}})),t.a.createElement(H.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(E.a,Ir,t.a.createElement(T.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},te=Object(l.forwardRef)(fe),ne=j("Ot1p"),Te=j("hJwl");function ie(xt){var et=xt.ItemData,mt=xt.setIssee,wt=xt.MenuItem,Lt=xt.dispatch,Dt=xt.identifier,Kt=xt.ModelType,zt=xt.userinfo,ht=xt.getrightdatas,Ot=Object(l.useState)([]),Rt=Object(o.a)(Ot,2),ur=Rt[0],ar=Rt[1],Zt=Object(l.useState)(et.md_content),$t=Object(o.a)(Zt,2),rr=$t[0],sr=$t[1];Object(l.useEffect)(function(){var It,Et=[];et==null||((It=et.attachments)===null||It===void 0)||It.map(function(Nt){var qt={uid:Nt.id,name:Nt.title,response:{id:Nt.id}};Et.push(qt)}),ar(Et)},[et==null?void 0:et.attachments]);function ot(){var It,Et=[];return et==null||((It=et.attachments)===null||It===void 0)||It.map(function(Nt){var qt={uid:Nt==null?void 0:Nt.id,name:Nt.title,response:{id:Nt.id}};Et.push(qt)}),Et}var Ar={name:"file",multiple:!0,withCredentials:!0,action:z.a.API_SERVER+"/api/attachments.json",defaultFileList:ot(),onRemove:function(Et){Object(Te.t)({id:Et.uid})},onChange:function(Et){var Nt=Et.file.status;Nt!=="uploading",Nt==="removed"&&ar(Et.fileList),Nt==="done"?(ar(Et.fileList),r.b.success("".concat(Et.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):Nt==="error"&&r.b.error("".concat(Et.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(Et){var Nt=Et.size/1024/1024<150;return Nt||r.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Nt}};console.log(Ar);function Nr(){return fr.apply(this,arguments)}function fr(){return fr=Object(a.a)(s.a.mark(function It(){var Et;return s.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Lt({type:"competitions/updateMdContent",payload:{attachment_ids:_t(ur),competition_module_id:et.id,md_content_id:et.md_id,content:rr,identifier:Dt}});case 2:Et=qt.sent,Et&&(r.b.info("\u63D0\u4EA4\u6210\u529F"),mt(!0),ht(wt));case 4:case"end":return qt.stop()}},It)})),fr.apply(this,arguments)}function _t(It){var Et=[];return It&&It.map(function(Nt){Et.push(Nt.response.id)}),Et}return t.a.createElement("div",null,Kt==="reward"?t.a.createElement(re,{userlist:zt,dispatch:Lt,rewarddata:et.reward_setting,is_signed:et.is_signed}):null,t.a.createElement(ne.a,{defaultValue:rr,onChange:function(Et){return sr(Et)}}),t.a.createElement(E.a,Ar,t.a.createElement(T.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(T.a,{style:{width:"90px"},type:"primary",onClick:function(){return Nr()}},"\u63D0\u4EA4"),t.a.createElement(T.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return mt(!0)}},"\u53D6\u6D88")))}var Z=ie,X=j("g9YV"),Q=j("wCAj"),_e=j("Znn+"),ve=j("ZTPi");function Re(){return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement("img",{src:z.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),t.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var Je=Re,qe=j("5Dmo"),rt=j("3S7+"),ut=j("jCWc"),dt=j("kPKH"),ft=j("IzEo"),Be=j("bx4M");function Ie(xt){var et=xt.oneItem,mt=xt.towItem,wt=xt.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(H.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(dt.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},t.a.createElement(Be.a,{title:t.a.createElement("div",{className:C.a.towtop},t.a.createElement("img",{style:{marginTop:"20px"},src:z.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(mt==null?void 0:mt.user_login,"/classrooms")},t.a.createElement("img",{className:C.a.imgradius,src:z.a.IMG_SERVER+"/images/".concat(mt==null?void 0:mt.user_image)}),(mt==null?void 0:mt.competition_prize)&&t.a.createElement("p",{className:C.a.prize},mt==null?void 0:mt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},mt==null?void 0:mt.record_user_name)))),className:C.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},mt==null?void 0:mt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},mt==null?void 0:mt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(mt==null?void 0:mt.extra_score)+parseFloat(mt==null?void 0:mt.score),"\u5206"))),t.a.createElement(dt.a,{span:6},t.a.createElement(Be.a,{title:t.a.createElement("div",{className:C.a.onetop},t.a.createElement("img",{style:{marginTop:"20px"},src:z.a.IMG_SERVER+"/images/educoder/huangguan.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(et==null?void 0:et.user_login,"/classrooms")},t.a.createElement("img",{className:C.a.imgradius,src:z.a.IMG_SERVER+"/images/".concat(et==null?void 0:et.user_image)}),(et==null?void 0:et.competition_prize)&&t.a.createElement("p",{className:C.a.prize},et==null?void 0:et.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},et==null?void 0:et.record_user_name)))),className:C.a.onediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},et==null?void 0:et.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},et==null?void 0:et.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(et==null?void 0:et.extra_score)+parseFloat(et==null?void 0:et.score),"\u5206"))),t.a.createElement(dt.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},t.a.createElement(Be.a,{title:t.a.createElement("div",{className:C.a.threetop},t.a.createElement("img",{style:{marginTop:"20px"},src:z.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(wt==null?void 0:wt.user_login,"/classrooms")},t.a.createElement("img",{className:C.a.imgradius,src:z.a.IMG_SERVER+"/images/".concat(wt==null?void 0:wt.user_image)}),(wt==null?void 0:wt.competition_prize)&&t.a.createElement("p",{className:C.a.prize},wt==null?void 0:wt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},wt==null?void 0:wt.record_user_name)))),className:C.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},wt==null?void 0:wt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},wt==null?void 0:wt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(wt==null?void 0:wt.extra_score)+parseFloat(wt==null?void 0:wt.score),"\u5206")))))}var at=Ie;function ct(xt){var et,mt,wt,Lt,Dt,Kt,zt,ht,Ot,Rt,ur,ar,Zt,$t,rr,sr,ot,Ar,Nr,fr,_t,It,Et,Nt,qt,pr,er,Rr,Ur,br,it=xt.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(at,{oneItem:it==null?void 0:it.teams[0],towItem:it==null?void 0:it.teams[1],threeItem:it==null?void 0:it.teams[2]}),(it==null||((et=it.user_ranks)===null||et===void 0)?void 0:et.length)>0&&t.a.createElement("div",{className:C.a.myTeam},(it==null||((mt=it.user_ranks)===null||mt===void 0||((wt=mt[0])===null||wt===void 0))?void 0:wt.success)===!1?t.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u664B\u7EA7\uFF1A",t.a.createElement("span",{style:{color:(it==null||((Lt=it.user_ranks)===null||Lt===void 0||((Dt=Lt[0])===null||Dt===void 0))?void 0:Dt.success)===!1?"red":"green"}},(it==null||((Kt=it.user_ranks)===null||Kt===void 0||((zt=Kt[0])===null||zt===void 0))?void 0:zt.success)===!1?"\u5426":it!=null&&(ht=it.user_ranks)!==null&&ht!==void 0&&(Ot=ht[0])!==null&&Ot!==void 0&&Ot.success?"\u662F":"")),(it==null||((Rt=it.user_ranks)===null||Rt===void 0||((ur=Rt[0])===null||ur===void 0))?void 0:ur.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(it==null||((ar=it.user_ranks)===null||ar===void 0||((Zt=ar[0])===null||Zt===void 0))?void 0:Zt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(it==null||(($t=it.user_ranks)===null||$t===void 0||((rr=$t[0])===null||rr===void 0))?void 0:rr.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",it==null||((sr=it.user_ranks)===null||sr===void 0||((ot=sr[0])===null||ot===void 0))?void 0:ot.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u6218\u961F\u540D"},it==null||((Ar=it.user_ranks)===null||Ar===void 0||((Nr=Ar[0])===null||Nr===void 0))?void 0:Nr.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u65F6\u95F4"},it==null||((fr=it.user_ranks)===null||fr===void 0||((_t=fr[0])===null||_t===void 0))?void 0:_t.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(rt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},it==null||((It=it.user_ranks)===null||It===void 0||((Et=It[0])===null||Et===void 0))?void 0:Et.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},it==null||((Nt=it.user_ranks)===null||Nt===void 0||((qt=Nt[0])===null||qt===void 0))?void 0:qt.score)),t.a.createElement("span",null,t.a.createElement(rt.a,{title:"\u603B\u5206"},parseFloat(it==null||((pr=it.user_ranks)===null||pr===void 0||((er=pr[0])===null||er===void 0))?void 0:er.extra_score)+parseFloat(it==null||((Rr=it.user_ranks)===null||Rr===void 0||((Ur=Rr[0])===null||Ur===void 0))?void 0:Ur.score)||0))),it==null||((br=it.teams)===null||br===void 0)?void 0:br.map(function(Gt,ln){return t.a.createElement("div",{className:C.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},ln+1),t.a.createElement(x.a,{to:"/users/".concat(Gt==null?void 0:Gt.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:C.a.imgradius,src:z.a.IMG_SERVER+"/images/".concat(Gt==null?void 0:Gt.user_image)}),(Gt==null?void 0:Gt.competition_prize)&&t.a.createElement("span",{className:C.a.spanrightradius},Gt==null?void 0:Gt.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u6218\u961F\u540D"},Gt==null?void 0:Gt.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},Gt.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(rt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},Gt.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(rt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},Gt.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(rt.a,{title:"\u603B\u5206"},parseFloat(Gt.extra_score)+parseFloat(Gt.score))))}))}var $e=ct,st=ve.a.TabPane;function Ue(xt){var et,mt,wt,Lt,Dt,Kt,zt=xt.ChartRules,ht=xt.ItemData,Ot=xt.getCharts,Rt=xt.Selectkey,ur=xt.getChartRules,ar=xt.userinfo,Zt=xt.Editable,$t=xt.HeaderDetail,rr=Object(l.useState)(!1),sr=Object(o.a)(rr,2),ot=sr[0],Ar=sr[1],Nr=Object(l.useState)(""),fr=Object(o.a)(Nr,2),_t=fr[0],It=fr[1],Et=Object(l.useState)(!0),Nt=Object(o.a)(Et,2),qt=Nt[0],pr=Nt[1],er=Object(l.useState)(),Rr=Object(o.a)(er,2),Ur=Rr[0],br=Rr[1],it=Object(l.useState)(),Gt=Object(o.a)(it,2),ln=Gt[0],en=Gt[1],mr=Object(S.i)(),Ir=mr.identifier;Object(l.useEffect)(function(){if(qt){var vr,tr=zt==null||((vr=zt.stages)===null||vr===void 0)?void 0:vr[0];if(br(tr),tr!=null&&tr.id){var gt,bt,Vt;(($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog")&&Ot(tr==null?void 0:tr.id),It(((gt=zt.rule_contents)===null||gt===void 0||((bt=gt.filter(function(un){return parseInt(un.competition_stage_id)===parseInt(tr==null?void 0:tr.id)}))===null||bt===void 0||((Vt=bt[0])===null||Vt===void 0))?void 0:Vt.content)||"")}else{var Mt,Dr,on;($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog",It(((Mt=zt.rule_contents)===null||Mt===void 0||((Dr=Mt.filter(function(un){return parseInt(un.competition_stage_id)===0}))===null||Dr===void 0||((on=Dr[0])===null||on===void 0))?void 0:on.content)||"")}}},[zt]);function Pr(){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(a.a)(s.a.mark(function vr(){var tr,gt,bt,Vt,Mt,Dr,on,un,Cr;return s.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:if(_t){jr.next=3;break}return r.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),jr.abrupt("return");case 3:if(pr(!1),tr=Ur==null?void 0:Ur.id,!tr){jr.next=12;break}return jr.next=8,Object(J.a)("/api/competitions/".concat(Ir,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:_t,md_content_id:(gt=zt.rule_contents)===null||gt===void 0||((bt=gt.filter(function(pn){return parseInt(pn.competition_stage_id)===parseInt(tr)}))===null||bt===void 0||((Vt=bt[0])===null||Vt===void 0))?void 0:Vt.id,stage_id:Ur==null?void 0:Ur.id}});case 8:Mt=jr.sent,Mt.status===0&&(r.b.info("\u66F4\u65B0\u6210\u529F"),Ar(!1),ur()),jr.next=16;break;case 12:return jr.next=14,Object(J.a)("/api/competitions/".concat(Ir,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:_t,md_content_id:(Dr=zt.rule_contents)===null||Dr===void 0||((on=Dr.filter(function(pn){return parseInt(pn.competition_stage_id)===0}))===null||on===void 0||((un=on[0])===null||un===void 0))?void 0:un.id,stage_id:Ur==null?void 0:Ur.id}});case 14:Cr=jr.sent,Cr.status===0&&(r.b.info("\u66F4\u65B0\u6210\u529F"),Ar(!1),ur());case 16:case"end":return jr.stop()}},vr)})),Ft.apply(this,arguments)}var Qt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(tr,gt,bt){return t.a.createElement("span",null,bt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(tr){return t.a.createElement("img",{className:C.a.imgradius,src:z.a.IMG_SERVER+"/images/".concat(tr)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(tr){return t.a.createElement("span",{title:tr},tr&&(tr==null?void 0:tr.length)>=15?(tr==null?void 0:tr.substr(0,15))+"...":tr||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(tr){return t.a.createElement("span",null,tr||"--")}},{title:($t==null?void 0:$t.task)==="mAP"?"mAP\u6307\u6807":($t==null?void 0:$t.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(tr){return t.a.createElement("span",null,tr||"--")}}];return t.a.createElement("div",null,(zt==null||((et=zt.stages)===null||et===void 0)?void 0:et.length)>0?null:t.a.createElement(Je,null),(zt==null||((mt=zt.stages)===null||mt===void 0)?void 0:mt.length)>0&&t.a.createElement(ve.a,{animated:!0,tabBarExtraContent:((ar==null?void 0:ar.admin)||(ar==null?void 0:ar.business)||Zt)&&t.a.createElement(T.a,{onClick:function(){Ar(!0)}},"\u7F16\u8F91"),onChange:function(tr){var gt,bt,Vt,Mt,Dr;Ar(!1);var on=zt==null||((gt=zt.stages)===null||gt===void 0)?void 0:gt.filter(function(Cr){return parseInt(tr)===parseInt(Cr==null?void 0:Cr.id)})[0];br(on);var un=on==null||((bt=on.children)===null||bt===void 0)?void 0:bt[0];en(un),It(((Vt=zt.rule_contents)===null||Vt===void 0||((Mt=Vt.filter(function(Cr){return parseInt(Cr.competition_stage_id)===parseInt(on==null?void 0:on.id)}))===null||Mt===void 0||((Dr=Mt[0])===null||Dr===void 0))?void 0:Dr.content)||""),Ot((un==null?void 0:un.id)||tr)}},zt&&zt.stages.map(function(vr,tr){return t.a.createElement(st,{tab:vr.name,key:vr.id===null?0:vr.id},ot===!1&&zt&&zt.rule_contents.map(function(gt,bt){if(vr.id===gt.competition_stage_id)return t.a.createElement(P.a,{key:bt,value:gt.content===void 0||gt.content===null?"":gt.content});if(vr.id===null&>.competition_stage_id===0)return t.a.createElement(P.a,{key:bt,value:gt.content===void 0||gt.content===null?"":gt.content})}))})),(Ur==null||((wt=Ur.children)===null||wt===void 0)?void 0:wt.length)>0&&t.a.createElement(ve.a,{activeKey:(ln==null?void 0:ln.id)+"",onChange:function(tr){var gt,bt=Ur==null||((gt=Ur.children)===null||gt===void 0)?void 0:gt.filter(function(Vt){return parseInt(tr)===parseInt(Vt==null?void 0:Vt.id)})[0];en(bt),Ot(tr)}},Ur==null||((Lt=Ur.children)===null||Lt===void 0)?void 0:Lt.map(function(vr,tr){return t.a.createElement(st,{tab:vr.name,key:vr.id===null?0:vr.id})})),ot&&t.a.createElement("div",null,t.a.createElement(ne.a,{defaultValue:_t,onChange:function(tr){It(tr)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(T.a,{style:{width:"90px"},type:"primary",onClick:function(){return Pr()}},"\u63D0\u4EA4"),t.a.createElement(T.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Ar(!1)}},"\u53D6\u6D88"))),(ht==null||((Dt=ht.teams)===null||Dt===void 0)?void 0:Dt.length)>0&&(($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog"||($t==null?void 0:$t.task)==="Jittor-3")?t.a.createElement(Q.a,{dataSource:ht==null?void 0:ht.teams,columns:Qt,pagination:!1}):(ht==null||((Kt=ht.teams)===null||Kt===void 0)?void 0:Kt.length)>0&&t.a.createElement($e,{ItemData:ht}))}var Le=Ue,Me=j("/zsF"),Ee=j("PArb");function Ce(xt){var et,mt,wt,Lt,Dt,Kt,zt,ht=xt.Prize,Ot=Object(S.i)(),Rt=Object(l.useState)([{type:1,name:"\u56E2\u4F53\u5956\u8BC1\u4E66"},{type:2,name:"\u4E2A\u4EBA\u5956\u8BC1\u4E66"},{type:3,name:"\u4F18\u79C0\u6307\u5BFC\u6559\u5E08\u8BC1\u4E66"}]),ur=Object(o.a)(Rt,2),ar=ur[0],Zt=ur[1],$t=function(){var rr=Object(a.a)(s.a.mark(function sr(ot){var Ar;return s.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.next=2,Object(Te.u)({type:ot.type,id:Ot.identifier});case 2:Ar=fr.sent,(Ar==null?void 0:Ar.status)===0&&(location.href="/competitions/exports?id=".concat(Ot.identifier,"&type=").concat(ot.type));case 4:case"end":return fr.stop()}},sr)}));return function(ot){return rr.apply(this,arguments)}}();return t.a.createElement("div",null,t.a.createElement("p",{className:C.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),t.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(ht==null||((et=ht.personal_certifications)===null||et===void 0)?void 0:et.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:z.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:z.a.API_SERVER+"".concat(ht==null||((mt=ht.personal_certifications[0])===null||mt===void 0)?void 0:mt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),t.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(ht==null||((wt=ht.team_certifications)===null||wt===void 0)?void 0:wt.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:z.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:z.a.API_SERVER+"".concat(ht==null||((Lt=ht.team_certifications[0])===null||Lt===void 0)?void 0:Lt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),t.a.createElement(Ee.a,null),(ht==null||((Dt=ht.teams)===null||Dt===void 0)?void 0:Dt.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(ht==null?void 0:ht.teams)&&(ht==null||((Kt=ht.teams[0])===null||Kt===void 0)?void 0:Kt.name),"\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"),t.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},t.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),t.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),t.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(ht==null?void 0:ht.teams)&&(ht==null||((zt=ht.teams[0])===null||zt===void 0)?void 0:zt.team_members.map(function(rr,sr){var ot,Ar,Nr,fr,_t,It;return t.a.createElement("p",{className:C.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},rr==null?void 0:rr.role),t.a.createElement("span",{style:{width:"5%"}},rr==null?void 0:rr.name),t.a.createElement("span",{style:{width:"10%"}},(rr==null?void 0:rr.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(rr==null?void 0:rr.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(rr==null?void 0:rr.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(rr==null?void 0:rr.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},rr!=null&&rr.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},rr!=null&&rr.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(rr==null?void 0:rr.role)==="\u961F\u957F"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ht==null?void 0:ht.teams)&&(ht==null||((ot=ht.teams[0])===null||ot===void 0||((Ar=ot.bank_account)===null||Ar===void 0))?void 0:Ar.bank),(ht==null?void 0:ht.teams)&&(ht==null||((Nr=ht.teams[0])===null||Nr===void 0||((fr=Nr.bank_account)===null||fr===void 0))?void 0:fr.second_bank),(ht==null?void 0:ht.teams)&&(ht==null||((_t=ht.teams[0])===null||_t===void 0||((It=_t.bank_account)===null||It===void 0))?void 0:It.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(H.a,{gutter:[20,20]},ar.map(function(rr,sr){return t.a.createElement(dt.a,{key:sr},t.a.createElement(T.a,{type:"primary",onClick:function(){return $t(rr)}},rr.name))})))}var ke=Ce,Ne=j("0Owb"),He=j("7Kak"),tt=j("9yH6"),vt=j("y8nQ"),yt=j("Vl3Y"),Wt=j("1vsH"),Ht=j("Dgm7"),cr=j.n(Ht),dr=j("NnUe"),St=j.n(dr),Kr=E.a.Dragger,Vr=10,Yr=function(et){var mt=et.user,wt=et.account,Lt=et.globalSetting,Dt=et.loading,Kt=et.dispatch,zt=Object(u.a)(et,["user","account","globalSetting","loading","dispatch"]),ht=yt.a.useForm(),Ot=Object(o.a)(ht,1),Rt=Ot[0],ur=Object(l.useState)({}),ar=Object(o.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(l.useState)(!0),sr=Object(o.a)(rr,2),ot=sr[0],Ar=sr[1],Nr=Object(l.useState)(),fr=Object(o.a)(Nr,2),_t=fr[0],It=fr[1],Et=Object(l.useState)(),Nt=Object(o.a)(Et,2),qt=Nt[0],pr=Nt[1],er=Object(l.useState)(),Rr=Object(o.a)(er,2),Ur=Rr[0],br=Rr[1],it=Object(l.useState)(),Gt=Object(o.a)(it,2),ln=Gt[0],en=Gt[1];Object(l.useEffect)(function(){if(!wt.basicInfo)return;var tr=wt.basicInfo,gt={name:tr.show_realname?tr.name:Object(Wt.H)(tr.name),gender:tr.gender};It(tr.name),Ar(tr.show_realname),Rt.setFieldsValue(gt),$t(gt)},[wt.basicInfo]);var mr=function(gt){if(gt.file.status==="uploading"){en(!0);return}if(gt.file.status==="done"){var bt;console.log(gt.file,gt.file.response),br((bt=gt.file.response)===null||bt===void 0?void 0:bt.id),Object(Wt.D)(gt.file.originFileObj,function(Vt){pr(Vt),en(!1)})}},Ir=function(gt){$t(Object(N.a)({},Rt.getFieldsValue())),"name"in gt&&It(gt.name)},Pr=function(){var gt=!ot;Ar(gt);var bt=gt?_t:Object(Wt.H)(_t);Rt.setFieldsValue({name:bt})},Ft=function(){var tr=Object(a.a)(s.a.mark(function gt(bt){var Vt,Mt,Dr,on,un,Cr,tn,jr;return s.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:if(Dr=bt||{},on=Dr.name,un=Dr.gender,Cr=Dr.idNumber,qt){Xr.next=4;break}return r.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Xr.abrupt("return");case 4:return Xr.next=6,Kt({type:"account/applyRealNameAuth",payload:{id:((Vt=wt.basicInfo)===null||Vt===void 0?void 0:Vt.id)||((Mt=mt.userInfo)===null||Mt===void 0?void 0:Mt.login),name:on,gender:un,id_number:Cr,show_realname:ot,attachment_ids:[Ur]}});case 6:tn=Xr.sent,Qt(),tn&&(r.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Kt({type:"account/getBasicInfo",payload:{login:(jr=mt.userInfo)===null||jr===void 0?void 0:jr.login}}));case 9:case"end":return Xr.stop()}},gt)}));return function(bt){return tr.apply(this,arguments)}}(),Qt=function(){Kt({type:"account/setActionTabs",payload:{}})},vr={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(z.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:mr,beforeUpload:function(gt){var bt=gt.type==="image/jpeg"||gt.type==="image/png"||gt.type==="image/jpg"||gt.type==="image/bmp";return bt||r.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),bt}};return t.a.createElement(O.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:wt.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(p.a,{spinning:!!ln},t.a.createElement(yt.a,{className:St.a.formWrap,form:Rt,layout:"horizontal",onValuesChange:Ir,onFinish:Ft},t.a.createElement(yt.a.Item,{label:"\u59D3\u540D",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Vr,"\u4E2A\u5B57\u7B26")},{validator:Wt.K}],extra:t.a.createElement("span",null,ot?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},t.a.createElement(B.a,{disabled:!ot,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Vr,"\u4E2A\u5B57\u7B26"),maxLength:Vr,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(ot?"icon-xianshi":"icon-yincang"," font18 ").concat(St.a.color0152d9),onClick:Pr})})),t.a.createElement(yt.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},t.a.createElement(tt.a.Group,null,t.a.createElement(tt.a,{value:0},"\u7537"),t.a.createElement(tt.a,{value:1},"\u5973"))),t.a.createElement(yt.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},t.a.createElement(B.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),t.a.createElement(yt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:cr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(Kr,Object(Ne.a)({},vr,{accept:".png,.jpg,.bmp,.jpeg"}),qt?t.a.createElement("img",{src:qt,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(T.a,{className:"mr5",size:"large",onClick:Qt},"\u53D6\u6D88"),t.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:Dt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),t.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},vn=Object(f.a)(function(xt){var et=xt.user,mt=xt.account,wt=xt.loading,Lt=xt.globalSetting;return{user:et,account:mt,globalSetting:Lt,loading:wt.effects}})(Yr),Or=j("O3gP"),dn=j("lrIw"),hn=j("KXlV"),Tt=j.n(hn),gr=j("Sjjz"),Br=j.n(gr),zr=B.a.TextArea,an=function(et){var mt=et.account,wt=et.globalSetting,Lt=et.loading,Dt=et.dispatch,Kt=et.schoolName,zt=et.departmentName,ht=et.visible,Ot=et.onClose,Rt=Ot===void 0?function(){}:Ot,ur=et.onSuccess,ar=ur===void 0?function(){}:ur,Zt=Object(u.a)(et,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),$t=yt.a.useForm(),rr=Object(o.a)($t,1),sr=rr[0],ot=Object(l.useRef)();Object(l.useEffect)(function(){ot.current=Zt.schoolId},[Zt.schoolId]),Object(l.useEffect)(function(){sr.setFieldsValue({department:zt})},[zt]);var Ar=function(){var Nr=Object(a.a)(s.a.mark(function fr(_t){var It,Et,Nt,qt;return s.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return It=_t||{},Et=It.department,Nt=It.remarks,er.next=3,Dt({type:"account/appplyDepartment",payload:{school_id:ot.current,name:Et,remarks:Nt}});case 3:qt=er.sent,Rt(),qt&&(r.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),ar(Et));case 6:case"end":return er.stop()}},fr)}));return function(_t){return Nr.apply(this,arguments)}}();return t.a.createElement(O.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:ht,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(yt.a,{className:Br.a.formWrap,form:sr,labelCol:{span:4},wrapperCol:{span:20},onFinish:Ar},t.a.createElement(yt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Kt),t.a.createElement(yt.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},t.a.createElement(B.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),t.a.createElement(yt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(zr,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Br.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(T.a,{className:"mr5",size:"large",onClick:function(){Rt()}},"\u53D6\u6D88"),t.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:Lt["account/appplyDepartment"]},"\u4FDD\u5B58")))))},gi=Object(f.a)(function(xt){var et=xt.account,mt=xt.loading,wt=xt.globalSetting;return{account:et,globalSetting:wt,loading:mt.effects}})(an),Ei=j("6UJt"),bn=j("DFOY"),lr=j("jO45"),Yn=j("jN4g"),ci=j("gJ3r"),Hn=j("jwmR"),qr=j.n(Hn),Un=function(et,mt){return mt.some(function(wt){return wt.label.toLowerCase().indexOf(et.toLowerCase())>-1})},di=B.a.TextArea,vi=function(et){var mt=et.account,wt=et.globalSetting,Lt=et.loading,Dt=et.dispatch,Kt=et.schoolName,zt=et.visible,ht=et.onClose,Ot=ht===void 0?function(){}:ht,Rt=et.onSuccess,ur=Rt===void 0?function(){}:Rt,ar=Object(u.a)(et,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Zt=yt.a.useForm(),$t=Object(o.a)(Zt,1),rr=$t[0];Object(l.useEffect)(function(){rr.setFieldsValue({name:Kt})},[Kt]);var sr=function(){var ot=Object(a.a)(s.a.mark(function Ar(Nr){var fr,_t,It,Et,Nt,qt,pr;return s.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return fr=Nr||{},_t=fr.name,It=fr.city,Et=It===void 0?[]:It,Nt=fr.address,qt=fr.remarks,Rr.next=3,Dt({type:"account/appplySchool",payload:{name:_t,province:Et[0],city:Et[1],address:Nt,remarks:qt}});case 3:pr=Rr.sent,Ot(),pr&&(r.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),ur(_t));case 6:case"end":return Rr.stop()}},Ar)}));return function(Nr){return ot.apply(this,arguments)}}();return t.a.createElement(O.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:zt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(yt.a,{className:qr.a.formWrap,form:rr,labelCol:{span:4},wrapperCol:{span:20},onFinish:sr},t.a.createElement(yt.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},t.a.createElement(B.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),t.a.createElement("div",{className:"".concat(qr.a.flexRow," ").concat(qr.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:qr.a.flexColumn},t.a.createElement("div",null,t.a.createElement(lr.a,{style:{color:"rgb(82, 196, 26)"}}),t.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),t.a.createElement("div",null,t.a.createElement(Yn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(yt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(bn.a,{allowClear:!0,size:"large",options:ci.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Un}})),t.a.createElement(yt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},t.a.createElement(B.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),t.a.createElement(yt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(di,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:qr.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(T.a,{className:"mr5",size:"large",onClick:function(){Ot()}},"\u53D6\u6D88"),t.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:Lt["account/appplySchool"]},"\u4FDD\u5B58")))))},Ut=Object(f.a)(function(xt){var et=xt.account,mt=xt.loading,wt=xt.globalSetting;return{account:et,globalSetting:wt,loading:mt.effects}})(vi),_r=pe.a.Option,hi=E.a.Dragger,xi=function(et){var mt,wt,Lt=et.user,Dt=et.account,Kt=et.globalSetting,zt=et.loading,ht=et.dispatch,Ot=et.Scoid,Rt=Object(u.a)(et,["user","account","globalSetting","loading","dispatch","Scoid"]),ur=yt.a.useForm(),ar=Object(o.a)(ur,1),Zt=ar[0],$t=Object(l.useState)({}),rr=Object(o.a)($t,2),sr=rr[0],ot=rr[1],Ar=Object(l.useState)([]),Nr=Object(o.a)(Ar,2),fr=Nr[0],_t=Nr[1],It=Object(l.useState)([]),Et=Object(o.a)(It,2),Nt=Et[0],qt=Et[1],pr=Object(l.useState)([]),er=Object(o.a)(pr,2),Rr=er[0],Ur=er[1],br=Object(l.useState)([]),it=Object(o.a)(br,2),Gt=it[0],ln=it[1],en=Object(l.useState)(),mr=Object(o.a)(en,2),Ir=mr[0],Pr=mr[1],Ft=Object(l.useState)(),Qt=Object(o.a)(Ft,2),vr=Qt[0],tr=Qt[1],gt=Object(l.useState)(),bt=Object(o.a)(gt,2),Vt=bt[0],Mt=bt[1],Dr=Object(l.useState)(),on=Object(o.a)(Dr,2),un=on[0],Cr=on[1],tn=Object(l.useState)(),jr=Object(o.a)(tn,2),pn=jr[0],Xr=jr[1];Object(l.useEffect)(function(){mn()},[]),Object(l.useEffect)(function(){Object(a.a)(s.a.mark(function Xe(){var ze;return s.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(Ot){pt.next=2;break}return pt.abrupt("return");case 2:return pt.next=4,Xn(Ot);case 4:ze=pt.sent,Ur(ze==null?void 0:ze.departments);case 6:case"end":return pt.stop()}},Xe)}))()},[Ot]);var mn=function(){var Xe=Object(a.a)(s.a.mark(function ze(){var Ze;return s.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,ht({type:"account/getSchoolOption"});case 2:Ze=kt.sent,_t(Ze==null?void 0:Ze.schools);case 4:case"end":return kt.stop()}},ze)}));return function(){return Xe.apply(this,arguments)}}(),Xn=function(ze){return ht({type:"account/getDepartmentOption",payload:{id:ze}})};Object(l.useEffect)(function(){if(!Dt.basicInfo)return;var Xe=Dt.basicInfo,ze={identity:Xe.identity,school:Xe.school_name,department:Xe.department_name,studentNo:Xe.student_id,jobTitle:Xe.identity=="teacher"?Xe.technical_title:"\u6559\u6388",manager:Xe.identity=="professional"?Xe.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Zt.setFieldsValue(ze),ot(ze)},[Dt.basicInfo]);var Pe=function(){Cr(!0)},Ve=function(){if(!fr.find(function(ze){return ze.name===sr.school})){r.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Xr(!0)},Qe=function(ze){if(ot(Object(N.a)({},Zt.getFieldsValue())),"school"in ze){qt(fr.filter(function(pt){return pt.name.includes(ze.school)}));var Ze=(fr.find(function(pt){return pt.name===ze.school})||{}).id;Ze?Fe(ze.school):(Zt.setFieldsValue({department:""}),ot(Object(N.a)(Object(N.a)({},sr),{school:ze.school,department:""})))}},Fe=function(){var Xe=Object(a.a)(s.a.mark(function ze(Ze,pt){var kt,jt,Yt,kr,Jr,$r;return s.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:return kr=(kt=fr.find(function(rn){return rn.name===Ze}))===null||kt===void 0?void 0:kt.id,Hr.next=3,Xn(kr);case 3:if(Hr.t0=Hr.sent,Hr.t0){Hr.next=6;break}Hr.t0={};case 6:Jr=Hr.t0,Ur(Jr==null?void 0:Jr.departments),$r=pt||(Jr==null||((jt=Jr.departments)===null||jt===void 0||((Yt=jt[0])===null||Yt===void 0))?void 0:Yt.name),Zt.setFieldsValue({department:$r}),ot(Object(N.a)(Object(N.a)({},sr),{school:Ze,department:$r}));case 11:case"end":return Hr.stop()}},ze)}));return function(Ze,pt){return Xe.apply(this,arguments)}}(),be=function(){var Xe=Object(a.a)(s.a.mark(function ze(Ze){return s.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,mn();case 2:Zt.setFieldsValue({school:Ze,department:""}),ot(Object(N.a)(Object(N.a)({},sr),{school:Ze,department:""}));case 4:case"end":return kt.stop()}},ze)}));return function(Ze){return Xe.apply(this,arguments)}}(),De=function(ze){if(ze.file.status==="uploading"){Mt(!0);return}if(ze.file.status==="done"){var Ze;console.log(ze.file,ze.file.response),tr((Ze=ze.file.response)===null||Ze===void 0?void 0:Ze.id),Object(Wt.D)(ze.file.originFileObj,function(pt){Pr(pt),Mt(!1)})}},we=function(){var Xe=Object(a.a)(s.a.mark(function ze(Ze){var pt,kt,jt,Yt,kr,Jr,$r,Zr,Hr,rn,nn,yn,cn,In,fn,Mr;return s.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:if(kr=Ze||{},Jr=kr.school,$r=kr.department,Zr=kr.identity,Hr=kr.studentNo,rn=kr.jobTitle,nn=kr.manager,Ir){sn.next=4;break}return r.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),sn.abrupt("return");case 4:return yn=(pt=fr.find(function(gn){return gn.name===Jr}))===null||pt===void 0?void 0:pt.id,cn=(kt=Rr.find(function(gn){return gn.name===$r}))===null||kt===void 0?void 0:kt.id,Zr==="student"?In=Hr:Zr==="teacher"?In=rn:In=nn,sn.next=9,ht({type:"account/applyProfessionalAuth",payload:{id:((jt=Dt.basicInfo)===null||jt===void 0?void 0:jt.id)||((Yt=Lt.userInfo)===null||Yt===void 0?void 0:Yt.login),school_id:yn,department_id:cn,identity:Zr,extra:In,attachment_ids:[vr]}});case 9:fn=sn.sent,je(),fn&&(r.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ht({type:"account/getBasicInfo",payload:{login:(Mr=Lt.userInfo)===null||Mr===void 0?void 0:Mr.login}}));case 12:case"end":return sn.stop()}},ze)}));return function(Ze){return Xe.apply(this,arguments)}}(),je=function(){ht({type:"account/setActionTabs",payload:{}})},Ge={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(z.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:De,beforeUpload:function(ze){var Ze=ze.type==="image/jpeg"||ze.type==="image/png"||ze.type==="image/jpg"||ze.type==="image/bmp";return Ze||r.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),Ze}};return t.a.createElement(O.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:St.a.modal,visible:Dt.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(St.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(p.a,{spinning:!!Vt},t.a.createElement(yt.a,{className:St.a.formWrap,form:Zt,layout:"horizontal",onValuesChange:Qe,onFinish:we},t.a.createElement(H.a,{gutter:[10,0]},t.a.createElement(dt.a,{flex:"300px"},t.a.createElement(yt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(pe.a,null,t.a.createElement(_r,{value:"teacher"},"\u6559\u5E08"),t.a.createElement(_r,{value:"student"},"\u5B66\u751F"),t.a.createElement(_r,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),sr.identity==="student"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:sr.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},t.a.createElement(B.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),sr.identity==="teacher"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:sr.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(pe.a,null,t.a.createElement(_r,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement(_r,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement(_r,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement(_r,{value:"\u52A9\u6559"},"\u52A9\u6559")))),sr.identity==="professional"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:sr.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(pe.a,null,t.a.createElement(_r,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement(_r,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement(_r,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement(_r,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement(_r,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(yt.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:sr.school&&!(fr!=null&&fr.find(function(Xe){return Xe.name===sr.school}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",sr.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Pe},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(dn.a,{showSearch:!0,options:Nt==null?void 0:Nt.map(function(Xe){return{value:Xe.name}})})),t.a.createElement(yt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:sr.department&&!(Rr!=null&&Rr.find(function(Xe){return Xe.name===sr.department}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},sr.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(sr.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ve},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(dn.a,{showSearch:!0,onChange:function(ze){return ln(Rr.filter(function(Ze){return Ze.name.includes(ze)}))},options:Gt==null?void 0:Gt.map(function(Xe){return{value:Xe.name}})})),t.a.createElement(yt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:Tt.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(hi,Object(Ne.a)({},Ge,{accept:".png,.jpg,.bmp,.jpeg"}),Ir?t.a.createElement("img",{src:Ir,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(T.a,{className:"mr5",size:"large",onClick:je},"\u53D6\u6D88"),t.a.createElement(T.a,{size:"large",type:"primary",htmlType:"submit",loading:zt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),t.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Kt!=null&&(mt=Kt.setting)!==null&&mt!==void 0&&mt.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),t.a.createElement(Ut,{visible:un,onClose:function(){return Cr(!1)},schoolName:sr.school,onSuccess:be}),t.a.createElement(gi,{visible:pn,onClose:function(){return Xr(!1)},schoolId:(wt=fr.find(function(Xe){return Xe.name===sr.school}))===null||wt===void 0?void 0:wt.id,schoolName:sr.school,departmentName:sr.department,onSuccess:function(ze){return Fe(sr.school,ze)}}))},Di=Object(f.a)(function(xt){var et=xt.user,mt=xt.account,wt=xt.loading,Lt=xt.globalSetting;return{user:et,account:mt,globalSetting:Lt,loading:wt.effects}})(xi),wi=j("aCH8"),le=j.n(wi);function K(xt){var et=xt.type,mt=xt.dispatch,wt=xt.userid,Lt=xt.isshow,Dt=xt.setPhoneshow,Kt=xt.setEmailshow,zt="79e33abd4b6588941ab7622aed1e67e8",ht=Object(l.useState)(""),Ot=Object(o.a)(ht,2),Rt=Ot[0],ur=Ot[1],ar=Object(l.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Zt=Object(o.a)(ar,2),$t=Zt[0],rr=Zt[1],sr=Object(l.useState)(60),ot=Object(o.a)(sr,2),Ar=ot[0],Nr=ot[1],fr=Object(l.useState)(!1),_t=Object(o.a)(fr,2),It=_t[0],Et=_t[1],Nt=Object(l.useState)(""),qt=Object(o.a)(Nt,2),pr=qt[0],er=qt[1];function Rr(){return Ur.apply(this,arguments)}function Ur(){return Ur=Object(a.a)(s.a.mark(function mr(){var Ir;return s.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(Rt){Ft.next=3;break}return et===3?r.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):r.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 3:return Ft.next=5,mt({type:"competitions/getVerification",payload:{type:et,login:Rt,smscode:le()(zt+Rt)}});case 5:Ir=Ft.sent,Ir.status===1&&(r.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),br(),Et(!0));case 7:case"end":return Ft.stop()}},mr)})),Ur.apply(this,arguments)}function br(){Nr(60);var mr=setInterval(function(){--Ar,Ar>-1?Nr(Ar):(clearInterval(mr),Et(!1))},1e3)}function it(){return Gt.apply(this,arguments)}function Gt(){return Gt=Object(a.a)(s.a.mark(function mr(){var Ir;return s.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,mt({type:"competitions/PhoneBind",payload:{userid:wt,code:pr,phone:Rt}});case 2:Ir=Ft.sent,Ir.status===0&&(r.b.info("\u7ED1\u5B9A\u6210\u529F"),Dt("none"));case 4:case"end":return Ft.stop()}},mr)})),Gt.apply(this,arguments)}function ln(){return en.apply(this,arguments)}function en(){return en=Object(a.a)(s.a.mark(function mr(){var Ir;return s.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,mt({type:"competitions/EmailBind",payload:{userid:wt,code:pr,email:Rt}});case 2:Ir=Ft.sent,Ir.status===0&&(r.b.info("\u7ED1\u5B9A\u6210\u529F"),Kt("none"));case 4:case"end":return Ft.stop()}},mr)})),en.apply(this,arguments)}return t.a.createElement("div",{style:{display:Lt}},t.a.createElement("p",null,t.a.createElement(B.a,{value:Rt,onChange:function(Ir){return ur(Ir.target.value)},placeholder:et===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),t.a.createElement("span",null,t.a.createElement(B.a,{value:pr,onChange:function(Ir){return er(Ir.target.value)},placeholder:et===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",t.a.createElement(T.a,{disabled:It,onClick:function(){return Rr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},It?"\u91CD\u65B0\u53D1\u9001".concat(Ar,"s"):$t),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(T.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!pr){r.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}et===3?it():ln()}},"\u786E\u8BA4"),t.a.createElement(T.a,{style:{marginLeft:"20px"},onClick:function(){et===3?Dt("none"):Kt("none")}},"\u53D6\u6D88")))}var Y=K;function ee(xt){var et=xt.dispatch,mt=xt.userid,wt={wrapperCol:{offset:3,span:21}},Lt=yt.a.useForm(),Dt=Object(o.a)(Lt,1),Kt=Dt[0],zt=Object(S.i)(),ht=zt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(yt.a,{form:Kt,name:"basic"},t.a.createElement(yt.a.Item,Object(Ne.a)({},wt,{label:t.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),t.a.createElement(B.a,null)),t.a.createElement(yt.a.Item,Object(Ne.a)({},wt,{label:t.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),t.a.createElement(B.a,null)),t.a.createElement(yt.a.Item,Object(Ne.a)({},wt,{label:t.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),t.a.createElement(B.a,null)),t.a.createElement(yt.a.Item,null,t.a.createElement(T.a,{type:"primary",htmlType:"submit",onClick:Object(a.a)(s.a.mark(function Ot(){return s.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:Kt.validateFields().then(function(){var ar=Object(a.a)(s.a.mark(function Zt($t){var rr;return s.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,et({type:"competitions/setleader",payload:Object(N.a)({identifier:ht,user_id:mt},$t)});case 2:rr=ot.sent,rr.status===0&&r.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return ot.stop()}},Zt)}));return function(Zt){return ar.apply(this,arguments)}}());case 1:case"end":return ur.stop()}},Ot)}))},"\u63D0\u4EA4"))))}var ge=ee,se={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ke(xt){var et,mt,wt,Lt,Dt,Kt,zt,ht,Ot=xt.Prize,Rt=xt.Accounts,ur=xt.dispatch,ar=xt.userid,Zt=Object(l.useState)("none"),$t=Object(o.a)(Zt,2),rr=$t[0],sr=$t[1],ot=Object(l.useState)("none"),Ar=Object(o.a)(ot,2),Nr=Ar[0],fr=Ar[1];function _t(Et){return It.apply(this,arguments)}function It(){return It=Object(a.a)(s.a.mark(function Et(Nt){var qt;return s.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!(Nt==="1")){er.next=6;break}return er.next=3,ur({type:"competitions/Authentication"});case 3:qt=er.sent,er.next=9;break;case 6:return er.next=8,ur({type:"competitions/Professional"});case 8:qt=er.sent;case 9:qt.status===0&&r.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return er.stop()}},Et)})),It.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){ur({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u59D3\u540D\uFF1A",t.a.createElement("span",null,Rt==null?void 0:Rt.name),(Rt==null?void 0:Rt.authentication)==="uncertified"?null:(Rt==null?void 0:Rt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(T.a,{type:"primary",onClick:function(){return _t("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," \u5DF2\u8BA4\u8BC1")),t.a.createElement("p",null,"\u6027\u522B\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.gender)===0?"\u7537":"\u5973"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){ur({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u804C\u4E1A\uFF1A",t.a.createElement("span",null,Rt&&Rt.identity&&se[Rt.identity]),(Rt==null?void 0:Rt.authentication)==="uncertified"?null:(Rt==null?void 0:Rt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(T.a,{type:"primary",onClick:function(){return _t("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),t.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),t.a.createElement(T.a,{type:"primary",onClick:function(){ur({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),t.a.createElement("p",null,"\u5B66\u53F7\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.department_name)||"--"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(Rt==null?void 0:Rt.phone)||"--"),rr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){sr("block")}},"\u66F4\u6362"):null),t.a.createElement(Y,{type:3,dispatch:ur,userid:Rt==null?void 0:Rt.id,isshow:rr,setPhoneshow:sr,setEmailshow:fr}),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(Rt==null?void 0:Rt.mail)||"--"),Nr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){fr("block")}},"\u66F4\u6362"):null),t.a.createElement(Y,{type:4,dispatch:ur,userid:Rt==null?void 0:Rt.id,isshow:Nr,setEmailshow:fr,setPhoneshow:sr})),Ot!=null&&Ot.leader&&Ot!==null&&Ot!==void 0&&Ot.teams&&Ot!==null&&Ot!==void 0&&(et=Ot.teams[0])!==null&&et!==void 0&&(mt=et.bank_account)!==null&&mt!==void 0&&mt.bank?t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),t.a.createElement(ge,{dispatch:ur,userid:ar})),Ot!=null&&Ot.leader?t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((wt=Ot.teams[0])===null||wt===void 0||((Lt=wt.bank_account)===null||Lt===void 0))?void 0:Lt.bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((Dt=Ot.teams[0])===null||Dt===void 0||((Kt=Dt.bank_account)===null||Kt===void 0))?void 0:Kt.second_bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((zt=Ot.teams[0])===null||zt===void 0||((ht=zt.bank_account)===null||ht===void 0))?void 0:ht.card_no)||"--"))):null,t.a.createElement(Di,{Scoid:Rt==null?void 0:Rt.school_id}),t.a.createElement(vn,null))}var Ct=Ke,Xt=ve.a.TabPane;function Er(xt){var et=xt.Prize,mt=xt.Accounts,wt=xt.getAccounts,Lt=xt.dispatch,Dt=xt.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(ve.a,{defaultActiveKey:"1",onChange:function(zt){zt==="2"&&wt()}},t.a.createElement(Xt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(ke,{Prize:et})),t.a.createElement(Xt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(Ct,{userid:Dt,dispatch:Lt,Prize:et,Accounts:mt})))))}var Pt=Er,Lr=j("xKgJ"),Gr=j("wd/R"),_n=j.n(Gr),Zn=ve.a.TabPane;function qn(xt){var et,mt,wt,Lt,Dt,Kt,zt=xt.ChartRules,ht=xt.ItemData,Ot=xt.getCharts,Rt=xt.Selectkey,ur=xt.HeaderDetail,ar=xt.getChartRules,Zt=xt.userinfo,$t=xt.Editable,rr=xt.dispatch,sr=xt.StaffDetail,ot=Object(l.useState)(!1),Ar=Object(o.a)(ot,2),Nr=Ar[0],fr=Ar[1],_t=Object(l.useState)(""),It=Object(o.a)(_t,2),Et=It[0],Nt=It[1],qt=Object(l.useState)(!0),pr=Object(o.a)(qt,2),er=pr[0],Rr=pr[1],Ur=Object(l.useState)(),br=Object(o.a)(Ur,2),it=br[0],Gt=br[1],ln=Object(l.useState)(),en=Object(o.a)(ln,2),mr=en[0],Ir=en[1],Pr=Object(S.i)(),Ft=Pr.identifier;Object(l.useEffect)(function(){if(er){var gt,bt,Vt,Mt,Dr=zt==null||((gt=zt.stages)===null||gt===void 0)?void 0:gt[0];Gt(Dr);var on=zt==null||((bt=zt.stages)===null||bt===void 0||((Vt=bt[0])===null||Vt===void 0||((Mt=Vt.children)===null||Mt===void 0)))?void 0:Mt[0];if(Ir(on),Dr!=null&&Dr.id){var un,Cr,tn;Ot(Dr==null?void 0:Dr.id),Nt(((un=zt.rule_contents)===null||un===void 0||((Cr=un.filter(function(mn){return parseInt(mn.competition_stage_id)===parseInt(Dr==null?void 0:Dr.id)}))===null||Cr===void 0||((tn=Cr[0])===null||tn===void 0))?void 0:tn.content)||"")}else{var jr,pn,Xr;Ot(0),Nt(((jr=zt.rule_contents)===null||jr===void 0||((pn=jr.filter(function(mn){return parseInt(mn.competition_stage_id)===0}))===null||pn===void 0||((Xr=pn[0])===null||Xr===void 0))?void 0:Xr.content)||"")}}},[zt]);function Qt(){return vr.apply(this,arguments)}function vr(){return vr=Object(a.a)(s.a.mark(function gt(){var bt,Vt,Mt,Dr,on,un,Cr,tn,jr;return s.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:if(Et){Xr.next=3;break}return r.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Xr.abrupt("return");case 3:if(Rr(!1),bt=it==null?void 0:it.id,!bt){Xr.next=12;break}return Xr.next=8,Object(J.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:Et,md_content_id:(Vt=zt.rule_contents)===null||Vt===void 0||((Mt=Vt.filter(function(mn){return parseInt(mn.competition_stage_id)===parseInt(bt)}))===null||Mt===void 0||((Dr=Mt[0])===null||Dr===void 0))?void 0:Dr.id,stage_id:it==null?void 0:it.id}});case 8:on=Xr.sent,on.status===0&&(r.b.info("\u66F4\u65B0\u6210\u529F"),fr(!1),ar()),Xr.next=16;break;case 12:return Xr.next=14,Object(J.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:Et,md_content_id:(un=zt.rule_contents)===null||un===void 0||((Cr=un.filter(function(mn){return parseInt(mn.competition_stage_id)===0}))===null||Cr===void 0||((tn=Cr[0])===null||tn===void 0))?void 0:tn.id,stage_id:it==null?void 0:it.id}});case 14:jr=Xr.sent,jr.status===0&&(r.b.info("\u66F4\u65B0\u6210\u529F"),fr(!1),ar());case 16:case"end":return Xr.stop()}},gt)})),vr.apply(this,arguments)}var tr=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(bt,Vt,Mt){return t.a.createElement("span",null,bt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(bt){return t.a.createElement(rt.a,{title:bt},t.a.createElement("span",{title:bt},bt&&(bt==null?void 0:bt.length)>=10?(bt==null?void 0:bt.substr(0,10))+"...":bt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(bt){return t.a.createElement("span",{title:bt},bt&&(bt==null?void 0:bt.length)>=6?(bt==null?void 0:bt.substr(0,6))+"...":bt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(bt){return t.a.createElement("span",null,bt===1?"\u8BA1\u7B97\u4E2D":bt===2?"\u5B8C\u6210":bt===0?"\u5F85\u8BA1\u7B97":bt===3&&"\u9519\u8BEF")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(bt){return t.a.createElement("span",null,bt||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){return(bt==null?void 0:bt.length)>0?bt==null?void 0:bt.map(function(Vt,Mt){return t.a.createElement("span",null,Vt==null?void 0:Vt.name,"\uFF1A",Vt==null?void 0:Vt.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(it==null?void 0:it.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(bt){return t.a.createElement("span",null,bt||"--")}},(it==null?void 0:it.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="score"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},(it==null?void 0:it.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="fid"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},(it==null?void 0:it.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="total_score"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(bt){return t.a.createElement("span",null,bt||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Coffee"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Easyship"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Scar"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Scarf"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},!(it!=null&&it.display_four_indicators)&&(it==null?void 0:it.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var Vt;return t.a.createElement("span",null,(bt==null||((Vt=bt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Total"}))===null||Vt===void 0)?void 0:Vt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(bt){return t.a.createElement("a",{href:bt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(gt){return!!gt});return t.a.createElement("div",null,(zt==null||((et=zt.stages)===null||et===void 0)?void 0:et.length)>0?null:t.a.createElement(Je,null),(zt==null||((mt=zt.stages)===null||mt===void 0)?void 0:mt.length)>0&&t.a.createElement(ve.a,{animated:!0,tabBarExtraContent:Zt!=null&&Zt.admin||Zt!=null&&Zt.business||$t?t.a.createElement(T.a,{onClick:function(){fr(!0)}},"\u7F16\u8F91"):sr.enrolled&&(it==null?void 0:it.start_time)&&(it==null?void 0:it.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",_n()(it==null?void 0:it.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",_n()(it==null?void 0:it.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(T.a,{style:{marginLeft:"20px"},disabled:_n()(it==null?void 0:it.start_time).unix()>_n()(_n()().format("YYYY-MM-DD HH:mm:s")).unix()||_n()(_n()().format("YYYY-MM-DD HH:mm:s")).unix()>_n()(it==null?void 0:it.end_time).unix(),onClick:function(){rr({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(mr==null?void 0:mr.id)||(it==null?void 0:it.id),id:ur==null?void 0:ur.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(bt){var Vt,Mt,Dr,on,un;fr(!1);var Cr=zt==null||((Vt=zt.stages)===null||Vt===void 0)?void 0:Vt.filter(function(jr){return parseInt(bt)===parseInt(jr==null?void 0:jr.id)})[0],tn=Cr==null||((Mt=Cr.children)===null||Mt===void 0)?void 0:Mt[0];Ir(tn),Gt(Cr),Nt(((Dr=zt.rule_contents)===null||Dr===void 0||((on=Dr.filter(function(jr){return parseInt(jr.competition_stage_id)===parseInt(Cr==null?void 0:Cr.id)}))===null||on===void 0||((un=on[0])===null||un===void 0))?void 0:un.content)||""),Ot((tn==null?void 0:tn.id)||bt)}},zt&&zt.stages.map(function(gt,bt){return t.a.createElement(Zn,{tab:gt.name,key:gt.id===null?0:gt.id},Nr===!1&&zt&&zt.rule_contents.map(function(Vt,Mt){if(gt.id===Vt.competition_stage_id)return t.a.createElement(P.a,{key:Mt,value:Vt.content===void 0||Vt.content===null?"":Vt.content});if(gt.id===null&&Vt.competition_stage_id===0)return t.a.createElement(P.a,{key:Mt,value:Vt.content===void 0||Vt.content===null?"":Vt.content})}))})),(it==null||((wt=it.children)===null||wt===void 0)?void 0:wt.length)>0&&t.a.createElement(ve.a,{activeKey:(mr==null?void 0:mr.id)+"",onChange:function(bt){var Vt,Mt=it==null||((Vt=it.children)===null||Vt===void 0)?void 0:Vt.filter(function(Dr){return parseInt(bt)===parseInt(Dr==null?void 0:Dr.id)})[0];Ir(Mt),Ot(bt)}},it==null||((Lt=it.children)===null||Lt===void 0)?void 0:Lt.map(function(gt,bt){return t.a.createElement(Zn,{tab:gt.name,key:gt.id===null?0:gt.id})})),Nr&&t.a.createElement("div",null,t.a.createElement(ne.a,{defaultValue:Et,onChange:function(bt){Nt(bt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(T.a,{style:{width:"90px"},type:"primary",onClick:function(){return Qt()}},"\u63D0\u4EA4"),t.a.createElement(T.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return fr(!1)}},"\u53D6\u6D88"))),((Dt=ur.competition_modules.filter(function(gt){return gt.id===Rt}))===null||Dt===void 0||((Kt=Dt[0])===null||Kt===void 0)?void 0:Kt.show_leaderboard)&&t.a.createElement(Q.a,{dataSource:ht==null?void 0:ht.results,columns:tr}))}var Nn=qn,Ni=j("DjyN"),Gi=j("NUBc"),Wn=ve.a.TabPane;function Ti(xt){var et,mt,wt,Lt,Dt,Kt,zt=xt.loading,ht=xt.ChartRules,Ot=xt.ItemData,Rt=xt.getCharts,ur=xt.Selectkey,ar=xt.HeaderDetail,Zt=xt.getChartRules,$t=xt.userinfo,rr=xt.Editable,sr=xt.dispatch,ot=xt.StaffDetail,Ar=Object(l.useState)(!1),Nr=Object(o.a)(Ar,2),fr=Nr[0],_t=Nr[1],It=Object(l.useState)(""),Et=Object(o.a)(It,2),Nt=Et[0],qt=Et[1],pr=Object(l.useState)(!0),er=Object(o.a)(pr,2),Rr=er[0],Ur=er[1],br=Object(l.useState)(),it=Object(o.a)(br,2),Gt=it[0],ln=it[1],en=Object(l.useState)(),mr=Object(o.a)(en,2),Ir=mr[0],Pr=mr[1],Ft=Object(S.i)(),Qt=Ft.identifier,vr=Object(l.useState)({page:1,limit:10,sort:"desc"}),tr=Object(o.a)(vr,2),gt=tr[0],bt=tr[1];Object(l.useEffect)(function(){var Mt;Rr&&ht!==null&&ht!==void 0&&(Mt=ht.stages)!==null&&Mt!==void 0&&Mt[0]&&Vt()},[ht==null||((et=ht.stages)===null||et===void 0)?void 0:et[0]]);var Vt=function(){var Mt=Object(a.a)(s.a.mark(function Dr(){var on,un,Cr,tn,jr,pn;return s.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:return jr=ht==null||((on=ht.stages)===null||on===void 0)?void 0:on[0],ln(jr),pn=ht==null||((un=ht.stages)===null||un===void 0||((Cr=un[0])===null||Cr===void 0||((tn=Cr.children)===null||tn===void 0)))?void 0:tn[0],Pr(pn),gt.id=(pn==null?void 0:pn.id)||(jr==null?void 0:jr.id),bt(Object(N.a)({},gt)),mn.next=7,Rt(Object(N.a)(Object(N.a)({},gt),{},{stage_id:gt.id}));case 7:case"end":return mn.stop()}},Dr)}));return function(){return Mt.apply(this,arguments)}}();return t.a.createElement("div",null,(ht==null||((mt=ht.stages)===null||mt===void 0)?void 0:mt.length)>0?null:t.a.createElement(Je,null),(ht==null||((wt=ht.stages)===null||wt===void 0)?void 0:wt.length)>0&&t.a.createElement(ve.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Mt=Object(a.a)(s.a.mark(function Dr(on){var un,Cr,tn,jr,pn,Xr,mn;return s.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return _t(!1),Xr=ht==null||((un=ht.stages)===null||un===void 0)?void 0:un.filter(function(Ve){return parseInt(on)===parseInt(Ve==null?void 0:Ve.id)})[0],mn=Xr==null||((Cr=Xr.children)===null||Cr===void 0)?void 0:Cr[0],Pr(mn),ln(Xr),qt(((tn=ht.rule_contents)===null||tn===void 0||((jr=tn.filter(function(Ve){return parseInt(Ve.competition_stage_id)===parseInt(Xr==null?void 0:Xr.id)}))===null||jr===void 0||((pn=jr[0])===null||pn===void 0))?void 0:pn.content)||""),gt.page=1,gt.limit=10,gt.id=(mn==null?void 0:mn.id)||on,bt(Object(N.a)({},gt)),Pe.next=9,Rt(Object(N.a)({},gt));case 9:case"end":return Pe.stop()}},Dr)}));return function(Dr){return Mt.apply(this,arguments)}}()},ht&&ht.stages.map(function(Mt,Dr){return t.a.createElement(Wn,{tab:Mt.name,key:Mt.id===null?0:Mt.id})})),(Gt==null||((Lt=Gt.children)===null||Lt===void 0)?void 0:Lt.length)>0&&t.a.createElement(ve.a,{activeKey:(Ir==null?void 0:Ir.id)+"",onChange:function(){var Mt=Object(a.a)(s.a.mark(function Dr(on){var un,Cr;return s.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:return Cr=Gt==null||((un=Gt.children)===null||un===void 0)?void 0:un.filter(function(pn){return parseInt(on)===parseInt(pn==null?void 0:pn.id)})[0],Pr(Cr),gt.page=1,gt.limit=10,gt.id=on,bt(Object(N.a)({},gt)),jr.next=5,Rt(Object(N.a)({},gt));case 5:case"end":return jr.stop()}},Dr)}));return function(Dr){return Mt.apply(this,arguments)}}()},Gt==null||((Dt=Gt.children)===null||Dt===void 0)?void 0:Dt.map(function(Mt,Dr){return t.a.createElement(Wn,{tab:Mt.name,key:Mt.id===null?0:Mt.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){gt.page=1,gt.sort=gt.sort==="desc"?"asc":"desc",bt(Object(N.a)({},gt)),Rt(Object(N.a)({},gt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",gt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(gt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(B.a.Search,{onSearch:function(Dr){gt.page=1,gt.search=Dr,bt(Object(N.a)({},gt)),Rt(Object(N.a)({},gt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(p.a,{spinning:zt},Ot==null||((Kt=Ot.results)===null||Kt===void 0)?void 0:Kt.map(function(Mt,Dr){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:Dr===0?14:30}},t.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},t.a.createElement("img",{src:z.a.IMG_SERVER+"/images/"+(Mt==null?void 0:Mt.image_url),style:{width:40,height:40,borderRadius:"50%"}}),t.a.createElement("div",{style:{marginLeft:10}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},Mt==null?void 0:Mt.user_name),t.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Mt==null?void 0:Mt.team_name)||"- -")),t.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821 ",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Mt==null?void 0:Mt.school_name)||"- -")))),t.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},t.a.createElement("div",null,t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",Mt==null?void 0:Mt.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(Mt==null?void 0:Mt.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(Mt==null?void 0:Mt.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(Mt==null?void 0:Mt.game_identifier),target:"_blank"},t.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),t.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),t.a.createElement(Gi.a,{total:Ot==null?void 0:Ot.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:gt.page,onChange:function(Dr,on){gt.page=Dr,bt(Object(N.a)({},gt)),Rt(Object(N.a)({},gt))}})))}var Ki=Ti,ki=function(et){var mt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],wt=["","\u5341","\u767E","\u5343","\u4E07"];et=parseInt(et);var Lt=function(ht){for(var Ot=ht.toString().split("").reverse(),Rt="",ur=0;ur0&&Ot[ur]==0&&Ot[ur-1]==0?"":mt[Ot[ur]]+(Ot[ur]==0?wt[0]:wt[ur]))+Rt;return Rt},Dt=Math.floor(et/1e4),Kt=et%1e4;return Kt.toString().length<4&&(Kt="0"+Kt),Dt?Lt(Dt)+"\u4E07"+Lt(Kt):Lt(et)};function ni(xt){var et,mt=xt.item,wt=xt.index,Lt=xt.StaffDetail,Dt=Object(l.useState)(!0),Kt=Object(o.a)(Dt,2),zt=Kt[0],ht=Kt[1],Ot=Object(l.useState)(!0),Rt=Object(o.a)(Ot,2),ur=Rt[0],ar=Rt[1],Zt=Object(l.useRef)();return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},t.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},t.a.createElement("img",{src:z.a.IMG_SERVER+"/"+(mt==null?void 0:mt.pic),style:{width:220,height:130,borderRadius:"4px"}}),t.a.createElement("div",{style:{marginLeft:20,width:"75%"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",ki(wt+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},mt==null?void 0:mt.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},mt==null?void 0:mt.challenges_count)," ")),t.a.createElement("div",{ref:Zt},t.a.createElement(P.a,{style:{maxHeight:zt&&100},value:mt==null?void 0:mt.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ht(!zt)}},zt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(zt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:ur&&58,overflow:"hidden"}},mt==null||((et=mt.challenges)===null||et===void 0)?void 0:et.map(function($t,rr){return t.a.createElement("div",{style:{marginTop:rr===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",rr+1,"\u5173",$t==null?void 0:$t.name))})),t.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},t.a.createElement("span",{onClick:function(){ar(!ur)}},ur?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(ur?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Lt==null?void 0:Lt.enrolled)&&t.a.createElement(T.a,{onClick:function(){window.open("/shixuns/".concat(mt==null?void 0:mt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var ea=ni,Vi=ve.a.TabPane;function ta(xt){var et,mt,wt,Lt,Dt,Kt,zt=xt.loading,ht=xt.ChartRules,Ot=xt.ItemData,Rt=xt.getCharts,ur=xt.Selectkey,ar=xt.HeaderDetail,Zt=xt.getChartRules,$t=xt.userinfo,rr=xt.Editable,sr=xt.dispatch,ot=xt.StaffDetail,Ar=Object(l.useState)(!1),Nr=Object(o.a)(Ar,2),fr=Nr[0],_t=Nr[1],It=Object(l.useState)(""),Et=Object(o.a)(It,2),Nt=Et[0],qt=Et[1],pr=Object(l.useState)(!0),er=Object(o.a)(pr,2),Rr=er[0],Ur=er[1],br=Object(l.useState)(),it=Object(o.a)(br,2),Gt=it[0],ln=it[1],en=Object(l.useState)(),mr=Object(o.a)(en,2),Ir=mr[0],Pr=mr[1],Ft=Object(S.i)(),Qt=Ft.identifier,vr=Object(l.useState)({page:1,limit:10}),tr=Object(o.a)(vr,2),gt=tr[0],bt=tr[1],Vt=Object(l.useState)(),Mt=Object(o.a)(Vt,2),Dr=Mt[0],on=Mt[1];Object(l.useEffect)(function(){var Cr;Rr&&ht!==null&&ht!==void 0&&(Cr=ht.stages)!==null&&Cr!==void 0&&Cr[0]&&un()},[ht==null||((et=ht.stages)===null||et===void 0)?void 0:et[0]]);var un=function(){var Cr=Object(a.a)(s.a.mark(function tn(){var jr,pn,Xr,mn,Xn,Pe;return s.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Xn=ht==null||((jr=ht.stages)===null||jr===void 0)?void 0:jr[0],ln(Xn),Pe=ht==null||((pn=ht.stages)===null||pn===void 0||((Xr=pn[0])===null||Xr===void 0||((mn=Xr.children)===null||mn===void 0)))?void 0:mn[0],Pr(Pe),gt.id=(Pe==null?void 0:Pe.id)||(Xn==null?void 0:Xn.id),bt(Object(N.a)({},gt)),Qe.next=7,Rt(Object(N.a)(Object(N.a)({},gt),{},{stage_id:gt.id}));case 7:case"end":return Qe.stop()}},tn)}));return function(){return Cr.apply(this,arguments)}}();return t.a.createElement("div",null,(ht==null||((mt=ht.stages)===null||mt===void 0)?void 0:mt.length)>0?null:t.a.createElement(Je,null),(ht==null||((wt=ht.stages)===null||wt===void 0)?void 0:wt.length)>0&&t.a.createElement(ve.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Cr=Object(a.a)(s.a.mark(function tn(jr){var pn,Xr,mn,Xn,Pe,Ve,Qe;return s.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return _t(!1),Ve=ht==null||((pn=ht.stages)===null||pn===void 0)?void 0:pn.filter(function(De){return parseInt(jr)===parseInt(De==null?void 0:De.id)})[0],Qe=Ve==null||((Xr=Ve.children)===null||Xr===void 0)?void 0:Xr[0],Pr(Qe),ln(Ve),qt(((mn=ht.rule_contents)===null||mn===void 0||((Xn=mn.filter(function(De){return parseInt(De.competition_stage_id)===parseInt(Ve==null?void 0:Ve.id)}))===null||Xn===void 0||((Pe=Xn[0])===null||Pe===void 0))?void 0:Pe.content)||""),gt.page=1,gt.limit=10,gt.id=(Qe==null?void 0:Qe.id)||jr,bt(Object(N.a)({},gt)),be.next=9,Rt(Object(N.a)({},gt));case 9:case"end":return be.stop()}},tn)}));return function(tn){return Cr.apply(this,arguments)}}()},ht&&ht.stages.map(function(Cr,tn){return t.a.createElement(Vi,{tab:Cr.name,key:Cr.id===null?0:Cr.id})})),(Gt==null||((Lt=Gt.children)===null||Lt===void 0)?void 0:Lt.length)>0&&t.a.createElement(ve.a,{activeKey:(Ir==null?void 0:Ir.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var Cr=Object(a.a)(s.a.mark(function tn(jr){var pn,Xr;return s.a.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return Xr=Gt==null||((pn=Gt.children)===null||pn===void 0)?void 0:pn.filter(function(Pe){return parseInt(jr)===parseInt(Pe==null?void 0:Pe.id)})[0],Pr(Xr),gt.page=1,gt.limit=10,gt.id=jr,bt(Object(N.a)({},gt)),Xn.next=5,Rt(Object(N.a)({},gt));case 5:case"end":return Xn.stop()}},tn)}));return function(tn){return Cr.apply(this,arguments)}}()},Gt==null||((Dt=Gt.children)===null||Dt===void 0)?void 0:Dt.map(function(Cr,tn){return t.a.createElement(Vi,{tab:Cr.name,key:Cr.id===null?0:Cr.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},Ot==null?void 0:Ot.start_time,"~",Ot==null?void 0:Ot.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(Ot==null?void 0:Ot.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(p.a,{spinning:zt},Ot==null||((Kt=Ot.results)===null||Kt===void 0)?void 0:Kt.map(function(Cr,tn){return t.a.createElement(ea,{StaffDetail:ot,item:Cr,index:tn})})),t.a.createElement(Gi.a,{total:Ot==null?void 0:Ot.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:gt.page,onChange:function(tn,jr){gt.page=tn,bt(Object(N.a)({},gt)),Rt(Object(N.a)({},gt))}})))}var oa=ta,Li=j("UfjD"),$n=j("qHvr"),ji=function(et){var mt,wt,Lt,Dt,Kt,zt,ht,Ot,Rt=et.globalSetting,ur=et.loading,ar=et.dispatch,Zt=et.user,$t=Object(u.a)(et,["globalSetting","loading","dispatch","user"]),rr=Object(l.useState)({avatar_url:""}),sr=Object(o.a)(rr,2),ot=sr[0],Ar=sr[1],Nr=Object(l.useState)([]),fr=Object(o.a)(Nr,2),_t=fr[0],It=fr[1],Et=Object(S.i)(),Nt=Et.identifier,qt=Object(l.useState)([]),pr=Object(o.a)(qt,2),er=pr[0],Rr=pr[1],Ur=Object(l.useState)(!0),br=Object(o.a)(Ur,2),it=br[0],Gt=br[1],ln=Object(l.useState)([]),en=Object(o.a)(ln,2),mr=en[0],Ir=en[1],Pr=Object(l.useState)([]),Ft=Object(o.a)(Pr,2),Qt=Ft[0],vr=Ft[1],tr=Object(l.useState)(!1),gt=Object(o.a)(tr,2),bt=gt[0],Vt=gt[1],Mt=Object(l.useState)(!1),Dr=Object(o.a)(Mt,2),on=Dr[0],un=Dr[1],Cr=Object(l.useState)(!1),tn=Object(o.a)(Cr,2),jr=tn[0],pn=tn[1],Xr=Object(l.useState)([]),mn=Object(o.a)(Xr,2),Xn=mn[0],Pe=mn[1],Ve=Object(l.useState)([]),Qe=Object(o.a)(Ve,2),Fe=Qe[0],be=Qe[1],De=Object(l.useState)([]),we=Object(o.a)(De,2),je=we[0],Ge=we[1],Xe=Object(l.useState)(!1),ze=Object(o.a)(Xe,2),Ze=ze[0],pt=ze[1],kt=Object(l.useState)([]),jt=Object(o.a)(kt,2),Yt=jt[0],kr=jt[1],Jr=Object(l.useState)(),$r=Object(o.a)(Jr,2),Zr=$r[0],Hr=$r[1],rn=Object(l.useState)(!0),nn=Object(o.a)(rn,2),yn=nn[0],cn=nn[1],In=Object(l.useState)(!1),fn=Object(o.a)(In,2),Mr=fn[0],Fr=fn[1],sn=Object(l.useState)(!1),gn=Object(o.a)(sn,2),wr=gn[0],xn=gn[1],zn=Object(l.useState)(!1),Sn=Object(o.a)(zn,2),Ln=Sn[0],Cn=Sn[1],Jn=Object(l.useState)(!1),ii=Object(o.a)(Jn,2),Gn=ii[0],fi=ii[1],Xi=Object(l.useState)(!1),Si=Object(o.a)(Xi,2),ai=Si[0],Pn=Si[1],Mn=Object(l.useState)(!0),Kn=Object(o.a)(Mn,2),Bn=Kn[0],ei=Kn[1],Ai=Object(S.h)(),ra=Object(l.useRef)(null);Object(l.useEffect)(function(){Nt&&An(),Object(Wt.X)("\u7ADE\u8D5B")},[Nt]);function An(){return Fi.apply(this,arguments)}function Fi(){return Fi=Object(a.a)(s.a.mark(function xr(){var Tr;return s.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return wn.t0=It,wn.next=3,ar({type:"competitions/getStaff",payload:{identifier:Nt}});case 3:return wn.t1=wn.sent,(0,wn.t0)(wn.t1),wn.next=7,ar({type:"competitions/getHeader",payload:{identifier:Nt}});case 7:Tr=wn.sent,Ar(Tr),Object(Wt.X)((Tr==null?void 0:Tr.name)||"\u7ADE\u8D5B");case 10:case"end":return wn.stop()}},xr)})),Fi.apply(this,arguments)}Object(l.useEffect)(function(){var xr;Hr(parseInt(Ai==null||((xr=Ai.query)===null||xr===void 0)?void 0:xr.type)===1)},[Ai]),Object(l.useEffect)(function(){var xr;if((ot==null||((xr=ot.competition_modules)===null||xr===void 0)?void 0:xr.length)>0){var Tr,or;if((Ai==null||((Tr=Ai.query)===null||Tr===void 0)?void 0:Tr.active)==="\u8D5B\u9898\u53D1\u5E03"){var wn,hr=ot==null||((wn=ot.competition_modules)===null||wn===void 0)?void 0:wn.find(function(pa){return pa.name==="\u8D5B\u9898\u53D1\u5E03"});if(hr){Ui(hr);return}}Ui(ot==null||((or=ot.competition_modules)===null||or===void 0)?void 0:or[0])}},[ot]);function Ui(xr){return Dn.apply(this,arguments)}function Dn(){return Dn=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(Ge(Tr.id),je=Tr.id,Ir(Tr),!(Tr.module_type==="entrance")){hr.next=9;break}return hr.next=6,ar({type:"competitions/getItem",payload:{url:Tr.module_url,module_type:"entrance"}});case 6:or=hr.sent,hr.next=12;break;case 9:return hr.next=11,ar({type:"competitions/getItem",payload:{url:Tr.module_url}});case 11:or=hr.sent;case 12:Vt(!1),pn(!1),pt(!1),Rr(or),Fr(!1),xn(!1),vr(Tr.module_type),Tr.module_type==="chart"?(Vt(!0),Gt(!1),Ba()):Tr.module_type==="certificate"?(pn(!0),Vt(!1),Gt(!1),ba()):Tr.module_type==="md_tab"?(pt(!0),Gt(!1),localStorage.setItem("issee","2"),Vt(!1),pn(!1),ua()):Tr.module_type==="md_shixun"?(Fr(!0),Gt(!1),ua()):Tr.module_type==="entrance"?(xn(!0),Gt(!1),ua()):(Gt(!0),localStorage.setItem("issee","1"));case 20:case"end":return hr.stop()}},xr)})),Dn.apply(this,arguments)}function On(xr,Tr,or){return ti.apply(this,arguments)}function ti(){return ti=Object(a.a)(s.a.mark(function xr(Tr,or,wn){var hr,pa;return s.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:if(Tr.stopPropagation(),Object(ue.e)(ar)){jn.next=3;break}return jn.abrupt("return");case 3:if(!(ot!=null&&ot.is_authentication&&!(Zt!=null&&(hr=Zt.userInfo)!==null&&hr!==void 0&&hr.authentication))){jn.next=6;break}return ar({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),jn.abrupt("return");case 6:if(!(ot!=null&&ot.enroll_url)){jn.next=9;break}return Object(Wt.S)(ot==null?void 0:ot.enroll_url),jn.abrupt("return");case 9:if(!(wn==="ismodel")){jn.next=23;break}if(!(or.member_of_course===!0)){jn.next=14;break}Object(Wt.S)("/classrooms/".concat(or.course_id)),jn.next=21;break;case 14:if(or.invite_code){jn.next=17;break}return r.b.info("\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C"),jn.abrupt("return");case 17:return jn.next=19,ar({type:"competitions/addApplytojoincourse",payload:{invite_code:or.invite_code,student:1}});case 19:pa=jn.sent,pa.status===0&&Object(Wt.S)("/classrooms/".concat(or.course_id));case 21:jn.next=27;break;case 23:if(!(_t.enrolled===!0)){jn.next=26;break}return Object(Wt.S)(wn),jn.abrupt("return");case 26:Cn(!0);case 27:case"end":return jn.stop()}},xr)})),ti.apply(this,arguments)}function Ba(){return wa.apply(this,arguments)}function wa(){return wa=Object(a.a)(s.a.mark(function xr(){return s.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return or.t0=un,or.next=3,ar({type:"competitions/ChartRules",payload:{identifier:Nt}});case 3:return or.t1=or.sent,or.next=6,(0,or.t0)(or.t1);case 6:case"end":return or.stop()}},xr)})),wa.apply(this,arguments)}function sa(xr){return la.apply(this,arguments)}function la(){return la=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Charts",payload:{identifier:Nt,stage_id:Tr}});case 2:or=hr.sent,Rr(or);case 4:case"end":return hr.stop()}},xr)})),la.apply(this,arguments)}function ka(xr){return Ta.apply(this,arguments)}function Ta(){return Ta=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return cn(!0),hr.next=3,ar({type:"competitions/Results",payload:Object(N.a)({identifier:Nt,stage_id:Tr==null?void 0:Tr.id},Tr)});case 3:or=hr.sent,Rr(or),cn(!1);case 6:case"end":return hr.stop()}},xr)})),Ta.apply(this,arguments)}function La(xr){return Ha.apply(this,arguments)}function Ha(){return Ha=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return cn(!0),hr.next=3,ar({type:"competitions/Results",payload:Object(N.a)({identifier:Nt,stage_id:Tr==null?void 0:Tr.id,module_type:"entrance"},Tr)});case 3:or=hr.sent,Rr(or),cn(!1);case 6:case"end":return hr.stop()}},xr)})),Ha.apply(this,arguments)}function Xa(xr){return Pa.apply(this,arguments)}function Pa(){return Pa=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Results",payload:{identifier:Nt,stage_id:Tr}});case 2:if(or=hr.sent,!(localStorage.getItem("issee")==="1")){hr.next=5;break}return hr.abrupt("return");case 5:Rr(or);case 6:case"end":return hr.stop()}},xr)})),Pa.apply(this,arguments)}function ua(){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(a.a)(s.a.mark(function xr(){return s.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return or.t0=kr,or.next=3,ar({type:"competitions/TabResults",payload:{identifier:Nt,competition_module_id:je}});case 3:or.t1=or.sent,(0,or.t0)(or.t1);case 5:case"end":return or.stop()}},xr)})),Sa.apply(this,arguments)}function ba(){return ca.apply(this,arguments)}function ca(){return ca=Object(a.a)(s.a.mark(function xr(){var Tr,or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Prize",payload:{identifier:Nt,user_id:Zt==null||((Tr=Zt.userInfo)===null||Tr===void 0)?void 0:Tr.user_id}});case 2:or=hr.sent,Pe(or);case 4:case"end":return hr.stop()}},xr)})),ca.apply(this,arguments)}function co(){return _a.apply(this,arguments)}function _a(){return _a=Object(a.a)(s.a.mark(function xr(){var Tr,or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Accounts",payload:{id:Zt==null||((Tr=Zt.userInfo)===null||Tr===void 0)?void 0:Tr.user_id}});case 2:or=hr.sent,be(or);case 4:case"end":return hr.stop()}},xr)})),_a.apply(this,arguments)}function Ca(xr){return da.apply(this,arguments)}function da(){return da=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(Bn){hr.next=2;break}return hr.abrupt("return");case 2:if(ei(!1),!fa()){hr.next=5;break}return hr.abrupt("return");case 5:return hr.next=7,ar({type:"competitions/AddTeam",payload:{identifier:Nt,name:Tr}});case 7:or=hr.sent,or&&or.status===0?(r.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),An(),fi(!1)):ei(!0);case 9:case"end":return hr.stop()}},xr)})),da.apply(this,arguments)}function fa(){var xr,Tr;if(Zt!=null&&(xr=Zt.userInfo)!==null&&xr!==void 0&&xr.is_teacher){var or;if(_t!=null&&(or=_t.teacher_staff)!==null&&or!==void 0&&or.mutiple_limited&&(_t!=null&&_t.enrolled))return r.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ei(!0),!0}else{var wn;if(_t!=null&&(wn=_t.member_staff)!==null&&wn!==void 0&&wn.mutiple_limited&&(_t!=null&&_t.enrolled))return r.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ei(!0),!0}if(_t!=null&&_t.enroll_ended)return r.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),ei(!0),!0;if(Zt!=null&&(Tr=Zt.userInfo)!==null&&Tr!==void 0&&Tr.is_teacher){if(!_t.teacher_staff)return r.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),ei(!0),!0}else if(!(_t!=null&&_t.member_staff))return r.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),ei(!0),!0}function Yi(xr){return na.apply(this,arguments)}function na(){return na=Object(a.a)(s.a.mark(function xr(Tr){var or;return s.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(Bn){hr.next=2;break}return hr.abrupt("return");case 2:if(!fa()){hr.next=4;break}return hr.abrupt("return");case 4:return ei(!1),hr.next=7,ar({type:"competitions/JoinTeam",payload:{identifier:Nt,invite_code:Tr}});case 7:or=hr.sent,or&&or.status===0?(r.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),Pn(!1),ei(!0),An()):ei(!0);case 9:case"end":return hr.stop()}},xr)})),na.apply(this,arguments)}return t.a.createElement("div",{className:"edu-container minH500"},t.a.createElement(n.a,{className:"mt10",separator:">"},t.a.createElement(n.a.Item,null,t.a.createElement(x.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),t.a.createElement(n.a.Item,null,ot.name,ot.sub_title?"-"+ot.sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(p.a,{spinning:ur.effects["competitions/getHeader"]},t.a.createElement("div",{style:{height:"355px",width:"800px"}},(ot==null?void 0:ot.avatar_url)&&(ot==null?void 0:ot.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:z.a.IMG_SERVER+"/"+(ot==null?void 0:ot.avatar_url)}),!(ot!=null&&ot.avatar_url)&&(ot==null?void 0:ot.avatar_url)==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:z.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),t.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},t.a.createElement("p",{className:"".concat(C.a.titlesize)},ot.name,ot.sub_title?"-"+ot.sub_title:null),t.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u5956\u91D1"),ot!=null&&ot.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(ot&&ot.bonus).toLocaleString()):t.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u6D4F\u89C8"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(ot&&ot.visits_count).toLocaleString())),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u62A5\u540D"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(ot&&ot.member_count).toLocaleString()))),t.a.createElement("p",{className:C.a.timesize,style:{marginTop:30}},t.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),ot.start_time,"~",ot.end_time),t.a.createElement("p",{className:C.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),ot.enroll_end_time),ot.competition_status==="ended"?t.a.createElement("p",{className:C.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,ot.competition_status==="nearly_published"?t.a.createElement("p",{className:C.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,ot.competition_status==="progressing"?t.a.createElement("p",{className:C.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,t.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(ot==null?void 0:ot.mode)<=2&&_t.enrolled&&t.a.createElement(T.a,{onClick:function(Tr){if((ot==null?void 0:ot.mode)===1){var or;Ui((or=ot.competition_modules)===null||or===void 0?void 0:or.find(function(wn){return wn.module_type==="entrance"}))}else On(Tr,ot,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(ot==null?void 0:ot.mode)===2||(ot==null?void 0:ot.mode)===1&&((mt=ot.competition_modules)===null||mt===void 0||((wt=mt.filter(function(xr){return xr.module_type==="entrance"}))===null||wt===void 0)?void 0:wt.length)>0?"":"none"},className:C.a.buttonsize},(ot==null?void 0:ot.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(ot==null?void 0:ot.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),ot.competition_status==="ended"?t.a.createElement(T.a,{type:"primary",className:C.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,ot.competition_status==="nearly_published"?t.a.createElement(T.a,{type:"primary",className:C.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,ot.competition_status!=="nearly_published"&&ot.enroll_end&&ot.competition_status!=="ended"?t.a.createElement(T.a,{type:"primary",className:C.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,ot.competition_status==="progressing"&&ot.enroll_end!=!0?t.a.createElement(T.a,{type:"primary",disabled:_t.enrolled&&!ot.need_attachment,className:C.a.buttonsize,onClick:function(Tr){if(_t.enrolled&&ot.need_attachment){var or;(or=ra.current)===null||or===void 0||or.handleVisible();return}On(Tr,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))}},_t.enrolled?ot.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":ot!=null&&ot.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Zt.userInfo.real_name!="\u6E38\u5BA2"&&!(ot!=null&&ot.enroll_url)&&t.a.createElement("span",{onClick:function(Tr){return On(Tr,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))},className:C.a.myteam},Object(Lr.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),t.a.createElement("div",{className:C.a.bootmdetail},t.a.createElement("div",{className:C.a.flex1},t.a.createElement(m.a,{selectedKeys:["".concat(je)]},ot&&ot.competition_modules&&ot.competition_modules.map(function(xr,Tr){if(xr.module_type!="enroll")return t.a.createElement(m.a.Item,{className:C.a.menuItem,onClick:function(){if(xr!=null&&xr.is_authentication){if(!Object(ue.e)(ar))return;r.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Ui(xr)},key:xr.id},xr.name)}))),t.a.createElement("div",{className:C.a.flex6,style:{padding:(Mr||wr)&&0}},jr?t.a.createElement(Pt,{dispatch:ar,userid:Zt==null||((Lt=Zt.userInfo)===null||Lt===void 0)?void 0:Lt.user_id,Prize:Xn,Accounts:Fe,getAccounts:co}):null,bt?t.a.createElement(Le,{HeaderDetail:ot,userinfo:Zt.userInfo,Editable:ot==null||((Dt=ot.permission)===null||Dt===void 0)?void 0:Dt.editable,getCharts:sa,getChartRules:Ba,Selectkey:je,ChartRules:on,ItemData:er}):null,it?t.a.createElement(te,{ref:ra,StaffDetail:_t,HeaderDetail:ot,userinfo:Zt.userInfo,Editable:ot==null||((Kt=ot.permission)===null||Kt===void 0)?void 0:Kt.editable,ItemData:er,setIssee:Gt,ModelType:Qt,dispatch:ar}):null,!it&&!Mr&&!wr&&!bt&&!jr&&!Ze?t.a.createElement(Z,{userinfo:Zt.userInfo,ModelType:Qt,getrightdatas:Ui,dispatch:ar,MenuItem:mr,setIssee:Gt,identifier:Nt,ItemData:er}):null,Ze&&t.a.createElement(Nn,{dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:ot,Editable:ot==null||((zt=ot.permission)===null||zt===void 0)?void 0:zt.editable,getCharts:Xa,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}),Mr&&t.a.createElement(Ki,{loading:yn,dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:ot,Editable:ot==null||((ht=ot.permission)===null||ht===void 0)?void 0:ht.editable,getCharts:ka,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}),wr&&t.a.createElement(oa,{loading:yn,dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:ot,Editable:ot==null||((Ot=ot.permission)===null||Ot===void 0)?void 0:Ot.editable,getCharts:La,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}))),t.a.createElement(v.a,null),t.a.createElement(V,{getResults:Xa}),t.a.createElement(O.a,{visible:Zr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Hr(!1)}},t.a.createElement("div",{className:C.a.modal},t.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),t.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",t.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),t.a.createElement("div",null,"1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"),t.a.createElement("div",null,"2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"),t.a.createElement("div",null,"3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"),t.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),t.a.createElement(T.a,{type:"primary",onClick:function(){return Object(Wt.S)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(O.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:Ln,onCancel:function(){Cn(!1)},footer:!1},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.a.createElement(T.a,{type:"primary",style:{height:40},onClick:function(){Pn(!0),Cn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(T.a,{style:{height:40},onClick:function(){fi(!0),Cn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),ai?t.a.createElement(Li.a,{isjoin:ai,setJoin:Pn,JoinTeams:Yi}):null,Gn?t.a.createElement($n.a,{isAddmodle:Gn,setIsAdd:fi,createTeam:Ca}):null)},ha=q.default=Object(f.a)(function(xt){var et=xt.loading,mt=xt.globalSetting,wt=xt.user;return{globalSetting:mt,loading:et,user:wt}})(ji)},GRuw:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("lPiR"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=g.algo,y=m.SHA256,T=m.SHA224=y.extend({_doReset:function(){this._hash=new M.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var b=y._doFinalize.call(this);return b.sigBytes-=4,b}});g.SHA224=y._createHelper(T),g.HmacSHA224=y._createHmacHelper(T)}(),N.SHA224})},GfqC:function(F,q,j){"use strict";var N=j("q1tI"),g=j.n(N),O=j("TSYQ"),M=j.n(O);function m(G,B){var P="cannot "+G.method+" "+G.action+" "+B.status+"'",z=new Error(P);return z.status=B.status,z.method=G.method,z.url=G.action,z}function y(G){var B=G.responseText||G.response;if(!B)return B;try{return JSON.parse(B)}catch(P){return B}}function T(G){var B=new XMLHttpRequest;G.onProgress&&B.upload&&(B.upload.onprogress=function(ue){ue.total>0&&(ue.percent=ue.loaded/ue.total*100),G.onProgress(ue)});var P=new FormData;G.data&&Object.keys(G.data).forEach(function(J){var ue=G.data[J];if(Array.isArray(ue)){ue.forEach(function(de){P.append(J+"[]",de)});return}P.append(J,G.data[J])}),G.file instanceof Blob?P.append(G.filename,G.file,G.file.name):P.append(G.filename,G.file),B.onerror=function(ue){G.onError(ue)},B.onload=function(){return B.status<200||B.status>=300?G.onError(m(G,B),y(B)):G.onSuccess(y(B),B)},B.open(G.method,G.action,!0),G.withCredentials&&"withCredentials"in B&&(B.withCredentials=!0);var z=G.headers||{};return z["X-Requested-With"]!==null&&B.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(z).forEach(function(J){z[J]!==null&&B.setRequestHeader(J,z[J])}),B.send(P),{abort:function(){B.abort()}}}var b=+new Date,p=0;function d(){return"rc-upload-"+b+"-"+ ++p}function n(G,B){return G.indexOf(B,G.length-B.length)!==-1}var c=function(G,B){if(G&&B){var P=Array.isArray(B)?B:B.split(","),z=G.name||"",J=G.type||"",ue=J.replace(/\/.*$/,"");return P.some(function(de){var Se=de.trim();return Se.charAt(0)==="."?n(z.toLowerCase(),Se.toLowerCase()):/\/\*$/.test(Se)?ue===Se.replace(/\/.*$/,""):J===Se})}return!0};function r(G,B){var P=G.createReader(),z=[];function J(){P.readEntries(function(ue){var de=Array.prototype.slice.apply(ue);z=z.concat(de);var Se=!de.length;Se?B(z):J()})}J()}var a=function(B,P,z){var J=function ue(de,Se){Se=Se||"",de.isFile?de.file(function(Ae){z(Ae)&&(de.fullPath&&!Ae.webkitRelativePath&&(Object.defineProperties(Ae,{webkitRelativePath:{writable:!0}}),Ae.webkitRelativePath=de.fullPath.replace(/^\//,""),Object.defineProperties(Ae,{webkitRelativePath:{writable:!1}})),P([Ae]))}):de.isDirectory&&r(de,function(Ae){Ae.forEach(function(pe){ue(pe,""+Se+de.name+"/")})})};B.forEach(function(ue){J(ue.webkitGetAsEntry())})},o=a,u=Object.assign||function(G){for(var B=1;B=0)continue;if(!Object.prototype.hasOwnProperty.call(G,z))continue;P[z]=G[z]}return P}function S(G,B){if(!(G instanceof B))throw new TypeError("Cannot call a class as a function")}function x(G,B){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:G}function f(G,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);G.prototype=Object.create(B&&B.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(G,B):G.__proto__=B)}var R=function(B){return Object.keys(B).reduce(function(P,z){return(z.substr(0,5)==="data-"||z.substr(0,5)==="aria-"||z==="role")&&(P[z]=B[z]),P},{})},C=function(G){f(B,G);function B(){var P,z,J,ue;S(this,B);for(var de=arguments.length,Se=Array(de),Ae=0;Ae>>2]>>>24-R%4*8&255;t[x+R>>>2]|=C<<24-(x+R)%4*8}else for(var v=0;v>>2]=S[v>>>2];return this.sigBytes+=f,this},clamp:function(){var l=this.words,t=this.sigBytes;l[t>>>2]&=4294967295<<32-t%4*8,l.length=O.ceil(t/4)},clone:function(){var l=d.clone.call(this);return l.words=this.words.slice(0),l},random:function(l){for(var t=[],S=0;S>>2]>>>24-f%4*8&255;x.push((R>>>4).toString(16)),x.push((R&15).toString(16))}return x.join("")},parse:function(l){for(var t=l.length,S=[],x=0;x>>3]|=parseInt(l.substr(x,2),16)<<24-x%8*4;return new n.init(S,t/2)}},a=c.Latin1={stringify:function(l){for(var t=l.words,S=l.sigBytes,x=[],f=0;f>>2]>>>24-f%4*8&255;x.push(String.fromCharCode(R))}return x.join("")},parse:function(l){for(var t=l.length,S=[],x=0;x>>2]|=(l.charCodeAt(x)&255)<<24-x%4*8;return new n.init(S,t)}},o=c.Utf8={stringify:function(l){try{return decodeURIComponent(escape(a.stringify(l)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(l){return a.parse(unescape(encodeURIComponent(l)))}},u=p.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(l){typeof l=="string"&&(l=o.parse(l)),this._data.concat(l),this._nDataBytes+=l.sigBytes},_process:function(l){var t,S=this._data,x=S.words,f=S.sigBytes,R=this.blockSize,C=R*4,v=f/C;l?v=O.ceil(v):v=O.max((v|0)-this._minBufferSize,0);var _=v*R,E=O.min(_*4,f);if(_){for(var w=0;w<_;w+=R)this._doProcessBlock(x,w);t=x.splice(0,_),S.sigBytes-=E}return new n.init(t,E)},clone:function(){var l=d.clone.call(this);return l._data=this._data.clone(),l},_minBufferSize:0}),h=p.Hasher=u.extend({cfg:d.extend(),init:function(l){this.cfg=this.cfg.extend(l),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(l){return this._append(l),this._process(),this},finalize:function(l){l&&this._append(l);var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(l){return function(t,S){return new l.init(S).finalize(t)}},_createHmacHelper:function(l){return function(t,S){return new s.HMAC.init(l,S).finalize(t)}}}),s=b.algo={};return b}(Math);return g})}).call(this,j("IyRk"))},K3mO:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("3y9D"),j("WYAk"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.Base,m=O.WordArray,y=g.algo,T=y.MD5,b=y.EvpKDF=M.extend({cfg:M.extend({keySize:128/32,hasher:T,iterations:1}),init:function(p){this.cfg=this.cfg.extend(p)},compute:function(p,d){for(var n,c=this.cfg,r=c.hasher.create(),a=m.create(),o=a.words,u=c.keySize,h=c.iterations;o.lengthye)){ae.next=7;break}return O.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(ye/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ae.abrupt("return",!1);case 7:return H.push({name:Oe.name,file:Oe}),G(Object(M.a)(H)),L.onChange(H),ae.abrupt("return",!1);case 11:case"end":return ae.stop()}},pe)}));function Ae(pe){return Se.apply(this,arguments)}return Ae}()},de=function(){var Se=Object(b.a)(c.a.mark(function Ae(pe,Oe){var ye,ce,ae,re,fe,te,ne,Te,ie,Z;return c.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return Oe.file_name=pe.name,ne=pe.name,Q.next=4,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Te=Q.sent,Te.data=JSON.parse(f(Te.data)),!((Te==null?void 0:Te.status)!==0)){Q.next=12;break}return H[H.findIndex(function(_e){return _e.name===ne})].status="error",H[H.findIndex(function(_e){return _e.name===ne})].file.status="error",L.onChange(H),O.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Q.abrupt("return");case 12:return z=new S.a({endpoint:Te==null||((ye=Te.data)===null||ye===void 0)?void 0:ye.end_point,region:Te==null||((ce=Te.data)===null||ce===void 0)?void 0:ce.region,accessKeyId:Te==null||((ae=Te.data)===null||ae===void 0)?void 0:ae.access_key_id,accessKeySecret:Te==null||((re=Te.data)===null||re===void 0)?void 0:re.access_key_secret,bucket:Te==null||((fe=Te.data)===null||fe===void 0)?void 0:fe.bucket,stsToken:Te==null||((te=Te.data)===null||te===void 0)?void 0:te.security_token}),console.log(pe,"file"),J(z),ie=pe.name.split("."),ie.pop(),Z=Oe.realFileName?ie:Object(s.a)(),Q.abrupt("return",new Promise(function(_e,ve){try{var Re;z.multipartUpload("".concat(L.identifier,"/").concat(Z).concat(ne.indexOf(".")>-1?"."+ne.split(".").pop():""),new Blob([pe.file],{type:pe.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(qe,rt,ut){try{console.log("\u8FDB\u5EA6",qe,rt,ut);var dt=H.findIndex(function(ft){return ft.name===ne});H[dt].file.percent=qe*100,H[dt].tempCheckpoint=rt,G(Object(M.a)(H))}catch(ft){}},checkpoint:H[H.findIndex(function(Je){return Je.name===ne})].tempCheckpoint,callback:{customValue:{id:ne+""},url:Te==null||((Re=Te.data)===null||Re===void 0)?void 0:Re.callback_url,host:Te==null?void 0:Te.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(Oe)}}).then(function(Je){var qe,rt=H.findIndex(function(Ie){return Ie.name===ne}),ut="done";if(((qe=Je.data)===null||qe===void 0?void 0:qe.status)===0){var dt;pe.response=(dt=Je.data)===null||dt===void 0?void 0:dt.data;var ft=H.findIndex(function(Ie){return Ie.name===ne});H[ft].status="done",H[ft].file.status="done"}else{var Be;O.b.warn((Be=Je.data)===null||Be===void 0?void 0:Be.message),ut="error"}H[rt].status=ut,H[rt].file.status=ut,L.onChange(H),_e(Je==null?void 0:Je.data)}).catch(function(Je){H[H.findIndex(function(qe){return qe.name===ne})].status="error",H[H.findIndex(function(qe){return qe.name===ne})].file.status="error",O.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),G(Object(M.a)(H)),L.onChange(H),ve(Je),console.log("err:",Je)})}catch(Je){}}));case 19:case"end":return Q.stop()}},Ae)}));return function(pe,Oe){return Se.apply(this,arguments)}}();return Object(r.useEffect)(function(){H.every(function(Se){return Se==="done"||Se==="error"})&&L.onComplete(H)},[H]),Object(r.useEffect)(function(){if(I){var Se;(Se=z)===null||Se===void 0||Se.cancel()}},[I]),Object(r.useEffect)(function(){L.uploading&&H.map(function(){var Se=Object(b.a)(c.a.mark(function Ae(pe){var Oe,ye;return c.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(!((!pe.status||pe.status==="error")&&!I)){ae.next=6;break}return pe.status="uploading",pe.file.status="uploading",ae.next=5,de(pe,{login:k==null||((Oe=k.userInfo)===null||Oe===void 0)?void 0:Oe.login,container_type:L.container_type,container_id:L.container_id,description:L.description,realFileName:L.realFileName});case 5:ye=ae.sent;case 6:case"end":return ae.stop()}},Ae)}));return function(Ae){return Se.apply(this,arguments)}}())},[L.uploading]),a.a.createElement(x,Object(N.a)({},ue,{height:L.height,className:L.className}),a.a.createElement("p",{className:"ant-upload-hint"},L.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};q.b=Object(l.a)(function(E){var w=E.loading,k=E.globalSetting,I=E.user;return{globalSetting:k,loading:w.models.competitions,user:I}})(_)},KmYQ:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.ZeroPadding={pad:function(g,O){var M=O*4;g.clamp(),g.sigBytes+=M-(g.sigBytes%M||M)},unpad:function(g){for(var O=g.words,M=g.sigBytes-1,M=g.sigBytes-1;M>=0;M--)if(O[M>>>2]>>>24-M%4*8&255){g.sigBytes=M+1;break}}},N.pad.ZeroPadding})},LdHM:function(F,q,j){"use strict";j.d(q,"b",function(){return t}),j.d(q,"a",function(){return x});var N=j("1OyB"),g=j("vuIU"),O=j("Ji7U"),M=j("LK+K"),m=j("q1tI"),y=j("rePB"),T=j("Ff2n"),b=j("ODXe"),p=j("4IlW"),d=j("bX4T"),n=j("YrtM"),c=j("TSYQ"),r=j.n(c),a=j("+nKL"),o=j("8OUc"),u=function(z,J){var ue=z.prefixCls,de=z.id,Se=z.flattenOptions,Ae=z.childrenAsData,pe=z.values,Oe=z.searchValue,ye=z.multiple,ce=z.defaultActiveFirstOption,ae=z.height,re=z.itemHeight,fe=z.notFoundContent,te=z.open,ne=z.menuItemSelectedIcon,Te=z.virtual,ie=z.onSelect,Z=z.onToggleOpen,X=z.onActiveValue,Q=z.onScroll,_e=z.onMouseEnter,ve="".concat(ue,"-item"),Re=Object(n.a)(function(){return Se},[te,Se],function(st,Ue){return Ue[0]&&st[1]!==Ue[1]}),Je=m.useRef(null),qe=function(Ue){Ue.preventDefault()},rt=function(Ue){Je.current&&Je.current.scrollTo({index:Ue})},ut=function(Ue){for(var Le=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(J,ue){if(!m.isValidElement(J)||!J.type)return null;var de=J.type.isSelectOptGroup,Se=J.key,Ae=J.props,pe=Ae.children,Oe=Object(T.a)(Ae,["children"]);return z||!de?C(J):Object(f.a)(Object(f.a)({key:"__RC_SELECT_GRP__".concat(Se===null?ue:Se,"__"),label:Se},Oe),{},{options:v(pe)})}).filter(function(J){return J})}var _=j("2Qr1"),E=j("qNPg"),w=j("U8pU"),k=j("Kwbf"),I=j("WKfj");function L(P){var z=P.mode,J=P.options,ue=P.children,de=P.backfill,Se=P.allowClear,Ae=P.placeholder,pe=P.getInputElement,Oe=P.showSearch,ye=P.onSearch,ce=P.defaultOpen,ae=P.autoFocus,re=P.labelInValue,fe=P.value,te=P.inputValue,ne=P.optionLabelProp,Te=z==="multiple"||z==="tags",ie=Oe!==void 0?Oe:Te||z==="combobox",Z=J||v(ue);if(Object(k.a)(z!=="tags"||Z.every(function(ve){return!ve.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),z==="tags"||z==="combobox"){var X=Z.some(function(ve){return ve.options?ve.options.some(function(Re){return typeof("value"in Re?Re.value:Re.key)=="number"}):typeof("value"in ve?ve.value:ve.key)=="number"});Object(k.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(k.a)(z!=="combobox"||!ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(k.a)(z==="combobox"||!de,"`backfill` only works with `combobox` mode."),Object(k.a)(z==="combobox"||!pe,"`getInputElement` only work with `combobox` mode."),Object(k.b)(z!=="combobox"||!pe||!Se||!Ae,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ye&&!ie&&z!=="combobox"&&z!=="tags"&&Object(k.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(k.b)(!ce||ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fe!=null){var Q=Object(I.d)(fe);Object(k.a)(!re||Q.every(function(ve){return Object(w.a)(ve)==="object"&&("key"in ve||"value"in ve)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(k.a)(!Te||Array.isArray(fe),"`value` should be array when `mode` is `multiple` or `tags`")}if(ue){var _e=null;Object(R.a)(ue).some(function(ve){if(!m.isValidElement(ve)||!ve.type)return!1;var Re=ve.type;if(Re.isSelectOption)return!1;if(Re.isSelectOptGroup){var Je=Object(R.a)(ve.props.children).every(function(qe){return!m.isValidElement(qe)||!ve.type||qe.type.isSelectOption?!0:(_e=qe.type,!1)});return!Je}return _e=Re,!0}),_e&&Object(k.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(_e.displayName||_e.name||_e,"`.")),Object(k.a)(te===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var V=L,W=Object(E.a)({prefixCls:"rc-select",components:{optionList:s},convertChildrenToData:v,flattenOptions:_.d,getLabeledValue:_.e,filterOptions:_.b,isValueDisabled:_.g,findValueOption:_.c,warningProps:V,fillOptionsWithMissingValue:_.a}),H=function(P){Object(O.a)(J,P);var z=Object(M.a)(J);function J(){var ue;return Object(N.a)(this,J),ue=z.apply(this,arguments),ue.selectRef=m.createRef(),ue.focus=function(){ue.selectRef.current.focus()},ue.blur=function(){ue.selectRef.current.blur()},ue}return Object(g.a)(J,[{key:"render",value:function(){return m.createElement(W,Object.assign({ref:this.selectRef},this.props))}}]),J}(m.Component);H.Option=t,H.OptGroup=x;var G=H,B=q.c=G},M8RZ:function(F,q,j){"use strict";j.d(q,"a",function(){return p});var N=j("fWQN"),g=j("mtLc"),O=j("yKVA"),M=j("879j"),m=j("q1tI"),y=j.n(m),T=j("i8i4"),b=j.n(T),p=function(d){Object(O.a)(c,d);var n=Object(M.a)(c);function c(r){var a;Object(N.a)(this,c),a=n.call(this,r);var o=window.document;return a.node=o.createElement("div"),o.body.appendChild(a.node),a}return Object(g.a)(c,[{key:"render",value:function(){var a=this.props.children;return Object(T.createPortal)(a,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(y.a.Component)},MlIO:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(g){var O=N,M=O.lib,m=M.Base,y=M.WordArray,T=O.x64={},b=T.Word=m.extend({init:function(d,n){this.high=d,this.low=n}}),p=T.WordArray=m.extend({init:function(d,n){d=this.words=d||[],n!=g?this.sigBytes=n:this.sigBytes=d.length*8},toX32:function(){for(var d=this.words,n=d.length,c=[],r=0;r1&&arguments[1]!==void 0?arguments[1]:!1;return!!(S(E)&&x(w))},S=function(E){return Object(n.p)()?!0:(E({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},x=function(){var E,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,k=Object(d.c)()._store.getState(),I=k.user;return(E=I.userInfo)!==null&&E!==void 0&&E.profile_completed?!0:(m.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:w?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){d.d.push("/account/profile/edit")}}),!1)},f=function(){var E,w=Object(d.c)()._store.getState(),k=w.user;return(E=k.userInfo)!==null&&E!==void 0&&E.professional_certification?!0:(m.a.confirm({title:"\u63D0\u793A",centered:!0,content:p.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(c.S)("/account/certification")}}),!1)},R=function(){return Object(n.a)()?!0:(m.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:p.a.createElement("div",{className:"tc",style:{marginLeft:-38}},p.a.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),p.a.createElement("img",{src:l.a,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},C=function(E,w){return E?!0:(m.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:p.a.createElement("div",null,p.a.createElement("p",null,w||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),p.a.createElement("div",{style:{marginLeft:"110px"}},p.a.createElement("img",{src:h.a,width:200}),p.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(c.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},v=function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",k=Object(d.c)()._store.getState(),I=k.shixunsDetail.detail;return(I==null?void 0:I.public)===2||(I==null?void 0:I.public)===1||(I==null?void 0:I.shixun_status)===3?(m.a.info({centered:!0,icon:p.a.createElement(r.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:p.a.createElement("div",{className:"tc",style:{marginLeft:-38}},p.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},p.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(I==null?void 0:I.public)===2?"\u5DF2\u516C\u5F00":(I==null?void 0:I.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",w,"\u3002"),p.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),p.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:o.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(I==null?void 0:I.shixun_status)===2?(m.a.confirm({centered:!0,icon:p.a.createElement(r.a,null),title:"\u63D0\u793A",content:p.a.createElement("div",null,p.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",w,"\u3002"),p.a.createElement("br",null),p.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){m.a.confirm({width:440,centered:!0,icon:p.a.createElement(r.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var V=Object(O.a)(T.a.mark(function H(){var G;return T.a.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,E({type:"shixunsDetail/cancelRelease",payload:{id:I==null?void 0:I.identifier}});case 2:G=P.sent,G.status!==401&&(g.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),E({type:"shixunsDetail/getShixunsDetail",payload:{id:I==null?void 0:I.identifier}}),E({type:"practiceSetting/getCommonData",payload:{id:I==null?void 0:I.identifier}}));case 4:case"end":return P.stop()}},H)}));function W(){return V.apply(this,arguments)}return W}()})}}),!0):!1}},NnUe:function(F,q,j){F.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NoGO:function(F,q,j){F.exports=j.p+"static/newqrcode.d852fdfc.png"},NvD2:function(F,q,j){"use strict";j.d(q,"a",function(){return y});var N=j("Kwbf");function g(T,b){var p=new Set;return T.forEach(function(d){b.has(d)||p.add(d)}),p}function O(T){var b=T||{},p=b.disabled,d=b.disableCheckbox,n=b.checkable;return!!(p||d)||n===!1}function M(T,b,p,d){for(var n=new Set(T),c=new Set,r=0;r<=p;r+=1){var a=b.get(r)||new Set;a.forEach(function(s){var l=s.key,t=s.node,S=s.children,x=S===void 0?[]:S;n.has(l)&&!d(t)&&x.filter(function(f){return!d(f.node)}).forEach(function(f){n.add(f.key)})})}for(var o=new Set,u=p;u>=0;u-=1){var h=b.get(u)||new Set;h.forEach(function(s){var l=s.parent,t=s.node;if(d(t)||!s.parent||o.has(s.parent.key))return;if(d(s.parent.node)){o.add(l.key);return}var S=!0,x=!1;(l.children||[]).filter(function(f){return!d(f.node)}).forEach(function(f){var R=f.key,C=n.has(R);S&&!C&&(S=!1),!x&&(C||c.has(R))&&(x=!0)}),S&&n.add(l.key),x&&c.add(l.key),o.add(l.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(g(c,n))}}function m(T,b,p,d,n){for(var c=new Set(T),r=new Set(b),a=0;a<=d;a+=1){var o=p.get(a)||new Set;o.forEach(function(l){var t=l.key,S=l.node,x=l.children,f=x===void 0?[]:x;!c.has(t)&&!r.has(t)&&!n(S)&&f.filter(function(R){return!n(R.node)}).forEach(function(R){c.delete(R.key)})})}r=new Set;for(var u=new Set,h=d;h>=0;h-=1){var s=p.get(h)||new Set;s.forEach(function(l){var t=l.parent,S=l.node;if(n(S)||!l.parent||u.has(l.parent.key))return;if(n(l.parent.node)){u.add(t.key);return}var x=!0,f=!1;(t.children||[]).filter(function(R){return!n(R.node)}).forEach(function(R){var C=R.key,v=c.has(C);x&&!v&&(x=!1),!f&&(v||r.has(C))&&(f=!0)}),x||c.delete(t.key),f&&r.add(t.key),u.add(t.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(r,c))}}function y(T,b,p,d){var n=[],c;d?c=d:c=O;var r=new Set(T.filter(function(h){var s=!!p[h];return s||n.push(h),s})),a=new Map,o=0;Object.keys(p).forEach(function(h){var s=p[h],l=s.level,t=a.get(l);t||(t=new Set,a.set(l,t)),t.add(s),o=Math.max(o,l)}),Object(N.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(h){return"'".concat(h,"'")}).join(", ")));var u;return b===!0?u=M(r,a,o,c):u=m(r,b.halfCheckedKeys,a,o,c),u}},OLod:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("K3mO"))})(this,function(N){N.lib.Cipher||function(g){var O=N,M=O.lib,m=M.Base,y=M.WordArray,T=M.BufferedBlockAlgorithm,b=O.enc,p=b.Utf8,d=b.Base64,n=O.algo,c=n.EvpKDF,r=M.Cipher=T.extend({cfg:m.extend(),createEncryptor:function(E,w){return this.create(this._ENC_XFORM_MODE,E,w)},createDecryptor:function(E,w){return this.create(this._DEC_XFORM_MODE,E,w)},init:function(E,w,k){this.cfg=this.cfg.extend(k),this._xformMode=E,this._key=w,this.reset()},reset:function(){T.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var w=this._doFinalize();return w},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function E(w){return typeof w=="string"?_:R}return function(w){return{encrypt:function(k,I,L){return E(I).encrypt(w,k,I,L)},decrypt:function(k,I,L){return E(I).decrypt(w,k,I,L)}}}}()}),a=M.StreamCipher=r.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),o=O.mode={},u=M.BlockCipherMode=m.extend({createEncryptor:function(E,w){return this.Encryptor.create(E,w)},createDecryptor:function(E,w){return this.Decryptor.create(E,w)},init:function(E,w){this._cipher=E,this._iv=w}}),h=o.CBC=function(){var E=u.extend();E.Encryptor=E.extend({processBlock:function(k,I){var L=this._cipher,V=L.blockSize;w.call(this,k,I,V),L.encryptBlock(k,I),this._prevBlock=k.slice(I,I+V)}}),E.Decryptor=E.extend({processBlock:function(k,I){var L=this._cipher,V=L.blockSize,W=k.slice(I,I+V);L.decryptBlock(k,I),w.call(this,k,I,V),this._prevBlock=W}});function w(k,I,L){var V,W=this._iv;W?(V=W,this._iv=g):V=this._prevBlock;for(var H=0;H>>2]&255;E.sigBytes-=w}},t=M.BlockCipher=r.extend({cfg:r.cfg.extend({mode:h,padding:l}),reset:function(){var E;r.reset.call(this);var w=this.cfg,k=w.iv,I=w.mode;this._xformMode==this._ENC_XFORM_MODE?E=I.createEncryptor:(E=I.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,k&&k.words):(this._mode=E.call(I,this,k&&k.words),this._mode.__creator=E)},_doProcessBlock:function(E,w){this._mode.processBlock(E,w)},_doFinalize:function(){var E,w=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(w.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),w.unpad(E)),E},blockSize:128/32}),S=M.CipherParams=m.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),x=O.format={},f=x.OpenSSL={stringify:function(E){var w,k=E.ciphertext,I=E.salt;return I?w=y.create([1398893684,1701076831]).concat(I).concat(k):w=k,w.toString(d)},parse:function(E){var w,k=d.parse(E),I=k.words;return I[0]==1398893684&&I[1]==1701076831&&(w=y.create(I.slice(2,4)),I.splice(0,4),k.sigBytes-=16),S.create({ciphertext:k,salt:w})}},R=M.SerializableCipher=m.extend({cfg:m.extend({format:f}),encrypt:function(E,w,k,I){I=this.cfg.extend(I);var L=E.createEncryptor(k,I),V=L.finalize(w),W=L.cfg;return S.create({ciphertext:V,key:k,iv:W.iv,algorithm:E,mode:W.mode,padding:W.padding,blockSize:E.blockSize,formatter:I.format})},decrypt:function(E,w,k,I){I=this.cfg.extend(I),w=this._parse(w,I.format);var L=E.createDecryptor(k,I).finalize(w.ciphertext);return L},_parse:function(E,w){return typeof E=="string"?w.parse(E,this):E}}),C=O.kdf={},v=C.OpenSSL={execute:function(E,w,k,I){I||(I=y.random(64/8));var L=c.create({keySize:w+k}).compute(E,I),V=y.create(L.words.slice(w),k*4);return L.sigBytes=w*4,S.create({key:L,iv:V,salt:I})}},_=M.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:v}),encrypt:function(E,w,k,I){I=this.cfg.extend(I);var L=I.kdf.execute(k,E.keySize,E.ivSize);I.iv=L.iv;var V=R.encrypt.call(this,E,w,L.key,I);return V.mixIn(L),V},decrypt:function(E,w,k,I){I=this.cfg.extend(I),w=this._parse(w,I.format);var L=I.kdf.execute(k,E.keySize,E.ivSize,w.salt);I.iv=L.iv;var V=R.decrypt.call(this,E,w,L.key,I);return V}})}()})},OZM5:function(F,q,j){"use strict";j.d(q,"b",function(){return d}),j.d(q,"a",function(){return n}),j.d(q,"k",function(){return c}),j.d(q,"h",function(){return r}),j.d(q,"i",function(){return a}),j.d(q,"g",function(){return o}),j.d(q,"c",function(){return u}),j.d(q,"d",function(){return h}),j.d(q,"j",function(){return t}),j.d(q,"e",function(){return S}),j.d(q,"f",function(){return x});var N=j("KQm4"),g=j("U8pU"),O=j("Ff2n"),M=j("q1tI"),m=j.n(M),y=j("Kwbf"),T=j("WaYH"),b=.25,p=2;function d(f,R){var C=f.slice(),v=C.indexOf(R);return v>=0&&C.splice(v,1),C}function n(f,R){var C=f.slice();return C.indexOf(R)===-1&&C.push(R),C}function c(f){return f.split("-")}function r(f,R){return"".concat(f,"-").concat(R)}function a(f){return f&&f.type&&f.type.isTreeNode}function o(f,R){var C=[f],v=R[f];function _(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];E.forEach(function(w){var k=w.key,I=w.children;C.push(k),_(I)})}return _(v.children),C}function u(f,R){var C=f.clientY,v=R.selectHandle.getBoundingClientRect(),_=v.top,E=v.bottom,w=v.height,k=Math.max(w*b,p);return C<=_+k?-1:C>=E-k?1:0}function h(f,R){if(!f)return;var C=R.multiple;return C?f.slice():f.length?[f[0]]:f}var s=function(R){return R};function l(f,R){if(!f)return[];var C=R||{},v=C.processProps,_=v===void 0?s:v,E=Array.isArray(f)?f:[f];return E.map(function(w){var k=w.children,I=Object(O.a)(w,["children"]),L=l(k,R);return m.a.createElement(T.a,Object.assign({},_(I)),L)})}function t(f){if(!f)return null;var R;if(Array.isArray(f))R={checkedKeys:f,halfCheckedKeys:void 0};else if(Object(g.a)(f)==="object")R={checkedKeys:f.checked||void 0,halfCheckedKeys:f.halfChecked||void 0};else return Object(y.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function S(f,R){var C=new Set;function v(_){if(C.has(_))return;var E=R[_];if(!E)return;C.add(_);var w=E.parent,k=E.node;if(k.disabled)return;w&&v(w.key)}return(f||[]).forEach(function(_){v(_)}),Object(N.a)(C)}function x(f){var R={};return Object.keys(f).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(R[C]=f[C])}),R}},Ot1p:function(F,q,j){"use strict";var N=j("2qtc"),g=j("kLXV"),O=j("rAM+"),M=j("miYZ"),m=j("tsqr"),y=j("9og8"),T=j("tJVT"),b=j("jrin"),p=j("WmNS"),d=j.n(p),n=j("q1tI"),c=j.n(n),r=j("VrN/"),a=j.n(r),o=j("bdgK"),u=j("p77/"),h=j("Bd2K"),s=j("ELLl"),l=j("19Vz"),t=j("lZu9"),S=j("+NIl"),x=j("kSUc"),f=j("9Bee"),R=function(He){var tt=He.value,vt=tt===void 0?"":tt,yt=He.className,Wt=He.showTextOnly,Ht=He.showLines,cr=He.style,dr=cr===void 0?{}:cr,St=Object(n.useMemo)(function(){return""},[vt]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:St}}))},C=j("0Owb"),v=j("dejd"),_=j("C+DQ"),E=j("1vsH"),w=j("m3rI"),k=[{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 I(He){var tt=He.onActionCallback,vt=He.title,yt=He.icon,Wt=He.actionName,Ht=He.className,cr=Ht===void 0?"":Ht,dr=He.children;function St(){tt(Wt)}return c.a.createElement("a",{title:vt,className:cr,onClick:St},c.a.createElement("i",{className:"md-iconfont ".concat(yt)}),dr)}var L=function(He){var tt=He.watch,vt=He.showNullButton,yt=He.onActionCallback,Wt=He.fullScreen,Ht=He.insertTemp,cr=He.hidetoolBar,dr=He.uuid,St=He.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(E.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(E.F)("_educoder_session"),"&key=").concat(dr,"&api=").concat(encodeURIComponent(w.a.PROXY_SERVER)));var Kr=[].concat(k,[{title:"".concat(tt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(tt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!cr&&Kr.map(function(Vr,Yr){return c.a.createElement("li",{key:Yr},Vr.actionName?c.a.createElement(I,Object(C.a)({},Vr,{onActionCallback:yt})):c.a.createElement("span",{className:"v-line"}))}),vt?c.a.createElement("li",null,c.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:yt},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ht&&c.a.createElement("li",null,c.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ht),onActionCallback:yt},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(I,{icon:"".concat(Wt?"icon-shrink":"icon-enlarge"),title:Wt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:yt})))},V=j("M8RZ"),W=j("+L6B"),H=j("2/Rp"),G=j("y8nQ"),B=j("Vl3Y"),P=j("5NDa"),z=j("5rEg"),J={labelCol:{span:4},wrapperCol:{span:20}},ue=function(He){var tt=He.callback,vt=He.onCancel;function yt(Wt){tt(Wt)}return c.a.createElement(B.a,Object(C.a)({},J,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:yt}),c.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},c.a.createElement(z.a,null)),c.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},c.a.createElement(z.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(H.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))},de=j("7ahc"),Se=j("HmJG"),Ae=j("BjJ7"),pe=B.a.useForm,Oe={width:280,marginRight:10},ye={labelCol:{span:5},wrapperCol:{span:19}},ce=function(He){var tt=He.callback,vt=He.onCancel,yt=pe(),Wt=Object(T.a)(yt,1),Ht=Wt[0];function cr(Kr){tt(Kr)}function dr(Kr,Vr){if(Kr.status===-1){m.b.error(Kr.message);return}Ht.setFieldsValue({src:"/api/attachments/".concat(Kr.id),type:Vr.type})}function St(Kr){var Vr=Kr.target.files[0];re(Vr,dr)}return c.a.createElement(B.a,Object(C.a)({form:Ht},ye,{className:"upload-image-panel",onFinish:cr}),c.a.createElement(B.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(B.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},c.a.createElement(z.a,{style:Oe})),c.a.createElement(ae,{onFileChange:St}))),c.a.createElement(B.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},c.a.createElement(z.a,{style:{width:264}})),c.a.createElement(B.a.Item,{style:{textAlign:"right"}},c.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(H.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))};function ae(He){var tt=He.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:tt}))}function re(He,tt){if(!He)throw new String("\u6CA1\u6709\u6587\u4EF6");var vt=new FormData;vt.append("editormd-image-file",He),vt.append("file_param_name","editormd-image-file"),vt.append("byxhr","true");var yt=new window.XMLHttpRequest;yt.withCredentials=!0,yt.addEventListener("load",function(Wt){tt(JSON.parse(Wt.target.responseText),He)},!1),yt.addEventListener("error",function(Wt){console.error(Wt)},!1),yt.open("POST","".concat(Ae.a,"/api/attachments.json")),yt.send(vt)}var fe=j("giR+"),te=j("fyUT"),ne=j("7Kak"),Te=j("9yH6"),ie=Te.a.Group,Z={margin:"0 8px"},X=function(He){var tt=He.callback,vt=He.onCancel;function yt(Wt){tt(Wt)}return c.a.createElement(B.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:yt},c.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},c.a.createElement("span",{style:Z},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:Z},"\u884C\u6570"),c.a.createElement(B.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(te.a,null)),c.a.createElement("span",{style:Z},"\u5217\u6570"),c.a.createElement(B.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},c.a.createElement(te.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},c.a.createElement("span",{style:Z},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(B.a.Item,{name:"align"},c.a.createElement(ie,null,c.a.createElement(Te.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(Te.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(Te.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(Te.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(H.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))},Q=j("ErOA"),_e=j("7Cbv"),ve="link",Re="upload-image",Je="code-block",qe="add-table",rt="------------",ut={default:rt,left:":".concat(rt),center:":".concat(rt,":"),right:"".concat(rt,":")},dt=j("9VGf"),ft,Be;function Ie(){}var at=0,ct=1e4,$e="\u2581",st=` **\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 Ue(He){return/^\d+$/.test(He)?"".concat(He,"px"):He}var Le=navigator.platform.toUpperCase().indexOf("MAC")>=0,Me=Le?"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=(ft={},Object(b.a)(ft,Me+"-B","bold"),Object(b.a)(ft,Me+"-I","italic"),ft),ke=(Be={},Object(b.a)(Be,ve,"\u6DFB\u52A0\u94FE\u63A5"),Object(b.a)(Be,Je,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(b.a)(Be,Re,"\u6DFB\u52A0\u6587\u4EF6"),Object(b.a)(Be,qe,"\u6DFB\u52A0\u8868\u683C"),Be),Ne=q.a=function(He){var tt=He.defaultValue,vt=tt===void 0?"":tt,yt=He.onChange,Wt=He.width,Ht=Wt===void 0?"100%":Wt,cr=He.height,dr=cr===void 0?400:cr,St=He.miniToolbar,Kr=St===void 0?!1:St,Vr=He.isFocus,Yr=Vr===void 0?!1:Vr,vn=He.watch,Or=He.insertTemp,dn=He.mode,hn=dn===void 0?"markdown":dn,Tt=He.id,gr=Tt===void 0?"markdown-editor-id":Tt,Br=He.showResizeBar,zr=Br===void 0?!1:Br,an=He.noStorage,gi=an===void 0?!1:an,Ei=He.showNullButton,bn=Ei===void 0?!1:Ei,lr=He.hidetoolBar,Yn=lr===void 0?!1:lr,ci=He.fullScreen,Hn=ci===void 0?!1:ci,qr=He.onBlur,Un=He.onCMBeforeChange,di=He.onFullScreen,vi=He.className,Ut=vi===void 0?"":vi,_r=He.disablePaste,hi=_r===void 0?!1:_r,xi=He.placeholder,Di=xi===void 0?"":xi,wi=He.values,le=wi===void 0?"":wi,K=Object(n.useState)(null),Y=Object(T.a)(K,2),ee=Y[0],ge=Y[1],se=Object(n.useState)(vt),Ke=Object(T.a)(se,2),Ct=Ke[0],Xt=Ke[1],Er=Object(n.useState)(vn),Pt=Object(T.a)(Er,2),Lr=Pt[0],Gr=Pt[1],_n=Object(n.useState)(Hn),Zn=Object(T.a)(_n,2),qn=Zn[0],Nn=Zn[1],Ni=Object(n.useState)(""),Gi=Object(T.a)(Ni,2),Wn=Gi[0],Ti=Gi[1],Ki=Object(n.useState)(0),ki=Object(T.a)(Ki,2),ni=ki[0],ea=ki[1],Vi=Object(n.useState)(dr),ta=Object(T.a)(Vi,2),oa=ta[0],Li=ta[1],$n=Object(n.useState)(!1),ji=Object(T.a)($n,2),ha=ji[0],xt=ji[1],et=Object(n.useRef)(Object(_e.a)()),mt=Object(n.useRef)(!1),wt=Object(n.useRef)(),Lt=Object(n.useRef)(),Dt=Object(n.useRef)(),Kt=Object(n.useRef)(),zt=Object(n.useRef)(),ht=function(){var _t=Object(y.a)(d.a.mark(function It(){var Et,Nt;return d.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:return pr.next=2,Object(Q.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:et.current}});case 2:Nt=pr.sent,Nt!=null&&(Et=Nt.attachments)!==null&&Et!==void 0&&Et.length&&(console.log("cm:",ee,Lt),Nt.attachments.map(function(er){er.content_type.indexOf("image")>-1?ee.replaceSelection("![,](/api/attachments/".concat(er.id,"?type=").concat(er.content_type,")")):er.content_type.indexOf("video")>-1?ee.replaceSelection('')):er.content_type.indexOf("pdf")>-1?ee.replaceSelection('
    ').concat(er.name,"")):ee.replaceSelection("[".concat(er.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(er.id,"?type=").concat(er.content_type,")"))}));case 4:case"end":return pr.stop()}},It)}));return function(){return _t.apply(this,arguments)}}();Object(n.useEffect)(function(){Xt(le),ee==null||ee.setValue(le)},[le]),Object(n.useEffect)(function(){di==null||di(qn)},[qn]),Object(n.useEffect)(function(){if(Lt.current){var _t=a.a.fromTextArea(Lt.current,{mode:hn,lineNumbers:!Kr,lineWrapping:!0,value:vt,autoCloseTags:!0,autoCloseBrackets:!0});Yr&&_t.focus();function It(Et,Nt){if(hi){Nt.preventDefault();return}var qt=Nt.clipboardData;if(qt){var pr=qt.types.toString(),er=qt.items;if(pr==="Files"||qt.types.indexOf("Files")>-1){if(Nt.preventDefault(),hn=="stex")return;try{var Rr,Ur=er[1];((Rr=er[0])===null||Rr===void 0?void 0:Rr.kind)==="file"&&(Ur=er[0]);var br=Ur.getAsFile(),it=br.name.split(".").pop();re(br,function(Gt){if(Gt.id){var ln,en,mr;(br==null||((ln=br.type)===null||ln===void 0)?void 0:ln.indexOf("image"))>-1?_t.replaceSelection("![,](/api/attachments/".concat(Gt.id,"?type=").concat(Gt.content_type,")")):(br==null||((en=br.type)===null||en===void 0)?void 0:en.indexOf("video"))>-1?_t.replaceSelection('')):(br==null||((mr=br.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?_t.replaceSelection('').concat(br.name,"")):Ee.includes(it)?_t.replaceSelection('').concat(br.name,"")):_t.replaceSelection("[".concat(br.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}else(Gt==null?void 0:Gt.status)===401&&(document.location.href="/user/login")})}catch(Gt){m.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return _t.on("paste",It),_t.on("dragleave",function(Et,Nt){Dt.current.classList.remove("mouse-hover-md")}),_t.on("dragover",function(Et,Nt){Dt.current.classList.add("mouse-hover-md")}),_t.on("drop",function(Et,Nt){Dt.current.classList.add("mouse-hover-md");var qt;if(qt=Nt.dataTransfer.files,qt.length>0){Nt.preventDefault(),Nt.stopPropagation();for(var pr=function(Ur){var br=qt[Ur],it=br.name.split(".").pop();re(br,function(Gt){if(Gt.id){var ln,en,mr;(br==null||((ln=br.type)===null||ln===void 0)?void 0:ln.indexOf("image"))>-1?_t.replaceSelection("![,](/api/attachments/".concat(Gt.id,"?type=").concat(Gt.content_type,")")):(br==null||((en=br.type)===null||en===void 0)?void 0:en.indexOf("video"))>-1?_t.replaceSelection('')):(br==null||((mr=br.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?_t.replaceSelection('').concat(br.name,"")):Ee.includes(it)?_t.replaceSelection('').concat(br.name,"")):_t.replaceSelection("[".concat(br.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}else(Gt==null?void 0:Gt.status)===401&&(document.location.href="/user/login")})},er=0;er0||er.target.offsetWidth>0)&&(Ot(),ee.setSize("100%","100%"),ee.refresh())}}catch(Rr){qt.e(Rr)}finally{qt.f()}});return Et.observe(Lt.current.parentElement),Et}if(ee){var It=_t();return function(){It.unobserve(Lt.current.parentElement)}}},[ee,Ot]),Object(n.useEffect)(function(){if(ee){for(var _t=[],It=function(){var er=Nt[Et];qt=Object(T.a)(er,2);var Rr=qt[0],Ur=qt[1],br=Object(b.a)({},Rr,function(){Rt(Ur)});_t.push(br),ee.addKeyMap(br)},Et=0,Nt=Object.entries(Ce);Et0){var _t=new Date().getTime(),It=window.sessionStorage.getItem(gr);_t>=ni+ct&&(!It||It!==Ct)&&(window.sessionStorage.setItem(gr,Ct),xt(!0))}},ct),Object(n.useEffect)(function(){Gr(vn)},[ee,vn]),Object(n.useEffect)(function(){ee&&(Yr&&ee.focus())},[ee,Yr]),Object(n.useEffect)(function(){if(Lr&&ee){var _t=ee.getScrollerElement();function It(Et){var Nt=Et.target;if(zt.current){var qt=Nt.scrollTop/Nt.scrollHeight;zt.current.scrollTop=zt.current.scrollHeight*qt}}return _t.addEventListener("scroll",It),function(){_t.removeEventListener("scroll",It)}}},[ee,Lr]),Object(n.useEffect)(function(){if(ee&&Un){function _t(It,Et){Un(It,Et)}return ee.on("beforeChange",_t),function(){ee.off("beforeChange",_t)}}},[ee,Un]),Object(n.useEffect)(function(){if(ee&&qr){function _t(){qr(ee.getValue())}return ee.on("blur",_t),function(){ee.off("blur",_t)}}},[ee,qr]),Object(n.useEffect)(function(){if(ee){function _t(It){var Et=It.getValue();Xt(Et),ea(new Date().getTime()),It.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),yt&&yt(Et)}return ee.on("change",_t),function(){ee.off("change",_t)}}},[ee,yt]),Object(n.useEffect)(function(){ee&&(vt==null?(ee.setValue(""),Xt("")):vt!==ee.getValue()&&(ee.setValue(vt),Xt(vt),ee.setCursor(ee.lineCount(),0)))},[ee,vt]);var Rt=Object(n.useCallback)(function(_t){var It=ee.getCursor(),Et=ee.getSelection(),Nt=Et.split(` `);switch(_t){case"bold":return ee.replaceSelection("**"+Et+"**"),Et===""&&ee.setCursor(It.line,It.ch+2),ee.focus();case"italic":return ee.replaceSelection("*"+Et+"*"),Et===""&&ee.setCursor(It.line,It.ch+1),ee.focus();case"code":return ee.replaceSelection("`"+Et+"`"),Et===""&&ee.setCursor(It.line,It.ch+1),ee.focus();case"inline-latex":return ee.replaceSelection("`$$"+Et+"$$`"),Et===""&&ee.setCursor(It.line,It.ch+3),ee.focus();case"latex":return ee.replaceSelection("```latex\n"+Et+"\n```"),ee.setCursor(It.line+1,Et.length+1),ee.focus();case"line-break":return ee.replaceSelection(`
    `),ee.focus();case"list-ul":return Et===""?ee.replaceSelection("- "+Et):ee.replaceSelection(Nt.map(function(qt){return qt===""?"":"- ".concat(qt)}).join(` `)),ee.focus();case"list-ol":return Et===""?ee.replaceSelection("1. "+Et):ee.replaceSelection(Nt.map(function(qt,pr){return qt===""?"":"".concat(pr+1,". ").concat(qt)}).join(` `)),ee.focus();case"add-null-ch":return Et===""&&ee.setCursor(It.line,It.ch+1),ee.replaceSelection($e),ee.focus();case"inster-template-1":return Et===""&&ee.setCursor(It.line,It.ch),ee.replaceSelection(st),ee.focus();case"eraser":return ee.setValue(""),ee.focus();case"trigger-watch":return Gr(!Lr),ee.focus();case"trigger-full-screen":return Nn(!qn),ee.focus();case ve:Ti(ve);return;case Je:Ti(Je);return;case Re:Ti(Re);return;case qe:Ti(qe);return;default:throw new Error}},[ee,Lr,qn]),ur=Object(n.useCallback)(function(_t){Ti("");switch(Wn){case ve:var It=_t.title,Et=_t.link;return ee.replaceSelection("[".concat(It,"](").concat(Et,")")),ee.focus();case Je:var Nt=_t.language,qt=_t.content;return ee.replaceSelection(["```"+Nt,qt,"```"].join(` `)),ee.focus();case Re:var pr=_t.src,er=_t.alt;return er?ee.replaceSelection("![ ".concat(er," ]( ").concat(pr,' "').concat(er,'" )')):ee.replaceSelection("![,](".concat(pr,")")),ee.focus();case qe:for(var Rr=_t.row,Ur=_t.col,br=_t.align,it=` `,Gt=0;Gt300&&(Rr=300);var Ur=dr+Rr+"px";Li(Ur)}}return _t.addEventListener("mousedown",Nt),document.addEventListener("mousemove",pr),document.addEventListener("mouseup",qt),function(){_t.removeEventListener("mousedown",Nt),document.removeEventListener("mousemove",pr),document.removeEventListener("mouseup",qt)}}},[ee,Kt]),Object(n.useEffect)(function(){Li(dr)},[dr]);var $t=Ue(Ht),rr=Ue(oa),sr={width:$t,height:rr},ot=Object(n.useMemo)(function(){if(ni){var _t=new Date(ni),It=_t.getHours(),Et=_t.getMinutes(),Nt=_t.getSeconds();return It=It<10?"0"+It:It,Et=Et<10?"0"+Et:Et,Nt=Nt<10?"0"+Nt:Nt,"".concat(It,":").concat(Et,":").concat(Nt)}return 0},[ni]);function Ar(){window.sessionStorage.removeItem(gr),xt(!1),ea(0)}function Nr(){xt(!1),ea(0),ee.setValue(window.sessionStorage.getItem(gr))}function fr(_t,It){var Et=ee.getValue();Et=Et.replace(_t,It),Xt(Et),ee==null||ee.setValue(Et)}return c.a.createElement(n.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:Dt},c.a.createElement("div",{className:"markdown-editor-container ".concat(Ut," ").concat(Lr?"on-preview":""," ").concat(Kr?"mini":""," ").concat(qn?"full-screen":""),style:sr},c.a.createElement(L,{insertTemp:Or,watch:Lr,fullScreen:qn,showNullButton:bn,onActionCallback:Rt,hidetoolBar:Yn,uuid:et.current,setOpenPhones:function(){mt.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:Lt,placeholder:Di})),Lr?c.a.createElement("div",{ref:zt,className:"preview-container"},hn==="stex"&&c.a.createElement(R,{value:Ct}),hn!=="stex"&&c.a.createElement(f.a,{edit:!0,value:Ct,replaces:fr})):null))),zr?c.a.createElement("a",{ref:Kt,className:"editor-resize"}):null,c.a.createElement(V.a,null,ke[Wn]?c.a.createElement(g.a,{centered:!0,title:ke[Wn],visible:!0,onCancel:Zt,footer:null,className:"markdown-popup-form"},ar):null))}},PVpz:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.StreamCipher,m=g.algo,y=[],T=[],b=[],p=m.RabbitLegacy=M.extend({_doReset:function(){var n=this._key.words,c=this.cfg.iv,r=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],a=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var o=0;o<4;o++)d.call(this);for(var o=0;o<8;o++)a[o]^=r[o+4&7];if(c){var u=c.words,h=u[0],s=u[1],l=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,t=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,S=l>>>16|t&4294901760,x=t<<16|l&65535;a[0]^=l,a[1]^=S,a[2]^=t,a[3]^=x,a[4]^=l,a[5]^=S,a[6]^=t,a[7]^=x;for(var o=0;o<4;o++)d.call(this)}},_doProcessBlock:function(n,c){var r=this._X;d.call(this),y[0]=r[0]^r[5]>>>16^r[3]<<16,y[1]=r[2]^r[7]>>>16^r[5]<<16,y[2]=r[4]^r[1]>>>16^r[7]<<16,y[3]=r[6]^r[3]>>>16^r[1]<<16;for(var a=0;a<4;a++)y[a]=(y[a]<<8|y[a]>>>24)&16711935|(y[a]<<24|y[a]>>>8)&4278255360,n[c+a]^=y[a]},blockSize:128/32,ivSize:64/32});function d(){for(var n=this._X,c=this._C,r=0;r<8;r++)T[r]=c[r];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0>>0?1:0)|0,this._b=c[7]>>>0>>0?1:0;for(var r=0;r<8;r++){var a=n[r]+c[r],o=a&65535,u=a>>>16,h=((o*o>>>17)+o*u>>>15)+u*u,s=((a&4294901760)*a|0)+((a&65535)*a|0);b[r]=h^s}n[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,n[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,n[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,n[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,n[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,n[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,n[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,n[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}g.RabbitLegacy=M._createHelper(p)}(),N.RabbitLegacy})},RxwV:function(F,q,j){"use strict";var N=j("q1tI"),g=j("uciX"),O=j("2W6z"),M=j.n(O),m=j("4IlW"),y=j("uK0f"),T=j.n(y);function b(Oe,ye){if(Oe===ye)return!0;if(!Oe||!ye)return!1;var ce=Oe.length;if(ye.length!==ce)return!1;for(var ae=0;ae0;(qe||fe.isLeaf===!1)&&(Re+=" ".concat(Te,"-menu-item-expand"),fe.loading||(Je=N.createElement("span",{className:"".concat(Te,"-menu-item-expand-icon")},Z))),ie==="hover"&&(qe||fe.isLeaf===!1)&&(ve={onMouseEnter:this.delayOnSelect.bind(this,Q),onMouseLeave:this.delayOnSelect.bind(this),onClick:Q}),this.isActiveOption(fe,te)&&(Re+=" ".concat(Te,"-menu-item-active"),ve.ref=this.saveMenuItem(te)),fe.disabled&&(Re+=" ".concat(Te,"-menu-item-disabled"));var rt=null;fe.loading&&(Re+=" ".concat(Te,"-menu-item-loading"),rt=X||null);var ut="";return"title"in fe?ut=fe.title:typeof fe[this.getFieldName("label")]=="string"&&(ut=fe[this.getFieldName("label")]),N.createElement("li",Object.assign({key:fe[this.getFieldName("value")],className:Re,title:ut},ve,{role:"menuitem",onMouseDown:function(ft){return ft.preventDefault()}}),fe[this.getFieldName("label")],Je,rt)}},{key:"getActiveOptions",value:function(fe){var te=this,ne=this.props.options,Te=fe||this.props.activeValue;return T()(ne,function(ie,Z){return ie[te.getFieldName("value")]===Te[Z]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var fe=this,te=this.props.options,ne=this.getActiveOptions().map(function(Te){return Te[fe.getFieldName("children")]}).filter(function(Te){return!!Te});return ne.unshift(te),ne}},{key:"delayOnSelect",value:function(fe){for(var te=this,ne=arguments.length,Te=new Array(ne>1?ne-1:0),ie=1;ie=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Oe,ae))continue;ce[ae]=Oe[ae]}}return ce}function v(Oe,ye){if(Oe==null)return{};var ce={},ae=Object.keys(Oe),re,fe;for(fe=0;fe=0)continue;ce[re]=Oe[re]}return ce}function _(Oe){return I(Oe)||k(Oe)||w(Oe)||E()}function E(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(Oe,ye){if(!Oe)return;if(typeof Oe=="string")return L(Oe,ye);var ce=Object.prototype.toString.call(Oe).slice(8,-1);if(ce==="Object"&&Oe.constructor&&(ce=Oe.constructor.name),ce==="Map"||ce==="Set")return Array.from(Oe);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return L(Oe,ye)}function k(Oe){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Oe))return Array.from(Oe)}function I(Oe){if(Array.isArray(Oe))return L(Oe)}function L(Oe,ye){(ye==null||ye>Oe.length)&&(ye=Oe.length);for(var ce=0,ae=new Array(ye);ce=X.length?0:_e):(_e-=1,_e=_e<0?X.length-1:_e):_e=0,ie[Z]=X[_e][fe.getFieldName("value")]}else if(ne.keyCode===m.a.LEFT||ne.keyCode===m.a.BACKSPACE)ne.preventDefault(),ie.splice(ie.length-1,1);else if(ne.keyCode===m.a.RIGHT)ne.preventDefault(),X[Q]&&X[Q][fe.getFieldName("children")]&&ie.push(X[Q][fe.getFieldName("children")][0][fe.getFieldName("value")]);else if(ne.keyCode===m.a.ESC||ne.keyCode===m.a.TAB){fe.setPopupVisible(!1);return}(!ie||ie.length===0)&&fe.setPopupVisible(!1);var ve=fe.getActiveOptions(ie),Re=ve[ve.length-1];fe.handleMenuSelect(Re,ve.length-1,ne),fe.props.onKeyDown&&fe.props.onKeyDown(ne)},fe.saveTrigger=function(ne){fe.trigger=ne};var te=[];return"value"in re?te=re.value||[]:"defaultValue"in re&&(te=re.defaultValue||[]),M()(!("filedNames"in re),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),fe.state={popupVisible:re.popupVisible,activeValue:te,value:te,prevProps:re},fe.defaultFieldNames={label:"label",value:"value",children:"children"},fe}return H(ae,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(fe){var te=this.defaultFieldNames,ne=this.props,Te=ne.fieldNames,ie=ne.filedNames;return"filedNames"in this.props?ie[fe]||te[fe]:Te[fe]||te[fe]}},{key:"getFieldNames",value:function(){var fe=this.props,te=fe.fieldNames,ne=fe.filedNames;return"filedNames"in this.props?ne:te}},{key:"getCurrentLevelOptions",value:function(){var fe=this,te=this.props.options,ne=te===void 0?[]:te,Te=this.state.activeValue,ie=Te===void 0?[]:Te,Z=T()(ne,function(X,Q){return X[fe.getFieldName("value")]===ie[Q]},{childrenKeyName:this.getFieldName("children")});return Z[Z.length-2]?Z[Z.length-2][this.getFieldName("children")]:_(ne).filter(function(X){return!X.disabled})}},{key:"getActiveOptions",value:function(fe){var te=this;return T()(this.props.options||[],function(ne,Te){return ne[te.getFieldName("value")]===fe[Te]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var fe=this.props,te=fe.prefixCls,ne=fe.transitionName,Te=fe.popupClassName,ie=fe.options,Z=ie===void 0?[]:ie,X=fe.disabled,Q=fe.builtinPlacements,_e=fe.popupPlacement,ve=fe.children,Re=fe.dropdownRender,Je=C(fe,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),qe=N.createElement("div",null),rt="";Z&&Z.length>0?qe=N.createElement(S,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):rt=" ".concat(te,"-menus-empty");var ut=qe;return Re&&(ut=Re(qe)),N.createElement(g.a,Object.assign({ref:this.saveTrigger},Je,{popupPlacement:_e,builtinPlacements:Q,popupTransitionName:ne,action:X?[]:["click"],popupVisible:X?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(te,"-menus"),popupClassName:Te+rt,popup:ut}),N.cloneElement(ve,{onKeyDown:this.handleKeyDown,tabIndex:X?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(fe,te){var ne=te.prevProps,Te=ne===void 0?{}:ne,ie={prevProps:fe};return"value"in fe&&!b(Te.value,fe.value)&&(ie.value=fe.value||[],"loadData"in fe||(ie.activeValue=fe.value||[])),"popupVisible"in fe&&(ie.popupVisible=fe.popupVisible),ie}}]),ae}(N.Component);return Oe.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:f,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Oe}(),Ae=Se,pe=q.a=Ae},S6kV:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.OFB=function(){var g=N.lib.BlockCipherMode.extend(),O=g.Encryptor=g.extend({processBlock:function(M,m){var y=this._cipher,T=y.blockSize,b=this._iv,p=this._keystream;b&&(p=this._keystream=b.slice(0),this._iv=void 0),y.encryptBlock(p,0);for(var d=0;d|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(ie){for(var Z=0,X=!1,Q=!1,_e=0,ve=ie.length;_e122||(Ee<65||Me>90||at.push([Math.max(65,Me)|32,Math.min(Ee,90)|32]),Ee<97||Me>122||at.push([Math.max(97,Me)&~32,Math.min(Ee,122)&~32]))}}at.sort(function(He,tt){return He[0]-tt[0]||tt[1]-He[1]});for(var Ce=[],ke=[],st=0;stNe[0]&&(Ne[1]+1>Ne[0]&&$e.push("-"),$e.push(rt(Ne[1])))}return $e.push("]"),$e.join("")}function dt(Be){for(var Ie=Be.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")),at=Ie.length,ct=[],$e=0,st=0;$e=2&&Me==="["?Ie[$e]=ut(Ue):Me!=="\\"&&(Ie[$e]=Ue.replace(/[a-zA-Z]/g,function(ke){var Ne=ke.charCodeAt(0);return"["+String.fromCharCode(Ne&~32,Ne|32)+"]"}))}return Ie.join("")}for(var ft=[],_e=0,ve=ie.length;_e=0;)X[ft.charAt(Be)]=dt;var Ie=dt[1],at=""+Ie;qe.hasOwnProperty(at)||(Je.push(Ie),qe[at]=null)}Je.push(/[\0-\uffff]/),Q=B(Je)})();var _e=Z.length,ve=function(Re){for(var Je=Re.sourceCode,qe=Re.basePos,rt=Re.sourceNode,ut=[qe,w],dt=0,ft=Je.match(Q)||[],Be={},Ie=0,at=ft.length;Ie=5&&$e.substring(0,5)==="lang-",Ue&&!(st&&typeof st[1]=="string")&&(Ue=!1,$e=L),Ue||(Be[ct]=$e)}var Ee=dt;if(dt+=ct.length,!Ue)ut.push(qe+Ee,$e);else{var Ce=st[1],ke=ct.indexOf(Ce),Ne=ke+Ce.length;st[2]&&(Ne=ct.length-st[2].length,ke=Ne-Ce.length);var He=$e.substring(5);z(rt,qe+Ee,ct.substring(0,ke),ve,ut),z(rt,qe+Ee+ke,Ce,ae(He,Ce),ut),z(rt,qe+Ee+Ne,ct.substring(Ne),ve,ut)}}Re.decorations=ut};return ve}function Se(ie){var Z=[],X=[];ie.tripleQuotedStrings?Z.push([f,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?Z.push([f,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Z.push([f,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&X.push([f,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=ie.hashComments;Q&&(ie.cStyleComments?(Q>1?Z.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Z.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([f,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Z.push([C,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(X.push([C,/^\/\/[^\r\n]*/,null]),X.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var _e=ie.regexLiterals;if(_e){var ve=_e>1?"":` \r`,Re=ve?".":"[\\S\\s]",Je="/(?=[^/*"+ve+"])(?:[^/\\x5B\\x5C"+ve+"]|\\x5C"+Re+"|\\x5B(?:[^\\x5C\\x5D"+ve+"]|\\x5C"+Re+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+G+"("+Je+")")])}var qe=ie.types;qe&&X.push([v,qe]);var rt=(""+ie.keywords).replace(/^ | $/g,"");rt.length&&X.push([R,new RegExp("^(?:"+rt.replace(/[\s,]+/g,"|")+")\\b"),null]),Z.push([w,/^\s+/,null,` \r \xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(ut+="(?!s*/)"),X.push([_,/^@[a-z_$][a-z_$@0-9]*/i,null],[v,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[w,/^[a-z_$][a-z_$@0-9]*/i,null],[_,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[w,/^\\[\s\S]?/,null],[E,new RegExp(ut),null]),de(Z,X)}var Ae=Se({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function pe(ie,Z,X){for(var Q=/(?:^|\s)nocode(?:\s|$)/,_e=/\r\n?|\n/,ve=ie.ownerDocument,Re=ve.createElement("li");ie.firstChild;)Re.appendChild(ie.firstChild);var Je=[Re];function qe(Ie){var at=Ie.nodeType;if(at==1&&!Q.test(Ie.className))if(Ie.nodeName==="br")rt(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var ct=Ie.firstChild;ct;ct=ct.nextSibling)qe(ct);else if((at==3||at==4)&&X){var $e=Ie.nodeValue,st=$e.match(_e);if(st){var Ue=$e.substring(0,st.index);Ie.nodeValue=Ue;var Le=$e.substring(st.index+st[0].length);if(Le){var Me=Ie.parentNode;Me.insertBefore(ve.createTextNode(Le),Ie.nextSibling)}rt(Ie),Ue||Ie.parentNode.removeChild(Ie)}}}function rt(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function at(st,Ue){var Le=Ue?st.cloneNode(!1):st,Me=st.parentNode;if(Me){var Ee=at(Me,1),Ce=st.nextSibling;Ee.appendChild(Le);for(var ke=Ce;ke;ke=Ce)Ce=ke.nextSibling,Ee.appendChild(ke)}return Le}for(var ct=at(Ie.nextSibling,0),$e;($e=ct.parentNode)&&$e.nodeType===1;)ct=$e;Je.push(ct)}for(var ut=0;ut=Me&&(qe+=2),ve>=Ee&&(dt+=2)}}finally{$e&&($e.style.display=st)}}var ye={};function ce(ie,Z){for(var X=Z.length;--X>=0;){var Q=Z[X];ye.hasOwnProperty(Q)?b.console&&console.warn("cannot override language handler %s",Q):ye[Q]=ie}}function ae(ie,Z){return ie&&ye.hasOwnProperty(ie)||(ie=/^\s*]*(?:>|$)/],[C,/^<\!--[\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"]),ce(de([[w,/^[\s]+/,null,` \r `],[W,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[k,/^^<\/?[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"]),ce(de([],[[W,/^[\s\S]+/]]),["uq.val"]),ce(Se({keywords:c,hashComments:!0,cStyleComments:!0,types:x}),["c","cc","cpp","cxx","cyc","m"]),ce(Se({keywords:"null,true,false"}),["json"]),ce(Se({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:x}),["cs"]),ce(Se({keywords:r,cStyleComments:!0}),["java"]),ce(Se({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ce(Se({keywords:s,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ce(Se({keywords:h,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ce(Se({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ce(Se({keywords:u,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ce(Se({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ce(de([],[[f,/^[\s\S]+/]]),["regex"]);function re(ie){var Z=ie.langExtension;try{var X=P(ie.sourceNode,ie.pre),Q=X.sourceCode;ie.sourceCode=Q,ie.spans=X.spans,ie.basePos=0,ae(Z,Q)(ie),Oe(ie)}catch(_e){b.console&&console.log(_e&&_e.stack||_e)}}function fe(ie,Z,X){var Q=X||!1,_e=Z||null,ve=document.createElement("div");ve.innerHTML="
    "+ie+"
    ",ve=ve.firstChild,Q&&pe(ve,Q,!0);var Re={langExtension:_e,numberLines:Q,sourceNode:ve,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(Re),ve.innerHTML}function te(ie,Z){var X=Z||document.body,Q=X.ownerDocument||document;function _e(Le){return X.getElementsByTagName(Le)}for(var ve=[_e("pre"),_e("code"),_e("xmp")],Re=[],Je=0;Je=0;a--)if(this.__items[a].match(r))return!0;return!1},d.prototype.set_indent=function(r,a){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=a||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 a=r.lastIndexOf(` `);a!==-1?this.__character_count=r.length-a: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 n(r,a){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)),a=a||"",r.indent_level>0&&(a=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}n.prototype.get_indent_size=function(r,a){var o=this.__base_string_length;return a=a||0,r<0&&(o=0),o+=r*this.__indent_size,o+=a,o},n.prototype.get_indent_string=function(r,a){var o=this.__base_string;return a=a||0,r<0&&(r=0,o=""),a+=r*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a],o},n.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var r=this.__cache.length,a=0,o="";this.__indent_size&&r>=this.__indent_size&&(a=Math.floor(r/this.__indent_size),r-=a*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function c(r,a){this.__indent_cache=new n(r,a),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()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(r,a){return this.__indent_cache.get_indent_string(r,a)},c.prototype.get_indent_size=function(r,a){return this.__indent_cache.get_indent_size(r,a)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(r){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===` `&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(` `);return r!==` `&&(o=o.replace(/[\n]/g,r)),o},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(r,a){return r=r||0,a=a||0,this.next_line.set_indent(r,a),this.__lines.length>1?(this.current_line.set_indent(r,a),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(r){for(var a=0;a1&&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},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(r,a){for(var o=this.__lines.length-2;o>=0;){var u=this.__lines[o];if(u.is_empty())break;if(u.item(0).indexOf(r)!==0&&u.item(-1)!==a){this.__lines.splice(o+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},p.exports.Output=c},,,,function(p){function d(r,a){this.raw_options=n(r,a),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,a){var o=this.raw_options[r],u=a||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(u=o.concat()):typeof o=="string"&&(u=o.split(/[^a-zA-Z0-9_\/\-]+/)),u},d.prototype._get_boolean=function(r,a){var o=this.raw_options[r],u=o===void 0?!!a:!!o;return u},d.prototype._get_characters=function(r,a){var o=this.raw_options[r],u=a||"";return typeof o=="string"&&(u=o.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),u},d.prototype._get_number=function(r,a){var o=this.raw_options[r];a=parseInt(a,10),isNaN(a)&&(a=0);var u=parseInt(o,10);return isNaN(u)&&(u=a),u},d.prototype._get_selection=function(r,a,o){var u=this._get_selection_list(r,a,o);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values: `+a+` You passed in: '`+this.raw_options[r]+"'");return u[0]},d.prototype._get_selection_list=function(r,a,o){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var u=this._get_array(r,o);if(!this._is_valid_selection(u,a))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values: `+a+` You passed in: '`+this.raw_options[r]+"'");return u},d.prototype._is_valid_selection=function(r,a){return r.length&&a.length&&!r.some(function(o){return a.indexOf(o)===-1})};function n(r,a){var o={};r=c(r);var u;for(u in r)u!==a&&(o[u]=r[u]);if(a&&r[a])for(u in r[a])o[u]=r[a][u];return o}function c(r){var a={},o;for(o in r){var u=o.replace(/-/g,"_");a[u]=r[o]}return a}p.exports.Options=d,p.exports.normalizeOpts=c,p.exports.mergeOpts=n},,function(p){var d=RegExp.prototype.hasOwnProperty("sticky");function n(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&c=0&&r=c.length&&this.__input.substring(r-c.length,r).toLowerCase()===c},p.exports.InputScanner=n},,,,,function(p){function d(n,c){n=typeof n=="string"?n:n.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+c,"g")}d.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(n);r;)c[r[1]]=r[2],r=this.__directive_pattern.exec(n);return c},d.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},p.exports.Directives=d},,function(p,d,n){var c=n(16).Beautifier,r=n(17).Options;function a(o,u){var h=new c(o,u);return h.beautify()}p.exports=a,p.exports.defaultOptions=function(){return new r}},function(p,d,n){var c=n(17).Options,r=n(2).Output,a=n(8).InputScanner,o=n(13).Directives,u=new o(/\/\*/,/\*\//),h=/\r\n|[\r\n]/,s=/\r\n|[\r\n]/g,l=/\s/,t=/(?:\s|\n)+/g,S=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,x=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function f(R,C){this._source_text=R||"",this._options=new c(C),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"]}f.prototype.eatString=function(R){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(R.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return C},f.prototype.eatWhitespace=function(R){for(var C=l.test(this._input.peek()),v=0;l.test(this._input.peek());)this._ch=this._input.next(),R&&this._ch===` `&&((v===0||v0&&this._indentLevel--},f.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R=this._source_text,C=this._options.eol;C==="auto"&&(C=` `,R&&h.test(R||"")&&(C=R.match(h)[0])),R=R.replace(s,` `);var v=R.match(/^[\t ]*/)[0];this._output=new r(this._options,v),this._input=new a(R),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var _=0,E=!1,w=!1,k=!1,I=!1,L=!1,V=!1,W=this._ch,H=!1,G,B,P;G=this._input.read(t),B=G!=="",P=W,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),W=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var z=this._input.read(S),J=u.get_directives(z);J&&J.ignore==="start"&&(z+=u.readIgnored(this._input)),this.print_string(z),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(x)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(B),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ue=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ue.match(/[ :]$/)&&(ue=this.eatString(": ").replace(/\s$/,""),this.print_string(ue),this._output.space_before_token=!0),ue=ue.replace(/\s$/,""),ue==="extend"?I=!0:ue==="import"&&(L=!0),ue in this.NESTED_AT_RULE?(this._nestedLevel+=1,ue in this.CONDITIONAL_GROUP_RULE&&(k=!0)):!E&&_===0&&ue.indexOf(":")!==-1&&(w=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(B),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")w&&(w=!1,this.outdent()),k?(k=!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),L=!1,I=!1,w&&(this.outdent(),w=!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 de=0;de"||this._ch==="+"||this._ch==="~")&&!w&&_===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&&l.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(B),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),l.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 pe=P==='"'||P==="'";this.preserveSingleSpace(pe||B),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&H&&this._output.add_new_line()}var Oe=this._output.get_code(C);return Oe},p.exports.Beautifier=f},function(p,d,n){var c=n(6).Options;function r(a){c.call(this,a,"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 u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var h=0;h=15&&(c=!1,p=!0);var f=l&&(d||c&&(x==null||x<12.11)),R=O||T&&b>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var v=function(e,i){var D=e.className,A=C(i).exec(D);if(A){var U=D.slice(A.index+A[0].length);e.className=D.slice(0,A.index)+(U?A[1]+U:"")}};function _(e){for(var i=e.childNodes.length;i>0;--i)e.removeChild(e.firstChild);return e}function E(e,i){return _(e).appendChild(i)}function w(e,i,D,A){var U=document.createElement(e);if(D&&(U.className=D),A&&(U.style.cssText=A),typeof i=="string")U.appendChild(document.createTextNode(i));else if(i)for(var $=0;$=i)return oe+(i-$);oe+=he-$,oe+=D-oe%D,$=he+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};J.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},J.prototype.set=function(e,i){this.f=i;var D=+new Date+e;(!this.id||D=i)return A+Math.min(oe,i-U);if(U+=$-A,U+=D-U%D,A=$+1,U>=i)return A}}var ce=[""];function ae(e){for(;ce.length<=e;)ce.push(re(ce)+" ");return ce[e]}function re(e){return e[e.length-1]}function fe(e,i){for(var D=[],A=0;A"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function X(e,i){return i?i.source.indexOf("\\w")>-1&&Z(e)?!0:i.test(e):Z(e)}function Q(e){for(var i in e)if(e.hasOwnProperty(i)&&e[i])return!1;return!0}var _e=/[\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 ve(e){return e.charCodeAt(0)>=768&&_e.test(e)}function Re(e,i,D){for(;(D<0?i>0:iD?-1:1;;){if(i==D)return i;var U=(i+D)/2,$=A<0?Math.ceil(U):Math.floor(U);if($==i)return e($)?i:D;e($)?D=$:i=$+A}}function qe(e,i,D,A){if(!e)return A(i,D,"ltr",0);for(var U=!1,$=0;$i||i==D&&oe.to==i)&&(A(Math.max(oe.from,i),Math.min(oe.to,D),oe.level==1?"rtl":"ltr",$),U=!0)}U||A(i,D,"ltr")}var rt=null;function ut(e,i,D){var A;rt=null;for(var U=0;Ui)return U;$.to==i&&($.from!=$.to&&D=="before"?A=U:rt=U),$.from==i&&($.from!=$.to&&D!="before"?A=U:rt=U)}return A!=null?A:rt}var dt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(xe){return xe<=247?e.charAt(xe):1424<=xe&&xe<=1524?"R":1536<=xe&&xe<=1785?i.charAt(xe-1536):1774<=xe&&xe<=2220?"r":8192<=xe&&xe<=8203?"w":xe==8204?"b":"L"}var A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,U=/[stwN]/,$=/[LRr]/,oe=/[Lb1n]/,he=/[1n]/;function me(xe,We,Ye){this.level=xe,this.from=We,this.to=Ye}return function(xe,We){var Ye=We=="ltr"?"L":"R";if(xe.length==0||We=="ltr"&&!A.test(xe))return!1;for(var lt=xe.length,nt=[],At=0;At-1&&(A[i]=U.slice(0,$).concat(U.slice($+1)))}}}function $e(e,i){var D=at(e,i);if(!D.length)return;for(var A=Array.prototype.slice.call(arguments,2),U=0;U0}function Me(e){e.prototype.on=function(i,D){Ie(this,i,D)},e.prototype.off=function(i,D){ct(this,i,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 Ne(e){Ee(e),Ce(e)}function He(e){return e.target||e.srcElement}function tt(e){var i=e.which;return i==null&&(e.button&1?i=1:e.button&2?i=3:e.button&4&&(i=2)),l&&e.ctrlKey&&i==1&&(i=3),i}var vt=function(){if(T&&b<9)return!1;var e=w("div");return"draggable"in e||"dragDrop"in e}(),yt;function Wt(e){if(yt==null){var i=w("span","\u200B");E(e,w("span",[i,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(yt=i.offsetWidth<=1&&i.offsetHeight>2&&!(T&&b<8))}var D=yt?w("span","\u200B"):w("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var Ht;function cr(e){if(Ht!=null)return Ht;var i=E(e,document.createTextNode("A\u062EA")),D=I(i,0,1).getBoundingClientRect(),A=I(i,1,2).getBoundingClientRect();return _(e),!D||D.left==D.right?!1:Ht=A.right-D.right<3}var dr=` b`.split(/\n/).length!=3?function(e){for(var i=0,D=[],A=e.length;i<=A;){var U=e.indexOf(` `,i);U==-1&&(U=e.length);var $=e.slice(i,e.charAt(U-1)=="\r"?U-1:U),oe=$.indexOf("\r");oe!=-1?(D.push($.slice(0,oe)),i+=oe+1):(D.push($),i=U+1)}return D}:function(e){return e.split(/\r\n?|\n/)},St=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(i){return!1}}:function(e){var i;try{i=e.ownerDocument.selection.createRange()}catch(D){}return!i||i.parentElement()!=e?!1:i.compareEndPoints("StartToEnd",i)!=0},Kr=function(){var e=w("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Vr=null;function Yr(e){if(Vr!=null)return Vr;var i=E(e,w("span","x")),D=i.getBoundingClientRect(),A=I(i,0,1).getBoundingClientRect();return Vr=Math.abs(D.left-A.left)>1}var vn={},Or={};function dn(e,i){arguments.length>2&&(i.dependencies=Array.prototype.slice.call(arguments,2)),vn[e]=i}function hn(e,i){Or[e]=i}function Tt(e){if(typeof e=="string"&&Or.hasOwnProperty(e))e=Or[e];else if(e&&typeof e.name=="string"&&Or.hasOwnProperty(e.name)){var i=Or[e.name];typeof i=="string"&&(i={name:i}),e=Te(i,e),e.name=i.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Tt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Tt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gr(e,i){i=Tt(i);var D=vn[i.name];if(!D)return gr(e,"text/plain");var A=D(e,i);if(Br.hasOwnProperty(i.name)){var U=Br[i.name];for(var $ in U){if(!U.hasOwnProperty($))continue;A.hasOwnProperty($)&&(A["_"+$]=A[$]),A[$]=U[$]}}if(A.name=i.name,i.helperType&&(A.helperType=i.helperType),i.modeProps)for(var oe in i.modeProps)A[oe]=i.modeProps[oe];return A}var Br={};function zr(e,i){var D=Br.hasOwnProperty(e)?Br[e]:Br[e]={};P(i,D)}function an(e,i){if(i===!0)return i;if(e.copyState)return e.copyState(i);var D={};for(var A in i){var U=i[A];U instanceof Array&&(U=U.concat([])),D[A]=U}return D}function gi(e,i){for(var D;e.innerMode&&!(D=e.innerMode(i),!D||D.mode==e);)i=D.state,e=D.mode;return D||{mode:e,state:i}}function Ei(e,i,D){return e.startState?e.startState(i,D):!0}var bn=function(e,i,D){this.pos=this.start=0,this.string=e,this.tabSize=i||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};bn.prototype.eol=function(){return this.pos>=this.string.length},bn.prototype.sol=function(){return this.pos==this.lineStart},bn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},bn.prototype.next=function(){if(this.posi},bn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},bn.prototype.skipToEnd=function(){this.pos=this.string.length},bn.prototype.skipTo=function(e){var i=this.string.indexOf(e,this.pos);if(i>-1)return this.pos=i,!0},bn.prototype.backUp=function(e){this.pos-=e},bn.prototype.column=function(){return this.lastColumnPos0?null:($&&i!==!1&&(this.pos+=$[0].length),$)}},bn.prototype.current=function(){return this.string.slice(this.start,this.pos)},bn.prototype.hideFirstChars=function(e,i){this.lineStart+=e;try{return i()}finally{this.lineStart-=e}},bn.prototype.lookAhead=function(e){var i=this.lineOracle;return i&&i.lookAhead(e)},bn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function lr(e,i){if(i-=e.first,i<0||i>=e.size)throw new Error("There is no line "+(i+e.first)+" in the document.");for(var D=e;!D.lines;)for(var A=0;;++A){var U=D.children[A],$=U.chunkSize();if(i<$){D=U;break}i-=$}return D.lines[i]}function Yn(e,i,D){var A=[],U=i.line;return e.iter(i.line,D.line+1,function($){var oe=$.text;U==D.line&&(oe=oe.slice(0,D.ch)),U==i.line&&(oe=oe.slice(i.ch)),A.push(oe),++U}),A}function ci(e,i,D){var A=[];return e.iter(i,D,function(U){A.push(U.text)}),A}function Hn(e,i){var D=i-e.height;if(D)for(var A=e;A;A=A.parent)A.height+=D}function qr(e){if(e.parent==null)return null;for(var i=e.parent,D=ue(i.lines,e),A=i.parent;A;i=A,A=A.parent)for(var U=0;!(A.children[U]==i);++U)D+=A.children[U].chunkSize();return D+i.first}function Un(e,i){var D=e.first;e:do{for(var A=0;A=e.first&&iD?Ut(D,lr(e,D).text.length):Y(i,lr(e,i.line).text.length)}function Y(e,i){var D=e.ch;return D==null||D>i?Ut(e.line,i):D<0?Ut(e.line,0):e}function ee(e,i){for(var D=[],A=0;Athis.maxLookAhead&&(this.maxLookAhead=e),i},se.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var i=this.baseTokens[this.baseTokenPos+1];return{type:i&&i.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},se.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},se.fromSaved=function(e,i,D){return i instanceof ge?new se(e,an(e.mode,i.state),D,i.lookAhead):new se(e,an(e.mode,i),D)},se.prototype.save=function(e){var i=e!==!1?an(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ge(i,this.maxLookAhead):i};function Ke(e,i,D,A){var U=[e.state.modeGen],$={};qn(e,i.text,e.doc.mode,D,function(xe,We){return U.push(xe,We)},$,A);for(var oe=D.state,he=function(xe){D.baseTokens=U;var We=e.state.overlays[xe],Ye=1,lt=0;D.state=!0,qn(e,i.text,We.mode,D,function(nt,At){for(var Bt=Ye;ltnt&&U.splice(Ye,1,nt,U[Ye+1],Jt),Ye+=2,lt=Math.min(nt,Jt)}if(!At)return;if(We.opaque)U.splice(Bt,Ye-Bt,nt,"overlay "+At),Ye=Bt+2;else for(;Bte.options.maxHighlightLength&&an(e.doc.mode,A.state),$=Ke(e,i,A);U&&(A.state=U),i.stateAfter=A.save(!U),i.styles=$.styles,$.classes?i.styleClasses=$.classes:i.styleClasses&&(i.styleClasses=null),D===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return i.styles}function Xt(e,i,D){var A=e.doc,U=e.display;if(!A.mode.startState)return new se(A,!0,i);var $=Nn(e,i,D),oe=$>A.first&&lr(A,$-1).stateAfter,he=oe?se.fromSaved(A,oe,$):new se(A,Ei(A.mode),$);return A.iter($,i,function(me){Er(e,me.text,he);var xe=he.line;me.stateAfter=xe==i-1||xe%5==0||xe>=U.viewFrom&&xei.start)return $}throw new Error("Mode "+e.name+" failed to advance stream.")}var Gr=function(e,i,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=i||null,this.state=D};function _n(e,i,D,A){var U=e.doc,$=U.mode,oe;i=K(U,i);var he=lr(U,i.line),me=Xt(e,i.line,D),xe=new bn(he.text,e.options.tabSize,me),We;for(A&&(We=[]);(A||xe.pose.options.maxHighlightLength?(he=!1,oe&&Er(e,i,A,We.pos),We.pos=i.length,Ye=null):Ye=Zn(Lr(D,We,A.state,lt),$),lt){var nt=lt[0].name;nt&&(Ye="m-"+(Ye?nt+" "+Ye:nt))}if(!he||xe!=Ye){for(;meoe;--he){if(he<=$.first)return $.first;var me=lr($,he-1),xe=me.stateAfter;if(xe&&(!D||he+(xe instanceof ge?xe.lookAhead:0)<=$.modeFrontier))return he;var We=z(me.text,null,e.options.tabSize);(U==null||A>We)&&(U=he-1,A=We)}return U}function Ni(e,i){if(e.modeFrontier=Math.min(e.modeFrontier,i),e.highlightFrontierD;A--){var U=lr(e,A).stateAfter;if(U&&(!(U instanceof ge)||A+U.lookAhead=i:$.to>i);(A||(A=[])).push(new ki(oe,$.from,me?null:$.to))}}return A}function oa(e,i,D){var A;if(e)for(var U=0;U=i:$.to>i);if(he||$.from==i&&oe.type=="bookmark"&&(!D||$.marker.insertLeft)){var me=$.from==null||(oe.inclusiveLeft?$.from<=i:$.from0&&he)for(var Sr=0;Sr0)continue;var We=[me,1],Ye=_r(xe.from,he.from),lt=_r(xe.to,he.to);(Ye<0||!oe.inclusiveLeft&&!Ye)&&We.push({from:xe.from,to:he.from}),(lt>0||!oe.inclusiveRight&&!lt)&&We.push({from:he.to,to:xe.to}),U.splice.apply(U,We),me+=We.length-3}return U}function ha(e){var i=e.markedSpans;if(!i)return;for(var D=0;Di)&&(!A||wt(A,$.marker)<0)&&(A=$.marker)}return A}function ht(e,i,D,A,U){var $=lr(e,i),oe=Wn&&$.markedSpans;if(oe)for(var he=0;he=0&&Ye<=0||We<=0&&Ye>=0)continue;if(We<=0&&(me.marker.inclusiveRight&&U.inclusiveLeft?_r(xe.to,D)>=0:_r(xe.to,D)>0)||We>=0&&(me.marker.inclusiveRight&&U.inclusiveLeft?_r(xe.from,A)<=0:_r(xe.from,A)<0))return!0}}function Ot(e){for(var i;i=Dt(e);)e=i.find(-1,!0).line;return e}function Rt(e){for(var i;i=Kt(e);)e=i.find(1,!0).line;return e}function ur(e){for(var i,D;i=Kt(e);)e=i.find(1,!0).line,(D||(D=[])).push(e);return D}function ar(e,i){var D=lr(e,i),A=Ot(D);return D==A?i:qr(A)}function Zt(e,i){if(i>e.lastLine())return i;var D=lr(e,i),A;if(!$t(e,D))return i;for(;A=Kt(D);)D=A.find(1,!0).line;return qr(D)+1}function $t(e,i){var D=Wn&&i.markedSpans;if(D)for(var A=void 0,U=0;Ui.maxLineLength&&(i.maxLineLength=U,i.maxLine=A)})}var Nr=function(e,i,D){this.text=e,xt(this,i),this.height=D?D(this):1};Nr.prototype.lineNo=function(){return qr(this)},Me(Nr);function fr(e,i,D,A){e.text=i,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ha(e),xt(e,D);var U=A?A(e):1;U!=e.height&&Hn(e,U)}function _t(e){e.parent=null,ha(e)}var It={},Et={};function Nt(e,i){if(!e||/^\s*$/.test(e))return null;var D=i.addModeClass?Et:It;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function qt(e,i){var D=k("span",null,null,p?"padding-right: .1px":null),A={pre:k("pre",[D],"CodeMirror-line"),content:D,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};i.measure={};for(var U=0;U<=(i.rest?i.rest.length:0);U++){var $=U?i.rest[U-1]:i.line,oe=void 0;A.pos=0,A.addToken=er,cr(e.display.measure)&&(oe=ft($,e.doc.direction))&&(A.addToken=Ur(A.addToken,oe)),A.map=[];var he=i!=e.display.externalMeasured&&qr($);it($,A,Ct(e,$,he)),$.styleClasses&&($.styleClasses.bgClass&&(A.bgClass=H($.styleClasses.bgClass,A.bgClass||"")),$.styleClasses.textClass&&(A.textClass=H($.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(Wt(e.display.measure))),U==0?(i.measure.map=A.map,i.measure.cache={}):((i.measure.maps||(i.measure.maps=[])).push(A.map),(i.measure.caches||(i.measure.caches=[])).push({}))}if(p){var me=A.content.lastChild;(/\bcm-tab\b/.test(me.className)||me.querySelector&&me.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return $e(e,"renderLine",e,i.line,A.pre),A.pre.className&&(A.textClass=H(A.pre.className,A.textClass||"")),A}function pr(e){var i=w("span","\u2022","cm-invalidchar");return i.title="\\u"+e.charCodeAt(0).toString(16),i.setAttribute("aria-label",i.title),i}function er(e,i,D,A,U,$,oe){if(!i)return;var he=e.splitSpaces?Rr(i,e.trailingSpace):i,me=e.cm.state.specialChars,xe=!1,We;if(!me.test(i))e.col+=i.length,We=document.createTextNode(he),e.map.push(e.pos,e.pos+i.length,We),T&&b<9&&(xe=!0),e.pos+=i.length;else{We=document.createDocumentFragment();for(var Ye=0;;){me.lastIndex=Ye;var lt=me.exec(i),nt=lt?lt.index-Ye:i.length-Ye;if(nt){var At=document.createTextNode(he.slice(Ye,Ye+nt));T&&b<9?We.appendChild(w("span",[At])):We.appendChild(At),e.map.push(e.pos,e.pos+nt,At),e.col+=nt,e.pos+=nt}if(!lt)break;Ye+=nt+1;var Bt=void 0;if(lt[0]==" "){var Jt=e.cm.options.tabSize,nr=Jt-e.col%Jt;Bt=We.appendChild(w("span",ae(nr),"cm-tab")),Bt.setAttribute("role","presentation"),Bt.setAttribute("cm-text"," "),e.col+=nr}else lt[0]=="\r"||lt[0]==` `?(Bt=We.appendChild(w("span",lt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Bt.setAttribute("cm-text",lt[0]),e.col+=1):(Bt=e.cm.options.specialCharPlaceholder(lt[0]),Bt.setAttribute("cm-text",lt[0]),T&&b<9?We.appendChild(w("span",[Bt])):We.appendChild(Bt),e.col+=1);e.map.push(e.pos,e.pos+1,Bt),e.pos++}}if(e.trailingSpace=he.charCodeAt(i.length-1)==32,D||A||U||xe||$||oe){var yr=D||"";A&&(yr+=A),U&&(yr+=U);var ir=w("span",[We],yr,$);if(oe)for(var Sr in oe)oe.hasOwnProperty(Sr)&&Sr!="style"&&Sr!="class"&&ir.setAttribute(Sr,oe[Sr]);return e.content.appendChild(ir)}e.content.appendChild(We)}function Rr(e,i){if(e.length>1&&!/ /.test(e))return e;for(var D=i,A="",U=0;Uxe&&Ye.from<=xe);lt++);if(Ye.to>=We)return e(D,A,U,$,oe,he,me);e(D,A.slice(0,Ye.to-xe),U,$,null,he,me),$=null,A=A.slice(Ye.to-xe),xe=Ye.to}}}function br(e,i,D,A){var U=!A&&D.widgetNode;U&&e.map.push(e.pos,e.pos+i,U),!A&&e.cm.display.input.needsContentAttribute&&(U||(U=e.content.appendChild(document.createElement("span"))),U.setAttribute("cm-marker",D.id)),U&&(e.cm.display.input.setUneditable(U),e.content.appendChild(U)),e.pos+=i,e.trailingSpace=!1}function it(e,i,D){var A=e.markedSpans,U=e.text,$=0;if(!A){for(var oe=1;oeme||En.collapsed&&Wr.to==me&&Wr.from==me)){if(Wr.to!=null&&Wr.to!=me&&nt>Wr.to&&(nt=Wr.to,Bt=""),En.className&&(At+=" "+En.className),En.css&&(lt=(lt?lt+";":"")+En.css),En.startStyle&&Wr.from==me&&(Jt+=" "+En.startStyle),En.endStyle&&Wr.to==nt&&(Sr||(Sr=[])).push(En.endStyle,Wr.to),En.title&&((yr||(yr={})).title=En.title),En.attributes)for(var Vn in En.attributes)(yr||(yr={}))[Vn]=En.attributes[Vn];En.collapsed&&(!nr||wt(nr.marker,En)<0)&&(nr=Wr)}else Wr.from>me&&nt>Wr.from&&(nt=Wr.from)}if(Sr)for(var Ci=0;Ci=he)break;for(var qi=Math.min(he,nt);;){if(We){var Ji=me+We.length;if(!nr){var pi=Ji>qi?We.slice(0,qi-me):We;i.addToken(i,pi,Ye?Ye+At:At,Jt,me+pi.length==nt?Bt:"",lt,yr)}if(Ji>=qi){We=We.slice(qi-me),me=qi;break}me=Ji,Jt=""}We=U.slice($,$=D[xe++]),Ye=Nt(D[xe++],i.cm.options)}}}function Gt(e,i,D){this.line=i,this.rest=ur(i),this.size=this.rest?qr(re(this.rest))-D+1:1,this.node=this.text=null,this.hidden=$t(e,i)}function ln(e,i,D){for(var A=[],U,$=i;$2&&$.push((me.bottom+xe.top)/2-D.top)}}$.push(D.bottom-D.top)}}function we(e,i,D){if(e.line==i)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;AD)return{map:e.measure.maps[U],cache:e.measure.caches[U],before:!0}}function je(e,i){i=Ot(i);var D=qr(i),A=e.display.externalMeasured=new Gt(e.doc,i,D);A.lineN=D;var U=A.built=qt(e,A);return A.text=U.pre,E(e.display.lineMeasure,U.pre),A}function Ge(e,i,D,A){return Ze(e,ze(e,i),D,A)}function Xe(e,i){if(i>=e.display.viewFrom&&i=D.lineN&&ii)&&($=me-he,U=$-1,i>=me&&(oe="right")),U!=null){if(A=e[xe+2],he==me&&D==(A.insertLeft?"left":"right")&&(oe=D),D=="left"&&U==0)for(;xe&&e[xe-2]==e[xe-3]&&e[xe-1].insertLeft;)A=e[(xe-=3)+2],oe="left";if(D=="right"&&U==me-he)for(;xe=0&&!((D=e[U]).left!=D.right);U--);return D}function Yt(e,i,D,A){var U=kt(i.map,D,A),$=U.node,oe=U.start,he=U.end,me=U.collapse,xe;if($.nodeType==3){for(var We=0;We<4;We++){for(;oe&&ve(i.line.text.charAt(U.coverStart+oe));)--oe;for(;U.coverStart+he0&&(me=A="right");var Ye;e.options.lineWrapping&&(Ye=$.getClientRects()).length>1?xe=Ye[A=="right"?Ye.length-1:0]:xe=$.getBoundingClientRect()}if(T&&b<9&&!oe&&(!xe||!xe.left&&!xe.right)){var lt=$.parentNode.getClientRects()[0];lt?xe={left:lt.left,right:lt.left+ii(e.display),top:lt.top,bottom:lt.bottom}:xe=pt}for(var nt=xe.top-i.rect.top,At=xe.bottom-i.rect.top,Bt=(nt+At)/2,Jt=i.view.measure.heights,nr=0;nr=A.text.length?(me=A.text.length,xe="before"):me<=0&&(me=0,xe="after"),!he)return oe(xe=="before"?me-1:me,xe=="before");function We(At,Bt,Jt){var nr=he[Bt],yr=nr.level==1;return oe(Jt?At-1:At,yr!=Jt)}var Ye=ut(he,me,xe),lt=rt,nt=We(me,Ye,xe=="before");return lt!=null&&(nt.other=We(me,lt,xe!="before")),nt}function Mr(e,i){var D=0;i=K(e.doc,i),e.options.lineWrapping||(D=ii(e.display)*i.ch);var A=lr(e.doc,i.line),U=sr(A)+Xn(e.display);return{left:D,right:D,top:U,bottom:U+A.height}}function Fr(e,i,D,A,U){var $=Ut(e,i,D);return $.xRel=U,A&&($.outside=A),$}function sn(e,i,D){var A=e.doc;if(D+=e.display.viewOffset,D<0)return Fr(A.first,0,null,-1,-1);var U=Un(A,D),$=A.first+A.size-1;if(U>$)return Fr(A.first+A.size-1,lr(A,$).text.length,null,1,1);i<0&&(i=0);for(var oe=lr(A,U);;){var he=zn(e,oe,U,i,D),me=zt(oe,he.ch+(he.xRel>0||he.outside>0?1:0));if(!me)return he;var xe=me.find(1);if(xe.line==U)return xe;oe=lr(A,U=xe.line)}}function gn(e,i,D,A){A-=nn(i);var U=i.text.length,$=Je(function(oe){return Ze(e,D,oe-1).bottom<=A},U,0);return U=Je(function(oe){return Ze(e,D,oe).top>A},$,U),{begin:$,end:U}}function wr(e,i,D,A){D||(D=ze(e,i));var U=yn(e,i,Ze(e,D,A),"line").top;return gn(e,i,D,U)}function xn(e,i,D,A){return e.bottom<=D?!1:e.top>D?!0:(A?e.left:e.right)>i}function zn(e,i,D,A,U){U-=sr(i);var $=ze(e,i),oe=nn(i),he=0,me=i.text.length,xe=!0,We=ft(i,e.doc.direction);if(We){var Ye=(e.options.lineWrapping?Ln:Sn)(e,i,D,$,We,A,U);xe=Ye.level!=1,he=xe?Ye.from:Ye.to-1,me=xe?Ye.to:Ye.from-1}var lt=null,nt=null,At=Je(function(Qr){var Wr=Ze(e,$,Qr);return Wr.top+=oe,Wr.bottom+=oe,xn(Wr,A,U,!1)?(Wr.top<=U&&Wr.left<=A&&(lt=Qr,nt=Wr),!0):!1},he,me),Bt,Jt,nr=!1;if(nt){var yr=A-nt.left=Sr.bottom?1:0}return At=Re(i.text,At,1),Fr(D,At,Jt,nr,A-Bt)}function Sn(e,i,D,A,U,$,oe){var he=Je(function(Ye){var lt=U[Ye],nt=lt.level!=1;return xn(fn(e,Ut(D,nt?lt.to:lt.from,nt?"before":"after"),"line",i,A),$,oe,!0)},0,U.length-1),me=U[he];if(he>0){var xe=me.level!=1,We=fn(e,Ut(D,xe?me.from:me.to,xe?"after":"before"),"line",i,A);xn(We,$,oe,!0)&&We.top>oe&&(me=U[he-1])}return me}function Ln(e,i,D,A,U,$,oe){var he=gn(e,i,A,oe),me=he.begin,xe=he.end;/\s/.test(i.text.charAt(xe-1))&&xe--;for(var We=null,Ye=null,lt=0;lt=xe||nt.to<=me)continue;var At=nt.level!=1,Bt=Ze(e,A,At?Math.min(xe,nt.to)-1:Math.max(me,nt.from)).right,Jt=Bt<$?$-Bt+1e9:Bt-$;(!We||Ye>Jt)&&(We=nt,Ye=Jt)}return We||(We=U[U.length-1]),We.fromxe&&(We={from:We.from,to:xe,level:We.level}),We}var Cn;function Jn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Cn==null){Cn=w("pre",null,"CodeMirror-line-like");for(var i=0;i<49;++i)Cn.appendChild(document.createTextNode("x")),Cn.appendChild(w("br"));Cn.appendChild(document.createTextNode("x"))}E(e.measure,Cn);var D=Cn.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),_(e.measure),D||1}function ii(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var i=w("span","xxxxxxxxxx"),D=w("pre",[i],"CodeMirror-line-like");E(e.measure,D);var A=i.getBoundingClientRect(),U=(A.right-A.left)/10;return U>2&&(e.cachedCharWidth=U),U||10}function Gn(e){for(var i=e.display,D={},A={},U=i.gutters.clientLeft,$=i.gutters.firstChild,oe=0;$;$=$.nextSibling,++oe){var he=e.display.gutterSpecs[oe].className;D[he]=$.offsetLeft+$.clientLeft+U,A[he]=$.clientWidth}return{fixedPos:fi(i),gutterTotalWidth:i.gutters.offsetWidth,gutterLeft:D,gutterWidth:A,wrapperWidth:i.wrapper.clientWidth}}function fi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Xi(e){var i=Jn(e.display),D=e.options.lineWrapping,A=D&&Math.max(5,e.display.scroller.clientWidth/ii(e.display)-3);return function(U){if($t(e.doc,U))return 0;var $=0;if(U.widgets)for(var oe=0;oe0&&(xe=lr(e.doc,me.line).text).length==me.ch){var We=z(xe,xe.length,e.options.tabSize)-xe.length;me=Ut(me.line,Math.max(0,Math.round(($-Ve(e.display).left)/ii(e.display))-We))}return me}function Pn(e,i){if(i>=e.display.viewTo)return null;if(i-=e.display.viewFrom,i<0)return null;for(var D=e.display.view,A=0;Ai)&&(U.updateLineNumbers=i),e.curOp.viewChanged=!0,i>=U.viewTo)Wn&&ar(e.doc,i)U.viewFrom?Bn(e):(U.viewFrom+=A,U.viewTo+=A);else if(i<=U.viewFrom&&D>=U.viewTo)Bn(e);else if(i<=U.viewFrom){var $=ei(e,D,D+A,1);$?(U.view=U.view.slice($.index),U.viewFrom=$.lineN,U.viewTo+=A):Bn(e)}else if(D>=U.viewTo){var oe=ei(e,i,i,-1);oe?(U.view=U.view.slice(0,oe.index),U.viewTo=oe.lineN):Bn(e)}else{var he=ei(e,i,i,-1),me=ei(e,D,D+A,1);he&&me?(U.view=U.view.slice(0,he.index).concat(ln(e,he.lineN,me.lineN)).concat(U.view.slice(me.index)),U.viewTo+=A):Bn(e)}var xe=U.externalMeasured;xe&&(D=U.lineN&&i=A.viewTo)return;var $=A.view[Pn(e,i)];if($.node==null)return;var oe=$.changes||($.changes=[]);ue(oe,D)==-1&&oe.push(D)}function Bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ei(e,i,D,A){var U=Pn(e,i),$,oe=e.display.view;if(!Wn||D==e.doc.first+e.doc.size)return{index:U,lineN:D};for(var he=e.display.viewFrom,me=0;me0){if(U==oe.length-1)return null;$=he+oe[U].size-i,U++}else $=he-i;i+=$,D+=$}for(;ar(e.doc,D)!=D;){if(U==(A<0?0:oe.length-1))return null;D+=A*oe[U-(A<0?1:0)].size,U+=A}return{index:U,lineN:D}}function Ai(e,i,D){var A=e.display,U=A.view;U.length==0||i>=A.viewTo||D<=A.viewFrom?(A.view=ln(e,i,D),A.viewFrom=i):(A.viewFrom>i?A.view=ln(e,i,A.viewFrom).concat(A.view):A.viewFromD&&(A.view=A.view.slice(0,Pn(e,D)))),A.viewTo=D}function ra(e){for(var i=e.display.view,D=0,A=0;A=e.display.viewTo||he.to().line0?i.blinker=setInterval(function(){e.hasFocus()||la(e),i.cursorDiv.style.visibility=(D=!D)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(i.cursorDiv.style.visibility="hidden")}function Ba(e){e.state.focused||(e.display.input.focus(),sa(e))}function wa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,la(e))},100)}function sa(e,i){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||($e(e,"focus",e,i),e.state.focused=!0,W(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()),ti(e)}function la(e,i){if(e.state.delayingBlurEvent)return;e.state.focused&&($e(e,"blur",e,i),e.state.focused=!1,v(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ka(e){for(var i=e.display,D=i.lineDiv.offsetTop,A=0;A.005||We<-.005)&&(Hn(U.line,oe),Ta(U.line),U.rest))for(var Ye=0;Yee.display.sizerWidth){var lt=Math.ceil(he/ii(e.display));lt>e.display.maxLineLength&&(e.display.maxLineLength=lt,e.display.maxLine=U.line,e.display.maxLineChanged=!0)}}}function Ta(e){if(e.widgets)for(var i=0;i=oe&&($=Un(i,sr(lr(i,me))-e.wrapper.clientHeight),oe=me)}return{from:$,to:Math.max(oe,$+1)}}function Ha(e,i){if(st(e,"scrollCursorIntoView"))return;var D=e.display,A=D.sizer.getBoundingClientRect(),U=null;if(i.top+A.top<0?U=!0:i.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(U=!1),U!=null&&!o){var $=w("div","\u200B",null,`position: absolute; top: `+(i.top-D.viewOffset-Xn(e.display))+`px; height: `+(i.bottom-i.top+Qe(e)+D.barHeight)+`px; left: `+i.left+"px; width: "+Math.max(2,i.right-i.left)+"px;");e.display.lineSpace.appendChild($),$.scrollIntoView(U),e.display.lineSpace.removeChild($)}}function Xa(e,i,D,A){A==null&&(A=0);var U;!e.options.lineWrapping&&i==D&&(i=i.ch?Ut(i.line,i.sticky=="before"?i.ch-1:i.ch,"after"):i,D=i.sticky=="before"?Ut(i.line,i.ch+1,"before"):i);for(var $=0;$<5;$++){var oe=!1,he=fn(e,i),me=!D||D==i?he:fn(e,D);U={left:Math.min(he.left,me.left),top:Math.min(he.top,me.top)-A,right:Math.max(he.left,me.left),bottom:Math.max(he.bottom,me.bottom)+A};var xe=ua(e,U),We=e.doc.scrollTop,Ye=e.doc.scrollLeft;if(xe.scrollTop!=null&&(da(e,xe.scrollTop),Math.abs(e.doc.scrollTop-We)>1&&(oe=!0)),xe.scrollLeft!=null&&(Yi(e,xe.scrollLeft),Math.abs(e.doc.scrollLeft-Ye)>1&&(oe=!0)),!oe)break}return U}function Pa(e,i){var D=ua(e,i);D.scrollTop!=null&&da(e,D.scrollTop),D.scrollLeft!=null&&Yi(e,D.scrollLeft)}function ua(e,i){var D=e.display,A=Jn(e.display);i.top<0&&(i.top=0);var U=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:D.scroller.scrollTop,$=be(e),oe={};i.bottom-i.top>$&&(i.bottom=i.top+$);var he=e.doc.height+Pe(D),me=i.tophe-A;if(i.topU+$){var We=Math.min(i.top,(xe?he:i.bottom)-$);We!=U&&(oe.scrollTop=We)}var Ye=e.options.fixedGutter?0:D.gutters.offsetWidth,lt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-Ye,nt=Fe(e)-D.gutters.offsetWidth,At=i.right-i.left>nt;return At&&(i.right=i.left+nt),i.left<10?oe.scrollLeft=0:i.leftnt+lt-3&&(oe.scrollLeft=i.right+(At?0:10)-nt),oe}function Sa(e,i){if(i==null)return;_a(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+i}function ba(e){_a(e);var i=e.getCursor();e.curOp.scrollToPos={from:i,to:i,margin:e.options.cursorScrollMargin}}function ca(e,i,D){(i!=null||D!=null)&&_a(e),i!=null&&(e.curOp.scrollLeft=i),D!=null&&(e.curOp.scrollTop=D)}function co(e,i){_a(e),e.curOp.scrollToPos=i}function _a(e){var i=e.curOp.scrollToPos;if(i){e.curOp.scrollToPos=null;var D=Mr(e,i.from),A=Mr(e,i.to);Ca(e,D,A,i.margin)}}function Ca(e,i,D,A){var U=ua(e,{left:Math.min(i.left,D.left),top:Math.min(i.top,D.top)-A,right:Math.max(i.right,D.right),bottom:Math.max(i.bottom,D.bottom)+A});ca(e,U.scrollLeft,U.scrollTop)}function da(e,i){if(Math.abs(e.doc.scrollTop-i)<2)return;O||za(e,{top:i}),fa(e,i,!0),O&&za(e),Wa(e,100)}function fa(e,i,D){if(i=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,i)),e.display.scroller.scrollTop==i&&!D)return;e.doc.scrollTop=i,e.display.scrollbars.setScrollTop(i),e.display.scroller.scrollTop!=i&&(e.display.scroller.scrollTop=i)}function Yi(e,i,D,A){if(i=Math.max(0,Math.min(i,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(D?i==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-i)<2)&&!A)return;e.doc.scrollLeft=i,Tn(e),e.display.scroller.scrollLeft!=i&&(e.display.scroller.scrollLeft=i),e.display.scrollbars.setScrollLeft(i)}function na(e){var i=e.display,D=i.gutters.offsetWidth,A=Math.round(e.doc.height+Pe(e.display));return{clientHeight:i.scroller.clientHeight,viewHeight:i.wrapper.clientHeight,scrollWidth:i.scroller.scrollWidth,clientWidth:i.scroller.clientWidth,viewWidth:i.wrapper.clientWidth,barLeft:e.options.fixedGutter?D:0,docHeight:A,scrollHeight:A+Qe(e)+i.barHeight,nativeBarWidth:i.nativeBarWidth,gutterWidth:D}}var xr=function(e,i,D){this.cm=D;var A=this.vert=w("div",[w("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),U=this.horiz=w("div",[w("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=U.tabIndex=-1,e(A),e(U),Ie(A,"scroll",function(){A.clientHeight&&i(A.scrollTop,"vertical")}),Ie(U,"scroll",function(){U.clientWidth&&i(U.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,T&&b<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xr.prototype.update=function(e){var i=e.scrollWidth>e.clientWidth+1,D=e.scrollHeight>e.clientHeight+1,A=e.nativeBarWidth;if(D){this.vert.style.display="block",this.vert.style.bottom=i?A+"px":"0";var U=e.viewHeight-(i?A:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+U)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(i){this.horiz.style.display="block",this.horiz.style.right=D?A+"px":"0",this.horiz.style.left=e.barLeft+"px";var $=e.viewWidth-e.barLeft-(D?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+$)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(A==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:D?A:0,bottom:i?A:0}},xr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xr.prototype.zeroWidthHack=function(){var e=l&&!a?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new J,this.disableVert=new J},xr.prototype.enableZeroWidthBar=function(e,i,D){e.style.pointerEvents="auto";function A(){var U=e.getBoundingClientRect(),$=D=="vert"?document.elementFromPoint(U.right-1,(U.top+U.bottom)/2):document.elementFromPoint((U.right+U.left)/2,U.bottom-1);$!=e?e.style.pointerEvents="none":i.set(1e3,A)}i.set(1e3,A)},xr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Tr=function(){};Tr.prototype.update=function(){return{bottom:0,right:0}},Tr.prototype.setScrollLeft=function(){},Tr.prototype.setScrollTop=function(){},Tr.prototype.clear=function(){};function or(e,i){i||(i=na(e));var D=e.display.barWidth,A=e.display.barHeight;wn(e,i);for(var U=0;U<4&&D!=e.display.barWidth||A!=e.display.barHeight;U++)D!=e.display.barWidth&&e.options.lineWrapping&&ka(e),wn(e,na(e)),D=e.display.barWidth,A=e.display.barHeight}function wn(e,i){var D=e.display,A=D.scrollbars.update(i);D.sizer.style.paddingRight=(D.barWidth=A.right)+"px",D.sizer.style.paddingBottom=(D.barHeight=A.bottom)+"px",D.heightForcer.style.borderBottom=A.bottom+"px solid transparent",A.right&&A.bottom?(D.scrollbarFiller.style.display="block",D.scrollbarFiller.style.height=A.bottom+"px",D.scrollbarFiller.style.width=A.right+"px"):D.scrollbarFiller.style.display="",A.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(D.gutterFiller.style.display="block",D.gutterFiller.style.height=A.bottom+"px",D.gutterFiller.style.width=i.gutterWidth+"px"):D.gutterFiller.style.display=""}var hr={native:xr,null:Tr};function pa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&v(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new hr[e.options.scrollbarStyle](function(i){e.display.wrapper.insertBefore(i,e.display.scrollbarFiller),Ie(i,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),i.setAttribute("cm-not-content","true")},function(i,D){D=="horizontal"?Yi(e,i):da(e,i)},e),e.display.scrollbars.addClass&&W(e.display.wrapper,e.display.scrollbars.addClass)}var Ya=0;function jn(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:++Ya},mr(e.curOp)}function Oa(e){var i=e.curOp;i&&Pr(i,function(D){for(var A=0;A=D.viewTo)||D.maxLineChanged&&i.options.lineWrapping,e.update=e.mustUpdate&&new ia(i,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Aa(e.cm,e.update)}function Zo(e){var i=e.cm,D=i.display;e.updatedDisplay&&ka(i),e.barMeasure=na(i),D.maxLineChanged&&!i.options.lineWrapping&&(e.adjustWidthTo=Ge(i,D.maxLine,D.maxLine.text.length).left+3,i.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(D.scroller.clientWidth,D.sizer.offsetLeft+e.adjustWidthTo+Qe(i)+i.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-Fe(i))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=D.input.prepareSelection())}function ho(e){var i=e.cm;e.adjustWidthTo!=null&&(i.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var D=+new Date+e.options.workTime,A=Xt(e,i.highlightFrontier),U=[];i.iter(A.line,Math.min(i.first+i.size,e.display.viewTo+500),function($){if(A.line>=e.display.viewFrom){var oe=$.styles,he=$.text.length>e.options.maxHighlightLength?an(i.mode,A.state):null,me=Ke(e,$,A,!0);he&&(A.state=he),$.styles=me.styles;var xe=$.styleClasses,We=me.classes;We?$.styleClasses=We:xe&&($.styleClasses=null);for(var Ye=!oe||oe.length!=$.styles.length||xe!=We&&(!xe||!We||xe.bgClass!=We.bgClass||xe.textClass!=We.textClass),lt=0;!Ye&<D)return Wa(e,e.options.workDelay),!0}),i.highlightFrontier=A.line,i.modeFrontier=Math.max(i.modeFrontier,A.line),U.length&&Bi(e,function(){for(var $=0;$=D.viewFrom&&i.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&ra(e)==0)return!1;yi(e)&&(Bn(e),i.dims=Gn(e));var U=A.first+A.size,$=Math.max(i.visible.from-e.options.viewportMargin,A.first),oe=Math.min(U,i.visible.to+e.options.viewportMargin);D.viewFrom<$&&$-D.viewFrom<20&&($=Math.max(A.first,D.viewFrom)),D.viewTo>oe&&D.viewTo-oe<20&&(oe=Math.min(U,D.viewTo)),Wn&&($=ar(e.doc,$),oe=Zt(e.doc,oe));var he=$!=D.viewFrom||oe!=D.viewTo||D.lastWrapHeight!=i.wrapperHeight||D.lastWrapWidth!=i.wrapperWidth;Ai(e,$,oe),D.viewOffset=sr(lr(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var me=ra(e);if(!he&&me==0&&!i.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var xe=ko(e);return me>4&&(D.lineDiv.style.display="none"),Po(e,D.updateLineNumbers,i.dims),me>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,Lo(xe),_(D.cursorDiv),_(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,he&&(D.lastWrapHeight=i.wrapperHeight,D.lastWrapWidth=i.wrapperWidth,Wa(e,400)),D.updateLineNumbers=null,!0}function $a(e,i){for(var D=i.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||i.oldDisplayWidth==Fe(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+Pe(e.display)-be(e),D.top)}),i.visible=La(e.display,e.doc,D),i.visible.from>=e.display.viewFrom&&i.visible.to<=e.display.viewTo)break}else A&&(i.visible=La(e.display,e.doc,D));if(!Aa(e,i))break;ka(e);var U=na(e);An(e),or(e,U),kn(e,U),i.force=!1}i.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(i.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function za(e,i){var D=new ia(e,i);if(Aa(e,D)){ka(e),$a(e,D);var A=na(e);An(e),or(e,A),kn(e,A),D.finish()}}function Po(e,i,D){var A=e.display,U=e.options.lineNumbers,$=A.lineDiv,oe=$.firstChild;function he(At){var Bt=At.nextSibling;return p&&l&&e.display.currentWheelTarget==At?At.style.display="none":At.parentNode.removeChild(At),Bt}for(var me=A.view,xe=A.viewFrom,We=0;We-1&&(nt=!1),tr(e,Ye,xe,D)),nt&&(_(Ye.lineNumber),Ye.lineNumber.appendChild(document.createTextNode(vi(e.options,xe)))),oe=Ye.node.nextSibling}xe+=Ye.size}for(;oe;)oe=he(oe)}function Ja(e){var i=e.gutters.offsetWidth;e.sizer.style.marginLeft=i+"px"}function kn(e,i){e.display.sizer.style.minHeight=i.docHeight+"px",e.display.heightForcer.style.top=i.docHeight+"px",e.display.gutters.style.height=i.docHeight+e.display.barHeight+Qe(e)+"px"}function Tn(e){var i=e.display,D=i.view;if(!i.alignWidgets&&(!i.gutters.firstChild||!e.options.fixedGutter))return;for(var A=fi(i)-i.scroller.scrollLeft+e.doc.scrollLeft,U=i.gutters.offsetWidth,$=A+"px",oe=0;oeoe.clientWidth,me=oe.scrollHeight>oe.clientHeight;if(!(A&&he||U&&me))return;if(U&&l&&p){e:for(var xe=i.target,We=$.view;xe!=oe;xe=xe.parentNode)for(var Ye=0;Ye=0&&_r(e,A.to())<=0)return D}return-1};var Rn=function(e,i){this.anchor=e,this.head=i};Rn.prototype.from=function(){return wi(this.anchor,this.head)},Rn.prototype.to=function(){return Di(this.anchor,this.head)},Rn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function aa(e,i,D){var A=e&&e.options.selectionsMayTouch,U=i[D];i.sort(function(lt,nt){return _r(lt.from(),nt.from())}),D=ue(i,U);for(var $=1;$0:me>=0){var xe=wi(he.from(),oe.from()),We=Di(he.to(),oe.to()),Ye=he.empty()?oe.from()==oe.head:he.from()==he.head;$<=D&&--D,i.splice(--$,2,new Rn(Ye?We:xe,Ye?xe:We))}}return new Wi(i,D)}function ga(e,i){return new Wi([new Rn(e,i||e)],0)}function va(e){return e.text?Ut(e.from.line+e.text.length-1,re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,i){if(_r(e,i.from)<0)return e;if(_r(e,i.to)<=0)return va(i);var D=e.line+i.text.length-(i.to.line-i.from.line)-1,A=e.ch;return e.line==i.to.line&&(A+=va(i).ch-i.to.ch),Ut(D,A)}function Za(e,i){for(var D=[],A=0;A1&&e.remove(he.line+1,At-1),e.insert(he.line+1,nr)}Qt(e,"change",e,i)}function Na(e,i,D){function A(U,$,oe){if(U.linked)for(var he=0;he1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(e.done)}function _s(e,i,D,A){var U=e.history;U.undone.length=0;var $=+new Date,oe,he;if((U.lastOp==A||U.lastOrigin==i.origin&&i.origin&&(i.origin.charAt(0)=="+"&&U.lastModTime>$-(e.cm?e.cm.options.historyEventDelay:500)||i.origin.charAt(0)=="*"))&&(oe=ml(U,U.lastOp==A)))he=re(oe.changes),_r(i.from,i.to)==0&&_r(i.from,he.to)==0?he.to=va(i):oe.changes.push(rs(e,i));else{var me=re(U.done);for((!me||!me.ranges)&&Fo(e.sel,U.done),oe={changes:[rs(e,i)],generation:U.generation},U.done.push(oe);U.done.length>U.undoDepth;)U.done.shift(),U.done[0].ranges||U.done.shift()}U.done.push(D),U.generation=++U.maxGeneration,U.lastModTime=U.lastSelTime=$,U.lastOp=U.lastSelOp=A,U.lastOrigin=U.lastSelOrigin=i.origin,he||$e(e,"historyAdded")}function gl(e,i,D,A){var U=i.charAt(0);return U=="*"||U=="+"&&D.ranges.length==A.ranges.length&&D.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,i,D,A){var U=e.history,$=A&&A.origin;D==U.lastSelOp||$&&U.lastSelOrigin==$&&(U.lastModTime==U.lastSelTime&&U.lastOrigin==$||gl(e,$,re(U.done),i))?U.done[U.done.length-1]=i:Fo(i,U.done),U.lastSelTime=+new Date,U.lastSelOrigin=$,U.lastSelOp=D,A&&A.clearRedo!==!1&&bs(U.undone)}function Fo(e,i){var D=re(i);D&&D.ranges&&D.equals(e)||i.push(e)}function Es(e,i,D,A){var U=i["spans_"+e.id],$=0;e.iter(Math.max(e.first,D),Math.min(e.first+e.size,A),function(oe){oe.markedSpans&&((U||(U=i["spans_"+e.id]={}))[$]=oe.markedSpans),++$})}function yl(e){if(!e)return null;for(var i,D=0;D-1&&(re(he)[Ye]=xe[Ye],delete xe[Ye]))}}return A}function ns(e,i,D,A){if(A){var U=e.anchor;if(D){var $=_r(i,U)<0;$!=_r(D,U)<0?(U=i,i=D):$!=_r(i,D)<0&&(i=D)}return new Rn(U,i)}else return new Rn(D||i,i)}function Uo(e,i,D,A,U){U==null&&(U=e.cm&&(e.cm.display.shift||e.extend)),Pi(e,new Wi([ns(e.sel.primary(),i,D,U)],0),A)}function ws(e,i,D){for(var A=[],U=e.cm&&(e.cm.display.shift||e.extend),$=0;$=i.ch:he.to>i.ch))){if(U&&($e(me,"beforeCursorEnter"),me.explicitlyCleared))if($.markedSpans){--oe;continue}else break;if(!me.atomic)continue;if(D){var Ye=me.find(A<0?1:-1),lt=void 0;if((A<0?We:xe)&&(Ye=Rs(e,Ye,-A,Ye&&Ye.line==i.line?$:null)),Ye&&Ye.line==i.line&&(lt=_r(Ye,D))&&(A<0?lt<0:lt>0))return eo(e,Ye,i,A,U)}var nt=me.find(A<0?-1:1);return(A<0?xe:We)&&(nt=Rs(e,nt,A,nt.line==i.line?$:null)),nt?eo(e,nt,i,A,U):null}}return i}function Ho(e,i,D,A,U){var $=A||1,oe=eo(e,i,D,$,U)||!U&&eo(e,i,D,$,!0)||eo(e,i,D,-$,U)||!U&&eo(e,i,D,-$,!0);return oe||(e.cantEdit=!0,Ut(e.first,0))}function Rs(e,i,D,A){return D<0&&i.ch==0?i.line>e.first?K(e,Ut(i.line-1)):null:D>0&&i.ch==(A||lr(e,i.line)).text.length?i.line=0;--U)ks(e,{from:A[U].from,to:A[U].to,text:U?[""]:i.text,origin:i.origin});else ks(e,i)}function ks(e,i){if(i.text.length==1&&i.text[0]==""&&_r(i.from,i.to)==0)return;var D=Za(e,i);_s(e,i,D,e.cm?e.cm.curOp.id:NaN),vo(e,i,D,Li(e,i));var A=[];Na(e,function(U,$){!$&&ue(A,U.history)==-1&&(Ns(U.history,i),A.push(U.history)),vo(U,i,null,Li(U,i))})}function Wo(e,i,D){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!D)return;for(var U=e.history,$,oe=e.sel,he=i=="undo"?U.done:U.undone,me=i=="undo"?U.undone:U.done,xe=0;xe=0;--nt){var At=lt(nt);if(At)return At.v}}function Ls(e,i){if(i==0)return;if(e.first+=i,e.sel=new Wi(fe(e.sel.ranges,function(U){return new Rn(Ut(U.anchor.line+i,U.anchor.ch),Ut(U.head.line+i,U.head.ch))}),e.sel.primIndex),e.cm){Mn(e.cm,e.first,e.first-i,i);for(var D=e.cm.display,A=D.viewFrom;Ae.lastLine())return;if(i.from.line$&&(i={from:i.from,to:Ut($,lr(e,$).text.length),text:[i.text[0]],origin:i.origin}),i.removed=Yn(e,i.from,i.to),D||(D=Za(e,i)),e.cm?El(e.cm,i,A):ts(e,i,A),Bo(e,D,Ae),e.cantEdit&&Ho(e,Ut(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,i,D){var A=e.doc,U=e.display,$=i.from,oe=i.to,he=!1,me=$.line;e.options.lineWrapping||(me=qr(Ot(lr(A,$.line))),A.iter(me,oe.line+1,function(nt){if(nt==U.maxLine)return he=!0,!0})),A.sel.contains(i.from,i.to)>-1&&Ue(e),ts(A,i,D,Xi(e)),e.options.lineWrapping||(A.iter(me,$.line+i.text.length,function(nt){var At=ot(nt);At>U.maxLineLength&&(U.maxLine=nt,U.maxLineLength=At,U.maxLineChanged=!0,he=!1)}),he&&(e.curOp.updateMaxLine=!0)),Ni(A,$.line),Wa(e,400);var xe=i.text.length-(oe.line-$.line)-1;i.full?Mn(e):$.line==oe.line&&i.text.length==1&&!gs(e.doc,i)?Kn(e,$.line,"text"):Mn(e,$.line,oe.line+1,xe);var We=Le(e,"changes"),Ye=Le(e,"change");if(Ye||We){var lt={from:$,to:oe,text:i.text,removed:i.removed,origin:i.origin};Ye&&Qt(e,"change",e,lt),We&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(lt)}e.display.selForContextMenu=null}function ro(e,i,D,A,U){var $;A||(A=D),_r(A,D)<0&&($=[A,D],D=$[0],A=$[1]),typeof i=="string"&&(i=e.splitLines(i)),to(e,{from:D,to:A,text:i,origin:U})}function Ps(e,i,D,A){D1||!(this.children[0]instanceof bo))){var he=[];this.collapse(he),this.children=[new bo(he)],this.children[0].parent=this}},collapse:function(e){for(var i=0;i50){for(var oe=U.lines.length%25+25,he=oe;he10);e.parent.maybeSpill()},iterN:function(e,i,D){for(var A=0;Ae.display.maxLineLength&&(e.display.maxLine=xe,e.display.maxLineLength=We,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&Mn(e,A,U+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Qt(e,"markerCleared",e,this,A,U),i&&Oa(e),this.parent&&this.parent.clear()},ja.prototype.find=function(e,i){e==null&&this.type=="bookmark"&&(e=1);for(var D,A,U=0;U0||oe==0&&$.clearWhenEmpty!==!1)return $;if($.replacedWith&&($.collapsed=!0,$.widgetNode=k("span",[$.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||$.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&($.widgetNode.insertLeft=!0)),$.collapsed){if(ht(e,i.line,i,D,$)||i.line!=D.line&&ht(e,D.line,i,D,$))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ki()}$.addToHistory&&_s(e,{from:i,to:D,origin:"markText"},e.sel,NaN);var he=i.line,me=e.cm,xe;if(e.iter(he,D.line+1,function(Ye){me&&$.collapsed&&!me.options.lineWrapping&&Ot(Ye)==me.display.maxLine&&(xe=!0),$.collapsed&&he!=i.line&&Hn(Ye,0),Vi(Ye,new ki($,he==i.line?i.ch:null,he==D.line?D.ch:null)),++he}),$.collapsed&&e.iter(i.line,D.line+1,function(Ye){$t(e,Ye)&&Hn(Ye,0)}),$.clearOnEnter&&Ie($,"beforeCursorEnter",function(){return $.clear()}),$.readOnly&&(Ti(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),$.collapsed&&($.id=++Fs,$.atomic=!0),me){if(xe&&(me.curOp.updateMaxLine=!0),$.collapsed)Mn(me,i.line,D.line+1);else if($.className||$.startStyle||$.endStyle||$.css||$.attributes||$.title)for(var We=i.line;We<=D.line;We++)Kn(me,We,"text");$.atomic&&Os(me.doc),Qt(me,"markerAdded",me,$)}return $}var xo=function(e,i){this.markers=e,this.primary=i;for(var D=0;D=0;me--)to(this,A[me]);he?Ss(this,he):this.cm&&ba(this.cm)}),undo:li(function(){Wo(this,"undo")}),redo:li(function(){Wo(this,"redo")}),undoSelection:li(function(){Wo(this,"undo",!0)}),redoSelection:li(function(){Wo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,i=0,D=0,A=0;A=e.ch)&&i.push(U.marker.parent||U.marker)}return i},findMarks:function(e,i,D){e=K(this,e),i=K(this,i);var A=[],U=e.line;return this.iter(e.line,i.line+1,function($){var oe=$.markedSpans;if(oe)for(var he=0;he=me.to||me.from==null&&U!=e.line||me.from!=null&&U==i.line&&me.from>=i.ch)&&(!D||D(me.marker))&&A.push(me.marker.parent||me.marker)}++U}),A},getAllMarks:function(){var e=[];return this.iter(function(i){var D=i.markedSpans;if(D)for(var A=0;Ae)return i=e,!0;e-=$,++D}),K(this,Ut(D,i))},indexFromPos:function(e){e=K(this,e);var i=e.ch;if(e.linei&&(i=e.from),e.to!=null&&e.to-1){i.state.draggingText(e),setTimeout(function(){return i.display.input.focus()},20);return}try{var We=e.dataTransfer.getData("Text");if(We){var Ye;if(i.state.draggingText&&!i.state.draggingText.copy&&(Ye=i.listSelections()),Bo(i.doc,ga(D,D)),Ye)for(var lt=0;lt=0;he--)ro(e.doc,"",A[he].from,A[he].to,"+delete");ba(e)})}function as(e,i,D){var A=Re(e.text,i+D,D);return A<0||A>e.text.length?null:A}function os(e,i,D){var A=as(e,i.ch,D);return A==null?null:new Ut(i.line,A,D<0?"after":"before")}function ss(e,i,D,A,U){if(e){i.doc.direction=="rtl"&&(U=-U);var $=ft(D,i.doc.direction);if($){var oe=U<0?re($):$[0],he=U<0==(oe.level==1),me=he?"after":"before",xe;if(oe.level>0||i.doc.direction=="rtl"){var We=ze(i,D);xe=U<0?D.text.length-1:0;var Ye=Ze(i,We,xe).top;xe=Je(function(lt){return Ze(i,We,lt).top==Ye},U<0==(oe.level==1)?oe.from:oe.to-1,xe),me=="before"&&(xe=as(D,xe,1))}else xe=U<0?oe.to:oe.from;return new Ut(A,xe,me)}}return new Ut(A,U<0?D.text.length:0,U<0?"before":"after")}function Ml(e,i,D,A){var U=ft(i,e.doc.direction);if(!U)return os(i,D,A);D.ch>=i.text.length?(D.ch=i.text.length,D.sticky="before"):D.ch<=0&&(D.ch=0,D.sticky="after");var $=ut(U,D.ch,D.sticky),oe=U[$];if(e.doc.direction=="ltr"&&oe.level%2==0&&(A>0?oe.to>D.ch:oe.from=oe.from&<>=We.begin)){var nt=Ye?"before":"after";return new Ut(D.line,lt,nt)}}var At=function(nr,yr,ir){for(var Sr=function(Vn,Ci){return Ci?new Ut(D.line,he(Vn,1),"before"):new Ut(D.line,Vn,"after")};nr>=0&&nr0==(Qr.level!=1),En=Wr?ir.begin:he(ir.end,-1);if(Qr.from<=En&&En0?We.end:he(We.begin,-1);return Jt!=null&&!(A>0&&Jt==i.text.length)&&(Bt=At(A>0?0:U.length-1,A,xe(Jt)),Bt)?Bt:null}var So={selectAll:Is,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ae)},killLine:function(e){return ao(e,function(i){if(i.empty()){var D=lr(e.doc,i.head.line).text.length;return i.head.ch==D&&i.head.line0)U=new Ut(U.line,U.ch+1),e.replaceRange($.charAt(U.ch-1)+$.charAt(U.ch-2),Ut(U.line,U.ch-2),U,"+transpose");else if(U.line>e.doc.first){var oe=lr(e.doc,U.line-1).text;oe&&(U=new Ut(U.line,1),e.replaceRange($.charAt(0)+e.doc.lineSeparator()+oe.charAt(oe.length-1),Ut(U.line-1,oe.length-1),U,"+transpose"))}}D.push(new Rn(U,U))}e.setSelections(D)})},newlineAndIndent:function(e){return Bi(e,function(){for(var i=e.listSelections(),D=i.length-1;D>=0;D--)e.replaceRange(e.doc.lineSeparator(),i[D].anchor,i[D].head,"+input");i=e.listSelections();for(var A=0;Ae&&_r(i,this.pos)==0&&D==this.button};var Oo,Ao;function Wl(e,i){var D=+new Date;return Ao&&Ao.compare(D,e,i)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(D,e,i)?(Ao=new us(D,e,i),Oo=null,"double"):(Oo=new us(D,e,i),Ao=null,"single")}function tl(e){var i=this,D=i.display;if(st(i,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,mn(D,e)){p||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(i,e))return;var A=ai(i,e),U=tt(e),$=A?Wl(A,U):"single";if(window.focus(),U==1&&i.state.selectingText&&i.state.selectingText(e),A&&zl(i,U,A,$,e))return;U==1?A?Kl(i,A,$,e):He(e)==D.scroller&&Ee(e):U==2?(A&&Uo(i.doc,A),setTimeout(function(){return D.input.focus()},20)):U==3&&(R?i.display.input.onContextMenu(e):wa(i))}function zl(e,i,D,A,U){var $="Click";return A=="double"?$="Double"+$:A=="triple"&&($="Triple"+$),$=(i==1?"Left":i==2?"Middle":"Right")+$,Co(e,Ks($,U),U,function(oe){if(typeof oe=="string"&&(oe=So[oe]),!oe)return!1;var he=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),he=oe(e,D)!=Se}finally{e.state.suppressEdits=!1}return he})}function Gl(e,i,D){var A=e.getOption("configureMouse"),U=A?A(e,i,D):{};if(U.unit==null){var $=t?D.shiftKey&&D.metaKey:D.altKey;U.unit=$?"rectangle":i=="single"?"char":i=="double"?"word":"line"}return(U.extend==null||e.doc.extend)&&(U.extend=e.doc.extend||D.shiftKey),U.addNew==null&&(U.addNew=l?D.metaKey:D.ctrlKey),U.moveOnDrag==null&&(U.moveOnDrag=!(l?D.altKey:D.ctrlKey)),U}function Kl(e,i,D,A){T?setTimeout(B(Ba,e),0):e.curOp.focus=V();var U=Gl(e,D,A),$=e.doc.sel,oe;e.options.dragDrop&&vt&&!e.isReadOnly()&&D=="single"&&(oe=$.contains(i))>-1&&(_r((oe=$.ranges[oe]).from(),i)<0||i.xRel>0)&&(_r(oe.to(),i)>0||i.xRel<0)?Vl(e,A,i,U):Xl(e,A,i,U)}function Vl(e,i,D,A){var U=e.display,$=!1,oe=si(e,function(xe){p&&(U.scroller.draggable=!1),e.state.draggingText=!1,ct(U.wrapper.ownerDocument,"mouseup",oe),ct(U.wrapper.ownerDocument,"mousemove",he),ct(U.scroller,"dragstart",me),ct(U.scroller,"drop",oe),$||(Ee(xe),A.addNew||Uo(e.doc,D,null,null,A.extend),p&&!r||T&&b==9?setTimeout(function(){U.wrapper.ownerDocument.body.focus({preventScroll:!0}),U.input.focus()},20):U.input.focus())}),he=function(xe){$=$||Math.abs(i.clientX-xe.clientX)+Math.abs(i.clientY-xe.clientY)>=10},me=function(){return $=!0};p&&(U.scroller.draggable=!0),e.state.draggingText=oe,oe.copy=!A.moveOnDrag,U.scroller.dragDrop&&U.scroller.dragDrop(),Ie(U.wrapper.ownerDocument,"mouseup",oe),Ie(U.wrapper.ownerDocument,"mousemove",he),Ie(U.scroller,"dragstart",me),Ie(U.scroller,"drop",oe),wa(e),setTimeout(function(){return U.input.focus()},20)}function rl(e,i,D){if(D=="char")return new Rn(i,i);if(D=="word")return e.findWordAt(i);if(D=="line")return new Rn(Ut(i.line,0),K(e.doc,Ut(i.line+1,0)));var A=D(e,i);return new Rn(A.from,A.to)}function Xl(e,i,D,A){var U=e.display,$=e.doc;Ee(i);var oe,he,me=$.sel,xe=me.ranges;if(A.addNew&&!A.extend?(he=$.sel.contains(D),he>-1?oe=xe[he]:oe=new Rn(D,D)):(oe=$.sel.primary(),he=$.sel.primIndex),A.unit=="rectangle")A.addNew||(oe=new Rn(D,D)),D=ai(e,i,!0,!0),he=-1;else{var We=rl(e,D,A.unit);A.extend?oe=ns(oe,We.anchor,We.head,A.extend):oe=We}A.addNew?he==-1?(he=xe.length,Pi($,aa(e,xe.concat([oe]),he),{scroll:!1,origin:"*mouse"})):xe.length>1&&xe[he].empty()&&A.unit=="char"&&!A.extend?(Pi($,aa(e,xe.slice(0,he).concat(xe.slice(he+1)),0),{scroll:!1,origin:"*mouse"}),me=$.sel):is($,he,oe,pe):(he=0,Pi($,new Wi([oe],0),pe),me=$.sel);var Ye=D;function lt(ir){if(_r(Ye,ir)==0)return;if(Ye=ir,A.unit=="rectangle"){for(var Sr=[],Qr=e.options.tabSize,Wr=z(lr($,D.line).text,D.ch,Qr),En=z(lr($,ir.line).text,ir.ch,Qr),Vn=Math.min(Wr,En),Ci=Math.max(Wr,En),ri=Math.min(D.line,ir.line),qi=Math.min(e.lastLine(),Math.max(D.line,ir.line));ri<=qi;ri++){var Ji=lr($,ri).text,pi=ye(Ji,Vn,Qr);Vn==Ci?Sr.push(new Rn(Ut(ri,pi),Ut(ri,pi))):Ji.length>pi&&Sr.push(new Rn(Ut(ri,pi),Ut(ri,ye(Ji,Ci,Qr))))}Sr.length||Sr.push(new Rn(D,D)),Pi($,aa(e,me.ranges.slice(0,he).concat(Sr),he),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ir)}else{var Qi=oe,Ii=rl(e,ir,A.unit),_i=Qi.anchor,mi;_r(Ii.anchor,_i)>0?(mi=Ii.head,_i=wi(Qi.from(),Ii.anchor)):(mi=Ii.anchor,_i=Di(Qi.to(),Ii.head));var oi=me.ranges.slice(0);oi[he]=Yl(e,new Rn(K($,_i),mi)),Pi($,aa(e,oi,he),pe)}}var nt=U.wrapper.getBoundingClientRect(),At=0;function Bt(ir){var Sr=++At,Qr=ai(e,ir,!0,A.unit=="rectangle");if(!Qr)return;if(_r(Qr,Ye)!=0){e.curOp.focus=V(),lt(Qr);var Wr=La(U,$);(Qr.line>=Wr.to||Qr.linent.bottom?20:0;En&&setTimeout(si(e,function(){if(At!=Sr)return;U.scroller.scrollTop+=En,Bt(ir)}),50)}}function Jt(ir){e.state.selectingText=!1,At=Infinity,ir&&(Ee(ir),U.input.focus()),ct(U.wrapper.ownerDocument,"mousemove",nr),ct(U.wrapper.ownerDocument,"mouseup",yr),$.history.lastSelOrigin=null}var nr=si(e,function(ir){ir.buttons===0||!tt(ir)?Jt(ir):Bt(ir)}),yr=si(e,Jt);e.state.selectingText=yr,Ie(U.wrapper.ownerDocument,"mousemove",nr),Ie(U.wrapper.ownerDocument,"mouseup",yr)}function Yl(e,i){var D=i.anchor,A=i.head,U=lr(e.doc,D.line);if(_r(D,A)==0&&D.sticky==A.sticky)return i;var $=ft(U);if(!$)return i;var oe=ut($,D.ch,D.sticky),he=$[oe];if(he.from!=D.ch&&he.to!=D.ch)return i;var me=oe+(he.from==D.ch==(he.level!=1)?0:1);if(me==0||me==$.length)return i;var xe;if(A.line!=D.line)xe=(A.line-D.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var We=ut($,A.ch,A.sticky),Ye=We-oe||(A.ch-D.ch)*(he.level==1?-1:1);We==me-1||We==me?xe=Ye<0:xe=Ye>0}var lt=$[me+(xe?-1:0)],nt=xe==(lt.level==1),At=nt?lt.from:lt.to,Bt=nt?"after":"before";return D.ch==At&&D.sticky==Bt?i:new Rn(new Ut(D.line,At,Bt),A)}function nl(e,i,D,A){var U,$;if(i.touches)U=i.touches[0].clientX,$=i.touches[0].clientY;else try{U=i.clientX,$=i.clientY}catch(lt){return!1}if(U>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&Ee(i);var oe=e.display,he=oe.lineDiv.getBoundingClientRect();if($>he.bottom||!Le(e,D))return ke(i);$-=he.top-oe.viewOffset;for(var me=0;me=U){var We=Un(e.doc,$),Ye=e.display.gutterSpecs[me];return $e(e,D,e,We,Ye.className,i),ke(i)}}}function cs(e,i){return nl(e,i,"gutterClick",!0)}function il(e,i){if(mn(e.display,i)||$l(e,i))return;if(st(e,i,"contextmenu"))return;R||e.display.input.onContextMenu(i)}function $l(e,i){return Le(e,"gutterContextMenu")?nl(e,i,"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-"),Zr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Vo={};function Jl(e){var i=e.optionHandlers;function D(A,U,$,oe){e.defaults[A]=U,$&&(i[A]=oe?function(he,me,xe){xe!=oo&&$(he,me,xe)}:$)}e.defineOption=D,e.Init=oo,D("value","",function(A,U){return A.setValue(U)},!0),D("mode",null,function(A,U){A.doc.modeOption=U,Ra(A)},!0),D("indentUnit",2,Ra,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(A){go(A),Zr(A),Mn(A)},!0),D("lineSeparator",null,function(A,U){if(A.doc.lineSep=U,!U)return;var $=[],oe=A.doc.first;A.doc.iter(function(me){for(var xe=0;;){var We=me.text.indexOf(U,xe);if(We==-1)break;xe=We+U.length,$.push(Ut(oe,We))}oe++});for(var he=$.length-1;he>=0;he--)ro(A.doc,U,$[he],Ut($[he].line,$[he].ch+U.length))}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,U,$){A.state.specialChars=new RegExp(U.source+(U.test(" ")?"":"| "),"g"),$!=oo&&A.refresh()}),D("specialCharPlaceholder",pr,function(A){return A.refresh()},!0),D("electricChars",!0),D("inputStyle",s?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),D("spellcheck",!1,function(A,U){return A.getInputField().spellcheck=U},!0),D("autocorrect",!1,function(A,U){return A.getInputField().autocorrect=U},!0),D("autocapitalize",!1,function(A,U){return A.getInputField().autocapitalize=U},!0),D("rtlMoveVisually",!S),D("wholeLineUpdateBefore",!0),D("theme","default",function(A){al(A),ma(A)},!0),D("keyMap","default",function(A,U,$){var oe=Go(U),he=$!=oo&&Go($);he&&he.detach&&he.detach(A,oe),oe.attach&&oe.attach(A,he||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Zl,!0),D("gutters",[],function(A,U){A.display.gutterSpecs=Hi(U,A.options.lineNumbers),ma(A)},!0),D("fixedGutter",!0,function(A,U){A.display.gutters.style.left=U?fi(A.display)+"px":"0",A.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(A){return or(A)},!0),D("scrollbarStyle","native",function(A){pa(A),or(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),D("lineNumbers",!1,function(A,U){A.display.gutterSpecs=Hi(A.options.gutters,U),ma(A)},!0),D("firstLineNumber",1,ma,!0),D("lineNumberFormatter",function(A){return A},ma,!0),D("showCursorWhenSelecting",!1,An,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(A,U){U=="nocursor"&&(la(A),A.display.input.blur()),A.display.input.readOnlyChanged(U)}),D("screenReaderLabel",null,function(A,U){U=U===""?null:U,A.display.input.screenReaderLabelChanged(U)}),D("disableInput",!1,function(A,U){U||A.display.input.reset()},!0),D("dragDrop",!0,Ql),D("allowDropFileTypes",null),D("cursorBlinkRate",530),D("cursorScrollMargin",0),D("cursorHeight",1,An,!0),D("singleCursorHeightPerLine",!0,An,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,go,!0),D("addModeClass",!1,go,!0),D("pollInterval",100),D("undoDepth",200,function(A,U){return A.doc.history.undoDepth=U}),D("historyEventDelay",1250),D("viewportMargin",10,function(A){return A.refresh()},!0),D("maxHighlightLength",1e4,go,!0),D("moveInputWithCursor",!0,function(A,U){U||A.display.input.resetPosition()}),D("tabindex",null,function(A,U){return A.display.input.getField().tabIndex=U||""}),D("autofocus",null),D("direction","ltr",function(A,U){return A.doc.setDirection(U)},!0),D("phrases",null)}function Ql(e,i,D){var A=D&&D!=oo;if(!i!=!A){var U=e.display.dragFunctions,$=i?Ie:ct;$(e.display.scroller,"dragstart",U.start),$(e.display.scroller,"dragenter",U.enter),$(e.display.scroller,"dragover",U.over),$(e.display.scroller,"dragleave",U.leave),$(e.display.scroller,"drop",U.drop)}}function Zl(e){e.options.lineWrapping?(W(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(v(e.display.wrapper,"CodeMirror-wrap"),Ar(e)),Si(e),Mn(e),Zr(e),setTimeout(function(){return or(e)},100)}function Qn(e,i){var D=this;if(!(this instanceof Qn))return new Qn(e,i);this.options=i=i?P(i):{},P(ol,i,!1);var A=i.value;typeof A=="string"?A=new $i(A,i.mode,null,i.lineSeparator,i.direction):i.mode&&(A.modeOption=i.mode),this.doc=A;var U=new Qn.inputStyles[i.inputStyle](this),$=this.display=new Ga(e,A,U,i);$.wrapper.CodeMirror=this,al(this),i.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),pa(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new J,keySeq:null,specialChars:null},i.autofocus&&!s&&$.input.focus(),T&&b<11&&setTimeout(function(){return D.display.input.reset(!0)},20),ql(this),Il(),jn(this),this.curOp.forceUpdate=!0,vs(this,A),i.autofocus&&!s||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&sa(D)},20):la(this);for(var oe in Vo)Vo.hasOwnProperty(oe)&&Vo[oe](this,i[oe],oo);yi(this),i.finishInit&&i.finishInit(this);for(var he=0;he20*20}Ie(i.scroller,"touchstart",function(me){if(!st(e,me)&&!$(me)&&!cs(e,me)){i.input.ensurePolled(),clearTimeout(D);var xe=+new Date;i.activeTouch={start:xe,moved:!1,prev:xe-A.end<=300?A:null},me.touches.length==1&&(i.activeTouch.left=me.touches[0].pageX,i.activeTouch.top=me.touches[0].pageY)}}),Ie(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ie(i.scroller,"touchend",function(me){var xe=i.activeTouch;if(xe&&!mn(i,me)&&xe.left!=null&&!xe.moved&&new Date-xe.start<300){var We=e.coordsChar(i.activeTouch,"page"),Ye;!xe.prev||oe(xe,xe.prev)?Ye=new Rn(We,We):!xe.prev.prev||oe(xe,xe.prev.prev)?Ye=e.findWordAt(We):Ye=new Rn(Ut(We.line,0),K(e.doc,Ut(We.line+1,0))),e.setSelection(Ye.anchor,Ye.head),e.focus(),Ee(me)}U()}),Ie(i.scroller,"touchcancel",U),Ie(i.scroller,"scroll",function(){i.scroller.clientHeight&&(da(e,i.scroller.scrollTop),Yi(e,i.scroller.scrollLeft,!0),$e(e,"scroll",e))}),Ie(i.scroller,"mousewheel",function(me){return po(e,me)}),Ie(i.scroller,"DOMMouseScroll",function(me){return po(e,me)}),Ie(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(me){st(e,me)||Ne(me)},over:function(me){st(e,me)||(Rl(e,me),Ne(me))},start:function(me){return Al(e,me)},drop:si(e,Ol),leave:function(me){st(e,me)||Hs(e)}};var he=i.input.getField();Ie(he,"keyup",function(me){return Zs.call(e,me)}),Ie(he,"keydown",si(e,Qs)),Ie(he,"keypress",si(e,el)),Ie(he,"focus",function(me){return sa(e,me)}),Ie(he,"blur",function(me){return la(e,me)})}var ds=[];Qn.defineInitHook=function(e){return ds.push(e)};function Ro(e,i,D,A){var U=e.doc,$;D==null&&(D="add"),D=="smart"&&(U.mode.indent?$=Xt(e,i).state:D="prev");var oe=e.options.tabSize,he=lr(U,i),me=z(he.text,null,oe);he.stateAfter&&(he.stateAfter=null);var xe=he.text.match(/^\s*/)[0],We;if(!A&&!/\S/.test(he.text))We=0,D="not";else if(D=="smart"&&(We=U.mode.indent($,he.text.slice(xe.length),he.text),We==Se||We>150)){if(!A)return;D="prev"}D=="prev"?i>U.first?We=z(lr(U,i-1).text,null,oe):We=0:D=="add"?We=me+e.options.indentUnit:D=="subtract"?We=me-e.options.indentUnit:typeof D=="number"&&(We=me+D),We=Math.max(0,We);var Ye="",lt=0;if(e.options.indentWithTabs)for(var nt=Math.floor(We/oe);nt;--nt)lt+=oe,Ye+=" ";if(ltoe,me=dr(i),xe=null;if(he&&A.ranges.length>1)if(ya&&ya.text.join(` `)==i){if(A.ranges.length%ya.text.length==0){xe=[];for(var We=0;We=0;lt--){var nt=A.ranges[lt],At=nt.from(),Bt=nt.to();nt.empty()&&(D&&D>0?At=Ut(At.line,At.ch-D):e.state.overwrite&&!he?Bt=Ut(Bt.line,Math.min(lr($,Bt.line).text.length,Bt.ch+re(me).length)):he&&ya&&ya.lineWise&&ya.text.join(` `)==me.join(` `)&&(At=Bt=Ut(At.line,0)));var Jt={from:At,to:Bt,text:xe?xe[lt%xe.length]:me,origin:U||(he?"paste":e.state.cutIncoming>oe?"cut":"+input")};to(e.doc,Jt),Qt(e,"inputRead",e,Jt)}i&&!he&&ll(e,i),ba(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ye),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,i){var D=e.clipboardData&&e.clipboardData.getData("Text");if(D)return e.preventDefault(),!i.isReadOnly()&&!i.options.disableInput&&Bi(i,function(){return hs(i,D,0,null,"paste")}),!0}function ll(e,i){if(!e.options.electricChars||!e.options.smartIndent)return;for(var D=e.doc.sel,A=D.ranges.length-1;A>=0;A--){var U=D.ranges[A];if(U.head.ch>100||A&&D.ranges[A-1].head.line==U.head.line)continue;var $=e.getModeAt(U.head),oe=!1;if($.electricChars){for(var he=0;he<$.electricChars.length;he++)if(i.indexOf($.electricChars.charAt(he))>-1){oe=Ro(e,U.head.line,"smart");break}}else $.electricInput&&($.electricInput.test(lr(e.doc,U.head.line).text.slice(0,U.head.ch))&&(oe=Ro(e,U.head.line,"smart")));oe&&Qt(e,"electricInput",e,U.head.line)}}function ul(e){for(var i=[],D=[],A=0;A$&&(Ro(this,he.head.line,A,!0),$=he.head.line,oe==this.doc.sel.primIndex&&ba(this));else{var me=he.from(),xe=he.to(),We=Math.max($,me.line);$=Math.min(this.lastLine(),xe.line-(xe.ch?0:1))+1;for(var Ye=We;Ye<$;++Ye)Ro(this,Ye,A);var lt=this.doc.sel.ranges;me.ch==0&&U.length==lt.length&<[oe].from().ch>0&&is(this.doc,oe,new Rn(me,lt[oe].to()),Ae)}}}),getTokenAt:function(A,U){return _n(this,A,U)},getLineTokens:function(A,U){return _n(this,Ut(A),U,!0)},getTokenTypeAt:function(A){A=K(this.doc,A);var U=Ct(this,lr(this.doc,A.line)),$=0,oe=(U.length-1)/2,he=A.ch,me;if(he==0)me=U[2];else for(;;){var xe=$+oe>>1;if((xe?U[xe*2-1]:0)>=he)oe=xe;else if(U[xe*2+1]me&&(A=me,oe=!0),he=lr(this.doc,A)}else he=A;return yn(this,he,{top:0,left:0},U||"page",$||oe).top+(oe?this.doc.height-sr(he):0)},defaultTextHeight:function(){return Jn(this.display)},defaultCharWidth:function(){return ii(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,U,$,oe,he){var me=this.display;A=fn(this,K(this.doc,A));var xe=A.bottom,We=A.left;if(U.style.position="absolute",U.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(U),me.sizer.appendChild(U),oe=="over")xe=A.top;else if(oe=="above"||oe=="near"){var Ye=Math.max(me.wrapper.clientHeight,this.doc.height),lt=Math.max(me.sizer.clientWidth,me.lineSpace.clientWidth);(oe=="above"||A.bottom+U.offsetHeight>Ye)&&A.top>U.offsetHeight?xe=A.top-U.offsetHeight:A.bottom+U.offsetHeight<=Ye&&(xe=A.bottom),We+U.offsetWidth>lt&&(We=lt-U.offsetWidth)}U.style.top=xe+"px",U.style.left=U.style.right="",he=="right"?(We=me.sizer.clientWidth-U.offsetWidth,U.style.right="0px"):(he=="left"?We=0:he=="middle"&&(We=(me.sizer.clientWidth-U.offsetWidth)/2),U.style.left=We+"px"),$&&Pa(this,{left:We,top:xe,right:We+U.offsetWidth,bottom:xe+U.offsetHeight})},triggerOnKeyDown:Ri(Qs),triggerOnKeyPress:Ri(el),triggerOnKeyUp:Zs,triggerOnMouseDown:Ri(tl),execCommand:function(A){if(So.hasOwnProperty(A))return So[A].call(null,this)},triggerElectric:Ri(function(A){ll(this,A)}),findPosH:function(A,U,$,oe){var he=1;U<0&&(he=-1,U=-U);for(var me=K(this.doc,A),xe=0;xe0&&We($.charAt(oe-1));)--oe;for(;he<$.length&&We($.charAt(he));)++he}return new Rn(Ut(A.line,oe),Ut(A.line,he))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?W(this.display.cursorDiv,"CodeMirror-overwrite"):v(this.display.cursorDiv,"CodeMirror-overwrite"),$e(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==V()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ri(function(A,U){ca(this,A,U)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-Qe(this)-this.display.barHeight,width:A.scrollWidth-Qe(this)-this.display.barWidth,clientHeight:be(this),clientWidth:Fe(this)}},scrollIntoView:Ri(function(A,U){A==null?(A={from:this.doc.sel.primary().head,to:null},U==null&&(U=this.options.cursorScrollMargin)):typeof A=="number"?A={from:Ut(A,0),to:null}:A.from==null&&(A={from:A,to:null}),A.to||(A.to=A.from),A.margin=U||0,A.from.line!=null?co(this,A):Ca(this,A.from,A.to,A.margin)}),setSize:Ri(function(A,U){var $=this,oe=function(me){return typeof me=="number"||/^\d+$/.test(String(me))?me+"px":me};A!=null&&(this.display.wrapper.style.width=oe(A)),U!=null&&(this.display.wrapper.style.height=oe(U)),this.options.lineWrapping&&$r(this);var he=this.display.viewFrom;this.doc.iter(he,this.display.viewTo,function(me){if(me.widgets){for(var xe=0;xe.5||this.options.lineWrapping)&&Si(this),$e(this,"refresh",this)}),swapDoc:Ri(function(A){var U=this.doc;return U.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,A),Zr(this),this.display.input.reset(),ca(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Qt(this,"swapDoc",this,U),U}),phrase:function(A){var U=this.options.phrases;return U&&Object.prototype.hasOwnProperty.call(U,A)?U[A]:A},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(e),e.registerHelper=function(A,U,$){D.hasOwnProperty(A)||(D[A]=e[A]={_global:[]}),D[A][U]=$},e.registerGlobalHelper=function(A,U,$,oe){e.registerHelper(A,U,oe),D[A]._global.push({pred:$,val:oe})}}function fs(e,i,D,A,U){var $=i,oe=D,he=lr(e,i.line),me=U&&e.direction=="rtl"?-D:D;function xe(){var yr=i.line+me;return yr=e.first+e.size?!1:(i=new Ut(yr,i.ch,i.sticky),he=lr(e,yr))}function We(yr){var ir;if(A=="codepoint"){var Sr=he.text.charCodeAt(i.ch+(A>0?0:-1));isNaN(Sr)?ir=null:ir=new Ut(i.line,Math.max(0,Math.min(he.text.length,i.ch+D*(Sr>=55296&&Sr<56320?2:1))),-D)}else U?ir=Ml(e.cm,he,i,D):ir=os(he,i,D);if(ir==null)if(!yr&&xe())i=ss(U,e.cm,he,i.line,me);else return!1;else i=ir;return!0}if(A=="char"||A=="codepoint")We();else if(A=="column")We(!0);else if(A=="word"||A=="group")for(var Ye=null,lt=A=="group",nt=e.cm&&e.cm.getHelper(i,"wordChars"),At=!0;!(D<0&&!We(!At));At=!1){var Bt=he.text.charAt(i.ch)||` `,Jt=X(Bt,nt)?"w":lt&&Bt==` `?"n":!lt||/\s/.test(Bt)?null:"p";if(lt&&!At&&!Jt&&(Jt="s"),Ye&&Ye!=Jt){D<0&&(D=1,We(),i.sticky="after");break}if(Jt&&(Ye=Jt),D>0&&!We(!At))break}var nr=Ho(e,i,$,oe,!0);return hi($,nr)&&(nr.hitSide=!0),nr}function hl(e,i,D,A){var U=e.doc,$=i.left,oe;if(A=="page"){var he=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),me=Math.max(he-.5*Jn(e.display),3);oe=(D>0?i.bottom:i.top)+D*me}else A=="line"&&(oe=D>0?i.bottom+3:i.top-3);for(var xe;!(xe=sn(e,$,oe),!xe.outside);){if(D<0?oe<=0:oe>=U.height){xe.hitSide=!0;break}oe+=D*5}return xe}var Fn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new J,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fn.prototype.init=function(e){var i=this,D=this,A=D.cm,U=D.div=e.lineDiv;cl(U,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function $(he){for(var me=he.target;me;me=me.parentNode){if(me==U)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(me.className))break}return!1}Ie(U,"paste",function(he){if(!$(he)||st(A,he)||sl(he,A))return;b<=11&&setTimeout(si(A,function(){return i.updateFromDOM()}),20)}),Ie(U,"compositionstart",function(he){i.composing={data:he.data,done:!1}}),Ie(U,"compositionupdate",function(he){i.composing||(i.composing={data:he.data,done:!1})}),Ie(U,"compositionend",function(he){i.composing&&(he.data!=i.composing.data&&i.readFromDOMSoon(),i.composing.done=!0)}),Ie(U,"touchstart",function(){return D.forceCompositionEnd()}),Ie(U,"input",function(){i.composing||i.readFromDOMSoon()});function oe(he){if(!$(he)||st(A,he))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()}),he.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var me=ul(A);Xo({lineWise:!0,text:me.text}),he.type=="cut"&&A.operation(function(){A.setSelections(me.ranges,0,Ae),A.replaceSelection("",null,"cut")})}else return;if(he.clipboardData){he.clipboardData.clearData();var xe=ya.text.join(` `);if(he.clipboardData.setData("Text",xe),he.clipboardData.getData("Text")==xe){he.preventDefault();return}}var We=dl(),Ye=We.firstChild;A.display.lineSpace.insertBefore(We,A.display.lineSpace.firstChild),Ye.value=ya.text.join(` `);var lt=document.activeElement;G(Ye),setTimeout(function(){A.display.lineSpace.removeChild(We),lt.focus(),lt==U&&D.showPrimarySelection()},50)}Ie(U,"copy",oe),Ie(U,"cut",oe)},Fn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Fn.prototype.prepareSelection=function(){var e=Fi(this.cm,!1);return e.focus=document.activeElement==this.div,e},Fn.prototype.showSelection=function(e,i){if(!e||!this.cm.display.view.length)return;(e.focus||i)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Fn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fn.prototype.showPrimarySelection=function(){var e=this.getSelection(),i=this.cm,D=i.doc.sel.primary(),A=D.from(),U=D.to();if(i.display.viewTo==i.display.viewFrom||A.line>=i.display.viewTo||U.line=i.display.viewFrom&&fl(i,A)||{node:he[0].measure.map[2],offset:0},xe=U.linee.firstLine()&&(A=Ut(A.line-1,lr(e.doc,A.line-1).length)),U.ch==lr(e.doc,U.line).text.length&&U.linei.viewTo-1)return!1;var $,oe,he;A.line==i.viewFrom||($=Pn(e,A.line))==0?(oe=qr(i.view[0].line),he=i.view[0].node):(oe=qr(i.view[$].line),he=i.view[$-1].node.nextSibling);var me=Pn(e,U.line),xe,We;if(me==i.view.length-1?(xe=i.viewTo-1,We=i.lineDiv.lastChild):(xe=qr(i.view[me+1].line)-1,We=i.view[me+1].node.previousSibling),!he)return!1;for(var Ye=e.doc.splitLines(ru(e,he,We,oe,xe)),lt=Yn(e.doc,Ut(oe,0),Ut(xe,lr(e.doc,xe).text.length));Ye.length>1&<.length>1;)if(re(Ye)==re(lt))Ye.pop(),lt.pop(),xe--;else if(Ye[0]==lt[0])Ye.shift(),lt.shift(),oe++;else break;for(var nt=0,At=0,Bt=Ye[0],Jt=lt[0],nr=Math.min(Bt.length,Jt.length);ntA.ch&&yr.charCodeAt(yr.length-At-1)==ir.charCodeAt(ir.length-At-1);)nt--,At++;Ye[Ye.length-1]=yr.slice(0,yr.length-At).replace(/^\u200b+/,""),Ye[0]=Ye[0].slice(nt).replace(/\u200b+$/,"");var Qr=Ut(oe,nt),Wr=Ut(xe,lt.length?re(lt).length-At:0);if(Ye.length>1||Ye[0]||_r(Qr,Wr))return ro(e.doc,Ye,Qr,Wr,"+input"),!0},Fn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fn.prototype.reset=function(){this.forceCompositionEnd()},Fn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Fn.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)},Fn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Bi(this.cm,function(){return Mn(e.cm)})},Fn.prototype.setUneditable=function(e){e.contentEditable="false"},Fn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||si(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Fn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Fn.prototype.onContextMenu=function(){},Fn.prototype.resetPosition=function(){},Fn.prototype.needsContentAttribute=!0;function fl(e,i){var D=Xe(e,i.line);if(!D||D.hidden)return null;var A=lr(e.doc,i.line),U=we(D,A,i.line),$=ft(A,e.doc.direction),oe="left";if($){var he=ut($,i.ch);oe=he%2?"right":"left"}var me=kt(U.map,i.ch,oe);return me.offset=me.collapse=="right"?me.end:me.start,me}function tu(e){for(var i=e;i;i=i.parentNode)if(/CodeMirror-gutter-wrapper/.test(i.className))return!0;return!1}function so(e,i){return i&&(e.bad=!0),e}function ru(e,i,D,A,U){var $="",oe=!1,he=e.doc.lineSeparator(),me=!1;function xe(nt){return function(At){return At.id==nt}}function We(){oe&&($+=he,me&&($+=he),oe=me=!1)}function Ye(nt){nt&&(We(),$+=nt)}function lt(nt){if(nt.nodeType==1){var At=nt.getAttribute("cm-text");if(At){Ye(At);return}var Bt=nt.getAttribute("cm-marker"),Jt;if(Bt){var nr=e.findMarks(Ut(A,0),Ut(U+1,0),xe(+Bt));nr.length&&(Jt=nr[0].find(0))&&Ye(Yn(e.doc,Jt.from,Jt.to).join(he));return}if(nt.getAttribute("contenteditable")=="false")return;var yr=/^(pre|div|p|li|table|br)$/i.test(nt.nodeName);if(!/^br$/i.test(nt.nodeName)&&nt.textContent.length==0)return;yr&&We();for(var ir=0;ir=9&&i.hasSelection&&(i.hasSelection=null),D.poll()}),Ie(U,"paste",function(oe){if(st(A,oe)||sl(oe,A))return;A.state.pasteIncoming=+new Date,D.fastPoll()});function $(oe){if(st(A,oe))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var he=ul(A);Xo({lineWise:!0,text:he.text}),oe.type=="cut"?A.setSelections(he.ranges,null,Ae):(D.prevInput="",U.value=he.text.join(` `),G(U))}else return;oe.type=="cut"&&(A.state.cutIncoming=+new Date)}Ie(U,"cut",$),Ie(U,"copy",$),Ie(e.scroller,"paste",function(oe){if(mn(e,oe)||st(A,oe))return;if(!U.dispatchEvent){A.state.pasteIncoming=+new Date,D.focus();return}var he=new Event("paste");he.clipboardData=oe.clipboardData,U.dispatchEvent(he)}),Ie(e.lineSpace,"selectstart",function(oe){mn(e,oe)||Ee(oe)}),Ie(U,"compositionstart",function(){var oe=A.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:oe,range:A.markText(oe,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(U,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},ui.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},ui.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ui.prototype.prepareSelection=function(){var e=this.cm,i=e.display,D=e.doc,A=Fi(e);if(e.options.moveInputWithCursor){var U=fn(e,D.sel.primary().head,"div"),$=i.wrapper.getBoundingClientRect(),oe=i.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(i.wrapper.clientHeight-10,U.top+oe.top-$.top)),A.teLeft=Math.max(0,Math.min(i.wrapper.clientWidth-10,U.left+oe.left-$.left))}return A},ui.prototype.showSelection=function(e){var i=this.cm,D=i.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")},ui.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var i=this.cm;if(i.somethingSelected()){this.prevInput="";var D=i.getSelection();this.textarea.value=D,i.state.focused&&G(this.textarea),T&&b>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",T&&b>=9&&(this.hasSelection=null))},ui.prototype.getField=function(){return this.textarea},ui.prototype.supportsTouch=function(){return!1},ui.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!s||V()!=this.textarea))try{this.textarea.focus()}catch(e){}},ui.prototype.blur=function(){this.textarea.blur()},ui.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ui.prototype.receivedFocus=function(){this.slowPoll()},ui.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()})},ui.prototype.fastPoll=function(){var e=!1,i=this;i.pollingFast=!0;function D(){var A=i.poll();!A&&!e?(e=!0,i.polling.set(60,D)):(i.pollingFast=!1,i.slowPoll())}i.polling.set(20,D)},ui.prototype.poll=function(){var e=this,i=this.cm,D=this.textarea,A=this.prevInput;if(this.contextMenuPending||!i.state.focused||St(D)&&!A&&!this.composing||i.isReadOnly()||i.options.disableInput||i.state.keySeq)return!1;var U=D.value;if(U==A&&!i.somethingSelected())return!1;if(T&&b>=9&&this.hasSelection===U||l&&/[\uf700-\uf7ff]/.test(U))return i.display.input.reset(),!1;if(i.doc.sel==i.display.selForContextMenu){var $=U.charCodeAt(0);if($==8203&&!A&&(A="\u200B"),$==8666)return this.reset(),this.cm.execCommand("undo")}for(var oe=0,he=Math.min(A.length,U.length);oe1e3||U.indexOf(` `)>-1?D.value=e.prevInput="":e.prevInput=U,e.composing&&(e.composing.range.clear(),e.composing.range=i.markText(e.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ui.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ui.prototype.onKeyPress=function(){T&&b>=9&&(this.hasSelection=null),this.fastPoll()},ui.prototype.onContextMenu=function(e){var i=this,D=i.cm,A=D.display,U=i.textarea;i.contextMenuPending&&i.contextMenuPending();var $=ai(D,e),oe=A.scroller.scrollTop;if(!$||c)return;var he=D.options.resetSelectionOnContextMenu;he&&D.doc.sel.contains($)==-1&&si(D,Pi)(D.doc,ga($),Ae);var me=U.style.cssText,xe=i.wrapper.style.cssText,We=i.wrapper.offsetParent.getBoundingClientRect();i.wrapper.style.cssText="position: static",U.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: `+(T?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ye;p&&(Ye=window.scrollY),A.input.focus(),p&&window.scrollTo(null,Ye),A.input.reset(),D.somethingSelected()||(U.value=i.prevInput=" "),i.contextMenuPending=nt,A.selForContextMenu=D.doc.sel,clearTimeout(A.detectingSelectAll);function lt(){if(U.selectionStart!=null){var Bt=D.somethingSelected(),Jt="\u200B"+(Bt?U.value:"");U.value="\u21DA",U.value=Jt,i.prevInput=Bt?"":"\u200B",U.selectionStart=1,U.selectionEnd=Jt.length,A.selForContextMenu=D.doc.sel}}function nt(){if(i.contextMenuPending!=nt)return;if(i.contextMenuPending=!1,i.wrapper.style.cssText=xe,U.style.cssText=me,T&&b<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=oe),U.selectionStart!=null){(!T||T&&b<9)&<();var Bt=0,Jt=function(){A.selForContextMenu==D.doc.sel&&U.selectionStart==0&&U.selectionEnd>0&&i.prevInput=="\u200B"?si(D,Is)(D):Bt++<10?A.detectingSelectAll=setTimeout(Jt,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Jt,200)}}if(T&&b>=9&<(),R){Ne(e);var At=function(){ct(window,"mouseup",At),setTimeout(nt,20)};Ie(window,"mouseup",At)}else setTimeout(nt,50)},ui.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ui.prototype.setUneditable=function(){},ui.prototype.needsContentAttribute=!1;function iu(e,i){if(i=i?P(i):{},i.value=e.value,!i.tabindex&&e.tabIndex&&(i.tabindex=e.tabIndex),!i.placeholder&&e.placeholder&&(i.placeholder=e.placeholder),i.autofocus==null){var D=V();i.autofocus=D==e||e.getAttribute("autofocus")!=null&&D==document.body}function A(){e.value=he.getValue()}var U;if(e.form&&(Ie(e.form,"submit",A),!i.leaveSubmitMethodAlone)){var $=e.form;U=$.submit;try{var oe=$.submit=function(){A(),$.submit=U,$.submit(),$.submit=oe}}catch(me){}}i.finishInit=function(me){me.save=A,me.getTextArea=function(){return e},me.toTextArea=function(){me.toTextArea=isNaN,A(),e.parentNode.removeChild(me.getWrapperElement()),e.style.display="",e.form&&(ct(e.form,"submit",A),!i.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=U))}},e.style.display="none";var he=Qn(function(me){return e.parentNode.insertBefore(me,e.nextSibling)},i);return he}function au(e){e.off=ct,e.on=Ie,e.wheelEventPixels=fo,e.Doc=$i,e.splitLines=dr,e.countColumn=z,e.findColumn=ye,e.isWordChar=Z,e.Pass=Se,e.signal=$e,e.Line=Nr,e.changeEnd=va,e.scrollbarModel=hr,e.Pos=Ut,e.cmpPos=_r,e.modes=vn,e.mimeModes=Or,e.resolveMode=Tt,e.getMode=gr,e.modeExtensions=Br,e.extendMode=zr,e.copyState=an,e.startState=Ei,e.innerMode=gi,e.commands=So,e.keyMap=Ia,e.keyName=Vs,e.isModifierKey=Gs,e.lookupKey=io,e.normalizeKeyMap=Pl,e.StringStream=bn,e.SharedTextMarker=xo,e.TextMarker=ja,e.LineWidget=Eo,e.e_preventDefault=Ee,e.e_stopPropagation=Ce,e.e_stop=Ne,e.addClass=W,e.contains=L,e.rmClass=v,e.keyNames=Fa}Jl(Qn),eu(Qn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var $o in $i.prototype)$i.prototype.hasOwnProperty($o)&&ue(ou,$o)<0&&(Qn.prototype[$o]=function(e){return function(){return e.apply(this.doc,arguments)}}($i.prototype[$o]));return Me($i),Qn.inputStyles={textarea:ui,contenteditable:Fn},Qn.defineMode=function(e){!Qn.defaults.mode&&e!="null"&&(Qn.defaults.mode=e),dn.apply(this,arguments)},Qn.defineMIME=hn,Qn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Qn.defineMIME("text/plain","null"),Qn.defineExtension=function(e,i){Qn.prototype[e]=i},Qn.defineDocExtension=function(e,i){$i.prototype[e]=i},Qn.fromTextArea=iu,au(Qn),Qn.version="5.58.2",Qn})},WYAk:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){(function(){var g=N,O=g.lib,M=O.Base,m=g.enc,y=m.Utf8,T=g.algo,b=T.HMAC=M.extend({init:function(p,d){p=this._hasher=new p.init,typeof d=="string"&&(d=y.parse(d));var n=p.blockSize,c=n*4;d.sigBytes>c&&(d=p.finalize(d)),d.clamp();for(var r=this._oKey=d.clone(),a=this._iKey=d.clone(),o=r.words,u=a.words,h=0;h1&&arguments[1]!==void 0?arguments[1]:!1,Oe=Ae.getAttribute("id")||Ae.getAttribute("data-reactid")||Ae.getAttribute("name");if(pe&&V[Oe])return V[Oe];var ye=window.getComputedStyle(Ae),ce=ye.getPropertyValue("box-sizing")||ye.getPropertyValue("-moz-box-sizing")||ye.getPropertyValue("-webkit-box-sizing"),ae=parseFloat(ye.getPropertyValue("padding-bottom"))+parseFloat(ye.getPropertyValue("padding-top")),re=parseFloat(ye.getPropertyValue("border-bottom-width"))+parseFloat(ye.getPropertyValue("border-top-width")),fe=L.map(function(ne){return"".concat(ne,":").concat(ye.getPropertyValue(ne))}).join(";"),te={sizingStyle:fe,paddingSize:ae,borderSize:re,boxSizing:ce};return pe&&Oe&&(V[Oe]=te),te}function G(Ae){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;W||(W=document.createElement("textarea"),W.setAttribute("tab-index","-1"),W.setAttribute("aria-hidden","true"),document.body.appendChild(W)),Ae.getAttribute("wrap")?W.setAttribute("wrap",Ae.getAttribute("wrap")):W.removeAttribute("wrap");var ce=H(Ae,pe),ae=ce.paddingSize,re=ce.borderSize,fe=ce.boxSizing,te=ce.sizingStyle;W.setAttribute("style","".concat(te,";").concat(I)),W.value=Ae.value||Ae.placeholder||"";var ne=Number.MIN_SAFE_INTEGER,Te=Number.MAX_SAFE_INTEGER,ie=W.scrollHeight,Z;if(fe==="border-box"?ie+=re:fe==="content-box"&&(ie-=ae),Oe!==null||ye!==null){W.value=" ";var X=W.scrollHeight-ae;Oe!==null&&(ne=X*Oe,fe==="border-box"&&(ne=ne+ae+re),ie=Math.max(ne,ie)),ye!==null&&(Te=X*ye,fe==="border-box"&&(Te=Te+ae+re),Z=ie>Te?"":"hidden",ie=Math.min(Te,ie))}return{height:ie,minHeight:ne,maxHeight:Te,overflowY:Z,resize:"none"}}var B=j("Gytx"),P=j.n(B),z;(function(Ae){Ae[Ae.NONE=0]="NONE",Ae[Ae.RESIZING=1]="RESIZING",Ae[Ae.RESIZED=2]="RESIZED"})(z||(z={}));var J=function(Ae){Object(M.a)(Oe,Ae);var pe=Object(m.a)(Oe);function Oe(ye){var ce;return Object(g.a)(this,Oe),ce=pe.call(this,ye),ce.nextFrameActionId=void 0,ce.resizeFrameId=void 0,ce.textArea=void 0,ce.saveTextArea=function(ae){ce.textArea=ae},ce.handleResize=function(ae){var re=ce.state.resizeStatus,fe=ce.props,te=fe.autoSize,ne=fe.onResize;if(re!==z.NONE)return;typeof ne=="function"&&ne(ae),te&&ce.resizeOnNextFrame()},ce.resizeOnNextFrame=function(){cancelAnimationFrame(ce.nextFrameActionId),ce.nextFrameActionId=requestAnimationFrame(ce.resizeTextarea)},ce.resizeTextarea=function(){var ae=ce.props.autoSize;if(!ae||!ce.textArea)return;var re=ae.minRows,fe=ae.maxRows,te=G(ce.textArea,!1,re,fe);ce.setState({textareaStyles:te,resizeStatus:z.RESIZING},function(){cancelAnimationFrame(ce.resizeFrameId),ce.resizeFrameId=requestAnimationFrame(function(){ce.setState({resizeStatus:z.RESIZED},function(){ce.resizeFrameId=requestAnimationFrame(function(){ce.setState({resizeStatus:z.NONE}),ce.fixFirefoxAutoScroll()})})})})},ce.renderTextArea=function(){var ae=ce.props,re=ae.prefixCls,fe=re===void 0?"rc-textarea":re,te=ae.autoSize,ne=ae.onResize,Te=ae.className,ie=ae.disabled,Z=ce.state,X=Z.textareaStyles,Q=Z.resizeStatus,_e=Object(E.a)(ce.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ve=k()(fe,Te,Object(b.a)({},"".concat(fe,"-disabled"),ie));"value"in _e&&(_e.value=_e.value||"");var Re=Object(T.a)(Object(T.a)(Object(T.a)({},ce.props.style),X),Q===z.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return y.createElement(_,{onResize:ce.handleResize,disabled:!(te||ne)},y.createElement("textarea",Object(N.a)({},_e,{className:ve,style:Re,ref:ce.saveTextArea})))},ce.state={textareaStyles:{},resizeStatus:z.NONE},ce}return Object(O.a)(Oe,[{key:"componentDidUpdate",value:function(ce){(ce.value!==this.props.value||!P()(ce.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 ce=this.textArea.selectionStart,ae=this.textArea.selectionEnd;this.textArea.setSelectionRange(ce,ae)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Oe}(y.Component),ue=J,de=function(Ae){Object(M.a)(Oe,Ae);var pe=Object(m.a)(Oe);function Oe(ye){var ce;Object(g.a)(this,Oe),ce=pe.call(this,ye),ce.resizableTextArea=void 0,ce.focus=function(){ce.resizableTextArea.textArea.focus()},ce.saveTextArea=function(re){ce.resizableTextArea=re},ce.handleChange=function(re){var fe=ce.props.onChange;ce.setValue(re.target.value,function(){ce.resizableTextArea.resizeTextarea()}),fe&&fe(re)},ce.handleKeyDown=function(re){var fe=ce.props,te=fe.onPressEnter,ne=fe.onKeyDown;re.keyCode===13&&te&&te(re),ne&&ne(re)};var ae=typeof ye.value=="undefined"||ye.value===null?ye.defaultValue:ye.value;return ce.state={value:ae},ce}return Object(O.a)(Oe,[{key:"setValue",value:function(ce,ae){"value"in this.props||this.setState({value:ce},ae)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return y.createElement(ue,Object(N.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ce){return"value"in ce?{value:ce.value}:null}}]),Oe}(y.Component),Se=q.default=de},ZW9T:function(F,q,j){"use strict";j.d(q,"a",function(){return G});var N=j("k1fw"),g=j("miYZ"),O=j("tsqr"),M=j("rAM+"),m=j("tJVT"),y=j("PpiC"),T=j("q1tI"),b=j.n(T),p=j("bdgK"),d=j("oBTY"),n=j("9og8"),c=j("WmNS"),r=j.n(c),a={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"]},u={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(` `)}]},h={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(` `)}]},s=j("5VLF"),l=j.n(s),t={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"]}},S=function(P,z){return z.map(function(J){return{label:J,kind:P.languages.CompletionItemKind.Keyword,insertText:J}})},x=function(P){return Object.keys(t.tables).map(function(z){return{label:z,kind:P.languages.CompletionItemKind.Variable,insertText:z}})},f=function(P,z){var J=t.tables[P];return J?J.map(function(ue){return{label:ue,kind:z.languages.CompletionItemKind.Field,insertText:ue}}):[]};function R(B,P,z,J,ue){var de=P.getWordUntilPosition(z),Se={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:de.startColumn,endColumn:de.endColumn},Ae=J.map(function(pe){return{label:pe,kind:B.languages.CompletionItemKind.Keyword,insertText:pe,insertTextRules:B.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}});return ue.map(function(pe){Ae.push(Object(N.a)(Object(N.a)({},pe),{},{range:Se}))}),Ae}var C=function(B){t.languages.map(function(ue){return B.languages.registerDocumentFormattingEditProvider(ue,{provideDocumentFormattingEdits:function(Se,Ae,pe){return Object(n.a)(r.a.mark(function Oe(){var ye;return r.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return ye=l()(Se.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}),ae.abrupt("return",[{range:Se.getFullModelRange(),text:ye}]);case 2:case"end":return ae.stop()}},Oe)}))()}}),ue});var P=u.quickKey.map(function(ue){return{label:ue.label,kind:B.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:B.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),z=h.quickKey.map(function(ue){return{label:ue.label,kind:B.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:B.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),J=o.quickKey.map(function(ue){return{label:ue.label,kind:B.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:B.languages.CompletionItemInsertTextRule.InsertAsSnippet}});B.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(d.a)(u.keywords),Object(d.a)(u.quickKey.map(function(ue){return ue.label}))),provideCompletionItems:function(de,Se){var Ae=de.getValueInRange({startLineNumber:Se.lineNumber,startColumn:1,endLineNumber:Se.lineNumber,endColumn:Se.column}),pe=Ae.match(/cu/gim);console.log("match:",pe,Se,Ae,de);var Oe=[],ye=Se.lineNumber,ce=Se.column,ae=de.getValueInRange({startLineNumber:ye,startColumn:0,endLineNumber:ye,endColumn:ce}),re=ae.trim().split(/\s+/),fe=re[re.length-1];if(fe.endsWith(".")){var te=fe.slice(0,fe.length-1);Object.keys(t.tables).includes(te)&&(Oe=Object(d.a)(f(te,B)))}else fe==="."?Oe=[]:Oe=[].concat(Object(d.a)(x(B)),Object(d.a)(S(B,u.keywords)),Object(d.a)(P));return{suggestions:Oe}}}),B.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(d.a)(a.keywords)),provideCompletionItems:function(de,Se){var Ae=de.getValueInRange({startLineNumber:Se.lineNumber,startColumn:1,endLineNumber:Se.lineNumber,endColumn:Se.column}),pe=Ae.match(/cu/gim);console.log("match:",pe,Se,Ae,de);var Oe=[],ye=Se.lineNumber,ce=Se.column,ae=de.getValueInRange({startLineNumber:ye,startColumn:0,endLineNumber:ye,endColumn:ce}),re=ae.trim().split(/\s+/),fe=re[re.length-1];if(fe.endsWith(".")){var te=fe.slice(0,fe.length-1);Object.keys(t.tables).includes(te)&&(Oe=Object(d.a)(f(te,B)))}else fe==="."?Oe=[]:Oe=[].concat(Object(d.a)(x(B)),Object(d.a)(S(B,a.keywords)));return{suggestions:Oe}}}),B.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(d.a)(o.keywords)),provideCompletionItems:function(de,Se){var Ae=[],pe=Se.lineNumber,Oe=Se.column,ye=de.getValueInRange({startLineNumber:pe,startColumn:0,endLineNumber:pe,endColumn:Oe}),ce=ye.trim().split(/\s+/),ae=ce[ce.length-1];if(ae.endsWith(".")){var re=ae.slice(0,ae.length-1);Object.keys(t.tables).includes(re)&&(Ae=Object(d.a)(f(re,B)))}else ae==="."?Ae=[]:Ae=[].concat(Object(d.a)(x(B)),Object(d.a)(S(B,o.keywords)),Object(d.a)(J));return{suggestions:Ae}}}),B.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(d.a)(h.keywords)),provideCompletionItems:function(de,Se){var Ae=[],pe=Se.lineNumber,Oe=Se.column,ye=de.getValueInRange({startLineNumber:pe,startColumn:0,endLineNumber:pe,endColumn:Oe}),ce=ye.trim().split(/\s+/),ae=ce[ce.length-1];if(ae.endsWith(".")){var re=ae.slice(0,ae.length-1);Object.keys(t.tables).includes(re)&&(Ae=Object(d.a)(f(re,B)))}else ae==="."?Ae=[]:Ae=[].concat(Object(d.a)(x(B)),Object(d.a)(S(B,h.keywords)),Object(d.a)(z));return{suggestions:Ae}}})},v="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",_=j("LvDl"),E=j("+ua5");function w(B){return/^\d+$/.test(B)?"".concat(B,"px"):B}function k(){}var I=!1,L={"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 B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=B;if(Array.isArray(B)){for(var z=0;z0||an.target.offsetWidth>0)&&$e.current.instance.layout()}}catch(gi){Br.e(gi)}finally{Br.f()}}),Tt.observe(ct.current)),Tt}function He(){O.b.warn(decodeURIComponent(v))}var tt=function(){var gr=$e.current.instance;if(de!=null&&gr&&Ce){var Br=gr.getModel();Br&&de!==Br.getValue()&&(I=!0,Br.setValue(de),gr.layout(),I=!1)}};Object(T.useEffect)(function(){st.current&&clearTimeout(st.current),st.current=setTimeout(function(){tt()},500)},[de,Ce,$e.current]),Object(T.useEffect)(function(){if(ft&&$e.current&&$e.current.instance){var Tt=$e.current.instance;Tt.changeViewZones(function(Br){var zr=document.createElement("div");zr.style.padding="10px 20px",zr.style.width="calc(100% - 20px)",zr.className="my-error-line-wrp",zr.innerHTML=Ie,Br.addZone({afterLineNumber:ft||11,heightInLines:3,domNode:zr})});var gr={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}};Tt.addOverlayWidget(gr),Tt.revealPositionInCenter({lineNumber:20,column:1})}},[ft,$e.current,Ce]);function vt(){var Tt=$e.current.instance;if(Tt){var gr=Tt.getSelection(),Br=$e.current.pastePos||{},zr=new W.Range(Br.startLineNumber||gr.endLineNumber,Br.startColumn||gr.endColumn,Br.endLineNumber||gr.endLineNumber,Br.endColumn||gr.endColumn);setTimeout(function(){Tt.executeEdits("",[{range:zr,text:""}])},300)}}function yt(Tt){(window.navigator.platform.match("Mac")?Tt.metaKey:Tt.ctrlKey)&&Tt.keyCode==83&&(Tt.preventDefault(),Te())}var Wt=function(){if(Z&&$e.current.instance){var gr=$e.current.instance.getContentHeight();dn(gr0||Re.target.offsetWidth>0)&&Z.layout()}}catch(Je){_e.e(Je)}finally{_e.f()}}),X.observe(ye.current)),X}Object(T.useEffect)(function(){ye.current&&j.e(27).then(j.t.bind(null,"M/lh",7)).then(function(Z){W=Z;var X=W.editor.createDiffEditor(ye.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},Oe),{},{wordWrap:!0}));fe(X);var Q=te(X);return function(){X.dispose();var _e=X.getModel();_e&&_e.dispose(),Q.unobserve(ye.current)}})},[]),Object(T.useEffect)(function(){re&&re.setModel({original:W.editor.createModel(de,Ae),modified:W.editor.createModel(Se,Ae)})},[de,Se,Ae,re]);var ne=w(z),Te=w(ue),ie={width:ne,height:Te};return b.a.createElement("div",{className:"my-diff-editor",ref:ye,style:ie})}},ZpRC:function(F,q,j){"use strict";function N(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function g(n,c){return(!c||n!=="hidden")&&n!=="visible"&&n!=="clip"}function O(n,c){if(n.clientHeightc||u>n&&h=c&&s>=r?u-n-a:h>c&&sr?h-c+o:0}var m=function(n,c){var r=window,a=c.scrollMode,o=c.block,u=c.inline,h=c.boundary,s=c.skipOverflowHiddenElements,l=typeof h=="function"?h:function(X){return X!==h};if(!N(n))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,S=[],x=n;N(x)&&l(x);){if((x=x.parentElement)===t){S.push(x);break}x!=null&&x===document.body&&O(x)&&!O(document.documentElement)||x!=null&&O(x,s)&&S.push(x)}for(var f=r.visualViewport?r.visualViewport.width:innerWidth,R=r.visualViewport?r.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,_=n.getBoundingClientRect(),E=_.height,w=_.width,k=_.top,I=_.right,L=_.bottom,V=_.left,W=o==="start"||o==="nearest"?k:o==="end"?L:k+E/2,H=u==="center"?V+w/2:u==="end"?I:V,G=[],B=0;B=0&&V>=0&&L<=R&&I<=f&&k>=de&&L<=Ae&&V>=pe&&I<=Se)return G;var Oe=getComputedStyle(P),ye=parseInt(Oe.borderLeftWidth,10),ce=parseInt(Oe.borderTopWidth,10),ae=parseInt(Oe.borderRightWidth,10),re=parseInt(Oe.borderBottomWidth,10),fe=0,te=0,ne="offsetWidth"in P?P.offsetWidth-P.clientWidth-ye-ae:0,Te="offsetHeight"in P?P.offsetHeight-P.clientHeight-ce-re:0;if(t===P)fe=o==="start"?W:o==="end"?W-R:o==="nearest"?M(v,v+R,R,ce,re,v+W,v+W+E,E):W-R/2,te=u==="start"?H:u==="center"?H-f/2:u==="end"?H-f:M(C,C+f,f,ye,ae,C+H,C+H+w,w),fe=Math.max(0,fe+v),te=Math.max(0,te+C);else{fe=o==="start"?W-de-ce:o==="end"?W-Ae+re+Te:o==="nearest"?M(de,Ae,J,ce,re+Te,W,W+E,E):W-(de+J/2)+Te/2,te=u==="start"?H-pe-ye:u==="center"?H-(pe+ue/2)+ne/2:u==="end"?H-Se+ae+ne:M(pe,Se,ue,ye,ae+ne,H,H+w,w);var ie=P.scrollLeft,Z=P.scrollTop;W+=Z-(fe=Math.max(0,Math.min(Z+fe,P.scrollHeight-J+Te))),H+=ie-(te=Math.max(0,Math.min(ie+te,P.scrollWidth-ue+ne)))}G.push({el:P,top:fe,left:te})}return G};function y(n){return n===Object(n)&&Object.keys(n).length!==0}function T(n,c){c===void 0&&(c="auto");var r="scrollBehavior"in document.body.style;n.forEach(function(a){var o=a.el,u=a.top,h=a.left;o.scroll&&r?o.scroll({top:u,left:h,behavior:c}):(o.scrollTop=u,o.scrollLeft=h)})}function b(n){return n===!1?{block:"end",inline:"nearest"}:y(n)?n:{block:"start",inline:"nearest"}}function p(n,c){var r=!n.ownerDocument.documentElement.contains(n);if(y(c)&&typeof c.behavior=="function")return c.behavior(r?[]:m(n,c));if(r)return;var a=b(c);return T(m(n,a),a.behavior)}var d=q.a=p},Zss7:function(F,q,j){var N;(function(g){var O=/^\s+/,M=/\s+$/,m=0,y=g.round,T=g.min,b=g.max,p=g.random;function d(re,fe){if(re=re||"",fe=fe||{},re instanceof d)return re;if(!(this instanceof d))return new d(re,fe);var te=n(re);this._originalInput=re,this._r=te.r,this._g=te.g,this._b=te.b,this._a=te.a,this._roundA=y(100*this._a)/100,this._format=fe.format||te.format,this._gradientType=fe.gradientType,this._r<1&&(this._r=y(this._r)),this._g<1&&(this._g=y(this._g)),this._b<1&&(this._b=y(this._b)),this._ok=te.ok,this._tc_id=m++}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 re=this.toRgb();return(re.r*299+re.g*587+re.b*114)/1e3},getLuminance:function(){var re=this.toRgb(),fe,te,ne,Te,ie,Z;return fe=re.r/255,te=re.g/255,ne=re.b/255,fe<=.03928?Te=fe/12.92:Te=g.pow((fe+.055)/1.055,2.4),te<=.03928?ie=te/12.92:ie=g.pow((te+.055)/1.055,2.4),ne<=.03928?Z=ne/12.92:Z=g.pow((ne+.055)/1.055,2.4),.2126*Te+.7152*ie+.0722*Z},setAlpha:function(re){return this._a=G(re),this._roundA=y(100*this._a)/100,this},toHsv:function(){var re=o(this._r,this._g,this._b);return{h:re.h*360,s:re.s,v:re.v,a:this._a}},toHsvString:function(){var re=o(this._r,this._g,this._b),fe=y(re.h*360),te=y(re.s*100),ne=y(re.v*100);return this._a==1?"hsv("+fe+", "+te+"%, "+ne+"%)":"hsva("+fe+", "+te+"%, "+ne+"%, "+this._roundA+")"},toHsl:function(){var re=r(this._r,this._g,this._b);return{h:re.h*360,s:re.s,l:re.l,a:this._a}},toHslString:function(){var re=r(this._r,this._g,this._b),fe=y(re.h*360),te=y(re.s*100),ne=y(re.l*100);return this._a==1?"hsl("+fe+", "+te+"%, "+ne+"%)":"hsla("+fe+", "+te+"%, "+ne+"%, "+this._roundA+")"},toHex:function(re){return h(this._r,this._g,this._b,re)},toHexString:function(re){return"#"+this.toHex(re)},toHex8:function(re){return s(this._r,this._g,this._b,this._a,re)},toHex8String:function(re){return"#"+this.toHex8(re)},toRgb:function(){return{r:y(this._r),g:y(this._g),b:y(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+y(this._r)+", "+y(this._g)+", "+y(this._b)+")":"rgba("+y(this._r)+", "+y(this._g)+", "+y(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:y(B(this._r,255)*100)+"%",g:y(B(this._g,255)*100)+"%",b:y(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+y(B(this._r,255)*100)+"%, "+y(B(this._g,255)*100)+"%, "+y(B(this._b,255)*100)+"%)":"rgba("+y(B(this._r,255)*100)+"%, "+y(B(this._g,255)*100)+"%, "+y(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:W[h(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var fe="#"+l(this._r,this._g,this._b,this._a),te=fe,ne=this._gradientType?"GradientType = 1, ":"";if(re){var Te=d(re);te="#"+l(Te._r,Te._g,Te._b,Te._a)}return"progid:DXImageTransform.Microsoft.gradient("+ne+"startColorstr="+fe+",endColorstr="+te+")"},toString:function(re){var fe=!!re;re=re||this._format;var te=!1,ne=this._a<1&&this._a>=0,Te=!fe&&ne&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return Te?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(te=this.toRgbString()),re==="prgb"&&(te=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(te=this.toHexString()),re==="hex3"&&(te=this.toHexString(!0)),re==="hex4"&&(te=this.toHex8String(!0)),re==="hex8"&&(te=this.toHex8String()),re==="name"&&(te=this.toName()),re==="hsl"&&(te=this.toHslString()),re==="hsv"&&(te=this.toHsvString()),te||this.toHexString())},clone:function(){return d(this.toString())},_applyModification:function(re,fe){var te=re.apply(null,[this].concat([].slice.call(fe)));return this._r=te._r,this._g=te._g,this._b=te._b,this.setAlpha(te._a),this},lighten:function(){return this._applyModification(f,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(S,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(re,fe){return re.apply(null,[this].concat([].slice.call(fe)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(L,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},d.fromRatio=function(re,fe){if(typeof re=="object"){var te={};for(var ne in re)re.hasOwnProperty(ne)&&(ne==="a"?te[ne]=re[ne]:te[ne]=Se(re[ne]));re=te}return d(re,fe)};function n(re){var fe={r:0,g:0,b:0},te=1,ne=null,Te=null,ie=null,Z=!1,X=!1;return typeof re=="string"&&(re=ce(re)),typeof re=="object"&&(ye(re.r)&&ye(re.g)&&ye(re.b)?(fe=c(re.r,re.g,re.b),Z=!0,X=String(re.r).substr(-1)==="%"?"prgb":"rgb"):ye(re.h)&&ye(re.s)&&ye(re.v)?(ne=Se(re.s),Te=Se(re.v),fe=u(re.h,ne,Te),Z=!0,X="hsv"):ye(re.h)&&ye(re.s)&&ye(re.l)&&(ne=Se(re.s),ie=Se(re.l),fe=a(re.h,ne,ie),Z=!0,X="hsl"),re.hasOwnProperty("a")&&(te=re.a)),te=G(te),{ok:Z,format:re.format||X,r:T(255,b(fe.r,0)),g:T(255,b(fe.g,0)),b:T(255,b(fe.b,0)),a:te}}function c(re,fe,te){return{r:B(re,255)*255,g:B(fe,255)*255,b:B(te,255)*255}}function r(re,fe,te){re=B(re,255),fe=B(fe,255),te=B(te,255);var ne=b(re,fe,te),Te=T(re,fe,te),ie,Z,X=(ne+Te)/2;if(ne==Te)ie=Z=0;else{var Q=ne-Te;Z=X>.5?Q/(2-ne-Te):Q/(ne+Te);switch(ne){case re:ie=(fe-te)/Q+(fe1&&(Re-=1),Re<1/6?_e+(ve-_e)*6*Re:Re<1/2?ve:Re<2/3?_e+(ve-_e)*(2/3-Re)*6:_e}if(fe===0)ne=Te=ie=te;else{var X=te<.5?te*(1+fe):te+fe-te*fe,Q=2*te-X;ne=Z(Q,X,re+1/3),Te=Z(Q,X,re),ie=Z(Q,X,re-1/3)}return{r:ne*255,g:Te*255,b:ie*255}}function o(re,fe,te){re=B(re,255),fe=B(fe,255),te=B(te,255);var ne=b(re,fe,te),Te=T(re,fe,te),ie,Z,X=ne,Q=ne-Te;if(Z=ne===0?0:Q/ne,ne==Te)ie=0;else{switch(ne){case re:ie=(fe-te)/Q+(fe>1)+720)%360;--fe;)ne.h=(ne.h+Te)%360,ie.push(d(ne));return ie}function L(re,fe){fe=fe||6;for(var te=d(re).toHsv(),ne=te.h,Te=te.s,ie=te.v,Z=[],X=1/fe;fe--;)Z.push(d({h:ne,s:Te,v:ie})),ie=(ie+X)%1;return Z}d.mix=function(re,fe,te){te=te===0?0:te||50;var ne=d(re).toRgb(),Te=d(fe).toRgb(),ie=te/100,Z={r:(Te.r-ne.r)*ie+ne.r,g:(Te.g-ne.g)*ie+ne.g,b:(Te.b-ne.b)*ie+ne.b,a:(Te.a-ne.a)*ie+ne.a};return d(Z)},d.readability=function(re,fe){var te=d(re),ne=d(fe);return(g.max(te.getLuminance(),ne.getLuminance())+.05)/(g.min(te.getLuminance(),ne.getLuminance())+.05)},d.isReadable=function(re,fe,te){var ne=d.readability(re,fe),Te,ie;ie=!1,Te=ae(te);switch(Te.level+Te.size){case"AAsmall":case"AAAlarge":ie=ne>=4.5;break;case"AAlarge":ie=ne>=3;break;case"AAAsmall":ie=ne>=7;break}return ie},d.mostReadable=function(re,fe,te){var ne=null,Te=0,ie,Z,X,Q;te=te||{},Z=te.includeFallbackColors,X=te.level,Q=te.size;for(var _e=0;_eTe&&(Te=ie,ne=d(fe[_e]));return d.isReadable(re,ne,{level:X,size:Q})||!Z?ne:(te.includeFallbackColors=!1,d.mostReadable(re,["#fff","#000"],te))};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"},W=d.hexNames=H(V);function H(re){var fe={};for(var te in re)re.hasOwnProperty(te)&&(fe[re[te]]=te);return fe}function G(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function B(re,fe){J(re)&&(re="100%");var te=ue(re);return re=T(fe,b(0,parseFloat(re))),te&&(re=parseInt(re*fe,10)/100),g.abs(re-fe)<1e-6?1:re%fe/parseFloat(fe)}function P(re){return T(1,b(0,re))}function z(re){return parseInt(re,16)}function J(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function ue(re){return typeof re=="string"&&re.indexOf("%")!=-1}function de(re){return re.length==1?"0"+re:""+re}function Se(re){return re<=1&&(re=re*100+"%"),re}function Ae(re){return g.round(parseFloat(re)*255).toString(16)}function pe(re){return z(re)/255}var Oe=function(){var re="[-\\+]?\\d+%?",fe="[-\\+]?\\d*\\.\\d+%?",te="(?:"+fe+")|(?:"+re+")",ne="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?",Te="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?";return{CSS_UNIT:new RegExp(te),rgb:new RegExp("rgb"+ne),rgba:new RegExp("rgba"+Te),hsl:new RegExp("hsl"+ne),hsla:new RegExp("hsla"+Te),hsv:new RegExp("hsv"+ne),hsva:new RegExp("hsva"+Te),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ye(re){return!!Oe.CSS_UNIT.exec(re)}function ce(re){re=re.replace(O,"").replace(M,"").toLowerCase();var fe=!1;if(V[re])re=V[re],fe=!0;else if(re=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var te;return(te=Oe.rgb.exec(re))?{r:te[1],g:te[2],b:te[3]}:(te=Oe.rgba.exec(re))?{r:te[1],g:te[2],b:te[3],a:te[4]}:(te=Oe.hsl.exec(re))?{h:te[1],s:te[2],l:te[3]}:(te=Oe.hsla.exec(re))?{h:te[1],s:te[2],l:te[3],a:te[4]}:(te=Oe.hsv.exec(re))?{h:te[1],s:te[2],v:te[3]}:(te=Oe.hsva.exec(re))?{h:te[1],s:te[2],v:te[3],a:te[4]}:(te=Oe.hex8.exec(re))?{r:z(te[1]),g:z(te[2]),b:z(te[3]),a:pe(te[4]),format:fe?"name":"hex8"}:(te=Oe.hex6.exec(re))?{r:z(te[1]),g:z(te[2]),b:z(te[3]),format:fe?"name":"hex"}:(te=Oe.hex4.exec(re))?{r:z(te[1]+""+te[1]),g:z(te[2]+""+te[2]),b:z(te[3]+""+te[3]),a:pe(te[4]+""+te[4]),format:fe?"name":"hex8"}:(te=Oe.hex3.exec(re))?{r:z(te[1]+""+te[1]),g:z(te[2]+""+te[2]),b:z(te[3]+""+te[3]),format:fe?"name":"hex"}:!1}function ae(re){var fe,te;return re=re||{level:"AA",size:"small"},fe=(re.level||"AA").toUpperCase(),te=(re.size||"small").toLowerCase(),fe!=="AA"&&fe!=="AAA"&&(fe="AA"),te!=="small"&&te!=="large"&&(te="small"),{level:fe,size:te}}F.exports?F.exports=d:!(N=function(){return d}.call(q,j,q,F),N!==void 0&&(F.exports=N))})(Math)},bQjk:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return function(g){var O=N,M=O.lib,m=M.CipherParams,y=O.enc,T=y.Hex,b=O.format,p=b.Hex={stringify:function(d){return d.ciphertext.toString(T)},parse:function(d){var n=T.parse(d);return m.create({ciphertext:n})}}}(),N.format.Hex})},bT9E:function(F,q,j){"use strict";j.d(q,"a",function(){return g});var N=j("VTBJ");function g(O,M){var m=Object(N.a)({},O);return Array.isArray(M)&&M.forEach(function(y){delete m[y]}),m}},biw7:function(F,q,j){"use strict";var N=j("q1tI"),g=j.n(N),O=N.createContext(null);q.a=O},c5Ni:function(F,q,j){},cv67:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(g){var O=N,M=O.lib,m=M.WordArray,y=M.Hasher,T=O.algo,b=[];(function(){for(var a=0;a<64;a++)b[a]=g.abs(g.sin(a+1))*4294967296|0})();var p=T.MD5=y.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,o){for(var u=0;u<16;u++){var h=o+u,s=a[h];a[h]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}var l=this._hash.words,t=a[o+0],S=a[o+1],x=a[o+2],f=a[o+3],R=a[o+4],C=a[o+5],v=a[o+6],_=a[o+7],E=a[o+8],w=a[o+9],k=a[o+10],I=a[o+11],L=a[o+12],V=a[o+13],W=a[o+14],H=a[o+15],G=l[0],B=l[1],P=l[2],z=l[3];G=d(G,B,P,z,t,7,b[0]),z=d(z,G,B,P,S,12,b[1]),P=d(P,z,G,B,x,17,b[2]),B=d(B,P,z,G,f,22,b[3]),G=d(G,B,P,z,R,7,b[4]),z=d(z,G,B,P,C,12,b[5]),P=d(P,z,G,B,v,17,b[6]),B=d(B,P,z,G,_,22,b[7]),G=d(G,B,P,z,E,7,b[8]),z=d(z,G,B,P,w,12,b[9]),P=d(P,z,G,B,k,17,b[10]),B=d(B,P,z,G,I,22,b[11]),G=d(G,B,P,z,L,7,b[12]),z=d(z,G,B,P,V,12,b[13]),P=d(P,z,G,B,W,17,b[14]),B=d(B,P,z,G,H,22,b[15]),G=n(G,B,P,z,S,5,b[16]),z=n(z,G,B,P,v,9,b[17]),P=n(P,z,G,B,I,14,b[18]),B=n(B,P,z,G,t,20,b[19]),G=n(G,B,P,z,C,5,b[20]),z=n(z,G,B,P,k,9,b[21]),P=n(P,z,G,B,H,14,b[22]),B=n(B,P,z,G,R,20,b[23]),G=n(G,B,P,z,w,5,b[24]),z=n(z,G,B,P,W,9,b[25]),P=n(P,z,G,B,f,14,b[26]),B=n(B,P,z,G,E,20,b[27]),G=n(G,B,P,z,V,5,b[28]),z=n(z,G,B,P,x,9,b[29]),P=n(P,z,G,B,_,14,b[30]),B=n(B,P,z,G,L,20,b[31]),G=c(G,B,P,z,C,4,b[32]),z=c(z,G,B,P,E,11,b[33]),P=c(P,z,G,B,I,16,b[34]),B=c(B,P,z,G,W,23,b[35]),G=c(G,B,P,z,S,4,b[36]),z=c(z,G,B,P,R,11,b[37]),P=c(P,z,G,B,_,16,b[38]),B=c(B,P,z,G,k,23,b[39]),G=c(G,B,P,z,V,4,b[40]),z=c(z,G,B,P,t,11,b[41]),P=c(P,z,G,B,f,16,b[42]),B=c(B,P,z,G,v,23,b[43]),G=c(G,B,P,z,w,4,b[44]),z=c(z,G,B,P,L,11,b[45]),P=c(P,z,G,B,H,16,b[46]),B=c(B,P,z,G,x,23,b[47]),G=r(G,B,P,z,t,6,b[48]),z=r(z,G,B,P,_,10,b[49]),P=r(P,z,G,B,W,15,b[50]),B=r(B,P,z,G,C,21,b[51]),G=r(G,B,P,z,L,6,b[52]),z=r(z,G,B,P,f,10,b[53]),P=r(P,z,G,B,k,15,b[54]),B=r(B,P,z,G,S,21,b[55]),G=r(G,B,P,z,E,6,b[56]),z=r(z,G,B,P,H,10,b[57]),P=r(P,z,G,B,v,15,b[58]),B=r(B,P,z,G,V,21,b[59]),G=r(G,B,P,z,R,6,b[60]),z=r(z,G,B,P,I,10,b[61]),P=r(P,z,G,B,x,15,b[62]),B=r(B,P,z,G,w,21,b[63]),l[0]=l[0]+G|0,l[1]=l[1]+B|0,l[2]=l[2]+P|0,l[3]=l[3]+z|0},_doFinalize:function(){var a=this._data,o=a.words,u=this._nDataBytes*8,h=a.sigBytes*8;o[h>>>5]|=128<<24-h%32;var s=g.floor(u/4294967296),l=u;o[(h+64>>>9<<4)+15]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,o[(h+64>>>9<<4)+14]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,a.sigBytes=(o.length+1)*4,this._process();for(var t=this._hash,S=t.words,x=0;x<4;x++){var f=S[x];S[x]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}return t},clone:function(){var a=y.clone.call(this);return a._hash=this._hash.clone(),a}});function d(a,o,u,h,s,l,t){var S=a+(o&u|~o&h)+s+t;return(S<>>32-l)+o}function n(a,o,u,h,s,l,t){var S=a+(o&h|u&~h)+s+t;return(S<>>32-l)+o}function c(a,o,u,h,s,l,t){var S=a+(o^u^h)+s+t;return(S<>>32-l)+o}function r(a,o,u,h,s,l,t){var S=a+(u^(o|~h))+s+t;return(S<>>32-l)+o}O.MD5=y._createHelper(p),O.HmacMD5=y._createHmacHelper(p)}(Math),N.MD5})},dejd:function(F,q,j){},dmUQ:function(F,q,j){"use strict";var N=j("Ff2n"),g=j("rePB"),O=j("1OyB"),M=j("vuIU"),m=j("Ji7U"),y=j("md7G"),T=j("foSv"),b=j("q1tI"),p=j.n(b),d=j("TSYQ"),n=j.n(d),c=j("4IlW");function r(E,w){var k=Object.keys(E);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(E);w&&(I=I.filter(function(L){return Object.getOwnPropertyDescriptor(E,L).enumerable})),k.push.apply(k,I)}return k}function a(E){for(var w=1;w1?ue-1:0),Se=1;Se1?B-1:0),z=1;z=0)return parseInt(G.slice(G.indexOf("e-")+2),10);var B=0;return G.indexOf(".")>=0&&(B=G.length-G.indexOf(".")-1),B},L.getInputDisplayValue=function(H){var G=H||L.state,B=G.focused,P=G.inputValue,z=G.value,J;B?J=P:J=L.toPrecisionAsStep(z),J==null&&(J="");var ue=L.formatWrapper(J);return f(L.props.decimalSeparator)&&(ue=ue.toString().replace(".",L.props.decimalSeparator)),ue},L.recordCursorPosition=function(){try{L.cursorStart=L.input.selectionStart,L.cursorEnd=L.input.selectionEnd,L.currentValue=L.input.value,L.cursorBefore=L.input.value.substring(0,L.cursorStart),L.cursorAfter=L.input.value.substring(L.cursorEnd)}catch(H){}},L.restoreByAfter=function(H){if(H===void 0)return!1;var G=L.input.value,B=G.lastIndexOf(H);if(B===-1)return!1;var P=L.cursorBefore.length;return L.lastKeyCode===c.a.DELETE&&L.cursorBefore.charAt(P-1)===H[0]?(L.fixCaret(P,P),!0):B+H.length===G.length?(L.fixCaret(B,B),!0):!1},L.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(G,B){var P=H.substring(B);return L.restoreByAfter(P)})},L.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},L.stop=function(){L.autoStepTimer&&clearTimeout(L.autoStepTimer)},L.down=function(H,G,B){L.pressingUpOrDown=!0,L.step("down",H,G,B)},L.up=function(H,G,B){L.pressingUpOrDown=!0,L.step("up",H,G,B)},L.saveInput=function(H){L.input=H};var V=I.value;V===void 0&&(V=I.defaultValue),L.state={focused:I.autoFocus};var W=L.getValidValue(L.toNumber(V));return L.state=a(a({},L.state),{},{inputValue:L.toPrecisionAsStep(W),value:W}),L}return Object(M.a)(k,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(L){var V=this.props,W=V.value,H=V.onChange,G=V.max,B=V.min,P=this.state.focused;if(L){if(!R(L.value,W)||!R(L.max,G)||!R(L.min,B)){var z=P?W:this.getValidValue(W),J;this.pressingUpOrDown?J=z:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(z),this.setState({value:z,inputValue:J})}var ue="value"in this.props?W:this.state.value;"max"in this.props&&L.max!==G&&typeof ue=="number"&&ue>G&&H&&H(G),"min"in this.props&&L.min!==B&&typeof ue=="number"&&ue1&&arguments[1]!==void 0?arguments[1]:this.props.min,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,H=parseFloat(L);return isNaN(H)?L:(HW&&(H=W),H)}},{key:"setValue",value:function(L,V){var W=this.props.precision,H=this.isNotCompleteNumber(parseFloat(L))?null:parseFloat(L),G=this.state.value,B=G===void 0?null:G,P=this.state.inputValue,z=P===void 0?null:P,J=typeof H=="number"?H.toFixed(W):"".concat(H),ue=H!==B||J!=="".concat(z);return"value"in this.props?(z=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:z},V)):this.setState({value:H,inputValue:this.toPrecisionAsStep(L)},V),ue&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(L){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,W=this.props,H=W.precision,G=W.step;if(f(H))return H;var B=this.getPrecision(V),P=this.getPrecision(G),z=this.getPrecision(L);return L?Math.max(z,B+P):B+P}},{key:"getPrecisionFactor",value:function(L){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,W=this.getMaxPrecision(L,V);return Math.pow(10,W)}},{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(L){return this.props.formatter?this.props.formatter(L):L}},{key:"toPrecisionAsStep",value:function(L){if(this.isNotCompleteNumber(L)||L==="")return L;var V=Math.abs(this.getMaxPrecision(L));return isNaN(V)?L.toString():Number(L).toFixed(V)}},{key:"toNumber",value:function(L){var V=this.props.precision,W=this.state.focused,H=L&&L.length>16&&W;return this.isNotCompleteNumber(L)||H?L:f(V)?Math.round(L*Math.pow(10,V))/Math.pow(10,V):Number(L)}},{key:"upStep",value:function(L,V){var W=this.props.step,H=this.getPrecisionFactor(L,V),G=Math.abs(this.getMaxPrecision(L,V)),B=((H*L+H*W*V)/H).toFixed(G);return this.toNumber(B)}},{key:"downStep",value:function(L,V){var W=this.props.step,H=this.getPrecisionFactor(L,V),G=Math.abs(this.getMaxPrecision(L,V)),B=((H*L-H*W*V)/H).toFixed(G);return this.toNumber(B)}},{key:"step",value:function(L,V){var W=this,H=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 B=this.props;if(B.disabled)return;var P=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(P))return;var z=this["".concat(L,"Step")](P,H),J=z>B.max||zB.max?z=B.max:z=de),st=(dt||dt===0)&&(isNaN(dt)||Number(dt)<=Se),Ue=$e||H||G,Le=st||H||G,Me=n()("".concat(W,"-handler"),"".concat(W,"-handler-up"),Object(g.a)({},"".concat(W,"-handler-up-disabled"),Ue)),Ee=n()("".concat(W,"-handler"),"".concat(W,"-handler-down"),Object(g.a)({},"".concat(W,"-handler-down-disabled"),Le)),Ce=B?{onTouchStart:Ue?h:this.up,onTouchEnd:this.stop}:{onMouseDown:Ue?h:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ke=B?{onTouchStart:Le?h:this.down,onTouchEnd:this.stop}:{onMouseDown:Le?h:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return p.a.createElement("div",{className:Be,style:Ae,title:pe,onMouseEnter:Oe,onMouseLeave:ye,onMouseOver:ce,onMouseOut:ae,onFocus:function(){return null},onBlur:function(){return null}},p.a.createElement("div",{className:"".concat(W,"-handler-wrap")},p.a.createElement("span",Object.assign({unselectable:"on"},Ce,{role:"button","aria-label":"Increase Value","aria-disabled":Ue,className:Me}),z||p.a.createElement("span",{unselectable:"on",className:"".concat(W,"-handler-up-inner"),onClick:s})),p.a.createElement("span",Object.assign({unselectable:"on"},ke,{role:"button","aria-label":"Decrease Value","aria-disabled":Le,className:Ee}),J||p.a.createElement("span",{unselectable:"on",className:"".concat(W,"-handler-down-inner"),onClick:s}))),p.a.createElement("div",{className:"".concat(W,"-input-wrap")},p.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Se,"aria-valuemax":de,"aria-valuenow":dt,required:re,type:ne,placeholder:Te,onPaste:Je,onClick:fe,onMouseUp:this.onMouseUp,className:"".concat(W,"-input"),tabIndex:te,autoComplete:P,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:at?this.onKeyDown:h,onKeyUp:at?this.onKeyUp:h,autoFocus:ve,maxLength:_e,readOnly:G,disabled:H,max:de,min:Se,step:Q,name:Re,title:pe,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ct),pattern:X,inputMode:Z,onInput:qe},Ie))))}}]),k}(p.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:h,onKeyDown:h,onPressEnter:h,onFocus:h,onBlur:h,parser:l,required:!1,autoComplete:"off"};var v=C,_=q.a=v},e7zE:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("3y9D"),j("WYAk"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.Base,m=O.WordArray,y=g.algo,T=y.SHA1,b=y.HMAC,p=y.PBKDF2=M.extend({cfg:M.extend({keySize:128/32,hasher:T,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,n){for(var c=this.cfg,r=b.create(c.hasher,d),a=m.create(),o=m.create([1]),u=a.words,h=o.words,s=c.keySize,l=c.iterations;u.lengthW.length)&&(H=W.length);for(var G=0,B=new Array(H);G=0)continue;if(!Object.prototype.propertyIsEnumerable.call(W,B))continue;G[B]=W[B]}}return G}function o(W,H){if(W==null)return{};var G={},B=Object.keys(W),P,z;for(z=0;z=0)continue;G[P]=W[P]}return G}var u=function(H){var G=H.className,B=H.percent,P=H.prefixCls,z=H.strokeColor,J=H.strokeLinecap,ue=H.strokeWidth,de=H.style,Se=H.trailColor,Ae=H.trailWidth,pe=H.transition,Oe=a(H,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Oe.gapPosition;var ye=Array.isArray(B)?B:[B],ce=Array.isArray(z)?z:[z],ae=y(ye),re=b(ae,1),fe=re[0],te=ue/2,ne=100-ue/2,Te="M ".concat(J==="round"?te:0,",").concat(te,` L `).concat(J==="round"?ne:100,",").concat(te),ie="0 0 100 ".concat(ue),Z=0;return g.a.createElement("svg",T({className:M()("".concat(P,"-line"),G),viewBox:ie,preserveAspectRatio:"none",style:de},Oe),g.a.createElement("path",{className:"".concat(P,"-line-trail"),d:Te,strokeLinecap:J,stroke:Se,strokeWidth:Ae||ue,fillOpacity:"0"}),ye.map(function(X,Q){var _e={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(Z,"px"),transition:pe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ve=ce[Q]||ce[ce.length-1];return Z+=X,g.a.createElement("path",{key:Q,className:"".concat(P,"-line-path"),d:Te,strokeLinecap:J,stroke:ve,strokeWidth:ue,fillOpacity:"0",ref:fe[Q],style:_e})}))};u.defaultProps=m;var h=u;function s(){return s=Object.assign||function(W){for(var H=1;HW.length)&&(H=W.length);for(var G=0,B=new Array(H);G=0)continue;if(!Object.prototype.propertyIsEnumerable.call(W,B))continue;G[B]=W[B]}}return G}function v(W,H){if(W==null)return{};var G={},B=Object.keys(W),P,z;for(z=0;z=0)continue;G[P]=W[P]}return G}var _=0;function E(W){return+W.replace("%","")}function w(W){return Array.isArray(W)?W:[W]}function k(W,H,G,B){var P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,z=arguments.length>5?arguments[5]:void 0,J=50-B/2,ue=0,de=-J,Se=0,Ae=-2*J;switch(z){case"left":ue=-J,de=0,Se=2*J,Ae=0;break;case"right":ue=J,de=0,Se=-2*J,Ae=0;break;case"bottom":de=J,Ae=2*J;break;default:}var pe="M 50,50 m ".concat(ue,",").concat(de,` a `).concat(J,",").concat(J," 0 1 1 ").concat(Se,",").concat(-Ae,` a `).concat(J,",").concat(J," 0 1 1 ").concat(-Se,",").concat(Ae),Oe=Math.PI*2*J,ye={stroke:G,strokeDasharray:"".concat(H/100*(Oe-P),"px ").concat(Oe,"px"),strokeDashoffset:"-".concat(P/2+W/100*(Oe-P),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:pe,pathStyle:ye}}var I=function(H){var G=H.prefixCls,B=H.strokeWidth,P=H.trailWidth,z=H.gapDegree,J=H.gapPosition,ue=H.trailColor,de=H.strokeLinecap,Se=H.style,Ae=H.className,pe=H.strokeColor,Oe=H.percent,ye=C(H,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ce=Object(N.useMemo)(function(){return _+=1,_},[]),ae=k(0,100,ue,B,z,J),re=ae.pathString,fe=ae.pathStyle,te=w(Oe),ne=w(pe),Te=ne.find(function(_e){return Object.prototype.toString.call(_e)==="[object Object]"}),ie=y(te),Z=l(ie,1),X=Z[0],Q=function(){var ve=0;return te.map(function(Re,Je){var qe=ne[Je]||ne[ne.length-1],rt=Object.prototype.toString.call(qe)==="[object Object]"?"url(#".concat(G,"-gradient-").concat(ce,")"):"",ut=k(ve,Re,qe,B,z,J);return ve+=Re,g.a.createElement("path",{key:Je,className:"".concat(G,"-circle-path"),d:ut.pathString,stroke:rt,strokeLinecap:de,strokeWidth:B,opacity:Re===0?0:1,fillOpacity:"0",style:ut.pathStyle,ref:X[Je]})})};return g.a.createElement("svg",s({className:M()("".concat(G,"-circle"),Ae),viewBox:"0 0 100 100",style:Se},ye),Te&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(G,"-gradient-").concat(ce),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Te).sort(function(_e,ve){return E(_e)-E(ve)}).map(function(_e,ve){return g.a.createElement("stop",{key:ve,offset:_e,stopColor:Te[_e]})}))),g.a.createElement("path",{className:"".concat(G,"-circle-trail"),d:re,stroke:ue,strokeLinecap:de,strokeWidth:P||B,fillOpacity:"0",style:fe}),Q().reverse())};I.defaultProps=m;var L=I,V={Line:h,Circle:L}},hW8S:function(F,q,j){"use strict";j.d(q,"a",function(){return M}),j.d(q,"c",function(){return m}),j.d(q,"b",function(){return y});var N=j("VTBJ"),g=j("Ff2n"),O=j("Kwbf"),M="RC_TABLE_INTERNAL_COL_DEFINE";function m(T){var b=T.expandable,p=Object(g.a)(T,["expandable"]);return"expandable"in T?Object(N.a)(Object(N.a)({},p),b):p}function y(T){return Object.keys(T).reduce(function(b,p){return(p.substr(0,5)==="data-"||p.substr(0,5)==="aria-")&&(b[p]=T[p]),b},{})}},jO9C:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.Iso97971={pad:function(g,O){g.concat(N.lib.WordArray.create([2147483648],1)),N.pad.ZeroPadding.pad(g,O)},unpad:function(g){N.pad.ZeroPadding.unpad(g),g.sigBytes--}},N.pad.Iso97971})},jwmR:function(F,q,j){F.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(F,q,j){"use strict";j.d(q,"a",function(){return Cr});var N=j("rePB"),g=j("ODXe"),O=j("Ff2n"),M=j("VTBJ"),m=j("q1tI"),y=j("TSYQ"),T=j.n(y),b=j("Zm9Q"),p=j("6cGi"),d=j("KQm4"),n=j("xEkU"),c=j.n(n),r=j("t23M");function a(Pe){var Ve=Object(m.useRef)(),Qe=Object(m.useRef)(!1);function Fe(){for(var be=arguments.length,De=new Array(be),we=0;weZe&&(jt=Ze-kt),Object(m.useMemo)(function(){if(!De.length)return[0,0];for(var Yt=De.length,kr=Yt,Jr=0;Jrze+jt){kr=Jr-1;break}}for(var Zr=0,Hr=Yt-1;Hr>=0;Hr-=1){var rn=Pe.get(De[Hr].key)||S;if(rn[Xe]1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Ve&&typeof Ve.getBoundingClientRect=="function"&&Ve.getBoundingClientRect().width;if(Fe){if(Qe){var be=getComputedStyle(Ve),De=be.marginLeft,we=be.marginRight;Fe+=+De.replace("px","")+ +we.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},ve=function(Ve,Qe,Fe){Ve&&Object(W.a)(Ve.style)==="object"&&(Ve.style[Qe]=Fe)},Re=function(){return te.any},Je=j("bdgK"),qe=j("i8i4"),rt=j.n(qe),ut=j("wgJM"),dt=j("l4aY"),ft=j("m+aA"),Be=j("c+Xe"),Ie=j("zT1h"),at=j("QC+M");function ct(Pe,Ve,Qe){return Qe?Pe[0]===Ve[0]:Pe[0]===Ve[0]&&Pe[1]===Ve[1]}function $e(Pe,Ve,Qe){var Fe=Pe[Ve]||{};return Object(M.a)(Object(M.a)({},Fe),Qe)}function st(Pe,Ve,Qe,Fe){for(var be=Qe.points,De=Object.keys(Pe),we=0;we1&&arguments[1]!==void 0?arguments[1]:2;Ve();var De=Object(ut.a)(function(){be<=1?Fe({isCanceled:function(){return De!==Pe.current}}):Qe(Fe,be-1)});Pe.current=De}return m.useEffect(function(){return function(){Ve()}},[]),[Qe,Ve]},gi=[Or,dn,hn,Tt],Ei=!1,bn=!0;function lr(Pe){return Pe===hn||Pe===Tt}var Yn=function(Pe,Ve){var Qe=m.useState(vn),Fe=Object(g.a)(Qe,2),be=Fe[0],De=Fe[1],we=an(),je=Object(g.a)(we,2),Ge=je[0],Xe=je[1];function ze(){De(Or)}return zr(function(){if(be!==vn&&be!==Tt){var Ze=gi.indexOf(be),pt=gi[Ze+1],kt=Ve(be);kt===Ei?De(pt):Ge(function(jt){function Yt(){if(jt.isCanceled())return;De(pt)}kt===!0?Yt():Promise.resolve(kt).then(Yt)})}},[Pe,be]),m.useEffect(function(){return function(){Xe()}},[]),[ze,be]},ci=function(Pe){var Ve=Object(m.useRef)(),Qe=Object(m.useRef)(Pe);Qe.current=Pe;var Fe=m.useCallback(function(we){Qe.current(we)},[]);function be(we){we&&(we.removeEventListener(cr,Fe),we.removeEventListener(Ht,Fe))}function De(we){Ve.current&&Ve.current!==we&&be(Ve.current),we&&we!==Ve.current&&(we.addEventListener(cr,Fe),we.addEventListener(Ht,Fe),Ve.current=we)}return m.useEffect(function(){return function(){be(Ve.current)}},[]),[De,be]};function Hn(Pe,Ve,Qe,Fe){var be=Fe.motionEnter,De=be===void 0?!0:be,we=Fe.motionAppear,je=we===void 0?!0:we,Ge=Fe.motionLeave,Xe=Ge===void 0?!0:Ge,ze=Fe.motionDeadline,Ze=Fe.motionLeaveImmediately,pt=Fe.onAppearPrepare,kt=Fe.onEnterPrepare,jt=Fe.onLeavePrepare,Yt=Fe.onAppearStart,kr=Fe.onEnterStart,Jr=Fe.onLeaveStart,$r=Fe.onAppearActive,Zr=Fe.onEnterActive,Hr=Fe.onLeaveActive,rn=Fe.onAppearEnd,nn=Fe.onEnterEnd,yn=Fe.onLeaveEnd,cn=Fe.onVisibleChanged,In=gr(),fn=Object(g.a)(In,2),Mr=fn[0],Fr=fn[1],sn=gr(St),gn=Object(g.a)(sn,2),wr=gn[0],xn=gn[1],zn=gr(null),Sn=Object(g.a)(zn,2),Ln=Sn[0],Cn=Sn[1],Jn=Object(m.useRef)(!1),ii=Object(m.useRef)(null),Gn=Object(m.useRef)(!1),fi=Object(m.useRef)(null);function Xi(){var Dn=Qe();return Dn||fi.current}var Si=Object(m.useRef)(!1);function ai(Dn){var On=Xi();if(Dn&&!Dn.deadline&&Dn.target!==On)return;var ti;wr===Kr&&Si.current?ti=rn==null?void 0:rn(On,Dn):wr===Vr&&Si.current?ti=nn==null?void 0:nn(On,Dn):wr===Yr&&Si.current&&(ti=yn==null?void 0:yn(On,Dn)),ti!==!1&&!Gn.current&&(xn(St),Cn(null))}var Pn=ci(ai),Mn=Object(g.a)(Pn,1),Kn=Mn[0],Bn=m.useMemo(function(){var Dn,On,ti;switch(wr){case"appear":return Dn={},Object(N.a)(Dn,Or,pt),Object(N.a)(Dn,dn,Yt),Object(N.a)(Dn,hn,$r),Dn;case"enter":return On={},Object(N.a)(On,Or,kt),Object(N.a)(On,dn,kr),Object(N.a)(On,hn,Zr),On;case"leave":return ti={},Object(N.a)(ti,Or,jt),Object(N.a)(ti,dn,Jr),Object(N.a)(ti,hn,Hr),ti;default:return{}}},[wr]),ei=Yn(wr,function(Dn){if(Dn===Or){var On=Bn[Or];return On?On(Xi()):Ei}if(An in Bn){var ti;Cn(((ti=Bn[An])===null||ti===void 0?void 0:ti.call(Bn,Xi(),null))||null)}return An===hn&&(Kn(Xi()),ze>0&&(clearTimeout(ii.current),ii.current=setTimeout(function(){ai({deadline:!0})},ze))),bn}),Ai=Object(g.a)(ei,2),ra=Ai[0],An=Ai[1],Fi=lr(An);Si.current=Fi,zr(function(){Fr(Ve);var Dn=Jn.current;if(Jn.current=!0,!Pe)return;var On;!Dn&&Ve&&je&&(On=Kr),Dn&&Ve&&De&&(On=Vr),(Dn&&!Ve&&Xe||!Dn&&Ze&&!Ve&&Xe)&&(On=Yr),On&&(xn(On),ra())},[Ve]),Object(m.useEffect)(function(){(wr===Kr&&!je||wr===Vr&&!De||wr===Yr&&!Xe)&&xn(St)},[je,De,Xe]),Object(m.useEffect)(function(){return function(){clearTimeout(ii.current),Gn.current=!0}},[]),Object(m.useEffect)(function(){Mr!==void 0&&wr===St&&(cn==null||cn(Mr))},[Mr,wr]);var Ui=Ln;return Bn[Or]&&An===dn&&(Ui=Object(M.a)({transition:"none"},Ui)),[wr,An,Ui,Mr!=null?Mr:Ve]}var qr=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(){return Object(R.a)(this,Qe),Ve.apply(this,arguments)}return Object(C.a)(Qe,[{key:"render",value:function(){return this.props.children}}]),Qe}(m.Component),Un=qr;function di(Pe){var Ve=Pe;Object(W.a)(Pe)==="object"&&(Ve=Pe.transitionSupport);function Qe(be){return!!(be.motionName&&Ve)}var Fe=m.forwardRef(function(be,De){var we=be.visible,je=we===void 0?!0:we,Ge=be.removeOnLeave,Xe=Ge===void 0?!0:Ge,ze=be.forceRender,Ze=be.children,pt=be.motionName,kt=be.leavedClassName,jt=be.eventProps,Yt=Qe(be),kr=Object(m.useRef)(),Jr=Object(m.useRef)();function $r(){try{return Object(ft.a)(kr.current||Jr.current)}catch(xn){return null}}var Zr=Hn(Yt,je,$r,be),Hr=Object(g.a)(Zr,4),rn=Hr[0],nn=Hr[1],yn=Hr[2],cn=Hr[3],In=m.useRef(cn);cn&&(In.current=!0);var fn=Object(m.useRef)(De);fn.current=De;var Mr=m.useCallback(function(xn){kr.current=xn,Object(Be.b)(fn.current,xn)},[]),Fr,sn=Object(M.a)(Object(M.a)({},jt),{},{visible:je});if(!Ze)Fr=null;else if(rn===St||!Qe(be))cn?Fr=Ze(Object(M.a)({},sn),Mr):!Xe&&In.current?Fr=Ze(Object(M.a)(Object(M.a)({},sn),{},{className:kt}),Mr):ze?Fr=Ze(Object(M.a)(Object(M.a)({},sn),{},{style:{display:"none"}}),Mr):Fr=null;else{var gn,wr;nn===Or?wr="prepare":lr(nn)?wr="active":nn===dn&&(wr="start"),Fr=Ze(Object(M.a)(Object(M.a)({},sn),{},{className:T()(dr(pt,rn),(gn={},Object(N.a)(gn,dr(pt,"".concat(rn,"-").concat(wr)),wr),Object(N.a)(gn,pt,typeof pt=="string"),gn)),style:yn}),Mr)}return m.createElement(Un,{ref:Jr},Fr)});return Fe.displayName="CSSMotion",Fe}var vi=di(Wt),Ut="add",_r="keep",hi="remove",xi="removed";function Di(Pe){var Ve;return Pe&&Object(W.a)(Pe)==="object"&&"key"in Pe?Ve=Pe:Ve={key:Pe},Object(M.a)(Object(M.a)({},Ve),{},{key:String(Ve.key)})}function wi(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Pe.map(Di)}function le(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Qe=[],Fe=0,be=Ve.length,De=wi(Pe),we=wi(Ve);De.forEach(function(Xe){for(var ze=!1,Ze=Fe;Ze1});return Ge.forEach(function(Xe){Qe=Qe.filter(function(ze){var Ze=ze.key,pt=ze.status;return Ze!==Xe||pt!==hi}),Qe.forEach(function(ze){ze.key===Xe&&(ze.status=_r)})}),Qe}var K=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Y(Pe){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vi,Qe=function(Fe){Object(_.a)(De,Fe);var be=Object(E.a)(De);function De(){var we;return Object(R.a)(this,De),we=be.apply(this,arguments),we.state={keyEntities:[]},we.removeKey=function(je){we.setState(function(Ge){var Xe=Ge.keyEntities;return{keyEntities:Xe.map(function(ze){return ze.key!==je?ze:Object(M.a)(Object(M.a)({},ze),{},{status:xi})})}})},we}return Object(C.a)(De,[{key:"render",value:function(){var je=this,Ge=this.state.keyEntities,Xe=this.props,ze=Xe.component,Ze=Xe.children,pt=Xe.onVisibleChanged,kt=Object(O.a)(Xe,["component","children","onVisibleChanged"]),jt=ze||m.Fragment,Yt={};return K.forEach(function(kr){Yt[kr]=kt[kr],delete kt[kr]}),delete kt.keys,m.createElement(jt,kt,Ge.map(function(kr){var Jr=kr.status,$r=Object(O.a)(kr,["status"]),Zr=Jr===Ut||Jr===_r;return m.createElement(Ve,Object(f.a)({},Yt,{key:$r.key,visible:Zr,eventProps:$r,onVisibleChanged:function(rn){pt==null||pt(rn,{key:$r.key}),rn||je.removeKey($r.key)}}),Ze)}))}}],[{key:"getDerivedStateFromProps",value:function(je,Ge){var Xe=je.keys,ze=Ge.keyEntities,Ze=wi(Xe),pt=le(ze,Ze);return{keyEntities:pt.filter(function(kt){var jt=ze.find(function(Yt){var kr=Yt.key;return kt.key===kr});return!(jt&&jt.status===xi&&kt.status===hi)})}}}]),De}(m.Component);return Qe.defaultProps={component:"div"},Qe}var ee=Y(Wt),ge=vi;function se(Pe){var Ve=Pe.prefixCls,Qe=Pe.motion,Fe=Pe.animation,be=Pe.transitionName;return Qe||(Fe?{motionName:"".concat(Ve,"-").concat(Fe)}:be?{motionName:be}:null)}function Ke(Pe){var Ve=Pe.prefixCls,Qe=Pe.visible,Fe=Pe.zIndex,be=Pe.mask,De=Pe.maskMotion,we=Pe.maskAnimation,je=Pe.maskTransitionName;if(!be)return null;var Ge={};return(De||je||we)&&(Ge=Object(M.a)({motionAppear:!0},se({motion:De,prefixCls:Ve,transitionName:je,animation:we}))),m.createElement(ge,Object(f.a)({},Ge,{visible:Qe,removeOnLeave:!0}),function(Xe){var ze=Xe.className;return m.createElement("div",{style:{zIndex:Fe},className:T()("".concat(Ve,"-mask"),ze)})})}var Ct=j("9mu1"),Xt=j("o0o1"),Er=j.n(Xt),Pt=j("HaE+"),Lr=["measure","align",null,"motion"],Gr=function(Pe,Ve){var Qe=Object(m.useState)(null),Fe=Object(g.a)(Qe,2),be=Fe[0],De=Fe[1],we=Object(m.useRef)(),je=Object(m.useRef)(!1);function Ge(Ze){je.current||De(Ze)}function Xe(){ut.a.cancel(we.current)}function ze(Ze){Xe(),we.current=Object(ut.a)(function(){Ge(function(pt){switch(be){case"align":return"motion";case"motion":return"stable";default:}return pt}),Ze==null||Ze()})}return Object(m.useEffect)(function(){Ge("measure")},[Pe]),Object(m.useEffect)(function(){switch(be){case"measure":Ve();break;default:}be&&(we.current=Object(ut.a)(Object(Pt.a)(Er.a.mark(function Ze(){var pt,kt;return Er.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:pt=Lr.indexOf(be),kt=Lr[pt+1],kt&&pt!==-1&&Ge(kt);case 3:case"end":return Yt.stop()}},Ze)}))))},[be]),Object(m.useEffect)(function(){return function(){je.current=!0,Xe()}},[]),[be,ze]},_n=function(Pe){var Ve=m.useState({width:0,height:0}),Qe=Object(g.a)(Ve,2),Fe=Qe[0],be=Qe[1];function De(je){be({width:je.offsetWidth,height:je.offsetHeight})}var we=m.useMemo(function(){var je={};if(Pe){var Ge=Fe.width,Xe=Fe.height;Pe.indexOf("height")!==-1&&Xe?je.height=Xe:Pe.indexOf("minHeight")!==-1&&Xe&&(je.minHeight=Xe),Pe.indexOf("width")!==-1&&Ge?je.width=Ge:Pe.indexOf("minWidth")!==-1&&Ge&&(je.minWidth=Ge)}return je},[Pe,Fe]);return[we,De]},Zn=m.forwardRef(function(Pe,Ve){var Qe=Pe.visible,Fe=Pe.prefixCls,be=Pe.className,De=Pe.style,we=Pe.children,je=Pe.zIndex,Ge=Pe.stretch,Xe=Pe.destroyPopupOnHide,ze=Pe.forceRender,Ze=Pe.align,pt=Pe.point,kt=Pe.getRootDomNode,jt=Pe.getClassNameFromAlign,Yt=Pe.onAlign,kr=Pe.onMouseEnter,Jr=Pe.onMouseLeave,$r=Pe.onMouseDown,Zr=Pe.onTouchStart,Hr=Object(m.useRef)(),rn=Object(m.useRef)(),nn=Object(m.useState)(),yn=Object(g.a)(nn,2),cn=yn[0],In=yn[1],fn=_n(Ge),Mr=Object(g.a)(fn,2),Fr=Mr[0],sn=Mr[1];function gn(){Ge&&sn(kt())}var wr=Gr(Qe,gn),xn=Object(g.a)(wr,2),zn=xn[0],Sn=xn[1],Ln=Object(m.useRef)();function Cn(){return pt||kt}function Jn(){var Pn;(Pn=Hr.current)===null||Pn===void 0||Pn.forceAlign()}function ii(Pn,Mn){var Kn=jt(Mn);cn!==Kn&&In(Kn),zn==="align"&&(cn!==Kn?Promise.resolve().then(function(){Jn()}):Sn(function(){var Bn;(Bn=Ln.current)===null||Bn===void 0||Bn.call(Ln)}),Yt==null||Yt(Pn,Mn))}var Gn=Object(M.a)({},se(Pe));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Pn){var Mn=Gn[Pn];Gn[Pn]=function(Kn,Bn){return Sn(),Mn==null?void 0:Mn(Kn,Bn)}});function fi(){return new Promise(function(Pn){Ln.current=Pn})}m.useEffect(function(){!Gn.motionName&&zn==="motion"&&Sn()},[Gn.motionName,zn]),m.useImperativeHandle(Ve,function(){return{forceAlign:Jn,getElement:function(){return rn.current}}});var Xi=Object(M.a)(Object(M.a)({},Fr),{},{zIndex:je,opacity:zn==="motion"||zn==="stable"||!Qe?void 0:0,pointerEvents:zn==="stable"?void 0:"none"},De),Si=!0;(Ze==null?void 0:Ze.points)&&(zn==="align"||zn==="stable")&&(Si=!1);var ai=we;return m.Children.count(we)>1&&(ai=m.createElement("div",{className:"".concat(Fe,"-content")},we)),m.createElement(ge,Object(f.a)({visible:Qe,ref:rn,leavedClassName:"".concat(Fe,"-hidden")},Gn,{onAppearPrepare:fi,onEnterPrepare:fi,removeOnLeave:Xe,forceRender:ze}),function(Pn,Mn){var Kn=Pn.className,Bn=Pn.style,ei=T()(Fe,be,cn,Kn);return m.createElement(Ct.a,{target:Cn(),key:"popup",ref:Hr,monitorWindowResize:!0,disabled:Si,align:Ze,onAlign:ii},m.createElement("div",{ref:Mn,className:ei,onMouseEnter:kr,onMouseLeave:Jr,onMouseDownCapture:$r,onTouchStartCapture:Zr,style:Object(M.a)(Object(M.a)({},Bn),Xi)},ai))})});Zn.displayName="PopupInner";var qn=Zn,Nn=m.forwardRef(function(Pe,Ve){var Qe=Pe.prefixCls,Fe=Pe.visible,be=Pe.zIndex,De=Pe.children,we=Pe.mobile;we=we===void 0?{}:we;var je=we.popupClassName,Ge=we.popupStyle,Xe=we.popupMotion,ze=Xe===void 0?{}:Xe,Ze=we.popupRender,pt=m.useRef();m.useImperativeHandle(Ve,function(){return{forceAlign:function(){},getElement:function(){return pt.current}}});var kt=Object(M.a)({zIndex:be},Ge),jt=De;return m.Children.count(De)>1&&(jt=m.createElement("div",{className:"".concat(Qe,"-content")},De)),Ze&&(jt=Ze(jt)),m.createElement(ge,Object(f.a)({visible:Fe,ref:pt,removeOnLeave:!0},ze),function(Yt,kr){var Jr=Yt.className,$r=Yt.style,Zr=T()(Qe,je,Jr);return m.createElement("div",{ref:kr,className:Zr,style:Object(M.a)(Object(M.a)({},$r),kt)},jt)})});Nn.displayName="MobilePopupInner";var Ni=Nn,Gi=["visible","mobile"],Wn=m.forwardRef(function(Pe,Ve){var Qe=Pe.visible,Fe=Pe.mobile,be=Object(O.a)(Pe,Gi),De=Object(m.useState)(Qe),we=Object(g.a)(De,2),je=we[0],Ge=we[1],Xe=Object(m.useState)(!1),ze=Object(g.a)(Xe,2),Ze=ze[0],pt=ze[1],kt=Object(M.a)(Object(M.a)({},be),{},{visible:je});Object(m.useEffect)(function(){Ge(Qe),Qe&&Fe&&pt(Ue())},[Qe,Fe]);var jt=Ze?m.createElement(Ni,Object(f.a)({},kt,{mobile:Fe,ref:Ve})):m.createElement(qn,Object(f.a)({},kt,{ref:Ve}));return m.createElement("div",null,m.createElement(Ke,kt),jt)});Wn.displayName="Popup";var Ti=Wn,Ki=m.createContext(null),ki=Ki;function ni(){}function ea(){return""}function Vi(Pe){return Pe?Pe.ownerDocument:window.document}var ta=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function oa(Pe){var Ve=function(Qe){Object(_.a)(be,Qe);var Fe=Object(E.a)(be);function be(De){var we;Object(R.a)(this,be),we=Fe.call(this,De),we.popupRef=m.createRef(),we.triggerRef=m.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 Xe=we.props.mouseEnterDelay;we.fireEvents("onMouseEnter",Ge),we.delaySetPopupVisible(!0,Xe,Xe?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 Xe;if(Ge.relatedTarget&&!Ge.relatedTarget.setTimeout&&Object(dt.a)((Xe=we.popupRef.current)===null||Xe===void 0?void 0:Xe.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 Xe;if(we.preClickTime&&we.preTouchTime?Xe=Math.min(we.preClickTime,we.preTouchTime):we.preClickTime?Xe=we.preClickTime:we.preTouchTime&&(Xe=we.preTouchTime),Math.abs(Xe-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 ze=!we.state.popupVisible;(we.isClickToHide()&&!ze||ze&&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 Xe=Ge.target,ze=we.getRootDomNode(),Ze=we.getPopupDomNode();(!Object(dt.a)(ze,Xe)||we.isContextMenuOnly())&&!Object(dt.a)(Ze,Xe)&&!we.hasPopupMouseDown&&we.close()},we.getRootDomNode=function(){var Ge=we.props.getTriggerDOMNode;if(Ge)return Ge(we.triggerRef.current);try{var Xe=Object(ft.a)(we.triggerRef.current);if(Xe)return Xe}catch(ze){}return rt.a.findDOMNode(Object(v.a)(we))},we.getPopupClassNameFromAlign=function(Ge){var Xe=[],ze=we.props,Ze=ze.popupPlacement,pt=ze.builtinPlacements,kt=ze.prefixCls,jt=ze.alignPoint,Yt=ze.getPopupClassNameFromAlign;return Ze&&pt&&Xe.push(st(pt,kt,Ge,jt)),Yt&&Xe.push(Yt(Ge)),Xe.join(" ")},we.getComponent=function(){var Ge=we.props,Xe=Ge.prefixCls,ze=Ge.destroyPopupOnHide,Ze=Ge.popupClassName,pt=Ge.onPopupAlign,kt=Ge.popupMotion,jt=Ge.popupAnimation,Yt=Ge.popupTransitionName,kr=Ge.popupStyle,Jr=Ge.mask,$r=Ge.maskAnimation,Zr=Ge.maskTransitionName,Hr=Ge.maskMotion,rn=Ge.zIndex,nn=Ge.popup,yn=Ge.stretch,cn=Ge.alignPoint,In=Ge.mobile,fn=Ge.forceRender,Mr=we.state,Fr=Mr.popupVisible,sn=Mr.point,gn=we.getPopupAlign(),wr={};return we.isMouseEnterToShow()&&(wr.onMouseEnter=we.onPopupMouseEnter),we.isMouseLeaveToHide()&&(wr.onMouseLeave=we.onPopupMouseLeave),wr.onMouseDown=we.onPopupMouseDown,wr.onTouchStart=we.onPopupMouseDown,m.createElement(Ti,Object(f.a)({prefixCls:Xe,destroyPopupOnHide:ze,visible:Fr,point:cn&&sn,className:Ze,align:gn,onAlign:pt,animation:jt,getClassNameFromAlign:we.getPopupClassNameFromAlign},wr,{stretch:yn,getRootDomNode:we.getRootDomNode,style:kr,mask:Jr,zIndex:rn,transitionName:Yt,maskAnimation:$r,maskTransitionName:Zr,maskMotion:Hr,ref:we.popupRef,motion:kt,mobile:In,forceRender:fn}),typeof nn=="function"?nn():nn)},we.attachParent=function(Ge){ut.a.cancel(we.attachId);var Xe=we.props,ze=Xe.getPopupContainer,Ze=Xe.getDocument,pt=we.getRootDomNode(),kt;ze?(pt||ze.length===0)&&(kt=ze(pt)):kt=Ze(we.getRootDomNode()).body,kt?kt.appendChild(Ge):we.attachId=Object(ut.a)(function(){we.attachParent(Ge)})},we.getContainer=function(){var Ge=we.props.getDocument,Xe=Ge(we.getRootDomNode()).createElement("div");return Xe.style.position="absolute",Xe.style.top="0",Xe.style.left="0",Xe.style.width="100%",we.attachParent(Xe),Xe},we.setPoint=function(Ge){var Xe=we.props.alignPoint;if(!Xe||!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 je;return"popupVisible"in De?je=!!De.popupVisible:je=!!De.defaultPopupVisible,we.state={prevPopupVisible:je,popupVisible:je},ta.forEach(function(Ge){we["fire".concat(Ge)]=function(Xe){we.fireEvents(Ge,Xe)}}),we}return Object(C.a)(be,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var we=this.props,je=this.state;if(je.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),ut.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,je=we.popupPlacement,Ge=we.popupAlign,Xe=we.builtinPlacements;return je&&Xe?$e(Xe,je,Ge):Ge}},{key:"setPopupVisible",value:function(we,je){var Ge=this.props.alignPoint,Xe=this.state.popupVisible;this.clearDelayTimer(),Xe!==we&&("popupVisible"in this.props||this.setState({popupVisible:we,prevPopupVisible:Xe}),this.props.onPopupVisibleChange(we)),Ge&&je&&we&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(we,je,Ge){var Xe=this,ze=je*1e3;if(this.clearDelayTimer(),ze){var Ze=Ge?{pageX:Ge.pageX,pageY:Ge.pageY}:null;this.delayTimer=window.setTimeout(function(){Xe.setPopupVisible(we,Ze),Xe.clearDelayTimer()},ze)}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 je=this.props.children.props,Ge=this.props;return je[we]&&Ge[we]?this["fire".concat(we)]:je[we]||Ge[we]}},{key:"isClickToShow",value:function(){var we=this.props,je=we.action,Ge=we.showAction;return je.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,je=we.action,Ge=we.showAction;return je.indexOf("contextMenu")!==-1||Ge.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var we=this.props,je=we.action,Ge=we.hideAction;return je.indexOf("click")!==-1||Ge.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var we=this.props,je=we.action,Ge=we.showAction;return je.indexOf("hover")!==-1||Ge.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var we=this.props,je=we.action,Ge=we.hideAction;return je.indexOf("hover")!==-1||Ge.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var we=this.props,je=we.action,Ge=we.showAction;return je.indexOf("focus")!==-1||Ge.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var we=this.props,je=we.action,Ge=we.hideAction;return je.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,je){var Ge=this.props.children.props[we];Ge&&Ge(je);var Xe=this.props[we];Xe&&Xe(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var we=this.state.popupVisible,je=this.props,Ge=je.children,Xe=je.forceRender,ze=je.alignPoint,Ze=je.className,pt=je.autoDestroy,kt=m.Children.only(Ge),jt={key:"trigger"};this.isContextMenuToShow()?jt.onContextMenu=this.onContextMenu:jt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(jt.onClick=this.onClick,jt.onMouseDown=this.onMouseDown,jt.onTouchStart=this.onTouchStart):(jt.onClick=this.createTwoChains("onClick"),jt.onMouseDown=this.createTwoChains("onMouseDown"),jt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(jt.onMouseEnter=this.onMouseEnter,ze&&(jt.onMouseMove=this.onMouseMove)):jt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?jt.onMouseLeave=this.onMouseLeave:jt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(jt.onFocus=this.onFocus,jt.onBlur=this.onBlur):(jt.onFocus=this.createTwoChains("onFocus"),jt.onBlur=this.createTwoChains("onBlur"));var Yt=T()(kt&&kt.props&&kt.props.className,Ze);Yt&&(jt.className=Yt);var kr=Object(M.a)({},jt);Object(Be.c)(kt)&&(kr.ref=Object(Be.a)(this.triggerRef,kt.ref));var Jr=m.cloneElement(kt,kr),$r;return(we||this.popupRef.current||Xe)&&($r=m.createElement(Pe,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!we&&pt&&($r=null),m.createElement(ki.Provider,{value:this.triggerContextValue},Jr,$r)}}],[{key:"getDerivedStateFromProps",value:function(we,je){var Ge=we.popupVisible,Xe={};return Ge!==void 0&&je.popupVisible!==Ge&&(Xe.popupVisible=Ge,Xe.prevPopupVisible=je.popupVisible),Xe}}]),be}(m.Component);return Ve.contextType=ki,Ve.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:ea,getDocument:Vi,onPopupVisibleChange:ni,afterPopupVisibleChange:ni,onPopupAlign:ni,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ve}var Li=oa(at.a),$n={adjustX:1,adjustY:1},ji={topLeft:{points:["bl","tl"],overflow:$n,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:$n,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:$n,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:$n,offset:[4,0]}},ha={topLeft:{points:["bl","tl"],overflow:$n,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:$n,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:$n,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:$n,offset:[4,0]}},xt=ji,et=0,mt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},wt=function(Ve,Qe,Fe){var be=ie(Qe),De=Ve.getState();Ve.setState({defaultActiveFirst:Object(M.a)(Object(M.a)({},De.defaultActiveFirst),{},Object(N.a)({},be,Fe))})},Lt=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(Fe){var be;Object(R.a)(this,Qe),be=Ve.call(this,Fe),be.onDestroy=function(ze){be.props.onDestroy(ze)},be.onKeyDown=function(ze){var Ze=ze.keyCode,pt=be.menuInstance,kt=be.props.store,jt=be.getVisible();if(Ze===u.a.ENTER)return be.onTitleClick(ze),wt(kt,be.props.eventKey,!0),!0;if(Ze===u.a.RIGHT)return jt?pt.onKeyDown(ze):(be.triggerOpenChange(!0),wt(kt,be.props.eventKey,!0)),!0;if(Ze===u.a.LEFT){var Yt;if(jt)Yt=pt.onKeyDown(ze);else return;return Yt||(be.triggerOpenChange(!1),Yt=!0),Yt}return jt&&(Ze===u.a.UP||Ze===u.a.DOWN)?pt.onKeyDown(ze):void 0},be.onOpenChange=function(ze){be.props.onOpenChange(ze)},be.onPopupVisibleChange=function(ze){be.triggerOpenChange(ze,ze?"mouseenter":"mouseleave")},be.onMouseEnter=function(ze){var Ze=be.props,pt=Ze.eventKey,kt=Ze.onMouseEnter,jt=Ze.store;wt(jt,be.props.eventKey,!1),kt({key:pt,domEvent:ze})},be.onMouseLeave=function(ze){var Ze=be.props,pt=Ze.parentMenu,kt=Ze.eventKey,jt=Ze.onMouseLeave;pt.subMenuInstance=Object(v.a)(be),jt({key:kt,domEvent:ze})},be.onTitleMouseEnter=function(ze){var Ze=be.props,pt=Ze.eventKey,kt=Ze.onItemHover,jt=Ze.onTitleMouseEnter;kt({key:pt,hover:!0}),jt({key:pt,domEvent:ze})},be.onTitleMouseLeave=function(ze){var Ze=be.props,pt=Ze.parentMenu,kt=Ze.eventKey,jt=Ze.onItemHover,Yt=Ze.onTitleMouseLeave;pt.subMenuInstance=Object(v.a)(be),jt({key:kt,hover:!1}),Yt({key:kt,domEvent:ze})},be.onTitleClick=function(ze){var Ze=Object(v.a)(be),pt=Ze.props;if(pt.onTitleClick({key:pt.eventKey,domEvent:ze}),pt.triggerSubMenuAction==="hover")return;be.triggerOpenChange(!be.getVisible(),"click"),wt(pt.store,be.props.eventKey,!1)},be.onSubMenuClick=function(ze){typeof be.props.onClick=="function"&&be.props.onClick(be.addKeyPath(ze))},be.onSelect=function(ze){be.props.onSelect(ze)},be.onDeselect=function(ze){be.props.onDeselect(ze)},be.getPrefixCls=function(){return"".concat(be.props.rootPrefixCls,"-submenu")},be.getActiveClassName=function(){return"".concat(be.getPrefixCls(),"-active")},be.getDisabledClassName=function(){return"".concat(be.getPrefixCls(),"-disabled")},be.getSelectedClassName=function(){return"".concat(be.getPrefixCls(),"-selected")},be.getOpenClassName=function(){return"".concat(be.props.rootPrefixCls,"-submenu-open")},be.getVisible=function(){return be.state.isOpen},be.getMode=function(){return be.state.mode},be.saveMenuInstance=function(ze){be.menuInstance=ze},be.addKeyPath=function(ze){return Object(M.a)(Object(M.a)({},ze),{},{keyPath:(ze.keyPath||[]).concat(be.props.eventKey)})},be.triggerOpenChange=function(ze,Ze){var pt=be.props.eventKey,kt=function(){be.onOpenChange({key:pt,item:Object(v.a)(be),trigger:Ze,open:ze})};Ze==="mouseenter"?be.mouseenterTimeout=setTimeout(function(){kt()},0):kt()},be.isChildrenSelected=function(){var ze={find:!1};return X(be.props.children,be.props.selectedKeys,ze),ze.find},be.isInlineMode=function(){return be.getMode()==="inline"},be.adjustWidth=function(){if(!be.subMenuTitle||!be.menuInstance)return;var ze=qe.findDOMNode(be.menuInstance);if(ze.offsetWidth>=be.subMenuTitle.offsetWidth)return;ze.style.minWidth="".concat(be.subMenuTitle.offsetWidth,"px")},be.saveSubMenuTitle=function(ze){be.subMenuTitle=ze},be.getBaseProps=function(){var ze=Object(v.a)(be),Ze=ze.props,pt=be.getMode();return{mode:pt==="horizontal"?"vertical":pt,visible:be.getVisible(),level:Ze.level+1,inlineIndent:Ze.inlineIndent,focusable:!1,onClick:be.onSubMenuClick,onSelect:be.onSelect,onDeselect:be.onDeselect,onDestroy:be.onDestroy,selectedKeys:Ze.selectedKeys,eventKey:"".concat(Ze.eventKey,"-menu-"),openKeys:Ze.openKeys,motion:Ze.motion,onOpenChange:be.onOpenChange,subMenuOpenDelay:Ze.subMenuOpenDelay,parentMenu:Object(v.a)(be),subMenuCloseDelay:Ze.subMenuCloseDelay,forceSubMenuRender:Ze.forceSubMenuRender,triggerSubMenuAction:Ze.triggerSubMenuAction,builtinPlacements:Ze.builtinPlacements,defaultActiveFirst:Ze.store.getState().defaultActiveFirst[ie(Ze.eventKey)],multiple:Ze.multiple,prefixCls:Ze.rootPrefixCls,id:be.internalMenuId,manualRef:be.saveMenuInstance,itemIcon:Ze.itemIcon,expandIcon:Ze.expandIcon,direction:Ze.direction}},be.getMotion=function(ze,Ze){var pt=Object(v.a)(be),kt=pt.haveRendered,jt=be.props,Yt=jt.motion,kr=jt.rootPrefixCls,Jr=Object(M.a)(Object(M.a)({},Yt),{},{leavedClassName:"".concat(kr,"-hidden"),removeOnLeave:!1,motionAppear:kt||!Ze||ze!=="inline"});return Jr};var De=Fe.store,we=Fe.eventKey,je=De.getState(),Ge=je.defaultActiveFirst;be.isRootMenu=!1;var Xe=!1;return Ge&&(Xe=Ge[we]),wt(De,we,Xe),be.state={mode:Fe.mode,isOpen:Fe.isOpen},be}return Object(C.a)(Qe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var be=this,De=this.props,we=De.mode,je=De.parentMenu,Ge=De.manualRef,Xe=De.isOpen,ze=function(){be.setState({mode:we,isOpen:Xe})},Ze=Xe!==this.state.isOpen,pt=we!==this.state.mode;if((pt||Ze)&&(ut.a.cancel(this.updateStateRaf),pt?this.updateStateRaf=Object(ut.a)(ze):ze()),Ge&&Ge(this),we!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!Xe)return;this.minWidthTimeout=setTimeout(function(){return be.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var be=this.props,De=be.onDestroy,we=be.eventKey;De&&De(we),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ut.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(be,De){var we=this.getBaseProps();return m.createElement(Ar,Object(f.a)({},we,{id:this.internalMenuId,className:be,style:De}),this.props.children)}},{key:"renderChildren",value:function(){var be=this,De=this.getBaseProps(),we=De.mode,je=De.visible,Ge=De.forceSubMenuRender,Xe=De.direction,ze=this.getMotion(we,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||Ge,!this.haveOpened)return m.createElement("div",null);var Ze=T()("".concat(De.prefixCls,"-sub"),Object(N.a)({},"".concat(De.prefixCls,"-rtl"),Xe==="rtl"));return this.isInlineMode()?m.createElement(ge,Object(f.a)({visible:De.visible,forceRender:Ge},ze),function(pt){var kt=pt.className,jt=pt.style,Yt=T()(Ze,kt);return be.renderPopupMenu(Yt,jt)}):this.renderPopupMenu(Ze)}},{key:"render",value:function(){var be,De,we,je=Object(M.a)({},this.props),Ge=this.getVisible(),Xe=this.getPrefixCls(),ze=this.isInlineMode(),Ze=this.getMode(),pt=T()(Xe,"".concat(Xe,"-").concat(Ze),(be={},Object(N.a)(be,je.className,!!je.className),Object(N.a)(be,this.getOpenClassName(),Ge),Object(N.a)(be,this.getActiveClassName(),je.active||Ge&&!ze),Object(N.a)(be,this.getDisabledClassName(),je.disabled),Object(N.a)(be,this.getSelectedClassName(),this.isChildrenSelected()),be));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(et+=1,this.internalMenuId="$__$".concat(et,"$Menu")));var kt={},jt={},Yt={};je.disabled||(kt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},jt={onClick:this.onTitleClick},Yt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var kr={},Jr=je.direction,$r=Jr==="rtl";ze&&($r?kr.paddingRight=je.inlineIndent*je.level:kr.paddingLeft=je.inlineIndent*je.level);var Zr={};this.getVisible()&&(Zr={"aria-owns":this.internalMenuId});var Hr=null;Ze!=="horizontal"&&(Hr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Hr=m.createElement(this.props.expandIcon,Object(M.a)({},this.props))));var rn=m.createElement("div",Object(f.a)({ref:this.saveSubMenuTitle,style:kr,className:"".concat(Xe,"-title"),role:"button"},Yt,jt,{"aria-expanded":Ge},Zr,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,Hr||m.createElement("i",{className:"".concat(Xe,"-arrow")})),nn=this.renderChildren(),yn=((De=je.parentMenu)===null||De===void 0?void 0:De.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Cn){return Cn.parentNode},cn=mt[Ze],In=je.popupOffset?{offset:je.popupOffset}:{},fn=T()((we={},Object(N.a)(we,je.popupClassName,je.popupClassName&&!ze),Object(N.a)(we,"".concat(Xe,"-rtl"),$r),we)),Mr=je.disabled,Fr=je.triggerSubMenuAction,sn=je.subMenuOpenDelay,gn=je.forceSubMenuRender,wr=je.subMenuCloseDelay,xn=je.builtinPlacements;Q.forEach(function(Cn){return delete je[Cn]}),delete je.onClick;var zn=$r?Object(M.a)(Object(M.a)({},ha),xn):Object(M.a)(Object(M.a)({},ji),xn);delete je.direction;var Sn=this.getBaseProps(),Ln=ze?null:this.getMotion(Sn.mode,Sn.visible);return m.createElement("li",Object(f.a)({},je,kt,{className:pt,role:"menuitem"}),m.createElement(Li,{prefixCls:Xe,popupClassName:T()("".concat(Xe,"-popup"),fn),getPopupContainer:yn,builtinPlacements:zn,popupPlacement:cn,popupVisible:ze?!1:Ge,popupAlign:In,popup:ze?null:nn,action:Mr||ze?[]:[Fr],mouseEnterDelay:sn,mouseLeaveDelay:wr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:gn,popupMotion:Ln},rn),ze?nn:null)}}]),Qe}(m.Component);Lt.defaultProps={onMouseEnter:ne,onMouseLeave:ne,onTitleMouseEnter:ne,onTitleMouseLeave:ne,onTitleClick:ne,manualRef:ne,mode:"vertical",title:""};var Dt=Object(w.b)(function(Pe,Ve){var Qe=Pe.openKeys,Fe=Pe.activeKey,be=Pe.selectedKeys,De=Ve.eventKey,we=Ve.subMenuKey;return{isOpen:Qe.indexOf(De)>-1,active:Fe[we]===De,selectedKeys:be}})(Lt);Dt.isSubMenu=!0;var Kt=Dt,zt="menuitem-overflowed",ht=.5,Ot=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(){var Fe;return Object(R.a)(this,Qe),Fe=Ve.apply(this,arguments),Fe.resizeObserver=null,Fe.mutationObserver=null,Fe.originalTotalWidth=0,Fe.overflowedItems=[],Fe.menuItemSizes=[],Fe.cancelFrameId=null,Fe.state={lastVisibleIndex:void 0},Fe.childRef=m.createRef(),Fe.getMenuItemNodes=function(){var be=Fe.props.prefixCls,De=Fe.childRef.current;return De?[].slice.call(De.children).filter(function(we){return we.className.split(" ").indexOf("".concat(be,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(be,De,we){var je=Fe.props,Ge=je.overflowedIndicator,Xe=je.level,ze=je.mode,Ze=je.prefixCls,pt=je.theme;if(Xe!==1||ze!=="horizontal")return null;var kt=Fe.props.children[0],jt=kt.props,Yt=jt.children,kr=jt.title,Jr=jt.style,$r=Object(O.a)(jt,["children","title","style"]),Zr=Object(M.a)({},Jr),Hr="".concat(be,"-overflowed-indicator"),rn="".concat(be,"-overflowed-indicator");De.length===0&&we!==!0?Zr=Object(M.a)(Object(M.a)({},Zr),{},{display:"none"}):we&&(Zr=Object(M.a)(Object(M.a)({},Zr),{},{visibility:"hidden",position:"absolute"}),Hr="".concat(Hr,"-placeholder"),rn="".concat(rn,"-placeholder"));var nn=pt?"".concat(Ze,"-").concat(pt):"",yn={};return Q.forEach(function(cn){$r[cn]!==void 0&&(yn[cn]=$r[cn])}),m.createElement(Kt,Object(f.a)({title:Ge,className:"".concat(Ze,"-overflowed-submenu"),popupClassName:nn},yn,{key:Hr,eventKey:rn,disabled:!1,style:Zr}),De)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var be=Fe.childRef.current;if(!be)return;var De=be.children;if(!De||De.length===0)return;var we=be.children[De.length-1];ve(we,"display","inline-block");var je=Fe.getMenuItemNodes(),Ge=je.filter(function(Xe){return Xe.className.split(" ").indexOf(zt)>=0});Ge.forEach(function(Xe){ve(Xe,"display","inline-block")}),Fe.menuItemSizes=je.map(function(Xe){return _e(Xe,!0)}),Ge.forEach(function(Xe){ve(Xe,"display","none")}),Fe.overflowedIndicatorWidth=_e(be.children[be.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(Xe,ze){return Xe+ze},0),Fe.handleResize(),ve(we,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var be=Fe.childRef.current;if(!be)return;var De=_e(be);Fe.overflowedItems=[];var we=0,je;Fe.originalTotalWidth>De+ht&&(je=-1,Fe.menuItemSizes.forEach(function(Ge){we+=Ge,we+Fe.overflowedIndicatorWidth<=De&&(je+=1)})),Fe.setState({lastVisibleIndex:je})},Fe}return Object(C.a)(Qe,[{key:"componentDidMount",value:function(){var be=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var De=this.childRef.current;if(!De)return;this.resizeObserver=new Je.default(function(we){we.forEach(function(){var je=be.cancelFrameId;cancelAnimationFrame(je),be.cancelFrameId=requestAnimationFrame(be.setChildrenWidthAndResize)})}),[].slice.call(De.children).concat(De).forEach(function(we){be.resizeObserver.observe(we)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){be.resizeObserver.disconnect(),[].slice.call(De.children).concat(De).forEach(function(we){be.resizeObserver.observe(we)}),be.setChildrenWidthAndResize()}),this.mutationObserver.observe(De,{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(be){var De=this,we=this.state.lastVisibleIndex;return(be||[]).reduce(function(je,Ge,Xe){var ze=Ge;if(De.props.mode==="horizontal"){var Ze=De.getOverflowedSubMenuItem(Ge.props.eventKey,[]);we!==void 0&&De.props.className.indexOf("".concat(De.props.prefixCls,"-root"))!==-1&&(Xe>we&&(ze=m.cloneElement(Ge,{style:{display:"none"},eventKey:"".concat(Ge.props.eventKey,"-hidden"),className:"".concat(zt)})),Xe===we+1&&(De.overflowedItems=be.slice(we+1).map(function(kt){return m.cloneElement(kt,{key:kt.props.eventKey,mode:"vertical-left"})}),Ze=De.getOverflowedSubMenuItem(Ge.props.eventKey,De.overflowedItems)));var pt=[].concat(Object(d.a)(je),[Ze,ze]);return Xe===be.length-1&&pt.push(De.getOverflowedSubMenuItem(Ge.props.eventKey,[],!0)),pt}return[].concat(Object(d.a)(je),[ze])},[])}},{key:"render",value:function(){var be=this.props,De=be.visible,we=be.prefixCls,je=be.overflowedIndicator,Ge=be.mode,Xe=be.level,ze=be.tag,Ze=be.children,pt=be.theme,kt=Object(O.a)(be,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),jt=ze;return m.createElement(jt,Object(f.a)({ref:this.childRef},kt),this.renderChildren(Ze))}}]),Qe}(m.Component);Ot.defaultProps={tag:"div",className:""};var Rt=Ot;function ur(Pe){return Pe.length?Pe.every(function(Ve){return!!Ve.props.disabled}):!0}function ar(Pe,Ve,Qe){var Fe=Pe.getState();Pe.setState({activeKey:Object(M.a)(Object(M.a)({},Fe.activeKey),{},Object(N.a)({},Ve,Qe))})}function Zt(Pe){return Pe.eventKey||"0-menu-"}function $t(Pe,Ve){var Qe=Ve,Fe=Pe.children,be=Pe.eventKey;if(Qe){var De;if(Z(Fe,function(we,je){we&&we.props&&!we.props.disabled&&Qe===Te(we,be,je)&&(De=!0)}),De)return Qe}return Qe=null,Pe.defaultActiveFirst&&Z(Fe,function(we,je){!Qe&&we&&!we.props.disabled&&(Qe=Te(we,be,je))}),Qe}function rr(Pe){if(!Pe)return;var Ve=this.instanceArray.indexOf(Pe);Ve!==-1?this.instanceArray[Ve]=Pe:this.instanceArray.push(Pe)}var sr=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(Fe){var be;return Object(R.a)(this,Qe),be=Ve.call(this,Fe),be.onKeyDown=function(De,we){var je=De.keyCode,Ge;if(be.getFlatInstanceArray().forEach(function(ze){ze&&ze.props.active&&ze.onKeyDown&&(Ge=ze.onKeyDown(De))}),Ge)return 1;var Xe=null;return(je===u.a.UP||je===u.a.DOWN)&&(Xe=be.step(je===u.a.UP?-1:1)),Xe?(De.preventDefault(),ar(be.props.store,Zt(be.props),Xe.props.eventKey),typeof we=="function"&&we(Xe),1):void 0},be.onItemHover=function(De){var we=De.key,je=De.hover;ar(be.props.store,Zt(be.props),je?we:null)},be.onDeselect=function(De){be.props.onDeselect(De)},be.onSelect=function(De){be.props.onSelect(De)},be.onClick=function(De){be.props.onClick(De)},be.onOpenChange=function(De){be.props.onOpenChange(De)},be.onDestroy=function(De){be.props.onDestroy(De)},be.getFlatInstanceArray=function(){return be.instanceArray},be.step=function(De){var we=be.getFlatInstanceArray(),je=be.props.store.getState().activeKey[Zt(be.props)],Ge=we.length;if(!Ge)return null;De<0&&(we=we.concat().reverse());var Xe=-1;if(we.every(function(kt,jt){return kt&&kt.props.eventKey===je?(Xe=jt,!1):!0}),!be.props.defaultActiveFirst&&Xe!==-1&&ur(we.slice(Xe,Ge-1)))return;var ze=(Xe+1)%Ge,Ze=ze;do{var pt=we[Ze];if(!pt||pt.props.disabled)Ze=(Ze+1)%Ge;else return pt}while(Ze!==ze);return null},be.renderCommonMenuItem=function(De,we,je){var Ge=be.props.store.getState(),Xe=Object(v.a)(be),ze=Xe.props,Ze=Te(De,ze.eventKey,we),pt=De.props;if(!pt||typeof De.type=="string")return De;var kt=Ze===Ge.activeKey,jt=Object(M.a)(Object(M.a)({mode:pt.mode||ze.mode,level:ze.level,inlineIndent:ze.inlineIndent,renderMenuItem:be.renderMenuItem,rootPrefixCls:ze.prefixCls,index:we,parentMenu:ze.parentMenu,manualRef:pt.disabled?void 0:Object(I.a)(De.ref,rr.bind(Object(v.a)(be))),eventKey:Ze,active:!pt.disabled&&kt,multiple:ze.multiple,onClick:function(kr){(pt.onClick||ne)(kr),be.onClick(kr)},onItemHover:be.onItemHover,motion:ze.motion,subMenuOpenDelay:ze.subMenuOpenDelay,subMenuCloseDelay:ze.subMenuCloseDelay,forceSubMenuRender:ze.forceSubMenuRender,onOpenChange:be.onOpenChange,onDeselect:be.onDeselect,onSelect:be.onSelect,builtinPlacements:ze.builtinPlacements,itemIcon:pt.itemIcon||be.props.itemIcon,expandIcon:pt.expandIcon||be.props.expandIcon},je),{},{direction:ze.direction});return(ze.mode==="inline"||Re())&&(jt.triggerSubMenuAction="click"),m.cloneElement(De,Object(M.a)(Object(M.a)({},jt),{},{key:Ze||we}))},be.renderMenuItem=function(De,we,je){if(!De)return null;var Ge=be.props.store.getState(),Xe={openKeys:Ge.openKeys,selectedKeys:Ge.selectedKeys,triggerSubMenuAction:be.props.triggerSubMenuAction,subMenuKey:je};return be.renderCommonMenuItem(De,we,Xe)},Fe.store.setState({activeKey:Object(M.a)(Object(M.a)({},Fe.store.getState().activeKey),{},Object(N.a)({},Fe.eventKey,$t(Fe,Fe.activeKey)))}),be.instanceArray=[],be}return Object(C.a)(Qe,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(be){return this.props.visible||be.visible||this.props.className!==be.className||!V()(this.props.style,be.style)}},{key:"componentDidUpdate",value:function(be){var De=this.props,we="activeKey"in De?De.activeKey:De.store.getState().activeKey[Zt(De)],je=$t(De,we);if(je!==we)ar(De.store,Zt(De),je);else if("activeKey"in be){var Ge=$t(be,be.activeKey);je!==Ge&&ar(De.store,Zt(De),je)}}},{key:"render",value:function(){var be=this,De=Object(f.a)({},this.props);this.instanceArray=[];var we=T()(De.prefixCls,De.className,"".concat(De.prefixCls,"-").concat(De.mode)),je={className:we,role:De.role||"menu"};De.id&&(je.id=De.id),De.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var Ge=De.prefixCls,Xe=De.eventKey,ze=De.visible,Ze=De.level,pt=De.mode,kt=De.overflowedIndicator,jt=De.theme;return Q.forEach(function(Yt){return delete De[Yt]}),delete De.onClick,m.createElement(Rt,Object(f.a)({},De,{prefixCls:Ge,mode:pt,tag:"ul",level:Ze,theme:jt,visible:ze,overflowedIndicator:kt},je),Object(b.a)(De.children).map(function(Yt,kr){return be.renderMenuItem(Yt,kr,Xe||"0-menu-")}))}}]),Qe}(m.Component);sr.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ne};var ot=Object(w.b)()(sr),Ar=ot,Nr=j("Kwbf");function fr(Pe,Ve,Qe){var Fe=Pe.prefixCls,be=Pe.motion,De=Pe.defaultMotions,we=De===void 0?{}:De,je=Pe.openAnimation,Ge=Pe.openTransitionName,Xe=Ve.switchingModeFromInline;if(be)return be;if(Object(W.a)(je)==="object"&&je)Object(Nr.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Fe,"-open-").concat(je)};if(Ge)return{motionName:Ge};var ze=we[Qe];return ze||(Xe?null:we.other)}var _t=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(Fe){var be;Object(R.a)(this,Qe),be=Ve.call(this,Fe),be.onSelect=function(je){var Ge=Object(v.a)(be),Xe=Ge.props;if(Xe.selectable){var ze=be.store.getState(),Ze=ze.selectedKeys,pt=je.key;Xe.multiple?Ze=Ze.concat([pt]):Ze=[pt],"selectedKeys"in Xe||be.store.setState({selectedKeys:Ze}),Xe.onSelect(Object(M.a)(Object(M.a)({},je),{},{selectedKeys:Ze}))}},be.onClick=function(je){var Ge=be.getRealMenuMode(),Xe=Object(v.a)(be),ze=Xe.store,Ze=Xe.props.onOpenChange;Ge!=="inline"&&!("openKeys"in be.props)&&(ze.setState({openKeys:[]}),Ze([])),be.props.onClick(je)},be.onKeyDown=function(je,Ge){be.innerMenu.getWrappedInstance().onKeyDown(je,Ge)},be.onOpenChange=function(je){var Ge=Object(v.a)(be),Xe=Ge.props,ze=be.store.getState().openKeys.concat(),Ze=!1,pt=function(jt){var Yt=!1;if(jt.open)Yt=ze.indexOf(jt.key)===-1,Yt&&ze.push(jt.key);else{var kr=ze.indexOf(jt.key);Yt=kr!==-1,Yt&&ze.splice(kr,1)}Ze=Ze||Yt};Array.isArray(je)?je.forEach(pt):pt(je),Ze&&("openKeys"in be.props||be.store.setState({openKeys:ze}),Xe.onOpenChange(ze))},be.onDeselect=function(je){var Ge=Object(v.a)(be),Xe=Ge.props;if(Xe.selectable){var ze=be.store.getState().selectedKeys.concat(),Ze=je.key,pt=ze.indexOf(Ze);pt!==-1&&ze.splice(pt,1),"selectedKeys"in Xe||be.store.setState({selectedKeys:ze}),Xe.onDeselect(Object(M.a)(Object(M.a)({},je),{},{selectedKeys:ze}))}},be.onMouseEnter=function(je){be.restoreModeVerticalFromInline();var Ge=be.props.onMouseEnter;Ge&&Ge(je)},be.onTransitionEnd=function(je){var Ge=je.propertyName==="width"&&je.target===je.currentTarget,Xe=je.target.className,ze=Object.prototype.toString.call(Xe)==="[object SVGAnimatedString]"?Xe.animVal:Xe,Ze=je.propertyName==="font-size"&&ze.indexOf("anticon")>=0;(Ge||Ze)&&be.restoreModeVerticalFromInline()},be.setInnerMenu=function(je){be.innerMenu=je},be.isRootMenu=!0;var De=Fe.defaultSelectedKeys,we=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(De=Fe.selectedKeys||[]),"openKeys"in Fe&&(we=Fe.openKeys||[]),be.store=Object(w.c)({selectedKeys:De,openKeys:we,activeKey:{"0-menu-":$t(Fe,Fe.activeKey)}}),be.state={switchingModeFromInline:!1,prevProps:Fe,inlineOpenKeys:[],store:be.store},be}return Object(C.a)(Qe,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(be){var De=this.props,we=De.siderCollapsed,je=De.inlineCollapsed,Ge=De.onOpenChange;(!be.inlineCollapsed&&je||!be.siderCollapsed&&we)&&Ge([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var be=this.props.collapsedWidth,De=this.store,we=this.prevOpenKeys,je=this.getInlineCollapsed()&&(be===0||be==="0"||be==="0px");je?(this.prevOpenKeys=De.getState().openKeys.concat(),this.store.setState({openKeys:[]})):we&&(this.store.setState({openKeys:we}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var be=this.props.mode,De=this.state.switchingModeFromInline,we=this.getInlineCollapsed();return De&&we?"inline":we?"vertical":be}},{key:"getInlineCollapsed",value:function(){var be=this.props,De=be.inlineCollapsed,we=be.siderCollapsed;return we!==void 0?we:De}},{key:"restoreModeVerticalFromInline",value:function(){var be=this.state.switchingModeFromInline;be&&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 be=Object(M.a)({},Object(k.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),De=this.getRealMenuMode();return be.className+=" ".concat(be.prefixCls,"-root"),be.direction==="rtl"&&(be.className+=" ".concat(be.prefixCls,"-rtl")),be=Object(M.a)(Object(M.a)({},be),{},{mode:De,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:fr(this.props,this.state,De)}),delete be.openAnimation,delete be.openTransitionName,m.createElement(w.a,{store:this.store},m.createElement(Ar,Object(f.a)({},be,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(be,De){var we=De.prevProps,je=De.store,Ge=je.getState(),Xe={},ze={prevProps:be};return we.mode==="inline"&&be.mode!=="inline"&&(ze.switchingModeFromInline=!0),"openKeys"in be?Xe.openKeys=be.openKeys||[]:((be.inlineCollapsed&&!we.inlineCollapsed||be.siderCollapsed&&!we.siderCollapsed)&&(ze.switchingModeFromInline=!0,ze.inlineOpenKeys=Ge.openKeys,Xe.openKeys=[]),(!be.inlineCollapsed&&we.inlineCollapsed||!be.siderCollapsed&&we.siderCollapsed)&&(Xe.openKeys=De.inlineOpenKeys,ze.inlineOpenKeys=[])),Object.keys(Xe).length&&je.setState(Xe),ze}}]),Qe}(m.Component);_t.defaultProps={selectable:!0,onClick:ne,onSelect:ne,onOpenChange:ne,onDeselect:ne,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:m.createElement("span",null,"\xB7\xB7\xB7")};var It=_t,Et=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(){var Fe;return Object(R.a)(this,Qe),Fe=Ve.apply(this,arguments),Fe.onKeyDown=function(be){var De=be.keyCode;return De===u.a.ENTER?(Fe.onClick(be),!0):void 0},Fe.onMouseLeave=function(be){var De=Fe.props,we=De.eventKey,je=De.onItemHover,Ge=De.onMouseLeave;je({key:we,hover:!1}),Ge({key:we,domEvent:be})},Fe.onMouseEnter=function(be){var De=Fe.props,we=De.eventKey,je=De.onItemHover,Ge=De.onMouseEnter;je({key:we,hover:!0}),Ge({key:we,domEvent:be})},Fe.onClick=function(be){var De=Fe.props,we=De.eventKey,je=De.multiple,Ge=De.onClick,Xe=De.onSelect,ze=De.onDeselect,Ze=De.isSelected,pt={key:we,keyPath:[we],item:Object(v.a)(Fe),domEvent:be};Ge(pt),je?Ze?ze(pt):Xe(pt):Ze||Xe(pt)},Fe.saveNode=function(be){Fe.node=be},Fe}return Object(C.a)(Qe,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var be=this.props;be.onDestroy&&be.onDestroy(be.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 be,De=Object(M.a)({},this.props),we=T()(this.getPrefixCls(),De.className,(be={},Object(N.a)(be,this.getActiveClassName(),!De.disabled&&De.active),Object(N.a)(be,this.getSelectedClassName(),De.isSelected),Object(N.a)(be,this.getDisabledClassName(),De.disabled),be)),je=Object(M.a)(Object(M.a)({},De.attribute),{},{title:typeof De.title=="string"?De.title:void 0,className:we,role:De.role||"menuitem","aria-disabled":De.disabled});De.role==="option"?je=Object(M.a)(Object(M.a)({},je),{},{role:"option","aria-selected":De.isSelected}):(De.role===null||De.role==="none")&&(je.role="none");var Ge={onClick:De.disabled?null:this.onClick,onMouseLeave:De.disabled?null:this.onMouseLeave,onMouseEnter:De.disabled?null:this.onMouseEnter},Xe=Object(M.a)({},De.style);De.mode==="inline"&&(De.direction==="rtl"?Xe.paddingRight=De.inlineIndent*De.level:Xe.paddingLeft=De.inlineIndent*De.level),Q.forEach(function(Ze){return delete De[Ze]}),delete De.direction;var ze=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ze=m.createElement(this.props.itemIcon,this.props)),m.createElement("li",Object(f.a)({},Object(k.a)(De,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,Ge,{style:Xe,ref:this.saveNode}),De.children,ze)}}]),Qe}(m.Component);Et.isMenuItem=!0,Et.defaultProps={onSelect:ne,onMouseEnter:ne,onMouseLeave:ne,manualRef:ne};var Nt=Object(w.b)(function(Pe,Ve){var Qe=Pe.activeKey,Fe=Pe.selectedKeys,be=Ve.eventKey,De=Ve.subMenuKey;return{active:Qe[De]===be,isSelected:Array.isArray(Fe)?Fe.indexOf(be)!==-1:Fe===be}})(Et),qt=Nt,pr=function(Pe){Object(_.a)(Qe,Pe);var Ve=Object(E.a)(Qe);function Qe(){var Fe;return Object(R.a)(this,Qe),Fe=Ve.apply(this,arguments),Fe.renderInnerMenuItem=function(be){var De=Fe.props,we=De.renderMenuItem,je=De.index;return we(be,je,Fe.props.subMenuKey)},Fe}return Object(C.a)(Qe,[{key:"render",value:function(){var be=Object(f.a)({},this.props),De=be.className,we=De===void 0?"":De,je=be.rootPrefixCls,Ge="".concat(je,"-item-group-title"),Xe="".concat(je,"-item-group-list"),ze=be.title,Ze=be.children;return Q.forEach(function(pt){return delete be[pt]}),delete be.direction,m.createElement("li",Object(f.a)({},be,{onClick:function(kt){return kt.stopPropagation()},className:"".concat(we," ").concat(je,"-item-group")}),m.createElement("div",{className:Ge,title:typeof ze=="string"?ze:void 0},ze),m.createElement("ul",{className:Xe},m.Children.map(Ze,this.renderInnerMenuItem)))}}]),Qe}(m.Component);pr.isMenuItemGroup=!0,pr.defaultProps={disabled:!0};var er=pr,Rr=function(Ve){var Qe=Ve.className,Fe=Ve.rootPrefixCls,be=Ve.style;return m.createElement("li",{className:"".concat(Qe," ").concat(Fe,"-item-divider"),style:be})};Rr.defaultProps={disabled:!0,className:"",style:{}};var Ur=Rr,br=It,it=j("eDIo");function Gt(Pe,Ve){var Qe=Pe.prefixCls,Fe=Pe.editable,be=Pe.locale,De=Pe.style;return!Fe||Fe.showAdd===!1?null:m.createElement("button",{ref:Ve,type:"button",className:"".concat(Qe,"-nav-add"),style:De,"aria-label":(be==null?void 0:be.addAriaLabel)||"Add tab",onClick:function(je){Fe.onEdit("add",{event:je})}},Fe.addIcon||"+")}var ln=m.forwardRef(Gt);function en(Pe,Ve){var Qe=Pe.prefixCls,Fe=Pe.id,be=Pe.tabs,De=Pe.locale,we=Pe.mobile,je=Pe.moreIcon,Ge=je===void 0?"More":je,Xe=Pe.moreTransitionName,ze=Pe.style,Ze=Pe.className,pt=Pe.editable,kt=Pe.tabBarGutter,jt=Pe.rtl,Yt=Pe.onTabClick,kr=Object(m.useState)(!1),Jr=Object(g.a)(kr,2),$r=Jr[0],Zr=Jr[1],Hr=Object(m.useState)(null),rn=Object(g.a)(Hr,2),nn=rn[0],yn=rn[1],cn="".concat(Fe,"-more-popup"),In="".concat(Qe,"-dropdown"),fn=nn!==null?"".concat(cn,"-").concat(nn):null,Mr=De==null?void 0:De.dropdownAriaLabel,Fr=m.createElement(br,{onClick:function(Ln){var Cn=Ln.key,Jn=Ln.domEvent;Yt(Cn,Jn),Zr(!1)},id:cn,tabIndex:-1,role:"listbox","aria-activedescendant":fn,selectedKeys:[nn],"aria-label":Mr!==void 0?Mr:"expanded dropdown"},be.map(function(Sn){return m.createElement(qt,{key:Sn.key,id:"".concat(cn,"-").concat(Sn.key),role:"option","aria-controls":Fe&&"".concat(Fe,"-panel-").concat(Sn.key),disabled:Sn.disabled},Sn.tab)}));function sn(Sn){for(var Ln=be.filter(function(fi){return!fi.disabled}),Cn=Ln.findIndex(function(fi){return fi.key===nn})||0,Jn=Ln.length,ii=0;iixn?(gn=Fr,cn.current="x"):(gn=sn,cn.current="y");var zn=Date.now();zn-nn.current>100&&(yn.current=!1),(Ve(-gn,-gn)||yn.current)&&(Mr.preventDefault(),yn.current=!0),nn.current=zn}var fn=Object(m.useRef)(null);fn.current={onTouchStart:Zr,onTouchMove:Hr,onTouchEnd:rn,onWheel:In},m.useEffect(function(){function Mr(wr){fn.current.onTouchStart(wr)}function Fr(wr){fn.current.onTouchMove(wr)}function sn(wr){fn.current.onTouchEnd(wr)}function gn(wr){fn.current.onWheel(wr)}return document.addEventListener("touchmove",Fr,{passive:!1}),document.addEventListener("touchend",sn,{passive:!1}),Pe.current.addEventListener("touchstart",Mr,{passive:!1}),Pe.current.addEventListener("wheel",gn),function(){document.removeEventListener("touchmove",Fr),document.removeEventListener("touchend",sn)}},[])}function bt(){var Pe=Object(m.useRef)(new Map);function Ve(Fe){return Pe.current.has(Fe)||Pe.current.set(Fe,m.createRef()),Pe.current.get(Fe)}function Qe(Fe){Pe.current.delete(Fe)}return[Ve,Qe]}function Vt(Pe,Ve){var Qe=m.useRef(Pe),Fe=m.useState({}),be=Object(g.a)(Fe,2),De=be[1];function we(je){var Ge=typeof je=="function"?je(Qe.current):je;Ge!==Qe.current&&Ve(Ge,Qe.current),Qe.current=Ge,De({})}return[Qe.current,we]}var Mt=function(Ve){var Qe=Ve.position,Fe=Ve.prefixCls,be=Ve.extra;if(!be)return null;var De,we=be;return Qe==="right"&&(De=we.right||!we.left&&we||null),Qe==="left"&&(De=we.left||null),De?m.createElement("div",{className:"".concat(Fe,"-extra-content")},De):null};function Dr(Pe,Ve){var Qe,Fe=m.useContext(Ir),be=Fe.prefixCls,De=Fe.tabs,we=Pe.className,je=Pe.style,Ge=Pe.id,Xe=Pe.animated,ze=Pe.activeKey,Ze=Pe.rtl,pt=Pe.extra,kt=Pe.editable,jt=Pe.locale,Yt=Pe.tabPosition,kr=Pe.tabBarGutter,Jr=Pe.children,$r=Pe.onTabClick,Zr=Pe.onTabScroll,Hr=Object(m.useRef)(),rn=Object(m.useRef)(),nn=Object(m.useRef)(),yn=Object(m.useRef)(),cn=bt(),In=Object(g.a)(cn,2),fn=In[0],Mr=In[1],Fr=Yt==="top"||Yt==="bottom",sn=Vt(0,function(kn,Tn){Fr&&Zr&&Zr({direction:kn>Tn?"left":"right"})}),gn=Object(g.a)(sn,2),wr=gn[0],xn=gn[1],zn=Vt(0,function(kn,Tn){!Fr&&Zr&&Zr({direction:kn>Tn?"top":"bottom"})}),Sn=Object(g.a)(zn,2),Ln=Sn[0],Cn=Sn[1],Jn=Object(m.useState)(0),ii=Object(g.a)(Jn,2),Gn=ii[0],fi=ii[1],Xi=Object(m.useState)(0),Si=Object(g.a)(Xi,2),ai=Si[0],Pn=Si[1],Mn=Object(m.useState)(0),Kn=Object(g.a)(Mn,2),Bn=Kn[0],ei=Kn[1],Ai=Object(m.useState)(0),ra=Object(g.a)(Ai,2),An=ra[0],Fi=ra[1],Ui=Object(m.useState)(null),Dn=Object(g.a)(Ui,2),On=Dn[0],ti=Dn[1],Ba=Object(m.useState)(null),wa=Object(g.a)(Ba,2),sa=wa[0],la=wa[1],ka=Object(m.useState)(0),Ta=Object(g.a)(ka,2),La=Ta[0],Ha=Ta[1],Xa=Object(m.useState)(0),Pa=Object(g.a)(Xa,2),ua=Pa[0],Sa=Pa[1],ba=o(new Map),ca=Object(g.a)(ba,2),co=ca[0],_a=ca[1],Ca=t(De,co,Gn),da="".concat(be,"-nav-operations-hidden"),fa=0,Yi=0;Fr?Ze?(fa=0,Yi=Math.max(0,Gn-On)):(fa=Math.min(0,On-Gn),Yi=0):(fa=Math.min(0,sa-ai),Yi=0);function na(kn){return knYi?[Yi,!1]:[kn,!0]}var xr=Object(m.useRef)(),Tr=Object(m.useState)(),or=Object(g.a)(Tr,2),wn=or[0],hr=or[1];function pa(){hr(Date.now())}function Ya(){window.clearTimeout(xr.current)}gt(Hr,function(kn,Tn){var yi=!1;function Hi(Ma,ma){Ma(function(Ga){var Ea=na(Ga+ma),bi=Object(g.a)(Ea,2),Qa=bi[0],fo=bi[1];return yi=fo,Qa})}if(Fr){if(On>=Gn)return yi;Hi(xn,kn)}else{if(sa>=ai)return yi;Hi(Cn,Tn)}return Ya(),pa(),yi}),Object(m.useEffect)(function(){return Ya(),wn&&(xr.current=window.setTimeout(function(){hr(0)},100)),Ya},[wn]);function jn(){var kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ze,Tn=Ca.get(kn);if(!Tn)return;if(Fr){var yi=wr;Ze?Tn.rightwr+On&&(yi=Tn.right+Tn.width-On):Tn.left<-wr?yi=-Tn.left:Tn.left+Tn.width>-wr+On&&(yi=-(Tn.left+Tn.width-On)),Cn(0),xn(na(yi)[0])}else{var Hi=Ln;Tn.top<-Ln?Hi=-Tn.top:Tn.top+Tn.height>-Ln+sa&&(Hi=-(Tn.top+Tn.height-sa)),xn(0),Cn(na(Hi)[0])}}var Oa=x(Ca,{width:On,height:sa,left:wr,top:Ln},{width:Bn,height:An},{width:La,height:ua},Object(M.a)(Object(M.a)({},Pe),{},{tabs:De})),Io=Object(g.a)(Oa,2),Jo=Io[0],Qo=Io[1],Zo=De.map(function(kn){var Tn=kn.key;return m.createElement(s,{id:Ge,prefixCls:be,key:Tn,rtl:Ze,tab:kn,closable:kn.closable,editable:kt,active:Tn===ze,tabPosition:Yt,tabBarGutter:kr,renderWrapper:Jr,removeAriaLabel:jt==null?void 0:jt.removeAriaLabel,ref:fn(Tn),onClick:function(Hi){$r(Tn,Hi)},onRemove:function(){Mr(Tn)},onFocus:function(){jn(Tn),pa(),Ze||(Hr.current.scrollLeft=0),Hr.current.scrollTop=0}})}),ho=a(function(){var kn,Tn,yi,Hi,Ma,ma,Ga,Ea,bi,Qa=((kn=Hr.current)===null||kn===void 0?void 0:kn.offsetWidth)||0,fo=((Tn=Hr.current)===null||Tn===void 0?void 0:Tn.offsetHeight)||0,po=((yi=yn.current)===null||yi===void 0?void 0:yi.offsetWidth)||0,Wi=((Hi=yn.current)===null||Hi===void 0?void 0:Hi.offsetHeight)||0,Rn=((Ma=nn.current)===null||Ma===void 0?void 0:Ma.offsetWidth)||0,aa=((ma=nn.current)===null||ma===void 0?void 0:ma.offsetHeight)||0;ti(Qa),la(fo),Ha(po),Sa(Wi);var ga=(((Ga=rn.current)===null||Ga===void 0?void 0:Ga.offsetWidth)||0)-po,va=(((Ea=rn.current)===null||Ea===void 0?void 0:Ea.offsetHeight)||0)-Wi;fi(ga),Pn(va);var mo=(bi=nn.current)===null||bi===void 0?void 0:bi.className.includes(da);ei(ga-(mo?0:Rn)),Fi(va-(mo?0:aa)),_a(function(){var Za=new Map;return De.forEach(function(Mo){var No=Mo.key,Ra=fn(No).current;Ra&&Za.set(No,{width:Ra.offsetWidth,height:Ra.offsetHeight,left:Ra.offsetLeft,top:Ra.offsetTop})}),Za})}),qo=De.slice(0,Jo),Bi=De.slice(Qo+1),si=[].concat(Object(d.a)(qo),Object(d.a)(Bi)),Ri=Object(m.useState)(),li=Object(g.a)(Ri,2),Wa=li[0],es=li[1],ia=Ca.get(ze),Do=Object(m.useRef)();function ko(){c.a.cancel(Do.current)}Object(m.useEffect)(function(){var kn={};return ia&&(Fr?(Ze?kn.right=ia.right:kn.left=ia.left,kn.width=ia.width):(kn.top=ia.top,kn.height=ia.height)),ko(),Do.current=c()(function(){es(kn)}),ko},[ia,Fr,Ze]),Object(m.useEffect)(function(){jn()},[ze,ia,Ca,Fr]),Object(m.useEffect)(function(){ho()},[Ze,kr,ze,De.map(function(kn){return kn.key}).join("_")]);var Lo=!!si.length,Aa="".concat(be,"-nav-wrap"),$a,za,Po,Ja;return Fr?Ze?(za=wr>0,$a=wr+On>>7)^(R<<14|R>>>18)^R>>>3,v=d[f-2],_=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;d[f]=C+d[f-7]+_+d[f-16]}var E=l&t^~l&S,w=o&u^o&h^u&h,k=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),I=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),L=x+I+E+p[f]+d[f],V=k+w;x=S,S=t,t=l,l=s+L|0,s=h,h=u,u=o,o=L+V|0}a[0]=a[0]+o|0,a[1]=a[1]+u|0,a[2]=a[2]+h|0,a[3]=a[3]+s|0,a[4]=a[4]+l|0,a[5]=a[5]+t|0,a[6]=a[6]+S|0,a[7]=a[7]+x|0},_doFinalize:function(){var c=this._data,r=c.words,a=this._nDataBytes*8,o=c.sigBytes*8;return r[o>>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+14]=g.floor(a/4294967296),r[(o+64>>>9<<4)+15]=a,c.sigBytes=r.length*4,this._process(),this._hash},clone:function(){var c=y.clone.call(this);return c._hash=this._hash.clone(),c}});O.SHA256=y._createHelper(n),O.HmacSHA256=y._createHmacHelper(n)}(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(g,O){var M=N.getMode(g,"text/html"),m=M.name=="null";function y(B){if(N.findModeByName){var P=N.findModeByName(B);P&&(B=P.mime||P.mimes[0])}var z=N.getMode(g,B);return z.name=="null"?null:z}O.highlightFormatting===void 0&&(O.highlightFormatting=!1),O.maxBlockquoteDepth===void 0&&(O.maxBlockquoteDepth=0),O.taskLists===void 0&&(O.taskLists=!1),O.strikethrough===void 0&&(O.strikethrough=!1),O.emoji===void 0&&(O.emoji=!1),O.fencedCodeBlockHighlighting===void 0&&(O.fencedCodeBlockHighlighting=!0),O.fencedCodeBlockDefaultMode===void 0&&(O.fencedCodeBlockDefaultMode="text/plain"),O.xml===void 0&&(O.xml=!0),O.tokenTypeOverrides===void 0&&(O.tokenTypeOverrides={});var T={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 T)T.hasOwnProperty(b)&&O.tokenTypeOverrides[b]&&(T[b]=O.tokenTypeOverrides[b]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,d=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,c=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,r=/^ {0,3}(?:\={1,}|-{2,})\s*$/,a=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,u=/^\s*\[[^\]]+?\]:.*$/,h=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,s=" ";function l(B,P,z){return P.f=P.inline=z,z(B,P)}function t(B,P,z){return P.f=P.block=z,z(B,P)}function S(B){return!B||!/\S/.test(B.string)}function x(B){if(B.linkTitle=!1,B.linkHref=!1,B.linkText=!1,B.em=!1,B.strong=!1,B.strikethrough=!1,B.quote=0,B.indentedCode=!1,B.f==R){var P=m;if(!P){var z=N.innerMode(M,B.htmlState);P=z.mode.name=="xml"&&z.state.tagStart===null&&!z.state.context&&z.state.tokenize.isInText}P&&(B.f=E,B.block=f,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function f(B,P){var z=B.column()===P.indentation,J=S(P.prevLine.stream),ue=P.indentedCode,de=P.prevLine.hr,Se=P.list!==!1,Ae=(P.listStack[P.listStack.length-1]||0)+3;P.indentedCode=!1;var pe=P.indentation;if(P.indentationDiff===null&&(P.indentationDiff=P.indentation,Se)){for(P.list=null;pe=4&&(ue||P.prevLine.fencedCodeEnd||P.prevLine.header||J))return B.skipToEnd(),P.indentedCode=!0,T.code;if(B.eatSpace())return null;if(z&&P.indentation<=Ae&&(ce=B.match(c))&&ce[1].length<=6)return P.quote=0,P.header=ce[1].length,P.thisLine.header=!0,O.highlightFormatting&&(P.formatting="header"),P.f=P.inline,v(P);if(P.indentation<=Ae&&B.eat(">"))return P.quote=z?1:P.quote+1,O.highlightFormatting&&(P.formatting="quote"),B.eatSpace(),v(P);if(!ye&&!P.setext&&z&&P.indentation<=Ae&&(ce=B.match(d))){var ae=ce[1]?"ol":"ul";return P.indentation=pe+B.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,O.taskLists&&B.match(n,!1)&&(P.taskList=!0),P.f=P.inline,O.highlightFormatting&&(P.formatting=["list","list-"+ae]),v(P)}else{if(z&&P.indentation<=Ae&&(ce=B.match(o,!0)))return P.quote=0,P.fencedEndRE=new RegExp(ce[1]+"+ *$"),P.localMode=O.fencedCodeBlockHighlighting&&y(ce[2]||O.fencedCodeBlockDefaultMode),P.localMode&&(P.localState=N.startState(P.localMode)),P.f=P.block=C,O.highlightFormatting&&(P.formatting="code-block"),P.code=-1,v(P);if(P.setext||(!Oe||!Se)&&!P.quote&&P.list===!1&&!P.code&&!ye&&!u.test(B.string)&&(ce=B.lookAhead(1))&&(ce=ce.match(r)))return P.setext?(P.header=P.setext,P.setext=0,B.skipToEnd(),O.highlightFormatting&&(P.formatting="header")):(P.header=ce[0].charAt(0)=="="?1:2,P.setext=P.header),P.thisLine.header=!0,P.f=P.inline,v(P);if(ye)return B.skipToEnd(),P.hr=!0,P.thisLine.hr=!0,T.hr;if(B.peek()==="[")return l(B,P,V)}return l(B,P,P.inline)}function R(B,P){var z=M.token(B,P.htmlState);if(!m){var J=N.innerMode(M,P.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||P.md_inside&&B.current().indexOf(">")>-1)&&(P.f=E,P.block=f,P.htmlState=null)}return z}function C(B,P){var z=P.listStack[P.listStack.length-1]||0,J=P.indentation=B.quote?P.push(T.formatting+"-"+B.formatting[z]+"-"+B.quote):P.push("error"))}if(B.taskOpen)return P.push("meta"),P.length?P.join(" "):null;if(B.taskClosed)return P.push("property"),P.length?P.join(" "):null;if(B.linkHref?P.push(T.linkHref,"url"):(B.strong&&P.push(T.strong),B.em&&P.push(T.em),B.strikethrough&&P.push(T.strikethrough),B.emoji&&P.push(T.emoji),B.linkText&&P.push(T.linkText),B.code&&P.push(T.code),B.image&&P.push(T.image),B.imageAltText&&P.push(T.imageAltText,"link"),B.imageMarker&&P.push(T.imageMarker)),B.header&&P.push(T.header,T.header+"-"+B.header),B.quote&&(P.push(T.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=B.quote?P.push(T.quote+"-"+B.quote):P.push(T.quote+"-"+O.maxBlockquoteDepth)),B.list!==!1){var J=(B.listStack.length-1)%3;J?J===1?P.push(T.list2):P.push(T.list3):P.push(T.list1)}return B.trailingSpaceNewLine?P.push("trailing-space-new-line"):B.trailingSpace&&P.push("trailing-space-"+(B.trailingSpace%2?"a":"b")),P.length?P.join(" "):null}function _(B,P){return B.match(a,!0)?v(P):void 0}function E(B,P){var z=P.text(B,P);if(typeof z!="undefined")return z;if(P.list)return P.list=null,v(P);if(P.taskList){var J=B.match(n,!0)[1]===" ";return J?P.taskOpen=!0:P.taskClosed=!0,O.highlightFormatting&&(P.formatting="task"),P.taskList=!1,v(P)}if(P.taskOpen=!1,P.taskClosed=!1,P.header&&B.match(/^#+$/,!0))return O.highlightFormatting&&(P.formatting="header"),v(P);var ue=B.next();if(P.linkTitle){P.linkTitle=!1;var de=ue;ue==="("&&(de=")"),de=(de+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Se="^\\s*(?:[^"+de+"\\\\]+|\\\\\\\\|\\\\.)"+de;if(B.match(new RegExp(Se),!0))return T.linkHref}if(ue==="`"){var Ae=P.formatting;O.highlightFormatting&&(P.formatting="code"),B.eatWhile("`");var pe=B.current().length;if(P.code==0&&(!P.quote||pe==1))return P.code=pe,v(P);if(pe==P.code){var Oe=v(P);return P.code=0,Oe}else return P.formatting=Ae,v(P)}else if(P.code)return v(P);if(ue==="\\"&&(B.next(),O.highlightFormatting)){var ye=v(P),ce=T.formatting+"-escape";return ye?ye+" "+ce:ce}if(ue==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return P.imageMarker=!0,P.image=!0,O.highlightFormatting&&(P.formatting="image"),v(P);if(ue==="["&&P.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return P.imageMarker=!1,P.imageAltText=!0,O.highlightFormatting&&(P.formatting="image"),v(P);if(ue==="]"&&P.imageAltText){O.highlightFormatting&&(P.formatting="image");var ye=v(P);return P.imageAltText=!1,P.image=!1,P.inline=P.f=k,ye}if(ue==="["&&!P.image)return P.linkText&&B.match(/^.*?\]/)||(P.linkText=!0,O.highlightFormatting&&(P.formatting="link")),v(P);if(ue==="]"&&P.linkText){O.highlightFormatting&&(P.formatting="link");var ye=v(P);return P.linkText=!1,P.inline=P.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?k:E,ye}if(ue==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=w,O.highlightFormatting&&(P.formatting="link");var ye=v(P);return ye?ye+=" ":ye="",ye+T.linkInline}if(ue==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=w,O.highlightFormatting&&(P.formatting="link");var ye=v(P);return ye?ye+=" ":ye="",ye+T.linkEmail}if(O.xml&&ue==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ae=B.string.indexOf(">",B.pos);if(ae!=-1){var re=B.string.substring(B.start,ae);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(P.md_inside=!0)}return B.backUp(1),P.htmlState=N.startState(M),t(B,P,R)}if(O.xml&&ue==="<"&&B.match(/^\/\w*?>/))return P.md_inside=!1,"tag";if(ue==="*"||ue==="_"){for(var fe=1,te=B.pos==1?" ":B.string.charAt(B.pos-2);fe<3&&B.eat(ue);)fe++;var ne=B.peek()||" ",Te=!/\s/.test(ne)&&(!h.test(ne)||/\s/.test(te)||h.test(te)),ie=!/\s/.test(te)&&(!h.test(te)||/\s/.test(ne)||h.test(ne)),Z=null,X=null;if(fe%2&&(!P.em&&Te&&(ue==="*"||!ie||h.test(te))?Z=!0:P.em==ue&&ie&&(ue==="*"||!Te||h.test(ne))&&(Z=!1)),fe>1&&(!P.strong&&Te&&(ue==="*"||!ie||h.test(te))?X=!0:P.strong==ue&&ie&&(ue==="*"||!Te||h.test(ne))&&(X=!1)),X!=null||Z!=null){O.highlightFormatting&&(P.formatting=Z==null?"strong":X==null?"em":"strong em"),Z===!0&&(P.em=ue),X===!0&&(P.strong=ue);var Oe=v(P);return Z===!1&&(P.em=!1),X===!1&&(P.strong=!1),Oe}}else if(ue===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return v(P);B.backUp(1)}if(O.strikethrough){if(ue==="~"&&B.eatWhile(ue)){if(P.strikethrough){O.highlightFormatting&&(P.formatting="strikethrough");var Oe=v(P);return P.strikethrough=!1,Oe}else if(B.match(/^[^\s]/,!1))return P.strikethrough=!0,O.highlightFormatting&&(P.formatting="strikethrough"),v(P)}else if(ue===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return v(P);B.backUp(2)}}if(O.emoji&&ue===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){P.emoji=!0,O.highlightFormatting&&(P.formatting="emoji");var Q=v(P);return P.emoji=!1,Q}return ue===" "&&(B.match(/^ +$/,!1)?P.trailingSpace++:P.trailingSpace&&(P.trailingSpaceNewLine=!0)),v(P)}function w(B,P){var z=B.next();if(z===">"){P.f=P.inline=E,O.highlightFormatting&&(P.formatting="link");var J=v(P);return J?J+=" ":J="",J+T.linkInline}return B.match(/^[^>]+/,!0),T.linkInline}function k(B,P){if(B.eatSpace())return null;var z=B.next();return z==="("||z==="["?(P.f=P.inline=L(z==="("?")":"]"),O.highlightFormatting&&(P.formatting="link-string"),P.linkHref=!0,v(P)):"error"}var I={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(B){return function(P,z){var J=P.next();if(J===B){z.f=z.inline=E,O.highlightFormatting&&(z.formatting="link-string");var ue=v(z);return z.linkHref=!1,ue}return P.match(I[B]),z.linkHref=!0,v(z)}}function V(B,P){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(P.f=W,B.next(),O.highlightFormatting&&(P.formatting="link"),P.linkText=!0,v(P)):l(B,P,E)}function W(B,P){if(B.match(/^\]:/,!0)){P.f=P.inline=H,O.highlightFormatting&&(P.formatting="link");var z=v(P);return P.linkText=!1,z}return B.match(/^([^\]\\]|\\.)+/,!0),T.linkText}function H(B,P){return B.eatSpace()?null:(B.match(/^[^\s]+/,!0),B.peek()===void 0?P.linkTitle=!0:B.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),P.f=P.inline=E,T.linkHref+" url")}var G={startState:function(){return{f,prevLine:{stream:null},thisLine:{stream:null},block:f,htmlState:null,indentation:0,inline:E,text:_,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(B){return{f:B.f,prevLine:B.prevLine,thisLine:B.thisLine,block:B.block,htmlState:B.htmlState&&N.copyState(M,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?N.copyState(B.localMode,B.localState):null,inline:B.inline,text:B.text,formatting:!1,linkText:B.linkText,linkTitle:B.linkTitle,linkHref:B.linkHref,code:B.code,em:B.em,strong:B.strong,strikethrough:B.strikethrough,emoji:B.emoji,header:B.header,setext:B.setext,hr:B.hr,taskList:B.taskList,list:B.list,listStack:B.listStack.slice(0),quote:B.quote,indentedCode:B.indentedCode,trailingSpace:B.trailingSpace,trailingSpaceNewLine:B.trailingSpaceNewLine,md_inside:B.md_inside,fencedEndRE:B.fencedEndRE}},token:function(B,P){if(P.formatting=!1,B!=P.thisLine.stream){if(P.header=0,P.hr=!1,B.match(/^\s*$/,!0))return x(P),null;if(P.prevLine=P.thisLine,P.thisLine={stream:B},P.taskList=!1,P.trailingSpace=0,P.trailingSpaceNewLine=!1,!P.localState&&(P.f=P.block,P.f!=R)){var z=B.match(/^\s*/,!0)[0].replace(/\t/g,s).length;if(P.indentation=z,P.indentationDiff=null,z>0)return null}}return P.f(B,P)},innerMode:function(B){return B.block==R?{state:B.htmlState,mode:M}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:G}},indent:function(B,P,z){return B.block==R&&M.indent?M.indent(B.htmlState,P,z):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,P,z):N.Pass},blankLine:x,getType:v,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 g(m,y){if(!j[m]){if(!q[m]){var T=typeof require=="function"&&require;if(!y&&T)return require(m,!0);if(O)return O(m,!0);var b=new Error("Cannot find module '"+m+"'");throw b.code="MODULE_NOT_FOUND",b}var p=j[m]={exports:{}};q[m][0].call(p.exports,function(d){var n=q[m][1][d];return g(n||d)},p,p.exports,F,q,j,N)}return j[m].exports}for(var O=typeof require=="function"&&require,M=0;M0&&r(k).to(L),V=this._divideParts(_,E),W=V.length,H=!1,G=function(Oe,ye){var ce=this;return new m.default(function(re,fe){var te,ne,Te,ie;return T.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,Oe.isCancel()){X.next=18;break}return te=V[ye-1],ne={stream:Oe._createStream(v,te.start,te.end),size:te.end-te.start},X.next=6,T.default.awrap(Oe._uploadPart(I,w,ye,ne));case 6:if(Te=X.sent,!(!Oe.isCancel()&&!H)){X.next=15;break}if(f.doneParts.push({number:ye,etag:Te.res.headers.etag}),!R.progress){X.next=12;break}return X.next=12,T.default.awrap(R.progress(k.length/W,f,Te.res));case 12:re({number:ye,etag:Te.res.headers.etag}),X.next=16;break;case 15:re();case 16:X.next=19;break;case 18:re();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),ie=new Error,ie.name=X.t0.name,ie.message=X.t0.message,ie.stack=X.t0.stack,ie.partNum=ye,r(X.t0).to(ie),fe(ie);case 30:case"end":return X.stop()}},null,ce,[[0,21]])})},B=(0,O.default)(new Array(W),function(pe,Oe){return Oe+1}),P=L.map(function(pe){return pe.number}),z=B.filter(function(pe){return P.indexOf(pe)<0}),J=5,ue=R.parallel||J,Ae.next=17,T.default.awrap(this._parallel(z,ue,function(pe){return new m.default(function(Oe,ye){G(C,pe).then(function(ce){ce&&L.push(ce),Oe()}).catch(function(ce){ye(ce)})})}));case 17:if(de=Ae.sent,H=!0,!this.isCancel()){Ae.next=22;break}throw G=null,this._makeCancelEvent();case 22:if(!(de&&de.length>0)){Ae.next=25;break}throw de[0].message="Failed to upload some parts with error: "+de[0].toString()+" part_num: "+de[0].partNum,de[0];case 25:return Ae.next=27,T.default.awrap(this.completeMultipartUpload(I,w,L,R));case 27:return Ae.abrupt("return",Ae.sent);case 28:case"end":return Ae.stop()}},null,this)},s._getFileSize=function(f){return T.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!p.buffer(f)){C.next=4;break}return C.abrupt("return",f.length);case 4:if(!(o(f)||h(f))){C.next=6;break}return C.abrupt("return",f.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return C.stop()}},null,this)};var l=F("stream"),t=l.Readable;function S(x,f){if(!(this instanceof S))return new S(x,f);t.call(this,f),this.file=x,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}d.inherits(S,t),S.prototype.readFileAndPush=function(f){if(this.fileBuffer)for(var R=!0;R&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:v,this.start=v,R=this.push(this.fileBuffer.slice(C,v))}},S.prototype._read=function(f){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;f=f||R;var C=this;this.reader.onload=function(_){C.fileBuffer=N.from(new Uint8Array(_.target.result)),C.file=null,C.readFileAndPush(f)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(f)},s._createStream=function(f,R,C){if(o(f)||h(f))return new S(f.slice(R,C));throw new Error("_createStream requires File/Blob.")},s._getPartSize=function(f,R){var C=10*1e3,v=1024*1024;return R?Math.max(Math.ceil(f/C),R):v},s._divideParts=function(f,R){for(var C=Math.ceil(f/R),v=[],_=0;_255)throw new Error("ID is composed of 255 bytes at most");if(f.prefix===""||f.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(f.status))throw new Error("Status must be Enabled or Disabled");if(f.transition){if(!["IA","Archive"].includes(f.transition.storageClass))throw new Error("StorageClass must be IA or Archive");t(f.transition,"Transition")}if(f.expiration){if(!f.expiration.expiredObjectDeleteMarker)t(f.expiration,"Expiration");else if(f.expiration.days||f.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(f.abortMultipartUpload&&t(f.abortMultipartUpload,"AbortMultipartUpload"),!f.expiration&&!f.abortMultipartUpload&&!f.transition&&!f.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(f.tag){if(f.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");S(f.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"),g=O(N);function O(p){return p&&p.__esModule?p:{default:p}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=F("../utils/obj2xml"),T=y.obj2xml,b=j;b.putBucketVersioning=function(d,n){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,a,o;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:if(m(d),["Enabled","Suspended"].includes(n)){h.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return r=this._bucketRequestParams("PUT",d,"versioning",c),a={VersioningConfiguration:{Status:n}},r.mime="xml",r.content=T(a,{headers:!0}),h.next=9,g.default.awrap(this.request(r));case 9:return o=h.sent,h.abrupt("return",{res:o.res,status:o.status});case 11:case"end":return h.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"),g=O(N);function O(n){return n&&n.__esModule?n:{default:n}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=F("../utils/obj2xml"),T=y.obj2xml,b=F("../utils/isArray"),p=b.isArray,d=j;d.putBucketWebsite=function(c){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments[2],o,u,h,s,l;return g.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:if(m(c),o=this._bucketRequestParams("PUT",c,"website",a),u={Suffix:r.index||"index.html"},h={IndexDocument:u},s={WebsiteConfiguration:h},r.supportSubDir&&(u.SupportSubDir=r.supportSubDir),r.type&&(u.Type=r.type),r.error&&(h.ErrorDocument={Key:r.error}),!(r.routingRules!==void 0)){S.next=12;break}if(p(r.routingRules)){S.next=11;break}throw new Error("RoutingRules must be Array");case 11:h.RoutingRules={RoutingRule:r.routingRules};case 12:return s=T(s),o.content=s,o.mime="xml",o.successStatuses=[200],S.next=18,g.default.awrap(this.request(o));case 18:return l=S.sent,S.abrupt("return",{res:l.res});case 20:case"end":return S.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 g=F("babel-runtime/core-js/object/keys"),O=y(g),M=F("babel-runtime/core-js/json/stringify"),m=y(M);function y(T){return T&&T.__esModule?T:{default:T}}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 n=N.from((0,m.default)(d)).toString("base64");if(b.headers["x-oss-callback"]=n,p.callback.customValue){var c={};(0,O.default)(p.callback.customValue).forEach(function(r){c["x:"+r]=p.callback.customValue[r]}),b.headers["x-oss-callback-var"]=N.from((0,m.default)(c)).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"),g=O(N);function O(d){return d&&d.__esModule?d:{default:d}}var M=F("humanize-ms"),m=F("url"),y=F("../utils/checkBucketName"),T=y.checkBucketName;function b(d,n){var c=m.parse(d);if(c.protocol||(c=m.parse("http"+(n?"s":"")+"://"+d)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function p(d,n,c){var r=c?"https://":"http://",a=n?"-internal.aliyuncs.com":".aliyuncs.com",o="vpc100-oss-cn-";return d.substr(0,o.length)===o&&(a=".aliyuncs.com"),m.parse(r+d+a)}q.exports=function(d){if(!d||!d.accessKeyId||!d.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");d.bucket&&T(d.bucket);var n=(0,g.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},d);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=M(n.timeout)),n.endpoint)n.endpoint=b(n.endpoint,n.secure);else if(n.region)n.endpoint=p(n.region,n.internal,n.secure);else throw new Error("require options.endpoint or options.region");return n.inited=!0,n}},{"../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"),g=j;N(g,F("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(F,q,j){"use strict";var N=F("babel-runtime/regenerator"),g=O(N);function O(n){return n&&n.__esModule?n:{default:n}}var M=F("../utils/checkBucketName"),m=M.checkBucketName,y=F("querystring"),T=F("js-base64"),b=T.Base64.encode,p=j;p.processObjectSave=function(c,r,a,o){var u,h,s,l;return g.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return d(c,"sourceObject"),d(r,"targetObject"),d(a,"process"),r=this._objectName(r),o&&m(o),u=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),h=o?",b_"+b(o):"",r=b(r),s={"x-oss-process":a+"|sys/saveas,o_"+r+h},u.content=y.stringify(s),S.next=12,g.default.awrap(this.request(u));case 12:return l=S.sent,S.abrupt("return",{res:l.res,status:l.res.status});case 14:case"end":return S.stop()}},null,this)};function d(n,c){if(!n)throw new Error(c+" is required");if(typeof n!="string")throw new Error(c+" 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"),g=O(N);function O(p){return p&&p.__esModule?p:{default:p}}var M=F("copy-to"),m=F("./callback"),y=F("./utils/deepCopy"),T=y.deepCopy,b=j;b.listUploads=function(d,n){var c,r,a,o;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return n=n||{},c={},M(n).to(c),c.subres="uploads",r=this._objectRequestParams("GET","",c),r.query=d,r.xmlResponse=!0,r.successStatuses=[200],h.next=10,g.default.awrap(this.request(r));case 10:return a=h.sent,o=a.data.Upload||[],Array.isArray(o)||(o=[o]),o=o.map(function(s){return{name:s.Key,uploadId:s.UploadId,initiated:s.Initiated}}),h.abrupt("return",{res:a.res,uploads:o,bucket:a.data.Bucket,nextKeyMarker:a.data.NextKeyMarker,nextUploadIdMarker:a.data.NextUploadIdMarker,isTruncated:a.data.IsTruncated==="true"});case 15:case"end":return h.stop()}},null,this)},b.listParts=function(d,n,c,r){var a,o,u;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return r=r||{},a={},M(r).to(a),a.subres={uploadId:n},o=this._objectRequestParams("GET",d,a),o.query=c,o.xmlResponse=!0,o.successStatuses=[200],s.next=10,g.default.awrap(this.request(o));case 10:return u=s.sent,s.abrupt("return",{res:u.res,uploadId:u.data.UploadId,bucket:u.data.Bucket,name:u.data.Key,partNumberMarker:u.data.PartNumberMarker,nextPartNumberMarker:u.data.NextPartNumberMarker,maxParts:u.data.MaxParts,isTruncated:u.data.IsTruncated,parts:u.data.Part||[]});case 12:case"end":return s.stop()}},null,this)},b.abortMultipartUpload=function(d,n,c){var r,a,o;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return this._stop(),c=c||{},r={},M(c).to(r),r.subres={uploadId:n},a=this._objectRequestParams("DELETE",d,r),a.successStatuses=[204],h.next=9,g.default.awrap(this.request(a));case 9:return o=h.sent,h.abrupt("return",{res:o.res});case 11:case"end":return h.stop()}},null,this)},b.initMultipartUpload=function(d,n){var c,r,a;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return n=n||{},c={},M(n).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(n.meta,c.headers),c.subres="uploads",r=this._objectRequestParams("POST",d,c),r.mime=n.mime,r.xmlResponse=!0,r.successStatuses=[200],u.next=12,g.default.awrap(this.request(r));case 12:return a=u.sent,u.abrupt("return",{res:a.res,bucket:a.data.Bucket,name:a.data.Key,uploadId:a.data.UploadId});case 14:case"end":return u.stop()}},null,this)},b.uploadPart=function(d,n,c,r,a,o,u){var h;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return h={stream:this._createStream(r,a,o),size:o-a},l.next=3,g.default.awrap(this._uploadPart(d,n,c,h,u));case 3:return l.abrupt("return",l.sent);case 4:case"end":return l.stop()}},null,this)},b.completeMultipartUpload=function(d,n,c,r){var a,o,u,h,s,l,t,S;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:for(a=c.concat().sort(function(R,C){return R.number-C.number}).filter(function(R,C,v){return!C||R.number!==v[C-1].number}),o=` `,u=0;u `,o+=""+h.number+` `,o+=""+h.etag+` `,o+=` `;return o+="",r=r||{},s={},s=T(r),s.headers&&delete s.headers["x-oss-server-side-encryption"],s.subres={uploadId:n},l=this._objectRequestParams("POST",d,s),m.encodeCallback(l,s),l.mime="xml",l.content=o,l.headers&&l.headers["x-oss-callback"]||(l.xmlResponse=!0),l.successStatuses=[200],f.next=17,g.default.awrap(this.request(l));case 17:return t=f.sent,S={res:t.res,bucket:l.bucket,name:d,etag:t.res.headers.etag},l.headers&&l.headers["x-oss-callback"]&&(S.data=JSON.parse(t.data.toString())),f.abrupt("return",S);case 21:case"end":return f.stop()}},null,this)},b._uploadPart=function(d,n,c,r,a){var o,u,h;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return a=a||{},o={},M(a).to(o),o.headers={"Content-Length":r.size},o.subres={partNumber:c,uploadId:n},u=this._objectRequestParams("PUT",d,o),u.mime=o.mime,u.stream=r.stream,u.successStatuses=[200],l.next=11,g.default.awrap(this.request(u));case 11:if(h=l.sent,h.res.headers.etag){l.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS https://help.aliyun.com/document_detail/32069.html`);case 14:return r.stream=null,u.stream=null,l.abrupt("return",{name:d,etag:h.res.headers.etag,res:h.res});case 17:case"end":return l.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"),g=T(N),O=F("babel-runtime/core-js/object/keys"),M=T(O),m=F("babel-runtime/helpers/typeof"),y=T(m);function T(n){return n&&n.__esModule?n:{default:n}}var b=F("../utils/checkBucketName"),p=b.checkBucketName,d=j;d.copy=function(c,r,a,o){var u,h,s;return g.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof a=="undefined"?"undefined":(0,y.default)(a))==="object"&&(o=a),o=o||{},o.headers=o.headers||{},(0,M.default)(o.headers).forEach(function(S){o.headers["x-oss-copy-source-"+S.toLowerCase()]=o.headers[S]}),o.meta&&(o.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(o.meta,o.headers),r=this._getSourceName(r,a),o.versionId&&(r=r+"?versionId="+o.versionId),o.headers["x-oss-copy-source"]=r,u=this._objectRequestParams("PUT",c,o),u.xmlResponse=!0,u.successStatuses=[200,304],t.next=14,g.default.awrap(this.request(u));case 14:return h=t.sent,s=h.data,s&&(s={etag:s.ETag,lastModified:s.LastModified}),t.abrupt("return",{data:s,res:h.res});case 18:case"end":return t.stop()}},null,this)},d._getSourceName=function(c,r){return typeof r=="string"?c=this._objectName(c):c[0]!=="/"?r=this.options.bucket:(r=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),p(r),c=encodeURI(c),c="/"+r+"/"+c,c}},{"../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"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.delete=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,n;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.default)({},p.subres),p.versionId&&(p.subres.versionId=p.versionId),d=this._objectRequestParams("DELETE",b,p),d.successStatuses=[204],r.next=6,g.default.awrap(this.request(d));case 6:return n=r.sent,r.abrupt("return",{res:n.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"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(d){return d&&d.__esModule?d:{default:d}}var y=F("utility"),T=F("../utils/obj2xml"),b=T.obj2xml,p=j;p.deleteMulti=function(n){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,a,o,u,h,s,l,t,S,x,f,R;return g.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:if(r=[],!(!n||!n.length)){v.next=3;break}throw new Error("names is required");case 3:for(a=0;a1&&arguments[1]!==void 0?arguments[1]:{},d,n;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.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,g.default.awrap(this.request(d));case 7:return n=r.sent,r.abrupt("return",{status:n.status,res:n.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"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(p){return p&&p.__esModule?p:{default:p}}var y=F("fs"),T=F("is-type-of"),b=j;b.get=function(d,n){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,a,o,u;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return r=null,a=!1,T.writableStream(n)?r=n:T.string(n)?(r=y.createWriteStream(n),a=!0):c=n,c=c||{},c.subres=(0,M.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),o=void 0,s.prev=8,u=this._objectRequestParams("GET",d,c),u.writeStream=r,u.successStatuses=[200,206,304],s.next=14,g.default.awrap(this.request(u));case 14:o=s.sent,a&&r.destroy(),s.next=25;break;case 18:if(s.prev=18,s.t0=s.catch(8),!a){s.next=24;break}return r.destroy(),s.next=24,g.default.awrap(this._deleteFileSafe(n));case 24:throw s.t0;case 25:return s.abrupt("return",{res:o.res,content:o.data});case 26:case"end":return s.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"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.getACL=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,n;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.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,g.default.awrap(this.request(d));case 8:return n=r.sent,r.abrupt("return",{acl:n.data.AccessControlList.Grant,owner:{id:n.data.Owner.ID,displayName:n.data.Owner.DisplayName},res:n.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"),g=T(N),O=F("babel-runtime/regenerator"),M=T(O),m=F("babel-runtime/core-js/object/assign"),y=T(m);function T(u){return u&&u.__esModule?u:{default:u}}var b=j,p=F("../utils/isObject"),d=p.isObject,n=F("../utils/isArray"),c=n.isArray;b.getBucketVersions=r,b.listObjectVersions=r;function r(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,t,S,x,f;return M.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!(u.versionIdMarker&&u.keyMarker===void 0)){C.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return h.subres=(0,y.default)({versions:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),s=this._objectRequestParams("GET","",h),s.xmlResponse=!0,s.successStatuses=[200],s.query=o(u),C.next=10,M.default.awrap(this.request(s));case 10:return l=C.sent,t=l.data.Version||[],S=l.data.DeleteMarker||[],x=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(v){return{name:v.Key,url:x._objectUrl(v.Key),lastModified:v.LastModified,isLatest:v.IsLatest==="true",versionId:v.VersionId,etag:v.ETag,type:v.Type,size:Number(v.Size),storageClass:v.StorageClass,owner:{id:v.Owner.ID,displayName:v.Owner.DisplayName}}})),S&&(c(S)||(S=[S]),S=S.map(function(v){return{name:v.Key,lastModified:v.LastModified,versionId:v.VersionId,owner:{id:v.Owner.ID,displayName:v.Owner.DisplayName}}})),f=l.data.CommonPrefixes||null,f&&(c(f)||(f=[f]),f=f.map(function(v){return v.Prefix})),C.abrupt("return",{res:l.res,objects:t,deleteMarker:S,prefixes:f,nextMarker:l.data.NextMarker||null,NextVersionIdMarker:l.data.NextVersionIdMarker||null,isTruncated:l.data.IsTruncated==="true"});case 19:case"end":return C.stop()}},null,this)}function a(u){return u.replace(/([A-Z])/g,"-$1").toLowerCase()}function o(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h={};return d(u)&&(0,g.default)(u).forEach(function(s){h[a(s)]=u[s]}),h}},{"../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"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.getObjectMeta=function(b,p){var d,n;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p=p||{},b=this._objectName(b),p.subres=(0,M.default)({objectMeta:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),d=this._objectRequestParams("HEAD",b,p),d.successStatuses=[200],r.next=8,g.default.awrap(this.request(d));case 8:return n=r.sent,r.abrupt("return",{status:n.status,res:n.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"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(p){return p&&p.__esModule?p:{default:p}}var y=j,T=F("../utils/isObject"),b=T.isObject;y.getObjectTagging=function(d){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,r,a,o,u;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return n.subres=(0,M.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),d=this._objectName(d),c=this._objectRequestParams("GET",d,n),c.successStatuses=[200],s.next=7,g.default.awrap(this.request(c));case 7:return r=s.sent,s.next=10,g.default.awrap(this.parseXML(r.data));case 10:return a=s.sent,o=a.TagSet.Tag,o=o&&b(o)?[o]:o||[],u={},o.forEach(function(l){u[l.Key]=l.Value}),s.abrupt("return",{status:r.status,res:r.res,tag:u});case 16:case"end":return s.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"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.getSymlink=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,n,c;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return p.subres=(0,M.default)({symlink:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,p),d.successStatuses=[200],a.next=7,g.default.awrap(this.request(d));case 7:return n=a.sent,c=n.res.headers["x-oss-symlink-target"],a.abrupt("return",{targetName:decodeURIComponent(c),res:n.res});case 10:case"end":return a.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"),g=T(N),O=F("babel-runtime/core-js/object/keys"),M=T(O),m=F("babel-runtime/core-js/object/assign"),y=T(m);function T(p){return p&&p.__esModule?p:{default:p}}var b=j;b.head=function(d){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,r,a;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return n.subres=(0,y.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),c=this._objectRequestParams("HEAD",d,n),c.successStatuses=[200,304],u.next=6,g.default.awrap(this.request(c));case 6:return r=u.sent,a={meta:null,res:r.res,status:r.status},r.status===200&&(0,M.default)(r.headers).forEach(function(h){h.indexOf("x-oss-meta-")===0&&(a.meta||(a.meta={}),a.meta[h.substring(11)]=r.headers[h])}),u.abrupt("return",a);case 10:case"end":return u.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"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.putACL=function(b,p,d){var n,c;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return d=d||{},d.subres=(0,M.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),n=this._objectRequestParams("PUT",b,d),n.successStatuses=[200],a.next=10,g.default.awrap(this.request(n));case 10:return c=a.sent,a.abrupt("return",{res:c.res});case 12:case"end":return a.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"),g=T(N),O=F("babel-runtime/core-js/object/keys"),M=T(O),m=F("babel-runtime/core-js/object/assign"),y=T(m);function T(r){return r&&r.__esModule?r:{default:r}}var b=F("../utils/obj2xml"),p=b.obj2xml,d=F("../utils/checkObjectTag"),n=d.checkObjectTag,c=j;c.putObjectTagging=function(a,o){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h,s,l;return g.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return n(o),u.subres=(0,y.default)({tagging:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),a=this._objectName(a),h=this._objectRequestParams("PUT",a,u),h.successStatuses=[200],o=(0,M.default)(o).map(function(x){return{Key:x,Value:o[x]}}),s={Tagging:{TagSet:{Tag:o}}},h.mime="xml",h.content=p(s),S.next=12,g.default.awrap(this.request(h));case 12:return l=S.sent,S.abrupt("return",{res:l.res,status:l.status});case 14:case"end":return S.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"),g=m(N),O=F("babel-runtime/core-js/object/assign"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y.putSymlink=function(b,p,d){var n,c;return g.default.async(function(a){for(;;)switch(a.prev=a.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,M.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),n=this._objectRequestParams("PUT",b,d),n.successStatuses=[200],a.next=13,g.default.awrap(this.request(n));case 13:return c=a.sent,a.abrupt("return",{res:c.res});case 15:case"end":return a.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"),g=m(N),O=F("babel-runtime/core-js/promise"),M=m(O);function m(T){return T&&T.__esModule?T:{default:T}}var y=j;y._parallelNode=function(b,p,d,n){var c,r,a,o,u,h,s,l;return g.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:c=this,r=[],a=[],o=b.length/p,u=b.length%p,h=u===0?o:(b.length-u)/p+1,s=1,l=0;case 8:if(!(l0){h=!0,s<=0&&c(r);return}s+=1,S(f.value,a(t))}l=!1}x()})},y.cancel=function(b){this.options.cancelFlag=!0,b&&this.abortMultipartUpload(b.name,b.uploadId,b.options)},y.isCancel=function(){return this.options.cancelFlag},y.resetCancelFlag=function(){this.options.cancelFlag=!1},y._stop=function(){this.options.cancelFlag=!0},y._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 g=F("babel-runtime/core-js/json/stringify"),O=y(g),M=F("babel-runtime/core-js/object/keys"),m=y(M);function y(p){return p&&p.__esModule?p:{default:p}}var T=F("./../../shims/crypto/crypto.js"),b=F("is-type-of");j.buildCanonicalizedResource=function(d,n){var c=""+d,r="?";if(b.string(n)&&n.trim()!=="")c+=r+n;else if(b.array(n))n.sort(),c+=r+n.join("&");else if(n){var a=function(h,s){return h[0]>s[0]?1:h[0]1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],r=arguments[3],a={},o=n.subResource,u=o===void 0?{}:o;if(n.process){var h="x-oss-process";u[h]=n.process}if(n.trafficLimit){var s="x-oss-traffic-limit";u[s]=n.trafficLimit}if(n.response&&(0,m.default)(n.response).forEach(function(x){var f="response-"+x.toLowerCase();u[f]=n.response[x]}),(0,m.default)(n).forEach(function(x){var f=x.toLowerCase(),R=n[x];f.indexOf("x-oss-")===0?a[f]=R:(f.indexOf("content-md5")===0||f.indexOf("content-type")===0)&&(a[x]=R)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(u["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var l={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(l.callbackHost=n.callback.host),n.callback.contentType&&(l.callbackBodyType=n.callback.contentType),u.callback=N.from((0,O.default)(l)).toString("base64"),n.callback.customValue){var t={};(0,m.default)(n.callback.customValue).forEach(function(x){t["x:"+x]=n.callback.customValue[x]}),u["callback-var"]=N.from((0,O.default)(t)).toString("base64")}}var S=this.buildCanonicalString(n.method,c,{headers:a,parameters:u},r.toString());return{Signature:this.computeSignature(d,S),subResource:u}}}).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,g){var O=g?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!O.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"),g=O(N);function O(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(j,"__esModule",{value:!0}),j.checkObjectTag=void 0;var M=F("./checkValid"),m=M.checkValid,y=F("./isObject"),T=y.isObject,b=[{validator:function(c){if(typeof c!="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(n){if(!T(n))throw new Error("tag must be Object");var c=(0,g.default)(n);if(c.length>10)throw new Error("maximum of 10 tags for a object");var r=["key","value"];c.forEach(function(a){a.forEach(function(o,u){m(o,p[r[u]])})})}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(g,O){O.forEach(function(M){if(M.validator)M.validator(g);else if(M.pattern&&!M.pattern.test(g))throw new Error(M.msg)})}j.checkValid=N},{}],38:[function(F,q,j){(function(N){"use strict";var g=F("babel-runtime/core-js/object/assign"),O=M(g);function M(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(j,"__esModule",{value:!0}),j.createRequest=void 0;var m=F("./../../../shims/crypto/crypto.js"),y=F("debug")("ali-oss"),T=F("mime"),b=F("dateformat"),p=F("copy-to"),d=F("path");function n(a,o){return a[o]||a[o.toLowerCase()]}function c(a,o){delete a[o],delete a[o.toLowerCase()]}function r(a){var o=new Date;this.options.amendTimeSkewed&&(o=+new Date+this.options.amendTimeSkewed);var u={"x-oss-date":b(o,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(u["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,O.default)(u,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(u["x-oss-security-token"]=this.options.stsToken),p(a.headers).to(u),n(u,"Content-Type")||(a.mime&&a.mime.indexOf("/")>0?u["Content-Type"]=a.mime:u["Content-Type"]=T.getType(a.mime||d.extname(a.object||""))),n(u,"Content-Type")||c(u,"Content-Type"),a.content&&(u["Content-Md5"]=m.createHash("md5").update(N.from(a.content,"utf8")).digest("base64"),u["Content-Length"]||(u["Content-Length"]=a.content.length));var h=this._getResource(a);u.authorization=this.authorization(a.method,h,a.subres,u);var s=this._getReqUrl(a);y("request %s %s, with headers %j, !!stream: %s",a.method,s,u,!!a.stream);var l=a.timeout||this.options.timeout,t={method:a.method,content:a.content,stream:a.stream,headers:u,timeout:l,writeStream:a.writeStream,customResponse:a.customResponse,ctx:a.ctx||this.ctx};return this.agent&&(t.agent=this.agent),this.httpsAgent&&(t.httpsAgent=this.httpsAgent),{url:s,params:t}}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"),g=m(N),O=F("babel-runtime/helpers/typeof"),M=m(O);function m(y){return y&&y.__esModule?y:{default:y}}Object.defineProperty(j,"__esModule",{value:!0}),j.deepCopy=void 0,j.deepCopy=function(y){if(y===null||(typeof y=="undefined"?"undefined":(0,M.default)(y))!=="object")return y;var T=Array.isArray(y)?[]:{};return(0,g.default)(y).forEach(function(b){T[b]=j.deepCopy(y[b])}),T}},{"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"),g=m(N),O=F("babel-runtime/helpers/typeof"),M=m(O);function m(b){return b&&b.__esModule?b:{default:b}}Object.defineProperty(j,"__esModule",{value:!0}),j.formatObjKey=void 0;function y(b,p){if(b===null||(typeof b=="undefined"?"undefined":(0,M.default)(b))!=="object")return b;var d=void 0;if(Array.isArray(b)){d=[];for(var n=0;n `),b&&b.firstUpperCase&&(T=M.formatObjKey(T,"firstUpperCase")),m(T)==="object"?(0,g.default)(T).forEach(function(d){m(T[d])==="string"||m(T[d])==="number"?p+="<"+d+">"+T[d]+"":m(T[d])==="object"?p+="<"+d+">"+y(T[d])+"":m(T[d])==="array"?p+=T[d].map(function(n){return"<"+d+">"+y(n)+""}).join(""):p+="<"+d+">"+T[d].toString()+""}):p+=T.toString(),p}j.obj2xml=y},{"./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",g=null;q.exports=function(O,M){return function(y,T){y=y||null,T=T||{};var b=T.global!==!1;if(g===null&&b&&(g=O[N]||null),g!==null&&y!==null&&g.implementation!==y)throw new Error('any-promise already defined as "'+g.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return g===null&&(y!==null&&typeof T.Promise!="undefined"?g={Promise:T.Promise,implementation:y}:g=M(y),b&&(O[N]=g)),g}}},{}],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"),g=y(N),O=F("../core-js/symbol"),M=y(O),m=typeof M.default=="function"&&typeof g.default=="symbol"?function(T){return typeof T}:function(T){return T&&typeof M.default=="function"&&T.constructor===M.default&&T!==M.default.prototype?"symbol":typeof T};function y(T){return T&&T.__esModule?T:{default:T}}j.default=typeof M.default=="function"&&m(g.default)==="symbol"?function(T){return typeof T=="undefined"?"undefined":m(T)}:function(T){return T&&typeof M.default=="function"&&T.constructor===M.default&&T!==M.default.prototype?"symbol":typeof T=="undefined"?"undefined":m(T)}},{"../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=[],g=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,y=M.length;m0)throw new Error("Invalid string. Length must be a multiple of 4");var u=a.indexOf("=");u===-1&&(u=o);var h=u===o?0:4-u%4;return[u,h]}function b(a){var o=T(a),u=o[0],h=o[1];return(u+h)*3/4-h}function p(a,o,u){return(o+u)*3/4-u}function d(a){var o,u=T(a),h=u[0],s=u[1],l=new O(p(a,h,s)),t=0,S=s>0?h-4:h,x;for(x=0;x>16&255,l[t++]=o>>8&255,l[t++]=o&255;return s===2&&(o=g[a.charCodeAt(x)]<<2|g[a.charCodeAt(x+1)]>>4,l[t++]=o&255),s===1&&(o=g[a.charCodeAt(x)]<<10|g[a.charCodeAt(x+1)]<<4|g[a.charCodeAt(x+2)]>>2,l[t++]=o>>8&255,l[t++]=o&255),l}function n(a){return N[a>>18&63]+N[a>>12&63]+N[a>>6&63]+N[a&63]}function c(a,o,u){for(var h,s=[],l=o;lS?S:t+l));return h===1?(o=a[u-1],s.push(N[o>>2]+N[o<<4&63]+"==")):h===2&&(o=(a[u-2]<<8)+a[u-1],s.push(N[o>>10]+N[o>>4&63]+N[o<<2&63]+"=")),s.join("")}},{}],70:[function(F,q,j){/*! * Bowser - a browser detector * https://github.com/ded/bowser * MIT License | (c) Dustin Diaz 2015 */!function(N,g,O){typeof q!="undefined"&&q.exports?q.exports=O():typeof define=="function"&&define.amd?define(g,O):N[g]=O()}(this,"bowser",function(){var N=!0;function g(p){function d(G){var B=p.match(G);return B&&B.length>1&&B[1]||""}function n(G){var B=p.match(G);return B&&B.length>1&&B[2]||""}var c=d(/(ipod|iphone|ipad)/i).toLowerCase(),r=/like android/i.test(p),a=!r&&/android/i.test(p),o=/nexus\s*[0-6]\s*/i.test(p),u=!o&&/nexus\s*[0-9]+/i.test(p),h=/CrOS/.test(p),s=/silk/i.test(p),l=/sailfish/i.test(p),t=/tizen/i.test(p),S=/(web|hpw)(o|0)s/i.test(p),x=/windows phone/i.test(p),f=/SamsungBrowser/i.test(p),R=!x&&/windows/i.test(p),C=!c&&!s&&/macintosh/i.test(p),v=!a&&!l&&!t&&!S&&/linux/i.test(p),_=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),E=d(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(p)&&!/tablet pc/i.test(p),k=!w&&/[^-]mobi/i.test(p),I=/xbox/i.test(p),L;/opera/i.test(p)?L={name:"Opera",opera:N,version:E||d(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(p)?L={name:"Opera",opera:N,version:d(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||E}:/SamsungBrowser/i.test(p)?L={name:"Samsung Internet for Android",samsungBrowser:N,version:E||d(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(p)?L={name:"NAVER Whale browser",whale:N,version:d(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(p)?L={name:"MZ Browser",mzbrowser:N,version:d(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(p)?L={name:"Opera Coast",coast:N,version:E||d(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(p)?L={name:"Focus",focus:N,version:d(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(p)?L={name:"Yandex Browser",yandexbrowser:N,version:E||d(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(p)?L={name:"UC Browser",ucbrowser:N,version:d(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(p)?L={name:"Maxthon",maxthon:N,version:d(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(p)?L={name:"Epiphany",epiphany:N,version:d(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(p)?L={name:"Puffin",puffin:N,version:d(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(p)?L={name:"Sleipnir",sleipnir:N,version:d(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(p)?L={name:"K-Meleon",kMeleon:N,version:d(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(L={name:"Windows Phone",osname:"Windows Phone",windowsphone:N},_?(L.msedge=N,L.version=_):(L.msie=N,L.version=d(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(p)?L={name:"Internet Explorer",msie:N,version:d(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:h?L={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)?L={name:"Microsoft Edge",msedge:N,version:_}:/vivaldi/i.test(p)?L={name:"Vivaldi",vivaldi:N,version:d(/vivaldi\/(\d+(\.\d+)?)/i)||E}:l?L={name:"Sailfish",osname:"Sailfish OS",sailfish:N,version:d(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(p)?L={name:"SeaMonkey",seamonkey:N,version:d(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(p)?(L={name:"Firefox",firefox:N,version:d(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(p)&&(L.firefoxos=N,L.osname="Firefox OS")):s?L={name:"Amazon Silk",silk:N,version:d(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(p)?L={name:"PhantomJS",phantom:N,version:d(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(p)?L={name:"SlimerJS",slimer:N,version:d(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(p)||/rim\stablet/i.test(p)?L={name:"BlackBerry",osname:"BlackBerry OS",blackberry:N,version:E||d(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:S?(L={name:"WebOS",osname:"WebOS",webos:N,version:E||d(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(p)&&(L.touchpad=N)):/bada/i.test(p)?L={name:"Bada",osname:"Bada",bada:N,version:d(/dolfin\/(\d+(\.\d+)?)/i)}:t?L={name:"Tizen",osname:"Tizen",tizen:N,version:d(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||E}:/qupzilla/i.test(p)?L={name:"QupZilla",qupzilla:N,version:d(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||E}:/chromium/i.test(p)?L={name:"Chromium",chromium:N,version:d(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||E}:/chrome|crios|crmo/i.test(p)?L={name:"Chrome",chrome:N,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:a?L={name:"Android",version:E}:/safari|applewebkit/i.test(p)?(L={name:"Safari",safari:N},E&&(L.version=E)):c?(L={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},E&&(L.version=E)):/googlebot/i.test(p)?L={name:"Googlebot",googlebot:N,version:d(/googlebot\/(\d+(\.\d+))/i)||E}:L={name:d(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!L.msedge&&/(apple)?webkit/i.test(p)?(/(apple)?webkit\/537\.36/i.test(p)?(L.name=L.name||"Blink",L.blink=N):(L.name=L.name||"Webkit",L.webkit=N),!L.version&&E&&(L.version=E)):!L.opera&&/gecko\//i.test(p)&&(L.name=L.name||"Gecko",L.gecko=N,L.version=L.version||d(/gecko\/(\d+(\.\d+)?)/i)),!L.windowsphone&&(a||L.silk)?(L.android=N,L.osname="Android"):!L.windowsphone&&c?(L[c]=N,L.ios=N,L.osname="iOS"):C?(L.mac=N,L.osname="macOS"):I?(L.xbox=N,L.osname="Xbox"):R?(L.windows=N,L.osname="Windows"):v&&(L.linux=N,L.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 W="";L.windows?W=V(d(/Windows ((NT|XP)( \d\d?.\d)?)/i)):L.windowsphone?W=d(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):L.mac?(W=d(/Mac OS X (\d+([_\.\s]\d+)*)/i),W=W.replace(/[_\s]/g,".")):c?(W=d(/os (\d+([_\s]\d+)*) like mac os x/i),W=W.replace(/[_\s]/g,".")):a?W=d(/android[ \/-](\d+(\.\d+)*)/i):L.webos?W=d(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):L.blackberry?W=d(/rim\stablet\sos\s(\d+(\.\d+)*)/i):L.bada?W=d(/bada\/(\d+(\.\d+)*)/i):L.tizen&&(W=d(/tizen[\/\s](\d+(\.\d+)*)/i)),W&&(L.osversion=W);var H=!L.windows&&W.split(".")[0];return w||u||c=="ipad"||a&&(H==3||H>=4&&!k)||L.silk?L.tablet=N:(k||c=="iphone"||c=="ipod"||a||o||L.blackberry||L.webos||L.bada)&&(L.mobile=N),L.msedge||L.msie&&L.version>=10||L.yandexbrowser&&L.version>=15||L.vivaldi&&L.version>=1||L.chrome&&L.version>=20||L.samsungBrowser&&L.version>=4||L.whale&&y([L.version,"1.0"])===1||L.mzbrowser&&y([L.version,"6.0"])===1||L.focus&&y([L.version,"1.0"])===1||L.firefox&&L.version>=20||L.safari&&L.version>=6||L.opera&&L.version>=10||L.ios&&L.osversion&&L.osversion.split(".")[0]>=6||L.blackberry&&L.version>=10.1||L.chromium&&L.version>=20?L.a=N:L.msie&&L.version<10||L.chrome&&L.version<20||L.firefox&&L.version<20||L.safari&&L.version<6||L.opera&&L.version<10||L.ios&&L.osversion&&L.osversion.split(".")[0]<6||L.chromium&&L.version<20?L.c=N:L.x=N,L}var O=g(typeof navigator!="undefined"&&navigator.userAgent||"");O.test=function(p){for(var d=0;d=0;){if(n[0][d]>n[1][d])return 1;if(n[0][d]===n[1][d]){if(d===0)return 0}else return-1}}function T(p,d,n){var c=O;typeof d=="string"&&(n=d,d=void 0),d===void 0&&(d=!1),n&&(c=g(n));var r=""+c.version;for(var a in p)if(p.hasOwnProperty(a)&&c[a]){if(typeof p[a]!="string")throw new Error("Browser version in the minVersion map should be a string: "+a+": "+String(p));return y([r,p[a]])<0}return d}function b(p,d,n){return!T(p,d,n)}return O.isUnsupportedBrowser=T,O.compareVersions=y,O.check=b,O._detect=g,O.detect=g,O})},{}],71:[function(F,q,j){},{}],72:[function(F,q,j){var N=F("buffer").Buffer,g=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 O(b){if(b&&!g(b))throw new Error("Unknown encoding: "+b)}var M=j.StringDecoder=function(b){this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,""),O(b);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=y;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=T;break;default:this.write=m;return}this.charBuffer=new N(6),this.charReceived=0,this.charLength=0};M.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&&c<=56319){this.charLength+=this.surrogateSize,p="";continue}if(this.charReceived=this.charLength=0,b.length===0)return p;break}this.detectIncompleteChar(b);var n=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,n),n-=this.charReceived),p+=b.toString(this.encoding,0,n);var n=p.length-1,c=p.charCodeAt(n);if(c>=55296&&c<=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,n)}return p},M.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},M.prototype.end=function(b){var p="";if(b&&b.length&&(p=this.write(b)),this.charReceived){var d=this.charReceived,n=this.charBuffer,c=this.encoding;p+=n.slice(0,d).toString(c)}return p};function m(b){return b.toString(this.encoding)}function y(b){this.charReceived=b.length%2,this.charLength=this.charReceived?2:0}function T(b){this.charReceived=b.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(F,q,j){(function(N,g){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */"use strict";var O=F("base64-js"),M=F("ieee754"),m=F("isarray");j.Buffer=g,j.SlowBuffer=s,j.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=N.TYPED_ARRAY_SUPPORT!==void 0?N.TYPED_ARRAY_SUPPORT:y(),j.kMaxLength=T();function y(){try{var ie=new Uint8Array(1);return ie.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ie.foo()===42&&typeof ie.subarray=="function"&&ie.subarray(1,1).byteLength===0}catch(Z){return!1}}function T(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(ie,Z){if(T()=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return ie|0}function s(ie){return+ie!=ie&&(ie=0),g.alloc(+ie)}g.isBuffer=function(Z){return!!(Z!=null&&Z._isBuffer)},g.compare=function(Z,X){if(!g.isBuffer(Z)||!g.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(Z===X)return 0;for(var Q=Z.length,_e=X.length,ve=0,Re=Math.min(Q,_e);ve>>1;case"base64":return te(ie).length;default:if(Q)return ae(ie).length;Z=(""+Z).toLowerCase(),Q=!0}}g.byteLength=l;function t(ie,Z,X){var Q=!1;if((Z===void 0||Z<0)&&(Z=0),Z>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,Z>>>=0,X<=Z)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return G(this,Z,X);case"utf8":case"utf-8":return I(this,Z,X);case"ascii":return W(this,Z,X);case"latin1":case"binary":return H(this,Z,X);case"base64":return k(this,Z,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,Z,X);default:if(Q)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),Q=!0}}g.prototype._isBuffer=!0;function S(ie,Z,X){var Q=ie[Z];ie[Z]=ie[X],ie[X]=Q}g.prototype.swap16=function(){var Z=this.length;if(Z%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X0&&(Z=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(Z+=" ... ")),""},g.prototype.compare=function(Z,X,Q,_e,ve){if(!g.isBuffer(Z))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Q===void 0&&(Q=Z?Z.length:0),_e===void 0&&(_e=0),ve===void 0&&(ve=this.length),X<0||Q>Z.length||_e<0||ve>this.length)throw new RangeError("out of range index");if(_e>=ve&&X>=Q)return 0;if(_e>=ve)return-1;if(X>=Q)return 1;if(X>>>=0,Q>>>=0,_e>>>=0,ve>>>=0,this===Z)return 0;for(var Re=ve-_e,Je=Q-X,qe=Math.min(Re,Je),rt=this.slice(_e,ve),ut=Z.slice(X,Q),dt=0;dt2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=_e?0:ie.length-1),X<0&&(X=ie.length+X),X>=ie.length){if(_e)return-1;X=ie.length-1}else if(X<0)if(_e)X=0;else return-1;if(typeof Z=="string"&&(Z=g.from(Z,Q)),g.isBuffer(Z))return Z.length===0?-1:f(ie,Z,X,Q,_e);if(typeof Z=="number")return Z=Z&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?_e?Uint8Array.prototype.indexOf.call(ie,Z,X):Uint8Array.prototype.lastIndexOf.call(ie,Z,X):f(ie,[Z],X,Q,_e);throw new TypeError("val must be string, number or Buffer")}function f(ie,Z,X,Q,_e){var ve=1,Re=ie.length,Je=Z.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(ie.length<2||Z.length<2)return-1;ve=2,Re/=2,Je/=2,X/=2}function qe(Be,Ie){return ve===1?Be[Ie]:Be.readUInt16BE(Ie*ve)}var rt;if(_e){var ut=-1;for(rt=X;rtRe&&(X=Re-Je),rt=X;rt>=0;rt--){for(var dt=!0,ft=0;ft_e&&(Q=_e)):Q=_e;var ve=Z.length;if(ve%2!==0)throw new TypeError("Invalid hex string");Q>ve/2&&(Q=ve/2);for(var Re=0;Reve)&&(Q=ve),Z.length>0&&(Q<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");_e||(_e="utf8");for(var Re=!1;;)switch(_e){case"hex":return R(this,Z,X,Q);case"utf8":case"utf-8":return C(this,Z,X,Q);case"ascii":return v(this,Z,X,Q);case"latin1":case"binary":return _(this,Z,X,Q);case"base64":return E(this,Z,X,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,Z,X,Q);default:if(Re)throw new TypeError("Unknown encoding: "+_e);_e=(""+_e).toLowerCase(),Re=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(ie,Z,X){return Z===0&&X===ie.length?O.fromByteArray(ie):O.fromByteArray(ie.slice(Z,X))}function I(ie,Z,X){X=Math.min(ie.length,X);for(var Q=[],_e=Z;_e239?4:ve>223?3:ve>191?2:1;if(_e+Je<=X){var qe,rt,ut,dt;switch(Je){case 1:ve<128&&(Re=ve);break;case 2:qe=ie[_e+1],(qe&192)===128&&(dt=(ve&31)<<6|qe&63,dt>127&&(Re=dt));break;case 3:qe=ie[_e+1],rt=ie[_e+2],(qe&192)===128&&(rt&192)===128&&(dt=(ve&15)<<12|(qe&63)<<6|rt&63,dt>2047&&(dt<55296||dt>57343)&&(Re=dt));break;case 4:qe=ie[_e+1],rt=ie[_e+2],ut=ie[_e+3],(qe&192)===128&&(rt&192)===128&&(ut&192)===128&&(dt=(ve&15)<<18|(qe&63)<<12|(rt&63)<<6|ut&63,dt>65535&&dt<1114112&&(Re=dt))}}Re===null?(Re=65533,Je=1):Re>65535&&(Re-=65536,Q.push(Re>>>10&1023|55296),Re=56320|Re&1023),Q.push(Re),_e+=Je}return V(Q)}var L=4096;function V(ie){var Z=ie.length;if(Z<=L)return String.fromCharCode.apply(String,ie);for(var X="",Q=0;QQ)&&(X=Q);for(var _e="",ve=Z;veQ&&(Z=Q),X<0?(X+=Q,X<0&&(X=0)):X>Q&&(X=Q),XX)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(Z,X,Q){Z=Z|0,X=X|0,Q||P(Z,X,this.length);for(var _e=this[Z],ve=1,Re=0;++Re0&&(ve*=256);)_e+=this[Z+--X]*ve;return _e},g.prototype.readUInt8=function(Z,X){return X||P(Z,1,this.length),this[Z]},g.prototype.readUInt16LE=function(Z,X){return X||P(Z,2,this.length),this[Z]|this[Z+1]<<8},g.prototype.readUInt16BE=function(Z,X){return X||P(Z,2,this.length),this[Z]<<8|this[Z+1]},g.prototype.readUInt32LE=function(Z,X){return X||P(Z,4,this.length),(this[Z]|this[Z+1]<<8|this[Z+2]<<16)+this[Z+3]*16777216},g.prototype.readUInt32BE=function(Z,X){return X||P(Z,4,this.length),this[Z]*16777216+(this[Z+1]<<16|this[Z+2]<<8|this[Z+3])},g.prototype.readIntLE=function(Z,X,Q){Z=Z|0,X=X|0,Q||P(Z,X,this.length);for(var _e=this[Z],ve=1,Re=0;++Re=ve&&(_e-=Math.pow(2,8*X)),_e},g.prototype.readIntBE=function(Z,X,Q){Z=Z|0,X=X|0,Q||P(Z,X,this.length);for(var _e=X,ve=1,Re=this[Z+--_e];_e>0&&(ve*=256);)Re+=this[Z+--_e]*ve;return ve*=128,Re>=ve&&(Re-=Math.pow(2,8*X)),Re},g.prototype.readInt8=function(Z,X){return X||P(Z,1,this.length),this[Z]&128?(255-this[Z]+1)*-1:this[Z]},g.prototype.readInt16LE=function(Z,X){X||P(Z,2,this.length);var Q=this[Z]|this[Z+1]<<8;return Q&32768?Q|4294901760:Q},g.prototype.readInt16BE=function(Z,X){X||P(Z,2,this.length);var Q=this[Z+1]|this[Z]<<8;return Q&32768?Q|4294901760:Q},g.prototype.readInt32LE=function(Z,X){return X||P(Z,4,this.length),this[Z]|this[Z+1]<<8|this[Z+2]<<16|this[Z+3]<<24},g.prototype.readInt32BE=function(Z,X){return X||P(Z,4,this.length),this[Z]<<24|this[Z+1]<<16|this[Z+2]<<8|this[Z+3]},g.prototype.readFloatLE=function(Z,X){return X||P(Z,4,this.length),M.read(this,Z,!0,23,4)},g.prototype.readFloatBE=function(Z,X){return X||P(Z,4,this.length),M.read(this,Z,!1,23,4)},g.prototype.readDoubleLE=function(Z,X){return X||P(Z,8,this.length),M.read(this,Z,!0,52,8)},g.prototype.readDoubleBE=function(Z,X){return X||P(Z,8,this.length),M.read(this,Z,!1,52,8)};function z(ie,Z,X,Q,_e,ve){if(!g.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(Z>_e||Zie.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(Z,X,Q,_e){if(Z=+Z,X=X|0,Q=Q|0,!_e){var ve=Math.pow(2,8*Q)-1;z(this,Z,X,Q,ve,0)}var Re=1,Je=0;for(this[X]=Z&255;++Je=0&&(Je*=256);)this[X+Re]=Z/Je&255;return X+Q},g.prototype.writeUInt8=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,1,255,0),g.TYPED_ARRAY_SUPPORT||(Z=Math.floor(Z)),this[X]=Z&255,X+1};function J(ie,Z,X,Q){Z<0&&(Z=65535+Z+1);for(var _e=0,ve=Math.min(ie.length-X,2);_e>>(Q?_e:1-_e)*8}g.prototype.writeUInt16LE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[X]=Z&255,this[X+1]=Z>>>8):J(this,Z,X,!0),X+2},g.prototype.writeUInt16BE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[X]=Z>>>8,this[X+1]=Z&255):J(this,Z,X,!1),X+2};function ue(ie,Z,X,Q){Z<0&&(Z=4294967295+Z+1);for(var _e=0,ve=Math.min(ie.length-X,4);_e>>(Q?_e:3-_e)*8&255}g.prototype.writeUInt32LE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[X+3]=Z>>>24,this[X+2]=Z>>>16,this[X+1]=Z>>>8,this[X]=Z&255):ue(this,Z,X,!0),X+4},g.prototype.writeUInt32BE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[X]=Z>>>24,this[X+1]=Z>>>16,this[X+2]=Z>>>8,this[X+3]=Z&255):ue(this,Z,X,!1),X+4},g.prototype.writeIntLE=function(Z,X,Q,_e){if(Z=+Z,X=X|0,!_e){var ve=Math.pow(2,8*Q-1);z(this,Z,X,Q,ve-1,-ve)}var Re=0,Je=1,qe=0;for(this[X]=Z&255;++Re>0)-qe&255;return X+Q},g.prototype.writeIntBE=function(Z,X,Q,_e){if(Z=+Z,X=X|0,!_e){var ve=Math.pow(2,8*Q-1);z(this,Z,X,Q,ve-1,-ve)}var Re=Q-1,Je=1,qe=0;for(this[X+Re]=Z&255;--Re>=0&&(Je*=256);)Z<0&&qe===0&&this[X+Re+1]!==0&&(qe=1),this[X+Re]=(Z/Je>>0)-qe&255;return X+Q},g.prototype.writeInt8=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,1,127,-128),g.TYPED_ARRAY_SUPPORT||(Z=Math.floor(Z)),Z<0&&(Z=255+Z+1),this[X]=Z&255,X+1},g.prototype.writeInt16LE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[X]=Z&255,this[X+1]=Z>>>8):J(this,Z,X,!0),X+2},g.prototype.writeInt16BE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[X]=Z>>>8,this[X+1]=Z&255):J(this,Z,X,!1),X+2},g.prototype.writeInt32LE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[X]=Z&255,this[X+1]=Z>>>8,this[X+2]=Z>>>16,this[X+3]=Z>>>24):ue(this,Z,X,!0),X+4},g.prototype.writeInt32BE=function(Z,X,Q){return Z=+Z,X=X|0,Q||z(this,Z,X,4,2147483647,-2147483648),Z<0&&(Z=4294967295+Z+1),g.TYPED_ARRAY_SUPPORT?(this[X]=Z>>>24,this[X+1]=Z>>>16,this[X+2]=Z>>>8,this[X+3]=Z&255):ue(this,Z,X,!1),X+4};function de(ie,Z,X,Q,_e,ve){if(X+Q>ie.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function Se(ie,Z,X,Q,_e){return _e||de(ie,Z,X,4,34028234663852886e22,-34028234663852886e22),M.write(ie,Z,X,Q,23,4),X+4}g.prototype.writeFloatLE=function(Z,X,Q){return Se(this,Z,X,!0,Q)},g.prototype.writeFloatBE=function(Z,X,Q){return Se(this,Z,X,!1,Q)};function Ae(ie,Z,X,Q,_e){return _e||de(ie,Z,X,8,17976931348623157e292,-17976931348623157e292),M.write(ie,Z,X,Q,52,8),X+8}g.prototype.writeDoubleLE=function(Z,X,Q){return Ae(this,Z,X,!0,Q)},g.prototype.writeDoubleBE=function(Z,X,Q){return Ae(this,Z,X,!1,Q)},g.prototype.copy=function(Z,X,Q,_e){if(Q||(Q=0),!_e&&_e!==0&&(_e=this.length),X>=Z.length&&(X=Z.length),X||(X=0),_e>0&&_e=this.length)throw new RangeError("sourceStart out of bounds");if(_e<0)throw new RangeError("sourceEnd out of bounds");_e>this.length&&(_e=this.length),Z.length-X<_e-Q&&(_e=Z.length-X+Q);var ve=_e-Q,Re;if(this===Z&&Q=0;--Re)Z[Re+X]=this[Re+Q];else if(ve<1e3||!g.TYPED_ARRAY_SUPPORT)for(Re=0;Re>>0,Q=Q===void 0?this.length:Q>>>0,Z||(Z=0);var Re;if(typeof Z=="number")for(Re=X;Re55295&&X<57344){if(!_e){if(X>56319){(Z-=3)>-1&&ve.push(239,191,189);continue}else if(Re+1===Q){(Z-=3)>-1&&ve.push(239,191,189);continue}_e=X;continue}if(X<56320){(Z-=3)>-1&&ve.push(239,191,189),_e=X;continue}X=(_e-55296<<10|X-56320)+65536}else _e&&((Z-=3)>-1&&ve.push(239,191,189));if(_e=null,X<128){if((Z-=1)<0)break;ve.push(X)}else if(X<2048){if((Z-=2)<0)break;ve.push(X>>6|192,X&63|128)}else if(X<65536){if((Z-=3)<0)break;ve.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((Z-=4)<0)break;ve.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return ve}function re(ie){for(var Z=[],X=0;X>8,_e=X%256,ve.push(_e),ve.push(Q);return ve}function te(ie){return O.toByteArray(Oe(ie))}function ne(ie,Z,X,Q){for(var _e=0;_e=Z.length||_e>=ie.length);++_e)Z[_e+X]=ie[_e];return _e}function Te(ie){return ie!==ie}}).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=g;function g(M,m){if(!(this instanceof g))return new g(M,m);this.src=M,this._withAccess=m}g.prototype.withAccess=function(M){return this._withAccess=M!==!1,this},g.prototype.pick=function(M){return Array.isArray(M)||(M=N.call(arguments)),M.length&&(this.keys=M),this},g.prototype.to=function(M){if(M=M||{},!this.src)return M;var m=this.keys||Object.keys(this.src);if(!this._withAccess){for(var y=0;yd;)if(n=b[d++],n!=n)return!0}else for(;p>d;d++)if((M||d in b)&&b[d]===y)return M||d||0;return!M&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(F,q,j){var N=F("./_cof"),g=F("./_wks")("toStringTag"),O=N(function(){return arguments}())=="Arguments",M=function(m,y){try{return m[y]}catch(T){}};q.exports=function(m){var y,T,b;return m===void 0?"Undefined":m===null?"Null":typeof(T=M(y=Object(m),g))=="string"?T:O?N(y):(b=N(y))=="Object"&&typeof y.callee=="function"?"Arguments":b}},{"./_cof":98,"./_wks":166}],98:[function(F,q,j){var N={}.toString;q.exports=function(g){return N.call(g).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"),g=F("./_property-desc");q.exports=function(O,M,m){M in O?N.f(O,M,g(0,m)):O[M]=m}},{"./_object-dp":132,"./_property-desc":146}],101:[function(F,q,j){var N=F("./_a-function");q.exports=function(g,O,M){if(N(g),O===void 0)return g;switch(M){case 1:return function(m){return g.call(O,m)};case 2:return function(m,y){return g.call(O,m,y)};case 3:return function(m,y,T){return g.call(O,m,y,T)}}return function(){return g.apply(O,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"),g=F("./_global").document,O=N(g)&&N(g.createElement);q.exports=function(M){return O?g.createElement(M):{}}},{"./_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"),g=F("./_object-gops"),O=F("./_object-pie");q.exports=function(M){var m=N(M),y=g.f;if(y)for(var T=y(M),b=O.f,p=0,d;T.length>p;)b.call(M,d=T[p++])&&m.push(d);return m}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(F,q,j){var N=F("./_global"),g=F("./_core"),O=F("./_ctx"),M=F("./_hide"),m=F("./_has"),y="prototype",T=function(b,p,d){var n=b&T.F,c=b&T.G,r=b&T.S,a=b&T.P,o=b&T.B,u=b&T.W,h=c?g:g[p]||(g[p]={}),s=h[y],l=c?N:r?N[p]:(N[p]||{})[y],t,S,x;c&&(d=p);for(t in d){if(S=!n&&l&&l[t]!==void 0,S&&m(h,t))continue;x=S?l[t]:d[t],h[t]=c&&typeof l[t]!="function"?d[t]:o&&S?O(x,N):u&&l[t]==x?function(f){var R=function(C,v,_){if(this instanceof f){switch(arguments.length){case 0:return new f;case 1:return new f(C);case 2:return new f(C,v)}return new f(C,v,_)}return f.apply(this,arguments)};return R[y]=f[y],R}(x):a&&typeof x=="function"?O(Function.call,x):x,a&&((h.virtual||(h.virtual={}))[t]=x,b&T.R&&s&&!s[t]&&M(s,t,x))}};T.F=1,T.G=2,T.S=4,T.P=8,T.B=16,T.W=32,T.U=64,T.R=128,q.exports=T},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(F,q,j){q.exports=function(N){try{return!!N()}catch(g){return!0}}},{}],109:[function(F,q,j){var N=F("./_ctx"),g=F("./_iter-call"),O=F("./_is-array-iter"),M=F("./_an-object"),m=F("./_to-length"),y=F("./core.get-iterator-method"),T={},b={},j=q.exports=function(p,d,n,c,r){var a=r?function(){return p}:y(p),o=N(n,c,d?2:1),u=0,h,s,l,t;if(typeof a!="function")throw TypeError(p+" is not iterable!");if(O(a)){for(h=m(p.length);h>u;u++)if(t=d?o(M(s=p[u])[0],s[1]):o(p[u]),t===T||t===b)return t}else for(l=a.call(p);!(s=l.next()).done;)if(t=g(l,o,s.value,d),t===T||t===b)return t};j.BREAK=T,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(g,O){return N.call(g,O)}},{}],112:[function(F,q,j){var N=F("./_object-dp"),g=F("./_property-desc");q.exports=F("./_descriptors")?function(O,M,m){return N.f(O,M,g(1,m))}:function(O,M,m){return O[M]=m,O}},{"./_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,g,O){var M=O===void 0;switch(g.length){case 0:return M?N():N.call(O);case 1:return M?N(g[0]):N.call(O,g[0]);case 2:return M?N(g[0],g[1]):N.call(O,g[0],g[1]);case 3:return M?N(g[0],g[1],g[2]):N.call(O,g[0],g[1],g[2]);case 4:return M?N(g[0],g[1],g[2],g[3]):N.call(O,g[0],g[1],g[2],g[3])}return N.apply(O,g)}},{}],116:[function(F,q,j){var N=F("./_cof");q.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return N(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(F,q,j){var N=F("./_iterators"),g=F("./_wks")("iterator"),O=Array.prototype;q.exports=function(M){return M!==void 0&&(N.Array===M||O[g]===M)}},{"./_iterators":125,"./_wks":166}],118:[function(F,q,j){var N=F("./_cof");q.exports=Array.isArray||function(O){return N(O)=="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(g,O,M,m){try{return m?O(N(M)[0],M[1]):O(M)}catch(T){var y=g.return;throw y!==void 0&&N(y.call(g)),T}}},{"./_an-object":95}],121:[function(F,q,j){"use strict";var N=F("./_object-create"),g=F("./_property-desc"),O=F("./_set-to-string-tag"),M={};F("./_hide")(M,F("./_wks")("iterator"),function(){return this}),q.exports=function(m,y,T){m.prototype=N(M,{next:g(1,T)}),O(m,y+" 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"),g=F("./_export"),O=F("./_redefine"),M=F("./_hide"),m=F("./_iterators"),y=F("./_iter-create"),T=F("./_set-to-string-tag"),b=F("./_object-gpo"),p=F("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),n="@@iterator",c="keys",r="values",a=function(){return this};q.exports=function(o,u,h,s,l,t,S){y(h,u,s);var x=function(W){if(!d&&W in v)return v[W];switch(W){case c:return function(){return new h(this,W)};case r:return function(){return new h(this,W)}}return function(){return new h(this,W)}},f=u+" Iterator",R=l==r,C=!1,v=o.prototype,_=v[p]||v[n]||l&&v[l],E=_||x(l),w=l?R?x("entries"):E:void 0,k=u=="Array"&&v.entries||_,I,L,V;if(k&&(V=b(k.call(new o)),V!==Object.prototype&&V.next&&(T(V,f,!0),!N&&typeof V[p]!="function"&&M(V,p,a))),R&&_&&_.name!==r&&(C=!0,E=function(){return _.call(this)}),(!N||S)&&(d||C||!v[p])&&M(v,p,E),m[u]=E,m[f]=a,l)if(I={values:R?E:x(r),keys:t?E:x(c),entries:w},S)for(L in I)L in v||O(v,L,I[L]);else g(g.P+g.F*(d||C),u,I);return I}},{"./_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"),g=!1;try{var O=[7][N]();O.return=function(){g=!0},Array.from(O,function(){throw 2})}catch(M){}q.exports=function(M,m){if(!m&&!g)return!1;var y=!1;try{var T=[7],b=T[N]();b.next=function(){return{done:y=!0}},T[N]=function(){return b},M(T)}catch(p){}return y}},{"./_wks":166}],124:[function(F,q,j){q.exports=function(N,g){return{value:g,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"),g=F("./_is-object"),O=F("./_has"),M=F("./_object-dp").f,m=0,y=Object.isExtensible||function(){return!0},T=!F("./_fails")(function(){return y(Object.preventExtensions({}))}),b=function(r){M(r,N,{value:{i:"O"+ ++m,w:{}}})},p=function(r,a){if(!g(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!O(r,N)){if(!y(r))return"F";if(!a)return"E";b(r)}return r[N].i},d=function(r,a){if(!O(r,N)){if(!y(r))return!0;if(!a)return!1;b(r)}return r[N].w},n=function(r){return T&&c.NEED&&y(r)&&!O(r,N)&&b(r),r},c=q.exports={KEY:N,NEED:!1,fastKey:p,getWeak:d,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(F,q,j){var N=F("./_global"),g=F("./_task").set,O=N.MutationObserver||N.WebKitMutationObserver,M=N.process,m=N.Promise,y=F("./_cof")(M)=="process";q.exports=function(){var T,b,p,d=function(){var a,o;for(y&&(a=M.domain)&&a.exit();T;){o=T.fn,T=T.next;try{o()}catch(u){throw T?p():b=void 0,u}}b=void 0,a&&a.enter()};if(y)p=function(){M.nextTick(d)};else if(O&&!(N.navigator&&N.navigator.standalone)){var n=!0,c=document.createTextNode("");new O(d).observe(c,{characterData:!0}),p=function(){c.data=n=!n}}else if(m&&m.resolve){var r=m.resolve(void 0);p=function(){r.then(d)}}else p=function(){g.call(N,d)};return function(a){var o={fn:a,next:void 0};b&&(b.next=o),T||(T=o,p()),b=o}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(F,q,j){"use strict";var N=F("./_a-function");function g(O){var M,m;this.promise=new O(function(y,T){if(M!==void 0||m!==void 0)throw TypeError("Bad Promise constructor");M=y,m=T}),this.resolve=N(M),this.reject=N(m)}q.exports.f=function(O){return new g(O)}},{"./_a-function":92}],130:[function(F,q,j){"use strict";var N=F("./_descriptors"),g=F("./_object-keys"),O=F("./_object-gops"),M=F("./_object-pie"),m=F("./_to-object"),y=F("./_iobject"),T=Object.assign;q.exports=!T||F("./_fails")(function(){var b={},p={},d=Symbol(),n="abcdefghijklmnopqrst";return b[d]=7,n.split("").forEach(function(c){p[c]=c}),T({},b)[d]!=7||Object.keys(T({},p)).join("")!=n})?function(p,d){for(var n=m(p),c=arguments.length,r=1,a=O.f,o=M.f;c>r;)for(var u=y(arguments[r++]),h=a?g(u).concat(a(u)):g(u),s=h.length,l=0,t;s>l;)t=h[l++],(!N||o.call(u,t))&&(n[t]=u[t]);return n}:T},{"./_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"),g=F("./_object-dps"),O=F("./_enum-bug-keys"),M=F("./_shared-key")("IE_PROTO"),m=function(){},y="prototype",T=function(){var b=F("./_dom-create")("iframe"),p=O.length,d="<",n=">",c;for(b.style.display="none",F("./_html").appendChild(b),b.src="javascript:",c=b.contentWindow.document,c.open(),c.write(d+"script"+n+"document.F=Object"+d+"/script"+n),c.close(),T=c.F;p--;)delete T[y][O[p]];return T()};q.exports=Object.create||function(p,d){var n;return p!==null?(m[y]=N(p),n=new m,m[y]=null,n[M]=p):n=T(),d===void 0?n:g(n,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"),g=F("./_ie8-dom-define"),O=F("./_to-primitive"),M=Object.defineProperty;j.f=F("./_descriptors")?Object.defineProperty:function(y,T,b){if(N(y),T=O(T,!0),N(b),g)try{return M(y,T,b)}catch(p){}if("get"in b||"set"in b)throw TypeError("Accessors not supported!");return"value"in b&&(y[T]=b.value),y}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(F,q,j){var N=F("./_object-dp"),g=F("./_an-object"),O=F("./_object-keys");q.exports=F("./_descriptors")?Object.defineProperties:function(m,y){g(m);for(var T=O(y),b=T.length,p=0,d;b>p;)N.f(m,d=T[p++],y[d]);return m}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(F,q,j){var N=F("./_object-pie"),g=F("./_property-desc"),O=F("./_to-iobject"),M=F("./_to-primitive"),m=F("./_has"),y=F("./_ie8-dom-define"),T=Object.getOwnPropertyDescriptor;j.f=F("./_descriptors")?T:function(p,d){if(p=O(p),d=M(d,!0),y)try{return T(p,d)}catch(n){}if(m(p,d))return g(!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"),g=F("./_object-gopn").f,O={}.toString,M=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],m=function(y){try{return g(y)}catch(T){return M.slice()}};q.exports.f=function(T){return M&&O.call(T)=="[object Window]"?m(T):g(N(T))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(F,q,j){var N=F("./_object-keys-internal"),g=F("./_enum-bug-keys").concat("length","prototype");j.f=Object.getOwnPropertyNames||function(M){return N(M,g)}},{"./_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"),g=F("./_to-object"),O=F("./_shared-key")("IE_PROTO"),M=Object.prototype;q.exports=Object.getPrototypeOf||function(m){return m=g(m),N(m,O)?m[O]:typeof m.constructor=="function"&&m instanceof m.constructor?m.constructor.prototype:m instanceof Object?M:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(F,q,j){var N=F("./_has"),g=F("./_to-iobject"),O=F("./_array-includes")(!1),M=F("./_shared-key")("IE_PROTO");q.exports=function(m,y){var T=g(m),b=0,p=[],d;for(d in T)d!=M&&(N(T,d)&&p.push(d));for(;y.length>b;)N(T,d=y[b++])&&(~O(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"),g=F("./_enum-bug-keys");q.exports=Object.keys||function(M){return N(M,g)}},{"./_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"),g=F("./_core"),O=F("./_fails");q.exports=function(M,m){var y=(g.Object||{})[M]||Object[M],T={};T[M]=m(y),N(N.S+N.F*O(function(){y(1)}),"Object",T)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(F,q,j){var N=F("./_descriptors"),g=F("./_object-keys"),O=F("./_to-iobject"),M=F("./_object-pie").f;q.exports=function(m){return function(y){for(var T=O(y),b=g(T),p=b.length,d=0,n=[],c;p>d;)c=b[d++],(!N||M.call(T,c))&&n.push(m?[c,T[c]]:T[c]);return n}}},{"./_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(g){return{e:!0,v:g}}}},{}],145:[function(F,q,j){var N=F("./_an-object"),g=F("./_is-object"),O=F("./_new-promise-capability");q.exports=function(M,m){if(N(M),g(m)&&m.constructor===M)return m;var y=O.f(M),T=y.resolve;return T(m),y.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(F,q,j){q.exports=function(N,g){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:g}}},{}],147:[function(F,q,j){var N=F("./_hide");q.exports=function(g,O,M){for(var m in O)M&&g[m]?g[m]=O[m]:N(g,m,O[m]);return g}},{"./_hide":112}],148:[function(F,q,j){q.exports=F("./_hide")},{"./_hide":112}],149:[function(F,q,j){"use strict";var N=F("./_global"),g=F("./_core"),O=F("./_object-dp"),M=F("./_descriptors"),m=F("./_wks")("species");q.exports=function(y){var T=typeof g[y]=="function"?g[y]:N[y];M&&T&&!T[m]&&O.f(T,m,{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,g=F("./_has"),O=F("./_wks")("toStringTag");q.exports=function(M,m,y){M&&!g(M=y?M:M.prototype,O)&&N(M,O,{configurable:!0,value:m})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(F,q,j){var N=F("./_shared")("keys"),g=F("./_uid");q.exports=function(O){return N[O]||(N[O]=g(O))}},{"./_shared":152,"./_uid":162}],152:[function(F,q,j){var N=F("./_core"),g=F("./_global"),O="__core-js_shared__",M=g[O]||(g[O]={});(q.exports=function(m,y){return M[m]||(M[m]=y!==void 0?y:{})})("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"),g=F("./_a-function"),O=F("./_wks")("species");q.exports=function(M,m){var y=N(M).constructor,T;return y===void 0||(T=N(y)[O])==null?m:g(T)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(F,q,j){var N=F("./_to-integer"),g=F("./_defined");q.exports=function(O){return function(M,m){var y=String(g(M)),T=N(m),b=y.length,p,d;return T<0||T>=b?O?"":void 0:(p=y.charCodeAt(T),p<55296||p>56319||T+1===b||(d=y.charCodeAt(T+1))<56320||d>57343?O?y.charAt(T):p:O?y.slice(T,T+2):(p-55296<<10)+(d-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(F,q,j){var N=F("./_ctx"),g=F("./_invoke"),O=F("./_html"),M=F("./_dom-create"),m=F("./_global"),y=m.process,T=m.setImmediate,b=m.clearImmediate,p=m.MessageChannel,d=m.Dispatch,n=0,c={},r="onreadystatechange",a,o,u,h=function(){var l=+this;if(c.hasOwnProperty(l)){var t=c[l];delete c[l],t()}},s=function(l){h.call(l.data)};(!T||!b)&&(T=function(t){for(var S=[],x=1;arguments.length>x;)S.push(arguments[x++]);return c[++n]=function(){g(typeof t=="function"?t:Function(t),S)},a(n),n},b=function(t){delete c[t]},F("./_cof")(y)=="process"?a=function(l){y.nextTick(N(h,l,1))}:d&&d.now?a=function(l){d.now(N(h,l,1))}:p?(o=new p,u=o.port2,o.port1.onmessage=s,a=N(u.postMessage,u,1)):m.addEventListener&&typeof postMessage=="function"&&!m.importScripts?(a=function(l){m.postMessage(l+"","*")},m.addEventListener("message",s,!1)):r in M("script")?a=function(l){O.appendChild(M("script"))[r]=function(){O.removeChild(this),h.call(l)}}:a=function(l){setTimeout(N(h,l,1),0)}),q.exports={set:T,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"),g=Math.max,O=Math.min;q.exports=function(M,m){return M=N(M),M<0?g(M+m,0):O(M,m)}},{"./_to-integer":157}],157:[function(F,q,j){var N=Math.ceil,g=Math.floor;q.exports=function(O){return isNaN(O=+O)?0:(O>0?g:N)(O)}},{}],158:[function(F,q,j){var N=F("./_iobject"),g=F("./_defined");q.exports=function(O){return N(g(O))}},{"./_defined":102,"./_iobject":116}],159:[function(F,q,j){var N=F("./_to-integer"),g=Math.min;q.exports=function(O){return O>0?g(N(O),9007199254740991):0}},{"./_to-integer":157}],160:[function(F,q,j){var N=F("./_defined");q.exports=function(g){return Object(N(g))}},{"./_defined":102}],161:[function(F,q,j){var N=F("./_is-object");q.exports=function(g,O){if(!N(g))return g;var M,m;if(O&&typeof(M=g.toString)=="function"&&!N(m=M.call(g)))return m;if(typeof(M=g.valueOf)=="function"&&!N(m=M.call(g)))return m;if(!O&&typeof(M=g.toString)=="function"&&!N(m=M.call(g)))return m;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(F,q,j){var N=0,g=Math.random();q.exports=function(O){return"Symbol(".concat(O===void 0?"":O,")_",(++N+g).toString(36))}},{}],163:[function(F,q,j){var N=F("./_global"),g=N.navigator;q.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(F,q,j){var N=F("./_global"),g=F("./_core"),O=F("./_library"),M=F("./_wks-ext"),m=F("./_object-dp").f;q.exports=function(y){var T=g.Symbol||(g.Symbol=O?{}:N.Symbol||{});y.charAt(0)!="_"&&!(y in T)&&m(T,y,{value:M.f(y)})}},{"./_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"),g=F("./_uid"),O=F("./_global").Symbol,M=typeof O=="function",m=q.exports=function(y){return N[y]||(N[y]=M&&O[y]||(M?O:g)("Symbol."+y))};m.store=N},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(F,q,j){var N=F("./_classof"),g=F("./_wks")("iterator"),O=F("./_iterators");q.exports=F("./_core").getIteratorMethod=function(M){if(M!=null)return M[g]||M["@@iterator"]||O[N(M)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(F,q,j){"use strict";var N=F("./_ctx"),g=F("./_export"),O=F("./_to-object"),M=F("./_iter-call"),m=F("./_is-array-iter"),y=F("./_to-length"),T=F("./_create-property"),b=F("./core.get-iterator-method");g(g.S+g.F*!F("./_iter-detect")(function(p){Array.from(p)}),"Array",{from:function(d){var n=O(d),c=typeof this=="function"?this:Array,r=arguments.length,a=r>1?arguments[1]:void 0,o=a!==void 0,u=0,h=b(n),s,l,t,S;if(o&&(a=N(a,r>2?arguments[2]:void 0,2)),h!=null&&!(c==Array&&m(h)))for(S=h.call(n),l=new c;!(t=S.next()).done;u++)T(l,u,o?M(S,a,[t.value,u],!0):t.value);else for(s=y(n.length),l=new c(s);s>u;u++)T(l,u,o?a(n[u],u):n[u]);return l.length=u,l}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(F,q,j){"use strict";var N=F("./_add-to-unscopables"),g=F("./_iter-step"),O=F("./_iterators"),M=F("./_to-iobject");q.exports=F("./_iter-define")(Array,"Array",function(m,y){this._t=M(m),this._i=0,this._k=y},function(){var m=this._t,y=this._k,T=this._i++;return!m||T>=m.length?(this._t=void 0,g(1)):y=="keys"?g(0,T):y=="values"?g(0,m[T]):g(0,[T,m[T]])},"values"),O.Arguments=O.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"),g=F("./_object-gpo"),O=F("./_wks")("hasInstance"),M=Function.prototype;O in M||F("./_object-dp").f(M,O,{value:function(m){if(typeof this!="function"||!N(m))return!1;if(!N(this.prototype))return m instanceof this;for(;m=g(m);)if(this.prototype===m)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"),g=F("./_object-gpo");F("./_object-sap")("getPrototypeOf",function(){return function(M){return g(N(M))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(F,q,j){var N=F("./_to-object"),g=F("./_object-keys");F("./_object-sap")("keys",function(){return function(M){return g(N(M))}})},{"./_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"),g=F("./_global"),O=F("./_ctx"),M=F("./_classof"),m=F("./_export"),y=F("./_is-object"),T=F("./_a-function"),b=F("./_an-instance"),p=F("./_for-of"),d=F("./_species-constructor"),n=F("./_task").set,c=F("./_microtask")(),r=F("./_new-promise-capability"),a=F("./_perform"),o=F("./_user-agent"),u=F("./_promise-resolve"),h="Promise",s=g.TypeError,l=g.process,t=l&&l.versions,S=t&&t.v8||"",x=g[h],f=M(l)=="process",R=function(){},C,v,_,E,w=v=r.f,k=!!function(){try{var P=x.resolve(1),z=(P.constructor={})[F("./_wks")("species")]=function(J){J(R,R)};return(f||typeof PromiseRejectionEvent=="function")&&P.then(R)instanceof z&&S.indexOf("6.6")!==0&&o.indexOf("Chrome/66")===-1}catch(J){}}(),I=function(P){var z;return y(P)&&typeof(z=P.then)=="function"?z:!1},L=function(P,z){if(P._n)return;P._n=!0;var J=P._c;c(function(){for(var ue=P._v,de=P._s==1,Se=0,Ae=function(pe){var Oe=de?pe.ok:pe.fail,ye=pe.resolve,ce=pe.reject,ae=pe.domain,re,fe,te;try{Oe?(de||(P._h==2&&H(P),P._h=1),Oe===!0?re=ue:(ae&&ae.enter(),re=Oe(ue),ae&&(ae.exit(),te=!0)),re===pe.promise?ce(s("Promise-chain cycle")):(fe=I(re))?fe.call(re,ye,ce):ye(re)):ce(ue)}catch(ne){ae&&!te&&ae.exit(),ce(ne)}};J.length>Se;)Ae(J[Se++]);P._c=[],P._n=!1,z&&!P._h&&V(P)})},V=function(P){n.call(g,function(){var z=P._v,J=W(P),ue,de,Se;if(J&&(ue=a(function(){f?l.emit("unhandledRejection",z,P):(de=g.onunhandledrejection)?de({promise:P,reason:z}):(Se=g.console)&&Se.error&&Se.error("Unhandled promise rejection",z)}),P._h=f||W(P)?2:1),P._a=void 0,J&&ue.e)throw ue.v})},W=function(P){return P._h!==1&&(P._a||P._c).length===0},H=function(P){n.call(g,function(){var z;f?l.emit("rejectionHandled",P):(z=g.onrejectionhandled)&&z({promise:P,reason:P._v})})},G=function(P){var z=this;if(z._d)return;z._d=!0,z=z._w||z,z._v=P,z._s=2,z._a||(z._a=z._c.slice()),L(z,!0)},B=function(P){var z=this,J;if(z._d)return;z._d=!0,z=z._w||z;try{if(z===P)throw s("Promise can't be resolved itself");(J=I(P))?c(function(){var ue={_w:z,_d:!1};try{J.call(P,O(B,ue,1),O(G,ue,1))}catch(de){G.call(ue,de)}}):(z._v=P,z._s=1,L(z,!1))}catch(ue){G.call({_w:z,_d:!1},ue)}};k||(x=function(z){b(this,x,h,"_h"),T(z),C.call(this);try{z(O(B,this,1),O(G,this,1))}catch(J){G.call(this,J)}},C=function(z){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},C.prototype=F("./_redefine-all")(x.prototype,{then:function(z,J){var ue=w(d(this,x));return ue.ok=typeof z=="function"?z:!0,ue.fail=typeof J=="function"&&J,ue.domain=f?l.domain:void 0,this._c.push(ue),this._a&&this._a.push(ue),this._s&&L(this,!1),ue.promise},catch:function(P){return this.then(void 0,P)}}),_=function(){var P=new C;this.promise=P,this.resolve=O(B,P,1),this.reject=O(G,P,1)},r.f=w=function(P){return P===x||P===E?new _(P):v(P)}),m(m.G+m.W+m.F*!k,{Promise:x}),F("./_set-to-string-tag")(x,h),F("./_set-species")(h),E=F("./_core")[h],m(m.S+m.F*!k,h,{reject:function(z){var J=w(this),ue=J.reject;return ue(z),J.promise}}),m(m.S+m.F*(N||!k),h,{resolve:function(z){return u(N&&this===E?x:this,z)}}),m(m.S+m.F*!(k&&F("./_iter-detect")(function(P){x.all(P).catch(R)})),h,{all:function(z){var J=this,ue=w(J),de=ue.resolve,Se=ue.reject,Ae=a(function(){var pe=[],Oe=0,ye=1;p(z,!1,function(ce){var ae=Oe++,re=!1;pe.push(void 0),ye++,J.resolve(ce).then(function(fe){if(re)return;re=!0,pe[ae]=fe,--ye||de(pe)},Se)}),--ye||de(pe)});return Ae.e&&Se(Ae.v),ue.promise},race:function(z){var J=this,ue=w(J),de=ue.reject,Se=a(function(){p(z,!1,function(Ae){J.resolve(Ae).then(ue.resolve,de)})});return Se.e&&de(Se.v),ue.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"),g=F("./_to-absolute-index"),O=String.fromCharCode,M=String.fromCodePoint;N(N.S+N.F*(!!M&&M.length!=1),"String",{fromCodePoint:function(y){for(var T=[],b=arguments.length,p=0,d;b>p;){if(d=+arguments[p++],g(d,1114111)!==d)throw RangeError(d+" is not a valid code point");T.push(d<65536?O(d):O(((d-=65536)>>10)+55296,d%1024+56320))}return T.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(g){this._t=String(g),this._i=0},function(){var g=this._t,O=this._i,M;return O>=g.length?{value:void 0,done:!0}:(M=N(g,O),this._i+=M.length,{value:M,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(F,q,j){"use strict";var N=F("./_global"),g=F("./_has"),O=F("./_descriptors"),M=F("./_export"),m=F("./_redefine"),y=F("./_meta").KEY,T=F("./_fails"),b=F("./_shared"),p=F("./_set-to-string-tag"),d=F("./_uid"),n=F("./_wks"),c=F("./_wks-ext"),r=F("./_wks-define"),a=F("./_enum-keys"),o=F("./_is-array"),u=F("./_an-object"),h=F("./_is-object"),s=F("./_to-object"),l=F("./_to-iobject"),t=F("./_to-primitive"),S=F("./_property-desc"),x=F("./_object-create"),f=F("./_object-gopn-ext"),R=F("./_object-gopd"),C=F("./_object-gops"),v=F("./_object-dp"),_=F("./_object-keys"),E=R.f,w=v.f,k=f.f,I=N.Symbol,L=N.JSON,V=L&&L.stringify,W="prototype",H=n("_hidden"),G=n("toPrimitive"),B={}.propertyIsEnumerable,P=b("symbol-registry"),z=b("symbols"),J=b("op-symbols"),ue=Object[W],de=typeof I=="function"&&!!C.f,Se=N.QObject,Ae=!Se||!Se[W]||!Se[W].findChild,pe=O&&T(function(){return x(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a!=7})?function(ve,Re,Je){var qe=E(ue,Re);qe&&delete ue[Re],w(ve,Re,Je),qe&&ve!==ue&&w(ue,Re,qe)}:w,Oe=function(ve){var Re=z[ve]=x(I[W]);return Re._k=ve,Re},ye=de&&typeof I.iterator=="symbol"?function(ve){return typeof ve=="symbol"}:function(ve){return ve instanceof I},ce=function(Re,Je,qe){return Re===ue&&ce(J,Je,qe),u(Re),Je=t(Je,!0),u(qe),g(z,Je)?(qe.enumerable?(g(Re,H)&&Re[H][Je]&&(Re[H][Je]=!1),qe=x(qe,{enumerable:S(0,!1)})):(g(Re,H)||w(Re,H,S(1,{})),Re[H][Je]=!0),pe(Re,Je,qe)):w(Re,Je,qe)},ae=function(Re,Je){u(Re);for(var qe=a(Je=l(Je)),rt=0,ut=qe.length,dt;ut>rt;)ce(Re,dt=qe[rt++],Je[dt]);return Re},re=function(Re,Je){return Je===void 0?x(Re):ae(x(Re),Je)},fe=function(Re){var Je=B.call(this,Re=t(Re,!0));return this===ue&&g(z,Re)&&!g(J,Re)?!1:Je||!g(this,Re)||!g(z,Re)||g(this,H)&&this[H][Re]?Je:!0},te=function(Re,Je){if(Re=l(Re),Je=t(Je,!0),Re===ue&&g(z,Je)&&!g(J,Je))return;var qe=E(Re,Je);return qe&&g(z,Je)&&!(g(Re,H)&&Re[H][Je])&&(qe.enumerable=!0),qe},ne=function(Re){for(var Je=k(l(Re)),qe=[],rt=0,ut;Je.length>rt;)!g(z,ut=Je[rt++])&&ut!=H&&ut!=y&&qe.push(ut);return qe},Te=function(Re){for(var Je=Re===ue,qe=k(Je?J:l(Re)),rt=[],ut=0,dt;qe.length>ut;)g(z,dt=qe[ut++])&&(Je?g(ue,dt):!0)&&rt.push(z[dt]);return rt};de||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var Re=d(arguments.length>0?arguments[0]:void 0),Je=function(qe){this===ue&&Je.call(J,qe),g(this,H)&&g(this[H],Re)&&(this[H][Re]=!1),pe(this,Re,S(1,qe))};return O&&Ae&&pe(ue,Re,{configurable:!0,set:Je}),Oe(Re)},m(I[W],"toString",function(){return this._k}),R.f=te,v.f=ce,F("./_object-gopn").f=f.f=ne,F("./_object-pie").f=fe,C.f=Te,O&&!F("./_library")&&m(ue,"propertyIsEnumerable",fe,!0),c.f=function(ve){return Oe(n(ve))}),M(M.G+M.W+M.F*!de,{Symbol:I});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Z=0;ie.length>Z;)n(ie[Z++]);for(var X=_(n.store),Q=0;X.length>Q;)r(X[Q++]);M(M.S+M.F*!de,"Symbol",{for:function(ve){return g(P,ve+="")?P[ve]:P[ve]=I(ve)},keyFor:function(Re){if(!ye(Re))throw TypeError(Re+" is not a symbol!");for(var Je in P)if(P[Je]===Re)return Je},useSetter:function(){Ae=!0},useSimple:function(){Ae=!1}}),M(M.S+M.F*!de,"Object",{create:re,defineProperty:ce,defineProperties:ae,getOwnPropertyDescriptor:te,getOwnPropertyNames:ne,getOwnPropertySymbols:Te});var _e=T(function(){C.f(1)});M(M.S+M.F*_e,"Object",{getOwnPropertySymbols:function(Re){return C.f(s(Re))}}),L&&M(M.S+M.F*(!de||T(function(){var ve=I();return V([ve])!="[null]"||V({a:ve})!="{}"||V(Object(ve))!="{}"})),"JSON",{stringify:function(Re){for(var Je=[Re],qe=1,rt,ut;arguments.length>qe;)Je.push(arguments[qe++]);return ut=rt=Je[1],!h(rt)&&Re===void 0||ye(Re)?void 0:(o(rt)||(rt=function(dt,ft){if(typeof ut=="function"&&(ft=ut.call(this,dt,ft)),!ye(ft))return ft}),Je[1]=rt,V.apply(L,Je))}}),I[W][G]||F("./_hide")(I[W],G,I[W].valueOf),p(I,"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"),g=F("./_object-to-array")(!0);N(N.S,"Object",{entries:function(M){return g(M)}})},{"./_export":107,"./_object-to-array":143}],183:[function(F,q,j){"use strict";var N=F("./_export"),g=F("./_core"),O=F("./_global"),M=F("./_species-constructor"),m=F("./_promise-resolve");N(N.P+N.R,"Promise",{finally:function(y){var T=M(this,g.Promise||O.Promise),b=typeof y=="function";return this.then(b?function(p){return m(T,y()).then(function(){return p})}:y,b?function(p){return m(T,y()).then(function(){throw p})}:y)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(F,q,j){"use strict";var N=F("./_export"),g=F("./_new-promise-capability"),O=F("./_perform");N(N.S,"Promise",{try:function(M){var m=g.f(this),y=O(M);return(y.e?m.reject:m.resolve)(y.v),m.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"),g=F("./_hide"),O=F("./_iterators"),M=F("./_wks")("toStringTag"),m="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(","),y=0;y0?"-":"+")+y(Math.floor(Math.abs(_)/60)*100+Math.abs(_)%60,4),S:["th","st","nd","rd"][l%10>3?0:(l%100-l%10!=10)*l%10],W:E,N:w};return a.replace(d,function(I){return I in k?k[I]:I.slice(1,I.length-1)})}}();m.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"},m.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 y(d,n){for(d=String(d),n=n||2;d.length]/;q.exports=g;function g(O){var M=""+O,m=N.exec(M);if(!m)return M;var y,T="",b=0,p=0;for(b=m.index;b0&&this._events[y].length>b&&(this._events[y].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[y].length),typeof console.trace=="function"&&console.trace())),this},N.prototype.on=N.prototype.addListener,N.prototype.once=function(y,T){if(!g(T))throw TypeError("listener must be a function");var b=!1;function p(){this.removeListener(y,p),b||(b=!0,T.apply(this,arguments))}return p.listener=T,this.on(y,p),this},N.prototype.removeListener=function(y,T){var b,p,d,n;if(!g(T))throw TypeError("listener must be a function");if(!this._events||!this._events[y])return this;if(b=this._events[y],d=b.length,p=-1,b===T||g(b.listener)&&b.listener===T)delete this._events[y],this._events.removeListener&&this.emit("removeListener",y,T);else if(M(b)){for(n=d;n-- >0;)if(b[n]===T||b[n].listener&&b[n].listener===T){p=n;break}if(p<0)return this;b.length===1?(b.length=0,delete this._events[y]):b.splice(p,1),this._events.removeListener&&this.emit("removeListener",y,T)}return this},N.prototype.removeAllListeners=function(y){var T,b;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[y]&&delete this._events[y],this;if(arguments.length===0){for(T in this._events){if(T==="removeListener")continue;this.removeAllListeners(T)}return this.removeAllListeners("removeListener"),this._events={},this}if(b=this._events[y],g(b))this.removeListener(y,b);else if(b)for(;b.length;)this.removeListener(y,b[b.length-1]);return delete this._events[y],this},N.prototype.listeners=function(y){var T;return!this._events||!this._events[y]?T=[]:g(this._events[y])?T=[this._events[y]]:T=this._events[y].slice(),T},N.prototype.listenerCount=function(y){if(this._events){var T=this._events[y];if(g(T))return 1;if(T)return T.length}return 0},N.listenerCount=function(y,T){return y.listenerCount(T)};function g(y){return typeof y=="function"}function O(y){return typeof y=="number"}function M(y){return typeof y=="object"&&y!==null}function m(y){return y===void 0}},{}],193:[function(F,q,j){var N=F("http"),g=q.exports;for(var O in N)N.hasOwnProperty(O)&&(g[O]=N[O]);g.request=function(M,m){return M||(M={}),M.scheme="https",M.protocol="https:",N.request.call(this,M,m)}},{http:231}],194:[function(F,q,j){/*! * humanize-ms - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var N=F("util"),g=F("ms");q.exports=function(O){if(typeof O=="number")return O;var M=g(O);if(M===void 0){var m=new Error(N.format("humanize-ms(%j) result undefined",O));console.warn(m.stack)}return M}},{ms:204,util:243}],195:[function(F,q,j){j.read=function(N,g,O,M,m){var y,T,b=m*8-M-1,p=(1<>1,n=-7,c=O?m-1:0,r=O?-1:1,a=N[g+c];for(c+=r,y=a&(1<<-n)-1,a>>=-n,n+=b;n>0;y=y*256+N[g+c],c+=r,n-=8);for(T=y&(1<<-n)-1,y>>=-n,n+=M;n>0;T=T*256+N[g+c],c+=r,n-=8);if(y===0)y=1-d;else{if(y===p)return T?NaN:(a?-1:1)*Infinity;T=T+Math.pow(2,M),y=y-d}return(a?-1:1)*T*Math.pow(2,y-M)},j.write=function(N,g,O,M,m,y){var T,b,p,d=y*8-m-1,n=(1<>1,r=m===23?Math.pow(2,-24)-Math.pow(2,-77):0,a=M?0:y-1,o=M?1:-1,u=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(b=isNaN(g)?1:0,T=n):(T=Math.floor(Math.log(g)/Math.LN2),g*(p=Math.pow(2,-T))<1&&(T--,p*=2),T+c>=1?g+=r/p:g+=r*Math.pow(2,1-c),g*p>=2&&(T++,p/=2),T+c>=n?(b=0,T=n):T+c>=1?(b=(g*p-1)*Math.pow(2,m),T=T+c):(b=g*Math.pow(2,c-1)*Math.pow(2,m),T=0));m>=8;N[O+a]=b&255,a+=o,b/=256,m-=8);for(T=T<0;N[O+a]=T&255,a+=o,T/=256,d-=8);N[O+a-o]|=u*128}},{}],196:[function(F,q,j){typeof Object.create=="function"?q.exports=function(g,O){O&&(g.super_=O,g.prototype=Object.create(O.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:q.exports=function(g,O){if(O){g.super_=O;var M=function(){};M.prototype=O.prototype,g.prototype=new M,g.prototype.constructor=g}}},{}],197:[function(F,q,j){/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */q.exports=function(O){return O!=null&&(N(O)||g(O)||!!O._isBuffer)};function N(O){return!!O.constructor&&typeof O.constructor.isBuffer=="function"&&O.constructor.isBuffer(O)}function g(O){return typeof O.readFloatLE=="function"&&typeof O.slice=="function"&&N(O.slice(0,0))}},{}],198:[function(F,q,j){var N={}.toString;q.exports=Array.isArray||function(g){return N.call(g)=="[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),g=[fromCharCode(N>>>16),fromCharCode(N>>>8&255),fromCharCode(N&255)];return g.length-=[0,0,2,1][j],g.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=g;var N=Object.prototype.hasOwnProperty;function g(O,M,m){if(!O)throw new TypeError("argument dest is required");if(!M)throw new TypeError("argument src is required");return m===void 0&&(m=!0),Object.getOwnPropertyNames(M).forEach(function(T){if(!m&&N.call(O,T))return;var b=Object.getOwnPropertyDescriptor(M,T);Object.defineProperty(O,T,b)}),O}},{}],201:[function(F,q,j){"use strict";function N(){this._types=Object.create(null),this._extensions=Object.create(null);for(var g=0;g0)return T(n);if(r==="number"&&isFinite(n))return c.long?p(n):b(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function T(n){if(n=String(n),n.length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!c)return;var r=parseFloat(c[1]),a=(c[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return r*y;case"weeks":case"week":case"w":return r*m;case"days":case"day":case"d":return r*M;case"hours":case"hour":case"hrs":case"hr":case"h":return r*O;case"minutes":case"minute":case"mins":case"min":case"m":return r*g;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(n){var c=Math.abs(n);return c>=M?Math.round(n/M)+"d":c>=O?Math.round(n/O)+"h":c>=g?Math.round(n/g)+"m":c>=N?Math.round(n/N)+"s":n+"ms"}function p(n){var c=Math.abs(n);return c>=M?d(n,c,M,"day"):c>=O?d(n,c,O,"hour"):c>=g?d(n,c,g,"minute"):c>=N?d(n,c,N,"second"):n+" ms"}function d(n,c,r,a){var o=c>=r*1.5;return Math.round(n/r)+" "+a+(o?"s":"")}},{}],205:[function(F,q,j){(function(N){function g(y,T){for(var b=0,p=y.length-1;p>=0;p--){var d=y[p];d==="."?y.splice(p,1):d===".."?(y.splice(p,1),b++):b&&(y.splice(p,1),b--)}if(T)for(;b--;b)y.unshift("..");return y}j.resolve=function(){for(var y="",T=!1,b=arguments.length-1;b>=-1&&!T;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;y=p+"/"+y,T=p.charAt(0)==="/"}return y=g(M(y.split("/"),function(d){return!!d}),!T).join("/"),(T?"/":"")+y||"."},j.normalize=function(y){var T=j.isAbsolute(y),b=m(y,-1)==="/";return y=g(M(y.split("/"),function(p){return!!p}),!T).join("/"),!y&&!T&&(y="."),y&&b&&(y+="/"),(T?"/":"")+y},j.isAbsolute=function(y){return y.charAt(0)==="/"},j.join=function(){var y=Array.prototype.slice.call(arguments,0);return j.normalize(M(y,function(T,b){if(typeof T!="string")throw new TypeError("Arguments to path.join must be strings");return T}).join("/"))},j.relative=function(y,T){y=j.resolve(y).substr(1),T=j.resolve(T).substr(1);function b(o){for(var u=0;u=0&&!(o[h]!=="");h--);return u>h?[]:o.slice(u,h-u+1)}for(var p=b(y.split("/")),d=b(T.split("/")),n=Math.min(p.length,d.length),c=n,r=0;r=1;--n)if(T=y.charCodeAt(n),T===47){if(!d){p=n;break}}else d=!1;return p===-1?b?"/":".":b&&p===1?"/":y.slice(0,p)};function O(y){typeof y!="string"&&(y=y+"");var T=0,b=-1,p=!0,d;for(d=y.length-1;d>=0;--d)if(y.charCodeAt(d)===47){if(!p){T=d+1;break}}else b===-1&&(p=!1,b=d+1);return b===-1?"":y.slice(T,b)}j.basename=function(y,T){var b=O(y);return T&&b.substr(-1*T.length)===T&&(b=b.substr(0,b.length-T.length)),b},j.extname=function(y){typeof y!="string"&&(y=y+"");for(var T=-1,b=0,p=-1,d=!0,n=0,c=y.length-1;c>=0;--c){var r=y.charCodeAt(c);if(r===47){if(!d){b=c+1;break}continue}p===-1&&(d=!1,p=c+1),r===46?T===-1?T=c:n!==1&&(n=1):T!==-1&&(n=-1)}return T===-1||p===-1||n===0||n===1&&T===p-1&&T===b+1?"":y.slice(T,p)};function M(y,T){if(y.filter)return y.filter(T);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 g={function:!0,object:!0},O=g[typeof window]&&window||this,M=O,m=g[typeof j]&&j,y=g[typeof q]&&q&&!q.nodeType&&q,T=m&&y&&typeof N=="object"&&N;T&&(T.global===T||T.window===T||T.self===T)&&(O=T);var b=Math.pow(2,53)-1,p=/\bOpera/,d=this,n=Object.prototype,c=n.hasOwnProperty,r=n.toString;function a(v){return v=String(v),v.charAt(0).toUpperCase()+v.slice(1)}function o(v,_,E){var w={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return _&&E&&/^Win/i.test(v)&&!/^Windows Phone /i.test(v)&&(w=w[/[\d.]+$/.exec(v)])&&(v="Windows "+w),v=String(v),_&&E&&(v=v.replace(RegExp(_,"i"),E)),v=h(v.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]),v}function u(v,_){var E=-1,w=v?v.length:0;if(typeof w=="number"&&w>-1&&w<=b)for(;++E3&&"WebKit"||/\bOpera\b/.test(ne)&&(/\bOPR\b/.test(v)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(v)&&!/^(?:Trident|EdgeHTML)$/.test(te)&&"WebKit"||!te&&/\bMSIE\b/i.test(v)&&(Z=="Mac OS"?"Tasman":"Trident")||te=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ne)&&"NetFront")&&(te=[pe]),ne=="IE"&&(pe=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(v)||0)[1])?(ne+=" Mobile",Z="Windows Phone "+(/\+$/.test(pe)?pe:pe+".x"),ye.unshift("desktop mode")):/\bWPDesktop\b/i.test(v)?(ne="IE Mobile",Z="Windows Phone 8.x",ye.unshift("desktop mode"),re||(re=(/\brv:([\d.]+)/.exec(v)||0)[1])):ne!="IE"&&te=="Trident"&&(pe=/\brv:([\d.]+)/.exec(v))&&(ne&&ye.push("identifying as "+ne+(re?" "+re:"")),ne="IE",re=pe[1]),ae){if(t(_,"global"))if(P&&(pe=P.lang.System,Oe=pe.getProperty("os.arch"),Z=Z||pe.getProperty("os.name")+" "+pe.getProperty("os.version")),z){try{re=_.require("ringo/engine").version.join("."),ne="RingoJS"}catch(ut){(pe=_.system)&&pe.global.system==_.system&&(ne="Narwhal",Z||(Z=pe[0].os||null))}ne||(ne="Rhino")}else typeof _.process=="object"&&!_.process.browser&&(pe=_.process)&&(typeof pe.versions=="object"&&(typeof pe.versions.electron=="string"?(ye.push("Node "+pe.versions.node),ne="Electron",re=pe.versions.electron):typeof pe.versions.nw=="string"&&(ye.push("Chromium "+re,"Node "+pe.versions.node),ne="NW.js",re=pe.versions.nw)),ne||(ne="Node.js",Oe=pe.arch,Z=pe.platform,re=/[\d.]+/.exec(pe.version),re=re?re[0]:null));else l(pe=_.runtime)==W?(ne="Adobe AIR",Z=pe.flash.system.Capabilities.os):l(pe=_.phantom)==B?(ne="PhantomJS",re=(pe=pe.version||null)&&pe.major+"."+pe.minor+"."+pe.patch):typeof de.documentMode=="number"&&(pe=/\bTrident\/(\d+)/i.exec(v))?(re=[re,de.documentMode],(pe=+pe[1]+4)!=re[1]&&(ye.push("IE "+re[1]+" mode"),te&&(te[1]=""),re[1]=pe),re=ne=="IE"?String(re[1].toFixed(1)):re[0]):typeof de.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ne)&&(ye.push("masking as "+ne+" "+re),ne="IE",re="11.0",te=["Trident"],Z="Windows");Z=Z&&h(Z)}if(re&&(pe=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(re)||/(?:alpha|beta)(?: ?\d)?/i.exec(v+";"+(ae&&w.appMinorVersion))||/\bMinefield\b/i.test(v)&&"a")&&(ce=/b/i.test(pe)?"beta":"alpha",re=re.replace(RegExp(pe+"\\+?$"),"")+(ce=="beta"?ue:J)+(/\d+\+?/.exec(pe)||"")),ne=="Fennec"||ne=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Z))ne="Firefox Mobile";else if(ne=="Maxthon"&&re)re=re.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Te))Te=="Xbox 360"&&(Z=null),Te=="Xbox 360"&&/\bIEMobile\b/.test(v)&&ye.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ne)||ne&&!Te&&!/Browser|Mobi/.test(ne))&&(Z=="Windows CE"||/Mobi/i.test(v)))ne+=" Mobile";else if(ne=="IE"&&ae)try{_.external===null&&ye.unshift("platform preview")}catch(ut){ye.unshift("embedded")}else(/\bBlackBerry\b/.test(Te)||/\bBB10\b/.test(v))&&(pe=(RegExp(Te.replace(/ +/g," *")+"/([.\\d]+)","i").exec(v)||0)[1]||re)?(pe=[pe,/BB10/.test(v)],Z=(pe[1]?(Te=null,ie="BlackBerry"):"Device Software")+" "+pe[0],re=null):this!=s&&Te!="Wii"&&(ae&&Se||/Opera/.test(ne)&&/\b(?:MSIE|Firefox)\b/i.test(v)||ne=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Z)||ne=="IE"&&(Z&&!/^Win/.test(Z)&&re>5.5||/\bWindows XP\b/.test(Z)&&re>8||re==8&&!/\bTrident\b/.test(v)))&&!p.test(pe=R.call(s,v.replace(p,"")+";"))&&pe.name&&(pe="ing as "+pe.name+((pe=pe.version)?" "+pe:""),p.test(ne)?(/\bIE\b/.test(pe)&&Z=="Mac OS"&&(Z=null),pe="identify"+pe):(pe="mask"+pe,Ae?ne=h(Ae.replace(/([a-z])([A-Z])/g,"$1 $2")):ne="Opera",/\bIE\b/.test(pe)&&(Z=null),ae||(re=null)),te=["Presto"],ye.push(pe));(pe=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(v)||0)[1])&&(pe=[parseFloat(pe.replace(/\.(\d)$/,".0$1")),pe],ne=="Safari"&&pe[1].slice(-1)=="+"?(ne="WebKit Nightly",ce="alpha",re=pe[1].slice(0,-1)):(re==pe[1]||re==(pe[2]=(/\bSafari\/([\d.]+\+?)/i.exec(v)||0)[1]))&&(re=null),pe[1]=(/\bChrome\/([\d.]+)/i.exec(v)||0)[1],pe[0]==537.36&&pe[2]==537.36&&parseFloat(pe[1])>=28&&te=="WebKit"&&(te=["Blink"]),!ae||!L&&!pe[1]?(te&&(te[1]="like Safari"),pe=(pe=pe[0],pe<400?1:pe<500?2:pe<526?3:pe<533?4:pe<534?"4+":pe<535?5:pe<537?6:pe<538?7:pe<601?8:"8")):(te&&(te[1]="like Chrome"),pe=pe[1]||(pe=pe[0],pe<530?1:pe<532?2:pe<532.05?3:pe<533?4:pe<534.03?5:pe<534.07?6:pe<534.1?7:pe<534.13?8:pe<534.16?9:pe<534.24?10:pe<534.3?11:pe<535.01?12:pe<535.02?"13+":pe<535.07?15:pe<535.11?16:pe<535.19?17:pe<536.05?18:pe<536.1?19:pe<537.01?20:pe<537.11?"21+":pe<537.13?23:pe<537.18?24:pe<537.24?25:pe<537.36?26:te!="Blink"?"27":"28")),te&&(te[1]+=" "+(pe+=typeof pe=="number"?".x":/[.+]/.test(pe)?"":"+")),ne=="Safari"&&(!re||parseInt(re)>45)&&(re=pe)),ne=="Opera"&&(pe=/\bzbov|zvav$/.exec(Z))?(ne+=" ",ye.unshift("desktop mode"),pe=="zvav"?(ne+="Mini",re=null):ne+="Mobile",Z=Z.replace(RegExp(" *"+pe+"$"),"")):ne=="Safari"&&/\bChrome\b/.exec(te&&te[1])&&(ye.unshift("desktop mode"),ne="Chrome Mobile",re=null,/\bOS X\b/.test(Z)?(ie="Apple",Z="iOS 4.3+"):Z=null),re&&re.indexOf(pe=/[\d.]+$/.exec(Z))==0&&v.indexOf("/"+pe+"-")>-1&&(Z=f(Z.replace(pe,""))),te&&!/\b(?:Avant|Nook)\b/.test(ne)&&(/Browser|Lunascape|Maxthon/.test(ne)||ne!="Safari"&&/^iOS/.test(Z)&&/\bSafari\b/.test(te[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ne)&&te[1])&&((pe=te[te.length-1])&&ye.push(pe)),ye.length&&(ye=["("+ye.join("; ")+")"]),ie&&Te&&Te.indexOf(ie)<0&&ye.push("on "+ie),Te&&ye.push((/^on /.test(ye[ye.length-1])?"":"on ")+Te),Z&&(pe=/ ([\d.+]+)$/.exec(Z),fe=pe&&Z.charAt(Z.length-pe[0].length-1)=="/",Z={architecture:32,family:pe&&!fe?Z.replace(pe[0],""):Z,version:pe?pe[1]:null,toString:function(){var ut=this.version;return this.family+(ut&&!fe?" "+ut:"")+(this.architecture==64?" 64-bit":"")}}),(pe=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Oe))&&!/\bi686\b/i.test(Oe)?(Z&&(Z.architecture=64,Z.family=Z.family.replace(RegExp(" *"+pe),"")),ne&&(/\bWOW64\b/i.test(v)||ae&&/\w(?:86|32)$/.test(w.cpuClass||w.platform)&&!/\bWin64; x64\b/i.test(v))&&ye.unshift("32-bit")):Z&&/^OS X/.test(Z.family)&&ne=="Chrome"&&parseFloat(re)>=39&&(Z.architecture=64),v||(v=null);var rt={};return rt.description=v,rt.layout=te&&te[0],rt.manufacturer=ie,rt.name=ne,rt.prerelease=ce,rt.product=Te,rt.ua=v,rt.version=ne&&re,rt.os=Z||{architecture:null,family:null,version:null,toString:function(){return"null"}},rt.parse=R,rt.toString=qe,rt.version&&ye.unshift(re),rt.name&&ye.unshift(ne),Z&&ne&&!(Z==String(Z).split(" ")[0]&&(Z==ne.split(" ")[0]||Te))&&ye.push(Te?"("+Z+")":"on "+Z),ye.length&&(rt.description=ye.join(" ")),rt}var C=R();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(O.platform=C,define(function(){return C})):m&&y?s(C,function(v,_){m[_]=v}):O.platform=C}).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:g}:q.exports=N;function g(O,M,m,y){if(typeof O!="function")throw new TypeError('"callback" argument must be a function');var T=arguments.length,b,p;switch(T){case 0:case 1:return N.nextTick(O);case 2:return N.nextTick(function(){O.call(null,M)});case 3:return N.nextTick(function(){O.call(null,M,m)});case 4:return N.nextTick(function(){O.call(null,M,m,y)});default:for(b=new Array(T-1),p=0;p1)for(var s=1;s= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=b-p,S=Math.floor,x=String.fromCharCode,f;function R(G){throw new RangeError(l[G])}function C(G,B){for(var P=G.length,z=[];P--;)z[P]=B(G[P]);return z}function v(G,B){var P=G.split("@"),z="";P.length>1&&(z=P[0]+"@",G=P[1]),G=G.replace(s,".");var J=G.split("."),ue=C(J,B).join(".");return z+ue}function _(G){for(var B=[],P=0,z=G.length,J,ue;P=55296&&J<=56319&&P65535&&(B-=65536,P+=x(B>>>10&1023|55296),B=56320|B&1023),P+=x(B),P}).join("")}function w(G){return G-48<10?G-22:G-65<26?G-65:G-97<26?G-97:b}function k(G,B){return G+22+75*(G<26)-((B!=0)<<5)}function I(G,B,P){var z=0;for(G=P?S(G/c):G>>1,G+=S(G/B);G>t*d>>1;z+=b)G=S(G/t);return S(z+(t+1)*G/(G+n))}function L(G){var B=[],P=G.length,z,J=0,ue=a,de=r,Se,Ae,pe,Oe,ye,ce,ae,re,fe;for(Se=G.lastIndexOf(o),Se<0&&(Se=0),Ae=0;Ae=128&&R("not-basic"),B.push(G.charCodeAt(Ae));for(pe=Se>0?Se+1:0;pe=P&&R("invalid-input"),ae=w(G.charCodeAt(pe++)),(ae>=b||ae>S((T-J)/ye))&&R("overflow"),J+=ae*ye,re=ce<=de?p:ce>=de+d?d:ce-de,aeS(T/fe)&&R("overflow"),ye*=fe;z=B.length+1,de=I(J-Oe,z,Oe==0),S(J/z)>T-ue&&R("overflow"),ue+=S(J/z),J%=z,B.splice(J++,0,ue)}return E(B)}function V(G){var B,P,z,J,ue,de,Se,Ae,pe,Oe,ye,ce=[],ae,re,fe,te;for(G=_(G),ae=G.length,B=a,P=0,ue=r,de=0;de=B&&yeS((T-P)/re)&&R("overflow"),P+=(Se-B)*re,B=Se,de=0;deT&&R("overflow"),ye==B){for(Ae=P,pe=b;!(Oe=pe<=ue?p:pe>=ue+d?d:pe-ue,Ae0&&d>p&&(d=p);for(var n=0;n=0?(a=c.substr(0,r),o=c.substr(r+1)):(a=c,o=""),u=decodeURIComponent(a),h=decodeURIComponent(o),N(T,u)?g(T[u])?T[u].push(h):T[u]=[T[u],h]:T[u]=h}return T};var g=Array.isArray||function(O){return Object.prototype.toString.call(O)==="[object Array]"}},{}],211:[function(F,q,j){"use strict";var N=function(m){switch(typeof m){case"string":return m;case"boolean":return m?"true":"false";case"number":return isFinite(m)?m:"";default:return""}};q.exports=function(m,y,T,b){return y=y||"&",T=T||"=",m===null&&(m=void 0),typeof m=="object"?O(M(m),function(p){var d=encodeURIComponent(N(p))+T;return g(m[p])?O(m[p],function(n){return d+encodeURIComponent(N(n))}).join(y):d+encodeURIComponent(N(m[p]))}).join(y):b?encodeURIComponent(N(b))+T+encodeURIComponent(N(m)):""};var g=Array.isArray||function(m){return Object.prototype.toString.call(m)==="[object Array]"};function O(m,y){if(m.map)return m.map(y);for(var T=[],b=0;b0?(typeof ne!="string"&&!X.objectMode&&(0,M.default)(ne)!==a.prototype&&(ne=u(ne)),ie?X.endEmitted?te.emit("error",new Error("stream.unshift() after end event")):w(te,X,ne,!0):X.ended?te.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Te?(ne=X.decoder.write(ne),X.objectMode||ne.length!==0?w(te,X,ne,!1):P(te,X)):w(te,X,ne,!1))):ie||(X.reading=!1)}return I(X)}function w(te,ne,Te,ie){ne.flowing&&ne.length===0&&!ne.sync?(te.emit("data",Te),te.read(0)):(ne.length+=ne.objectMode?1:Te.length,ie?ne.buffer.unshift(Te):ne.buffer.push(Te),ne.needReadable&&G(te)),P(te,ne)}function k(te,ne){var Te;return!h(ne)&&typeof ne!="string"&&ne!==void 0&&!te.objectMode&&(Te=new TypeError("Invalid non-string/buffer chunk")),Te}function I(te){return!te.ended&&(te.needReadable||te.length=L?te=L:(te--,te|=te>>>1,te|=te>>>2,te|=te>>>4,te|=te>>>8,te|=te>>>16,te++),te}function W(te,ne){return te<=0||ne.length===0&&ne.ended?0:ne.objectMode?1:te!==te?ne.flowing&&ne.length?ne.buffer.head.data.length:ne.length:(te>ne.highWaterMark&&(ne.highWaterMark=V(te)),te<=ne.length?te:ne.ended?ne.length:(ne.needReadable=!0,0))}_.prototype.read=function(te){t("read",te),te=parseInt(te,10);var ne=this._readableState,Te=te;if(te!==0&&(ne.emittedReadable=!1),te===0&&ne.needReadable&&(ne.length>=ne.highWaterMark||ne.ended))return t("read: emitReadable",ne.length,ne.ended),ne.length===0&&ne.ended?ae(this):G(this),null;if(te=W(te,ne),te===0&&ne.ended)return ne.length===0&&ae(this),null;var ie=ne.needReadable;t("need readable",ie),(ne.length===0||ne.length-te0?Z=pe(te,ne):Z=null,Z===null?(ne.needReadable=!0,te=0):ne.length-=te,ne.length===0&&(ne.ended||(ne.needReadable=!0),Te!==te&&ne.ended&&ae(this)),Z!==null&&this.emit("data",Z),Z};function H(te,ne){if(ne.ended)return;if(ne.decoder){var Te=ne.decoder.end();Te&&Te.length&&(ne.buffer.push(Te),ne.length+=ne.objectMode?1:Te.length)}ne.ended=!0,G(te)}function G(te){var ne=te._readableState;ne.needReadable=!1,ne.emittedReadable||(t("emitReadable",ne.flowing),ne.emittedReadable=!0,ne.sync?b.nextTick(B,te):B(te))}function B(te){t("emit readable"),te.emit("readable"),Ae(te)}function P(te,ne){ne.readingMore||(ne.readingMore=!0,b.nextTick(z,te,ne))}function z(te,ne){for(var Te=ne.length;!ne.reading&&!ne.flowing&&!ne.ended&&ne.length1&&fe(ie.pipes,te)!==-1)&&!Re&&(t("false write response, pause",Te._readableState.awaitDrain),Te._readableState.awaitDrain++,qe=!0),Te.pause())}function ut(Ie){t("onerror",Ie),Be(),te.removeListener("error",ut),c(te,"error")===0&&te.emit("error",Ie)}C(te,"error",ut);function dt(){te.removeListener("finish",ft),Be()}te.once("close",dt);function ft(){t("onfinish"),te.removeListener("close",dt),Be()}te.once("finish",ft);function Be(){t("unpipe"),Te.unpipe(te)}return te.emit("pipe",Te),ie.flowing||(t("pipe resume"),Te.resume()),te};function J(te){return function(){var ne=te._readableState;t("pipeOnDrain",ne.awaitDrain),ne.awaitDrain&&ne.awaitDrain--,ne.awaitDrain===0&&c(te,"data")&&(ne.flowing=!0,Ae(te))}}_.prototype.unpipe=function(te){var ne=this._readableState,Te={hasUnpiped:!1};if(ne.pipesCount===0)return this;if(ne.pipesCount===1)return te&&te!==ne.pipes?this:(te||(te=ne.pipes),ne.pipes=null,ne.pipesCount=0,ne.flowing=!1,te&&te.emit("unpipe",this,Te),this);if(!te){var ie=ne.pipes,Z=ne.pipesCount;ne.pipes=null,ne.pipesCount=0,ne.flowing=!1;for(var X=0;X=ne.length?(ne.decoder?Te=ne.buffer.join(""):ne.buffer.length===1?Te=ne.buffer.head.data:Te=ne.buffer.concat(ne.length),ne.buffer.clear()):Te=Oe(te,ne.buffer,ne.decoder),Te}function Oe(te,ne,Te){var ie;return teX.length?X.length:te;if(Q===X.length?Z+=X:Z+=X.slice(0,te),te-=Q,te===0){Q===X.length?(++ie,Te.next?ne.head=Te.next:ne.head=ne.tail=null):(ne.head=Te,Te.data=X.slice(Q));break}++ie}return ne.length-=ie,Z}function ce(te,ne){var Te=a.allocUnsafe(te),ie=ne.head,Z=1;for(ie.data.copy(Te),te-=ie.data.length;ie=ie.next;){var X=ie.data,Q=te>X.length?X.length:te;if(X.copy(Te,Te.length-te,0,Q),te-=Q,te===0){Q===X.length?(++Z,ie.next?ne.head=ie.next:ne.head=ne.tail=null):(ne.head=ie,ie.data=X.slice(Q));break}++Z}return ne.length-=Z,Te}function ae(te){var ne=te._readableState;if(ne.length>0)throw new Error('"endReadable()" called on non-empty stream');ne.endEmitted||(ne.ended=!0,b.nextTick(re,ne,te))}function re(te,ne){!te.endEmitted&&te.length===0&&(te.endEmitted=!0,ne.readable=!1,ne.emit("end"))}function fe(te,ne){for(var Te=0,ie=te.length;Te-1?c.default:a.nextTick,s;k.WritableState=E;var l=(0,d.default)(F("core-util-is"));l.inherits=F("inherits");var t={deprecate:F("util-deprecate")},S=F("./internal/streams/stream"),x=F("safe-buffer").Buffer,f=g.Uint8Array||function(){};function R(ce){return x.from(ce)}function C(ce){return x.isBuffer(ce)||ce instanceof f}var v=F("./internal/streams/destroy");l.inherits(k,S);function _(){}function E(ce,ae){s=s||F("./_stream_duplex"),ce=ce||{};var re=ae instanceof s;this.objectMode=!!ce.objectMode,re&&(this.objectMode=this.objectMode||!!ce.writableObjectMode);var fe=ce.highWaterMark,te=ce.writableHighWaterMark,ne=this.objectMode?16:16*1024;fe||fe===0?this.highWaterMark=fe:re&&(te||te===0)?this.highWaterMark=te:this.highWaterMark=ne,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Te=ce.decodeStrings===!1;this.decodeStrings=!Te,this.defaultEncoding=ce.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){P(ae,ie)},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 u(this)}E.prototype.getBuffer=function(){for(var ae=this.bufferedRequest,re=[];ae;)re.push(ae),ae=ae.next;return re},function(){try{Object.defineProperty(E.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ce){}}();var w;typeof b.default=="function"&&y.default&&typeof Function.prototype[y.default]=="function"?(w=Function.prototype[y.default],(0,M.default)(k,y.default,{value:function(ae){return w.call(this,ae)?!0:this!==k?!1:ae&&ae._writableState instanceof E}})):w=function(ae){return ae instanceof this};function k(ce){if(s=s||F("./_stream_duplex"),!w.call(k,this)&&!(this instanceof s))return new k(ce);this._writableState=new E(ce,this),this.writable=!0,ce&&(typeof ce.write=="function"&&(this._write=ce.write),typeof ce.writev=="function"&&(this._writev=ce.writev),typeof ce.destroy=="function"&&(this._destroy=ce.destroy),typeof ce.final=="function"&&(this._final=ce.final)),S.call(this)}k.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function I(ce,ae){var re=new Error("write after end");ce.emit("error",re),a.nextTick(ae,re)}function L(ce,ae,re,fe){var te=!0,ne=!1;return re===null?ne=new TypeError("May not write null values to stream"):typeof re!="string"&&re!==void 0&&!ae.objectMode&&(ne=new TypeError("Invalid non-string/buffer chunk")),ne&&(ce.emit("error",ne),a.nextTick(fe,ne),te=!1),te}k.prototype.write=function(ce,ae,re){var fe=this._writableState,te=!1,ne=!fe.objectMode&&C(ce);return ne&&!x.isBuffer(ce)&&(ce=R(ce)),typeof ae=="function"&&(re=ae,ae=null),ne?ae="buffer":ae||(ae=fe.defaultEncoding),typeof re!="function"&&(re=_),fe.ended?I(this,re):(ne||L(this,fe,ce,re))&&(fe.pendingcb++,te=W(this,fe,ne,ce,ae,re)),te},k.prototype.cork=function(){var ce=this._writableState;ce.corked++},k.prototype.uncork=function(){var ce=this._writableState;ce.corked&&(ce.corked--,!ce.writing&&!ce.corked&&!ce.finished&&!ce.bufferProcessing&&ce.bufferedRequest&&ue(this,ce))},k.prototype.setDefaultEncoding=function(ae){if(typeof ae=="string"&&(ae=ae.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ae+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ae);return this._writableState.defaultEncoding=ae,this};function V(ce,ae,re){return!ce.objectMode&&ce.decodeStrings!==!1&&typeof ae=="string"&&(ae=x.from(ae,re)),ae}Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function W(ce,ae,re,fe,te,ne){if(!re){var Te=V(ae,fe,te);fe!==Te&&(re=!0,te="buffer",fe=Te)}var ie=ae.objectMode?1:fe.length;ae.length+=ie;var Z=ae.length0?this.tail.next=b:this.head=b,this.tail=b,++this.length},m.prototype.unshift=function(T){var b={data:T,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},m.prototype.shift=function(){if(this.length===0)return;var T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T},m.prototype.clear=function(){this.head=this.tail=null,this.length=0},m.prototype.join=function(T){if(this.length===0)return"";for(var b=this.head,p=""+b.data;b=b.next;)p+=T+b.data;return p},m.prototype.concat=function(T){if(this.length===0)return g.alloc(0);if(this.length===1)return this.head.data;for(var b=g.allocUnsafe(T>>>0),p=this.head,d=0;p;)M(p.data,b,d),d+=p.data.length,p=p.next;return b},m}(),O&&O.inspect&&O.inspect.custom&&(q.exports.prototype[O.inspect.custom]=function(){var m=O.inspect({length:this.length});return this.constructor.name+" "+m})},{"safe-buffer":228,util:71}],220:[function(F,q,j){"use strict";var N=F("process-nextick-args");function g(m,y){var T=this,b=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return b||p?(y?y(m):m&&(!this._writableState||!this._writableState.errorEmitted)&&N.nextTick(M,this,m),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(m||null,function(d){!y&&d?(N.nextTick(M,T,d),T._writableState&&(T._writableState.errorEmitted=!0)):y&&y(d)}),this)}function O(){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 M(m,y){m.emit("error",y)}q.exports={destroy:g,undestroy:O}},{"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")(),g=N.regeneratorRuntime&&Object.getOwnPropertyNames(N).indexOf("regeneratorRuntime")>=0,O=g&&N.regeneratorRuntime;if(N.regeneratorRuntime=void 0,q.exports=F("./runtime"),g)N.regeneratorRuntime=O;else try{delete N.regeneratorRuntime}catch(M){N.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(F,q,j){!function(N){"use strict";var g=Object.prototype,O=g.hasOwnProperty,M,m=typeof Symbol=="function"?Symbol:{},y=m.iterator||"@@iterator",T=m.asyncIterator||"@@asyncIterator",b=m.toStringTag||"@@toStringTag",p=typeof q=="object",d=N.regeneratorRuntime;if(d){p&&(q.exports=d);return}d=N.regeneratorRuntime=p?q.exports:{};function n(W,H,G,B){var P=H&&H.prototype instanceof s?H:s,z=Object.create(P.prototype),J=new I(B||[]);return z._invoke=_(W,G,J),z}d.wrap=n;function c(W,H,G){try{return{type:"normal",arg:W.call(H,G)}}catch(B){return{type:"throw",arg:B}}}var r="suspendedStart",a="suspendedYield",o="executing",u="completed",h={};function s(){}function l(){}function t(){}var S={};S[y]=function(){return this};var x=Object.getPrototypeOf,f=x&&x(x(L([])));f&&f!==g&&O.call(f,y)&&(S=f);var R=t.prototype=s.prototype=Object.create(S);l.prototype=R.constructor=t,t.constructor=l,t[b]=l.displayName="GeneratorFunction";function C(W){["next","throw","return"].forEach(function(H){W[H]=function(G){return this._invoke(H,G)}})}d.isGeneratorFunction=function(W){var H=typeof W=="function"&&W.constructor;return H?H===l||(H.displayName||H.name)==="GeneratorFunction":!1},d.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,t):(W.__proto__=t,b in W||(W[b]="GeneratorFunction")),W.prototype=Object.create(R),W},d.awrap=function(W){return{__await:W}};function v(W){function H(P,z,J,ue){var de=c(W[P],W,z);if(de.type==="throw")ue(de.arg);else{var Se=de.arg,Ae=Se.value;return Ae&&typeof Ae=="object"&&O.call(Ae,"__await")?Promise.resolve(Ae.__await).then(function(pe){H("next",pe,J,ue)},function(pe){H("throw",pe,J,ue)}):Promise.resolve(Ae).then(function(pe){Se.value=pe,J(Se)},ue)}}var G;function B(P,z){function J(){return new Promise(function(ue,de){H(P,z,ue,de)})}return G=G?G.then(J,J):J()}this._invoke=B}C(v.prototype),v.prototype[T]=function(){return this},d.AsyncIterator=v,d.async=function(W,H,G,B){var P=new v(n(W,H,G,B));return d.isGeneratorFunction(H)?P:P.next().then(function(z){return z.done?z.value:P.next()})};function _(W,H,G){var B=r;return function(z,J){if(B===o)throw new Error("Generator is already running");if(B===u){if(z==="throw")throw J;return V()}for(G.method=z,G.arg=J;;){var ue=G.delegate;if(ue){var de=E(ue,G);if(de){if(de===h)continue;return de}}if(G.method==="next")G.sent=G._sent=G.arg;else if(G.method==="throw"){if(B===r)throw B=u,G.arg;G.dispatchException(G.arg)}else G.method==="return"&&G.abrupt("return",G.arg);B=o;var Se=c(W,H,G);if(Se.type==="normal"){if(B=G.done?u:a,Se.arg===h)continue;return{value:Se.arg,done:G.done}}else Se.type==="throw"&&(B=u,G.method="throw",G.arg=Se.arg)}}}function E(W,H){var G=W.iterator[H.method];if(G===M){if(H.delegate=null,H.method==="throw"){if(W.iterator.return&&(H.method="return",H.arg=M,E(W,H),H.method==="throw"))return h;H.method="throw",H.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var B=c(G,W.iterator,H.arg);if(B.type==="throw")return H.method="throw",H.arg=B.arg,H.delegate=null,h;var P=B.arg;if(!P)return H.method="throw",H.arg=new TypeError("iterator result is not an object"),H.delegate=null,h;if(P.done)H[W.resultName]=P.value,H.next=W.nextLoc,H.method!=="return"&&(H.method="next",H.arg=M);else return P;return H.delegate=null,h}C(R),R[b]="Generator",R[y]=function(){return this},R.toString=function(){return"[object Generator]"};function w(W){var H={tryLoc:W[0]};1 in W&&(H.catchLoc=W[1]),2 in W&&(H.finallyLoc=W[2],H.afterLoc=W[3]),this.tryEntries.push(H)}function k(W){var H=W.completion||{};H.type="normal",delete H.arg,W.completion=H}function I(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(w,this),this.reset(!0)}d.keys=function(W){var H=[];for(var G in W)H.push(G);return H.reverse(),function B(){for(;H.length;){var P=H.pop();if(P in W)return B.value=P,B.done=!1,B}return B.done=!0,B}};function L(W){if(W){var H=W[y];if(H)return H.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var G=-1,B=function P(){for(;++G=0;--B){var P=this.tryEntries[B],z=P.completion;if(P.tryLoc==="root")return G("end");if(P.tryLoc<=this.prev){var J=O.call(P,"catchLoc"),ue=O.call(P,"finallyLoc");if(J&&ue){if(this.prev=0;--G){var B=this.tryEntries[G];if(B.tryLoc<=this.prev&&O.call(B,"finallyLoc")&&this.prev=0;--H){var G=this.tryEntries[H];if(G.finallyLoc===W)return this.complete(G.completion,G.afterLoc),k(G),h}},catch:function(W){for(var H=this.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H];if(G.tryLoc===W){var B=G.completion;if(B.type==="throw"){var P=B.arg;k(G)}return P}}throw new Error("illegal catch attempt")},delegateYield:function(W,H,G){return this.delegate={iterator:L(W),resultName:H,nextLoc:G},this.method==="next"&&(this.arg=M),h}}}(function(){return this}()||Function("return this")())},{}],228:[function(F,q,j){var N=F("buffer"),g=N.Buffer;function O(m,y){for(var T in m)y[T]=m[T]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?q.exports=N:(O(N,j),j.Buffer=M);function M(m,y,T){return g(m,y,T)}O(g,M),M.from=function(m,y,T){if(typeof m=="number")throw new TypeError("Argument must not be a number");return g(m,y,T)},M.alloc=function(m,y,T){if(typeof m!="number")throw new TypeError("Argument must be a number");var b=g(m);return y!==void 0?typeof T=="string"?b.fill(y,T):b.fill(y):b.fill(0),b},M.allocUnsafe=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return g(m)},M.allocUnsafeSlow=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return N.SlowBuffer(m)}},{buffer:73}],229:[function(F,q,j){(function(N){"use strict";var g=F("babel-runtime/core-js/string/from-code-point"),O=a(g),M=F("babel-runtime/core-js/json/stringify"),m=a(M),y=F("babel-runtime/helpers/typeof"),T=a(y),b=F("babel-runtime/core-js/object/define-property"),p=a(b),d=F("babel-runtime/core-js/object/keys"),n=a(d),c=F("babel-runtime/core-js/object/create"),r=a(c);function a(o){return o&&o.__esModule?o:{default:o}}(function(o){o.parser=function(X,Q){return new h(X,Q)},o.SAXParser=h,o.SAXStream=R,o.createStream=f,o.MAX_BUFFER_LENGTH=64*1024;var u=["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 h(X,Q){if(!(this instanceof h))return new h(X,Q);var _e=this;l(_e),_e.q=_e.c="",_e.bufferCheckPosition=o.MAX_BUFFER_LENGTH,_e.opt=Q||{},_e.opt.lowercase=_e.opt.lowercase||_e.opt.lowercasetags,_e.looseCase=_e.opt.lowercase?"toLowerCase":"toUpperCase",_e.tags=[],_e.closed=_e.closedRoot=_e.sawRoot=!1,_e.tag=_e.error=null,_e.strict=!!X,_e.noscript=!!(X||_e.opt.noscript),_e.state=z.BEGIN,_e.strictEntities=_e.opt.strictEntities,_e.ENTITIES=_e.strictEntities?(0,r.default)(o.XML_ENTITIES):(0,r.default)(o.ENTITIES),_e.attribList=[],_e.opt.xmlns&&(_e.ns=(0,r.default)(w)),_e.trackPosition=_e.opt.position!==!1,_e.trackPosition&&(_e.position=_e.line=_e.column=0),ue(_e,"onready")}r.default||(Object.create=function(X){function Q(){}Q.prototype=X;var _e=new Q;return _e}),n.default||(Object.keys=function(X){var Q=[];for(var _e in X)X.hasOwnProperty(_e)&&Q.push(_e);return Q});function s(X){for(var Q=Math.max(o.MAX_BUFFER_LENGTH,10),_e=0,ve=0,Re=u.length;veQ)switch(u[ve]){case"textNode":Se(X);break;case"cdata":de(X,"oncdata",X.cdata),X.cdata="";break;case"script":de(X,"onscript",X.script),X.script="";break;default:pe(X,"Max buffer length exceeded: "+u[ve])}_e=Math.max(_e,Je)}var qe=o.MAX_BUFFER_LENGTH-_e;X.bufferCheckPosition=qe+X.position}function l(X){for(var Q=0,_e=u.length;Q<_e;Q++)X[u[Q]]=""}function t(X){Se(X),X.cdata!==""&&(de(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(de(X,"onscript",X.script),X.script="")}h.prototype={end:function(){Oe(this)},write:Z,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){t(this)}};var S;try{S=F("stream").Stream}catch(X){S=function(){}}var x=o.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function f(X,Q){return new R(X,Q)}function R(X,Q){if(!(this instanceof R))return new R(X,Q);S.apply(this),this._parser=new h(X,Q),this.writable=!0,this.readable=!0;var _e=this;this._parser.onend=function(){_e.emit("end")},this._parser.onerror=function(ve){_e.emit("error",ve),_e._parser.error=null},this._decoder=null,x.forEach(function(ve){(0,p.default)(_e,"on"+ve,{get:function(){return _e._parser["on"+ve]},set:function(Je){if(!Je)return _e.removeAllListeners(ve),_e._parser["on"+ve]=Je,Je;_e.on(ve,Je)},enumerable:!0,configurable:!1})})}R.prototype=(0,r.default)(S.prototype,{constructor:{value:R}}),R.prototype.write=function(X){if(typeof N=="function"&&typeof N.isBuffer=="function"&&N.isBuffer(X)){if(!this._decoder){var Q=F("string_decoder").StringDecoder;this._decoder=new Q("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},R.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},R.prototype.on=function(X,Q){var _e=this;return!_e._parser["on"+X]&&x.indexOf(X)!==-1&&(_e._parser["on"+X]=function(){var ve=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ve.splice(0,0,X),_e.emit.apply(_e,ve)}),S.prototype.on.call(_e,X,Q)};var C="[CDATA[",v="DOCTYPE",_="http://www.w3.org/XML/1998/namespace",E="http://www.w3.org/2000/xmlns/",w={xml:_,xmlns:E},k=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,I=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,L=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,V=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function W(X){return X===" "||X===` `||X==="\r"||X===" "}function H(X){return X==='"'||X==="'"}function G(X){return X===">"||W(X)}function B(X,Q){return X.test(Q)}function P(X,Q){return!B(X,Q)}var z=0;o.STATE={BEGIN:z++,BEGIN_WHITESPACE:z++,TEXT:z++,TEXT_ENTITY:z++,OPEN_WAKA:z++,SGML_DECL:z++,SGML_DECL_QUOTED:z++,DOCTYPE:z++,DOCTYPE_QUOTED:z++,DOCTYPE_DTD:z++,DOCTYPE_DTD_QUOTED:z++,COMMENT_STARTING:z++,COMMENT:z++,COMMENT_ENDING:z++,COMMENT_ENDED:z++,CDATA:z++,CDATA_ENDING:z++,CDATA_ENDING_2:z++,PROC_INST:z++,PROC_INST_BODY:z++,PROC_INST_ENDING:z++,OPEN_TAG:z++,OPEN_TAG_SLASH:z++,ATTRIB:z++,ATTRIB_NAME:z++,ATTRIB_NAME_SAW_WHITE:z++,ATTRIB_VALUE:z++,ATTRIB_VALUE_QUOTED:z++,ATTRIB_VALUE_CLOSED:z++,ATTRIB_VALUE_UNQUOTED:z++,ATTRIB_VALUE_ENTITY_Q:z++,ATTRIB_VALUE_ENTITY_U:z++,CLOSE_TAG:z++,CLOSE_TAG_SAW_WHITE:z++,SCRIPT:z++,SCRIPT_ENDING:z++},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,n.default)(o.ENTITIES).forEach(function(X){var Q=o.ENTITIES[X],_e=typeof Q=="number"?String.fromCharCode(Q):Q;o.ENTITIES[X]=_e});for(var J in o.STATE)o.STATE[o.STATE[J]]=J;z=o.STATE;function ue(X,Q,_e){X[Q]&&X[Q](_e)}function de(X,Q,_e){X.textNode&&Se(X),ue(X,Q,_e)}function Se(X){X.textNode=Ae(X.opt,X.textNode),X.textNode&&ue(X,"ontext",X.textNode),X.textNode=""}function Ae(X,Q){return X.trim&&(Q=Q.trim()),X.normalize&&(Q=Q.replace(/\s+/g," ")),Q}function pe(X,Q){return Se(X),X.trackPosition&&(Q+=` Line: `+X.line+` Column: `+X.column+` Char: `+X.c),Q=new Error(Q),X.error=Q,ue(X,"onerror",Q),X}function Oe(X){return X.sawRoot&&!X.closedRoot&&ye(X,"Unclosed root tag"),X.state!==z.BEGIN&&X.state!==z.BEGIN_WHITESPACE&&X.state!==z.TEXT&&pe(X,"Unexpected end"),Se(X),X.c="",X.closed=!0,ue(X,"onend"),h.call(X,X.strict,X.opt),X}function ye(X,Q){if((typeof X=="undefined"?"undefined":(0,T.default)(X))!=="object"||!(X instanceof h))throw new Error("bad call to strictFail");X.strict&&pe(X,Q)}function ce(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Q=X.tags[X.tags.length-1]||X,_e=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(_e.ns=Q.ns),X.attribList.length=0,de(X,"onopentagstart",_e)}function ae(X,Q){var _e=X.indexOf(":"),ve=_e<0?["",X]:X.split(":"),Re=ve[0],Je=ve[1];return Q&&X==="xmlns"&&(Re="xmlns",Je=""),{prefix:Re,local:Je}}function re(X){if(X.strict||(X.attribName=X.attribName[X.looseCase]()),X.attribList.indexOf(X.attribName)!==-1||X.tag.attributes.hasOwnProperty(X.attribName)){X.attribName=X.attribValue="";return}if(X.opt.xmlns){var Q=ae(X.attribName,!0),_e=Q.prefix,ve=Q.local;if(_e==="xmlns")if(ve==="xml"&&X.attribValue!==_)ye(X,"xml: prefix must be bound to "+_+` Actual: `+X.attribValue);else if(ve==="xmlns"&&X.attribValue!==E)ye(X,"xmlns: prefix must be bound to "+E+` Actual: `+X.attribValue);else{var Re=X.tag,Je=X.tags[X.tags.length-1]||X;Re.ns===Je.ns&&(Re.ns=(0,r.default)(Je.ns)),Re.ns[ve]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,de(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function fe(X,Q){if(X.opt.xmlns){var _e=X.tag,ve=ae(X.tagName);_e.prefix=ve.prefix,_e.local=ve.local,_e.uri=_e.ns[ve.prefix]||"",_e.prefix&&!_e.uri&&(ye(X,"Unbound namespace prefix: "+(0,m.default)(X.tagName)),_e.uri=ve.prefix);var Re=X.tags[X.tags.length-1]||X;_e.ns&&Re.ns!==_e.ns&&(0,n.default)(_e.ns).forEach(function($e){de(X,"onopennamespace",{prefix:$e,uri:_e.ns[$e]})});for(var Je=0,qe=X.attribList.length;Je",X.tagName="",X.state=z.SCRIPT;return}de(X,"onscript",X.script),X.script=""}var Q=X.tags.length,_e=X.tagName;X.strict||(_e=_e[X.looseCase]());for(var ve=_e;Q--;){var Re=X.tags[Q];if(Re.name!==ve)ye(X,"Unexpected close tag");else break}if(Q<0){ye(X,"Unmatched closing tag: "+X.tagName),X.textNode+="",X.state=z.TEXT;return}X.tagName=_e;for(var Je=X.tags.length;Je-- >Q;){var qe=X.tag=X.tags.pop();X.tagName=X.tag.name,de(X,"onclosetag",X.tagName);var rt={};for(var ut in qe.ns)rt[ut]=qe.ns[ut];var dt=X.tags[X.tags.length-1]||X;X.opt.xmlns&&qe.ns!==dt.ns&&(0,n.default)(qe.ns).forEach(function(ft){var Be=qe.ns[ft];de(X,"onclosenamespace",{prefix:ft,uri:Be})})}Q===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=z.TEXT}function ne(X){var Q=X.entity,_e=Q.toLowerCase(),ve,Re="";return X.ENTITIES[Q]?X.ENTITIES[Q]:X.ENTITIES[_e]?X.ENTITIES[_e]:(Q=_e,Q.charAt(0)==="#"&&(Q.charAt(1)==="x"?(Q=Q.slice(2),ve=parseInt(Q,16),Re=ve.toString(16)):(Q=Q.slice(1),ve=parseInt(Q,10),Re=ve.toString(10))),Q=Q.replace(/^0+/,""),isNaN(ve)||Re.toLowerCase()!==Q?(ye(X,"Invalid character entity"),"&"+X.entity+";"):(0,O.default)(ve))}function Te(X,Q){Q==="<"?(X.state=z.OPEN_WAKA,X.startTagPosition=X.position):W(Q)||(ye(X,"Non-whitespace before first tag."),X.textNode=Q,X.state=z.TEXT)}function ie(X,Q){var _e="";return Q"?(de(Q,"onsgmldeclaration",Q.sgmlDecl),Q.sgmlDecl="",Q.state=z.TEXT):(H(ve)&&(Q.state=z.SGML_DECL_QUOTED),Q.sgmlDecl+=ve);continue;case z.SGML_DECL_QUOTED:ve===Q.q&&(Q.state=z.SGML_DECL,Q.q=""),Q.sgmlDecl+=ve;continue;case z.DOCTYPE:ve===">"?(Q.state=z.TEXT,de(Q,"ondoctype",Q.doctype),Q.doctype=!0):(Q.doctype+=ve,ve==="["?Q.state=z.DOCTYPE_DTD:H(ve)&&(Q.state=z.DOCTYPE_QUOTED,Q.q=ve));continue;case z.DOCTYPE_QUOTED:Q.doctype+=ve,ve===Q.q&&(Q.q="",Q.state=z.DOCTYPE);continue;case z.DOCTYPE_DTD:Q.doctype+=ve,ve==="]"?Q.state=z.DOCTYPE:H(ve)&&(Q.state=z.DOCTYPE_DTD_QUOTED,Q.q=ve);continue;case z.DOCTYPE_DTD_QUOTED:Q.doctype+=ve,ve===Q.q&&(Q.state=z.DOCTYPE_DTD,Q.q="");continue;case z.COMMENT:ve==="-"?Q.state=z.COMMENT_ENDING:Q.comment+=ve;continue;case z.COMMENT_ENDING:ve==="-"?(Q.state=z.COMMENT_ENDED,Q.comment=Ae(Q.opt,Q.comment),Q.comment&&de(Q,"oncomment",Q.comment),Q.comment=""):(Q.comment+="-"+ve,Q.state=z.COMMENT);continue;case z.COMMENT_ENDED:ve!==">"?(ye(Q,"Malformed comment"),Q.comment+="--"+ve,Q.state=z.COMMENT):Q.state=z.TEXT;continue;case z.CDATA:ve==="]"?Q.state=z.CDATA_ENDING:Q.cdata+=ve;continue;case z.CDATA_ENDING:ve==="]"?Q.state=z.CDATA_ENDING_2:(Q.cdata+="]"+ve,Q.state=z.CDATA);continue;case z.CDATA_ENDING_2:ve===">"?(Q.cdata&&de(Q,"oncdata",Q.cdata),de(Q,"onclosecdata"),Q.cdata="",Q.state=z.TEXT):ve==="]"?Q.cdata+="]":(Q.cdata+="]]"+ve,Q.state=z.CDATA);continue;case z.PROC_INST:ve==="?"?Q.state=z.PROC_INST_ENDING:W(ve)?Q.state=z.PROC_INST_BODY:Q.procInstName+=ve;continue;case z.PROC_INST_BODY:if(!Q.procInstBody&&W(ve))continue;ve==="?"?Q.state=z.PROC_INST_ENDING:Q.procInstBody+=ve;continue;case z.PROC_INST_ENDING:ve===">"?(de(Q,"onprocessinginstruction",{name:Q.procInstName,body:Q.procInstBody}),Q.procInstName=Q.procInstBody="",Q.state=z.TEXT):(Q.procInstBody+="?"+ve,Q.state=z.PROC_INST_BODY);continue;case z.OPEN_TAG:B(I,ve)?Q.tagName+=ve:(ce(Q),ve===">"?fe(Q):ve==="/"?Q.state=z.OPEN_TAG_SLASH:(W(ve)||ye(Q,"Invalid character in tag name"),Q.state=z.ATTRIB));continue;case z.OPEN_TAG_SLASH:ve===">"?(fe(Q,!0),te(Q)):(ye(Q,"Forward-slash in opening tag not followed by >"),Q.state=z.ATTRIB);continue;case z.ATTRIB:if(W(ve))continue;ve===">"?fe(Q):ve==="/"?Q.state=z.OPEN_TAG_SLASH:B(k,ve)?(Q.attribName=ve,Q.attribValue="",Q.state=z.ATTRIB_NAME):ye(Q,"Invalid attribute name");continue;case z.ATTRIB_NAME:ve==="="?Q.state=z.ATTRIB_VALUE:ve===">"?(ye(Q,"Attribute without value"),Q.attribValue=Q.attribName,re(Q),fe(Q)):W(ve)?Q.state=z.ATTRIB_NAME_SAW_WHITE:B(I,ve)?Q.attribName+=ve:ye(Q,"Invalid attribute name");continue;case z.ATTRIB_NAME_SAW_WHITE:if(ve==="=")Q.state=z.ATTRIB_VALUE;else{if(W(ve))continue;ye(Q,"Attribute without value"),Q.tag.attributes[Q.attribName]="",Q.attribValue="",de(Q,"onattribute",{name:Q.attribName,value:""}),Q.attribName="",ve===">"?fe(Q):B(k,ve)?(Q.attribName=ve,Q.state=z.ATTRIB_NAME):(ye(Q,"Invalid attribute name"),Q.state=z.ATTRIB)}continue;case z.ATTRIB_VALUE:if(W(ve))continue;H(ve)?(Q.q=ve,Q.state=z.ATTRIB_VALUE_QUOTED):(ye(Q,"Unquoted attribute value"),Q.state=z.ATTRIB_VALUE_UNQUOTED,Q.attribValue=ve);continue;case z.ATTRIB_VALUE_QUOTED:if(ve!==Q.q){ve==="&"?Q.state=z.ATTRIB_VALUE_ENTITY_Q:Q.attribValue+=ve;continue}re(Q),Q.q="",Q.state=z.ATTRIB_VALUE_CLOSED;continue;case z.ATTRIB_VALUE_CLOSED:W(ve)?Q.state=z.ATTRIB:ve===">"?fe(Q):ve==="/"?Q.state=z.OPEN_TAG_SLASH:B(k,ve)?(ye(Q,"No whitespace between attributes"),Q.attribName=ve,Q.attribValue="",Q.state=z.ATTRIB_NAME):ye(Q,"Invalid attribute name");continue;case z.ATTRIB_VALUE_UNQUOTED:if(!G(ve)){ve==="&"?Q.state=z.ATTRIB_VALUE_ENTITY_U:Q.attribValue+=ve;continue}re(Q),ve===">"?fe(Q):Q.state=z.ATTRIB;continue;case z.CLOSE_TAG:if(Q.tagName)ve===">"?te(Q):B(I,ve)?Q.tagName+=ve:Q.script?(Q.script+=""?te(Q):ye(Q,"Invalid characters in closing tag");continue;case z.TEXT_ENTITY:case z.ATTRIB_VALUE_ENTITY_Q:case z.ATTRIB_VALUE_ENTITY_U:var qe,rt;switch(Q.state){case z.TEXT_ENTITY:qe=z.TEXT,rt="textNode";break;case z.ATTRIB_VALUE_ENTITY_Q:qe=z.ATTRIB_VALUE_QUOTED,rt="attribValue";break;case z.ATTRIB_VALUE_ENTITY_U:qe=z.ATTRIB_VALUE_UNQUOTED,rt="attribValue";break}ve===";"?(Q[rt]+=ne(Q),Q.entity="",Q.state=qe):B(Q.entity.length?V:L,ve)?Q.entity+=ve:(ye(Q,"Invalid character in entity name"),Q[rt]+="&"+Q.entity+ve,Q.entity="",Q.state=qe);continue;default:throw new Error(Q,"Unknown state: "+Q.state)}}return Q.position>=Q.bufferCheckPosition&&s(Q),Q}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */O.default||function(){var X=String.fromCharCode,Q=Math.floor,_e=function(){var Re=16384,Je=[],qe,rt,ut=-1,dt=arguments.length;if(!dt)return"";for(var ft="";++ut1114111||Q(Be)!==Be)throw RangeError("Invalid code point: "+Be);Be<=65535?Je.push(Be):(Be-=65536,qe=(Be>>10)+55296,rt=Be%1024+56320,Je.push(qe,rt)),(ut+1===dt||Je.length>Re)&&(ft+=X.apply(null,Je),Je.length=0)}return ft};p.default?Object.defineProperty(String,"fromCodePoint",{value:_e,configurable:!0,writable:!0}):String.fromCodePoint=_e}()})(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=O;var N=F("events").EventEmitter,g=F("inherits");g(O,N),O.Readable=F("readable-stream/readable.js"),O.Writable=F("readable-stream/writable.js"),O.Duplex=F("readable-stream/duplex.js"),O.Transform=F("readable-stream/transform.js"),O.PassThrough=F("readable-stream/passthrough.js"),O.Stream=O;function O(){N.call(this)}O.prototype.pipe=function(M,m){var y=this;function T(a){M.writable&&(M.write(a)===!1&&y.pause&&y.pause())}y.on("data",T);function b(){y.readable&&y.resume&&y.resume()}M.on("drain",b),!M._isStdio&&(!m||m.end!==!1)&&(y.on("end",d),y.on("close",n));var p=!1;function d(){if(p)return;p=!0,M.end()}function n(){if(p)return;p=!0,typeof M.destroy=="function"&&M.destroy()}function c(a){if(r(),N.listenerCount(this,"error")===0)throw a}y.on("error",c),M.on("error",c);function r(){y.removeListener("data",T),M.removeListener("drain",b),y.removeListener("end",d),y.removeListener("close",n),y.removeListener("error",c),M.removeListener("error",c),y.removeListener("end",r),y.removeListener("close",r),M.removeListener("close",r)}return y.on("end",r),y.on("close",r),M.on("close",r),M.emit("pipe",y),M}},{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 g=F("./lib/request"),O=F("./lib/response"),M=F("xtend"),m=F("builtin-status-codes"),y=F("url"),T=j;T.request=function(b,p){typeof b=="string"?b=y.parse(b):b=M(b);var d=N.location.protocol.search(/^https?:$/)===-1?"http:":"",n=b.protocol||d,c=b.hostname||b.host,r=b.port,a=b.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),b.url=(c?n+"//"+c:"")+(r?":"+r:"")+a,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var o=new g(b);return p&&o.on("response",p),o},T.get=function(p,d){var n=T.request(p,d);return n.end(),n},T.ClientRequest=g,T.IncomingMessage=O.IncomingMessage,T.Agent=function(){},T.Agent.defaultMaxSockets=4,T.globalAgent=new T.Agent,T.STATUS_CODES=m,T.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=T(N.fetch)&&T(N.ReadableStream),j.writableStream=T(N.WritableStream),j.abortController=T(N.AbortController),j.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),j.blobConstructor=!0}catch(b){}var g;function O(){if(g!==void 0)return g;if(N.XMLHttpRequest){g=new N.XMLHttpRequest;try{g.open("GET",N.XDomainRequest?"/":"https://example.com")}catch(b){g=null}}else g=null;return g}function M(b){var p=O();if(!p)return!1;try{return p.responseType=b,p.responseType===b}catch(d){}return!1}var m=typeof N.ArrayBuffer!="undefined",y=m&&T(N.ArrayBuffer.prototype.slice);j.arraybuffer=j.fetch||m&&M("arraybuffer"),j.msstream=!j.fetch&&y&&M("ms-stream"),j.mozchunkedarraybuffer=!j.fetch&&m&&M("moz-chunked-arraybuffer"),j.overrideMimeType=j.fetch||(O()?T(O().overrideMimeType):!1),j.vbArray=T(N.VBArray);function T(b){return typeof b=="function"}g=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(F,q,j){(function(N,g,O){"use strict";var M=F("babel-runtime/core-js/object/keys"),m=y(M);function y(s){return s&&s.__esModule?s:{default:s}}var T=F("./capability"),b=F("inherits"),p=F("./response"),d=F("readable-stream"),n=F("to-arraybuffer"),c=p.IncomingMessage,r=p.readyStates;function a(s,l){return T.fetch&&l?"fetch":T.mozchunkedarraybuffer?"moz-chunked-arraybuffer":T.msstream?"ms-stream":T.arraybuffer&&s?"arraybuffer":T.vbArray&&s?"text:vbarray":"text"}var o=q.exports=function(s){var l=this;d.Writable.call(l),l._opts=s,l._body=[],l._headers={},s.auth&&l.setHeader("Authorization","Basic "+new O(s.auth).toString("base64")),(0,m.default)(s.headers).forEach(function(x){l.setHeader(x,s.headers[x])});var t,S=!0;if(s.mode==="disable-fetch"||"requestTimeout"in s&&!T.abortController)S=!1,t=!0;else if(s.mode==="prefer-streaming")t=!1;else if(s.mode==="allow-wrong-content-type")t=!T.overrideMimeType;else if(!s.mode||s.mode==="default"||s.mode==="prefer-fast")t=!0;else throw new Error("Invalid value for opts.mode");l._mode=a(t,S),l._fetchTimer=null,l.on("finish",function(){l._onFinish()})};b(o,d.Writable),o.prototype.setHeader=function(s,l){var t=this,S=s.toLowerCase();if(h.indexOf(S)!==-1)return;t._headers[S]={name:s,value:l}},o.prototype.getHeader=function(s){var l=this._headers[s.toLowerCase()];return l?l.value:null},o.prototype.removeHeader=function(s){var l=this;delete l._headers[s.toLowerCase()]},o.prototype._onFinish=function(){var s=this;if(s._destroyed)return;var l=s._opts,t=s._headers,S=null;l.method!=="GET"&&l.method!=="HEAD"&&(T.arraybuffer?S=n(O.concat(s._body)):T.blobConstructor?S=new g.Blob(s._body.map(function(_){return n(_)}),{type:(t["content-type"]||{}).value||""}):S=O.concat(s._body).toString());var x=[];if((0,m.default)(t).forEach(function(_){var E=t[_].name,w=t[_].value;Array.isArray(w)?w.forEach(function(k){x.push([E,k])}):x.push([E,w])}),s._mode==="fetch"){var f=null,R=null;if(T.abortController){var C=new AbortController;f=C.signal,s._fetchAbortController=C,"requestTimeout"in l&&l.requestTimeout!==0&&(s._fetchTimer=g.setTimeout(function(){s.emit("requestTimeout"),s._fetchAbortController&&s._fetchAbortController.abort()},l.requestTimeout))}g.fetch(s._opts.url,{method:s._opts.method,headers:x,body:S||void 0,mode:"cors",credentials:l.withCredentials?"include":"same-origin",signal:f}).then(function(_){s._fetchResponse=_,s._connect()},function(_){g.clearTimeout(s._fetchTimer),s._destroyed||s.emit("error",_)})}else{var v=s._xhr=new g.XMLHttpRequest;try{v.open(s._opts.method,s._opts.url,!0)}catch(_){N.nextTick(function(){s.emit("error",_)});return}"responseType"in v&&(v.responseType=s._mode.split(":")[0]),"withCredentials"in v&&(v.withCredentials=!!l.withCredentials),s._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in l&&(v.timeout=l.requestTimeout,v.ontimeout=function(){s.emit("requestTimeout")}),x.forEach(function(_){v.setRequestHeader(_[0],_[1])}),s._response=null,v.onreadystatechange=function(){switch(v.readyState){case r.LOADING:case r.DONE:s._onXHRProgress();break}},s._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){s._onXHRProgress()}),v.onerror=function(){if(s._destroyed)return;s.emit("error",new Error("XHR error"))};try{v.send(S)}catch(_){N.nextTick(function(){s.emit("error",_)});return}}};function u(s){try{var l=s.status;return l!==null&&l!==0}catch(t){return!1}}o.prototype._onXHRProgress=function(){var s=this;if(!u(s._xhr)||s._destroyed)return;s._response||s._connect(),s._response._onXHRProgress()},o.prototype._connect=function(){var s=this;if(s._destroyed)return;s._response=new c(s._xhr,s._fetchResponse,s._mode,s._fetchTimer),s._response.on("error",function(l){s.emit("error",l)}),s.emit("response",s._response)},o.prototype._write=function(s,l,t){var S=this;S._body.push(s),t()},o.prototype.abort=o.prototype.destroy=function(){var s=this;s._destroyed=!0,g.clearTimeout(s._fetchTimer),s._response&&(s._response._destroyed=!0),s._xhr?s._xhr.abort():s._fetchAbortController&&s._fetchAbortController.abort()},o.prototype.end=function(s,l,t){var S=this;typeof s=="function"&&(t=s,s=void 0),d.Writable.prototype.end.call(S,s,l,t)},o.prototype.flushHeaders=function(){},o.prototype.setTimeout=function(){},o.prototype.setNoDelay=function(){},o.prototype.setSocketKeepAlive=function(){};var h=["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,g,O){"use strict";var M=F("babel-runtime/core-js/promise"),m=y(M);function y(c){return c&&c.__esModule?c:{default:c}}var T=F("./capability"),b=F("inherits"),p=F("readable-stream"),d=j.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=j.IncomingMessage=function(c,r,a,o){var u=this;if(p.Readable.call(u),u._mode=a,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",function(){N.nextTick(function(){u.emit("close")})}),a==="fetch"){var h=function f(){l.read().then(function(R){if(u._destroyed)return;if(R.done){g.clearTimeout(o),u.push(null);return}u.push(new O(R.value)),f()}).catch(function(R){g.clearTimeout(o),u._destroyed||u.emit("error",R)})};if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach(function(f,R){u.headers[R.toLowerCase()]=f,u.rawHeaders.push(R,f)}),T.writableStream){var s=new WritableStream({write:function(R){return new m.default(function(C,v){u._destroyed?v():u.push(new O(R))?C():u._resumeFetch=C})},close:function(){g.clearTimeout(o),u._destroyed||u.push(null)},abort:function(R){u._destroyed||u.emit("error",R)}});try{r.body.pipeTo(s).catch(function(f){g.clearTimeout(o),u._destroyed||u.emit("error",f)});return}catch(f){}}var l=r.body.getReader();h()}else{u._xhr=c,u._pos=0,u.url=c.responseURL,u.statusCode=c.status,u.statusMessage=c.statusText;var t=c.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(f){var R=f.match(/^([^:]+):\s*(.*)/);if(R){var C=R[1].toLowerCase();C==="set-cookie"?(u.headers[C]===void 0&&(u.headers[C]=[]),u.headers[C].push(R[2])):u.headers[C]!==void 0?u.headers[C]+=", "+R[2]:u.headers[C]=R[2],u.rawHeaders.push(R[1],R[2])}}),u._charset="x-user-defined",!T.overrideMimeType){var S=u.rawHeaders["mime-type"];if(S){var x=S.match(/;\s*charset=([^;])(;|$)/);x&&(u._charset=x[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};b(n,p.Readable),n.prototype._read=function(){var c=this,r=c._resumeFetch;r&&(c._resumeFetch=null,r())},n.prototype._onXHRProgress=function(){var c=this,r=c._xhr,a=null;switch(c._mode){case"text:vbarray":if(r.readyState!==d.DONE)break;try{a=new g.VBArray(r.responseBody).toArray()}catch(l){}if(a!==null){c.push(new O(a));break}case"text":try{a=r.responseText}catch(l){c._mode="text:vbarray";break}if(a.length>c._pos){var o=a.substr(c._pos);if(c._charset==="x-user-defined"){for(var u=new O(o.length),h=0;hc._pos&&(c.push(new O(new Uint8Array(s.result.slice(c._pos)))),c._pos=s.result.byteLength)},s.onload=function(){c.push(null)},s.readAsArrayBuffer(a);break}c._xhr.readyState===d.DONE&&c._mode!=="ms-stream"&&c.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,g=N.isEncoding||function(s){s=""+s;switch(s&&s.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 O(s){if(!s)return"utf8";for(var l;;)switch(s){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 s;default:if(l)return;s=(""+s).toLowerCase(),l=!0}}function M(s){var l=O(s);if(typeof l!="string"&&(N.isEncoding===g||!g(s)))throw new Error("Unknown encoding: "+s);return l||s}j.StringDecoder=m;function m(s){this.encoding=M(s);var l;switch(this.encoding){case"utf16le":this.text=c,this.end=r,l=4;break;case"utf8":this.fillLast=p,l=4;break;case"base64":this.text=a,this.end=o,l=3;break;default:this.write=u,this.end=h;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=N.allocUnsafe(l)}m.prototype.write=function(s){if(s.length===0)return"";var l,t;if(this.lastNeed){if(l=this.fillLast(s),l===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t>5===6?2:s>>4===14?3:s>>3===30?4:s>>6===2?-1:-2}function T(s,l,t){var S=l.length-1;if(S=0?(x>0&&(s.lastNeed=x-1),x):--S=0?(x>0&&(s.lastNeed=x-2),x):--S=0?(x>0&&(x===2?x=0:s.lastNeed=x-3),x):0))}function b(s,l,t){if((l[0]&192)!==128)return s.lastNeed=0,"\uFFFD";if(s.lastNeed>1&&l.length>1){if((l[1]&192)!==128)return s.lastNeed=1,"\uFFFD";if(s.lastNeed>2&&l.length>2&&(l[2]&192)!==128)return s.lastNeed=2,"\uFFFD"}}function p(s){var l=this.lastTotal-this.lastNeed,t=b(this,s,l);if(t!==void 0)return t;if(this.lastNeed<=s.length)return s.copy(this.lastChar,l,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);s.copy(this.lastChar,l,0,s.length),this.lastNeed-=s.length}function d(s,l){var t=T(this,s,l);if(!this.lastNeed)return s.toString("utf8",l);this.lastTotal=t;var S=s.length-(t-this.lastNeed);return s.copy(this.lastChar,0,S),s.toString("utf8",l,S)}function n(s){var l=s&&s.length?this.write(s):"";return this.lastNeed?l+"\uFFFD":l}function c(s,l){if((s.length-l)%2===0){var t=s.toString("utf16le",l);if(t){var S=t.charCodeAt(t.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=s[s.length-1],s.toString("utf16le",l,s.length-1)}function r(s){var l=s&&s.length?this.write(s):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,t)}return l}function a(s,l){var t=(s.length-l)%3;return t===0?s.toString("base64",l):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=s[s.length-1]:(this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1]),s.toString("base64",l,s.length-t))}function o(s){var l=s&&s.length?this.write(s):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function u(s){return s.toString(this.encoding)}function h(s){return s&&s.length?this.write(s):""}},{"safe-buffer":228}],236:[function(F,q,j){(function(N,g){var O=F("process/browser.js").nextTick,M=Function.prototype.apply,m=Array.prototype.slice,y={},T=0;j.setTimeout=function(){return new b(M.call(setTimeout,window,arguments),clearTimeout)},j.setInterval=function(){return new b(M.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=T++,n=arguments.length<2?!1:m.call(arguments,1);return y[d]=!0,O(function(){y[d]&&(n?p.apply(null,n):p.call(null),j.clearImmediate(d))}),d},j.clearImmediate=typeof g=="function"?g:function(p){delete y[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(g){if(g instanceof Uint8Array){if(g.byteOffset===0&&g.byteLength===g.buffer.byteLength)return g.buffer;if(typeof g.buffer.slice=="function")return g.buffer.slice(g.byteOffset,g.byteOffset+g.byteLength)}if(N.isBuffer(g)){for(var O=new Uint8Array(g.length),M=g.length,m=0;m",'"',"`"," ","\r",` `," "],b=["{","}","|","\\","^","`"].concat(T),p=["'"].concat(b),d=["%","/","?",";","#"].concat(p),n=["/","?","#"],c=255,r=/^[+a-z0-9A-Z_-]{0,63}$/,a=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,o={javascript:!0,"javascript:":!0},u={javascript:!0,"javascript:":!0},h={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},s=F("querystring");function l(f,R,C){if(f&&g.isObject(f)&&f instanceof O)return f;var v=new O;return v.parse(f,R,C),v}O.prototype.parse=function(f,R,C){if(!g.isString(f))throw new TypeError("Parameter 'url' must be a string, not "+typeof f);var v=f.indexOf("?"),_=v!==-1&&v127?Ae+="x":Ae+=Se[pe];if(!Ae.match(r)){var ye=ue.slice(0,G),ce=ue.slice(G+1),ae=Se.match(a);ae&&(ye.push(ae[1]),ce.unshift(ae[2])),ce.length&&(k="/"+ce.join(".")+k),this.hostname=ye.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),J||(this.hostname=N.toASCII(this.hostname));var re=this.port?":"+this.port:"",fe=this.hostname||"";this.host=fe+re,this.href+=this.host,J&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!o[V])for(var G=0,de=p.length;G0?C.host.split("@"):!1;Ae&&(C.auth=Ae.shift(),C.host=C.hostname=Ae.shift())}return C.search=f.search,C.query=f.query,(!g.isNull(C.pathname)||!g.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.href=C.format(),C}if(!ue.length)return C.pathname=null,C.search?C.path="/"+C.search:C.path=null,C.href=C.format(),C;for(var pe=ue.slice(-1)[0],Oe=(C.host||f.host||ue.length>1)&&(pe==="."||pe==="..")||pe==="",ye=0,ce=ue.length;ce>=0;ce--)pe=ue[ce],pe==="."?ue.splice(ce,1):pe===".."?(ue.splice(ce,1),ye++):ye&&(ue.splice(ce,1),ye--);if(!z&&!J)for(;ye--;ye)ue.unshift("..");z&&ue[0]!==""&&(!ue[0]||ue[0].charAt(0)!=="/")&&ue.unshift(""),Oe&&ue.join("/").substr(-1)!=="/"&&ue.push("");var ae=ue[0]===""||ue[0]&&ue[0].charAt(0)==="/";if(Se){C.hostname=C.host=ae?"":ue.length?ue.shift():"";var Ae=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;Ae&&(C.auth=Ae.shift(),C.host=C.hostname=Ae.shift())}return z=z||C.host&&ue.length,z&&!ae&&ue.unshift(""),ue.length?C.pathname=ue.join("/"):(C.pathname=null,C.path=null),(!g.isNull(C.pathname)||!g.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.auth=f.auth||C.auth,C.slashes=C.slashes||f.slashes,C.href=C.format(),C},O.prototype.parseHost=function(){var f=this.host,R=m.exec(f);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),f=f.substr(0,f.length-R.length)),f&&(this.hostname=f)}},{"./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=g;function g(M,m){if(O("noDeprecation"))return M;var y=!1;function T(){if(!y){if(O("throwDeprecation"))throw new Error(m);O("traceDeprecation")?console.trace(m):console.warn(m),y=!0}return M.apply(this,arguments)}return T}function O(M){try{if(!N.localStorage)return!1}catch(y){return!1}var m=N.localStorage[M];return m==null?!1:String(m).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(g,O){g.super_=O,g.prototype=Object.create(O.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:q.exports=function(g,O){g.super_=O;var M=function(){};M.prototype=O.prototype,g.prototype=new M,g.prototype.constructor=g}},{}],242:[function(F,q,j){q.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],243:[function(F,q,j){(function(N,g){var O=/%[sdj%]/g;j.format=function(H){if(!S(H)){for(var G=[],B=0;B=z)return de;switch(de){case"%s":return String(P[B++]);case"%d":return Number(P[B++]);case"%j":try{return JSON.stringify(P[B++])}catch(Se){return"[Circular]"}default:return de}}),ue=P[B];B=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),h(G)?B.showHidden=G:G&&j._extend(B,G),f(B.showHidden)&&(B.showHidden=!1),f(B.depth)&&(B.depth=2),f(B.colors)&&(B.colors=!1),f(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=T),d(B,H,B.depth)}j.inspect=y,y.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]},y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function T(H,G){var B=y.styles[G];return B?"["+y.colors[B][0]+"m"+H+"["+y.colors[B][1]+"m":H}function b(H,G){return H}function p(H){var G={};return H.forEach(function(B,P){G[B]=!0}),G}function d(H,G,B){if(H.customInspect&&G&&E(G.inspect)&&G.inspect!==j.inspect&&!(G.constructor&&G.constructor.prototype===G)){var P=G.inspect(B,H);return S(P)||(P=d(H,P,B)),P}var z=n(H,G);if(z)return z;var J=Object.keys(G),ue=p(J);if(H.showHidden&&(J=Object.getOwnPropertyNames(G)),_(G)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return c(G);if(J.length===0){if(E(G)){var de=G.name?": "+G.name:"";return H.stylize("[Function"+de+"]","special")}if(R(G))return H.stylize(RegExp.prototype.toString.call(G),"regexp");if(v(G))return H.stylize(Date.prototype.toString.call(G),"date");if(_(G))return c(G)}var Se="",Ae=!1,pe=["{","}"];if(u(G)&&(Ae=!0,pe=["[","]"]),E(G)){var Oe=G.name?": "+G.name:"";Se=" [Function"+Oe+"]"}if(R(G)&&(Se=" "+RegExp.prototype.toString.call(G)),v(G)&&(Se=" "+Date.prototype.toUTCString.call(G)),_(G)&&(Se=" "+c(G)),J.length===0&&(!Ae||G.length==0))return pe[0]+Se+pe[1];if(B<0)return R(G)?H.stylize(RegExp.prototype.toString.call(G),"regexp"):H.stylize("[Object]","special");H.seen.push(G);var ye;return Ae?ye=r(H,G,B,ue,J):ye=J.map(function(ce){return a(H,G,B,ue,ce,Ae)}),H.seen.pop(),o(ye,Se,pe)}function n(H,G){if(f(G))return H.stylize("undefined","undefined");if(S(G)){var B="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return H.stylize(B,"string")}if(t(G))return H.stylize(""+G,"number");if(h(G))return H.stylize(""+G,"boolean");if(s(G))return H.stylize("null","null")}function c(H){return"["+Error.prototype.toString.call(H)+"]"}function r(H,G,B,P,z){for(var J=[],ue=0,de=G.length;ue-1&&(J?de=de.split(` `).map(function(Ae){return" "+Ae}).join(` `).substr(2):de=` `+de.split(` `).map(function(Ae){return" "+Ae}).join(` `))):de=H.stylize("[Circular]","special")),f(ue)){if(J&&z.match(/^\d+$/))return de;ue=JSON.stringify(""+z),ue.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ue=ue.substr(1,ue.length-2),ue=H.stylize(ue,"name")):(ue=ue.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ue=H.stylize(ue,"string"))}return ue+": "+de}function o(H,G,B){var P=0,z=H.reduce(function(J,ue){return P++,ue.indexOf(` `)>=0&&P++,J+ue.replace(/\u001b\[\d\d?m/g,"").length+1},0);return z>60?B[0]+(G===""?"":G+` `)+" "+H.join(`, `)+" "+B[1]:B[0]+G+" "+H.join(", ")+" "+B[1]}function u(H){return Array.isArray(H)}j.isArray=u;function h(H){return typeof H=="boolean"}j.isBoolean=h;function s(H){return H===null}j.isNull=s;function l(H){return H==null}j.isNullOrUndefined=l;function t(H){return typeof H=="number"}j.isNumber=t;function S(H){return typeof H=="string"}j.isString=S;function x(H){return typeof H=="symbol"}j.isSymbol=x;function f(H){return H===void 0}j.isUndefined=f;function R(H){return C(H)&&k(H)==="[object RegExp]"}j.isRegExp=R;function C(H){return typeof H=="object"&&H!==null}j.isObject=C;function v(H){return C(H)&&k(H)==="[object Date]"}j.isDate=v;function _(H){return C(H)&&(k(H)==="[object Error]"||H instanceof Error)}j.isError=_;function E(H){return typeof H=="function"}j.isFunction=E;function w(H){return H===null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||typeof H=="symbol"||typeof H=="undefined"}j.isPrimitive=w,j.isBuffer=F("./support/isBuffer");function k(H){return Object.prototype.toString.call(H)}function I(H){return H<10?"0"+H.toString(10):H.toString(10)}var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var H=new Date,G=[I(H.getHours()),I(H.getMinutes()),I(H.getSeconds())].join(":");return[H.getDate(),L[H.getMonth()],G].join(" ")}j.log=function(){console.log("%s - %s",V(),j.format.apply(j,arguments))},j.inherits=F("inherits"),j._extend=function(H,G){if(!G||!C(G))return H;for(var B=Object.keys(G),P=B.length;P--;)H[B[P]]=G[B[P]];return H};function W(H,G){return Object.prototype.hasOwnProperty.call(H,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"),g=m(N),O=F("babel-runtime/core-js/object/keys"),M=m(O);function m(y){return y&&y.__esModule?y:{default:y}}(function(){"use strict";var y,T,b,p,d,n={}.hasOwnProperty;y=F("xmlbuilder"),T=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 c(r){var a,o,u;this.options={},o=T["0.2"];for(a in o){if(!n.call(o,a))continue;u=o[a],this.options[a]=u}for(a in r){if(!n.call(r,a))continue;u=r[a],this.options[a]=u}}return c.prototype.buildObject=function(r){var a,o,u,h,s;return a=this.options.attrkey,o=this.options.charkey,(0,M.default)(r).length===1&&this.options.rootName===T["0.2"].rootName?(s=(0,M.default)(r)[0],r=r[s]):s=this.options.rootName,u=function(l){return function(t,S){var x,f,R,C,v,_;if((typeof S=="undefined"?"undefined":(0,g.default)(S))!=="object")l.options.cdata&&p(S)?t.raw(d(S)):t.txt(S);else if(Array.isArray(S))for(C in S){if(!n.call(S,C))continue;f=S[C];for(v in f)R=f[v],t=u(t.ele(v),R).up()}else for(v in S){if(!n.call(S,v))continue;if(f=S[v],v===a){if((typeof f=="undefined"?"undefined":(0,g.default)(f))==="object")for(x in f)_=f[x],t=t.att(x,_)}else if(v===o)l.options.cdata&&p(f)?t=t.raw(d(f)):t=t.txt(f);else if(Array.isArray(f))for(C in f){if(!n.call(f,C))continue;R=f[C],typeof R=="string"?l.options.cdata&&p(R)?t=t.ele(v).raw(d(R)).up():t=t.ele(v,R).up():t=u(t.ele(v),R).up()}else(typeof f=="undefined"?"undefined":(0,g.default)(f))==="object"?t=u(t.ele(v),f).up():typeof f=="string"&&l.options.cdata&&p(f)?t=t.ele(v).raw(d(f)).up():(f==null&&(f=""),t=t.ele(v,f.toString()).up())}return t}}(this),h=y.create(s,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(h,r).end(this.options.renderOpts)},c}()}).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"),g=p(N),O=F("babel-runtime/core-js/object/get-own-property-names"),M=p(O),m=F("babel-runtime/core-js/object/keys"),y=p(m),T=F("babel-runtime/helpers/typeof"),b=p(T);function p(d){return d&&d.__esModule?d:{default:d}}(function(){"use strict";var d,n,c,r,a,o,u,h,s=function(x,f){return function(){return x.apply(f,arguments)}},l=function(x,f){for(var R in f)t.call(f,R)&&(x[R]=f[R]);function C(){this.constructor=x}return C.prototype=f.prototype,x.prototype=new C,x.__super__=f.prototype,x},t={}.hasOwnProperty;u=F("sax"),c=F("events"),d=F("./bom"),o=F("./processors"),h=F("timers").setImmediate,n=F("./defaults").defaults,r=function(x){return(typeof x=="undefined"?"undefined":(0,b.default)(x))==="object"&&x!=null&&(0,y.default)(x).length===0},a=function(x,f,R){var C,v,_;for(C=0,v=x.length;C0&&(I[_.options.childkey]=V),V=I;else if(G){G[_.options.childkey]=G[_.options.childkey]||[],W={};for(k in V){if(!t.call(V,k))continue;W[k]=V[k]}G[_.options.childkey].push(W),delete V["#name"],(0,y.default)(V).length===1&&R in V&&!_.EXPLICIT_CHARKEY&&(V=V[R])}}return v.length>0?_.assignOrPush(G,L,V):(_.options.explicitRoot&&(H=V,V={},V[L]=H),_.resultObject=V,_.saxParser.ended=!0,_.emit("end",_.resultObject))}}(this),C=function(_){return function(E){var w,k;if(k=v[v.length-1],k)return k[R]+=E,_.options.explicitChildren&&_.options.preserveChildrenOrder&&_.options.charsAsChildren&&(_.options.includeWhiteChars||E.replace(/\\n/g,"").trim()!=="")&&(k[_.options.childkey]=k[_.options.childkey]||[],w={"#name":"__text__"},w[R]=E,_.options.normalize&&(w[R]=w[R].replace(/\s{2,}/g," ").trim()),k[_.options.childkey].push(w)),k}}(this),this.saxParser.ontext=C,this.saxParser.oncdata=function(_){return function(E){var w;if(w=C(E),w)return w.cdata=!0}}(this)},x.prototype.parseString=function(f,R){var C;R!=null&&typeof R=="function"&&(this.on("end",function(v){return this.reset(),R(null,v)}),this.on("error",function(v){return this.reset(),R(v)}));try{return f=f.toString(),f.trim()===""?(this.emit("end",null),!0):(f=d.stripBOM(f),this.options.async?(this.remaining=f,h(this.processAsync),this.saxParser):this.saxParser.write(f).close())}catch(v){if(C=v,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw C}else return this.emit("error",C),this.saxParser.errThrown=!0}},x.prototype.parseStringPromise=function(f){return new g.default(function(R){return function(C,v){return R.parseString(f,function(_,E){return _?v(_):C(E)})}}(this))},x}(c),j.parseString=function(S,x,f){var R,C,v;return f!=null?(typeof f=="function"&&(R=f),(typeof x=="undefined"?"undefined":(0,b.default)(x))==="object"&&(C=x)):(typeof x=="function"&&(R=x),C={}),v=new j.Parser(C),v.parseString(S,R)},j.parseStringPromise=function(S,x){var f,R;return(typeof x=="undefined"?"undefined":(0,b.default)(x))==="object"&&(f=x),R=new j.Parser(f),R.parseStringPromise(S)}}).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(g){return g.toLowerCase()},j.firstCharLowerCase=function(g){return g.charAt(0).toLowerCase()+g.slice(1)},j.stripPrefix=function(g){return g.replace(N,"")},j.parseNumbers=function(g){return isNaN(g)||(g=g%1===0?parseInt(g,10):parseFloat(g)),g},j.parseBooleans=function(g){return/^(?:true|false)$/i.test(g)&&(g=g.toLowerCase()==="true"),g}}).call(void 0)},{}],249:[function(F,q,j){"use strict";(function(){"use strict";var N,g,O,M,m=function(b,p){for(var d in p)y.call(p,d)&&(b[d]=p[d]);function n(){this.constructor=b}return n.prototype=p.prototype,b.prototype=new n,b.__super__=p.prototype,b},y={}.hasOwnProperty;g=F("./defaults"),N=F("./builder"),O=F("./parser"),M=F("./processors"),j.defaults=g.defaults,j.processors=M,j.ValidationError=function(T){m(b,T);function b(p){this.message=p}return b}(Error),j.Builder=N.Builder,j.Parser=O.Parser,j.parseString=O.parseString,j.parseStringPromise=O.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"),g=T(N),O=F("babel-runtime/helpers/typeof"),M=T(O),m=F("babel-runtime/core-js/object/assign"),y=T(m);function T(b){return b&&b.__esModule?b:{default:b}}(function(){var b,p,d,n,c,r,a,o=[].slice,u={}.hasOwnProperty;b=function(){var s,l,t,S,x,f;if(f=arguments[0],x=2<=arguments.length?o.call(arguments,1):[],c(y.default))y.default.apply(null,arguments);else for(s=0,t=x.length;s":"attribute: {"+b+"}, parent: <"+this.parent.name+">"},T.prototype.isEqualNode=function(b){return b.namespaceURI!==this.namespaceURI||(b.prefix!==this.prefix||b.localName!==this.localName)?!1:!(b.value!==this.value)},T}()}).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"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T=function(d,n){for(var c in n)b.call(n,c)&&(d[c]=n[c]);function r(){this.constructor=d}return r.prototype=n.prototype,d.prototype=new r,d.__super__=n.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),y=F("./XMLCharacterData"),q.exports=m=function(p){T(d,p);function d(n,c){if(d.__super__.constructor.call(this,n),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=M.CData,this.value=this.stringify.cdata(c)}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},d}(y)}).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"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y=function(p,d){for(var n in d)T.call(d,n)&&(p[n]=d[n]);function c(){this.constructor=p}return c.prototype=d.prototype,p.prototype=new c,p.__super__=d.prototype,p},T={}.hasOwnProperty;m=F("./XMLNode"),q.exports=M=function(b){y(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(n){return this.value=n||""}}),Object.defineProperty(p.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(p.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),p.prototype.clone=function(){return(0,g.default)(this)},p.prototype.substringData=function(d,n){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,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.deleteData=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.replaceData=function(d,n,c){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}(m)}).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"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T=function(d,n){for(var c in n)b.call(n,c)&&(d[c]=n[c]);function r(){this.constructor=d}return r.prototype=n.prototype,d.prototype=new r,d.__super__=n.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),m=F("./XMLCharacterData"),q.exports=y=function(p){T(d,p);function d(n,c){if(d.__super__.constructor.call(this,n),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=M.Comment,this.value=this.stringify.comment(c)}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},d}(m)}).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"),g=m(N),O=F("babel-runtime/core-js/object/create"),M=m(O);function m(y){return y&&y.__esModule?y:{default:y}}(function(){var y,T,b;T=F("./XMLDOMErrorHandler"),b=F("./XMLDOMStringList"),q.exports=y=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 T,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,M.default)(this.defaultParams)}return Object.defineProperty(p.prototype,"parameterNames",{get:function(){return new b((0,g.default)(this.defaultParams))}}),p.prototype.getParameter=function(d){return this.params.hasOwnProperty(d)?this.params[d]:null},p.prototype.canSetParameter=function(d,n){return!0},p.prototype.setParameter=function(d,n){return n!=null?this.params[d]=n: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 g(){}return g.prototype.handleError=function(O){throw new Error(O)},g}()}).call(void 0)},{}],260:[function(F,q,j){"use strict";(function(){var N;q.exports=N=function(){function g(){}return g.prototype.hasFeature=function(O,M){return!0},g.prototype.createDocumentType=function(O,M,m){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(O,M,m){throw new Error("This DOM method is not implemented.")},g.prototype.createHTMLDocument=function(O){throw new Error("This DOM method is not implemented.")},g.prototype.getFeature=function(O,M){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{}],261:[function(F,q,j){"use strict";(function(){var N;q.exports=N=function(){function g(O){this.arr=O||[]}return Object.defineProperty(g.prototype,"length",{get:function(){return this.arr.length}}),g.prototype.item=function(O){return this.arr[O]||null},g.prototype.contains=function(O){return this.arr.indexOf(O)!==-1},g}()}).call(void 0)},{}],262:[function(F,q,j){"use strict";(function(){var N,g,O,M=function(T,b){for(var p in b)m.call(b,p)&&(T[p]=b[p]);function d(){this.constructor=T}return d.prototype=b.prototype,T.prototype=new d,T.__super__=b.prototype,T},m={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),q.exports=g=function(y){M(T,y);function T(b,p,d,n,c,r){if(T.__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(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(p));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(p));if(c.indexOf("#")!==0&&(c="#"+c),!c.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(p));if(r&&!c.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(n),r&&(this.defaultValue=this.stringify.dtdAttDefault(r)),this.defaultValueType=c}return T.prototype.toString=function(b){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(b))},T}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(F,q,j){"use strict";(function(){var N,g,O,M=function(T,b){for(var p in b)m.call(b,p)&&(T[p]=b[p]);function d(){this.constructor=T}return d.prototype=b.prototype,T.prototype=new d,T.__super__=b.prototype,T},m={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),q.exports=g=function(y){M(T,y);function T(b,p,d){if(T.__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 T.prototype.toString=function(b){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(b))},T}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(F,q,j){"use strict";(function(){var N,g,O,M,m=function(b,p){for(var d in p)y.call(p,d)&&(b[d]=p[d]);function n(){this.constructor=b}return n.prototype=p.prototype,b.prototype=new n,b.__super__=p.prototype,b},y={}.hasOwnProperty;M=F("./Utility").isObject,O=F("./XMLNode"),N=F("./NodeType"),q.exports=g=function(T){m(b,T);function b(p,d,n,c){if(b.__super__.constructor.call(this,p),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!d,this.name=this.stringify.name(n),this.type=N.EntityDeclaration,!M(c))this.value=this.stringify.dtdEntityValue(c),this.internal=!0;else{if(!c.pubID&&!c.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));if(this.internal=!1,c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID)),c.nData!=null&&(this.nData=this.stringify.dtdNData(c.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}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}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(F,q,j){"use strict";(function(){var N,g,O,M=function(T,b){for(var p in b)m.call(b,p)&&(T[p]=b[p]);function d(){this.constructor=T}return d.prototype=b.prototype,T.prototype=new d,T.__super__=b.prototype,T},m={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),q.exports=g=function(y){M(T,y);function T(b,p,d){if(T.__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(T.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(T.prototype,"systemId",{get:function(){return this.sysID}}),T.prototype.toString=function(b){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(b))},T}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(F,q,j){"use strict";(function(){var N,g,O,M,m=function(b,p){for(var d in p)y.call(p,d)&&(b[d]=p[d]);function n(){this.constructor=b}return n.prototype=p.prototype,b.prototype=new n,b.__super__=p.prototype,b},y={}.hasOwnProperty;M=F("./Utility").isObject,O=F("./XMLNode"),N=F("./NodeType"),q.exports=g=function(T){m(b,T);function b(p,d,n,c){var r;b.__super__.constructor.call(this,p),M(d)&&(r=d,d=r.version,n=r.encoding,c=r.standalone),d||(d="1.0"),this.type=N.Declaration,this.version=this.stringify.xmlVersion(d),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return b.prototype.toString=function(p){return this.options.writer.declaration(this,this.options.writer.filterOptions(p))},b}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(F,q,j){"use strict";(function(){var N,g,O,M,m,y,T,b,p,d=function(r,a){for(var o in a)n.call(a,o)&&(r[o]=a[o]);function u(){this.constructor=r}return u.prototype=a.prototype,r.prototype=new u,r.__super__=a.prototype,r},n={}.hasOwnProperty;p=F("./Utility").isObject,b=F("./XMLNode"),N=F("./NodeType"),g=F("./XMLDTDAttList"),M=F("./XMLDTDEntity"),O=F("./XMLDTDElement"),m=F("./XMLDTDNotation"),T=F("./XMLNamedNodeMap"),q.exports=y=function(c){d(r,c);function r(a,o,u){var h,s,l,t,S,x;if(r.__super__.constructor.call(this,a),this.type=N.DocType,a.children){for(t=a.children,s=0,l=t.length;s=0;)this.up();return this.onEnd()},v.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},v.prototype.openNode=function(_){var E,w,k,I;if(!_.isOpen){if(!this.root&&this.currentLevel===0&&_.type===N.Element&&(this.root=_),w="",_.type===N.Element){this.writerOptions.state=g.OpenTag,w=this.writer.indent(_,this.writerOptions,this.currentLevel)+"<"+_.name,I=_.attribs;for(k in I){if(!C.call(I,k))continue;E=I[k],w+=this.writer.attribute(E,this.writerOptions,this.currentLevel)}w+=(_.children?">":"/>")+this.writer.endline(_,this.writerOptions,this.currentLevel),this.writerOptions.state=g.InsideTag}else this.writerOptions.state=g.OpenTag,w=this.writer.indent(_,this.writerOptions,this.currentLevel)+""),w+=this.writer.endline(_,this.writerOptions,this.currentLevel);return this.onData(w,this.currentLevel),_.isOpen=!0}},v.prototype.closeNode=function(_){var E;if(!_.isClosed)return E="",this.writerOptions.state=g.CloseTag,_.type===N.Element?E=this.writer.indent(_,this.writerOptions,this.currentLevel)+""+this.writer.endline(_,this.writerOptions,this.currentLevel):E=this.writer.indent(_,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(_,this.writerOptions,this.currentLevel),this.writerOptions.state=g.None,this.onData(E,this.currentLevel),_.isClosed=!0},v.prototype.onData=function(_,E){return this.documentStarted=!0,this.onDataCallback(_,E+1)},v.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},v.prototype.debugInfo=function(_){return _==null?"":"node: <"+_+">"},v.prototype.ele=function(){return this.element.apply(this,arguments)},v.prototype.nod=function(_,E,w){return this.node(_,E,w)},v.prototype.txt=function(_){return this.text(_)},v.prototype.dat=function(_){return this.cdata(_)},v.prototype.com=function(_){return this.comment(_)},v.prototype.ins=function(_,E){return this.instruction(_,E)},v.prototype.dec=function(_,E,w){return this.declaration(_,E,w)},v.prototype.dtd=function(_,E,w){return this.doctype(_,E,w)},v.prototype.e=function(_,E,w){return this.element(_,E,w)},v.prototype.n=function(_,E,w){return this.node(_,E,w)},v.prototype.t=function(_){return this.text(_)},v.prototype.d=function(_){return this.cdata(_)},v.prototype.c=function(_){return this.comment(_)},v.prototype.r=function(_){return this.raw(_)},v.prototype.i=function(_,E){return this.instruction(_,E)},v.prototype.att=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},v.prototype.a=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},v.prototype.ent=function(_,E){return this.entity(_,E)},v.prototype.pent=function(_,E){return this.pEntity(_,E)},v.prototype.not=function(_,E){return this.notation(_,E)},v}()}).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"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T=function(d,n){for(var c in n)b.call(n,c)&&(d[c]=n[c]);function r(){this.constructor=d}return r.prototype=n.prototype,d.prototype=new r,d.__super__=n.prototype,d},b={}.hasOwnProperty;y=F("./XMLNode"),M=F("./NodeType"),q.exports=m=function(p){T(d,p);function d(n){d.__super__.constructor.call(this,n),this.type=M.Dummy}return d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.toString=function(n){return""},d}(y)}).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"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,T,b,p,d,n,c,r=function(u,h){for(var s in h)a.call(h,s)&&(u[s]=h[s]);function l(){this.constructor=u}return l.prototype=h.prototype,u.prototype=new l,u.__super__=h.prototype,u},a={}.hasOwnProperty;c=F("./Utility"),n=c.isObject,d=c.isFunction,p=c.getValue,b=F("./XMLNode"),M=F("./NodeType"),m=F("./XMLAttribute"),T=F("./XMLNamedNodeMap"),q.exports=y=function(o){r(u,o);function u(h,s,l){var t,S,x,f;if(u.__super__.constructor.call(this,h),s==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(s),this.type=M.Element,this.attribs={},this.schemaTypeInfo=null,l!=null&&this.attribute(l),h.type===M.Document&&(this.isRoot=!0,this.documentObject=h,h.rootObject=this,h.children)){for(f=h.children,S=0,x=f.length;S=t;s=0<=t?++l:--l)if(!this.attribs[s].isEqualNode(h.attribs[s]))return!1;return!0},u}(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"),g=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M;q.exports=M=function(){function m(y){this.nodes=y}return Object.defineProperty(m.prototype,"length",{get:function(){return(0,g.default)(this.nodes).length||0}}),m.prototype.clone=function(){return this.nodes=null},m.prototype.getNamedItem=function(y){return this.nodes[y]},m.prototype.setNamedItem=function(y){var T;return T=this.nodes[y.nodeName],this.nodes[y.nodeName]=y,T||null},m.prototype.removeNamedItem=function(y){var T;return T=this.nodes[y],delete this.nodes[y],T||null},m.prototype.item=function(y){return this.nodes[(0,g.default)(this.nodes)[y]]||null},m.prototype.getNamedItemNS=function(y,T){throw new Error("This DOM method is not implemented.")},m.prototype.setNamedItemNS=function(y){throw new Error("This DOM method is not implemented.")},m.prototype.removeNamedItemNS=function(y,T){throw new Error("This DOM method is not implemented.")},m}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(F,q,j){"use strict";(function(){var N,g,O,M,m,y,T,b,p,d,n,c,r,a,o,u,h,s,l,t={}.hasOwnProperty;l=F("./Utility"),s=l.isObject,h=l.isFunction,u=l.isEmpty,o=l.getValue,b=null,O=null,M=null,m=null,y=null,r=null,a=null,c=null,T=null,g=null,n=null,p=null,N=null,q.exports=d=function(){function S(x){this.parent=x,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,b||(b=F("./XMLElement"),O=F("./XMLCData"),M=F("./XMLComment"),m=F("./XMLDeclaration"),y=F("./XMLDocType"),r=F("./XMLRaw"),a=F("./XMLText"),c=F("./XMLProcessingInstruction"),T=F("./XMLDummy"),g=F("./NodeType"),n=F("./XMLNodeList"),p=F("./XMLNamedNodeMap"),N=F("./DocumentPosition"))}return Object.defineProperty(S.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(S.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(S.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(S.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(S.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(S.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(S.prototype,"previousSibling",{get:function(){var f;return f=this.parent.children.indexOf(this),this.parent.children[f-1]||null}}),Object.defineProperty(S.prototype,"nextSibling",{get:function(){var f;return f=this.parent.children.indexOf(this),this.parent.children[f+1]||null}}),Object.defineProperty(S.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(S.prototype,"textContent",{get:function(){var f,R,C,v,_;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(_="",v=this.children,R=0,C=v.length;R":((R=this.parent)!=null?R.name:void 0)?"node: <"+x+">, parent: <"+this.parent.name+">":"node: <"+x+">"},S.prototype.ele=function(x,f,R){return this.element(x,f,R)},S.prototype.nod=function(x,f,R){return this.node(x,f,R)},S.prototype.txt=function(x){return this.text(x)},S.prototype.dat=function(x){return this.cdata(x)},S.prototype.com=function(x){return this.comment(x)},S.prototype.ins=function(x,f){return this.instruction(x,f)},S.prototype.doc=function(){return this.document()},S.prototype.dec=function(x,f,R){return this.declaration(x,f,R)},S.prototype.e=function(x,f,R){return this.element(x,f,R)},S.prototype.n=function(x,f,R){return this.node(x,f,R)},S.prototype.t=function(x){return this.text(x)},S.prototype.d=function(x){return this.cdata(x)},S.prototype.c=function(x){return this.comment(x)},S.prototype.r=function(x){return this.raw(x)},S.prototype.i=function(x,f){return this.instruction(x,f)},S.prototype.u=function(){return this.up()},S.prototype.importXMLBuilder=function(x){return this.importDocument(x)},S.prototype.replaceChild=function(x,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeChild=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.appendChild=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.hasChildNodes=function(){return this.children.length!==0},S.prototype.cloneNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isSupported=function(x,f){return!0},S.prototype.hasAttributes=function(){return this.attribs.length!==0},S.prototype.compareDocumentPosition=function(x){var f,R;return f=this,f===x?0:this.document()!==x.document()?(R=N.Disconnected|N.ImplementationSpecific,Math.random()<.5?R|=N.Preceding:R|=N.Following,R):f.isAncestor(x)?N.Contains|N.Preceding:f.isDescendant(x)?N.Contains|N.Following:f.isPreceding(x)?N.Preceding:N.Following},S.prototype.isSameNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupPrefix=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isDefaultNamespace=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupNamespaceURI=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isEqualNode=function(x){var f,R,C;if(x.nodeType!==this.nodeType)return!1;if(x.children.length!==this.children.length)return!1;for(f=R=0,C=this.children.length-1;0<=C?R<=C:R>=C;f=0<=C?++R:--R)if(!this.children[f].isEqualNode(x.children[f]))return!1;return!0},S.prototype.getFeature=function(x,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setUserData=function(x,f,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getUserData=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.contains=function(x){return x?x===this||this.isDescendant(x):!1},S.prototype.isDescendant=function(x){var f,R,C,v,_;for(_=this.children,C=0,v=_.length;CR},S.prototype.treePosition=function(x){var f,R;return R=0,f=!1,this.foreachTreeNode(this.document(),function(C){if(R++,!f&&C===x)return f=!0}),f?R:-1},S.prototype.foreachTreeNode=function(x,f){var R,C,v,_,E;for(x||(x=this.document()),_=x.children,C=0,v=_.length;C0){for(this.stream.write(" ["),this.stream.write(this.endline(p,d,n)),d.state=g.InsideTag,o=p.children,r=0,a=o.length;r"),this.stream.write(this.endline(p,d,n)),d.state=g.None,this.closeNode(p,d,n)},b.prototype.element=function(p,d,n){var c,r,a,o,u,h,s,l,t,S;n||(n=0),this.openNode(p,d,n),d.state=g.OpenTag,this.stream.write(this.indent(p,d,n)+"<"+p.name),t=p.attribs;for(s in t){if(!y.call(t,s))continue;c=t[s],this.attribute(c,d,n)}if(a=p.children.length,o=a===0?null:p.children[0],a===0||p.children.every(function(x){return(x.type===N.Text||x.type===N.Raw)&&x.value===""}))d.allowEmpty?(this.stream.write(">"),d.state=g.CloseTag,this.stream.write("")):(d.state=g.CloseTag,this.stream.write(d.spaceBeforeSlash+"/>"));else if(d.pretty&&a===1&&(o.type===N.Text||o.type===N.Raw)&&o.value!=null)this.stream.write(">"),d.state=g.InsideTag,d.suppressPrettyCount++,l=!0,this.writeChildNode(o,d,n+1),d.suppressPrettyCount--,l=!1,d.state=g.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(p,d,n)),d.state=g.InsideTag,S=p.children,u=0,h=S.length;u")}return this.stream.write(this.endline(p,d,n)),d.state=g.None,this.closeNode(p,d,n)},b.prototype.processingInstruction=function(p,d,n){return this.stream.write(b.__super__.processingInstruction.call(this,p,d,n))},b.prototype.raw=function(p,d,n){return this.stream.write(b.__super__.raw.call(this,p,d,n))},b.prototype.text=function(p,d,n){return this.stream.write(b.__super__.text.call(this,p,d,n))},b.prototype.dtdAttList=function(p,d,n){return this.stream.write(b.__super__.dtdAttList.call(this,p,d,n))},b.prototype.dtdElement=function(p,d,n){return this.stream.write(b.__super__.dtdElement.call(this,p,d,n))},b.prototype.dtdEntity=function(p,d,n){return this.stream.write(b.__super__.dtdEntity.call(this,p,d,n))},b.prototype.dtdNotation=function(p,d,n){return this.stream.write(b.__super__.dtdNotation.call(this,p,d,n))},b}(M)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(F,q,j){"use strict";(function(){var N,g,O=function(y,T){for(var b in T)M.call(T,b)&&(y[b]=T[b]);function p(){this.constructor=y}return p.prototype=T.prototype,y.prototype=new p,y.__super__=T.prototype,y},M={}.hasOwnProperty;g=F("./XMLWriterBase"),q.exports=N=function(m){O(y,m);function y(T){y.__super__.constructor.call(this,T)}return y.prototype.document=function(T,b){var p,d,n,c,r;for(b=this.filterOptions(b),c="",r=T.children,d=0,n=r.length;d","]]]]>"),this.assertLegalChar(m))},M.prototype.comment=function(m){if(this.options.noValidation)return m;if(m=""+m||"",m.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+m);return this.assertLegalChar(m)},M.prototype.raw=function(m){return this.options.noValidation?m:""+m||""},M.prototype.attValue=function(m){return this.options.noValidation?m:this.assertLegalChar(this.attEscape(m=""+m||""))},M.prototype.insTarget=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.insValue=function(m){if(this.options.noValidation)return m;if(m=""+m||"",m.match(/\?>/))throw new Error("Invalid processing instruction value: "+m);return this.assertLegalChar(m)},M.prototype.xmlVersion=function(m){if(this.options.noValidation)return m;if(m=""+m||"",!m.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+m);return m},M.prototype.xmlEncoding=function(m){if(this.options.noValidation)return m;if(m=""+m||"",!m.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+m);return this.assertLegalChar(m)},M.prototype.xmlStandalone=function(m){return this.options.noValidation?m:m?"yes":"no"},M.prototype.dtdPubID=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdSysID=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdElementValue=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdAttType=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdAttDefault=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdEntityValue=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdNData=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.convertAttKey="@",M.prototype.convertPIKey="?",M.prototype.convertTextKey="#text",M.prototype.convertCDataKey="#cdata",M.prototype.convertCommentKey="#comment",M.prototype.convertRawKey="#raw",M.prototype.assertLegalChar=function(m){var y,T;if(this.options.noValidation)return m;if(y="",this.options.version==="1.0"){if(y=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,T=m.match(y))throw new Error("Invalid character in string: "+m+" at index "+T.index)}else if(this.options.version==="1.1"&&(y=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,T=m.match(y)))throw new Error("Invalid character in string: "+m+" at index "+T.index);return m},M.prototype.assertLegalName=function(m){var y;if(this.options.noValidation)return m;if(this.assertLegalChar(m),y=/^([: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])*$/,!m.match(y))throw new Error("Invalid character in name");return m},M.prototype.textEscape=function(m){var y;return this.options.noValidation?m:(y=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,m.replace(y,"&").replace(//g,">").replace(/\r/g," "))},M.prototype.attEscape=function(m){var y;return this.options.noValidation?m:(y=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,m.replace(y,"&").replace(/0)?new Array(f).join(S.indent):""},l.prototype.endline=function(t,S,x){return!S.pretty||S.suppressPrettyCount?"":S.newline},l.prototype.attribute=function(t,S,x){var f;return this.openAttribute(t,S,x),f=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,S,x),f},l.prototype.cdata=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.comment=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.declaration=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+"",f+=this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.docType=function(t,S,x){var f,R,C,v,_;if(x||(x=0),this.openNode(t,S,x),S.state=g.OpenTag,v=this.indent(t,S,x),v+="0){for(v+=" [",v+=this.endline(t,S,x),S.state=g.InsideTag,_=t.children,R=0,C=_.length;R",v+=this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),v},l.prototype.element=function(t,S,x){var f,R,C,v,_,E,w,k,I,L,V,W,H,G;x||(x=0),L=!1,V="",this.openNode(t,S,x),S.state=g.OpenTag,V+=this.indent(t,S,x)+"<"+t.name,W=t.attribs;for(I in W){if(!s.call(W,I))continue;f=W[I],V+=this.attribute(f,S,x)}if(C=t.children.length,v=C===0?null:t.children[0],C===0||t.children.every(function(B){return(B.type===N.Text||B.type===N.Raw)&&B.value===""}))S.allowEmpty?(V+=">",S.state=g.CloseTag,V+=""+this.endline(t,S,x)):(S.state=g.CloseTag,V+=S.spaceBeforeSlash+"/>"+this.endline(t,S,x));else if(S.pretty&&C===1&&(v.type===N.Text||v.type===N.Raw)&&v.value!=null)V+=">",S.state=g.InsideTag,S.suppressPrettyCount++,L=!0,V+=this.writeChildNode(v,S,x+1),S.suppressPrettyCount--,L=!1,S.state=g.CloseTag,V+=""+this.endline(t,S,x);else{if(S.dontPrettyTextNodes){for(H=t.children,_=0,w=H.length;_"+this.endline(t,S,x),S.state=g.InsideTag,G=t.children,E=0,k=G.length;E",L&&S.suppressPrettyCount--,V+=this.endline(t,S,x),S.state=g.None}return this.closeNode(t,S,x),V},l.prototype.writeChildNode=function(t,S,x){switch(t.type){case N.CData:return this.cdata(t,S,x);case N.Comment:return this.comment(t,S,x);case N.Element:return this.element(t,S,x);case N.Raw:return this.raw(t,S,x);case N.Text:return this.text(t,S,x);case N.ProcessingInstruction:return this.processingInstruction(t,S,x);case N.Dummy:return"";case N.Declaration:return this.declaration(t,S,x);case N.DocType:return this.docType(t,S,x);case N.AttributeDeclaration:return this.dtdAttList(t,S,x);case N.ElementDeclaration:return this.dtdElement(t,S,x);case N.EntityDeclaration:return this.dtdEntity(t,S,x);case N.NotationDeclaration:return this.dtdNotation(t,S,x);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},l.prototype.processingInstruction=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+"",f+=this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.raw=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x),S.state=g.InsideTag,f+=t.value,S.state=g.CloseTag,f+=this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.text=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x),S.state=g.InsideTag,f+=t.value,S.state=g.CloseTag,f+=this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.dtdAttList=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.dtdElement=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.dtdEntity=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.dtdNotation=function(t,S,x){var f;return this.openNode(t,S,x),S.state=g.OpenTag,f=this.indent(t,S,x)+""+this.endline(t,S,x),S.state=g.None,this.closeNode(t,S,x),f},l.prototype.openNode=function(t,S,x){},l.prototype.closeNode=function(t,S,x){},l.prototype.openAttribute=function(t,S,x){},l.prototype.closeAttribute=function(t,S,x){},l}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(F,q,j){"use strict";(function(){var N,g,O,M,m,y,T,b,p,d;d=F("./Utility"),b=d.assign,p=d.isFunction,O=F("./XMLDOMImplementation"),M=F("./XMLDocument"),m=F("./XMLDocumentCB"),T=F("./XMLStringWriter"),y=F("./XMLStreamWriter"),N=F("./NodeType"),g=F("./WriterState"),q.exports.create=function(n,c,r,a){var o,u;if(n==null)throw new Error("Root element needs a name.");return a=b({},c,r,a),o=new M(a),u=o.element(n),a.headless||(o.declaration(a),(a.pubID!=null||a.sysID!=null)&&o.dtd(a)),u},q.exports.begin=function(n,c,r){var a;return p(n)&&(a=[n,c],c=a[0],r=a[1],n={}),c?new m(n,c,r):new M(n)},q.exports.stringWriter=function(n){return new T(n)},q.exports.streamWriter=function(n,c){return new y(n,c)},q.exports.implementation=new O,q.exports.nodeType=N,q.exports.writerState=g}).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=g;var N=Object.prototype.hasOwnProperty;function g(){for(var O={},M=0;Mm?n=d(n):n.length>5]|=128<>>9<<4)+14]=c;for(var r=1732584193,a=-271733879,o=-1732584194,u=271733878,h=0;h>16)+(c>>16)+(r>>16);return a<<16|r&65535}function d(n,c){return n<>>32-c}q.exports=function(c){return N.hash(c,O,16)}},{"./helpers":285}],287:[function(F,q,j){"use strict";var N=F("./helpers");function g(T,b){T[b>>5]|=128<<24-b%32,T[(b+64>>9<<4)+15]=b;for(var p=Array(80),d=1732584193,n=-271733879,c=-1732584194,r=271733878,a=-1009589776,o=0;o>16)+(b>>16)+(p>>16);return d<<16|p&65535}function y(T,b){return T<>>32-b}q.exports=function(b){return N.hash(b,g,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 g=F("babel-runtime/helpers/typeof"),O=M(g);function M(d){return d&&d.__esModule?d:{default:d}}var m=F("stream"),y=m.Stream,T=F("../lib/common/utils/isArray"),b=T.isArray;q.exports.string=function(n){return typeof n=="string"},q.exports.array=b,q.exports.buffer=N.isBuffer;function p(d){return d instanceof y}q.exports.writableStream=function(n){return p(n)&&typeof n._write=="function"&&(0,O.default)(n._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(g){return N}},j.escape=F("escape-html"),j.timestamp=function(g){if(g){var O=g;return typeof O=="string"&&(O=Number(O)),String(g).length===10&&(O*=1e3),new Date(O)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(F,q,j){(function(N,g){"use strict";var O=F("babel-runtime/core-js/json/stringify"),M=T(O),m=F("babel-runtime/helpers/typeof"),y=T(m);function T(S){return S&&S.__esModule?S:{default:S}}var b=F("util"),p=F("url"),d=F("http"),n=F("https"),c=F("debug")("urllib"),r=F("humanize-ms"),a,o=0,u=Math.pow(2,31)-10,h=/^https?:\/\//i;function s(S,x){return S===void 0?x:S}function l(S,x){return function(f,R,C){if(f)return x(f);S({data:R,status:C.statusCode,headers:C.headers,res:C})}}j.TIMEOUTS=[r("300s"),r("300s")];var t=["json","text"];j.request=function(x,f,R){return arguments.length===2&&typeof f=="function"&&(R=f,f=null),typeof R=="function"?j.requestWithCallback(x,f,R):(a||(a=F("any-promise")),new a(function(C,v){j.requestWithCallback(x,f,l(C,v))}))},j.requestWithCallback=function(x,f,R){if(!x||typeof x!="string"&&(typeof x=="undefined"?"undefined":(0,y.default)(x))!=="object"){var C=b.format("expect request url to be a string or a http request options, but got %j",x);throw new Error(C)}arguments.length===2&&typeof f=="function"&&(R=f,f=null),f=f||{},o>=u&&(o=0);var v=++o;f.requestUrls=f.requestUrls||[];var _={requestId:v,url:x,args:f,ctx:f.ctx};f.emitter&&f.emitter.emit("request",_),f.timeout=f.timeout||j.TIMEOUTS,f.maxRedirects=f.maxRedirects||10,f.streaming=f.streaming||f.customResponse;var E=Date.now(),w;typeof x=="string"?(h.test(x)||(x="http://"+x),w=p.parse(x)):w=x;var k=(f.type||f.method||w.method||"GET").toUpperCase(),I=w.port||80,L=d,V=s(f.agent,j.agent),W=f.fixJSONCtlChars;w.protocol==="https:"&&(L=n,V=s(f.httpsAgent,j.httpsAgent),w.port||(I=443));var H={host:w.hostname||w.host||"localhost",path:w.path||"/",method:k,port:I,agent:V,headers:f.headers||{},lookup:f.lookup};Array.isArray(f.timeout)?H.requestTimeout=f.timeout[f.timeout.length-1]:typeof f.timeout!="undefined"&&(H.requestTimeout=f.timeout);for(var G=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",v,x,Ue),f.headers=f.headers||{},f.headers.Authorization=digestAuthHeader(H.method,H.path,Ue,f.digestAuth),c("Request#%d %s: auth with digest header: %s",v,x,f.headers.Authorization),ct.headers["set-cookie"]&&(f.headers.Cookie=ct.headers["set-cookie"].join(";")),j.requestWithCallback(x,f,$e)}var Le=Date.now()-E;ie&&(ie.contentDownload=Le),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Le,re,fe,H.method,H.host,H.path,ae,ie);var Me={status:fe,statusCode:fe,headers:st,size:re,aborted:te,rt:Le,keepAliveSocket:ae,data:at,requestUrls:f.requestUrls,timing:ie,remoteAddress:ne,remotePort:Te};if(Ie){var Ee="";V&&typeof V.getCurrentStatus=="function"&&(Ee=", agent status: "+(0,M.default)(V.getCurrentStatus())),Ie.message+=", "+H.method+" "+x+" "+fe+" (connected: "+ce+", keepalive socket: "+ae+Ee+`) headers: `+(0,M.default)(st),Ie.data=at,Ie.path=H.path,Ie.status=fe,Ie.headers=st,Ie.res=Me}$e(Ie,at,f.streaming?ct:Me),f.emitter&&(_.url=x,_.socket=ft&&ft.connection,_.options=H,_.size=Se,f.emitter.emit("response",{requestId:v,error:Ie,ctx:f.ctx,req:_,res:Me}))}function _e(Ie){var at=null;if(f.followRedirect&&statuses.redirect[Ie.statusCode]){f._followRedirectCount=(f._followRedirectCount||0)+1;var ct=Ie.headers.location;if(!ct)at=new Error("Got statusCode "+Ie.statusCode+" but cannot resolve next location from headers"),at.name="FollowRedirectError";else if(f._followRedirectCount>f.maxRedirects)at=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+x),at.name="MaxRedirectError";else{var $e=f.formatRedirectUrl?f.formatRedirectUrl(x,ct):p.resolve(x,ct);c("Request#%d %s: `redirected` from %s to %s",v,H.path,x,$e),X(),f.headers&&f.headers.Host&&h.test(ct)&&(f.headers.Host=null);var st=R;return R=null,j.requestWithCallback($e,f,st),{redirect:!0,error:null}}}return{redirect:!1,error:at}}!H.headers["User-Agent"]&&!H.headers["user-agent"]&&(H.headers["User-Agent"]=navigator.userAgent),f.gzip&&(!H.headers["Accept-Encoding"]&&!H.headers["accept-encoding"]&&(H.headers["Accept-Encoding"]="gzip"));function ve(Ie,at,ct){var $e=Ie.headers["content-encoding"];return ct(null,at,$e)}var Re=f.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",v,k,x,H.headers,H.path),f.requestUrls.push(x);function Je(Ie){if(ie&&(ie.waiting=Date.now()-E),c("Request#%d %s `req response` event emit: status %d, headers: %j",v,x,Ie.statusCode,Ie.headers),f.streaming){var at=_e(Ie);if(at.redirect){Ie.resume();return}return at.error?(Ie.resume(),Q(at.error,null,Ie)):Q(null,null,Ie)}if(Ie.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",v,x,re)}),Ie.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",v,x,re)}),Ie.on("aborted",function(){te=!0,c("Request#%d %s: `res aborted` event emit, total size %d",v,x,re)}),Re){var at=_e(Ie);if(at.redirect){Ie.resume();return}return at.error?(Ie.resume(),Re.end(),Q(at.error,null,Ie)):(f.consumeWriteStream===!1?Ie.on("end",Q.bind(null,null,null,Ie)):isNode010||isNode012?first([[Re,"close"],[Ie,"aborted"]],function(st,Ue,Le){c("Request#%d %s: writeStream or res %s event emitted",v,x,Le),Q(ye||null,null,Ie)}):Re.on("close",function(){c("Request#%d %s: writeStream close event emitted",v,x),Q(ye||null,null,Ie)}),Ie.pipe(Re))}var ct=[];Ie.on("data",function($e){c("Request#%d %s: `res data` event emit, size %d",v,x,$e.length),re+=$e.length,ct.push($e)}),Ie.on("end",function(){var $e=g.concat(ct,re);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",v,x,re,Ie._dumped),ye)return Q(ye,$e,Ie);var st=_e(Ie);if(st.error)return Q(st.error,$e,Ie);if(st.redirect)return;ve(Ie,$e,function(Ue,Le,Me){if(Ue)return Q(Ue,$e,Ie);if(!Me&&t.indexOf(f.dataType)>=0){try{Le=decodeBodyByCharset(Le,Ie)}catch(Ce){return c("decodeBodyByCharset error: %s",Ce),Q(null,Le,Ie)}if(f.dataType==="json")if(re===0)Le=null;else{var Ee=parseJSON(Le,W);Ee.error?Ue=Ee.error:Le=Ee.data}}te&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",v,x),Q(Ue,Le,Ie)})})}var qe,rt;Array.isArray(f.timeout)?(qe=r(f.timeout[0]),rt=r(f.timeout[1])):qe=rt=r(f.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",qe,rt);function ut(){c("Connect timer ticking, timeout: %d",qe),pe=setTimeout(function(){pe=null,fe===-1&&(fe=-2);var Ie="Connect timeout for "+qe+"ms",at="ConnectionTimeoutError";ft.socket||(at="SocketAssignTimeoutError",Ie+=", working sockets is full"),ye=new Error(Ie),ye.name=at,ye.requestId=v,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",v,x,ye.name,Ie,ce),Be()},qe)}function dt(){c("Response timer ticking, timeout: %d",rt),Oe=setTimeout(function(){Oe=null;var Ie="Response timeout for "+rt+"ms",at="ResponseTimeoutError";ye=new Error(Ie),ye.name=at,ye.requestId=v,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",v,x,ye.name,Ie,ce),Be()},rt)}var ft;H.mode=f.mode?f.mode:"";try{ft=L.request(H,Je)}catch(Ie){return Q(Ie)}typeof window=="undefined"?ut():ft.on("requestTimeout",function(){fe===-1&&(fe=-2);var Ie="Connect timeout for "+qe+"ms",at="ConnectionTimeoutError";ye=new Error(Ie),ye.name=at,ye.requestId=v,Be()});function Be(){c("Request#%d %s abort, connected: %s",v,x,ce),ft.socket||(ye.noSocket=!0,Q(ye)),ft.abort()}return ie&&ft.on("finish",function(){ie.requestSent=Date.now()-E}),ft.once("socket",function(Ie){ie&&(ie.queuing=Date.now()-E),isNode010&&Ie.socket&&(Ie=Ie.socket);var at=Ie.readyState;if(at==="opening"){Ie.once("lookup",function(ct,$e,st){c("Request#%d %s lookup: %s, %s, %s",v,x,ct,$e,st),ie&&(ie.dnslookup=Date.now()-E),$e&&(ne=$e)}),Ie.once("connect",function(){ie&&(ie.connected=Date.now()-E),Z(),dt(),c("Request#%d %s new socket connected",v,x),ce=!0,ne||(ne=Ie.remoteAddress),Te=Ie.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",v,x,at),ce=!0,ae=!0,ne||(ne=Ie.remoteAddress),Te=Ie.remotePort,Z(),dt()}),ft.on("error",function(Ie){(Ie.name==="Error"||Ie.name==="TypeError")&&(Ie.name=ce?"ResponseError":"RequestError"),Ie.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",v,x,Ie.name,Ie.message),Q(ye||Ie)}),Re&&Re.once("error",function(Ie){Ie.message+=' (writeStream "error")',ye=Ie,c("Request#%d %s `writeStream error` event emit, %s: %s",v,x,Ie.name,Ie.message),Be()}),f.stream?(f.stream.pipe(ft),f.stream.once("error",function(Ie){Ie.message+=' (stream "error")',ye=Ie,c("Request#%d %s `readStream error` event emit, %s: %s",v,x,Ie.name,Ie.message),Be()})):ft.end(J),ft.requestId=v,ft}}).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("q1tI"),g=j("biw7"),O=j("fyJ8");function M(p){var d=p.className,n=p.index,c=p.children,r=p.colSpan,a=p.rowSpan,o=N.useContext(g.a),u=o.prefixCls,h=o.fixedInfoList,s=h[n];return N.createElement(O.a,Object.assign({className:d,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:r,rowSpan:a}}}},s))}function m(p){return N.createElement("tr",Object.assign({},p))}function y(p){var d=p.children,n=N.useContext(g.a),c=n.prefixCls;return N.createElement("tfoot",{className:"".concat(c,"-summary")},d)}var T=q.b=y,b={Cell:M,Row:m}},oRuE:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.Iso10126={pad:function(g,O){var M=O*4,m=M-g.sigBytes%M;g.concat(N.lib.WordArray.random(m-1)).concat(N.lib.WordArray.create([m<<24],1))},unpad:function(g){var O=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=O}},N.pad.Iso10126})},osHv:function(F,q,j){(function(N){N(j("VrN/"))})(function(N){"use strict";var g=N.Pos;function O(h,s){return h.line-s.line||h.ch-s.ch}var M="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",m=M+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",y=new RegExp("<(/?)(["+M+"]["+m+"]*)","g");function T(h,s,l,t){this.line=s,this.ch=l,this.cm=h,this.text=h.getLine(s),this.min=t?Math.max(t.from,h.firstLine()):h.firstLine(),this.max=t?Math.min(t.to-1,h.lastLine()):h.lastLine()}function b(h,s){var l=h.cm.getTokenTypeAt(g(h.line,s));return l&&/\btag\b/.test(l)}function p(h){return h.line>=h.max?void 0:(h.ch=0,h.text=h.cm.getLine(++h.line),!0)}function d(h){return h.line<=h.min?void 0:(h.text=h.cm.getLine(--h.line),h.ch=h.text.length,!0)}function n(h){for(;;){var s=h.text.indexOf(">",h.ch);if(s==-1){if(p(h))continue;return}if(!b(h,s+1)){h.ch=s+1;continue}var l=h.text.lastIndexOf("/",s),t=l>-1&&!/\S/.test(h.text.slice(l+1,s));return h.ch=s+1,t?"selfClose":"regular"}}function c(h){for(;;){var s=h.ch?h.text.lastIndexOf("<",h.ch-1):-1;if(s==-1){if(d(h))continue;return}if(!b(h,s+1)){h.ch=s;continue}y.lastIndex=s,h.ch=s;var l=y.exec(h.text);if(l&&l.index==s)return l}}function r(h){for(;;){y.lastIndex=h.ch;var s=y.exec(h.text);if(!s){if(p(h))continue;return}if(!b(h,s.index+1)){h.ch=s.index+1;continue}return h.ch=s.index+s[0].length,s}}function a(h){for(;;){var s=h.ch?h.text.lastIndexOf(">",h.ch-1):-1;if(s==-1){if(d(h))continue;return}if(!b(h,s+1)){h.ch=s;continue}var l=h.text.lastIndexOf("/",s),t=l>-1&&!/\S/.test(h.text.slice(l+1,s));return h.ch=s+1,t?"selfClose":"regular"}}function o(h,s){for(var l=[];;){var t=r(h),S,x=h.line,f=h.ch-(t?t[0].length:0);if(!t||!(S=n(h)))return;if(S=="selfClose")continue;if(t[1]){for(var R=l.length-1;R>=0;--R)if(l[R]==t[2]){l.length=R;break}if(R<0&&(!s||s==t[2]))return{tag:t[2],from:g(x,f),to:g(h.line,h.ch)}}else l.push(t[2])}}function u(h,s){for(var l=[];;){var t=a(h);if(!t)return;if(t=="selfClose"){c(h);continue}var S=h.line,x=h.ch,f=c(h);if(!f)return;if(f[1])l.push(f[2]);else{for(var R=l.length-1;R>=0;--R)if(l[R]==f[2]){l.length=R;break}if(R<0&&(!s||s==f[2]))return{tag:f[2],from:g(h.line,h.ch),to:g(S,x)}}}}N.registerHelper("fold","xml",function(h,s){for(var l=new T(h,s.line,0);;){var t=r(l);if(!t||l.line!=s.line)return;var S=n(l);if(!S)return;if(!t[1]&&S!="selfClose"){var x=g(l.line,l.ch),f=o(l,t[2]);return f&&O(f.from,x)>0?{from:x,to:f.from}:null}}}),N.findMatchingTag=function(h,s,l){var t=new T(h,s.line,s.ch,l);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var S=n(t),x=S&&g(t.line,t.ch),f=S&&c(t);if(!S||!f||O(t,s)>0)return;var R={from:g(t.line,t.ch),to:x,tag:f[2]};return S=="selfClose"?{open:R,close:null,at:"open"}:f[1]?{open:u(t,f[2]),close:R,at:"close"}:(t=new T(h,x.line,x.ch,l),{open:R,close:o(t,f[2]),at:"open"})},N.findEnclosingTag=function(h,s,l,t){for(var S=new T(h,s.line,s.ch,l);;){var x=u(S,t);if(!x)break;var f=new T(h,s.line,s.ch,l),R=o(f,x.tag);if(R)return{open:x,close:R}}},N.scanForClosingTag=function(h,s,l,t){var S=new T(h,s.line,s.ch,t?{from:0,to:t}:null);return o(S,l)}})},p5ED:function(F,q,j){"use strict";var N=j("+L6B"),g=j("2/Rp"),O=j("5Dmo"),M=j("3S7+"),m=j("k1fw"),y=j("tJVT"),T=j("q1tI"),b=j.n(T),p=j("vHTk"),d=j.n(p),n=j("yEEn"),c=j("ZW9T"),r=j("1vsH");q.a=function(a){var o=a.name,u=a.data,h=a.theme,s=a.type,l=a.filename,t=a.monacoEditor,S=a.className,x=a.style,f=a.close,R=a.onClose,C=a.hasMask,v=Object(T.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),_=Object(y.a)(v,2),E=_[0],w=_[1],k=Object(T.useState)(""),I=Object(y.a)(k,2),L=I[0],V=I[1],W,H=1024*1024,G=10*H,B=Object(T.useRef)();s==="office"&&(W=Object(r.T)(u).filesize,W>G&&(s="other")),l&&(t.filename=l),Object(T.useEffect)(function(){var J,ue,de=(J=document.cookie)===null||J===void 0||((ue=J.replace(/\s/g,""))===null||ue===void 0)?void 0:ue.split(";");de==null||de.map(function(Se){var Ae=Se.split("=");Ae[0]==="_educoder_session"&&V(Ae[1])})},[]);var P=function(){if(u.startsWith("http")||u.startsWith("/")){z();return}Object(r.z)(l||"educoder",u,l)},z=function(){Object(r.x)(l||o,u)};return console.log("data:",u,"fileanme:",l," name:",o),b.a.createElement("div",{style:Object(m.a)({},x||{}),className:"".concat(C&&d.a.bgBlack," ").concat(s?d.a.wrp:"hide")},f&&b.a.createElement("div",{className:d.a.close,ref:B},b.a.createElement(M.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return B.current}},b.a.createElement("span",{onClick:z},b.a.createElement("i",{className:"icon-quxiaozhiding"}))),b.a.createElement(M.a,{title:"\u5173\u95ED",getPopupContainer:function(){return B.current}},b.a.createElement("span",{className:"",onClick:R},b.a.createElement("i",{className:"icon-guanbi1"})))),b.a.createElement("div",{className:"".concat(d.a[S]," ").concat(S," ").concat(d.a.monaco," ").concat(s==="txt"?"show":"hide")},s==="txt"&&b.a.createElement(c.b,t)),s==="audio"&&b.a.createElement("audio",{src:"".concat(u!=null&&u.startsWith("/")||(u==null?void 0:u.indexOf("https://"))>-1?u:"data:audio/mp3;base64,").concat(u),autoPlay:!0}),s==="video"&&b.a.createElement(b.a.Fragment,null,u!=null&&u.startsWith("/")?b.a.createElement("video",{controls:!0,src:"".concat(u),autoPlay:!0}):b.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(u),autoPlay:!0})),s==="html"&&b.a.createElement("iframe",{src:u+"&disposition=inline"}),s==="pdf"&&b.a.createElement("embed",{className:d.a.embed,src:u}),s==="image"&&b.a.createElement(b.a.Fragment,null,b.a.createElement("img",{src:"".concat(u!=null&&u.startsWith("/")||(u==null?void 0:u.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(u)})),s==="other"&&b.a.createElement("div",null,b.a.createElement(g.a,{type:"primary",size:"large",onClick:P},b.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(s==="download"||s==="office")&&b.a.createElement(g.a,{type:"primary",size:"large",onClick:P},b.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(F,q,j){},pA7S:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=O.BlockCipher,y=g.algo,T=[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}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=y.DES=m.extend({_doReset:function(){for(var u=this._key,h=u.words,s=[],l=0;l<56;l++){var t=T[l]-1;s[l]=h[t>>>5]>>>31-t%32&1}for(var S=this._subKeys=[],x=0;x<16;x++){for(var f=S[x]=[],R=p[x],l=0;l<24;l++)f[l/6|0]|=s[(b[l]-1+R)%28]<<31-l%6,f[4+(l/6|0)]|=s[28+(b[l+24]-1+R)%28]<<31-l%6;f[0]=f[0]<<1|f[0]>>>31;for(var l=1;l<7;l++)f[l]=f[l]>>>(l-1)*4+3;f[7]=f[7]<<5|f[7]>>>27}for(var C=this._invSubKeys=[],l=0;l<16;l++)C[l]=S[15-l]},encryptBlock:function(u,h){this._doCryptBlock(u,h,this._subKeys)},decryptBlock:function(u,h){this._doCryptBlock(u,h,this._invSubKeys)},_doCryptBlock:function(u,h,s){this._lBlock=u[h],this._rBlock=u[h+1],r.call(this,4,252645135),r.call(this,16,65535),a.call(this,2,858993459),a.call(this,8,16711935),r.call(this,1,1431655765);for(var l=0;l<16;l++){for(var t=s[l],S=this._lBlock,x=this._rBlock,f=0,R=0;R<8;R++)f|=d[R][((x^t[R])&n[R])>>>0];this._lBlock=x,this._rBlock=S^f}var C=this._lBlock;this._lBlock=this._rBlock,this._rBlock=C,r.call(this,1,1431655765),a.call(this,8,16711935),a.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),u[h]=this._lBlock,u[h+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function r(u,h){var s=(this._lBlock>>>u^this._rBlock)&h;this._rBlock^=s,this._lBlock^=s<>>u^this._lBlock)&h;this._lBlock^=s,this._rBlock^=s<192.");var s=h.slice(0,2),l=h.length<4?h.slice(0,2):h.slice(2,4),t=h.length<6?h.slice(0,2):h.slice(4,6);this._des1=c.createEncryptor(M.create(s)),this._des2=c.createEncryptor(M.create(l)),this._des3=c.createEncryptor(M.create(t))},encryptBlock:function(u,h){this._des1.encryptBlock(u,h),this._des2.decryptBlock(u,h),this._des3.encryptBlock(u,h)},decryptBlock:function(u,h){this._des3.decryptBlock(u,h),this._des2.encryptBlock(u,h),this._des1.decryptBlock(u,h)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=m._createHelper(o)}(),N.TripleDES})},pIsd:function(F,q,j){var N=j("BJfS"),g=function(m){var y=/[height|width]$/;return y.test(m)},O=function(m){var y="",T=Object.keys(m);return T.forEach(function(b,p){var d=m[b];b=N(b),g(b)&&typeof d=="number"&&(d=d+"px"),d===!0?y+=b:d===!1?y+="not "+b:y+="("+b+": "+d+")",p=0;u--)if(this.__items[u].match(o))return!0;return!1},c.prototype.set_indent=function(o,u){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},c.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)},c.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},c.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},c.prototype.is_empty=function(){return this.__items.length===0},c.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},c.prototype.push=function(o){this.__items.push(o);var u=o.lastIndexOf(` `);u!==-1?this.__character_count=o.length-u:this.__character_count+=o.length},c.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},c.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},c.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},c.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},c.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,u){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)),u=u||"",o.indent_level>0&&(u=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}r.prototype.get_indent_size=function(o,u){var h=this.__base_string_length;return u=u||0,o<0&&(h=0),h+=o*this.__indent_size,h+=u,h},r.prototype.get_indent_string=function(o,u){var h=this.__base_string;return u=u||0,o<0&&(o=0,h=""),u+=o*this.__indent_size,this.__ensure_cache(u),h+=this.__cache[u],h},r.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var o=this.__cache.length,u=0,h="";this.__indent_size&&o>=this.__indent_size&&(u=Math.floor(o/this.__indent_size),o-=u*this.__indent_size,h=new Array(u+1).join(this.__indent_string)),o&&(h+=new Array(o+1).join(" ")),this.__cache.push(h)};function a(o,u){this.__indent_cache=new r(o,u),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 c(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(o,u){return this.__indent_cache.get_indent_string(o,u)},a.prototype.get_indent_size=function(o,u){return this.__indent_cache.get_indent_size(o,u)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(o){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===` `&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(` `);return o!==` `&&(h=h.replace(/[\n]/g,o)),h},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(o,u){return o=o||0,u=u||0,this.next_line.set_indent(o,u),this.__lines.length>1?(this.current_line.set_indent(o,u),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(o){for(var u=0;u1&&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},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(o,u){for(var h=this.__lines.length-2;h>=0;){var s=this.__lines[h];if(s.is_empty())break;if(s.item(0).indexOf(o)!==0&&s.item(-1)!==u){this.__lines.splice(h+1,0,new c(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},n.exports.Output=a},function(n){function c(r,a,o,u){this.type=r,this.text=a,this.comments_before=null,this.newlines=o||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=c},,,function(n){function c(o,u){this.raw_options=r(o,u),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"])}c.prototype._get_array=function(o,u){var h=this.raw_options[o],s=u||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(s=h.concat()):typeof h=="string"&&(s=h.split(/[^a-zA-Z0-9_\/\-]+/)),s},c.prototype._get_boolean=function(o,u){var h=this.raw_options[o],s=h===void 0?!!u:!!h;return s},c.prototype._get_characters=function(o,u){var h=this.raw_options[o],s=u||"";return typeof h=="string"&&(s=h.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),s},c.prototype._get_number=function(o,u){var h=this.raw_options[o];u=parseInt(u,10),isNaN(u)&&(u=0);var s=parseInt(h,10);return isNaN(s)&&(s=u),s},c.prototype._get_selection=function(o,u,h){var s=this._get_selection_list(o,u,h);if(s.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values: `+u+` You passed in: '`+this.raw_options[o]+"'");return s[0]},c.prototype._get_selection_list=function(o,u,h){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[u[0]],!this._is_valid_selection(h,u))throw new Error("Invalid Default Value!");var s=this._get_array(o,h);if(!this._is_valid_selection(s,u))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values: `+u+` You passed in: '`+this.raw_options[o]+"'");return s},c.prototype._is_valid_selection=function(o,u){return o.length&&u.length&&!o.some(function(h){return u.indexOf(h)===-1})};function r(o,u){var h={};o=a(o);var s;for(s in o)s!==u&&(h[s]=o[s]);if(u&&o[u])for(s in o[u])h[s]=o[u][s];return h}function a(o){var u={},h;for(h in o){var s=h.replace(/-/g,"_");u[s]=o[h]}return u}n.exports.Options=c,n.exports.normalizeOpts=a,n.exports.mergeOpts=r},,function(n){var c=RegExp.prototype.hasOwnProperty("sticky");function r(a){this.__input=a||"",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&&a=0&&o=a.length&&this.__input.substring(o-a.length,o).toLowerCase()===a},n.exports.InputScanner=r},function(n,c,r){var a=r(8).InputScanner,o=r(3).Token,u=r(10).TokenStream,h=r(11).WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(t,S){this._input=new a(t),this._options=S||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new h(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var t,S=new o(s.START,""),x=null,f=[],R=new u;S.type!==s.EOF;){for(t=this._get_next_token(S,x);this._is_comment(t);)R.add(t),t=this._get_next_token(S,x);R.isEmpty()||(t.comments_before=R,R=new u),t.parent=x,this._is_opening(t)?(f.push(x),x=t):x&&this._is_closing(t,x)&&(t.opened=x,x.closed=t,x=f.pop(),t.parent=x),t.previous=S,S.next=t,this.__tokens.add(t),S=t}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(t,S){this._readWhitespace();var x=this._input.read(/.+/g);return x?this._create_token(s.RAW,x):this._create_token(s.EOF,"")},l.prototype._is_comment=function(t){return!1},l.prototype._is_opening=function(t){return!1},l.prototype._is_closing=function(t,S){return!1},l.prototype._create_token=function(t,S){var x=new o(t,S,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return x},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=l,n.exports.TOKEN=s},function(n){function c(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}c.prototype.restart=function(){this.__position=0},c.prototype.isEmpty=function(){return this.__tokens_length===0},c.prototype.hasNext=function(){return this.__position=0&&r/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}u.prototype=new a,u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){this.__set_templated_pattern()},u.prototype.disable=function(h){var s=this._create();return s._disabled[h]=!0,s._update(),s},u.prototype.read_options=function(h){var s=this._create();for(var l in o)s._disabled[l]=h.templating.indexOf(l)===-1;return s._update(),s},u.prototype.exclude=function(h){var s=this._create();return s._excluded[h]=!0,s._update(),s},u.prototype.read=function(){var h="";this._match_pattern?h=this._input.read(this._starting_pattern):h=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),h+=s,s=this._read_template();return this._until_after&&(h+=this._input.readUntilAfter(this._until_pattern)),h},u.prototype.__set_templated_pattern=function(){var h=[];this._disabled.php||h.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||h.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||h.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(h.push(this.__patterns.django._starting_pattern.source),h.push(this.__patterns.django_value._starting_pattern.source),h.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||h.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&h.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+h.join("|")+")")},u.prototype._read_template=function(){var h="",s=this._input.peek();if(s==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(h=h||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(h=h||this.__patterns.erb.read())}else s==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(h=h||this.__patterns.handlebars_comment.read(),h=h||this.__patterns.handlebars_unescaped.read(),h=h||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(h=h||this.__patterns.django_value.read()),this._excluded.django||(h=h||this.__patterns.django_comment.read(),h=h||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(h=h||this.__patterns.smarty_comment.read(),h=h||this.__patterns.smarty_literal.read(),h=h||this.__patterns.smarty.read()));return h},n.exports.TemplatablePattern=u},,,,function(n,c,r){var a=r(19).Beautifier,o=r(20).Options;function u(h,s,l,t){var S=new a(h,s,l,t);return S.beautify()}n.exports=u,n.exports.defaultOptions=function(){return new o}},function(n,c,r){var a=r(20).Options,o=r(2).Output,u=r(21).Tokenizer,h=r(21).TOKEN,s=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,t=function(k,I){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=k.max_preserve_newlines,this.preserve_newlines=k.preserve_newlines,this._output=new o(k,I)};t.prototype.current_line_has_match=function(k){return this._output.current_line.has_match(k)},t.prototype.set_space_before_token=function(k,I){this._output.space_before_token=k,this._output.non_breaking_space=I},t.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},t.prototype.add_raw_token=function(k){this._output.add_raw_token(k)},t.prototype.print_preserved_newlines=function(k){var I=0;k.type!==h.TEXT&&k.previous.type!==h.TEXT&&(I=k.newlines?1:0),this.preserve_newlines&&(I=k.newlines0);return I!==0},t.prototype.traverse_whitespace=function(k){return k.whitespace_before||k.newlines?(this.print_preserved_newlines(k)||(this._output.space_before_token=!0),!0):!1},t.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},t.prototype.print_newline=function(k){this._output.add_new_line(k)},t.prototype.print_token=function(k){k.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(k.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(k){return k=this.indent_level+(k||0),k<1?"":this._output.get_indent_string(k)};var S=function(k){for(var I=null,L=k.next;L.type!==h.EOF&&k.closed!==L;){if(L.type===h.ATTRIBUTE&&L.text==="type"){L.next&&L.next.type===h.EQUALS&&L.next.next&&L.next.next.type===h.VALUE&&(I=L.next.next.text);break}L=L.next}return I},x=function(k,I){var L=null,V=null;return I.closed?(k==="script"?L="text/javascript":k==="style"&&(L="text/css"),L=S(I)||L,L.search("text/css")>-1?V="css":L.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?V="javascript":L.search(/(text|application|dojo)\/(x-)?(html)/)>-1?V="html":L.search(/test\/null/)>-1&&(V="null"),V):null};function f(k,I){return I.indexOf(k)!==-1}function R(k,I,L){this.parent=k||null,this.tag=I?I.tag_name:"",this.indent_level=L||0,this.parser_token=I||null}function C(k){this._printer=k,this._current_frame=null}C.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},C.prototype.record_tag=function(k){var I=new R(this._current_frame,k,this._printer.indent_level);this._current_frame=I},C.prototype._try_pop_frame=function(k){var I=null;return k&&(I=k.parser_token,this._printer.indent_level=k.indent_level,this._current_frame=k.parent),I},C.prototype._get_frame=function(k,I){for(var L=this._current_frame;L&&!(k.indexOf(L.tag)!==-1);){if(I&&I.indexOf(L.tag)!==-1){L=null;break}L=L.parent}return L},C.prototype.try_pop=function(k,I){var L=this._get_frame([k],I);return this._try_pop_frame(L)},C.prototype.indent_to_tag=function(k){var I=this._get_frame(k);I&&(this._printer.indent_level=I.indent_level)};function v(k,I,L,V){this._source_text=k||"",I=I||{},this._js_beautify=L,this._css_beautify=V,this._tag_stack=null;var W=new a(I,"html");this._options=W,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"}v.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k=this._source_text,I=this._options.eol;this._options.eol==="auto"&&(I=` `,k&&s.test(k)&&(I=k.match(s)[0])),k=k.replace(l,` `);var L=k.match(/^[\t ]*/)[0],V={text:"",type:""},W=new _,H=new t(this._options,L),G=new u(k,this._options).tokenize();this._tag_stack=new C(H);for(var B=null,P=G.next();P.type!==h.EOF;)P.type===h.TAG_OPEN||P.type===h.COMMENT?(B=this._handle_tag_open(H,P,W,V),W=B):P.type===h.ATTRIBUTE||P.type===h.EQUALS||P.type===h.VALUE||P.type===h.TEXT&&!W.tag_complete?B=this._handle_inside_tag(H,P,W,G):P.type===h.TAG_CLOSE?B=this._handle_tag_close(H,P,W):P.type===h.TEXT?B=this._handle_text(H,P,W):H.add_raw_token(P),V=B,P=G.next();var z=H._output.get_code(I);return z},v.prototype._handle_tag_close=function(k,I,L){var V={text:I.text,type:I.type};return k.alignment_size=0,L.tag_complete=!0,k.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),L.is_unformatted?k.add_raw_token(I):(L.tag_start_char==="<"&&(k.set_space_before_token(I.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&L.has_wrapped_attrs&&k.print_newline(!1)),k.print_token(I)),L.indent_content&&!(L.is_unformatted||L.is_content_unformatted)&&(k.indent(),L.indent_content=!1),!L.is_inline_element&&!(L.is_unformatted||L.is_content_unformatted)&&k.set_wrap_point(),V},v.prototype._handle_inside_tag=function(k,I,L,V){var W=L.has_wrapped_attrs,H={text:I.text,type:I.type};if(k.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),L.is_unformatted)k.add_raw_token(I);else if(L.tag_start_char==="{"&&I.type===h.TEXT)k.print_preserved_newlines(I)?(I.newlines=0,k.add_raw_token(I)):k.print_token(I);else{if(I.type===h.ATTRIBUTE?(k.set_space_before_token(!0),L.attr_count+=1):(I.type===h.EQUALS||I.type===h.VALUE&&I.previous.type===h.EQUALS)&&k.set_space_before_token(!1),I.type===h.ATTRIBUTE&&L.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(k.traverse_whitespace(I),W=W||I.newlines!==0),this._is_wrap_attributes_force)){var G=L.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&L.attr_count===1){var B=!0,P=0,z;do{if(z=V.peek(P),z.type===h.ATTRIBUTE){B=!1;break}P+=1}while(P<4&&z.type!==h.EOF&&z.type!==h.TAG_CLOSE);G=!B}G&&(k.print_newline(!1),W=!0)}k.print_token(I),W=W||k.previous_token_wrapped(),L.has_wrapped_attrs=W}return H},v.prototype._handle_text=function(k,I,L){var V={text:I.text,type:"TK_CONTENT"};return L.custom_beautifier_name?this._print_custom_beatifier_text(k,I,L):L.is_unformatted||L.is_content_unformatted?k.add_raw_token(I):(k.traverse_whitespace(I),k.print_token(I)),V},v.prototype._print_custom_beatifier_text=function(k,I,L){var V=this;if(I.text!==""){var W=I.text,H,G=1,B="",P="";L.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?H=this._js_beautify:L.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?H=this._css_beautify:L.custom_beautifier_name==="html"&&(H=function(Ae,pe){var Oe=new v(Ae,pe,V._js_beautify,V._css_beautify);return Oe.beautify()}),this._options.indent_scripts==="keep"?G=0:this._options.indent_scripts==="separate"&&(G=-k.indent_level);var z=k.get_full_indent(G);if(W=W.replace(/\n[ \t]*$/,""),L.custom_beautifier_name!=="html"&&W[0]==="<"&&W.match(/^(|]]>)$/.exec(W);if(!J){k.add_raw_token(I);return}B=z+J[1]+` `,W=J[4],J[5]&&(P=z+J[5]),W=W.replace(/\n[ \t]*$/,""),(J[2]||J[3].indexOf(` `)!==-1)&&(J=J[3].match(/[ \t]+$/),J&&(I.whitespace_before=J[0]))}if(W)if(H){var ue=function(){this.eol=` `};ue.prototype=this._options.raw_options;var de=new ue;W=H(z+W,de)}else{var Se=I.whitespace_before;Se&&(W=W.replace(new RegExp(` (`+Se+")?","g"),` `)),W=z+W.replace(/\n/g,` `+z)}B&&(W?W=B+W+` `+P:W=B+P),k.print_newline(!1),W&&(I.text=W,I.whitespace_before="",I.newlines=0,k.add_raw_token(I),k.print_newline(!0))}},v.prototype._handle_tag_open=function(k,I,L,V){var W=this._get_tag_open_token(I);return(L.is_unformatted||L.is_content_unformatted)&&!L.is_empty_element&&I.type===h.TAG_OPEN&&I.text.indexOf("]*)/),this.tag_check=L?L[1]:""):(L=I.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=L?L[1]:"",(I.text.startsWith("{{#>")||I.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&I.next!==null?this.tag_check=I.next.text.split(" ")[0]:this.tag_check=I.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),I.type===h.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||I.closed&&I.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)))}};v.prototype._get_tag_open_token=function(k){var I=new _(this._tag_stack.get_parser_token(),k);return I.alignment_size=this._options.wrap_attributes_indent_size,I.is_end_tag=I.is_end_tag||f(I.tag_check,this._options.void_elements),I.is_empty_element=I.tag_complete||I.is_start_tag&&I.is_end_tag,I.is_unformatted=!I.tag_complete&&f(I.tag_check,this._options.unformatted),I.is_content_unformatted=!I.is_empty_element&&f(I.tag_check,this._options.content_unformatted),I.is_inline_element=f(I.tag_name,this._options.inline)||I.tag_name.includes("-")||I.tag_start_char==="{",I},v.prototype._set_tag_position=function(k,I,L,V,W){if(L.is_empty_element||(L.is_end_tag?L.start_tag_token=this._tag_stack.try_pop(L.tag_name):(this._do_optional_end_element(L)&&(L.is_inline_element||k.print_newline(!1)),this._tag_stack.record_tag(L),(L.tag_name==="script"||L.tag_name==="style")&&!(L.is_unformatted||L.is_content_unformatted)&&(L.custom_beautifier_name=x(L.tag_check,I)))),f(L.tag_check,this._options.extra_liners)&&(k.print_newline(!1),k._output.just_added_blankline()||k.print_newline(!0)),L.is_empty_element){if(L.tag_start_char==="{"&&L.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),L.indent_content=!0;var H=k.current_line_has_match(/{{#if/);H||k.print_newline(!1)}L.tag_name==="!--"&&W.type===h.TAG_CLOSE&&V.is_end_tag&&L.text.indexOf(` `)===-1||(L.is_inline_element||L.is_unformatted||k.print_newline(!1),this._calcluate_parent_multiline(k,L))}else if(L.is_end_tag){var G=!1;G=L.start_tag_token&&L.start_tag_token.multiline_content,G=G||!L.is_inline_element&&!(V.is_inline_element||V.is_unformatted)&&!(W.type===h.TAG_CLOSE&&L.start_tag_token===V)&&W.type!=="TK_CONTENT",(L.is_content_unformatted||L.is_unformatted)&&(G=!1),G&&k.print_newline(!1)}else L.indent_content=!L.custom_beautifier_name,L.tag_start_char==="<"&&(L.tag_name==="html"?L.indent_content=this._options.indent_inner_html:L.tag_name==="head"?L.indent_content=this._options.indent_head_inner_html:L.tag_name==="body"&&(L.indent_content=this._options.indent_body_inner_html)),!(L.is_inline_element||L.is_unformatted)&&(W.type!=="TK_CONTENT"||L.is_content_unformatted)&&k.print_newline(!1),this._calcluate_parent_multiline(k,L)},v.prototype._calcluate_parent_multiline=function(k,I){I.parent&&k._output.just_added_newline()&&!((I.is_inline_element||I.is_unformatted)&&I.parent.is_inline_element)&&(I.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"],w=["a","audio","del","ins","map","noscript","video"];v.prototype._do_optional_end_element=function(k){var I=null;if(k.is_empty_element||!k.is_start_tag||!k.parent)return;if(k.tag_name==="body")I=I||this._tag_stack.try_pop("head");else if(k.tag_name==="li")I=I||this._tag_stack.try_pop("li",["ol","ul"]);else if(k.tag_name==="dd"||k.tag_name==="dt")I=I||this._tag_stack.try_pop("dt",["dl"]),I=I||this._tag_stack.try_pop("dd",["dl"]);else if(k.parent.tag_name==="p"&&E.indexOf(k.tag_name)!==-1){var L=k.parent.parent;(!L||w.indexOf(L.tag_name)===-1)&&(I=I||this._tag_stack.try_pop("p"))}else k.tag_name==="rp"||k.tag_name==="rt"?(I=I||this._tag_stack.try_pop("rt",["ruby","rtc"]),I=I||this._tag_stack.try_pop("rp",["ruby","rtc"])):k.tag_name==="optgroup"?I=I||this._tag_stack.try_pop("optgroup",["select"]):k.tag_name==="option"?I=I||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):k.tag_name==="colgroup"?I=I||this._tag_stack.try_pop("caption",["table"]):k.tag_name==="thead"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"])):k.tag_name==="tbody"||k.tag_name==="tfoot"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"]),I=I||this._tag_stack.try_pop("thead",["table"]),I=I||this._tag_stack.try_pop("tbody",["table"])):k.tag_name==="tr"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"]),I=I||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(k.tag_name==="th"||k.tag_name==="td")&&(I=I||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),I=I||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return k.parent=this._tag_stack.get_parser_token(),I},n.exports.Beautifier=v},function(n,c,r){var a=r(6).Options;function o(u){a.call(this,u,"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 a,n.exports.Options=o},function(n,c,r){var a=r(9).Tokenizer,o=r(9).TOKEN,u=r(13).Directives,h=r(14).TemplatablePattern,s=r(12).Pattern,l={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},t=new u(/<\!--/,/-->/),S=function(x,f){a.call(this,x,f),this._current_tag_name="";var R=new h(this._input).read_options(this._options),C=new s(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:C.starting_with(/{{!--/).until_after(/--}}/),handlebars:C.starting_with(/{{/).until_after(/}}/),handlebars_open:C.until(/[\n\r\t }]/),handlebars_raw_close:C.until(/}}/),comment:C.starting_with(//),cdata:C.starting_with(//),conditional_comment:C.starting_with(//),processing:C.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 v=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=C.matching(v).until_after(v)}};S.prototype=new a,S.prototype._is_comment=function(x){return!1},S.prototype._is_opening=function(x){return x.type===l.TAG_OPEN},S.prototype._is_closing=function(x,f){return x.type===l.TAG_CLOSE&&f&&((x.text===">"||x.text==="/>")&&f.text[0]==="<"||x.text==="}}"&&f.text[0]==="{"&&f.text[1]==="{")},S.prototype._reset=function(){this._current_tag_name=""},S.prototype._get_next_token=function(x,f){var R=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(l.EOF,""):(R=R||this._read_open_handlebars(C,f),R=R||this._read_attribute(C,x,f),R=R||this._read_close(C,f),R=R||this._read_raw_content(C,x,f),R=R||this._read_content_word(C),R=R||this._read_comment_or_cdata(C),R=R||this._read_processing(C),R=R||this._read_open(C,f),R=R||this._create_token(l.UNKNOWN,this._input.next()),R)},S.prototype._read_comment_or_cdata=function(x){var f=null,R=null,C=null;if(x==="<"){var v=this._input.peek(1);v==="!"&&(R=this.__patterns.comment.read(),R?(C=t.get_directives(R),C&&C.ignore==="start"&&(R+=t.readIgnored(this._input))):R=this.__patterns.cdata.read()),R&&(f=this._create_token(l.COMMENT,R),f.directives=C)}return f},S.prototype._read_processing=function(x){var f=null,R=null,C=null;if(x==="<"){var v=this._input.peek(1);(v==="!"||v==="?")&&(R=this.__patterns.conditional_comment.read(),R=R||this.__patterns.processing.read()),R&&(f=this._create_token(l.COMMENT,R),f.directives=C)}return f},S.prototype._read_open=function(x,f){var R=null,C=null;return f||x==="<"&&(R=this._input.next(),this._input.peek()==="/"&&(R+=this._input.next()),R+=this.__patterns.element_name.read(),C=this._create_token(l.TAG_OPEN,R)),C},S.prototype._read_open_handlebars=function(x,f){var R=null,C=null;return f||this._options.indent_handlebars&&x==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(R=this.__patterns.handlebars_comment.read(),R=R||this.__patterns.handlebars.read(),C=this._create_token(l.COMMENT,R)):(R=this.__patterns.handlebars_open.read(),C=this._create_token(l.TAG_OPEN,R))),C},S.prototype._read_close=function(x,f){var R=null,C=null;return f&&(f.text[0]==="<"&&(x===">"||x==="/"&&this._input.peek(1)===">")?(R=this._input.next(),x==="/"&&(R+=this._input.next()),C=this._create_token(l.TAG_CLOSE,R)):f.text[0]==="{"&&x==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(l.TAG_CLOSE,"}}"))),C},S.prototype._read_attribute=function(x,f,R){var C=null,v="";if(R&&R.text[0]==="<")if(x==="=")C=this._create_token(l.EQUALS,this._input.next());else if(x==='"'||x==="'"){var _=this._input.next();x==='"'?_+=this.__patterns.double_quote.read():_+=this.__patterns.single_quote.read(),C=this._create_token(l.VALUE,_)}else v=this.__patterns.attribute.read(),v&&(f.type===l.EQUALS?C=this._create_token(l.VALUE,v):C=this._create_token(l.ATTRIBUTE,v));return C},S.prototype._is_content_unformatted=function(x){return this._options.void_elements.indexOf(x)===-1&&(this._options.content_unformatted.indexOf(x)!==-1||this._options.unformatted.indexOf(x)!==-1)},S.prototype._read_raw_content=function(x,f,R){var C="";if(R&&R.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(f.type===l.TAG_CLOSE&&f.opened.text[0]==="<"&&f.text[0]!=="/"){var v=f.opened.text.substr(1).toLowerCase();if(v==="script"||v==="style"){var _=this._read_comment_or_cdata(x);if(_)return _.type=l.TEXT,_;C=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(v)&&(C=this._input.readUntil(new RegExp("","ig")))}return C?this._create_token(l.TEXT,C):null},S.prototype._read_content_word=function(x){var f="";if(this._options.unformatted_content_delimiter&&(x===this._options.unformatted_content_delimiter[0]&&(f=this.__patterns.unformatted_content_delimiter.read())),f||(f=this.__patterns.word.read()),f)return this._create_token(l.TEXT,f)},n.exports.Tokenizer=S,n.exports.TOKEN=l}],b={};function p(n){var c=b[n];if(c!==void 0)return c.exports;var r=b[n]={exports:{}};return T[n](r,r.exports,p),r.exports}var d=p(18);O=d})();var M=O;if(!0)!(N=[j,j("6UM0"),j("TXwP")],g=function(T){var b=j("6UM0"),p=j("TXwP");return{html_beautify:function(d,n){return M(d,n,b.js_beautify,p.css_beautify)}}}.apply(q,N),g!==void 0&&(F.exports=g));else var m,y})()},qBft:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.AnsiX923={pad:function(g,O){var M=g.sigBytes,m=O*4,y=m-M%m,T=M+y-1;g.clamp(),g.words[T>>>2]|=y<<24-T%4*8,g.sigBytes+=y},unpad:function(g){var O=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=O}},N.pad.Ansix923})},qHvr:function(F,q,j){"use strict";var N=j("2qtc"),g=j("kLXV"),O=j("5NDa"),M=j("5rEg"),m=j("miYZ"),y=j("tsqr"),T=j("tJVT"),b=j("q1tI"),p=j.n(b),d=j("4i/N");function n(c){var r=c.isAddmodle,a=c.setIsAdd,o=c.createTeam,u=Object(b.useState)(""),h=Object(T.a)(u,2),s=h[0],l=h[1];return p.a.createElement(g.a,{centered:!0,title:p.a.createElement("div",{style:{alignItems:"center",display:"flex"}},p.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),p.a.createElement(d.a,{onClick:function(){return a(!1)},style:{cursor:"porint"}})),visible:r,closable:!1,destroyOnClose:!0,onOk:function(){if(!s){y.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}o(s)},onCancel:function(){return a(!1)}},p.a.createElement("div",null,p.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",p.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},p.a.createElement(M.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:s,maxLength:60,addonAfter:String(s&&s.length||0)+"/60",onChange:function(S){return l(S.target.value)}}))))}q.a=n},qM6L:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=g.enc,y=m.Utf16=m.Utf16BE={stringify:function(b){for(var p=b.words,d=b.sigBytes,n=[],c=0;c>>2]>>>16-c%4*8&65535;n.push(String.fromCharCode(r))}return n.join("")},parse:function(b){for(var p=b.length,d=[],n=0;n>>1]|=b.charCodeAt(n)<<16-n%2*16;return M.create(d,p*2)}};m.Utf16LE={stringify:function(b){for(var p=b.words,d=b.sigBytes,n=[],c=0;c>>2]>>>16-c%4*8&65535);n.push(String.fromCharCode(r))}return n.join("")},parse:function(b){for(var p=b.length,d=[],n=0;n>>1]|=T(b.charCodeAt(n)<<16-n%2*16);return M.create(d,p*2)}};function T(b){return b<<8&4278255360|b>>>8&16711935}}(),N.enc.Utf16})},qu8F:function(F,q,j){(function(N,g,O){F.exports=q=g(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 g=N.lib.BlockCipherMode.extend();function O(y){if((y>>24&255)===255){var T=y>>16&255,b=y>>8&255,p=y&255;T===255?(T=0,b===255?(b=0,p===255?p=0:++p):++b):++T,y=0,y+=T<<16,y+=b<<8,y+=p}else y+=1<<24;return y}function M(y){return(y[0]=O(y[0]))===0&&(y[1]=O(y[1])),y}var m=g.Encryptor=g.extend({processBlock:function(y,T){var b=this._cipher,p=b.blockSize,d=this._iv,n=this._counter;d&&(n=this._counter=d.slice(0),this._iv=void 0),M(n);var c=n.slice(0);b.encryptBlock(c,0);for(var r=0;r=O.length?{done:!0}:{done:!1,value:O[y++]}},e:function(c){throw c},f:T}}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(){m=O[Symbol.iterator]()},n:function(){var c=m.next();return b=c.done,c},e:function(c){p=!0,d=c},f:function(){try{!b&&m.return!=null&&m.return()}finally{if(p)throw d}}}}},rUJ1:function(F,q){const j=/[&<>"']/,N=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,M={"&":"&","<":"<",">":">",'"':""","'":"'"},m=C=>M[C];function y(C,v){if(v){if(j.test(C))return C.replace(N,m)}else if(g.test(C))return C.replace(O,m);return C}const T=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(C){return C.replace(T,(v,_)=>(_=_.toLowerCase(),_==="colon"?":":_.charAt(0)==="#"?_.charAt(1)==="x"?String.fromCharCode(parseInt(_.substring(2),16)):String.fromCharCode(+_.substring(1)):""))}const p=/(^|[^\[])\^/g;function d(C,v){C=C.source||C,v=v||"";const _={replace:(E,w)=>(w=w.source||w,w=w.replace(p,"$1"),C=C.replace(E,w),_),getRegex:()=>new RegExp(C,v)};return _}const n=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function r(C,v,_){if(C){let E;try{E=decodeURIComponent(b(_)).replace(n,"").toLowerCase()}catch(w){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}v&&!c.test(_)&&(_=s(v,_));try{_=encodeURI(_).replace(/%25/g,"%")}catch(E){return null}return _}const a={},o=/^[^:]+:\/*[^/]*$/,u=/^([^:]+:)[\s\S]*$/,h=/^([^:]+:\/*[^/]*)[\s\S]*$/;function s(C,v){a[" "+C]||(o.test(C)?a[" "+C]=C+"/":a[" "+C]=x(C,"/",!0)),C=a[" "+C];const _=C.indexOf(":")===-1;return v.substring(0,2)==="//"?_?v:C.replace(u,"$1")+v:v.charAt(0)==="/"?_?v:C.replace(h,"$1")+v:C+v}const l={exec:function(){}};function t(C){let v=1,_,E;for(;v{let V=!1,W=I;for(;--W>=0&&L[W]==="\\";)V=!V;return V?"|":" |"}),E=_.split(/ \|/);let w=0;if(E.length>v)E.splice(v);else for(;E.length1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var S=t[0];if(y.isValidElement(S)&&Object(n.c)(S)){var x=S.ref;t[0]=y.cloneElement(S,{ref:Object(n.a)(x,this.setChildNode)})}return t.length===1?t[0]:t.map(function(f,R){return!y.isValidElement(f)||"key"in f&&f.key!==null?f:y.cloneElement(f,{key:"".concat(r,"-").concat(R)})})}}]),h}(y.Component);a.displayName="ResizeObserver",q.a=a},uGsb:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("MlIO"),j("1uat"))})(this,function(N){return function(){var g=N,O=g.x64,M=O.Word,m=O.WordArray,y=g.algo,T=y.SHA512,b=y.SHA384=T.extend({_doReset:function(){this._hash=new m.init([new M.init(3418070365,3238371032),new M.init(1654270250,914150663),new M.init(2438529370,812702999),new M.init(355462360,4144912697),new M.init(1731405415,4290775857),new M.init(2394180231,1750603025),new M.init(3675008525,1694076839),new M.init(1203062813,3204075428)])},_doFinalize:function(){var p=T._doFinalize.call(this);return p.sigBytes-=16,p}});g.SHA384=T._createHelper(b),g.HmacSHA384=T._createHmacHelper(b)}(),N.SHA384})},uGxW:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.NoPadding={pad:function(){},unpad:function(){}},N.pad.NoPadding})},uK0f:function(F,q,j){(function(N,g){F.exports=g()})(this,function(){"use strict";function N(g,O,M){M=M||{},M.childrenKeyName=M.childrenKeyName||"children";var m=g||[],y=[],T=0;do{var b=m.filter(function(p){return O(p,T)})[0];if(!b)break;y.push(b),m=b[M.childrenKeyName]||[],T+=1}while(m.length>0);return y}return N})},ulZh:function(F,q,j){typeof window!="undefined"&&function(g,O){F.exports=O()}(this,function(){return function(N){var g={};function O(M){if(g[M])return g[M].exports;var m=g[M]={i:M,l:!1,exports:{}};return N[M].call(m.exports,m,m.exports,O),m.l=!0,m.exports}return O.m=N,O.c=g,O.d=function(M,m,y){O.o(M,m)||Object.defineProperty(M,m,{enumerable:!0,get:y})},O.r=function(M){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},O.t=function(M,m){if(m&1&&(M=O(M)),m&8)return M;if(m&4&&typeof M=="object"&&M&&M.__esModule)return M;var y=Object.create(null);if(O.r(y),Object.defineProperty(y,"default",{enumerable:!0,value:M}),m&2&&typeof M!="string")for(var T in M)O.d(y,T,function(b){return M[b]}.bind(null,T));return y},O.n=function(M){var m=M&&M.__esModule?function(){return M.default}:function(){return M};return O.d(m,"a",m),m},O.o=function(M,m){return Object.prototype.hasOwnProperty.call(M,m)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(N,g,O){"use strict";var M=Object.prototype.hasOwnProperty,m="~";function y(){}Object.create&&(y.prototype=Object.create(null),new y().__proto__||(m=!1));function T(n,c,r){this.fn=n,this.context=c,this.once=r||!1}function b(n,c,r,a,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var u=new T(r,a||n,o),h=m?m+c:c;return n._events[h]?n._events[h].fn?n._events[h]=[n._events[h],u]:n._events[h].push(u):(n._events[h]=u,n._eventsCount++),n}function p(n,c){--n._eventsCount===0?n._events=new y:delete n._events[c]}function d(){this._events=new y,this._eventsCount=0}d.prototype.eventNames=function(){var c=[],r,a;if(this._eventsCount===0)return c;for(a in r=this._events)M.call(r,a)&&c.push(m?a.slice(1):a);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(r)):c},d.prototype.listeners=function(c){var r=m?m+c:c,a=this._events[r];if(!a)return[];if(a.fn)return[a.fn];for(var o=0,u=a.length,h=new Array(u);o0},!1)}function n(c,r){for(var a={main:[r]},o={main:[]},u={main:{}};d(a);)for(var h=Object.keys(a),s=0;s=2*R/v||L<=W)return;var H=Number.POSITIVE_INFINITY,G;for(G=h.level-1;G>E;G--){var B=_[G].maxBitrate;if(H=R*B/(8*.8*I),H=L)return;var P=this.bwEstimator.getEstimate();d.logger.warn("Fragment "+h.sn+(s?" part "+s.index:"")+" of level "+h.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+G+` Current BW estimate: `+(Object(M.isFiniteNumber)(P)?(P/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+L.toFixed(3)+` s Estimated load time for the next fragment: `+H.toFixed(3)+` s Time to underbuffer: `+W.toFixed(3)+" s"),l.nextLoadLevel=G,this.bwEstimator.sample(C,f.loaded),this.clearTimer(),h.loader&&(this.fragCurrent=this.partCurrent=null,h.loader.abort()),l.trigger(y.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:h,part:s,stats:f})},o.onFragLoaded=function(h,s){var l=s.frag,t=s.part;if(l.type===p.PlaylistLevelType.MAIN&&Object(M.isFiniteNumber)(l.sn)){var S=t?t.stats:l.stats,x=t?t.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var f=this.hls.levels[l.level],R=(f.loaded?f.loaded.bytes:0)+S.loaded,C=(f.loaded?f.loaded.duration:0)+x;f.loaded={bytes:R,duration:C},f.realBitrate=Math.round(8*R/C)}if(l.bitrateTest){var v={stats:S,frag:l,part:t,id:l.type};this.onFragBuffered(y.Events.FRAG_BUFFERED,v),l.bitrateTest=!1}}},o.onFragBuffered=function(h,s){var l=s.frag,t=s.part,S=t?t.stats:l.stats;if(S.aborted)return;if(l.type!==p.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var x=S.parsing.end-S.loading.start;this.bwEstimator.sample(x,S.loaded),S.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=x/1e3:this.bitrateTestDelay=0},o.onError=function(h,s){switch(s.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 h=this.fragCurrent,s=this.partCurrent,l=this.hls,t=l.maxAutoLevel,S=l.config,x=l.minAutoLevel,f=l.media,R=s?s.duration:h?h.duration:0,C=f?f.currentTime:0,v=f&&f.playbackRate!==0?Math.abs(f.playbackRate):1,_=this.bwEstimator?this.bwEstimator.getEstimate():S.abrEwmaDefaultEstimate,E=(T.BufferHelper.bufferInfo(f,C,S.maxBufferHole).end-C)/v,w=this.findBestLevel(_,x,t,E,S.abrBandWidthFactor,S.abrBandWidthUpFactor);if(w>=0)return w;d.logger.trace((E?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var k=R?Math.min(R,S.maxStarvationDelay):S.maxStarvationDelay,I=S.abrBandWidthFactor,L=S.abrBandWidthUpFactor;if(!E){var V=this.bitrateTestDelay;if(V){var W=R?Math.min(R,S.maxLoadingDelay):S.maxLoadingDelay;k=W-V,d.logger.trace("bitrate test took "+Math.round(1e3*V)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*k)+" ms"),I=L=1}}return w=this.findBestLevel(_,x,t,E+k,I,L),Math.max(w,0)},o.findBestLevel=function(h,s,l,t,S,x){for(var f,R=this.fragCurrent,C=this.partCurrent,v=this.lastLoadedFragLevel,_=this.hls.levels,E=_[v],w=!!(E!=null&&(f=E.details)!==null&&f!==void 0&&f.live),k=E==null?void 0:E.codecSet,I=C?C.duration:R?R.duration:0,L=l;L>=s;L--){var V=_[L];if(!V||k&&V.codecSet!==k)continue;var W=V.details,H=(C?W==null?void 0:W.partTarget:W==null?void 0:W.averagetargetduration)||I,G=void 0;L<=v?G=S*h:G=x*h;var B=_[L].maxBitrate,P=B*H/G;if(d.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+L+"/"+Math.round(G)+"/"+B+"/"+H+"/"+t+"/"+P),G>B&&(!P||w&&!this.bitrateTestDelay||P0&&E===-1?(this.log("Override startPosition with lastCurrentTime @"+w.toFixed(3)),this.state=m.State.IDLE):(this.loadedmetadata=!1,this.state=m.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()},v.doTick=function(){switch(this.state){case m.State.IDLE:this.doTickIdle();break;case m.State.WAITING_TRACK:{var E,w=this.levels,k=this.trackId,I=w==null||((E=w[k])===null||E===void 0)?void 0:E.details;if(I){if(this.waitForCdnTuneIn(I))break;this.state=m.State.WAITING_INIT_PTS}break}case m.State.FRAG_LOADING_WAITING_RETRY:{var L,V=performance.now(),W=this.retryDate;(!W||V>=W||(L=this.media)!==null&&L!==void 0&&L.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=m.State.IDLE);break}case m.State.WAITING_INIT_PTS:{var H=this.waitingData;if(H){var G=H.frag,B=H.part,P=H.cache,z=H.complete;if(this.initPTS[G.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=m.State.FRAG_LOADING;var J=P.flush(),ue={frag:G,part:B,payload:J,networkDetails:null};this._handleFragmentLoadProgress(ue),z&&R.prototype._handleFragmentLoadComplete.call(this,ue)}else if(this.videoTrackCC!==this.waitingVideoCC)s.logger.log("Waiting fragment cc ("+G.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var de=this.getLoadPosition(),Se=T.BufferHelper.bufferInfo(this.mediaBuffer,de,this.config.maxBufferHole),Ae=Object(o.fragmentWithinToleranceTest)(Se.end,this.config.maxFragLookUpTolerance,G);Ae<0&&(s.logger.log("Waiting fragment cc ("+G.cc+") @ "+G.start+" cancelled because another fragment at "+Se.end+" is needed"),this.clearWaitingFragment())}}else this.state=m.State.IDLE}}this.onTickEnd()},v.clearWaitingFragment=function(){var E=this.waitingData;E&&(this.fragmentTracker.removeFragment(E.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=m.State.IDLE)},v.onTickEnd=function(){var E=this.media;if(!E||!E.readyState)return;var w=this.mediaBuffer?this.mediaBuffer:E,k=w.buffered;!this.loadedmetadata&&k.length&&(this.loadedmetadata=!0),this.lastCurrentTime=E.currentTime},v.doTickIdle=function(){var E,w,k=this.hls,I=this.levels,L=this.media,V=this.trackId,W=k.config;if(!I||!I[V])return;if(!L&&(this.startFragRequested||!W.startFragPrefetch))return;var H=I[V],G=H.details;if(!G||G.live&&this.levelLastLoaded!==V||this.waitForCdnTuneIn(G)){this.state=m.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,d.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,d.PlaylistLevelType.AUDIO);if(B===null)return;var P=B.len,z=this.getMaxBufferLength(),J=this.audioSwitch;if(P>=z&&!J)return;if(!J&&this._streamEnded(B,G)){k.trigger(y.Events.BUFFER_EOS,{type:"audio"}),this.state=m.State.ENDED;return}var ue=G.fragments,de=ue[0].start,Se=B.end;if(J){var Ae=this.getLoadPosition();Se=Ae,G.PTSKnown&&Aede||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),L.currentTime=de+.05))}var pe=this.getNextFragment(Se,G);if(!pe){this.bufferFlushed=!0;return}((E=pe.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((w=pe.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(pe,G):this.loadFragment(pe,G,Se)},v.getMaxBufferLength=function(){var E=R.prototype.getMaxBufferLength.call(this),w=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,d.PlaylistLevelType.MAIN);return w===null?E:Math.max(E,w.len)},v.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},v.onAudioTracksUpdated=function(E,w){var k=w.audioTracks;this.resetTransmuxer(),this.levels=k.map(function(I){return new p.Level(I)})},v.onAudioTrackSwitching=function(E,w){var k=!!w.url;this.trackId=w.id;var I=this.fragCurrent;I!=null&&I.loader&&I.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),k?this.setInterval(x):this.resetTransmuxer(),k?(this.audioSwitch=!0,this.state=m.State.IDLE):this.state=m.State.STOPPED,this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},v.onLevelLoaded=function(E,w){this.mainDetails=w.details},v.onAudioTrackLoaded=function(E,w){var k,I=this.levels,L=w.details,V=w.id;if(!I){this.warn("Audio tracks were reset while loading level "+V);return}this.log("Track "+V+" loaded ["+L.startSN+","+L.endSN+"],duration:"+L.totalduration);var W=I[V],H=0;if(L.live||(k=W.details)!==null&&k!==void 0&&k.live){var G=this.mainDetails;if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed||!G)return;!W.details&&L.hasProgramDateTime&&G.hasProgramDateTime?(Object(u.alignMediaPlaylistByPDT)(L,G),H=L.fragments[0].start):H=this.alignPlaylists(L,W.details)}W.details=L,this.levelLastLoaded=V,!this.startFragRequested&&(this.mainDetails||!L.live)&&this.setStartPosition(W.details,H),this.state===m.State.WAITING_TRACK&&!this.waitForCdnTuneIn(L)&&(this.state=m.State.IDLE),this.tick()},v._handleFragmentLoadProgress=function(E){var w,k=E.frag,I=E.part,L=E.payload,V=this.config,W=this.trackId,H=this.levels;if(!H){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+k.sn+" of level "+k.level+" will not be buffered");return}var G=H[W];console.assert(G,"Audio track is defined on fragment load progress");var B=G.details;console.assert(B,"Audio track details are defined on fragment load progress");var P=V.defaultAudioCodec||G.audioCodec||"mp4a.40.2",z=this.transmuxer;z||(z=this.transmuxer=new r.default(this.hls,d.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var J=this.initPTS[k.cc],ue=(w=k.initSegment)===null||w===void 0?void 0:w.data;if(J!==void 0){var de=!1,Se=I?I.index:-1,Ae=Se!==-1,pe=new a.ChunkMetadata(k.level,k.sn,k.stats.chunkCount,L.byteLength,Se,Ae);z.push(L,ue,P,"",k,I,B.totalduration,de,pe,J)}else{s.logger.log("Unknown video PTS for cc "+k.cc+", waiting for video PTS before demuxing audio frag "+k.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+W);var Oe=this.waitingData=this.waitingData||{frag:k,part:I,cache:new c.default,complete:!1},ye=Oe.cache;ye.push(new Uint8Array(L)),this.waitingVideoCC=this.videoTrackCC,this.state=m.State.WAITING_INIT_PTS}},v._handleFragmentLoadComplete=function(E){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,E)},v.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},v.onBufferCreated=function(E,w){var k=w.tracks.audio;k&&(this.mediaBuffer=k.buffer),w.tracks.video&&(this.videoBuffer=w.tracks.video.buffer)},v.onFragBuffered=function(E,w){var k=w.frag,I=w.part;if(k.type!==d.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(k)){this.warn("Fragment "+k.sn+(I?" p: "+I.index:"")+" of level "+k.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}k.sn!=="initSegment"&&(this.fragPrevious=k,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(y.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(k,I)},v.onError=function(E,w){switch(w.details){case h.ErrorDetails.FRAG_LOAD_ERROR:case h.ErrorDetails.FRAG_LOAD_TIMEOUT:case h.ErrorDetails.KEY_LOAD_ERROR:case h.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.AUDIO,w);break;case h.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case h.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==m.State.ERROR&&this.state!==m.State.STOPPED&&(this.state=w.fatal?m.State.ERROR:m.State.IDLE,this.warn(w.details+" while loading frag, switching to "+this.state+" state"));break;case h.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="audio"&&(this.state===m.State.PARSING||this.state===m.State.PARSED)){var k=!0,I=this.getFwdBufferInfo(this.mediaBuffer,d.PlaylistLevelType.AUDIO);I&&I.len>.5&&(k=!this.reduceMaxBufferLength(I.len)),k&&(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}},v.onBufferFlushed=function(E,w){var k=w.type;k===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},v._handleTransmuxComplete=function(E){var w,k="audio",I=this.hls,L=E.remuxResult,V=E.chunkMeta,W=this.getCurrentContext(V);if(!W){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 H=W.frag,G=W.part,B=L.audio,P=L.text,z=L.id3,J=L.initSegment;if(this.fragContextChanged(H))return;if(this.state=m.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),J!=null&&J.tracks&&(this._bufferInitSegment(J.tracks,H,V),I.trigger(y.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:k,tracks:J.tracks})),B){var ue=B.startPTS,de=B.endPTS,Se=B.startDTS,Ae=B.endDTS;G&&(G.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:ue,endPTS:de,startDTS:Se,endDTS:Ae}),H.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,ue,de,Se,Ae),this.bufferFragmentData(B,H,G,V)}if(z!=null&&(w=z.samples)!==null&&w!==void 0&&w.length){var pe=l({frag:H,id:k},z);I.trigger(y.Events.FRAG_PARSING_METADATA,pe)}if(P){var Oe=l({frag:H,id:k},P);I.trigger(y.Events.FRAG_PARSING_USERDATA,Oe)}},v._bufferInitSegment=function(E,w,k){if(this.state!==m.State.PARSING)return;E.video&&delete E.video;var I=E.audio;if(!I)return;I.levelCodec=I.codec,I.id="audio",this.log("Init audio buffer, container:"+I.container+", codecs[parsed]=["+I.codec+"]"),this.hls.trigger(y.Events.BUFFER_CODECS,E);var L=I.initSegment;if(L!=null&&L.byteLength){var V={type:"audio",frag:w,part:null,chunkMeta:k,parent:w.type,data:L};this.hls.trigger(y.Events.BUFFER_APPENDING,V)}this.tick()},v.loadFragment=function(E,w,k){var I=this.fragmentTracker.getState(E);this.fragCurrent=E,(this.audioSwitch||I===b.FragmentState.NOT_LOADED||I===b.FragmentState.PARTIAL)&&(E.sn==="initSegment"?this._loadInitSegment(E):w.live&&!Object(M.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=m.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,E,w,k)))},v.completeAudioSwitch=function(){var E=this.hls,w=this.media,k=this.trackId;w&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,E.trigger(y.Events.AUDIO_TRACK_SWITCHED,{id:k})},C}(m.default);g.default=f},"./src/controller/audio-track-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/events.ts"),m=O("./src/errors.ts"),y=O("./src/controller/base-playlist-controller.ts"),T=O("./src/types/loader.ts");function b(r,a){for(var o=0;o=s.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=s[this.trackId];this.log("Now switching to audio-track index "+h);var t=s[h],S=t.id,x=t.groupId,f=x===void 0?"":x,R=t.name,C=t.type,v=t.url;if(this.trackId=h,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHING,{id:S,groupId:f,name:R,type:C,url:v}),t.details&&!t.details.live)return;var _=this.switchParams(t.url,l==null?void 0:l.details);this.loadPlaylist(_)},o.selectInitialTrack=function(){var h=this.tracksInGroup;console.assert(h.length,"Initial audio track should be selected when tracks are known");var s=this.trackName,l=this.findTrackId(s)||this.findTrackId();l!==-1?this.setAudioTrack(l):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(h){for(var s=this.tracksInGroup,l=0;la.partTarget&&(t+=1)}if(Object(M.isFiniteNumber)(l))return new m.HlsUrlParameters(l,Object(M.isFiniteNumber)(t)?t:void 0,m.HlsSkip.No)}}},n.loadPlaylist=function(r){},n.shouldLoadTrack=function(r){return this.canLoad&&r&&!!r.url&&(!r.details||r.details.live)},n.playlistLoaded=function(r,a,o){var u=this,h=a.details,s=a.stats,l=s.loading.end?Math.max(0,self.performance.now()-s.loading.end):0;if(h.advancedDateTime=Date.now()-l,h.live||o!=null&&o.live){if(h.reloaded(o),o&&this.log("live playlist "+r+" "+(h.advanced?"REFRESHED "+h.lastPartSn+"-"+h.lastPartIndex:"MISSED")),o&&h.fragments.length>0&&Object(y.mergeDetails)(o,h),!this.canLoad||!h.live)return;var t,S=void 0,x=void 0;if(h.canBlockReload&&h.endSN&&h.advanced){var f=this.hls.config.lowLatencyMode,R=h.lastPartSn,C=h.endSN,v=h.lastPartIndex,_=v!==-1,E=R===C,w=f?0:v;_?(S=E?C+1:R,x=E?w:v+1):S=C+1;var k=h.age,I=k+h.ageHeader,L=Math.min(I-h.partTarget,h.targetduration*1.5);if(L>0){if(o&&L>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+L+" with playlist age: "+h.age),L=0;else{var V=Math.floor(L/h.targetduration);if(S+=V,x!==void 0){var W=Math.round(L%h.targetduration/h.partTarget);x+=W}this.log("CDN Tune-in age: "+h.ageHeader+"s last advanced "+k.toFixed(2)+"s goal: "+L+" skip sn "+V+" to part "+x)}h.tuneInGoal=L}if(t=this.getDeliveryDirectives(h,a.deliveryDirectives,S,x),f||!E){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(h,a.deliveryDirectives,S,x);var H=Object(y.computeReloadInterval)(h,s);S!==void 0&&h.canBlockReload&&(H-=h.partTarget||1),this.log("reload live playlist "+r+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return u.loadPlaylist(t)},H)}else this.clearTimer()},n.getDeliveryDirectives=function(r,a,o,u){var h=Object(m.getSkipValue)(r,o);return a!=null&&a.skip&&r.deltaUpdateFailed&&(o=a.msn,u=a.part,h=m.HlsSkip.No),new m.HlsUrlParameters(o,u,h)},n.retryLoadingOrFail=function(r){var a=this,o=this.hls.config,u=this.retryCount-1&&(h=r.context)!==null&&h!==void 0&&h.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+r.details+'"'),this.loadPlaylist();else{var s=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return a.loadPlaylist()},s),this.warn("retry playlist loading #"+this.retryCount+" in "+s+' ms after "'+r.details+'"')}}else this.warn('cannot recover from error "'+r.details+'"'),this.clearTimer(),r.fatal=!0;return u},d}()},"./src/controller/base-stream-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"State",function(){return C}),O.d(g,"default",function(){return v});var M=O("./src/polyfills/number.ts"),m=O("./src/task-loop.ts"),y=O("./src/controller/fragment-tracker.ts"),T=O("./src/utils/buffer-helper.ts"),b=O("./src/utils/logger.ts"),p=O("./src/events.ts"),d=O("./src/errors.ts"),n=O("./src/types/transmuxer.ts"),c=O("./src/utils/mp4-tools.ts"),r=O("./src/utils/discontinuities.ts"),a=O("./src/controller/fragment-finders.ts"),o=O("./src/controller/level-helper.ts"),u=O("./src/loader/fragment-loader.ts"),h=O("./src/crypt/decrypter.ts"),s=O("./src/utils/time-ranges.ts"),l=O("./src/types/loader.ts");function t(_,E){for(var w=0;wJ;(G0&&G&&G.key&&G.iv&&G.method==="AES-128"){var B=self.performance.now();return L.decrypter.webCryptoDecrypt(new Uint8Array(H),G.key.buffer,G.iv.buffer).then(function(P){var z=self.performance.now();return W.trigger(p.Events.FRAG_DECRYPTED,{frag:I,payload:P,stats:{tstart:B,tdecrypt:z}}),V.payload=P,V})}return V}).then(function(V){var W=L.fragCurrent,H=L.hls,G=L.levels;if(!G)throw new Error("init load aborted, missing levels");var B=G[I.level].details;console.assert(B,"Level details are defined when init segment is loaded");var P=I.stats;L.state=C.IDLE,L.fragLoadError=0,I.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===W&&H.trigger(p.Events.FRAG_BUFFERED,{stats:P,frag:W,part:null,id:I.type}),L.tick()}).catch(function(V){L.warn(V),L.resetFragmentLoading(I)})},w.fragContextChanged=function(I){var L=this.fragCurrent;return!I||!L||I.level!==L.level||I.sn!==L.sn||I.urlId!==L.urlId},w.fragBufferedComplete=function(I,L){var V=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+I.type+" sn: "+I.sn+(L?" part: "+L.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+I.level+" "+s.default.toString(T.BufferHelper.getBuffered(V))),this.state=C.IDLE,this.tick()},w._handleFragmentLoadComplete=function(I){var L=this.transmuxer;if(!L)return;var V=I.frag,W=I.part,H=I.partsLoaded,G=!H||H.length===0||H.some(function(P){return!P}),B=new n.ChunkMetadata(V.level,V.sn,V.stats.chunkCount+1,0,W?W.index:-1,!G);L.flush(B)},w._handleFragmentLoadProgress=function(I){},w._doFragLoad=function(I,L,V,W){var H=this;if(V===void 0&&(V=null),!this.levels)throw new Error("frag load aborted, missing levels");if(V=Math.max(I.start,V||0),this.config.lowLatencyMode&&L){var G=L.partList;if(G&&W){V>I.end&&L.fragmentHint&&(I=L.fragmentHint);var B=this.getNextPart(G,I,V);if(B>-1){var P=G[B];return this.log("Loading part sn: "+I.sn+" p: "+P.index+" cc: "+I.cc+" of playlist ["+L.startSN+"-"+L.endSN+"] parts [0-"+B+"-"+(G.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+I.level+", target: "+parseFloat(V.toFixed(3))),this.nextLoadPosition=P.start+P.duration,this.state=C.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:I,part:G[B],targetBufferTime:V}),this.doFragPartsLoad(I,G,B,W).catch(function(z){return H.handleFragLoadError(z)})}else if(!I.url||this.loadedEndOfParts(G,V))return Promise.resolve(null)}}return this.log("Loading fragment "+I.sn+" cc: "+I.cc+" "+(L?"of ["+L.startSN+"-"+L.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+I.level+", target: "+parseFloat(V.toFixed(3))),Object(M.isFiniteNumber)(I.sn)&&!this.bitrateTest&&(this.nextLoadPosition=I.start+I.duration),this.state=C.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:I,targetBufferTime:V}),this.fragmentLoader.load(I,W).catch(function(z){return H.handleFragLoadError(z)})},w.doFragPartsLoad=function(I,L,V,W){var H=this;return new Promise(function(G,B){var P=[],z=function J(ue){var de=L[ue];H.fragmentLoader.loadPart(I,de,W).then(function(Se){P[de.index]=Se;var Ae=Se.part;H.hls.trigger(p.Events.FRAG_LOADED,Se);var pe=L[ue+1];if(pe&&pe.fragment===I)J(ue+1);else return G({frag:I,part:Ae,partsLoaded:P})}).catch(B)};z(V)})},w.handleFragLoadError=function(I){var L=I.data;return L&&L.details===d.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(L.frag,L.part):this.hls.trigger(p.Events.ERROR,L),null},w._handleTransmuxerFlush=function(I){var L=this.getCurrentContext(I);if(!L||this.state!==C.PARSING){this.fragCurrent||(this.state=C.IDLE);return}var V=L.frag,W=L.part,H=L.level,G=self.performance.now();V.stats.parsing.end=G,W&&(W.stats.parsing.end=G),this.updateLevelTiming(V,W,H,I.partial)},w.getCurrentContext=function(I){var L=this.levels,V=I.level,W=I.sn,H=I.part;if(!L||!L[V])return this.warn("Levels object was unset while buffering fragment "+W+" of level "+V+". The current chunk will not be buffered."),null;var G=L[V],B=H>-1?Object(o.getPartWith)(G,W,H):null,P=B?B.fragment:Object(o.getFragmentWithSN)(G,W,this.fragCurrent);return P?{frag:P,part:B,level:G}:null},w.bufferFragmentData=function(I,L,V,W){if(!I||this.state!==C.PARSING)return;var H=I.data1,G=I.data2,B=H;if(H&&G&&(B=Object(c.appendUint8Array)(H,G)),!B||!B.length)return;var P={type:I.type,frag:L,part:V,chunkMeta:W,parent:L.type,data:B};this.hls.trigger(p.Events.BUFFER_APPENDING,P),I.dropped&&I.independent&&!V&&this.flushBufferGap(L)},w.flushBufferGap=function(I){var L=this.media;if(!L)return;if(!T.BufferHelper.isBuffered(L,L.currentTime)){this.flushMainBuffer(0,I.start);return}var V=L.currentTime,W=T.BufferHelper.bufferInfo(L,V,0),H=I.duration,G=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),B=Math.max(Math.min(I.start-G,W.end-G),V+G);I.start-B>G&&this.flushMainBuffer(B,I.start)},w.getFwdBufferInfo=function(I,L){var V=this.config,W=this.getLoadPosition();if(!Object(M.isFiniteNumber)(W))return null;var H=T.BufferHelper.bufferInfo(I,W,V.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var G=this.fragmentTracker.getBufferedFrag(W,L);if(G&&H.nextStart=V?(L.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+L.maxMaxBufferLength+"s"),!0):!1},w.getNextFragment=function(I,L){var V,W,H=L.fragments,G=H.length;if(!G)return null;var B=this.config,P=H[0].start,z;if(L.live){var J=B.initialLiveManifestSize;if(G-1&&VV.start&&V.loaded},w.getInitialLiveFragment=function(I,L){var V=this.fragPrevious,W=null;if(V){if(I.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+V.programDateTime),W=Object(a.findFragmentByPDT)(L,V.endProgramDateTime,this.config.maxFragLookUpTolerance)),!W){var H=V.sn+1;if(H>=I.startSN&&H<=I.endSN){var G=L[H-I.startSN];V.cc===G.cc&&(W=G,this.log("Live playlist, switching playlist, load frag with next SN: "+W.sn))}W||(W=Object(a.findFragWithCC)(L,V.cc),W&&this.log("Live playlist, switching playlist, load frag with same CC: "+W.sn))}}else{var B=this.hls.liveSyncPosition;B!==null&&(W=this.getFragmentAtPosition(B,this.bitrateTest?I.fragmentEnd:I.edge,I))}return W},w.getFragmentAtPosition=function(I,L,V){var W=this.config,H=this.fragPrevious,G=V.fragments,B=V.endSN,P=V.fragmentHint,z=W.maxFragLookUpTolerance,J=!!(W.lowLatencyMode&&V.partList&&P);J&&P&&!this.bitrateTest&&(G=G.concat(P),B=P.sn);var ue;if(IL-z?0:z;ue=Object(a.findFragmentByPTS)(H,G,I,de)}else ue=G[G.length-1];if(ue){var Se=ue.sn-V.startSN,Ae=H&&ue.level===H.level,pe=G[Se+1],Oe=this.fragmentTracker.getState(ue);if(Oe===y.FragmentState.BACKTRACKED){ue=null;for(var ye=Se;G[ye]&&this.fragmentTracker.getState(G[ye])===y.FragmentState.BACKTRACKED;)H?ue=G[ye--]:ue=G[--ye];ue||(ue=pe)}else H&&ue.sn===H.sn&&!J&&(Ae&&(ue.sn=G-L.maxFragLookUpTolerance&&H<=B;if(W!==null&&V.duration>W&&(H"+I.startSN+" prev-sn: "+(H?H.sn:"na")+" fragments: "+B),ue}return P},w.waitForCdnTuneIn=function(I){var L=3;return I.live&&I.canBlockReload&&I.tuneInGoal>Math.max(I.partHoldBack,I.partTarget*L)},w.setStartPosition=function(I,L){var V=this.startPosition;if(V"+I))}}]),E}(m.default)},"./src/controller/buffer-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return a});var M=O("./src/polyfills/number.ts"),m=O("./src/events.ts"),y=O("./src/utils/logger.ts"),T=O("./src/errors.ts"),b=O("./src/utils/buffer-helper.ts"),p=O("./src/utils/mediasource-helper.ts"),d=O("./src/loader/fragment.ts"),n=O("./src/controller/buffer-operation-queue.ts"),c=Object(p.getMediaSource)(),r=/([ha]vc.)(?:\.[^.,]+)+/,a=function(){function o(h){var s=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var l=s.hls,t=s.media,S=s.mediaSource;y.logger.log("[buffer-controller]: Media source opened"),t&&(s.updateMediaElementDuration(),l.trigger(m.Events.MEDIA_ATTACHED,{media:t})),S&&S.removeEventListener("sourceopen",s._onMediaSourceOpen),s.checkPendingTracks()},this._onMediaSourceClose=function(){y.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){y.logger.log("[buffer-controller]: Media source ended")},this.hls=h,this._initSourceBuffer(),this.registerListeners()}var u=o.prototype;return u.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},u.destroy=function(){this.unregisterListeners(),this.details=null},u.registerListeners=function(){var s=this.hls;s.on(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(m.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(m.Events.BUFFER_RESET,this.onBufferReset,this),s.on(m.Events.BUFFER_APPENDING,this.onBufferAppending,this),s.on(m.Events.BUFFER_CODECS,this.onBufferCodecs,this),s.on(m.Events.BUFFER_EOS,this.onBufferEos,this),s.on(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),s.on(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),s.on(m.Events.FRAG_PARSED,this.onFragParsed,this),s.on(m.Events.FRAG_CHANGED,this.onFragChanged,this)},u.unregisterListeners=function(){var s=this.hls;s.off(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(m.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(m.Events.BUFFER_RESET,this.onBufferReset,this),s.off(m.Events.BUFFER_APPENDING,this.onBufferAppending,this),s.off(m.Events.BUFFER_CODECS,this.onBufferCodecs,this),s.off(m.Events.BUFFER_EOS,this.onBufferEos,this),s.off(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),s.off(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),s.off(m.Events.FRAG_PARSED,this.onFragParsed,this),s.off(m.Events.FRAG_CHANGED,this.onFragChanged,this)},u._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},u.onManifestParsed=function(s,l){var t=2;(l.audio&&!l.video||!l.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,y.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},u.onMediaAttaching=function(s,l){var t=this.media=l.media;if(t&&c){var S=this.mediaSource=new c;S.addEventListener("sourceopen",this._onMediaSourceOpen),S.addEventListener("sourceended",this._onMediaSourceEnded),S.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(S),this._objectUrl=t.src}},u.onMediaDetaching=function(){var s=this.media,l=this.mediaSource,t=this._objectUrl;if(l){if(y.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(S){y.logger.warn("[buffer-controller]: onMediaDetaching: "+S.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),s&&(t&&self.URL.revokeObjectURL(t),s.src===t?(s.removeAttribute("src"),s.load()):y.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(m.Events.MEDIA_DETACHED,void 0)},u.onBufferReset=function(){var s=this;this.getSourceBufferTypes().forEach(function(l){var t=s.sourceBuffer[l];try{t&&(s.removeBufferListeners(l),s.mediaSource&&s.mediaSource.removeSourceBuffer(t),s.sourceBuffer[l]=void 0)}catch(S){y.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",S)}}),this._initSourceBuffer()},u.onBufferCodecs=function(s,l){var t=this,S=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(x){if(S){var f=t.tracks[x];if(f&&typeof f.buffer.changeType=="function"){var R=l[x],C=R.codec,v=R.levelCodec,_=R.container,E=(f.levelCodec||f.codec).replace(r,"$1"),w=(v||C).replace(r,"$1");if(E!==w){var k=_+";codecs="+(v||C);t.appendChangeType(x,k)}}}else t.pendingTracks[x]=l[x]}),S)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},u.appendChangeType=function(s,l){var t=this,S=this.operationQueue,x={execute:function(){var R=t.sourceBuffer[s];R&&(y.logger.log("[buffer-controller]: changing "+s+" sourceBuffer type to "+l),R.changeType(l)),S.shiftAndExecuteNext(s)},onStart:function(){},onComplete:function(){},onError:function(R){y.logger.warn("[buffer-controller]: Failed to change "+s+" SourceBuffer type",R)}};S.append(x,s)},u.onBufferAppending=function(s,l){var t=this,S=this.hls,x=this.operationQueue,f=this.tracks,R=l.data,C=l.type,v=l.frag,_=l.part,E=l.chunkMeta,w=E.buffering[C],k=self.performance.now();w.start=k;var I=v.stats.buffering,L=_?_.stats.buffering:null;I.start===0&&(I.start=k),L&&L.start===0&&(L.start=k);var V=f.audio,W=C==="audio"&&E.id===1&&(V==null?void 0:V.container)==="audio/mpeg",H={execute:function(){if(w.executeStart=self.performance.now(),W){var B=t.sourceBuffer[C];if(B){var P=v.start-B.timestampOffset;Math.abs(P)>=.1&&(y.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+v.start+" (delta: "+P+") sn: "+v.sn+")"),B.timestampOffset=v.start)}}t.appendExecutor(R,C)},onStart:function(){},onComplete:function(){var B=self.performance.now();w.executeEnd=w.end=B,I.first===0&&(I.first=B),L&&L.first===0&&(L.first=B);var P=t.sourceBuffer,z={};for(var J in P)z[J]=b.BufferHelper.getBuffered(P[J]);t.appendError=0,t.hls.trigger(m.Events.BUFFER_APPENDED,{type:C,frag:v,part:_,chunkMeta:E,parent:v.type,timeRanges:z})},onError:function(B){y.logger.error("[buffer-controller]: Error encountered while trying to append to the "+C+" SourceBuffer",B);var P={type:T.ErrorTypes.MEDIA_ERROR,parent:v.type,details:T.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?P.details=T.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,P.details=T.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>S.config.appendErrorMaxRetry&&(y.logger.error("[buffer-controller]: Failed "+S.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),P.fatal=!0)),S.trigger(m.Events.ERROR,P)}};x.append(H,C)},u.onBufferFlushing=function(s,l){var t=this,S=this.operationQueue,x=function(R){return{execute:t.removeExecutor.bind(t,R,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(m.Events.BUFFER_FLUSHED,{type:R})},onError:function(v){y.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",v)}}};l.type?S.append(x(l.type),l.type):this.getSourceBufferTypes().forEach(function(f){S.append(x(f),f)})},u.onFragParsed=function(s,l){var t=this,S=l.frag,x=l.part,f=[],R=x?x.elementaryStreams:S.elementaryStreams;R[d.ElementaryStreamTypes.AUDIOVIDEO]?f.push("audiovideo"):(R[d.ElementaryStreamTypes.AUDIO]&&f.push("audio"),R[d.ElementaryStreamTypes.VIDEO]&&f.push("video"));var C=function(){var _=self.performance.now();S.stats.buffering.end=_,x&&(x.stats.buffering.end=_);var E=x?x.stats:S.stats;t.hls.trigger(m.Events.FRAG_BUFFERED,{frag:S,part:x,stats:E,id:S.type})};f.length===0&&y.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+S.type+" level: "+S.level+" sn: "+S.sn),this.blockBuffers(C,f)},u.onFragChanged=function(s,l){this.flushBackBuffer()},u.onBufferEos=function(s,l){var t=this,S=this.getSourceBufferTypes().reduce(function(x,f){var R=t.sourceBuffer[f];return(!l.type||l.type===f)&&(R&&!R.ended&&(R.ended=!0,y.logger.log("[buffer-controller]: "+f+" sourceBuffer now EOS"))),x&&!!(!R||R.ended)},!0);S&&this.blockBuffers(function(){var x=t.mediaSource;if(!x||x.readyState!=="open")return;x.endOfStream()})},u.onLevelUpdated=function(s,l){var t=l.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},u.flushBackBuffer=function(){var s=this.hls,l=this.details,t=this.media,S=this.sourceBuffer;if(!t||l===null)return;var x=this.getSourceBufferTypes();if(!x.length)return;var f=l.live&&s.config.liveBackBufferLength!==null?s.config.liveBackBufferLength:s.config.backBufferLength;if(!Object(M.isFiniteNumber)(f)||f<0)return;var R=t.currentTime,C=l.levelTargetDuration,v=Math.max(f,C),_=Math.floor(R/C)*C-v;x.forEach(function(E){var w=S[E];if(w){var k=b.BufferHelper.getBuffered(w);k.length>0&&_>k.start(0)&&(s.trigger(m.Events.BACK_BUFFER_REACHED,{bufferEnd:_}),l.live&&s.trigger(m.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:_}),s.trigger(m.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:_,type:E}))}})},u.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var s=this.details,l=this.hls,t=this.media,S=this.mediaSource,x=s.fragments[0].start+s.totalduration,f=t.duration,R=Object(M.isFiniteNumber)(S.duration)?S.duration:0;s.live&&l.config.liveDurationInfinity?(y.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),S.duration=Infinity,this.updateSeekableRange(s)):(x>R&&x>f||!Object(M.isFiniteNumber)(f))&&(y.logger.log("[buffer-controller]: Updating Media Source duration to "+x.toFixed(3)),S.duration=x)},u.updateSeekableRange=function(s){var l=this.mediaSource,t=s.fragments,S=t.length;if(S&&s.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var x=Math.max(0,t[0].start),f=Math.max(x,x+s.totalduration);l.setLiveSeekableRange(x,f)}},u.checkPendingTracks=function(){var s=this.bufferCodecEventsExpected,l=this.operationQueue,t=this.pendingTracks,S=Object.keys(t).length;if(S&&!s||S===2){this.createSourceBuffers(t),this.pendingTracks={};var x=this.getSourceBufferTypes();if(x.length===0){this.hls.trigger(m.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}x.forEach(function(f){l.executeNext(f)})}},u.createSourceBuffers=function(s){var l=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var S=0;for(var x in s)if(!l[x]){var f=s[x];if(!f)throw Error("source buffer exists for track "+x+", however track does not");var R=f.levelCodec||f.codec,C=f.container+";codecs="+R;y.logger.log("[buffer-controller]: creating sourceBuffer("+C+")");try{var v=l[x]=t.addSourceBuffer(C),_=x;this.addBufferListener(_,"updatestart",this._onSBUpdateStart),this.addBufferListener(_,"updateend",this._onSBUpdateEnd),this.addBufferListener(_,"error",this._onSBUpdateError),this.tracks[x]={buffer:v,codec:R,container:f.container,levelCodec:f.levelCodec,id:f.id},S++}catch(E){y.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+E.message),this.hls.trigger(m.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:E,mimeType:C})}}S&&this.hls.trigger(m.Events.BUFFER_CREATED,{tracks:this.tracks})},u._onSBUpdateStart=function(s){var l=this.operationQueue,t=l.current(s);t.onStart()},u._onSBUpdateEnd=function(s){var l=this.operationQueue,t=l.current(s);t.onComplete(),l.shiftAndExecuteNext(s)},u._onSBUpdateError=function(s,l){y.logger.error("[buffer-controller]: "+s+" SourceBuffer error",l),this.hls.trigger(m.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(s);t&&t.onError(l)},u.removeExecutor=function(s,l,t){var S=this.media,x=this.mediaSource,f=this.operationQueue,R=this.sourceBuffer,C=R[s];if(!S||!x||!C){y.logger.warn("[buffer-controller]: Attempting to remove from the "+s+" SourceBuffer, but it does not exist"),f.shiftAndExecuteNext(s);return}var v=Object(M.isFiniteNumber)(S.duration)?S.duration:Infinity,_=Object(M.isFiniteNumber)(x.duration)?x.duration:Infinity,E=Math.max(0,l),w=Math.min(t,v,_);w>E?(y.logger.log("[buffer-controller]: Removing ["+E+","+w+"] from the "+s+" SourceBuffer"),console.assert(!C.updating,s+" sourceBuffer must not be updating"),C.remove(E,w)):f.shiftAndExecuteNext(s)},u.appendExecutor=function(s,l){var t=this.operationQueue,S=this.sourceBuffer,x=S[l];if(!x){y.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(l);return}x.ended=!1,console.assert(!x.updating,l+" sourceBuffer must not be updating"),x.appendBuffer(s)},u.blockBuffers=function(s,l){var t=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){y.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(s);return}var S=this.operationQueue,x=l.map(function(f){return S.appendBlocker(f)});Promise.all(x).then(function(){s(),l.forEach(function(f){var R=t.sourceBuffer[f];(!R||!R.updating)&&S.shiftAndExecuteNext(f)})})},u.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},u.addBufferListener=function(s,l,t){var S=this.sourceBuffer[s];if(!S)return;var x=t.bind(this,s);this.listeners[s].push({event:l,listener:x}),S.addEventListener(l,x)},u.removeBufferListeners=function(s){var l=this.sourceBuffer[s];if(!l)return;this.listeners[s].forEach(function(t){l.removeEventListener(t.event,t.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return m});var M=O("./src/utils/logger.ts"),m=function(){function y(b){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=b}var T=y.prototype;return T.append=function(p,d){var n=this.queues[d];n.push(p),n.length===1&&this.buffers[d]&&this.executeNext(d)},T.insertAbort=function(p,d){var n=this.queues[d];n.unshift(p),this.executeNext(d)},T.appendBlocker=function(p){var d,n=new Promise(function(r){d=r}),c={execute:d,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,p),n},T.executeNext=function(p){var d=this.buffers,n=this.queues,c=d[p],r=n[p];if(r.length){var a=r[0];try{a.execute()}catch(o){M.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(o),(!c||!c.updating)&&(r.shift(),this.executeNext(p))}}},T.shiftAndExecuteNext=function(p){this.queues[p].shift(),this.executeNext(p)},T.current=function(p){return this.queues[p][0]},y}()},"./src/controller/cap-level-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/events.ts");function m(b,p){for(var d=0;d0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(n.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},p.getMaxLevel=function(n){var c=this,r=this.hls.levels;if(!r.length)return-1;var a=r.filter(function(o,u){return b.isLevelAllowed(u,c.restrictedLevels)&&u<=n});return this.clientRect=null,b.getMaxLevelByMediaSize(a,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 n=this.media,c={width:0,height:0};if(n){var r=n.getBoundingClientRect();c.width=r.width,c.height=r.height,!c.width&&!c.height&&(c.width=r.right-r.left||n.width||0,c.height=r.bottom-r.top||n.height||0)}return this.clientRect=c,c},b.isLevelAllowed=function(n,c){return c===void 0&&(c=[]),c.indexOf(n)===-1},b.getMaxLevelByMediaSize=function(n,c,r){if(!n||!n.length)return-1;for(var a=function(l,t){return t?l.width!==t.width||l.height!==t.height:!0},o=n.length-1,u=0;u=c||h.height>=r)&&a(h,n[u+1])){o=u;break}}return o},y(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 n=1;try{n=self.devicePixelRatio}catch(c){}return n}}]),b}();g.default=T},"./src/controller/cmcd-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return a});var M=O("./src/events.ts"),m=O("./src/types/cmcd.ts"),y=O("./src/utils/buffer-helper.ts"),T=O("./src/utils/logger.ts");function b(o,u){for(var h=0;h=o.length?{done:!0}:{done:!1,value:o[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.`)}function n(o,u){if(!o)return;if(typeof o=="string")return c(o,u);var h=Object.prototype.toString.call(o).slice(8,-1);if(h==="Object"&&o.constructor&&(h=o.constructor.name),h==="Map"||h==="Set")return Array.from(o);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return c(o,u)}function c(o,u){(u==null||u>o.length)&&(u=o.length);for(var h=0,s=new Array(u);hl&&(l=f.bitrate)}return l>0?l:NaN},u.getBufferLength=function(s){var l=this.hls.media,t=s===m.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!l)return NaN;var S=y.BufferHelper.bufferInfo(t,l.currentTime,this.config.maxBufferHole);return S.len*1e3},u.createPlaylistLoader=function(){var s=this.config.pLoader,l=this.applyPlaylistData,t=s||this.config.loader;return function(){function S(f){this.loader=void 0,this.loader=new t(f)}var x=S.prototype;return x.destroy=function(){this.loader.destroy()},x.abort=function(){this.loader.abort()},x.load=function(R,C,v){l(R),this.loader.load(R,C,v)},p(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},u.createFragmentLoader=function(){var s=this.config.fLoader,l=this.applyFragmentData,t=s||this.config.loader;return function(){function S(f){this.loader=void 0,this.loader=new t(f)}var x=S.prototype;return x.destroy=function(){this.loader.destroy()},x.abort=function(){this.loader.abort()},x.load=function(R,C,v){l(R),this.loader.load(R,C,v)},p(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},o.uuid=function(){var s=URL.createObjectURL(new Blob),l=s.toString();return URL.revokeObjectURL(s),l.substr(l.lastIndexOf("/")+1)},o.serialize=function(s){for(var l=[],t=function(W){return!Number.isNaN(W)&&W!=null&&W!==""&&W!==!1},S=function(W){return Math.round(W)},x=function(W){return S(W/100)*100},f=function(W){return encodeURIComponent(W)},R={br:S,d:S,bl:x,dl:x,mtp:x,nor:f,rtp:x,tb:S},C=Object.keys(s||{}).sort(),v=d(C),_;!(_=v()).done;){var E=_.value,w=s[E];if(!t(w))continue;if(E==="v"&&w===1)continue;if(E=="pr"&&w===1)continue;var k=R[E];k&&(w=k(w));var I=typeof w,L=void 0;E==="ot"||E==="sf"||E==="st"?L=E+"="+w:I==="boolean"?L=E:I==="number"?L=E+"="+w:L=E+"="+JSON.stringify(w),l.push(L)}return l.join(",")},o.toHeaders=function(s){for(var l=Object.keys(s),t={},S=["Object","Request","Session","Status"],x=[{},{},{},{}],f={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,C=l;Rd){this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var f=d-this._requestLicenseFailureCount+1;y.logger.warn("Retrying license request, "+f+" attempts left"),this._requestLicense(l,t)}break}},o._generateLicenseRequestChallenge=function(h,s){switch(h.mediaKeySystemDomain){case T.KeySystems.WIDEVINE:return s}throw new Error("unsupported key-system: "+h.mediaKeySystemDomain)},o._requestLicense=function(h,s){y.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){y.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(l.mediaKeySystemDomain),S=this._createLicenseXhr(t,h,s);y.logger.log("Sending license request to URL: "+t);var x=this._generateLicenseRequestChallenge(l,h);S.send(x)}catch(f){y.logger.error("Failure requesting DRM license: "+f),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(h,s){if(!this._emeEnabled)return;var l=s.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var h=this._media,s=this._mediaKeysList;if(!h)return;h.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(s.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return h.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(h,s){if(!this._emeEnabled)return;var l=s.levels.map(function(S){return S.audioCodec}).filter(function(S){return!!S}),t=s.levels.map(function(S){return S.videoCodec}).filter(function(S){return!!S});this._attemptKeySystemAccess(T.KeySystems.WIDEVINE,l,t)},p(a,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),a}();g.default=r},"./src/controller/fps-controller.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/events.ts"),m=O("./src/utils/logger.ts"),y=function(){function T(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=T.prototype;return b.setStreamController=function(d){this.streamController=d},b.registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},b.unregisterListeners=function(){this.hls.off(M.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,n){var c=this.hls.config;if(c.capLevelOnFPSDrop){var r=n.media instanceof self.HTMLVideoElement?n.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),c.fpsDroppedMonitoringPeriod)}},b.checkFPS=function(d,n,c){var r=performance.now();if(n){if(this.lastTime){var a=r-this.lastTime,o=c-this.lastDroppedFrames,u=n-this.lastDecodedFrames,h=1e3*o/a,s=this.hls;if(s.trigger(M.Events.FPS_DROP,{currentDropped:o,currentDecoded:u,totalDroppedFrames:c}),h>0&&o>s.config.fpsDroppedMonitoringThreshold*u){var l=s.currentLevel;m.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(s.autoLevelCapping===-1||s.autoLevelCapping>=l)&&(l=l-1,s.trigger(M.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:s.currentLevel}),s.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=c,this.lastDecodedFrames=n}},b.checkFPSInterval=function(){var d=this.media;if(d)if(this.isVideoPlaybackQualityAvailable){var n=d.getVideoPlaybackQuality();this.checkFPS(d,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(d,d.webkitDecodedFrameCount,d.webkitDroppedFrameCount)},T}();g.default=y},"./src/controller/fragment-finders.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"findFragmentByPDT",function(){return y}),O.d(g,"findFragmentByPTS",function(){return T}),O.d(g,"fragmentWithinToleranceTest",function(){return b}),O.d(g,"pdtWithinToleranceTest",function(){return p}),O.d(g,"findFragWithCC",function(){return d});var M=O("./src/polyfills/number.ts"),m=O("./src/utils/binary-search.ts");function y(n,c,r){if(c===null||!Array.isArray(n)||!n.length||!Object(M.isFiniteNumber)(c))return null;var a=n[0].programDateTime;if(c<(a||0))return null;var o=n[n.length-1].endProgramDateTime;if(c>=(o||0))return null;r=r||0;for(var u=0;un&&r.start?-1:0}function p(n,c,r){var a=Math.min(c,r.duration+(r.deltaPTS?r.deltaPTS:0))*1e3,o=r.endProgramDateTime||0;return o-a>n}function d(n,c){return m.default.search(n,function(r){return r.ccc?-1:0})}},"./src/controller/fragment-tracker.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"FragmentState",function(){return y}),O.d(g,"FragmentTracker",function(){return T});var M=O("./src/events.ts"),m=O("./src/types/loader.ts"),y;(function(d){d.NOT_LOADED="NOT_LOADED",d.BACKTRACKED="BACKTRACKED",d.APPENDING="APPENDING",d.PARTIAL="PARTIAL",d.OK="OK"})(y||(y={}));var T=function(){function d(c){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=c,this._registerListeners()}var n=d.prototype;return n._registerListeners=function(){var r=this.hls;r.on(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.on(M.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var r=this.hls;r.off(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.off(M.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(r,a){if(a===m.PlaylistLevelType.MAIN){var o=this.activeFragment,u=this.activeParts;if(!o)return null;if(u)for(var h=u.length;h--;){var s=u[h],l=s?s.end:o.appendedPTS;if(s.start<=r&&l!==void 0&&r<=l)return h>9&&(this.activeParts=u.slice(h-9)),s}else if(o.start<=r&&o.appendedPTS!==void 0&&r<=o.appendedPTS)return o}return this.getBufferedFrag(r,a)},n.getBufferedFrag=function(r,a){for(var o=this.fragments,u=Object.keys(o),h=u.length;h--;){var s=o[u[h]];if((s==null?void 0:s.body.type)===a&&s.buffered){var l=s.body;if(l.start<=r&&r<=l.end)return l}}return null},n.detectEvictedFragments=function(r,a,o){var u=this;Object.keys(this.fragments).forEach(function(h){var s=u.fragments[h];if(!s)return;if(!s.buffered){s.body.type===o&&u.removeFragment(s.body);return}var l=s.range[r];if(!l)return;l.time.some(function(t){var S=!u.isTimeBuffered(t.startPTS,t.endPTS,a);return S&&u.removeFragment(s.body),S})})},n.detectPartialFragments=function(r){var a=this,o=this.timeRanges,u=r.frag,h=r.part;if(!o||u.sn==="initSegment")return;var s=p(u),l=this.fragments[s];if(!l)return;Object.keys(o).forEach(function(t){var S=u.elementaryStreams[t];if(!S)return;var x=o[t],f=h!==null||S.partial===!0;l.range[t]=a.getBufferedTimes(u,h,f,x)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},n.fragBuffered=function(r){var a=p(r),o=this.fragments[a];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},n.getBufferedTimes=function(r,a,o,u){for(var h={time:[],partial:o},s=a?a.start:r.start,l=a?a.end:r.end,t=r.minEndPTS||l,S=r.maxStartPTS||s,x=0;x=f&&t<=R){h.time.push({startPTS:Math.max(s,u.start(x)),endPTS:Math.min(l,u.end(x))});break}else if(sf)h.partial=!0,h.time.push({startPTS:Math.max(s,u.start(x)),endPTS:Math.min(l,u.end(x))});else if(l<=f)break}return h},n.getPartialFragment=function(r){var a=null,o,u,h,s=0,l=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(S){var x=t[S];if(!x)return;b(x)&&(u=x.body.start-l,h=x.body.end+l,r>=u&&r<=h&&(o=Math.min(r-u,h-r),s<=o&&(a=x.body,s=o)))}),a},n.getState=function(r){var a=p(r),o=this.fragments[a];return o?o.buffered?b(o)?y.PARTIAL:y.OK:o.backtrack?y.BACKTRACKED:y.APPENDING:y.NOT_LOADED},n.backtrack=function(r,a){var o=p(r),u=this.fragments[o];if(!u||u.backtrack)return null;var h=u.backtrack=a||u.loaded;return u.loaded=null,h},n.getBacktrackData=function(r){var a=p(r),o=this.fragments[a];if(o){var u,h=o.backtrack;if(h!=null&&(u=h.payload)!==null&&u!==void 0&&u.byteLength)return h;this.removeFragment(r)}return null},n.isTimeBuffered=function(r,a,o){for(var u,h,s=0;s=u&&a<=h)return!0;if(a<=u)return!1}return!1},n.onFragLoaded=function(r,a){var o=a.frag,u=a.part;if(o.sn==="initSegment"||o.bitrateTest||u)return;var h=p(o);this.fragments[h]={body:o,loaded:a,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(r,a){var o=this,u=a.frag,h=a.part,s=a.timeRanges;if(u.type===m.PlaylistLevelType.MAIN)if(this.activeFragment=u,h){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(h)}else this.activeParts=null;this.timeRanges=s,Object.keys(s).forEach(function(t){var S=s[t];if(o.detectEvictedFragments(t,S),!h)for(var x=0;xr&&u.removeFragment(l)}})},n.removeFragment=function(r){var a=p(r);r.stats.loaded=0,r.clearElementaryStreamInfo(),delete this.fragments[a]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},d}();function b(d){var n,c;return d.buffered&&(((n=d.range.video)===null||n===void 0?void 0:n.partial)||((c=d.range.audio)===null||c===void 0?void 0:c.partial))}function p(d){return d.type+"_"+d.level+"_"+d.urlId+"_"+d.sn}},"./src/controller/gap-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"STALL_MINIMUM_DURATION_MS",function(){return b}),O.d(g,"MAX_START_GAP_JUMP",function(){return p}),O.d(g,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return d}),O.d(g,"SKIP_BUFFER_RANGE_START",function(){return n}),O.d(g,"default",function(){return c});var M=O("./src/utils/buffer-helper.ts"),m=O("./src/errors.ts"),y=O("./src/events.ts"),T=O("./src/utils/logger.ts"),b=250,p=2,d=.1,n=.05,c=function(){function r(o,u,h,s){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=u,this.fragmentTracker=h,this.hls=s}var a=r.prototype;return a.destroy=function(){this.hls=this.fragmentTracker=this.media=null},a.poll=function(u){var h=this.config,s=this.media,l=this.stalled,t=s.currentTime,S=s.seeking,x=this.seeking&&!S,f=!this.seeking&&S;if(this.seeking=S,t!==u){if(this.moved=!0,l!==null){if(this.stallReported){var R=self.performance.now()-l;T.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((f||x)&&(this.stalled=null),s.paused||s.ended||s.playbackRate===0||!M.BufferHelper.getBuffered(s).length)return;var C=M.BufferHelper.bufferInfo(s,t,0),v=C.len>0,_=C.nextStart||0;if(!v&&!_)return;if(S){var E=C.len>p,w=!_||_-t>p&&!this.fragmentTracker.getPartialFragment(t);if(E||w)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var k,I=Math.max(_,C.start||0)-t,L=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,V=L==null||((k=L.details)===null||k===void 0)?void 0:k.live,W=V?L.details.targetduration*2:p;if(I>0&&I<=W){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(l===null){this.stalled=H;return}var G=H-l;!S&&G>=b&&this._reportStall(C.len);var B=M.BufferHelper.bufferInfo(s,t,h.maxBufferHole);this._tryFixBufferStall(B,G)},a._tryFixBufferStall=function(u,h){var s=this.config,l=this.fragmentTracker,t=this.media,S=t.currentTime,x=l.getPartialFragment(S);if(x){var f=this._trySkipBufferHole(x);if(f)return}u.len>s.maxBufferHole&&h>s.highBufferWatchdogPeriod*1e3&&(T.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},a._reportStall=function(u){var h=this.hls,s=this.media,l=this.stallReported;l||(this.stallReported=!0,T.logger.warn("Playback stalling at @"+s.currentTime+" due to low buffer (buffer="+u+")"),h.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:u}))},a._trySkipBufferHole=function(u){for(var h=this.config,s=this.hls,l=this.media,t=l.currentTime,S=0,x=M.BufferHelper.getBuffered(l),f=0;f=S&&t.05&&this.forwardBufferLength>1){var f=Math.min(2,Math.max(1,s)),R=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;r.playbackRate=Math.min(f,Math.max(1,R))}else r.playbackRate!==1&&r.playbackRate!==0&&(r.playbackRate=1)},n.estimateLiveEdge=function(){var r=this.levelDetails;return r===null?null:r.edge+r.age},n.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,a=this.levelDetails;return r.liveMaxLatencyDuration!==void 0?r.liveMaxLatencyDuration:a?r.liveMaxLatencyDurationCount*a.targetduration:0}},{key:"targetLatency",get:function(){var r=this.levelDetails;if(r===null)return null;var a=r.holdBack,o=r.partHoldBack,u=r.targetduration,h=this.config,s=h.liveSyncDuration,l=h.liveSyncDurationCount,t=h.lowLatencyMode,S=this.hls.userConfig,x=t&&o||a;(S.liveSyncDuration||S.liveSyncDurationCount||x===0)&&(x=s!==void 0?s:l*u);var f=u,R=1;return x+Math.min(this.stallCount*R,f)}},{key:"liveSyncPosition",get:function(){var r=this.estimateLiveEdge(),a=this.targetLatency,o=this.levelDetails;if(r===null||a===null||o===null)return null;var u=o.edge,h=r-a-this.edgeStalled,s=u-o.totalduration,l=u-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(s,h),l)}},{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 a=(this.config.lowLatencyMode&&r.partTarget||r.targetduration)*3;return Math.max(r.age-a,0)}},{key:"forwardBufferLength",get:function(){var r=this.media,a=this.levelDetails;if(!r||!a)return 0;var o=r.buffered.length;return o?r.buffered.end(o-1):a.edge-this.currentTime}}]),d}()},"./src/controller/level-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return h});var M=O("./src/types/level.ts"),m=O("./src/events.ts"),y=O("./src/errors.ts"),T=O("./src/utils/codecs.ts"),b=O("./src/controller/level-helper.ts"),p=O("./src/controller/base-playlist-controller.ts"),d=O("./src/types/loader.ts");function n(){return n=Object.assign||function(s){for(var l=1;l0){_=R[0].bitrate,R.sort(function(G,B){return G.bitrate-B.bitrate}),this._levels=R;for(var V=0;Vthis.hls.config.fragLoadingMaxRetry&&(E=f.frag.level)):E=f.frag.level}break;case y.ErrorDetails.LEVEL_LOAD_ERROR:case y.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(_=!1),E=R.level),v=!0;break;case y.ErrorDetails.REMUX_ALLOC_ERROR:E=f.level,v=!0;break}E!==void 0&&this.recoverLevel(f,E,v,_)},t.recoverLevel=function(x,f,R,C){var v=x.details,_=this._levels[f];if(_.loadError++,R){var E=this.retryLoadingOrFail(x);if(E)x.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(C){var w=_.url.length;if(w>1&&_.loadError1){var C=(f.urlId+1)%R;this.warn("Switching to redundant URL-id "+C),this._levels.forEach(function(v){v.urlId=C}),this.level=x}},t.onFragLoaded=function(x,f){var R=f.frag;if(R!==void 0&&R.type===d.PlaylistLevelType.MAIN){var C=this._levels[R.level];C!==void 0&&(C.fragmentError=0,C.loadError=0)}},t.onLevelLoaded=function(x,f){var R,C=f.level,v=f.details,_=this._levels[C];if(!_){var E;this.warn("Invalid level index "+C),(E=f.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(v.deltaUpdateFailed=!0);return}C===this.currentLevelIndex?(_.fragmentError===0&&(_.loadError=0,this.retryCount=0),this.playlistLoaded(C,f,_.details)):(R=f.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(v.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(x,f){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var C=-1,v=this.hls.audioTracks[f.id].groupId,_=0;_0){var C=R.urlId,v=R.url[C];if(x)try{v=x.addDirectives(v)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("Attempt loading level index "+f+(x?" at sn "+x.msn+" part "+x.part:"")+" with URL-id "+C+" "+v),this.clearTimer(),this.hls.trigger(m.Events.LEVEL_LOADING,{url:v,level:f,id:C,deliveryDirectives:x||null})}},t.removeLevel=function(x,f){var R=function(_,E){return E!==f},C=this._levels.filter(function(v,_){return _!==x?!0:v.url.length>1&&f!==void 0?(v.url=v.url.filter(R),v.audioGroupIds&&(v.audioGroupIds=v.audioGroupIds.filter(R)),v.textGroupIds&&(v.textGroupIds=v.textGroupIds.filter(R)),v.urlId=0,!0):!1}).map(function(v,_){var E=v.details;return E!=null&&E.fragments&&E.fragments.forEach(function(w){w.level=_}),v});this._levels=C,this.hls.trigger(m.Events.LEVELS_UPDATED,{levels:C})},r(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(x){var f,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===x&&(f=R[x])!==null&&f!==void 0&&f.details)return;if(x<0||x>=R.length){var C=x<0;if(this.hls.trigger(m.Events.ERROR,{type:y.ErrorTypes.OTHER_ERROR,details:y.ErrorDetails.LEVEL_SWITCH_ERROR,level:x,fatal:C,reason:"invalid level idx"}),C)return;x=Math.min(x,R.length-1)}this.clearTimer();var v=this.currentLevelIndex,_=R[v],E=R[x];this.log("switching to level "+x+" from "+v),this.currentLevelIndex=x;var w=n({},E,{level:x,maxBitrate:E.maxBitrate,uri:E.uri,urlId:E.urlId});delete w._urlId,this.hls.trigger(m.Events.LEVEL_SWITCHING,w);var k=E.details;if(!k||k.live){var I=this.switchParams(E.uri,_==null?void 0:_.details);this.loadPlaylist(I)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(x){this.manualLevelIndex=x,this._startLevel===void 0&&(this._startLevel=x),x!==-1&&(this.level=x)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(x){this._firstLevel=x}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var x=this.hls.config.startLevel;return x!==void 0?x:this._firstLevel}else return this._startLevel},set:function(x){this._startLevel=x}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(x){this.level=x,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=x)}}]),l}(p.default)},"./src/controller/level-helper.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"addGroupId",function(){return y}),O.d(g,"assignTrackIdsByGroup",function(){return T}),O.d(g,"updatePTS",function(){return b}),O.d(g,"updateFragPTSDTS",function(){return d}),O.d(g,"mergeDetails",function(){return n}),O.d(g,"mapPartIntersection",function(){return c}),O.d(g,"mapFragmentIntersection",function(){return r}),O.d(g,"adjustSliding",function(){return a}),O.d(g,"addSliding",function(){return o}),O.d(g,"computeReloadInterval",function(){return u}),O.d(g,"getFragmentWithSN",function(){return h}),O.d(g,"getPartWith",function(){return s});var M=O("./src/polyfills/number.ts"),m=O("./src/utils/logger.ts");function y(l,t,S){switch(t){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(S);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(S);break}}function T(l){var t={};l.forEach(function(S){var x=S.groupId||"";S.id=t[x]=t[x]||0,t[x]++})}function b(l,t,S){var x=l[t],f=l[S];p(x,f)}function p(l,t){var S=t.startPTS;if(Object(M.isFiniteNumber)(S)){var x=0,f;t.sn>l.sn?(x=S-l.start,f=l):(x=l.start-S,f=t),f.duration!==x&&(f.duration=x)}else if(t.sn>l.sn){var R=l.cc===t.cc;R&&l.minEndPTS?t.start=l.start+(l.minEndPTS-l.start):t.start=l.start+l.duration}else t.start=Math.max(l.start-t.duration,0)}function d(l,t,S,x,f,R){var C=x-S;C<=0&&(m.logger.warn("Fragment should have a positive duration",t),x=S+t.duration,R=f+t.duration);var v=S,_=x,E=t.startPTS,w=t.endPTS;if(Object(M.isFiniteNumber)(E)){var k=Math.abs(E-S);Object(M.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(k,t.deltaPTS):t.deltaPTS=k,v=Math.max(S,E),S=Math.min(S,E),f=Math.min(f,t.startDTS),_=Math.min(x,w),x=Math.max(x,w),R=Math.max(R,t.endDTS)}t.duration=x-S;var I=S-t.start;t.appendedPTS=x,t.start=t.startPTS=S,t.maxStartPTS=v,t.startDTS=f,t.endPTS=x,t.minEndPTS=_,t.endDTS=R;var L=t.sn;if(!l||Ll.endSN)return 0;var V,W=L-l.startSN,H=l.fragments;for(H[W]=t,V=W;V>0;V--)p(H[V],H[V-1]);for(V=W;V=0;f--){var R=x[f].initSegment;if(R){S=R;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var C=0,v;if(r(l,t,function(V,W){V.relurl&&(C=V.cc-W.cc),Object(M.isFiniteNumber)(V.startPTS)&&Object(M.isFiniteNumber)(V.endPTS)&&(W.start=W.startPTS=V.startPTS,W.startDTS=V.startDTS,W.appendedPTS=V.appendedPTS,W.maxStartPTS=V.maxStartPTS,W.endPTS=V.endPTS,W.endDTS=V.endDTS,W.minEndPTS=V.minEndPTS,W.duration=V.endPTS-V.startPTS,W.duration&&(v=W),t.PTSKnown=t.alignedSliding=!0),W.elementaryStreams=V.elementaryStreams,W.loader=V.loader,W.stats=V.stats,W.urlId=V.urlId,V.initSegment&&(W.initSegment=V.initSegment,S=V.initSegment)}),S){var _=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;_.forEach(function(V){var W;(!V.initSegment||V.initSegment.relurl===((W=S)===null||W===void 0?void 0:W.relurl))&&(V.initSegment=S)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(V){return!V}),t.deltaUpdateFailed)){m.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var E=t.skippedSegments;E--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var w=t.fragments;if(C){m.logger.warn("discontinuity sliding from playlist, take drift into account");for(var k=0;k=x.length)return;o(t,x[S].start)}function o(l,t){if(t){for(var S=l.fragments,x=l.skippedSegments;x0&&f0&&_===-1&&(this.log("Override startPosition with lastCurrentTime @"+E.toFixed(3)),_=E),this.state=m.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=_,this.tick()}else this._forceStartLoad=!0,this.state=m.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,f.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case m.State.IDLE:this.doTickIdle();break;case m.State.WAITING_LEVEL:{var _,E=this.levels,w=this.level,k=E==null||((_=E[w])===null||_===void 0)?void 0:_.details;if(k&&(!k.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(k))break;this.state=m.State.IDLE;break}break}case m.State.FRAG_LOADING_WAITING_RETRY:{var I,L=self.performance.now(),V=this.retryDate;(!V||L>=V||(I=this.media)!==null&&I!==void 0&&I.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=m.State.IDLE)}break;default:break}this.onTickEnd()},C.onTickEnd=function(){f.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var _,E,w=this.hls,k=this.levelLastLoaded,I=this.levels,L=this.media,V=w.config,W=w.nextLoadLevel;if(k===null||!L&&(this.startFragRequested||!V.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!I||!I[W])return;var H=I[W];this.level=w.nextLoadLevel=W;var G=H.details;if(!G||this.state===m.State.WAITING_LEVEL||G.live&&this.levelLastLoaded!==W){this.state=m.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:L,d.PlaylistLevelType.MAIN);if(B===null)return;var P=B.len,z=this.getMaxBufferLength(H.maxBitrate);if(P>=z)return;if(this._streamEnded(B,G)){var J={};this.altAudio&&(J.type="video"),this.hls.trigger(T.Events.BUFFER_EOS,J),this.state=m.State.ENDED;return}var ue=B.end,de=this.getNextFragment(ue,G);if(this.couldBacktrack&&!this.fragPrevious&&de&&de.sn!=="initSegment"){var Se=de.sn-G.startSN;Se>1&&(de=G.fragments[Se-1],this.fragmentTracker.removeFragment(de))}if(de&&this.fragmentTracker.getState(de)===p.FragmentState.OK&&this.nextLoadPosition>ue){var Ae=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(L,Ae,d.PlaylistLevelType.MAIN),de=this.getNextFragment(this.nextLoadPosition,G)}if(!de)return;de.initSegment&&!de.initSegment.data&&!this.bitrateTest&&(de=de.initSegment),((_=de.decryptdata)===null||_===void 0?void 0:_.keyFormat)==="identity"&&!((E=de.decryptdata)!==null&&E!==void 0&&E.key)?this.loadKey(de,G):this.loadFragment(de,G,ue)},C.loadFragment=function(_,E,w){var k,I=this.fragmentTracker.getState(_);if(this.fragCurrent=_,I===p.FragmentState.BACKTRACKED){var L=this.fragmentTracker.getBacktrackData(_);if(L){this._handleFragmentLoadProgress(L),this._handleFragmentLoadComplete(L);return}else I=p.FragmentState.NOT_LOADED}I===p.FragmentState.NOT_LOADED||I===p.FragmentState.PARTIAL?_.sn==="initSegment"?this._loadInitSegment(_):this.bitrateTest?(_.bitrateTest=!0,this.log("Fragment "+_.sn+" of level "+_.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(_)):(this.startFragRequested=!0,f.prototype.loadFragment.call(this,_,E,w)):I===p.FragmentState.APPENDING?this.reduceMaxBufferLength(_.duration)&&this.fragmentTracker.removeFragment(_):((k=this.media)===null||k===void 0?void 0:k.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(_){var E=this.fragmentTracker.getAppendedFrag(_,d.PlaylistLevelType.MAIN);return E&&"fragment"in E?E.fragment:E},C.getBufferedFrag=function(_){return this.fragmentTracker.getBufferedFrag(_,d.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(_){return _?this.getBufferedFrag(_.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var _=this.levels,E=this.media;if(E!=null&&E.readyState){var w,k=this.getAppendedFrag(E.currentTime);if(k&&k.start>1&&this.flushMainBuffer(0,k.start-1),!E.paused&&_){var I=this.hls.nextLoadLevel,L=_[I],V=this.fragLastKbps;V&&this.fragCurrent?w=this.fragCurrent.duration*L.maxBitrate/(1e3*V)+1:w=0}else w=0;var W=this.getBufferedFrag(E.currentTime+w);if(W){var H=this.followingBufferedFrag(W);if(H){this.abortCurrentFrag();var G=H.maxStartPTS?H.maxStartPTS:H.start,B=H.duration,P=Math.max(W.end,G+Math.min(Math.max(B-this.config.maxFragLookUpTolerance,B*.5),B*.75));this.flushMainBuffer(P,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var _=this.fragCurrent;this.fragCurrent=null,_!=null&&_.loader&&_.loader.abort(),this.state===m.State.KEY_LOADING&&(this.state=m.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(_,E){f.prototype.flushMainBuffer.call(this,_,E,this.altAudio?"video":null)},C.onMediaAttached=function(_,E){f.prototype.onMediaAttached.call(this,_,E);var w=E.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),w.addEventListener("playing",this.onvplaying),w.addEventListener("seeked",this.onvseeked),this.gapController=new a.default(this.config,w,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var _=this.media;_&&(_.removeEventListener("playing",this.onvplaying),_.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),f.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var _=this.media,E=_?_.currentTime:null;Object(M.isFiniteNumber)(E)&&this.log("Media seeked to "+E.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(T.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(_,E){var w=!1,k=!1,I;E.levels.forEach(function(L){I=L.audioCodec,I&&(I.indexOf("mp4a.40.2")!==-1&&(w=!0),I.indexOf("mp4a.40.5")!==-1&&(k=!0))}),this.audioCodecSwitch=w&&k&&!Object(y.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},C.onLevelLoading=function(_,E){var w=this.levels;if(!w||this.state!==m.State.IDLE)return;var k=w[E.level];(!k.details||k.details.live&&this.levelLastLoaded!==E.level||this.waitForCdnTuneIn(k.details))&&(this.state=m.State.WAITING_LEVEL)},C.onLevelLoaded=function(_,E){var w,k=this.levels,I=E.level,L=E.details,V=L.totalduration;if(!k){this.warn("Levels were reset while loading level "+I);return}this.log("Level "+I+" loaded ["+L.startSN+","+L.endSN+"], cc ["+L.startCC+", "+L.endCC+"] duration:"+V);var W=this.fragCurrent;W&&(this.state===m.State.FRAG_LOADING||this.state===m.State.FRAG_LOADING_WAITING_RETRY)&&(W.level!==E.level&&W.loader&&(this.state=m.State.IDLE,W.loader.abort()));var H=k[I],G=0;if(L.live||(w=H.details)!==null&&w!==void 0&&w.live){if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed)return;G=this.alignPlaylists(L,H.details)}if(H.details=L,this.levelLastLoaded=I,this.hls.trigger(T.Events.LEVEL_UPDATED,{details:L,level:I}),this.state===m.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(L))return;this.state=m.State.IDLE}this.startFragRequested?L.live&&this.synchronizeToLiveEdge(L):this.setStartPosition(L,G),this.tick()},C._handleFragmentLoadProgress=function(_){var E,w=_.frag,k=_.part,I=_.payload,L=this.levels;if(!L){this.warn("Levels were reset while fragment load was in progress. Fragment "+w.sn+" of level "+w.level+" will not be buffered");return}var V=L[w.level],W=V.details;if(!W){this.warn("Dropping fragment "+w.sn+" of level "+w.level+" after level details were reset");return}var H=V.videoCodec,G=W.PTSKnown||!W.live,B=(E=w.initSegment)===null||E===void 0?void 0:E.data,P=this._getAudioCodec(V),z=this.transmuxer=this.transmuxer||new c.default(this.hls,d.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),J=k?k.index:-1,ue=J!==-1,de=new r.ChunkMetadata(w.level,w.sn,w.stats.chunkCount,I.byteLength,J,ue),Se=this.initPTS[w.cc];z.push(I,B,P,H,w,k,W.totalduration,G,de,Se)},C.onAudioTrackSwitching=function(_,E){var w=this.altAudio,k=!!E.url,I=E.id;if(!k){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var L=this.fragCurrent;L!=null&&L.loader&&(this.log("Switching to main audio track, cancel main fragment load"),L.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var V=this.hls;w&&V.trigger(T.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),V.trigger(T.Events.AUDIO_TRACK_SWITCHED,{id:I})}},C.onAudioTrackSwitched=function(_,E){var w=E.id,k=!!this.hls.audioTracks[w].url;if(k){var I=this.videoBuffer;I&&this.mediaBuffer!==I&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=I)}this.altAudio=k,this.tick()},C.onBufferCreated=function(_,E){var w=E.tracks,k,I,L=!1;for(var V in w){var W=w[V];if(W.id==="main"){if(I=V,k=W,V==="video"){var H=w[V];H&&(this.videoBuffer=H.buffer)}}else L=!0}L&&k?(this.log("Alternate track found, use "+I+".buffered to schedule main fragment loading"),this.mediaBuffer=k.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(_,E){var w=E.frag,k=E.part;if(w&&w.type!==d.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(w)){this.warn("Fragment "+w.sn+(k?" p: "+k.index:"")+" of level "+w.level+" finished buffering, but was aborted. state: "+this.state),this.state===m.State.PARSED&&(this.state=m.State.IDLE);return}var I=k?k.stats:w.stats;this.fragLastKbps=Math.round(8*I.total/(I.buffering.end-I.loading.first)),w.sn!=="initSegment"&&(this.fragPrevious=w),this.fragBufferedComplete(w,k)},C.onError=function(_,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!==m.State.ERROR&&(E.fatal?(this.warn(""+E.details),this.state=m.State.ERROR):!E.levelRetry&&this.state===m.State.WAITING_LEVEL&&(this.state=m.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(E.parent==="main"&&(this.state===m.State.PARSING||this.state===m.State.PARSED)){var w=!0,k=this.getFwdBufferInfo(this.media,d.PlaylistLevelType.MAIN);k&&k.len>.5&&(w=!this.reduceMaxBufferLength(k.len)),w&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},C.checkBuffer=function(){var _=this.media,E=this.gapController;if(!_||!E||!_.readyState)return;var w=b.BufferHelper.getBuffered(_);!this.loadedmetadata&&w.length?(this.loadedmetadata=!0,this.seekToStartPos()):E.poll(this.lastCurrentTime),this.lastCurrentTime=_.currentTime},C.onFragLoadEmergencyAborted=function(){this.state=m.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(_,E){var w=E.type;if(w!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var k=(w===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(k,w,d.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(_,E){this.levels=E.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var _=this.media,E=_.currentTime,w=this.startPosition;if(w>=0&&E0&&(L1&&_.seeking===!1){var w=_.currentTime;if(b.BufferHelper.isBuffered(_,w)?E=this.getAppendedFrag(w):b.BufferHelper.isBuffered(_,w+.1)&&(E=this.getAppendedFrag(w+.1)),E){var k=this.fragPlaying,I=E.level;(!k||E.sn!==k.sn||k.level!==I||E.urlId!==k.urlId)&&(this.hls.trigger(T.Events.FRAG_CHANGED,{frag:E}),(!k||k.level!==I)&&this.hls.trigger(T.Events.LEVEL_SWITCHED,{level:I}),this.fragPlaying=E)}}},s(R,[{key:"nextLevel",get:function(){var _=this.nextBufferedFrag;return _?_.level:-1}},{key:"currentLevel",get:function(){var _=this.media;if(_){var E=this.getAppendedFrag(_.currentTime);if(E)return E.level}return-1}},{key:"nextBufferedFrag",get:function(){var _=this.media;if(_){var E=this.getAppendedFrag(_.currentTime);return this.followingBufferedFrag(E)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(m.default)},"./src/controller/subtitle-stream-controller.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"SubtitleStreamController",function(){return l});var M=O("./src/events.ts"),m=O("./src/utils/logger.ts"),y=O("./src/utils/buffer-helper.ts"),T=O("./src/controller/fragment-finders.ts"),b=O("./src/utils/discontinuities.ts"),p=O("./src/controller/level-helper.ts"),d=O("./src/controller/fragment-tracker.ts"),n=O("./src/controller/base-stream-controller.ts"),c=O("./src/types/loader.ts"),r=O("./src/types/level.ts");function a(t,S){for(var x=0;x=E[I].start&&k<=E[I].end){w=E[I];break}var L=v.start+v.duration;w?w.end=L:(w={start:k,end:L},E.push(w)),this.fragmentTracker.fragBuffered(v)},x.onBufferFlushing=function(R,C){var v=C.startOffset,_=C.endOffset;if(v===0&&_!==Number.POSITIVE_INFINITY){var E=this.currentTrackId,w=this.levels;if(!w.length||!w[E]||!w[E].details)return;var k=w[E].details,I=k.targetduration,L=_-I;if(L<=0)return;C.endOffsetSubtitles=Math.max(0,L),this.tracksBuffered.forEach(function(V){for(var W=0;W=k.length||E!==w||!I)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,_.live||(v=I.details)!==null&&v!==void 0&&v.live){var L=this.mainDetails;if(_.deltaUpdateFailed||!L)return;var V=L.fragments[0];if(!I.details)_.hasProgramDateTime&&L.hasProgramDateTime?Object(b.alignMediaPlaylistByPDT)(_,L):V&&Object(p.addSliding)(_,V.start);else{var W=this.alignPlaylists(_,I.details);W===0&&V&&Object(p.addSliding)(_,V.start)}}if(I.details=_,this.levelLastLoaded=E,this.tick(),_.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var H=Object(T.findFragmentByPTS)(null,_.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),I.details=void 0)}},x._handleFragmentLoadComplete=function(R){var C=R.frag,v=R.payload,_=C.decryptdata,E=this.hls;if(this.fragContextChanged(C))return;if(v&&v.byteLength>0&&_&&_.key&&_.iv&&_.method==="AES-128"){var w=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(v),_.key.buffer,_.iv.buffer).then(function(k){var I=performance.now();E.trigger(M.Events.FRAG_DECRYPTED,{frag:C,payload:k,stats:{tstart:w,tdecrypt:I}})})}},x.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var R,C=this.currentTrackId,v=this.levels;if(!v.length||!v[C]||!v[C].details)return;var _=v[C].details,E=_.targetduration,w=this.config,k=this.media,I=y.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,k.currentTime-E,w.maxBufferHole),L=I.end,V=I.len,W=this.getMaxBufferLength()+E;if(V>W)return;console.assert(_,"Subtitle track details are defined on idle subtitle stream controller tick");var H=_.fragments,G=H.length,B=_.edge,P,z=this.fragPrevious;if(L-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)},u.pollTrackChange=function(s){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,s)},u.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 s=r(this.media.textTracks);s.forEach(function(l){Object(m.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},u.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},u.onManifestParsed=function(s,l){this.tracks=l.subtitleTracks},u.onSubtitleTrackLoaded=function(s,l){var t=l.id,S=l.details,x=this.trackId,f=this.tracksInGroup[x];if(!f){this.warn("Invalid subtitle track id "+t);return}var R=f.details;f.details=l.details,this.log("subtitle track "+t+" loaded ["+S.startSN+"-"+S.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,l,R))},u.onLevelLoading=function(s,l){this.switchLevel(l.level)},u.onLevelSwitching=function(s,l){this.switchLevel(l.level)},u.switchLevel=function(s){var l=this.hls.levels[s];if(!(l!=null&&l.textGroupIds))return;var t=l.textGroupIds[l.urlId];if(this.groupId!==t){var S=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,x=this.tracks.filter(function(C){return!t||C.groupId===t});this.tracksInGroup=x;var f=this.findTrackId(S==null?void 0:S.name)||this.findTrackId();this.groupId=t;var R={subtitleTracks:x};this.log("Updating subtitle tracks, "+x.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(M.Events.SUBTITLE_TRACKS_UPDATED,R),f!==-1&&this.setSubtitleTrack(f,S)}},u.findTrackId=function(s){for(var l=this.tracksInGroup,t=0;t=S.length)return;this.clearTimer();var x=S[s];if(this.log("Switching to subtitle track "+s),this.trackId=s,x){var f=x.id,R=x.groupId,C=R===void 0?"":R,v=x.name,_=x.type,E=x.url;this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:f,groupId:C,name:v,type:_,url:E});var w=this.switchParams(x.url,l==null?void 0:l.details);this.loadPlaylist(w)}else this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:s})},u.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var s=-1,l=r(this.media.textTracks),t=0;t=0&&(_[0]=Math.min(_[0],S),_[1]=Math.max(_[1],x),C=!0,E/(x-S)>.5))return}if(C||R.push([S,x]),this.config.renderTextTracksNatively){var w=this.captionsTracks[t];this.Cues.newCue(w,S,x,f)}else{var k=this.Cues.newCue(null,S,x,f);this.hls.trigger(m.Events.CUES_PARSED,{type:"captions",cues:k,track:t})}},s.onInitPtsFound=function(t,S){var x=this,f=S.frag,R=S.id,C=S.initPTS,v=S.timescale,_=this.unparsedVttFrags;R==="main"&&(this.initPTS[f.cc]=C,this.timescale[f.cc]=v),_.length&&(this.unparsedVttFrags=[],_.forEach(function(E){x.onFragLoaded(m.Events.FRAG_LOADED,E)}))},s.getExistingTrack=function(t){var S=this.media;if(S)for(var x=0;x>>8^v&255^99,d[f]=v,n[v]=f;var _=x[f],E=x[_],w=x[E],k=x[v]*257^v*16843008;r[f]=k<<24|k>>>8,a[f]=k<<16|k>>>16,o[f]=k<<8|k>>>24,u[f]=k,k=w*16843009^E*65537^_*257^f*16843008,s[v]=k<<24|k>>>8,l[v]=k<<16|k>>>16,t[v]=k<<8|k>>>24,S[v]=k,f?(f=_^x[x[x[w^_]]],R^=x[x[R]]):f=R=1}},b.expandKey=function(d){for(var n=this.uint8ArrayToUint32Array_(d),c=!0,r=0;r>>6)+1;var k=(t[S+2]&60)>>>2;if(k>w.length-1){l.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+k});return}return C=(t[S+2]&1)<<2,C|=(t[S+3]&192)>>>6,M.logger.log("manifest codec:"+x+", ADTS type:"+f+", samplingIndex:"+k),/firefox/i.test(_)?k>=6?(f=5,v=new Array(4),R=k-3):(f=2,v=new Array(2),R=k):_.indexOf("android")!==-1?(f=2,v=new Array(2),R=k):(f=5,v=new Array(4),x&&(x.indexOf("mp4a.40.29")!==-1||x.indexOf("mp4a.40.5")!==-1)||!x&&k>=6?R=k-3:((x&&x.indexOf("mp4a.40.2")!==-1&&(k>=6&&C===1||/vivaldi/i.test(_))||!x&&C===1)&&(f=2,v=new Array(2)),R=k)),v[0]=f<<3,v[0]|=(k&14)>>1,v[1]|=(k&1)<<7,v[1]|=C<<3,f===5&&(v[1]|=(R&14)>>1,v[2]=(R&1)<<7,v[2]|=2<<2,v[3]=0),{config:v,samplerate:w[k],channelCount:C,codec:"mp4a.40."+f,manifestCodec:E}}function b(l,t){return l[t]===255&&(l[t+1]&246)===240}function p(l,t){return l[t+1]&1?7:9}function d(l,t){return(l[t+3]&3)<<11|l[t+4]<<3|(l[t+5]&224)>>>5}function n(l,t){return t+5=l.length)return!1;var x=d(l,t);if(x<=S)return!1;var f=t+x;return f===l.length||c(l,f)}return!1}function o(l,t,S,x,f){if(!l.samplerate){var R=T(t,S,x,f);if(!R)return;l.config=R.config,l.samplerate=R.samplerate,l.channelCount=R.channelCount,l.codec=R.codec,l.manifestCodec=R.manifestCodec,M.logger.log("parsed codec:"+l.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function u(l){return 1024*9e4/l}function h(l,t,S,x,f){var R=p(l,t),C=d(l,t);if(C-=R,C>0){var v=S+x*f;return{headerLength:R,frameLength:C,stamp:v}}}function s(l,t,S,x,f){var R=u(l.samplerate),C=h(t,S,x,f,R);if(C){var v=C.frameLength,_=C.headerLength,E=C.stamp,w=_+v,k=Math.max(0,S+w-t.length),I;k?(I=new Uint8Array(w-_),I.set(t.subarray(S+_,t.length),0)):I=t.subarray(S+_,S+w);var L={unit:I,pts:E};return k||l.samples.push(L),{sample:L,length:w,missing:k}}}},"./src/demux/base-audio-demuxer.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"initPTSFn",function(){return d});var M=O("./src/polyfills/number.ts"),m=O("./src/demux/id3.ts"),y=O("./src/demux/dummy-demuxed-track.ts"),T=O("./src/utils/mp4-tools.ts"),b=O("./src/utils/typed-array.ts"),p=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var c=n.prototype;return c.resetInitSegment=function(a,o,u){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(){},c.resetContiguity=function(){},c.canParse=function(a,o){return!1},c.appendFrame=function(a,o,u){},c.demux=function(a,o){this.cachedData&&(a=Object(T.appendUint8Array)(this.cachedData,a),this.cachedData=null);var u=m.getID3Data(a,0),h=u?u.length:0,s,l,t=this._audioTrack,S=this._id3Track,x=u?m.getTimeStamp(u):void 0,f=a.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=d(x,o)),u&&u.length>0&&S.samples.push({pts:this.initPTS,dts:this.initPTS,data:u}),l=this.initPTS;hp?(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)},T.readBits=function(p){var d=Math.min(this.bitsAvailable,p),n=this.word>>>32-d;return p>32&&M.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?n<>>p)!==0)return this.word<<=p,this.bitsAvailable-=p,p;return this.loadWord(),p+this.skipLZ()},T.skipUEG=function(){this.skipBits(1+this.skipLZ())},T.skipEG=function(){this.skipBits(1+this.skipLZ())},T.readUEG=function(){var p=this.skipLZ();return this.readBits(p+1)-1},T.readEG=function(){var p=this.readUEG();return 1&p?1+p>>>1:-1*(p>>>1)},T.readBoolean=function(){return this.readBits(1)===1},T.readUByte=function(){return this.readBits(8)},T.readUShort=function(){return this.readBits(16)},T.readUInt=function(){return this.readBits(32)},T.skipScalingList=function(p){for(var d=8,n=8,c,r=0;r0?f.subarray(C,C+v):void 0},T=function(f,R){var C=0;return C=(f[R]&127)<<21,C|=(f[R+1]&127)<<14,C|=(f[R+2]&127)<<7,C|=f[R+3]&127,C},b=function(f,R){return M(f,R)&&T(f,R+6)+10<=f.length-R},p=function(f){for(var R=c(f),C=0;C>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:L+=String.fromCharCode(w);break;case 12:case 13:k=f[V++],L+=String.fromCharCode((w&31)<<6|k&63);break;case 14:k=f[V++],I=f[V++],L+=String.fromCharCode((w&15)<<12|(k&63)<<6|(I&63)<<0);break;default:}}return L},l={decodeTextFrame:o},t;function S(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/demux/base-audio-demuxer.ts"),m=O("./src/demux/id3.ts"),y=O("./src/utils/logger.ts"),T=O("./src/demux/mpegaudio.ts");function b(n,c){n.prototype=Object.create(c.prototype),n.prototype.constructor=n,p(n,c)}function p(n,c){return p=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},p(n,c)}var d=function(n){b(c,n);function c(){return n.apply(this,arguments)||this}var r=c.prototype;return r.resetInitSegment=function(o,u,h){n.prototype.resetInitSegment.call(this,o,u,h),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:h,inputTimeScale:9e4,dropped:0}},c.probe=function(o){if(!o)return!1;for(var u=m.getID3Data(o,0)||[],h=u.length,s=o.length;h0},b.demux=function(d){var n=d,c=Object(m.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(M.appendUint8Array)(this.remainderData,d));var r=Object(M.segmentValidRange)(n);this.remainderData=r.remainder,c.samples=r.valid||new Uint8Array}else c.samples=n;return{audioTrack:Object(m.dummyTrack)(),avcTrack:c,id3Track:Object(m.dummyTrack)(),textTrack:Object(m.dummyTrack)()}},b.flush=function(){var d=Object(m.dummyTrack)();return d.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(m.dummyTrack)(),avcTrack:d,id3Track:Object(m.dummyTrack)(),textTrack:Object(m.dummyTrack)()}},b.demuxSampleAes=function(d,n,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},b.destroy=function(){},T}();y.minProbeByteLength=1024,g.default=y},"./src/demux/mpegaudio.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"appendFrame",function(){return p}),O.d(g,"parseHeader",function(){return d}),O.d(g,"isHeaderPattern",function(){return n}),O.d(g,"isHeader",function(){return c}),O.d(g,"canParse",function(){return r}),O.d(g,"probe",function(){return a});var M=null,m=[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],y=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],T=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],b=[0,1,1,4];function p(o,u,h,s,l){if(h+24>u.length)return;var t=d(u,h);if(t&&h+t.frameLength<=u.length){var S=t.samplesPerFrame*9e4/t.sampleRate,x=s+l*S,f={unit:u.subarray(h,h+t.frameLength),pts:x,dts:x};return o.config=[],o.channelCount=t.channelCount,o.samplerate=t.sampleRate,o.samples.push(f),{sample:f,length:t.frameLength,missing:0}}}function d(o,u){var h=o[u+1]>>3&3,s=o[u+1]>>1&3,l=o[u+2]>>4&15,t=o[u+2]>>2&3;if(h!==1&&l!==0&&l!==15&&t!==3){var S=o[u+2]>>1&1,x=o[u+3]>>6,f=h===3?3-s:s===3?3:4,R=m[f*14+l-1]*1e3,C=h===3?0:h===2?1:2,v=y[C*3+t],_=x===3?1:2,E=T[h][s],w=b[s],k=E*8*w,I=Math.floor(E*R/v+S)*w;if(M===null){var L=navigator.userAgent||"",V=L.match(/Chrome\/(\d+)/i);M=V?parseInt(V[1]):0}var W=!!M&&M<=87;return W&&s===2&&R>=224e3&&x===0&&(o[u+3]=o[u+3]|128),{sampleRate:v,channelCount:_,frameLength:I,samplesPerFrame:k}}}function n(o,u){return o[u]===255&&(o[u+1]&224)===224&&(o[u+1]&6)!==0}function c(o,u){return u+1=d.length){c();return}if(d[n].unit.length<32)continue;var r=this.decrypter.isSync();if(this.decryptAacSample(d,n,c,r),!r)return}},b.getAvcEncryptedData=function(d){for(var n=Math.floor((d.length-48)/160)*16+16,c=new Int8Array(n),r=0,a=32;a<=d.length-16;a+=160,r+=16)c.set(d.subarray(a,a+16),r);return c},b.getAvcDecryptedUnit=function(d,n){for(var c=new Uint8Array(n),r=0,a=32;a<=d.length-16;a+=160,r+=16)d.set(c.subarray(r,r+16),a);return d},b.decryptAvcSample=function(d,n,c,r,a,o){var u=Object(m.discardEPB)(a.data),h=this.getAvcEncryptedData(u),s=this;this.decryptBuffer(h.buffer,function(l){a.data=s.getAvcDecryptedUnit(u,l),o||s.decryptAvcSamples(d,n,c+1,r)})},b.decryptAvcSamples=function(d,n,c,r){if(d instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,c=0){if(n>=d.length){r();return}for(var a=d[n].units;!(c>=a.length);c++){var o=a[c];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var u=this.decrypter.isSync();if(this.decryptAvcSample(d,n,c,r,o,u),!u)return}}},T}();g.default=y},"./src/demux/transmuxer-interface.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return a});var M=O("./node_modules/webworkify-webpack/index.js"),m=O.n(M),y=O("./src/events.ts"),T=O("./src/demux/transmuxer.ts"),b=O("./src/utils/logger.ts"),p=O("./src/errors.ts"),d=O("./src/utils/mediasource-helper.ts"),n=O("./node_modules/eventemitter3/index.js"),c=O.n(n),r=Object(d.getMediaSource)()||{isTypeSupported:function(){return!1}},a=function(){function o(h,s,l,t){var S=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=h,this.id=s,this.onTransmuxComplete=l,this.onFlush=t;var x=h.config,f=function(E,w){w=w||{},w.frag=S.frag,w.id=S.id,h.trigger(E,w)};this.observer=new n.EventEmitter,this.observer.on(y.Events.FRAG_DECRYPTED,f),this.observer.on(y.Events.ERROR,f);var R={mp4:r.isTypeSupported("video/mp4"),mpeg:r.isTypeSupported("audio/mpeg"),mp3:r.isTypeSupported('audio/mp4; codecs="mp3"')},C=navigator.vendor;if(x.enableWorker&&typeof Worker!="undefined"){b.logger.log("demuxing in webworker");var v;try{v=this.worker=M("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),v.addEventListener("message",this.onwmsg),v.onerror=function(_){h.trigger(y.Events.ERROR,{type:p.ErrorTypes.OTHER_ERROR,details:p.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(_.message+" ("+_.filename+":"+_.lineno+")")})},v.postMessage({cmd:"init",typeSupported:R,vendor:C,id:s,config:JSON.stringify(x)})}catch(_){b.logger.warn("Error in worker:",_),b.logger.error("Error while initializing DemuxerWorker, fallback to inline"),v&&self.URL.revokeObjectURL(v.objectURL),this.transmuxer=new T.default(this.observer,R,x,C,s),this.worker=null}}else this.transmuxer=new T.default(this.observer,R,x,C,s)}var u=o.prototype;return u.destroy=function(){var s=this.worker;if(s)s.removeEventListener("message",this.onwmsg),s.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},u.push=function(s,l,t,S,x,f,R,C,v,_){var E=this;v.transmuxing.start=self.performance.now();var w=this.transmuxer,k=this.worker,I=f?f.start:x.start,L=x.decryptdata,V=this.frag,W=!(V&&x.cc===V.cc),H=!(V&&v.level===V.level),G=V?v.sn-V.sn:-1,B=this.part?v.part-this.part.index:1,P=!H&&(G===1||G===0&&B===1),z=self.performance.now();(H||G||x.stats.parsing.start===0)&&(x.stats.parsing.start=z),f&&(B||!P)&&(f.stats.parsing.start=z);var J=new T.TransmuxState(W,P,C,H,I);if(!P||W){b.logger.log("[transmuxer-interface, "+x.type+"]: Starting new transmux session for sn: "+v.sn+" p: "+v.part+" level: "+v.level+" id: "+v.id+` discontinuity: `+W+` trackSwitch: `+H+` contiguous: `+P+` accurateTimeOffset: `+C+` timeOffset: `+I);var ue=new T.TransmuxConfig(t,S,l,R,_);this.configureTransmuxer(ue)}if(this.frag=x,this.part=f,k)k.postMessage({cmd:"demux",data:s,decryptdata:L,chunkMeta:v,state:J},s instanceof ArrayBuffer?[s]:[]);else if(w){var de=w.push(s,L,v,J);Object(T.isPromise)(de)?de.then(function(Se){E.handleTransmuxComplete(Se)}):this.handleTransmuxComplete(de)}},u.flush=function(s){var l=this;s.transmuxing.start=self.performance.now();var t=this.transmuxer,S=this.worker;if(S)S.postMessage({cmd:"flush",chunkMeta:s});else if(t){var x=t.flush(s);Object(T.isPromise)(x)?x.then(function(f){l.handleFlushResult(f,s)}):this.handleFlushResult(x,s)}},u.handleFlushResult=function(s,l){var t=this;s.forEach(function(S){t.handleTransmuxComplete(S)}),this.onFlush(l)},u.onWorkerMessage=function(s){var l=s.data,t=this.hls;switch(l.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.id=this.id,t.trigger(l.event,l.data);break}}},u.configureTransmuxer=function(s){var l=this.worker,t=this.transmuxer;l?l.postMessage({cmd:"configure",config:s}):t&&t.configure(s)},u.handleTransmuxComplete=function(s){s.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(s)},o}()},"./src/demux/transmuxer-worker.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return p});var M=O("./src/demux/transmuxer.ts"),m=O("./src/events.ts"),y=O("./src/utils/logger.ts"),T=O("./node_modules/eventemitter3/index.js"),b=O.n(T);function p(a){var o=new T.EventEmitter,u=function(s,l){a.postMessage({event:s,data:l})};o.on(m.Events.FRAG_DECRYPTED,u),o.on(m.Events.ERROR,u),a.addEventListener("message",function(h){var s=h.data;switch(s.cmd){case"init":{var l=JSON.parse(s.config);a.transmuxer=new M.default(o,s.typeSupported,l,s.vendor,s.id),Object(y.enableLogs)(l.debug),u("init",null);break}case"configure":{a.transmuxer.configure(s.config);break}case"demux":{var t=a.transmuxer.push(s.data,s.decryptdata,s.chunkMeta,s.state);Object(M.isPromise)(t)?t.then(function(f){d(a,f)}):d(a,t);break}case"flush":{var S=s.chunkMeta,x=a.transmuxer.flush(S);Object(M.isPromise)(x)?x.then(function(f){c(a,f,S)}):c(a,x,S);break}default:break}})}function d(a,o){if(r(o.remuxResult))return;var u=[],h=o.remuxResult,s=h.audio,l=h.video;s&&n(u,s),l&&n(u,l),a.postMessage({event:"transmuxComplete",data:o},u)}function n(a,o){o.data1&&a.push(o.data1.buffer),o.data2&&a.push(o.data2.buffer)}function c(a,o,u){o.forEach(function(h){d(a,h)}),a.postMessage({event:"flush",data:u})}function r(a){return!a.audio&&!a.video&&!a.text&&!a.id3&&!a.initSegment}},"./src/demux/transmuxer.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return l}),O.d(g,"isPromise",function(){return x}),O.d(g,"TransmuxConfig",function(){return f}),O.d(g,"TransmuxState",function(){return R});var M=O("./src/events.ts"),m=O("./src/errors.ts"),y=O("./src/crypt/decrypter.ts"),T=O("./src/demux/aacdemuxer.ts"),b=O("./src/demux/mp4demuxer.ts"),p=O("./src/demux/tsdemuxer.ts"),d=O("./src/demux/mp3demuxer.ts"),n=O("./src/remux/mp4-remuxer.ts"),c=O("./src/remux/passthrough-remuxer.ts"),r=O("./src/demux/chunk-cache.ts"),a=O("./src/utils/mp4-tools.ts"),o=O("./src/utils/logger.ts"),u;try{u=self.performance.now.bind(self.performance)}catch(C){o.logger.debug("Unable to use Performance API on this environment"),u=self.Date.now}var h=[{demux:p.default,remux:n.default},{demux:b.default,remux:c.default},{demux:T.default,remux:n.default},{demux:d.default,remux:n.default}],s=1024;h.forEach(function(C){var v=C.demux;s=Math.max(s,v.minProbeByteLength)});var l=function(){function C(_,E,w,k,I){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=_,this.typeSupported=E,this.config=w,this.vendor=k,this.id=I}var v=C.prototype;return v.configure=function(E){this.transmuxConfig=E,this.decrypter&&this.decrypter.reset()},v.push=function(E,w,k,I){var L=this,V=k.transmuxing;V.executeStart=u();var W=new Uint8Array(E),H=this.cache,G=this.config,B=this.currentTransmuxState,P=this.transmuxConfig;I&&(this.currentTransmuxState=I);var z=t(W,w);if(z&&z.method==="AES-128"){var J=this.getDecrypter();if(G.enableSoftwareAES){var ue=J.softwareDecrypt(W,z.key.buffer,z.iv.buffer);if(!ue)return V.executeEnd=u(),S(k);W=new Uint8Array(ue)}else return this.decryptionPromise=J.webCryptoDecrypt(W,z.key.buffer,z.iv.buffer).then(function(Z){var X=L.push(Z,null,k);return L.decryptionPromise=null,X}),this.decryptionPromise}var de=I||B,Se=de.contiguous,Ae=de.discontinuity,pe=de.trackSwitch,Oe=de.accurateTimeOffset,ye=de.timeOffset,ce=P.audioCodec,ae=P.videoCodec,re=P.defaultInitPts,fe=P.duration,te=P.initSegmentData;if((Ae||pe)&&this.resetInitSegment(te,ce,ae,fe),Ae&&this.resetInitialTimestamp(re),Se||this.resetContiguity(),this.needsProbing(W,Ae,pe)){if(H.dataLength){var ne=H.flush();W=Object(a.appendUint8Array)(ne,W)}this.configureTransmuxer(W,P)}var Te=this.transmux(W,z,ye,Oe,k),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,V.executeEnd=u(),Te},v.flush=function(E){var w=this,k=E.transmuxing;k.executeStart=u();var I=this.decrypter,L=this.cache,V=this.currentTransmuxState,W=this.decryptionPromise;if(W)return W.then(function(){return w.flush(E)});var H=[],G=V.timeOffset;if(I){var B=I.flush();B&&H.push(this.push(B,null,E))}var P=L.dataLength;L.reset();var z=this.demuxer,J=this.remuxer;if(!z||!J)return P>=s&&this.observer.emit(M.Events.ERROR,M.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),k.executeEnd=u(),[S(E)];var ue=z.flush(G);return x(ue)?ue.then(function(de){return w.flushRemux(H,de,E),H}):(this.flushRemux(H,ue,E),H)},v.flushRemux=function(E,w,k){var I=w.audioTrack,L=w.avcTrack,V=w.id3Track,W=w.textTrack,H=this.currentTransmuxState,G=H.accurateTimeOffset,B=H.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+k.sn+(k.part>-1?" p: "+k.part:"")+" of level "+k.level);var P=this.remuxer.remux(I,L,V,W,B,G,!0,this.id);E.push({remuxResult:P,chunkMeta:k}),k.transmuxing.executeEnd=u()},v.resetInitialTimestamp=function(E){var w=this.demuxer,k=this.remuxer;if(!w||!k)return;w.resetTimeStamp(E),k.resetTimeStamp(E)},v.resetContiguity=function(){var E=this.demuxer,w=this.remuxer;if(!E||!w)return;E.resetContiguity(),w.resetNextTimestamp()},v.resetInitSegment=function(E,w,k,I){var L=this.demuxer,V=this.remuxer;if(!L||!V)return;L.resetInitSegment(w,k,I),V.resetInitSegment(E,w,k)},v.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},v.transmux=function(E,w,k,I,L){var V;return w&&w.method==="SAMPLE-AES"?V=this.transmuxSampleAes(E,w,k,I,L):V=this.transmuxUnencrypted(E,k,I,L),V},v.transmuxUnencrypted=function(E,w,k,I){var L=this.demuxer.demux(E,w,!1,!this.config.progressive),V=L.audioTrack,W=L.avcTrack,H=L.id3Track,G=L.textTrack,B=this.remuxer.remux(V,W,H,G,w,k,!1,this.id);return{remuxResult:B,chunkMeta:I}},v.transmuxSampleAes=function(E,w,k,I,L){var V=this;return this.demuxer.demuxSampleAes(E,w,k).then(function(W){var H=V.remuxer.remux(W.audioTrack,W.avcTrack,W.id3Track,W.textTrack,k,I,!1,V.id);return{remuxResult:H,chunkMeta:L}})},v.configureTransmuxer=function(E,w){for(var k=this.config,I=this.observer,L=this.typeSupported,V=this.vendor,W=w.audioCodec,H=w.defaultInitPts,G=w.duration,B=w.initSegmentData,P=w.videoCodec,z,J=0,ue=h.length;J0&&v!=null&&v.key!=null&&v.iv!==null&&v.method!=null&&(_=v),_}var S=function(v){return{remuxResult:{},chunkMeta:v}};function x(C){return"then"in C&&C.then instanceof Function}var f=function(v,_,E,w,k){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=v,this.videoCodec=_,this.initSegmentData=E,this.duration=w,this.defaultInitPts=k},R=function(v,_,E,w,k){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=v,this.contiguous=_,this.accurateTimeOffset=E,this.trackSwitch=w,this.timeOffset=k}},"./src/demux/tsdemuxer.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"discardEPB",function(){return S});var M=O("./src/demux/adts.ts"),m=O("./src/demux/mpegaudio.ts"),y=O("./src/demux/exp-golomb.ts"),T=O("./src/demux/id3.ts"),b=O("./src/demux/sample-aes.ts"),p=O("./src/events.ts"),d=O("./src/utils/mp4-tools.ts"),n=O("./src/utils/logger.ts"),c=O("./src/errors.ts"),r={video:1,audio:2,id3:3,text:4},a=function(){function x(R,C,v){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=C,this.typeSupported=v}x.probe=function(C){var v=x.syncOffset(C);return v<0?!1:(v&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+v+", junk ahead ?"),!0)},x.syncOffset=function(C){for(var v=Math.min(1e3,C.length-3*188),_=0;_>4,ce=void 0;if(ye>1){if(ce=Ae+5+C[Ae+4],ce===Ae+188)continue}else ce=Ae+4;switch(Oe){case V:pe&&(W&&(w=s(W))&&this.parseAVCPES(w,!1),W={data:[],size:0}),W&&(W.data.push(C.subarray(ce,Ae+188)),W.size+=Ae+188-ce);break;case H:pe&&(B&&(w=s(B))&&(I.isAAC?this.parseAACPES(w):this.parseMPEGPES(w)),B={data:[],size:0}),B&&(B.data.push(C.subarray(ce,Ae+188)),B.size+=Ae+188-ce);break;case G:pe&&(P&&(w=s(P))&&this.parseID3PES(w),P={data:[],size:0}),P&&(P.data.push(C.subarray(ce,Ae+188)),P.size+=Ae+188-ce);break;case 0:pe&&(ce+=C[ce]+1),ue=this._pmtId=u(C,ce);break;case ue:{pe&&(ce+=C[ce]+1);var ae=h(C,ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,_);V=ae.avc,V>0&&(k.pid=V),H=ae.audio,H>0&&(I.pid=H,I.isAAC=ae.isAAC),G=ae.id3,G>0&&(L.pid=G),z&&!J&&(n.logger.log("reparse from beginning"),z=!1,Ae=Se-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:z=!0;break}}else this.observer.emit(p.Events.ERROR,p.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});k.pesData=W,I.pesData=B,L.pesData=P;var re={audioTrack:I,avcTrack:k,id3Track:L,textTrack:this._txtTrack};return E&&this.extractRemainingSamples(re),re},f.flush=function(){var C=this.remainderData;this.remainderData=null;var v;return C?v=this.demux(C,-1,!1,!0):v={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(v),this.sampleAes?this.decrypt(v,this.sampleAes):v},f.extractRemainingSamples=function(C){var v=C.audioTrack,_=C.avcTrack,E=C.id3Track,w=_.pesData,k=v.pesData,I=E.pesData,L;w&&(L=s(w))?(this.parseAVCPES(L,!0),_.pesData=null):_.pesData=w,k&&(L=s(k))?(v.isAAC?this.parseAACPES(L):this.parseMPEGPES(L),v.pesData=null):(k!=null&&k.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),v.pesData=k),I&&(L=s(I))?(this.parseID3PES(L),E.pesData=null):E.pesData=I},f.demuxSampleAes=function(C,v,_){var E=this.demux(C,_,!0,!this.config.progressive),w=this.sampleAes=new b.default(this.observer,this.config,v);return this.decrypt(E,w)},f.decrypt=function(C,v){return new Promise(function(_){var E=C.audioTrack,w=C.avcTrack;E.samples&&E.isAAC?v.decryptAacSamples(E.samples,0,function(){w.samples?v.decryptAvcSamples(w.samples,0,0,function(){_(C)}):_(C)}):w.samples&&v.decryptAvcSamples(w.samples,0,0,function(){_(C)})})},f.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},f.parseAVCPES=function(C,v){var _=this,E=this._avcTrack,w=this.parseAVCNALu(C.data),k=!1,I=this.avcSample,L,V=!1;C.data=null,I&&w.length&&!E.audFound&&(l(I,E),I=this.avcSample=o(!1,C.pts,C.dts,"")),w.forEach(function(W){switch(W.type){case 1:{L=!0,I||(I=_.avcSample=o(!0,C.pts,C.dts,"")),k&&(I.debug+="NDR "),I.frame=!0;var H=W.data;if(V&&H.length>4){var G=new y.default(H).readSliceType();(G===2||G===4||G===7||G===9)&&(I.key=!0)}break}case 5:L=!0,I||(I=_.avcSample=o(!0,C.pts,C.dts,"")),k&&(I.debug+="IDR "),I.key=!0,I.frame=!0;break;case 6:{L=!0,k&&I&&(I.debug+="SEI ");var B=new y.default(S(W.data));B.readUByte();for(var P=0,z=0,J=!1,ue=0;!J&&B.bytesAvailable>1;){P=0;do ue=B.readUByte(),P+=ue;while(ue===255);z=0;do ue=B.readUByte(),z+=ue;while(ue===255);if(P===4&&B.bytesAvailable!==0){J=!0;var de=B.readUByte();if(de===181){var Se=B.readUShort();if(Se===49){var Ae=B.readUInt();if(Ae===1195456820){var pe=B.readUByte();if(pe===3){for(var Oe=B.readUByte(),ye=B.readUByte(),ce=31&Oe,ae=[Oe,ye],re=0;re16){for(var fe=[],te=0;te<16;te++)fe.push(B.readUByte().toString(16)),(te===3||te===5||te===7||te===9)&&fe.push("-");for(var ne=z-16,Te=new Uint8Array(ne),ie=0;ie=0){var B={data:C.subarray(H,I-E-1),type:G};k.push(B)}else{var P=this.getLastNalUnit();if(P&&(w&&I<=4-w&&(P.state&&(P.data=P.data.subarray(0,P.data.byteLength-w))),V=I-E-1,V>0)){var z=new Uint8Array(P.data.byteLength+V);z.set(P.data,0),z.set(C.subarray(0,V),P.data.byteLength),P.data=z,P.state=0}}I=0&&E>=0){var J={data:C.subarray(H,v),type:G,state:E};k.push(J)}if(k.length===0){var ue=this.getLastNalUnit();if(ue){var de=new Uint8Array(ue.data.byteLength+C.byteLength);de.set(ue.data,0),de.set(C,ue.data.byteLength),ue.data=de}}return _.naluState=E,k},f.parseAACPES=function(C){var v=0,_=this._audioTrack,E=this.aacOverFlow,w=C.data;if(E){this.aacOverFlow=null;var k=E.sample.unit.byteLength,I=Math.min(E.missing,k),L=k-I;E.sample.unit.set(w.subarray(0,I),L),_.samples.push(E.sample),v=E.missing}var V,W;for(V=v,W=w.length;V1;){var k=new Uint8Array(w[0].length+w[1].length);k.set(w[0]),k.set(w[1],w[0].length),w[0]=k,w.splice(1,1)}R=w[0];var I=(R[0]<<16)+(R[1]<<8)+R[2];if(I===1){if(C=(R[4]<<8)+R[5],C&&C>x.size-6)return null;var L=R[7];L&192&&(_=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,L&64?(E=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,_-E>60*9e4&&(n.logger.warn(Math.round((_-E)/9e4)+"s delta between PTS and DTS, align them"),_=E)):E=_),v=R[8];var V=v+9;if(x.size<=V)return null;x.size-=V;for(var W=new Uint8Array(x.size),H=0,G=w.length;HB){V-=B;continue}else R=R.subarray(V),B-=V,V=0;W.set(R,f),f+=B}return C&&(C-=v+3),{data:W,pts:_,dts:E,len:C}}return null}function l(x,f){if(x.units.length&&x.frame){if(x.pts===void 0){var R=f.samples,C=R.length;if(C){var v=R[C-1];x.pts=v.pts,x.dts=v.dts}else{f.dropped++;return}}f.samples.push(x)}x.debug.length&&n.logger.log(x.pts+"/"+x.dts+":"+x.debug)}function t(x,f){var R=x.length;if(R>0){if(f.pts>=x[R-1].pts)x.push(f);else for(var C=R-1;C>=0;C--)if(f.pts_)return w;return 0}},{key:"maxAutoLevel",get:function(){var v=this.levels,_=this.autoLevelCapping,E;return _===-1&&v&&v.length?E=v.length-1:E=_,E}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(v){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,v)}},{key:"audioTracks",get:function(){var v=this.audioTrackController;return v?v.audioTracks:[]}},{key:"audioTrack",get:function(){var v=this.audioTrackController;return v?v.audioTrack:-1},set:function(v){var _=this.audioTrackController;_&&(_.audioTrack=v)}},{key:"subtitleTracks",get:function(){var v=this.subtitleTrackController;return v?v.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var v=this.subtitleTrackController;return v?v.subtitleTrack:-1},set:function(v){var _=this.subtitleTrackController;_&&(_.subtitleTrack=v)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var v=this.subtitleTrackController;return v?v.subtitleDisplay:!1},set:function(v){var _=this.subtitleTrackController;_&&(_.subtitleDisplay=v)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(v){this.config.lowLatencyMode=v}},{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 s.Events}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return f.defaultConfig?f.defaultConfig:o.hlsDefaultConfig},set:function(v){f.defaultConfig=v}}]),f}();x.defaultConfig=void 0},"./src/is-supported.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"isSupported",function(){return y}),O.d(g,"changeTypeSupported",function(){return T});var M=O("./src/utils/mediasource-helper.ts");function m(){return self.SourceBuffer||self.WebKitSourceBuffer}function y(){var b=Object(M.getMediaSource)();if(!b)return!1;var p=m(),d=b&&typeof b.isTypeSupported=="function"&&b.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!p||p.prototype&&typeof p.prototype.appendBuffer=="function"&&typeof p.prototype.remove=="function";return!!d&&!!n}function T(){var b,p=m();return typeof(p==null||((b=p.prototype)===null||b===void 0)?void 0:b.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return a}),O.d(g,"LoadError",function(){return u});var M=O("./src/polyfills/number.ts"),m=O("./src/errors.ts");function y(h,s){h.prototype=Object.create(s.prototype),h.prototype.constructor=h,n(h,s)}function T(h){var s=typeof Map=="function"?new Map:void 0;return T=function(t){if(t===null||!d(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s!="undefined"){if(s.has(t))return s.get(t);s.set(t,S)}function S(){return b(t,arguments,c(this).constructor)}return S.prototype=Object.create(t.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),n(S,t)},T(h)}function b(h,s,l){return p()?b=Reflect.construct:b=function(S,x,f){var R=[null];R.push.apply(R,x);var C=Function.bind.apply(S,R),v=new C;return f&&n(v,f.prototype),v},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(h){return!1}}function d(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function n(h,s){return n=Object.setPrototypeOf||function(t,S){return t.__proto__=S,t},n(h,s)}function c(h){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},c(h)}var r=Math.pow(2,17),a=function(){function h(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var s=h.prototype;return s.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},s.abort=function(){this.loader&&this.loader.abort()},s.load=function(t,S){var x=this,f=t.url;if(!f)return Promise.reject(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(f?"part list":"url")));this.abort();var R=this.config,C=R.fLoader,v=R.loader;return new Promise(function(_,E){x.loader&&x.loader.destroy();var w=x.loader=t.loader=C?new C(R):new v(R),k=o(t),I={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:r};t.stats=w.stats,w.load(k,I,{onSuccess:function(V,W,H,G){x.resetLoader(t,w),_({frag:t,part:null,payload:V.data,networkDetails:G})},onError:function(V,W,H){x.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:V,networkDetails:H}))},onAbort:function(V,W,H){x.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:H}))},onTimeout:function(V,W,H){x.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:H}))},onProgress:function(V,W,H,G){S&&S({frag:t,part:null,payload:H,networkDetails:G})}})})},s.loadPart=function(t,S,x){var f=this;this.abort();var R=this.config,C=R.fLoader,v=R.loader;return new Promise(function(_,E){f.loader&&f.loader.destroy();var w=f.loader=t.loader=C?new C(R):new v(R),k=o(t,S),I={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:r};S.stats=w.stats,w.load(k,I,{onSuccess:function(V,W,H,G){f.resetLoader(t,w),f.updateStatsFromPart(t,S);var B={frag:t,part:S,payload:V.data,networkDetails:G};x(B),_(B)},onError:function(V,W,H){f.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:S,response:V,networkDetails:H}))},onAbort:function(V,W,H){t.stats.aborted=S.stats.aborted,f.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:S,networkDetails:H}))},onTimeout:function(V,W,H){f.resetLoader(t,w),E(new u({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:S,networkDetails:H}))}})})},s.updateStatsFromPart=function(t,S){var x=t.stats,f=S.stats,R=f.total;if(x.loaded+=f.loaded,R){var C=Math.round(t.duration/S.duration),v=Math.min(Math.round(x.loaded/R),C),_=C-v,E=_*Math.round(x.loaded/v);x.total=x.loaded+E}else x.total=Math.max(x.loaded,x.total);var w=x.loading,k=f.loading;w.start?w.first+=k.first-k.start:(w.start=k.start,w.first=k.first),w.end=k.end},s.resetLoader=function(t,S){t.loader=null,this.loader===S&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),S.destroy()},h}();function o(h,s){s===void 0&&(s=null);var l=s||h,t={frag:h,part:s,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},S=l.byteRangeStartOffset,x=l.byteRangeEndOffset;return Object(M.isFiniteNumber)(S)&&Object(M.isFiniteNumber)(x)&&(t.rangeStart=S,t.rangeEnd=x),t}var u=function(h){y(s,h);function s(l){for(var t,S=arguments.length,x=new Array(S>1?S-1:0),f=1;f>8*(15-R)&255;return f},t.setDecryptDataFromLevelKey=function(x,f){var R=x;return(x==null?void 0:x.method)==="AES-128"&&x.uri&&!x.iv&&(R=b.LevelKey.fromURI(x.uri),R.method=x.method,R.iv=this.createInitializationVector(f),R.keyFormat="identity"),R},t.setElementaryStreamInfo=function(x,f,R,C,v,_){_===void 0&&(_=!1);var E=this.elementaryStreams,w=E[x];if(!w){E[x]={startPTS:f,endPTS:R,startDTS:C,endDTS:v,partial:_};return}w.startPTS=Math.min(w.startPTS,f),w.endPTS=Math.max(w.endPTS,R),w.startDTS=Math.min(w.startDTS,C),w.endDTS=Math.max(w.endDTS,v)},t.clearElementaryStreamInfo=function(){var x=this.elementaryStreams;x[a.AUDIO]=null,x[a.VIDEO]=null,x[a.AUDIOVIDEO]=null},r(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var x=this.sn;typeof x!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&T.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),x=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,x)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(M.isFiniteNumber)(this.programDateTime))return null;var x=Object(M.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+x*1e3}},{key:"encrypted",get:function(){var x;return!!((x=this.decryptdata)!==null&&x!==void 0&&x.keyFormat&&this.decryptdata.uri)}}]),l}(o),h=function(s){d(l,s);function l(t,S,x,f,R){var C;C=s.call(this,x)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new p.LoadStats,C.duration=t.decimalFloatingPoint("DURATION"),C.gap=t.bool("GAP"),C.independent=t.bool("INDEPENDENT"),C.relurl=t.enumeratedString("URI"),C.fragment=S,C.index=f;var v=t.enumeratedString("BYTERANGE");return v&&C.setByteRange(v,R),R&&(C.fragOffset=R.fragOffset+R.duration),C}return r(l,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var S=this.elementaryStreams;return!!(S.audio||S.video||S.audiovideo)}}]),l}(o)},"./src/loader/key-loader.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return T});var M=O("./src/events.ts"),m=O("./src/errors.ts"),y=O("./src/utils/logger.ts"),T=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(M.Events.KEY_LOADING,this.onKeyLoading,this)},p._unregisterListeners=function(){this.hls.off(M.Events.KEY_LOADING,this.onKeyLoading)},p.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var c=this.loaders[n];c&&c.destroy()}this.loaders={}},p.onKeyLoading=function(n,c){var r=c.frag,a=r.type,o=this.loaders[a];if(!r.decryptdata){y.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var u=r.decryptdata.uri;if(u!==this.decrypturl||this.decryptkey===null){var h=this.hls.config;if(o&&(y.logger.warn("abort previous key loader for type:"+a),o.abort()),!u){y.logger.warn("key uri is falsy");return}var s=h.loader,l=r.loader=this.loaders[a]=new s(h);this.decrypturl=u,this.decryptkey=null;var t={url:u,frag:r,responseType:"arraybuffer"},S={timeout:h.fragLoadingTimeOut,maxRetry:0,retryDelay:h.fragLoadingRetryDelay,maxRetryDelay:h.fragLoadingMaxRetryTimeout,highWaterMark:0},x={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(t,S,x)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(M.Events.KEY_LOADED,{frag:r}))},p.loadsuccess=function(n,c,r){var a=r.frag;if(!a.decryptdata){y.logger.error("after key load, decryptdata unset");return}this.decryptkey=a.decryptdata.key=new Uint8Array(n.data),a.loader=null,delete this.loaders[a.type],this.hls.trigger(M.Events.KEY_LOADED,{frag:a})},p.loaderror=function(n,c){var r=c.frag,a=r.loader;a&&a.abort(),delete this.loaders[r.type],this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:n})},p.loadtimeout=function(n,c){var r=c.frag,a=r.loader;a&&a.abort(),delete this.loaders[r.type],this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},b}()},"./src/loader/level-details.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"LevelDetails",function(){return b});var M=O("./src/polyfills/number.ts");function m(p,d){for(var n=0;nc.endSN||r>0||r===0&&a>0,this.updated||this.advanced?this.misses=Math.floor(c.misses*.6):this.misses=c.misses+1,this.availabilityDelay=c.availabilityDelay},y(p,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(M.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||T}},{key:"drift",get:function(){var c=this.driftEndTime-this.driftStartTime;if(c>0){var r=this.driftEnd-this.driftStart;return r*1e3/c}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var c;return(c=this.fragments)!==null&&c!==void 0&&c.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 c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),p}()},"./src/loader/level-key.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"LevelKey",function(){return b});var M=O("./node_modules/url-toolkit/src/url-toolkit.js"),m=O.n(M);function y(p,d){for(var n=0;n2){var E=_.shift()+".";return E+=parseInt(_.shift()).toString(16),E+=("000"+parseInt(_.shift()).toString(16)).substr(-4),E}return v},R.resolve=function(v,_){return m.buildAbsoluteURL(_,v,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(v,_){var E=[],w={},k=!1;r.lastIndex=0;for(var I;(I=r.exec(v))!=null;)if(I[1]){var L=new d.AttrList(I[1]),V={attrs:L,bitrate:L.decimalInteger("AVERAGE-BANDWIDTH")||L.decimalInteger("BANDWIDTH"),name:L.NAME,url:R.resolve(I[2],_)},W=L.decimalResolution("RESOLUTION");W&&(V.width=W.width,V.height=W.height),t((L.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(I[3]){var H=new d.AttrList(I[3]);H["DATA-ID"]&&(k=!0,w[H["DATA-ID"]]=H)}return{levels:E,sessionData:k?w:null}},R.parseMasterPlaylistMedia=function(v,_,E,w){w===void 0&&(w=[]);var k,I=[],L=0;for(a.lastIndex=0;(k=a.exec(v))!==null;){var V=new d.AttrList(k[1]);if(V.TYPE===E){var W={attrs:V,bitrate:0,id:L++,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,_):""};if(w.length){var H=R.findGroup(w,W.groupId)||w[0];S(W,H,"audioCodec"),S(W,H,"textCodec")}I.push(W)}}return I},R.parseLevelPlaylist=function(v,_,E,w,k){var I=new b.LevelDetails(_),L=I.fragments,V=null,W=0,H=0,G=0,B=0,P=null,z=new T.Fragment(w,_),J,ue,de,Se=-1,Ae=!1;for(o.lastIndex=0,I.m3u8=v;(J=o.exec(v))!==null;){Ae&&(Ae=!1,z=new T.Fragment(w,_),z.start=G,z.sn=W,z.cc=B,z.level=E,V&&(z.initSegment=V,z.rawProgramDateTime=V.rawProgramDateTime));var pe=J[1];if(pe){z.duration=parseFloat(pe);var Oe=(" "+J[2]).slice(1);z.title=Oe||null,z.tagList.push(Oe?["INF",pe,Oe]:["INF",pe])}else if(J[3])Object(M.isFiniteNumber)(z.duration)&&(z.start=G,de&&(z.levelkey=de),z.sn=W,z.level=E,z.cc=B,z.urlId=k,L.push(z),z.relurl=(" "+J[3]).slice(1),f(z,P),P=z,G+=z.duration,W++,H=0,Ae=!0);else if(J[4]){var ye=(" "+J[4]).slice(1);P?z.setByteRange(ye,P):z.setByteRange(ye)}else if(J[5])z.rawProgramDateTime=(" "+J[5]).slice(1),z.tagList.push(["PROGRAM-DATE-TIME",z.rawProgramDateTime]),Se===-1&&(Se=L.length);else{if(J=J[0].match(u),!J){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(ue=1;ue-1){n.logger.warn("Keyformat "+Je+" is not supported from the manifest");continue}else if(Je!=="identity")continue;X&&(de=p.LevelKey.fromURL(_,Q),Q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(de.method=X,de.keyFormat=Je,Re&&(de.keyID=Re),ve&&(de.keyFormatVersions=ve),de.iv=_e));break}case"START":{var rt=new d.AttrList(ae),ut=rt.decimalFloatingPoint("TIME-OFFSET");Object(M.isFiniteNumber)(ut)&&(I.startTimeOffset=ut);break}case"MAP":{var dt=new d.AttrList(ae);z.relurl=dt.URI,dt.BYTERANGE&&z.setByteRange(dt.BYTERANGE),z.level=E,z.sn="initSegment",de&&(z.levelkey=de),z.initSegment=null,V=z,Ae=!0;break}case"SERVER-CONTROL":{var ft=new d.AttrList(ae);I.canBlockReload=ft.bool("CAN-BLOCK-RELOAD"),I.canSkipUntil=ft.optionalFloat("CAN-SKIP-UNTIL",0),I.canSkipDateRanges=I.canSkipUntil>0&&ft.bool("CAN-SKIP-DATERANGES"),I.partHoldBack=ft.optionalFloat("PART-HOLD-BACK",0),I.holdBack=ft.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Be=new d.AttrList(ae);I.partTarget=Be.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=I.partList;Ie||(Ie=I.partList=[]);var at=H>0?Ie[Ie.length-1]:void 0,ct=H++,$e=new T.Part(new d.AttrList(ae),z,_,ct,at);Ie.push($e),z.duration+=$e.duration;break}case"PRELOAD-HINT":{var st=new d.AttrList(ae);I.preloadHint=st;break}case"RENDITION-REPORT":{var Ue=new d.AttrList(ae);I.renditionReports=I.renditionReports||[],I.renditionReports.push(Ue);break}default:n.logger.warn("line parsed but not handled: "+J);break}}}P&&!P.relurl?(L.pop(),G-=P.duration,I.partList&&(I.fragmentHint=P)):I.partList&&(f(z,P),z.cc=B,I.fragmentHint=z);var Le=L.length,Me=L[0],Ee=L[Le-1];if(G+=I.skippedSegments*I.targetduration,G>0&&Le&&Ee){I.averagetargetduration=G/Le;var Ce=Ee.sn;I.endSN=Ce!=="initSegment"?Ce:0,Me&&(I.startCC=Me.cc,Me.initSegment||I.fragments.every(function(ke){return ke.relurl&&s(ke.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),z=new T.Fragment(w,_),z.relurl=Ee.relurl,z.level=E,z.sn="initSegment",Me.initSegment=z,I.needSidxRanges=!0))}else I.endSN=0,I.startCC=0;return I.fragmentHint&&(G+=I.fragmentHint.duration),I.totalduration=G,I.endCC=B,Se>0&&x(L,Se),I},R}();function t(R,C){["video","audio","text"].forEach(function(v){var _=R.filter(function(w){return Object(c.isCodecType)(w,v)});if(_.length){var E=_.filter(function(w){return w.lastIndexOf("avc1",0)===0||w.lastIndexOf("mp4a",0)===0});C[v+"Codec"]=E.length>0?E[0]:_[0],R=R.filter(function(w){return _.indexOf(w)===-1})}}),C.unknownCodecs=R}function S(R,C,v){var _=C[v];_&&(R[v]=_)}function x(R,C){for(var v=R[C],_=C;_--;){var E=R[_];if(!E)return;E.programDateTime=v.programDateTime-E.duration*1e3,v=E}}function f(R,C){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):C!=null&&C.programDateTime&&(R.programDateTime=C.endProgramDateTime),Object(M.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/polyfills/number.ts"),m=O("./src/events.ts"),y=O("./src/errors.ts"),T=O("./src/utils/logger.ts"),b=O("./src/utils/mp4-tools.ts"),p=O("./src/loader/m3u8-parser.ts"),d=O("./src/types/loader.ts"),n=O("./src/utils/attr-list.ts");function c(o){var u=o.type;switch(u){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,u){var h=o.url;return(h===void 0||h.indexOf("data:")===0)&&(h=u.url),h}var a=function(){function o(h){this.hls=void 0,this.loaders=Object.create(null),this.hls=h,this.registerListeners()}var u=o.prototype;return u.registerListeners=function(){var s=this.hls;s.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(m.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(m.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),s.on(m.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},u.unregisterListeners=function(){var s=this.hls;s.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(m.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(m.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),s.off(m.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},u.createInternalLoader=function(s){var l=this.hls.config,t=l.pLoader,S=l.loader,x=t||S,f=new x(l);return s.loader=f,this.loaders[s.type]=f,f},u.getInternalLoader=function(s){return this.loaders[s.type]},u.resetInternalLoader=function(s){this.loaders[s]&&delete this.loaders[s]},u.destroyInternalLoaders=function(){for(var s in this.loaders){var l=this.loaders[s];l&&l.destroy(),this.resetInternalLoader(s)}},u.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},u.onManifestLoading=function(s,l){var t=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:d.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},u.onLevelLoading=function(s,l){var t=l.id,S=l.level,x=l.url,f=l.deliveryDirectives;this.load({id:t,groupId:null,level:S,responseType:"text",type:d.PlaylistContextType.LEVEL,url:x,deliveryDirectives:f})},u.onAudioTrackLoading=function(s,l){var t=l.id,S=l.groupId,x=l.url,f=l.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:d.PlaylistContextType.AUDIO_TRACK,url:x,deliveryDirectives:f})},u.onSubtitleTrackLoading=function(s,l){var t=l.id,S=l.groupId,x=l.url,f=l.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:d.PlaylistContextType.SUBTITLE_TRACK,url:x,deliveryDirectives:f})},u.load=function(s){var l,t=this.hls.config,S=this.getInternalLoader(s);if(S){var x=S.context;if(x&&x.url===s.url){T.logger.trace("[playlist-loader]: playlist request ongoing");return}T.logger.log("[playlist-loader]: aborting previous loader for type: "+s.type),S.abort()}var f,R,C,v;switch(s.type){case d.PlaylistContextType.MANIFEST:f=t.manifestLoadingMaxRetry,R=t.manifestLoadingTimeOut,C=t.manifestLoadingRetryDelay,v=t.manifestLoadingMaxRetryTimeout;break;case d.PlaylistContextType.LEVEL:case d.PlaylistContextType.AUDIO_TRACK:case d.PlaylistContextType.SUBTITLE_TRACK:f=0,R=t.levelLoadingTimeOut;break;default:f=t.levelLoadingMaxRetry,R=t.levelLoadingTimeOut,C=t.levelLoadingRetryDelay,v=t.levelLoadingMaxRetryTimeout;break}if(S=this.createInternalLoader(s),(l=s.deliveryDirectives)!==null&&l!==void 0&&l.part){var _;if(s.type===d.PlaylistContextType.LEVEL&&s.level!==null?_=this.hls.levels[s.level].details:s.type===d.PlaylistContextType.AUDIO_TRACK&&s.id!==null?_=this.hls.audioTracks[s.id].details:s.type===d.PlaylistContextType.SUBTITLE_TRACK&&s.id!==null&&(_=this.hls.subtitleTracks[s.id].details),_){var E=_.partTarget,w=_.targetduration;E&&w&&(R=Math.min(Math.max(E*3,w*.8)*1e3,R))}}var k={timeout:R,maxRetry:f,retryDelay:C,maxRetryDelay:v,highWaterMark:0},I={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};S.load(s,k,I)},u.loadsuccess=function(s,l,t,S){if(S===void 0&&(S=null),t.isSidxRequest){this.handleSidxRequest(s,t),this.handlePlaylistLoaded(s,l,t,S);return}this.resetInternalLoader(t.type);var x=s.data;if(x.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(s,t,"no EXTM3U delimiter",S);return}l.parsing.start=performance.now(),x.indexOf("#EXTINF:")>0||x.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(s,l,t,S):this.handleMasterPlaylist(s,l,t,S)},u.loaderror=function(s,l,t){t===void 0&&(t=null),this.handleNetworkError(l,t,!1,s)},u.loadtimeout=function(s,l,t){t===void 0&&(t=null),this.handleNetworkError(l,t,!0)},u.handleMasterPlaylist=function(s,l,t,S){var x=this.hls,f=s.data,R=r(s,t),C=p.default.parseMasterPlaylist(f,R),v=C.levels,_=C.sessionData;if(!v.length){this.handleManifestParsingError(s,t,"no level found in manifest",S);return}var E=v.map(function(W){return{id:W.attrs.AUDIO,audioCodec:W.audioCodec}}),w=v.map(function(W){return{id:W.attrs.SUBTITLES,textCodec:W.textCodec}}),k=p.default.parseMasterPlaylistMedia(f,R,"AUDIO",E),I=p.default.parseMasterPlaylistMedia(f,R,"SUBTITLES",w),L=p.default.parseMasterPlaylistMedia(f,R,"CLOSED-CAPTIONS");if(k.length){var V=k.some(function(W){return!W.url});!V&&v[0].audioCodec&&!v[0].attrs.AUDIO&&(T.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),k.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}x.trigger(m.Events.MANIFEST_LOADED,{levels:v,audioTracks:k,subtitles:I,captions:L,url:R,stats:l,networkDetails:S,sessionData:_})},u.handleTrackOrLevelPlaylist=function(s,l,t,S){var x=this.hls,f=t.id,R=t.level,C=t.type,v=r(s,t),_=Object(M.isFiniteNumber)(f)?f:0,E=Object(M.isFiniteNumber)(R)?R:_,w=c(t),k=p.default.parseLevelPlaylist(s.data,v,E,w,_);if(!k.fragments.length){x.trigger(m.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:v,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(C===d.PlaylistContextType.MANIFEST){var I={attrs:new n.AttrList({}),bitrate:0,details:k,name:"",url:v};x.trigger(m.Events.MANIFEST_LOADED,{levels:[I],audioTracks:[],url:v,stats:l,networkDetails:S,sessionData:null})}if(l.parsing.end=performance.now(),k.needSidxRanges){var L,V=(L=k.fragments[0].initSegment)===null||L===void 0?void 0:L.url;this.load({url:V,isSidxRequest:!0,type:C,level:R,levelDetails:k,id:f,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=k,this.handlePlaylistLoaded(s,l,t,S)},u.handleSidxRequest=function(s,l){var t=Object(b.parseSegmentIndex)(new Uint8Array(s.data));if(!t)return;var S=t.references,x=l.levelDetails;S.forEach(function(f,R){var C=f.info,v=x.fragments[R];v.byteRange.length===0&&v.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),v.initSegment&&v.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},u.handleManifestParsingError=function(s,l,t,S){this.hls.trigger(m.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===d.PlaylistContextType.MANIFEST,url:s.url,reason:t,response:s,context:l,networkDetails:S})},u.handleNetworkError=function(s,l,t,S){t===void 0&&(t=!1),T.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+s.type+" level: "+s.level+" id: "+s.id+' group-id: "'+s.groupId+'"');var x=y.ErrorDetails.UNKNOWN,f=!1,R=this.getInternalLoader(s);switch(s.type){case d.PlaylistContextType.MANIFEST:x=t?y.ErrorDetails.MANIFEST_LOAD_TIMEOUT:y.ErrorDetails.MANIFEST_LOAD_ERROR,f=!0;break;case d.PlaylistContextType.LEVEL:x=t?y.ErrorDetails.LEVEL_LOAD_TIMEOUT:y.ErrorDetails.LEVEL_LOAD_ERROR,f=!1;break;case d.PlaylistContextType.AUDIO_TRACK:x=t?y.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:y.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,f=!1;break;case d.PlaylistContextType.SUBTITLE_TRACK:x=t?y.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:y.ErrorDetails.SUBTITLE_LOAD_ERROR,f=!1;break}R&&this.resetInternalLoader(s.type);var C={type:y.ErrorTypes.NETWORK_ERROR,details:x,fatal:f,url:s.url,loader:R,context:s,networkDetails:l};S&&(C.response=S),this.hls.trigger(m.Events.ERROR,C)},u.handlePlaylistLoaded=function(s,l,t,S){var x=t.type,f=t.level,R=t.id,C=t.groupId,v=t.loader,_=t.levelDetails,E=t.deliveryDirectives;if(!(_!=null&&_.targetduration)){this.handleManifestParsingError(s,t,"invalid target duration",S);return}if(!v)return;_.live&&(v.getCacheAge&&(_.ageHeader=v.getCacheAge()||0),(!v.getCacheAge||isNaN(_.ageHeader))&&(_.ageHeader=0));switch(x){case d.PlaylistContextType.MANIFEST:case d.PlaylistContextType.LEVEL:this.hls.trigger(m.Events.LEVEL_LOADED,{details:_,level:f||0,id:R||0,stats:l,networkDetails:S,deliveryDirectives:E});break;case d.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(m.Events.AUDIO_TRACK_LOADED,{details:_,id:R||0,groupId:C||"",stats:l,networkDetails:S,deliveryDirectives:E});break;case d.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(m.Events.SUBTITLE_TRACK_LOADED,{details:_,id:R||0,groupId:C||"",stats:l,networkDetails:S,deliveryDirectives:E});break}},o}();g.default=a},"./src/polyfills/number.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"isFiniteNumber",function(){return M}),O.d(g,"MAX_SAFE_INTEGER",function(){return m});var M=Number.isFinite||function(y){return typeof y=="number"&&isFinite(y)},m=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(N,g,O){"use strict";O.r(g);var M=function(){function m(){}return m.getSilentFrame=function(T,b){switch(T){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},m}();g.default=M},"./src/remux/mp4-generator.ts":function(N,g,O){"use strict";O.r(g);var M=Math.pow(2,32)-1,m=function(){function y(){}return y.init=function(){y.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 y.types)y.types.hasOwnProperty(b)&&(y.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]);y.HDLR_TYPES={video:p,audio:d};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),c=new Uint8Array([0,0,0,0,0,0,0,0]);y.STTS=y.STSC=y.STCO=c,y.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),y.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),y.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),y.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var r=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);y.FTYP=y.box(y.types.ftyp,r,o,r,a),y.DINF=y.box(y.types.dinf,y.box(y.types.dref,n))},y.box=function(b){for(var p=8,d=arguments.length,n=new Array(d>1?d-1:0),c=1;c>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,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},y.mdia=function(b){return y.box(y.types.mdia,y.mdhd(b.timescale,b.duration),y.hdlr(b.type),y.minf(b))},y.mfhd=function(b){return y.box(y.types.mfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255]))},y.minf=function(b){return b.type==="audio"?y.box(y.types.minf,y.box(y.types.smhd,y.SMHD),y.DINF,y.stbl(b)):y.box(y.types.minf,y.box(y.types.vmhd,y.VMHD),y.DINF,y.stbl(b))},y.moof=function(b,p,d){return y.box(y.types.moof,y.mfhd(b),y.traf(d,p))},y.moov=function(b){for(var p=b.length,d=[];p--;)d[p]=y.trak(b[p]);return y.box.apply(null,[y.types.moov,y.mvhd(b[0].timescale,b[0].duration)].concat(d).concat(y.mvex(b)))},y.mvex=function(b){for(var p=b.length,d=[];p--;)d[p]=y.trex(b[p]);return y.box.apply(null,[y.types.mvex].concat(d))},y.mvhd=function(b,p){p*=b;var d=Math.floor(p/(M+1)),n=Math.floor(p%(M+1)),c=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,n>>24,n>>16&255,n>>8&255,n&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 y.box(y.types.mvhd,c)},y.sdtp=function(b){var p=b.samples||[],d=new Uint8Array(4+p.length),n,c;for(n=0;n>>8&255),p.push(r&255),p=p.concat(Array.prototype.slice.call(c));for(n=0;n>>8&255),d.push(r&255),d=d.concat(Array.prototype.slice.call(c));var a=y.box(y.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,u=b.height,h=b.pixelRatio[0],s=b.pixelRatio[1];return y.box(y.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,u>>8&255,u&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]),a,y.box(y.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),y.box(y.types.pasp,new Uint8Array([h>>24,h>>16&255,h>>8&255,h&255,s>>24,s>>16&255,s>>8&255,s&255])))},y.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]))},y.mp4a=function(b){var p=b.samplerate;return y.box(y.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]),y.box(y.types.esds,y.esds(b)))},y.mp3=function(b){var p=b.samplerate;return y.box(y.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]))},y.stsd=function(b){return b.type==="audio"?!b.isAAC&&b.codec==="mp3"?y.box(y.types.stsd,y.STSD,y.mp3(b)):y.box(y.types.stsd,y.STSD,y.mp4a(b)):y.box(y.types.stsd,y.STSD,y.avc1(b))},y.tkhd=function(b){var p=b.id,d=b.duration*b.timescale,n=b.width,c=b.height,r=Math.floor(d/(M+1)),a=Math.floor(d%(M+1));return y.box(y.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,a>>24,a>>16&255,a>>8&255,a&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,n>>8&255,n&255,0,0,c>>8&255,c&255,0,0]))},y.traf=function(b,p){var d=y.sdtp(b),n=b.id,c=Math.floor(p/(M+1)),r=Math.floor(p%(M+1));return y.box(y.types.traf,y.box(y.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),y.box(y.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,r>>24,r>>16&255,r>>8&255,r&255])),y.trun(b,d.length+16+20+8+16+8+8),d)},y.trak=function(b){return b.duration=b.duration||4294967295,y.box(y.types.trak,y.tkhd(b),y.mdia(b))},y.trex=function(b){var p=b.id;return y.box(y.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]))},y.trun=function(b,p){var d=b.samples||[],n=d.length,c=12+16*n,r=new Uint8Array(c),a,o,u,h,s,l;for(p+=8+c,r.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255],0),a=0;a>>24&255,u>>>16&255,u>>>8&255,u&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,s.degradPrio&240<<8,s.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*a);return y.box(y.types.trun,r)},y.initSegment=function(b){y.types||y.init();var p=y.moov(b),d=new Uint8Array(y.FTYP.byteLength+p.byteLength);return d.set(y.FTYP),d.set(p,y.FTYP.byteLength),d},y}();m.types=void 0,m.HDLR_TYPES=void 0,m.STTS=void 0,m.STSC=void 0,m.STCO=void 0,m.STSZ=void 0,m.VMHD=void 0,m.SMHD=void 0,m.STSD=void 0,m.FTYP=void 0,m.DINF=void 0,g.default=m},"./src/remux/mp4-remuxer.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return l}),O.d(g,"normalizePts",function(){return t});var M=O("./src/polyfills/number.ts"),m=O("./src/remux/aac-helper.ts"),y=O("./src/remux/mp4-generator.ts"),T=O("./src/events.ts"),b=O("./src/errors.ts"),p=O("./src/utils/logger.ts"),d=O("./src/types/loader.ts"),n=O("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(R){for(var C=1;C0?k:I.pts},_[0].pts);return E&&p.logger.debug("PTS rollover detected"),w},C.remux=function(_,E,w,k,I,L,V,W){var H,G,B,P,z,J,ue=I,de=I,Se=_.pid>-1,Ae=E.pid>-1,pe=E.samples.length,Oe=_.samples.length>0,ye=pe>1,ce=(!Se||Oe)&&(!Ae||ye)||this.ISGenerated||V;if(ce){this.ISGenerated||(B=this.generateIS(_,E,I));var ae=this.isVideoContiguous,re=-1;if(ye&&(re=S(E.samples),!ae&&this.config.forceKeyFrameOnDiscontinuity))if(J=!0,re>0){p.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+pe+" video samples due to a missing keyframe");var fe=this.getVideoStartPts(E.samples);E.samples=E.samples.slice(re),E.dropped+=re,de+=(E.samples[0].pts-fe)/(E.timescale||9e4)}else re===-1&&(p.logger.warn("[mp4-remuxer]: No keyframe found out of "+pe+" video samples"),J=!1);if(this.ISGenerated){if(Oe&&ye){var te=this.getVideoStartPts(E.samples),ne=t(_.samples[0].pts,te)-te,Te=ne/E.inputTimeScale;ue+=Math.max(0,Te),de+=Math.max(0,-Te)}if(Oe){if(_.samplerate||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(_,E,I)),G=this.remuxAudio(_,ue,this.isAudioContiguous,L,Ae||ye||W===d.PlaylistLevelType.AUDIO?de:void 0),ye){var ie=G?G.endPTS-G.startPTS:0;E.inputTimeScale||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(_,E,I)),H=this.remuxVideo(E,de,ae,ie)}}else ye&&(H=this.remuxVideo(E,de,ae,0));H&&(H.firstKeyFrame=re,H.independent=re!==-1)}}return this.ISGenerated&&(w.samples.length&&(z=this.remuxID3(w,I)),k.samples.length&&(P=this.remuxText(k,I))),{audio:G,video:H,initSegment:B,independent:J,text:P,id3:z}},C.generateIS=function(_,E,w){var k=_.samples,I=E.samples,L=this.typeSupported,V={},W=!Object(M.isFiniteNumber)(this._initPTS),H="audio/mp4",G,B,P;if(W&&(G=B=Infinity),_.config&&k.length&&(_.timescale=_.samplerate,_.isAAC||(L.mpeg?(H="audio/mpeg",_.codec=""):L.mp3&&(_.codec="mp3")),V.audio={id:"audio",container:H,codec:_.codec,initSegment:!_.isAAC&&L.mpeg?new Uint8Array(0):y.default.initSegment([_]),metadata:{channelCount:_.channelCount}},W&&(P=_.inputTimeScale,G=B=k[0].pts-Math.round(P*w))),E.sps&&E.pps&&I.length&&(E.timescale=E.inputTimeScale,V.video={id:"main",container:"video/mp4",codec:E.codec,initSegment:y.default.initSegment([E]),metadata:{width:E.width,height:E.height}},W)){P=E.inputTimeScale;var z=this.getVideoStartPts(I),J=Math.round(P*w);B=Math.min(B,t(I[0].dts,z)-J),G=Math.min(G,z-J)}if(Object.keys(V).length)return this.ISGenerated=!0,W&&(this._initPTS=G,this._initDTS=B),{tracks:V,initPTS:G,timescale:P}},C.remuxVideo=function(_,E,w,k){var I=_.inputTimeScale,L=_.samples,V=[],W=L.length,H=this._initPTS,G=this.nextAvcDts,B=8,P,z,J,ue=Number.POSITIVE_INFINITY,de=Number.NEGATIVE_INFINITY,Se=0,Ae=!1;if(!w||G===null){var pe=E*I,Oe=L[0].pts-t(L[0].dts,L[0].pts);G=pe-Oe}for(var ye=0;yece.pts){var ae=9e4*.2;Se=Math.max(Math.min(Se,ce.pts-ce.dts),-1*ae)}ce.dts0?ye-1:ye].dts&&(Ae=!0)}Ae&&L.sort(function(cr,dr){var St=cr.dts-dr.dts,Kr=cr.pts-dr.pts;return St||Kr}),z=L[0].dts,J=L[L.length-1].dts;var re=Math.round((J-z)/(W-1));if(Se<0){if(Sere,Z=Te<-1;if(ie||Z){ie?p.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(Te,!0)+" ms ("+Te+"dts) hole between fragments detected, filling it"):p.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-Te,!0)+" ms ("+Te+"dts) overlapping between fragments detected"),z=G;var X=L[0].pts-Te;L[0].dts=z,L[0].pts=X,p.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(X,!0)+"/"+Object(n.toMsFromMpegTsClock)(z,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(Te,!0)+" ms")}}s&&(z=Math.max(0,z));for(var Q=0,_e=0,ve=0;ve0?Ie-1:Ie].dts;if(Ce.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ne=Math.floor(Ce.maxBufferHole*I),He=(k?ue+k*I:this.nextAudioPts)-at.pts;He>Ne?(P=He-ke,P<0&&(P=ke),p.logger.log("[mp4-remuxer]: It is approximately "+He/90+" ms to the next segment; using duration "+P/90+" ms for the last video frame.")):P=ke}else P=ke}var tt=Math.round(at.pts-at.dts);V.push(new x(at.key,P,$e,tt))}if(V.length&&u&&u<70){var vt=V[0].flags;vt.dependsOn=2,vt.isNonSync=0}console.assert(P!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=G=J+P,this.isVideoContiguous=!0;var yt=y.default.moof(_.sequenceNumber++,z,c({},_,{samples:V})),Wt="video",Ht={data1:yt,data2:ft,startPTS:ue/I,endPTS:(de+P)/I,startDTS:z/I,endDTS:G/I,type:Wt,hasAudio:!1,hasVideo:!0,nb:V.length,dropped:_.dropped};return _.samples=[],_.dropped=0,console.assert(ft.length,"MDAT length must not be zero"),Ht},C.remuxAudio=function(_,E,w,k,I){var L=_.inputTimeScale,V=_.samplerate?_.samplerate:L,W=L/V,H=_.isAAC?a:o,G=H*W,B=this._initPTS,P=!_.isAAC&&this.typeSupported.mpeg,z=[],J=_.samples,ue=P?0:8,de=this.nextAudioPts||-1,Se=E*L;if(this.isAudioContiguous=w=w||J.length&&de>0&&(k&&Math.abs(Se-de)<9e3||Math.abs(t(J[0].pts-B,Se)-de)<20*G),J.forEach(function(Me){Me.pts=t(Me.pts-B,Se)}),!w||de<0){if(J=J.filter(function(Me){return Me.pts>=0}),!J.length)return;I===0?de=0:k?de=Math.max(0,Se):de=J[0].pts}if(_.isAAC)for(var Ae=I!==void 0,pe=this.config.maxAudioFramesDrift,Oe=0,ye=de;Oe=pe*G&&fe0){_e+=ue;try{Q=new Uint8Array(_e)}catch(Me){this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:_e,reason:"fail allocating audio mdat "+_e});return}if(!P){var ft=new DataView(Q.buffer);ft.setUint32(0,_e),Q.set(y.default.types.mdat,4)}}else return;Q.set(rt,ue);var Be=rt.byteLength;ue+=Be,z.push(new x(!0,H,Be,0)),X=ut}var Ie=z.length;if(!Ie)return;var at=z[z.length-1];this.nextAudioPts=de=X+W*at.duration;var ct=P?new Uint8Array(0):y.default.moof(_.sequenceNumber++,Z/W,c({},_,{samples:z}));_.samples=[];var $e=Z/L,st=de/L,Ue="audio",Le={data1:ct,data2:Q,startPTS:$e,endPTS:st,startDTS:$e,endDTS:st,type:Ue,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(Q.length,"MDAT length must not be zero"),Le},C.remuxEmptyAudio=function(_,E,w,k){var I=_.inputTimeScale,L=_.samplerate?_.samplerate:I,V=I/L,W=this.nextAudioPts,H=(W!==null?W:k.startDTS*I)+this._initDTS,G=k.endDTS*I+this._initDTS,B=V*a,P=Math.ceil((G-H)/B),z=m.default.getSilentFrame(_.manifestCodec||_.codec,_.channelCount);if(p.logger.warn("[mp4-remuxer]: remux empty Audio"),!z){p.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var J=[],ue=0;ue4294967296;)R+=v;return R}function S(R){for(var C=0;C0?this.lastEndDTS=_:(T.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var E=!!R.audio,w=!!R.video,k="";E&&(k+="audio"),w&&(k+="video");var I={data1:x,startPTS:v,startDTS:v,endPTS:_,endDTS:_,type:k,hasAudio:E,hasVideo:w,nb:1,dropped:0};return S.audio=I.type==="audio"?I:void 0,S.video=I.type!=="audio"?I:void 0,S.text=h,S.id3=u,S.initSegment=f,S},n}(),p=function(c,r,a){return Object(m.getStartDTS)(c,r)-a};function d(n,c){var r=n==null?void 0:n.codec;return r&&r.length>4?r:r==="hvc1"?"hvc1.1.c.L120.90":r==="av01"?"av01.0.04M.08":r==="avc1"||c===y.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}g.default=b},"./src/task-loop.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"default",function(){return M});var M=function(){function m(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var y=m.prototype;return y.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},y.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},y.onHandlerDestroyed=function(){},y.hasInterval=function(){return!!this._tickInterval},y.hasNextTick=function(){return!!this._tickTimer},y.setInterval=function(b){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,b),!0)},y.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},y.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},y.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},y.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},y.doTick=function(){},m}()},"./src/types/cmcd.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"CMCDVersion",function(){return M}),O.d(g,"CMCDObjectType",function(){return m}),O.d(g,"CMCDStreamingFormat",function(){return y}),O.d(g,"CMCDStreamType",function(){return T});var M=1,m;(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"})(m||(m={}));var y;(function(b){b.DASH="d",b.HLS="h",b.SMOOTH="s",b.OTHER="o"})(y||(y={}));var T;(function(b){b.VOD="v",b.LIVE="l"})(T||(T={}))},"./src/types/level.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"HlsSkip",function(){return y}),O.d(g,"getSkipValue",function(){return T}),O.d(g,"HlsUrlParameters",function(){return b}),O.d(g,"Level",function(){return p});function M(d,n){for(var c=0;cNumber.MAX_SAFE_INTEGER?Infinity:n},b.hexadecimalInteger=function(d){if(this[d]){var n=(this[d]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var c=new Uint8Array(n.length/2),r=0;rNumber.MAX_SAFE_INTEGER?Infinity:n},b.decimalFloatingPoint=function(d){return parseFloat(this[d])},b.optionalFloat=function(d,n){var c=this[d];return c?parseFloat(c):n},b.enumeratedString=function(d){return this[d]},b.bool=function(d){return this[d]==="YES"},b.decimalResolution=function(d){var n=M.exec(this[d]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},T.parseAttrList=function(d){var n,c={},r='"';for(m.lastIndex=0;(n=m.exec(d))!==null;){var a=n[2];a.indexOf(r)===0&&a.lastIndexOf(r)===a.length-1&&(a=a.slice(1,-1)),c[n[1]]=a}return c},T}()},"./src/utils/binary-search.ts":function(N,g,O){"use strict";O.r(g);var M={search:function(y,T){for(var b=0,p=y.length-1,d=null,n=null;b<=p;){d=(b+p)/2|0,n=y[d];var c=T(n);if(c>0)b=d+1;else if(c<0)p=d-1;else return n}return null}};g.default=M},"./src/utils/buffer-helper.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"BufferHelper",function(){return y});var M=O("./src/utils/logger.ts"),m={length:0,start:function(){return 0},end:function(){return 0}},y=function(){function T(){}return T.isBuffered=function(p,d){try{if(p){for(var n=T.getBuffered(p),c=0;c=n.start(c)&&d<=n.end(c))return!0}}catch(r){}return!1},T.bufferInfo=function(p,d,n){try{if(p){var c=T.getBuffered(p),r=[],a;for(a=0;ao&&(c[a-1].end=p[r].end):c.push(p[r])}else c.push(p[r])}else c=p;for(var u=0,h,s=d,l=d,t=0;t=S&&d=w&&M.logger.log(this.time+" ["+w+"] "+k)},v}(),u=function(_){for(var E=[],w=0;w<_.length;w++)E.push(_[w].toString(16));return E},h=function(){function v(E,w,k,I,L){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=E||"white",this.underline=w||!1,this.italics=k||!1,this.background=I||"black",this.flash=L||!1}var _=v.prototype;return _.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},_.setStyles=function(w){for(var k=["foreground","underline","italics","background","flash"],I=0;Ib&&(this.logger.log(a.DEBUG,"Too large cursor position "+this.pos),this.pos=b)},_.moveCursor=function(w){var k=this.pos+w;if(w>1)for(var I=this.pos+1;I=144&&this.backSpace();var k=y(w);if(this.pos>=b){this.logger.log(a.ERROR,"Cannot insert "+w.toString(16)+" ("+k+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(k,this.currPenState),this.moveCursor(1)},_.clearFromPos=function(w){var k;for(k=w;k0&&(w?I="["+k.join(" | ")+"]":I=k.join(` `)),I},_.getTextAndFormat=function(){return this.rows},v}(),S=function(){function v(E,w,k){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=w,this.mode=null,this.verbose=0,this.displayedMemory=new t(k),this.nonDisplayedMemory=new t(k),this.lastOutputScreen=new t(k),this.currRollUpRow=this.displayedMemory.rows[T-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=k}var _=v.prototype;return _.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[T-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},_.getHandler=function(){return this.outputFilter},_.setHandler=function(w){this.outputFilter=w},_.setPAC=function(w){this.writeScreen.setPAC(w)},_.setBkgData=function(w){this.writeScreen.setBkgData(w)},_.setMode=function(w){if(w===this.mode)return;this.mode=w,this.logger.log(a.INFO,"MODE="+w),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=w},_.insertChars=function(w){for(var k=0;k=46,k.italics)k.foreground="white";else{var I=Math.floor(w/2)-16,L=["white","green","blue","cyan","red","yellow","magenta"];k.foreground=L[I]}this.logger.log(a.INFO,"MIDROW: "+JSON.stringify(k)),this.writeScreen.setPen(k)},_.outputDataUpdate=function(w){w===void 0&&(w=!1);var k=this.logger.time;if(k===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=k:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,k,this.lastOutputScreen),w&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:k),this.lastOutputScreen.copy(this.displayedMemory))},_.cueSplitAtTime=function(w){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,w,this.displayedMemory),this.cueStartTime=w))},v}(),x=function(){function v(E,w,k){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var I=new o;this.channels=[null,new S(E,w,I),new S(E+1,k,I)],this.cmdHistory=C(),this.logger=I}var _=v.prototype;return _.getHandler=function(w){return this.channels[w].getHandler()},_.setHandler=function(w,k){this.channels[w].setHandler(k)},_.addData=function(w,k){var I,L,V,W=!1;this.logger.time=w;for(var H=0;H ("+u([L,V])+")"),I=this.parseCmd(L,V),I||(I=this.parseMidrow(L,V)),I||(I=this.parsePAC(L,V)),I||(I=this.parseBackgroundAttributes(L,V)),!I&&(W=this.parseChars(L,V),W)){var G=this.currentChannel;if(G&&G>0){var B=this.channels[G];B.insertChars(W)}else this.logger.log(a.WARNING,"No channel found yet. TEXT-MODE?")}!I&&!W&&this.logger.log(a.WARNING,"Couldn't parse cleaned data "+u([L,V])+" orig: "+u([k[H],k[H+1]]))}},_.parseCmd=function(w,k){var I=this.cmdHistory,L=(w===20||w===28||w===21||w===29)&&k>=32&&k<=47,V=(w===23||w===31)&&k>=33&&k<=35;if(!(L||V))return!1;if(R(w,k,I))return f(null,null,I),this.logger.log(a.DEBUG,"Repeated command ("+u([w,k])+") is dropped"),!0;var W=w===20||w===21||w===23?1:2,H=this.channels[W];return w===20||w===21||w===28||w===29?k===32?H.ccRCL():k===33?H.ccBS():k===34?H.ccAOF():k===35?H.ccAON():k===36?H.ccDER():k===37?H.ccRU(2):k===38?H.ccRU(3):k===39?H.ccRU(4):k===40?H.ccFON():k===41?H.ccRDC():k===42?H.ccTR():k===43?H.ccRTD():k===44?H.ccEDM():k===45?H.ccCR():k===46?H.ccENM():k===47&&H.ccEOC():H.ccTO(k-32),f(w,k,I),this.currentChannel=W,!0},_.parseMidrow=function(w,k){var I=0;if((w===17||w===25)&&k>=32&&k<=47){if(w===17?I=1:I=2,I!==this.currentChannel)return this.logger.log(a.ERROR,"Mismatch channel in midrow parsing"),!1;var L=this.channels[I];return L?(L.ccMIDROW(k),this.logger.log(a.DEBUG,"MIDROW ("+u([w,k])+")"),!0):!1}return!1},_.parsePAC=function(w,k){var I,L=this.cmdHistory,V=(w>=17&&w<=23||w>=25&&w<=31)&&k>=64&&k<=127,W=(w===16||w===24)&&k>=64&&k<=95;if(!(V||W))return!1;if(R(w,k,L))return f(null,null,L),!0;var H=w<=23?1:2;k>=64&&k<=95?I=H===1?p[w]:n[w]:I=H===1?d[w]:c[w];var G=this.channels[H];return G?(G.setPAC(this.interpretPAC(I,k)),f(w,k,L),this.currentChannel=H,!0):!1},_.interpretPAC=function(w,k){var I,L={color:null,italics:!1,indent:null,underline:!1,row:w};return k>95?I=k-96:I=k-64,L.underline=(I&1)===1,I<=13?L.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(I/2)]:I<=15?(L.italics=!0,L.color="white"):L.indent=Math.floor((I-16)/2)*4,L},_.parseChars=function(w,k){var I,L=null,V=null;if(w>=25?(I=2,V=w-8):(I=1,V=w),V>=17&&V<=19){var W;V===17?W=k+80:V===18?W=k+112:W=k+144,this.logger.log(a.INFO,"Special char '"+y(W)+"' in channel "+I),L=[W]}else w>=32&&w<=127&&(L=k===0?[w]:[w,k]);if(L){var H=u(L);this.logger.log(a.DEBUG,"Char codes = "+H.join(",")),f(w,k,this.cmdHistory)}return L},_.parseBackgroundAttributes=function(w,k){var I=(w===16||w===24)&&k>=32&&k<=47,L=(w===23||w===31)&&k>=45&&k<=47;if(!(I||L))return!1;var V,W={};w===16||w===24?(V=Math.floor((k-32)/2),W.background=r[V],k%2===1&&(W.background=W.background+"_semi")):k===45?W.background="transparent":(W.foreground="black",k===47&&(W.underline=!0));var H=w<=23?1:2,G=this.channels[H];return G.setBkgData(W),f(w,k,this.cmdHistory),!0},_.reset=function(){for(var w=0;w=16?s--:s++;var f=Object(M.fixLineBreaks)(l.trim()),R=Object(m.generateCueId)(n,c,f);(!d||!d.cues||!d.cues.getCueById(R))&&(u=new t(n,c,f),u.id=R,u.line=S+1,u.align="left",u.position=10+Math.min(80,Math.floor(s*8/32)*10),a.push(u))}return d&&a.length&&(a.sort(function(C,v){return C.line==="auto"||v.line==="auto"?0:C.line>8&&v.line>8?v.line-C.line:C.line-v.line}),a.forEach(function(C){return Object(y.addCueToTrack)(d,C)})),a}};g.default=b},"./src/utils/discontinuities.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"findFirstFragWithCC",function(){return T}),O.d(g,"shouldAlignOnDiscontinuities",function(){return b}),O.d(g,"findDiscontinuousReferenceFrag",function(){return p}),O.d(g,"adjustSlidingStart",function(){return n}),O.d(g,"alignStream",function(){return c}),O.d(g,"alignPDT",function(){return a}),O.d(g,"alignFragmentByPDTDelta",function(){return o}),O.d(g,"alignMediaPlaylistByPDT",function(){return u});var M=O("./src/polyfills/number.ts"),m=O("./src/utils/logger.ts"),y=O("./src/controller/level-helper.ts");function T(h,s){for(var l=null,t=0,S=h.length;tl.startCC||h&&h.cc=this.minWeight_},T.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},T.destroy=function(){},y}();g.default=m},"./src/utils/ewma.ts":function(N,g,O){"use strict";O.r(g);var M=function(){function m(T,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=T,this.alpha_=T?Math.exp(Math.log(.5)/T):0,this.estimate_=b,this.totalWeight_=p}var y=m.prototype;return y.sample=function(b,p){var d=Math.pow(this.alpha_,b);this.estimate_=p*(1-d)+d*this.estimate_,this.totalWeight_+=b},y.getTotalWeight=function(){return this.totalWeight_},y.getEstimate=function(){if(this.alpha_){var b=1-Math.pow(this.alpha_,this.totalWeight_);if(b)return this.estimate_/b}return this.estimate_},m}();g.default=M},"./src/utils/fetch-loader.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"fetchSupported",function(){return o});var M=O("./src/polyfills/number.ts"),m=O("./src/loader/load-stats.ts"),y=O("./src/demux/chunk-cache.ts");function T(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,c(t,S)}function b(t){var S=typeof Map=="function"?new Map:void 0;return b=function(f){if(f===null||!n(f))return f;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(typeof S!="undefined"){if(S.has(f))return S.get(f);S.set(f,R)}function R(){return p(f,arguments,r(this).constructor)}return R.prototype=Object.create(f.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),c(R,f)},b(t)}function p(t,S,x){return d()?p=Reflect.construct:p=function(R,C,v){var _=[null];_.push.apply(_,C);var E=Function.bind.apply(R,_),w=new E;return v&&c(w,v.prototype),w},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(t){return!1}}function n(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function c(t,S){return c=Object.setPrototypeOf||function(f,R){return f.__proto__=R,f},c(t,S)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},r(t)}function a(){return a=Object.assign||function(t){for(var S=1;S=v&&_(R,C,E.flush(),f)):_(R,C,V,f),I()}).catch(function(){return Promise.reject()})};return k()},t}();function h(t,S){var x={method:"GET",mode:"cors",credentials:"same-origin",signal:S,headers:new self.Headers(a({},t.headers))};return t.rangeEnd&&x.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),x}function s(t,S){return new self.Request(t.url,S)}var l=function(t){T(S,t);function S(x,f,R){var C;return C=t.call(this,x)||this,C.code=void 0,C.details=void 0,C.code=f,C.details=R,C}return S}(b(Error));g.default=u},"./src/utils/imsc1-ttml-parser.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"IMSC1_CODEC",function(){return n}),O.d(g,"parseIMSC1",function(){return o});var M=O("./src/utils/mp4-tools.ts"),m=O("./src/utils/vttparser.ts"),y=O("./src/utils/vttcue.ts"),T=O("./src/demux/id3.ts"),b=O("./src/utils/timescale-conversion.ts"),p=O("./src/utils/webvtt-parser.ts");function d(){return d=Object.assign||function(v){for(var _=1;_"):M}function b(n){for(var c=arguments.length,r=new Array(c>1?c-1:0),a=1;a>24,S[x+1]=f>>16&255,S[x+2]=f>>8&255,S[x+3]=f&255}function c(S,x){var f=[];if(!x.length)return f;var R,C,v;"data"in S?(R=S.data,C=S.start,v=S.end):(R=S,C=0,v=R.byteLength);for(var _=C;_1?_+E:v;if(w===x[0])if(x.length===1)f.push({data:R,start:_+8,end:k});else{var I=c({data:R,start:_+8,end:k},x.slice(1));I.length&&T.apply(f,I)}_=k}return f}function r(S){var x=c(S,["moov"]),f=x[0],R=f?f.end:null,C=c(S,["sidx"]);if(!C||!C[0])return null;var v=[],_=C[0],E=_.data[0],w=E===0?8:16,k=d(_,w);w+=4;var I=0,L=0;E===0?w+=8:w+=16,w+=2;var V=_.end+L,W=p(_,w);w+=2;for(var H=0;H>>31;if(z===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var J=d(_,G);G+=4,v.push({referenceSize:P,subsegmentDuration:J,info:{duration:J/k,start:V,end:V+P-1}}),V+=P,G+=4,w=G}return{earliestPresentationTime:I,timescale:k,version:E,referencesCount:W,references:v,moovEndOffset:R}}function a(S){for(var x=[],f=c(S,["moov","trak"]),R=0;Rb)&&(this.startTime=b),this.endTime=p,this.screen=d,this.timelineController.createCaptionsTrack(this.trackName)},y.reset=function(){this.cueRanges=[]},m}()},"./src/utils/texttrack-utils.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"sendAddTrackEvent",function(){return m}),O.d(g,"addCueToTrack",function(){return y}),O.d(g,"clearCurrentCues",function(){return T}),O.d(g,"removeCuesInRange",function(){return b}),O.d(g,"getCuesInRange",function(){return d});var M=O("./src/utils/logger.ts");function m(n,c){var r;try{r=new Event("addtrack")}catch(a){r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=n,c.dispatchEvent(r)}function y(n,c){var r=n.mode;if(r==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(c.id))try{if(n.addCue(c),!n.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(o){M.logger.debug("[texttrack-utils]: "+o);var a=new self.TextTrackCue(c.startTime,c.endTime,c.text);a.id=c.id,n.addCue(a)}r==="disabled"&&(n.mode=r)}function T(n){var c=n.mode;if(c==="disabled"&&(n.mode="hidden"),n.cues)for(var r=n.cues.length;r--;)n.removeCue(n.cues[r]);c==="disabled"&&(n.mode=c)}function b(n,c,r){var a=n.mode;if(a==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var o=d(n.cues,c,r),u=0;un[r].endTime)return-1;for(var a=0,o=r;a<=o;){var u=Math.floor((o+a)/2);if(cn[u].startTime&&a-1)for(var u=o,h=n.length;u=c&&s.endTime<=r)a.push(s);else if(s.startTime>r)return a}return a}},"./src/utils/time-ranges.ts":function(N,g,O){"use strict";O.r(g);var M={toString:function(y){for(var T="",b=y.length,p=0;p1?c-1:0),a=1;a100)throw new Error("Position must be between 0 and 100.");v=I,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",p({},o,{get:function(){return _},set:function(I){var L=b(I);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");_=L,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",p({},o,{get:function(){return E},set:function(I){if(I<0||I>100)throw new Error("Size must be between 0 and 100.");E=I,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",p({},o,{get:function(){return w},set:function(I){var L=b(I);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");w=L,this.hasBeenReset=!0}})),a.displayState=void 0}return d.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},d}()},"./src/utils/vttparser.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"parseTimeStamp",function(){return y}),O.d(g,"fixLineBreaks",function(){return c}),O.d(g,"VTTParser",function(){return r});var M=O("./src/utils/vttcue.ts"),m=function(){function a(){}var o=a.prototype;return o.decode=function(h,s){if(!h)return"";if(typeof h!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(h))},a}();function y(a){function o(h,s,l,t){return(h|0)*3600+(s|0)*60+(l|0)+parseFloat(t||0)}var u=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return u?parseFloat(u[2])>59?o(u[2],u[3],0,u[4]):o(u[1],u[2],u[3],u[4]):null}var T=function(){function a(){this.values=Object.create(null)}var o=a.prototype;return o.set=function(h,s){!this.get(h)&&s!==""&&(this.values[h]=s)},o.get=function(h,s,l){return l?this.has(h)?this.values[h]:s[l]:this.has(h)?this.values[h]:s},o.has=function(h){return h in this.values},o.alt=function(h,s,l){for(var t=0;t=0&&l<=100)return this.set(h,l),!0}return!1},a}();function b(a,o,u,h){var s=h?a.split(h):[a];for(var l in s){if(typeof s[l]!="string")continue;var t=s[l].split(u);if(t.length!==2)continue;var S=t[0],x=t[1];o(S,x)}}var p=new M.default(0,0,""),d=p.align==="middle"?"middle":"center";function n(a,o,u){var h=a;function s(){var S=y(a);if(S===null)throw new Error("Malformed timestamp: "+h);return a=a.replace(/^[^\sa-zA-Z-]+/,""),S}function l(S,x){var f=new T;b(S,function(v,_){var E;switch(v){case"region":for(var w=u.length-1;w>=0;w--)if(u[w].id===_){f.set(v,u[w].region);break}break;case"vertical":f.alt(v,_,["rl","lr"]);break;case"line":E=_.split(","),f.integer(v,E[0]),f.percent(v,E[0])&&f.set("snapToLines",!1),f.alt(v,E[0],["auto"]),E.length===2&&f.alt("lineAlign",E[1],["start",d,"end"]);break;case"position":E=_.split(","),f.percent(v,E[0]),E.length===2&&f.alt("positionAlign",E[1],["start",d,"end","line-left","line-right","auto"]);break;case"size":f.percent(v,_);break;case"align":f.alt(v,_,["start",d,"end","left","right"]);break}},/:/,/\s/),x.region=f.get("region",null),x.vertical=f.get("vertical","");var R=f.get("line","auto");R==="auto"&&p.line===-1&&(R=-1),x.line=R,x.lineAlign=f.get("lineAlign","start"),x.snapToLines=f.get("snapToLines",!0),x.size=f.get("size",100),x.align=f.get("align",d);var C=f.get("position","auto");C==="auto"&&p.position===50&&(C=x.align==="start"||x.align==="left"?0:x.align==="end"||x.align==="right"?100:50),x.position=C}function t(){a=a.replace(/^\s+/,"")}if(t(),o.startTime=s(),t(),a.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+h);a=a.substr(3),t(),o.endTime=s(),t(),l(a,o)}function c(a){return a.replace(//gi,` `)}var r=function(){function a(){this.state="INITIAL",this.buffer="",this.decoder=new m,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=a.prototype;return o.parse=function(h){var s=this;h&&(s.buffer+=s.decoder.decode(h,{stream:!0}));function l(){var C=s.buffer,v=0;for(C=c(C);v")===-1){s.cue.id=S;continue}case"CUE":if(!s.cue){s.state="BADCUE";continue}try{n(S,s.cue,s.regionList)}catch(C){s.cue=null,s.state="BADCUE";continue}s.state="CUETEXT";continue;case"CUETEXT":{var R=S.indexOf("-->")!==-1;if(!S||R&&(f=!0)){s.oncue&&s.cue&&s.oncue(s.cue),s.cue=null,s.state="ID";continue}if(s.cue===null)continue;s.cue.text&&(s.cue.text+=` `),s.cue.text+=S}continue;case"BADCUE":S||(s.state="ID")}}}catch(C){s.state==="CUETEXT"&&s.cue&&s.oncue&&s.oncue(s.cue),s.cue=null,s.state=s.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},o.flush=function(){var h=this;try{if((h.cue||h.state==="HEADER")&&(h.buffer+=` `,h.parse()),h.state==="INITIAL"||h.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(s){h.onparsingerror&&h.onparsingerror(s)}return h.onflush&&h.onflush(),this},a}()},"./src/utils/webvtt-parser.ts":function(N,g,O){"use strict";O.r(g),O.d(g,"generateCueId",function(){return r}),O.d(g,"parseWebVTT",function(){return o});var M=O("./src/polyfills/number.ts"),m=O("./src/utils/vttparser.ts"),y=O("./src/demux/id3.ts"),T=O("./src/utils/timescale-conversion.ts"),b=O("./src/remux/mp4-remuxer.ts"),p=/\r\n|\n\r|\n|\r/g,d=function(h,s,l){return l===void 0&&(l=0),h.substr(l,s.length)===s},n=function(h){var s=parseInt(h.substr(-3)),l=parseInt(h.substr(-6,2)),t=parseInt(h.substr(-9,2)),S=h.length>9?parseInt(h.substr(0,h.indexOf(":"))):0;if(!Object(M.isFiniteNumber)(s)||!Object(M.isFiniteNumber)(l)||!Object(M.isFiniteNumber)(t)||!Object(M.isFiniteNumber)(S))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+h);return s+=1e3*l,s+=60*1e3*t,s+=60*60*1e3*S,s},c=function(h){for(var s=5381,l=h.length;l;)s=s*33^h.charCodeAt(--l);return(s>>>0).toString()};function r(u,h,s){return c(u.toString())+c(h.toString())+c(s)}var a=function(h,s,l){var t=h[s],S=h[t.prevCC];if(!S||!S.new&&t.new){h.ccOffset=h.presentationOffset=t.start,t.new=!1;return}for(;(x=S)!==null&&x!==void 0&&x.new;){var x;h.ccOffset+=t.start-S.start,t.new=!1,t=S,S=h[t.prevCC]}h.presentationOffset=l};function o(u,h,s,l,t,S,x,f){var R=new m.VTTParser,C=Object(y.utf8ArrayToStr)(new Uint8Array(u)).trim().replace(p,` `).split(` `),v=[],_=Object(T.toMpegTsClockFromTimescale)(h,s),E="00:00.000",w=0,k=0,I,L=!0,V=!1;R.oncue=function(W){var H=l[t],G=l.ccOffset,B=(w-_)/9e4;if(H!=null&&H.new&&(k!==void 0?G=l.ccOffset=H.start:a(l,t,B)),B&&(G=B-l.presentationOffset),V){var P=W.endTime-W.startTime,z=Object(b.normalizePts)((W.startTime+G-k)*9e4,S*9e4)/9e4;W.startTime=z,W.endTime=z+P}var J=W.text.trim();W.text=decodeURIComponent(encodeURIComponent(J)),W.id||(W.id=r(W.startTime,W.endTime,J)),W.endTime>0&&v.push(W)},R.onparsingerror=function(W){I=W},R.onflush=function(){if(I){f(I);return}x(v)},C.forEach(function(W){if(L)if(d(W,"X-TIMESTAMP-MAP=")){L=!1,V=!0,W.substr(16).split(",").forEach(function(H){d(H,"LOCAL:")?E=H.substr(6):d(H,"MPEGTS:")&&(w=parseInt(H.substr(7)))});try{k=n(E)/1e3}catch(H){V=!1,I=H}return}else W===""&&(L=!1);R.parse(W+` `)}),R.flush()}},"./src/utils/xhr-loader.ts":function(N,g,O){"use strict";O.r(g);var M=O("./src/utils/logger.ts"),m=O("./src/loader/load-stats.ts"),y=/^age:\s*[\d.]+\s*$/m,T=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 m.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 n=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),n&&(n.onreadystatechange=null,n.onprogress=null,n.readyState!==4&&(this.stats.aborted=!0,n.abort()))},p.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},p.load=function(n,c,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=n,this.config=c,this.callbacks=r,this.retryDelay=c.retryDelay,this.loadInternal()},p.loadInternal=function(){var n=this.config,c=this.context;if(!n)return;var r=this.loader=new self.XMLHttpRequest,a=this.stats;a.loading.first=0,a.loaded=0;var o=this.xhrSetup;try{if(o)try{o(r,c.url)}catch(s){r.open("GET",c.url,!0),o(r,c.url)}r.readyState||r.open("GET",c.url,!0);var u=this.context.headers;if(u)for(var h in u)r.setRequestHeader(h,u[h])}catch(s){this.callbacks.onError({code:r.status,text:s.message},c,r);return}c.rangeEnd&&r.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),r.send()},p.readystatechange=function(){var n=this.context,c=this.loader,r=this.stats;if(!n||!c)return;var a=c.readyState,o=this.config;if(r.aborted)return;if(a>=2)if(self.clearTimeout(this.requestTimeout),r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),a===4){c.onreadystatechange=null,c.onprogress=null;var u=c.status;if(u>=200&&u<300){r.loading.end=Math.max(self.performance.now(),r.loading.first);var h,s;if(n.responseType==="arraybuffer"?(h=c.response,s=h.byteLength):(h=c.responseText,s=h.length),r.loaded=r.total=s,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(r,n,h,c),!this.callbacks)return;var t={url:c.responseURL,data:h};this.callbacks.onSuccess(t,r,n,c)}else r.retry>=o.maxRetry||u>=400&&u<499?(M.logger.error(u+" while loading "+n.url),this.callbacks.onError({code:u,text:c.statusText},n,c)):(M.logger.warn(u+" while loading "+n.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(){M.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},p.loadprogress=function(n){var c=this.stats;c.loaded=n.loaded,n.lengthComputable&&(c.total=n.total)},p.getCacheAge=function(){var n=null;if(this.loader&&y.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");n=c?parseFloat(c):null}return n},b}();g.default=T}}).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,g,O){F.exports=q=g(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.StreamCipher,m=g.algo,y=m.RC4=M.extend({_doReset:function(){for(var p=this._key,d=p.words,n=p.sigBytes,c=this._S=[],r=0;r<256;r++)c[r]=r;for(var r=0,a=0;r<256;r++){var o=r%n,u=d[o>>>2]>>>24-o%4*8&255;a=(a+c[r]+u)%256;var h=c[r];c[r]=c[a],c[a]=h}this._i=this._j=0},_doProcessBlock:function(p,d){p[d]^=T.call(this)},keySize:256/32,ivSize:0});function T(){for(var p=this._S,d=this._i,n=this._j,c=0,r=0;r<4;r++){d=(d+1)%256,n=(n+p[d])%256;var a=p[d];p[d]=p[n],p[n]=a,c|=p[(p[d]+p[n])%256]<<24-r*8}return this._i=d,this._j=n,c}g.RC4=M._createHelper(y);var b=m.RC4Drop=y.extend({cfg:y.cfg.extend({drop:192}),_doReset:function(){y._doReset.call(this);for(var p=this.cfg.drop;p>0;p--)T.call(this)}});g.RC4Drop=M._createHelper(b)}(),N.RC4})},wCXF:function(F,q,j){"use strict";j.d(q,"a",function(){return rt});var N=j("rePB"),g=j("VTBJ"),O=j("KQm4"),M=j("U8pU"),m=j("ODXe"),y=j("q1tI"),T=j("TSYQ"),b=j.n(T),p=j("Gytx"),d=j.n(p),n=j("Kwbf"),c=j("t23M"),r=j("qx4F"),a=j("6eGT"),o=j("IBYe"),u=j("Ff2n"),h=j("c+Xe"),s=j("fyJ8"),l=j("biw7");function t(Be,Ie,at,ct,$e){var st=at[Be]||{},Ue=at[Ie]||{},Le,Me;st.fixed==="left"?Le=ct.left[Be]:Ue.fixed==="right"&&(Me=ct.right[Ie]);var Ee=!1,Ce=!1,ke=!1,Ne=!1,He=at[Ie+1],tt=at[Be-1];if($e==="rtl"){if(Le!==void 0){var vt=tt&&tt.fixed==="left";Ne=!vt}else if(Me!==void 0){var yt=He&&He.fixed==="right";ke=!yt}}else if(Le!==void 0){var Wt=He&&He.fixed==="left";Ee=!Wt}else if(Me!==void 0){var Ht=tt&&tt.fixed==="right";Ce=!Ht}return{fixLeft:Le,fixRight:Me,lastFixLeft:Ee,firstFixRight:Ce,lastFixRight:ke,firstFixLeft:Ne,isSticky:ct.isSticky}}var S=j("sR1s");function x(Be){var Ie=Be.cells,at=Be.stickyOffsets,ct=Be.flattenColumns,$e=Be.rowComponent,st=Be.cellComponent,Ue=Be.onHeaderRow,Le=Be.index,Me=y.useContext(l.a),Ee=Me.prefixCls,Ce=Me.direction,ke;Ue&&(ke=Ue(Ie.map(function(He){return He.column}),Le));var Ne=Object(S.a)(Ie.map(function(He){return He.column}));return y.createElement($e,Object.assign({},ke),Ie.map(function(He,tt){var vt=He.column,yt=t(He.colStart,He.colEnd,ct,at,Ce),Wt;return vt&&vt.onHeaderCell&&(Wt=He.column.onHeaderCell(vt)),y.createElement(s.a,Object.assign({},He,{ellipsis:vt.ellipsis,align:vt.align,component:st,prefixCls:Ee,key:Ne[tt]},yt,{additionalProps:Wt,rowType:"header"}))}))}x.displayName="HeaderRow";var f=x;function R(Be){var Ie=[];function at(Ue,Le){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[Me]=Ie[Me]||[];var Ee=Le,Ce=Ue.filter(Boolean).map(function(ke){var Ne={key:ke.key,className:ke.className||"",children:ke.title,column:ke,colStart:Ee},He=1,tt=ke.children;return tt&&tt.length>0&&(He=at(tt,Ee,Me+1).reduce(function(vt,yt){return vt+yt},0),Ne.hasSubColumns=!0),"colSpan"in ke&&(He=ke.colSpan),"rowSpan"in ke&&(Ne.rowSpan=ke.rowSpan),Ne.colSpan=He,Ne.colEnd=Ne.colStart+He-1,Ie[Me].push(Ne),Ee+=He,He});return Ce}at(Be,0);for(var ct=Ie.length,$e=function(Le){Ie[Le].forEach(function(Me){!("rowSpan"in Me)&&!Me.hasSubColumns&&(Me.rowSpan=ct-Le)})},st=0;st=0;Le-=1){var Me=Ie[Le],Ee=at&&at[Le],Ce=Ee&&Ee[_.a];(Me||Ce||Ue)&&($e.unshift(y.createElement("col",Object.assign({key:Le,style:{width:Me,minWidth:Me}},Ce))),Ue=!0)}return y.createElement("colgroup",null,$e)}var w=E;function k(Be,Ie){return Object(y.useMemo)(function(){for(var at=[],ct=0;ct1?ee-1:0),se=1;se=ke&&(an=ke-Ne),Ue({scrollLeft:an/ke*(Ce+2)}),Ht.current.x=Tt.pageX},Or=function(){var Tt=Object(Q.b)(st.current).top,gr=Tt+st.current.offsetHeight,Br=document.documentElement.scrollTop+window.innerHeight;gr-Object(r.a)()<=Br||Tt>=Br-Le?Wt(function(zr){return Object(g.a)(Object(g.a)({},zr),{},{isHiddenScrollBar:!0})}):Wt(function(zr){return Object(g.a)(Object(g.a)({},zr),{},{isHiddenScrollBar:!1})})},dn=function(Tt){Wt(function(gr){return Object(g.a)(Object(g.a)({},gr),{},{scrollLeft:Tt/Ce*ke||0})})};return y.useImperativeHandle(at,function(){return{setScrollLeft:dn}}),y.useEffect(function(){var hn=Object(X.a)(document.body,"mouseup",Vr,!1),Tt=Object(X.a)(document.body,"mousemove",vn,!1);return Or(),function(){hn.remove(),Tt.remove()}},[Ne,St]),y.useEffect(function(){var hn=Object(X.a)(window,"scroll",Or,!1),Tt=Object(X.a)(window,"resize",Or,!1);return function(){hn.remove(),Tt.remove()}},[]),y.useEffect(function(){yt.isHiddenScrollBar||Wt(function(hn){var Tt,gr;return Object(g.a)(Object(g.a)({},hn),{},{scrollLeft:st.current.scrollLeft/((Tt=st.current)===null||Tt===void 0?void 0:Tt.scrollWidth)*((gr=st.current)===null||gr===void 0?void 0:gr.clientWidth)})})},[yt.isHiddenScrollBar]),Ce<=ke||!Ne||yt.isHiddenScrollBar?null:y.createElement("div",{style:{height:Object(r.a)(),width:ke,bottom:Le},className:"".concat(Ee,"-sticky-scroll")},y.createElement("div",{onMouseDown:Yr,ref:He,className:b()("".concat(Ee,"-sticky-scroll-bar"),Object(N.a)({},"".concat(Ee,"-sticky-scroll-bar-active"),St)),style:{width:"".concat(Ne,"px"),transform:"translate3d(".concat(yt.scrollLeft,"px, 0, 0)")}}))},ve=y.forwardRef(_e);function Re(Be,Ie){return y.useMemo(function(){var at=!!Be;return{isSticky:at,stickyClassName:at?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(M.a)(Be)==="object"&&Be.offsetHeader||0,offsetScroll:Object(M.a)(Be)==="object"&&Be.offsetScroll||0}},[Be,Ie])}var Je=[],qe={},rt="rc-table-internal-hook",ut=y.memo(function(Be){var Ie=Be.children;return Ie},function(Be,Ie){return d()(Be.props,Ie.props)?Be.pingLeft!==Ie.pingLeft||Be.pingRight!==Ie.pingRight:!1});function dt(Be){var Ie,at=Be.prefixCls,ct=Be.className,$e=Be.rowClassName,st=Be.style,Ue=Be.data,Le=Be.rowKey,Me=Be.scroll,Ee=Be.tableLayout,Ce=Be.direction,ke=Be.title,Ne=Be.footer,He=Be.summary,tt=Be.id,vt=Be.showHeader,yt=Be.components,Wt=Be.emptyText,Ht=Be.onRow,cr=Be.onHeaderRow,dr=Be.internalHooks,St=Be.transformColumns,Kr=Be.internalRefs,Vr=Be.sticky,Yr=Ue||Je,vn=!!Yr.length,Or=y.useState(0),dn=Object(m.a)(Or,2),hn=dn[0],Tt=dn[1];y.useEffect(function(){Tt(Object(r.a)())});var gr=y.useMemo(function(){return Object(S.c)(yt,{})},[yt]),Br=y.useCallback(function(Pr,Ft){return Object(S.b)(gr,Pr)||Ft},[gr]),zr=y.useMemo(function(){return typeof Le=="function"?Le:function(Pr){var Ft=Pr&&Pr[Le];return Ft}},[Le]),an=Object(_.c)(Be),gi=an.expandIcon,Ei=an.expandedRowKeys,bn=an.defaultExpandedRowKeys,lr=an.defaultExpandAllRows,Yn=an.expandedRowRender,ci=an.onExpand,Hn=an.onExpandedRowsChange,qr=an.expandRowByClick,Un=an.rowExpandable,di=an.expandIconColumnIndex,vi=an.expandedRowClassName,Ut=an.childrenColumnName,_r=an.indentSize,hi=gi||ie,xi=Ut||"children",Di=y.useMemo(function(){return Yn?"row":Be.expandable&&dr===rt&&Be.expandable.__PARENT_RENDER_ICON__||Yr.some(function(Pr){return Pr&&Object(M.a)(Pr)==="object"&&Pr[xi]})?"nest":!1},[!!Yn,Yr]),wi=y.useState(function(){return bn||(lr?Z(Yr,zr,xi):[])}),le=Object(m.a)(wi,2),K=le[0],Y=le[1],ee=y.useMemo(function(){return new Set(Ei||K||[])},[Ei,K]),ge=y.useCallback(function(Pr){var Ft=zr(Pr,Yr.indexOf(Pr)),Qt,vr=ee.has(Ft);vr?(ee.delete(Ft),Qt=Object(O.a)(ee)):Qt=[].concat(Object(O.a)(ee),[Ft]),Y(Qt),ci&&ci(!vr,Pr),Hn&&Hn(Qt)},[zr,ee,Yr,ci,Hn]),se=y.useState(0),Ke=Object(m.a)(se,2),Ct=Ke[0],Xt=Ke[1],Er=Object(pe.b)(Object(g.a)(Object(g.a)(Object(g.a)({},Be),an),{},{expandable:!!Yn,expandedKeys:ee,getRowKey:zr,onTriggerExpand:ge,expandIcon:hi,expandIconColumnIndex:di,direction:Ce}),dr===rt?St:null),Pt=Object(m.a)(Er,2),Lr=Pt[0],Gr=Pt[1],_n=y.useMemo(function(){return{columns:Lr,flattenColumns:Gr}},[Lr,Gr]),Zn=y.useRef(),qn=y.useRef(),Nn=y.useRef(),Ni=y.useState(!1),Gi=Object(m.a)(Ni,2),Wn=Gi[0],Ti=Gi[1],Ki=y.useState(!1),ki=Object(m.a)(Ki,2),ni=ki[0],ea=ki[1],Vi=ce(new Map),ta=Object(m.a)(Vi,2),oa=ta[0],Li=ta[1],$n=Object(S.a)(Gr),ji=$n.map(function(Pr){return oa.get(Pr)}),ha=y.useMemo(function(){return ji},[ji.join("_")]),xt=fe(ha,Gr.length,Ce),et=Me&&Object(S.d)(Me.y),mt=Me&&Object(S.d)(Me.x),wt=mt&&Gr.some(function(Pr){var Ft=Pr.fixed;return Ft}),Lt=y.useRef(),Dt=Re(Vr,at),Kt=Dt.isSticky,zt=Dt.offsetHeader,ht=Dt.offsetScroll,Ot=Dt.stickyClassName,Rt,ur,ar;et&&(ur={overflowY:"scroll",maxHeight:Me.y}),mt&&(Rt={overflowX:"auto"},et||(ur={overflowY:"hidden"}),ar={width:Me.x===!0?"auto":Me.x,minWidth:"100%"});var Zt=y.useCallback(function(Pr,Ft){Li(function(Qt){var vr=new Map(Qt);return vr.set(Pr,Ft),vr})},[]),$t=ae(null),rr=Object(m.a)($t,2),sr=rr[0],ot=rr[1];function Ar(Pr,Ft){if(!Ft)return;typeof Ft=="function"?Ft(Pr):Ft.scrollLeft!==Pr&&(Ft.scrollLeft=Pr)}var Nr=function(Ft){var Qt=Ft.currentTarget,vr=Ft.scrollLeft,tr=typeof vr=="number"?vr:Qt.scrollLeft,gt=Qt||qe;if(!ot()||ot()===gt){var bt;sr(gt),Ar(tr,qn.current),Ar(tr,Nn.current),Ar(tr,(bt=Lt.current)===null||bt===void 0?void 0:bt.setScrollLeft)}if(Qt){var Vt=Qt.scrollWidth,Mt=Qt.clientWidth;Ti(tr>0),ea(tr0?[].concat(Object(g.a)(u),Object(g.a)(n(t).map(function(S){return Object(O.a)({fixed:l},S)}))):[].concat(Object(g.a)(u),[Object(O.a)(Object(O.a)({},h),{},{fixed:l})])},[])}function c(o){for(var u=!0,h=0;h=0;t-=1){var S=o[t];if(l&&S.fixed!=="right")l=!1;else if(!l&&S.fixed==="right"){Object(T.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function r(o){return o.map(function(u){var h=u.fixed,s=Object(M.a)(u,["fixed"]),l=h;return h==="left"?l="right":h==="right"&&(l="left"),Object(O.a)({fixed:l},s)})}function a(o,u){var h=o.prefixCls,s=o.columns,l=o.children,t=o.expandable,S=o.expandedKeys,x=o.getRowKey,f=o.onTriggerExpand,R=o.expandIcon,C=o.rowExpandable,v=o.expandIconColumnIndex,_=o.direction,E=o.expandRowByClick,w=m.useMemo(function(){return s||d(l)},[s,l]),k=m.useMemo(function(){if(t){var V,W=v||0,H=w[W],G=(V={},Object(N.a)(V,p.a,{className:"".concat(h,"-expand-icon-col")}),Object(N.a)(V,"title",""),Object(N.a)(V,"fixed",H?H.fixed:null),Object(N.a)(V,"className","".concat(h,"-row-expand-icon-cell")),Object(N.a)(V,"render",function(z,J,ue){var de=x(J,ue),Se=S.has(de),Ae=C?C(J):!0,pe=R({prefixCls:h,expanded:Se,expandable:Ae,record:J,onExpand:f});return E?m.createElement("span",{onClick:function(ye){return ye.stopPropagation()}},pe):pe}),V),B=w.slice();return W>=0&&B.splice(W,0,G),B}return w},[t,w,x,S,R,_]),I=m.useMemo(function(){var V=k;return u&&(V=u(V)),V.length||(V=[{render:function(){return null}}]),V},[u,k,_]),L=m.useMemo(function(){return _==="rtl"?r(n(I)):n(I)},[I,_]);return[I,L]}q.b=a},wZgz:function(F,q,j){(function(N,g,O){F.exports=q=g(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.BlockCipher,m=g.algo,y=[],T=[],b=[],p=[],d=[],n=[],c=[],r=[],a=[],o=[];(function(){for(var s=[],l=0;l<256;l++)l<128?s[l]=l<<1:s[l]=l<<1^283;for(var t=0,S=0,l=0;l<256;l++){var x=S^S<<1^S<<2^S<<3^S<<4;x=x>>>8^x&255^99,y[t]=x,T[x]=t;var f=s[t],R=s[f],C=s[R],v=s[x]*257^x*16843008;b[t]=v<<24|v>>>8,p[t]=v<<16|v>>>16,d[t]=v<<8|v>>>24,n[t]=v;var v=C*16843009^R*65537^f*257^t*16843008;c[x]=v<<24|v>>>8,r[x]=v<<16|v>>>16,a[x]=v<<8|v>>>24,o[x]=v,t?(t=f^s[s[s[C^f]]],S^=s[s[S]]):t=S=1}})();var u=[0,1,2,4,8,16,32,64,128,27,54],h=m.AES=M.extend({_doReset:function(){var s;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var l=this._keyPriorReset=this._key,t=l.words,S=l.sigBytes/4,x=this._nRounds=S+6,f=(x+1)*4,R=this._keySchedule=[],C=0;C6&&C%S==4&&(s=y[s>>>24]<<24|y[s>>>16&255]<<16|y[s>>>8&255]<<8|y[s&255]):(s=s<<8|s>>>24,s=y[s>>>24]<<24|y[s>>>16&255]<<16|y[s>>>8&255]<<8|y[s&255],s^=u[C/S|0]<<24),R[C]=R[C-S]^s);for(var v=this._invKeySchedule=[],_=0;_>>24]]^r[y[s>>>16&255]]^a[y[s>>>8&255]]^o[y[s&255]]}},encryptBlock:function(s,l){this._doCryptBlock(s,l,this._keySchedule,b,p,d,n,y)},decryptBlock:function(s,l){var t=s[l+1];s[l+1]=s[l+3],s[l+3]=t,this._doCryptBlock(s,l,this._invKeySchedule,c,r,a,o,T);var t=s[l+1];s[l+1]=s[l+3],s[l+3]=t},_doCryptBlock:function(s,l,t,S,x,f,R,C){for(var v=this._nRounds,_=s[l]^t[0],E=s[l+1]^t[1],w=s[l+2]^t[2],k=s[l+3]^t[3],I=4,L=1;L>>24]^x[E>>>16&255]^f[w>>>8&255]^R[k&255]^t[I++],W=S[E>>>24]^x[w>>>16&255]^f[k>>>8&255]^R[_&255]^t[I++],H=S[w>>>24]^x[k>>>16&255]^f[_>>>8&255]^R[E&255]^t[I++],G=S[k>>>24]^x[_>>>16&255]^f[E>>>8&255]^R[w&255]^t[I++];_=V,E=W,w=H,k=G}var V=(C[_>>>24]<<24|C[E>>>16&255]<<16|C[w>>>8&255]<<8|C[k&255])^t[I++],W=(C[E>>>24]<<24|C[w>>>16&255]<<16|C[k>>>8&255]<<8|C[_&255])^t[I++],H=(C[w>>>24]<<24|C[k>>>16&255]<<16|C[_>>>8&255]<<8|C[E&255])^t[I++],G=(C[k>>>24]<<24|C[_>>>16&255]<<16|C[E>>>8&255]<<8|C[w&255])^t[I++];s[l]=V,s[l+1]=W,s[l+2]=H,s[l+3]=G},keySize:256/32});g.AES=M._createHelper(h)}(),N.AES})},wbyO:function(F,q,j){(function(N,g){F.exports=q=g(j("Ib8C"))})(this,function(N){return function(){var g=N,O=g.lib,M=O.WordArray,m=g.enc,y=m.Base64url={stringify:function(b,p=!0){var d=b.words,n=b.sigBytes,c=p?this._safe_map:this._map;b.clamp();for(var r=[],a=0;a>>2]>>>24-a%4*8&255,u=d[a+1>>>2]>>>24-(a+1)%4*8&255,h=d[a+2>>>2]>>>24-(a+2)%4*8&255,s=o<<16|u<<8|h,l=0;l<4&&a+l*.75>>6*(3-l)&63));var t=c.charAt(64);if(t)for(;r.length%4;)r.push(t);return r.join("")},parse:function(b,p=!0){var d=b.length,n=p?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var r=0;r>>6-r%4*2,u=a|o;n[c>>>2]|=u<<24-c%4*8,c++}return M.create(n,c)}}(),N.enc.Base64url})},"y0+3":function(F,q,j){"use strict";j.d(q,"a",function(){return n}),j.d(q,"b",function(){return r});var N=/margin|padding|width|height|max|min|offset/,g={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function M(a){return a.nodeType===1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}}function m(a,o,u){if(o=o.toLowerCase(),u==="auto"){if(o==="height")return a.offsetHeight;if(o==="width")return a.offsetWidth}return o in g||(g[o]=N.test(o)),g[o]?parseFloat(u)||0:u}function y(a,o){var u=arguments.length,h=M(a);return o=O[o]?"cssFloat"in a.style?"cssFloat":"styleFloat":o,u===1?h:m(a,o,h[o]||a.style[o])}function T(a,o,u){var h=arguments.length;if(o=O[o]?"cssFloat"in a.style?"cssFloat":"styleFloat":o,h===3)return typeof u=="number"&&N.test(o)&&(u="".concat(u,"px")),a.style[o]=u,u;for(var s in o)o.hasOwnProperty(s)&&T(a,s,o[s]);return M(a)}function b(a){return a===document.body?document.documentElement.clientWidth:a.offsetWidth}function p(a){return a===document.body?window.innerHeight||document.documentElement.clientHeight:a.offsetHeight}function d(){var a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:a,height:o}}function n(){var a=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:a,height:o}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function r(a){var o=a.getBoundingClientRect(),u=document.documentElement;return{left:o.left+(window.pageXOffset||u.scrollLeft)-(u.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||u.scrollTop)-(u.clientTop||document.body.clientTop||0)}}},"yTi+":function(F,q,j){F.exports=j.p+"static/AssistantCode3.fdd8db3c.jpeg"},zrhs:function(F,q,j){"use strict";var N=j("2qtc"),g=j("kLXV"),O=j("PpiC"),M=j("q1tI"),m=j.n(M),y=j("9kvl"),T=function(p){var d=p.shixunsDetail,n=p.globalSetting,c=p.loading,r=p.dispatch,a=Object(O.a)(p,["shixunsDetail","globalSetting","loading","dispatch"]);return m.a.createElement(g.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:d.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){r({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){r({type:"shixunsDetail/setActionTabs",payload:{}})}},m.a.createElement("p",{className:"tc font16"},"\u5F53\u524D\u7ADE\u8D5B\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u8BF7\u5148\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u518D\u62A5\u540D\u53C2\u8D5B",m.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};q.a=Object(y.a)(function(b){var p=b.shixunsDetail,d=b.loading,n=b.globalSetting;return{shixunsDetail:p,globalSetting:n,loading:d.models.index}})(T)}}]);