(window.webpackJsonp=window.webpackJsonp||[]).push([[118,5,6,7,8,10,16],{"+NIl":function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){"use strict";L.defineMode("stex",function(g,T){"use strict";function P(o,h){o.cmdState.push(h)}function p(o){return o.cmdState.length>0?o.cmdState[o.cmdState.length-1]:null}function v(o){var h=o.cmdState.pop();h&&h.closeBracket()}function S(o){for(var h=o.cmdState,m=h.length-1;m>=0;m--){var s=h[m];if(s.name=="DEFAULT")continue;return s}return{styleIdentifier:function(){return null}}}function b(o,h,m){return function(){this.name=o,this.bracketNo=0,this.style=h,this.styles=m,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var d={};d.importmodule=b("importmodule","tag",["string","builtin"]),d.documentclass=b("documentclass","tag",["","atom"]),d.usepackage=b("usepackage","tag",["atom"]),d.begin=b("begin","tag",["atom"]),d.end=b("end","tag",["atom"]),d.label=b("label","tag",["atom"]),d.ref=b("ref","tag",["atom"]),d.eqref=b("eqref","tag",["atom"]),d.cite=b("cite","tag",["atom"]),d.bibitem=b("bibitem","tag",["atom"]),d.Bibitem=b("Bibitem","tag",["atom"]),d.RBibitem=b("RBibitem","tag",["atom"]),d.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function l(o,h){o.f=h}function n(o,h){var m;if(o.match(/^\\[a-zA-Z@]+/)){var s=o.current().slice(1);return m=d.hasOwnProperty(s)?d[s]:d.DEFAULT,m=new m,P(h,m),l(h,u),m.style}if(o.match(/^\\[$&%#{}_]/))return"tag";if(o.match(/^\\[,;!\/\\]/))return"tag";if(o.match("\\["))return l(h,function(a,t){return c(a,t,"\\]")}),"keyword";if(o.match("\\("))return l(h,function(a,t){return c(a,t,"\\)")}),"keyword";if(o.match("$$"))return l(h,function(a,t){return c(a,t,"$$")}),"keyword";if(o.match("$"))return l(h,function(a,t){return c(a,t,"$")}),"keyword";var r=o.next();if(r=="%")return o.skipToEnd(),"comment";if(r=="}"||r=="]"){if(m=p(h),m)m.closeBracket(r),l(h,u);else return"error";return"bracket"}else return r=="{"||r=="["?(m=d.DEFAULT,m=new m,P(h,m),"bracket"):/\d/.test(r)?(o.eatWhile(/[\w.%]/),"atom"):(o.eatWhile(/[\w\-_]/),m=S(h),m.name=="begin"&&(m.argument=o.current()),m.styleIdentifier())}function c(o,h,m){if(o.eatSpace())return null;if(m&&o.match(m))return l(h,n),"keyword";if(o.match(/^\\[a-zA-Z@]+/))return"tag";if(o.match(/^[a-zA-Z]+/))return"variable-2";if(o.match(/^\\[$&%#{}_]/))return"tag";if(o.match(/^\\[,;!\/]/))return"tag";if(o.match(/^[\^_&]/))return"tag";if(o.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(o.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var s=o.next();return s=="{"||s=="}"||s=="["||s=="]"||s=="("||s==")"?"bracket":s=="%"?(o.skipToEnd(),"comment"):"error"}function u(o,h){var m=o.peek(),s;return m=="{"||m=="["?(s=p(h),s.openBracket(m),o.eat(m),l(h,n),"bracket"):/[ \t\r]/.test(m)?(o.eat(m),null):(l(h,n),v(h),n(o,h))}return{startState:function(){var o=T.inMathMode?function(h,m){return c(h,m)}:n;return{cmdState:[],f:o}},copyState:function(o){return{cmdState:o.cmdState.slice(),f:o.f}},token:function(o,h){return h.f(o,h)},blankLine:function(o){o.f=n,o.cmdState.length=0},lineComment:"%"}}),L.defineMIME("text/x-stex","stex"),L.defineMIME("text/x-latex","stex")})},"+ua5":function(j,Y,D){},"/cxE":function(j,Y,D){"use strict";D.d(Y,"e",function(){return T}),D.d(Y,"f",function(){return P}),D.d(Y,"g",function(){return p}),D.d(Y,"d",function(){return S}),D.d(Y,"a",function(){return b}),D.d(Y,"b",function(){return d}),D.d(Y,"c",function(){return l});var L=function(){function n(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(function(){throw c.stack?new Error(c.message+` `+c.stack):c},0)}}return n.prototype.emit=function(c){this.listeners.forEach(function(u){u(c)})},n.prototype.onUnexpectedError=function(c){this.unexpectedErrorHandler(c),this.emit(c)},n.prototype.onUnexpectedExternalError=function(c){this.unexpectedErrorHandler(c)},n}(),g=new L;function T(n){S(n)||g.onUnexpectedError(n);return}function P(n){S(n)||g.onUnexpectedExternalError(n);return}function p(n){if(n instanceof Error){var c=n.name,u=n.message,o=n.stacktrace||n.stack;return{$isError:!0,name:c,message:u,stack:o}}return n}var v="Canceled";function S(n){return n instanceof Error&&n.name===v&&n.message===v}function b(){var n=new Error(v);return n.name=n.message,n}function d(n){return n?new Error("Illegal argument: "+n):new Error("Illegal argument")}function l(n){return n?new Error("Illegal state: "+n):new Error("Illegal state")}},"19Vz":function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){L.defineOption("placeholder","",function(b,d,l){var n=l&&l!=L.Init;if(d&&!n)b.on("blur",p),b.on("change",v),b.on("swapDoc",v),L.on(b.getInputField(),"compositionupdate",b.state.placeholderCompose=function(){P(b)}),v(b);else if(!d&&n){b.off("blur",p),b.off("change",v),b.off("swapDoc",v),L.off(b.getInputField(),"compositionupdate",b.state.placeholderCompose),g(b);var c=b.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}d&&!b.hasFocus()&&p(b)});function g(b){b.state.placeholder&&(b.state.placeholder.parentNode.removeChild(b.state.placeholder),b.state.placeholder=null)}function T(b){g(b);var d=b.state.placeholder=document.createElement("pre");d.style.cssText="height: 0; overflow: visible",d.style.direction=b.getOption("direction"),d.className="CodeMirror-placeholder CodeMirror-line-like";var l=b.getOption("placeholder");typeof l=="string"&&(l=document.createTextNode(l)),d.appendChild(l),b.display.lineSpace.insertBefore(d,b.display.lineSpace.firstChild)}function P(b){setTimeout(function(){var d=!1,l=b.getInputField();l.nodeName=="TEXTAREA"?d=!l.value:b.lineCount()==1&&(d=!/[^\u200b]/.test(l.querySelector(".CodeMirror-line").textContent)),d?T(b):g(b)},20)}function p(b){S(b)&&T(b)}function v(b){var d=b.getWrapperElement(),l=S(b);d.className=d.className.replace(" CodeMirror-empty","")+(l?" CodeMirror-empty":""),l?T(b):g(b)}function S(b){return b.lineCount()===1&&b.getLine(0)===""}})},"1ZF9":function(j,Y,D){j.exports=D.p+"static/Authorize.cc9c212f.png"},"1eCo":function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){"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},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};L.defineMode("xml",function(P,p){var v=P.indentUnit,S={},b=p.htmlMode?g:T;for(var d in b)S[d]=b[d];for(var d in p)S[d]=p[d];var l,n;function c(_,M){function I(H){return M.tokenize=H,H(_,M)}var N=_.next();if(N=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?I(h("atom","]]>")):null:_.match("--")?I(h("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),I(m(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),M.tokenize=h("meta","?>"),"meta"):(l=_.eat("/")?"closeTag":"openTag",M.tokenize=u,"tag bracket");if(N=="&"){var G;return _.eat("#")?_.eat("x")?G=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):G=_.eatWhile(/[\d]/)&&_.eat(";"):G=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),G?"atom":"error"}else return _.eatWhile(/[^&<]/),null}c.isInText=!0;function u(_,M){var I=_.next();if(I==">"||I=="/"&&_.eat(">"))return M.tokenize=c,l=I==">"?"endTag":"selfcloseTag","tag bracket";if(I=="=")return l="equals",null;if(I=="<"){M.tokenize=c,M.state=t,M.tagName=M.tagStart=null;var N=M.tokenize(_,M);return N?N+" tag error":"tag error"}else return/[\'\"]/.test(I)?(M.tokenize=o(I),M.stringStartCol=_.column(),M.tokenize(_,M)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function o(_){var M=function(I,N){for(;!I.eol();)if(I.next()==_){N.tokenize=u;break}return"string"};return M.isInAttribute=!0,M}function h(_,M){return function(I,N){for(;!I.eol();){if(I.match(M)){N.tokenize=c;break}I.next()}return _}}function m(_){return function(M,I){for(var N;(N=M.next())!=null;){if(N=="<")return I.tokenize=m(_+1),I.tokenize(M,I);if(N==">")if(_==1){I.tokenize=c;break}else return I.tokenize=m(_-1),I.tokenize(M,I)}return"meta"}}function s(_,M,I){this.prev=_.context,this.tagName=M,this.indent=_.indented,this.startOfLine=I,(S.doNotIndent.hasOwnProperty(M)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function r(_){_.context&&(_.context=_.context.prev)}function a(_,M){for(var I;;){if(!_.context)return;if(I=_.context.tagName,!S.contextGrabbers.hasOwnProperty(I)||!S.contextGrabbers[I].hasOwnProperty(M))return;r(_)}}function t(_,M,I){return _=="openTag"?(I.tagStart=M.column(),w):_=="closeTag"?E:t}function w(_,M,I){return _=="word"?(I.tagName=M.current(),n="tag",O):S.allowMissingTagName&&_=="endTag"?(n="tag bracket",O(_,M,I)):(n="error",w)}function E(_,M,I){if(_=="word"){var N=M.current();return I.context&&I.context.tagName!=N&&S.implicitlyClosed.hasOwnProperty(I.context.tagName)&&r(I),I.context&&I.context.tagName==N||S.matchClosing===!1?(n="tag",f):(n="tag error",k)}else return S.allowMissingTagName&&_=="endTag"?(n="tag bracket",f(_,M,I)):(n="error",k)}function f(_,M,I){return _!="endTag"?(n="error",f):(r(I),t)}function k(_,M,I){return n="error",f(_,M,I)}function O(_,M,I){if(_=="word")return n="attribute",C;if(_=="endTag"||_=="selfcloseTag"){var N=I.tagName,G=I.tagStart;return I.tagName=I.tagStart=null,_=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(N)?a(I,N):(a(I,N),I.context=new s(I,N,G==I.indented)),t}return n="error",O}function C(_,M,I){return _=="equals"?x:(S.allowMissing||(n="error"),O(_,M,I))}function x(_,M,I){return _=="string"?y:_=="word"&&S.allowUnquoted?(n="string",O):(n="error",O(_,M,I))}function y(_,M,I){return _=="string"?y:O(_,M,I)}return{startState:function(_){var M={tokenize:c,state:t,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(M.baseIndent=_),M},token:function(_,M){if(!M.tagName&&_.sol()&&(M.indented=_.indentation()),_.eatSpace())return null;l=null;var I=M.tokenize(_,M);return(I||l)&&I!="comment"&&(n=null,M.state=M.state(l||I,_,M),n&&(I=n=="error"?I+" error":n)),I},indent:function(_,M,I){var N=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+v;if(N&&N.noIndent)return L.Pass;if(_.tokenize!=u&&_.tokenize!=c)return I?I.match(/^(\s*)/)[0].length:0;if(_.tagName)return S.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+v*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/$/,blockCommentStart:"",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(_){_.state==x&&(_.state=O)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var M=[],I=_.context;I;I=I.prev)I.tagName&&M.push(I.tagName);return M.reverse()}}}),L.defineMIME("text/xml","xml"),L.defineMIME("application/xml","xml"),L.mimeModes.hasOwnProperty("text/html")||L.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("MlIO"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.Hasher,p=g.x64,v=p.Word,S=p.WordArray,b=g.algo;function d(){return v.create.apply(v,arguments)}var l=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],n=[];(function(){for(var u=0;u<80;u++)n[u]=d()})();var c=b.SHA512=P.extend({_doReset:function(){this._hash=new S.init([new v.init(1779033703,4089235720),new v.init(3144134277,2227873595),new v.init(1013904242,4271175723),new v.init(2773480762,1595750129),new v.init(1359893119,2917565137),new v.init(2600822924,725511199),new v.init(528734635,4215389547),new v.init(1541459225,327033209)])},_doProcessBlock:function(u,o){for(var h=this._hash.words,m=h[0],s=h[1],r=h[2],a=h[3],t=h[4],w=h[5],E=h[6],f=h[7],k=m.high,O=m.low,C=s.high,x=s.low,y=r.high,_=r.low,M=a.high,I=a.low,N=t.high,G=t.low,H=w.high,B=w.low,K=E.high,U=E.low,W=f.high,X=f.low,ne=k,fe=O,me=C,Ae=x,De=y,ye=_,Oe=M,xe=I,ue=N,le=G,re=H,pe=B,ee=K,te=U,ce=W,q=X,Q=0;Q<80;Q++){var V,Z,be=n[Q];if(Q<16)Z=be.high=u[o+Q*2]|0,V=be.low=u[o+Q*2+1]|0;else{var ge=n[Q-15],Te=ge.high,Je=ge.low,rt=(Te>>>1|Je<<31)^(Te>>>8|Je<<24)^Te>>>7,nt=(Je>>>1|Te<<31)^(Je>>>8|Te<<24)^(Je>>>7|Te<<25),at=n[Q-2],ct=at.high,ht=at.low,He=(ct>>>19|ht<<13)^(ct<<3|ht>>>29)^ct>>>6,Re=(ht>>>19|ct<<13)^(ht<<3|ct>>>29)^(ht>>>6|ct<<26),tt=n[Q-7],ft=tt.high,Qe=tt.low,lt=n[Q-16],Ue=lt.high,Le=lt.low;V=nt+Qe,Z=rt+ft+(V>>>0>>0?1:0),V=V+Re,Z=Z+He+(V>>>0>>0?1:0),V=V+Le,Z=Z+Ue+(V>>>0>>0?1:0),be.high=Z,be.low=V}var Ie=ue&re^~ue&ee,Ce=le&pe^~le&te,Se=ne&me^ne&De^me&De,ke=fe&Ae^fe&ye^Ae&ye,Ne=(ne>>>28|fe<<4)^(ne<<30|fe>>>2)^(ne<<25|fe>>>7),et=(fe>>>28|ne<<4)^(fe<<30|ne>>>2)^(fe<<25|ne>>>7),$e=(ue>>>14|le<<18)^(ue>>>18|le<<14)^(ue<<23|le>>>9),bt=(le>>>14|ue<<18)^(le>>>18|ue<<14)^(le<<23|ue>>>9),gt=l[Q],Ut=gt.high,Nt=gt.low,hr=q+bt,mr=ce+$e+(hr>>>0>>0?1:0),hr=hr+Ce,mr=mr+Ie+(hr>>>0>>0?1:0),hr=hr+Nt,mr=mr+Ut+(hr>>>0>>0?1:0),hr=hr+V,mr=mr+Z+(hr>>>0>>0?1:0),St=et+ke,Yr=Ne+Se+(St>>>0>>0?1:0);ce=ee,q=te,ee=re,te=pe,re=ue,pe=le,le=xe+hr|0,ue=Oe+mr+(le>>>0>>0?1:0)|0,Oe=De,xe=ye,De=me,ye=Ae,me=ne,Ae=fe,fe=hr+St|0,ne=mr+Yr+(fe>>>0
>>0?1:0)|0}O=m.low=O+fe,m.high=k+ne+(O>>>0>>0?1:0),x=s.low=x+Ae,s.high=C+me+(x>>>0>>0?1:0),_=r.low=_+ye,r.high=y+De+(_>>>0>>0?1:0),I=a.low=I+xe,a.high=M+Oe+(I>>>0>>0?1:0),G=t.low=G+le,t.high=N+ue+(G>>>0>>0?1:0),B=w.low=B+pe,w.high=H+re+(B>>>0>>0?1:0),U=E.low=U+te,E.high=K+ee+(U>>>0>>0?1:0),X=f.low=X+q,f.high=W+ce+(X>>>0>>0?1:0)},_doFinalize:function(){var u=this._data,o=u.words,h=this._nDataBytes*8,m=u.sigBytes*8;o[m>>>5]|=128<<24-m%32,o[(m+128>>>10<<5)+30]=Math.floor(h/4294967296),o[(m+128>>>10<<5)+31]=h,u.sigBytes=o.length*4,this._process();var s=this._hash.toX32();return s},clone:function(){var u=P.clone.call(this);return u._hash=this._hash.clone(),u},blockSize:1024/32});g.SHA512=P._createHelper(c),g.HmacSHA512=P._createHmacHelper(c)}(),L.SHA512})},"24hK":function(j,Y,D){"use strict";D.d(Y,"a",function(){return T});var L=D("JYp7"),g=function(){function P(p){this.element=p,this.next=P.Undefined,this.prev=P.Undefined}return P.Undefined=new P(void 0),P}(),T=function(){function P(){this._first=g.Undefined,this._last=g.Undefined,this._size=0}return Object.defineProperty(P.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),P.prototype.isEmpty=function(){return this._first===g.Undefined},P.prototype.clear=function(){this._first=g.Undefined,this._last=g.Undefined,this._size=0},P.prototype.unshift=function(p){return this._insert(p,!1)},P.prototype.push=function(p){return this._insert(p,!0)},P.prototype._insert=function(p,v){var S=this,b=new g(p);if(this._first===g.Undefined)this._first=b,this._last=b;else if(v){var d=this._last;this._last=b,b.prev=d,d.next=b}else{var l=this._first;this._first=b,b.next=l,l.prev=b}this._size+=1;var n=!1;return function(){n||(n=!0,S._remove(b))}},P.prototype.shift=function(){if(this._first===g.Undefined)return;var p=this._first.element;return this._remove(this._first),p},P.prototype.pop=function(){if(this._last===g.Undefined)return;var p=this._last.element;return this._remove(this._last),p},P.prototype._remove=function(p){if(p.prev!==g.Undefined&&p.next!==g.Undefined){var v=p.prev;v.next=p.next,p.next.prev=v}else p.prev===g.Undefined&&p.next===g.Undefined?(this._first=g.Undefined,this._last=g.Undefined):p.next===g.Undefined?(this._last=this._last.prev,this._last.next=g.Undefined):p.prev===g.Undefined&&(this._first=this._first.next,this._first.prev=g.Undefined);this._size-=1},P.prototype.iterator=function(){var p,v=this._first;return{next:function(){return v===g.Undefined?L.c:(p?p.value=v.element:p={done:!1,value:v.element},v=v.next,p)}}},P.prototype.toArray=function(){for(var p=[],v=this._first;v!==g.Undefined;v=v.next)p.push(v.element);return p},P}()},"3y9D":function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=T.Hasher,v=g.algo,S=[],b=v.SHA1=p.extend({_doReset:function(){this._hash=new P.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,l){for(var n=this._hash.words,c=n[0],u=n[1],o=n[2],h=n[3],m=n[4],s=0;s<80;s++){if(s<16)S[s]=d[l+s]|0;else{var r=S[s-3]^S[s-8]^S[s-14]^S[s-16];S[s]=r<<1|r>>>31}var a=(c<<5|c>>>27)+m+S[s];s<20?a+=(u&o|~u&h)+1518500249:s<40?a+=(u^o^h)+1859775393:s<60?a+=(u&o|u&h|o&h)-1894007588:a+=(u^o^h)-899497514,m=h,h=o,o=u<<30|u>>>2,u=c,c=a}n[0]=n[0]+c|0,n[1]=n[1]+u|0,n[2]=n[2]+o|0,n[3]=n[3]+h|0,n[4]=n[4]+m|0},_doFinalize:function(){var d=this._data,l=d.words,n=this._nDataBytes*8,c=d.sigBytes*8;return l[c>>>5]|=128<<24-c%32,l[(c+64>>>9<<4)+14]=Math.floor(n/4294967296),l[(c+64>>>9<<4)+15]=n,d.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var d=p.clone.call(this);return d._hash=this._hash.clone(),d}});g.SHA1=p._createHelper(b),g.HmacSHA1=p._createHmacHelper(b)}(),L.SHA1})},4:function(j,Y){},"55Ip":function(j,Y,D){"use strict";D.d(Y,"a",function(){return a}),D.d(Y,"b",function(){return O});var L=D("Ty5D"),g=D("dI71"),T=D("q1tI"),P=D.n(T),p=D("YS25"),v=D("17x9"),S=D.n(v),b=D("wx14"),d=D("zLVn"),l=D("9R94"),n=function(x){Object(g.a)(y,x);function y(){for(var M,I=arguments.length,N=new Array(I),G=0;G>>24)&16711935|(t<<24|t>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;var E=s[a];E.high^=w,E.low^=t}for(var f=0;f<24;f++){for(var k=0;k<5;k++){for(var O=0,C=0,x=0;x<5;x++){var E=s[k+5*x];O^=E.high,C^=E.low}var y=u[k];y.high=O,y.low=C}for(var k=0;k<5;k++)for(var _=u[(k+4)%5],M=u[(k+1)%5],I=M.high,N=M.low,O=_.high^(I<<1|N>>>31),C=_.low^(N<<1|I>>>31),x=0;x<5;x++){var E=s[k+5*x];E.high^=O,E.low^=C}for(var G=1;G<25;G++){var O,C,E=s[G],H=E.high,B=E.low,K=l[G];K<32?(O=H<>>32-K,C=B<>>32-K):(O=B<>>64-K,C=H<>>64-K);var U=u[n[G]];U.high=O,U.low=C}var W=u[0],X=s[0];W.high=X.high,W.low=X.low;for(var k=0;k<5;k++)for(var x=0;x<5;x++){var G=k+5*x,E=s[G],ne=u[G],fe=u[(k+1)%5+5*x],me=u[(k+2)%5+5*x];E.high=ne.high^~fe.high&me.high,E.low=ne.low^~fe.low&me.low}var E=s[0],Ae=c[f];E.high^=Ae.high,E.low^=Ae.low}},_doFinalize:function(){var h=this._data,m=h.words,s=this._nDataBytes*8,r=h.sigBytes*8,a=this.blockSize*32;m[r>>>5]|=1<<24-r%32,m[(g.ceil((r+1)/a)*a>>>5)-1]|=128,h.sigBytes=m.length*4,this._process();for(var t=this._state,w=this.cfg.outputLength/8,E=w/8,f=[],k=0;k>>24)&16711935|(C<<24|C>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,f.push(x),f.push(C)}return new p.init(f,w)},clone:function(){for(var h=v.clone.call(this),m=h._state=this._state.slice(0),s=0;s<25;s++)m[s]=m[s].clone();return h}});T.SHA3=v._createHelper(o),T.HmacSHA3=v._createHmacHelper(o)}(Math),L.SHA3})},"6+eU":function(j,Y,D){"use strict";D.d(Y,"a",function(){return f});var L=D("wx14"),g=D("rePB"),T=D("VTBJ"),P=D("1OyB"),p=D("vuIU"),v=D("Ji7U"),S=D("LK+K"),b=D("q1tI"),d=D.n(b),l=D("TSYQ"),n=D.n(l),c=function(O){var C,x="".concat(O.rootPrefixCls,"-item"),y=n()(x,"".concat(x,"-").concat(O.page),(C={},Object(g.a)(C,"".concat(x,"-active"),O.active),Object(g.a)(C,O.className,!!O.className),Object(g.a)(C,"".concat(x,"-disabled"),!O.page),C)),_=function(){O.onClick(O.page)},M=function(N){O.onKeyPress(N,O.onClick,O.page)};return d.a.createElement("li",{title:O.showTitle?O.page:null,className:y,onClick:_,onKeyPress:M,tabIndex:"0"},O.itemRender(O.page,"page",d.a.createElement("a",{rel:"nofollow"},O.page)))},u=c,o={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},h=function(k){Object(v.a)(C,k);var O=Object(S.a)(C);function C(){var x;Object(P.a)(this,C);for(var y=arguments.length,_=new Array(y),M=0;M=0||I.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;x.setState({goInputText:""}),H(x.getValidValue())},x.go=function(I){var N=x.state.goInputText;if(N==="")return;(I.keyCode===o.ENTER||I.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(p.a)(C,[{key:"getValidValue",value:function(){var y=this.state,_=y.goInputText,M=y.current;return!_||isNaN(_)?M:Number(_)}},{key:"getPageSizeOptions",value:function(){var y=this.props,_=y.pageSize,M=y.pageSizeOptions;return M.some(function(I){return I.toString()===_.toString()})?M:M.concat([_.toString()]).sort(function(I,N){var G=isNaN(Number(I))?0:Number(I),H=isNaN(Number(N))?0:Number(N);return G-H})}},{key:"render",value:function(){var y=this,_=this.props,M=_.pageSize,I=_.locale,N=_.rootPrefixCls,G=_.changeSize,H=_.quickGo,B=_.goButton,K=_.selectComponentClass,U=_.buildOptionText,W=_.selectPrefixCls,X=_.disabled,ne=this.state.goInputText,fe="".concat(N,"-options"),me=K,Ae=null,De=null,ye=null;if(!G&&!H)return null;var Oe=this.getPageSizeOptions();if(G&&me){var xe=Oe.map(function(ue,le){return d.a.createElement(me.Option,{key:le,value:ue.toString()},(U||y.buildOptionText)(ue))});Ae=d.a.createElement(me,{disabled:X,prefixCls:W,showSearch:!1,className:"".concat(fe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||Oe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(le){return le.parentNode}},xe)}return H&&(B&&(ye=typeof B=="boolean"?d.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:X,className:"".concat(fe,"-quick-jumper-button")},I.jump_to_confirm):d.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),De=d.a.createElement("div",{className:"".concat(fe,"-quick-jumper")},I.jump_to,d.a.createElement("input",{disabled:X,type:"text",value:ne,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),I.page,ye)),d.a.createElement("li",{className:"".concat(fe)},Ae,De)}}]),C}(d.a.Component);h.defaultProps={pageSizeOptions:["10","20","50","100"]};var m=h,s=D("N2Kk");function r(){}function a(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k}function t(k,O,C){return C}function w(k,O,C){var x=typeof k=="undefined"?O.pageSize:k;return Math.floor((C.total-1)/x)+1}var E=function(k){Object(v.a)(C,k);var O=Object(S.a)(C);function C(x){var y;Object(P.a)(this,C),y=O.call(this,x),y.getJumpPrevPage=function(){return Math.max(1,y.state.current-(y.props.showLessItems?3:5))},y.getJumpNextPage=function(){return Math.min(w(void 0,y.state,y.props),y.state.current+(y.props.showLessItems?3:5))},y.getItemIcon=function(G,H){var B=y.props.prefixCls,K=G||d.a.createElement("button",{type:"button","aria-label":H,className:"".concat(B,"-item-link")});return typeof G=="function"&&(K=d.a.createElement(G,Object(T.a)({},y.props))),K},y.savePaginationNode=function(G){y.paginationNode=G},y.isValid=function(G){return a(G)&&G!==y.state.current},y.shouldDisplayQuickJumper=function(){var G=y.props,H=G.showQuickJumper,B=G.pageSize,K=G.total;return K<=B?!1:H},y.handleKeyDown=function(G){(G.keyCode===o.ARROW_UP||G.keyCode===o.ARROW_DOWN)&&G.preventDefault()},y.handleKeyUp=function(G){var H=y.getValidValue(G),B=y.state.currentInputValue;H!==B&&y.setState({currentInputValue:H}),G.keyCode===o.ENTER?y.handleChange(H):G.keyCode===o.ARROW_UP?y.handleChange(H-1):G.keyCode===o.ARROW_DOWN&&y.handleChange(H+1)},y.changePageSize=function(G){var H=y.state.current,B=w(G,y.state,y.props);H=H>B?B:H,B===0&&(H=y.state.current),typeof G=="number"&&("pageSize"in y.props||y.setState({pageSize:G}),"current"in y.props||y.setState({current:H,currentInputValue:H})),y.props.onShowSizeChange(H,G),"onChange"in y.props&&y.props.onChange&&y.props.onChange(H,G)},y.handleChange=function(G){var H=y.props.disabled,B=G;if(y.isValid(B)&&!H){var K=w(void 0,y.state,y.props);B>K?B=K:B<1&&(B=1),"current"in y.props||y.setState({current:B,currentInputValue:B});var U=y.state.pageSize;return y.props.onChange(B,U),B}return y.state.current},y.prev=function(){y.hasPrev()&&y.handleChange(y.state.current-1)},y.next=function(){y.hasNext()&&y.handleChange(y.state.current+1)},y.jumpPrev=function(){y.handleChange(y.getJumpPrevPage())},y.jumpNext=function(){y.handleChange(y.getJumpNextPage())},y.hasPrev=function(){return y.state.current>1},y.hasNext=function(){return y.state.current2?B-2:0),U=2;U=M?N=M:N=Number(_),N}},{key:"getShowSizeChanger",value:function(){var y=this.props,_=y.showSizeChanger,M=y.total,I=y.totalBoundaryShowSizeChanger;return typeof _!="undefined"?_:M>I}},{key:"renderPrev",value:function(y){var _=this.props,M=_.prevIcon,I=_.itemRender,N=I(y,"prev",this.getItemIcon(M,"prev page")),G=!this.hasPrev();return Object(b.isValidElement)(N)?Object(b.cloneElement)(N,{disabled:G}):N}},{key:"renderNext",value:function(y){var _=this.props,M=_.nextIcon,I=_.itemRender,N=I(y,"next",this.getItemIcon(M,"next page")),G=!this.hasNext();return Object(b.isValidElement)(N)?Object(b.cloneElement)(N,{disabled:G}):N}},{key:"render",value:function(){var y=this,_=this.props,M=_.prefixCls,I=_.className,N=_.style,G=_.disabled,H=_.hideOnSinglePage,B=_.total,K=_.locale,U=_.showQuickJumper,W=_.showLessItems,X=_.showTitle,ne=_.showTotal,fe=_.simple,me=_.itemRender,Ae=_.showPrevNextJumpers,De=_.jumpPrevIcon,ye=_.jumpNextIcon,Oe=_.selectComponentClass,xe=_.selectPrefixCls,ue=_.pageSizeOptions,le=this.state,re=le.current,pe=le.pageSize,ee=le.currentInputValue;if(H===!0&&B<=pe)return null;var te=w(void 0,this.state,this.props),ce=[],q=null,Q=null,V=null,Z=null,be=null,ge=U&&U.goButton,Te=W?1:2,Je=re-1>0?re-1:0,rt=re+1=Te*2&&re!==1+2&&(ce[0]=Object(b.cloneElement)(ce[0],{className:"".concat(M,"-item-after-jump-prev")}),ce.unshift(q)),te-re>=Te*2&&re!==te-2&&(ce[ce.length-1]=Object(b.cloneElement)(ce[ce.length-1],{className:"".concat(M,"-item-before-jump-next")}),ce.push(Q)),tt!==1&&ce.unshift(V),ft!==te&&ce.push(Z)}var Ue=null;ne&&(Ue=d.a.createElement("li",{className:"".concat(M,"-total-text")},ne(B,[B===0?0:(re-1)*pe+1,re*pe>B?B:re*pe])));var Le=!this.hasPrev()||!te,Ie=!this.hasNext()||!te;return d.a.createElement("ul",Object(L.a)({className:n()(M,I,Object(g.a)({},"".concat(M,"-disabled"),G)),style:N,unselectable:"unselectable",ref:this.savePaginationNode},nt),Ue,d.a.createElement("li",{title:X?K.prev_page:null,onClick:this.prev,tabIndex:Le?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(g.a)({},"".concat(M,"-disabled"),Le)),"aria-disabled":Le},this.renderPrev(Je)),ce,d.a.createElement("li",{title:X?K.next_page:null,onClick:this.next,tabIndex:Ie?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(g.a)({},"".concat(M,"-disabled"),Ie)),"aria-disabled":Ie},this.renderNext(rt)),d.a.createElement(m,{disabled:G,locale:K,rootPrefixCls:M,selectComponentClass:Oe,selectPrefixCls:xe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:re,pageSize:pe,pageSizeOptions:ue,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ge}))}}],[{key:"getDerivedStateFromProps",value:function(y,_){var M={};if("current"in y&&(M.current=y.current,y.current!==_.current&&(M.currentInputValue=M.current)),"pageSize"in y&&y.pageSize!==_.pageSize){var I=_.current,N=w(y.pageSize,_,y);I=I>N?N:I,"current"in y||(M.current=I,M.currentInputValue=I),M.pageSize=y.pageSize}return M}}]),C}(d.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:r,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:r,locale:s.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var f=E},"6RRn":function(j,Y,D){"use strict";var L=D("wCXF"),g=D("n6Qo");D.d(Y,"b",function(){return g.a});var T=D("IBYe"),P=D("6eGT"),p=D("hW8S");D.d(Y,"a",function(){return p.a}),Y.c=L.b},"6eGT":function(j,Y,D){"use strict";function L(g){return null}Y.a=L},"746U":function(j,Y,D){"use strict";D.d(Y,"d",function(){return g}),D.d(Y,"j",function(){return T}),D.d(Y,"i",function(){return P}),D.d(Y,"h",function(){return p}),D.d(Y,"e",function(){return v}),D.d(Y,"k",function(){return S}),D.d(Y,"l",function(){return b}),D.d(Y,"a",function(){return d}),D.d(Y,"f",function(){return n}),D.d(Y,"g",function(){return c}),D.d(Y,"m",function(){return u}),D.d(Y,"c",function(){return m}),D.d(Y,"b",function(){return s}),D.d(Y,"n",function(){return r}),D.d(Y,"o",function(){return a});var L={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function g(t){return Array.isArray?Array.isArray(t):!!(t&&typeof t.length===L.number&&t.constructor===Array)}function T(t){return typeof t===L.string||t instanceof String}function P(t){return typeof t===L.object&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}function p(t){return(typeof t===L.number||t instanceof Number)&&!isNaN(t)}function v(t){return t===!0||t===!1}function S(t){return typeof t===L.undefined}function b(t){return S(t)||t===null}function d(t,w){if(!t)throw new Error(w?"Unexpected type, expected '"+w+"'":"Unexpected type")}var l=Object.prototype.hasOwnProperty;function n(t){if(!P(t))return!1;for(var w in t)if(l.call(t,w))return!1;return!0}function c(t){return typeof t===L.function}function u(t,w){for(var E=Math.min(t.length,w.length),f=0;f1&&arguments[1]!==void 0?arguments[1]:0,h=(S[u[o+0]]+S[u[o+1]]+S[u[o+2]]+S[u[o+3]]+"-"+S[u[o+4]]+S[u[o+5]]+"-"+S[u[o+6]]+S[u[o+7]]+"-"+S[u[o+8]]+S[u[o+9]]+"-"+S[u[o+10]]+S[u[o+11]]+S[u[o+12]]+S[u[o+13]]+S[u[o+14]]+S[u[o+15]]).toLowerCase();if(!v(h))throw TypeError("Stringified UUID is invalid");return h}var l=d;function n(u,o,h){u=u||{};var m=u.random||(u.rng||T)();if(m[6]=m[6]&15|64,m[8]=m[8]&63|128,o){h=h||0;for(var s=0;s<16;++s)o[h+s]=m[s];return o}return l(m)}var c=Y.a=n},"7ahc":function(j,Y,D){"use strict";D.d(Y,"a",function(){return w});var L=D("k1fw"),g=D("0Owb"),T=D("+L6B"),P=D("2/Rp"),p=D("y8nQ"),v=D("Vl3Y"),S=D("tJVT"),b=D("OaEy"),d=D("2fM7"),l=D("q1tI"),n=D.n(l),c=D("VrN/"),u=D.n(c),o=D("p77/"),h=D.n(o),m=D("c5Ni"),s=D.n(m),r=d.a.Option,a={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"]};Y.b=function(E){var f=E.callback,k=E.onCancel,O=Object(l.useState)("python"),C=Object(S.a)(O,2),x=C[0],y=C[1];function _(I){y(t[I][1])}function M(I){f(I)}return n.a.createElement(v.a,Object(g.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),n.a.createElement(v.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(d.a,{onChange:_},Object.keys(t).map(function(I){return n.a.createElement(r,{key:I,value:I},t[I][0])}))),n.a.createElement(v.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(w,{mode:x})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(P.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(P.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function w(E){var f=E.value,k=E.onChange,O=E.mode,C=E.options,x=C===void 0?{}:C,y=Object(l.useRef)(),_=Object(l.useState)(),M=Object(S.a)(_,2),I=M[0],N=M[1];return Object(l.useEffect)(function(){if(I){function G(H){var B=H.getValue();k&&k(B)}return I.on("change",G),function(){I.off("change",G)}}},[I,k]),Object(l.useEffect)(function(){I&&I.setOption("mode",O)},[I,O]),Object(l.useEffect)(function(){I&&((f!==I.getValue()||f==="")&&setTimeout(function(){I.setValue(f||" ")},300))},[I,f]),Object(l.useEffect)(function(){if(y.current&&!I){var G=u.a.fromTextArea(y.current,Object(L.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));N(G)}},[y.current,I]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:y}))}},"815F":function(j,Y,D){"use strict";D.d(Y,"e",function(){return S}),D.d(Y,"c",function(){return d}),D.d(Y,"d",function(){return l}),D.d(Y,"a",function(){return c}),D.d(Y,"f",function(){return u}),D.d(Y,"b",function(){return o});var L=D("KQm4"),g=D("VTBJ"),T=D("Ff2n"),P=D("Zm9Q"),p=D("Kwbf"),v=D("OZM5");function S(h,m){return h!=null?h:m}function b(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],m=new Map;function s(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(r||[]).forEach(function(t){var w=t.key,E=t.children;Object(p.a)(w!=null,"Tree node must have a certain key: [".concat(a).concat(w,"]"));var f=String(w);Object(p.a)(!m.has(f)||w===null||w===void 0,"Same 'key' exist in the Tree: ".concat(f)),m.set(f,!0),s(E,"".concat(a).concat(f," > "))})}s(h)}function d(h){function m(s){var r=Object(P.a)(s);return r.map(function(a){if(!Object(v.i)(a))return Object(p.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var t=a.key,w=a.props,E=w.children,f=Object(T.a)(w,["children"]),k=Object(g.a)({key:t},f),O=m(E);return O.length&&(k.children=O),k}).filter(function(a){return a})}return m(h)}function l(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=new Set(m===!0?[]:m),r=[];function a(t){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(E,f){var k=Object(v.h)(w?w.pos:"0",f),O=S(E.key,k),C=Object(g.a)(Object(g.a)({},E),{},{parent:w,pos:k,children:null,data:E,isStart:[].concat(Object(L.a)(w?w.isStart:[]),[f===0]),isEnd:[].concat(Object(L.a)(w?w.isEnd:[]),[f===t.length-1])});return r.push(C),m===!0||s.has(O)?C.children=a(E.children||[],C):C.children=[],C})}return a(h),r}function n(h,m,s){var r;s?typeof s=="string"?r=function(w){return w[s]}:typeof s=="function"&&(r=function(w){return s(w)}):r=function(w,E){return S(w.key,E)};function a(t,w,E){var f=t?t.children:h,k=t?Object(v.h)(E.pos,w):"0";if(t){var O=r(t,k),C={node:t,index:w,pos:k,key:O,parentPos:E.node?E.pos:null,level:E.level+1};m(C)}f&&f.forEach(function(x,y){a(x,y,{node:t,pos:k,level:E?E.level+1:-1})})}a(null)}function c(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=m.initWrapper,r=m.processEntity,a=m.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,w={},E={},f={posEntities:w,keyEntities:E};return s&&(f=s(f)||f),n(h,function(k){var O=k.node,C=k.index,x=k.pos,y=k.key,_=k.parentPos,M=k.level,I={node:O,index:C,key:y,pos:x,level:M},N=S(y,x);w[x]=I,E[N]=I,I.parent=w[_],I.parent&&(I.parent.children=I.parent.children||[],I.parent.children.push(I)),r&&r(I,f)},t),a&&a(f),f}function u(h,m){var s=m.expandedKeys,r=m.selectedKeys,a=m.loadedKeys,t=m.loadingKeys,w=m.checkedKeys,E=m.halfCheckedKeys,f=m.dragOverNodeKey,k=m.dropPosition,O=m.keyEntities,C=O[h],x={eventKey:h,expanded:s.indexOf(h)!==-1,selected:r.indexOf(h)!==-1,loaded:a.indexOf(h)!==-1,loading:t.indexOf(h)!==-1,checked:w.indexOf(h)!==-1,halfChecked:E.indexOf(h)!==-1,pos:String(C?C.pos:""),dragOver:f===h&&k===0,dragOverGapTop:f===h&&k===-1,dragOverGapBottom:f===h&&k===1};return x}function o(h){var m=h.data,s=h.expanded,r=h.selected,a=h.checked,t=h.loaded,w=h.loading,E=h.halfChecked,f=h.dragOver,k=h.dragOverGapTop,O=h.dragOverGapBottom,C=h.pos,x=h.active,y=Object(g.a)(Object(g.a)({},m),{},{expanded:s,selected:r,checked:a,loaded:t,loading:w,halfChecked:E,dragOver:f,dragOverGapTop:k,dragOverGapBottom:O,pos:C,active:x});return"props"in y||Object.defineProperty(y,"props",{get:function(){return Object(p.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),h}}),y}},"8EBN":function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){"use strict";L.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var g=0;g-1&&P.substring(S+1,P.length);if(b)return L.findModeByExtension(b)},L.findModeByName=function(P){P=P.toLowerCase();for(var p=0;p0&&u[u.length-1])&&(s[0]===6||s[0]===2)){l=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]=ie.length?de.slice(ie.length):de}).join(` `)}var s=[],r=["
    "],a=new o.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function w(){s.length=0,r=["
      "]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(ae,z,$,ie){if(z>=ae.length||ae[z].level<=$)return z;var de=ae[z];ie.push("
    • "+de.text+""),z++;var se=[];return z=f(ae,z,de.level,se),se.length>0&&(ie.push("
        "),se.forEach(function(Ke){ie.push(Ke)}),ie.push("
      ")),ie.push("
    • "),z=f(ae,z,$,ie),z}function k(){return f(s,0,0,r),r.push("
    "),r.join("")}var O={heading:function(z){var $=t.exec(z);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},fences:function(z){var $=this.rules.block.fences.exec(z);if($){var ie=$[0],de=m(ie,$[3]||""),se=$[2]?$[2].trim():$[2];if(["latex","katex","math"].indexOf(se)>=0){var Ke=y(),Rt=de;de=Ke,_[Ke]={type:"block",expression:Rt}}return{type:"code",raw:ie,lang:se,text:de}}}},C=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,y=function(){return"__special_katext_id_".concat(x++,"__")},_={};function M(){return _}function I(){x=0,_={}}function N(ae){return ae=ae.replace(C,function(z,$){var ie=y();return _[ie]={type:"inline",expression:$},ie}),ae}var G=a.listitem;a.listitem=function(ae){return G(N(ae))};var H=a.paragraph;a.paragraph=function(ae){return H(N(ae))};var B=a.tablecell;a.tablecell=function(ae,z){return B(N(ae),z)},a.code=function(ae,z,$){var ie=(z||"").match(/\S*/)[0];return ie?["latex","katex","math"].indexOf(ie)>=0?"

    ".concat(ae,"

    "):'
    ').concat($?ae:Object(h.escape)(ae,!0),`
    `):'
    '+($?ae:Object(h.escape)(ae,!0))+"
    "},a.heading=function(ae,z,$){var ie=this.options.headerPrefix+$.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:ie,level:z,text:ae}),"'+ae+""},o.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),o.a.use({tokenizer:O,renderer:a});var K=o.a,U=D("SJMd"),W=D("ulZh"),X=D.n(W),ne=D("m3rI"),fe=D("Oy/b"),me=D("p5ED"),Ae=D("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 De=function(ae,z){return(De=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ie){$.__proto__=ie}||function($,ie){for(var de in ie)Object.prototype.hasOwnProperty.call(ie,de)&&($[de]=ie[de])})(ae,z)};function ye(ae,z){function $(){this.constructor=ae}De(ae,z),ae.prototype=z===null?Object.create(z):($.prototype=z.prototype,new $)}function Oe(ae,z,$,ie){return new($||($=Promise))(function(de,se){function Ke(Er){try{Vt(ie.next(Er))}catch(Lt){se(Lt)}}function Rt(Er){try{Vt(ie.throw(Er))}catch(Lt){se(Lt)}}function Vt(Er){var Lt;Er.done?de(Er.value):(Lt=Er.value,Lt instanceof $?Lt:new $(function(zr){zr(Lt)})).then(Ke,Rt)}Vt((ie=ie.apply(ae,z||[])).next())})}function xe(ae,z){var $,ie,de,se,Ke={label:0,sent:function(){if(1&de[0])throw de[1];return de[1]},trys:[],ops:[]};return se={next:Rt(0),throw:Rt(1),return:Rt(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Rt(Vt){return function(Er){return function(Lt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ie&&(de=2&Lt[0]?ie.return:Lt[0]?ie.throw||((de=ie.return)&&de.call(ie),0):ie.next)&&!(de=de.call(ie,Lt[1])).done)return de;switch(ie=0,de&&(Lt=[2&Lt[0],de.value]),Lt[0]){case 0:case 1:de=Lt;break;case 4:return Ke.label++,{value:Lt[1],done:!1};case 5:Ke.label++,ie=Lt[1],Lt=[0];continue;case 7:Lt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(de=Ke.trys,(de=de.length>0&&de[de.length-1])||Lt[0]!==6&&Lt[0]!==2)){Ke=0;continue}if(Lt[0]===3&&(!de||Lt[1]>de[0]&&Lt[1]',"select"),this.addActionButton(ie,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ie,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ie,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ie,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ie,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ie,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ie,'',"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=""+$.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",se.typeName),Ke.innerHTML=se.icon,Ke.addEventListener("click",function(){$.markerToolbarButtonClicked(Ke,se)}),$.buttons.push(Ke),$.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 de=document.createElement("div");de.className=this.toolbarBlockStyleClass.name,de.style.whiteSpace="nowrap",de.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(de),this.addActionButton(de,'',"render"),this.addActionButton(de,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ae.prototype.addButtonClickListener=function(z){this.buttonClickListeners.push(z)},ae.prototype.removeButtonClickListener=function(z){this.buttonClickListeners.indexOf(z)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(z),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var z=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var $=0;$0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",$)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(z,$){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",$)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ae.prototype.setActiveButton=function(z){this.resetButtonStyles(),z.className=z.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),z.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ae.prototype.setActiveMarkerButton=function(z){var $=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===z});$&&this.setActiveButton($)},ae.prototype.setCurrentMarker=function(z){var $=this;this.currentMarker=z,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){$.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},ae}(),V=function(){function ae(z,$,ie,de){this.panels=[],this.panelButtons=[],this.markerjsContainer=z,this.displayMode=$,this.uiStyleSettings=ie,this.styles=de,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var z;this.toolboxStyleClass=this.styles.addClass(new q("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 q("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var $=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new q("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new q("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new q("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 q("toolbox-panel-row_colors",` background-color: `+((z=this.uiStyleSettings.toolboxBackgroundColor)!==null&&z!==void 0?z:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new q("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px; padding: `+$+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new q("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new ce("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new ce("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},ae.prototype.show=function(z){var $;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=z,this.uiContainer.className=this.toolboxStyleClass.name+" "+(($=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ae.prototype.setPanelButtons=function(z){var $,ie,de=this;this.panels=z,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ie=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ie!==void 0?ie:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(se){var Ke;se.uiStyleSettings=de.uiStyleSettings;var Rt=document.createElement("div");Rt.className=de.toolboxButtonStyleClass.name+" "+((Ke=de.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:de.toolboxButtonStyleColorsClass.name),Rt.innerHTML=se.icon,Rt.title=se.title,Rt.addEventListener("click",function(){de.panelButtonClick(se)}),de.panelButtons.push(Rt),de.buttonRow.appendChild(Rt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(z){var $=this,ie=-1;if(z!==this.activePanel){ie=this.panels.indexOf(z),this.panelRow.innerHTML="";var de=z.getUi();de.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(de),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=z}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){$.displayMode==="inline"?$.panelRow.style.display="none":$.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(se,Ke){var Rt,Vt;se.className=$.toolboxButtonStyleClass.name+" "+(Ke===ie?""+((Rt=$.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Rt!==void 0?Rt:$.toolboxActiveButtonStyleColorsClass.name):""+((Vt=$.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Vt!==void 0?Vt:$.toolboxButtonStyleColorsClass.name))})},ae}(),Z=function(ae,z){this.title=ae,this.icon=z},be=function(ae){function z($,ie,de,se){var Ke=ae.call(this,$,se||'')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=ie,Ke.currentColor=de,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(de){var se=$.getColorBox(de);ie.appendChild(se),$.colorBoxes.push(se)}),ie},z.prototype.getColorBox=function($){var ie=this,de=this.uiStyleSettings.toolbarHeight/4,se=this.uiStyleSettings.toolbarHeight-de,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=$===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){ie.setCurrentColor($,Ke)});var Rt=document.createElement("div");return Rt.style.display="inline-block",Rt.style.width=se-2+"px",Rt.style.height=se-2+"px",Rt.style.backgroundColor=$,Rt.style.borderRadius=se/2+"px",$==="transparent"&&(Rt.style.fill=this.uiStyleSettings.toolboxAccentColor,Rt.innerHTML=` `),Ke.appendChild(Rt),Ke},z.prototype.setCurrentColor=function($,ie){var de=this;this.currentColor=$,this.colorBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged($)},z}(Z),ge=function(){function ae(z,$,ie){this._state="new",this._isSelected=!1,this._container=z,this._overlayContainer=$,this.globalSettings=ie,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ae.prototype.ownsTarget=function(z){return!1},Object.defineProperty(ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ae.prototype.pointerDown=function(z,$){},ae.prototype.dblClick=function(z,$){},ae.prototype.manipulate=function(z){},ae.prototype.pointerUp=function(z){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(z){this.container.childNodes.length>0?this.container.insertBefore(z,this.container.childNodes[0]):this.container.appendChild(z)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(z){this._state=z.state,this.notes=z.notes},ae.prototype.scale=function(z,$){},ae.prototype.colorChanged=function(z){this.onColorChanged&&this.onColorChanged(z),this.stateChanged()},ae.prototype.fillColorChanged=function(z){this.onFillColorChanged&&this.onFillColorChanged(z),this.stateChanged()},ae.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var z=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),z.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(z)&&this.onStateChanged(this)}},ae.typeName="MarkerBase",ae}(),Te=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.prototype.findGripByVisual=function(z){return this.topLeft.ownsTarget(z)?this.topLeft:this.topCenter.ownsTarget(z)?this.topCenter:this.topRight.ownsTarget(z)?this.topRight:this.centerLeft.ownsTarget(z)?this.centerLeft:this.centerRight.ownsTarget(z)?this.centerRight:this.bottomLeft.ownsTarget(z)?this.bottomLeft:this.bottomCenter.ownsTarget(z)?this.bottomCenter:this.bottomRight.ownsTarget(z)?this.bottomRight:void 0},ae}(),Je=function(){function ae(){this.GRIP_SIZE=10,this.visual=le.createGroup(),this.visual.appendChild(le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(z){return z===this.visual||z===this.visual.childNodes[0]||z===this.visual.childNodes[1]},ae}(),rt=function(){function ae(){}return ae.toITransformMatrix=function(z){return{a:z.a,b:z.b,c:z.c,d:z.d,e:z.e,f:z.f}},ae.toSVGMatrix=function(z,$){return z.a=$.a,z.b=$.b,z.c=$.c,z.d=$.d,z.e=$.e,z.f=$.f,z},ae}(),nt=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||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(le.createTransform()),se.setupControlBox(),se}return ye(z,ae),Object.defineProperty(z.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"visual",{get:function(){return this._visual},set:function($){this._visual=$;var ie=le.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),z.prototype.ownsTarget=function($){return!!ae.prototype.ownsTarget.call(this,$)||!!(this.controlGrips.findGripByVisual($)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($))},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.state==="new"&&(this.left=$.x,this.top=$.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var de=this.unrotatePoint($);if(this.manipulationStartX=de.x,this.manipulationStartY=de.y,this.offsetX=de.x-this.left,this.offsetY=de.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ie),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ie)){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"},z.prototype.pointerUp=function($){var ie=this.state;ae.prototype.pointerUp.call(this,$),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate($),this._state="select",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},z.prototype.moveVisual=function($){this.visual.style.transform="translate("+$.x+"px, "+$.y+"px)"},z.prototype.manipulate=function($){var ie=this.unrotatePoint($);this.state==="creating"?this.resize($):this.state==="move"?(this.left=this.manipulationStartLeft+(ie.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ie.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ie):this.state==="rotate"&&this.rotate($)},z.prototype.resize=function($){var ie=this.manipulationStartLeft,de=this.manipulationStartWidth,se=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ie=this.manipulationStartLeft+$.x-this.manipulationStartX,de=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:de=this.manipulationStartWidth+$.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:se=this.manipulationStartTop+$.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-this.manipulationStartY}de>=0?(this.left=ie,this.width=de):(this.left=ie+de,this.width=-de),Ke>=0?(this.top=se,this.height=Ke):(this.top=se+Ke,this.height=-Ke),this.setSize()},z.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},z.prototype.rotate=function($){if(Math.abs($.x-this.centerX)>.1){var ie=Math.sign($.x-this.centerX);this.rotationAngle=180*Math.atan(($.y-this.centerY)/($.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},z.prototype.applyRotation=function(){var $=this.container.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($,0)},z.prototype.rotatePoint=function($){if(this.rotationAngle===0)return $;var ie=this.container.getCTM(),de=le.createPoint($.x,$.y);return{x:(de=de.matrixTransform(ie)).x,y:de.y}},z.prototype.unrotatePoint=function($){if(this.rotationAngle===0)return $;var ie=this.container.getCTM();ie=ie.inverse();var de=le.createPoint($.x,$.y);return{x:(de=de.matrixTransform(ie)).x,y:de.y}},z.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},z.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},z.prototype.setupControlBox=function(){this.controlBox=le.createGroup();var $=le.createTransform();$.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem($),this.container.appendChild(this.controlBox),this.controlRect=le.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=le.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 Te,this.addControlGrips(),this.controlBox.style.display="none"},z.prototype.adjustControlBox=function(){var $=this.controlBox.transform.baseVal.getItem(0);$.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem($,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()},z.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()},z.prototype.createGrip=function(){var $=new Je;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},z.prototype.positionGrips=function(){var $=this.controlGrips.topLeft.GRIP_SIZE,ie=-$/2,de=ie,se=(this.width+this.CB_DISTANCE)/2-$/2,Ke=(this.height+this.CB_DISTANCE)/2-$/2,Rt=this.height+this.CB_DISTANCE-$/2,Vt=this.width+this.CB_DISTANCE-$/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,de),this.positionGrip(this.controlGrips.topCenter.visual,se,de),this.positionGrip(this.controlGrips.topRight.visual,Vt,de),this.positionGrip(this.controlGrips.centerLeft.visual,ie,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Vt,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,Rt),this.positionGrip(this.controlGrips.bottomCenter.visual,se,Rt),this.positionGrip(this.controlGrips.bottomRight.visual,Vt,Rt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,se,de-3*this.CB_DISTANCE)},z.prototype.positionGrip=function($,ie,de){var se=$.transform.baseVal.getItem(0);se.setTranslate(ie,de),$.transform.baseVal.replaceItem(se,0)},z.prototype.hideControlBox=function(){this.controlBox.style.display="none"},z.prototype.showControlBox=function(){this.controlBox.style.display=""},z.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:rt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:rt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var ie=$;this.left=ie.left,this.top=ie.top,this.width=ie.width,this.height=ie.height,this.rotationAngle=ie.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie);var de=this.rotatePoint({x:this.left,y:this.top}),se=this.unrotatePoint({x:de.x*$,y:de.y*ie});this.left=se.x,this.top=se.y,this.width=this.width*$,this.height=this.height*ie,this.adjustControlBox()},z}(ge),at=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||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 ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual)},z.prototype.createVisual=function(){this.visual=le.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)},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},z.prototype.manipulate=function($){ae.prototype.manipulate.call(this,$)},z.prototype.resize=function($){ae.prototype.resize.call(this,$),this.setSize()},z.prototype.setSize=function(){ae.prototype.setSize.call(this),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},z.prototype.pointerUp=function($){ae.prototype.pointerUp.call(this,$),this.setSize()},z.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},z.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},z.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},z.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},z.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this))},z.prototype.restoreState=function($){var ie=$;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ae.prototype.restoreState.call(this,$),this.setSize()},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie),this.setSize()},z.title="Rectangle marker",z}(nt),ct=function(ae){function z($,ie,de,se){var Ke=ae.call(this,$,se||'')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=ie,Ke.currentWidth=de,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(de){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=de===$.currentWidth?$.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){$.setCurrentWidth(de,se)}),ie.appendChild(se);var Ke=document.createElement("div");Ke.innerText=de.toString(),Ke.style.marginRight="5px",se.appendChild(Ke);var Rt=document.createElement("div");Rt.style.minHeight="20px",Rt.style.flexGrow="2",Rt.style.display="flex",Rt.style.alignItems="center";var Vt=document.createElement("hr");Vt.style.minWidth="20px",Vt.style.border="0px",Vt.style.borderTop=de+"px solid "+$.uiStyleSettings.toolboxColor,Vt.style.flexGrow="2",Rt.appendChild(Vt),se.appendChild(Rt),$.widthBoxes.push(se)}),ie},z.prototype.setCurrentWidth=function($,ie){var de=this;this.currentWidth=$,this.widthBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},z}(Z),ht=function(ae){function z($,ie,de,se){var Ke=ae.call(this,$,se||'')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=ie,Ke.currentStyle=de,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(de){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/$.styles.length-5+"%",se.style.borderColor=de===$.currentStyle?$.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){$.setCurrentStyle(de,se)}),ie.appendChild(se);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var Rt=` `;Ke.innerHTML=Rt,se.appendChild(Ke),$.styleBoxes.push(se)}),ie},z.prototype.setCurrentStyle=function($,ie){var de=this;this.currentStyle=$,this.styleBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},z}(Z),He=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.strokeColor=de.defaultColor,se.strokeWidth=de.defaultStrokeWidth,se.strokeDasharray=de.defaultStrokeDasharray,se.strokePanel=new be("Line color",de.defaultColorSet,de.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new ct("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ht("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return ye(z,ae),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=z.typeName,$},z.typeName="FrameMarker",z.title="Frame marker",z.icon='',z}(at),Re=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},tt=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||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 ye(z,ae),z.prototype.ownsTarget=function($){return!!ae.prototype.ownsTarget.call(this,$)||!(!this.grip1.ownsTarget($)&&!this.grip2.ownsTarget($))},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.manipulationStartX=$.x,this.manipulationStartY=$.y,this.state==="new"&&(this.x1=$.x,this.y1=$.y,this.x2=$.x,this.y2=$.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(ie)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ie)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},z.prototype.pointerUp=function($){var ie=this.state;ae.prototype.pointerUp.call(this,$),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($),this._state="select",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},z.prototype.adjustVisual=function(){},z.prototype.manipulate=function($){this.state==="creating"?this.resize($):this.state==="move"?(this.x1=this.manipulationStartX1+$.x-this.manipulationStartX,this.y1=this.manipulationStartY1+$.y-this.manipulationStartY,this.x2=this.manipulationStartX2+$.x-this.manipulationStartX,this.y2=this.manipulationStartY2+$.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize($)},z.prototype.resize=function($){switch(this.activeGrip){case this.grip1:this.x1=$.x,this.y1=$.y;break;case this.grip2:case void 0:this.x2=$.x,this.y2=$.y}this.adjustVisual(),this.adjustControlBox()},z.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},z.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},z.prototype.setupControlBox=function(){this.controlBox=le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},z.prototype.adjustControlBox=function(){this.positionGrips()},z.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},z.prototype.createGrip=function(){var $=new Je;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},z.prototype.positionGrips=function(){var $=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-$/2,this.y1-$/2),this.positionGrip(this.grip2.visual,this.x2-$/2,this.y2-$/2)},z.prototype.positionGrip=function($,ie,de){var se=$.transform.baseVal.getItem(0);se.setTranslate(ie,de),$.transform.baseVal.replaceItem(se,0)},z.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ae.prototype.getState.call(this))},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var ie=$;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie),this.x1=this.x1*$,this.y1=this.y1*ie,this.x2=this.x2*$,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},z}(ge),ft=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||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=de.defaultColor,se.strokeWidth=de.defaultStrokeWidth,se.strokeDasharray=de.defaultStrokeDasharray,se.strokePanel=new be("Line color",de.defaultColorSet,de.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new ct("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ht("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorLine&&$!==this.visibleLine)},z.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=le.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)},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},z.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()),le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},z.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},z.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},z.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var ie=$;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.createVisual(),this.adjustVisual()},z.typeName="LineMarker",z.title="Line marker",z.icon='',z}(tt),Qe=function(ae){function z($,ie,de,se){var Ke=ae.call(this,$,se||'')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=ie,Ke.currentFont=de,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(de){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/$.fonts.length-5+"%",se.style.borderColor=de===$.currentFont?$.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){$.setCurrentFont(de,se)}),ie.appendChild(se);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=de,Ke.style.overflow="hidden";var Rt=document.createElement("div");Rt.style.whiteSpace="nowrap",Rt.style.overflow="hidden",Rt.style.textOverflow="ellipsis",Rt.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(Rt),se.appendChild(Ke),$.fontBoxes.push(se)}),ie},z.prototype.setCurrentFont=function($,ie){var de=this;this.currentFont=$,this.fontBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},z}(Z),lt=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.color="transparent",se.padding=5,se.DEFAULT_TEXT="your text here",se.text=se.DEFAULT_TEXT,se.isMoved=!1,se.color=de.defaultColor,se.fontFamily=de.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 be("Color",de.defaultColorSet,de.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.fontFamilyPanel=new Qe("Font",de.defaultFontFamilies,de.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se}return ye(z,ae),z.prototype.ownsTarget=function($){if(ae.prototype.ownsTarget.call(this,$)||$===this.visual||$===this.textElement||$===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(de){de===$&&(ie=!0)}),ie},z.prototype.createVisual=function(){this.visual=le.createGroup(),this.bgRectangle=le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.isMoved=!1,this.pointerDownPoint=$,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},z.prototype.renderText=function(){var $=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(ie){$.textElement.appendChild(le.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},z.prototype.getTextScale=function(){var $=this.textElement.getBBox(),ie=1;if($.width>0&&$.height>0){var de=(1*this.width-this.width*this.padding*2/100)/$.width,se=(1*this.height-this.height*this.padding*2/100)/$.height;ie=Math.min(de,se)}return ie},z.prototype.getTextPosition=function($){var ie=this.textElement.getBBox(),de=0,se=0;return ie.width>0&&ie.height>0&&(de=(this.width-ie.width*$)/2,se=this.height/2-ie.height*$/2),{x:de,y:se}},z.prototype.sizeText=function(){var $=this.textElement.getBBox(),ie=this.getTextScale(),de=this.getTextPosition(ie);de.y-=$.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+de.x+"px, "+de.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(de.x,de.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},z.prototype.manipulate=function($){ae.prototype.manipulate.call(this,$),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs($.x-this.pointerDownPoint.x)>5||Math.abs($.y-this.pointerDownPoint.y)>5)},z.prototype.resize=function($){ae.prototype.resize.call(this,$),this.isMoved=!0,this.setSize(),this.sizeText()},z.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},z.prototype.pointerUp=function($){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,$),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},z.prototype.showTextEditor=function(){var $=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(ie){ie.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ie=Number.parseFloat($.textEditor.style.fontSize);$.textEditor.clientWidth>=Number.parseInt($.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,$.textEditor.style.fontSize=Math.max(ie,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ie){if(ie.clipboardData){var de=ie.clipboardData.getData("text"),se=window.getSelection();if(!se.rangeCount)return!1;se.deleteFromDocument(),se.getRangeAt(0).insertNode(document.createTextNode(de)),ie.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){$.textEditDivClicked($.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},z.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var $=this.getTextScale(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),de=this.textElement.getBBox(),se={x:de.width*$,y:de.height*$};ie.x-=se.x/2,ie.y-=se.y/2,this.textEditor.style.top=ie.y+"px",this.textEditor.style.left=ie.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ie.x+"px",this.textEditor.style.fontSize=Math.max(16*$,12)+"px",this.textElement.style.display="none"}},z.prototype.textEditDivClicked=function($){this.text=$.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},z.prototype.select=function(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},z.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},z.prototype.dblClick=function($,ie){ae.prototype.dblClick.call(this,$,ie),this.showTextEditor()},z.prototype.setColor=function($){this.textElement&&le.setAttributes(this.textElement,[["fill",$]]),this.color=$,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged($)},z.prototype.setFont=function($){this.textElement&&le.setAttributes(this.textElement,[["font-family",$]]),this.fontFamily=$,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},z.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},z.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){var ie=$;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),ae.prototype.restoreState.call(this,$),this.setSize()},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},z.typeName="TextMarker",z.title="Text marker",z.icon='',z}(nt),Ue=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.color="transparent",se.lineWidth=3,se.drawing=!1,se.pixelRatio=1,se.color=de.defaultColor,se.lineWidth=de.defaultStrokeWidth,se.pixelRatio=de.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 be("Color",de.defaultColorSet,de.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.lineWidthPanel=new ct("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),se.lineWidthPanel.onWidthChanged=se.setLineWidth,se}return ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.drawingImage)},z.prototype.createVisual=function(){this.visual=le.createGroup(),this.drawingImage=le.createImage(),this.visual.appendChild(this.drawingImage);var $=le.createTransform();this.visual.transform.baseVal.appendItem($),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function($,ie){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo($.x,$.y),this.drawing=!0):ae.prototype.pointerDown.call(this,$,ie)},z.prototype.manipulate=function($){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo($.x,$.y),this.canvasContext.stroke()):ae.prototype.manipulate.call(this,$)},z.prototype.resize=function($){ae.prototype.resize.call(this,$),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},z.prototype.pointerUp=function($){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ae.prototype.pointerUp.call(this,$)},z.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)},z.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.select.call(this)},z.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.deselect.call(this)},z.prototype.finishCreation=function(){for(var $=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],de=ie[0],se=ie[1],Ke=ie[2],Rt=ie[3],Vt=!1,Er=0;Er0&&(Vt=!0,ErRt&&(Rt=Er),Lt>Ke&&(Ke=Lt));if(Vt){this.left=de/this.pixelRatio,this.top=se/this.pixelRatio,this.width=(Ke-de)/this.pixelRatio,this.height=(Rt-se)/this.pixelRatio;var zr=document.createElement("canvas");zr.width=Ke-de,zr.height=Rt-se,zr.getContext("2d").putImageData(this.canvasContext.getImageData(de,se,Ke-de,Rt-se),0,0),this.drawingImgUrl=zr.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},z.prototype.setDrawingImage=function(){le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},z.prototype.setColor=function($){this.color=$,this.colorChanged($)},z.prototype.setLineWidth=function($){this.lineWidth=$},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){this.createVisual(),ae.prototype.restoreState.call(this,$),this.drawingImgUrl=$.drawingImgUrl,this.setDrawingImage()},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie),this.setDrawingImage()},z.typeName="FreehandMarker",z.title="Freehand marker",z.icon='',z}(nt),Le=function(ae){function z($,ie,de){var se=ae.call(this,$,de||'')||this;return se.typeBoxes=[],se.currentType=ie,se.setCurrentType=se.setCurrentType.bind(se),se}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var de=function(Rt){var Vt="both";switch(Rt){case 0:Vt="both";break;case 1:Vt="start";break;case 2:Vt="end";break;case 3:Vt="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=Vt===se.currentType?se.uiStyleSettings.toolboxAccentColor:"transparent",Er.addEventListener("click",function(){$.setCurrentType(Vt,Er)}),ie.appendChild(Er),Vt==="both"||Vt==="start"){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.alignItems="center",Lt.style.minHeight="20px",Lt.innerHTML=` `,Lt.style.marginLeft="5px",Er.appendChild(Lt)}var zr=document.createElement("div");zr.style.display="flex",zr.style.alignItems="center",zr.style.minHeight="20px",zr.style.flexGrow="2";var Br=document.createElement("hr");if(Br.style.minWidth="20px",Br.style.border="0px",Br.style.borderTop="3px solid "+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee"),Br.style.flexGrow="2",zr.appendChild(Br),Er.appendChild(zr),Vt==="both"||Vt==="end"){var En=document.createElement("div");En.style.display="flex",En.style.alignItems="center",En.style.minHeight="20px",En.innerHTML=` `,En.style.marginRight="5px",Er.appendChild(En)}se.typeBoxes.push(Er)},se=this,Ke=0;Ke<4;Ke++)de(Ke);return ie},z.prototype.setCurrentType=function($,ie){var de=this;this.currentType=$,this.typeBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings!==void 0?de.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},z}(Z),Ie=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||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 ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.arrow1&&$!==this.arrow2)},z.prototype.getArrowPoints=function($,ie){var de=this.arrowBaseWidth+2*this.strokeWidth,se=this.arrowBaseHeight+2*this.strokeWidth;return $-de/2+","+(ie+se/2)+" "+$+","+(ie-se/2)+" "+($+de/2)+","+(ie+se/2)},z.prototype.createTips=function(){this.arrow1=le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow2)},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.state==="creating"&&this.createTips()},z.prototype.adjustVisual=function(){if(ae.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",le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.arrow1.transform.baseVal.getItem(0);ie.setRotate($,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var de=this.arrow2.transform.baseVal.getItem(0);de.setRotate($+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(de,0)}},z.prototype.setArrowType=function($){this.arrowType=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var ie=$;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},z.typeName="ArrowMarker",z.title="Arrow marker",z.icon='',z}(ft),Ce=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.fillColor=de.defaultFillColor,se.strokeWidth=0,se.fillPanel=new be("Color",de.defaultColorSet,de.defaultFillColor),se.fillPanel.onColorChanged=se.setFillColor,se}return ye(z,ae),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=z.typeName,$},z.typeName="CoverMarker",z.title="Cover marker",z.icon='',z}(at),Se=function(ae){function z($,ie,de,se){var Ke=ae.call(this,$,se||'')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=ie,Ke.currentOpacity=de,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",ie.style.justifyContent="space-between",this.opacities.forEach(function(de){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=de===$.currentOpacity?$.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){$.setCurrentOpacity(de,se)}),ie.appendChild(se);var Ke=document.createElement("div");Ke.innerText=100*de+"%",se.appendChild(Ke),$.opacityBoxes.push(se)}),ie},z.prototype.setCurrentOpacity=function($,ie){var de=this;this.currentOpacity=$,this.opacityBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},z}(Z),ke=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.setOpacity=se.setOpacity.bind(se),se.fillColor=de.defaultHighlightColor,se.strokeWidth=0,se.opacity=de.defaultHighlightOpacity,se.fillPanel=new be("Color",de.defaultColorSet,se.fillColor),se.fillPanel.onColorChanged=se.setFillColor,se.opacityPanel=new Se("Opacity",de.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return ye(z,ae),z.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=z.typeName,$},z.typeName="HighlightMarker",z.title="Highlight marker",z.icon='',z}(Ce),Ne='',et=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||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=de.defaultStrokeColor,se.bgColor=de.defaultFillColor,se.fontFamily=de.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 be("Text color",de.defaultColorSet,se.color,''),se.colorPanel.onColorChanged=se.setColor,se.bgColorPanel=new be("Fill color",de.defaultColorSet,se.bgColor,Ne),se.bgColorPanel.onColorChanged=se.setBgColor,se.fontFamilyPanel=new Qe("Font",de.defaultFontFamilies,de.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.tipGrip=new Je,se.tipGrip.visual.transform.baseVal.appendItem(le.createTransform()),se.controlBox.appendChild(se.tipGrip.visual),se}return ye(z,ae),z.prototype.ownsTarget=function($){return ae.prototype.ownsTarget.call(this,$)||this.tipGrip.ownsTarget($)||this.tip===$},z.prototype.createTip=function(){le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},z.prototype.pointerDown=function($,ie){this.state==="new"&&ae.prototype.pointerDown.call(this,$,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,$,ie)},z.prototype.pointerUp=function($){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,$);else{var ie=this.state==="creating";ae.prototype.pointerUp.call(this,$),this.setTipPoints(ie),this.positionTip()}},z.prototype.manipulate=function($){if(this.tipMoving){var ie=this.unrotatePoint($);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,$)},z.prototype.setBgColor=function($){this.bgRectangle&&this.tip&&(le.setAttributes(this.bgRectangle,[["fill",$]]),le.setAttributes(this.tip,[["fill",$]])),this.bgColor=$,this.fillColorChanged($)},z.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},z.prototype.setTipPoints=function($){$===void 0&&($=!1);var ie=Math.min(this.height/2,15),de=this.height/5;$&&(this.tipPosition={x:ie+de/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 $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.tip1.transform.baseVal.getItem(0);ie.setRotate($,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var de=this.tip2.transform.baseVal.getItem(0);de.setRotate($+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(de,0)}},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=z.typeName,$},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$),this.createTips(),this.adjustVisual()},z.typeName="MeasurementMarker",z.title="Measurement marker",z.icon='',z}(ft),gt=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.strokePanel.colors=de.defaultColorSet,se.fillColor="transparent",se}return ye(z,ae),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=z.typeName,$},z.typeName="EllipseFrameMarker",z.title="Ellipse frame marker",z.icon='',z}($e),Ut=function(){function ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ae.prototype.addUndoStep=function(z){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(z)||(this.undoStack.push(z),JSON.stringify(this.lastRedoStep)!==JSON.stringify(z)&&this.redoStack.splice(0,this.redoStack.length))},ae.prototype.replaceLastUndoStep=function(z){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=z)},ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ae.prototype.undo=function(){if(this.undoStack.length>1){var z=this.undoStack.pop();return z!==void 0&&this.redoStack.push(z),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ae}(),Nt=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||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=de.defaultColor,se.strokeWidth=de.defaultStrokeWidth,se.strokeDasharray=de.defaultStrokeDasharray,se.strokePanel=new be("Line color",de.defaultColorSet,de.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new ct("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ht("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorCurve&&$!==this.visibleCurve&&!this.curveGrip.ownsTarget($))},z.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},z.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorCurve=le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=le.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)},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=$.x,this.curveY=$.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ie)&&(this.activeGrip=this.curveGrip,this._state="resize")},z.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},z.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=le.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)},z.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ae.prototype.addControlGrips.call(this)},z.prototype.positionGrips=function(){ae.prototype.positionGrips.call(this);var $=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-$/2,this.curveY-$/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()))},z.prototype.manipulate=function($){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+$.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+$.y-this.manipulationStartY),ae.prototype.manipulate.call(this,$)},z.prototype.resize=function($){this.activeGrip===this.curveGrip&&(this.curveX=$.x,this.curveY=$.y),ae.prototype.resize.call(this,$),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},z.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},z.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},z.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual()},z.prototype.scale=function($,ie){this.curveX=this.curveX*$,this.curveY=this.curveY*ie,ae.prototype.scale.call(this,$,ie)},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var ie=$;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.curveX=ie.curveX,this.curveY=ie.curveY,this.createVisual(),this.adjustVisual()},z.typeName="CurveMarker",z.title="Curve marker",z.icon='',z}(tt),hr=function(){function ae(z,$){$===void 0&&($=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=z,this.cancelable=$}return Object.defineProperty(ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ae.prototype.preventDefault=function(){this._defaultPrevented=!0},ae}(),mr=function(ae){function z($,ie,de){var se=ae.call(this,$,!1)||this;return se.dataUrl=ie,se.state=de,se}return ye(z,ae),z}(hr),St=function(ae){function z($,ie,de){de===void 0&&(de=!1);var se=ae.call(this,$,de)||this;return se.marker=ie,se}return ye(z,ae),z}(hr),Yr=function(){function ae(){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 ae.prototype.addEventListener=function(z,$){this[z].push($)},ae.prototype.removeEventListener=function(z,$){var ie=this[z].indexOf($);ie>-1&&this[z].splice(ie,1)},ae}(),Jr=function(){function ae(z){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Re,this._isOpen=!1,this.undoRedoManager=new Ut,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 Yr,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new te(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=z,this.targetRoot=document.body,this.width=z.clientWidth,this.height=z.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(ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,Ue,Ie,lt,gt,$e,ke,et,bt,Ce,ft,Nt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,Ue,Ie,lt,$e,ke,et]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,Ue,Ie,lt,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(z){var $=this;this._availableMarkerTypes.splice(0),z.forEach(function(ie){if(typeof ie=="string"){var de=$.ALL_MARKER_TYPES.find(function(se){return se.typeName===ie});de!==void 0&&$._availableMarkerTypes.push(de)}else $._availableMarkerTypes.push(ie)})},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(z){this._zoomLevel=z,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(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ae.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},ae.prototype.show=function(){var z=this;this.styles.styleSheetRoot===void 0&&ee.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ee.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function($){return $(new hr(z))})},ae.prototype.render=function(){return Oe(this,void 0,void 0,function(){var z;return xe(this,function($){switch($.label){case 0:return this.setCurrentMarker(),(z=new pe).naturalSize=this.renderAtNaturalSize,z.imageType=this.renderImageType,z.imageQuality=this.renderImageQuality,z.markersOnly=this.renderMarkersOnly,z.width=this.renderWidth,z.height=this.renderHeight,[4,z.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return $.sent(),[4,z.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,$.sent()]}})})},ae.prototype.close=function(z){var $=this;if(z===void 0&&(z=!1),this.isOpen){var ie=!1;z||this.eventListeners.beforeclose.forEach(function(de){var se=new hr($,!0);de(se),se.defaultPrevented&&(ie=!0)}),ie||(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(de){return de(new hr($))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var z,$=[],ie=0;iethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*z:this.editorCanvas.clientWidth,ie=$',z.title="Powered by marker.js",z.style.display="grid",z.style.alignItems="center",z.style.justifyItems="center",z.style.padding="3px",z.style.width="20px",z.style.height="20px",this.logoUI.appendChild(z),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ae.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")},ae.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"},ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ae.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 z=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=z+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(z),1),z.dispose()},ae.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())},ae.prototype.toolbarButtonClicked=function(z,$){if(z==="marker"&&$!==void 0)this.createNewMarker($);else if(z==="action")switch($){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()}},ae.prototype.deleteSelectedMarker=function(){var z=this;if(this._currentMarker!==void 0){var $=!1;if(this.eventListeners.markerbeforedelete.forEach(function(de){var se=new St(z,z._currentMarker,!0);de(se),se.defaultPrevented&&($=!0)}),!$){var ie=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(de){return de(new St(z,ie))})}}},ae.prototype.clear=function(){var z=this,$=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Rt=new St(z,void 0,!0);Ke(Rt),Rt.defaultPrevented&&($=!0)}),!$)){this.setCurrentMarker();for(var ie=function(Ke){var Rt=de.markers[Ke];de.setCurrentMarker(de.markers[Ke]),de._currentMarker.dispose(),de.markerImage.removeChild(de._currentMarker.container),de.markers.splice(de.markers.indexOf(de._currentMarker),1),de.eventListeners.markerdelete.forEach(function(Vt){return Vt(new St(z,Rt))})},de=this,se=this.markers.length-1;se>=0;se--)ie(se);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.prototype.showNotesEditor=function(){var z;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=(z=this._currentMarker.notes)!==null&&z!==void 0?z:"",this.overlayContainer.appendChild(this.notesArea))},ae.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)},ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ae.prototype.addUndoStep=function(){var z=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var $=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===$.width&&ie.height===$.height){var de=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep($),de1&&this.panTo({x:z.clientX,y:z.clientY}))},ae.prototype.onPointerUp=function(z){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(z.clientX,z.clientY)),this.isDragging=!1,this.addUndoStep()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(z){this._currentMarker===void 0||this.notesArea!==void 0||z.key!=="Delete"&&z.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(z,$){var ie=this.markerImage.getBoundingClientRect();return{x:(z-ie.left)/this.zoomLevel,y:($-ie.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var z=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=z+"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()},ae.prototype.addLicenseKey=function(z){re.addKey(z)},ae.prototype.addEventListener=function(z,$){this.eventListeners.addEventListener(z,$)},ae.prototype.removeEventListener=function(z,$){this.eventListeners.removeEventListener(z,$)},ae.prototype.renderState=function(z){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(z),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.prototype.focus=function(){var z=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function($){return $(new hr(z))}))},ae.prototype.blur=function(){var z=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function($){return $(new hr(z))}))},ae.instanceCounter=0,ae}();/* ********************************** 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 Hr=function(ae,z){return(Hr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ie){$.__proto__=ie}||function($,ie){for(var de in ie)Object.prototype.hasOwnProperty.call(ie,de)&&($[de]=ie[de])})(ae,z)};function un(ae,z){if(typeof z!="function"&&z!==null)throw new TypeError("Class extends value "+String(z)+" is not a constructor or null");function $(){this.constructor=ae}Hr(ae,z),ae.prototype=z===null?Object.create(z):($.prototype=z.prototype,new $)}function Ar(ae,z,$,ie){return new($||($=Promise))(function(de,se){function Ke(Er){try{Vt(ie.next(Er))}catch(Lt){se(Lt)}}function Rt(Er){try{Vt(ie.throw(Er))}catch(Lt){se(Lt)}}function Vt(Er){var Lt;Er.done?de(Er.value):(Lt=Er.value,Lt instanceof $?Lt:new $(function(zr){zr(Lt)})).then(Ke,Rt)}Vt((ie=ie.apply(ae,z||[])).next())})}function vn(ae,z){var $,ie,de,se,Ke={label:0,sent:function(){if(1&de[0])throw de[1];return de[1]},trys:[],ops:[]};return se={next:Rt(0),throw:Rt(1),return:Rt(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Rt(Vt){return function(Er){return function(Lt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ie&&(de=2&Lt[0]?ie.return:Lt[0]?ie.throw||((de=ie.return)&&de.call(ie),0):ie.next)&&!(de=de.call(ie,Lt[1])).done)return de;switch(ie=0,de&&(Lt=[2&Lt[0],de.value]),Lt[0]){case 0:case 1:de=Lt;break;case 4:return Ke.label++,{value:Lt[1],done:!1};case 5:Ke.label++,ie=Lt[1],Lt=[0];continue;case 7:Lt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(de=Ke.trys,(de=de.length>0&&de[de.length-1])||Lt[0]!==6&&Lt[0]!==2)){Ke=0;continue}if(Lt[0]===3&&(!de||Lt[1]>de[0]&&Lt[1]0&&$>0){var ie=new Xn(z,$),de=ie.ratio>=1?20:ie.getHorizontalLength(20),se=ie.ratio<1?20:ie.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 Rt=Kt.createDefs();Ke.appendChild(Rt);var Vt=Kt.createElement("clipPath",[["id","text-bg-clip"]]);Rt.appendChild(Vt);var Er=Kt.createPath(Kt.getHollowRectanglePath((24-de)/2,(24-se)/2,de,se,(24-de)/2+2,(24-se)/2+2,de-4,se-4));Ke.appendChild(Er);var Lt=Kt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Lt.appendChild(Kt.createTSpan(z+":"+$)),Ke.appendChild(Lt);var zr=Lt.getBBox();Kt.setAttributes(Lt,[["x",((24-zr.width)/2).toString()],["y",((24-zr.height)/2-zr.y).toString()]]);var Br=Kt.createPath(Kt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(zr.width))/2,(24-Math.ceil(zr.height))/2,Math.ceil(zr.width),Math.ceil(zr.height)));return Vt.appendChild(Br),Kt.setAttributes(Er,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.outerHTML}return''},ae}(),$n=function(ae){function z($,ie,de){var se=ae.call(this,$,ie)||this;return se.isDropdownOpen=!1,se.onClick=se.dropdownButtonClicked,se.dropdownButtons=de,se}return un(z,ae),z.prototype.setupDropdown=function(){var $=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ie){ie.className=$.className,ie.colorsClassName=$.colorsClassName,$.dropdownBlock.appendChild(ie.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},z.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},z.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},z.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},z.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},z.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},z}(tn),Zr=function(){function ae(z,$){this.GRIP_SIZE=10,this.color=z,this.fillColor=$,this.visual=Kt.createGroup(),this.visual.appendChild(Kt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Kt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(z){return z===this.visual||z===this.visual.childNodes[0]||z===this.visual.childNodes[1]},ae.prototype.setCenter=function(z,$){this.visual.childNodes.forEach(function(ie){return Kt.setAttributes(ie,[["cx",z.toString()],["cy",$.toString()]])})},ae}(),Bn=function(){function ae(z,$,ie,de){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=z,this.canvasHeight=$,this.margin=ie,this.container=de,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(ae.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(z){this._aspectRatio=z,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(z){this._isGridVisible=z,this.gridContainer&&Kt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(z){this._zoomFactor=z,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ae.prototype.open=function(){var z=this;this.cropShadeElement=Kt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Kt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var $=0;$this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-$.height/2),Kt.setAttributes(this.cropRectElement,[["x",$.x.toString()],["y",$.y.toString()],["width",$.width.toString()],["height",$.height.toString()]]);var ie=$.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(se,Ke){var Rt=$.y+ie*(Ke+1);Kt.setAttributes(se,[["x1",""+$.x],["y1",""+Rt],["x2",""+($.x+$.width)],["y2",""+Rt]])});var de=$.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(se,Ke){var Rt=$.x+de*(Ke+1);Kt.setAttributes(se,[["x1",""+Rt],["y1",""+$.y],["x2",""+Rt],["y2",""+($.y+$.height)]])}),Kt.setAttributes(this.cropShadeElement,[["d",Kt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,$.x,$.y,$.width,$.height)]]),this.topLeftGrip.setCenter($.x,$.y),this.topRightGrip.setCenter($.x+$.width,$.y),this.bottomLeftGrip.setCenter($.x,$.y+$.height),this.bottomRightGrip.setCenter($.x+$.width,$.y+$.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ae.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)},ae.prototype.clientToLocalCoordinates=function(z,$){var ie=this.container.getBoundingClientRect();return{x:z-ie.left+this.margin,y:$-ie.top+this.margin}},ae.prototype.onPointerDown=function(z){this.container.setPointerCapture(z.pointerId),this.previousPoint=this.clientToLocalCoordinates(z.clientX,z.clientY),this.cropRectElement===z.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(z.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(z.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(z.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(z.target)&&(this.activeGrip=this.bottomRightGrip)},ae.prototype.onPointerMove=function(z){if(this.isMoving)this.move(this.clientToLocalCoordinates(z.clientX,z.clientY));else if(this.activeGrip){var $=this.clientToLocalCoordinates(z.clientX,z.clientY);this.resize($)}z.preventDefault()},ae.prototype.onPointerUp=function(z){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(z.pointerId)},ae.prototype.move=function(z){var $=z.x-this.previousPoint.x,ie=z.y-this.previousPoint.y;this.zoomFactor!==1&&($=-$/this.zoomFactor,ie=-ie/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+$),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ie),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=z},ae.prototype.resize=function(z){var $=Object.assign({},this.cropRect),ie=z.x-this.previousPoint.x,de=z.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:$.x+iethis.canvasWidth*this.zoomFactor&&(ie=this.canvasWidth*this.zoomFactor-$.width),$.width+=ie}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?($.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ie),$.height=this.aspectRatio.getVerticalLength($.width)):($.y+=de,$.height=this.cropRect.y+this.cropRect.height-$.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?$.height=this.aspectRatio.getVerticalLength($.width):$.height+=de}$.width<10&&($.x=this.cropRect.x,$.width=10),$.height<10&&($.y=this.cropRect.y,$.height=10),this.previousPoint=z,$.x>=this.margin&&$.y>=this.margin&&$.x-this.margin+$.width<=this.canvasWidth&&$.y-this.margin+$.height<=this.canvasHeight&&(this.cropRect=$,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ae.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var z=this.cropRect.x+this.cropRect.width/2,$=this.cropRect.y+this.cropRect.height/2,ie=this.aspectRatio.getHorizontalLength(this.cropRect.height),de=this.aspectRatio.getVerticalLength(this.cropRect.width);ie/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=z-this.cropRect.width/2,this.cropRect.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)}},ae.prototype.getRescaledRect=function(z,$,ie,de,se,Ke){var Rt=ie/z,Vt=de/$;return{x:(se.x-Ke)*Rt+Ke,y:(se.y-Ke)*Vt+Ke,width:se.width*Rt,height:se.height*Vt}},ae.prototype.scaleCanvas=function(z,$){var ie=this.getRescaledRect(this.canvasWidth,this.canvasHeight,z,$,this.cropRect,this.margin);this.canvasWidth=z,this.canvasHeight=$,this.onCropChange&&this.onCropChange(ie),this.setCropRectangle(ie)},ae}(),si=function(){function ae(z){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=z,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(ae.prototype,"angle",{get:function(){return this._angle},set:function(z){this._angle=z,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ae.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},ae.prototype.onPointerDown=function(z){this.controlContainer.setPointerCapture(z.pointerId),this.isDragging=!0,this.previousPoint={x:z.clientX,y:z.clientY}},ae.prototype.onPointerMove=function(z){this.isDragging&&(this.onAngleChange&&this.onAngleChange((z.clientX-this.previousPoint.x)/5),this.previousPoint.x=z.clientX)},ae.prototype.onPointerUp=function(z){this.isDragging&&this.onAngleChange&&this.onAngleChange((z.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(z.pointerId)},ae.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var z=this.angleLabelText.getBBox();Kt.setAttributes(this.angleLabelElement,[["x",((this.width-z.width)/2).toString()],["y",(this.height/2).toString()]])}},ae.prototype.positionScaleShape=function(){if(this.scaleShape){var z=this.scaleShape.transform.baseVal.getItem(0);z.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(z,0)}},ae.prototype.getVisual=function(){var z=document.createElementNS("http://www.w3.org/2000/svg","svg");z.setAttribute("xmlns","http://www.w3.org/2000/svg"),z.setAttribute("width",this.width+"px"),z.setAttribute("height",this.height+"px"),z.setAttribute("viewBox","0 0 "+this.width+" "+this.height),z.style.flexShrink="0",document.body.appendChild(z);for(var $="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ie=1;ie<=this.width/5+10;ie++){var de=ie%5==0?this.height/3:this.height/6;$+="h4v"+-de+"h1v"+de}$+="v1H0Z",this.scaleShape=Kt.createPath($);var se=Kt.createTransform();this.scaleShape.transform.baseVal.appendItem(se),z.appendChild(this.scaleShape),this.angleLabelElement=Kt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Kt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=Kt.createTSpan("");return Ke.innerHTML="°",this.angleLabelElement.appendChild(Ke),z.appendChild(this.angleLabelElement),document.body.removeChild(z),z},ae}(),li=function(){function ae(){this.naturalSize=!1,this.imageType="image/png"}return ae.prototype.rasterize=function(z,$,ie,de,se,Ke,Rt){var Vt=this;return new Promise(function(Er){var Lt=document.createElement("canvas");Lt.width=z.width.baseVal.value-2*de,Lt.height=z.height.baseVal.value-2*de;var zr=1,Br=1;Vt.naturalSize===!0?(zr=$.naturalWidth/(z.width.baseVal.value-2*de)/Ke,Br=$.naturalHeight/(z.height.baseVal.value-2*de)/Rt,Lt.width=$.naturalWidth/Ke,Lt.height=$.naturalHeight/Rt):Vt.width!==void 0&&Vt.height!==void 0&&(zr=Vt.width/ie.width,Br=Vt.height/ie.height,Lt.width*=zr,Lt.height*=Br);var En=Lt.getContext("2d");En.translate(Lt.width/2,Lt.height/2),En.rotate(se*Math.PI/180),En.scale(Ke,Rt),En.translate(-Lt.width/2,-Lt.height/2),En.drawImage($,0,0,Lt.width,Lt.height);var ui=document.createElement("canvas");ui.width=ie.width*zr,ui.height=ie.height*Br,ui.getContext("2d").putImageData(En.getImageData((ie.x-de)*zr,(ie.y-de)*Br,ie.width*zr,ie.height*Br),0,0),Er(ui.toDataURL(Vt.imageType,Vt.imageQuality))})},ae}(),wt=function(){function ae(z){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=ae.instanceCounter++,this.styles=new or(this.instanceNo),this.target=z,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(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(z){this._zoomToCropEnabled=z,z?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(z){this._isGridVisible=z,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"gridLines",{get:function(){return this._gridLines},set:function(z){this._gridLines=z,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(z){this._rotationAngle=z,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"aspectRatio",{get:function(){var z;return(z=this._aspectRatio)!==null&&z!==void 0?z:this.aspectRatios[0]},set:function(z){this._aspectRatio=z},enumerable:!1,configurable:!0}),ae.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},ae.prototype.show=function(){this.showUI(),this.open()},ae.prototype.close=function(z){z===void 0&&(z=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),z||this.closeEventListeners.forEach(function($){return $()}),this._isOpen=!1)},ae.prototype.addRenderEventListener=function(z){this.renderEventListeners.push(z)},ae.prototype.removeRenderEventListener=function(z){this.renderEventListeners.indexOf(z)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(z),1)},ae.prototype.addCloseEventListener=function(z){this.closeEventListeners.push(z)},ae.prototype.removeCloseEventListener=function(z){this.closeEventListeners.indexOf(z)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(z),1)},ae.prototype.setupResizeObserver=function(){var z=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){z.resize(z.target.clientWidth,z.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))},ae.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var z=1*this.target.clientWidth/this.target.clientHeight,$=this.contentDiv.clientWidth/z>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*z:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ie=$+2*this.CANVAS_MARGINz+this.CANVAS_MARGIN?this.target.offsetTop-(z+this.CANVAS_MARGIN):0;this.coverDiv.style.top=$+"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},ae.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ae.prototype.addTopToolbar=function(){var z=this;this.topToolbar=new Xr,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 $=new Ln;$.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock($);var ie=[];this.aspectRatios.forEach(function(Br){var En=new tn(hi.getIcon(Br.horizontal,Br.vertical),Br.horizontal===0&&Br.vertical===0?"FREE":Br.horizontal+":"+Br.vertical);En.onClick=function(){return z.ratioButtonClicked(Br)},ie.push(En)}),this.aspectRatioButton=new $n(hi.getIcon(0,0),"Aspect ratio",ie),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,$.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var de=new tn('',"Toggle grid");de.isActive=this.isGridVisible,de.onClick=function(){z.isGridVisible=!z.isGridVisible,de.isActive=z.isGridVisible},$.addButton(de);var se=new tn('',"Zoom to selection");if(se.isActive=this.zoomToCropEnabled,se.onClick=function(){z.zoomToCropEnabled=!z.zoomToCropEnabled,se.isActive=z.zoomToCropEnabled},$.addButton(se),!mn.isLicensed){var Ke=new ur;this.topToolbar.addElementBlock(Ke);var Rt=document.createElement("div");Rt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Vt=document.createElement("a");Vt.style.color="currentColor",Vt.href="https://markerjs.com/products/cropro",Vt.target="_blank",Vt.innerHTML='',Rt.appendChild(Vt),Ke.addElement(Rt)}var Er=new Ln;Er.minWidth=3*this.toolbarHeight+"px",Er.contentAlign="end",this.topToolbar.addButtonBlock(Er);var Lt=new tn('',"OK");Lt.onClick=this.startRenderAndClose,Er.addButton(Lt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Lt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var zr=new tn('',"Close");zr.onClick=this.close,Er.addButton(zr),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(zr.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ae.prototype.addBottomToolbar=function(){var z=this;this.bottomToolbar=new Xr,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 $=new Ln;$.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock($);var ie=new tn('',"Rotate left");ie.onClick=this.rotateLeftButtonClicked,$.addButton(ie);var de=new tn('',"Rotate right");de.onClick=this.rotateRightButtonClicked,$.addButton(de);var se=new ur;se.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(se),this.straightener=new si("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){z.rotateBy(Er),z.straightener.angle=z.rotationAngle},se.addElement(this.straightener.getUI());var Ke=new Ln;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var Rt=new tn('',"Flip horizontal");Rt.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(Rt);var Vt=new tn('',"Flip vertical");Vt.onClick=this.flipVerticallyButtonClicked,Ke.addButton(Vt)},ae.prototype.ratioButtonClicked=function(z){this.aspectRatio=z,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ae.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=hi.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ae.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Xn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ae.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ae.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ae.prototype.restoreState=function(z){if(z){var $=this.cropLayer.getRescaledRect(z.width,z.height,this.imageWidth,this.imageHeight,z.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle($),this.cropRectChanged($),this.flippedHorizontally=z.flippedHorizontally,this.flippedVertically=z.flippedVertically,this.applyFlip(),this.rotationAngle=z.rotationAngle,this.applyRotation()}},ae.prototype.clientToLocalCoordinates=function(z,$){var ie=this.cropImage.getBoundingClientRect();return{x:z-ie.left,y:$-ie.top}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var z=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=z+"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()},ae.prototype.rotateLeftButtonClicked=function(){var z=this.rotationAngle-90;this.rotationAngle%90!=0&&(z+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(z)},ae.prototype.rotateRightButtonClicked=function(){var z=this.rotationAngle+90;this.rotationAngle%90!=0&&(z-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(z)},ae.prototype.rotateTo=function(z){z=(z=z>180?z-360:z)<=-180?z+360:z,this.rotationAngle=z,this.applyRotation()},ae.prototype.rotateBy=function(z){this.rotateTo((this.rotationAngle+z)%360)},ae.prototype.applyRotation=function(){var z=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var $=this.editingTargetRotationContainer.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem($,0);var ie=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ie.width,this.imageHeight/ie.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=z},ae.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ae.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ae.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ae.prototype.startRenderAndClose=function(){return Ar(this,void 0,void 0,function(){var z,$;return vn(this,function(ie){switch(ie.label){case 0:return[4,this.render()];case 1:return z=ie.sent(),$=this.getState(),this.renderEventListeners.forEach(function(de){return de(z,$)}),this.close(!0),[2]}})})},ae.prototype.render=function(){return Ar(this,void 0,void 0,function(){var z;return vn(this,function($){switch($.label){case 0:return(z=new li).naturalSize=this.renderAtNaturalSize,z.imageType=this.renderImageType,z.imageQuality=this.renderImageQuality,z.width=this.renderWidth,z.height=this.renderHeight,this.unzoomFromCrop(),Kt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,z.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 $.sent(),[4,z.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,$.sent()]}})})},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new gr("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 gr("toolbar_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarBlockStyleClass=this.styles.addClass(new gr("toolbar-block",` display: flex; align-items: center; box-sizing: content-box; `));var z=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new gr("toolbar_button",` display: inline-block; width: `+(this.toolbarHeight-2*z)+`px; height: `+(this.toolbarHeight-2*z)+`px; padding: `+z+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new gr("toolbar_button_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new gr("toolbar_active_button",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; background-color: `+this.styles.settings.toolbarBackgroundActiveColor+` `)),this.styles.addRule(new Xt("."+this.toolbarButtonStyleClass.name+" svg",` height: `+this.toolbarHeight/2+`px; `)),this.styles.addRule(new Xt("."+this.toolbarButtonStyleColorsClass.name+":hover",` background-color: `+this.styles.settings.toolbarBackgroundHoverColor+` `)),this.toolbarDropdownStyleClass=this.styles.addClass(new gr("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 gr("toolbar_dropdown_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new gr("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 gr("toolbar_straightener",` display: flex; overflow: hidden; justify-content: center; height: `+(this.toolbarHeight-2*z)+`px; padding: `+z+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new gr("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `))},ae.instanceCounter=0,ae}(),$t=D("8hTe"),en=D.n($t),Cn=/]*>/g;function _n(ae){var z=document.createElement("div");return z.innerHTML=ae,z.childNodes.length===0?"":z.childNodes[0].nodeValue}var On=Y.a=function(ae){var z=ae.value,$=z===void 0?"":z,ie=ae.edit,de=ie===void 0?!1:ie,se=ae.className,Ke=ae.showTextOnly,Rt=ae.showLines,Vt=ae.replaces,Er=ae.zoomImg,Lt=ae.hasMask,zr=ae.style,Br=zr===void 0?{}:zr,En=ae.stylesPrev,ui=En===void 0?{}:En,Ei=String($),In=Object(l.useRef)(),Li=Object(l.useRef)(),qi=Object(l.useState)(""),ni=Object(S.a)(qi,2),Ti=ni[0],xi=ni[1],Fi=Object(l.useState)("office"),Ci=Object(S.a)(Fi,2),Gi=Ci[0],Mi=Ci[1],oa=function(){var mt=new wt(Li.current);mt.displayMode="popup",mt.addRenderEventListener(function(){var Ct=Object(v.a)(d.a.mark(function It(Pt){var Ht;return d.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return In.current.style.display="none",dt.next=3,Object(Ae.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Pt}});case 3:Ht=dt.sent,Ht!=null&&Ht.id&&Vt(Li.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 5:case"end":return dt.stop()}},It)}));return function(It){return Ct.apply(this,arguments)}}()),mt.show()},sa=function(){var mt=new Jr(Li.current);mt.settings.displayMode="popup",mt.addEventListener("render",function(){var Ct=Object(v.a)(d.a.mark(function It(Pt){var Ht;return d.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:if(In.current.style.display="none",!Li.current){dt.next=6;break}return dt.next=4,Object(Ae.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Pt.dataUrl}});case 4:Ht=dt.sent,Ht!=null&&Ht.id&&Vt(Li.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 6:case"end":return dt.stop()}},It)}));return function(It){return Ct.apply(this,arguments)}}()),mt.show(),window.markerArea=mt},Ii=Object(l.useMemo)(function(){try{var it=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,mt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ct=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ei=Ei.replace(it,"("+ne.a.API_SERVER+"/api/attachments/").replace(mt,'"'+ne.a.API_SERVER+"/api/attachments/").replace(Ct,'"'+ne.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,` `),Ei=Ei.replace(new RegExp("(?[TOC]

    ",k()),w()),It=It.replace(/(__special_katext_id_\d+__)/g,function(Wt,dt){var At=Pt[dt],Dt=At.type,yr=At.expression;return Object(fe.renderToString)(_n(yr)||"",{displayMode:Dt==="block",throwOnError:!1,output:"html"})}),It=It.replace(/▁/g,"\u2581\u2581\u2581"),I(),Ke){var Ht=document.createElement("div");return Ht.innerHTML=It,Ht.innerText}return setTimeout(function(){return ta()},500),It},[Ei]),qn=Object(l.useRef)();E.WebkitLineClamp=Rt,Rt&&(Br=Object(p.a)(Object(p.a)({},Br),E));function Vi(it){var mt=it.target;if(mt.tagName.toUpperCase()==="IMG"){if(Er){var Ct=mt.getAttribute("src");xi(Ct),Mi("image")}}else if(mt.tagName.toUpperCase()==="A"){var It=mt.getAttribute("href");if(It.indexOf("office")>-1)it.preventDefault(),xi(It),Mi("office");else if(It.indexOf("application/pdf")>-1)it.preventDefault(),xi(It),Mi("pdf");else if(It.indexOf("type=text")>-1)it.preventDefault(),xi(It),Mi("html");else if(It.startsWith("#")){it.preventDefault();var Pt=document.getElementById(It.replace("#",""));Pt&&Pt.scrollIntoView(!0)}}}var ta=function(){var mt,Ct=(mt=qn.current)===null||mt===void 0?void 0:mt.querySelectorAll("video");Ct==null||Ct.forEach(function(It){if(It.oncontextmenu=function(){return!1},It.src.indexOf(".m3u8")>-1&&!It.canPlayType("application/vnd.apple.mpegurl")){if(X.a.isSupported()){var Pt=new X.a;Pt.loadSource(It.src),Pt.attachMedia(It)}}})};Object(l.useEffect)(function(){if(qn.current&&Ii&&(Ii.match(Cn)&&window.PR.prettyPrint()),qn.current)return qn.current.addEventListener("click",Vi),function(){qn.current.removeEventListener("click",Vi),I(),w()}},[Ii,qn.current,Vi]);var Tt=function(mt){if(!de)return;mt.target.nodeName==="IMG"?(In.current.style.display="flex",In.current.style.width=mt.target.clientWidth+"px",In.current.style.height=mt.target.clientHeight+"px",In.current.style.top=mt.target.offsetTop+"px",In.current.style.left=mt.target.offsetLeft+"px",Li.current.src=mt.target.getAttribute("src")):In.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:qn,style:Object(p.a)({},Br),className:"".concat(se||""," markdown-body ").concat(en.a.mdBody),onMouseOver:Tt,dangerouslySetInnerHTML:{__html:Ii}}),n.a.createElement("div",{ref:In,className:en.a.button},n.a.createElement(g.a,null,n.a.createElement(P.a,{onClick:function(){return oa()}},"\u88C1\u526A"),n.a.createElement(P.a,{onClick:function(){return sa()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Li,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),n.a.createElement(me.a,{close:!0,data:Ti,hasMask:Lt,type:Ti!=null&&Ti.length?Gi:"",style:Object(p.a)({},ui),onClose:function(){return xi("")}}))}},"9OqN":function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.mode.CTR=function(){var g=L.lib.BlockCipherMode.extend(),T=g.Encryptor=g.extend({processBlock:function(P,p){var v=this._cipher,S=v.blockSize,b=this._iv,d=this._counter;b&&(d=this._counter=b.slice(0),this._iv=void 0);var l=d.slice(0);v.encryptBlock(l,0),d[S-1]=d[S-1]+1|0;for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(L.a)())return null;var l=document.createElement("style");if((b=d.csp)===null||b===void 0?void 0:b.nonce){var n;l.nonce=(n=d.csp)===null||n===void 0?void 0:n.nonce}l.innerHTML=S;var c=T(d),u=c.firstChild;return d.prepend&&c.prepend?c.prepend(l):d.prepend&&u?c.insertBefore(l,u):c.appendChild(l),l}var p=new Map;function v(S,b){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=T(d);if(!p.has(l)){var n=P("",d),c=n.parentNode;p.set(l,c),c.removeChild(n)}var u=Array.from(p.get(l).children).find(function(r){return r.tagName==="STYLE"&&r[g]===b});if(u){var o,h;if(((o=d.csp)===null||o===void 0?void 0:o.nonce)&&u.nonce!==((h=d.csp)===null||h===void 0?void 0:h.nonce)){var m;u.nonce=(m=d.csp)===null||m===void 0?void 0:m.nonce}return u.innerHTML!==S&&(u.innerHTML=S),u}var s=P(S,d);return s[g]=b,s}},Bd2K:function(j,Y,D){(function(L){L(D("VrN/"),D("osHv"))})(function(L){L.defineOption("autoCloseTags",!1,function(d,l,n){if(n!=L.Init&&n&&d.removeKeyMap("autoCloseTags"),!l)return;var c={name:"autoCloseTags"};(typeof l!="object"||l.whenClosing!==!1)&&(c["'/'"]=function(u){return v(u)}),(typeof l!="object"||l.whenOpening!==!1)&&(c["'>'"]=function(u){return P(u)}),d.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function P(d){if(d.getOption("disableInput"))return L.Pass;for(var l=d.listSelections(),n=[],c=d.getOption("autoCloseTags"),u=0;uo.ch&&(a=a.slice(0,a.length-h.end+o.ch));var f=a.toLowerCase();if(!a||h.type=="string"&&(h.end!=o.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||h.string.length==1)||h.type=="tag"&&r.close||h.string.indexOf("/")==o.ch-h.start-1||w&&S(w,f)>-1||b(d,m.mode.xmlCurrentContext&&m.mode.xmlCurrentContext(s)||[],a,o,!0))return L.Pass;var k=typeof c=="object"&&c.emptyTags;if(k&&S(k,a)>-1){n[u]={text:"/>",newPos:L.Pos(o.line,o.ch+2)};continue}var O=E&&S(E,f)>-1;n[u]={indent:O,text:">"+(O?` `:"")+"",newPos:O?L.Pos(o.line+1,0):L.Pos(o.line,o.ch+1)}}for(var C=typeof c=="object"&&c.dontIndentOnAutoClose,u=l.length-1;u>=0;u--){var x=n[u];d.replaceRange(x.text,l[u].head,l[u].anchor,"+insert");var y=d.listSelections().slice(0);y[u]={head:x.newPos,anchor:x.newPos},d.setSelections(y),!C&&x.indent&&(d.indentLine(x.newPos.line,null,!0),d.indentLine(x.newPos.line+1,null,!0))}}function p(d,l){for(var n=d.listSelections(),c=[],u=l?"/":""&&(w+=">"),c[m]=w}if(d.replaceSelections(c),n=d.listSelections(),!h)for(var m=0;m=0&&l[s]==n;s--)++m;c=h.to;for(var s=1;s0){for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:"",l=[],n=0;nUe.length)&&(Le=Ue.length);for(var Ie=0,Ce=new Array(Le);Ie=Ue.length?{done:!0}:{done:!1,value:Ue[Ce++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Ie=Ue[Symbol.iterator](),Ie.next.bind(Ie)}function v(Ue,Le){return Le={exports:{}},Ue(Le,Le.exports),Le.exports}var S=v(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 Ie(Ce){Ue.exports.defaults=Ce}Ue.exports={defaults:Le(),getDefaults:Le,changeDefaults:Ie}}),b=S.defaults,d=S.getDefaults,l=S.changeDefaults,n=/[&<>"']/,c=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,h={"&":"&","<":"<",">":">",'"':""","'":"'"},m=function(Le){return h[Le]};function s(Ue,Le){if(Le){if(n.test(Ue))return Ue.replace(c,m)}else if(u.test(Ue))return Ue.replace(o,m);return Ue}var r=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(Ue){return Ue.replace(r,function(Le,Ie){return Ie=Ie.toLowerCase(),Ie==="colon"?":":Ie.charAt(0)==="#"?Ie.charAt(1)==="x"?String.fromCharCode(parseInt(Ie.substring(2),16)):String.fromCharCode(+Ie.substring(1)):""})}var t=/(^|[^\[])\^/g;function w(Ue,Le){Ue=Ue.source||Ue,Le=Le||"";var Ie={replace:function(Se,ke){return ke=ke.source||ke,ke=ke.replace(t,"$1"),Ue=Ue.replace(Se,ke),Ie},getRegex:function(){return new RegExp(Ue,Le)}};return Ie}var E=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(Ue,Le,Ie){if(Ue){var Ce;try{Ce=decodeURIComponent(a(Ie)).replace(E,"").toLowerCase()}catch(Se){return null}if(Ce.indexOf("javascript:")===0||Ce.indexOf("vbscript:")===0||Ce.indexOf("data:")===0)return null}Le&&!f.test(Ie)&&(Ie=_(Le,Ie));try{Ie=encodeURI(Ie).replace(/%25/g,"%")}catch(Se){return null}return Ie}var O={},C=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(Ue,Le){O[" "+Ue]||(C.test(Ue)?O[" "+Ue]=Ue+"/":O[" "+Ue]=G(Ue,"/",!0)),Ue=O[" "+Ue];var Ie=Ue.indexOf(":")===-1;return Le.substring(0,2)==="//"?Ie?Le:Ue.replace(x,"$1")+Le:Le.charAt(0)==="/"?Ie?Le:Ue.replace(y,"$1")+Le:Ue+Le}var M={exec:function(){}};function I(Ue){for(var Le=1,Ie,Ce;Le=0&&et[bt]==="\\";)$e=!$e;return $e?"|":" |"}),Ce=Ie.split(/ \|/),Se=0;if(Ce.length>Le)Ce.splice(Le);else for(;Ce.length=Ce.length?Se.slice(Ce.length):Se}).join(` `)}var De=function(){function Ue(Ie){this.options=Ie||U}var Le=Ue.prototype;return Le.space=function(Ce){var Se=this.rules.block.newline.exec(Ce);if(Se)return Se[0].length>1?{type:"space",raw:Se[0]}:{raw:` `}},Le.code=function(Ce,Se){var ke=this.rules.block.code.exec(Ce);if(ke){var Ne=Se[Se.length-1];if(Ne&&Ne.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var et=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?et:W(et,` `)}}},Le.fences=function(Ce){var Se=this.rules.block.fences.exec(Ce);if(Se){var ke=Se[0],Ne=Ae(ke,Se[3]||"");return{type:"code",raw:ke,lang:Se[2]?Se[2].trim():Se[2],text:Ne}}},Le.heading=function(Ce){var Se=this.rules.block.heading.exec(Ce);if(Se)return{type:"heading",raw:Se[0],depth:Se[1].length,text:Se[2]}},Le.nptable=function(Ce){var Se=this.rules.block.nptable.exec(Ce);if(Se){var ke={type:"table",header:X(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(` `):[],raw:Se[0]};if(ke.header.length===ke.align.length){var Ne=ke.align.length,et;for(et=0;et ?/gm,"");return{type:"blockquote",raw:Se[0],text:ke}}},Le.list=function(Ce){var Se=this.rules.block.list.exec(Ce);if(Se){for(var ke=Se[0],Ne=Se[2],et=Ne.length>1,$e=Ne[Ne.length-1]===")",bt={type:"list",raw:ke,ordered:et,start:et?+Ne.slice(0,-1):"",loose:!1,items:[]},gt=Se[0].match(this.rules.block.item),Ut=!1,Nt,hr,mr,St,Yr,Jr,Hr,un=gt.length,Ar=0;Ar1||this.options.smartLists&&mr!==Ne)&&(St=gt.slice(Ar+1).join(` `),bt.raw=bt.raw.substring(0,bt.raw.length-St.length),Ar=un-1)),Yr=Ut||/\n\n(?!\s*$)/.test(Nt),Ar!==un-1&&(Ut=Nt.charAt(Nt.length-1)===` `,Yr||(Yr=Ut)),Yr&&(bt.loose=!0),Jr=/^\[[ xX]\] /.test(Nt),Hr=void 0,Jr&&(Hr=Nt[1]!==" ",Nt=Nt.replace(/^\[[ xX]\] +/,"")),bt.items.push({type:"list_item",raw:ke,task:Jr,checked:Hr,loose:Yr,text:Nt});return bt}},Le.html=function(Ce){var Se=this.rules.block.html.exec(Ce);if(Se)return{type:this.options.sanitize?"paragraph":"html",raw:Se[0],pre:!this.options.sanitizer&&(Se[1]==="pre"||Se[1]==="script"||Se[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):ne(Se[0]):Se[0]}},Le.def=function(Ce){var Se=this.rules.block.def.exec(Ce);if(Se){Se[3]&&(Se[3]=Se[3].substring(1,Se[3].length-1));var ke=Se[1].toLowerCase().replace(/\s+/g," ");return{tag:ke,raw:Se[0],href:Se[2],title:Se[3]}}},Le.table=function(Ce){var Se=this.rules.block.table.exec(Ce);if(Se){var ke={type:"table",header:X(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(` `):[]};if(ke.header.length===ke.align.length){ke.raw=Se[0];var Ne=ke.align.length,et;for(et=0;et/i.test(Ne[0])&&(Se=!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:Se,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):ne(Ne[0]):Ne[0]}},Le.link=function(Ce){var Se=this.rules.inline.link.exec(Ce);if(Se){var ke=fe(Se[2],"()");if(ke>-1){var Ne=Se[0].indexOf("!")===0?5:4,et=Ne+Se[1].length+ke;Se[2]=Se[2].substring(0,ke),Se[0]=Se[0].substring(0,et).trim(),Se[3]=""}var $e=Se[2],bt="";if(this.options.pedantic){var gt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec($e);gt?($e=gt[1],bt=gt[3]):bt=""}else bt=Se[3]?Se[3].slice(1,-1):"";$e=$e.trim().replace(/^<([\s\S]*)>$/,"$1");var Ut=me(Se,{href:$e&&$e.replace(this.rules.inline._escapes,"$1"),title:bt&&bt.replace(this.rules.inline._escapes,"$1")},Se[0]);return Ut}},Le.reflink=function(Ce,Se){var ke;if((ke=this.rules.inline.reflink.exec(Ce))||(ke=this.rules.inline.nolink.exec(Ce))){var Ne=(ke[2]||ke[1]).replace(/\s+/g," ");if(Ne=Se[Ne.toLowerCase()],!Ne||!Ne.href){var et=ke[0].charAt(0);return{type:"text",raw:et,text:et}}var $e=me(ke,Ne,ke[0]);return $e}},Le.strong=function(Ce,Se,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.strong.start.exec(Ce);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Se=Se.slice(-1*Ce.length);var et=Ne[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;et.lastIndex=0;for(var $e;(Ne=et.exec(Se))!=null;)if($e=this.rules.inline.strong.middle.exec(Se.slice(0,Ne.index+3)),$e)return{type:"strong",raw:Ce.slice(0,$e[0].length),text:Ce.slice(2,$e[0].length-2)}}},Le.em=function(Ce,Se,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.em.start.exec(Ce);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Se=Se.slice(-1*Ce.length);var et=Ne[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;et.lastIndex=0;for(var $e;(Ne=et.exec(Se))!=null;)if($e=this.rules.inline.em.middle.exec(Se.slice(0,Ne.index+2)),$e)return{type:"em",raw:Ce.slice(0,$e[0].length),text:Ce.slice(1,$e[0].length-1)}}},Le.codespan=function(Ce){var Se=this.rules.inline.code.exec(Ce);if(Se){var ke=Se[2].replace(/\n/g," "),Ne=/[^ ]/.test(ke),et=ke.startsWith(" ")&&ke.endsWith(" ");return Ne&&et&&(ke=ke.substring(1,ke.length-1)),ke=ne(ke,!0),{type:"codespan",raw:Se[0],text:ke}}},Le.br=function(Ce){var Se=this.rules.inline.br.exec(Ce);if(Se)return{type:"br",raw:Se[0]}},Le.del=function(Ce){var Se=this.rules.inline.del.exec(Ce);if(Se)return{type:"del",raw:Se[0],text:Se[1]}},Le.autolink=function(Ce,Se){var ke=this.rules.inline.autolink.exec(Ce);if(ke){var Ne,et;return ke[2]==="@"?(Ne=ne(this.options.mangle?Se(ke[1]):ke[1]),et="mailto:"+Ne):(Ne=ne(ke[1]),et=Ne),{type:"link",raw:ke[0],text:Ne,href:et,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Le.url=function(Ce,Se){var ke;if(ke=this.rules.inline.url.exec(Ce)){var Ne,et;if(ke[2]==="@")Ne=ne(this.options.mangle?Se(ke[0]):ke[0]),et="mailto:"+Ne;else{var $e;do $e=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while($e!==ke[0]);Ne=ne(ke[0]),ke[1]==="www."?et="http://"+Ne:et=Ne}return{type:"link",raw:ke[0],text:Ne,href:et,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Le.inlineText=function(Ce,Se,ke){var Ne=this.rules.inline.text.exec(Ce);if(Ne){var et;return Se?et=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):ne(Ne[0]):Ne[0]:et=ne(this.options.smartypants?ke(Ne[0]):Ne[0]),{type:"text",raw:Ne[0],text:et}}},Ue}(),ye=K.noopTest,Oe=K.edit,xe=K.merge,ue={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:ye,table:ye,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ue._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ue._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ue.def=Oe(ue.def).replace("label",ue._label).replace("title",ue._title).getRegex(),ue.bullet=/(?:[*+-]|\d{1,9}[.)])/,ue.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ue.item=Oe(ue.item,"gm").replace(/bull/g,ue.bullet).getRegex(),ue.list=Oe(ue.list).replace(/bull/g,ue.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ue.def.source+")").getRegex(),ue._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",ue._comment=//,ue.html=Oe(ue.html,"i").replace("comment",ue._comment).replace("tag",ue._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ue.paragraph=Oe(ue._paragraph).replace("hr",ue.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",ue._tag).getRegex(),ue.blockquote=Oe(ue.blockquote).replace("paragraph",ue.paragraph).getRegex(),ue.normal=xe({},ue),ue.gfm=xe({},ue.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*|$)"}),ue.gfm.nptable=Oe(ue.gfm.nptable).replace("hr",ue.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",ue._tag).getRegex(),ue.gfm.table=Oe(ue.gfm.table).replace("hr",ue.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",ue._tag).getRegex(),ue.pedantic=xe({},ue.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ue._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:ye,paragraph:Oe(ue.normal._paragraph).replace("hr",ue.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",ue.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var le={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ye,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:ye,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",le.punctuation=Oe(le.punctuation).replace(/punctuation/g,le._punctuation).getRegex(),le._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",le._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",le.em.start=Oe(le.em.start).replace(/punctuation/g,le._punctuation).getRegex(),le.em.middle=Oe(le.em.middle).replace(/punctuation/g,le._punctuation).replace(/overlapSkip/g,le._overlapSkip).getRegex(),le.em.endAst=Oe(le.em.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.em.endUnd=Oe(le.em.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.start=Oe(le.strong.start).replace(/punctuation/g,le._punctuation).getRegex(),le.strong.middle=Oe(le.strong.middle).replace(/punctuation/g,le._punctuation).replace(/blockSkip/g,le._blockSkip).getRegex(),le.strong.endAst=Oe(le.strong.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.endUnd=Oe(le.strong.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.blockSkip=Oe(le._blockSkip,"g").getRegex(),le.overlapSkip=Oe(le._overlapSkip,"g").getRegex(),le._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,le._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,le._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])?)+(?![-_])/,le.autolink=Oe(le.autolink).replace("scheme",le._scheme).replace("email",le._email).getRegex(),le._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,le.tag=Oe(le.tag).replace("comment",ue._comment).replace("attribute",le._attribute).getRegex(),le._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,le._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,le._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,le.link=Oe(le.link).replace("label",le._label).replace("href",le._href).replace("title",le._title).getRegex(),le.reflink=Oe(le.reflink).replace("label",le._label).getRegex(),le.reflinkSearch=Oe(le.reflinkSearch,"g").replace("reflink",le.reflink).replace("nolink",le.nolink).getRegex(),le.normal=xe({},le),le.pedantic=xe({},le.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",le._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",le._label).getRegex()}),le.gfm=xe({},le.normal,{escape:Oe(le.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(Ce="x"+Ce.toString(16)),Le+="&#"+Ce+";";return Le}var Q=function(){function Ue(Ie){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ie||pe,this.options.tokenizer=this.options.tokenizer||new De,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ce={block:ee.normal,inline:te.normal};this.options.pedantic?(Ce.block=ee.pedantic,Ce.inline=te.pedantic):this.options.gfm&&(Ce.block=ee.gfm,this.options.breaks?Ce.inline=te.breaks:Ce.inline=te.gfm),this.tokenizer.rules=Ce}Ue.lex=function(Ce,Se){var ke=new Ue(Se);return ke.lex(Ce)};var Le=Ue.prototype;return Le.lex=function(Ce){return Ce=Ce.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(Ce,this.tokens,!0),this.inline(this.tokens),this.tokens},Le.blockTokens=function(Ce,Se,ke){Se===void 0&&(Se=[]),ke===void 0&&(ke=!0),Ce=Ce.replace(/^ +$/gm,"");for(var Ne,et,$e,bt;Ce;){if(Ne=this.tokenizer.space(Ce)){Ce=Ce.substring(Ne.raw.length),Ne.type&&Se.push(Ne);continue}if(Ne=this.tokenizer.code(Ce,Se)){Ce=Ce.substring(Ne.raw.length),Ne.type?Se.push(Ne):(bt=Se[Se.length-1],bt.raw+=` `+Ne.raw,bt.text+=` `+Ne.text);continue}if(Ne=this.tokenizer.fences(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.heading(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.nptable(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.hr(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.blockquote(Ce)){Ce=Ce.substring(Ne.raw.length),Ne.tokens=this.blockTokens(Ne.text,[],ke),Se.push(Ne);continue}if(Ne=this.tokenizer.list(Ce)){for(Ce=Ce.substring(Ne.raw.length),$e=Ne.items.length,et=0;et<$e;et++)Ne.items[et].tokens=this.blockTokens(Ne.items[et].text,[],!1);Se.push(Ne);continue}if(Ne=this.tokenizer.html(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(ke&&(Ne=this.tokenizer.def(Ce))){Ce=Ce.substring(Ne.raw.length),this.tokens.links[Ne.tag]||(this.tokens.links[Ne.tag]={href:Ne.href,title:Ne.title});continue}if(Ne=this.tokenizer.table(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.lheading(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(ke&&(Ne=this.tokenizer.paragraph(Ce))){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.text(Ce,Se)){Ce=Ce.substring(Ne.raw.length),Ne.type?Se.push(Ne):(bt=Se[Se.length-1],bt.raw+=` `+Ne.raw,bt.text+=` `+Ne.text);continue}if(Ce){var gt="Infinite loop on byte: "+Ce.charCodeAt(0);if(this.options.silent){console.error(gt);break}else throw new Error(gt)}}return Se},Le.inline=function(Ce){var Se,ke,Ne,et,$e,bt,gt=Ce.length;for(Se=0;Se0)for(;(gt=this.tokenizer.rules.inline.reflinkSearch.exec(bt))!=null;)Ut.includes(gt[0].slice(gt[0].lastIndexOf("[")+1,-1))&&(bt=bt.slice(0,gt.index)+"["+"a".repeat(gt[0].length-2)+"]"+bt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(gt=this.tokenizer.rules.inline.blockSkip.exec(bt))!=null;)bt=bt.slice(0,gt.index)+"["+"a".repeat(gt[0].length-2)+"]"+bt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Ce;){if($e=this.tokenizer.escape(Ce)){Ce=Ce.substring($e.raw.length),Se.push($e);continue}if($e=this.tokenizer.tag(Ce,ke,Ne)){Ce=Ce.substring($e.raw.length),ke=$e.inLink,Ne=$e.inRawBlock,Se.push($e);continue}if($e=this.tokenizer.link(Ce)){Ce=Ce.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,Ne)),Se.push($e);continue}if($e=this.tokenizer.reflink(Ce,this.tokens.links)){Ce=Ce.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,Ne)),Se.push($e);continue}if($e=this.tokenizer.strong(Ce,bt,et)){Ce=Ce.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],ke,Ne),Se.push($e);continue}if($e=this.tokenizer.em(Ce,bt,et)){Ce=Ce.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],ke,Ne),Se.push($e);continue}if($e=this.tokenizer.codespan(Ce)){Ce=Ce.substring($e.raw.length),Se.push($e);continue}if($e=this.tokenizer.br(Ce)){Ce=Ce.substring($e.raw.length),Se.push($e);continue}if($e=this.tokenizer.del(Ce)){Ce=Ce.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],ke,Ne),Se.push($e);continue}if($e=this.tokenizer.autolink(Ce,q)){Ce=Ce.substring($e.raw.length),Se.push($e);continue}if(!ke&&($e=this.tokenizer.url(Ce,q))){Ce=Ce.substring($e.raw.length),Se.push($e);continue}if($e=this.tokenizer.inlineText(Ce,Ne,ce)){Ce=Ce.substring($e.raw.length),et=$e.raw.slice(-1),Se.push($e);continue}if(Ce){var Nt="Infinite loop on byte: "+Ce.charCodeAt(0);if(this.options.silent){console.error(Nt);break}else throw new Error(Nt)}}return Se},g(Ue,null,[{key:"rules",get:function(){return{block:ee,inline:te}}}]),Ue}(),V=S.defaults,Z=K.cleanUrl,be=K.escape,ge=function(){function Ue(Ie){this.options=Ie||V}var Le=Ue.prototype;return Le.code=function(Ce,Se,ke){var Ne=(Se||"").match(/\S*/)[0];if(this.options.highlight){var et=this.options.highlight(Ce,Ne);et!=null&&et!==Ce&&(ke=!0,Ce=et)}return Ne?'
    '+(ke?Ce:be(Ce,!0))+`
    `:"
    "+(ke?Ce:be(Ce,!0))+`
    `},Le.blockquote=function(Ce){return`
    `+Ce+`
    `},Le.html=function(Ce){return Ce},Le.heading=function(Ce,Se,ke,Ne){return this.options.headerIds?"'+Ce+" `:""+Ce+" `},Le.hr=function(){return this.options.xhtml?`
    `:`
    `},Le.list=function(Ce,Se,ke){var Ne=Se?"ol":"ul",et=Se&&ke!==1?' start="'+ke+'"':"";return"<"+Ne+et+`> `+Ce+" `},Le.listitem=function(Ce){return"
  • "+Ce+`
  • `},Le.checkbox=function(Ce){return" "},Le.paragraph=function(Ce){return"

    "+Ce+`

    `},Le.table=function(Ce,Se){return Se&&(Se=""+Se+""),` `+Ce+` `+Se+`
    `},Le.tablerow=function(Ce){return` `+Ce+` `},Le.tablecell=function(Ce,Se){var ke=Se.header?"th":"td",Ne=Se.align?"<"+ke+' align="'+Se.align+'">':"<"+ke+">";return Ne+Ce+" `},Le.strong=function(Ce){return""+Ce+""},Le.em=function(Ce){return""+Ce+""},Le.codespan=function(Ce){return""+Ce+""},Le.br=function(){return this.options.xhtml?"
    ":"
    "},Le.del=function(Ce){return""+Ce+""},Le.link=function(Ce,Se,ke){if(Ce=Z(this.options.sanitize,this.options.baseUrl,Ce),Ce===null)return ke;var Ne='",Ne},Le.image=function(Ce,Se,ke){if(Ce=Z(this.options.sanitize,this.options.baseUrl,Ce),Ce===null)return ke;var Ne=''+ke+'":">",Ne},Le.text=function(Ce){return Ce},Ue}(),Te=function(){function Ue(){}var Le=Ue.prototype;return Le.strong=function(Ce){return Ce},Le.em=function(Ce){return Ce},Le.codespan=function(Ce){return Ce},Le.del=function(Ce){return Ce},Le.html=function(Ce){return Ce},Le.text=function(Ce){return Ce},Le.link=function(Ce,Se,ke){return""+ke},Le.image=function(Ce,Se,ke){return""+ke},Le.br=function(){return""},Ue}(),Je=function(){function Ue(){this.seen={}}var Le=Ue.prototype;return Le.slug=function(Ce){var Se=Ce.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Se)){var ke=Se;do this.seen[ke]++,Se=ke+"-"+this.seen[ke];while(this.seen.hasOwnProperty(Se))}return this.seen[Se]=0,Se},Ue}(),rt=S.defaults,nt=K.unescape,at=function(){function Ue(Ie){this.options=Ie||rt,this.options.renderer=this.options.renderer||new ge,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new Je}Ue.parse=function(Ce,Se){var ke=new Ue(Se);return ke.parse(Ce)};var Le=Ue.prototype;return Le.parse=function(Ce,Se){Se===void 0&&(Se=!0);var ke="",Ne,et,$e,bt,gt,Ut,Nt,hr,mr,St,Yr,Jr,Hr,un,Ar,vn,mn,Kt,or=Ce.length;for(Ne=0;Ne0&&Ar.tokens[0].type==="text"?(Ar.tokens[0].text=Kt+" "+Ar.tokens[0].text,Ar.tokens[0].tokens&&Ar.tokens[0].tokens.length>0&&Ar.tokens[0].tokens[0].type==="text"&&(Ar.tokens[0].tokens[0].text=Kt+" "+Ar.tokens[0].tokens[0].text)):Ar.tokens.unshift({type:"text",text:Kt}):un+=Kt),un+=this.parse(Ar.tokens,Hr),mr+=this.renderer.listitem(un,mn,vn);ke+=this.renderer.list(mr,Yr,Jr);continue}case"html":{ke+=this.renderer.html(St.text);continue}case"paragraph":{ke+=this.renderer.paragraph(this.parseInline(St.tokens));continue}case"text":{for(mr=St.tokens?this.parseInline(St.tokens):St.text;Ne+1An error occurred:

    "+He($e.message+"",!0)+"
    ";throw $e}}Qe.options=Qe.setOptions=function(Ue){return ct(Qe.defaults,Ue),tt(Qe.defaults),Qe},Qe.getDefaults=Re,Qe.defaults=ft,Qe.use=function(Ue){var Le=ct({},Ue);if(Ue.renderer&&function(){var Ce=Qe.defaults.renderer||new ge,Se=function(et){var $e=Ce[et];Ce[et]=function(){for(var bt=arguments.length,gt=new Array(bt),Ut=0;Ut>>24)&16711935|(n[u]<<24|n[u]>>>8)&4278255360;var o=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],h=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 u=0;u<4;u++)l.call(this);for(var u=0;u<8;u++)h[u]^=o[u+4&7];if(c){var m=c.words,s=m[0],r=m[1],a=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,t=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,w=a>>>16|t&4294901760,E=t<<16|a&65535;h[0]^=a,h[1]^=w,h[2]^=t,h[3]^=E,h[4]^=a,h[5]^=w,h[6]^=t,h[7]^=E;for(var u=0;u<4;u++)l.call(this)}},_doProcessBlock:function(n,c){var u=this._X;l.call(this),v[0]=u[0]^u[5]>>>16^u[3]<<16,v[1]=u[2]^u[7]>>>16^u[5]<<16,v[2]=u[4]^u[1]>>>16^u[7]<<16,v[3]=u[6]^u[3]>>>16^u[1]<<16;for(var o=0;o<4;o++)v[o]=(v[o]<<8|v[o]>>>24)&16711935|(v[o]<<24|v[o]>>>8)&4278255360,n[c+o]^=v[o]},blockSize:128/32,ivSize:64/32});function l(){for(var n=this._X,c=this._C,u=0;u<8;u++)S[u]=c[u];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 u=0;u<8;u++){var o=n[u]+c[u],h=o&65535,m=o>>>16,s=((h*h>>>17)+h*m>>>15)+m*m,r=((o&4294901760)*o|0)+((o&65535)*o|0);b[u]=s^r}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=P._createHelper(d)}(),L.Rabbit})},ELLl:function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},T=L.Pos;L.defineOption("autoCloseBrackets",!1,function(h,m,s){s&&s!=L.Init&&(h.removeKeyMap(p),h.state.closeBrackets=null),m&&(v(P(m,"pairs")),h.state.closeBrackets=m,h.addKeyMap(p))});function P(h,m){return m=="pairs"&&typeof h=="string"?h:typeof h=="object"&&h[m]!=null?h[m]:g[m]}var p={Backspace:d,Enter:l};function v(h){for(var m=0;m=0;a--){var w=r[a].head;h.replaceRange("",T(w.line,w.ch-1),T(w.line,w.ch+1),"+delete")}}function l(h){var m=b(h),s=m&&P(m,"explode");if(!s||h.getOption("disableInput"))return L.Pass;for(var r=h.listSelections(),a=0;a0;return{anchor:new T(h.anchor.line,h.anchor.ch+(m?-1:1)),head:new T(h.head.line,h.head.ch+(m?1:-1))}}function c(h,m){var s=b(h);if(!s||h.getOption("disableInput"))return L.Pass;var r=P(s,"pairs"),a=r.indexOf(m);if(a==-1)return L.Pass;for(var t=P(s,"closeBefore"),w=P(s,"triples"),E=r.charAt(a+1)==m,f=h.listSelections(),k=a%2==0,O,C=0;C=0&&h.getRange(y,T(y.line,y.ch+3))==m+m+m?_="skipThree":_="skip";else if(E&&y.ch>1&&w.indexOf(m)>=0&&h.getRange(T(y.line,y.ch-2),y)==m+m){if(y.ch>2&&/\bstring/.test(h.getTokenTypeAt(T(y.line,y.ch-2))))return L.Pass;_="addFour"}else if(E){var I=y.ch==0?" ":h.getRange(T(y.line,y.ch-1),y);if(!L.isWordChar(M)&&I!=m&&!L.isWordChar(I))_="both";else return L.Pass}else if(k&&(M.length===0||/\s/.test(M)||t.indexOf(M)>-1))_="both";else return L.Pass;if(!O)O=_;else if(O!=_)return L.Pass}var N=a%2?r.charAt(a-1):m,G=a%2?m:r.charAt(a+1);h.operation(function(){if(O=="skip")h.execCommand("goCharRight");else if(O=="skipThree")for(var H=0;H<3;H++)h.execCommand("goCharRight");else if(O=="surround"){for(var B=h.getSelections(),H=0;H>>24)&16711935|(O<<24|O>>>8)&4278255360}var C=this._hash.words,x=c.words,y=u.words,_=b.words,M=d.words,I=l.words,N=n.words,G,H,B,K,U,W,X,ne,fe,me;W=G=C[0],X=H=C[1],ne=B=C[2],fe=K=C[3],me=U=C[4];for(var Ae,f=0;f<80;f+=1)Ae=G+w[E+_[f]]|0,f<16?Ae+=h(H,B,K)+x[0]:f<32?Ae+=m(H,B,K)+x[1]:f<48?Ae+=s(H,B,K)+x[2]:f<64?Ae+=r(H,B,K)+x[3]:Ae+=a(H,B,K)+x[4],Ae=Ae|0,Ae=t(Ae,I[f]),Ae=Ae+U|0,G=U,U=K,K=t(B,10),B=H,H=Ae,Ae=W+w[E+M[f]]|0,f<16?Ae+=a(X,ne,fe)+y[0]:f<32?Ae+=r(X,ne,fe)+y[1]:f<48?Ae+=s(X,ne,fe)+y[2]:f<64?Ae+=m(X,ne,fe)+y[3]:Ae+=h(X,ne,fe)+y[4],Ae=Ae|0,Ae=t(Ae,N[f]),Ae=Ae+me|0,W=me,me=fe,fe=t(ne,10),ne=X,X=Ae;Ae=C[1]+B+fe|0,C[1]=C[2]+K+me|0,C[2]=C[3]+U+W|0,C[3]=C[4]+G+X|0,C[4]=C[0]+H+ne|0,C[0]=Ae},_doFinalize:function(){var w=this._data,E=w.words,f=this._nDataBytes*8,k=w.sigBytes*8;E[k>>>5]|=128<<24-k%32,E[(k+64>>>9<<4)+14]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,w.sigBytes=(E.length+1)*4,this._process();for(var O=this._hash,C=O.words,x=0;x<5;x++){var y=C[x];C[x]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}return O},clone:function(){var w=v.clone.call(this);return w._hash=this._hash.clone(),w}});function h(w,E,f){return w^E^f}function m(w,E,f){return w&E|~w&f}function s(w,E,f){return(w|~E)^f}function r(w,E,f){return w&f|E&~f}function a(w,E,f){return w^(E|~f)}function t(w,E){return w<>>32-E}T.RIPEMD160=v._createHelper(o),T.HmacRIPEMD160=v._createHmacHelper(o)}(Math),L.RIPEMD160})},ETIr:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=g.enc,v=p.Base64={stringify:function(b){var d=b.words,l=b.sigBytes,n=this._map;b.clamp();for(var c=[],u=0;u>>2]>>>24-u%4*8&255,h=d[u+1>>>2]>>>24-(u+1)%4*8&255,m=d[u+2>>>2]>>>24-(u+2)%4*8&255,s=o<<16|h<<8|m,r=0;r<4&&u+r*.75>>6*(3-r)&63));var a=n.charAt(64);if(a)for(;c.length%4;)c.push(a);return c.join("")},parse:function(b){var d=b.length,l=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var c=0;c>>6-u%4*2,m=o|h;n[c>>>2]|=m<<24-c%4*8,c++}return P.create(n,c)}}(),L.enc.Base64})},"F+F2":function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(){if(typeof ArrayBuffer!="function")return;var g=L,T=g.lib,P=T.WordArray,p=P.init,v=P.init=function(S){if(S instanceof ArrayBuffer&&(S=new Uint8Array(S)),(S instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array)&&(S=new Uint8Array(S.buffer,S.byteOffset,S.byteLength)),S instanceof Uint8Array){for(var b=S.byteLength,d=[],l=0;l>>2]|=S[l]<<24-l%4*8;p.call(this,d,b)}else p.apply(this,arguments)};v.prototype=P}(),L.lib.WordArray})},GRO8:function(j,Y,D){"use strict";D.r(Y);var L=D("k1fw"),g=D("2qtc"),T=D("kLXV"),P=D("lUTK"),p=D("BvKs"),v=D("+L6B"),S=D("2/Rp"),b=D("T2oS"),d=D("W9HT"),l=D("sPJy"),n=D("bE4q"),c=D("miYZ"),u=D("tsqr"),o=D("9og8"),h=D("tJVT"),m=D("PpiC"),s=D("WmNS"),r=D.n(s),a=D("q1tI"),t=D.n(a),w=D("Ty5D"),E=D("55Ip"),f=D("9kvl"),k=D("KeDT"),O=D.n(k),C=D("zrhs"),x=D("DZo9"),y=D("8z0m"),_=D("LtfV"),M=D("KhGG"),I=y.a.Dragger,N=function(it){var mt=it.user,Ct=it.dispatch,It=it.classroomList,Pt=it.shixunsDetail,Ht=it.getResults,Wt=Object(w.i)(),dt=Object(a.useState)(),At=Object(h.a)(dt,2),Dt=At[0],yr=At[1],tr=Object(a.useState)([]),qt=Object(h.a)(tr,2),Gt=qt[0],nr=qt[1],cr=Object(a.useState)(!1),st=Object(h.a)(cr,2),Lr=st[0],Fr=st[1],Cr={onRemove:function(){nr([])},beforeUpload:function(Et){if(console.log(Et),(Et==null?void 0:Et.size)>1024*1024*500)return u.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var _t=[];return _t.push(Et),nr([].concat(_t)),!1},fileList:Gt};return t.a.createElement(T.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Pt.actionTabs.key==="md-tab",confirmLoading:Lr,onOk:Object(o.a)(r.a.mark(function rr(){var Et,_t,xt;return r.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:if(!((Gt==null?void 0:Gt.length)<=0)){pr.next=3;break}return u.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),pr.abrupt("return");case 3:return Fr(!0),pr.next=6,Object(M.c)(Gt[0],{login:(Et=mt.userInfo)===null||Et===void 0?void 0:Et.login,container_type:"Competition",container_id:Pt.actionTabs.params.id,stage_type:Pt.actionTabs.params.value,file_name:(_t=Gt[0])===null||_t===void 0?void 0:_t.name});case 6:xt=pr.sent,(xt==null?void 0:xt.status)===0?(u.b.info("\u63D0\u4EA4\u6210\u529F"),Ct({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Fr(!1),nr([]),Ht(Pt.actionTabs.params.value)):(Fr(!1),u.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return pr.stop()}},rr)})),onCancel:function(){nr([]),Ct({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(I,Cr,t.a.createElement("p",{className:"ant-upload-drag-icon"},t.a.createElement(_.a,null)),t.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},G=Object(f.a)(function(Tt){var it=Tt.user,mt=Tt.classroomList,Ct=Tt.shixunsDetail;return{user:it,classroomList:mt,shixunsDetail:Ct}})(N),H=D("14J3"),B=D("BMrR"),K=D("5NDa"),U=D("5rEg"),W=D("9Bee"),X=D("m3rI"),ne=D("ErOA"),fe=D("NLgs"),me=D("fV52"),Ae=D("3I+P"),De=D("OaEy"),ye=D("2fM7"),Oe=D("5bA4"),xe=D("UESt"),ue=ye.a.Option;function le(Tt){var it=Tt.rewarddata,mt=Tt.getlistdatas,Ct=Tt.is_signed,It=Tt.dispatch,Pt=Tt.userlist,Ht=Object(a.useRef)(null),Wt=Object(a.useState)(!1),dt=Object(h.a)(Wt,2),At=dt[0],Dt=dt[1],yr=Object(a.useState)(void 0),tr=Object(h.a)(yr,2),qt=tr[0],Gt=tr[1],nr=Object(a.useState)(""),cr=Object(h.a)(nr,2),st=cr[0],Lr=cr[1],Fr=Object(a.useState)(void 0),Cr=Object(h.a)(Fr,2),rr=Cr[0],Et=Cr[1],_t=Object(a.useState)(void 0),xt=Object(h.a)(_t,2),Jt=xt[0],pr=xt[1],dr=Object(a.useState)(void 0),fr=Object(h.a)(dr,2),Dr=fr[0],an=fr[1];function qe(xr){return sr.apply(this,arguments)}function sr(){return sr=Object(o.a)(r.a.mark(function xr(br){var Pr;return r.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(!br.user_received){Zt.next=3;break}return window.open(br.click_info),Zt.abrupt("return");case 3:if(Object(fe.f)(It)){Zt.next=5;break}return Zt.abrupt("return");case 5:if(!(Ct===!1)){Zt.next=8;break}return u.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Zt.abrupt("return");case 8:if(!(br.click_event==="Pop")){Zt.next=14;break}return Lr(br.id),Dt(!0),Zt.abrupt("return");case 14:Gt(void 0);case 15:return Zt.next=17,It({type:"competitions/Reward",payload:{competition_module_setting_id:br.id}});case 17:Pr=Zt.sent,Pr&&Pr.status===0&&(mt(),br.click_event==="Link"?(u.b.info("\u9886\u53D6\u6210\u529F"),window.open(br.click_info)):u.b.info(br.click_info));case 19:case"end":return Zt.stop()}},xr)})),sr.apply(this,arguments)}function Nr(){return rn.apply(this,arguments)}function rn(){return rn=Object(o.a)(r.a.mark(function xr(){var br;return r.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(Pt&&!Pt.real_name)){Ft.next=4;break}if(rr){Ft.next=4;break}return u.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 4:if(!(Pt&&!Pt.email)){Ft.next=8;break}if(Jt){Ft.next=8;break}return u.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 8:if(!(Pt&&!Pt.phone)){Ft.next=12;break}if(Dr){Ft.next=12;break}return u.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 12:if(qt){Ft.next=15;break}return u.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Ft.abrupt("return");case 15:return Ft.next=17,It({type:"competitions/Reward",payload:{competition_module_setting_id:st,className:qt,name:rr,mail:Jt,phone:Dr}});case 17:br=Ft.sent,br&&br.status===0&&(Dt(!1),mt(),u.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()}},xr)})),rn.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(T.a,{visible:At,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return Dt(!1)},onOk:function(){Nr()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(U.a,{className:Pt&&Pt.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Pt&&Pt.phone?"":"#ffffff!important"},value:Pt&&Pt.real_name||rr,disabled:Pt&&Pt.real_name||!1,onChange:function(br){return Et(br.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(U.a,{className:Pt&&Pt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Pt&&Pt.phone?"":"#ffffff!important"},value:Pt&&Pt.email||Jt,disabled:Pt&&Pt.email||!1,onChange:function(br){return pr(br.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(U.a,{style:{width:"300px"},className:Pt&&Pt.phone?"":"bkfff",value:Pt&&Pt.phone||Dr,disabled:Pt&&Pt.phone||!1,onChange:function(br){return an(br.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(ye.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(br){Gt(br)}},t.a.createElement(ue,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ue,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ue,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ue,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ue,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ue,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ue,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ue,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ue,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ue,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ue,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ue,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ue,{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")),it&&it.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:O.a.spanprev,onClick:function(){Ht.current.prev()}},t.a.createElement(Oe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(Ae.a,{ref:Ht,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},it&&it.map(function(xr,br){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:X.a.IMG_SERVER+"/".concat(xr.image_url)}),xr.user_received===!1||xr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return qe(xr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),t.a.createElement("span",{className:O.a.spannext,onClick:function(){Ht.current.next()}},t.a.createElement(xe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},it&&it.map(function(xr,br){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:X.a.IMG_SERVER+"/".concat(xr.image_url)}),xr.user_received===!1||xr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return qe(xr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var re=le,pe=function(it,mt){var Ct=it.StaffDetail,It=it.HeaderDetail,Pt=it.ItemData,Ht=it.setIssee,Wt=it.ModelType,dt=it.dispatch,At=it.userinfo,Dt=it.Editable,yr=Object(a.useState)(!1),tr=Object(h.a)(yr,2),qt=tr[0],Gt=tr[1],nr=Object(a.useState)([]),cr=Object(h.a)(nr,2),st=cr[0],Lr=cr[1],Fr=Object(a.useState)(""),Cr=Object(h.a)(Fr,2),rr=Cr[0],Et=Cr[1],_t=Object(a.useState)(""),xt=Object(h.a)(_t,2),Jt=xt[0],pr=xt[1],dr=Object(a.useState)(!1),fr=Object(h.a)(dr,2),Dr=fr[0],an=fr[1],qe=Object(w.i)(),sr=qe.identifier,Nr=Object(a.useRef)(null),rn=Object(a.useRef)(null);Nr.current=Ct==null?void 0:Ct.enrolled,Object(a.useEffect)(function(){var Ft;return(Ft=rn.current)===null||Ft===void 0||Ft.addEventListener("click",xr),function(){var Zt;(Zt=rn.current)===null||Zt===void 0||Zt.removeEventListener("click",xr)}},[]);var xr=function(Zt){var wr;if((Zt==null||((wr=Zt.target)===null||wr===void 0)?void 0:wr.id)==="modal-upload"){if(!Object(fe.e)(dt))return;if(!Nr.current){T.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}Gt(!0)}};Object(a.useEffect)(function(){if(It!=null&&It.upload_file){var Ft,Zt,wr;Lr([{name:It==null||((Ft=It.upload_file)===null||Ft===void 0)?void 0:Ft.title,status:"done",uid:"123456789"}]),pr(It==null?void 0:It.upload_file_url),Et(It==null||((Zt=It.upload_file)===null||Zt===void 0||((wr=Zt.url)===null||wr===void 0))?void 0:wr.split("/")[3])}},[It==null?void 0:It.upload_file]);var br={name:"file",multiple:!1,withCredentials:!0,action:X.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:st,onChange:function(Zt){var wr=Zt.file.status,er=[Object(L.a)({},Zt.file)];if(Lr(er),Zt.file.status==="uploading"&&an(!0),wr==="done"){var vt,yt;Et((vt=er[0])===null||vt===void 0||((yt=vt.response)===null||yt===void 0)?void 0:yt.id),an(!1)}wr==="error"&&(Lr([]),an(!1))},beforeUpload:function(Zt){var wr=Zt.size/1024/1024<1e3;return wr?Promise.resolve():(u.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Pr=function(){Gt(!0)};return Object(a.useImperativeHandle)(mt,function(){return{handleVisible:Pr}}),t.a.createElement("div",{ref:rn},Wt==="reward"?t.a.createElement(re,{userlist:At,dispatch:dt,rewarddata:Pt.reward_setting,is_signed:Pt.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((At==null?void 0:At.admin)||(At==null?void 0:At.business)||Dt)&&t.a.createElement(S.a,{onClick:function(){return Ht(!1)}},"\u7F16\u8F91")),t.a.createElement(W.a,{value:Pt.md_content}),Pt&&Pt.attachments&&Pt.attachments.map(function(Ft,Zt){return t.a.createElement("div",null,t.a.createElement("a",{href:(X.a===null||X.a===void 0?void 0:X.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(T.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:qt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Dr,onCancel:function(){return Gt(!1)},onOk:Object(o.a)(r.a.mark(function Ft(){var Zt;return r.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!(!rr&&!Jt)){er.next=3;break}return Gt(!1),er.abrupt("return");case 3:return an(!0),er.next=6,Object(ne.a)("/api/competitions/".concat(sr,"/upload_file.json"),{method:"post",body:{attachment_id:rr,upload_file_url:Jt}});case 6:Zt=er.sent,Zt.status===0&&(Gt(!1),an(!1));case 8:case"end":return er.stop()}},Ft)}))},t.a.createElement("div",null,t.a.createElement(B.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(U.a,{style:{width:416},value:Jt,onChange:function(Zt){var wr;return pr((wr=Zt.target)===null||wr===void 0?void 0:wr.value)}})),t.a.createElement(B.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(y.a,br,t.a.createElement(S.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},ee=Object(a.forwardRef)(pe),te=D("Ot1p"),ce=D("hJwl");function q(Tt){var it=Tt.ItemData,mt=Tt.setIssee,Ct=Tt.MenuItem,It=Tt.dispatch,Pt=Tt.identifier,Ht=Tt.ModelType,Wt=Tt.userinfo,dt=Tt.getrightdatas,At=Object(a.useState)([]),Dt=Object(h.a)(At,2),yr=Dt[0],tr=Dt[1],qt=Object(a.useState)(it.md_content),Gt=Object(h.a)(qt,2),nr=Gt[0],cr=Gt[1];Object(a.useEffect)(function(){var Et,_t=[];it==null||((Et=it.attachments)===null||Et===void 0)||Et.map(function(xt){var Jt={uid:xt.id,name:xt.title,response:{id:xt.id}};_t.push(Jt)}),tr(_t)},[it==null?void 0:it.attachments]);function st(){var Et,_t=[];return it==null||((Et=it.attachments)===null||Et===void 0)||Et.map(function(xt){var Jt={uid:xt==null?void 0:xt.id,name:xt.title,response:{id:xt.id}};_t.push(Jt)}),_t}var Lr={name:"file",multiple:!0,withCredentials:!0,action:X.a.API_SERVER+"/api/attachments.json",defaultFileList:st(),onRemove:function(_t){Object(ce.t)({id:_t.uid})},onChange:function(_t){var xt=_t.file.status;xt!=="uploading",xt==="removed"&&tr(_t.fileList),xt==="done"?(tr(_t.fileList),u.b.success("".concat(_t.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):xt==="error"&&u.b.error("".concat(_t.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(_t){var xt=_t.size/1024/1024<150;return xt||u.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),xt}};console.log(Lr);function Fr(){return Cr.apply(this,arguments)}function Cr(){return Cr=Object(o.a)(r.a.mark(function Et(){var _t;return r.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Jt.next=2,It({type:"competitions/updateMdContent",payload:{attachment_ids:rr(yr),competition_module_id:it.id,md_content_id:it.md_id,content:nr,identifier:Pt}});case 2:_t=Jt.sent,_t&&(u.b.info("\u63D0\u4EA4\u6210\u529F"),mt(!0),dt(Ct));case 4:case"end":return Jt.stop()}},Et)})),Cr.apply(this,arguments)}function rr(Et){var _t=[];return Et&&Et.map(function(xt){_t.push(xt.response.id)}),_t}return t.a.createElement("div",null,Ht==="reward"?t.a.createElement(re,{userlist:Wt,dispatch:It,rewarddata:it.reward_setting,is_signed:it.is_signed}):null,t.a.createElement(te.a,{defaultValue:nr,onChange:function(_t){return cr(_t)}}),t.a.createElement(y.a,Lr,t.a.createElement(S.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Fr()}},"\u63D0\u4EA4"),t.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return mt(!0)}},"\u53D6\u6D88")))}var Q=q,V=D("g9YV"),Z=D("wCAj"),be=D("Znn+"),ge=D("ZTPi");function Te(){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:X.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=Te,rt=D("5Dmo"),nt=D("3S7+"),at=D("jCWc"),ct=D("kPKH"),ht=D("IzEo"),He=D("bx4M");function Re(Tt){var it=Tt.oneItem,mt=Tt.towItem,Ct=Tt.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(B.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(ct.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.towtop},t.a.createElement("img",{style:{marginTop:"20px"},src:X.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(E.a,{to:"/users/".concat(mt==null?void 0:mt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(mt==null?void 0:mt.user_image)}),(mt==null?void 0:mt.competition_prize)&&t.a.createElement("p",{className:O.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:O.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(ct.a,{span:6},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.onetop},t.a.createElement("img",{style:{marginTop:"20px"},src:X.a.IMG_SERVER+"/images/educoder/huangguan.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(E.a,{to:"/users/".concat(it==null?void 0:it.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(it==null?void 0:it.user_image)}),(it==null?void 0:it.competition_prize)&&t.a.createElement("p",{className:O.a.prize},it==null?void 0:it.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},it==null?void 0:it.record_user_name)))),className:O.a.onediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},it==null?void 0:it.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},it==null?void 0:it.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(it==null?void 0:it.extra_score)+parseFloat(it==null?void 0:it.score),"\u5206"))),t.a.createElement(ct.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.threetop},t.a.createElement("img",{style:{marginTop:"20px"},src:X.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(E.a,{to:"/users/".concat(Ct==null?void 0:Ct.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(Ct==null?void 0:Ct.user_image)}),(Ct==null?void 0:Ct.competition_prize)&&t.a.createElement("p",{className:O.a.prize},Ct==null?void 0:Ct.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},Ct==null?void 0:Ct.record_user_name)))),className:O.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},Ct==null?void 0:Ct.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},Ct==null?void 0:Ct.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(Ct==null?void 0:Ct.extra_score)+parseFloat(Ct==null?void 0:Ct.score),"\u5206")))))}var tt=Re;function ft(Tt){var it,mt,Ct,It,Pt,Ht,Wt,dt,At,Dt,yr,tr,qt,Gt,nr,cr,st,Lr,Fr,Cr,rr,Et,_t,xt,Jt,pr,dr,fr,Dr,an,qe=Tt.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(tt,{oneItem:qe==null?void 0:qe.teams[0],towItem:qe==null?void 0:qe.teams[1],threeItem:qe==null?void 0:qe.teams[2]}),(qe==null||((it=qe.user_ranks)===null||it===void 0)?void 0:it.length)>0&&t.a.createElement("div",{className:O.a.myTeam},(qe==null||((mt=qe.user_ranks)===null||mt===void 0||((Ct=mt[0])===null||Ct===void 0))?void 0:Ct.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:(qe==null||((It=qe.user_ranks)===null||It===void 0||((Pt=It[0])===null||Pt===void 0))?void 0:Pt.success)===!1?"red":"green"}},(qe==null||((Ht=qe.user_ranks)===null||Ht===void 0||((Wt=Ht[0])===null||Wt===void 0))?void 0:Wt.success)===!1?"\u5426":qe!=null&&(dt=qe.user_ranks)!==null&&dt!==void 0&&(At=dt[0])!==null&&At!==void 0&&At.success?"\u662F":"")),(qe==null||((Dt=qe.user_ranks)===null||Dt===void 0||((yr=Dt[0])===null||yr===void 0))?void 0:yr.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(qe==null||((tr=qe.user_ranks)===null||tr===void 0||((qt=tr[0])===null||qt===void 0))?void 0:qt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(qe==null||((Gt=qe.user_ranks)===null||Gt===void 0||((nr=Gt[0])===null||nr===void 0))?void 0:nr.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",qe==null||((cr=qe.user_ranks)===null||cr===void 0||((st=cr[0])===null||st===void 0))?void 0:st.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},qe==null||((Lr=qe.user_ranks)===null||Lr===void 0||((Fr=Lr[0])===null||Fr===void 0))?void 0:Fr.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u65F6\u95F4"},qe==null||((Cr=qe.user_ranks)===null||Cr===void 0||((rr=Cr[0])===null||rr===void 0))?void 0:rr.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},qe==null||((Et=qe.user_ranks)===null||Et===void 0||((_t=Et[0])===null||_t===void 0))?void 0:_t.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},qe==null||((xt=qe.user_ranks)===null||xt===void 0||((Jt=xt[0])===null||Jt===void 0))?void 0:Jt.score)),t.a.createElement("span",null,t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(qe==null||((pr=qe.user_ranks)===null||pr===void 0||((dr=pr[0])===null||dr===void 0))?void 0:dr.extra_score)+parseFloat(qe==null||((fr=qe.user_ranks)===null||fr===void 0||((Dr=fr[0])===null||Dr===void 0))?void 0:Dr.score)||0))),qe==null||((an=qe.teams)===null||an===void 0)?void 0:an.map(function(sr,Nr){return t.a.createElement("div",{className:O.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},Nr+1),t.a.createElement(E.a,{to:"/users/".concat(sr==null?void 0:sr.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(sr==null?void 0:sr.user_image)}),(sr==null?void 0:sr.competition_prize)&&t.a.createElement("span",{className:O.a.spanrightradius},sr==null?void 0:sr.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},sr==null?void 0:sr.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},sr.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},sr.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},sr.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(sr.extra_score)+parseFloat(sr.score))))}))}var Qe=ft,lt=ge.a.TabPane;function Ue(Tt){var it,mt,Ct,It,Pt,Ht,Wt=Tt.ChartRules,dt=Tt.ItemData,At=Tt.getCharts,Dt=Tt.Selectkey,yr=Tt.getChartRules,tr=Tt.userinfo,qt=Tt.Editable,Gt=Tt.HeaderDetail,nr=Object(a.useState)(!1),cr=Object(h.a)(nr,2),st=cr[0],Lr=cr[1],Fr=Object(a.useState)(""),Cr=Object(h.a)(Fr,2),rr=Cr[0],Et=Cr[1],_t=Object(a.useState)(!0),xt=Object(h.a)(_t,2),Jt=xt[0],pr=xt[1],dr=Object(a.useState)(),fr=Object(h.a)(dr,2),Dr=fr[0],an=fr[1],qe=Object(a.useState)(),sr=Object(h.a)(qe,2),Nr=sr[0],rn=sr[1],xr=Object(w.i)(),br=xr.identifier;Object(a.useEffect)(function(){if(Jt){var wr,er=Wt==null||((wr=Wt.stages)===null||wr===void 0)?void 0:wr[0];if(an(er),er!=null&&er.id){var vt,yt,zt;((Gt==null?void 0:Gt.task)==="mAP"||(Gt==null?void 0:Gt.task)==="dog")&&At(er==null?void 0:er.id),Et(((vt=Wt.rule_contents)===null||vt===void 0||((yt=vt.filter(function(fn){return parseInt(fn.competition_stage_id)===parseInt(er==null?void 0:er.id)}))===null||yt===void 0||((zt=yt[0])===null||zt===void 0))?void 0:zt.content)||"")}else{var Mt,Mr,cn;(Gt==null?void 0:Gt.task)==="mAP"||(Gt==null?void 0:Gt.task)==="dog",Et(((Mt=Wt.rule_contents)===null||Mt===void 0||((Mr=Mt.filter(function(fn){return parseInt(fn.competition_stage_id)===0}))===null||Mr===void 0||((cn=Mr[0])===null||cn===void 0))?void 0:cn.content)||"")}}},[Wt]);function Pr(){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(o.a)(r.a.mark(function wr(){var er,vt,yt,zt,Mt,Mr,cn,fn,kr;return r.a.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:if(rr){Ur.next=3;break}return u.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Ur.abrupt("return");case 3:if(pr(!1),er=Dr==null?void 0:Dr.id,!er){Ur.next=12;break}return Ur.next=8,Object(ne.a)("/api/competitions/".concat(br,"/update_md_content.json"),{method:"post",body:{competition_module_id:Dt,content:rr,md_content_id:(vt=Wt.rule_contents)===null||vt===void 0||((yt=vt.filter(function(gn){return parseInt(gn.competition_stage_id)===parseInt(er)}))===null||yt===void 0||((zt=yt[0])===null||zt===void 0))?void 0:zt.id,stage_id:Dr==null?void 0:Dr.id}});case 8:Mt=Ur.sent,Mt.status===0&&(u.b.info("\u66F4\u65B0\u6210\u529F"),Lr(!1),yr()),Ur.next=16;break;case 12:return Ur.next=14,Object(ne.a)("/api/competitions/".concat(br,"/update_md_content.json"),{method:"post",body:{competition_module_id:Dt,content:rr,md_content_id:(Mr=Wt.rule_contents)===null||Mr===void 0||((cn=Mr.filter(function(gn){return parseInt(gn.competition_stage_id)===0}))===null||cn===void 0||((fn=cn[0])===null||fn===void 0))?void 0:fn.id,stage_id:Dr==null?void 0:Dr.id}});case 14:kr=Ur.sent,kr.status===0&&(u.b.info("\u66F4\u65B0\u6210\u529F"),Lr(!1),yr());case 16:case"end":return Ur.stop()}},wr)})),Ft.apply(this,arguments)}var Zt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(er,vt,yt){return t.a.createElement("span",null,yt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(er){return t.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(er)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(er){return t.a.createElement("span",{title:er},er&&(er==null?void 0:er.length)>=15?(er==null?void 0:er.substr(0,15))+"...":er||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(er){return t.a.createElement("span",null,er||"--")}},{title:(Gt==null?void 0:Gt.task)==="mAP"?"mAP\u6307\u6807":(Gt==null?void 0:Gt.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(er){return t.a.createElement("span",null,er||"--")}}];return t.a.createElement("div",null,(Wt==null||((it=Wt.stages)===null||it===void 0)?void 0:it.length)>0?null:t.a.createElement(Je,null),(Wt==null||((mt=Wt.stages)===null||mt===void 0)?void 0:mt.length)>0&&t.a.createElement(ge.a,{animated:!0,tabBarExtraContent:((tr==null?void 0:tr.admin)||(tr==null?void 0:tr.business)||qt)&&t.a.createElement(S.a,{onClick:function(){Lr(!0)}},"\u7F16\u8F91"),onChange:function(er){var vt,yt,zt,Mt,Mr;Lr(!1);var cn=Wt==null||((vt=Wt.stages)===null||vt===void 0)?void 0:vt.filter(function(kr){return parseInt(er)===parseInt(kr==null?void 0:kr.id)})[0];an(cn);var fn=cn==null||((yt=cn.children)===null||yt===void 0)?void 0:yt[0];rn(fn),Et(((zt=Wt.rule_contents)===null||zt===void 0||((Mt=zt.filter(function(kr){return parseInt(kr.competition_stage_id)===parseInt(cn==null?void 0:cn.id)}))===null||Mt===void 0||((Mr=Mt[0])===null||Mr===void 0))?void 0:Mr.content)||""),At((fn==null?void 0:fn.id)||er)}},Wt&&Wt.stages.map(function(wr,er){return t.a.createElement(lt,{tab:wr.name,key:wr.id===null?0:wr.id},st===!1&&Wt&&Wt.rule_contents.map(function(vt,yt){if(wr.id===vt.competition_stage_id)return t.a.createElement(W.a,{key:yt,value:vt.content===void 0||vt.content===null?"":vt.content});if(wr.id===null&&vt.competition_stage_id===0)return t.a.createElement(W.a,{key:yt,value:vt.content===void 0||vt.content===null?"":vt.content})}))})),(Dr==null||((Ct=Dr.children)===null||Ct===void 0)?void 0:Ct.length)>0&&t.a.createElement(ge.a,{activeKey:(Nr==null?void 0:Nr.id)+"",onChange:function(er){var vt,yt=Dr==null||((vt=Dr.children)===null||vt===void 0)?void 0:vt.filter(function(zt){return parseInt(er)===parseInt(zt==null?void 0:zt.id)})[0];rn(yt),At(er)}},Dr==null||((It=Dr.children)===null||It===void 0)?void 0:It.map(function(wr,er){return t.a.createElement(lt,{tab:wr.name,key:wr.id===null?0:wr.id})})),st&&t.a.createElement("div",null,t.a.createElement(te.a,{defaultValue:rr,onChange:function(er){Et(er)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Pr()}},"\u63D0\u4EA4"),t.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Lr(!1)}},"\u53D6\u6D88"))),(dt==null||((Pt=dt.teams)===null||Pt===void 0)?void 0:Pt.length)>0&&((Gt==null?void 0:Gt.task)==="mAP"||(Gt==null?void 0:Gt.task)==="dog"||(Gt==null?void 0:Gt.task)==="Jittor-3")?t.a.createElement(Z.a,{dataSource:dt==null?void 0:dt.teams,columns:Zt,pagination:!1}):(dt==null||((Ht=dt.teams)===null||Ht===void 0)?void 0:Ht.length)>0&&t.a.createElement(Qe,{ItemData:dt}))}var Le=Ue,Ie=D("/zsF"),Ce=D("PArb");function Se(Tt){var it,mt,Ct,It,Pt,Ht,Wt,dt=Tt.Prize,At=Object(w.i)(),Dt=Object(a.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"}]),yr=Object(h.a)(Dt,2),tr=yr[0],qt=yr[1],Gt=function(){var nr=Object(o.a)(r.a.mark(function cr(st){var Lr;return r.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:return Cr.next=2,Object(ce.u)({type:st.type,id:At.identifier});case 2:Lr=Cr.sent,(Lr==null?void 0:Lr.status)===0&&(location.href="/competitions/exports?id=".concat(At.identifier,"&type=").concat(st.type));case 4:case"end":return Cr.stop()}},cr)}));return function(st){return nr.apply(this,arguments)}}();return t.a.createElement("div",null,t.a.createElement("p",{className:O.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"),(dt==null||((it=dt.personal_certifications)===null||it===void 0)?void 0:it.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:X.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:X.a.API_SERVER+"".concat(dt==null||((mt=dt.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")),(dt==null||((Ct=dt.team_certifications)===null||Ct===void 0)?void 0:Ct.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:X.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:X.a.API_SERVER+"".concat(dt==null||((It=dt.team_certifications[0])===null||It===void 0)?void 0:It.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(Ce.a,null),(dt==null||((Pt=dt.teams)===null||Pt===void 0)?void 0:Pt.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(dt==null?void 0:dt.teams)&&(dt==null||((Ht=dt.teams[0])===null||Ht===void 0)?void 0:Ht.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")),(dt==null?void 0:dt.teams)&&(dt==null||((Wt=dt.teams[0])===null||Wt===void 0)?void 0:Wt.team_members.map(function(nr,cr){var st,Lr,Fr,Cr,rr,Et;return t.a.createElement("p",{className:O.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},nr==null?void 0:nr.role),t.a.createElement("span",{style:{width:"5%"}},nr==null?void 0:nr.name),t.a.createElement("span",{style:{width:"10%"}},(nr==null?void 0:nr.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(nr==null?void 0:nr.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(nr==null?void 0:nr.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(nr==null?void 0:nr.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},nr!=null&&nr.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},nr!=null&&nr.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(nr==null?void 0:nr.role)==="\u961F\u957F"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(dt==null?void 0:dt.teams)&&(dt==null||((st=dt.teams[0])===null||st===void 0||((Lr=st.bank_account)===null||Lr===void 0))?void 0:Lr.bank),(dt==null?void 0:dt.teams)&&(dt==null||((Fr=dt.teams[0])===null||Fr===void 0||((Cr=Fr.bank_account)===null||Cr===void 0))?void 0:Cr.second_bank),(dt==null?void 0:dt.teams)&&(dt==null||((rr=dt.teams[0])===null||rr===void 0||((Et=rr.bank_account)===null||Et===void 0))?void 0:Et.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(B.a,{gutter:[20,20]},tr.map(function(nr,cr){return t.a.createElement(ct.a,{key:cr},t.a.createElement(S.a,{type:"primary",onClick:function(){return Gt(nr)}},nr.name))})))}var ke=Se,Ne=D("0Owb"),et=D("7Kak"),$e=D("9yH6"),bt=D("y8nQ"),gt=D("Vl3Y"),Ut=D("1vsH"),Nt=D("Dgm7"),hr=D.n(Nt),mr=D("NnUe"),St=D.n(mr),Yr=y.a.Dragger,Jr=10,Hr=function(it){var mt=it.user,Ct=it.account,It=it.globalSetting,Pt=it.loading,Ht=it.dispatch,Wt=Object(m.a)(it,["user","account","globalSetting","loading","dispatch"]),dt=gt.a.useForm(),At=Object(h.a)(dt,1),Dt=At[0],yr=Object(a.useState)({}),tr=Object(h.a)(yr,2),qt=tr[0],Gt=tr[1],nr=Object(a.useState)(!0),cr=Object(h.a)(nr,2),st=cr[0],Lr=cr[1],Fr=Object(a.useState)(),Cr=Object(h.a)(Fr,2),rr=Cr[0],Et=Cr[1],_t=Object(a.useState)(),xt=Object(h.a)(_t,2),Jt=xt[0],pr=xt[1],dr=Object(a.useState)(),fr=Object(h.a)(dr,2),Dr=fr[0],an=fr[1],qe=Object(a.useState)(),sr=Object(h.a)(qe,2),Nr=sr[0],rn=sr[1];Object(a.useEffect)(function(){if(!Ct.basicInfo)return;var er=Ct.basicInfo,vt={name:er.show_realname?er.name:Object(Ut.E)(er.name),gender:er.gender};Et(er.name),Lr(er.show_realname),Dt.setFieldsValue(vt),Gt(vt)},[Ct.basicInfo]);var xr=function(vt){if(vt.file.status==="uploading"){rn(!0);return}if(vt.file.status==="done"){var yt;console.log(vt.file,vt.file.response),an((yt=vt.file.response)===null||yt===void 0?void 0:yt.id),Object(Ut.B)(vt.file.originFileObj,function(zt){pr(zt),rn(!1)})}},br=function(vt){Gt(Object(L.a)({},Dt.getFieldsValue())),"name"in vt&&Et(vt.name)},Pr=function(){var vt=!st;Lr(vt);var yt=vt?rr:Object(Ut.E)(rr);Dt.setFieldsValue({name:yt})},Ft=function(){var er=Object(o.a)(r.a.mark(function vt(yt){var zt,Mt,Mr,cn,fn,kr,on,Ur;return r.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:if(Mr=yt||{},cn=Mr.name,fn=Mr.gender,kr=Mr.idNumber,Jt){Vr.next=4;break}return u.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Vr.abrupt("return");case 4:return Vr.next=6,Ht({type:"account/applyRealNameAuth",payload:{id:((zt=Ct.basicInfo)===null||zt===void 0?void 0:zt.id)||((Mt=mt.userInfo)===null||Mt===void 0?void 0:Mt.login),name:cn,gender:fn,id_number:kr,show_realname:st,attachment_ids:[Dr]}});case 6:on=Vr.sent,Zt(),on&&(u.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Ht({type:"account/getBasicInfo",payload:{login:(Ur=mt.userInfo)===null||Ur===void 0?void 0:Ur.login}}));case 9:case"end":return Vr.stop()}},vt)}));return function(yt){return er.apply(this,arguments)}}(),Zt=function(){Ht({type:"account/setActionTabs",payload:{}})},wr={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(X.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:xr,beforeUpload:function(vt){var yt=vt.type==="image/jpeg"||vt.type==="image/png"||vt.type==="image/jpg"||vt.type==="image/bmp";return yt||u.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),yt}};return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Ct.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(d.a,{spinning:!!Nr},t.a.createElement(gt.a,{className:St.a.formWrap,form:Dt,layout:"horizontal",onValuesChange:br,onFinish:Ft},t.a.createElement(gt.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(Jr,"\u4E2A\u5B57\u7B26")},{validator:Ut.H}],extra:t.a.createElement("span",null,st?"\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(U.a,{disabled:!st,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Jr,"\u4E2A\u5B57\u7B26"),maxLength:Jr,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(st?"icon-xianshi":"icon-yincang"," font18 ").concat(St.a.color0152d9),onClick:Pr})})),t.a.createElement(gt.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($e.a.Group,null,t.a.createElement($e.a,{value:0},"\u7537"),t.a.createElement($e.a,{value:1},"\u5973"))),t.a.createElement(gt.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(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),t.a.createElement(gt.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:hr.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(Yr,Object(Ne.a)({},wr,{accept:".png,.jpg,.bmp,.jpeg"}),Jt?t.a.createElement("img",{src:Jt,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(gt.a.Item,null,t.a.createElement(S.a,{className:"mr5",size:"large",onClick:Zt},"\u53D6\u6D88"),t.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Pt["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")))))},un=Object(f.a)(function(Tt){var it=Tt.user,mt=Tt.account,Ct=Tt.loading,It=Tt.globalSetting;return{user:it,account:mt,globalSetting:It,loading:Ct.effects}})(Hr),Ar=D("O3gP"),vn=D("lrIw"),mn=D("KXlV"),Kt=D.n(mn),or=D("Sjjz"),Xt=D.n(or),gr=U.a.TextArea,Xr=function(it){var mt=it.account,Ct=it.globalSetting,It=it.loading,Pt=it.dispatch,Ht=it.schoolName,Wt=it.departmentName,dt=it.visible,At=it.onClose,Dt=At===void 0?function(){}:At,yr=it.onSuccess,tr=yr===void 0?function(){}:yr,qt=Object(m.a)(it,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),Gt=gt.a.useForm(),nr=Object(h.a)(Gt,1),cr=nr[0],st=Object(a.useRef)();Object(a.useEffect)(function(){st.current=qt.schoolId},[qt.schoolId]),Object(a.useEffect)(function(){cr.setFieldsValue({department:Wt})},[Wt]);var Lr=function(){var Fr=Object(o.a)(r.a.mark(function Cr(rr){var Et,_t,xt,Jt;return r.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return Et=rr||{},_t=Et.department,xt=Et.remarks,dr.next=3,Pt({type:"account/appplyDepartment",payload:{school_id:st.current,name:_t,remarks:xt}});case 3:Jt=dr.sent,Dt(),Jt&&(u.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),tr(_t));case 6:case"end":return dr.stop()}},Cr)}));return function(rr){return Fr.apply(this,arguments)}}();return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:dt,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(gt.a,{className:Xt.a.formWrap,form:cr,labelCol:{span:4},wrapperCol:{span:20},onFinish:Lr},t.a.createElement(gt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Ht),t.a.createElement(gt.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(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),t.a.createElement(gt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(gr,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Xt.a.footerWrap},t.a.createElement(gt.a.Item,null,t.a.createElement(S.a,{className:"mr5",size:"large",onClick:function(){Dt()}},"\u53D6\u6D88"),t.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:It["account/appplyDepartment"]},"\u4FDD\u5B58")))))},kn=Object(f.a)(function(Tt){var it=Tt.account,mt=Tt.loading,Ct=Tt.globalSetting;return{account:it,globalSetting:Ct,loading:mt.effects}})(Xr),Ln=D("6UJt"),tn=D("DFOY"),ur=D("jO45"),Xn=D("jN4g"),hi=D("gJ3r"),$n=D("jwmR"),Zr=D.n($n),Bn=function(it,mt){return mt.some(function(Ct){return Ct.label.toLowerCase().indexOf(it.toLowerCase())>-1})},si=U.a.TextArea,li=function(it){var mt=it.account,Ct=it.globalSetting,It=it.loading,Pt=it.dispatch,Ht=it.schoolName,Wt=it.visible,dt=it.onClose,At=dt===void 0?function(){}:dt,Dt=it.onSuccess,yr=Dt===void 0?function(){}:Dt,tr=Object(m.a)(it,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),qt=gt.a.useForm(),Gt=Object(h.a)(qt,1),nr=Gt[0];Object(a.useEffect)(function(){nr.setFieldsValue({name:Ht})},[Ht]);var cr=function(){var st=Object(o.a)(r.a.mark(function Lr(Fr){var Cr,rr,Et,_t,xt,Jt,pr;return r.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return Cr=Fr||{},rr=Cr.name,Et=Cr.city,_t=Et===void 0?[]:Et,xt=Cr.address,Jt=Cr.remarks,fr.next=3,Pt({type:"account/appplySchool",payload:{name:rr,province:_t[0],city:_t[1],address:xt,remarks:Jt}});case 3:pr=fr.sent,At(),pr&&(u.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),yr(rr));case 6:case"end":return fr.stop()}},Lr)}));return function(Fr){return st.apply(this,arguments)}}();return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Wt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(gt.a,{className:Zr.a.formWrap,form:nr,labelCol:{span:4},wrapperCol:{span:20},onFinish:cr},t.a.createElement(gt.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(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),t.a.createElement("div",{className:"".concat(Zr.a.flexRow," ").concat(Zr.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:Zr.a.flexColumn},t.a.createElement("div",null,t.a.createElement(ur.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(Xn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(gt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(tn.a,{allowClear:!0,size:"large",options:hi.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Bn}})),t.a.createElement(gt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},t.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),t.a.createElement(gt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(si,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Zr.a.footerWrap},t.a.createElement(gt.a.Item,null,t.a.createElement(S.a,{className:"mr5",size:"large",onClick:function(){At()}},"\u53D6\u6D88"),t.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:It["account/appplySchool"]},"\u4FDD\u5B58")))))},wt=Object(f.a)(function(Tt){var it=Tt.account,mt=Tt.loading,Ct=Tt.globalSetting;return{account:it,globalSetting:Ct,loading:mt.effects}})(li),$t=ye.a.Option,en=y.a.Dragger,Cn=function(it){var mt,Ct,It=it.user,Pt=it.account,Ht=it.globalSetting,Wt=it.loading,dt=it.dispatch,At=it.Scoid,Dt=Object(m.a)(it,["user","account","globalSetting","loading","dispatch","Scoid"]),yr=gt.a.useForm(),tr=Object(h.a)(yr,1),qt=tr[0],Gt=Object(a.useState)({}),nr=Object(h.a)(Gt,2),cr=nr[0],st=nr[1],Lr=Object(a.useState)([]),Fr=Object(h.a)(Lr,2),Cr=Fr[0],rr=Fr[1],Et=Object(a.useState)([]),_t=Object(h.a)(Et,2),xt=_t[0],Jt=_t[1],pr=Object(a.useState)([]),dr=Object(h.a)(pr,2),fr=dr[0],Dr=dr[1],an=Object(a.useState)([]),qe=Object(h.a)(an,2),sr=qe[0],Nr=qe[1],rn=Object(a.useState)(),xr=Object(h.a)(rn,2),br=xr[0],Pr=xr[1],Ft=Object(a.useState)(),Zt=Object(h.a)(Ft,2),wr=Zt[0],er=Zt[1],vt=Object(a.useState)(),yt=Object(h.a)(vt,2),zt=yt[0],Mt=yt[1],Mr=Object(a.useState)(),cn=Object(h.a)(Mr,2),fn=cn[0],kr=cn[1],on=Object(a.useState)(),Ur=Object(h.a)(on,2),gn=Ur[0],Vr=Ur[1];Object(a.useEffect)(function(){yn()},[]),Object(a.useEffect)(function(){Object(o.a)(r.a.mark(function Ve(){var We;return r.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(At){pt.next=2;break}return pt.abrupt("return");case 2:return pt.next=4,ei(At);case 4:We=pt.sent,Dr(We==null?void 0:We.departments);case 6:case"end":return pt.stop()}},Ve)}))()},[At]);var yn=function(){var Ve=Object(o.a)(r.a.mark(function We(){var Ze;return r.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,dt({type:"account/getSchoolOption"});case 2:Ze=kt.sent,rr(Ze==null?void 0:Ze.schools);case 4:case"end":return kt.stop()}},We)}));return function(){return Ve.apply(this,arguments)}}(),ei=function(We){return dt({type:"account/getDepartmentOption",payload:{id:We}})};Object(a.useEffect)(function(){if(!Pt.basicInfo)return;var Ve=Pt.basicInfo,We={identity:Ve.identity,school:Ve.school_name,department:Ve.department_name,studentNo:Ve.student_id,jobTitle:Ve.identity=="teacher"?Ve.technical_title:"\u6559\u6388",manager:Ve.identity=="professional"?Ve.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};qt.setFieldsValue(We),st(We)},[Pt.basicInfo]);var Me=function(){kr(!0)},Ge=function(){if(!Cr.find(function(We){return We.name===cr.school})){u.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Vr(!0)},Ye=function(We){if(st(Object(L.a)({},qt.getFieldsValue())),"school"in We){Jt(Cr.filter(function(pt){return pt.name.includes(We.school)}));var Ze=(Cr.find(function(pt){return pt.name===We.school})||{}).id;Ze?Fe(We.school):(qt.setFieldsValue({department:""}),st(Object(L.a)(Object(L.a)({},cr),{school:We.school,department:""})))}},Fe=function(){var Ve=Object(o.a)(r.a.mark(function We(Ze,pt){var kt,jt,Yt,Ir,Qr,$r;return r.a.wrap(function(Kr){for(;;)switch(Kr.prev=Kr.next){case 0:return Ir=(kt=Cr.find(function(sn){return sn.name===Ze}))===null||kt===void 0?void 0:kt.id,Kr.next=3,ei(Ir);case 3:if(Kr.t0=Kr.sent,Kr.t0){Kr.next=6;break}Kr.t0={};case 6:Qr=Kr.t0,Dr(Qr==null?void 0:Qr.departments),$r=pt||(Qr==null||((jt=Qr.departments)===null||jt===void 0||((Yt=jt[0])===null||Yt===void 0))?void 0:Yt.name),qt.setFieldsValue({department:$r}),st(Object(L.a)(Object(L.a)({},cr),{school:Ze,department:$r}));case 11:case"end":return Kr.stop()}},We)}));return function(Ze,pt){return Ve.apply(this,arguments)}}(),Ee=function(){var Ve=Object(o.a)(r.a.mark(function We(Ze){return r.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,yn();case 2:qt.setFieldsValue({school:Ze,department:""}),st(Object(L.a)(Object(L.a)({},cr),{school:Ze,department:""}));case 4:case"end":return kt.stop()}},We)}));return function(Ze){return Ve.apply(this,arguments)}}(),Pe=function(We){if(We.file.status==="uploading"){Mt(!0);return}if(We.file.status==="done"){var Ze;console.log(We.file,We.file.response),er((Ze=We.file.response)===null||Ze===void 0?void 0:Ze.id),Object(Ut.B)(We.file.originFileObj,function(pt){Pr(pt),Mt(!1)})}},_e=function(){var Ve=Object(o.a)(r.a.mark(function We(Ze){var pt,kt,jt,Yt,Ir,Qr,$r,nn,Kr,sn,ln,xn,hn,jn,pn,jr;return r.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:if(Ir=Ze||{},Qr=Ir.school,$r=Ir.department,nn=Ir.identity,Kr=Ir.studentNo,sn=Ir.jobTitle,ln=Ir.manager,br){dn.next=4;break}return u.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),dn.abrupt("return");case 4:return xn=(pt=Cr.find(function(bn){return bn.name===Qr}))===null||pt===void 0?void 0:pt.id,hn=(kt=fr.find(function(bn){return bn.name===$r}))===null||kt===void 0?void 0:kt.id,nn==="student"?jn=Kr:nn==="teacher"?jn=sn:jn=ln,dn.next=9,dt({type:"account/applyProfessionalAuth",payload:{id:((jt=Pt.basicInfo)===null||jt===void 0?void 0:jt.id)||((Yt=It.userInfo)===null||Yt===void 0?void 0:Yt.login),school_id:xn,department_id:hn,identity:nn,extra:jn,attachment_ids:[wr]}});case 9:pn=dn.sent,je(),pn&&(u.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),dt({type:"account/getBasicInfo",payload:{login:(jr=It.userInfo)===null||jr===void 0?void 0:jr.login}}));case 12:case"end":return dn.stop()}},We)}));return function(Ze){return Ve.apply(this,arguments)}}(),je=function(){dt({type:"account/setActionTabs",payload:{}})},ze={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(X.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:Pe,beforeUpload:function(We){var Ze=We.type==="image/jpeg"||We.type==="image/png"||We.type==="image/jpg"||We.type==="image/bmp";return Ze||u.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),Ze}};return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:St.a.modal,visible:Pt.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(d.a,{spinning:!!zt},t.a.createElement(gt.a,{className:St.a.formWrap,form:qt,layout:"horizontal",onValuesChange:Ye,onFinish:_e},t.a.createElement(B.a,{gutter:[10,0]},t.a.createElement(ct.a,{flex:"300px"},t.a.createElement(gt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(ye.a,null,t.a.createElement($t,{value:"teacher"},"\u6559\u5E08"),t.a.createElement($t,{value:"student"},"\u5B66\u751F"),t.a.createElement($t,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),cr.identity==="student"&&t.a.createElement(ct.a,{flex:"200px"},t.a.createElement(gt.a.Item,{initialValue:cr.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},t.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),cr.identity==="teacher"&&t.a.createElement(ct.a,{flex:"200px"},t.a.createElement(gt.a.Item,{initialValue:cr.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(ye.a,null,t.a.createElement($t,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement($t,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement($t,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement($t,{value:"\u52A9\u6559"},"\u52A9\u6559")))),cr.identity==="professional"&&t.a.createElement(ct.a,{flex:"200px"},t.a.createElement(gt.a.Item,{initialValue:cr.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(ye.a,null,t.a.createElement($t,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement($t,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement($t,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement($t,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement($t,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(gt.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:cr.school&&!(Cr!=null&&Cr.find(function(Ve){return Ve.name===cr.school}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",cr.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Me},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(vn.a,{showSearch:!0,options:xt==null?void 0:xt.map(function(Ve){return{value:Ve.name}})})),t.a.createElement(gt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:cr.department&&!(fr!=null&&fr.find(function(Ve){return Ve.name===cr.department}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},cr.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(cr.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ge},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(vn.a,{showSearch:!0,onChange:function(We){return Nr(fr.filter(function(Ze){return Ze.name.includes(We)}))},options:sr==null?void 0:sr.map(function(Ve){return{value:Ve.name}})})),t.a.createElement(gt.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:Kt.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(en,Object(Ne.a)({},ze,{accept:".png,.jpg,.bmp,.jpeg"}),br?t.a.createElement("img",{src:br,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(gt.a.Item,null,t.a.createElement(S.a,{className:"mr5",size:"large",onClick:je},"\u53D6\u6D88"),t.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Wt["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",!(Ht!=null&&(mt=Ht.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(wt,{visible:fn,onClose:function(){return kr(!1)},schoolName:cr.school,onSuccess:Ee}),t.a.createElement(kn,{visible:gn,onClose:function(){return Vr(!1)},schoolId:(Ct=Cr.find(function(Ve){return Ve.name===cr.school}))===null||Ct===void 0?void 0:Ct.id,schoolName:cr.school,departmentName:cr.department,onSuccess:function(We){return Fe(cr.school,We)}}))},_n=Object(f.a)(function(Tt){var it=Tt.user,mt=Tt.account,Ct=Tt.loading,It=Tt.globalSetting;return{user:it,account:mt,globalSetting:It,loading:Ct.effects}})(Cn),On=D("aCH8"),ae=D.n(On);function z(Tt){var it=Tt.type,mt=Tt.dispatch,Ct=Tt.userid,It=Tt.isshow,Pt=Tt.setPhoneshow,Ht=Tt.setEmailshow,Wt="79e33abd4b6588941ab7622aed1e67e8",dt=Object(a.useState)(""),At=Object(h.a)(dt,2),Dt=At[0],yr=At[1],tr=Object(a.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),qt=Object(h.a)(tr,2),Gt=qt[0],nr=qt[1],cr=Object(a.useState)(60),st=Object(h.a)(cr,2),Lr=st[0],Fr=st[1],Cr=Object(a.useState)(!1),rr=Object(h.a)(Cr,2),Et=rr[0],_t=rr[1],xt=Object(a.useState)(""),Jt=Object(h.a)(xt,2),pr=Jt[0],dr=Jt[1];function fr(){return Dr.apply(this,arguments)}function Dr(){return Dr=Object(o.a)(r.a.mark(function xr(){var br;return r.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(Dt){Ft.next=3;break}return it===3?u.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):u.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:it,login:Dt,smscode:ae()(Wt+Dt)}});case 5:br=Ft.sent,br.status===1&&(u.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),an(),_t(!0));case 7:case"end":return Ft.stop()}},xr)})),Dr.apply(this,arguments)}function an(){Fr(60);var xr=setInterval(function(){--Lr,Lr>-1?Fr(Lr):(clearInterval(xr),_t(!1))},1e3)}function qe(){return sr.apply(this,arguments)}function sr(){return sr=Object(o.a)(r.a.mark(function xr(){var br;return r.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,mt({type:"competitions/PhoneBind",payload:{userid:Ct,code:pr,phone:Dt}});case 2:br=Ft.sent,br.status===0&&(u.b.info("\u7ED1\u5B9A\u6210\u529F"),Pt("none"));case 4:case"end":return Ft.stop()}},xr)})),sr.apply(this,arguments)}function Nr(){return rn.apply(this,arguments)}function rn(){return rn=Object(o.a)(r.a.mark(function xr(){var br;return r.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,mt({type:"competitions/EmailBind",payload:{userid:Ct,code:pr,email:Dt}});case 2:br=Ft.sent,br.status===0&&(u.b.info("\u7ED1\u5B9A\u6210\u529F"),Ht("none"));case 4:case"end":return Ft.stop()}},xr)})),rn.apply(this,arguments)}return t.a.createElement("div",{style:{display:It}},t.a.createElement("p",null,t.a.createElement(U.a,{value:Dt,onChange:function(br){return yr(br.target.value)},placeholder:it===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(U.a,{value:pr,onChange:function(br){return dr(br.target.value)},placeholder:it===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(S.a,{disabled:Et,onClick:function(){return fr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},Et?"\u91CD\u65B0\u53D1\u9001".concat(Lr,"s"):Gt),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(S.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!pr){u.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}it===3?qe():Nr()}},"\u786E\u8BA4"),t.a.createElement(S.a,{style:{marginLeft:"20px"},onClick:function(){it===3?Pt("none"):Ht("none")}},"\u53D6\u6D88")))}var $=z;function ie(Tt){var it=Tt.dispatch,mt=Tt.userid,Ct={wrapperCol:{offset:3,span:21}},It=gt.a.useForm(),Pt=Object(h.a)(It,1),Ht=Pt[0],Wt=Object(w.i)(),dt=Wt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(gt.a,{form:Ht,name:"basic"},t.a.createElement(gt.a.Item,Object(Ne.a)({},Ct,{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(U.a,null)),t.a.createElement(gt.a.Item,Object(Ne.a)({},Ct,{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(U.a,null)),t.a.createElement(gt.a.Item,Object(Ne.a)({},Ct,{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(U.a,null)),t.a.createElement(gt.a.Item,null,t.a.createElement(S.a,{type:"primary",htmlType:"submit",onClick:Object(o.a)(r.a.mark(function At(){return r.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:Ht.validateFields().then(function(){var tr=Object(o.a)(r.a.mark(function qt(Gt){var nr;return r.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return st.next=2,it({type:"competitions/setleader",payload:Object(L.a)({identifier:dt,user_id:mt},Gt)});case 2:nr=st.sent,nr.status===0&&u.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return st.stop()}},qt)}));return function(qt){return tr.apply(this,arguments)}}());case 1:case"end":return yr.stop()}},At)}))},"\u63D0\u4EA4"))))}var de=ie,se={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ke(Tt){var it,mt,Ct,It,Pt,Ht,Wt,dt,At=Tt.Prize,Dt=Tt.Accounts,yr=Tt.dispatch,tr=Tt.userid,qt=Object(a.useState)("none"),Gt=Object(h.a)(qt,2),nr=Gt[0],cr=Gt[1],st=Object(a.useState)("none"),Lr=Object(h.a)(st,2),Fr=Lr[0],Cr=Lr[1];function rr(_t){return Et.apply(this,arguments)}function Et(){return Et=Object(o.a)(r.a.mark(function _t(xt){var Jt;return r.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(!(xt==="1")){dr.next=6;break}return dr.next=3,yr({type:"competitions/Authentication"});case 3:Jt=dr.sent,dr.next=9;break;case 6:return dr.next=8,yr({type:"competitions/Professional"});case 8:Jt=dr.sent;case 9:Jt.status===0&&u.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return dr.stop()}},_t)})),Et.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"),(Dt==null?void 0:Dt.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,(Dt==null?void 0:Dt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){yr({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,Dt==null?void 0:Dt.name),(Dt==null?void 0:Dt.authentication)==="uncertified"?null:(Dt==null?void 0:Dt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(S.a,{type:"primary",onClick:function(){return rr("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,(Dt==null?void 0:Dt.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"),(Dt==null?void 0:Dt.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,(Dt==null?void 0:Dt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){yr({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,Dt&&Dt.identity&&se[Dt.identity]),(Dt==null?void 0:Dt.authentication)==="uncertified"?null:(Dt==null?void 0:Dt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(S.a,{type:"primary",onClick:function(){return rr("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(S.a,{type:"primary",onClick:function(){yr({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,(Dt==null?void 0:Dt.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(Dt==null?void 0:Dt.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(Dt==null?void 0:Dt.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"}},(Dt==null?void 0:Dt.phone)||"--"),nr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){cr("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:3,dispatch:yr,userid:Dt==null?void 0:Dt.id,isshow:nr,setPhoneshow:cr,setEmailshow:Cr}),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"}},(Dt==null?void 0:Dt.mail)||"--"),Fr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){Cr("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:4,dispatch:yr,userid:Dt==null?void 0:Dt.id,isshow:Fr,setEmailshow:Cr,setPhoneshow:cr})),At!=null&&At.leader&&At!==null&&At!==void 0&&At.teams&&At!==null&&At!==void 0&&(it=At.teams[0])!==null&&it!==void 0&&(mt=it.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(de,{dispatch:yr,userid:tr})),At!=null&&At.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,(At==null?void 0:At.teams)&&(At==null||((Ct=At.teams[0])===null||Ct===void 0||((It=Ct.bank_account)===null||It===void 0))?void 0:It.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,(At==null?void 0:At.teams)&&(At==null||((Pt=At.teams[0])===null||Pt===void 0||((Ht=Pt.bank_account)===null||Ht===void 0))?void 0:Ht.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,(At==null?void 0:At.teams)&&(At==null||((Wt=At.teams[0])===null||Wt===void 0||((dt=Wt.bank_account)===null||dt===void 0))?void 0:dt.card_no)||"--"))):null,t.a.createElement(_n,{Scoid:Dt==null?void 0:Dt.school_id}),t.a.createElement(un,null))}var Rt=Ke,Vt=ge.a.TabPane;function Er(Tt){var it=Tt.Prize,mt=Tt.Accounts,Ct=Tt.getAccounts,It=Tt.dispatch,Pt=Tt.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(ge.a,{defaultActiveKey:"1",onChange:function(Wt){Wt==="2"&&Ct()}},t.a.createElement(Vt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(ke,{Prize:it})),t.a.createElement(Vt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(Rt,{userid:Pt,dispatch:It,Prize:it,Accounts:mt})))))}var Lt=Er,zr=D("xKgJ"),Br=D("wd/R"),En=D.n(Br),ui=ge.a.TabPane;function Ei(Tt){var it,mt,Ct,It,Pt,Ht,Wt=Tt.ChartRules,dt=Tt.ItemData,At=Tt.getCharts,Dt=Tt.Selectkey,yr=Tt.HeaderDetail,tr=Tt.getChartRules,qt=Tt.userinfo,Gt=Tt.Editable,nr=Tt.dispatch,cr=Tt.StaffDetail,st=Object(a.useState)(!1),Lr=Object(h.a)(st,2),Fr=Lr[0],Cr=Lr[1],rr=Object(a.useState)(""),Et=Object(h.a)(rr,2),_t=Et[0],xt=Et[1],Jt=Object(a.useState)(!0),pr=Object(h.a)(Jt,2),dr=pr[0],fr=pr[1],Dr=Object(a.useState)(),an=Object(h.a)(Dr,2),qe=an[0],sr=an[1],Nr=Object(a.useState)(),rn=Object(h.a)(Nr,2),xr=rn[0],br=rn[1],Pr=Object(w.i)(),Ft=Pr.identifier;Object(a.useEffect)(function(){if(dr){var vt,yt,zt,Mt,Mr=Wt==null||((vt=Wt.stages)===null||vt===void 0)?void 0:vt[0];sr(Mr);var cn=Wt==null||((yt=Wt.stages)===null||yt===void 0||((zt=yt[0])===null||zt===void 0||((Mt=zt.children)===null||Mt===void 0)))?void 0:Mt[0];if(br(cn),Mr!=null&&Mr.id){var fn,kr,on;At(Mr==null?void 0:Mr.id),xt(((fn=Wt.rule_contents)===null||fn===void 0||((kr=fn.filter(function(yn){return parseInt(yn.competition_stage_id)===parseInt(Mr==null?void 0:Mr.id)}))===null||kr===void 0||((on=kr[0])===null||on===void 0))?void 0:on.content)||"")}else{var Ur,gn,Vr;At(0),xt(((Ur=Wt.rule_contents)===null||Ur===void 0||((gn=Ur.filter(function(yn){return parseInt(yn.competition_stage_id)===0}))===null||gn===void 0||((Vr=gn[0])===null||Vr===void 0))?void 0:Vr.content)||"")}}},[Wt]);function Zt(){return wr.apply(this,arguments)}function wr(){return wr=Object(o.a)(r.a.mark(function vt(){var yt,zt,Mt,Mr,cn,fn,kr,on,Ur;return r.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:if(_t){Vr.next=3;break}return u.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Vr.abrupt("return");case 3:if(fr(!1),yt=qe==null?void 0:qe.id,!yt){Vr.next=12;break}return Vr.next=8,Object(ne.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Dt,content:_t,md_content_id:(zt=Wt.rule_contents)===null||zt===void 0||((Mt=zt.filter(function(yn){return parseInt(yn.competition_stage_id)===parseInt(yt)}))===null||Mt===void 0||((Mr=Mt[0])===null||Mr===void 0))?void 0:Mr.id,stage_id:qe==null?void 0:qe.id}});case 8:cn=Vr.sent,cn.status===0&&(u.b.info("\u66F4\u65B0\u6210\u529F"),Cr(!1),tr()),Vr.next=16;break;case 12:return Vr.next=14,Object(ne.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Dt,content:_t,md_content_id:(fn=Wt.rule_contents)===null||fn===void 0||((kr=fn.filter(function(yn){return parseInt(yn.competition_stage_id)===0}))===null||kr===void 0||((on=kr[0])===null||on===void 0))?void 0:on.id,stage_id:qe==null?void 0:qe.id}});case 14:Ur=Vr.sent,Ur.status===0&&(u.b.info("\u66F4\u65B0\u6210\u529F"),Cr(!1),tr());case 16:case"end":return Vr.stop()}},vt)})),wr.apply(this,arguments)}var er=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(yt,zt,Mt){return t.a.createElement("span",null,yt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(yt){return t.a.createElement(nt.a,{title:yt},t.a.createElement("span",{title:yt},yt&&(yt==null?void 0:yt.length)>=10?(yt==null?void 0:yt.substr(0,10))+"...":yt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(yt){return t.a.createElement("span",{title:yt},yt&&(yt==null?void 0:yt.length)>=6?(yt==null?void 0:yt.substr(0,6))+"...":yt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(yt){return t.a.createElement("span",null,yt===1?"\u8BA1\u7B97\u4E2D":yt===2?"\u5B8C\u6210":yt===0?"\u5F85\u8BA1\u7B97":yt===3&&"\u9519\u8BEF")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(yt){return t.a.createElement("span",null,yt||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){return(yt==null?void 0:yt.length)>0?yt==null?void 0:yt.map(function(zt,Mt){return t.a.createElement("span",null,zt==null?void 0:zt.name,"\uFF1A",zt==null?void 0:zt.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(yt){return t.a.createElement("span",null,yt||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="score"}))===null||zt===void 0)?void 0:zt.value)||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="fid"}))===null||zt===void 0)?void 0:zt.value)||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="total_score"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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(yt){return t.a.createElement("span",null,yt||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Coffee"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Easyship"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Scar"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Scarf"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.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(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Total"}))===null||zt===void 0)?void 0:zt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(yt){return t.a.createElement("a",{href:yt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(vt){return!!vt});return t.a.createElement("div",null,(Wt==null||((it=Wt.stages)===null||it===void 0)?void 0:it.length)>0?null:t.a.createElement(Je,null),(Wt==null||((mt=Wt.stages)===null||mt===void 0)?void 0:mt.length)>0&&t.a.createElement(ge.a,{animated:!0,tabBarExtraContent:qt!=null&&qt.admin||qt!=null&&qt.business||Gt?t.a.createElement(S.a,{onClick:function(){Cr(!0)}},"\u7F16\u8F91"):cr.enrolled&&(qe==null?void 0:qe.start_time)&&(qe==null?void 0:qe.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",En()(qe==null?void 0:qe.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",En()(qe==null?void 0:qe.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(S.a,{style:{marginLeft:"20px"},disabled:En()(qe==null?void 0:qe.start_time).unix()>En()(En()().format("YYYY-MM-DD HH:mm:s")).unix()||En()(En()().format("YYYY-MM-DD HH:mm:s")).unix()>En()(qe==null?void 0:qe.end_time).unix(),onClick:function(){nr({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(xr==null?void 0:xr.id)||(qe==null?void 0:qe.id),id:yr==null?void 0:yr.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(yt){var zt,Mt,Mr,cn,fn;Cr(!1);var kr=Wt==null||((zt=Wt.stages)===null||zt===void 0)?void 0:zt.filter(function(Ur){return parseInt(yt)===parseInt(Ur==null?void 0:Ur.id)})[0],on=kr==null||((Mt=kr.children)===null||Mt===void 0)?void 0:Mt[0];br(on),sr(kr),xt(((Mr=Wt.rule_contents)===null||Mr===void 0||((cn=Mr.filter(function(Ur){return parseInt(Ur.competition_stage_id)===parseInt(kr==null?void 0:kr.id)}))===null||cn===void 0||((fn=cn[0])===null||fn===void 0))?void 0:fn.content)||""),At((on==null?void 0:on.id)||yt)}},Wt&&Wt.stages.map(function(vt,yt){return t.a.createElement(ui,{tab:vt.name,key:vt.id===null?0:vt.id},Fr===!1&&Wt&&Wt.rule_contents.map(function(zt,Mt){if(vt.id===zt.competition_stage_id)return t.a.createElement(W.a,{key:Mt,value:zt.content===void 0||zt.content===null?"":zt.content});if(vt.id===null&&zt.competition_stage_id===0)return t.a.createElement(W.a,{key:Mt,value:zt.content===void 0||zt.content===null?"":zt.content})}))})),(qe==null||((Ct=qe.children)===null||Ct===void 0)?void 0:Ct.length)>0&&t.a.createElement(ge.a,{activeKey:(xr==null?void 0:xr.id)+"",onChange:function(yt){var zt,Mt=qe==null||((zt=qe.children)===null||zt===void 0)?void 0:zt.filter(function(Mr){return parseInt(yt)===parseInt(Mr==null?void 0:Mr.id)})[0];br(Mt),At(yt)}},qe==null||((It=qe.children)===null||It===void 0)?void 0:It.map(function(vt,yt){return t.a.createElement(ui,{tab:vt.name,key:vt.id===null?0:vt.id})})),Fr&&t.a.createElement("div",null,t.a.createElement(te.a,{defaultValue:_t,onChange:function(yt){xt(yt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Zt()}},"\u63D0\u4EA4"),t.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Cr(!1)}},"\u53D6\u6D88"))),((Pt=yr.competition_modules.filter(function(vt){return vt.id===Dt}))===null||Pt===void 0||((Ht=Pt[0])===null||Ht===void 0)?void 0:Ht.show_leaderboard)&&t.a.createElement(Z.a,{dataSource:dt==null?void 0:dt.results,columns:er}))}var In=Ei,Li=D("DjyN"),qi=D("NUBc"),ni=ge.a.TabPane;function Ti(Tt){var it,mt,Ct,It,Pt,Ht,Wt=Tt.loading,dt=Tt.ChartRules,At=Tt.ItemData,Dt=Tt.getCharts,yr=Tt.Selectkey,tr=Tt.HeaderDetail,qt=Tt.getChartRules,Gt=Tt.userinfo,nr=Tt.Editable,cr=Tt.dispatch,st=Tt.StaffDetail,Lr=Object(a.useState)(!1),Fr=Object(h.a)(Lr,2),Cr=Fr[0],rr=Fr[1],Et=Object(a.useState)(""),_t=Object(h.a)(Et,2),xt=_t[0],Jt=_t[1],pr=Object(a.useState)(!0),dr=Object(h.a)(pr,2),fr=dr[0],Dr=dr[1],an=Object(a.useState)(),qe=Object(h.a)(an,2),sr=qe[0],Nr=qe[1],rn=Object(a.useState)(),xr=Object(h.a)(rn,2),br=xr[0],Pr=xr[1],Ft=Object(w.i)(),Zt=Ft.identifier,wr=Object(a.useState)({page:1,limit:10,sort:"desc"}),er=Object(h.a)(wr,2),vt=er[0],yt=er[1];Object(a.useEffect)(function(){var Mt;fr&&dt!==null&&dt!==void 0&&(Mt=dt.stages)!==null&&Mt!==void 0&&Mt[0]&&zt()},[dt==null||((it=dt.stages)===null||it===void 0)?void 0:it[0]]);var zt=function(){var Mt=Object(o.a)(r.a.mark(function Mr(){var cn,fn,kr,on,Ur,gn;return r.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:return Ur=dt==null||((cn=dt.stages)===null||cn===void 0)?void 0:cn[0],Nr(Ur),gn=dt==null||((fn=dt.stages)===null||fn===void 0||((kr=fn[0])===null||kr===void 0||((on=kr.children)===null||on===void 0)))?void 0:on[0],Pr(gn),vt.id=(gn==null?void 0:gn.id)||(Ur==null?void 0:Ur.id),yt(Object(L.a)({},vt)),yn.next=7,Dt(Object(L.a)(Object(L.a)({},vt),{},{stage_id:vt.id}));case 7:case"end":return yn.stop()}},Mr)}));return function(){return Mt.apply(this,arguments)}}();return t.a.createElement("div",null,(dt==null||((mt=dt.stages)===null||mt===void 0)?void 0:mt.length)>0?null:t.a.createElement(Je,null),(dt==null||((Ct=dt.stages)===null||Ct===void 0)?void 0:Ct.length)>0&&t.a.createElement(ge.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Mt=Object(o.a)(r.a.mark(function Mr(cn){var fn,kr,on,Ur,gn,Vr,yn;return r.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return rr(!1),Vr=dt==null||((fn=dt.stages)===null||fn===void 0)?void 0:fn.filter(function(Ge){return parseInt(cn)===parseInt(Ge==null?void 0:Ge.id)})[0],yn=Vr==null||((kr=Vr.children)===null||kr===void 0)?void 0:kr[0],Pr(yn),Nr(Vr),Jt(((on=dt.rule_contents)===null||on===void 0||((Ur=on.filter(function(Ge){return parseInt(Ge.competition_stage_id)===parseInt(Vr==null?void 0:Vr.id)}))===null||Ur===void 0||((gn=Ur[0])===null||gn===void 0))?void 0:gn.content)||""),vt.page=1,vt.limit=10,vt.id=(yn==null?void 0:yn.id)||cn,yt(Object(L.a)({},vt)),Me.next=9,Dt(Object(L.a)({},vt));case 9:case"end":return Me.stop()}},Mr)}));return function(Mr){return Mt.apply(this,arguments)}}()},dt&&dt.stages.map(function(Mt,Mr){return t.a.createElement(ni,{tab:Mt.name,key:Mt.id===null?0:Mt.id})})),(sr==null||((It=sr.children)===null||It===void 0)?void 0:It.length)>0&&t.a.createElement(ge.a,{activeKey:(br==null?void 0:br.id)+"",onChange:function(){var Mt=Object(o.a)(r.a.mark(function Mr(cn){var fn,kr;return r.a.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:return kr=sr==null||((fn=sr.children)===null||fn===void 0)?void 0:fn.filter(function(gn){return parseInt(cn)===parseInt(gn==null?void 0:gn.id)})[0],Pr(kr),vt.page=1,vt.limit=10,vt.id=cn,yt(Object(L.a)({},vt)),Ur.next=5,Dt(Object(L.a)({},vt));case 5:case"end":return Ur.stop()}},Mr)}));return function(Mr){return Mt.apply(this,arguments)}}()},sr==null||((Pt=sr.children)===null||Pt===void 0)?void 0:Pt.map(function(Mt,Mr){return t.a.createElement(ni,{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(){vt.page=1,vt.sort=vt.sort==="desc"?"asc":"desc",yt(Object(L.a)({},vt)),Dt(Object(L.a)({},vt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",vt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(vt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(U.a.Search,{onSearch:function(Mr){vt.page=1,vt.search=Mr,yt(Object(L.a)({},vt)),Dt(Object(L.a)({},vt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(d.a,{spinning:Wt},At==null||((Ht=At.results)===null||Ht===void 0)?void 0:Ht.map(function(Mt,Mr){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:Mr===0?14:30}},t.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},t.a.createElement("img",{src:X.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(qi.a,{total:At==null?void 0:At.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:vt.page,onChange:function(Mr,cn){vt.page=Mr,yt(Object(L.a)({},vt)),Dt(Object(L.a)({},vt))}})))}var xi=Ti,Fi=function(it){var mt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Ct=["","\u5341","\u767E","\u5343","\u4E07"];it=parseInt(it);var It=function(dt){for(var At=dt.toString().split("").reverse(),Dt="",yr=0;yr0&&At[yr]==0&&At[yr-1]==0?"":mt[At[yr]]+(At[yr]==0?Ct[0]:Ct[yr]))+Dt;return Dt},Pt=Math.floor(it/1e4),Ht=it%1e4;return Ht.toString().length<4&&(Ht="0"+Ht),Pt?It(Pt)+"\u4E07"+It(Ht):It(it)};function Ci(Tt){var it,mt=Tt.item,Ct=Tt.index,It=Tt.StaffDetail,Pt=Object(a.useState)(!0),Ht=Object(h.a)(Pt,2),Wt=Ht[0],dt=Ht[1],At=Object(a.useState)(!0),Dt=Object(h.a)(At,2),yr=Dt[0],tr=Dt[1],qt=Object(a.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:X.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",Fi(Ct+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:qt},t.a.createElement(W.a,{style:{maxHeight:Wt&&100},value:mt==null?void 0:mt.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){dt(!Wt)}},Wt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(Wt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:yr&&58,overflow:"hidden"}},mt==null||((it=mt.challenges)===null||it===void 0)?void 0:it.map(function(Gt,nr){return t.a.createElement("div",{style:{marginTop:nr===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",nr+1,"\u5173",Gt==null?void 0:Gt.name))})),t.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},t.a.createElement("span",{onClick:function(){tr(!yr)}},yr?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(yr?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(It==null?void 0:It.enrolled)&&t.a.createElement(S.a,{onClick:function(){window.open("/shixuns/".concat(mt==null?void 0:mt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var Gi=Ci,Mi=ge.a.TabPane;function oa(Tt){var it,mt,Ct,It,Pt,Ht,Wt=Tt.loading,dt=Tt.ChartRules,At=Tt.ItemData,Dt=Tt.getCharts,yr=Tt.Selectkey,tr=Tt.HeaderDetail,qt=Tt.getChartRules,Gt=Tt.userinfo,nr=Tt.Editable,cr=Tt.dispatch,st=Tt.StaffDetail,Lr=Object(a.useState)(!1),Fr=Object(h.a)(Lr,2),Cr=Fr[0],rr=Fr[1],Et=Object(a.useState)(""),_t=Object(h.a)(Et,2),xt=_t[0],Jt=_t[1],pr=Object(a.useState)(!0),dr=Object(h.a)(pr,2),fr=dr[0],Dr=dr[1],an=Object(a.useState)(),qe=Object(h.a)(an,2),sr=qe[0],Nr=qe[1],rn=Object(a.useState)(),xr=Object(h.a)(rn,2),br=xr[0],Pr=xr[1],Ft=Object(w.i)(),Zt=Ft.identifier,wr=Object(a.useState)({page:1,limit:10}),er=Object(h.a)(wr,2),vt=er[0],yt=er[1],zt=Object(a.useState)(),Mt=Object(h.a)(zt,2),Mr=Mt[0],cn=Mt[1];Object(a.useEffect)(function(){var kr;fr&&dt!==null&&dt!==void 0&&(kr=dt.stages)!==null&&kr!==void 0&&kr[0]&&fn()},[dt==null||((it=dt.stages)===null||it===void 0)?void 0:it[0]]);var fn=function(){var kr=Object(o.a)(r.a.mark(function on(){var Ur,gn,Vr,yn,ei,Me;return r.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return ei=dt==null||((Ur=dt.stages)===null||Ur===void 0)?void 0:Ur[0],Nr(ei),Me=dt==null||((gn=dt.stages)===null||gn===void 0||((Vr=gn[0])===null||Vr===void 0||((yn=Vr.children)===null||yn===void 0)))?void 0:yn[0],Pr(Me),vt.id=(Me==null?void 0:Me.id)||(ei==null?void 0:ei.id),yt(Object(L.a)({},vt)),Ye.next=7,Dt(Object(L.a)(Object(L.a)({},vt),{},{stage_id:vt.id}));case 7:case"end":return Ye.stop()}},on)}));return function(){return kr.apply(this,arguments)}}();return t.a.createElement("div",null,(dt==null||((mt=dt.stages)===null||mt===void 0)?void 0:mt.length)>0?null:t.a.createElement(Je,null),(dt==null||((Ct=dt.stages)===null||Ct===void 0)?void 0:Ct.length)>0&&t.a.createElement(ge.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var kr=Object(o.a)(r.a.mark(function on(Ur){var gn,Vr,yn,ei,Me,Ge,Ye;return r.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return rr(!1),Ge=dt==null||((gn=dt.stages)===null||gn===void 0)?void 0:gn.filter(function(Pe){return parseInt(Ur)===parseInt(Pe==null?void 0:Pe.id)})[0],Ye=Ge==null||((Vr=Ge.children)===null||Vr===void 0)?void 0:Vr[0],Pr(Ye),Nr(Ge),Jt(((yn=dt.rule_contents)===null||yn===void 0||((ei=yn.filter(function(Pe){return parseInt(Pe.competition_stage_id)===parseInt(Ge==null?void 0:Ge.id)}))===null||ei===void 0||((Me=ei[0])===null||Me===void 0))?void 0:Me.content)||""),vt.page=1,vt.limit=10,vt.id=(Ye==null?void 0:Ye.id)||Ur,yt(Object(L.a)({},vt)),Ee.next=9,Dt(Object(L.a)({},vt));case 9:case"end":return Ee.stop()}},on)}));return function(on){return kr.apply(this,arguments)}}()},dt&&dt.stages.map(function(kr,on){return t.a.createElement(Mi,{tab:kr.name,key:kr.id===null?0:kr.id})})),(sr==null||((It=sr.children)===null||It===void 0)?void 0:It.length)>0&&t.a.createElement(ge.a,{activeKey:(br==null?void 0:br.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var kr=Object(o.a)(r.a.mark(function on(Ur){var gn,Vr;return r.a.wrap(function(ei){for(;;)switch(ei.prev=ei.next){case 0:return Vr=sr==null||((gn=sr.children)===null||gn===void 0)?void 0:gn.filter(function(Me){return parseInt(Ur)===parseInt(Me==null?void 0:Me.id)})[0],Pr(Vr),vt.page=1,vt.limit=10,vt.id=Ur,yt(Object(L.a)({},vt)),ei.next=5,Dt(Object(L.a)({},vt));case 5:case"end":return ei.stop()}},on)}));return function(on){return kr.apply(this,arguments)}}()},sr==null||((Pt=sr.children)===null||Pt===void 0)?void 0:Pt.map(function(kr,on){return t.a.createElement(Mi,{tab:kr.name,key:kr.id===null?0:kr.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}},At==null?void 0:At.start_time,"~",At==null?void 0:At.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(At==null?void 0:At.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(d.a,{spinning:Wt},At==null||((Ht=At.results)===null||Ht===void 0)?void 0:Ht.map(function(kr,on){return t.a.createElement(Gi,{StaffDetail:st,item:kr,index:on})})),t.a.createElement(qi.a,{total:At==null?void 0:At.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:vt.page,onChange:function(on,Ur){vt.page=on,yt(Object(L.a)({},vt)),Dt(Object(L.a)({},vt))}})))}var sa=oa,Ii=D("UfjD"),qn=D("qHvr"),Vi=function(it){var mt,Ct,It,Pt,Ht,Wt,dt,At,Dt=it.globalSetting,yr=it.loading,tr=it.dispatch,qt=it.user,Gt=Object(m.a)(it,["globalSetting","loading","dispatch","user"]),nr=Object(a.useState)({avatar_url:""}),cr=Object(h.a)(nr,2),st=cr[0],Lr=cr[1],Fr=Object(a.useState)([]),Cr=Object(h.a)(Fr,2),rr=Cr[0],Et=Cr[1],_t=Object(w.i)(),xt=_t.identifier,Jt=Object(a.useState)([]),pr=Object(h.a)(Jt,2),dr=pr[0],fr=pr[1],Dr=Object(a.useState)(!0),an=Object(h.a)(Dr,2),qe=an[0],sr=an[1],Nr=Object(a.useState)([]),rn=Object(h.a)(Nr,2),xr=rn[0],br=rn[1],Pr=Object(a.useState)([]),Ft=Object(h.a)(Pr,2),Zt=Ft[0],wr=Ft[1],er=Object(a.useState)(!1),vt=Object(h.a)(er,2),yt=vt[0],zt=vt[1],Mt=Object(a.useState)(!1),Mr=Object(h.a)(Mt,2),cn=Mr[0],fn=Mr[1],kr=Object(a.useState)(!1),on=Object(h.a)(kr,2),Ur=on[0],gn=on[1],Vr=Object(a.useState)([]),yn=Object(h.a)(Vr,2),ei=yn[0],Me=yn[1],Ge=Object(a.useState)([]),Ye=Object(h.a)(Ge,2),Fe=Ye[0],Ee=Ye[1],Pe=Object(a.useState)([]),_e=Object(h.a)(Pe,2),je=_e[0],ze=_e[1],Ve=Object(a.useState)(!1),We=Object(h.a)(Ve,2),Ze=We[0],pt=We[1],kt=Object(a.useState)([]),jt=Object(h.a)(kt,2),Yt=jt[0],Ir=jt[1],Qr=Object(a.useState)(),$r=Object(h.a)(Qr,2),nn=$r[0],Kr=$r[1],sn=Object(a.useState)(!0),ln=Object(h.a)(sn,2),xn=ln[0],hn=ln[1],jn=Object(a.useState)(!1),pn=Object(h.a)(jn,2),jr=pn[0],Wr=pn[1],dn=Object(a.useState)(!1),bn=Object(h.a)(dn,2),Tr=bn[0],Sn=bn[1],Yn=Object(a.useState)(!1),Rn=Object(h.a)(Yn,2),Wn=Rn[0],Dn=Rn[1],ti=Object(a.useState)(!1),ci=Object(h.a)(ti,2),Jn=ci[0],gi=ci[1],Xi=Object(a.useState)(!1),Oi=Object(h.a)(Xi,2),di=Oi[0],Hn=Oi[1],zn=Object(a.useState)(!0),Qn=Object(h.a)(zn,2),Vn=Qn[0],ii=Qn[1],Di=Object(w.h)(),ra=Object(a.useRef)(null);Object(a.useEffect)(function(){xt&&Mn(),Object(Ut.T)("\u7ADE\u8D5B")},[xt]);function Mn(){return Ui.apply(this,arguments)}function Ui(){return Ui=Object(o.a)(r.a.mark(function Sr(){var Or;return r.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.t0=Et,Tn.next=3,tr({type:"competitions/getStaff",payload:{identifier:xt}});case 3:return Tn.t1=Tn.sent,(0,Tn.t0)(Tn.t1),Tn.next=7,tr({type:"competitions/getHeader",payload:{identifier:xt}});case 7:Or=Tn.sent,Lr(Or),Object(Ut.T)((Or==null?void 0:Or.name)||"\u7ADE\u8D5B");case 10:case"end":return Tn.stop()}},Sr)})),Ui.apply(this,arguments)}Object(a.useEffect)(function(){var Sr;Kr(parseInt(Di==null||((Sr=Di.query)===null||Sr===void 0)?void 0:Sr.type)===1)},[Di]),Object(a.useEffect)(function(){var Sr;if((st==null||((Sr=st.competition_modules)===null||Sr===void 0)?void 0:Sr.length)>0){var Or,lr;if((Di==null||((Or=Di.query)===null||Or===void 0)?void 0:Or.active)==="\u8D5B\u9898\u53D1\u5E03"){var Tn,vr=st==null||((Tn=st.competition_modules)===null||Tn===void 0)?void 0:Tn.find(function(pa){return pa.name==="\u8D5B\u9898\u53D1\u5E03"});if(vr){Bi(vr);return}}Bi(st==null||((lr=st.competition_modules)===null||lr===void 0)?void 0:lr[0])}},[st]);function Bi(Sr){return Fn.apply(this,arguments)}function Fn(){return Fn=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:if(ze(Or.id),je=Or.id,br(Or),!(Or.module_type==="entrance")){vr.next=9;break}return vr.next=6,tr({type:"competitions/getItem",payload:{url:Or.module_url,module_type:"entrance"}});case 6:lr=vr.sent,vr.next=12;break;case 9:return vr.next=11,tr({type:"competitions/getItem",payload:{url:Or.module_url}});case 11:lr=vr.sent;case 12:zt(!1),gn(!1),pt(!1),fr(lr),Wr(!1),Sn(!1),wr(Or.module_type),Or.module_type==="chart"?(zt(!0),sr(!1),Ba()):Or.module_type==="certificate"?(gn(!0),zt(!1),sr(!1),ba()):Or.module_type==="md_tab"?(pt(!0),sr(!1),localStorage.setItem("issee","2"),zt(!1),gn(!1),ca()):Or.module_type==="md_shixun"?(Wr(!0),sr(!1),ca()):Or.module_type==="entrance"?(Sn(!0),sr(!1),ca()):(sr(!0),localStorage.setItem("issee","1"));case 20:case"end":return vr.stop()}},Sr)})),Fn.apply(this,arguments)}function Pn(Sr,Or,lr){return ai.apply(this,arguments)}function ai(){return ai=Object(o.a)(r.a.mark(function Sr(Or,lr,Tn){var vr,pa;return r.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:if(Or.stopPropagation(),Object(fe.e)(tr)){Kn.next=3;break}return Kn.abrupt("return");case 3:if(!(st!=null&&st.is_authentication&&!(qt!=null&&(vr=qt.userInfo)!==null&&vr!==void 0&&vr.authentication))){Kn.next=6;break}return tr({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),Kn.abrupt("return");case 6:if(!(st!=null&&st.enroll_url)){Kn.next=9;break}return Object(Ut.O)(st==null?void 0:st.enroll_url),Kn.abrupt("return");case 9:if(!(Tn==="ismodel")){Kn.next=23;break}if(!(lr.member_of_course===!0)){Kn.next=14;break}Object(Ut.O)("/classrooms/".concat(lr.course_id)),Kn.next=21;break;case 14:if(lr.invite_code){Kn.next=17;break}return u.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"),Kn.abrupt("return");case 17:return Kn.next=19,tr({type:"competitions/addApplytojoincourse",payload:{invite_code:lr.invite_code,student:1}});case 19:pa=Kn.sent,pa.status===0&&Object(Ut.O)("/classrooms/".concat(lr.course_id));case 21:Kn.next=27;break;case 23:if(!(rr.enrolled===!0)){Kn.next=26;break}return Object(Ut.O)(Tn),Kn.abrupt("return");case 26:Dn(!0);case 27:case"end":return Kn.stop()}},Sr)})),ai.apply(this,arguments)}function Ba(){return wa.apply(this,arguments)}function wa(){return wa=Object(o.a)(r.a.mark(function Sr(){return r.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return lr.t0=fn,lr.next=3,tr({type:"competitions/ChartRules",payload:{identifier:xt}});case 3:return lr.t1=lr.sent,lr.next=6,(0,lr.t0)(lr.t1);case 6:case"end":return lr.stop()}},Sr)})),wa.apply(this,arguments)}function la(Sr){return ua.apply(this,arguments)}function ua(){return ua=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,tr({type:"competitions/Charts",payload:{identifier:xt,stage_id:Or}});case 2:lr=vr.sent,fr(lr);case 4:case"end":return vr.stop()}},Sr)})),ua.apply(this,arguments)}function ka(Sr){return _a.apply(this,arguments)}function _a(){return _a=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return hn(!0),vr.next=3,tr({type:"competitions/Results",payload:Object(L.a)({identifier:xt,stage_id:Or==null?void 0:Or.id},Or)});case 3:lr=vr.sent,fr(lr),hn(!1);case 6:case"end":return vr.stop()}},Sr)})),_a.apply(this,arguments)}function La(Sr){return Wa.apply(this,arguments)}function Wa(){return Wa=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return hn(!0),vr.next=3,tr({type:"competitions/Results",payload:Object(L.a)({identifier:xt,stage_id:Or==null?void 0:Or.id,module_type:"entrance"},Or)});case 3:lr=vr.sent,fr(lr),hn(!1);case 6:case"end":return vr.stop()}},Sr)})),Wa.apply(this,arguments)}function Xa(Sr){return Ma.apply(this,arguments)}function Ma(){return Ma=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,tr({type:"competitions/Results",payload:{identifier:xt,stage_id:Or}});case 2:if(lr=vr.sent,!(localStorage.getItem("issee")==="1")){vr.next=5;break}return vr.abrupt("return");case 5:fr(lr);case 6:case"end":return vr.stop()}},Sr)})),Ma.apply(this,arguments)}function ca(){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(o.a)(r.a.mark(function Sr(){return r.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return lr.t0=Ir,lr.next=3,tr({type:"competitions/TabResults",payload:{identifier:xt,competition_module_id:je}});case 3:lr.t1=lr.sent,(0,lr.t0)(lr.t1);case 5:case"end":return lr.stop()}},Sr)})),Sa.apply(this,arguments)}function ba(){return da.apply(this,arguments)}function da(){return da=Object(o.a)(r.a.mark(function Sr(){var Or,lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,tr({type:"competitions/Prize",payload:{identifier:xt,user_id:qt==null||((Or=qt.userInfo)===null||Or===void 0)?void 0:Or.user_id}});case 2:lr=vr.sent,Me(lr);case 4:case"end":return vr.stop()}},Sr)})),da.apply(this,arguments)}function co(){return Ea.apply(this,arguments)}function Ea(){return Ea=Object(o.a)(r.a.mark(function Sr(){var Or,lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,tr({type:"competitions/Accounts",payload:{id:qt==null||((Or=qt.userInfo)===null||Or===void 0)?void 0:Or.user_id}});case 2:lr=vr.sent,Ee(lr);case 4:case"end":return vr.stop()}},Sr)})),Ea.apply(this,arguments)}function Ta(Sr){return fa.apply(this,arguments)}function fa(){return fa=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:if(Vn){vr.next=2;break}return vr.abrupt("return");case 2:if(ii(!1),!ha()){vr.next=5;break}return vr.abrupt("return");case 5:return vr.next=7,tr({type:"competitions/AddTeam",payload:{identifier:xt,name:Or}});case 7:lr=vr.sent,lr&&lr.status===0?(u.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),Mn(),gi(!1)):ii(!0);case 9:case"end":return vr.stop()}},Sr)})),fa.apply(this,arguments)}function ha(){var Sr,Or;if(qt!=null&&(Sr=qt.userInfo)!==null&&Sr!==void 0&&Sr.is_teacher){var lr;if(rr!=null&&(lr=rr.teacher_staff)!==null&&lr!==void 0&&lr.mutiple_limited&&(rr!=null&&rr.enrolled))return u.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ii(!0),!0}else{var Tn;if(rr!=null&&(Tn=rr.member_staff)!==null&&Tn!==void 0&&Tn.mutiple_limited&&(rr!=null&&rr.enrolled))return u.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ii(!0),!0}if(rr!=null&&rr.enroll_ended)return u.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),ii(!0),!0;if(qt!=null&&(Or=qt.userInfo)!==null&&Or!==void 0&&Or.is_teacher){if(!rr.teacher_staff)return u.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),ii(!0),!0}else if(!(rr!=null&&rr.member_staff))return u.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),ii(!0),!0}function $i(Sr){return na.apply(this,arguments)}function na(){return na=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:if(Vn){vr.next=2;break}return vr.abrupt("return");case 2:if(!ha()){vr.next=4;break}return vr.abrupt("return");case 4:return ii(!1),vr.next=7,tr({type:"competitions/JoinTeam",payload:{identifier:xt,invite_code:Or}});case 7:lr=vr.sent,lr&&lr.status===0?(u.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),Hn(!1),ii(!0),Mn()):ii(!0);case 9:case"end":return vr.stop()}},Sr)})),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(E.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),t.a.createElement(n.a.Item,null,st.name,st.sub_title?"-"+st.sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(d.a,{spinning:yr.effects["competitions/getHeader"]},t.a.createElement("div",{style:{height:"355px",width:"800px"}},(st==null?void 0:st.avatar_url)&&(st==null?void 0:st.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:X.a.IMG_SERVER+"/"+(st==null?void 0:st.avatar_url)}),!(st!=null&&st.avatar_url)&&(st==null?void 0:st.avatar_url)==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:X.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),t.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},t.a.createElement("p",{className:"".concat(O.a.titlesize)},st.name,st.sub_title?"-"+st.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"),st!=null&&st.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(st&&st.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(st&&st.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(st&&st.member_count).toLocaleString()))),t.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},t.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),st.start_time,"~",st.end_time),t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),st.enroll_end_time),st.competition_status==="ended"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,st.competition_status==="nearly_published"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,st.competition_status==="progressing"?t.a.createElement("p",{className:O.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"}},(st==null?void 0:st.mode)<=2&&rr.enrolled&&t.a.createElement(S.a,{onClick:function(Or){if((st==null?void 0:st.mode)===1){var lr;Bi((lr=st.competition_modules)===null||lr===void 0?void 0:lr.find(function(Tn){return Tn.module_type==="entrance"}))}else Pn(Or,st,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(st==null?void 0:st.mode)===2||(st==null?void 0:st.mode)===1&&((mt=st.competition_modules)===null||mt===void 0||((Ct=mt.filter(function(Sr){return Sr.module_type==="entrance"}))===null||Ct===void 0)?void 0:Ct.length)>0?"":"none"},className:O.a.buttonsize},(st==null?void 0:st.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(st==null?void 0:st.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),st.competition_status==="ended"?t.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,st.competition_status==="nearly_published"?t.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,st.competition_status!=="nearly_published"&&st.enroll_end&&st.competition_status!=="ended"?t.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,st.competition_status==="progressing"&&st.enroll_end!=!0?t.a.createElement(S.a,{type:"primary",disabled:rr.enrolled&&!st.need_attachment,className:O.a.buttonsize,onClick:function(Or){if(rr.enrolled&&st.need_attachment){var lr;(lr=ra.current)===null||lr===void 0||lr.handleVisible();return}Pn(Or,st,st.mode===2?"ismodel":st.personal?"personal":"/competitions/index/".concat(st.identifier,"/enroll"))}},rr.enrolled?st.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":st!=null&&st.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),qt.userInfo.real_name!="\u6E38\u5BA2"&&!(st!=null&&st.enroll_url)&&t.a.createElement("span",{onClick:function(Or){return Pn(Or,st,st.mode===2?"ismodel":st.personal?"personal":"/competitions/index/".concat(st.identifier,"/enroll"))},className:O.a.myteam},Object(zr.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),t.a.createElement("div",{className:O.a.bootmdetail},t.a.createElement("div",{className:O.a.flex1},t.a.createElement(p.a,{selectedKeys:["".concat(je)]},st&&st.competition_modules&&st.competition_modules.map(function(Sr,Or){if(Sr.module_type!="enroll")return t.a.createElement(p.a.Item,{className:O.a.menuItem,onClick:function(){if(Sr!=null&&Sr.is_authentication){if(!Object(fe.e)(tr))return;u.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Bi(Sr)},key:Sr.id},Sr.name)}))),t.a.createElement("div",{className:O.a.flex6,style:{padding:(jr||Tr)&&0}},Ur?t.a.createElement(Lt,{dispatch:tr,userid:qt==null||((It=qt.userInfo)===null||It===void 0)?void 0:It.user_id,Prize:ei,Accounts:Fe,getAccounts:co}):null,yt?t.a.createElement(Le,{HeaderDetail:st,userinfo:qt.userInfo,Editable:st==null||((Pt=st.permission)===null||Pt===void 0)?void 0:Pt.editable,getCharts:la,getChartRules:Ba,Selectkey:je,ChartRules:cn,ItemData:dr}):null,qe?t.a.createElement(ee,{ref:ra,StaffDetail:rr,HeaderDetail:st,userinfo:qt.userInfo,Editable:st==null||((Ht=st.permission)===null||Ht===void 0)?void 0:Ht.editable,ItemData:dr,setIssee:sr,ModelType:Zt,dispatch:tr}):null,!qe&&!jr&&!Tr&&!yt&&!Ur&&!Ze?t.a.createElement(Q,{userinfo:qt.userInfo,ModelType:Zt,getrightdatas:Bi,dispatch:tr,MenuItem:xr,setIssee:sr,identifier:xt,ItemData:dr}):null,Ze&&t.a.createElement(In,{dispatch:tr,StaffDetail:rr,userinfo:qt.userInfo,HeaderDetail:st,Editable:st==null||((Wt=st.permission)===null||Wt===void 0)?void 0:Wt.editable,getCharts:Xa,getChartRules:ca,Selectkey:je,ChartRules:Yt,ItemData:dr}),jr&&t.a.createElement(xi,{loading:xn,dispatch:tr,StaffDetail:rr,userinfo:qt.userInfo,HeaderDetail:st,Editable:st==null||((dt=st.permission)===null||dt===void 0)?void 0:dt.editable,getCharts:ka,getChartRules:ca,Selectkey:je,ChartRules:Yt,ItemData:dr}),Tr&&t.a.createElement(sa,{loading:xn,dispatch:tr,StaffDetail:rr,userinfo:qt.userInfo,HeaderDetail:st,Editable:st==null||((At=st.permission)===null||At===void 0)?void 0:At.editable,getCharts:La,getChartRules:ca,Selectkey:je,ChartRules:Yt,ItemData:dr}))),t.a.createElement(C.a,null),t.a.createElement(G,{getResults:Xa}),t.a.createElement(T.a,{visible:nn,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Kr(!1)}},t.a.createElement("div",{className:O.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(S.a,{type:"primary",onClick:function(){return Object(Ut.O)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(T.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:Wn,onCancel:function(){Dn(!1)},footer:!1},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.a.createElement(S.a,{type:"primary",style:{height:40},onClick:function(){Hn(!0),Dn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(S.a,{style:{height:40},onClick:function(){gi(!0),Dn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),di?t.a.createElement(Ii.a,{isjoin:di,setJoin:Hn,JoinTeams:$i}):null,Jn?t.a.createElement(qn.a,{isAddmodle:Jn,setIsAdd:gi,createTeam:Ta}):null)},ta=Y.default=Object(f.a)(function(Tt){var it=Tt.loading,mt=Tt.globalSetting,Ct=Tt.user;return{globalSetting:mt,loading:it,user:Ct}})(Vi)},GRuw:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("lPiR"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=g.algo,v=p.SHA256,S=p.SHA224=v.extend({_doReset:function(){this._hash=new P.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var b=v._doFinalize.call(this);return b.sigBytes-=4,b}});g.SHA224=v._createHelper(S),g.HmacSHA224=v._createHmacHelper(S)}(),L.SHA224})},GfqC:function(j,Y,D){"use strict";var L=D("q1tI"),g=D.n(L),T=D("TSYQ"),P=D.n(T);function p(K,U){var W="cannot "+K.method+" "+K.action+" "+U.status+"'",X=new Error(W);return X.status=U.status,X.method=K.method,X.url=K.action,X}function v(K){var U=K.responseText||K.response;if(!U)return U;try{return JSON.parse(U)}catch(W){return U}}function S(K){var U=new XMLHttpRequest;K.onProgress&&U.upload&&(U.upload.onprogress=function(fe){fe.total>0&&(fe.percent=fe.loaded/fe.total*100),K.onProgress(fe)});var W=new FormData;K.data&&Object.keys(K.data).forEach(function(ne){var fe=K.data[ne];if(Array.isArray(fe)){fe.forEach(function(me){W.append(ne+"[]",me)});return}W.append(ne,K.data[ne])}),K.file instanceof Blob?W.append(K.filename,K.file,K.file.name):W.append(K.filename,K.file),U.onerror=function(fe){K.onError(fe)},U.onload=function(){return U.status<200||U.status>=300?K.onError(p(K,U),v(U)):K.onSuccess(v(U),U)},U.open(K.method,K.action,!0),K.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var X=K.headers||{};return X["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(X).forEach(function(ne){X[ne]!==null&&U.setRequestHeader(ne,X[ne])}),U.send(W),{abort:function(){U.abort()}}}var b=+new Date,d=0;function l(){return"rc-upload-"+b+"-"+ ++d}function n(K,U){return K.indexOf(U,K.length-U.length)!==-1}var c=function(K,U){if(K&&U){var W=Array.isArray(U)?U:U.split(","),X=K.name||"",ne=K.type||"",fe=ne.replace(/\/.*$/,"");return W.some(function(me){var Ae=me.trim();return Ae.charAt(0)==="."?n(X.toLowerCase(),Ae.toLowerCase()):/\/\*$/.test(Ae)?fe===Ae.replace(/\/.*$/,""):ne===Ae})}return!0};function u(K,U){var W=K.createReader(),X=[];function ne(){W.readEntries(function(fe){var me=Array.prototype.slice.apply(fe);X=X.concat(me);var Ae=!me.length;Ae?U(X):ne()})}ne()}var o=function(U,W,X){var ne=function fe(me,Ae){Ae=Ae||"",me.isFile?me.file(function(De){X(De)&&(me.fullPath&&!De.webkitRelativePath&&(Object.defineProperties(De,{webkitRelativePath:{writable:!0}}),De.webkitRelativePath=me.fullPath.replace(/^\//,""),Object.defineProperties(De,{webkitRelativePath:{writable:!1}})),W([De]))}):me.isDirectory&&u(me,function(De){De.forEach(function(ye){fe(ye,""+Ae+me.name+"/")})})};U.forEach(function(fe){ne(fe.webkitGetAsEntry())})},h=o,m=Object.assign||function(K){for(var U=1;U=0)continue;if(!Object.prototype.hasOwnProperty.call(K,X))continue;W[X]=K[X]}return W}function w(K,U){if(!(K instanceof U))throw new TypeError("Cannot call a class as a function")}function E(K,U){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:K}function f(K,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);K.prototype=Object.create(U&&U.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(K,U):K.__proto__=U)}var k=function(U){return Object.keys(U).reduce(function(W,X){return(X.substr(0,5)==="data-"||X.substr(0,5)==="aria-"||X==="role")&&(W[X]=U[X]),W},{})},O=function(K){f(U,K);function U(){var W,X,ne,fe;w(this,U);for(var me=arguments.length,Ae=Array(me),De=0;De>>2]>>>24-k%4*8&255;t[E+k>>>2]|=O<<24-(E+k)%4*8}else for(var C=0;C>>2]=w[C>>>2];return this.sigBytes+=f,this},clamp:function(){var a=this.words,t=this.sigBytes;a[t>>>2]&=4294967295<<32-t%4*8,a.length=T.ceil(t/4)},clone:function(){var a=l.clone.call(this);return a.words=this.words.slice(0),a},random:function(a){for(var t=[],w=0;w>>2]>>>24-f%4*8&255;E.push((k>>>4).toString(16)),E.push((k&15).toString(16))}return E.join("")},parse:function(a){for(var t=a.length,w=[],E=0;E>>3]|=parseInt(a.substr(E,2),16)<<24-E%8*4;return new n.init(w,t/2)}},o=c.Latin1={stringify:function(a){for(var t=a.words,w=a.sigBytes,E=[],f=0;f>>2]>>>24-f%4*8&255;E.push(String.fromCharCode(k))}return E.join("")},parse:function(a){for(var t=a.length,w=[],E=0;E>>2]|=(a.charCodeAt(E)&255)<<24-E%4*8;return new n.init(w,t)}},h=c.Utf8={stringify:function(a){try{return decodeURIComponent(escape(o.stringify(a)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(a){return o.parse(unescape(encodeURIComponent(a)))}},m=d.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(a){typeof a=="string"&&(a=h.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(a){var t,w=this._data,E=w.words,f=w.sigBytes,k=this.blockSize,O=k*4,C=f/O;a?C=T.ceil(C):C=T.max((C|0)-this._minBufferSize,0);var x=C*k,y=T.min(x*4,f);if(x){for(var _=0;_=k?g:{done:!1,value:E[f++]}}}}d.fromArray=u;function o(E){return{next:function(){var f=E.next();return f.done?g:{done:!1,value:f.value}}}}d.fromNativeIterator=o;function h(E){return E?Array.isArray(E)?d.fromArray(E):E:d.empty()}d.from=h;function m(E,f){return{next:function(){var k=E.next();return k.done?g:{done:!1,value:f(k.value)}}}}d.map=m;function s(E,f){return{next:function(){for(;;){var k=E.next();if(k.done)return g;if(f(k.value))return{done:!1,value:k.value}}}}}d.filter=s;function r(E,f){for(var k=E.next();!k.done;k=E.next())f(k.value)}d.forEach=r;function a(E,f){f===void 0&&(f=Number.POSITIVE_INFINITY);var k=[];if(f===0)return k;for(var O=0,C=E.next();!C.done&&!(k.push(C.value),++O>=f);C=E.next());return k}d.collect=a;function t(){for(var E=[],f=0;f=E.length)return g;var O=E[k],C=O.next();return C.done?(k++,this.next()):C}}}d.concat=t;function w(E){return new P(E)}d.chain=w})(T||(T={}));var P=function(){function d(l){this.it=l}return d.prototype.next=function(){return this.it.next()},d}();function p(d){return Array.isArray(d)?T.fromArray(d):d||T.empty()}var v=function(){function d(l,n,c,u){n===void 0&&(n=0),c===void 0&&(c=l.length),u===void 0&&(u=n-1),this.items=l,this.start=n,this.end=c,this.index=u}return d.prototype.first=function(){return this.index=this.start,this.current()},d.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},d.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},d}(),S=function(d){L(l,d);function l(n,c,u,o){return c===void 0&&(c=0),u===void 0&&(u=n.length),o===void 0&&(o=c-1),d.call(this,n,c,u,o)||this}return l.prototype.current=function(){return d.prototype.current.call(this)},l.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},l.prototype.first=function(){return this.index=this.start,this.current()},l.prototype.last=function(){return this.index=this.end-1,this.current()},l.prototype.parent=function(){return null},l}(v),b=function(){function d(l,n){this.iterator=l,this.fn=n}return d.prototype.next=function(){return this.fn(this.iterator.next())},d}()},K3mO:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.Base,p=T.WordArray,v=g.algo,S=v.MD5,b=v.EvpKDF=P.extend({cfg:P.extend({keySize:128/32,hasher:S,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,l){for(var n,c=this.cfg,u=c.hasher.create(),o=p.create(),h=o.words,m=c.keySize,s=c.iterations;h.lengthOe)){ue.next=7;break}return T.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Oe/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ue.abrupt("return",!1);case 7:return H.push({name:ye.name,file:ye}),B(Object(P.a)(H)),I.onChange(H),ue.abrupt("return",!1);case 11:case"end":return ue.stop()}},De)}));function Ae(De){return me.apply(this,arguments)}return Ae}()},fe=function(){var me=Object(b.a)(c.a.mark(function Ae(De,ye){var Oe,xe,ue,le,re,pe,ee,te,ce;return c.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return ye.file_name=De.name,ee=De.name,Q.next=4,Object(h.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(V){return V.name===ee})].status="error",H[H.findIndex(function(V){return V.name===ee})].file.status="error",I.onChange(H),T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Q.abrupt("return");case 12:return W=new w.a({endpoint:te==null||((Oe=te.data)===null||Oe===void 0)?void 0:Oe.end_point,region:te==null||((xe=te.data)===null||xe===void 0)?void 0:xe.region,accessKeyId:te==null||((ue=te.data)===null||ue===void 0)?void 0:ue.access_key_id,accessKeySecret:te==null||((le=te.data)===null||le===void 0)?void 0:le.access_key_secret,bucket:te==null||((re=te.data)===null||re===void 0)?void 0:re.bucket,stsToken:te==null||((pe=te.data)===null||pe===void 0)?void 0:pe.security_token}),console.log(De,"file"),X(W),ce=Object(r.a)(),Q.abrupt("return",new Promise(function(V,Z){try{var be;W.multipartUpload("".concat(I.identifier,"/").concat(ce).concat(ee.indexOf(".")>-1?"."+ee.split(".").pop():""),new Blob([De.file],{type:De.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Te,Je,rt){try{console.log("\u8FDB\u5EA6",Te,Je,rt);var nt=H.findIndex(function(at){return at.name===ee});H[nt].file.percent=Te*100,H[nt].tempCheckpoint=Je,B(Object(P.a)(H))}catch(at){}},checkpoint:H[H.findIndex(function(ge){return ge.name===ee})].tempCheckpoint,callback:{customValue:{id:ee+""},url:te==null||((be=te.data)===null||be===void 0)?void 0:be.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(h.e)(ye)}}).then(function(ge){var Te,Je=H.findIndex(function(ht){return ht.name===ee}),rt="done";if(((Te=ge.data)===null||Te===void 0?void 0:Te.status)===0){var nt;De.response=(nt=ge.data)===null||nt===void 0?void 0:nt.data;var at=H.findIndex(function(ht){return ht.name===ee});H[at].status="done",H[at].file.status="done"}else{var ct;T.b.warn((ct=ge.data)===null||ct===void 0?void 0:ct.message),rt="error"}H[Je].status=rt,H[Je].file.status=rt,I.onChange(H),V(ge==null?void 0:ge.data)}).catch(function(ge){H[H.findIndex(function(Te){return Te.name===ee})].status="error",H[H.findIndex(function(Te){return Te.name===ee})].file.status="error",T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),B(Object(P.a)(H)),I.onChange(H),Z(ge),console.log("err:",ge)})}catch(ge){}}));case 17:case"end":return Q.stop()}},Ae)}));return function(De,ye){return me.apply(this,arguments)}}();return Object(u.useEffect)(function(){H.every(function(me){return me==="done"||me==="error"})&&I.onComplete(H)},[H]),Object(u.useEffect)(function(){if(M){var me;(me=W)===null||me===void 0||me.cancel()}},[M]),Object(u.useEffect)(function(){I.uploading&&H.map(function(){var me=Object(b.a)(c.a.mark(function Ae(De){var ye,Oe;return c.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!((!De.status||De.status==="error")&&!M)){ue.next=6;break}return De.status="uploading",De.file.status="uploading",ue.next=5,fe(De,{login:_==null||((ye=_.userInfo)===null||ye===void 0)?void 0:ye.login,container_type:I.container_type,container_id:I.container_id,description:I.description});case 5:Oe=ue.sent;case 6:case"end":return ue.stop()}},Ae)}));return function(Ae){return me.apply(this,arguments)}}())},[I.uploading]),o.a.createElement(E,Object(L.a)({},ne,{height:I.height,className:I.className}),o.a.createElement("p",{className:"ant-upload-hint"},I.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Y.b=Object(a.a)(function(x){var y=x.loading,_=x.globalSetting,M=x.user;return{globalSetting:_,loading:y.models.competitions,user:M}})(C)},KmYQ:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.pad.ZeroPadding={pad:function(g,T){var P=T*4;g.clamp(),g.sigBytes+=P-(g.sigBytes%P||P)},unpad:function(g){for(var T=g.words,P=g.sigBytes-1,P=g.sigBytes-1;P>=0;P--)if(T[P>>>2]>>>24-P%4*8&255){g.sigBytes=P+1;break}}},L.pad.ZeroPadding})},LdHM:function(j,Y,D){"use strict";D.d(Y,"b",function(){return t}),D.d(Y,"a",function(){return E});var L=D("1OyB"),g=D("vuIU"),T=D("Ji7U"),P=D("LK+K"),p=D("q1tI"),v=D("rePB"),S=D("Ff2n"),b=D("ODXe"),d=D("4IlW"),l=D("bX4T"),n=D("YrtM"),c=D("TSYQ"),u=D.n(c),o=D("+nKL"),h=D("8OUc"),m=function(X,ne){var fe=X.prefixCls,me=X.id,Ae=X.flattenOptions,De=X.childrenAsData,ye=X.values,Oe=X.searchValue,xe=X.multiple,ue=X.defaultActiveFirstOption,le=X.height,re=X.itemHeight,pe=X.notFoundContent,ee=X.open,te=X.menuItemSelectedIcon,ce=X.virtual,q=X.onSelect,Q=X.onToggleOpen,V=X.onActiveValue,Z=X.onScroll,be=X.onMouseEnter,ge="".concat(fe,"-item"),Te=Object(n.a)(function(){return Ae},[ee,Ae],function(lt,Ue){return Ue[0]&<[1]!==Ue[1]}),Je=p.useRef(null),rt=function(Ue){Ue.preventDefault()},nt=function(Ue){Je.current&&Je.current.scrollTo({index:Ue})},at=function(Ue){for(var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ie=Te.length,Ce=0;Ce1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(W).map(function(ne,fe){if(!p.isValidElement(ne)||!ne.type)return null;var me=ne.type.isSelectOptGroup,Ae=ne.key,De=ne.props,ye=De.children,Oe=Object(S.a)(De,["children"]);return X||!me?O(ne):Object(f.a)(Object(f.a)({key:"__RC_SELECT_GRP__".concat(Ae===null?fe:Ae,"__"),label:Ae},Oe),{},{options:C(ye)})}).filter(function(ne){return ne})}var x=D("2Qr1"),y=D("qNPg"),_=D("U8pU"),M=D("Kwbf"),I=D("WKfj");function N(W){var X=W.mode,ne=W.options,fe=W.children,me=W.backfill,Ae=W.allowClear,De=W.placeholder,ye=W.getInputElement,Oe=W.showSearch,xe=W.onSearch,ue=W.defaultOpen,le=W.autoFocus,re=W.labelInValue,pe=W.value,ee=W.inputValue,te=W.optionLabelProp,ce=X==="multiple"||X==="tags",q=Oe!==void 0?Oe:ce||X==="combobox",Q=ne||C(fe);if(Object(M.a)(X!=="tags"||Q.every(function(ge){return!ge.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),X==="tags"||X==="combobox"){var V=Q.some(function(ge){return ge.options?ge.options.some(function(Te){return typeof("value"in Te?Te.value:Te.key)=="number"}):typeof("value"in ge?ge.value:ge.key)=="number"});Object(M.a)(!V,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(X!=="combobox"||!te,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(X==="combobox"||!me,"`backfill` only works with `combobox` mode."),Object(M.a)(X==="combobox"||!ye,"`getInputElement` only work with `combobox` mode."),Object(M.b)(X!=="combobox"||!ye||!Ae||!De,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xe&&!q&&X!=="combobox"&&X!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!ue||le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),pe!=null){var Z=Object(I.d)(pe);Object(M.a)(!re||Z.every(function(ge){return Object(_.a)(ge)==="object"&&("key"in ge||"value"in ge)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!ce||Array.isArray(pe),"`value` should be array when `mode` is `multiple` or `tags`")}if(fe){var be=null;Object(k.a)(fe).some(function(ge){if(!p.isValidElement(ge)||!ge.type)return!1;var Te=ge.type;if(Te.isSelectOption)return!1;if(Te.isSelectOptGroup){var Je=Object(k.a)(ge.props.children).every(function(rt){return!p.isValidElement(rt)||!ge.type||rt.type.isSelectOption?!0:(be=rt.type,!1)});return!Je}return be=Te,!0}),be&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(be.displayName||be.name||be,"`.")),Object(M.a)(ee===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=N,H=Object(y.a)({prefixCls:"rc-select",components:{optionList:r},convertChildrenToData:C,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:G,fillOptionsWithMissingValue:x.a}),B=function(W){Object(T.a)(ne,W);var X=Object(P.a)(ne);function ne(){var fe;return Object(L.a)(this,ne),fe=X.apply(this,arguments),fe.selectRef=p.createRef(),fe.focus=function(){fe.selectRef.current.focus()},fe.blur=function(){fe.selectRef.current.blur()},fe}return Object(g.a)(ne,[{key:"render",value:function(){return p.createElement(H,Object.assign({ref:this.selectRef},this.props))}}]),ne}(p.Component);B.Option=t,B.OptGroup=E;var K=B,U=Y.c=K},M8RZ:function(j,Y,D){"use strict";D.d(Y,"a",function(){return d});var L=D("fWQN"),g=D("mtLc"),T=D("yKVA"),P=D("879j"),p=D("q1tI"),v=D.n(p),S=D("i8i4"),b=D.n(S),d=function(l){Object(T.a)(c,l);var n=Object(P.a)(c);function c(u){var o;Object(L.a)(this,c),o=n.call(this,u);var h=window.document;return o.node=h.createElement("div"),h.body.appendChild(o.node),o}return Object(g.a)(c,[{key:"render",value:function(){var o=this.props.children;return Object(S.createPortal)(o,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(v.a.Component)},MI8n:function(j,Y,D){"use strict";D.d(Y,"b",function(){return v}),D.d(Y,"a",function(){return d}),D.d(Y,"e",function(){return l}),D.d(Y,"d",function(){return n}),D.d(Y,"c",function(){return c}),D.d(Y,"f",function(){return u});var L=D("/cxE"),g=D("C/vA"),T=D("pmY6"),P=D("24hK"),p=function(){var o=function(h,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,r){s.__proto__=r}||function(s,r){for(var a in r)r.hasOwnProperty(a)&&(s[a]=r[a])},o(h,m)};return function(h,m){o(h,m);function s(){this.constructor=h}h.prototype=m===null?Object.create(m):(s.prototype=m.prototype,new s)}}(),v;(function(o){o.None=function(){return T.a.None};function h(G){return function(H,B,K){B===void 0&&(B=null);var U=!1,W;return W=G(function(X){return U?void 0:(W?W.dispose():U=!0,H.call(B,X))},null,K),U&&W.dispose(),W}}o.once=h;function m(G,H){return E(function(B,K,U){return K===void 0&&(K=null),G(function(W){return B.call(K,H(W))},null,U)})}o.map=m;function s(G,H){return E(function(B,K,U){return K===void 0&&(K=null),G(function(W){H(W),B.call(K,W)},null,U)})}o.forEach=s;function r(G,H){return E(function(B,K,U){return K===void 0&&(K=null),G(function(W){return H(W)&&B.call(K,W)},null,U)})}o.filter=r;function a(G){return G}o.signal=a;function t(){for(var G=[],H=0;H1)&&me.fire(De),fe=0},B)})},onLastListenerRemove:function(){W.dispose()}});return me.event}o.debounce=f;function k(G){var H=new Date().getTime();return m(h(G),function(B){return new Date().getTime()-H})}o.stopwatch=k;function O(G){var H=!0,B;return r(G,function(K){var U=H||K!==B;return H=!1,B=K,U})}o.latch=O;function C(G,H,B){H===void 0&&(H=!1),B===void 0&&(B=[]);var K=B.slice(),U=G(function(ne){K?K.push(ne):X.fire(ne)}),W=function(){K&&K.forEach(function(ne){return X.fire(ne)}),K=null},X=new d({onFirstListenerAdd:function(){U||(U=G(function(ne){return X.fire(ne)}))},onFirstListenerDidAdd:function(){K&&(H?setTimeout(W):W())},onLastListenerRemove:function(){U&&U.dispose(),U=null}});return X.event}o.buffer=C;var x=function(){function G(H){this.event=H}return G.prototype.map=function(H){return new G(m(this.event,H))},G.prototype.forEach=function(H){return new G(s(this.event,H))},G.prototype.filter=function(H){return new G(r(this.event,H))},G.prototype.reduce=function(H,B){return new G(w(this.event,H,B))},G.prototype.latch=function(){return new G(O(this.event))},G.prototype.debounce=function(H,B,K,U){return B===void 0&&(B=100),K===void 0&&(K=!1),new G(f(this.event,H,B,K,U))},G.prototype.on=function(H,B,K){return this.event(H,B,K)},G.prototype.once=function(H,B,K){return h(this.event)(H,B,K)},G}();function y(G){return new x(G)}o.chain=y;function _(G,H,B){B===void 0&&(B=function(ne){return ne});var K=function(){for(var ne=[],fe=0;fe0?new b(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(o.prototype,"event",{get:function(){var h=this;return this._event||(this._event=function(m,s,r){h._listeners||(h._listeners=new P.a);var a=h._listeners.isEmpty();a&&h._options&&h._options.onFirstListenerAdd&&h._options.onFirstListenerAdd(h);var t=h._listeners.push(s?[m,s]:m);a&&h._options&&h._options.onFirstListenerDidAdd&&h._options.onFirstListenerDidAdd(h),h._options&&h._options.onListenerDidAdd&&h._options.onListenerDidAdd(h,m,s);var w;h._leakageMon&&(w=h._leakageMon.check(h._listeners.size));var E;return E={dispose:function(){if(w&&w(),E.dispose=o._noop,!h._disposed&&(t(),h._options&&h._options.onLastListenerRemove)){var f=h._listeners&&!h._listeners.isEmpty();f||h._options.onLastListenerRemove(h)}}},r instanceof T.b?r.add(E):Array.isArray(r)&&r.push(E),E}),this._event},enumerable:!0,configurable:!0}),o.prototype.fire=function(h){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new P.a);for(var m=this._listeners.iterator(),s=m.next();!s.done;s=m.next())this._deliveryQueue.push([s.value,h]);for(;this._deliveryQueue.size>0;){var r=this._deliveryQueue.shift(),a=r[0],t=r[1];try{typeof a=="function"?a.call(void 0,t):a[0].call(a[1],t)}catch(w){Object(L.e)(w)}}}},o.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},o._noop=function(){},o}(),l=function(o){p(h,o);function h(m){var s=o.call(this,m)||this;return s._isPaused=0,s._eventQueue=new P.a,s._mergeFn=m&&m.merge,s}return h.prototype.pause=function(){this._isPaused++},h.prototype.resume=function(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){var m=this._eventQueue.toArray();this._eventQueue.clear(),o.prototype.fire.call(this,this._mergeFn(m))}else for(;!this._isPaused&&this._eventQueue.size!==0;)o.prototype.fire.call(this,this._eventQueue.shift())},h.prototype.fire=function(m){this._listeners&&(this._isPaused!==0?this._eventQueue.push(m):o.prototype.fire.call(this,m))},h}(d),n=function(){function o(){var h=this;this.hasListeners=!1,this.events=[],this.emitter=new d({onFirstListenerAdd:function(){return h.onFirstListenerAdd()},onLastListenerRemove:function(){return h.onLastListenerRemove()}})}return Object.defineProperty(o.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),o.prototype.add=function(h){var m=this,s={event:h,listener:null};this.events.push(s),this.hasListeners&&this.hook(s);var r=function(){m.hasListeners&&m.unhook(s);var a=m.events.indexOf(s);m.events.splice(a,1)};return Object(T.h)(Object(g.a)(r))},o.prototype.onFirstListenerAdd=function(){var h=this;this.hasListeners=!0,this.events.forEach(function(m){return h.hook(m)})},o.prototype.onLastListenerRemove=function(){var h=this;this.hasListeners=!1,this.events.forEach(function(m){return h.unhook(m)})},o.prototype.hook=function(h){var m=this;h.listener=h.event(function(s){return m.emitter.fire(s)})},o.prototype.unhook=function(h){h.listener&&h.listener.dispose(),h.listener=null},o.prototype.dispose=function(){this.emitter.dispose()},o}(),c=function(){function o(){this.buffers=[]}return o.prototype.wrapEvent=function(h){var m=this;return function(s,r,a){return h(function(t){var w=m.buffers[m.buffers.length-1];w?w.push(function(){return s.call(r,t)}):s.call(r,t)},void 0,a)}},o.prototype.bufferEvents=function(h){var m=[];this.buffers.push(m);var s=h();return this.buffers.pop(),m.forEach(function(r){return r()}),s},o}(),u=function(){function o(){var h=this;this.listening=!1,this.inputEvent=v.None,this.inputEventListener=T.a.None,this.emitter=new d({onFirstListenerDidAdd:function(){h.listening=!0,h.inputEventListener=h.inputEvent(h.emitter.fire,h.emitter)},onLastListenerRemove:function(){h.listening=!1,h.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(o.prototype,"input",{set:function(h){this.inputEvent=h,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=h(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),o.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},o}()},MlIO:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(g){var T=L,P=T.lib,p=P.Base,v=P.WordArray,S=T.x64={},b=S.Word=p.extend({init:function(l,n){this.high=l,this.low=n}}),d=S.WordArray=p.extend({init:function(l,n){l=this.words=l||[],n!=g?this.sigBytes=n:this.sigBytes=l.length*8},toX32:function(){for(var l=this.words,n=l.length,c=[],u=0;u=q.length?V:q[be]})}function p(ce){return ce.replace(/[<>&]/g,function(q){switch(q){case"<":return"<";case">":return">";case"&":return"&";default:return q}})}function v(ce){return ce.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function S(ce,q){q===void 0&&(q=" ");var Q=b(ce,q);return d(Q,q)}function b(ce,q){if(!ce||!q)return ce;var Q=q.length;if(Q===0||ce.length===0)return ce;for(var V=0;ce.indexOf(q,V)===V;)V=V+Q;return ce.substring(V)}function d(ce,q){if(!ce||!q)return ce;var Q=q.length,V=ce.length;if(Q===0||V===0)return ce;for(var Z=V,be=-1;!(be=ce.lastIndexOf(q,Z-1),be===-1||be+Q!==Z);){if(be===0)return"";Z=be}return ce.substring(0,Z)}function l(ce){return ce.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function n(ce,q){if(ce.length0?ce.indexOf(q,Q)===Q:Q===0?ce===q:!1}function u(ce,q,Q){if(Q===void 0&&(Q={}),!ce)throw new Error("Cannot create regex from empty string");q||(ce=v(ce)),Q.wholeWord&&(/\B/.test(ce.charAt(0))||(ce="\\b"+ce),/\B/.test(ce.charAt(ce.length-1))||(ce=ce+"\\b"));var V="";return Q.global&&(V+="g"),Q.matchCase||(V+="i"),Q.multiline&&(V+="m"),Q.unicode&&(V+="u"),new RegExp(ce,V)}function o(ce){if(ce.source==="^"||ce.source==="^$"||ce.source==="$"||ce.source==="^\\s*$")return!1;var q=ce.exec("");return!!(q&&ce.lastIndex===0)}function h(ce){return(ce.global?"g":"")+(ce.ignoreCase?"i":"")+(ce.multiline?"m":"")+(ce.unicode?"u":"")}function m(ce){for(var q=0,Q=ce.length;q=0;Q--){var V=ce.charCodeAt(Q);if(V!==32&&V!==9)return Q}return-1}function a(ce,q){return ceq?1:0}function t(ce,q){for(var Q=Math.min(ce.length,q.length),V=0;Vq.length?1:0}function w(ce){return ce>=97&&ce<=122}function E(ce){return ce>=65&&ce<=90}function f(ce){return w(ce)||E(ce)}function k(ce,q){return ce.length===q.length&&O(ce,q)}function O(ce,q,Q){Q===void 0&&(Q=ce.length);for(var V=0;Vce.length?!1:O(ce,q,Q)}function x(ce,q){var Q,V=Math.min(ce.length,q.length);for(Q=0;Q1){var V=ce.charCodeAt(q-2);if(_(V))return(V-55296<<10)+(Q-56320)+65536}return Q}function G(ce,q){var Q=ee.getInstance(),V=q,Z=ce.length,be=I(ce,Z,q);q+=be>=65536?2:1;for(var ge=Q.getGraphemeBreakType(be);q=65536?2:1,ge=Je}return q-V}function H(ce,q){var Q=ee.getInstance(),V=q,Z=N(ce,q);q-=Z>=65536?2:1;for(var be=Q.getGraphemeBreakType(Z);q>0;){var ge=N(ce,q),Te=Q.getGraphemeBreakType(ge);if(pe(Te,be))break;q-=ge>=65536?2:1,be=Te}return V-q}var B=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function K(ce){return B.test(ce)}var U=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function W(ce){return U.test(ce)}var X=/^[\t\n\r\x20-\x7E]*$/;function ne(ce){return X.test(ce)}function fe(ce){for(var q=0,Q=ce.length;q=11904&&ce<=55215||ce>=63744&&ce<=64255||ce>=65281&&ce<=65374}function Ae(ce){return ce>=127462&&ce<=127487||ce>=9728&&ce<=10175||ce>=127744&&ce<=128591||ce>=128640&&ce<=128764||ce>=128992&&ce<=129003||ce>=129280&&ce<=129535||ce>=129648&&ce<=129651||ce>=129656&&ce<=129666||ce>=129680&&ce<=129685}var De=String.fromCharCode(65279);function ye(ce){return!!(ce&&ce.length>0&&ce.charCodeAt(0)===65279)}function Oe(ce){return btoa(encodeURIComponent(ce))}function xe(ce,q){for(var Q="",V=0;VQ[3*Z+1])Z=2*Z+1;else return Q[3*Z+2];return 0},ce._INSTANCE=null,ce}();function te(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}},NFKh:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("MlIO"),D("F+F2"),D("qM6L"),D("ETIr"),D("wbyO"),D("cv67"),D("3y9D"),D("lPiR"),D("GRuw"),D("1uat"),D("uGsb"),D("5hvy"),D("ELcG"),D("WYAk"),D("e7zE"),D("K3mO"),D("OLod"),D("ALsQ"),D("9OqN"),D("qu8F"),D("S6kV"),D("gb/T"),D("qBft"),D("oRuE"),D("jO9C"),D("KmYQ"),D("uGxW"),D("bQjk"),D("wZgz"),D("pA7S"),D("w7YG"),D("E4JC"),D("PVpz"))})(this,function(L){return L})},NLgs:function(j,Y,D){"use strict";D.d(Y,"e",function(){return w}),D.d(Y,"f",function(){return E}),D.d(Y,"d",function(){return k}),D.d(Y,"c",function(){return O}),D.d(Y,"a",function(){return C}),D.d(Y,"b",function(){return x});var L=D("miYZ"),g=D("tsqr"),T=D("9og8"),P=D("2qtc"),p=D("kLXV"),v=D("WmNS"),S=D.n(v),b=D("q1tI"),d=D.n(b),l=D("9kvl"),n=D("xKgJ"),c=D("1vsH"),u=D("RCxd"),o=D("mOS8"),h=D.n(o),m=D("1ZF9"),s=D.n(m),r=D("WdTA"),a=D.n(r),t=D("m3rI"),w=function(_){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(E(_)&&f(M))},E=function(_){return Object(n.p)()?!0:(_({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},f=function(){var _,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,I=Object(l.c)()._store.getState(),N=I.user;return(_=N.userInfo)!==null&&_!==void 0&&_.profile_completed?!0:(p.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:M?"\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(){l.d.push("/account/profile/edit")}}),!1)},k=function(){var _,M=Object(l.c)()._store.getState(),I=M.user;return(_=I.userInfo)!==null&&_!==void 0&&_.professional_certification?!0:(p.a.confirm({title:"\u63D0\u793A",centered:!0,content:d.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.O)("/account/certification")}}),!1)},O=function(){return Object(n.a)()?!0:(p.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:d.a.createElement("div",{className:"tc",style:{marginLeft:-38}},d.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),d.a.createElement("img",{src:Object(n.t)()?a.a:"".concat(t.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},C=function(_,M){return _?!0:(p.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:d.a.createElement("div",null,d.a.createElement("p",null,M||"\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"),d.a.createElement("div",{style:{marginLeft:"110px"}},d.a.createElement("img",{src:s.a,width:200}),d.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(c.O)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},x=function(_){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",I=Object(l.c)()._store.getState(),N=I.shixunsDetail.detail;return(N==null?void 0:N.public)===2||(N==null?void 0:N.public)===1||(N==null?void 0:N.shixun_status)===3?(p.a.info({centered:!0,icon:d.a.createElement(u.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:d.a.createElement("div",{className:"tc",style:{marginLeft:-38}},d.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},d.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(N==null?void 0:N.public)===2?"\u5DF2\u516C\u5F00":(N==null?void 0:N.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",M,"\u3002"),d.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),d.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:h.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(N==null?void 0:N.shixun_status)===2?(p.a.confirm({centered:!0,icon:d.a.createElement(u.a,null),title:"\u63D0\u793A",content:d.a.createElement("div",null,d.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",M,"\u3002"),d.a.createElement("br",null),d.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(){p.a.confirm({width:440,centered:!0,icon:d.a.createElement(u.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 H=Object(T.a)(S.a.mark(function K(){var U;return S.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,_({type:"shixunsDetail/cancelRelease",payload:{id:N==null?void 0:N.identifier}});case 2:U=X.sent,U.status!==401&&(g.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),_({type:"shixunsDetail/getShixunsDetail",payload:{id:N==null?void 0:N.identifier}}),_({type:"practiceSetting/getCommonData",payload:{id:N==null?void 0:N.identifier}}));case 4:case"end":return X.stop()}},K)}));function B(){return H.apply(this,arguments)}return B}()})}}),!0):!1}},NnUe:function(j,Y,D){j.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"}},NvD2:function(j,Y,D){"use strict";D.d(Y,"a",function(){return v});var L=D("Kwbf");function g(S,b){var d=new Set;return S.forEach(function(l){b.has(l)||d.add(l)}),d}function T(S){var b=S||{},d=b.disabled,l=b.disableCheckbox,n=b.checkable;return!!(d||l)||n===!1}function P(S,b,d,l){for(var n=new Set(S),c=new Set,u=0;u<=d;u+=1){var o=b.get(u)||new Set;o.forEach(function(r){var a=r.key,t=r.node,w=r.children,E=w===void 0?[]:w;n.has(a)&&!l(t)&&E.filter(function(f){return!l(f.node)}).forEach(function(f){n.add(f.key)})})}for(var h=new Set,m=d;m>=0;m-=1){var s=b.get(m)||new Set;s.forEach(function(r){var a=r.parent,t=r.node;if(l(t)||!r.parent||h.has(r.parent.key))return;if(l(r.parent.node)){h.add(a.key);return}var w=!0,E=!1;(a.children||[]).filter(function(f){return!l(f.node)}).forEach(function(f){var k=f.key,O=n.has(k);w&&!O&&(w=!1),!E&&(O||c.has(k))&&(E=!0)}),w&&n.add(a.key),E&&c.add(a.key),h.add(a.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(g(c,n))}}function p(S,b,d,l,n){for(var c=new Set(S),u=new Set(b),o=0;o<=l;o+=1){var h=d.get(o)||new Set;h.forEach(function(a){var t=a.key,w=a.node,E=a.children,f=E===void 0?[]:E;!c.has(t)&&!u.has(t)&&!n(w)&&f.filter(function(k){return!n(k.node)}).forEach(function(k){c.delete(k.key)})})}u=new Set;for(var m=new Set,s=l;s>=0;s-=1){var r=d.get(s)||new Set;r.forEach(function(a){var t=a.parent,w=a.node;if(n(w)||!a.parent||m.has(a.parent.key))return;if(n(a.parent.node)){m.add(t.key);return}var E=!0,f=!1;(t.children||[]).filter(function(k){return!n(k.node)}).forEach(function(k){var O=k.key,C=c.has(O);E&&!C&&(E=!1),!f&&(C||u.has(O))&&(f=!0)}),E||c.delete(t.key),f&&u.add(t.key),m.add(t.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(u,c))}}function v(S,b,d,l){var n=[],c;l?c=l:c=T;var u=new Set(S.filter(function(s){var r=!!d[s];return r||n.push(s),r})),o=new Map,h=0;Object.keys(d).forEach(function(s){var r=d[s],a=r.level,t=o.get(a);t||(t=new Set,o.set(a,t)),t.add(r),h=Math.max(h,a)}),Object(L.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var m;return b===!0?m=P(u,o,h,c):m=p(u,b.halfCheckedKeys,o,h,c),m}},OLod:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("K3mO"))})(this,function(L){L.lib.Cipher||function(g){var T=L,P=T.lib,p=P.Base,v=P.WordArray,S=P.BufferedBlockAlgorithm,b=T.enc,d=b.Utf8,l=b.Base64,n=T.algo,c=n.EvpKDF,u=P.Cipher=S.extend({cfg:p.extend(),createEncryptor:function(y,_){return this.create(this._ENC_XFORM_MODE,y,_)},createDecryptor:function(y,_){return this.create(this._DEC_XFORM_MODE,y,_)},init:function(y,_,M){this.cfg=this.cfg.extend(M),this._xformMode=y,this._key=_,this.reset()},reset:function(){S.reset.call(this),this._doReset()},process:function(y){return this._append(y),this._process()},finalize:function(y){y&&this._append(y);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function y(_){return typeof _=="string"?x:k}return function(_){return{encrypt:function(M,I,N){return y(I).encrypt(_,M,I,N)},decrypt:function(M,I,N){return y(I).decrypt(_,M,I,N)}}}}()}),o=P.StreamCipher=u.extend({_doFinalize:function(){var y=this._process(!0);return y},blockSize:1}),h=T.mode={},m=P.BlockCipherMode=p.extend({createEncryptor:function(y,_){return this.Encryptor.create(y,_)},createDecryptor:function(y,_){return this.Decryptor.create(y,_)},init:function(y,_){this._cipher=y,this._iv=_}}),s=h.CBC=function(){var y=m.extend();y.Encryptor=y.extend({processBlock:function(M,I){var N=this._cipher,G=N.blockSize;_.call(this,M,I,G),N.encryptBlock(M,I),this._prevBlock=M.slice(I,I+G)}}),y.Decryptor=y.extend({processBlock:function(M,I){var N=this._cipher,G=N.blockSize,H=M.slice(I,I+G);N.decryptBlock(M,I),_.call(this,M,I,G),this._prevBlock=H}});function _(M,I,N){var G,H=this._iv;H?(G=H,this._iv=g):G=this._prevBlock;for(var B=0;B>>2]&255;y.sigBytes-=_}},t=P.BlockCipher=u.extend({cfg:u.cfg.extend({mode:s,padding:a}),reset:function(){var y;u.reset.call(this);var _=this.cfg,M=_.iv,I=_.mode;this._xformMode==this._ENC_XFORM_MODE?y=I.createEncryptor:(y=I.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==y?this._mode.init(this,M&&M.words):(this._mode=y.call(I,this,M&&M.words),this._mode.__creator=y)},_doProcessBlock:function(y,_){this._mode.processBlock(y,_)},_doFinalize:function(){var y,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),y=this._process(!0)):(y=this._process(!0),_.unpad(y)),y},blockSize:128/32}),w=P.CipherParams=p.extend({init:function(y){this.mixIn(y)},toString:function(y){return(y||this.formatter).stringify(this)}}),E=T.format={},f=E.OpenSSL={stringify:function(y){var _,M=y.ciphertext,I=y.salt;return I?_=v.create([1398893684,1701076831]).concat(I).concat(M):_=M,_.toString(l)},parse:function(y){var _,M=l.parse(y),I=M.words;return I[0]==1398893684&&I[1]==1701076831&&(_=v.create(I.slice(2,4)),I.splice(0,4),M.sigBytes-=16),w.create({ciphertext:M,salt:_})}},k=P.SerializableCipher=p.extend({cfg:p.extend({format:f}),encrypt:function(y,_,M,I){I=this.cfg.extend(I);var N=y.createEncryptor(M,I),G=N.finalize(_),H=N.cfg;return w.create({ciphertext:G,key:M,iv:H.iv,algorithm:y,mode:H.mode,padding:H.padding,blockSize:y.blockSize,formatter:I.format})},decrypt:function(y,_,M,I){I=this.cfg.extend(I),_=this._parse(_,I.format);var N=y.createDecryptor(M,I).finalize(_.ciphertext);return N},_parse:function(y,_){return typeof y=="string"?_.parse(y,this):y}}),O=T.kdf={},C=O.OpenSSL={execute:function(y,_,M,I){I||(I=v.random(64/8));var N=c.create({keySize:_+M}).compute(y,I),G=v.create(N.words.slice(_),M*4);return N.sigBytes=_*4,w.create({key:N,iv:G,salt:I})}},x=P.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:C}),encrypt:function(y,_,M,I){I=this.cfg.extend(I);var N=I.kdf.execute(M,y.keySize,y.ivSize);I.iv=N.iv;var G=k.encrypt.call(this,y,_,N.key,I);return G.mixIn(N),G},decrypt:function(y,_,M,I){I=this.cfg.extend(I),_=this._parse(_,I.format);var N=I.kdf.execute(M,y.keySize,y.ivSize,_.salt);I.iv=N.iv;var G=k.decrypt.call(this,y,_,N.key,I);return G}})}()})},OZM5:function(j,Y,D){"use strict";D.d(Y,"b",function(){return l}),D.d(Y,"a",function(){return n}),D.d(Y,"k",function(){return c}),D.d(Y,"h",function(){return u}),D.d(Y,"i",function(){return o}),D.d(Y,"g",function(){return h}),D.d(Y,"c",function(){return m}),D.d(Y,"d",function(){return s}),D.d(Y,"j",function(){return t}),D.d(Y,"e",function(){return w}),D.d(Y,"f",function(){return E});var L=D("KQm4"),g=D("U8pU"),T=D("Ff2n"),P=D("q1tI"),p=D.n(P),v=D("Kwbf"),S=D("WaYH"),b=.25,d=2;function l(f,k){var O=f.slice(),C=O.indexOf(k);return C>=0&&O.splice(C,1),O}function n(f,k){var O=f.slice();return O.indexOf(k)===-1&&O.push(k),O}function c(f){return f.split("-")}function u(f,k){return"".concat(f,"-").concat(k)}function o(f){return f&&f.type&&f.type.isTreeNode}function h(f,k){var O=[f],C=k[f];function x(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];y.forEach(function(_){var M=_.key,I=_.children;O.push(M),x(I)})}return x(C.children),O}function m(f,k){var O=f.clientY,C=k.selectHandle.getBoundingClientRect(),x=C.top,y=C.bottom,_=C.height,M=Math.max(_*b,d);return O<=x+M?-1:O>=y-M?1:0}function s(f,k){if(!f)return;var O=k.multiple;return O?f.slice():f.length?[f[0]]:f}var r=function(k){return k};function a(f,k){if(!f)return[];var O=k||{},C=O.processProps,x=C===void 0?r:C,y=Array.isArray(f)?f:[f];return y.map(function(_){var M=_.children,I=Object(T.a)(_,["children"]),N=a(M,k);return p.a.createElement(S.a,Object.assign({},x(I)),N)})}function t(f){if(!f)return null;var k;if(Array.isArray(f))k={checkedKeys:f,halfCheckedKeys:void 0};else if(Object(g.a)(f)==="object")k={checkedKeys:f.checked||void 0,halfCheckedKeys:f.halfChecked||void 0};else return Object(v.a)(!1,"`checkedKeys` is not an array or an object"),null;return k}function w(f,k){var O=new Set;function C(x){if(O.has(x))return;var y=k[x];if(!y)return;O.add(x);var _=y.parent,M=y.node;if(M.disabled)return;_&&C(_.key)}return(f||[]).forEach(function(x){C(x)}),Object(L.a)(O)}function E(f){var k={};return Object.keys(f).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(k[O]=f[O])}),k}},Ot1p:function(j,Y,D){"use strict";var L=D("2qtc"),g=D("kLXV"),T=D("rAM+"),P=D("miYZ"),p=D("tsqr"),v=D("9og8"),S=D("tJVT"),b=D("jrin"),d=D("WmNS"),l=D.n(d),n=D("q1tI"),c=D.n(n),u=D("VrN/"),o=D.n(u),h=D("bdgK"),m=D("p77/"),s=D("Bd2K"),r=D("ELLl"),a=D("19Vz"),t=D("lZu9"),w=D("+NIl"),E=D("kSUc"),f=D("9Bee"),k=function($e){var bt=$e.value,gt=bt===void 0?"":bt,Ut=$e.className,Nt=$e.showTextOnly,hr=$e.showLines,mr=$e.style,St=mr===void 0?{}:mr,Yr=Object(n.useMemo)(function(){return""},[gt]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:Yr}}))},O=D("0Owb"),C=D("dejd"),x=D("C+DQ"),y=D("1vsH"),_=D("m3rI"),M=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function I($e){var bt=$e.onActionCallback,gt=$e.title,Ut=$e.icon,Nt=$e.actionName,hr=$e.className,mr=hr===void 0?"":hr,St=$e.children;function Yr(){bt(Nt)}return c.a.createElement("a",{title:gt,className:mr,onClick:Yr},c.a.createElement("i",{className:"md-iconfont ".concat(Ut)}),St)}var N=function($e){var bt=$e.watch,gt=$e.showNullButton,Ut=$e.onActionCallback,Nt=$e.fullScreen,hr=$e.insertTemp,mr=$e.hidetoolBar,St=$e.uuid,Yr=$e.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(y.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(y.D)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(_.a.PROXY_SERVER)));var Jr=[].concat(M,[{title:"".concat(bt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(bt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!mr&&Jr.map(function(Hr,un){return c.a.createElement("li",{key:un},Hr.actionName?c.a.createElement(I,Object(O.a)({},Hr,{onActionCallback:Ut})):c.a.createElement("span",{className:"v-line"}))}),gt?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:Ut},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,hr&&c.a.createElement("li",null,c.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(hr),onActionCallback:Ut},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(Nt?"icon-shrink":"icon-enlarge"),title:Nt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ut})))},G=D("M8RZ"),H=D("+L6B"),B=D("2/Rp"),K=D("y8nQ"),U=D("Vl3Y"),W=D("5NDa"),X=D("5rEg"),ne={labelCol:{span:4},wrapperCol:{span:20}},fe=function($e){var bt=$e.callback,gt=$e.onCancel;function Ut(Nt){bt(Nt)}return c.a.createElement(U.a,Object(O.a)({},ne,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ut}),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},c.a.createElement(X.a,null)),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},c.a.createElement(X.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(B.a,{type:"ghost",onClick:gt},"\u53D6\u6D88")))},me=D("7ahc"),Ae=D("k1fw"),De=D("HmJG"),ye=D("BjJ7"),Oe=U.a.useForm,xe={width:280,marginRight:10},ue={labelCol:{span:5},wrapperCol:{span:19}},le=function($e){var bt=$e.callback,gt=$e.onCancel,Ut=Oe(),Nt=Object(S.a)(Ut,1),hr=Nt[0],mr=Object(n.useRef)();function St(Hr){bt(Object(Ae.a)(Object(Ae.a)({},Hr),{},{name:mr.current}))}function Yr(Hr,un){hr.setFieldsValue({src:"/api/attachments/".concat(Hr.id,"?type=").concat(Hr.content_type),type:un.type})}function Jr(Hr){var un=Hr.target.files[0];mr.current=un.name,pe(un,Yr)}return c.a.createElement(U.a,Object(O.a)({form:hr},ue,{className:"upload-image-panel",onFinish:St}),c.a.createElement(U.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},c.a.createElement(X.a,{style:xe})),c.a.createElement(re,{onFileChange:Jr}))),c.a.createElement(U.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},c.a.createElement(X.a,{style:{width:264}})),c.a.createElement(U.a.Item,{style:{textAlign:"right"}},c.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(B.a,{type:"ghost",onClick:gt},"\u53D6\u6D88")))};function re($e){var bt=$e.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:bt}))}function pe($e,bt){if(!$e)throw new String("\u6CA1\u6709\u6587\u4EF6");var gt=new FormData;gt.append("editormd-image-file",$e),gt.append("file_param_name","editormd-image-file"),gt.append("byxhr","true");var Ut=new window.XMLHttpRequest;Ut.withCredentials=!0,Ut.addEventListener("load",function(Nt){bt(JSON.parse(Nt.target.responseText),$e)},!1),Ut.addEventListener("error",function(Nt){console.error(Nt)},!1),Ut.open("POST","".concat(ye.a,"/api/attachments.json")),Ut.send(gt)}var ee=D("giR+"),te=D("fyUT"),ce=D("7Kak"),q=D("9yH6"),Q=q.a.Group,V={margin:"0 8px"},Z=function($e){var bt=$e.callback,gt=$e.onCancel;function Ut(Nt){bt(Nt)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ut},c.a.createElement("div",{className:"flex-container"},c.a.createElement("span",{style:V},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:V},"\u884C\u6570"),c.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(te.a,null)),c.a.createElement("span",{style:V},"\u5217\u6570"),c.a.createElement(U.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}},c.a.createElement("span",{style:V},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(U.a.Item,{name:"align"},c.a.createElement(Q,null,c.a.createElement(q.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(q.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(q.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(q.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(B.a,{type:"ghost",onClick:gt},"\u53D6\u6D88")))},be=D("ErOA"),ge=D("7Cbv"),Te="link",Je="upload-image",rt="code-block",nt="add-table",at="------------",ct={default:at,left:":".concat(at),center:":".concat(at,":"),right:"".concat(at,":")},ht=D("9VGf"),He,Re;function tt(){}var ft=0,Qe=1e4,lt="\u2581",Ue=` **\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 Le($e){return/^\d+$/.test($e)?"".concat($e,"px"):$e}var Ie=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ce=Ie?"Cmd":"Ctrl",Se=["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"],ke=(He={},Object(b.a)(He,Ce+"-B","bold"),Object(b.a)(He,Ce+"-I","italic"),He),Ne=(Re={},Object(b.a)(Re,Te,"\u6DFB\u52A0\u94FE\u63A5"),Object(b.a)(Re,rt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(b.a)(Re,Je,"\u6DFB\u52A0\u6587\u4EF6"),Object(b.a)(Re,nt,"\u6DFB\u52A0\u8868\u683C"),Re),et=Y.a=function($e){var bt=$e.defaultValue,gt=bt===void 0?"":bt,Ut=$e.onChange,Nt=$e.width,hr=Nt===void 0?"100%":Nt,mr=$e.height,St=mr===void 0?400:mr,Yr=$e.miniToolbar,Jr=Yr===void 0?!1:Yr,Hr=$e.isFocus,un=Hr===void 0?!1:Hr,Ar=$e.watch,vn=$e.insertTemp,mn=$e.mode,Kt=mn===void 0?"markdown":mn,or=$e.id,Xt=or===void 0?"markdown-editor-id":or,gr=$e.showResizeBar,Xr=gr===void 0?!1:gr,kn=$e.noStorage,Ln=kn===void 0?!1:kn,tn=$e.showNullButton,ur=tn===void 0?!1:tn,Xn=$e.hidetoolBar,hi=Xn===void 0?!1:Xn,$n=$e.fullScreen,Zr=$n===void 0?!1:$n,Bn=$e.onBlur,si=$e.onCMBeforeChange,li=$e.onFullScreen,wt=$e.className,$t=wt===void 0?"":wt,en=$e.disablePaste,Cn=en===void 0?!1:en,_n=$e.placeholder,On=_n===void 0?"":_n,ae=$e.values,z=ae===void 0?"":ae,$=Object(n.useState)(null),ie=Object(S.a)($,2),de=ie[0],se=ie[1],Ke=Object(n.useState)(gt),Rt=Object(S.a)(Ke,2),Vt=Rt[0],Er=Rt[1],Lt=Object(n.useState)(Ar),zr=Object(S.a)(Lt,2),Br=zr[0],En=zr[1],ui=Object(n.useState)(Zr),Ei=Object(S.a)(ui,2),In=Ei[0],Li=Ei[1],qi=Object(n.useState)(""),ni=Object(S.a)(qi,2),Ti=ni[0],xi=ni[1],Fi=Object(n.useState)(0),Ci=Object(S.a)(Fi,2),Gi=Ci[0],Mi=Ci[1],oa=Object(n.useState)(St),sa=Object(S.a)(oa,2),Ii=sa[0],qn=sa[1],Vi=Object(n.useState)(!1),ta=Object(S.a)(Vi,2),Tt=ta[0],it=ta[1],mt=Object(n.useRef)(Object(ge.a)()),Ct=Object(n.useRef)(!1),It=Object(n.useRef)(),Pt=Object(n.useRef)(),Ht=Object(n.useRef)(),Wt=Object(n.useRef)(),dt=Object(n.useRef)(),At=function(){var Et=Object(v.a)(l.a.mark(function _t(){var xt,Jt;return l.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,Object(be.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:mt.current}});case 2:Jt=dr.sent,Jt!=null&&(xt=Jt.attachments)!==null&&xt!==void 0&&xt.length&&(console.log("cm:",de,Pt),Jt.attachments.map(function(fr){fr.content_type.indexOf("image")>-1?de.replaceSelection("![,](/api/attachments/".concat(fr.id,"?type=").concat(fr.content_type,")")):fr.content_type.indexOf("video")>-1?de.replaceSelection('')):fr.content_type.indexOf("pdf")>-1?de.replaceSelection('
    ').concat(fr.name,"")):de.replaceSelection("[".concat(fr.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(fr.id,"?type=").concat(fr.content_type,")"))}));case 4:case"end":return dr.stop()}},_t)}));return function(){return Et.apply(this,arguments)}}();Object(n.useEffect)(function(){Er(z),de==null||de.setValue(z)},[z]),Object(n.useEffect)(function(){li==null||li(In)},[In]),Object(n.useEffect)(function(){if(Pt.current){var Et=o.a.fromTextArea(Pt.current,{mode:Kt,lineNumbers:!Jr,lineWrapping:!0,value:gt,autoCloseTags:!0,autoCloseBrackets:!0});un&&Et.focus();function _t(xt,Jt){if(Cn){Jt.preventDefault();return}var pr=Jt.clipboardData;if(pr){var dr=pr.types.toString(),fr=pr.items;if(dr==="Files"||pr.types.indexOf("Files")>-1){if(Jt.preventDefault(),Kt=="stex")return;try{var Dr,an=fr[1];((Dr=fr[0])===null||Dr===void 0?void 0:Dr.kind)==="file"&&(an=fr[0]);var qe=an.getAsFile(),sr=qe.name.split(".").pop();pe(qe,function(Nr){if(Nr.id){var rn,xr,br;(qe==null||((rn=qe.type)===null||rn===void 0)?void 0:rn.indexOf("image"))>-1?Et.replaceSelection("![,](/api/attachments/".concat(Nr.id,"?type=").concat(Nr.content_type,")")):(qe==null||((xr=qe.type)===null||xr===void 0)?void 0:xr.indexOf("video"))>-1?Et.replaceSelection('')):(qe==null||((br=qe.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?Et.replaceSelection('').concat(qe.name,"")):Se.includes(sr)?Et.replaceSelection('').concat(qe.name,"")):Et.replaceSelection("[".concat(qe.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(Nr.content_type,")"))}else(Nr==null?void 0:Nr.status)===401&&(document.location.href="/user/login")})}catch(Nr){p.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Et.on("paste",_t),Et.on("dragleave",function(xt,Jt){Ht.current.classList.remove("mouse-hover-md")}),Et.on("dragover",function(xt,Jt){Ht.current.classList.add("mouse-hover-md")}),Et.on("drop",function(xt,Jt){Ht.current.classList.add("mouse-hover-md");var pr;if(pr=Jt.dataTransfer.files,pr.length>0){Jt.preventDefault(),Jt.stopPropagation();for(var dr=function(an){var qe=pr[an],sr=qe.name.split(".").pop();pe(qe,function(Nr){if(Nr.id){var rn,xr,br;(qe==null||((rn=qe.type)===null||rn===void 0)?void 0:rn.indexOf("image"))>-1?Et.replaceSelection("![,](/api/attachments/".concat(Nr.id,"?type=").concat(Nr.content_type,")")):(qe==null||((xr=qe.type)===null||xr===void 0)?void 0:xr.indexOf("video"))>-1?Et.replaceSelection('')):(qe==null||((br=qe.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?Et.replaceSelection('').concat(qe.name,"")):Se.includes(sr)?Et.replaceSelection('').concat(qe.name,"")):Et.replaceSelection("[".concat(qe.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(Nr.content_type,")"))}else(Nr==null?void 0:Nr.status)===401&&(document.location.href="/user/login")})},fr=0;fr0||fr.target.offsetWidth>0)&&(Dt(),de.setSize("100%","100%"),de.refresh())}}catch(Dr){pr.e(Dr)}finally{pr.f()}});return xt.observe(Pt.current.parentElement),xt}if(de){var _t=Et();return function(){_t.unobserve(Pt.current.parentElement)}}},[de,Dt]),Object(n.useEffect)(function(){if(de){for(var Et=[],_t=function(){var fr=Jt[xt];pr=Object(S.a)(fr,2);var Dr=pr[0],an=pr[1],qe=Object(b.a)({},Dr,function(){yr(an)});Et.push(qe),de.addKeyMap(qe)},xt=0,Jt=Object.entries(ke);xt0){var Et=new Date().getTime(),_t=window.sessionStorage.getItem(Xt);Et>=Gi+Qe&&(!_t||_t!==Vt)&&(window.sessionStorage.setItem(Xt,Vt),it(!0))}},Qe),Object(n.useEffect)(function(){En(Ar)},[de,Ar]),Object(n.useEffect)(function(){de&&(un&&de.focus())},[de,un]),Object(n.useEffect)(function(){if(Br&&de){var Et=de.getScrollerElement();function _t(xt){var Jt=xt.target;if(dt.current){var pr=Jt.scrollTop/Jt.scrollHeight;dt.current.scrollTop=dt.current.scrollHeight*pr}}return Et.addEventListener("scroll",_t),function(){Et.removeEventListener("scroll",_t)}}},[de,Br]),Object(n.useEffect)(function(){if(de&&si){function Et(_t,xt){si(_t,xt)}return de.on("beforeChange",Et),function(){de.off("beforeChange",Et)}}},[de,si]),Object(n.useEffect)(function(){if(de&&Bn){function Et(){Bn(de.getValue())}return de.on("blur",Et),function(){de.off("blur",Et)}}},[de,Bn]),Object(n.useEffect)(function(){if(de){function Et(_t){var xt=_t.getValue();Er(xt),Mi(new Date().getTime()),_t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ut&&Ut(xt)}return de.on("change",Et),function(){de.off("change",Et)}}},[de,Ut]),Object(n.useEffect)(function(){de&&(gt==null?(de.setValue(""),Er("")):gt!==de.getValue()&&(de.setValue(gt),Er(gt),de.setCursor(de.lineCount(),0)))},[de,gt]);var yr=Object(n.useCallback)(function(Et){var _t=de.getCursor(),xt=de.getSelection(),Jt=xt.split(` `);switch(Et){case"bold":return de.replaceSelection("**"+xt+"**"),xt===""&&de.setCursor(_t.line,_t.ch+2),de.focus();case"italic":return de.replaceSelection("*"+xt+"*"),xt===""&&de.setCursor(_t.line,_t.ch+1),de.focus();case"code":return de.replaceSelection("`"+xt+"`"),xt===""&&de.setCursor(_t.line,_t.ch+1),de.focus();case"inline-latex":return de.replaceSelection("`$$"+xt+"$$`"),xt===""&&de.setCursor(_t.line,_t.ch+3),de.focus();case"latex":return de.replaceSelection("```latex\n"+xt+"\n```"),de.setCursor(_t.line+1,xt.length+1),de.focus();case"line-break":return de.replaceSelection(`
    `),de.focus();case"list-ul":return xt===""?de.replaceSelection("- "+xt):de.replaceSelection(Jt.map(function(pr){return pr===""?"":"- ".concat(pr)}).join(` `)),de.focus();case"list-ol":return xt===""?de.replaceSelection("1. "+xt):de.replaceSelection(Jt.map(function(pr,dr){return pr===""?"":"".concat(dr+1,". ").concat(pr)}).join(` `)),de.focus();case"add-null-ch":return xt===""&&de.setCursor(_t.line,_t.ch+1),de.replaceSelection(lt),de.focus();case"inster-template-1":return xt===""&&de.setCursor(_t.line,_t.ch),de.replaceSelection(Ue),de.focus();case"eraser":return de.setValue(""),de.focus();case"trigger-watch":return En(!Br),de.focus();case"trigger-full-screen":return Li(!In),de.focus();case Te:xi(Te);return;case rt:xi(rt);return;case Je:xi(Je);return;case nt:xi(nt);return;default:throw new Error}},[de,Br,In]),tr=Object(n.useCallback)(function(Et){xi("");switch(Ti){case Te:var _t=Et.title,xt=Et.link;return de.replaceSelection("[".concat(_t,"](").concat(xt,")")),de.focus();case rt:var Jt=Et.language,pr=Et.content;return de.replaceSelection(["```"+Jt,pr,"```"].join(` `)),de.focus();case Je:var dr=Et.src,fr=Et.alt,Dr=Et.name;return dr.indexOf("type=image")>-1?de.replaceSelection("![ ".concat(fr||""," ]( ").concat(dr,' "').concat(fr||"",'" )')):dr.indexOf("type=application/pdf")>-1?de.replaceSelection('').concat(Dr,"")):de.replaceSelection('').concat(Dr,"")),de.focus();case nt:for(var an=Et.row,qe=Et.col,sr=Et.align,Nr=` `,rn=0;rn300&&(Dr=300);var an=St+Dr+"px";qn(an)}}return Et.addEventListener("mousedown",Jt),document.addEventListener("mousemove",dr),document.addEventListener("mouseup",pr),function(){Et.removeEventListener("mousedown",Jt),document.removeEventListener("mousemove",dr),document.removeEventListener("mouseup",pr)}}},[de,Wt]),Object(n.useEffect)(function(){qn(St)},[St]);var nr=Le(hr),cr=Le(Ii),st={width:nr,height:cr},Lr=Object(n.useMemo)(function(){if(Gi){var Et=new Date(Gi),_t=Et.getHours(),xt=Et.getMinutes(),Jt=Et.getSeconds();return _t=_t<10?"0"+_t:_t,xt=xt<10?"0"+xt:xt,Jt=Jt<10?"0"+Jt:Jt,"".concat(_t,":").concat(xt,":").concat(Jt)}return 0},[Gi]);function Fr(){window.sessionStorage.removeItem(Xt),it(!1),Mi(0)}function Cr(){it(!1),Mi(0),de.setValue(window.sessionStorage.getItem(Xt))}function rr(Et,_t){var xt=de.getValue();xt=xt.replace(Et,_t),Er(xt),de==null||de.setValue(xt)}return c.a.createElement(n.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ht},c.a.createElement("div",{className:"markdown-editor-container ".concat($t," ").concat(Br?"on-preview":""," ").concat(Jr?"mini":""," ").concat(In?"full-screen":""),style:st},c.a.createElement(N,{insertTemp:vn,watch:Br,fullScreen:In,showNullButton:ur,onActionCallback:yr,hidetoolBar:hi,uuid:mt.current,setOpenPhones:function(){Ct.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:Pt,placeholder:On})),Br?c.a.createElement("div",{ref:dt,className:"preview-container"},Kt==="stex"&&c.a.createElement(k,{value:Vt}),Kt!=="stex"&&c.a.createElement(f.a,{edit:!0,value:Vt,replaces:rr})):null))),Xr?c.a.createElement("a",{ref:Wt,className:"editor-resize"}):null,c.a.createElement(G.a,null,Ne[Ti]?c.a.createElement(g.a,{centered:!0,title:Ne[Ti],visible:!0,onCancel:Gt,footer:null},qt):null))}},PVpz:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.StreamCipher,p=g.algo,v=[],S=[],b=[],d=p.RabbitLegacy=P.extend({_doReset:function(){var n=this._key.words,c=this.cfg.iv,u=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 h=0;h<4;h++)l.call(this);for(var h=0;h<8;h++)o[h]^=u[h+4&7];if(c){var m=c.words,s=m[0],r=m[1],a=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,t=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,w=a>>>16|t&4294901760,E=t<<16|a&65535;o[0]^=a,o[1]^=w,o[2]^=t,o[3]^=E,o[4]^=a,o[5]^=w,o[6]^=t,o[7]^=E;for(var h=0;h<4;h++)l.call(this)}},_doProcessBlock:function(n,c){var u=this._X;l.call(this),v[0]=u[0]^u[5]>>>16^u[3]<<16,v[1]=u[2]^u[7]>>>16^u[5]<<16,v[2]=u[4]^u[1]>>>16^u[7]<<16,v[3]=u[6]^u[3]>>>16^u[1]<<16;for(var o=0;o<4;o++)v[o]=(v[o]<<8|v[o]>>>24)&16711935|(v[o]<<24|v[o]>>>8)&4278255360,n[c+o]^=v[o]},blockSize:128/32,ivSize:64/32});function l(){for(var n=this._X,c=this._C,u=0;u<8;u++)S[u]=c[u];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 u=0;u<8;u++){var o=n[u]+c[u],h=o&65535,m=o>>>16,s=((h*h>>>17)+h*m>>>15)+m*m,r=((o&4294901760)*o|0)+((o&65535)*o|0);b[u]=s^r}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=P._createHelper(d)}(),L.RabbitLegacy})},QDVR:function(j,Y,D){"use strict";D.d(Y,"e",function(){return g}),D.d(Y,"d",function(){return T}),D.d(Y,"c",function(){return S}),D.d(Y,"b",function(){return b}),D.d(Y,"a",function(){return l});var L=function(){var n=function(c,u){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,h){o.__proto__=h}||function(o,h){for(var m in h)h.hasOwnProperty(m)&&(o[m]=h[m])},n(c,u)};return function(c,u){n(c,u);function o(){this.constructor=c}c.prototype=u===null?Object.create(u):(o.prototype=u.prototype,new o)}}();function g(n){var c=[];return n.forEach(function(u){return c.push(u)}),c}function T(n){var c=[];return n.forEach(function(u,o){return c.push(o)}),c}var P=function(){function n(){this._value="",this._pos=0}return n.prototype.reset=function(c){return this._value=c,this._pos=0,this},n.prototype.next=function(){return this._pos+=1,this},n.prototype.hasNext=function(){return this._pos0)h.left||(h.left=new v,h.left.segment=o.value()),h=h.left;else if(m<0)h.right||(h.right=new v,h.right.segment=o.value()),h=h.right;else if(o.hasNext())o.next(),h.mid||(h.mid=new v,h.mid.segment=o.value()),h=h.mid;else break}var s=h.value;return h.value=u,h.key=c,s},n.prototype.get=function(c){for(var u=this._iter.reset(c),o=this._root;o;){var h=u.cmp(o.segment);if(h>0)o=o.left;else if(h<0)o=o.right;else if(u.hasNext())u.next(),o=o.mid;else break}return o?o.value:void 0},n.prototype.findSubstr=function(c){for(var u=this._iter.reset(c),o=this._root,h=void 0;o;){var m=u.cmp(o.segment);if(m>0)o=o.left;else if(m<0)o=o.right;else if(u.hasNext())u.next(),h=o.value||h,o=o.mid;else break}return o&&o.value||h},n.prototype.forEach=function(c){this._forEach(this._root,c)},n.prototype._forEach=function(c,u){c&&(this._forEach(c.left,u),c.value&&u(c.value,c.key),this._forEach(c.mid,u),this._forEach(c.right,u))},n}(),b=function(){function n(){this.map=new Map,this.ignoreCase=!1}return n.prototype.set=function(c,u){this.map.set(this.toKey(c),u)},n.prototype.get=function(c){return this.map.get(this.toKey(c))},n.prototype.toKey=function(c){var u=c.toString();return this.ignoreCase&&(u=u.toLowerCase()),u},n}(),d=function(){function n(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return n.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),n.prototype.get=function(c,u){u===void 0&&(u=0);var o=this._map.get(c);return o?(u!==0&&this.touch(o,u),o.value):void 0},n.prototype.set=function(c,u,o){o===void 0&&(o=0);var h=this._map.get(c);if(h)h.value=u,o!==0&&this.touch(h,o);else{h={key:c,value:u,next:void 0,previous:void 0};switch(o){case 0:this.addItemLast(h);break;case 1:this.addItemFirst(h);break;case 2:this.addItemLast(h);break;default:this.addItemLast(h);break}this._map.set(c,h),this._size++}},n.prototype.delete=function(c){return!!this.remove(c)},n.prototype.remove=function(c){var u=this._map.get(c);return u?(this._map.delete(c),this.removeItem(u),this._size--,u.value):void 0},n.prototype.forEach=function(c,u){for(var o=this._head;o;)u?c.bind(u)(o.value,o.key,this):c(o.value,o.key,this),o=o.next},n.prototype.trimOld=function(c){if(c>=this.size)return;if(c===0){this.clear();return}for(var u=this._head,o=this.size;u&&o>c;)this._map.delete(u.key),u=u.next,o--;this._head=u,this._size=o,u&&(u.previous=void 0)},n.prototype.addItemFirst=function(c){if(!this._head&&!this._tail)this._tail=c;else if(this._head)c.next=this._head,this._head.previous=c;else throw new Error("Invalid list");this._head=c},n.prototype.addItemLast=function(c){if(!this._head&&!this._tail)this._head=c;else if(this._tail)c.previous=this._tail,this._tail.next=c;else throw new Error("Invalid list");this._tail=c},n.prototype.removeItem=function(c){if(c===this._head&&c===this._tail)this._head=void 0,this._tail=void 0;else if(c===this._head){if(!c.next)throw new Error("Invalid list");c.next.previous=void 0,this._head=c.next}else if(c===this._tail){if(!c.previous)throw new Error("Invalid list");c.previous.next=void 0,this._tail=c.previous}else{var u=c.next,o=c.previous;if(!u||!o)throw new Error("Invalid list");u.previous=o,o.next=u}c.next=void 0,c.previous=void 0},n.prototype.touch=function(c,u){if(!this._head||!this._tail)throw new Error("Invalid list");if(u!==1&&u!==2)return;if(u===1){if(c===this._head)return;var o=c.next,h=c.previous;c===this._tail?(h.next=void 0,this._tail=h):(o.previous=h,h.next=o),c.previous=void 0,c.next=this._head,this._head.previous=c,this._head=c}else if(u===2){if(c===this._tail)return;var o=c.next,h=c.previous;c===this._head?(o.previous=void 0,this._head=o):(o.previous=h,h.next=o),c.next=void 0,c.previous=this._tail,this._tail.next=c,this._tail=c}},n.prototype.toJSON=function(){var c=[];return this.forEach(function(u,o){c.push([o,u])}),c},n}(),l=function(n){L(c,n);function c(u,o){o===void 0&&(o=1);var h=n.call(this)||this;return h._limit=u,h._ratio=Math.min(Math.max(0,o),1),h}return c.prototype.get=function(u){return n.prototype.get.call(this,u,2)},c.prototype.peek=function(u){return n.prototype.get.call(this,u,0)},c.prototype.set=function(u,o){n.prototype.set.call(this,u,o,2),this.checkTrim()},c.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},c}(d)},RxwV:function(j,Y,D){"use strict";var L=D("q1tI"),g=D("uciX"),T=D("2W6z"),P=D.n(T),p=D("4IlW"),v=D("uK0f"),S=D.n(v);function b(Oe,xe){if(Oe===xe)return!0;if(!Oe||!xe)return!1;var ue=Oe.length;if(xe.length!==ue)return!1;for(var le=0;le0;(rt||pe.isLeaf===!1)&&(Te+=" ".concat(ce,"-menu-item-expand"),pe.loading||(Je=L.createElement("span",{className:"".concat(ce,"-menu-item-expand-icon")},Q))),q==="hover"&&(rt||pe.isLeaf===!1)&&(ge={onMouseEnter:this.delayOnSelect.bind(this,Z),onMouseLeave:this.delayOnSelect.bind(this),onClick:Z}),this.isActiveOption(pe,ee)&&(Te+=" ".concat(ce,"-menu-item-active"),ge.ref=this.saveMenuItem(ee)),pe.disabled&&(Te+=" ".concat(ce,"-menu-item-disabled"));var nt=null;pe.loading&&(Te+=" ".concat(ce,"-menu-item-loading"),nt=V||null);var at="";return"title"in pe?at=pe.title:typeof pe[this.getFieldName("label")]=="string"&&(at=pe[this.getFieldName("label")]),L.createElement("li",Object.assign({key:pe[this.getFieldName("value")],className:Te,title:at},ge,{role:"menuitem",onMouseDown:function(ht){return ht.preventDefault()}}),pe[this.getFieldName("label")],Je,nt)}},{key:"getActiveOptions",value:function(pe){var ee=this,te=this.props.options,ce=pe||this.props.activeValue;return S()(te,function(q,Q){return q[ee.getFieldName("value")]===ce[Q]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var pe=this,ee=this.props.options,te=this.getActiveOptions().map(function(ce){return ce[pe.getFieldName("children")]}).filter(function(ce){return!!ce});return te.unshift(ee),te}},{key:"delayOnSelect",value:function(pe){for(var ee=this,te=arguments.length,ce=new Array(te>1?te-1:0),q=1;q=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Oe,le))continue;ue[le]=Oe[le]}}return ue}function C(Oe,xe){if(Oe==null)return{};var ue={},le=Object.keys(Oe),re,pe;for(pe=0;pe=0)continue;ue[re]=Oe[re]}return ue}function x(Oe){return I(Oe)||M(Oe)||_(Oe)||y()}function y(){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 _(Oe,xe){if(!Oe)return;if(typeof Oe=="string")return N(Oe,xe);var ue=Object.prototype.toString.call(Oe).slice(8,-1);if(ue==="Object"&&Oe.constructor&&(ue=Oe.constructor.name),ue==="Map"||ue==="Set")return Array.from(Oe);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return N(Oe,xe)}function M(Oe){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Oe))return Array.from(Oe)}function I(Oe){if(Array.isArray(Oe))return N(Oe)}function N(Oe,xe){(xe==null||xe>Oe.length)&&(xe=Oe.length);for(var ue=0,le=new Array(xe);ue=V.length?0:be):(be-=1,be=be<0?V.length-1:be):be=0,q[Q]=V[be][pe.getFieldName("value")]}else if(te.keyCode===p.a.LEFT||te.keyCode===p.a.BACKSPACE)te.preventDefault(),q.splice(q.length-1,1);else if(te.keyCode===p.a.RIGHT)te.preventDefault(),V[Z]&&V[Z][pe.getFieldName("children")]&&q.push(V[Z][pe.getFieldName("children")][0][pe.getFieldName("value")]);else if(te.keyCode===p.a.ESC||te.keyCode===p.a.TAB){pe.setPopupVisible(!1);return}(!q||q.length===0)&&pe.setPopupVisible(!1);var ge=pe.getActiveOptions(q),Te=ge[ge.length-1];pe.handleMenuSelect(Te,ge.length-1,te),pe.props.onKeyDown&&pe.props.onKeyDown(te)},pe.saveTrigger=function(te){pe.trigger=te};var ee=[];return"value"in re?ee=re.value||[]:"defaultValue"in re&&(ee=re.defaultValue||[]),P()(!("filedNames"in re),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),pe.state={popupVisible:re.popupVisible,activeValue:ee,value:ee,prevProps:re},pe.defaultFieldNames={label:"label",value:"value",children:"children"},pe}return B(le,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(pe){var ee=this.defaultFieldNames,te=this.props,ce=te.fieldNames,q=te.filedNames;return"filedNames"in this.props?q[pe]||ee[pe]:ce[pe]||ee[pe]}},{key:"getFieldNames",value:function(){var pe=this.props,ee=pe.fieldNames,te=pe.filedNames;return"filedNames"in this.props?te:ee}},{key:"getCurrentLevelOptions",value:function(){var pe=this,ee=this.props.options,te=ee===void 0?[]:ee,ce=this.state.activeValue,q=ce===void 0?[]:ce,Q=S()(te,function(V,Z){return V[pe.getFieldName("value")]===q[Z]},{childrenKeyName:this.getFieldName("children")});return Q[Q.length-2]?Q[Q.length-2][this.getFieldName("children")]:x(te).filter(function(V){return!V.disabled})}},{key:"getActiveOptions",value:function(pe){var ee=this;return S()(this.props.options||[],function(te,ce){return te[ee.getFieldName("value")]===pe[ce]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var pe=this.props,ee=pe.prefixCls,te=pe.transitionName,ce=pe.popupClassName,q=pe.options,Q=q===void 0?[]:q,V=pe.disabled,Z=pe.builtinPlacements,be=pe.popupPlacement,ge=pe.children,Te=pe.dropdownRender,Je=O(pe,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),rt=L.createElement("div",null),nt="";Q&&Q.length>0?rt=L.createElement(w,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):nt=" ".concat(ee,"-menus-empty");var at=rt;return Te&&(at=Te(rt)),L.createElement(g.a,Object.assign({ref:this.saveTrigger},Je,{popupPlacement:be,builtinPlacements:Z,popupTransitionName:te,action:V?[]:["click"],popupVisible:V?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(ee,"-menus"),popupClassName:ce+nt,popup:at}),L.cloneElement(ge,{onKeyDown:this.handleKeyDown,tabIndex:V?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(pe,ee){var te=ee.prevProps,ce=te===void 0?{}:te,q={prevProps:pe};return"value"in pe&&!b(ce.value,pe.value)&&(q.value=pe.value||[],"loadData"in pe||(q.activeValue=pe.value||[])),"popupVisible"in pe&&(q.popupVisible=pe.popupVisible),q}}]),le}(L.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}(),De=Ae,ye=Y.a=De},S6kV:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.mode.OFB=function(){var g=L.lib.BlockCipherMode.extend(),T=g.Encryptor=g.extend({processBlock:function(P,p){var v=this._cipher,S=v.blockSize,b=this._iv,d=this._keystream;b&&(d=this._keystream=b.slice(0),this._iv=void 0),v.encryptBlock(d,0);for(var l=0;l|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(q){for(var Q=0,V=!1,Z=!1,be=0,ge=q.length;be122||(Ce<65||Ie>90||tt.push([Math.max(65,Ie)|32,Math.min(Ce,90)|32]),Ce<97||Ie>122||tt.push([Math.max(97,Ie)&~32,Math.min(Ce,122)&~32]))}}tt.sort(function(et,$e){return et[0]-$e[0]||$e[1]-et[1]});for(var Se=[],ke=[],lt=0;ltNe[0]&&(Ne[1]+1>Ne[0]&&Qe.push("-"),Qe.push(nt(Ne[1])))}return Qe.push("]"),Qe.join("")}function ct(He){for(var Re=He.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),tt=Re.length,ft=[],Qe=0,lt=0;Qe=2&&Ie==="["?Re[Qe]=at(Ue):Ie!=="\\"&&(Re[Qe]=Ue.replace(/[a-zA-Z]/g,function(ke){var Ne=ke.charCodeAt(0);return"["+String.fromCharCode(Ne&~32,Ne|32)+"]"}))}return Re.join("")}for(var ht=[],be=0,ge=q.length;be=0;)V[ht.charAt(He)]=ct;var Re=ct[1],tt=""+Re;rt.hasOwnProperty(tt)||(Je.push(Re),rt[tt]=null)}Je.push(/[\0-\uffff]/),Z=U(Je)})();var be=Q.length,ge=function(Te){for(var Je=Te.sourceCode,rt=Te.basePos,nt=Te.sourceNode,at=[rt,_],ct=0,ht=Je.match(Z)||[],He={},Re=0,tt=ht.length;Re=5&&Qe.substring(0,5)==="lang-",Ue&&!(lt&&typeof lt[1]=="string")&&(Ue=!1,Qe=N),Ue||(He[ft]=Qe)}var Ce=ct;if(ct+=ft.length,!Ue)at.push(rt+Ce,Qe);else{var Se=lt[1],ke=ft.indexOf(Se),Ne=ke+Se.length;lt[2]&&(Ne=ft.length-lt[2].length,ke=Ne-Se.length);var et=Qe.substring(5);X(nt,rt+Ce,ft.substring(0,ke),ge,at),X(nt,rt+Ce+ke,Se,le(et,Se),at),X(nt,rt+Ce+Ne,ft.substring(Ne),ge,at)}}Te.decorations=at};return ge}function Ae(q){var Q=[],V=[];q.tripleQuotedStrings?Q.push([f,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):q.multiLineStrings?Q.push([f,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Q.push([f,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),q.verbatimStrings&&V.push([f,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Z=q.hashComments;Z&&(q.cStyleComments?(Z>1?Q.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Q.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),V.push([f,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Q.push([O,/^#[^\r\n]*/,null,"#"])),q.cStyleComments&&(V.push([O,/^\/\/[^\r\n]*/,null]),V.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var be=q.regexLiterals;if(be){var ge=be>1?"":` \r`,Te=ge?".":"[\\S\\s]",Je="/(?=[^/*"+ge+"])(?:[^/\\x5B\\x5C"+ge+"]|\\x5C"+Te+"|\\x5B(?:[^\\x5C\\x5D"+ge+"]|\\x5C"+Te+")*(?:\\x5D|$))+/";V.push(["lang-regex",RegExp("^"+K+"("+Je+")")])}var rt=q.types;rt&&V.push([C,rt]);var nt=(""+q.keywords).replace(/^ | $/g,"");nt.length&&V.push([k,new RegExp("^(?:"+nt.replace(/[\s,]+/g,"|")+")\\b"),null]),Q.push([_,/^\s+/,null,` \r \xA0`]);var at="^.[^\\s\\w.$@'\"`/\\\\]*";return q.regexLiterals&&(at+="(?!s*/)"),V.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[C,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[_,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[_,/^\\[\s\S]?/,null],[y,new RegExp(at),null]),me(Q,V)}var De=Ae({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ye(q,Q,V){for(var Z=/(?:^|\s)nocode(?:\s|$)/,be=/\r\n?|\n/,ge=q.ownerDocument,Te=ge.createElement("li");q.firstChild;)Te.appendChild(q.firstChild);var Je=[Te];function rt(Re){var tt=Re.nodeType;if(tt==1&&!Z.test(Re.className))if(Re.nodeName==="br")nt(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var ft=Re.firstChild;ft;ft=ft.nextSibling)rt(ft);else if((tt==3||tt==4)&&V){var Qe=Re.nodeValue,lt=Qe.match(be);if(lt){var Ue=Qe.substring(0,lt.index);Re.nodeValue=Ue;var Le=Qe.substring(lt.index+lt[0].length);if(Le){var Ie=Re.parentNode;Ie.insertBefore(ge.createTextNode(Le),Re.nextSibling)}nt(Re),Ue||Re.parentNode.removeChild(Re)}}}function nt(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function tt(lt,Ue){var Le=Ue?lt.cloneNode(!1):lt,Ie=lt.parentNode;if(Ie){var Ce=tt(Ie,1),Se=lt.nextSibling;Ce.appendChild(Le);for(var ke=Se;ke;ke=Se)Se=ke.nextSibling,Ce.appendChild(ke)}return Le}for(var ft=tt(Re.nextSibling,0),Qe;(Qe=ft.parentNode)&&Qe.nodeType===1;)ft=Qe;Je.push(ft)}for(var at=0;at=Ie&&(rt+=2),ge>=Ce&&(ct+=2)}}finally{Qe&&(Qe.style.display=lt)}}var xe={};function ue(q,Q){for(var V=Q.length;--V>=0;){var Z=Q[V];xe.hasOwnProperty(Z)?b.console&&console.warn("cannot override language handler %s",Z):xe[Z]=q}}function le(q,Q){return q&&xe.hasOwnProperty(q)||(q=/^\s*]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[y,/^(?:<[%?]|[%?]>)/],["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"]),ue(me([[_,/^[\s]+/,null,` \r `],[H,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[y,/^[=<>\/]+/],["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"]),ue(me([],[[H,/^[\s\S]+/]]),["uq.val"]),ue(Ae({keywords:c,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),ue(Ae({keywords:"null,true,false"}),["json"]),ue(Ae({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),ue(Ae({keywords:u,cStyleComments:!0}),["java"]),ue(Ae({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ue(Ae({keywords:r,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ue(Ae({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ue(Ae({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ue(Ae({keywords:m,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ue(Ae({keywords:h,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ue(me([],[[f,/^[\s\S]+/]]),["regex"]);function re(q){var Q=q.langExtension;try{var V=W(q.sourceNode,q.pre),Z=V.sourceCode;q.sourceCode=Z,q.spans=V.spans,q.basePos=0,le(Q,Z)(q),Oe(q)}catch(be){b.console&&console.log(be&&be.stack||be)}}function pe(q,Q,V){var Z=V||!1,be=Q||null,ge=document.createElement("div");ge.innerHTML="
    "+q+"
    ",ge=ge.firstChild,Z&&ye(ge,Z,!0);var Te={langExtension:be,numberLines:Z,sourceNode:ge,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(Te),ge.innerHTML}function ee(q,Q){var V=Q||document.body,Z=V.ownerDocument||document;function be(Le){return V.getElementsByTagName(Le)}for(var ge=[be("pre"),be("code"),be("xmp")],Te=[],Je=0;Je=0){var t=r.split("!=");return b.create(t[0].trim(),this._deserializeValue(t[1],a))}if(r.indexOf("==")>=0){var t=r.split("==");return S.create(t[0].trim(),this._deserializeValue(t[1],a))}if(r.indexOf("=~")>=0){var t=r.split("=~");return l.create(t[0].trim(),this._deserializeRegexValue(t[1],a))}return/^\!\s*/.test(r)?d.create(r.substr(1).trim()):v.create(r)},s._deserializeValue=function(r,a){if(r=r.trim(),r==="true")return!0;if(r==="false")return!1;var t=/^'([^']*)'$/.exec(r);return t?t[1].trim():r},s._deserializeRegexValue=function(r,a){if(Object(L.x)(r)){if(a)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}var t=r.indexOf("/"),w=r.lastIndexOf("/");if(t===w||t<0){if(a)throw new Error("bad regexp-value '"+r+"', missing /-enclosure");return console.warn("bad regexp-value '"+r+"', missing /-enclosure"),null}var E=r.slice(t+1,w),f=r[w+1]==="i"?"i":"";try{return new RegExp(E,f)}catch(k){if(a)throw new Error("bad regexp-value '"+r+"', parse error: "+k);return console.warn("bad regexp-value '"+r+"', parse error: "+k),null}},s}();function p(s,r){var a=s.getType(),t=r.getType();if(a!==t)return a-t;switch(a){case 1:return s.cmp(r);case 2:return s.cmp(r);case 3:return s.cmp(r);case 4:return s.cmp(r);case 6:return s.cmp(r);case 7:return s.cmp(r);case 5:return s.cmp(r);default:throw new Error("Unknown ContextKeyExpr!")}}var v=function(){function s(r){this.key=r}return s.create=function(r){return new s(r)},s.prototype.getType=function(){return 1},s.prototype.cmp=function(r){return this.keyr.key?1:0},s.prototype.equals=function(r){return r instanceof s?this.key===r.key:!1},s.prototype.evaluate=function(r){return!!r.getValue(this.key)},s.prototype.keys=function(){return[this.key]},s.prototype.negate=function(){return d.create(this.key)},s}(),S=function(){function s(r,a){this.key=r,this.value=a}return s.create=function(r,a){return typeof a=="boolean"?a?v.create(r):d.create(r):new s(r,a)},s.prototype.getType=function(){return 3},s.prototype.cmp=function(r){return this.keyr.key?1:this.valuer.value?1:0},s.prototype.equals=function(r){return r instanceof s?this.key===r.key&&this.value===r.value:!1},s.prototype.evaluate=function(r){return r.getValue(this.key)==this.value},s.prototype.keys=function(){return[this.key]},s.prototype.negate=function(){return b.create(this.key,this.value)},s}(),b=function(){function s(r,a){this.key=r,this.value=a}return s.create=function(r,a){return typeof a=="boolean"?a?d.create(r):v.create(r):new s(r,a)},s.prototype.getType=function(){return 4},s.prototype.cmp=function(r){return this.keyr.key?1:this.valuer.value?1:0},s.prototype.equals=function(r){return r instanceof s?this.key===r.key&&this.value===r.value:!1},s.prototype.evaluate=function(r){return r.getValue(this.key)!=this.value},s.prototype.keys=function(){return[this.key]},s.prototype.negate=function(){return S.create(this.key,this.value)},s}(),d=function(){function s(r){this.key=r}return s.create=function(r){return new s(r)},s.prototype.getType=function(){return 2},s.prototype.cmp=function(r){return this.keyr.key?1:0},s.prototype.equals=function(r){return r instanceof s?this.key===r.key:!1},s.prototype.evaluate=function(r){return!r.getValue(this.key)},s.prototype.keys=function(){return[this.key]},s.prototype.negate=function(){return v.create(this.key)},s}(),l=function(){function s(r,a){this.key=r,this.regexp=a}return s.create=function(r,a){return new s(r,a)},s.prototype.getType=function(){return 6},s.prototype.cmp=function(r){if(this.keyr.key)return 1;var a=this.regexp?this.regexp.source:"",t=r.regexp?r.regexp.source:"";return at?1:0},s.prototype.equals=function(r){if(r instanceof s){var a=this.regexp?this.regexp.source:"",t=r.regexp?r.regexp.source:"";return this.key===r.key&&a===t}return!1},s.prototype.evaluate=function(r){var a=r.getValue(this.key);return this.regexp?this.regexp.test(a):!1},s.prototype.keys=function(){return[this.key]},s.prototype.negate=function(){return n.create(this)},s}(),n=function(){function s(r){this._actual=r}return s.create=function(r){return new s(r)},s.prototype.getType=function(){return 7},s.prototype.cmp=function(r){return this._actual.cmp(r._actual)},s.prototype.equals=function(r){return r instanceof s?this._actual.equals(r._actual):!1},s.prototype.evaluate=function(r){return!this._actual.evaluate(r)},s.prototype.keys=function(){return this._actual.keys()},s.prototype.negate=function(){return this._actual},s}(),c=function(){function s(r){this.expr=r}return s.create=function(r){var a=s._normalizeArr(r);return a.length===0?void 0:a.length===1?a[0]:new s(a)},s.prototype.getType=function(){return 5},s.prototype.cmp=function(r){if(this.expr.lengthr.expr.length)return 1;for(var a=0,t=this.expr.length;a1;){for(var f=r.shift(),k=r.shift(),O=[],C=0,x=E(f);C=15&&(c=!1,d=!0);var f=a&&(l||c&&(E==null||E<12.11)),k=T||S&&b>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C=function(e,i){var R=e.className,A=O(i).exec(R);if(A){var F=R.slice(A.index+A[0].length);e.className=R.slice(0,A.index)+(F?A[1]+F:"")}};function x(e){for(var i=e.childNodes.length;i>0;--i)e.removeChild(e.firstChild);return e}function y(e,i){return x(e).appendChild(i)}function _(e,i,R,A){var F=document.createElement(e);if(R&&(F.className=R),A&&(F.style.cssText=A),typeof i=="string")F.appendChild(document.createTextNode(i));else if(i)for(var J=0;J=i)return oe+(i-J);oe+=he-J,oe+=R-oe%R,J=he+1}}var ne=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};ne.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ne.prototype.set=function(e,i){this.f=i;var R=+new Date+e;(!this.id||R=i)return A+Math.min(oe,i-F);if(F+=J-A,F+=R-F%R,A=J+1,F>=i)return A}}var ue=[""];function le(e){for(;ue.length<=e;)ue.push(re(ue)+" ");return ue[e]}function re(e){return e[e.length-1]}function pe(e,i){for(var R=[],A=0;A"\x80"&&(e.toUpperCase()!=e.toLowerCase()||q.test(e))}function V(e,i){return i?i.source.indexOf("\\w")>-1&&Q(e)?!0:i.test(e):Q(e)}function Z(e){for(var i in e)if(e.hasOwnProperty(i)&&e[i])return!1;return!0}var be=/[\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 ge(e){return e.charCodeAt(0)>=768&&be.test(e)}function Te(e,i,R){for(;(R<0?i>0:iR?-1:1;;){if(i==R)return i;var F=(i+R)/2,J=A<0?Math.ceil(F):Math.floor(F);if(J==i)return e(J)?i:R;e(J)?R=J:i=J+A}}function rt(e,i,R,A){if(!e)return A(i,R,"ltr",0);for(var F=!1,J=0;Ji||i==R&&oe.to==i)&&(A(Math.max(oe.from,i),Math.min(oe.to,R),oe.level==1?"rtl":"ltr",J),F=!0)}F||A(i,R,"ltr")}var nt=null;function at(e,i,R){var A;nt=null;for(var F=0;Fi)return F;J.to==i&&(J.from!=J.to&&R=="before"?A=F:nt=F),J.from==i&&(J.from!=J.to&&R!="before"?A=F:nt=F)}return A!=null?A:nt}var ct=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(we){return we<=247?e.charAt(we):1424<=we&&we<=1524?"R":1536<=we&&we<=1785?i.charAt(we-1536):1774<=we&&we<=2220?"r":8192<=we&&we<=8203?"w":we==8204?"b":"L"}var A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,F=/[stwN]/,J=/[LRr]/,oe=/[Lb1n]/,he=/[1n]/;function ve(we,Be,Xe){this.level=we,this.from=Be,this.to=Xe}return function(we,Be){var Xe=Be=="ltr"?"L":"R";if(we.length==0||Be=="ltr"&&!A.test(we))return!1;for(var ut=we.length,ot=[],Ot=0;Ot-1&&(A[i]=F.slice(0,J).concat(F.slice(J+1)))}}}function Qe(e,i){var R=tt(e,i);if(!R.length)return;for(var A=Array.prototype.slice.call(arguments,2),F=0;F0}function Ie(e){e.prototype.on=function(i,R){Re(this,i,R)},e.prototype.off=function(i,R){ft(this,i,R)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ne(e){Ce(e),Se(e)}function et(e){return e.target||e.srcElement}function $e(e){var i=e.which;return i==null&&(e.button&1?i=1:e.button&2?i=3:e.button&4&&(i=2)),a&&e.ctrlKey&&i==1&&(i=3),i}var bt=function(){if(S&&b<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),gt;function Ut(e){if(gt==null){var i=_("span","\u200B");y(e,_("span",[i,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(gt=i.offsetWidth<=1&&i.offsetHeight>2&&!(S&&b<8))}var R=gt?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var Nt;function hr(e){if(Nt!=null)return Nt;var i=y(e,document.createTextNode("A\u062EA")),R=I(i,0,1).getBoundingClientRect(),A=I(i,1,2).getBoundingClientRect();return x(e),!R||R.left==R.right?!1:Nt=A.right-R.right<3}var mr=` b`.split(/\n/).length!=3?function(e){for(var i=0,R=[],A=e.length;i<=A;){var F=e.indexOf(` `,i);F==-1&&(F=e.length);var J=e.slice(i,e.charAt(F-1)=="\r"?F-1:F),oe=J.indexOf("\r");oe!=-1?(R.push(J.slice(0,oe)),i+=oe+1):(R.push(J),i=F+1)}return R}: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(R){}return!i||i.parentElement()!=e?!1:i.compareEndPoints("StartToEnd",i)!=0},Yr=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Jr=null;function Hr(e){if(Jr!=null)return Jr;var i=y(e,_("span","x")),R=i.getBoundingClientRect(),A=I(i,0,1).getBoundingClientRect();return Jr=Math.abs(R.left-A.left)>1}var un={},Ar={};function vn(e,i){arguments.length>2&&(i.dependencies=Array.prototype.slice.call(arguments,2)),un[e]=i}function mn(e,i){Ar[e]=i}function Kt(e){if(typeof e=="string"&&Ar.hasOwnProperty(e))e=Ar[e];else if(e&&typeof e.name=="string"&&Ar.hasOwnProperty(e.name)){var i=Ar[e.name];typeof i=="string"&&(i={name:i}),e=ce(i,e),e.name=i.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Kt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Kt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function or(e,i){i=Kt(i);var R=un[i.name];if(!R)return or(e,"text/plain");var A=R(e,i);if(Xt.hasOwnProperty(i.name)){var F=Xt[i.name];for(var J in F){if(!F.hasOwnProperty(J))continue;A.hasOwnProperty(J)&&(A["_"+J]=A[J]),A[J]=F[J]}}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 Xt={};function gr(e,i){var R=Xt.hasOwnProperty(e)?Xt[e]:Xt[e]={};W(i,R)}function Xr(e,i){if(i===!0)return i;if(e.copyState)return e.copyState(i);var R={};for(var A in i){var F=i[A];F instanceof Array&&(F=F.concat([])),R[A]=F}return R}function kn(e,i){for(var R;e.innerMode&&!(R=e.innerMode(i),!R||R.mode==e);)i=R.state,e=R.mode;return R||{mode:e,state:i}}function Ln(e,i,R){return e.startState?e.startState(i,R):!0}var tn=function(e,i,R){this.pos=this.start=0,this.string=e,this.tabSize=i||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};tn.prototype.eol=function(){return this.pos>=this.string.length},tn.prototype.sol=function(){return this.pos==this.lineStart},tn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},tn.prototype.next=function(){if(this.posi},tn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},tn.prototype.skipToEnd=function(){this.pos=this.string.length},tn.prototype.skipTo=function(e){var i=this.string.indexOf(e,this.pos);if(i>-1)return this.pos=i,!0},tn.prototype.backUp=function(e){this.pos-=e},tn.prototype.column=function(){return this.lastColumnPos0?null:(J&&i!==!1&&(this.pos+=J[0].length),J)}},tn.prototype.current=function(){return this.string.slice(this.start,this.pos)},tn.prototype.hideFirstChars=function(e,i){this.lineStart+=e;try{return i()}finally{this.lineStart-=e}},tn.prototype.lookAhead=function(e){var i=this.lineOracle;return i&&i.lookAhead(e)},tn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ur(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 R=e;!R.lines;)for(var A=0;;++A){var F=R.children[A],J=F.chunkSize();if(i=e.first&&iR?wt(R,ur(e,R).text.length):$(i,ur(e,i.line).text.length)}function $(e,i){var R=e.ch;return R==null||R>i?wt(e.line,i):R<0?wt(e.line,0):e}function ie(e,i){for(var R=[],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,R){return i instanceof de?new se(e,Xr(e.mode,i.state),R,i.lookAhead):new se(e,Xr(e.mode,i),R)},se.prototype.save=function(e){var i=e!==!1?Xr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new de(i,this.maxLookAhead):i};function Ke(e,i,R,A){var F=[e.state.modeGen],J={};Ei(e,i.text,e.doc.mode,R,function(we,Be){return F.push(we,Be)},J,A);for(var oe=R.state,he=function(we){R.baseTokens=F;var Be=e.state.overlays[we],Xe=1,ut=0;R.state=!0,Ei(e,i.text,Be.mode,R,function(ot,Ot){for(var Bt=Xe;utot&&F.splice(Xe,1,ot,F[Xe+1],Qt),Xe+=2,ut=Math.min(ot,Qt)}if(!Ot)return;if(Be.opaque)F.splice(Bt,Xe-Bt,ot,"overlay "+Ot),Xe=Bt+2;else for(;Bte.options.maxHighlightLength&&Xr(e.doc.mode,A.state),J=Ke(e,i,A);F&&(A.state=F),i.stateAfter=A.save(!F),i.styles=J.styles,J.classes?i.styleClasses=J.classes:i.styleClasses&&(i.styleClasses=null),R===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return i.styles}function Vt(e,i,R){var A=e.doc,F=e.display;if(!A.mode.startState)return new se(A,!0,i);var J=In(e,i,R),oe=J>A.first&&ur(A,J-1).stateAfter,he=oe?se.fromSaved(A,oe,J):new se(A,Ln(A.mode),J);return A.iter(J,i,function(ve){Er(e,ve.text,he);var we=he.line;ve.stateAfter=we==i-1||we%5==0||we>=F.viewFrom&&wei.start)return J}throw new Error("Mode "+e.name+" failed to advance stream.")}var Br=function(e,i,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=i||null,this.state=R};function En(e,i,R,A){var F=e.doc,J=F.mode,oe;i=z(F,i);var he=ur(F,i.line),ve=Vt(e,i.line,R),we=new tn(he.text,e.options.tabSize,ve),Be;for(A&&(Be=[]);(A||we.pose.options.maxHighlightLength?(he=!1,oe&&Er(e,i,A,Be.pos),Be.pos=i.length,Xe=null):Xe=ui(zr(R,Be,A.state,ut),J),ut){var ot=ut[0].name;ot&&(Xe="m-"+(Xe?ot+" "+Xe:ot))}if(!he||we!=Xe){for(;veoe;--he){if(he<=J.first)return J.first;var ve=ur(J,he-1),we=ve.stateAfter;if(we&&(!R||he+(we instanceof de?we.lookAhead:0)<=J.modeFrontier))return he;var Be=X(ve.text,null,e.options.tabSize);(F==null||A>Be)&&(F=he-1,A=Be)}return F}function Li(e,i){if(e.modeFrontier=Math.min(e.modeFrontier,i),e.highlightFrontierR;A--){var F=ur(e,A).stateAfter;if(F&&(!(F instanceof de)||A+F.lookAhead=i:J.to>i);(A||(A=[])).push(new Fi(oe,J.from,ve?null:J.to))}}return A}function sa(e,i,R){var A;if(e)for(var F=0;F=i:J.to>i);if(he||J.from==i&&oe.type=="bookmark"&&(!R||J.marker.insertLeft)){var ve=J.from==null||(oe.inclusiveLeft?J.from<=i:J.from0&&he)for(var Rr=0;Rr0)continue;var Be=[ve,1],Xe=$t(we.from,he.from),ut=$t(we.to,he.to);(Xe<0||!oe.inclusiveLeft&&!Xe)&&Be.push({from:we.from,to:he.from}),(ut>0||!oe.inclusiveRight&&!ut)&&Be.push({from:he.to,to:we.to}),F.splice.apply(F,Be),ve+=Be.length-3}return F}function ta(e){var i=e.markedSpans;if(!i)return;for(var R=0;Ri)&&(!A||Ct(A,J.marker)<0)&&(A=J.marker)}return A}function dt(e,i,R,A,F){var J=ur(e,i),oe=ni&&J.markedSpans;if(oe)for(var he=0;he=0&&Xe<=0||Be<=0&&Xe>=0)continue;if(Be<=0&&(ve.marker.inclusiveRight&&F.inclusiveLeft?$t(we.to,R)>=0:$t(we.to,R)>0)||Be>=0&&(ve.marker.inclusiveRight&&F.inclusiveLeft?$t(we.from,A)<=0:$t(we.from,A)<0))return!0}}function At(e){for(var i;i=Pt(e);)e=i.find(-1,!0).line;return e}function Dt(e){for(var i;i=Ht(e);)e=i.find(1,!0).line;return e}function yr(e){for(var i,R;i=Ht(e);)e=i.find(1,!0).line,(R||(R=[])).push(e);return R}function tr(e,i){var R=ur(e,i),A=At(R);return R==A?i:Zr(A)}function qt(e,i){if(i>e.lastLine())return i;var R=ur(e,i),A;if(!Gt(e,R))return i;for(;A=Ht(R);)R=A.find(1,!0).line;return Zr(R)+1}function Gt(e,i){var R=ni&&i.markedSpans;if(R)for(var A=void 0,F=0;Fi.maxLineLength&&(i.maxLineLength=F,i.maxLine=A)})}var Fr=function(e,i,R){this.text=e,Tt(this,i),this.height=R?R(this):1};Fr.prototype.lineNo=function(){return Zr(this)},Ie(Fr);function Cr(e,i,R,A){e.text=i,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ta(e),Tt(e,R);var F=A?A(e):1;F!=e.height&&$n(e,F)}function rr(e){e.parent=null,ta(e)}var Et={},_t={};function xt(e,i){if(!e||/^\s*$/.test(e))return null;var R=i.addModeClass?_t:Et;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function Jt(e,i){var R=M("span",null,null,d?"padding-right: .1px":null),A={pre:M("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};i.measure={};for(var F=0;F<=(i.rest?i.rest.length:0);F++){var J=F?i.rest[F-1]:i.line,oe=void 0;A.pos=0,A.addToken=dr,hr(e.display.measure)&&(oe=ht(J,e.doc.direction))&&(A.addToken=Dr(A.addToken,oe)),A.map=[];var he=i!=e.display.externalMeasured&&Zr(J);qe(J,A,Rt(e,J,he)),J.styleClasses&&(J.styleClasses.bgClass&&(A.bgClass=B(J.styleClasses.bgClass,A.bgClass||"")),J.styleClasses.textClass&&(A.textClass=B(J.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(Ut(e.display.measure))),F==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(d){var ve=A.content.lastChild;(/\bcm-tab\b/.test(ve.className)||ve.querySelector&&ve.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return Qe(e,"renderLine",e,i.line,A.pre),A.pre.className&&(A.textClass=B(A.pre.className,A.textClass||"")),A}function pr(e){var i=_("span","\u2022","cm-invalidchar");return i.title="\\u"+e.charCodeAt(0).toString(16),i.setAttribute("aria-label",i.title),i}function dr(e,i,R,A,F,J,oe){if(!i)return;var he=e.splitSpaces?fr(i,e.trailingSpace):i,ve=e.cm.state.specialChars,we=!1,Be;if(!ve.test(i))e.col+=i.length,Be=document.createTextNode(he),e.map.push(e.pos,e.pos+i.length,Be),S&&b<9&&(we=!0),e.pos+=i.length;else{Be=document.createDocumentFragment();for(var Xe=0;;){ve.lastIndex=Xe;var ut=ve.exec(i),ot=ut?ut.index-Xe:i.length-Xe;if(ot){var Ot=document.createTextNode(he.slice(Xe,Xe+ot));S&&b<9?Be.appendChild(_("span",[Ot])):Be.appendChild(Ot),e.map.push(e.pos,e.pos+ot,Ot),e.col+=ot,e.pos+=ot}if(!ut)break;Xe+=ot+1;var Bt=void 0;if(ut[0]==" "){var Qt=e.cm.options.tabSize,ir=Qt-e.col%Qt;Bt=Be.appendChild(_("span",le(ir),"cm-tab")),Bt.setAttribute("role","presentation"),Bt.setAttribute("cm-text"," "),e.col+=ir}else ut[0]=="\r"||ut[0]==` `?(Bt=Be.appendChild(_("span",ut[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Bt.setAttribute("cm-text",ut[0]),e.col+=1):(Bt=e.cm.options.specialCharPlaceholder(ut[0]),Bt.setAttribute("cm-text",ut[0]),S&&b<9?Be.appendChild(_("span",[Bt])):Be.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,R||A||F||we||J||oe){var _r=R||"";A&&(_r+=A),F&&(_r+=F);var ar=_("span",[Be],_r,J);if(oe)for(var Rr in oe)oe.hasOwnProperty(Rr)&&Rr!="style"&&Rr!="class"&&ar.setAttribute(Rr,oe[Rr]);return e.content.appendChild(ar)}e.content.appendChild(Be)}function fr(e,i){if(e.length>1&&!/ /.test(e))return e;for(var R=i,A="",F=0;Fwe&&Xe.from<=we);ut++);if(Xe.to>=Be)return e(R,A,F,J,oe,he,ve);e(R,A.slice(0,Xe.to-we),F,J,null,he,ve),J=null,A=A.slice(Xe.to-we),we=Xe.to}}}function an(e,i,R,A){var F=!A&&R.widgetNode;F&&e.map.push(e.pos,e.pos+i,F),!A&&e.cm.display.input.needsContentAttribute&&(F||(F=e.content.appendChild(document.createElement("span"))),F.setAttribute("cm-marker",R.id)),F&&(e.cm.display.input.setUneditable(F),e.content.appendChild(F)),e.pos+=i,e.trailingSpace=!1}function qe(e,i,R){var A=e.markedSpans,F=e.text,J=0;if(!A){for(var oe=1;oeve||wn.collapsed&&Gr.to==ve&&Gr.from==ve)){if(Gr.to!=null&&Gr.to!=ve&&ot>Gr.to&&(ot=Gr.to,Bt=""),wn.className&&(Ot+=" "+wn.className),wn.css&&(ut=(ut?ut+";":"")+wn.css),wn.startStyle&&Gr.from==ve&&(Qt+=" "+wn.startStyle),wn.endStyle&&Gr.to==ot&&(Rr||(Rr=[])).push(wn.endStyle,Gr.to),wn.title&&((_r||(_r={})).title=wn.title),wn.attributes)for(var Zn in wn.attributes)(_r||(_r={}))[Zn]=wn.attributes[Zn];wn.collapsed&&(!ir||Ct(ir.marker,wn)<0)&&(ir=Gr)}else Gr.from>ve&&ot>Gr.from&&(ot=Gr.from)}if(Rr)for(var Ai=0;Ai=he)break;for(var ea=Math.min(he,ot);;){if(Be){var Ji=ve+Be.length;if(!ir){var yi=Ji>ea?Be.slice(0,ea-ve):Be;i.addToken(i,yi,Xe?Xe+Ot:Ot,Qt,ve+yi.length==ot?Bt:"",ut,_r)}if(Ji>=ea){Be=Be.slice(ea-ve),ve=ea;break}ve=Ji,Qt=""}Be=F.slice(J,J=R[we++]),Xe=xt(R[we++],i.cm.options)}}}function sr(e,i,R){this.line=i,this.rest=yr(i),this.size=this.rest?Zr(re(this.rest))-R+1:1,this.node=this.text=null,this.hidden=Gt(e,i)}function Nr(e,i,R){for(var A=[],F,J=i;J2&&J.push((ve.bottom+we.top)/2-R.top)}}J.push(R.bottom-R.top)}}function _e(e,i,R){if(e.line==i)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;AR)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function je(e,i){i=At(i);var R=Zr(i),A=e.display.externalMeasured=new sr(e.doc,i,R);A.lineN=R;var F=A.built=Jt(e,A);return A.text=F.pre,y(e.display.lineMeasure,F.pre),A}function ze(e,i,R,A){return Ze(e,We(e,i),R,A)}function Ve(e,i){if(i>=e.display.viewFrom&&i=R.lineN&&ii)&&(J=ve-he,F=J-1,i>=ve&&(oe="right")),F!=null){if(A=e[we+2],he==ve&&R==(A.insertLeft?"left":"right")&&(oe=R),R=="left"&&F==0)for(;we&&e[we-2]==e[we-3]&&e[we-1].insertLeft;)A=e[(we-=3)+2],oe="left";if(R=="right"&&F==ve-he)for(;we=0&&!((R=e[F]).left!=R.right);F--);return R}function Yt(e,i,R,A){var F=kt(i.map,R,A),J=F.node,oe=F.start,he=F.end,ve=F.collapse,we;if(J.nodeType==3){for(var Be=0;Be<4;Be++){for(;oe&&ge(i.line.text.charAt(F.coverStart+oe));)--oe;for(;F.coverStart+he0&&(ve=A="right");var Xe;e.options.lineWrapping&&(Xe=J.getClientRects()).length>1?we=Xe[A=="right"?Xe.length-1:0]:we=J.getBoundingClientRect()}if(S&&b<9&&!oe&&(!we||!we.left&&!we.right)){var ut=J.parentNode.getClientRects()[0];ut?we={left:ut.left,right:ut.left+ci(e.display),top:ut.top,bottom:ut.bottom}:we=pt}for(var ot=we.top-i.rect.top,Ot=we.bottom-i.rect.top,Bt=(ot+Ot)/2,Qt=i.view.measure.heights,ir=0;ir=A.text.length?(ve=A.text.length,we="before"):ve<=0&&(ve=0,we="after"),!he)return oe(we=="before"?ve-1:ve,we=="before");function Be(Ot,Bt,Qt){var ir=he[Bt],_r=ir.level==1;return oe(Qt?Ot-1:Ot,_r!=Qt)}var Xe=at(he,ve,we),ut=nt,ot=Be(ve,Xe,we=="before");return ut!=null&&(ot.other=Be(ve,ut,we!="before")),ot}function jr(e,i){var R=0;i=z(e.doc,i),e.options.lineWrapping||(R=ci(e.display)*i.ch);var A=ur(e.doc,i.line),F=cr(A)+ei(e.display);return{left:R,right:R,top:F,bottom:F+A.height}}function Wr(e,i,R,A,F){var J=wt(e,i,R);return J.xRel=F,A&&(J.outside=A),J}function dn(e,i,R){var A=e.doc;if(R+=e.display.viewOffset,R<0)return Wr(A.first,0,null,-1,-1);var F=Bn(A,R),J=A.first+A.size-1;if(F>J)return Wr(A.first+A.size-1,ur(A,J).text.length,null,1,1);i<0&&(i=0);for(var oe=ur(A,F);;){var he=Yn(e,oe,F,i,R),ve=Wt(oe,he.ch+(he.xRel>0||he.outside>0?1:0));if(!ve)return he;var we=ve.find(1);if(we.line==F)return we;oe=ur(A,F=we.line)}}function bn(e,i,R,A){A-=ln(i);var F=i.text.length,J=Je(function(oe){return Ze(e,R,oe-1).bottom<=A},F,0);return F=Je(function(oe){return Ze(e,R,oe).top>A},J,F),{begin:J,end:F}}function Tr(e,i,R,A){R||(R=We(e,i));var F=xn(e,i,Ze(e,R,A),"line").top;return bn(e,i,R,F)}function Sn(e,i,R,A){return e.bottom<=R?!1:e.top>R?!0:(A?e.left:e.right)>i}function Yn(e,i,R,A,F){F-=cr(i);var J=We(e,i),oe=ln(i),he=0,ve=i.text.length,we=!0,Be=ht(i,e.doc.direction);if(Be){var Xe=(e.options.lineWrapping?Wn:Rn)(e,i,R,J,Be,A,F);we=Xe.level!=1,he=we?Xe.from:Xe.to-1,ve=we?Xe.to:Xe.from-1}var ut=null,ot=null,Ot=Je(function(qr){var Gr=Ze(e,J,qr);return Gr.top+=oe,Gr.bottom+=oe,Sn(Gr,A,F,!1)?(Gr.top<=F&&Gr.left<=A&&(ut=qr,ot=Gr),!0):!1},he,ve),Bt,Qt,ir=!1;if(ot){var _r=A-ot.left=Rr.bottom?1:0}return Ot=Te(i.text,Ot,1),Wr(R,Ot,Qt,ir,A-Bt)}function Rn(e,i,R,A,F,J,oe){var he=Je(function(Xe){var ut=F[Xe],ot=ut.level!=1;return Sn(pn(e,wt(R,ot?ut.to:ut.from,ot?"before":"after"),"line",i,A),J,oe,!0)},0,F.length-1),ve=F[he];if(he>0){var we=ve.level!=1,Be=pn(e,wt(R,we?ve.from:ve.to,we?"after":"before"),"line",i,A);Sn(Be,J,oe,!0)&&Be.top>oe&&(ve=F[he-1])}return ve}function Wn(e,i,R,A,F,J,oe){var he=bn(e,i,A,oe),ve=he.begin,we=he.end;/\s/.test(i.text.charAt(we-1))&&we--;for(var Be=null,Xe=null,ut=0;ut=we||ot.to<=ve)continue;var Ot=ot.level!=1,Bt=Ze(e,A,Ot?Math.min(we,ot.to)-1:Math.max(ve,ot.from)).right,Qt=BtQt)&&(Be=ot,Xe=Qt)}return Be||(Be=F[F.length-1]),Be.fromwe&&(Be={from:Be.from,to:we,level:Be.level}),Be}var Dn;function ti(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Dn==null){Dn=_("pre",null,"CodeMirror-line-like");for(var i=0;i<49;++i)Dn.appendChild(document.createTextNode("x")),Dn.appendChild(_("br"));Dn.appendChild(document.createTextNode("x"))}y(e.measure,Dn);var R=Dn.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),x(e.measure),R||1}function ci(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var i=_("span","xxxxxxxxxx"),R=_("pre",[i],"CodeMirror-line-like");y(e.measure,R);var A=i.getBoundingClientRect(),F=(A.right-A.left)/10;return F>2&&(e.cachedCharWidth=F),F||10}function Jn(e){for(var i=e.display,R={},A={},F=i.gutters.clientLeft,J=i.gutters.firstChild,oe=0;J;J=J.nextSibling,++oe){var he=e.display.gutterSpecs[oe].className;R[he]=J.offsetLeft+J.clientLeft+F,A[he]=J.clientWidth}return{fixedPos:gi(i),gutterTotalWidth:i.gutters.offsetWidth,gutterLeft:R,gutterWidth:A,wrapperWidth:i.wrapper.clientWidth}}function gi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Xi(e){var i=ti(e.display),R=e.options.lineWrapping,A=R&&Math.max(5,e.display.scroller.clientWidth/ci(e.display)-3);return function(F){if(Gt(e.doc,F))return 0;var J=0;if(F.widgets)for(var oe=0;oe0&&(we=ur(e.doc,ve.line).text).length==ve.ch){var Be=X(we,we.length,e.options.tabSize)-we.length;ve=wt(ve.line,Math.max(0,Math.round((J-Ge(e.display).left)/ci(e.display))-Be))}return ve}function Hn(e,i){if(i>=e.display.viewTo)return null;if(i-=e.display.viewFrom,i<0)return null;for(var R=e.display.view,A=0;Ai)&&(F.updateLineNumbers=i),e.curOp.viewChanged=!0,i>=F.viewTo)ni&&tr(e.doc,i)F.viewFrom?Vn(e):(F.viewFrom+=A,F.viewTo+=A);else if(i<=F.viewFrom&&R>=F.viewTo)Vn(e);else if(i<=F.viewFrom){var J=ii(e,R,R+A,1);J?(F.view=F.view.slice(J.index),F.viewFrom=J.lineN,F.viewTo+=A):Vn(e)}else if(R>=F.viewTo){var oe=ii(e,i,i,-1);oe?(F.view=F.view.slice(0,oe.index),F.viewTo=oe.lineN):Vn(e)}else{var he=ii(e,i,i,-1),ve=ii(e,R,R+A,1);he&&ve?(F.view=F.view.slice(0,he.index).concat(Nr(e,he.lineN,ve.lineN)).concat(F.view.slice(ve.index)),F.viewTo+=A):Vn(e)}var we=F.externalMeasured;we&&(R=F.lineN&&i=A.viewTo)return;var J=A.view[Hn(e,i)];if(J.node==null)return;var oe=J.changes||(J.changes=[]);fe(oe,R)==-1&&oe.push(R)}function Vn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ii(e,i,R,A){var F=Hn(e,i),J,oe=e.display.view;if(!ni||R==e.doc.first+e.doc.size)return{index:F,lineN:R};for(var he=e.display.viewFrom,ve=0;ve0){if(F==oe.length-1)return null;J=he+oe[F].size-i,F++}else J=he-i;i+=J,R+=J}for(;tr(e.doc,R)!=R;){if(F==(A<0?0:oe.length-1))return null;R+=A*oe[F-(A<0?1:0)].size,F+=A}return{index:F,lineN:R}}function Di(e,i,R){var A=e.display,F=A.view;F.length==0||i>=A.viewTo||R<=A.viewFrom?(A.view=Nr(e,i,R),A.viewFrom=i):(A.viewFrom>i?A.view=Nr(e,i,A.viewFrom).concat(A.view):A.viewFromR&&(A.view=A.view.slice(0,Hn(e,R)))),A.viewTo=R}function ra(e){for(var i=e.display.view,R=0,A=0;A=e.display.viewTo||he.to().line0?i.blinker=setInterval(function(){e.hasFocus()||ua(e),i.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(i.cursorDiv.style.visibility="hidden")}function Ba(e){e.state.focused||(e.display.input.focus(),la(e))}function wa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ua(e))},100)}function la(e,i){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Qe(e,"focus",e,i),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),d&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ai(e)}function ua(e,i){if(e.state.delayingBlurEvent)return;e.state.focused&&(Qe(e,"blur",e,i),e.state.focused=!1,C(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ka(e){for(var i=e.display,R=i.lineDiv.offsetTop,A=0;A.005||Be<-.005)&&($n(F.line,oe),_a(F.line),F.rest))for(var Xe=0;Xee.display.sizerWidth){var ut=Math.ceil(he/ci(e.display));ut>e.display.maxLineLength&&(e.display.maxLineLength=ut,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function _a(e){if(e.widgets)for(var i=0;i=oe&&(J=Bn(i,cr(ur(i,ve))-e.wrapper.clientHeight),oe=ve)}return{from:J,to:Math.max(oe,J+1)}}function Wa(e,i){if(lt(e,"scrollCursorIntoView"))return;var R=e.display,A=R.sizer.getBoundingClientRect(),F=null;if(i.top+A.top<0?F=!0:i.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(F=!1),F!=null&&!h){var J=_("div","\u200B",null,`position: absolute; top: `+(i.top-R.viewOffset-ei(e.display))+`px; height: `+(i.bottom-i.top+Ye(e)+R.barHeight)+`px; left: `+i.left+"px; width: "+Math.max(2,i.right-i.left)+"px;");e.display.lineSpace.appendChild(J),J.scrollIntoView(F),e.display.lineSpace.removeChild(J)}}function Xa(e,i,R,A){A==null&&(A=0);var F;!e.options.lineWrapping&&i==R&&(i=i.ch?wt(i.line,i.sticky=="before"?i.ch-1:i.ch,"after"):i,R=i.sticky=="before"?wt(i.line,i.ch+1,"before"):i);for(var J=0;J<5;J++){var oe=!1,he=pn(e,i),ve=!R||R==i?he:pn(e,R);F={left:Math.min(he.left,ve.left),top:Math.min(he.top,ve.top)-A,right:Math.max(he.left,ve.left),bottom:Math.max(he.bottom,ve.bottom)+A};var we=ca(e,F),Be=e.doc.scrollTop,Xe=e.doc.scrollLeft;if(we.scrollTop!=null&&(fa(e,we.scrollTop),Math.abs(e.doc.scrollTop-Be)>1&&(oe=!0)),we.scrollLeft!=null&&($i(e,we.scrollLeft),Math.abs(e.doc.scrollLeft-Xe)>1&&(oe=!0)),!oe)break}return F}function Ma(e,i){var R=ca(e,i);R.scrollTop!=null&&fa(e,R.scrollTop),R.scrollLeft!=null&&$i(e,R.scrollLeft)}function ca(e,i){var R=e.display,A=ti(e.display);i.top<0&&(i.top=0);var F=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,J=Ee(e),oe={};i.bottom-i.top>J&&(i.bottom=i.top+J);var he=e.doc.height+Me(R),ve=i.tophe-A;if(i.topF+J){var Be=Math.min(i.top,(we?he:i.bottom)-J);Be!=F&&(oe.scrollTop=Be)}var Xe=e.options.fixedGutter?0:R.gutters.offsetWidth,ut=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-Xe,ot=Fe(e)-R.gutters.offsetWidth,Ot=i.right-i.left>ot;return Ot&&(i.right=i.left+ot),i.left<10?oe.scrollLeft=0:i.leftot+ut-3&&(oe.scrollLeft=i.right+(Ot?0:10)-ot),oe}function Sa(e,i){if(i==null)return;Ea(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+i}function ba(e){Ea(e);var i=e.getCursor();e.curOp.scrollToPos={from:i,to:i,margin:e.options.cursorScrollMargin}}function da(e,i,R){(i!=null||R!=null)&&Ea(e),i!=null&&(e.curOp.scrollLeft=i),R!=null&&(e.curOp.scrollTop=R)}function co(e,i){Ea(e),e.curOp.scrollToPos=i}function Ea(e){var i=e.curOp.scrollToPos;if(i){e.curOp.scrollToPos=null;var R=jr(e,i.from),A=jr(e,i.to);Ta(e,R,A,i.margin)}}function Ta(e,i,R,A){var F=ca(e,{left:Math.min(i.left,R.left),top:Math.min(i.top,R.top)-A,right:Math.max(i.right,R.right),bottom:Math.max(i.bottom,R.bottom)+A});da(e,F.scrollLeft,F.scrollTop)}function fa(e,i){if(Math.abs(e.doc.scrollTop-i)<2)return;T||za(e,{top:i}),ha(e,i,!0),T&&za(e),Ha(e,100)}function ha(e,i,R){if(i=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,i)),e.display.scroller.scrollTop==i&&!R)return;e.doc.scrollTop=i,e.display.scrollbars.setScrollTop(i),e.display.scroller.scrollTop!=i&&(e.display.scroller.scrollTop=i)}function $i(e,i,R,A){if(i=Math.max(0,Math.min(i,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(R?i==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-i)<2)&&!A)return;e.doc.scrollLeft=i,An(e),e.display.scroller.scrollLeft!=i&&(e.display.scroller.scrollLeft=i),e.display.scrollbars.setScrollLeft(i)}function na(e){var i=e.display,R=i.gutters.offsetWidth,A=Math.round(e.doc.height+Me(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?R:0,docHeight:A,scrollHeight:A+Ye(e)+i.barHeight,nativeBarWidth:i.nativeBarWidth,gutterWidth:R}}var Sr=function(e,i,R){this.cm=R;var A=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),F=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=F.tabIndex=-1,e(A),e(F),Re(A,"scroll",function(){A.clientHeight&&i(A.scrollTop,"vertical")}),Re(F,"scroll",function(){F.clientWidth&&i(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&b<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Sr.prototype.update=function(e){var i=e.scrollWidth>e.clientWidth+1,R=e.scrollHeight>e.clientHeight+1,A=e.nativeBarWidth;if(R){this.vert.style.display="block",this.vert.style.bottom=i?A+"px":"0";var F=e.viewHeight-(i?A:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+F)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(i){this.horiz.style.display="block",this.horiz.style.right=R?A+"px":"0",this.horiz.style.left=e.barLeft+"px";var J=e.viewWidth-e.barLeft-(R?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+J)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(A==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:R?A:0,bottom:i?A:0}},Sr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Sr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Sr.prototype.zeroWidthHack=function(){var e=a&&!o?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ne,this.disableVert=new ne},Sr.prototype.enableZeroWidthBar=function(e,i,R){e.style.pointerEvents="auto";function A(){var F=e.getBoundingClientRect(),J=R=="vert"?document.elementFromPoint(F.right-1,(F.top+F.bottom)/2):document.elementFromPoint((F.right+F.left)/2,F.bottom-1);J!=e?e.style.pointerEvents="none":i.set(1e3,A)}i.set(1e3,A)},Sr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Or=function(){};Or.prototype.update=function(){return{bottom:0,right:0}},Or.prototype.setScrollLeft=function(){},Or.prototype.setScrollTop=function(){},Or.prototype.clear=function(){};function lr(e,i){i||(i=na(e));var R=e.display.barWidth,A=e.display.barHeight;Tn(e,i);for(var F=0;F<4&&R!=e.display.barWidth||A!=e.display.barHeight;F++)R!=e.display.barWidth&&e.options.lineWrapping&&ka(e),Tn(e,na(e)),R=e.display.barWidth,A=e.display.barHeight}function Tn(e,i){var R=e.display,A=R.scrollbars.update(i);R.sizer.style.paddingRight=(R.barWidth=A.right)+"px",R.sizer.style.paddingBottom=(R.barHeight=A.bottom)+"px",R.heightForcer.style.borderBottom=A.bottom+"px solid transparent",A.right&&A.bottom?(R.scrollbarFiller.style.display="block",R.scrollbarFiller.style.height=A.bottom+"px",R.scrollbarFiller.style.width=A.right+"px"):R.scrollbarFiller.style.display="",A.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(R.gutterFiller.style.display="block",R.gutterFiller.style.height=A.bottom+"px",R.gutterFiller.style.width=i.gutterWidth+"px"):R.gutterFiller.style.display=""}var vr={native:Sr,null:Or};function pa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&C(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new vr[e.options.scrollbarStyle](function(i){e.display.wrapper.insertBefore(i,e.display.scrollbarFiller),Re(i,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),i.setAttribute("cm-not-content","true")},function(i,R){R=="horizontal"?$i(e,i):fa(e,i)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var $a=0;function Kn(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:++$a},xr(e.curOp)}function Oa(e){var i=e.curOp;i&&Pr(i,function(R){for(var A=0;A=R.viewTo)||R.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,R=i.display;e.updatedDisplay&&ka(i),e.barMeasure=na(i),R.maxLineChanged&&!i.options.lineWrapping&&(e.adjustWidthTo=ze(i,R.maxLine,R.maxLine.text.length).left+3,i.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(R.scroller.clientWidth,R.sizer.offsetLeft+e.adjustWidthTo+Ye(i)+i.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-Fe(i))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function fo(e){var i=e.cm;e.adjustWidthTo!=null&&(i.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var R=+new Date+e.options.workTime,A=Vt(e,i.highlightFrontier),F=[];i.iter(A.line,Math.min(i.first+i.size,e.display.viewTo+500),function(J){if(A.line>=e.display.viewFrom){var oe=J.styles,he=J.text.length>e.options.maxHighlightLength?Xr(i.mode,A.state):null,ve=Ke(e,J,A,!0);he&&(A.state=he),J.styles=ve.styles;var we=J.styleClasses,Be=ve.classes;Be?J.styleClasses=Be:we&&(J.styleClasses=null);for(var Xe=!oe||oe.length!=J.styles.length||we!=Be&&(!we||!Be||we.bgClass!=Be.bgClass||we.textClass!=Be.textClass),ut=0;!Xe&&utR)return Ha(e,e.options.workDelay),!0}),i.highlightFrontier=A.line,i.modeFrontier=Math.max(i.modeFrontier,A.line),F.length&&Wi(e,function(){for(var J=0;J=R.viewFrom&&i.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&ra(e)==0)return!1;wi(e)&&(Vn(e),i.dims=Jn(e));var F=A.first+A.size,J=Math.max(i.visible.from-e.options.viewportMargin,A.first),oe=Math.min(F,i.visible.to+e.options.viewportMargin);R.viewFromoe&&R.viewTo-oe<20&&(oe=Math.min(F,R.viewTo)),ni&&(J=tr(e.doc,J),oe=qt(e.doc,oe));var he=J!=R.viewFrom||oe!=R.viewTo||R.lastWrapHeight!=i.wrapperHeight||R.lastWrapWidth!=i.wrapperWidth;Di(e,J,oe),R.viewOffset=cr(ur(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ve=ra(e);if(!he&&ve==0&&!i.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var we=ko(e);return ve>4&&(R.lineDiv.style.display="none"),Mo(e,R.updateLineNumbers,i.dims),ve>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,Lo(we),x(R.cursorDiv),x(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,he&&(R.lastWrapHeight=i.wrapperHeight,R.lastWrapWidth=i.wrapperWidth,Ha(e,400)),R.updateLineNumbers=null,!0}function Ya(e,i){for(var R=i.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||i.oldDisplayWidth==Fe(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+Me(e.display)-Ee(e),R.top)}),i.visible=La(e.display,e.doc,R),i.visible.from>=e.display.viewFrom&&i.visible.to<=e.display.viewTo)break}else A&&(i.visible=La(e.display,e.doc,R));if(!Aa(e,i))break;ka(e);var F=na(e);Mn(e),lr(e,F),Un(e,F),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 R=new ia(e,i);if(Aa(e,R)){ka(e),Ya(e,R);var A=na(e);Mn(e),lr(e,A),Un(e,A),R.finish()}}function Mo(e,i,R){var A=e.display,F=e.options.lineNumbers,J=A.lineDiv,oe=J.firstChild;function he(Ot){var Bt=Ot.nextSibling;return d&&a&&e.display.currentWheelTarget==Ot?Ot.style.display="none":Ot.parentNode.removeChild(Ot),Bt}for(var ve=A.view,we=A.viewFrom,Be=0;Be-1&&(ot=!1),er(e,Xe,we,R)),ot&&(x(Xe.lineNumber),Xe.lineNumber.appendChild(document.createTextNode(li(e.options,we)))),oe=Xe.node.nextSibling}we+=Xe.size}for(;oe;)oe=he(oe)}function Ja(e){var i=e.gutters.offsetWidth;e.sizer.style.marginLeft=i+"px"}function Un(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+Ye(e)+"px"}function An(e){var i=e.display,R=i.view;if(!i.alignWidgets&&(!i.gutters.firstChild||!e.options.fixedGutter))return;for(var A=gi(i)-i.scroller.scrollLeft+e.doc.scrollLeft,F=i.gutters.offsetWidth,J=A+"px",oe=0;oeoe.clientWidth,ve=oe.scrollHeight>oe.clientHeight;if(!(A&&he||F&&ve))return;if(F&&a&&d){e:for(var we=i.target,Be=J.view;we!=oe;we=we.parentNode)for(var Xe=0;Xe=0&&$t(e,A.to())<=0)return R}return-1};var Nn=function(e,i){this.anchor=e,this.head=i};Nn.prototype.from=function(){return On(this.anchor,this.head)},Nn.prototype.to=function(){return _n(this.anchor,this.head)},Nn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function aa(e,i,R){var A=e&&e.options.selectionsMayTouch,F=i[R];i.sort(function(ut,ot){return $t(ut.from(),ot.from())}),R=fe(i,F);for(var J=1;J0:ve>=0){var we=On(he.from(),oe.from()),Be=_n(he.to(),oe.to()),Xe=he.empty()?oe.from()==oe.head:he.from()==he.head;J<=R&&--R,i.splice(--J,2,new Nn(Xe?Be:we,Xe?we:Be))}}return new zi(i,R)}function va(e,i){return new zi([new Nn(e,i||e)],0)}function ga(e){return e.text?wt(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($t(e,i.from)<0)return e;if($t(e,i.to)<=0)return ga(i);var R=e.line+i.text.length-(i.to.line-i.from.line)-1,A=e.ch;return e.line==i.to.line&&(A+=ga(i).ch-i.to.ch),wt(R,A)}function Za(e,i){for(var R=[],A=0;A1&&e.remove(he.line+1,Ot-1),e.insert(he.line+1,ir)}Zt(e,"change",e,i)}function Na(e,i,R){function A(F,J,oe){if(F.linked)for(var he=0;he1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(e.done)}function Es(e,i,R,A){var F=e.history;F.undone.length=0;var J=+new Date,oe,he;if((F.lastOp==A||F.lastOrigin==i.origin&&i.origin&&(i.origin.charAt(0)=="+"&&F.lastModTime>J-(e.cm?e.cm.options.historyEventDelay:500)||i.origin.charAt(0)=="*"))&&(oe=ml(F,F.lastOp==A)))he=re(oe.changes),$t(i.from,i.to)==0&&$t(i.from,he.to)==0?he.to=ga(i):oe.changes.push(rs(e,i));else{var ve=re(F.done);for((!ve||!ve.ranges)&&Fo(e.sel,F.done),oe={changes:[rs(e,i)],generation:F.generation},F.done.push(oe);F.done.length>F.undoDepth;)F.done.shift(),F.done[0].ranges||F.done.shift()}F.done.push(R),F.generation=++F.maxGeneration,F.lastModTime=F.lastSelTime=J,F.lastOp=F.lastSelOp=A,F.lastOrigin=F.lastSelOrigin=i.origin,he||Qe(e,"historyAdded")}function vl(e,i,R,A){var F=i.charAt(0);return F=="*"||F=="+"&&R.ranges.length==A.ranges.length&&R.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,i,R,A){var F=e.history,J=A&&A.origin;R==F.lastSelOp||J&&F.lastSelOrigin==J&&(F.lastModTime==F.lastSelTime&&F.lastOrigin==J||vl(e,J,re(F.done),i))?F.done[F.done.length-1]=i:Fo(i,F.done),F.lastSelTime=+new Date,F.lastSelOrigin=J,F.lastSelOp=R,A&&A.clearRedo!==!1&&bs(F.undone)}function Fo(e,i){var R=re(i);R&&R.ranges&&R.equals(e)||i.push(e)}function xs(e,i,R,A){var F=i["spans_"+e.id],J=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,A),function(oe){oe.markedSpans&&((F||(F=i["spans_"+e.id]={}))[J]=oe.markedSpans),++J})}function yl(e){if(!e)return null;for(var i,R=0;R-1&&(re(he)[Xe]=we[Xe],delete we[Xe]))}}return A}function ns(e,i,R,A){if(A){var F=e.anchor;if(R){var J=$t(i,F)<0;J!=$t(R,F)<0?(F=i,i=R):J!=$t(i,R)<0&&(i=R)}return new Nn(F,i)}else return new Nn(R||i,i)}function Uo(e,i,R,A,F){F==null&&(F=e.cm&&(e.cm.display.shift||e.extend)),Ni(e,new zi([ns(e.sel.primary(),i,R,F)],0),A)}function ws(e,i,R){for(var A=[],F=e.cm&&(e.cm.display.shift||e.extend),J=0;J=i.ch:he.to>i.ch))){if(F&&(Qe(ve,"beforeCursorEnter"),ve.explicitlyCleared))if(J.markedSpans){--oe;continue}else break;if(!ve.atomic)continue;if(R){var Xe=ve.find(A<0?1:-1),ut=void 0;if((A<0?Be:we)&&(Xe=Rs(e,Xe,-A,Xe&&Xe.line==i.line?J:null)),Xe&&Xe.line==i.line&&(ut=$t(Xe,R))&&(A<0?ut<0:ut>0))return eo(e,Xe,i,A,F)}var ot=ve.find(A<0?-1:1);return(A<0?we:Be)&&(ot=Rs(e,ot,A,ot.line==i.line?J:null)),ot?eo(e,ot,i,A,F):null}}return i}function Wo(e,i,R,A,F){var J=A||1,oe=eo(e,i,R,J,F)||!F&&eo(e,i,R,J,!0)||eo(e,i,R,-J,F)||!F&&eo(e,i,R,-J,!0);return oe||(e.cantEdit=!0,wt(e.first,0))}function Rs(e,i,R,A){return R<0&&i.ch==0?i.line>e.first?z(e,wt(i.line-1)):null:R>0&&i.ch==(A||ur(e,i.line)).text.length?i.line=0;--F)ks(e,{from:A[F].from,to:A[F].to,text:F?[""]:i.text,origin:i.origin});else ks(e,i)}function ks(e,i){if(i.text.length==1&&i.text[0]==""&&$t(i.from,i.to)==0)return;var R=Za(e,i);Es(e,i,R,e.cm?e.cm.curOp.id:NaN),go(e,i,R,Ii(e,i));var A=[];Na(e,function(F,J){!J&&fe(A,F.history)==-1&&(Ns(F.history,i),A.push(F.history)),go(F,i,null,Ii(F,i))})}function Ho(e,i,R){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!R)return;for(var F=e.history,J,oe=e.sel,he=i=="undo"?F.done:F.undone,ve=i=="undo"?F.undone:F.done,we=0;we=0;--ot){var Ot=ut(ot);if(Ot)return Ot.v}}function Ls(e,i){if(i==0)return;if(e.first+=i,e.sel=new zi(pe(e.sel.ranges,function(F){return new Nn(wt(F.anchor.line+i,F.anchor.ch),wt(F.head.line+i,F.head.ch))}),e.sel.primIndex),e.cm){zn(e.cm,e.first,e.first-i,i);for(var R=e.cm.display,A=R.viewFrom;Ae.lastLine())return;if(i.from.lineJ&&(i={from:i.from,to:wt(J,ur(e,J).text.length),text:[i.text[0]],origin:i.origin}),i.removed=Xn(e,i.from,i.to),R||(R=Za(e,i)),e.cm?xl(e.cm,i,A):ts(e,i,A),Bo(e,R,De),e.cantEdit&&Wo(e,wt(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,i,R){var A=e.doc,F=e.display,J=i.from,oe=i.to,he=!1,ve=J.line;e.options.lineWrapping||(ve=Zr(At(ur(A,J.line))),A.iter(ve,oe.line+1,function(ot){if(ot==F.maxLine)return he=!0,!0})),A.sel.contains(i.from,i.to)>-1&&Ue(e),ts(A,i,R,Xi(e)),e.options.lineWrapping||(A.iter(ve,J.line+i.text.length,function(ot){var Ot=st(ot);Ot>F.maxLineLength&&(F.maxLine=ot,F.maxLineLength=Ot,F.maxLineChanged=!0,he=!1)}),he&&(e.curOp.updateMaxLine=!0)),Li(A,J.line),Ha(e,400);var we=i.text.length-(oe.line-J.line)-1;i.full?zn(e):J.line==oe.line&&i.text.length==1&&!vs(e.doc,i)?Qn(e,J.line,"text"):zn(e,J.line,oe.line+1,we);var Be=Le(e,"changes"),Xe=Le(e,"change");if(Xe||Be){var ut={from:J,to:oe,text:i.text,removed:i.removed,origin:i.origin};Xe&&Zt(e,"change",e,ut),Be&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ut)}e.display.selForContextMenu=null}function ro(e,i,R,A,F){var J;A||(A=R),$t(A,R)<0&&(J=[A,R],R=J[0],A=J[1]),typeof i=="string"&&(i=e.splitLines(i)),to(e,{from:R,to:A,text:i,origin:F})}function Ms(e,i,R,A){R1||!(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=F.lines.length%25+25,he=oe;he10);e.parent.maybeSpill()},iterN:function(e,i,R){for(var A=0;Ae.display.maxLineLength&&(e.display.maxLine=we,e.display.maxLineLength=Be,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&zn(e,A,F+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Zt(e,"markerCleared",e,this,A,F),i&&Oa(e),this.parent&&this.parent.clear()},ja.prototype.find=function(e,i){e==null&&this.type=="bookmark"&&(e=1);for(var R,A,F=0;F0||oe==0&&J.clearWhenEmpty!==!1)return J;if(J.replacedWith&&(J.collapsed=!0,J.widgetNode=M("span",[J.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||J.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(J.widgetNode.insertLeft=!0)),J.collapsed){if(dt(e,i.line,i,R,J)||i.line!=R.line&&dt(e,R.line,i,R,J))throw new Error("Inserting collapsed marker partially overlapping an existing one");xi()}J.addToHistory&&Es(e,{from:i,to:R,origin:"markText"},e.sel,NaN);var he=i.line,ve=e.cm,we;if(e.iter(he,R.line+1,function(Xe){ve&&J.collapsed&&!ve.options.lineWrapping&&At(Xe)==ve.display.maxLine&&(we=!0),J.collapsed&&he!=i.line&&$n(Xe,0),Mi(Xe,new Fi(J,he==i.line?i.ch:null,he==R.line?R.ch:null)),++he}),J.collapsed&&e.iter(i.line,R.line+1,function(Xe){Gt(e,Xe)&&$n(Xe,0)}),J.clearOnEnter&&Re(J,"beforeCursorEnter",function(){return J.clear()}),J.readOnly&&(Ti(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),J.collapsed&&(J.id=++Fs,J.atomic=!0),ve){if(we&&(ve.curOp.updateMaxLine=!0),J.collapsed)zn(ve,i.line,R.line+1);else if(J.className||J.startStyle||J.endStyle||J.css||J.attributes||J.title)for(var Be=i.line;Be<=R.line;Be++)Qn(ve,Be,"text");J.atomic&&Os(ve.doc),Zt(ve,"markerAdded",ve,J)}return J}var Co=function(e,i){this.markers=e,this.primary=i;for(var R=0;R=0;ve--)to(this,A[ve]);he?Ss(this,he):this.cm&&ba(this.cm)}),undo:mi(function(){Ho(this,"undo")}),redo:mi(function(){Ho(this,"redo")}),undoSelection:mi(function(){Ho(this,"undo",!0)}),redoSelection:mi(function(){Ho(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,i=0,R=0,A=0;A=e.ch)&&i.push(F.marker.parent||F.marker)}return i},findMarks:function(e,i,R){e=z(this,e),i=z(this,i);var A=[],F=e.line;return this.iter(e.line,i.line+1,function(J){var oe=J.markedSpans;if(oe)for(var he=0;he=ve.to||ve.from==null&&F!=e.line||ve.from!=null&&F==i.line&&ve.from>=i.ch)&&(!R||R(ve.marker))&&A.push(ve.marker.parent||ve.marker)}++F}),A},getAllMarks:function(){var e=[];return this.iter(function(i){var R=i.markedSpans;if(R)for(var A=0;Ae)return i=e,!0;e-=J,++R}),z(this,wt(R,i))},indexFromPos:function(e){e=z(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 Be=e.dataTransfer.getData("Text");if(Be){var Xe;if(i.state.draggingText&&!i.state.draggingText.copy&&(Xe=i.listSelections()),Bo(i.doc,va(R,R)),Xe)for(var ut=0;ut=0;he--)ro(e.doc,"",A[he].from,A[he].to,"+delete");ba(e)})}function as(e,i,R){var A=Te(e.text,i+R,R);return A<0||A>e.text.length?null:A}function os(e,i,R){var A=as(e,i.ch,R);return A==null?null:new wt(i.line,A,R<0?"after":"before")}function ss(e,i,R,A,F){if(e){i.doc.direction=="rtl"&&(F=-F);var J=ht(R,i.doc.direction);if(J){var oe=F<0?re(J):J[0],he=F<0==(oe.level==1),ve=he?"after":"before",we;if(oe.level>0||i.doc.direction=="rtl"){var Be=We(i,R);we=F<0?R.text.length-1:0;var Xe=Ze(i,Be,we).top;we=Je(function(ut){return Ze(i,Be,ut).top==Xe},F<0==(oe.level==1)?oe.from:oe.to-1,we),ve=="before"&&(we=as(R,we,1))}else we=F<0?oe.to:oe.from;return new wt(A,we,ve)}}return new wt(A,F<0?R.text.length:0,F<0?"before":"after")}function Il(e,i,R,A){var F=ht(i,e.doc.direction);if(!F)return os(i,R,A);R.ch>=i.text.length?(R.ch=i.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var J=at(F,R.ch,R.sticky),oe=F[J];if(e.doc.direction=="ltr"&&oe.level%2==0&&(A>0?oe.to>R.ch:oe.from=oe.from&&ut>=Be.begin)){var ot=Xe?"before":"after";return new wt(R.line,ut,ot)}}var Ot=function(ir,_r,ar){for(var Rr=function(Zn,Ai){return Ai?new wt(R.line,he(Zn,1),"before"):new wt(R.line,Zn,"after")};ir>=0&&ir0==(qr.level!=1),wn=Gr?ar.begin:he(ar.end,-1);if(qr.from<=wn&&wn0?Be.end:he(Be.begin,-1);return Qt!=null&&!(A>0&&Qt==i.text.length)&&(Bt=Ot(A>0?0:F.length-1,A,we(Qt)),Bt)?Bt:null}var So={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),De)},killLine:function(e){return ao(e,function(i){if(i.empty()){var R=ur(e.doc,i.head.line).text.length;return i.head.ch==R&&i.head.line0)F=new wt(F.line,F.ch+1),e.replaceRange(J.charAt(F.ch-1)+J.charAt(F.ch-2),wt(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var oe=ur(e.doc,F.line-1).text;oe&&(F=new wt(F.line,1),e.replaceRange(J.charAt(0)+e.doc.lineSeparator()+oe.charAt(oe.length-1),wt(F.line-1,oe.length-1),F,"+transpose"))}}R.push(new Nn(F,F))}e.setSelections(R)})},newlineAndIndent:function(e){return Wi(e,function(){for(var i=e.listSelections(),R=i.length-1;R>=0;R--)e.replaceRange(e.doc.lineSeparator(),i[R].anchor,i[R].head,"+input");i=e.listSelections();for(var A=0;Ae&&$t(i,this.pos)==0&&R==this.button};var Oo,Ao;function Hl(e,i){var R=+new Date;return Ao&&Ao.compare(R,e,i)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(R,e,i)?(Ao=new us(R,e,i),Oo=null,"double"):(Oo=new us(R,e,i),Ao=null,"single")}function tl(e){var i=this,R=i.display;if(lt(i,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,yn(R,e)){d||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(cs(i,e))return;var A=di(i,e),F=$e(e),J=A?Hl(A,F):"single";if(window.focus(),F==1&&i.state.selectingText&&i.state.selectingText(e),A&&zl(i,F,A,J,e))return;F==1?A?Gl(i,A,J,e):et(e)==R.scroller&&Ce(e):F==2?(A&&Uo(i.doc,A),setTimeout(function(){return R.input.focus()},20)):F==3&&(k?i.display.input.onContextMenu(e):wa(i))}function zl(e,i,R,A,F){var J="Click";return A=="double"?J="Double"+J:A=="triple"&&(J="Triple"+J),J=(i==1?"Left":i==2?"Middle":"Right")+J,To(e,Gs(J,F),F,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,R)!=Ae}finally{e.state.suppressEdits=!1}return he})}function Kl(e,i,R){var A=e.getOption("configureMouse"),F=A?A(e,i,R):{};if(F.unit==null){var J=t?R.shiftKey&&R.metaKey:R.altKey;F.unit=J?"rectangle":i=="single"?"char":i=="double"?"word":"line"}return(F.extend==null||e.doc.extend)&&(F.extend=e.doc.extend||R.shiftKey),F.addNew==null&&(F.addNew=a?R.metaKey:R.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(a?R.altKey:R.ctrlKey)),F}function Gl(e,i,R,A){S?setTimeout(U(Ba,e),0):e.curOp.focus=G();var F=Kl(e,R,A),J=e.doc.sel,oe;e.options.dragDrop&&bt&&!e.isReadOnly()&&R=="single"&&(oe=J.contains(i))>-1&&($t((oe=J.ranges[oe]).from(),i)<0||i.xRel>0)&&($t(oe.to(),i)>0||i.xRel<0)?Vl(e,A,i,F):Xl(e,A,i,F)}function Vl(e,i,R,A){var F=e.display,J=!1,oe=pi(e,function(we){d&&(F.scroller.draggable=!1),e.state.draggingText=!1,ft(F.wrapper.ownerDocument,"mouseup",oe),ft(F.wrapper.ownerDocument,"mousemove",he),ft(F.scroller,"dragstart",ve),ft(F.scroller,"drop",oe),J||(Ce(we),A.addNew||Uo(e.doc,R,null,null,A.extend),d&&!u||S&&b==9?setTimeout(function(){F.wrapper.ownerDocument.body.focus({preventScroll:!0}),F.input.focus()},20):F.input.focus())}),he=function(we){J=J||Math.abs(i.clientX-we.clientX)+Math.abs(i.clientY-we.clientY)>=10},ve=function(){return J=!0};d&&(F.scroller.draggable=!0),e.state.draggingText=oe,oe.copy=!A.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),Re(F.wrapper.ownerDocument,"mouseup",oe),Re(F.wrapper.ownerDocument,"mousemove",he),Re(F.scroller,"dragstart",ve),Re(F.scroller,"drop",oe),wa(e),setTimeout(function(){return F.input.focus()},20)}function rl(e,i,R){if(R=="char")return new Nn(i,i);if(R=="word")return e.findWordAt(i);if(R=="line")return new Nn(wt(i.line,0),z(e.doc,wt(i.line+1,0)));var A=R(e,i);return new Nn(A.from,A.to)}function Xl(e,i,R,A){var F=e.display,J=e.doc;Ce(i);var oe,he,ve=J.sel,we=ve.ranges;if(A.addNew&&!A.extend?(he=J.sel.contains(R),he>-1?oe=we[he]:oe=new Nn(R,R)):(oe=J.sel.primary(),he=J.sel.primIndex),A.unit=="rectangle")A.addNew||(oe=new Nn(R,R)),R=di(e,i,!0,!0),he=-1;else{var Be=rl(e,R,A.unit);A.extend?oe=ns(oe,Be.anchor,Be.head,A.extend):oe=Be}A.addNew?he==-1?(he=we.length,Ni(J,aa(e,we.concat([oe]),he),{scroll:!1,origin:"*mouse"})):we.length>1&&we[he].empty()&&A.unit=="char"&&!A.extend?(Ni(J,aa(e,we.slice(0,he).concat(we.slice(he+1)),0),{scroll:!1,origin:"*mouse"}),ve=J.sel):is(J,he,oe,ye):(he=0,Ni(J,new zi([oe],0),ye),ve=J.sel);var Xe=R;function ut(ar){if($t(Xe,ar)==0)return;if(Xe=ar,A.unit=="rectangle"){for(var Rr=[],qr=e.options.tabSize,Gr=X(ur(J,R.line).text,R.ch,qr),wn=X(ur(J,ar.line).text,ar.ch,qr),Zn=Math.min(Gr,wn),Ai=Math.max(Gr,wn),oi=Math.min(R.line,ar.line),ea=Math.min(e.lastLine(),Math.max(R.line,ar.line));oi<=ea;oi++){var Ji=ur(J,oi).text,yi=xe(Ji,Zn,qr);Zn==Ai?Rr.push(new Nn(wt(oi,yi),wt(oi,yi))):Ji.length>yi&&Rr.push(new Nn(wt(oi,yi),wt(oi,xe(Ji,Ai,qr))))}Rr.length||Rr.push(new Nn(R,R)),Ni(J,aa(e,ve.ranges.slice(0,he).concat(Rr),he),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ar)}else{var Qi=oe,ki=rl(e,ar,A.unit),Si=Qi.anchor,bi;$t(ki.anchor,Si)>0?(bi=ki.head,Si=On(Qi.from(),ki.anchor)):(bi=ki.anchor,Si=_n(Qi.to(),ki.head));var fi=ve.ranges.slice(0);fi[he]=$l(e,new Nn(z(J,Si),bi)),Ni(J,aa(e,fi,he),ye)}}var ot=F.wrapper.getBoundingClientRect(),Ot=0;function Bt(ar){var Rr=++Ot,qr=di(e,ar,!0,A.unit=="rectangle");if(!qr)return;if($t(qr,Xe)!=0){e.curOp.focus=G(),ut(qr);var Gr=La(F,J);(qr.line>=Gr.to||qr.lineot.bottom?20:0;wn&&setTimeout(pi(e,function(){if(Ot!=Rr)return;F.scroller.scrollTop+=wn,Bt(ar)}),50)}}function Qt(ar){e.state.selectingText=!1,Ot=Infinity,ar&&(Ce(ar),F.input.focus()),ft(F.wrapper.ownerDocument,"mousemove",ir),ft(F.wrapper.ownerDocument,"mouseup",_r),J.history.lastSelOrigin=null}var ir=pi(e,function(ar){ar.buttons===0||!$e(ar)?Qt(ar):Bt(ar)}),_r=pi(e,Qt);e.state.selectingText=_r,Re(F.wrapper.ownerDocument,"mousemove",ir),Re(F.wrapper.ownerDocument,"mouseup",_r)}function $l(e,i){var R=i.anchor,A=i.head,F=ur(e.doc,R.line);if($t(R,A)==0&&R.sticky==A.sticky)return i;var J=ht(F);if(!J)return i;var oe=at(J,R.ch,R.sticky),he=J[oe];if(he.from!=R.ch&&he.to!=R.ch)return i;var ve=oe+(he.from==R.ch==(he.level!=1)?0:1);if(ve==0||ve==J.length)return i;var we;if(A.line!=R.line)we=(A.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Be=at(J,A.ch,A.sticky),Xe=Be-oe||(A.ch-R.ch)*(he.level==1?-1:1);Be==ve-1||Be==ve?we=Xe<0:we=Xe>0}var ut=J[ve+(we?-1:0)],ot=we==(ut.level==1),Ot=ot?ut.from:ut.to,Bt=ot?"after":"before";return R.ch==Ot&&R.sticky==Bt?i:new Nn(new wt(R.line,Ot,Bt),A)}function nl(e,i,R,A){var F,J;if(i.touches)F=i.touches[0].clientX,J=i.touches[0].clientY;else try{F=i.clientX,J=i.clientY}catch(ut){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&Ce(i);var oe=e.display,he=oe.lineDiv.getBoundingClientRect();if(J>he.bottom||!Le(e,R))return ke(i);J-=he.top-oe.viewOffset;for(var ve=0;ve=F){var Be=Bn(e.doc,J),Xe=e.display.gutterSpecs[ve];return Qe(e,R,e,Be,Xe.className,i),ke(i)}}}function cs(e,i){return nl(e,i,"gutterClick",!0)}function il(e,i){if(yn(e.display,i)||Yl(e,i))return;if(lt(e,i,"contextmenu"))return;k||e.display.input.onContextMenu(i)}function Yl(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-"),nn(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Vo={};function Jl(e){var i=e.optionHandlers;function R(A,F,J,oe){e.defaults[A]=F,J&&(i[A]=oe?function(he,ve,we){we!=oo&&J(he,ve,we)}:J)}e.defineOption=R,e.Init=oo,R("value","",function(A,F){return A.setValue(F)},!0),R("mode",null,function(A,F){A.doc.modeOption=F,Ra(A)},!0),R("indentUnit",2,Ra,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(A){vo(A),nn(A),zn(A)},!0),R("lineSeparator",null,function(A,F){if(A.doc.lineSep=F,!F)return;var J=[],oe=A.doc.first;A.doc.iter(function(ve){for(var we=0;;){var Be=ve.text.indexOf(F,we);if(Be==-1)break;we=Be+F.length,J.push(wt(oe,Be))}oe++});for(var he=J.length-1;he>=0;he--)ro(A.doc,F,J[he],wt(J[he].line,J[he].ch+F.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,F,J){A.state.specialChars=new RegExp(F.source+(F.test(" ")?"":"| "),"g"),J!=oo&&A.refresh()}),R("specialCharPlaceholder",pr,function(A){return A.refresh()},!0),R("electricChars",!0),R("inputStyle",r?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),R("spellcheck",!1,function(A,F){return A.getInputField().spellcheck=F},!0),R("autocorrect",!1,function(A,F){return A.getInputField().autocorrect=F},!0),R("autocapitalize",!1,function(A,F){return A.getInputField().autocapitalize=F},!0),R("rtlMoveVisually",!w),R("wholeLineUpdateBefore",!0),R("theme","default",function(A){al(A),ma(A)},!0),R("keyMap","default",function(A,F,J){var oe=Ko(F),he=J!=oo&&Ko(J);he&&he.detach&&he.detach(A,oe),oe.attach&&oe.attach(A,he||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Zl,!0),R("gutters",[],function(A,F){A.display.gutterSpecs=Hi(F,A.options.lineNumbers),ma(A)},!0),R("fixedGutter",!0,function(A,F){A.display.gutters.style.left=F?gi(A.display)+"px":"0",A.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(A){return lr(A)},!0),R("scrollbarStyle","native",function(A){pa(A),lr(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),R("lineNumbers",!1,function(A,F){A.display.gutterSpecs=Hi(A.options.gutters,F),ma(A)},!0),R("firstLineNumber",1,ma,!0),R("lineNumberFormatter",function(A){return A},ma,!0),R("showCursorWhenSelecting",!1,Mn,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(A,F){F=="nocursor"&&(ua(A),A.display.input.blur()),A.display.input.readOnlyChanged(F)}),R("screenReaderLabel",null,function(A,F){F=F===""?null:F,A.display.input.screenReaderLabelChanged(F)}),R("disableInput",!1,function(A,F){F||A.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,Mn,!0),R("singleCursorHeightPerLine",!0,Mn,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,vo,!0),R("addModeClass",!1,vo,!0),R("pollInterval",100),R("undoDepth",200,function(A,F){return A.doc.history.undoDepth=F}),R("historyEventDelay",1250),R("viewportMargin",10,function(A){return A.refresh()},!0),R("maxHighlightLength",1e4,vo,!0),R("moveInputWithCursor",!0,function(A,F){F||A.display.input.resetPosition()}),R("tabindex",null,function(A,F){return A.display.input.getField().tabIndex=F||""}),R("autofocus",null),R("direction","ltr",function(A,F){return A.doc.setDirection(F)},!0),R("phrases",null)}function Ql(e,i,R){var A=R&&R!=oo;if(!i!=!A){var F=e.display.dragFunctions,J=i?Re:ft;J(e.display.scroller,"dragstart",F.start),J(e.display.scroller,"dragenter",F.enter),J(e.display.scroller,"dragover",F.over),J(e.display.scroller,"dragleave",F.leave),J(e.display.scroller,"drop",F.drop)}}function Zl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(C(e.display.wrapper,"CodeMirror-wrap"),Lr(e)),Oi(e),zn(e),nn(e),setTimeout(function(){return lr(e)},100)}function ri(e,i){var R=this;if(!(this instanceof ri))return new ri(e,i);this.options=i=i?W(i):{},W(ol,i,!1);var A=i.value;typeof A=="string"?A=new Yi(A,i.mode,null,i.lineSeparator,i.direction):i.mode&&(A.modeOption=i.mode),this.doc=A;var F=new ri.inputStyles[i.inputStyle](this),J=this.display=new Ka(e,A,F,i);J.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 ne,keySeq:null,specialChars:null},i.autofocus&&!r&&J.input.focus(),S&&b<11&&setTimeout(function(){return R.display.input.reset(!0)},20),ql(this),Dl(),Kn(this),this.curOp.forceUpdate=!0,gs(this,A),i.autofocus&&!r||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&la(R)},20):ua(this);for(var oe in Vo)Vo.hasOwnProperty(oe)&&Vo[oe](this,i[oe],oo);wi(this),i.finishInit&&i.finishInit(this);for(var he=0;he20*20}Re(i.scroller,"touchstart",function(ve){if(!lt(e,ve)&&!J(ve)&&!cs(e,ve)){i.input.ensurePolled(),clearTimeout(R);var we=+new Date;i.activeTouch={start:we,moved:!1,prev:we-A.end<=300?A:null},ve.touches.length==1&&(i.activeTouch.left=ve.touches[0].pageX,i.activeTouch.top=ve.touches[0].pageY)}}),Re(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Re(i.scroller,"touchend",function(ve){var we=i.activeTouch;if(we&&!yn(i,ve)&&we.left!=null&&!we.moved&&new Date-we.start<300){var Be=e.coordsChar(i.activeTouch,"page"),Xe;!we.prev||oe(we,we.prev)?Xe=new Nn(Be,Be):!we.prev.prev||oe(we,we.prev.prev)?Xe=e.findWordAt(Be):Xe=new Nn(wt(Be.line,0),z(e.doc,wt(Be.line+1,0))),e.setSelection(Xe.anchor,Xe.head),e.focus(),Ce(ve)}F()}),Re(i.scroller,"touchcancel",F),Re(i.scroller,"scroll",function(){i.scroller.clientHeight&&(fa(e,i.scroller.scrollTop),$i(e,i.scroller.scrollLeft,!0),Qe(e,"scroll",e))}),Re(i.scroller,"mousewheel",function(ve){return po(e,ve)}),Re(i.scroller,"DOMMouseScroll",function(ve){return po(e,ve)}),Re(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(ve){lt(e,ve)||Ne(ve)},over:function(ve){lt(e,ve)||(Rl(e,ve),Ne(ve))},start:function(ve){return Al(e,ve)},drop:pi(e,Ol),leave:function(ve){lt(e,ve)||Ws(e)}};var he=i.input.getField();Re(he,"keyup",function(ve){return Zs.call(e,ve)}),Re(he,"keydown",pi(e,Qs)),Re(he,"keypress",pi(e,el)),Re(he,"focus",function(ve){return la(e,ve)}),Re(he,"blur",function(ve){return ua(e,ve)})}var ds=[];ri.defineInitHook=function(e){return ds.push(e)};function Ro(e,i,R,A){var F=e.doc,J;R==null&&(R="add"),R=="smart"&&(F.mode.indent?J=Vt(e,i).state:R="prev");var oe=e.options.tabSize,he=ur(F,i),ve=X(he.text,null,oe);he.stateAfter&&(he.stateAfter=null);var we=he.text.match(/^\s*/)[0],Be;if(!A&&!/\S/.test(he.text))Be=0,R="not";else if(R=="smart"&&(Be=F.mode.indent(J,he.text.slice(we.length),he.text),Be==Ae||Be>150)){if(!A)return;R="prev"}R=="prev"?i>F.first?Be=X(ur(F,i-1).text,null,oe):Be=0:R=="add"?Be=ve+e.options.indentUnit:R=="subtract"?Be=ve-e.options.indentUnit:typeof R=="number"&&(Be=ve+R),Be=Math.max(0,Be);var Xe="",ut=0;if(e.options.indentWithTabs)for(var ot=Math.floor(Be/oe);ot;--ot)ut+=oe,Xe+=" ";if(utoe,ve=mr(i),we=null;if(he&&A.ranges.length>1)if(ya&&ya.text.join(` `)==i){if(A.ranges.length%ya.text.length==0){we=[];for(var Be=0;Be=0;ut--){var ot=A.ranges[ut],Ot=ot.from(),Bt=ot.to();ot.empty()&&(R&&R>0?Ot=wt(Ot.line,Ot.ch-R):e.state.overwrite&&!he?Bt=wt(Bt.line,Math.min(ur(J,Bt.line).text.length,Bt.ch+re(ve).length)):he&&ya&&ya.lineWise&&ya.text.join(` `)==ve.join(` `)&&(Ot=Bt=wt(Ot.line,0)));var Qt={from:Ot,to:Bt,text:we?we[ut%we.length]:ve,origin:F||(he?"paste":e.state.cutIncoming>oe?"cut":"+input")};to(e.doc,Qt),Zt(e,"inputRead",e,Qt)}i&&!he&&ll(e,i),ba(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Xe),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,i){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!i.isReadOnly()&&!i.options.disableInput&&Wi(i,function(){return fs(i,R,0,null,"paste")}),!0}function ll(e,i){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,A=R.ranges.length-1;A>=0;A--){var F=R.ranges[A];if(F.head.ch>100||A&&R.ranges[A-1].head.line==F.head.line)continue;var J=e.getModeAt(F.head),oe=!1;if(J.electricChars){for(var he=0;he-1){oe=Ro(e,F.head.line,"smart");break}}else J.electricInput&&(J.electricInput.test(ur(e.doc,F.head.line).text.slice(0,F.head.ch))&&(oe=Ro(e,F.head.line,"smart")));oe&&Zt(e,"electricInput",e,F.head.line)}}function ul(e){for(var i=[],R=[],A=0;AJ&&(Ro(this,he.head.line,A,!0),J=he.head.line,oe==this.doc.sel.primIndex&&ba(this));else{var ve=he.from(),we=he.to(),Be=Math.max(J,ve.line);J=Math.min(this.lastLine(),we.line-(we.ch?0:1))+1;for(var Xe=Be;Xe0&&is(this.doc,oe,new Nn(ve,ut[oe].to()),De)}}}),getTokenAt:function(A,F){return En(this,A,F)},getLineTokens:function(A,F){return En(this,wt(A),F,!0)},getTokenTypeAt:function(A){A=z(this.doc,A);var F=Rt(this,ur(this.doc,A.line)),J=0,oe=(F.length-1)/2,he=A.ch,ve;if(he==0)ve=F[2];else for(;;){var we=J+oe>>1;if((we?F[we*2-1]:0)>=he)oe=we;else if(F[we*2+1]ve&&(A=ve,oe=!0),he=ur(this.doc,A)}else he=A;return xn(this,he,{top:0,left:0},F||"page",J||oe).top+(oe?this.doc.height-cr(he):0)},defaultTextHeight:function(){return ti(this.display)},defaultCharWidth:function(){return ci(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,F,J,oe,he){var ve=this.display;A=pn(this,z(this.doc,A));var we=A.bottom,Be=A.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),ve.sizer.appendChild(F),oe=="over")we=A.top;else if(oe=="above"||oe=="near"){var Xe=Math.max(ve.wrapper.clientHeight,this.doc.height),ut=Math.max(ve.sizer.clientWidth,ve.lineSpace.clientWidth);(oe=="above"||A.bottom+F.offsetHeight>Xe)&&A.top>F.offsetHeight?we=A.top-F.offsetHeight:A.bottom+F.offsetHeight<=Xe&&(we=A.bottom),Be+F.offsetWidth>ut&&(Be=ut-F.offsetWidth)}F.style.top=we+"px",F.style.left=F.style.right="",he=="right"?(Be=ve.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(he=="left"?Be=0:he=="middle"&&(Be=(ve.sizer.clientWidth-F.offsetWidth)/2),F.style.left=Be+"px"),J&&Ma(this,{left:Be,top:we,right:Be+F.offsetWidth,bottom:we+F.offsetHeight})},triggerOnKeyDown:Pi(Qs),triggerOnKeyPress:Pi(el),triggerOnKeyUp:Zs,triggerOnMouseDown:Pi(tl),execCommand:function(A){if(So.hasOwnProperty(A))return So[A].call(null,this)},triggerElectric:Pi(function(A){ll(this,A)}),findPosH:function(A,F,J,oe){var he=1;F<0&&(he=-1,F=-F);for(var ve=z(this.doc,A),we=0;we0&&Be(J.charAt(oe-1));)--oe;for(;he.5||this.options.lineWrapping)&&Oi(this),Qe(this,"refresh",this)}),swapDoc:Pi(function(A){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),nn(this),this.display.input.reset(),da(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Zt(this,"swapDoc",this,F),F}),phrase:function(A){var F=this.options.phrases;return F&&Object.prototype.hasOwnProperty.call(F,A)?F[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}},Ie(e),e.registerHelper=function(A,F,J){R.hasOwnProperty(A)||(R[A]=e[A]={_global:[]}),R[A][F]=J},e.registerGlobalHelper=function(A,F,J,oe){e.registerHelper(A,F,oe),R[A]._global.push({pred:J,val:oe})}}function hs(e,i,R,A,F){var J=i,oe=R,he=ur(e,i.line),ve=F&&e.direction=="rtl"?-R:R;function we(){var _r=i.line+ve;return _r=e.first+e.size?!1:(i=new wt(_r,i.ch,i.sticky),he=ur(e,_r))}function Be(_r){var ar;if(A=="codepoint"){var Rr=he.text.charCodeAt(i.ch+(A>0?0:-1));isNaN(Rr)?ar=null:ar=new wt(i.line,Math.max(0,Math.min(he.text.length,i.ch+R*(Rr>=55296&&Rr<56320?2:1))),-R)}else F?ar=Il(e.cm,he,i,R):ar=os(he,i,R);if(ar==null)if(!_r&&we())i=ss(F,e.cm,he,i.line,ve);else return!1;else i=ar;return!0}if(A=="char"||A=="codepoint")Be();else if(A=="column")Be(!0);else if(A=="word"||A=="group")for(var Xe=null,ut=A=="group",ot=e.cm&&e.cm.getHelper(i,"wordChars"),Ot=!0;!(R<0&&!Be(!Ot));Ot=!1){var Bt=he.text.charAt(i.ch)||` `,Qt=V(Bt,ot)?"w":ut&&Bt==` `?"n":!ut||/\s/.test(Bt)?null:"p";if(ut&&!Ot&&!Qt&&(Qt="s"),Xe&&Xe!=Qt){R<0&&(R=1,Be(),i.sticky="after");break}if(Qt&&(Xe=Qt),R>0&&!Be(!Ot))break}var ir=Wo(e,i,J,oe,!0);return en(J,ir)&&(ir.hitSide=!0),ir}function fl(e,i,R,A){var F=e.doc,J=i.left,oe;if(A=="page"){var he=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ve=Math.max(he-.5*ti(e.display),3);oe=(R>0?i.bottom:i.top)+R*ve}else A=="line"&&(oe=R>0?i.bottom+3:i.top-3);for(var we;!(we=dn(e,J,oe),!we.outside);){if(R<0?oe<=0:oe>=F.height){we.hitSide=!0;break}oe+=R*5}return we}var Gn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Gn.prototype.init=function(e){var i=this,R=this,A=R.cm,F=R.div=e.lineDiv;cl(F,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function J(he){for(var ve=he.target;ve;ve=ve.parentNode){if(ve==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ve.className))break}return!1}Re(F,"paste",function(he){if(!J(he)||lt(A,he)||sl(he,A))return;b<=11&&setTimeout(pi(A,function(){return i.updateFromDOM()}),20)}),Re(F,"compositionstart",function(he){i.composing={data:he.data,done:!1}}),Re(F,"compositionupdate",function(he){i.composing||(i.composing={data:he.data,done:!1})}),Re(F,"compositionend",function(he){i.composing&&(he.data!=i.composing.data&&i.readFromDOMSoon(),i.composing.done=!0)}),Re(F,"touchstart",function(){return R.forceCompositionEnd()}),Re(F,"input",function(){i.composing||i.readFromDOMSoon()});function oe(he){if(!J(he)||lt(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 ve=ul(A);Xo({lineWise:!0,text:ve.text}),he.type=="cut"&&A.operation(function(){A.setSelections(ve.ranges,0,De),A.replaceSelection("",null,"cut")})}else return;if(he.clipboardData){he.clipboardData.clearData();var we=ya.text.join(` `);if(he.clipboardData.setData("Text",we),he.clipboardData.getData("Text")==we){he.preventDefault();return}}var Be=dl(),Xe=Be.firstChild;A.display.lineSpace.insertBefore(Be,A.display.lineSpace.firstChild),Xe.value=ya.text.join(` `);var ut=document.activeElement;K(Xe),setTimeout(function(){A.display.lineSpace.removeChild(Be),ut.focus(),ut==F&&R.showPrimarySelection()},50)}Re(F,"copy",oe),Re(F,"cut",oe)},Gn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Gn.prototype.prepareSelection=function(){var e=Ui(this.cm,!1);return e.focus=document.activeElement==this.div,e},Gn.prototype.showSelection=function(e,i){if(!e||!this.cm.display.view.length)return;(e.focus||i)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Gn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Gn.prototype.showPrimarySelection=function(){var e=this.getSelection(),i=this.cm,R=i.doc.sel.primary(),A=R.from(),F=R.to();if(i.display.viewTo==i.display.viewFrom||A.line>=i.display.viewTo||F.line=i.display.viewFrom&&hl(i,A)||{node:he[0].measure.map[2],offset:0},we=F.linee.firstLine()&&(A=wt(A.line-1,ur(e.doc,A.line-1).length)),F.ch==ur(e.doc,F.line).text.length&&F.linei.viewTo-1)return!1;var J,oe,he;A.line==i.viewFrom||(J=Hn(e,A.line))==0?(oe=Zr(i.view[0].line),he=i.view[0].node):(oe=Zr(i.view[J].line),he=i.view[J-1].node.nextSibling);var ve=Hn(e,F.line),we,Be;if(ve==i.view.length-1?(we=i.viewTo-1,Be=i.lineDiv.lastChild):(we=Zr(i.view[ve+1].line)-1,Be=i.view[ve+1].node.previousSibling),!he)return!1;for(var Xe=e.doc.splitLines(ru(e,he,Be,oe,we)),ut=Xn(e.doc,wt(oe,0),wt(we,ur(e.doc,we).text.length));Xe.length>1&&ut.length>1;)if(re(Xe)==re(ut))Xe.pop(),ut.pop(),we--;else if(Xe[0]==ut[0])Xe.shift(),ut.shift(),oe++;else break;for(var ot=0,Ot=0,Bt=Xe[0],Qt=ut[0],ir=Math.min(Bt.length,Qt.length);otA.ch&&_r.charCodeAt(_r.length-Ot-1)==ar.charCodeAt(ar.length-Ot-1);)ot--,Ot++;Xe[Xe.length-1]=_r.slice(0,_r.length-Ot).replace(/^\u200b+/,""),Xe[0]=Xe[0].slice(ot).replace(/\u200b+$/,"");var qr=wt(oe,ot),Gr=wt(we,ut.length?re(ut).length-Ot:0);if(Xe.length>1||Xe[0]||$t(qr,Gr))return ro(e.doc,Xe,qr,Gr,"+input"),!0},Gn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Gn.prototype.reset=function(){this.forceCompositionEnd()},Gn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Gn.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)},Gn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Wi(this.cm,function(){return zn(e.cm)})},Gn.prototype.setUneditable=function(e){e.contentEditable="false"},Gn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||pi(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Gn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Gn.prototype.onContextMenu=function(){},Gn.prototype.resetPosition=function(){},Gn.prototype.needsContentAttribute=!0;function hl(e,i){var R=Ve(e,i.line);if(!R||R.hidden)return null;var A=ur(e.doc,i.line),F=_e(R,A,i.line),J=ht(A,e.doc.direction),oe="left";if(J){var he=at(J,i.ch);oe=he%2?"right":"left"}var ve=kt(F.map,i.ch,oe);return ve.offset=ve.collapse=="right"?ve.end:ve.start,ve}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,R,A,F){var J="",oe=!1,he=e.doc.lineSeparator(),ve=!1;function we(ot){return function(Ot){return Ot.id==ot}}function Be(){oe&&(J+=he,ve&&(J+=he),oe=ve=!1)}function Xe(ot){ot&&(Be(),J+=ot)}function ut(ot){if(ot.nodeType==1){var Ot=ot.getAttribute("cm-text");if(Ot){Xe(Ot);return}var Bt=ot.getAttribute("cm-marker"),Qt;if(Bt){var ir=e.findMarks(wt(A,0),wt(F+1,0),we(+Bt));ir.length&&(Qt=ir[0].find(0))&&Xe(Xn(e.doc,Qt.from,Qt.to).join(he));return}if(ot.getAttribute("contenteditable")=="false")return;var _r=/^(pre|div|p|li|table|br)$/i.test(ot.nodeName);if(!/^br$/i.test(ot.nodeName)&&ot.textContent.length==0)return;_r&&Be();for(var ar=0;ar=9&&i.hasSelection&&(i.hasSelection=null),R.poll()}),Re(F,"paste",function(oe){if(lt(A,oe)||sl(oe,A))return;A.state.pasteIncoming=+new Date,R.fastPoll()});function J(oe){if(lt(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,De):(R.prevInput="",F.value=he.text.join(` `),K(F))}else return;oe.type=="cut"&&(A.state.cutIncoming=+new Date)}Re(F,"cut",J),Re(F,"copy",J),Re(e.scroller,"paste",function(oe){if(yn(e,oe)||lt(A,oe))return;if(!F.dispatchEvent){A.state.pasteIncoming=+new Date,R.focus();return}var he=new Event("paste");he.clipboardData=oe.clipboardData,F.dispatchEvent(he)}),Re(e.lineSpace,"selectstart",function(oe){yn(e,oe)||Ce(oe)}),Re(F,"compositionstart",function(){var oe=A.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:oe,range:A.markText(oe,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Re(F,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},vi.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},vi.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},vi.prototype.prepareSelection=function(){var e=this.cm,i=e.display,R=e.doc,A=Ui(e);if(e.options.moveInputWithCursor){var F=pn(e,R.sel.primary().head,"div"),J=i.wrapper.getBoundingClientRect(),oe=i.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(i.wrapper.clientHeight-10,F.top+oe.top-J.top)),A.teLeft=Math.max(0,Math.min(i.wrapper.clientWidth-10,F.left+oe.left-J.left))}return A},vi.prototype.showSelection=function(e){var i=this.cm,R=i.display;y(R.cursorDiv,e.cursors),y(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},vi.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var i=this.cm;if(i.somethingSelected()){this.prevInput="";var R=i.getSelection();this.textarea.value=R,i.state.focused&&K(this.textarea),S&&b>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",S&&b>=9&&(this.hasSelection=null))},vi.prototype.getField=function(){return this.textarea},vi.prototype.supportsTouch=function(){return!1},vi.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!r||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},vi.prototype.blur=function(){this.textarea.blur()},vi.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},vi.prototype.receivedFocus=function(){this.slowPoll()},vi.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()})},vi.prototype.fastPoll=function(){var e=!1,i=this;i.pollingFast=!0;function R(){var A=i.poll();!A&&!e?(e=!0,i.polling.set(60,R)):(i.pollingFast=!1,i.slowPoll())}i.polling.set(20,R)},vi.prototype.poll=function(){var e=this,i=this.cm,R=this.textarea,A=this.prevInput;if(this.contextMenuPending||!i.state.focused||St(R)&&!A&&!this.composing||i.isReadOnly()||i.options.disableInput||i.state.keySeq)return!1;var F=R.value;if(F==A&&!i.somethingSelected())return!1;if(S&&b>=9&&this.hasSelection===F||a&&/[\uf700-\uf7ff]/.test(F))return i.display.input.reset(),!1;if(i.doc.sel==i.display.selForContextMenu){var J=F.charCodeAt(0);if(J==8203&&!A&&(A="\u200B"),J==8666)return this.reset(),this.cm.execCommand("undo")}for(var oe=0,he=Math.min(A.length,F.length);oe1e3||F.indexOf(` `)>-1?R.value=e.prevInput="":e.prevInput=F,e.composing&&(e.composing.range.clear(),e.composing.range=i.markText(e.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},vi.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},vi.prototype.onKeyPress=function(){S&&b>=9&&(this.hasSelection=null),this.fastPoll()},vi.prototype.onContextMenu=function(e){var i=this,R=i.cm,A=R.display,F=i.textarea;i.contextMenuPending&&i.contextMenuPending();var J=di(R,e),oe=A.scroller.scrollTop;if(!J||c)return;var he=R.options.resetSelectionOnContextMenu;he&&R.doc.sel.contains(J)==-1&&pi(R,Ni)(R.doc,va(J),De);var ve=F.style.cssText,we=i.wrapper.style.cssText,Be=i.wrapper.offsetParent.getBoundingClientRect();i.wrapper.style.cssText="position: static",F.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-Be.top-5)+"px; left: "+(e.clientX-Be.left-5)+`px; z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Xe;d&&(Xe=window.scrollY),A.input.focus(),d&&window.scrollTo(null,Xe),A.input.reset(),R.somethingSelected()||(F.value=i.prevInput=" "),i.contextMenuPending=ot,A.selForContextMenu=R.doc.sel,clearTimeout(A.detectingSelectAll);function ut(){if(F.selectionStart!=null){var Bt=R.somethingSelected(),Qt="\u200B"+(Bt?F.value:"");F.value="\u21DA",F.value=Qt,i.prevInput=Bt?"":"\u200B",F.selectionStart=1,F.selectionEnd=Qt.length,A.selForContextMenu=R.doc.sel}}function ot(){if(i.contextMenuPending!=ot)return;if(i.contextMenuPending=!1,i.wrapper.style.cssText=we,F.style.cssText=ve,S&&b<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=oe),F.selectionStart!=null){(!S||S&&b<9)&&ut();var Bt=0,Qt=function(){A.selForContextMenu==R.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&i.prevInput=="\u200B"?pi(R,Ds)(R):Bt++<10?A.detectingSelectAll=setTimeout(Qt,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Qt,200)}}if(S&&b>=9&&ut(),k){Ne(e);var Ot=function(){ft(window,"mouseup",Ot),setTimeout(ot,20)};Re(window,"mouseup",Ot)}else setTimeout(ot,50)},vi.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},vi.prototype.setUneditable=function(){},vi.prototype.needsContentAttribute=!1;function iu(e,i){if(i=i?W(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 R=G();i.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function A(){e.value=he.getValue()}var F;if(e.form&&(Re(e.form,"submit",A),!i.leaveSubmitMethodAlone)){var J=e.form;F=J.submit;try{var oe=J.submit=function(){A(),J.submit=F,J.submit(),J.submit=oe}}catch(ve){}}i.finishInit=function(ve){ve.save=A,ve.getTextArea=function(){return e},ve.toTextArea=function(){ve.toTextArea=isNaN,A(),e.parentNode.removeChild(ve.getWrapperElement()),e.style.display="",e.form&&(ft(e.form,"submit",A),!i.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var he=ri(function(ve){return e.parentNode.insertBefore(ve,e.nextSibling)},i);return he}function au(e){e.off=ft,e.on=Re,e.wheelEventPixels=ho,e.Doc=Yi,e.splitLines=mr,e.countColumn=X,e.findColumn=xe,e.isWordChar=Q,e.Pass=Ae,e.signal=Qe,e.Line=Fr,e.changeEnd=ga,e.scrollbarModel=vr,e.Pos=wt,e.cmpPos=$t,e.modes=un,e.mimeModes=Ar,e.resolveMode=Kt,e.getMode=or,e.modeExtensions=Xt,e.extendMode=gr,e.copyState=Xr,e.startState=Ln,e.innerMode=kn,e.commands=So,e.keyMap=Da,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=io,e.normalizeKeyMap=Ml,e.StringStream=tn,e.SharedTextMarker=Co,e.TextMarker=ja,e.LineWidget=xo,e.e_preventDefault=Ce,e.e_stopPropagation=Se,e.e_stop=Ne,e.addClass=H,e.contains=N,e.rmClass=C,e.keyNames=Fa}Jl(ri),eu(ri);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Yi.prototype)Yi.prototype.hasOwnProperty(Yo)&&fe(ou,Yo)<0&&(ri.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Yi.prototype[Yo]));return Ie(Yi),ri.inputStyles={textarea:vi,contenteditable:Gn},ri.defineMode=function(e){!ri.defaults.mode&&e!="null"&&(ri.defaults.mode=e),vn.apply(this,arguments)},ri.defineMIME=mn,ri.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ri.defineMIME("text/plain","null"),ri.defineExtension=function(e,i){ri.prototype[e]=i},ri.defineDocExtension=function(e,i){Yi.prototype[e]=i},ri.fromTextArea=iu,au(ri),ri.version="5.58.2",ri})},WYAk:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){(function(){var g=L,T=g.lib,P=T.Base,p=g.enc,v=p.Utf8,S=g.algo,b=S.HMAC=P.extend({init:function(d,l){d=this._hasher=new d.init,typeof l=="string"&&(l=v.parse(l));var n=d.blockSize,c=n*4;l.sigBytes>c&&(l=d.finalize(l)),l.clamp();for(var u=this._oKey=l.clone(),o=this._iKey=l.clone(),h=u.words,m=o.words,s=0;s1&&arguments[1]!==void 0?arguments[1]:!1,Oe=De.getAttribute("id")||De.getAttribute("data-reactid")||De.getAttribute("name");if(ye&&G[Oe])return G[Oe];var xe=window.getComputedStyle(De),ue=xe.getPropertyValue("box-sizing")||xe.getPropertyValue("-moz-box-sizing")||xe.getPropertyValue("-webkit-box-sizing"),le=parseFloat(xe.getPropertyValue("padding-bottom"))+parseFloat(xe.getPropertyValue("padding-top")),re=parseFloat(xe.getPropertyValue("border-bottom-width"))+parseFloat(xe.getPropertyValue("border-top-width")),pe=N.map(function(te){return"".concat(te,":").concat(xe.getPropertyValue(te))}).join(";"),ee={sizingStyle:pe,paddingSize:le,borderSize:re,boxSizing:ue};return ye&&Oe&&(G[Oe]=ee),ee}function K(De){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,xe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;H||(H=document.createElement("textarea"),H.setAttribute("tab-index","-1"),H.setAttribute("aria-hidden","true"),document.body.appendChild(H)),De.getAttribute("wrap")?H.setAttribute("wrap",De.getAttribute("wrap")):H.removeAttribute("wrap");var ue=B(De,ye),le=ue.paddingSize,re=ue.borderSize,pe=ue.boxSizing,ee=ue.sizingStyle;H.setAttribute("style","".concat(ee,";").concat(I)),H.value=De.value||De.placeholder||"";var te=Number.MIN_SAFE_INTEGER,ce=Number.MAX_SAFE_INTEGER,q=H.scrollHeight,Q;if(pe==="border-box"?q+=re:pe==="content-box"&&(q-=le),Oe!==null||xe!==null){H.value=" ";var V=H.scrollHeight-le;Oe!==null&&(te=V*Oe,pe==="border-box"&&(te=te+le+re),q=Math.max(te,q)),xe!==null&&(ce=V*xe,pe==="border-box"&&(ce=ce+le+re),Q=q>ce?"":"hidden",q=Math.min(ce,q))}return{height:q,minHeight:te,maxHeight:ce,overflowY:Q,resize:"none"}}var U=D("Gytx"),W=D.n(U),X;(function(De){De[De.NONE=0]="NONE",De[De.RESIZING=1]="RESIZING",De[De.RESIZED=2]="RESIZED"})(X||(X={}));var ne=function(De){Object(P.a)(Oe,De);var ye=Object(p.a)(Oe);function Oe(xe){var ue;return Object(g.a)(this,Oe),ue=ye.call(this,xe),ue.nextFrameActionId=void 0,ue.resizeFrameId=void 0,ue.textArea=void 0,ue.saveTextArea=function(le){ue.textArea=le},ue.handleResize=function(le){var re=ue.state.resizeStatus,pe=ue.props,ee=pe.autoSize,te=pe.onResize;if(re!==X.NONE)return;typeof te=="function"&&te(le),ee&&ue.resizeOnNextFrame()},ue.resizeOnNextFrame=function(){cancelAnimationFrame(ue.nextFrameActionId),ue.nextFrameActionId=requestAnimationFrame(ue.resizeTextarea)},ue.resizeTextarea=function(){var le=ue.props.autoSize;if(!le||!ue.textArea)return;var re=le.minRows,pe=le.maxRows,ee=K(ue.textArea,!1,re,pe);ue.setState({textareaStyles:ee,resizeStatus:X.RESIZING},function(){cancelAnimationFrame(ue.resizeFrameId),ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:X.RESIZED},function(){ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:X.NONE}),ue.fixFirefoxAutoScroll()})})})})},ue.renderTextArea=function(){var le=ue.props,re=le.prefixCls,pe=re===void 0?"rc-textarea":re,ee=le.autoSize,te=le.onResize,ce=le.className,q=le.disabled,Q=ue.state,V=Q.textareaStyles,Z=Q.resizeStatus,be=Object(y.a)(ue.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ge=M()(pe,ce,Object(b.a)({},"".concat(pe,"-disabled"),q));"value"in be&&(be.value=be.value||"");var Te=Object(S.a)(Object(S.a)(Object(S.a)({},ue.props.style),V),Z===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return v.createElement(x,{onResize:ue.handleResize,disabled:!(ee||te)},v.createElement("textarea",Object(L.a)({},be,{className:ge,style:Te,ref:ue.saveTextArea})))},ue.state={textareaStyles:{},resizeStatus:X.NONE},ue}return Object(T.a)(Oe,[{key:"componentDidUpdate",value:function(ue){(ue.value!==this.props.value||!W()(ue.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 ue=this.textArea.selectionStart,le=this.textArea.selectionEnd;this.textArea.setSelectionRange(ue,le)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Oe}(v.Component),fe=ne,me=function(De){Object(P.a)(Oe,De);var ye=Object(p.a)(Oe);function Oe(xe){var ue;Object(g.a)(this,Oe),ue=ye.call(this,xe),ue.resizableTextArea=void 0,ue.focus=function(){ue.resizableTextArea.textArea.focus()},ue.saveTextArea=function(re){ue.resizableTextArea=re},ue.handleChange=function(re){var pe=ue.props.onChange;ue.setValue(re.target.value,function(){ue.resizableTextArea.resizeTextarea()}),pe&&pe(re)},ue.handleKeyDown=function(re){var pe=ue.props,ee=pe.onPressEnter,te=pe.onKeyDown;re.keyCode===13&&ee&&ee(re),te&&te(re)};var le=typeof xe.value=="undefined"||xe.value===null?xe.defaultValue:xe.value;return ue.state={value:le},ue}return Object(T.a)(Oe,[{key:"setValue",value:function(ue,le){"value"in this.props||this.setState({value:ue},le)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return v.createElement(fe,Object(L.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ue){return"value"in ue?{value:ue.value}:null}}]),Oe}(v.Component),Ae=Y.default=me},ZW9T:function(j,Y,D){"use strict";D.d(Y,"a",function(){return x});var L=D("k1fw"),g=D("oBTY"),T=D("9og8"),P=D("miYZ"),p=D("tsqr"),v=D("rAM+"),S=D("tJVT"),b=D("PpiC"),d=D("WmNS"),l=D.n(d),n=D("q1tI"),c=D.n(n),u=D("bdgK");function o(y,_,M,I,N){var G=_.getWordUntilPosition(M),H={startLineNumber:M.lineNumber,endLineNumber:M.lineNumber,startColumn:G.startColumn,endColumn:G.endColumn},B=I.map(function(K){return{label:K,kind:y.languages.CompletionItemKind.Keyword,insertText:K,insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:H}});return N.map(function(K){B.push(Object(L.a)(Object(L.a)({},K),{},{range:H}))}),B}var h=function(y){var _={label:"ifelse",kind:y.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet},M=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];y.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(H,B){var K=o(y,H,B,M,[_]);return{suggestions:K}}});var I=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];y.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(H,B){var K=[{label:"print",kind:y.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(` `),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],U=o(y,H,B,I,K);return{suggestions:U}}});var N=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];y.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(H,B){var K=[_,{label:"main",kind:y.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(` `),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:y.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(` `),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],U=o(y,H,B,N,K);return{suggestions:U}}})},m="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",s=D("fjLI"),r=D("LvDl"),a=D("+ua5");function t(y){return/^\d+$/.test(y)?"".concat(y,"px"):y}function w(){}var E=!1,f={"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",Scala:"scale"};function k(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=y;if(Array.isArray(y)){for(var M=0;M0||kn.target.offsetWidth>0)&&tt.current.instance.layout()}}catch(Ln){gr.e(Ln)}finally{gr.f()}}),or.observe(Re.current)),or}function et(){p.b.warn({content:decodeURIComponent(m),key:"monaco-editor-tip"})}var $e=function(){var Xt=tt.current.instance;if(G!=null&&Xt&&Se){var gr=Xt.getModel();gr&&G!==gr.getValue()&&(E=!0,gr.setValue(G),Xt.layout(),E=!1)}};Object(n.useEffect)(function(){try{var or,Xt=tt.current.instance;Qe.current&&clearTimeout(Qe.current),Qe.current=setTimeout(function(){$e()},500),Xt==null||((or=Xt.updateOptions)===null||or===void 0)||or.call(Xt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(G.split(/\r\n|\r|\n/g).length))+3,5)})}catch(gr){debugger}},[G,Se,tt.current]),Object(n.useEffect)(function(){try{if(Je&&tt.current&&tt.current.instance){var or=tt.current.instance;or.changeViewZones(function(gr){var Xr=document.createElement("div");Xr.style.padding="10px 20px",Xr.style.width="calc(100% - 20px)",Xr.className="my-error-line-wrp",Xr.innerHTML=nt,gr.addZone({afterLineNumber:Je||11,heightInLines:3,domNode:Xr})});var Xt={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}};or.addOverlayWidget(Xt),or.revealPositionInCenter({lineNumber:20,column:1})}}catch(gr){debugger}},[Je,tt.current,Se]),Object(n.useEffect)(function(){var or;if((or=tt.current)!==null&&or!==void 0&&or.instance&&Se&&ht){var Xt=tt.current.instance,gr=Xt.getModel();if(!gr)return;var Xr=function(){var $t=[],en=[],Cn=gr.getAllDecorations(),_n=Object(v.a)(Cn),On;try{for(_n.s();!(On=_n.n()).done;){var ae=On.value;if(ae.options.className==="highlighted-line"){var z;$t.push(ae==null||((z=ae.range)===null||z===void 0)?void 0:z.startLineNumber),en.push(ae==null?void 0:ae.id)}}}catch(ie){_n.e(ie)}finally{_n.f()}gr.deltaDecorations(en,[]);var $=gr.getLineCount();!!at&&at<=$&&(Xt.deltaDecorations([],[{range:new O.Range(at,1,at,gr.getLineMaxColumn(at)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Xt.revealLineInCenter(at))};Xr();var kn=function(){var $t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,en=[],Cn=[],_n=gr.getAllDecorations(),On=Object(v.a)(_n),ae;try{for(On.s();!(ae=On.n()).done;){var z=ae.value;if(z.options.linesDecorationsClassName==="breakpoints"){var $;en.push(z==null||(($=z.range)===null||$===void 0)?void 0:$.startLineNumber),Cn.push(z==null?void 0:z.id)}}}catch(ie){On.e(ie)}finally{On.f()}if($t)return{lines:en,ids:Cn};V(en)},Ln=function(){var wt=Object(T.a)(l.a.mark(function $t(en){var Cn;return l.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return Cn={range:new O.Range(en,1,en,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}},On.next=3,gr.deltaDecorations([],[Cn]);case 3:kn();case 4:case"end":return On.stop()}},$t)}));return function(en){return wt.apply(this,arguments)}}(),tn=function(){var wt=Object(T.a)(l.a.mark(function $t(en){var Cn,_n,On,ae,z;return l.a.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:Cn=[],_n=Xt.getLineDecorations(en),On=Object(v.a)(_n);try{for(On.s();!(ae=On.n()).done;)z=ae.value,z.options.linesDecorationsClassName==="breakpoints"&&Cn.push(z.id)}catch(de){On.e(de)}finally{On.f()}return ie.next=6,gr.deltaDecorations(Cn,[]);case 6:kn();case 7:case"end":return ie.stop()}},$t)}));return function(en){return wt.apply(this,arguments)}}(),ur=function($t){var en=Xt.getLineDecorations($t),Cn=Object(v.a)(en),_n;try{for(Cn.s();!(_n=Cn.n()).done;){var On=_n.value;if(On.options.linesDecorationsClassName==="breakpoints")return!0}}catch(ae){Cn.e(ae)}finally{Cn.f()}return!1};if(!Object(r.isEqual)(be,kn(!0).lines)){gr.deltaDecorations(kn(!0).ids,[]);var Xn=be.map(function(wt){return{range:new O.Range(wt,1,wt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}}});gr.deltaDecorations([],Xn)}var hi=Xt.onDidChangeModelContent(function(wt){var $t=Xt.getPosition();if($t){var en=$t.lineNumber;gr.getLineContent(en).trim()===""?tn(en):ur(en)&&(tn(en),Ln(en))}}),$n=Xt.onMouseDown(function(wt){var $t,en,Cn;if(wt.target.detail&&($t=wt.target)!==null&&$t!==void 0&&(en=$t.element)!==null&&en!==void 0&&(Cn=en.className)!==null&&Cn!==void 0&&Cn.includes("line-numbers")){var _n=wt.target.position.lineNumber;if(gr.getLineContent(_n).trim()==="")return;ur(_n)?tn(_n):Ln(_n)}}),Zr=function($t){var en={range:new O.Range($t,1,$t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};lt.current=Xt.deltaDecorations(lt.current,[en])},Bn=function(){lt.current=Xt.deltaDecorations(lt.current,[])},si=Xt.onMouseMove(function(wt){var $t,en,Cn;if(Bn(),wt.target.detail&&($t=wt.target)!==null&&$t!==void 0&&(en=$t.element)!==null&&en!==void 0&&(Cn=en.className)!==null&&Cn!==void 0&&Cn.includes("line-numbers")){var _n=wt.target.position.lineNumber;if(gr.getLineContent(_n).trim()==="")return;Zr(_n)}}),li=Xt.onMouseLeave(function(){Bn()});return function(){hi.dispose(),$n.dispose(),si.dispose(),li.dispose()}}},[tt.current,Se,be,at,ht]);function bt(){var or=tt.current.instance;if(or){var Xt=or.getSelection(),gr=tt.current.pastePos||{},Xr=new O.Range(gr.startLineNumber||Xt.endLineNumber,gr.startColumn||Xt.endColumn,gr.endLineNumber||Xt.endLineNumber,gr.endColumn||Xt.endColumn);setTimeout(function(){or.executeEdits("",[{range:Xr,text:""}])},300)}}function gt(or){(window.navigator.platform.match("Mac")?or.metaKey:or.ctrlKey)&&or.keyCode==83&&(or.preventDefault(),ye())}var Ut=function(){if(xe&&tt.current.instance){var Xt=tt.current.instance.getContentHeight();mn(Xt0||ee.target.offsetWidth>0)&&xe.layout()}}catch(te){re.e(te)}finally{re.f()}}),ue.observe(W.current)),ue}Object(n.useEffect)(function(){return W.current&&D.e(27).then(D.t.bind(null,"M/lh",7)).then(function(xe){O=xe;var ue=O.editor.createDiffEditor(W.current,Object(L.a)(Object(L.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},U),{},{wordWrap:!0}));me(ue);var le=Ae(ue);return function(){ue.dispose();var re=ue.getModel();re&&re.dispose(),le.unobserve(W.current)}}),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}},[]),Object(n.useEffect)(function(){fe&&fe.setModel({original:O.editor.createModel(G,B),modified:O.editor.createModel(H,B)})},[G,H,B,fe]);var De=t(M),ye=t(N),Oe={width:De,height:ye};return c.a.createElement("div",{className:"my-diff-editor",ref:W,style:Oe})}},ZpRC:function(j,Y,D){"use strict";function L(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function g(n,c){return(!c||n!=="hidden")&&n!=="visible"&&n!=="clip"}function T(n,c){if(n.clientHeightc||m>n&&s=c&&r>=u?m-n-o:s>c&&ru?s-c+h:0}var p=function(n,c){var u=window,o=c.scrollMode,h=c.block,m=c.inline,s=c.boundary,r=c.skipOverflowHiddenElements,a=typeof s=="function"?s:function(V){return V!==s};if(!L(n))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,w=[],E=n;L(E)&&a(E);){if((E=E.parentElement)===t){w.push(E);break}E!=null&&E===document.body&&T(E)&&!T(document.documentElement)||E!=null&&T(E,r)&&w.push(E)}for(var f=u.visualViewport?u.visualViewport.width:innerWidth,k=u.visualViewport?u.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,C=window.scrollY||pageYOffset,x=n.getBoundingClientRect(),y=x.height,_=x.width,M=x.top,I=x.right,N=x.bottom,G=x.left,H=h==="start"||h==="nearest"?M:h==="end"?N:M+y/2,B=m==="center"?G+_/2:m==="end"?I:G,K=[],U=0;U=0&&G>=0&&N<=k&&I<=f&&M>=me&&N<=De&&G>=ye&&I<=Ae)return K;var Oe=getComputedStyle(W),xe=parseInt(Oe.borderLeftWidth,10),ue=parseInt(Oe.borderTopWidth,10),le=parseInt(Oe.borderRightWidth,10),re=parseInt(Oe.borderBottomWidth,10),pe=0,ee=0,te="offsetWidth"in W?W.offsetWidth-W.clientWidth-xe-le:0,ce="offsetHeight"in W?W.offsetHeight-W.clientHeight-ue-re:0;if(t===W)pe=h==="start"?H:h==="end"?H-k:h==="nearest"?P(C,C+k,k,ue,re,C+H,C+H+y,y):H-k/2,ee=m==="start"?B:m==="center"?B-f/2:m==="end"?B-f:P(O,O+f,f,xe,le,O+B,O+B+_,_),pe=Math.max(0,pe+C),ee=Math.max(0,ee+O);else{pe=h==="start"?H-me-ue:h==="end"?H-De+re+ce:h==="nearest"?P(me,De,ne,ue,re+ce,H,H+y,y):H-(me+ne/2)+ce/2,ee=m==="start"?B-ye-xe:m==="center"?B-(ye+fe/2)+te/2:m==="end"?B-Ae+le+te:P(ye,Ae,fe,xe,le+te,B,B+_,_);var q=W.scrollLeft,Q=W.scrollTop;H+=Q-(pe=Math.max(0,Math.min(Q+pe,W.scrollHeight-ne+ce))),B+=q-(ee=Math.max(0,Math.min(q+ee,W.scrollWidth-fe+te)))}K.push({el:W,top:pe,left:ee})}return K};function v(n){return n===Object(n)&&Object.keys(n).length!==0}function S(n,c){c===void 0&&(c="auto");var u="scrollBehavior"in document.body.style;n.forEach(function(o){var h=o.el,m=o.top,s=o.left;h.scroll&&u?h.scroll({top:m,left:s,behavior:c}):(h.scrollTop=m,h.scrollLeft=s)})}function b(n){return n===!1?{block:"end",inline:"nearest"}:v(n)?n:{block:"start",inline:"nearest"}}function d(n,c){var u=!n.ownerDocument.documentElement.contains(n);if(v(c)&&typeof c.behavior=="function")return c.behavior(u?[]:p(n,c));if(u)return;var o=b(c);return S(p(n,o),o.behavior)}var l=Y.a=d},Zss7:function(j,Y,D){var L;(function(g){var T=/^\s+/,P=/\s+$/,p=0,v=g.round,S=g.min,b=g.max,d=g.random;function l(re,pe){if(re=re||"",pe=pe||{},re instanceof l)return re;if(!(this instanceof l))return new l(re,pe);var ee=n(re);this._originalInput=re,this._r=ee.r,this._g=ee.g,this._b=ee.b,this._a=ee.a,this._roundA=v(100*this._a)/100,this._format=pe.format||ee.format,this._gradientType=pe.gradientType,this._r<1&&(this._r=v(this._r)),this._g<1&&(this._g=v(this._g)),this._b<1&&(this._b=v(this._b)),this._ok=ee.ok,this._tc_id=p++}l.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(),pe,ee,te,ce,q,Q;return pe=re.r/255,ee=re.g/255,te=re.b/255,pe<=.03928?ce=pe/12.92:ce=g.pow((pe+.055)/1.055,2.4),ee<=.03928?q=ee/12.92:q=g.pow((ee+.055)/1.055,2.4),te<=.03928?Q=te/12.92:Q=g.pow((te+.055)/1.055,2.4),.2126*ce+.7152*q+.0722*Q},setAlpha:function(re){return this._a=K(re),this._roundA=v(100*this._a)/100,this},toHsv:function(){var re=h(this._r,this._g,this._b);return{h:re.h*360,s:re.s,v:re.v,a:this._a}},toHsvString:function(){var re=h(this._r,this._g,this._b),pe=v(re.h*360),ee=v(re.s*100),te=v(re.v*100);return this._a==1?"hsv("+pe+", "+ee+"%, "+te+"%)":"hsva("+pe+", "+ee+"%, "+te+"%, "+this._roundA+")"},toHsl:function(){var re=u(this._r,this._g,this._b);return{h:re.h*360,s:re.s,l:re.l,a:this._a}},toHslString:function(){var re=u(this._r,this._g,this._b),pe=v(re.h*360),ee=v(re.s*100),te=v(re.l*100);return this._a==1?"hsl("+pe+", "+ee+"%, "+te+"%)":"hsla("+pe+", "+ee+"%, "+te+"%, "+this._roundA+")"},toHex:function(re){return s(this._r,this._g,this._b,re)},toHexString:function(re){return"#"+this.toHex(re)},toHex8:function(re){return r(this._r,this._g,this._b,this._a,re)},toHex8String:function(re){return"#"+this.toHex8(re)},toRgb:function(){return{r:v(this._r),g:v(this._g),b:v(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+v(this._r)+", "+v(this._g)+", "+v(this._b)+")":"rgba("+v(this._r)+", "+v(this._g)+", "+v(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:v(U(this._r,255)*100)+"%",g:v(U(this._g,255)*100)+"%",b:v(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+v(U(this._r,255)*100)+"%, "+v(U(this._g,255)*100)+"%, "+v(U(this._b,255)*100)+"%)":"rgba("+v(U(this._r,255)*100)+"%, "+v(U(this._g,255)*100)+"%, "+v(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:H[s(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var pe="#"+a(this._r,this._g,this._b,this._a),ee=pe,te=this._gradientType?"GradientType = 1, ":"";if(re){var ce=l(re);ee="#"+a(ce._r,ce._g,ce._b,ce._a)}return"progid:DXImageTransform.Microsoft.gradient("+te+"startColorstr="+pe+",endColorstr="+ee+")"},toString:function(re){var pe=!!re;re=re||this._format;var ee=!1,te=this._a<1&&this._a>=0,ce=!pe&&te&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return ce?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(ee=this.toRgbString()),re==="prgb"&&(ee=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(ee=this.toHexString()),re==="hex3"&&(ee=this.toHexString(!0)),re==="hex4"&&(ee=this.toHex8String(!0)),re==="hex8"&&(ee=this.toHex8String()),re==="name"&&(ee=this.toName()),re==="hsl"&&(ee=this.toHslString()),re==="hsv"&&(ee=this.toHsvString()),ee||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(re,pe){var ee=re.apply(null,[this].concat([].slice.call(pe)));return this._r=ee._r,this._g=ee._g,this._b=ee._b,this.setAlpha(ee._a),this},lighten:function(){return this._applyModification(f,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(C,arguments)},_applyCombination:function(re,pe){return re.apply(null,[this].concat([].slice.call(pe)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(y,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},l.fromRatio=function(re,pe){if(typeof re=="object"){var ee={};for(var te in re)re.hasOwnProperty(te)&&(te==="a"?ee[te]=re[te]:ee[te]=Ae(re[te]));re=ee}return l(re,pe)};function n(re){var pe={r:0,g:0,b:0},ee=1,te=null,ce=null,q=null,Q=!1,V=!1;return typeof re=="string"&&(re=ue(re)),typeof re=="object"&&(xe(re.r)&&xe(re.g)&&xe(re.b)?(pe=c(re.r,re.g,re.b),Q=!0,V=String(re.r).substr(-1)==="%"?"prgb":"rgb"):xe(re.h)&&xe(re.s)&&xe(re.v)?(te=Ae(re.s),ce=Ae(re.v),pe=m(re.h,te,ce),Q=!0,V="hsv"):xe(re.h)&&xe(re.s)&&xe(re.l)&&(te=Ae(re.s),q=Ae(re.l),pe=o(re.h,te,q),Q=!0,V="hsl"),re.hasOwnProperty("a")&&(ee=re.a)),ee=K(ee),{ok:Q,format:re.format||V,r:S(255,b(pe.r,0)),g:S(255,b(pe.g,0)),b:S(255,b(pe.b,0)),a:ee}}function c(re,pe,ee){return{r:U(re,255)*255,g:U(pe,255)*255,b:U(ee,255)*255}}function u(re,pe,ee){re=U(re,255),pe=U(pe,255),ee=U(ee,255);var te=b(re,pe,ee),ce=S(re,pe,ee),q,Q,V=(te+ce)/2;if(te==ce)q=Q=0;else{var Z=te-ce;Q=V>.5?Z/(2-te-ce):Z/(te+ce);switch(te){case re:q=(pe-ee)/Z+(pe1&&(Te-=1),Te<1/6?be+(ge-be)*6*Te:Te<1/2?ge:Te<2/3?be+(ge-be)*(2/3-Te)*6:be}if(pe===0)te=ce=q=ee;else{var V=ee<.5?ee*(1+pe):ee+pe-ee*pe,Z=2*ee-V;te=Q(Z,V,re+1/3),ce=Q(Z,V,re),q=Q(Z,V,re-1/3)}return{r:te*255,g:ce*255,b:q*255}}function h(re,pe,ee){re=U(re,255),pe=U(pe,255),ee=U(ee,255);var te=b(re,pe,ee),ce=S(re,pe,ee),q,Q,V=te,Z=te-ce;if(Q=te===0?0:Z/te,te==ce)q=0;else{switch(te){case re:q=(pe-ee)/Z+(pe>1)+720)%360;--pe;)te.h=(te.h+ce)%360,q.push(l(te));return q}function N(re,pe){pe=pe||6;for(var ee=l(re).toHsv(),te=ee.h,ce=ee.s,q=ee.v,Q=[],V=1/pe;pe--;)Q.push(l({h:te,s:ce,v:q})),q=(q+V)%1;return Q}l.mix=function(re,pe,ee){ee=ee===0?0:ee||50;var te=l(re).toRgb(),ce=l(pe).toRgb(),q=ee/100,Q={r:(ce.r-te.r)*q+te.r,g:(ce.g-te.g)*q+te.g,b:(ce.b-te.b)*q+te.b,a:(ce.a-te.a)*q+te.a};return l(Q)},l.readability=function(re,pe){var ee=l(re),te=l(pe);return(g.max(ee.getLuminance(),te.getLuminance())+.05)/(g.min(ee.getLuminance(),te.getLuminance())+.05)},l.isReadable=function(re,pe,ee){var te=l.readability(re,pe),ce,q;q=!1,ce=le(ee);switch(ce.level+ce.size){case"AAsmall":case"AAAlarge":q=te>=4.5;break;case"AAlarge":q=te>=3;break;case"AAAsmall":q=te>=7;break}return q},l.mostReadable=function(re,pe,ee){var te=null,ce=0,q,Q,V,Z;ee=ee||{},Q=ee.includeFallbackColors,V=ee.level,Z=ee.size;for(var be=0;bece&&(ce=q,te=l(pe[be]));return l.isReadable(re,te,{level:V,size:Z})||!Q?te:(ee.includeFallbackColors=!1,l.mostReadable(re,["#fff","#000"],ee))};var G=l.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"},H=l.hexNames=B(G);function B(re){var pe={};for(var ee in re)re.hasOwnProperty(ee)&&(pe[re[ee]]=ee);return pe}function K(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function U(re,pe){ne(re)&&(re="100%");var ee=fe(re);return re=S(pe,b(0,parseFloat(re))),ee&&(re=parseInt(re*pe,10)/100),g.abs(re-pe)<1e-6?1:re%pe/parseFloat(pe)}function W(re){return S(1,b(0,re))}function X(re){return parseInt(re,16)}function ne(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function fe(re){return typeof re=="string"&&re.indexOf("%")!=-1}function me(re){return re.length==1?"0"+re:""+re}function Ae(re){return re<=1&&(re=re*100+"%"),re}function De(re){return g.round(parseFloat(re)*255).toString(16)}function ye(re){return X(re)/255}var Oe=function(){var re="[-\\+]?\\d+%?",pe="[-\\+]?\\d*\\.\\d+%?",ee="(?:"+pe+")|(?:"+re+")",te="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?",ce="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?";return{CSS_UNIT:new RegExp(ee),rgb:new RegExp("rgb"+te),rgba:new RegExp("rgba"+ce),hsl:new RegExp("hsl"+te),hsla:new RegExp("hsla"+ce),hsv:new RegExp("hsv"+te),hsva:new RegExp("hsva"+ce),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 xe(re){return!!Oe.CSS_UNIT.exec(re)}function ue(re){re=re.replace(T,"").replace(P,"").toLowerCase();var pe=!1;if(G[re])re=G[re],pe=!0;else if(re=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ee;return(ee=Oe.rgb.exec(re))?{r:ee[1],g:ee[2],b:ee[3]}:(ee=Oe.rgba.exec(re))?{r:ee[1],g:ee[2],b:ee[3],a:ee[4]}:(ee=Oe.hsl.exec(re))?{h:ee[1],s:ee[2],l:ee[3]}:(ee=Oe.hsla.exec(re))?{h:ee[1],s:ee[2],l:ee[3],a:ee[4]}:(ee=Oe.hsv.exec(re))?{h:ee[1],s:ee[2],v:ee[3]}:(ee=Oe.hsva.exec(re))?{h:ee[1],s:ee[2],v:ee[3],a:ee[4]}:(ee=Oe.hex8.exec(re))?{r:X(ee[1]),g:X(ee[2]),b:X(ee[3]),a:ye(ee[4]),format:pe?"name":"hex8"}:(ee=Oe.hex6.exec(re))?{r:X(ee[1]),g:X(ee[2]),b:X(ee[3]),format:pe?"name":"hex"}:(ee=Oe.hex4.exec(re))?{r:X(ee[1]+""+ee[1]),g:X(ee[2]+""+ee[2]),b:X(ee[3]+""+ee[3]),a:ye(ee[4]+""+ee[4]),format:pe?"name":"hex8"}:(ee=Oe.hex3.exec(re))?{r:X(ee[1]+""+ee[1]),g:X(ee[2]+""+ee[2]),b:X(ee[3]+""+ee[3]),format:pe?"name":"hex"}:!1}function le(re){var pe,ee;return re=re||{level:"AA",size:"small"},pe=(re.level||"AA").toUpperCase(),ee=(re.size||"small").toLowerCase(),pe!=="AA"&&pe!=="AAA"&&(pe="AA"),ee!=="small"&&ee!=="large"&&(ee="small"),{level:pe,size:ee}}j.exports?j.exports=l:!(L=function(){return l}.call(Y,D,Y,j),L!==void 0&&(j.exports=L))})(Math)},bQjk:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return function(g){var T=L,P=T.lib,p=P.CipherParams,v=T.enc,S=v.Hex,b=T.format,d=b.Hex={stringify:function(l){return l.ciphertext.toString(S)},parse:function(l){var n=S.parse(l);return p.create({ciphertext:n})}}}(),L.format.Hex})},bT9E:function(j,Y,D){"use strict";D.d(Y,"a",function(){return g});var L=D("VTBJ");function g(T,P){var p=Object(L.a)({},T);return Array.isArray(P)&&P.forEach(function(v){delete p[v]}),p}},biw7:function(j,Y,D){"use strict";var L=D("q1tI"),g=D.n(L),T=L.createContext(null);Y.a=T},c5Ni:function(j,Y,D){},cv67:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(g){var T=L,P=T.lib,p=P.WordArray,v=P.Hasher,S=T.algo,b=[];(function(){for(var o=0;o<64;o++)b[o]=g.abs(g.sin(o+1))*4294967296|0})();var d=S.MD5=v.extend({_doReset:function(){this._hash=new p.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(o,h){for(var m=0;m<16;m++){var s=h+m,r=o[s];o[s]=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360}var a=this._hash.words,t=o[h+0],w=o[h+1],E=o[h+2],f=o[h+3],k=o[h+4],O=o[h+5],C=o[h+6],x=o[h+7],y=o[h+8],_=o[h+9],M=o[h+10],I=o[h+11],N=o[h+12],G=o[h+13],H=o[h+14],B=o[h+15],K=a[0],U=a[1],W=a[2],X=a[3];K=l(K,U,W,X,t,7,b[0]),X=l(X,K,U,W,w,12,b[1]),W=l(W,X,K,U,E,17,b[2]),U=l(U,W,X,K,f,22,b[3]),K=l(K,U,W,X,k,7,b[4]),X=l(X,K,U,W,O,12,b[5]),W=l(W,X,K,U,C,17,b[6]),U=l(U,W,X,K,x,22,b[7]),K=l(K,U,W,X,y,7,b[8]),X=l(X,K,U,W,_,12,b[9]),W=l(W,X,K,U,M,17,b[10]),U=l(U,W,X,K,I,22,b[11]),K=l(K,U,W,X,N,7,b[12]),X=l(X,K,U,W,G,12,b[13]),W=l(W,X,K,U,H,17,b[14]),U=l(U,W,X,K,B,22,b[15]),K=n(K,U,W,X,w,5,b[16]),X=n(X,K,U,W,C,9,b[17]),W=n(W,X,K,U,I,14,b[18]),U=n(U,W,X,K,t,20,b[19]),K=n(K,U,W,X,O,5,b[20]),X=n(X,K,U,W,M,9,b[21]),W=n(W,X,K,U,B,14,b[22]),U=n(U,W,X,K,k,20,b[23]),K=n(K,U,W,X,_,5,b[24]),X=n(X,K,U,W,H,9,b[25]),W=n(W,X,K,U,f,14,b[26]),U=n(U,W,X,K,y,20,b[27]),K=n(K,U,W,X,G,5,b[28]),X=n(X,K,U,W,E,9,b[29]),W=n(W,X,K,U,x,14,b[30]),U=n(U,W,X,K,N,20,b[31]),K=c(K,U,W,X,O,4,b[32]),X=c(X,K,U,W,y,11,b[33]),W=c(W,X,K,U,I,16,b[34]),U=c(U,W,X,K,H,23,b[35]),K=c(K,U,W,X,w,4,b[36]),X=c(X,K,U,W,k,11,b[37]),W=c(W,X,K,U,x,16,b[38]),U=c(U,W,X,K,M,23,b[39]),K=c(K,U,W,X,G,4,b[40]),X=c(X,K,U,W,t,11,b[41]),W=c(W,X,K,U,f,16,b[42]),U=c(U,W,X,K,C,23,b[43]),K=c(K,U,W,X,_,4,b[44]),X=c(X,K,U,W,N,11,b[45]),W=c(W,X,K,U,B,16,b[46]),U=c(U,W,X,K,E,23,b[47]),K=u(K,U,W,X,t,6,b[48]),X=u(X,K,U,W,x,10,b[49]),W=u(W,X,K,U,H,15,b[50]),U=u(U,W,X,K,O,21,b[51]),K=u(K,U,W,X,N,6,b[52]),X=u(X,K,U,W,f,10,b[53]),W=u(W,X,K,U,M,15,b[54]),U=u(U,W,X,K,w,21,b[55]),K=u(K,U,W,X,y,6,b[56]),X=u(X,K,U,W,B,10,b[57]),W=u(W,X,K,U,C,15,b[58]),U=u(U,W,X,K,G,21,b[59]),K=u(K,U,W,X,k,6,b[60]),X=u(X,K,U,W,I,10,b[61]),W=u(W,X,K,U,E,15,b[62]),U=u(U,W,X,K,_,21,b[63]),a[0]=a[0]+K|0,a[1]=a[1]+U|0,a[2]=a[2]+W|0,a[3]=a[3]+X|0},_doFinalize:function(){var o=this._data,h=o.words,m=this._nDataBytes*8,s=o.sigBytes*8;h[s>>>5]|=128<<24-s%32;var r=g.floor(m/4294967296),a=m;h[(s+64>>>9<<4)+15]=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,h[(s+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,o.sigBytes=(h.length+1)*4,this._process();for(var t=this._hash,w=t.words,E=0;E<4;E++){var f=w[E];w[E]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}return t},clone:function(){var o=v.clone.call(this);return o._hash=this._hash.clone(),o}});function l(o,h,m,s,r,a,t){var w=o+(h&m|~h&s)+r+t;return(w<>>32-a)+h}function n(o,h,m,s,r,a,t){var w=o+(h&s|m&~s)+r+t;return(w<>>32-a)+h}function c(o,h,m,s,r,a,t){var w=o+(h^m^s)+r+t;return(w<>>32-a)+h}function u(o,h,m,s,r,a,t){var w=o+(m^(h|~s))+r+t;return(w<>>32-a)+h}T.MD5=v._createHelper(d),T.HmacMD5=v._createHmacHelper(d)}(Math),L.MD5})},dejd:function(j,Y,D){},dmUQ:function(j,Y,D){"use strict";var L=D("Ff2n"),g=D("rePB"),T=D("1OyB"),P=D("vuIU"),p=D("Ji7U"),v=D("md7G"),S=D("foSv"),b=D("q1tI"),d=D.n(b),l=D("TSYQ"),n=D.n(l),c=D("4IlW");function u(y,_){var M=Object.keys(y);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(y);_&&(I=I.filter(function(N){return Object.getOwnPropertyDescriptor(y,N).enumerable})),M.push.apply(M,I)}return M}function o(y){for(var _=1;_1?fe-1:0),Ae=1;Ae1?U-1:0),X=1;X=0)return parseInt(K.slice(K.indexOf("e-")+2),10);var U=0;return K.indexOf(".")>=0&&(U=K.length-K.indexOf(".")-1),U},N.getInputDisplayValue=function(B){var K=B||N.state,U=K.focused,W=K.inputValue,X=K.value,ne;U?ne=W:ne=N.toPrecisionAsStep(X),ne==null&&(ne="");var fe=N.formatWrapper(ne);return f(N.props.decimalSeparator)&&(fe=fe.toString().replace(".",N.props.decimalSeparator)),fe},N.recordCursorPosition=function(){try{N.cursorStart=N.input.selectionStart,N.cursorEnd=N.input.selectionEnd,N.currentValue=N.input.value,N.cursorBefore=N.input.value.substring(0,N.cursorStart),N.cursorAfter=N.input.value.substring(N.cursorEnd)}catch(B){}},N.restoreByAfter=function(B){if(B===void 0)return!1;var K=N.input.value,U=K.lastIndexOf(B);if(U===-1)return!1;var W=N.cursorBefore.length;return N.lastKeyCode===c.a.DELETE&&N.cursorBefore.charAt(W-1)===B[0]?(N.fixCaret(W,W),!0):U+B.length===K.length?(N.fixCaret(U,U),!0):!1},N.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(K,U){var W=B.substring(U);return N.restoreByAfter(W)})},N.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},N.stop=function(){N.autoStepTimer&&clearTimeout(N.autoStepTimer)},N.down=function(B,K,U){N.pressingUpOrDown=!0,N.step("down",B,K,U)},N.up=function(B,K,U){N.pressingUpOrDown=!0,N.step("up",B,K,U)},N.saveInput=function(B){N.input=B};var G=I.value;G===void 0&&(G=I.defaultValue),N.state={focused:I.autoFocus};var H=N.getValidValue(N.toNumber(G));return N.state=o(o({},N.state),{},{inputValue:N.toPrecisionAsStep(H),value:H}),N}return Object(P.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(N){var G=this.props,H=G.value,B=G.onChange,K=G.max,U=G.min,W=this.state.focused;if(N){if(!k(N.value,H)||!k(N.max,K)||!k(N.min,U)){var X=W?H:this.getValidValue(H),ne;this.pressingUpOrDown?ne=X:this.inputting?ne=this.rawInput:ne=this.toPrecisionAsStep(X),this.setState({value:X,inputValue:ne})}var fe="value"in this.props?H:this.state.value;"max"in this.props&&N.max!==K&&typeof fe=="number"&&fe>K&&B&&B(K),"min"in this.props&&N.min!==U&&typeof fe=="number"&&fe1&&arguments[1]!==void 0?arguments[1]:this.props.min,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(N);return isNaN(B)?N:(BH&&(B=H),B)}},{key:"setValue",value:function(N,G){var H=this.props.precision,B=this.isNotCompleteNumber(parseFloat(N))?null:parseFloat(N),K=this.state.value,U=K===void 0?null:K,W=this.state.inputValue,X=W===void 0?null:W,ne=typeof B=="number"?B.toFixed(H):"".concat(B),fe=B!==U||ne!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},G)):this.setState({value:B,inputValue:this.toPrecisionAsStep(N)},G),fe&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(N){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.props,B=H.precision,K=H.step;if(f(B))return B;var U=this.getPrecision(G),W=this.getPrecision(K),X=this.getPrecision(N);return N?Math.max(X,U+W):U+W}},{key:"getPrecisionFactor",value:function(N){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.getMaxPrecision(N,G);return Math.pow(10,H)}},{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(N){return this.props.formatter?this.props.formatter(N):N}},{key:"toPrecisionAsStep",value:function(N){if(this.isNotCompleteNumber(N)||N==="")return N;var G=Math.abs(this.getMaxPrecision(N));return isNaN(G)?N.toString():Number(N).toFixed(G)}},{key:"toNumber",value:function(N){var G=this.props.precision,H=this.state.focused,B=N&&N.length>16&&H;return this.isNotCompleteNumber(N)||B?N:f(G)?Math.round(N*Math.pow(10,G))/Math.pow(10,G):Number(N)}},{key:"upStep",value:function(N,G){var H=this.props.step,B=this.getPrecisionFactor(N,G),K=Math.abs(this.getMaxPrecision(N,G)),U=((B*N+B*H*G)/B).toFixed(K);return this.toNumber(U)}},{key:"downStep",value:function(N,G){var H=this.props.step,B=this.getPrecisionFactor(N,G),K=Math.abs(this.getMaxPrecision(N,G)),U=((B*N-B*H*G)/B).toFixed(K);return this.toNumber(U)}},{key:"step",value:function(N,G){var H=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,K=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var U=this.props;if(U.disabled)return;var W=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(W))return;var X=this["".concat(N,"Step")](W,B),ne=X>U.max||XU.max?X=U.max:X=me),lt=(ct||ct===0)&&(isNaN(ct)||Number(ct)<=Ae),Ue=Qe||B||K,Le=lt||B||K,Ie=n()("".concat(H,"-handler"),"".concat(H,"-handler-up"),Object(g.a)({},"".concat(H,"-handler-up-disabled"),Ue)),Ce=n()("".concat(H,"-handler"),"".concat(H,"-handler-down"),Object(g.a)({},"".concat(H,"-handler-down-disabled"),Le)),Se=U?{onTouchStart:Ue?s:this.up,onTouchEnd:this.stop}:{onMouseDown:Ue?s:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ke=U?{onTouchStart:Le?s:this.down,onTouchEnd:this.stop}:{onMouseDown:Le?s:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return d.a.createElement("div",{className:He,style:De,title:ye,onMouseEnter:Oe,onMouseLeave:xe,onMouseOver:ue,onMouseOut:le,onFocus:function(){return null},onBlur:function(){return null}},d.a.createElement("div",{className:"".concat(H,"-handler-wrap")},d.a.createElement("span",Object.assign({unselectable:"on"},Se,{role:"button","aria-label":"Increase Value","aria-disabled":Ue,className:Ie}),X||d.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-up-inner"),onClick:r})),d.a.createElement("span",Object.assign({unselectable:"on"},ke,{role:"button","aria-label":"Decrease Value","aria-disabled":Le,className:Ce}),ne||d.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-down-inner"),onClick:r}))),d.a.createElement("div",{className:"".concat(H,"-input-wrap")},d.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ae,"aria-valuemax":me,"aria-valuenow":ct,required:re,type:te,placeholder:ce,onPaste:Je,onClick:pe,onMouseUp:this.onMouseUp,className:"".concat(H,"-input"),tabIndex:ee,autoComplete:W,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:tt?this.onKeyDown:s,onKeyUp:tt?this.onKeyUp:s,autoFocus:ge,maxLength:be,readOnly:K,disabled:B,max:me,min:Ae,step:Z,name:Te,title:ye,id:q,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ft),pattern:V,inputMode:Q,onInput:rt},Re))))}}]),M}(d.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:s,onKeyDown:s,onPressEnter:s,onFocus:s,onBlur:s,parser:a,required:!1,autoComplete:"off"};var C=O,x=Y.a=C},e7zE:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.Base,p=T.WordArray,v=g.algo,S=v.SHA1,b=v.HMAC,d=v.PBKDF2=P.extend({cfg:P.extend({keySize:128/32,hasher:S,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,n){for(var c=this.cfg,u=b.create(c.hasher,l),o=p.create(),h=p.create([1]),m=o.words,s=h.words,r=c.keySize,a=c.iterations;m.length=0;f--)(E=m[f])&&(w=(t<3?E(w):t>3?E(s,r,w):E(s,r))||w);return t>3&&w&&Object.defineProperty(s,r,w),w},b=function(m,s){return function(r,a){s(r,a,m)}},d=function(){for(var m=0,s=0,r=arguments.length;s=0&&(t.splice(w,1),a._onDidChangeMenu.fire(s))}}},m.prototype.getMenuItems=function(s){var r=(this._menuItems.get(s)||[]).slice(0);return s===0&&this._appendImplicitItems(r),r},m.prototype._appendImplicitItems=function(s){for(var r=new Set,a=s.filter(function(O){return l(O)}),t=0,w=a;tH.length)&&(B=H.length);for(var K=0,U=new Array(B);K=0)continue;if(!Object.prototype.propertyIsEnumerable.call(H,U))continue;K[U]=H[U]}}return K}function h(H,B){if(H==null)return{};var K={},U=Object.keys(H),W,X;for(X=0;X=0)continue;K[W]=H[W]}return K}var m=function(B){var K=B.className,U=B.percent,W=B.prefixCls,X=B.strokeColor,ne=B.strokeLinecap,fe=B.strokeWidth,me=B.style,Ae=B.trailColor,De=B.trailWidth,ye=B.transition,Oe=o(B,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Oe.gapPosition;var xe=Array.isArray(U)?U:[U],ue=Array.isArray(X)?X:[X],le=v(xe),re=b(le,1),pe=re[0],ee=fe/2,te=100-fe/2,ce="M ".concat(ne==="round"?ee:0,",").concat(ee,` L `).concat(ne==="round"?te:100,",").concat(ee),q="0 0 100 ".concat(fe),Q=0;return g.a.createElement("svg",S({className:P()("".concat(W,"-line"),K),viewBox:q,preserveAspectRatio:"none",style:me},Oe),g.a.createElement("path",{className:"".concat(W,"-line-trail"),d:ce,strokeLinecap:ne,stroke:Ae,strokeWidth:De||fe,fillOpacity:"0"}),xe.map(function(V,Z){var be={strokeDasharray:"".concat(V,"px, 100px"),strokeDashoffset:"-".concat(Q,"px"),transition:ye||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ge=ue[Z]||ue[ue.length-1];return Q+=V,g.a.createElement("path",{key:Z,className:"".concat(W,"-line-path"),d:ce,strokeLinecap:ne,stroke:ge,strokeWidth:fe,fillOpacity:"0",ref:pe[Z],style:be})}))};m.defaultProps=p;var s=m;function r(){return r=Object.assign||function(H){for(var B=1;BH.length)&&(B=H.length);for(var K=0,U=new Array(B);K=0)continue;if(!Object.prototype.propertyIsEnumerable.call(H,U))continue;K[U]=H[U]}}return K}function C(H,B){if(H==null)return{};var K={},U=Object.keys(H),W,X;for(X=0;X=0)continue;K[W]=H[W]}return K}var x=0;function y(H){return+H.replace("%","")}function _(H){return Array.isArray(H)?H:[H]}function M(H,B,K,U){var W=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,X=arguments.length>5?arguments[5]:void 0,ne=50-U/2,fe=0,me=-ne,Ae=0,De=-2*ne;switch(X){case"left":fe=-ne,me=0,Ae=2*ne,De=0;break;case"right":fe=ne,me=0,Ae=-2*ne,De=0;break;case"bottom":me=ne,De=2*ne;break;default:}var ye="M 50,50 m ".concat(fe,",").concat(me,` a `).concat(ne,",").concat(ne," 0 1 1 ").concat(Ae,",").concat(-De,` a `).concat(ne,",").concat(ne," 0 1 1 ").concat(-Ae,",").concat(De),Oe=Math.PI*2*ne,xe={stroke:K,strokeDasharray:"".concat(B/100*(Oe-W),"px ").concat(Oe,"px"),strokeDashoffset:"-".concat(W/2+H/100*(Oe-W),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ye,pathStyle:xe}}var I=function(B){var K=B.prefixCls,U=B.strokeWidth,W=B.trailWidth,X=B.gapDegree,ne=B.gapPosition,fe=B.trailColor,me=B.strokeLinecap,Ae=B.style,De=B.className,ye=B.strokeColor,Oe=B.percent,xe=O(B,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ue=Object(L.useMemo)(function(){return x+=1,x},[]),le=M(0,100,fe,U,X,ne),re=le.pathString,pe=le.pathStyle,ee=_(Oe),te=_(ye),ce=te.find(function(be){return Object.prototype.toString.call(be)==="[object Object]"}),q=v(ee),Q=a(q,1),V=Q[0],Z=function(){var ge=0;return ee.map(function(Te,Je){var rt=te[Je]||te[te.length-1],nt=Object.prototype.toString.call(rt)==="[object Object]"?"url(#".concat(K,"-gradient-").concat(ue,")"):"",at=M(ge,Te,rt,U,X,ne);return ge+=Te,g.a.createElement("path",{key:Je,className:"".concat(K,"-circle-path"),d:at.pathString,stroke:nt,strokeLinecap:me,strokeWidth:U,opacity:Te===0?0:1,fillOpacity:"0",style:at.pathStyle,ref:V[Je]})})};return g.a.createElement("svg",r({className:P()("".concat(K,"-circle"),De),viewBox:"0 0 100 100",style:Ae},xe),ce&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(K,"-gradient-").concat(ue),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(ce).sort(function(be,ge){return y(be)-y(ge)}).map(function(be,ge){return g.a.createElement("stop",{key:ge,offset:be,stopColor:ce[be]})}))),g.a.createElement("path",{className:"".concat(K,"-circle-trail"),d:re,stroke:fe,strokeLinecap:me,strokeWidth:W||U,fillOpacity:"0",style:pe}),Z().reverse())};I.defaultProps=p;var N=I,G={Line:s,Circle:N}},hW8S:function(j,Y,D){"use strict";D.d(Y,"a",function(){return P}),D.d(Y,"c",function(){return p}),D.d(Y,"b",function(){return v});var L=D("VTBJ"),g=D("Ff2n"),T=D("Kwbf"),P="RC_TABLE_INTERNAL_COL_DEFINE";function p(S){var b=S.expandable,d=Object(g.a)(S,["expandable"]);return"expandable"in S?Object(L.a)(Object(L.a)({},d),b):d}function v(S){return Object.keys(S).reduce(function(b,d){return(d.substr(0,5)==="data-"||d.substr(0,5)==="aria-")&&(b[d]=S[d]),b},{})}},jO9C:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.pad.Iso97971={pad:function(g,T){g.concat(L.lib.WordArray.create([2147483648],1)),L.pad.ZeroPadding.pad(g,T)},unpad:function(g){L.pad.ZeroPadding.unpad(g),g.sigBytes--}},L.pad.Iso97971})},jwmR:function(j,Y,D){j.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(j,Y,D){"use strict";D.d(Y,"a",function(){return kr});var L=D("rePB"),g=D("ODXe"),T=D("Ff2n"),P=D("VTBJ"),p=D("q1tI"),v=D("TSYQ"),S=D.n(v),b=D("Zm9Q"),d=D("6cGi"),l=D("KQm4"),n=D("xEkU"),c=D.n(n),u=D("t23M");function o(Me){var Ge=Object(p.useRef)(),Ye=Object(p.useRef)(!1);function Fe(){for(var Ee=arguments.length,Pe=new Array(Ee),_e=0;_eZe&&(jt=Ze-kt),Object(p.useMemo)(function(){if(!Pe.length)return[0,0];for(var Yt=Pe.length,Ir=Yt,Qr=0;QrWe+jt){Ir=Qr-1;break}}for(var nn=0,Kr=Yt-1;Kr>=0;Kr-=1){var sn=Me.get(Pe[Kr].key)||w;if(sn[Ve]1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Ge&&typeof Ge.getBoundingClientRect=="function"&&Ge.getBoundingClientRect().width;if(Fe){if(Ye){var Ee=getComputedStyle(Ge),Pe=Ee.marginLeft,_e=Ee.marginRight;Fe+=+Pe.replace("px","")+ +_e.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},ge=function(Ge,Ye,Fe){Ge&&Object(H.a)(Ge.style)==="object"&&(Ge.style[Ye]=Fe)},Te=function(){return ee.any},Je=D("bdgK"),rt=D("i8i4"),nt=D.n(rt),at=D("wgJM"),ct=D("l4aY"),ht=D("m+aA"),He=D("c+Xe"),Re=D("zT1h"),tt=D("QC+M");function ft(Me,Ge,Ye){return Ye?Me[0]===Ge[0]:Me[0]===Ge[0]&&Me[1]===Ge[1]}function Qe(Me,Ge,Ye){var Fe=Me[Ge]||{};return Object(P.a)(Object(P.a)({},Fe),Ye)}function lt(Me,Ge,Ye,Fe){for(var Ee=Ye.points,Pe=Object.keys(Me),_e=0;_e1&&arguments[1]!==void 0?arguments[1]:2;Ge();var Pe=Object(at.a)(function(){Ee<=1?Fe({isCanceled:function(){return Pe!==Me.current}}):Ye(Fe,Ee-1)});Me.current=Pe}return p.useEffect(function(){return function(){Ge()}},[]),[Ye,Ge]},kn=[Ar,vn,mn,Kt],Ln=!1,tn=!0;function ur(Me){return Me===mn||Me===Kt}var Xn=function(Me,Ge){var Ye=p.useState(un),Fe=Object(g.a)(Ye,2),Ee=Fe[0],Pe=Fe[1],_e=Xr(),je=Object(g.a)(_e,2),ze=je[0],Ve=je[1];function We(){Pe(Ar)}return gr(function(){if(Ee!==un&&Ee!==Kt){var Ze=kn.indexOf(Ee),pt=kn[Ze+1],kt=Ge(Ee);kt===Ln?Pe(pt):ze(function(jt){function Yt(){if(jt.isCanceled())return;Pe(pt)}kt===!0?Yt():Promise.resolve(kt).then(Yt)})}},[Me,Ee]),p.useEffect(function(){return function(){Ve()}},[]),[We,Ee]},hi=function(Me){var Ge=Object(p.useRef)(),Ye=Object(p.useRef)(Me);Ye.current=Me;var Fe=p.useCallback(function(_e){Ye.current(_e)},[]);function Ee(_e){_e&&(_e.removeEventListener(hr,Fe),_e.removeEventListener(Nt,Fe))}function Pe(_e){Ge.current&&Ge.current!==_e&&Ee(Ge.current),_e&&_e!==Ge.current&&(_e.addEventListener(hr,Fe),_e.addEventListener(Nt,Fe),Ge.current=_e)}return p.useEffect(function(){return function(){Ee(Ge.current)}},[]),[Pe,Ee]};function $n(Me,Ge,Ye,Fe){var Ee=Fe.motionEnter,Pe=Ee===void 0?!0:Ee,_e=Fe.motionAppear,je=_e===void 0?!0:_e,ze=Fe.motionLeave,Ve=ze===void 0?!0:ze,We=Fe.motionDeadline,Ze=Fe.motionLeaveImmediately,pt=Fe.onAppearPrepare,kt=Fe.onEnterPrepare,jt=Fe.onLeavePrepare,Yt=Fe.onAppearStart,Ir=Fe.onEnterStart,Qr=Fe.onLeaveStart,$r=Fe.onAppearActive,nn=Fe.onEnterActive,Kr=Fe.onLeaveActive,sn=Fe.onAppearEnd,ln=Fe.onEnterEnd,xn=Fe.onLeaveEnd,hn=Fe.onVisibleChanged,jn=or(),pn=Object(g.a)(jn,2),jr=pn[0],Wr=pn[1],dn=or(St),bn=Object(g.a)(dn,2),Tr=bn[0],Sn=bn[1],Yn=or(null),Rn=Object(g.a)(Yn,2),Wn=Rn[0],Dn=Rn[1],ti=Object(p.useRef)(!1),ci=Object(p.useRef)(null),Jn=Object(p.useRef)(!1),gi=Object(p.useRef)(null);function Xi(){var Fn=Ye();return Fn||gi.current}var Oi=Object(p.useRef)(!1);function di(Fn){var Pn=Xi();if(Fn&&!Fn.deadline&&Fn.target!==Pn)return;var ai;Tr===Yr&&Oi.current?ai=sn==null?void 0:sn(Pn,Fn):Tr===Jr&&Oi.current?ai=ln==null?void 0:ln(Pn,Fn):Tr===Hr&&Oi.current&&(ai=xn==null?void 0:xn(Pn,Fn)),ai!==!1&&!Jn.current&&(Sn(St),Dn(null))}var Hn=hi(di),zn=Object(g.a)(Hn,1),Qn=zn[0],Vn=p.useMemo(function(){var Fn,Pn,ai;switch(Tr){case"appear":return Fn={},Object(L.a)(Fn,Ar,pt),Object(L.a)(Fn,vn,Yt),Object(L.a)(Fn,mn,$r),Fn;case"enter":return Pn={},Object(L.a)(Pn,Ar,kt),Object(L.a)(Pn,vn,Ir),Object(L.a)(Pn,mn,nn),Pn;case"leave":return ai={},Object(L.a)(ai,Ar,jt),Object(L.a)(ai,vn,Qr),Object(L.a)(ai,mn,Kr),ai;default:return{}}},[Tr]),ii=Xn(Tr,function(Fn){if(Fn===Ar){var Pn=Vn[Ar];return Pn?Pn(Xi()):Ln}if(Mn in Vn){var ai;Dn(((ai=Vn[Mn])===null||ai===void 0?void 0:ai.call(Vn,Xi(),null))||null)}return Mn===mn&&(Qn(Xi()),We>0&&(clearTimeout(ci.current),ci.current=setTimeout(function(){di({deadline:!0})},We))),tn}),Di=Object(g.a)(ii,2),ra=Di[0],Mn=Di[1],Ui=ur(Mn);Oi.current=Ui,gr(function(){Wr(Ge);var Fn=ti.current;if(ti.current=!0,!Me)return;var Pn;!Fn&&Ge&&je&&(Pn=Yr),Fn&&Ge&&Pe&&(Pn=Jr),(Fn&&!Ge&&Ve||!Fn&&Ze&&!Ge&&Ve)&&(Pn=Hr),Pn&&(Sn(Pn),ra())},[Ge]),Object(p.useEffect)(function(){(Tr===Yr&&!je||Tr===Jr&&!Pe||Tr===Hr&&!Ve)&&Sn(St)},[je,Pe,Ve]),Object(p.useEffect)(function(){return function(){clearTimeout(ci.current),Jn.current=!0}},[]),Object(p.useEffect)(function(){jr!==void 0&&Tr===St&&(hn==null||hn(jr))},[jr,Tr]);var Bi=Wn;return Vn[Ar]&&Mn===vn&&(Bi=Object(P.a)({transition:"none"},Bi)),[Tr,Mn,Bi,jr!=null?jr:Ge]}var Zr=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(){return Object(k.a)(this,Ye),Ge.apply(this,arguments)}return Object(O.a)(Ye,[{key:"render",value:function(){return this.props.children}}]),Ye}(p.Component),Bn=Zr;function si(Me){var Ge=Me;Object(H.a)(Me)==="object"&&(Ge=Me.transitionSupport);function Ye(Ee){return!!(Ee.motionName&&Ge)}var Fe=p.forwardRef(function(Ee,Pe){var _e=Ee.visible,je=_e===void 0?!0:_e,ze=Ee.removeOnLeave,Ve=ze===void 0?!0:ze,We=Ee.forceRender,Ze=Ee.children,pt=Ee.motionName,kt=Ee.leavedClassName,jt=Ee.eventProps,Yt=Ye(Ee),Ir=Object(p.useRef)(),Qr=Object(p.useRef)();function $r(){try{return Object(ht.a)(Ir.current||Qr.current)}catch(Sn){return null}}var nn=$n(Yt,je,$r,Ee),Kr=Object(g.a)(nn,4),sn=Kr[0],ln=Kr[1],xn=Kr[2],hn=Kr[3],jn=p.useRef(hn);hn&&(jn.current=!0);var pn=Object(p.useRef)(Pe);pn.current=Pe;var jr=p.useCallback(function(Sn){Ir.current=Sn,Object(He.b)(pn.current,Sn)},[]),Wr,dn=Object(P.a)(Object(P.a)({},jt),{},{visible:je});if(!Ze)Wr=null;else if(sn===St||!Ye(Ee))hn?Wr=Ze(Object(P.a)({},dn),jr):!Ve&&jn.current?Wr=Ze(Object(P.a)(Object(P.a)({},dn),{},{className:kt}),jr):We?Wr=Ze(Object(P.a)(Object(P.a)({},dn),{},{style:{display:"none"}}),jr):Wr=null;else{var bn,Tr;ln===Ar?Tr="prepare":ur(ln)?Tr="active":ln===vn&&(Tr="start"),Wr=Ze(Object(P.a)(Object(P.a)({},dn),{},{className:S()(mr(pt,sn),(bn={},Object(L.a)(bn,mr(pt,"".concat(sn,"-").concat(Tr)),Tr),Object(L.a)(bn,pt,typeof pt=="string"),bn)),style:xn}),jr)}return p.createElement(Bn,{ref:Qr},Wr)});return Fe.displayName="CSSMotion",Fe}var li=si(Ut),wt="add",$t="keep",en="remove",Cn="removed";function _n(Me){var Ge;return Me&&Object(H.a)(Me)==="object"&&"key"in Me?Ge=Me:Ge={key:Me},Object(P.a)(Object(P.a)({},Ge),{},{key:String(Ge.key)})}function On(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Me.map(_n)}function ae(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ye=[],Fe=0,Ee=Ge.length,Pe=On(Me),_e=On(Ge);Pe.forEach(function(Ve){for(var We=!1,Ze=Fe;Ze1});return ze.forEach(function(Ve){Ye=Ye.filter(function(We){var Ze=We.key,pt=We.status;return Ze!==Ve||pt!==en}),Ye.forEach(function(We){We.key===Ve&&(We.status=$t)})}),Ye}var z=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function $(Me){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:li,Ye=function(Fe){Object(x.a)(Pe,Fe);var Ee=Object(y.a)(Pe);function Pe(){var _e;return Object(k.a)(this,Pe),_e=Ee.apply(this,arguments),_e.state={keyEntities:[]},_e.removeKey=function(je){_e.setState(function(ze){var Ve=ze.keyEntities;return{keyEntities:Ve.map(function(We){return We.key!==je?We:Object(P.a)(Object(P.a)({},We),{},{status:Cn})})}})},_e}return Object(O.a)(Pe,[{key:"render",value:function(){var je=this,ze=this.state.keyEntities,Ve=this.props,We=Ve.component,Ze=Ve.children,pt=Ve.onVisibleChanged,kt=Object(T.a)(Ve,["component","children","onVisibleChanged"]),jt=We||p.Fragment,Yt={};return z.forEach(function(Ir){Yt[Ir]=kt[Ir],delete kt[Ir]}),delete kt.keys,p.createElement(jt,kt,ze.map(function(Ir){var Qr=Ir.status,$r=Object(T.a)(Ir,["status"]),nn=Qr===wt||Qr===$t;return p.createElement(Ge,Object(f.a)({},Yt,{key:$r.key,visible:nn,eventProps:$r,onVisibleChanged:function(sn){pt==null||pt(sn,{key:$r.key}),sn||je.removeKey($r.key)}}),Ze)}))}}],[{key:"getDerivedStateFromProps",value:function(je,ze){var Ve=je.keys,We=ze.keyEntities,Ze=On(Ve),pt=ae(We,Ze);return{keyEntities:pt.filter(function(kt){var jt=We.find(function(Yt){var Ir=Yt.key;return kt.key===Ir});return!(jt&&jt.status===Cn&&kt.status===en)})}}}]),Pe}(p.Component);return Ye.defaultProps={component:"div"},Ye}var ie=$(Ut),de=li;function se(Me){var Ge=Me.prefixCls,Ye=Me.motion,Fe=Me.animation,Ee=Me.transitionName;return Ye||(Fe?{motionName:"".concat(Ge,"-").concat(Fe)}:Ee?{motionName:Ee}:null)}function Ke(Me){var Ge=Me.prefixCls,Ye=Me.visible,Fe=Me.zIndex,Ee=Me.mask,Pe=Me.maskMotion,_e=Me.maskAnimation,je=Me.maskTransitionName;if(!Ee)return null;var ze={};return(Pe||je||_e)&&(ze=Object(P.a)({motionAppear:!0},se({motion:Pe,prefixCls:Ge,transitionName:je,animation:_e}))),p.createElement(de,Object(f.a)({},ze,{visible:Ye,removeOnLeave:!0}),function(Ve){var We=Ve.className;return p.createElement("div",{style:{zIndex:Fe},className:S()("".concat(Ge,"-mask"),We)})})}var Rt=D("9mu1"),Vt=D("o0o1"),Er=D.n(Vt),Lt=D("HaE+"),zr=["measure","align",null,"motion"],Br=function(Me,Ge){var Ye=Object(p.useState)(null),Fe=Object(g.a)(Ye,2),Ee=Fe[0],Pe=Fe[1],_e=Object(p.useRef)(),je=Object(p.useRef)(!1);function ze(Ze){je.current||Pe(Ze)}function Ve(){at.a.cancel(_e.current)}function We(Ze){Ve(),_e.current=Object(at.a)(function(){ze(function(pt){switch(Ee){case"align":return"motion";case"motion":return"stable";default:}return pt}),Ze==null||Ze()})}return Object(p.useEffect)(function(){ze("measure")},[Me]),Object(p.useEffect)(function(){switch(Ee){case"measure":Ge();break;default:}Ee&&(_e.current=Object(at.a)(Object(Lt.a)(Er.a.mark(function Ze(){var pt,kt;return Er.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:pt=zr.indexOf(Ee),kt=zr[pt+1],kt&&pt!==-1&&ze(kt);case 3:case"end":return Yt.stop()}},Ze)}))))},[Ee]),Object(p.useEffect)(function(){return function(){je.current=!0,Ve()}},[]),[Ee,We]},En=function(Me){var Ge=p.useState({width:0,height:0}),Ye=Object(g.a)(Ge,2),Fe=Ye[0],Ee=Ye[1];function Pe(je){Ee({width:je.offsetWidth,height:je.offsetHeight})}var _e=p.useMemo(function(){var je={};if(Me){var ze=Fe.width,Ve=Fe.height;Me.indexOf("height")!==-1&&Ve?je.height=Ve:Me.indexOf("minHeight")!==-1&&Ve&&(je.minHeight=Ve),Me.indexOf("width")!==-1&&ze?je.width=ze:Me.indexOf("minWidth")!==-1&&ze&&(je.minWidth=ze)}return je},[Me,Fe]);return[_e,Pe]},ui=p.forwardRef(function(Me,Ge){var Ye=Me.visible,Fe=Me.prefixCls,Ee=Me.className,Pe=Me.style,_e=Me.children,je=Me.zIndex,ze=Me.stretch,Ve=Me.destroyPopupOnHide,We=Me.forceRender,Ze=Me.align,pt=Me.point,kt=Me.getRootDomNode,jt=Me.getClassNameFromAlign,Yt=Me.onAlign,Ir=Me.onMouseEnter,Qr=Me.onMouseLeave,$r=Me.onMouseDown,nn=Me.onTouchStart,Kr=Object(p.useRef)(),sn=Object(p.useRef)(),ln=Object(p.useState)(),xn=Object(g.a)(ln,2),hn=xn[0],jn=xn[1],pn=En(ze),jr=Object(g.a)(pn,2),Wr=jr[0],dn=jr[1];function bn(){ze&&dn(kt())}var Tr=Br(Ye,bn),Sn=Object(g.a)(Tr,2),Yn=Sn[0],Rn=Sn[1],Wn=Object(p.useRef)();function Dn(){return pt||kt}function ti(){var Hn;(Hn=Kr.current)===null||Hn===void 0||Hn.forceAlign()}function ci(Hn,zn){var Qn=jt(zn);hn!==Qn&&jn(Qn),Yn==="align"&&(hn!==Qn?Promise.resolve().then(function(){ti()}):Rn(function(){var Vn;(Vn=Wn.current)===null||Vn===void 0||Vn.call(Wn)}),Yt==null||Yt(Hn,zn))}var Jn=Object(P.a)({},se(Me));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Hn){var zn=Jn[Hn];Jn[Hn]=function(Qn,Vn){return Rn(),zn==null?void 0:zn(Qn,Vn)}});function gi(){return new Promise(function(Hn){Wn.current=Hn})}p.useEffect(function(){!Jn.motionName&&Yn==="motion"&&Rn()},[Jn.motionName,Yn]),p.useImperativeHandle(Ge,function(){return{forceAlign:ti,getElement:function(){return sn.current}}});var Xi=Object(P.a)(Object(P.a)({},Wr),{},{zIndex:je,opacity:Yn==="motion"||Yn==="stable"||!Ye?void 0:0,pointerEvents:Yn==="stable"?void 0:"none"},Pe),Oi=!0;(Ze==null?void 0:Ze.points)&&(Yn==="align"||Yn==="stable")&&(Oi=!1);var di=_e;return p.Children.count(_e)>1&&(di=p.createElement("div",{className:"".concat(Fe,"-content")},_e)),p.createElement(de,Object(f.a)({visible:Ye,ref:sn,leavedClassName:"".concat(Fe,"-hidden")},Jn,{onAppearPrepare:gi,onEnterPrepare:gi,removeOnLeave:Ve,forceRender:We}),function(Hn,zn){var Qn=Hn.className,Vn=Hn.style,ii=S()(Fe,Ee,hn,Qn);return p.createElement(Rt.a,{target:Dn(),key:"popup",ref:Kr,monitorWindowResize:!0,disabled:Oi,align:Ze,onAlign:ci},p.createElement("div",{ref:zn,className:ii,onMouseEnter:Ir,onMouseLeave:Qr,onMouseDownCapture:$r,onTouchStartCapture:nn,style:Object(P.a)(Object(P.a)({},Vn),Xi)},di))})});ui.displayName="PopupInner";var Ei=ui,In=p.forwardRef(function(Me,Ge){var Ye=Me.prefixCls,Fe=Me.visible,Ee=Me.zIndex,Pe=Me.children,_e=Me.mobile;_e=_e===void 0?{}:_e;var je=_e.popupClassName,ze=_e.popupStyle,Ve=_e.popupMotion,We=Ve===void 0?{}:Ve,Ze=_e.popupRender,pt=p.useRef();p.useImperativeHandle(Ge,function(){return{forceAlign:function(){},getElement:function(){return pt.current}}});var kt=Object(P.a)({zIndex:Ee},ze),jt=Pe;return p.Children.count(Pe)>1&&(jt=p.createElement("div",{className:"".concat(Ye,"-content")},Pe)),Ze&&(jt=Ze(jt)),p.createElement(de,Object(f.a)({visible:Fe,ref:pt,removeOnLeave:!0},We),function(Yt,Ir){var Qr=Yt.className,$r=Yt.style,nn=S()(Ye,je,Qr);return p.createElement("div",{ref:Ir,className:nn,style:Object(P.a)(Object(P.a)({},$r),kt)},jt)})});In.displayName="MobilePopupInner";var Li=In,qi=["visible","mobile"],ni=p.forwardRef(function(Me,Ge){var Ye=Me.visible,Fe=Me.mobile,Ee=Object(T.a)(Me,qi),Pe=Object(p.useState)(Ye),_e=Object(g.a)(Pe,2),je=_e[0],ze=_e[1],Ve=Object(p.useState)(!1),We=Object(g.a)(Ve,2),Ze=We[0],pt=We[1],kt=Object(P.a)(Object(P.a)({},Ee),{},{visible:je});Object(p.useEffect)(function(){ze(Ye),Ye&&Fe&&pt(Ue())},[Ye,Fe]);var jt=Ze?p.createElement(Li,Object(f.a)({},kt,{mobile:Fe,ref:Ge})):p.createElement(Ei,Object(f.a)({},kt,{ref:Ge}));return p.createElement("div",null,p.createElement(Ke,kt),jt)});ni.displayName="Popup";var Ti=ni,xi=p.createContext(null),Fi=xi;function Ci(){}function Gi(){return""}function Mi(Me){return Me?Me.ownerDocument:window.document}var oa=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function sa(Me){var Ge=function(Ye){Object(x.a)(Ee,Ye);var Fe=Object(y.a)(Ee);function Ee(Pe){var _e;Object(k.a)(this,Ee),_e=Fe.call(this,Pe),_e.popupRef=p.createRef(),_e.triggerRef=p.createRef(),_e.attachId=void 0,_e.clickOutsideHandler=void 0,_e.touchOutsideHandler=void 0,_e.contextMenuOutsideHandler1=void 0,_e.contextMenuOutsideHandler2=void 0,_e.mouseDownTimeout=void 0,_e.focusTime=void 0,_e.preClickTime=void 0,_e.preTouchTime=void 0,_e.delayTimer=void 0,_e.hasPopupMouseDown=void 0,_e.onMouseEnter=function(ze){var Ve=_e.props.mouseEnterDelay;_e.fireEvents("onMouseEnter",ze),_e.delaySetPopupVisible(!0,Ve,Ve?null:ze)},_e.onMouseMove=function(ze){_e.fireEvents("onMouseMove",ze),_e.setPoint(ze)},_e.onMouseLeave=function(ze){_e.fireEvents("onMouseLeave",ze),_e.delaySetPopupVisible(!1,_e.props.mouseLeaveDelay)},_e.onPopupMouseEnter=function(){_e.clearDelayTimer()},_e.onPopupMouseLeave=function(ze){var Ve;if(ze.relatedTarget&&!ze.relatedTarget.setTimeout&&Object(ct.a)((Ve=_e.popupRef.current)===null||Ve===void 0?void 0:Ve.getElement(),ze.relatedTarget))return;_e.delaySetPopupVisible(!1,_e.props.mouseLeaveDelay)},_e.onFocus=function(ze){_e.fireEvents("onFocus",ze),_e.clearDelayTimer(),_e.isFocusToShow()&&(_e.focusTime=Date.now(),_e.delaySetPopupVisible(!0,_e.props.focusDelay))},_e.onMouseDown=function(ze){_e.fireEvents("onMouseDown",ze),_e.preClickTime=Date.now()},_e.onTouchStart=function(ze){_e.fireEvents("onTouchStart",ze),_e.preTouchTime=Date.now()},_e.onBlur=function(ze){_e.fireEvents("onBlur",ze),_e.clearDelayTimer(),_e.isBlurToHide()&&_e.delaySetPopupVisible(!1,_e.props.blurDelay)},_e.onContextMenu=function(ze){ze.preventDefault(),_e.fireEvents("onContextMenu",ze),_e.setPopupVisible(!0,ze)},_e.onContextMenuClose=function(){_e.isContextMenuToShow()&&_e.close()},_e.onClick=function(ze){if(_e.fireEvents("onClick",ze),_e.focusTime){var Ve;if(_e.preClickTime&&_e.preTouchTime?Ve=Math.min(_e.preClickTime,_e.preTouchTime):_e.preClickTime?Ve=_e.preClickTime:_e.preTouchTime&&(Ve=_e.preTouchTime),Math.abs(Ve-_e.focusTime)<20)return;_e.focusTime=0}_e.preClickTime=0,_e.preTouchTime=0,_e.isClickToShow()&&(_e.isClickToHide()||_e.isBlurToHide())&&ze&&ze.preventDefault&&ze.preventDefault();var We=!_e.state.popupVisible;(_e.isClickToHide()&&!We||We&&_e.isClickToShow())&&_e.setPopupVisible(!_e.state.popupVisible,ze)},_e.onPopupMouseDown=function(){if(_e.hasPopupMouseDown=!0,clearTimeout(_e.mouseDownTimeout),_e.mouseDownTimeout=window.setTimeout(function(){_e.hasPopupMouseDown=!1},0),_e.context){var ze;(ze=_e.context).onPopupMouseDown.apply(ze,arguments)}},_e.onDocumentClick=function(ze){if(_e.props.mask&&!_e.props.maskClosable)return;var Ve=ze.target,We=_e.getRootDomNode(),Ze=_e.getPopupDomNode();(!Object(ct.a)(We,Ve)||_e.isContextMenuOnly())&&!Object(ct.a)(Ze,Ve)&&!_e.hasPopupMouseDown&&_e.close()},_e.getRootDomNode=function(){var ze=_e.props.getTriggerDOMNode;if(ze)return ze(_e.triggerRef.current);try{var Ve=Object(ht.a)(_e.triggerRef.current);if(Ve)return Ve}catch(We){}return nt.a.findDOMNode(Object(C.a)(_e))},_e.getPopupClassNameFromAlign=function(ze){var Ve=[],We=_e.props,Ze=We.popupPlacement,pt=We.builtinPlacements,kt=We.prefixCls,jt=We.alignPoint,Yt=We.getPopupClassNameFromAlign;return Ze&&pt&&Ve.push(lt(pt,kt,ze,jt)),Yt&&Ve.push(Yt(ze)),Ve.join(" ")},_e.getComponent=function(){var ze=_e.props,Ve=ze.prefixCls,We=ze.destroyPopupOnHide,Ze=ze.popupClassName,pt=ze.onPopupAlign,kt=ze.popupMotion,jt=ze.popupAnimation,Yt=ze.popupTransitionName,Ir=ze.popupStyle,Qr=ze.mask,$r=ze.maskAnimation,nn=ze.maskTransitionName,Kr=ze.maskMotion,sn=ze.zIndex,ln=ze.popup,xn=ze.stretch,hn=ze.alignPoint,jn=ze.mobile,pn=ze.forceRender,jr=_e.state,Wr=jr.popupVisible,dn=jr.point,bn=_e.getPopupAlign(),Tr={};return _e.isMouseEnterToShow()&&(Tr.onMouseEnter=_e.onPopupMouseEnter),_e.isMouseLeaveToHide()&&(Tr.onMouseLeave=_e.onPopupMouseLeave),Tr.onMouseDown=_e.onPopupMouseDown,Tr.onTouchStart=_e.onPopupMouseDown,p.createElement(Ti,Object(f.a)({prefixCls:Ve,destroyPopupOnHide:We,visible:Wr,point:hn&&dn,className:Ze,align:bn,onAlign:pt,animation:jt,getClassNameFromAlign:_e.getPopupClassNameFromAlign},Tr,{stretch:xn,getRootDomNode:_e.getRootDomNode,style:Ir,mask:Qr,zIndex:sn,transitionName:Yt,maskAnimation:$r,maskTransitionName:nn,maskMotion:Kr,ref:_e.popupRef,motion:kt,mobile:jn,forceRender:pn}),typeof ln=="function"?ln():ln)},_e.attachParent=function(ze){at.a.cancel(_e.attachId);var Ve=_e.props,We=Ve.getPopupContainer,Ze=Ve.getDocument,pt=_e.getRootDomNode(),kt;We?(pt||We.length===0)&&(kt=We(pt)):kt=Ze(_e.getRootDomNode()).body,kt?kt.appendChild(ze):_e.attachId=Object(at.a)(function(){_e.attachParent(ze)})},_e.getContainer=function(){var ze=_e.props.getDocument,Ve=ze(_e.getRootDomNode()).createElement("div");return Ve.style.position="absolute",Ve.style.top="0",Ve.style.left="0",Ve.style.width="100%",_e.attachParent(Ve),Ve},_e.setPoint=function(ze){var Ve=_e.props.alignPoint;if(!Ve||!ze)return;_e.setState({point:{pageX:ze.pageX,pageY:ze.pageY}})},_e.handlePortalUpdate=function(){_e.state.prevPopupVisible!==_e.state.popupVisible&&_e.props.afterPopupVisibleChange(_e.state.popupVisible)},_e.triggerContextValue={onPopupMouseDown:_e.onPopupMouseDown};var je;return"popupVisible"in Pe?je=!!Pe.popupVisible:je=!!Pe.defaultPopupVisible,_e.state={prevPopupVisible:je,popupVisible:je},oa.forEach(function(ze){_e["fire".concat(ze)]=function(Ve){_e.fireEvents(ze,Ve)}}),_e}return Object(O.a)(Ee,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var _e=this.props,je=this.state;if(je.popupVisible){var ze;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ze=_e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Re.a)(ze,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ze=ze||_e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Re.a)(ze,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ze=ze||_e.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Re.a)(ze,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Re.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),at.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var _e;return((_e=this.popupRef.current)===null||_e===void 0?void 0:_e.getElement())||null}},{key:"getPopupAlign",value:function(){var _e=this.props,je=_e.popupPlacement,ze=_e.popupAlign,Ve=_e.builtinPlacements;return je&&Ve?Qe(Ve,je,ze):ze}},{key:"setPopupVisible",value:function(_e,je){var ze=this.props.alignPoint,Ve=this.state.popupVisible;this.clearDelayTimer(),Ve!==_e&&("popupVisible"in this.props||this.setState({popupVisible:_e,prevPopupVisible:Ve}),this.props.onPopupVisibleChange(_e)),ze&&je&&_e&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(_e,je,ze){var Ve=this,We=je*1e3;if(this.clearDelayTimer(),We){var Ze=ze?{pageX:ze.pageX,pageY:ze.pageY}:null;this.delayTimer=window.setTimeout(function(){Ve.setPopupVisible(_e,Ze),Ve.clearDelayTimer()},We)}else this.setPopupVisible(_e,ze)}},{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(_e){var je=this.props.children.props,ze=this.props;return je[_e]&&ze[_e]?this["fire".concat(_e)]:je[_e]||ze[_e]}},{key:"isClickToShow",value:function(){var _e=this.props,je=_e.action,ze=_e.showAction;return je.indexOf("click")!==-1||ze.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var _e=this.props.action;return _e==="contextMenu"||_e.length===1&&_e[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var _e=this.props,je=_e.action,ze=_e.showAction;return je.indexOf("contextMenu")!==-1||ze.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var _e=this.props,je=_e.action,ze=_e.hideAction;return je.indexOf("click")!==-1||ze.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var _e=this.props,je=_e.action,ze=_e.showAction;return je.indexOf("hover")!==-1||ze.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var _e=this.props,je=_e.action,ze=_e.hideAction;return je.indexOf("hover")!==-1||ze.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var _e=this.props,je=_e.action,ze=_e.showAction;return je.indexOf("focus")!==-1||ze.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var _e=this.props,je=_e.action,ze=_e.hideAction;return je.indexOf("focus")!==-1||ze.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var _e;(_e=this.popupRef.current)===null||_e===void 0||_e.forceAlign()}}},{key:"fireEvents",value:function(_e,je){var ze=this.props.children.props[_e];ze&&ze(je);var Ve=this.props[_e];Ve&&Ve(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var _e=this.state.popupVisible,je=this.props,ze=je.children,Ve=je.forceRender,We=je.alignPoint,Ze=je.className,pt=je.autoDestroy,kt=p.Children.only(ze),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,We&&(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=S()(kt&&kt.props&&kt.props.className,Ze);Yt&&(jt.className=Yt);var Ir=Object(P.a)({},jt);Object(He.c)(kt)&&(Ir.ref=Object(He.a)(this.triggerRef,kt.ref));var Qr=p.cloneElement(kt,Ir),$r;return(_e||this.popupRef.current||Ve)&&($r=p.createElement(Me,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!_e&&pt&&($r=null),p.createElement(Fi.Provider,{value:this.triggerContextValue},Qr,$r)}}],[{key:"getDerivedStateFromProps",value:function(_e,je){var ze=_e.popupVisible,Ve={};return ze!==void 0&&je.popupVisible!==ze&&(Ve.popupVisible=ze,Ve.prevPopupVisible=je.popupVisible),Ve}}]),Ee}(p.Component);return Ge.contextType=Fi,Ge.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Gi,getDocument:Mi,onPopupVisibleChange:Ci,afterPopupVisibleChange:Ci,onPopupAlign:Ci,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ge}var Ii=sa(tt.a),qn={adjustX:1,adjustY:1},Vi={topLeft:{points:["bl","tl"],overflow:qn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:qn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:qn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:qn,offset:[4,0]}},ta={topLeft:{points:["bl","tl"],overflow:qn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:qn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:qn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:qn,offset:[4,0]}},Tt=Vi,it=0,mt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Ct=function(Ge,Ye,Fe){var Ee=q(Ye),Pe=Ge.getState();Ge.setState({defaultActiveFirst:Object(P.a)(Object(P.a)({},Pe.defaultActiveFirst),{},Object(L.a)({},Ee,Fe))})},It=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(Fe){var Ee;Object(k.a)(this,Ye),Ee=Ge.call(this,Fe),Ee.onDestroy=function(We){Ee.props.onDestroy(We)},Ee.onKeyDown=function(We){var Ze=We.keyCode,pt=Ee.menuInstance,kt=Ee.props.store,jt=Ee.getVisible();if(Ze===m.a.ENTER)return Ee.onTitleClick(We),Ct(kt,Ee.props.eventKey,!0),!0;if(Ze===m.a.RIGHT)return jt?pt.onKeyDown(We):(Ee.triggerOpenChange(!0),Ct(kt,Ee.props.eventKey,!0)),!0;if(Ze===m.a.LEFT){var Yt;if(jt)Yt=pt.onKeyDown(We);else return;return Yt||(Ee.triggerOpenChange(!1),Yt=!0),Yt}return jt&&(Ze===m.a.UP||Ze===m.a.DOWN)?pt.onKeyDown(We):void 0},Ee.onOpenChange=function(We){Ee.props.onOpenChange(We)},Ee.onPopupVisibleChange=function(We){Ee.triggerOpenChange(We,We?"mouseenter":"mouseleave")},Ee.onMouseEnter=function(We){var Ze=Ee.props,pt=Ze.eventKey,kt=Ze.onMouseEnter,jt=Ze.store;Ct(jt,Ee.props.eventKey,!1),kt({key:pt,domEvent:We})},Ee.onMouseLeave=function(We){var Ze=Ee.props,pt=Ze.parentMenu,kt=Ze.eventKey,jt=Ze.onMouseLeave;pt.subMenuInstance=Object(C.a)(Ee),jt({key:kt,domEvent:We})},Ee.onTitleMouseEnter=function(We){var Ze=Ee.props,pt=Ze.eventKey,kt=Ze.onItemHover,jt=Ze.onTitleMouseEnter;kt({key:pt,hover:!0}),jt({key:pt,domEvent:We})},Ee.onTitleMouseLeave=function(We){var Ze=Ee.props,pt=Ze.parentMenu,kt=Ze.eventKey,jt=Ze.onItemHover,Yt=Ze.onTitleMouseLeave;pt.subMenuInstance=Object(C.a)(Ee),jt({key:kt,hover:!1}),Yt({key:kt,domEvent:We})},Ee.onTitleClick=function(We){var Ze=Object(C.a)(Ee),pt=Ze.props;if(pt.onTitleClick({key:pt.eventKey,domEvent:We}),pt.triggerSubMenuAction==="hover")return;Ee.triggerOpenChange(!Ee.getVisible(),"click"),Ct(pt.store,Ee.props.eventKey,!1)},Ee.onSubMenuClick=function(We){typeof Ee.props.onClick=="function"&&Ee.props.onClick(Ee.addKeyPath(We))},Ee.onSelect=function(We){Ee.props.onSelect(We)},Ee.onDeselect=function(We){Ee.props.onDeselect(We)},Ee.getPrefixCls=function(){return"".concat(Ee.props.rootPrefixCls,"-submenu")},Ee.getActiveClassName=function(){return"".concat(Ee.getPrefixCls(),"-active")},Ee.getDisabledClassName=function(){return"".concat(Ee.getPrefixCls(),"-disabled")},Ee.getSelectedClassName=function(){return"".concat(Ee.getPrefixCls(),"-selected")},Ee.getOpenClassName=function(){return"".concat(Ee.props.rootPrefixCls,"-submenu-open")},Ee.getVisible=function(){return Ee.state.isOpen},Ee.getMode=function(){return Ee.state.mode},Ee.saveMenuInstance=function(We){Ee.menuInstance=We},Ee.addKeyPath=function(We){return Object(P.a)(Object(P.a)({},We),{},{keyPath:(We.keyPath||[]).concat(Ee.props.eventKey)})},Ee.triggerOpenChange=function(We,Ze){var pt=Ee.props.eventKey,kt=function(){Ee.onOpenChange({key:pt,item:Object(C.a)(Ee),trigger:Ze,open:We})};Ze==="mouseenter"?Ee.mouseenterTimeout=setTimeout(function(){kt()},0):kt()},Ee.isChildrenSelected=function(){var We={find:!1};return V(Ee.props.children,Ee.props.selectedKeys,We),We.find},Ee.isInlineMode=function(){return Ee.getMode()==="inline"},Ee.adjustWidth=function(){if(!Ee.subMenuTitle||!Ee.menuInstance)return;var We=rt.findDOMNode(Ee.menuInstance);if(We.offsetWidth>=Ee.subMenuTitle.offsetWidth)return;We.style.minWidth="".concat(Ee.subMenuTitle.offsetWidth,"px")},Ee.saveSubMenuTitle=function(We){Ee.subMenuTitle=We},Ee.getBaseProps=function(){var We=Object(C.a)(Ee),Ze=We.props,pt=Ee.getMode();return{mode:pt==="horizontal"?"vertical":pt,visible:Ee.getVisible(),level:Ze.level+1,inlineIndent:Ze.inlineIndent,focusable:!1,onClick:Ee.onSubMenuClick,onSelect:Ee.onSelect,onDeselect:Ee.onDeselect,onDestroy:Ee.onDestroy,selectedKeys:Ze.selectedKeys,eventKey:"".concat(Ze.eventKey,"-menu-"),openKeys:Ze.openKeys,motion:Ze.motion,onOpenChange:Ee.onOpenChange,subMenuOpenDelay:Ze.subMenuOpenDelay,parentMenu:Object(C.a)(Ee),subMenuCloseDelay:Ze.subMenuCloseDelay,forceSubMenuRender:Ze.forceSubMenuRender,triggerSubMenuAction:Ze.triggerSubMenuAction,builtinPlacements:Ze.builtinPlacements,defaultActiveFirst:Ze.store.getState().defaultActiveFirst[q(Ze.eventKey)],multiple:Ze.multiple,prefixCls:Ze.rootPrefixCls,id:Ee.internalMenuId,manualRef:Ee.saveMenuInstance,itemIcon:Ze.itemIcon,expandIcon:Ze.expandIcon,direction:Ze.direction}},Ee.getMotion=function(We,Ze){var pt=Object(C.a)(Ee),kt=pt.haveRendered,jt=Ee.props,Yt=jt.motion,Ir=jt.rootPrefixCls,Qr=Object(P.a)(Object(P.a)({},Yt),{},{leavedClassName:"".concat(Ir,"-hidden"),removeOnLeave:!1,motionAppear:kt||!Ze||We!=="inline"});return Qr};var Pe=Fe.store,_e=Fe.eventKey,je=Pe.getState(),ze=je.defaultActiveFirst;Ee.isRootMenu=!1;var Ve=!1;return ze&&(Ve=ze[_e]),Ct(Pe,_e,Ve),Ee.state={mode:Fe.mode,isOpen:Fe.isOpen},Ee}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ee=this,Pe=this.props,_e=Pe.mode,je=Pe.parentMenu,ze=Pe.manualRef,Ve=Pe.isOpen,We=function(){Ee.setState({mode:_e,isOpen:Ve})},Ze=Ve!==this.state.isOpen,pt=_e!==this.state.mode;if((pt||Ze)&&(at.a.cancel(this.updateStateRaf),pt?this.updateStateRaf=Object(at.a)(We):We()),ze&&ze(this),_e!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!Ve)return;this.minWidthTimeout=setTimeout(function(){return Ee.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ee=this.props,Pe=Ee.onDestroy,_e=Ee.eventKey;Pe&&Pe(_e),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),at.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(Ee,Pe){var _e=this.getBaseProps();return p.createElement(Lr,Object(f.a)({},_e,{id:this.internalMenuId,className:Ee,style:Pe}),this.props.children)}},{key:"renderChildren",value:function(){var Ee=this,Pe=this.getBaseProps(),_e=Pe.mode,je=Pe.visible,ze=Pe.forceSubMenuRender,Ve=Pe.direction,We=this.getMotion(_e,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||ze,!this.haveOpened)return p.createElement("div",null);var Ze=S()("".concat(Pe.prefixCls,"-sub"),Object(L.a)({},"".concat(Pe.prefixCls,"-rtl"),Ve==="rtl"));return this.isInlineMode()?p.createElement(de,Object(f.a)({visible:Pe.visible,forceRender:ze},We),function(pt){var kt=pt.className,jt=pt.style,Yt=S()(Ze,kt);return Ee.renderPopupMenu(Yt,jt)}):this.renderPopupMenu(Ze)}},{key:"render",value:function(){var Ee,Pe,_e,je=Object(P.a)({},this.props),ze=this.getVisible(),Ve=this.getPrefixCls(),We=this.isInlineMode(),Ze=this.getMode(),pt=S()(Ve,"".concat(Ve,"-").concat(Ze),(Ee={},Object(L.a)(Ee,je.className,!!je.className),Object(L.a)(Ee,this.getOpenClassName(),ze),Object(L.a)(Ee,this.getActiveClassName(),je.active||ze&&!We),Object(L.a)(Ee,this.getDisabledClassName(),je.disabled),Object(L.a)(Ee,this.getSelectedClassName(),this.isChildrenSelected()),Ee));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(it+=1,this.internalMenuId="$__$".concat(it,"$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 Ir={},Qr=je.direction,$r=Qr==="rtl";We&&($r?Ir.paddingRight=je.inlineIndent*je.level:Ir.paddingLeft=je.inlineIndent*je.level);var nn={};this.getVisible()&&(nn={"aria-owns":this.internalMenuId});var Kr=null;Ze!=="horizontal"&&(Kr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Kr=p.createElement(this.props.expandIcon,Object(P.a)({},this.props))));var sn=p.createElement("div",Object(f.a)({ref:this.saveSubMenuTitle,style:Ir,className:"".concat(Ve,"-title"),role:"button"},Yt,jt,{"aria-expanded":ze},nn,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,Kr||p.createElement("i",{className:"".concat(Ve,"-arrow")})),ln=this.renderChildren(),xn=((Pe=je.parentMenu)===null||Pe===void 0?void 0:Pe.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Dn){return Dn.parentNode},hn=mt[Ze],jn=je.popupOffset?{offset:je.popupOffset}:{},pn=S()((_e={},Object(L.a)(_e,je.popupClassName,je.popupClassName&&!We),Object(L.a)(_e,"".concat(Ve,"-rtl"),$r),_e)),jr=je.disabled,Wr=je.triggerSubMenuAction,dn=je.subMenuOpenDelay,bn=je.forceSubMenuRender,Tr=je.subMenuCloseDelay,Sn=je.builtinPlacements;Z.forEach(function(Dn){return delete je[Dn]}),delete je.onClick;var Yn=$r?Object(P.a)(Object(P.a)({},ta),Sn):Object(P.a)(Object(P.a)({},Vi),Sn);delete je.direction;var Rn=this.getBaseProps(),Wn=We?null:this.getMotion(Rn.mode,Rn.visible);return p.createElement("li",Object(f.a)({},je,kt,{className:pt,role:"menuitem"}),p.createElement(Ii,{prefixCls:Ve,popupClassName:S()("".concat(Ve,"-popup"),pn),getPopupContainer:xn,builtinPlacements:Yn,popupPlacement:hn,popupVisible:We?!1:ze,popupAlign:jn,popup:We?null:ln,action:jr||We?[]:[Wr],mouseEnterDelay:dn,mouseLeaveDelay:Tr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:bn,popupMotion:Wn},sn),We?ln:null)}}]),Ye}(p.Component);It.defaultProps={onMouseEnter:te,onMouseLeave:te,onTitleMouseEnter:te,onTitleMouseLeave:te,onTitleClick:te,manualRef:te,mode:"vertical",title:""};var Pt=Object(_.b)(function(Me,Ge){var Ye=Me.openKeys,Fe=Me.activeKey,Ee=Me.selectedKeys,Pe=Ge.eventKey,_e=Ge.subMenuKey;return{isOpen:Ye.indexOf(Pe)>-1,active:Fe[_e]===Pe,selectedKeys:Ee}})(It);Pt.isSubMenu=!0;var Ht=Pt,Wt="menuitem-overflowed",dt=.5,At=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.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=p.createRef(),Fe.getMenuItemNodes=function(){var Ee=Fe.props.prefixCls,Pe=Fe.childRef.current;return Pe?[].slice.call(Pe.children).filter(function(_e){return _e.className.split(" ").indexOf("".concat(Ee,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(Ee,Pe,_e){var je=Fe.props,ze=je.overflowedIndicator,Ve=je.level,We=je.mode,Ze=je.prefixCls,pt=je.theme;if(Ve!==1||We!=="horizontal")return null;var kt=Fe.props.children[0],jt=kt.props,Yt=jt.children,Ir=jt.title,Qr=jt.style,$r=Object(T.a)(jt,["children","title","style"]),nn=Object(P.a)({},Qr),Kr="".concat(Ee,"-overflowed-indicator"),sn="".concat(Ee,"-overflowed-indicator");Pe.length===0&&_e!==!0?nn=Object(P.a)(Object(P.a)({},nn),{},{display:"none"}):_e&&(nn=Object(P.a)(Object(P.a)({},nn),{},{visibility:"hidden",position:"absolute"}),Kr="".concat(Kr,"-placeholder"),sn="".concat(sn,"-placeholder"));var ln=pt?"".concat(Ze,"-").concat(pt):"",xn={};return Z.forEach(function(hn){$r[hn]!==void 0&&(xn[hn]=$r[hn])}),p.createElement(Ht,Object(f.a)({title:ze,className:"".concat(Ze,"-overflowed-submenu"),popupClassName:ln},xn,{key:Kr,eventKey:sn,disabled:!1,style:nn}),Pe)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var Ee=Fe.childRef.current;if(!Ee)return;var Pe=Ee.children;if(!Pe||Pe.length===0)return;var _e=Ee.children[Pe.length-1];ge(_e,"display","inline-block");var je=Fe.getMenuItemNodes(),ze=je.filter(function(Ve){return Ve.className.split(" ").indexOf(Wt)>=0});ze.forEach(function(Ve){ge(Ve,"display","inline-block")}),Fe.menuItemSizes=je.map(function(Ve){return be(Ve,!0)}),ze.forEach(function(Ve){ge(Ve,"display","none")}),Fe.overflowedIndicatorWidth=be(Ee.children[Ee.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(Ve,We){return Ve+We},0),Fe.handleResize(),ge(_e,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var Ee=Fe.childRef.current;if(!Ee)return;var Pe=be(Ee);Fe.overflowedItems=[];var _e=0,je;Fe.originalTotalWidth>Pe+dt&&(je=-1,Fe.menuItemSizes.forEach(function(ze){_e+=ze,_e+Fe.overflowedIndicatorWidth<=Pe&&(je+=1)})),Fe.setState({lastVisibleIndex:je})},Fe}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){var Ee=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Pe=this.childRef.current;if(!Pe)return;this.resizeObserver=new Je.default(function(_e){_e.forEach(function(){var je=Ee.cancelFrameId;cancelAnimationFrame(je),Ee.cancelFrameId=requestAnimationFrame(Ee.setChildrenWidthAndResize)})}),[].slice.call(Pe.children).concat(Pe).forEach(function(_e){Ee.resizeObserver.observe(_e)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ee.resizeObserver.disconnect(),[].slice.call(Pe.children).concat(Pe).forEach(function(_e){Ee.resizeObserver.observe(_e)}),Ee.setChildrenWidthAndResize()}),this.mutationObserver.observe(Pe,{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(Ee){var Pe=this,_e=this.state.lastVisibleIndex;return(Ee||[]).reduce(function(je,ze,Ve){var We=ze;if(Pe.props.mode==="horizontal"){var Ze=Pe.getOverflowedSubMenuItem(ze.props.eventKey,[]);_e!==void 0&&Pe.props.className.indexOf("".concat(Pe.props.prefixCls,"-root"))!==-1&&(Ve>_e&&(We=p.cloneElement(ze,{style:{display:"none"},eventKey:"".concat(ze.props.eventKey,"-hidden"),className:"".concat(Wt)})),Ve===_e+1&&(Pe.overflowedItems=Ee.slice(_e+1).map(function(kt){return p.cloneElement(kt,{key:kt.props.eventKey,mode:"vertical-left"})}),Ze=Pe.getOverflowedSubMenuItem(ze.props.eventKey,Pe.overflowedItems)));var pt=[].concat(Object(l.a)(je),[Ze,We]);return Ve===Ee.length-1&&pt.push(Pe.getOverflowedSubMenuItem(ze.props.eventKey,[],!0)),pt}return[].concat(Object(l.a)(je),[We])},[])}},{key:"render",value:function(){var Ee=this.props,Pe=Ee.visible,_e=Ee.prefixCls,je=Ee.overflowedIndicator,ze=Ee.mode,Ve=Ee.level,We=Ee.tag,Ze=Ee.children,pt=Ee.theme,kt=Object(T.a)(Ee,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),jt=We;return p.createElement(jt,Object(f.a)({ref:this.childRef},kt),this.renderChildren(Ze))}}]),Ye}(p.Component);At.defaultProps={tag:"div",className:""};var Dt=At;function yr(Me){return Me.length?Me.every(function(Ge){return!!Ge.props.disabled}):!0}function tr(Me,Ge,Ye){var Fe=Me.getState();Me.setState({activeKey:Object(P.a)(Object(P.a)({},Fe.activeKey),{},Object(L.a)({},Ge,Ye))})}function qt(Me){return Me.eventKey||"0-menu-"}function Gt(Me,Ge){var Ye=Ge,Fe=Me.children,Ee=Me.eventKey;if(Ye){var Pe;if(Q(Fe,function(_e,je){_e&&_e.props&&!_e.props.disabled&&Ye===ce(_e,Ee,je)&&(Pe=!0)}),Pe)return Ye}return Ye=null,Me.defaultActiveFirst&&Q(Fe,function(_e,je){!Ye&&_e&&!_e.props.disabled&&(Ye=ce(_e,Ee,je))}),Ye}function nr(Me){if(!Me)return;var Ge=this.instanceArray.indexOf(Me);Ge!==-1?this.instanceArray[Ge]=Me:this.instanceArray.push(Me)}var cr=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(Fe){var Ee;return Object(k.a)(this,Ye),Ee=Ge.call(this,Fe),Ee.onKeyDown=function(Pe,_e){var je=Pe.keyCode,ze;if(Ee.getFlatInstanceArray().forEach(function(We){We&&We.props.active&&We.onKeyDown&&(ze=We.onKeyDown(Pe))}),ze)return 1;var Ve=null;return(je===m.a.UP||je===m.a.DOWN)&&(Ve=Ee.step(je===m.a.UP?-1:1)),Ve?(Pe.preventDefault(),tr(Ee.props.store,qt(Ee.props),Ve.props.eventKey),typeof _e=="function"&&_e(Ve),1):void 0},Ee.onItemHover=function(Pe){var _e=Pe.key,je=Pe.hover;tr(Ee.props.store,qt(Ee.props),je?_e:null)},Ee.onDeselect=function(Pe){Ee.props.onDeselect(Pe)},Ee.onSelect=function(Pe){Ee.props.onSelect(Pe)},Ee.onClick=function(Pe){Ee.props.onClick(Pe)},Ee.onOpenChange=function(Pe){Ee.props.onOpenChange(Pe)},Ee.onDestroy=function(Pe){Ee.props.onDestroy(Pe)},Ee.getFlatInstanceArray=function(){return Ee.instanceArray},Ee.step=function(Pe){var _e=Ee.getFlatInstanceArray(),je=Ee.props.store.getState().activeKey[qt(Ee.props)],ze=_e.length;if(!ze)return null;Pe<0&&(_e=_e.concat().reverse());var Ve=-1;if(_e.every(function(kt,jt){return kt&&kt.props.eventKey===je?(Ve=jt,!1):!0}),!Ee.props.defaultActiveFirst&&Ve!==-1&&yr(_e.slice(Ve,ze-1)))return;var We=(Ve+1)%ze,Ze=We;do{var pt=_e[Ze];if(!pt||pt.props.disabled)Ze=(Ze+1)%ze;else return pt}while(Ze!==We);return null},Ee.renderCommonMenuItem=function(Pe,_e,je){var ze=Ee.props.store.getState(),Ve=Object(C.a)(Ee),We=Ve.props,Ze=ce(Pe,We.eventKey,_e),pt=Pe.props;if(!pt||typeof Pe.type=="string")return Pe;var kt=Ze===ze.activeKey,jt=Object(P.a)(Object(P.a)({mode:pt.mode||We.mode,level:We.level,inlineIndent:We.inlineIndent,renderMenuItem:Ee.renderMenuItem,rootPrefixCls:We.prefixCls,index:_e,parentMenu:We.parentMenu,manualRef:pt.disabled?void 0:Object(I.a)(Pe.ref,nr.bind(Object(C.a)(Ee))),eventKey:Ze,active:!pt.disabled&&kt,multiple:We.multiple,onClick:function(Ir){(pt.onClick||te)(Ir),Ee.onClick(Ir)},onItemHover:Ee.onItemHover,motion:We.motion,subMenuOpenDelay:We.subMenuOpenDelay,subMenuCloseDelay:We.subMenuCloseDelay,forceSubMenuRender:We.forceSubMenuRender,onOpenChange:Ee.onOpenChange,onDeselect:Ee.onDeselect,onSelect:Ee.onSelect,builtinPlacements:We.builtinPlacements,itemIcon:pt.itemIcon||Ee.props.itemIcon,expandIcon:pt.expandIcon||Ee.props.expandIcon},je),{},{direction:We.direction});return(We.mode==="inline"||Te())&&(jt.triggerSubMenuAction="click"),p.cloneElement(Pe,Object(P.a)(Object(P.a)({},jt),{},{key:Ze||_e}))},Ee.renderMenuItem=function(Pe,_e,je){if(!Pe)return null;var ze=Ee.props.store.getState(),Ve={openKeys:ze.openKeys,selectedKeys:ze.selectedKeys,triggerSubMenuAction:Ee.props.triggerSubMenuAction,subMenuKey:je};return Ee.renderCommonMenuItem(Pe,_e,Ve)},Fe.store.setState({activeKey:Object(P.a)(Object(P.a)({},Fe.store.getState().activeKey),{},Object(L.a)({},Fe.eventKey,Gt(Fe,Fe.activeKey)))}),Ee.instanceArray=[],Ee}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ee){return this.props.visible||Ee.visible||this.props.className!==Ee.className||!G()(this.props.style,Ee.style)}},{key:"componentDidUpdate",value:function(Ee){var Pe=this.props,_e="activeKey"in Pe?Pe.activeKey:Pe.store.getState().activeKey[qt(Pe)],je=Gt(Pe,_e);if(je!==_e)tr(Pe.store,qt(Pe),je);else if("activeKey"in Ee){var ze=Gt(Ee,Ee.activeKey);je!==ze&&tr(Pe.store,qt(Pe),je)}}},{key:"render",value:function(){var Ee=this,Pe=Object(f.a)({},this.props);this.instanceArray=[];var _e=S()(Pe.prefixCls,Pe.className,"".concat(Pe.prefixCls,"-").concat(Pe.mode)),je={className:_e,role:Pe.role||"menu"};Pe.id&&(je.id=Pe.id),Pe.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var ze=Pe.prefixCls,Ve=Pe.eventKey,We=Pe.visible,Ze=Pe.level,pt=Pe.mode,kt=Pe.overflowedIndicator,jt=Pe.theme;return Z.forEach(function(Yt){return delete Pe[Yt]}),delete Pe.onClick,p.createElement(Dt,Object(f.a)({},Pe,{prefixCls:ze,mode:pt,tag:"ul",level:Ze,theme:jt,visible:We,overflowedIndicator:kt},je),Object(b.a)(Pe.children).map(function(Yt,Ir){return Ee.renderMenuItem(Yt,Ir,Ve||"0-menu-")}))}}]),Ye}(p.Component);cr.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:te};var st=Object(_.b)()(cr),Lr=st,Fr=D("Kwbf");function Cr(Me,Ge,Ye){var Fe=Me.prefixCls,Ee=Me.motion,Pe=Me.defaultMotions,_e=Pe===void 0?{}:Pe,je=Me.openAnimation,ze=Me.openTransitionName,Ve=Ge.switchingModeFromInline;if(Ee)return Ee;if(Object(H.a)(je)==="object"&&je)Object(Fr.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(ze)return{motionName:ze};var We=_e[Ye];return We||(Ve?null:_e.other)}var rr=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(Fe){var Ee;Object(k.a)(this,Ye),Ee=Ge.call(this,Fe),Ee.onSelect=function(je){var ze=Object(C.a)(Ee),Ve=ze.props;if(Ve.selectable){var We=Ee.store.getState(),Ze=We.selectedKeys,pt=je.key;Ve.multiple?Ze=Ze.concat([pt]):Ze=[pt],"selectedKeys"in Ve||Ee.store.setState({selectedKeys:Ze}),Ve.onSelect(Object(P.a)(Object(P.a)({},je),{},{selectedKeys:Ze}))}},Ee.onClick=function(je){var ze=Ee.getRealMenuMode(),Ve=Object(C.a)(Ee),We=Ve.store,Ze=Ve.props.onOpenChange;ze!=="inline"&&!("openKeys"in Ee.props)&&(We.setState({openKeys:[]}),Ze([])),Ee.props.onClick(je)},Ee.onKeyDown=function(je,ze){Ee.innerMenu.getWrappedInstance().onKeyDown(je,ze)},Ee.onOpenChange=function(je){var ze=Object(C.a)(Ee),Ve=ze.props,We=Ee.store.getState().openKeys.concat(),Ze=!1,pt=function(jt){var Yt=!1;if(jt.open)Yt=We.indexOf(jt.key)===-1,Yt&&We.push(jt.key);else{var Ir=We.indexOf(jt.key);Yt=Ir!==-1,Yt&&We.splice(Ir,1)}Ze=Ze||Yt};Array.isArray(je)?je.forEach(pt):pt(je),Ze&&("openKeys"in Ee.props||Ee.store.setState({openKeys:We}),Ve.onOpenChange(We))},Ee.onDeselect=function(je){var ze=Object(C.a)(Ee),Ve=ze.props;if(Ve.selectable){var We=Ee.store.getState().selectedKeys.concat(),Ze=je.key,pt=We.indexOf(Ze);pt!==-1&&We.splice(pt,1),"selectedKeys"in Ve||Ee.store.setState({selectedKeys:We}),Ve.onDeselect(Object(P.a)(Object(P.a)({},je),{},{selectedKeys:We}))}},Ee.onMouseEnter=function(je){Ee.restoreModeVerticalFromInline();var ze=Ee.props.onMouseEnter;ze&&ze(je)},Ee.onTransitionEnd=function(je){var ze=je.propertyName==="width"&&je.target===je.currentTarget,Ve=je.target.className,We=Object.prototype.toString.call(Ve)==="[object SVGAnimatedString]"?Ve.animVal:Ve,Ze=je.propertyName==="font-size"&&We.indexOf("anticon")>=0;(ze||Ze)&&Ee.restoreModeVerticalFromInline()},Ee.setInnerMenu=function(je){Ee.innerMenu=je},Ee.isRootMenu=!0;var Pe=Fe.defaultSelectedKeys,_e=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(Pe=Fe.selectedKeys||[]),"openKeys"in Fe&&(_e=Fe.openKeys||[]),Ee.store=Object(_.c)({selectedKeys:Pe,openKeys:_e,activeKey:{"0-menu-":Gt(Fe,Fe.activeKey)}}),Ee.state={switchingModeFromInline:!1,prevProps:Fe,inlineOpenKeys:[],store:Ee.store},Ee}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ee){var Pe=this.props,_e=Pe.siderCollapsed,je=Pe.inlineCollapsed,ze=Pe.onOpenChange;(!Ee.inlineCollapsed&&je||!Ee.siderCollapsed&&_e)&&ze([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var Ee=this.props.collapsedWidth,Pe=this.store,_e=this.prevOpenKeys,je=this.getInlineCollapsed()&&(Ee===0||Ee==="0"||Ee==="0px");je?(this.prevOpenKeys=Pe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):_e&&(this.store.setState({openKeys:_e}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ee=this.props.mode,Pe=this.state.switchingModeFromInline,_e=this.getInlineCollapsed();return Pe&&_e?"inline":_e?"vertical":Ee}},{key:"getInlineCollapsed",value:function(){var Ee=this.props,Pe=Ee.inlineCollapsed,_e=Ee.siderCollapsed;return _e!==void 0?_e:Pe}},{key:"restoreModeVerticalFromInline",value:function(){var Ee=this.state.switchingModeFromInline;Ee&&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 Ee=Object(P.a)({},Object(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Pe=this.getRealMenuMode();return Ee.className+=" ".concat(Ee.prefixCls,"-root"),Ee.direction==="rtl"&&(Ee.className+=" ".concat(Ee.prefixCls,"-rtl")),Ee=Object(P.a)(Object(P.a)({},Ee),{},{mode:Pe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Cr(this.props,this.state,Pe)}),delete Ee.openAnimation,delete Ee.openTransitionName,p.createElement(_.a,{store:this.store},p.createElement(Lr,Object(f.a)({},Ee,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(Ee,Pe){var _e=Pe.prevProps,je=Pe.store,ze=je.getState(),Ve={},We={prevProps:Ee};return _e.mode==="inline"&&Ee.mode!=="inline"&&(We.switchingModeFromInline=!0),"openKeys"in Ee?Ve.openKeys=Ee.openKeys||[]:((Ee.inlineCollapsed&&!_e.inlineCollapsed||Ee.siderCollapsed&&!_e.siderCollapsed)&&(We.switchingModeFromInline=!0,We.inlineOpenKeys=ze.openKeys,Ve.openKeys=[]),(!Ee.inlineCollapsed&&_e.inlineCollapsed||!Ee.siderCollapsed&&_e.siderCollapsed)&&(Ve.openKeys=Pe.inlineOpenKeys,We.inlineOpenKeys=[])),Object.keys(Ve).length&&je.setState(Ve),We}}]),Ye}(p.Component);rr.defaultProps={selectable:!0,onClick:te,onSelect:te,onOpenChange:te,onDeselect:te,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:p.createElement("span",null,"\xB7\xB7\xB7")};var Et=rr,_t=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.onKeyDown=function(Ee){var Pe=Ee.keyCode;return Pe===m.a.ENTER?(Fe.onClick(Ee),!0):void 0},Fe.onMouseLeave=function(Ee){var Pe=Fe.props,_e=Pe.eventKey,je=Pe.onItemHover,ze=Pe.onMouseLeave;je({key:_e,hover:!1}),ze({key:_e,domEvent:Ee})},Fe.onMouseEnter=function(Ee){var Pe=Fe.props,_e=Pe.eventKey,je=Pe.onItemHover,ze=Pe.onMouseEnter;je({key:_e,hover:!0}),ze({key:_e,domEvent:Ee})},Fe.onClick=function(Ee){var Pe=Fe.props,_e=Pe.eventKey,je=Pe.multiple,ze=Pe.onClick,Ve=Pe.onSelect,We=Pe.onDeselect,Ze=Pe.isSelected,pt={key:_e,keyPath:[_e],item:Object(C.a)(Fe),domEvent:Ee};ze(pt),je?Ze?We(pt):Ve(pt):Ze||Ve(pt)},Fe.saveNode=function(Ee){Fe.node=Ee},Fe}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ee=this.props;Ee.onDestroy&&Ee.onDestroy(Ee.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 Ee,Pe=Object(P.a)({},this.props),_e=S()(this.getPrefixCls(),Pe.className,(Ee={},Object(L.a)(Ee,this.getActiveClassName(),!Pe.disabled&&Pe.active),Object(L.a)(Ee,this.getSelectedClassName(),Pe.isSelected),Object(L.a)(Ee,this.getDisabledClassName(),Pe.disabled),Ee)),je=Object(P.a)(Object(P.a)({},Pe.attribute),{},{title:typeof Pe.title=="string"?Pe.title:void 0,className:_e,role:Pe.role||"menuitem","aria-disabled":Pe.disabled});Pe.role==="option"?je=Object(P.a)(Object(P.a)({},je),{},{role:"option","aria-selected":Pe.isSelected}):(Pe.role===null||Pe.role==="none")&&(je.role="none");var ze={onClick:Pe.disabled?null:this.onClick,onMouseLeave:Pe.disabled?null:this.onMouseLeave,onMouseEnter:Pe.disabled?null:this.onMouseEnter},Ve=Object(P.a)({},Pe.style);Pe.mode==="inline"&&(Pe.direction==="rtl"?Ve.paddingRight=Pe.inlineIndent*Pe.level:Ve.paddingLeft=Pe.inlineIndent*Pe.level),Z.forEach(function(Ze){return delete Pe[Ze]}),delete Pe.direction;var We=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(We=p.createElement(this.props.itemIcon,this.props)),p.createElement("li",Object(f.a)({},Object(M.a)(Pe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,ze,{style:Ve,ref:this.saveNode}),Pe.children,We)}}]),Ye}(p.Component);_t.isMenuItem=!0,_t.defaultProps={onSelect:te,onMouseEnter:te,onMouseLeave:te,manualRef:te};var xt=Object(_.b)(function(Me,Ge){var Ye=Me.activeKey,Fe=Me.selectedKeys,Ee=Ge.eventKey,Pe=Ge.subMenuKey;return{active:Ye[Pe]===Ee,isSelected:Array.isArray(Fe)?Fe.indexOf(Ee)!==-1:Fe===Ee}})(_t),Jt=xt,pr=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.renderInnerMenuItem=function(Ee){var Pe=Fe.props,_e=Pe.renderMenuItem,je=Pe.index;return _e(Ee,je,Fe.props.subMenuKey)},Fe}return Object(O.a)(Ye,[{key:"render",value:function(){var Ee=Object(f.a)({},this.props),Pe=Ee.className,_e=Pe===void 0?"":Pe,je=Ee.rootPrefixCls,ze="".concat(je,"-item-group-title"),Ve="".concat(je,"-item-group-list"),We=Ee.title,Ze=Ee.children;return Z.forEach(function(pt){return delete Ee[pt]}),delete Ee.direction,p.createElement("li",Object(f.a)({},Ee,{onClick:function(kt){return kt.stopPropagation()},className:"".concat(_e," ").concat(je,"-item-group")}),p.createElement("div",{className:ze,title:typeof We=="string"?We:void 0},We),p.createElement("ul",{className:Ve},p.Children.map(Ze,this.renderInnerMenuItem)))}}]),Ye}(p.Component);pr.isMenuItemGroup=!0,pr.defaultProps={disabled:!0};var dr=pr,fr=function(Ge){var Ye=Ge.className,Fe=Ge.rootPrefixCls,Ee=Ge.style;return p.createElement("li",{className:"".concat(Ye," ").concat(Fe,"-item-divider"),style:Ee})};fr.defaultProps={disabled:!0,className:"",style:{}};var Dr=fr,an=Et,qe=D("eDIo");function sr(Me,Ge){var Ye=Me.prefixCls,Fe=Me.editable,Ee=Me.locale,Pe=Me.style;return!Fe||Fe.showAdd===!1?null:p.createElement("button",{ref:Ge,type:"button",className:"".concat(Ye,"-nav-add"),style:Pe,"aria-label":(Ee==null?void 0:Ee.addAriaLabel)||"Add tab",onClick:function(je){Fe.onEdit("add",{event:je})}},Fe.addIcon||"+")}var Nr=p.forwardRef(sr);function rn(Me,Ge){var Ye=Me.prefixCls,Fe=Me.id,Ee=Me.tabs,Pe=Me.locale,_e=Me.mobile,je=Me.moreIcon,ze=je===void 0?"More":je,Ve=Me.moreTransitionName,We=Me.style,Ze=Me.className,pt=Me.editable,kt=Me.tabBarGutter,jt=Me.rtl,Yt=Me.onTabClick,Ir=Object(p.useState)(!1),Qr=Object(g.a)(Ir,2),$r=Qr[0],nn=Qr[1],Kr=Object(p.useState)(null),sn=Object(g.a)(Kr,2),ln=sn[0],xn=sn[1],hn="".concat(Fe,"-more-popup"),jn="".concat(Ye,"-dropdown"),pn=ln!==null?"".concat(hn,"-").concat(ln):null,jr=Pe==null?void 0:Pe.dropdownAriaLabel,Wr=p.createElement(an,{onClick:function(Wn){var Dn=Wn.key,ti=Wn.domEvent;Yt(Dn,ti),nn(!1)},id:hn,tabIndex:-1,role:"listbox","aria-activedescendant":pn,selectedKeys:[ln],"aria-label":jr!==void 0?jr:"expanded dropdown"},Ee.map(function(Rn){return p.createElement(Jt,{key:Rn.key,id:"".concat(hn,"-").concat(Rn.key),role:"option","aria-controls":Fe&&"".concat(Fe,"-panel-").concat(Rn.key),disabled:Rn.disabled},Rn.tab)}));function dn(Rn){for(var Wn=Ee.filter(function(gi){return!gi.disabled}),Dn=Wn.findIndex(function(gi){return gi.key===ln})||0,ti=Wn.length,ci=0;ciSn?(bn=Wr,hn.current="x"):(bn=dn,hn.current="y");var Yn=Date.now();Yn-ln.current>100&&(xn.current=!1),(Ge(-bn,-bn)||xn.current)&&(jr.preventDefault(),xn.current=!0),ln.current=Yn}var pn=Object(p.useRef)(null);pn.current={onTouchStart:nn,onTouchMove:Kr,onTouchEnd:sn,onWheel:jn},p.useEffect(function(){function jr(Tr){pn.current.onTouchStart(Tr)}function Wr(Tr){pn.current.onTouchMove(Tr)}function dn(Tr){pn.current.onTouchEnd(Tr)}function bn(Tr){pn.current.onWheel(Tr)}return document.addEventListener("touchmove",Wr,{passive:!1}),document.addEventListener("touchend",dn,{passive:!1}),Me.current.addEventListener("touchstart",jr,{passive:!1}),Me.current.addEventListener("wheel",bn),function(){document.removeEventListener("touchmove",Wr),document.removeEventListener("touchend",dn)}},[])}function yt(){var Me=Object(p.useRef)(new Map);function Ge(Fe){return Me.current.has(Fe)||Me.current.set(Fe,p.createRef()),Me.current.get(Fe)}function Ye(Fe){Me.current.delete(Fe)}return[Ge,Ye]}function zt(Me,Ge){var Ye=p.useRef(Me),Fe=p.useState({}),Ee=Object(g.a)(Fe,2),Pe=Ee[1];function _e(je){var ze=typeof je=="function"?je(Ye.current):je;ze!==Ye.current&&Ge(ze,Ye.current),Ye.current=ze,Pe({})}return[Ye.current,_e]}var Mt=function(Ge){var Ye=Ge.position,Fe=Ge.prefixCls,Ee=Ge.extra;if(!Ee)return null;var Pe,_e=Ee;return Ye==="right"&&(Pe=_e.right||!_e.left&&_e||null),Ye==="left"&&(Pe=_e.left||null),Pe?p.createElement("div",{className:"".concat(Fe,"-extra-content")},Pe):null};function Mr(Me,Ge){var Ye,Fe=p.useContext(br),Ee=Fe.prefixCls,Pe=Fe.tabs,_e=Me.className,je=Me.style,ze=Me.id,Ve=Me.animated,We=Me.activeKey,Ze=Me.rtl,pt=Me.extra,kt=Me.editable,jt=Me.locale,Yt=Me.tabPosition,Ir=Me.tabBarGutter,Qr=Me.children,$r=Me.onTabClick,nn=Me.onTabScroll,Kr=Object(p.useRef)(),sn=Object(p.useRef)(),ln=Object(p.useRef)(),xn=Object(p.useRef)(),hn=yt(),jn=Object(g.a)(hn,2),pn=jn[0],jr=jn[1],Wr=Yt==="top"||Yt==="bottom",dn=zt(0,function(Un,An){Wr&&nn&&nn({direction:Un>An?"left":"right"})}),bn=Object(g.a)(dn,2),Tr=bn[0],Sn=bn[1],Yn=zt(0,function(Un,An){!Wr&&nn&&nn({direction:Un>An?"top":"bottom"})}),Rn=Object(g.a)(Yn,2),Wn=Rn[0],Dn=Rn[1],ti=Object(p.useState)(0),ci=Object(g.a)(ti,2),Jn=ci[0],gi=ci[1],Xi=Object(p.useState)(0),Oi=Object(g.a)(Xi,2),di=Oi[0],Hn=Oi[1],zn=Object(p.useState)(0),Qn=Object(g.a)(zn,2),Vn=Qn[0],ii=Qn[1],Di=Object(p.useState)(0),ra=Object(g.a)(Di,2),Mn=ra[0],Ui=ra[1],Bi=Object(p.useState)(null),Fn=Object(g.a)(Bi,2),Pn=Fn[0],ai=Fn[1],Ba=Object(p.useState)(null),wa=Object(g.a)(Ba,2),la=wa[0],ua=wa[1],ka=Object(p.useState)(0),_a=Object(g.a)(ka,2),La=_a[0],Wa=_a[1],Xa=Object(p.useState)(0),Ma=Object(g.a)(Xa,2),ca=Ma[0],Sa=Ma[1],ba=h(new Map),da=Object(g.a)(ba,2),co=da[0],Ea=da[1],Ta=t(Pe,co,Jn),fa="".concat(Ee,"-nav-operations-hidden"),ha=0,$i=0;Wr?Ze?(ha=0,$i=Math.max(0,Jn-Pn)):(ha=Math.min(0,Pn-Jn),$i=0):(ha=Math.min(0,la-di),$i=0);function na(Un){return Un$i?[$i,!1]:[Un,!0]}var Sr=Object(p.useRef)(),Or=Object(p.useState)(),lr=Object(g.a)(Or,2),Tn=lr[0],vr=lr[1];function pa(){vr(Date.now())}function $a(){window.clearTimeout(Sr.current)}vt(Kr,function(Un,An){var wi=!1;function Hi(Ia,ma){Ia(function(Ka){var xa=na(Ka+ma),_i=Object(g.a)(xa,2),Qa=_i[0],ho=_i[1];return wi=ho,Qa})}if(Wr){if(Pn>=Jn)return wi;Hi(Sn,Un)}else{if(la>=di)return wi;Hi(Dn,An)}return $a(),pa(),wi}),Object(p.useEffect)(function(){return $a(),Tn&&(Sr.current=window.setTimeout(function(){vr(0)},100)),$a},[Tn]);function Kn(){var Un=arguments.length>0&&arguments[0]!==void 0?arguments[0]:We,An=Ta.get(Un);if(!An)return;if(Wr){var wi=Tr;Ze?An.rightTr+Pn&&(wi=An.right+An.width-Pn):An.left<-Tr?wi=-An.left:An.left+An.width>-Tr+Pn&&(wi=-(An.left+An.width-Pn)),Dn(0),Sn(na(wi)[0])}else{var Hi=Wn;An.top<-Wn?Hi=-An.top:An.top+An.height>-Wn+la&&(Hi=-(An.top+An.height-la)),Sn(0),Dn(na(Hi)[0])}}var Oa=E(Ta,{width:Pn,height:la,left:Tr,top:Wn},{width:Vn,height:Mn},{width:La,height:ca},Object(P.a)(Object(P.a)({},Me),{},{tabs:Pe})),Do=Object(g.a)(Oa,2),Jo=Do[0],Qo=Do[1],Zo=Pe.map(function(Un){var An=Un.key;return p.createElement(r,{id:ze,prefixCls:Ee,key:An,rtl:Ze,tab:Un,closable:Un.closable,editable:kt,active:An===We,tabPosition:Yt,tabBarGutter:Ir,renderWrapper:Qr,removeAriaLabel:jt==null?void 0:jt.removeAriaLabel,ref:pn(An),onClick:function(Hi){$r(An,Hi)},onRemove:function(){jr(An)},onFocus:function(){Kn(An),pa(),Ze||(Kr.current.scrollLeft=0),Kr.current.scrollTop=0}})}),fo=o(function(){var Un,An,wi,Hi,Ia,ma,Ka,xa,_i,Qa=((Un=Kr.current)===null||Un===void 0?void 0:Un.offsetWidth)||0,ho=((An=Kr.current)===null||An===void 0?void 0:An.offsetHeight)||0,po=((wi=xn.current)===null||wi===void 0?void 0:wi.offsetWidth)||0,zi=((Hi=xn.current)===null||Hi===void 0?void 0:Hi.offsetHeight)||0,Nn=((Ia=ln.current)===null||Ia===void 0?void 0:Ia.offsetWidth)||0,aa=((ma=ln.current)===null||ma===void 0?void 0:ma.offsetHeight)||0;ai(Qa),ua(ho),Wa(po),Sa(zi);var va=(((Ka=sn.current)===null||Ka===void 0?void 0:Ka.offsetWidth)||0)-po,ga=(((xa=sn.current)===null||xa===void 0?void 0:xa.offsetHeight)||0)-zi;gi(va),Hn(ga);var mo=(_i=ln.current)===null||_i===void 0?void 0:_i.className.includes(fa);ii(va-(mo?0:Nn)),Ui(ga-(mo?0:aa)),Ea(function(){var Za=new Map;return Pe.forEach(function(Io){var No=Io.key,Ra=pn(No).current;Ra&&Za.set(No,{width:Ra.offsetWidth,height:Ra.offsetHeight,left:Ra.offsetLeft,top:Ra.offsetTop})}),Za})}),qo=Pe.slice(0,Jo),Wi=Pe.slice(Qo+1),pi=[].concat(Object(l.a)(qo),Object(l.a)(Wi)),Pi=Object(p.useState)(),mi=Object(g.a)(Pi,2),Ha=mi[0],es=mi[1],ia=Ta.get(We),Po=Object(p.useRef)();function ko(){c.a.cancel(Po.current)}Object(p.useEffect)(function(){var Un={};return ia&&(Wr?(Ze?Un.right=ia.right:Un.left=ia.left,Un.width=ia.width):(Un.top=ia.top,Un.height=ia.height)),ko(),Po.current=c()(function(){es(Un)}),ko},[ia,Wr,Ze]),Object(p.useEffect)(function(){Kn()},[We,ia,Ta,Wr]),Object(p.useEffect)(function(){fo()},[Ze,Ir,We,Pe.map(function(Un){return Un.key}).join("_")]);var Lo=!!pi.length,Aa="".concat(Ee,"-nav-wrap"),Ya,za,Mo,Ja;return Wr?Ze?(za=Tr>0,Ya=Tr+Pn>>7)^(k<<14|k>>>18)^k>>>3,C=l[f-2],x=(C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10;l[f]=O+l[f-7]+x+l[f-16]}var y=a&t^~a&w,_=h&m^h&s^m&s,M=(h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>22),I=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),N=E+I+y+d[f]+l[f],G=M+_;E=w,w=t,t=a,a=r+N|0,r=s,s=m,m=h,h=N+G|0}o[0]=o[0]+h|0,o[1]=o[1]+m|0,o[2]=o[2]+s|0,o[3]=o[3]+r|0,o[4]=o[4]+a|0,o[5]=o[5]+t|0,o[6]=o[6]+w|0,o[7]=o[7]+E|0},_doFinalize:function(){var c=this._data,u=c.words,o=this._nDataBytes*8,h=c.sigBytes*8;return u[h>>>5]|=128<<24-h%32,u[(h+64>>>9<<4)+14]=g.floor(o/4294967296),u[(h+64>>>9<<4)+15]=o,c.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var c=v.clone.call(this);return c._hash=this._hash.clone(),c}});T.SHA256=v._createHelper(n),T.HmacSHA256=v._createHmacHelper(n)}(Math),L.SHA256})},lZu9:function(j,Y,D){(function(L){L(D("VrN/"),D("1eCo"),D("8EBN"))})(function(L){"use strict";L.defineMode("markdown",function(g,T){var P=L.getMode(g,"text/html"),p=P.name=="null";function v(U){if(L.findModeByName){var W=L.findModeByName(U);W&&(U=W.mime||W.mimes[0])}var X=L.getMode(g,U);return X.name=="null"?null:X}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.tokenTypeOverrides={});var S={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var b in S)S.hasOwnProperty(b)&&T.tokenTypeOverrides[b]&&(S[b]=T.tokenTypeOverrides[b]);var d=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,c=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,u=/^ {0,3}(?:\={1,}|-{2,})\s*$/,o=/^[^#!\[\]*_\\<>` "'(~:]+/,h=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,s=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,r=" ";function a(U,W,X){return W.f=W.inline=X,X(U,W)}function t(U,W,X){return W.f=W.block=X,X(U,W)}function w(U){return!U||!/\S/.test(U.string)}function E(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==k){var W=p;if(!W){var X=L.innerMode(P,U.htmlState);W=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}W&&(U.f=y,U.block=f,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function f(U,W){var X=U.column()===W.indentation,ne=w(W.prevLine.stream),fe=W.indentedCode,me=W.prevLine.hr,Ae=W.list!==!1,De=(W.listStack[W.listStack.length-1]||0)+3;W.indentedCode=!1;var ye=W.indentation;if(W.indentationDiff===null&&(W.indentationDiff=W.indentation,Ae)){for(W.list=null;ye=4&&(fe||W.prevLine.fencedCodeEnd||W.prevLine.header||ne))return U.skipToEnd(),W.indentedCode=!0,S.code;if(U.eatSpace())return null;if(X&&W.indentation<=De&&(ue=U.match(c))&&ue[1].length<=6)return W.quote=0,W.header=ue[1].length,W.thisLine.header=!0,T.highlightFormatting&&(W.formatting="header"),W.f=W.inline,C(W);if(W.indentation<=De&&U.eat(">"))return W.quote=X?1:W.quote+1,T.highlightFormatting&&(W.formatting="quote"),U.eatSpace(),C(W);if(!xe&&!W.setext&&X&&W.indentation<=De&&(ue=U.match(l))){var le=ue[1]?"ol":"ul";return W.indentation=ye+U.current().length,W.list=!0,W.quote=0,W.listStack.push(W.indentation),W.em=!1,W.strong=!1,W.code=!1,W.strikethrough=!1,T.taskLists&&U.match(n,!1)&&(W.taskList=!0),W.f=W.inline,T.highlightFormatting&&(W.formatting=["list","list-"+le]),C(W)}else{if(X&&W.indentation<=De&&(ue=U.match(h,!0)))return W.quote=0,W.fencedEndRE=new RegExp(ue[1]+"+ *$"),W.localMode=T.fencedCodeBlockHighlighting&&v(ue[2]||T.fencedCodeBlockDefaultMode),W.localMode&&(W.localState=L.startState(W.localMode)),W.f=W.block=O,T.highlightFormatting&&(W.formatting="code-block"),W.code=-1,C(W);if(W.setext||(!Oe||!Ae)&&!W.quote&&W.list===!1&&!W.code&&!xe&&!m.test(U.string)&&(ue=U.lookAhead(1))&&(ue=ue.match(u)))return W.setext?(W.header=W.setext,W.setext=0,U.skipToEnd(),T.highlightFormatting&&(W.formatting="header")):(W.header=ue[0].charAt(0)=="="?1:2,W.setext=W.header),W.thisLine.header=!0,W.f=W.inline,C(W);if(xe)return U.skipToEnd(),W.hr=!0,W.thisLine.hr=!0,S.hr;if(U.peek()==="[")return a(U,W,G)}return a(U,W,W.inline)}function k(U,W){var X=P.token(U,W.htmlState);if(!p){var ne=L.innerMode(P,W.htmlState);(ne.mode.name=="xml"&&ne.state.tagStart===null&&!ne.state.context&&ne.state.tokenize.isInText||W.md_inside&&U.current().indexOf(">")>-1)&&(W.f=y,W.block=f,W.htmlState=null)}return X}function O(U,W){var X=W.listStack[W.listStack.length-1]||0,ne=W.indentation=U.quote?W.push(S.formatting+"-"+U.formatting[X]+"-"+U.quote):W.push("error"))}if(U.taskOpen)return W.push("meta"),W.length?W.join(" "):null;if(U.taskClosed)return W.push("property"),W.length?W.join(" "):null;if(U.linkHref?W.push(S.linkHref,"url"):(U.strong&&W.push(S.strong),U.em&&W.push(S.em),U.strikethrough&&W.push(S.strikethrough),U.emoji&&W.push(S.emoji),U.linkText&&W.push(S.linkText),U.code&&W.push(S.code),U.image&&W.push(S.image),U.imageAltText&&W.push(S.imageAltText,"link"),U.imageMarker&&W.push(S.imageMarker)),U.header&&W.push(S.header,S.header+"-"+U.header),U.quote&&(W.push(S.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?W.push(S.quote+"-"+U.quote):W.push(S.quote+"-"+T.maxBlockquoteDepth)),U.list!==!1){var ne=(U.listStack.length-1)%3;ne?ne===1?W.push(S.list2):W.push(S.list3):W.push(S.list1)}return U.trailingSpaceNewLine?W.push("trailing-space-new-line"):U.trailingSpace&&W.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),W.length?W.join(" "):null}function x(U,W){return U.match(o,!0)?C(W):void 0}function y(U,W){var X=W.text(U,W);if(typeof X!="undefined")return X;if(W.list)return W.list=null,C(W);if(W.taskList){var ne=U.match(n,!0)[1]===" ";return ne?W.taskOpen=!0:W.taskClosed=!0,T.highlightFormatting&&(W.formatting="task"),W.taskList=!1,C(W)}if(W.taskOpen=!1,W.taskClosed=!1,W.header&&U.match(/^#+$/,!0))return T.highlightFormatting&&(W.formatting="header"),C(W);var fe=U.next();if(W.linkTitle){W.linkTitle=!1;var me=fe;fe==="("&&(me=")"),me=(me+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ae="^\\s*(?:[^"+me+"\\\\]+|\\\\\\\\|\\\\.)"+me;if(U.match(new RegExp(Ae),!0))return S.linkHref}if(fe==="`"){var De=W.formatting;T.highlightFormatting&&(W.formatting="code"),U.eatWhile("`");var ye=U.current().length;if(W.code==0&&(!W.quote||ye==1))return W.code=ye,C(W);if(ye==W.code){var Oe=C(W);return W.code=0,Oe}else return W.formatting=De,C(W)}else if(W.code)return C(W);if(fe==="\\"&&(U.next(),T.highlightFormatting)){var xe=C(W),ue=S.formatting+"-escape";return xe?xe+" "+ue:ue}if(fe==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return W.imageMarker=!0,W.image=!0,T.highlightFormatting&&(W.formatting="image"),C(W);if(fe==="["&&W.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return W.imageMarker=!1,W.imageAltText=!0,T.highlightFormatting&&(W.formatting="image"),C(W);if(fe==="]"&&W.imageAltText){T.highlightFormatting&&(W.formatting="image");var xe=C(W);return W.imageAltText=!1,W.image=!1,W.inline=W.f=M,xe}if(fe==="["&&!W.image)return W.linkText&&U.match(/^.*?\]/)||(W.linkText=!0,T.highlightFormatting&&(W.formatting="link")),C(W);if(fe==="]"&&W.linkText){T.highlightFormatting&&(W.formatting="link");var xe=C(W);return W.linkText=!1,W.inline=W.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:y,xe}if(fe==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,T.highlightFormatting&&(W.formatting="link");var xe=C(W);return xe?xe+=" ":xe="",xe+S.linkInline}if(fe==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,T.highlightFormatting&&(W.formatting="link");var xe=C(W);return xe?xe+=" ":xe="",xe+S.linkEmail}if(T.xml&&fe==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var le=U.string.indexOf(">",U.pos);if(le!=-1){var re=U.string.substring(U.start,le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(W.md_inside=!0)}return U.backUp(1),W.htmlState=L.startState(P),t(U,W,k)}if(T.xml&&fe==="<"&&U.match(/^\/\w*?>/))return W.md_inside=!1,"tag";if(fe==="*"||fe==="_"){for(var pe=1,ee=U.pos==1?" ":U.string.charAt(U.pos-2);pe<3&&U.eat(fe);)pe++;var te=U.peek()||" ",ce=!/\s/.test(te)&&(!s.test(te)||/\s/.test(ee)||s.test(ee)),q=!/\s/.test(ee)&&(!s.test(ee)||/\s/.test(te)||s.test(te)),Q=null,V=null;if(pe%2&&(!W.em&&ce&&(fe==="*"||!q||s.test(ee))?Q=!0:W.em==fe&&q&&(fe==="*"||!ce||s.test(te))&&(Q=!1)),pe>1&&(!W.strong&&ce&&(fe==="*"||!q||s.test(ee))?V=!0:W.strong==fe&&q&&(fe==="*"||!ce||s.test(te))&&(V=!1)),V!=null||Q!=null){T.highlightFormatting&&(W.formatting=Q==null?"strong":V==null?"em":"strong em"),Q===!0&&(W.em=fe),V===!0&&(W.strong=fe);var Oe=C(W);return Q===!1&&(W.em=!1),V===!1&&(W.strong=!1),Oe}}else if(fe===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return C(W);U.backUp(1)}if(T.strikethrough){if(fe==="~"&&U.eatWhile(fe)){if(W.strikethrough){T.highlightFormatting&&(W.formatting="strikethrough");var Oe=C(W);return W.strikethrough=!1,Oe}else if(U.match(/^[^\s]/,!1))return W.strikethrough=!0,T.highlightFormatting&&(W.formatting="strikethrough"),C(W)}else if(fe===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return C(W);U.backUp(2)}}if(T.emoji&&fe===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){W.emoji=!0,T.highlightFormatting&&(W.formatting="emoji");var Z=C(W);return W.emoji=!1,Z}return fe===" "&&(U.match(/^ +$/,!1)?W.trailingSpace++:W.trailingSpace&&(W.trailingSpaceNewLine=!0)),C(W)}function _(U,W){var X=U.next();if(X===">"){W.f=W.inline=y,T.highlightFormatting&&(W.formatting="link");var ne=C(W);return ne?ne+=" ":ne="",ne+S.linkInline}return U.match(/^[^>]+/,!0),S.linkInline}function M(U,W){if(U.eatSpace())return null;var X=U.next();return X==="("||X==="["?(W.f=W.inline=N(X==="("?")":"]"),T.highlightFormatting&&(W.formatting="link-string"),W.linkHref=!0,C(W)):"error"}var I={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function N(U){return function(W,X){var ne=W.next();if(ne===U){X.f=X.inline=y,T.highlightFormatting&&(X.formatting="link-string");var fe=C(X);return X.linkHref=!1,fe}return W.match(I[U]),X.linkHref=!0,C(X)}}function G(U,W){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(W.f=H,U.next(),T.highlightFormatting&&(W.formatting="link"),W.linkText=!0,C(W)):a(U,W,y)}function H(U,W){if(U.match(/^\]:/,!0)){W.f=W.inline=B,T.highlightFormatting&&(W.formatting="link");var X=C(W);return W.linkText=!1,X}return U.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function B(U,W){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?W.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),W.f=W.inline=y,S.linkHref+" url")}var K={startState:function(){return{f,prevLine:{stream:null},thisLine:{stream:null},block:f,htmlState:null,indentation:0,inline:y,text:x,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&L.copyState(P,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?L.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,W){if(W.formatting=!1,U!=W.thisLine.stream){if(W.header=0,W.hr=!1,U.match(/^\s*$/,!0))return E(W),null;if(W.prevLine=W.thisLine,W.thisLine={stream:U},W.taskList=!1,W.trailingSpace=0,W.trailingSpaceNewLine=!1,!W.localState&&(W.f=W.block,W.f!=k)){var X=U.match(/^\s*/,!0)[0].replace(/\t/g,r).length;if(W.indentation=X,W.indentationDiff=null,X>0)return null}}return W.f(U,W)},innerMode:function(U){return U.block==k?{state:U.htmlState,mode:P}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:K}},indent:function(U,W,X){return U.block==k&&P.indent?P.indent(U.htmlState,W,X):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,W,X):L.Pass},blankLine:E,getType:C,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return K},"xml"),L.defineMIME("text/markdown","markdown"),L.defineMIME("text/x-markdown","markdown")})},mOS8:function(j,Y,D){j.exports=D.p+"static/403Qrcode.6c17b6f4.png"},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(j){if(!0)module.exports=j();else var Y})(function(){var define,module,exports;return function(){function j(Y,D,L){function g(p,v){if(!D[p]){if(!Y[p]){var S=typeof require=="function"&&require;if(!v&&S)return require(p,!0);if(T)return T(p,!0);var b=new Error("Cannot find module '"+p+"'");throw b.code="MODULE_NOT_FOUND",b}var d=D[p]={exports:{}};Y[p][0].call(d.exports,function(l){var n=Y[p][1][l];return g(n||l)},d,d.exports,j,Y,D,L)}return D[p].exports}for(var T=typeof require=="function"&&require,P=0;P0&&u(M).to(N),G=this._divideParts(x,y),H=G.length,B=!1,K=function(Oe,xe){var ue=this;return new p.default(function(re,pe){var ee,te,ce,q;return S.default.async(function(V){for(;;)switch(V.prev=V.next){case 0:if(V.prev=0,Oe.isCancel()){V.next=18;break}return ee=G[xe-1],te={stream:Oe._createStream(C,ee.start,ee.end),size:ee.end-ee.start},V.next=6,S.default.awrap(Oe._uploadPart(I,_,xe,te));case 6:if(ce=V.sent,!(!Oe.isCancel()&&!B)){V.next=15;break}if(f.doneParts.push({number:xe,etag:ce.res.headers.etag}),!k.progress){V.next=12;break}return V.next=12,S.default.awrap(k.progress(M.length/H,f,ce.res));case 12:re({number:xe,etag:ce.res.headers.etag}),V.next=16;break;case 15:re();case 16:V.next=19;break;case 18:re();case 19:V.next=30;break;case 21:V.prev=21,V.t0=V.catch(0),q=new Error,q.name=V.t0.name,q.message=V.t0.message,q.stack=V.t0.stack,q.partNum=xe,u(V.t0).to(q),pe(q);case 30:case"end":return V.stop()}},null,ue,[[0,21]])})},U=(0,T.default)(new Array(H),function(ye,Oe){return Oe+1}),W=N.map(function(ye){return ye.number}),X=U.filter(function(ye){return W.indexOf(ye)<0}),ne=5,fe=k.parallel||ne,De.next=17,S.default.awrap(this._parallel(X,fe,function(ye){return new p.default(function(Oe,xe){K(O,ye).then(function(ue){ue&&N.push(ue),Oe()}).catch(function(ue){xe(ue)})})}));case 17:if(me=De.sent,B=!0,!this.isCancel()){De.next=22;break}throw K=null,this._makeCancelEvent();case 22:if(!(me&&me.length>0)){De.next=25;break}throw me[0].message="Failed to upload some parts with error: "+me[0].toString()+" part_num: "+me[0].partNum,me[0];case 25:return De.next=27,S.default.awrap(this.completeMultipartUpload(I,_,N,k));case 27:return De.abrupt("return",De.sent);case 28:case"end":return De.stop()}},null,this)},r._getFileSize=function(f){return S.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!d.buffer(f)){O.next=4;break}return O.abrupt("return",f.length);case 4:if(!(h(f)||s(f))){O.next=6;break}return O.abrupt("return",f.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var a=j("stream"),t=a.Readable;function w(E,f){if(!(this instanceof w))return new w(E,f);t.call(this,f),this.file=E,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}l.inherits(w,t),w.prototype.readFileAndPush=function(f){if(this.fileBuffer)for(var k=!0;k&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:C,this.start=C,k=this.push(this.fileBuffer.slice(O,C))}},w.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 k=16*1024;f=f||k;var O=this;this.reader.onload=function(x){O.fileBuffer=L.from(new Uint8Array(x.target.result)),O.file=null,O.readFileAndPush(f)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(f)},r._createStream=function(f,k,O){if(h(f)||s(f))return new w(f.slice(k,O));throw new Error("_createStream requires File/Blob.")},r._getPartSize=function(f,k){var O=10*1e3,C=1024*1024;return k?Math.max(Math.ceil(f/O),k):C},r._divideParts=function(f,k){for(var O=Math.ceil(f/k),C=[],x=0;x255)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");w(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(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(d){return d&&d.__esModule?d:{default:d}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=j("../utils/obj2xml"),S=v.obj2xml,b=D;b.putBucketVersioning=function(l,n){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u,o,h;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:if(p(l),["Enabled","Suspended"].includes(n)){s.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return u=this._bucketRequestParams("PUT",l,"versioning",c),o={VersioningConfiguration:{Status:n}},u.mime="xml",u.content=S(o,{headers:!0}),s.next=9,g.default.awrap(this.request(u));case 9:return h=s.sent,s.abrupt("return",{res:h.res,status:h.status});case 11:case"end":return s.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(n){return n&&n.__esModule?n:{default:n}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=j("../utils/obj2xml"),S=v.obj2xml,b=j("../utils/isArray"),d=b.isArray,l=D;l.putBucketWebsite=function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments[2],h,m,s,r,a;return g.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:if(p(c),h=this._bucketRequestParams("PUT",c,"website",o),m={Suffix:u.index||"index.html"},s={IndexDocument:m},r={WebsiteConfiguration:s},u.supportSubDir&&(m.SupportSubDir=u.supportSubDir),u.type&&(m.Type=u.type),u.error&&(s.ErrorDocument={Key:u.error}),!(u.routingRules!==void 0)){w.next=12;break}if(d(u.routingRules)){w.next=11;break}throw new Error("RoutingRules must be Array");case 11:s.RoutingRules={RoutingRule:u.routingRules};case 12:return r=S(r),h.content=r,h.mime="xml",h.successStatuses=[200],w.next=18,g.default.awrap(this.request(h));case 18:return a=w.sent,w.abrupt("return",{res:a.res});case 20:case"end":return w.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/core-js/object/keys"),T=v(g),P=j("babel-runtime/core-js/json/stringify"),p=v(P);function v(S){return S&&S.__esModule?S:{default:S}}D.encodeCallback=function(b,d){if(b.headers=b.headers||{},!Object.prototype.hasOwnProperty.call(b.headers,"x-oss-callback")&&d.callback){var l={callbackUrl:encodeURI(d.callback.url),callbackBody:d.callback.body};d.callback.host&&(l.callbackHost=d.callback.host),d.callback.contentType&&(l.callbackBodyType=d.callback.contentType);var n=L.from((0,p.default)(l)).toString("base64");if(b.headers["x-oss-callback"]=n,d.callback.customValue){var c={};(0,T.default)(d.callback.customValue).forEach(function(u){c["x:"+u]=d.callback.customValue[u]}),b.headers["x-oss-callback-var"]=L.from((0,p.default)(c)).toString("base64")}}}}).call(this,j("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/assign"),g=T(L);function T(l){return l&&l.__esModule?l:{default:l}}var P=j("humanize-ms"),p=j("url"),v=j("../utils/checkBucketName"),S=v.checkBucketName;function b(l,n){var c=p.parse(l);if(c.protocol||(c=p.parse("http"+(n?"s":"")+"://"+l)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function d(l,n,c){var u=c?"https://":"http://",o=n?"-internal.aliyuncs.com":".aliyuncs.com",h="vpc100-oss-cn-";return l.substr(0,h.length)===h&&(o=".aliyuncs.com"),p.parse(u+l+o)}Y.exports=function(l){if(!l||!l.accessKeyId||!l.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");l.bucket&&S(l.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},l);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=P(n.timeout)),n.endpoint)n.endpoint=b(n.endpoint,n.secure);else if(n.region)n.endpoint=d(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(j,Y,D){"use strict";var L=j("merge-descriptors"),g=D;L(g,j("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(n){return n&&n.__esModule?n:{default:n}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=j("querystring"),S=j("js-base64"),b=S.Base64.encode,d=D;d.processObjectSave=function(c,u,o,h){var m,s,r,a;return g.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return l(c,"sourceObject"),l(u,"targetObject"),l(o,"process"),u=this._objectName(u),h&&p(h),m=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),s=h?",b_"+b(h):"",u=b(u),r={"x-oss-process":o+"|sys/saveas,o_"+u+s},m.content=v.stringify(r),w.next=12,g.default.awrap(this.request(m));case 12:return a=w.sent,w.abrupt("return",{res:a.res,status:a.res.status});case 14:case"end":return w.stop()}},null,this)};function l(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(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(d){return d&&d.__esModule?d:{default:d}}var P=j("copy-to"),p=j("./callback"),v=j("./utils/deepCopy"),S=v.deepCopy,b=D;b.listUploads=function(l,n){var c,u,o,h;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return n=n||{},c={},P(n).to(c),c.subres="uploads",u=this._objectRequestParams("GET","",c),u.query=l,u.xmlResponse=!0,u.successStatuses=[200],s.next=10,g.default.awrap(this.request(u));case 10:return o=s.sent,h=o.data.Upload||[],Array.isArray(h)||(h=[h]),h=h.map(function(r){return{name:r.Key,uploadId:r.UploadId,initiated:r.Initiated}}),s.abrupt("return",{res:o.res,uploads:h,bucket:o.data.Bucket,nextKeyMarker:o.data.NextKeyMarker,nextUploadIdMarker:o.data.NextUploadIdMarker,isTruncated:o.data.IsTruncated==="true"});case 15:case"end":return s.stop()}},null,this)},b.listParts=function(l,n,c,u){var o,h,m;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return u=u||{},o={},P(u).to(o),o.subres={uploadId:n},h=this._objectRequestParams("GET",l,o),h.query=c,h.xmlResponse=!0,h.successStatuses=[200],r.next=10,g.default.awrap(this.request(h));case 10:return m=r.sent,r.abrupt("return",{res:m.res,uploadId:m.data.UploadId,bucket:m.data.Bucket,name:m.data.Key,partNumberMarker:m.data.PartNumberMarker,nextPartNumberMarker:m.data.NextPartNumberMarker,maxParts:m.data.MaxParts,isTruncated:m.data.IsTruncated,parts:m.data.Part||[]});case 12:case"end":return r.stop()}},null,this)},b.abortMultipartUpload=function(l,n,c){var u,o,h;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return this._stop(),c=c||{},u={},P(c).to(u),u.subres={uploadId:n},o=this._objectRequestParams("DELETE",l,u),o.successStatuses=[204],s.next=9,g.default.awrap(this.request(o));case 9:return h=s.sent,s.abrupt("return",{res:h.res});case 11:case"end":return s.stop()}},null,this)},b.initMultipartUpload=function(l,n){var c,u,o;return g.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return n=n||{},c={},P(n).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(n.meta,c.headers),c.subres="uploads",u=this._objectRequestParams("POST",l,c),u.mime=n.mime,u.xmlResponse=!0,u.successStatuses=[200],m.next=12,g.default.awrap(this.request(u));case 12:return o=m.sent,m.abrupt("return",{res:o.res,bucket:o.data.Bucket,name:o.data.Key,uploadId:o.data.UploadId});case 14:case"end":return m.stop()}},null,this)},b.uploadPart=function(l,n,c,u,o,h,m){var s;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return s={stream:this._createStream(u,o,h),size:h-o},a.next=3,g.default.awrap(this._uploadPart(l,n,c,s,m));case 3:return a.abrupt("return",a.sent);case 4:case"end":return a.stop()}},null,this)},b.completeMultipartUpload=function(l,n,c,u){var o,h,m,s,r,a,t,w;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:for(o=c.concat().sort(function(k,O){return k.number-O.number}).filter(function(k,O,C){return!O||k.number!==C[O-1].number}),h=` `,m=0;m `,h+=""+s.number+` `,h+=""+s.etag+` `,h+=` `;return h+="",u=u||{},r={},r=S(u),r.headers&&delete r.headers["x-oss-server-side-encryption"],r.subres={uploadId:n},a=this._objectRequestParams("POST",l,r),p.encodeCallback(a,r),a.mime="xml",a.content=h,a.headers&&a.headers["x-oss-callback"]||(a.xmlResponse=!0),a.successStatuses=[200],f.next=17,g.default.awrap(this.request(a));case 17:return t=f.sent,w={res:t.res,bucket:a.bucket,name:l,etag:t.res.headers.etag},a.headers&&a.headers["x-oss-callback"]&&(w.data=JSON.parse(t.data.toString())),f.abrupt("return",w);case 21:case"end":return f.stop()}},null,this)},b._uploadPart=function(l,n,c,u,o){var h,m,s;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return o=o||{},h={},P(o).to(h),h.headers={"Content-Length":u.size},h.subres={partNumber:c,uploadId:n},m=this._objectRequestParams("PUT",l,h),m.mime=h.mime,m.stream=u.stream,m.successStatuses=[200],a.next=11,g.default.awrap(this.request(m));case 11:if(s=a.sent,s.res.headers.etag){a.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 u.stream=null,m.stream=null,a.abrupt("return",{name:l,etag:s.res.headers.etag,res:s.res});case 17:case"end":return a.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=S(L),T=j("babel-runtime/core-js/object/keys"),P=S(T),p=j("babel-runtime/helpers/typeof"),v=S(p);function S(n){return n&&n.__esModule?n:{default:n}}var b=j("../utils/checkBucketName"),d=b.checkBucketName,l=D;l.copy=function(c,u,o,h){var m,s,r;return g.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof o=="undefined"?"undefined":(0,v.default)(o))==="object"&&(h=o),h=h||{},h.headers=h.headers||{},(0,P.default)(h.headers).forEach(function(w){h.headers["x-oss-copy-source-"+w.toLowerCase()]=h.headers[w]}),h.meta&&(h.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(h.meta,h.headers),u=this._getSourceName(u,o),h.versionId&&(u=u+"?versionId="+h.versionId),h.headers["x-oss-copy-source"]=u,m=this._objectRequestParams("PUT",c,h),m.xmlResponse=!0,m.successStatuses=[200,304],t.next=14,g.default.awrap(this.request(m));case 14:return s=t.sent,r=s.data,r&&(r={etag:r.ETag,lastModified:r.LastModified}),t.abrupt("return",{data:r,res:s.res});case 18:case"end":return t.stop()}},null,this)},l._getSourceName=function(c,u){return typeof u=="string"?c=this._objectName(c):c[0]!=="/"?u=this.options.bucket:(u=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),d(u),c=encodeURI(c),c="/"+u+"/"+c,c}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.delete=function(b){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,n;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return d.subres=(0,P.default)({},d.subres),d.versionId&&(d.subres.versionId=d.versionId),l=this._objectRequestParams("DELETE",b,d),l.successStatuses=[204],u.next=6,g.default.awrap(this.request(l));case 6:return n=u.sent,u.abrupt("return",{res:n.res});case 8:case"end":return u.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(l){return l&&l.__esModule?l:{default:l}}var v=j("utility"),S=j("../utils/obj2xml"),b=S.obj2xml,d=D;d.deleteMulti=function(n){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,o,h,m,s,r,a,t,w,E,f,k;return g.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(u=[],!(!n||!n.length)){C.next=3;break}throw new Error("names is required");case 3:for(o=0;o1&&arguments[1]!==void 0?arguments[1]:{},l,n;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return d.subres=(0,P.default)({tagging:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),b=this._objectName(b),l=this._objectRequestParams("DELETE",b,d),l.successStatuses=[204],u.next=7,g.default.awrap(this.request(l));case 7:return n=u.sent,u.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return u.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(d){return d&&d.__esModule?d:{default:d}}var v=j("fs"),S=j("is-type-of"),b=D;b.get=function(l,n){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u,o,h,m;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return u=null,o=!1,S.writableStream(n)?u=n:S.string(n)?(u=v.createWriteStream(n),o=!0):c=n,c=c||{},c.subres=(0,P.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),h=void 0,r.prev=8,m=this._objectRequestParams("GET",l,c),m.writeStream=u,m.successStatuses=[200,206,304],r.next=14,g.default.awrap(this.request(m));case 14:h=r.sent,o&&u.destroy(),r.next=25;break;case 18:if(r.prev=18,r.t0=r.catch(8),!o){r.next=24;break}return u.destroy(),r.next=24,g.default.awrap(this._deleteFileSafe(n));case 24:throw r.t0;case 25:return r.abrupt("return",{res:h.res,content:h.data});case 26:case"end":return r.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.getACL=function(b){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,n;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return d.subres=(0,P.default)({acl:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),b=this._objectName(b),l=this._objectRequestParams("GET",b,d),l.successStatuses=[200],l.xmlResponse=!0,u.next=8,g.default.awrap(this.request(l));case 8:return n=u.sent,u.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 u.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=S(L),T=j("babel-runtime/regenerator"),P=S(T),p=j("babel-runtime/core-js/object/assign"),v=S(p);function S(m){return m&&m.__esModule?m:{default:m}}var b=D,d=j("../utils/isObject"),l=d.isObject,n=j("../utils/isArray"),c=n.isArray;b.getBucketVersions=u,b.listObjectVersions=u;function u(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,a,t,w,E,f;return P.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(m.versionIdMarker&&m.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return s.subres=(0,v.default)({versions:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),r=this._objectRequestParams("GET","",s),r.xmlResponse=!0,r.successStatuses=[200],r.query=h(m),O.next=10,P.default.awrap(this.request(r));case 10:return a=O.sent,t=a.data.Version||[],w=a.data.DeleteMarker||[],E=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(C){return{name:C.Key,url:E._objectUrl(C.Key),lastModified:C.LastModified,isLatest:C.IsLatest==="true",versionId:C.VersionId,etag:C.ETag,type:C.Type,size:Number(C.Size),storageClass:C.StorageClass,owner:{id:C.Owner.ID,displayName:C.Owner.DisplayName}}})),w&&(c(w)||(w=[w]),w=w.map(function(C){return{name:C.Key,lastModified:C.LastModified,versionId:C.VersionId,owner:{id:C.Owner.ID,displayName:C.Owner.DisplayName}}})),f=a.data.CommonPrefixes||null,f&&(c(f)||(f=[f]),f=f.map(function(C){return C.Prefix})),O.abrupt("return",{res:a.res,objects:t,deleteMarker:w,prefixes:f,nextMarker:a.data.NextMarker||null,NextVersionIdMarker:a.data.NextVersionIdMarker||null,isTruncated:a.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function o(m){return m.replace(/([A-Z])/g,"-$1").toLowerCase()}function h(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s={};return l(m)&&(0,g.default)(m).forEach(function(r){s[o(r)]=m[r]}),s}},{"../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(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.getObjectMeta=function(b,d){var l,n;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return d=d||{},b=this._objectName(b),d.subres=(0,P.default)({objectMeta:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),l=this._objectRequestParams("HEAD",b,d),l.successStatuses=[200],u.next=8,g.default.awrap(this.request(l));case 8:return n=u.sent,u.abrupt("return",{status:n.status,res:n.res});case 10:case"end":return u.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(d){return d&&d.__esModule?d:{default:d}}var v=D,S=j("../utils/isObject"),b=S.isObject;v.getObjectTagging=function(l){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,u,o,h,m;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return n.subres=(0,P.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),l=this._objectName(l),c=this._objectRequestParams("GET",l,n),c.successStatuses=[200],r.next=7,g.default.awrap(this.request(c));case 7:return u=r.sent,r.next=10,g.default.awrap(this.parseXML(u.data));case 10:return o=r.sent,h=o.TagSet.Tag,h=h&&b(h)?[h]:h||[],m={},h.forEach(function(a){m[a.Key]=a.Value}),r.abrupt("return",{status:u.status,res:u.res,tag:m});case 16:case"end":return r.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.getSymlink=function(b){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,n,c;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return d.subres=(0,P.default)({symlink:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),b=this._objectName(b),l=this._objectRequestParams("GET",b,d),l.successStatuses=[200],o.next=7,g.default.awrap(this.request(l));case 7:return n=o.sent,c=n.res.headers["x-oss-symlink-target"],o.abrupt("return",{targetName:decodeURIComponent(c),res:n.res});case 10:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=S(L),T=j("babel-runtime/core-js/object/keys"),P=S(T),p=j("babel-runtime/core-js/object/assign"),v=S(p);function S(d){return d&&d.__esModule?d:{default:d}}var b=D;b.head=function(l){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,u,o;return g.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return n.subres=(0,v.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),c=this._objectRequestParams("HEAD",l,n),c.successStatuses=[200,304],m.next=6,g.default.awrap(this.request(c));case 6:return u=m.sent,o={meta:null,res:u.res,status:u.status},u.status===200&&(0,P.default)(u.headers).forEach(function(s){s.indexOf("x-oss-meta-")===0&&(o.meta||(o.meta={}),o.meta[s.substring(11)]=u.headers[s])}),m.abrupt("return",o);case 10:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.putACL=function(b,d,l){var n,c;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return l=l||{},l.subres=(0,P.default)({acl:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.headers=l.headers||{},l.headers["x-oss-object-acl"]=d,b=this._objectName(b),n=this._objectRequestParams("PUT",b,l),n.successStatuses=[200],o.next=10,g.default.awrap(this.request(n));case 10:return c=o.sent,o.abrupt("return",{res:c.res});case 12:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=S(L),T=j("babel-runtime/core-js/object/keys"),P=S(T),p=j("babel-runtime/core-js/object/assign"),v=S(p);function S(u){return u&&u.__esModule?u:{default:u}}var b=j("../utils/obj2xml"),d=b.obj2xml,l=j("../utils/checkObjectTag"),n=l.checkObjectTag,c=D;c.putObjectTagging=function(o,h){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,r,a;return g.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return n(h),m.subres=(0,v.default)({tagging:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),o=this._objectName(o),s=this._objectRequestParams("PUT",o,m),s.successStatuses=[200],h=(0,P.default)(h).map(function(E){return{Key:E,Value:h[E]}}),r={Tagging:{TagSet:{Tag:h}}},s.mime="xml",s.content=d(r),w.next=12,g.default.awrap(this.request(s));case 12:return a=w.sent,w.abrupt("return",{res:a.res,status:a.status});case 14:case"end":return w.stop()}},null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.putSymlink=function(b,d,l){var n,c;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return l=l||{},l.headers=l.headers||{},d=this._escape(this._objectName(d)),this._convertMetaToHeaders(l.meta,l.headers),l.headers["x-oss-symlink-target"]=d,l.subres=(0,P.default)({symlink:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.storageClass&&(l.headers["x-oss-storage-class"]=l.storageClass),b=this._objectName(b),n=this._objectRequestParams("PUT",b,l),n.successStatuses=[200],o.next=13,g.default.awrap(this.request(n));case 13:return c=o.sent,o.abrupt("return",{res:c.res});case 15:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/promise"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v._parallelNode=function(b,d,l,n){var c,u,o,h,m,s,r,a;return g.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:c=this,u=[],o=[],h=b.length/d,m=b.length%d,s=m===0?h:(b.length-m)/d+1,r=1,a=0;case 8:if(!(a0){s=!0,r<=0&&c(u);return}r+=1,w(f.value,o(t))}a=!1}E()})},v.cancel=function(b){this.options.cancelFlag=!0,b&&this.abortMultipartUpload(b.name,b.uploadId,b.options)},v.isCancel=function(){return this.options.cancelFlag},v.resetCancelFlag=function(){this.options.cancelFlag=!1},v._stop=function(){this.options.cancelFlag=!0},v._makeCancelEvent=function(){var b={status:0,name:"cancel"};return b}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/core-js/json/stringify"),T=v(g),P=j("babel-runtime/core-js/object/keys"),p=v(P);function v(d){return d&&d.__esModule?d:{default:d}}var S=j("./../../shims/crypto/crypto.js"),b=j("is-type-of");D.buildCanonicalizedResource=function(l,n){var c=""+l,u="?";if(b.string(n)&&n.trim()!=="")c+=u+n;else if(b.array(n))n.sort(),c+=u+n.join("&");else if(n){var o=function(s,r){return s[0]>r[0]?1:s[0]1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],u=arguments[3],o={},h=n.subResource,m=h===void 0?{}:h;if(n.process){var s="x-oss-process";m[s]=n.process}if(n.trafficLimit){var r="x-oss-traffic-limit";m[r]=n.trafficLimit}if(n.response&&(0,p.default)(n.response).forEach(function(E){var f="response-"+E.toLowerCase();m[f]=n.response[E]}),(0,p.default)(n).forEach(function(E){var f=E.toLowerCase(),k=n[E];f.indexOf("x-oss-")===0?o[f]=k:(f.indexOf("content-md5")===0||f.indexOf("content-type")===0)&&(o[E]=k)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(m["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var a={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(a.callbackHost=n.callback.host),n.callback.contentType&&(a.callbackBodyType=n.callback.contentType),m.callback=L.from((0,T.default)(a)).toString("base64"),n.callback.customValue){var t={};(0,p.default)(n.callback.customValue).forEach(function(E){t["x:"+E]=n.callback.customValue[E]}),m["callback-var"]=L.from((0,T.default)(t)).toString("base64")}}var w=this.buildCanonicalString(n.method,c,{headers:o,parameters:m},u.toString());return{Signature:this.computeSignature(l,w),subResource:m}}}).call(this,j("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(j,Y,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkBucketName=void 0,D.checkBucketName=function(L,g){var T=g?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!T.test(L))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/entries"),g=T(L);function T(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(D,"__esModule",{value:!0}),D.checkObjectTag=void 0;var P=j("./checkValid"),p=P.checkValid,v=j("./isObject"),S=v.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 (/)"}],d={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 l(n){if(!S(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 u=["key","value"];c.forEach(function(o){o.forEach(function(h,m){p(h,d[u[m]])})})}D.checkObjectTag=l},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(j,Y,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkValid=void 0;function L(g,T){T.forEach(function(P){if(P.validator)P.validator(g);else if(P.pattern&&!P.pattern.test(g))throw new Error(P.msg)})}D.checkValid=L},{}],38:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/core-js/object/assign"),T=P(g);function P(o){return o&&o.__esModule?o:{default:o}}Object.defineProperty(D,"__esModule",{value:!0}),D.createRequest=void 0;var p=j("./../../../shims/crypto/crypto.js"),v=j("debug")("ali-oss"),S=j("mime"),b=j("dateformat"),d=j("copy-to"),l=j("path");function n(o,h){return o[h]||o[h.toLowerCase()]}function c(o,h){delete o[h],delete o[h.toLowerCase()]}function u(o){var h=new Date;this.options.amendTimeSkewed&&(h=+new Date+this.options.amendTimeSkewed);var m={"x-oss-date":b(h,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(m["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,T.default)(m,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(m["x-oss-security-token"]=this.options.stsToken),d(o.headers).to(m),n(m,"Content-Type")||(o.mime&&o.mime.indexOf("/")>0?m["Content-Type"]=o.mime:m["Content-Type"]=S.getType(o.mime||l.extname(o.object||""))),n(m,"Content-Type")||c(m,"Content-Type"),o.content&&(m["Content-Md5"]=p.createHash("md5").update(L.from(o.content,"utf8")).digest("base64"),m["Content-Length"]||(m["Content-Length"]=o.content.length));var s=this._getResource(o);m.authorization=this.authorization(o.method,s,o.subres,m);var r=this._getReqUrl(o);v("request %s %s, with headers %j, !!stream: %s",o.method,r,m,!!o.stream);var a=o.timeout||this.options.timeout,t={method:o.method,content:o.content,stream:o.stream,headers:m,timeout:a,writeStream:o.writeStream,customResponse:o.customResponse,ctx:o.ctx||this.ctx};return this.agent&&(t.agent=this.agent),this.httpsAgent&&(t.httpsAgent=this.httpsAgent),{url:r,params:t}}D.createRequest=u}).call(this,j("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(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=p(L),T=j("babel-runtime/helpers/typeof"),P=p(T);function p(v){return v&&v.__esModule?v:{default:v}}Object.defineProperty(D,"__esModule",{value:!0}),D.deepCopy=void 0,D.deepCopy=function(v){if(v===null||(typeof v=="undefined"?"undefined":(0,P.default)(v))!=="object")return v;var S=Array.isArray(v)?[]:{};return(0,g.default)(v).forEach(function(b){S[b]=D.deepCopy(v[b])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=p(L),T=j("babel-runtime/helpers/typeof"),P=p(T);function p(b){return b&&b.__esModule?b:{default:b}}Object.defineProperty(D,"__esModule",{value:!0}),D.formatObjKey=void 0;function v(b,d){if(b===null||(typeof b=="undefined"?"undefined":(0,P.default)(b))!=="object")return b;var l=void 0;if(Array.isArray(b)){l=[];for(var n=0;n `),b&&b.firstUpperCase&&(S=P.formatObjKey(S,"firstUpperCase")),p(S)==="object"?(0,g.default)(S).forEach(function(l){p(S[l])==="string"||p(S[l])==="number"?d+="<"+l+">"+S[l]+"":p(S[l])==="object"?d+="<"+l+">"+v(S[l])+"":p(S[l])==="array"?d+=S[l].map(function(n){return"<"+l+">"+v(n)+""}).join(""):d+="<"+l+">"+S[l].toString()+""}):d+=S.toString(),d}D.obj2xml=v},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(j,Y,D){Y.exports=L,Y.exports.HttpsAgent=L;function L(){}},{}],49:[function(j,Y,D){Y.exports=j("./register")().Promise},{"./register":51}],50:[function(j,Y,D){"use strict";var L="@@any-promise/REGISTRATION",g=null;Y.exports=function(T,P){return function(v,S){v=v||null,S=S||{};var b=S.global!==!1;if(g===null&&b&&(g=T[L]||null),g!==null&&v!==null&&g.implementation!==v)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&&(v!==null&&typeof S.Promise!="undefined"?g={Promise:S.Promise,implementation:v}:g=P(v),b&&(T[L]=g)),g}}},{}],51:[function(j,Y,D){"use strict";Y.exports=j("./loader")(window,L);function L(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(j,Y,D){"use strict";D.__esModule=!0;var L=j("../core-js/symbol/iterator"),g=v(L),T=j("../core-js/symbol"),P=v(T),p=typeof P.default=="function"&&typeof g.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof P.default=="function"&&S.constructor===P.default&&S!==P.default.prototype?"symbol":typeof S};function v(S){return S&&S.__esModule?S:{default:S}}D.default=typeof P.default=="function"&&p(g.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":p(S)}:function(S){return S&&typeof P.default=="function"&&S.constructor===P.default&&S!==P.default.prototype?"symbol":typeof S=="undefined"?"undefined":p(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(j,Y,D){Y.exports=j("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(j,Y,D){"use strict";D.byteLength=b,D.toByteArray=l,D.fromByteArray=u;for(var L=[],g=[],T=typeof Uint8Array!="undefined"?Uint8Array:Array,P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,v=P.length;p0)throw new Error("Invalid string. Length must be a multiple of 4");var m=o.indexOf("=");m===-1&&(m=h);var s=m===h?0:4-m%4;return[m,s]}function b(o){var h=S(o),m=h[0],s=h[1];return(m+s)*3/4-s}function d(o,h,m){return(h+m)*3/4-m}function l(o){var h,m=S(o),s=m[0],r=m[1],a=new T(d(o,s,r)),t=0,w=r>0?s-4:s,E;for(E=0;E>16&255,a[t++]=h>>8&255,a[t++]=h&255;return r===2&&(h=g[o.charCodeAt(E)]<<2|g[o.charCodeAt(E+1)]>>4,a[t++]=h&255),r===1&&(h=g[o.charCodeAt(E)]<<10|g[o.charCodeAt(E+1)]<<4|g[o.charCodeAt(E+2)]>>2,a[t++]=h>>8&255,a[t++]=h&255),a}function n(o){return L[o>>18&63]+L[o>>12&63]+L[o>>6&63]+L[o&63]}function c(o,h,m){for(var s,r=[],a=h;aw?w:t+a));return s===1?(h=o[m-1],r.push(L[h>>2]+L[h<<4&63]+"==")):s===2&&(h=(o[m-2]<<8)+o[m-1],r.push(L[h>>10]+L[h>>4&63]+L[h<<2&63]+"=")),r.join("")}},{}],70:[function(j,Y,D){/*! * Bowser - a browser detector * https://github.com/ded/bowser * MIT License | (c) Dustin Diaz 2015 */!function(L,g,T){typeof Y!="undefined"&&Y.exports?Y.exports=T():typeof define=="function"&&define.amd?define(g,T):L[g]=T()}(this,"bowser",function(){var L=!0;function g(d){function l(K){var U=d.match(K);return U&&U.length>1&&U[1]||""}function n(K){var U=d.match(K);return U&&U.length>1&&U[2]||""}var c=l(/(ipod|iphone|ipad)/i).toLowerCase(),u=/like android/i.test(d),o=!u&&/android/i.test(d),h=/nexus\s*[0-6]\s*/i.test(d),m=!h&&/nexus\s*[0-9]+/i.test(d),s=/CrOS/.test(d),r=/silk/i.test(d),a=/sailfish/i.test(d),t=/tizen/i.test(d),w=/(web|hpw)(o|0)s/i.test(d),E=/windows phone/i.test(d),f=/SamsungBrowser/i.test(d),k=!E&&/windows/i.test(d),O=!c&&!r&&/macintosh/i.test(d),C=!o&&!a&&!t&&!w&&/linux/i.test(d),x=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),y=l(/version\/(\d+(\.\d+)?)/i),_=/tablet/i.test(d)&&!/tablet pc/i.test(d),M=!_&&/[^-]mobi/i.test(d),I=/xbox/i.test(d),N;/opera/i.test(d)?N={name:"Opera",opera:L,version:y||l(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(d)?N={name:"Opera",opera:L,version:l(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||y}:/SamsungBrowser/i.test(d)?N={name:"Samsung Internet for Android",samsungBrowser:L,version:y||l(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(d)?N={name:"NAVER Whale browser",whale:L,version:l(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(d)?N={name:"MZ Browser",mzbrowser:L,version:l(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(d)?N={name:"Opera Coast",coast:L,version:y||l(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(d)?N={name:"Focus",focus:L,version:l(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(d)?N={name:"Yandex Browser",yandexbrowser:L,version:y||l(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(d)?N={name:"UC Browser",ucbrowser:L,version:l(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(d)?N={name:"Maxthon",maxthon:L,version:l(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(d)?N={name:"Epiphany",epiphany:L,version:l(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(d)?N={name:"Puffin",puffin:L,version:l(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(d)?N={name:"Sleipnir",sleipnir:L,version:l(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(d)?N={name:"K-Meleon",kMeleon:L,version:l(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:E?(N={name:"Windows Phone",osname:"Windows Phone",windowsphone:L},x?(N.msedge=L,N.version=x):(N.msie=L,N.version=l(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(d)?N={name:"Internet Explorer",msie:L,version:l(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:s?N={name:"Chrome",osname:"Chrome OS",chromeos:L,chromeBook:L,chrome:L,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(d)?N={name:"Microsoft Edge",msedge:L,version:x}:/vivaldi/i.test(d)?N={name:"Vivaldi",vivaldi:L,version:l(/vivaldi\/(\d+(\.\d+)?)/i)||y}:a?N={name:"Sailfish",osname:"Sailfish OS",sailfish:L,version:l(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(d)?N={name:"SeaMonkey",seamonkey:L,version:l(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(d)?(N={name:"Firefox",firefox:L,version:l(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(d)&&(N.firefoxos=L,N.osname="Firefox OS")):r?N={name:"Amazon Silk",silk:L,version:l(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(d)?N={name:"PhantomJS",phantom:L,version:l(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(d)?N={name:"SlimerJS",slimer:L,version:l(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(d)||/rim\stablet/i.test(d)?N={name:"BlackBerry",osname:"BlackBerry OS",blackberry:L,version:y||l(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:w?(N={name:"WebOS",osname:"WebOS",webos:L,version:y||l(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(d)&&(N.touchpad=L)):/bada/i.test(d)?N={name:"Bada",osname:"Bada",bada:L,version:l(/dolfin\/(\d+(\.\d+)?)/i)}:t?N={name:"Tizen",osname:"Tizen",tizen:L,version:l(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||y}:/qupzilla/i.test(d)?N={name:"QupZilla",qupzilla:L,version:l(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||y}:/chromium/i.test(d)?N={name:"Chromium",chromium:L,version:l(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||y}:/chrome|crios|crmo/i.test(d)?N={name:"Chrome",chrome:L,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:o?N={name:"Android",version:y}:/safari|applewebkit/i.test(d)?(N={name:"Safari",safari:L},y&&(N.version=y)):c?(N={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},y&&(N.version=y)):/googlebot/i.test(d)?N={name:"Googlebot",googlebot:L,version:l(/googlebot\/(\d+(\.\d+))/i)||y}:N={name:l(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!N.msedge&&/(apple)?webkit/i.test(d)?(/(apple)?webkit\/537\.36/i.test(d)?(N.name=N.name||"Blink",N.blink=L):(N.name=N.name||"Webkit",N.webkit=L),!N.version&&y&&(N.version=y)):!N.opera&&/gecko\//i.test(d)&&(N.name=N.name||"Gecko",N.gecko=L,N.version=N.version||l(/gecko\/(\d+(\.\d+)?)/i)),!N.windowsphone&&(o||N.silk)?(N.android=L,N.osname="Android"):!N.windowsphone&&c?(N[c]=L,N.ios=L,N.osname="iOS"):O?(N.mac=L,N.osname="macOS"):I?(N.xbox=L,N.osname="Xbox"):k?(N.windows=L,N.osname="Windows"):C&&(N.linux=L,N.osname="Linux");function G(K){switch(K){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var H="";N.windows?H=G(l(/Windows ((NT|XP)( \d\d?.\d)?)/i)):N.windowsphone?H=l(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):N.mac?(H=l(/Mac OS X (\d+([_\.\s]\d+)*)/i),H=H.replace(/[_\s]/g,".")):c?(H=l(/os (\d+([_\s]\d+)*) like mac os x/i),H=H.replace(/[_\s]/g,".")):o?H=l(/android[ \/-](\d+(\.\d+)*)/i):N.webos?H=l(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):N.blackberry?H=l(/rim\stablet\sos\s(\d+(\.\d+)*)/i):N.bada?H=l(/bada\/(\d+(\.\d+)*)/i):N.tizen&&(H=l(/tizen[\/\s](\d+(\.\d+)*)/i)),H&&(N.osversion=H);var B=!N.windows&&H.split(".")[0];return _||m||c=="ipad"||o&&(B==3||B>=4&&!M)||N.silk?N.tablet=L:(M||c=="iphone"||c=="ipod"||o||h||N.blackberry||N.webos||N.bada)&&(N.mobile=L),N.msedge||N.msie&&N.version>=10||N.yandexbrowser&&N.version>=15||N.vivaldi&&N.version>=1||N.chrome&&N.version>=20||N.samsungBrowser&&N.version>=4||N.whale&&v([N.version,"1.0"])===1||N.mzbrowser&&v([N.version,"6.0"])===1||N.focus&&v([N.version,"1.0"])===1||N.firefox&&N.version>=20||N.safari&&N.version>=6||N.opera&&N.version>=10||N.ios&&N.osversion&&N.osversion.split(".")[0]>=6||N.blackberry&&N.version>=10.1||N.chromium&&N.version>=20?N.a=L:N.msie&&N.version<10||N.chrome&&N.version<20||N.firefox&&N.version<20||N.safari&&N.version<6||N.opera&&N.version<10||N.ios&&N.osversion&&N.osversion.split(".")[0]<6||N.chromium&&N.version<20?N.c=L:N.x=L,N}var T=g(typeof navigator!="undefined"&&navigator.userAgent||"");T.test=function(d){for(var l=0;l=0;){if(n[0][l]>n[1][l])return 1;if(n[0][l]===n[1][l]){if(l===0)return 0}else return-1}}function S(d,l,n){var c=T;typeof l=="string"&&(n=l,l=void 0),l===void 0&&(l=!1),n&&(c=g(n));var u=""+c.version;for(var o in d)if(d.hasOwnProperty(o)&&c[o]){if(typeof d[o]!="string")throw new Error("Browser version in the minVersion map should be a string: "+o+": "+String(d));return v([u,d[o]])<0}return l}function b(d,l,n){return!S(d,l,n)}return T.isUnsupportedBrowser=S,T.compareVersions=v,T.check=b,T._detect=g,T.detect=g,T})},{}],71:[function(j,Y,D){},{}],72:[function(j,Y,D){var L=j("buffer").Buffer,g=L.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 T(b){if(b&&!g(b))throw new Error("Unknown encoding: "+b)}var P=D.StringDecoder=function(b){this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,""),T(b);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=v;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=S;break;default:this.write=p;return}this.charBuffer=new L(6),this.charReceived=0,this.charLength=0};P.prototype.write=function(b){for(var d="";this.charLength;){var l=b.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;if(b.copy(this.charBuffer,this.charReceived,0,l),this.charReceived+=l,this.charReceived=55296&&c<=56319){this.charLength+=this.surrogateSize,d="";continue}if(this.charReceived=this.charLength=0,b.length===0)return d;break}this.detectIncompleteChar(b);var n=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,n),n-=this.charReceived),d+=b.toString(this.encoding,0,n);var n=d.length-1,c=d.charCodeAt(n);if(c>=55296&&c<=56319){var u=this.surrogateSize;return this.charLength+=u,this.charReceived+=u,this.charBuffer.copy(this.charBuffer,u,0,u),b.copy(this.charBuffer,0,0,u),d.substring(0,n)}return d},P.prototype.detectIncompleteChar=function(b){for(var d=b.length>=3?3:b.length;d>0;d--){var l=b[b.length-d];if(d==1&&l>>5==6){this.charLength=2;break}if(d<=2&&l>>4==14){this.charLength=3;break}if(d<=3&&l>>3==30){this.charLength=4;break}}this.charReceived=d},P.prototype.end=function(b){var d="";if(b&&b.length&&(d=this.write(b)),this.charReceived){var l=this.charReceived,n=this.charBuffer,c=this.encoding;d+=n.slice(0,l).toString(c)}return d};function p(b){return b.toString(this.encoding)}function v(b){this.charReceived=b.length%2,this.charLength=this.charReceived?2:0}function S(b){this.charReceived=b.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(j,Y,D){(function(L,g){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */"use strict";var T=j("base64-js"),P=j("ieee754"),p=j("isarray");D.Buffer=g,D.SlowBuffer=r,D.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=L.TYPED_ARRAY_SUPPORT!==void 0?L.TYPED_ARRAY_SUPPORT:v(),D.kMaxLength=S();function v(){try{var q=new Uint8Array(1);return q.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},q.foo()===42&&typeof q.subarray=="function"&&q.subarray(1,1).byteLength===0}catch(Q){return!1}}function S(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(q,Q){if(S()=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return q|0}function r(q){return+q!=q&&(q=0),g.alloc(+q)}g.isBuffer=function(Q){return!!(Q!=null&&Q._isBuffer)},g.compare=function(Q,V){if(!g.isBuffer(Q)||!g.isBuffer(V))throw new TypeError("Arguments must be Buffers");if(Q===V)return 0;for(var Z=Q.length,be=V.length,ge=0,Te=Math.min(Z,be);ge>>1;case"base64":return ee(q).length;default:if(Z)return le(q).length;Q=(""+Q).toLowerCase(),Z=!0}}g.byteLength=a;function t(q,Q,V){var Z=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length)return"";if((V===void 0||V>this.length)&&(V=this.length),V<=0)return"";if(V>>>=0,Q>>>=0,V<=Q)return"";for(q||(q="utf8");;)switch(q){case"hex":return K(this,Q,V);case"utf8":case"utf-8":return I(this,Q,V);case"ascii":return H(this,Q,V);case"latin1":case"binary":return B(this,Q,V);case"base64":return M(this,Q,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,Q,V);default:if(Z)throw new TypeError("Unknown encoding: "+q);q=(q+"").toLowerCase(),Z=!0}}g.prototype._isBuffer=!0;function w(q,Q,V){var Z=q[Q];q[Q]=q[V],q[V]=Z}g.prototype.swap16=function(){var Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var V=0;V0&&(Q=this.toString("hex",0,V).match(/.{2}/g).join(" "),this.length>V&&(Q+=" ... ")),""},g.prototype.compare=function(Q,V,Z,be,ge){if(!g.isBuffer(Q))throw new TypeError("Argument must be a Buffer");if(V===void 0&&(V=0),Z===void 0&&(Z=Q?Q.length:0),be===void 0&&(be=0),ge===void 0&&(ge=this.length),V<0||Z>Q.length||be<0||ge>this.length)throw new RangeError("out of range index");if(be>=ge&&V>=Z)return 0;if(be>=ge)return-1;if(V>=Z)return 1;if(V>>>=0,Z>>>=0,be>>>=0,ge>>>=0,this===Q)return 0;for(var Te=ge-be,Je=Z-V,rt=Math.min(Te,Je),nt=this.slice(be,ge),at=Q.slice(V,Z),ct=0;ct2147483647?V=2147483647:V<-2147483648&&(V=-2147483648),V=+V,isNaN(V)&&(V=be?0:q.length-1),V<0&&(V=q.length+V),V>=q.length){if(be)return-1;V=q.length-1}else if(V<0)if(be)V=0;else return-1;if(typeof Q=="string"&&(Q=g.from(Q,Z)),g.isBuffer(Q))return Q.length===0?-1:f(q,Q,V,Z,be);if(typeof Q=="number")return Q=Q&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?be?Uint8Array.prototype.indexOf.call(q,Q,V):Uint8Array.prototype.lastIndexOf.call(q,Q,V):f(q,[Q],V,Z,be);throw new TypeError("val must be string, number or Buffer")}function f(q,Q,V,Z,be){var ge=1,Te=q.length,Je=Q.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(q.length<2||Q.length<2)return-1;ge=2,Te/=2,Je/=2,V/=2}function rt(He,Re){return ge===1?He[Re]:He.readUInt16BE(Re*ge)}var nt;if(be){var at=-1;for(nt=V;ntTe&&(V=Te-Je),nt=V;nt>=0;nt--){for(var ct=!0,ht=0;htbe&&(Z=be)):Z=be;var ge=Q.length;if(ge%2!==0)throw new TypeError("Invalid hex string");Z>ge/2&&(Z=ge/2);for(var Te=0;Tege)&&(Z=ge),Q.length>0&&(Z<0||V<0)||V>this.length)throw new RangeError("Attempt to write outside buffer bounds");be||(be="utf8");for(var Te=!1;;)switch(be){case"hex":return k(this,Q,V,Z);case"utf8":case"utf-8":return O(this,Q,V,Z);case"ascii":return C(this,Q,V,Z);case"latin1":case"binary":return x(this,Q,V,Z);case"base64":return y(this,Q,V,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,Q,V,Z);default:if(Te)throw new TypeError("Unknown encoding: "+be);be=(""+be).toLowerCase(),Te=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(q,Q,V){return Q===0&&V===q.length?T.fromByteArray(q):T.fromByteArray(q.slice(Q,V))}function I(q,Q,V){V=Math.min(q.length,V);for(var Z=[],be=Q;be239?4:ge>223?3:ge>191?2:1;if(be+Je<=V){var rt,nt,at,ct;switch(Je){case 1:ge<128&&(Te=ge);break;case 2:rt=q[be+1],(rt&192)===128&&(ct=(ge&31)<<6|rt&63,ct>127&&(Te=ct));break;case 3:rt=q[be+1],nt=q[be+2],(rt&192)===128&&(nt&192)===128&&(ct=(ge&15)<<12|(rt&63)<<6|nt&63,ct>2047&&(ct<55296||ct>57343)&&(Te=ct));break;case 4:rt=q[be+1],nt=q[be+2],at=q[be+3],(rt&192)===128&&(nt&192)===128&&(at&192)===128&&(ct=(ge&15)<<18|(rt&63)<<12|(nt&63)<<6|at&63,ct>65535&&ct<1114112&&(Te=ct))}}Te===null?(Te=65533,Je=1):Te>65535&&(Te-=65536,Z.push(Te>>>10&1023|55296),Te=56320|Te&1023),Z.push(Te),be+=Je}return G(Z)}var N=4096;function G(q){var Q=q.length;if(Q<=N)return String.fromCharCode.apply(String,q);for(var V="",Z=0;ZZ)&&(V=Z);for(var be="",ge=Q;geZ&&(Q=Z),V<0?(V+=Z,V<0&&(V=0)):V>Z&&(V=Z),VV)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(Q,V,Z){Q=Q|0,V=V|0,Z||W(Q,V,this.length);for(var be=this[Q],ge=1,Te=0;++Te0&&(ge*=256);)be+=this[Q+--V]*ge;return be},g.prototype.readUInt8=function(Q,V){return V||W(Q,1,this.length),this[Q]},g.prototype.readUInt16LE=function(Q,V){return V||W(Q,2,this.length),this[Q]|this[Q+1]<<8},g.prototype.readUInt16BE=function(Q,V){return V||W(Q,2,this.length),this[Q]<<8|this[Q+1]},g.prototype.readUInt32LE=function(Q,V){return V||W(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},g.prototype.readUInt32BE=function(Q,V){return V||W(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},g.prototype.readIntLE=function(Q,V,Z){Q=Q|0,V=V|0,Z||W(Q,V,this.length);for(var be=this[Q],ge=1,Te=0;++Te=ge&&(be-=Math.pow(2,8*V)),be},g.prototype.readIntBE=function(Q,V,Z){Q=Q|0,V=V|0,Z||W(Q,V,this.length);for(var be=V,ge=1,Te=this[Q+--be];be>0&&(ge*=256);)Te+=this[Q+--be]*ge;return ge*=128,Te>=ge&&(Te-=Math.pow(2,8*V)),Te},g.prototype.readInt8=function(Q,V){return V||W(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},g.prototype.readInt16LE=function(Q,V){V||W(Q,2,this.length);var Z=this[Q]|this[Q+1]<<8;return Z&32768?Z|4294901760:Z},g.prototype.readInt16BE=function(Q,V){V||W(Q,2,this.length);var Z=this[Q+1]|this[Q]<<8;return Z&32768?Z|4294901760:Z},g.prototype.readInt32LE=function(Q,V){return V||W(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},g.prototype.readInt32BE=function(Q,V){return V||W(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},g.prototype.readFloatLE=function(Q,V){return V||W(Q,4,this.length),P.read(this,Q,!0,23,4)},g.prototype.readFloatBE=function(Q,V){return V||W(Q,4,this.length),P.read(this,Q,!1,23,4)},g.prototype.readDoubleLE=function(Q,V){return V||W(Q,8,this.length),P.read(this,Q,!0,52,8)},g.prototype.readDoubleBE=function(Q,V){return V||W(Q,8,this.length),P.read(this,Q,!1,52,8)};function X(q,Q,V,Z,be,ge){if(!g.isBuffer(q))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>be||Qq.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(Q,V,Z,be){if(Q=+Q,V=V|0,Z=Z|0,!be){var ge=Math.pow(2,8*Z)-1;X(this,Q,V,Z,ge,0)}var Te=1,Je=0;for(this[V]=Q&255;++Je=0&&(Je*=256);)this[V+Te]=Q/Je&255;return V+Z},g.prototype.writeUInt8=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,1,255,0),g.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),this[V]=Q&255,V+1};function ne(q,Q,V,Z){Q<0&&(Q=65535+Q+1);for(var be=0,ge=Math.min(q.length-V,2);be>>(Z?be:1-be)*8}g.prototype.writeUInt16LE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[V]=Q&255,this[V+1]=Q>>>8):ne(this,Q,V,!0),V+2},g.prototype.writeUInt16BE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[V]=Q>>>8,this[V+1]=Q&255):ne(this,Q,V,!1),V+2};function fe(q,Q,V,Z){Q<0&&(Q=4294967295+Q+1);for(var be=0,ge=Math.min(q.length-V,4);be>>(Z?be:3-be)*8&255}g.prototype.writeUInt32LE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[V+3]=Q>>>24,this[V+2]=Q>>>16,this[V+1]=Q>>>8,this[V]=Q&255):fe(this,Q,V,!0),V+4},g.prototype.writeUInt32BE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[V]=Q>>>24,this[V+1]=Q>>>16,this[V+2]=Q>>>8,this[V+3]=Q&255):fe(this,Q,V,!1),V+4},g.prototype.writeIntLE=function(Q,V,Z,be){if(Q=+Q,V=V|0,!be){var ge=Math.pow(2,8*Z-1);X(this,Q,V,Z,ge-1,-ge)}var Te=0,Je=1,rt=0;for(this[V]=Q&255;++Te>0)-rt&255;return V+Z},g.prototype.writeIntBE=function(Q,V,Z,be){if(Q=+Q,V=V|0,!be){var ge=Math.pow(2,8*Z-1);X(this,Q,V,Z,ge-1,-ge)}var Te=Z-1,Je=1,rt=0;for(this[V+Te]=Q&255;--Te>=0&&(Je*=256);)Q<0&&rt===0&&this[V+Te+1]!==0&&(rt=1),this[V+Te]=(Q/Je>>0)-rt&255;return V+Z},g.prototype.writeInt8=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,1,127,-128),g.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),Q<0&&(Q=255+Q+1),this[V]=Q&255,V+1},g.prototype.writeInt16LE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[V]=Q&255,this[V+1]=Q>>>8):ne(this,Q,V,!0),V+2},g.prototype.writeInt16BE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[V]=Q>>>8,this[V+1]=Q&255):ne(this,Q,V,!1),V+2},g.prototype.writeInt32LE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[V]=Q&255,this[V+1]=Q>>>8,this[V+2]=Q>>>16,this[V+3]=Q>>>24):fe(this,Q,V,!0),V+4},g.prototype.writeInt32BE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),g.TYPED_ARRAY_SUPPORT?(this[V]=Q>>>24,this[V+1]=Q>>>16,this[V+2]=Q>>>8,this[V+3]=Q&255):fe(this,Q,V,!1),V+4};function me(q,Q,V,Z,be,ge){if(V+Z>q.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("Index out of range")}function Ae(q,Q,V,Z,be){return be||me(q,Q,V,4,34028234663852886e22,-34028234663852886e22),P.write(q,Q,V,Z,23,4),V+4}g.prototype.writeFloatLE=function(Q,V,Z){return Ae(this,Q,V,!0,Z)},g.prototype.writeFloatBE=function(Q,V,Z){return Ae(this,Q,V,!1,Z)};function De(q,Q,V,Z,be){return be||me(q,Q,V,8,17976931348623157e292,-17976931348623157e292),P.write(q,Q,V,Z,52,8),V+8}g.prototype.writeDoubleLE=function(Q,V,Z){return De(this,Q,V,!0,Z)},g.prototype.writeDoubleBE=function(Q,V,Z){return De(this,Q,V,!1,Z)},g.prototype.copy=function(Q,V,Z,be){if(Z||(Z=0),!be&&be!==0&&(be=this.length),V>=Q.length&&(V=Q.length),V||(V=0),be>0&&be=this.length)throw new RangeError("sourceStart out of bounds");if(be<0)throw new RangeError("sourceEnd out of bounds");be>this.length&&(be=this.length),Q.length-V=0;--Te)Q[Te+V]=this[Te+Z];else if(ge<1e3||!g.TYPED_ARRAY_SUPPORT)for(Te=0;Te>>0,Z=Z===void 0?this.length:Z>>>0,Q||(Q=0);var Te;if(typeof Q=="number")for(Te=V;Te55295&&V<57344){if(!be){if(V>56319){(Q-=3)>-1&&ge.push(239,191,189);continue}else if(Te+1===Z){(Q-=3)>-1&&ge.push(239,191,189);continue}be=V;continue}if(V<56320){(Q-=3)>-1&&ge.push(239,191,189),be=V;continue}V=(be-55296<<10|V-56320)+65536}else be&&((Q-=3)>-1&&ge.push(239,191,189));if(be=null,V<128){if((Q-=1)<0)break;ge.push(V)}else if(V<2048){if((Q-=2)<0)break;ge.push(V>>6|192,V&63|128)}else if(V<65536){if((Q-=3)<0)break;ge.push(V>>12|224,V>>6&63|128,V&63|128)}else if(V<1114112){if((Q-=4)<0)break;ge.push(V>>18|240,V>>12&63|128,V>>6&63|128,V&63|128)}else throw new Error("Invalid code point")}return ge}function re(q){for(var Q=[],V=0;V>8,be=V%256,ge.push(be),ge.push(Z);return ge}function ee(q){return T.toByteArray(Oe(q))}function te(q,Q,V,Z){for(var be=0;be=Q.length||be>=q.length);++be)Q[be+V]=q[be];return be}function ce(q){return q!==q}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(j,Y,D){Y.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(j,Y,D){Y.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(j,Y,D){/*! * copy-to - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var L=Array.prototype.slice;Y.exports=g;function g(P,p){if(!(this instanceof g))return new g(P,p);this.src=P,this._withAccess=p}g.prototype.withAccess=function(P){return this._withAccess=P!==!1,this},g.prototype.pick=function(P){return Array.isArray(P)||(P=L.call(arguments)),P.length&&(this.keys=P),this},g.prototype.to=function(P){if(P=P||{},!this.src)return P;var p=this.keys||Object.keys(this.src);if(!this._withAccess){for(var v=0;vl;)if(n=b[l++],n!=n)return!0}else for(;d>l;l++)if((P||l in b)&&b[l]===v)return P||l||0;return!P&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(j,Y,D){var L=j("./_cof"),g=j("./_wks")("toStringTag"),T=L(function(){return arguments}())=="Arguments",P=function(p,v){try{return p[v]}catch(S){}};Y.exports=function(p){var v,S,b;return p===void 0?"Undefined":p===null?"Null":typeof(S=P(v=Object(p),g))=="string"?S:T?L(v):(b=L(v))=="Object"&&typeof v.callee=="function"?"Arguments":b}},{"./_cof":98,"./_wks":166}],98:[function(j,Y,D){var L={}.toString;Y.exports=function(g){return L.call(g).slice(8,-1)}},{}],99:[function(j,Y,D){var L=Y.exports={version:"2.6.11"};typeof __e=="number"&&(__e=L)},{}],100:[function(j,Y,D){"use strict";var L=j("./_object-dp"),g=j("./_property-desc");Y.exports=function(T,P,p){P in T?L.f(T,P,g(0,p)):T[P]=p}},{"./_object-dp":132,"./_property-desc":146}],101:[function(j,Y,D){var L=j("./_a-function");Y.exports=function(g,T,P){if(L(g),T===void 0)return g;switch(P){case 1:return function(p){return g.call(T,p)};case 2:return function(p,v){return g.call(T,p,v)};case 3:return function(p,v,S){return g.call(T,p,v,S)}}return function(){return g.apply(T,arguments)}}},{"./_a-function":92}],102:[function(j,Y,D){Y.exports=function(L){if(L==null)throw TypeError("Can't call method on "+L);return L}},{}],103:[function(j,Y,D){Y.exports=!j("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(j,Y,D){var L=j("./_is-object"),g=j("./_global").document,T=L(g)&&L(g.createElement);Y.exports=function(P){return T?g.createElement(P):{}}},{"./_global":110,"./_is-object":119}],105:[function(j,Y,D){Y.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(j,Y,D){var L=j("./_object-keys"),g=j("./_object-gops"),T=j("./_object-pie");Y.exports=function(P){var p=L(P),v=g.f;if(v)for(var S=v(P),b=T.f,d=0,l;S.length>d;)b.call(P,l=S[d++])&&p.push(l);return p}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(j,Y,D){var L=j("./_global"),g=j("./_core"),T=j("./_ctx"),P=j("./_hide"),p=j("./_has"),v="prototype",S=function(b,d,l){var n=b&S.F,c=b&S.G,u=b&S.S,o=b&S.P,h=b&S.B,m=b&S.W,s=c?g:g[d]||(g[d]={}),r=s[v],a=c?L:u?L[d]:(L[d]||{})[v],t,w,E;c&&(l=d);for(t in l){if(w=!n&&a&&a[t]!==void 0,w&&p(s,t))continue;E=w?a[t]:l[t],s[t]=c&&typeof a[t]!="function"?l[t]:h&&w?T(E,L):m&&a[t]==E?function(f){var k=function(O,C,x){if(this instanceof f){switch(arguments.length){case 0:return new f;case 1:return new f(O);case 2:return new f(O,C)}return new f(O,C,x)}return f.apply(this,arguments)};return k[v]=f[v],k}(E):o&&typeof E=="function"?T(Function.call,E):E,o&&((s.virtual||(s.virtual={}))[t]=E,b&S.R&&r&&!r[t]&&P(r,t,E))}};S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,Y.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(j,Y,D){Y.exports=function(L){try{return!!L()}catch(g){return!0}}},{}],109:[function(j,Y,D){var L=j("./_ctx"),g=j("./_iter-call"),T=j("./_is-array-iter"),P=j("./_an-object"),p=j("./_to-length"),v=j("./core.get-iterator-method"),S={},b={},D=Y.exports=function(d,l,n,c,u){var o=u?function(){return d}:v(d),h=L(n,c,l?2:1),m=0,s,r,a,t;if(typeof o!="function")throw TypeError(d+" is not iterable!");if(T(o)){for(s=p(d.length);s>m;m++)if(t=l?h(P(r=d[m])[0],r[1]):h(d[m]),t===S||t===b)return t}else for(a=o.call(d);!(r=a.next()).done;)if(t=g(a,h,r.value,l),t===S||t===b)return t};D.BREAK=S,D.RETURN=b},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(j,Y,D){var L=Y.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=L)},{}],111:[function(j,Y,D){var L={}.hasOwnProperty;Y.exports=function(g,T){return L.call(g,T)}},{}],112:[function(j,Y,D){var L=j("./_object-dp"),g=j("./_property-desc");Y.exports=j("./_descriptors")?function(T,P,p){return L.f(T,P,g(1,p))}:function(T,P,p){return T[P]=p,T}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(j,Y,D){var L=j("./_global").document;Y.exports=L&&L.documentElement},{"./_global":110}],114:[function(j,Y,D){Y.exports=!j("./_descriptors")&&!j("./_fails")(function(){return Object.defineProperty(j("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(j,Y,D){Y.exports=function(L,g,T){var P=T===void 0;switch(g.length){case 0:return P?L():L.call(T);case 1:return P?L(g[0]):L.call(T,g[0]);case 2:return P?L(g[0],g[1]):L.call(T,g[0],g[1]);case 3:return P?L(g[0],g[1],g[2]):L.call(T,g[0],g[1],g[2]);case 4:return P?L(g[0],g[1],g[2],g[3]):L.call(T,g[0],g[1],g[2],g[3])}return L.apply(T,g)}},{}],116:[function(j,Y,D){var L=j("./_cof");Y.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return L(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(j,Y,D){var L=j("./_iterators"),g=j("./_wks")("iterator"),T=Array.prototype;Y.exports=function(P){return P!==void 0&&(L.Array===P||T[g]===P)}},{"./_iterators":125,"./_wks":166}],118:[function(j,Y,D){var L=j("./_cof");Y.exports=Array.isArray||function(T){return L(T)=="Array"}},{"./_cof":98}],119:[function(j,Y,D){Y.exports=function(L){return typeof L=="object"?L!==null:typeof L=="function"}},{}],120:[function(j,Y,D){var L=j("./_an-object");Y.exports=function(g,T,P,p){try{return p?T(L(P)[0],P[1]):T(P)}catch(S){var v=g.return;throw v!==void 0&&L(v.call(g)),S}}},{"./_an-object":95}],121:[function(j,Y,D){"use strict";var L=j("./_object-create"),g=j("./_property-desc"),T=j("./_set-to-string-tag"),P={};j("./_hide")(P,j("./_wks")("iterator"),function(){return this}),Y.exports=function(p,v,S){p.prototype=L(P,{next:g(1,S)}),T(p,v+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(j,Y,D){"use strict";var L=j("./_library"),g=j("./_export"),T=j("./_redefine"),P=j("./_hide"),p=j("./_iterators"),v=j("./_iter-create"),S=j("./_set-to-string-tag"),b=j("./_object-gpo"),d=j("./_wks")("iterator"),l=!([].keys&&"next"in[].keys()),n="@@iterator",c="keys",u="values",o=function(){return this};Y.exports=function(h,m,s,r,a,t,w){v(s,m,r);var E=function(H){if(!l&&H in C)return C[H];switch(H){case c:return function(){return new s(this,H)};case u:return function(){return new s(this,H)}}return function(){return new s(this,H)}},f=m+" Iterator",k=a==u,O=!1,C=h.prototype,x=C[d]||C[n]||a&&C[a],y=x||E(a),_=a?k?E("entries"):y:void 0,M=m=="Array"&&C.entries||x,I,N,G;if(M&&(G=b(M.call(new h)),G!==Object.prototype&&G.next&&(S(G,f,!0),!L&&typeof G[d]!="function"&&P(G,d,o))),k&&x&&x.name!==u&&(O=!0,y=function(){return x.call(this)}),(!L||w)&&(l||O||!C[d])&&P(C,d,y),p[m]=y,p[f]=o,a)if(I={values:k?y:E(u),keys:t?y:E(c),entries:_},w)for(N in I)N in C||T(C,N,I[N]);else g(g.P+g.F*(l||O),m,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(j,Y,D){var L=j("./_wks")("iterator"),g=!1;try{var T=[7][L]();T.return=function(){g=!0},Array.from(T,function(){throw 2})}catch(P){}Y.exports=function(P,p){if(!p&&!g)return!1;var v=!1;try{var S=[7],b=S[L]();b.next=function(){return{done:v=!0}},S[L]=function(){return b},P(S)}catch(d){}return v}},{"./_wks":166}],124:[function(j,Y,D){Y.exports=function(L,g){return{value:g,done:!!L}}},{}],125:[function(j,Y,D){Y.exports={}},{}],126:[function(j,Y,D){Y.exports=!0},{}],127:[function(j,Y,D){var L=j("./_uid")("meta"),g=j("./_is-object"),T=j("./_has"),P=j("./_object-dp").f,p=0,v=Object.isExtensible||function(){return!0},S=!j("./_fails")(function(){return v(Object.preventExtensions({}))}),b=function(u){P(u,L,{value:{i:"O"+ ++p,w:{}}})},d=function(u,o){if(!g(u))return typeof u=="symbol"?u:(typeof u=="string"?"S":"P")+u;if(!T(u,L)){if(!v(u))return"F";if(!o)return"E";b(u)}return u[L].i},l=function(u,o){if(!T(u,L)){if(!v(u))return!0;if(!o)return!1;b(u)}return u[L].w},n=function(u){return S&&c.NEED&&v(u)&&!T(u,L)&&b(u),u},c=Y.exports={KEY:L,NEED:!1,fastKey:d,getWeak:l,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(j,Y,D){var L=j("./_global"),g=j("./_task").set,T=L.MutationObserver||L.WebKitMutationObserver,P=L.process,p=L.Promise,v=j("./_cof")(P)=="process";Y.exports=function(){var S,b,d,l=function(){var o,h;for(v&&(o=P.domain)&&o.exit();S;){h=S.fn,S=S.next;try{h()}catch(m){throw S?d():b=void 0,m}}b=void 0,o&&o.enter()};if(v)d=function(){P.nextTick(l)};else if(T&&!(L.navigator&&L.navigator.standalone)){var n=!0,c=document.createTextNode("");new T(l).observe(c,{characterData:!0}),d=function(){c.data=n=!n}}else if(p&&p.resolve){var u=p.resolve(void 0);d=function(){u.then(l)}}else d=function(){g.call(L,l)};return function(o){var h={fn:o,next:void 0};b&&(b.next=h),S||(S=h,d()),b=h}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(j,Y,D){"use strict";var L=j("./_a-function");function g(T){var P,p;this.promise=new T(function(v,S){if(P!==void 0||p!==void 0)throw TypeError("Bad Promise constructor");P=v,p=S}),this.resolve=L(P),this.reject=L(p)}Y.exports.f=function(T){return new g(T)}},{"./_a-function":92}],130:[function(j,Y,D){"use strict";var L=j("./_descriptors"),g=j("./_object-keys"),T=j("./_object-gops"),P=j("./_object-pie"),p=j("./_to-object"),v=j("./_iobject"),S=Object.assign;Y.exports=!S||j("./_fails")(function(){var b={},d={},l=Symbol(),n="abcdefghijklmnopqrst";return b[l]=7,n.split("").forEach(function(c){d[c]=c}),S({},b)[l]!=7||Object.keys(S({},d)).join("")!=n})?function(d,l){for(var n=p(d),c=arguments.length,u=1,o=T.f,h=P.f;c>u;)for(var m=v(arguments[u++]),s=o?g(m).concat(o(m)):g(m),r=s.length,a=0,t;r>a;)t=s[a++],(!L||h.call(m,t))&&(n[t]=m[t]);return n}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(j,Y,D){var L=j("./_an-object"),g=j("./_object-dps"),T=j("./_enum-bug-keys"),P=j("./_shared-key")("IE_PROTO"),p=function(){},v="prototype",S=function(){var b=j("./_dom-create")("iframe"),d=T.length,l="<",n=">",c;for(b.style.display="none",j("./_html").appendChild(b),b.src="javascript:",c=b.contentWindow.document,c.open(),c.write(l+"script"+n+"document.F=Object"+l+"/script"+n),c.close(),S=c.F;d--;)delete S[v][T[d]];return S()};Y.exports=Object.create||function(d,l){var n;return d!==null?(p[v]=L(d),n=new p,p[v]=null,n[P]=d):n=S(),l===void 0?n:g(n,l)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(j,Y,D){var L=j("./_an-object"),g=j("./_ie8-dom-define"),T=j("./_to-primitive"),P=Object.defineProperty;D.f=j("./_descriptors")?Object.defineProperty:function(v,S,b){if(L(v),S=T(S,!0),L(b),g)try{return P(v,S,b)}catch(d){}if("get"in b||"set"in b)throw TypeError("Accessors not supported!");return"value"in b&&(v[S]=b.value),v}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(j,Y,D){var L=j("./_object-dp"),g=j("./_an-object"),T=j("./_object-keys");Y.exports=j("./_descriptors")?Object.defineProperties:function(p,v){g(p);for(var S=T(v),b=S.length,d=0,l;b>d;)L.f(p,l=S[d++],v[l]);return p}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(j,Y,D){var L=j("./_object-pie"),g=j("./_property-desc"),T=j("./_to-iobject"),P=j("./_to-primitive"),p=j("./_has"),v=j("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;D.f=j("./_descriptors")?S:function(d,l){if(d=T(d),l=P(l,!0),v)try{return S(d,l)}catch(n){}if(p(d,l))return g(!L.f.call(d,l),d[l])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(j,Y,D){var L=j("./_to-iobject"),g=j("./_object-gopn").f,T={}.toString,P=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],p=function(v){try{return g(v)}catch(S){return P.slice()}};Y.exports.f=function(S){return P&&T.call(S)=="[object Window]"?p(S):g(L(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(j,Y,D){var L=j("./_object-keys-internal"),g=j("./_enum-bug-keys").concat("length","prototype");D.f=Object.getOwnPropertyNames||function(P){return L(P,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(j,Y,D){D.f=Object.getOwnPropertySymbols},{}],138:[function(j,Y,D){var L=j("./_has"),g=j("./_to-object"),T=j("./_shared-key")("IE_PROTO"),P=Object.prototype;Y.exports=Object.getPrototypeOf||function(p){return p=g(p),L(p,T)?p[T]:typeof p.constructor=="function"&&p instanceof p.constructor?p.constructor.prototype:p instanceof Object?P:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(j,Y,D){var L=j("./_has"),g=j("./_to-iobject"),T=j("./_array-includes")(!1),P=j("./_shared-key")("IE_PROTO");Y.exports=function(p,v){var S=g(p),b=0,d=[],l;for(l in S)l!=P&&(L(S,l)&&d.push(l));for(;v.length>b;)L(S,l=v[b++])&&(~T(d,l)||d.push(l));return d}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(j,Y,D){var L=j("./_object-keys-internal"),g=j("./_enum-bug-keys");Y.exports=Object.keys||function(P){return L(P,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(j,Y,D){D.f={}.propertyIsEnumerable},{}],142:[function(j,Y,D){var L=j("./_export"),g=j("./_core"),T=j("./_fails");Y.exports=function(P,p){var v=(g.Object||{})[P]||Object[P],S={};S[P]=p(v),L(L.S+L.F*T(function(){v(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(j,Y,D){var L=j("./_descriptors"),g=j("./_object-keys"),T=j("./_to-iobject"),P=j("./_object-pie").f;Y.exports=function(p){return function(v){for(var S=T(v),b=g(S),d=b.length,l=0,n=[],c;d>l;)c=b[l++],(!L||P.call(S,c))&&n.push(p?[c,S[c]]:S[c]);return n}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(j,Y,D){Y.exports=function(L){try{return{e:!1,v:L()}}catch(g){return{e:!0,v:g}}}},{}],145:[function(j,Y,D){var L=j("./_an-object"),g=j("./_is-object"),T=j("./_new-promise-capability");Y.exports=function(P,p){if(L(P),g(p)&&p.constructor===P)return p;var v=T.f(P),S=v.resolve;return S(p),v.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(j,Y,D){Y.exports=function(L,g){return{enumerable:!(L&1),configurable:!(L&2),writable:!(L&4),value:g}}},{}],147:[function(j,Y,D){var L=j("./_hide");Y.exports=function(g,T,P){for(var p in T)P&&g[p]?g[p]=T[p]:L(g,p,T[p]);return g}},{"./_hide":112}],148:[function(j,Y,D){Y.exports=j("./_hide")},{"./_hide":112}],149:[function(j,Y,D){"use strict";var L=j("./_global"),g=j("./_core"),T=j("./_object-dp"),P=j("./_descriptors"),p=j("./_wks")("species");Y.exports=function(v){var S=typeof g[v]=="function"?g[v]:L[v];P&&S&&!S[p]&&T.f(S,p,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(j,Y,D){var L=j("./_object-dp").f,g=j("./_has"),T=j("./_wks")("toStringTag");Y.exports=function(P,p,v){P&&!g(P=v?P:P.prototype,T)&&L(P,T,{configurable:!0,value:p})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(j,Y,D){var L=j("./_shared")("keys"),g=j("./_uid");Y.exports=function(T){return L[T]||(L[T]=g(T))}},{"./_shared":152,"./_uid":162}],152:[function(j,Y,D){var L=j("./_core"),g=j("./_global"),T="__core-js_shared__",P=g[T]||(g[T]={});(Y.exports=function(p,v){return P[p]||(P[p]=v!==void 0?v:{})})("versions",[]).push({version:L.version,mode:j("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(j,Y,D){var L=j("./_an-object"),g=j("./_a-function"),T=j("./_wks")("species");Y.exports=function(P,p){var v=L(P).constructor,S;return v===void 0||(S=L(v)[T])==null?p:g(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(j,Y,D){var L=j("./_to-integer"),g=j("./_defined");Y.exports=function(T){return function(P,p){var v=String(g(P)),S=L(p),b=v.length,d,l;return S<0||S>=b?T?"":void 0:(d=v.charCodeAt(S),d<55296||d>56319||S+1===b||(l=v.charCodeAt(S+1))<56320||l>57343?T?v.charAt(S):d:T?v.slice(S,S+2):(d-55296<<10)+(l-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(j,Y,D){var L=j("./_ctx"),g=j("./_invoke"),T=j("./_html"),P=j("./_dom-create"),p=j("./_global"),v=p.process,S=p.setImmediate,b=p.clearImmediate,d=p.MessageChannel,l=p.Dispatch,n=0,c={},u="onreadystatechange",o,h,m,s=function(){var a=+this;if(c.hasOwnProperty(a)){var t=c[a];delete c[a],t()}},r=function(a){s.call(a.data)};(!S||!b)&&(S=function(t){for(var w=[],E=1;arguments.length>E;)w.push(arguments[E++]);return c[++n]=function(){g(typeof t=="function"?t:Function(t),w)},o(n),n},b=function(t){delete c[t]},j("./_cof")(v)=="process"?o=function(a){v.nextTick(L(s,a,1))}:l&&l.now?o=function(a){l.now(L(s,a,1))}:d?(h=new d,m=h.port2,h.port1.onmessage=r,o=L(m.postMessage,m,1)):p.addEventListener&&typeof postMessage=="function"&&!p.importScripts?(o=function(a){p.postMessage(a+"","*")},p.addEventListener("message",r,!1)):u in P("script")?o=function(a){T.appendChild(P("script"))[u]=function(){T.removeChild(this),s.call(a)}}:o=function(a){setTimeout(L(s,a,1),0)}),Y.exports={set:S,clear:b}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(j,Y,D){var L=j("./_to-integer"),g=Math.max,T=Math.min;Y.exports=function(P,p){return P=L(P),P<0?g(P+p,0):T(P,p)}},{"./_to-integer":157}],157:[function(j,Y,D){var L=Math.ceil,g=Math.floor;Y.exports=function(T){return isNaN(T=+T)?0:(T>0?g:L)(T)}},{}],158:[function(j,Y,D){var L=j("./_iobject"),g=j("./_defined");Y.exports=function(T){return L(g(T))}},{"./_defined":102,"./_iobject":116}],159:[function(j,Y,D){var L=j("./_to-integer"),g=Math.min;Y.exports=function(T){return T>0?g(L(T),9007199254740991):0}},{"./_to-integer":157}],160:[function(j,Y,D){var L=j("./_defined");Y.exports=function(g){return Object(L(g))}},{"./_defined":102}],161:[function(j,Y,D){var L=j("./_is-object");Y.exports=function(g,T){if(!L(g))return g;var P,p;if(T&&typeof(P=g.toString)=="function"&&!L(p=P.call(g)))return p;if(typeof(P=g.valueOf)=="function"&&!L(p=P.call(g)))return p;if(!T&&typeof(P=g.toString)=="function"&&!L(p=P.call(g)))return p;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(j,Y,D){var L=0,g=Math.random();Y.exports=function(T){return"Symbol(".concat(T===void 0?"":T,")_",(++L+g).toString(36))}},{}],163:[function(j,Y,D){var L=j("./_global"),g=L.navigator;Y.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(j,Y,D){var L=j("./_global"),g=j("./_core"),T=j("./_library"),P=j("./_wks-ext"),p=j("./_object-dp").f;Y.exports=function(v){var S=g.Symbol||(g.Symbol=T?{}:L.Symbol||{});v.charAt(0)!="_"&&!(v in S)&&p(S,v,{value:P.f(v)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(j,Y,D){D.f=j("./_wks")},{"./_wks":166}],166:[function(j,Y,D){var L=j("./_shared")("wks"),g=j("./_uid"),T=j("./_global").Symbol,P=typeof T=="function",p=Y.exports=function(v){return L[v]||(L[v]=P&&T[v]||(P?T:g)("Symbol."+v))};p.store=L},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(j,Y,D){var L=j("./_classof"),g=j("./_wks")("iterator"),T=j("./_iterators");Y.exports=j("./_core").getIteratorMethod=function(P){if(P!=null)return P[g]||P["@@iterator"]||T[L(P)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(j,Y,D){"use strict";var L=j("./_ctx"),g=j("./_export"),T=j("./_to-object"),P=j("./_iter-call"),p=j("./_is-array-iter"),v=j("./_to-length"),S=j("./_create-property"),b=j("./core.get-iterator-method");g(g.S+g.F*!j("./_iter-detect")(function(d){Array.from(d)}),"Array",{from:function(l){var n=T(l),c=typeof this=="function"?this:Array,u=arguments.length,o=u>1?arguments[1]:void 0,h=o!==void 0,m=0,s=b(n),r,a,t,w;if(h&&(o=L(o,u>2?arguments[2]:void 0,2)),s!=null&&!(c==Array&&p(s)))for(w=s.call(n),a=new c;!(t=w.next()).done;m++)S(a,m,h?P(w,o,[t.value,m],!0):t.value);else for(r=v(n.length),a=new c(r);r>m;m++)S(a,m,h?o(n[m],m):n[m]);return a.length=m,a}})},{"./_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(j,Y,D){"use strict";var L=j("./_add-to-unscopables"),g=j("./_iter-step"),T=j("./_iterators"),P=j("./_to-iobject");Y.exports=j("./_iter-define")(Array,"Array",function(p,v){this._t=P(p),this._i=0,this._k=v},function(){var p=this._t,v=this._k,S=this._i++;return!p||S>=p.length?(this._t=void 0,g(1)):v=="keys"?g(0,S):v=="values"?g(0,p[S]):g(0,[S,p[S]])},"values"),T.Arguments=T.Array,L("keys"),L("values"),L("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(j,Y,D){"use strict";var L=j("./_is-object"),g=j("./_object-gpo"),T=j("./_wks")("hasInstance"),P=Function.prototype;T in P||j("./_object-dp").f(P,T,{value:function(p){if(typeof this!="function"||!L(p))return!1;if(!L(this.prototype))return p instanceof this;for(;p=g(p);)if(this.prototype===p)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(j,Y,D){var L=j("./_export");L(L.S+L.F,"Object",{assign:j("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(j,Y,D){var L=j("./_export");L(L.S,"Object",{create:j("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(j,Y,D){var L=j("./_export");L(L.S+L.F*!j("./_descriptors"),"Object",{defineProperty:j("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(j,Y,D){j("./_object-sap")("getOwnPropertyNames",function(){return j("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(j,Y,D){var L=j("./_to-object"),g=j("./_object-gpo");j("./_object-sap")("getPrototypeOf",function(){return function(P){return g(L(P))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(j,Y,D){var L=j("./_to-object"),g=j("./_object-keys");j("./_object-sap")("keys",function(){return function(P){return g(L(P))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(j,Y,D){arguments[4][71][0].apply(D,arguments)},{dup:71}],178:[function(j,Y,D){"use strict";var L=j("./_library"),g=j("./_global"),T=j("./_ctx"),P=j("./_classof"),p=j("./_export"),v=j("./_is-object"),S=j("./_a-function"),b=j("./_an-instance"),d=j("./_for-of"),l=j("./_species-constructor"),n=j("./_task").set,c=j("./_microtask")(),u=j("./_new-promise-capability"),o=j("./_perform"),h=j("./_user-agent"),m=j("./_promise-resolve"),s="Promise",r=g.TypeError,a=g.process,t=a&&a.versions,w=t&&t.v8||"",E=g[s],f=P(a)=="process",k=function(){},O,C,x,y,_=C=u.f,M=!!function(){try{var W=E.resolve(1),X=(W.constructor={})[j("./_wks")("species")]=function(ne){ne(k,k)};return(f||typeof PromiseRejectionEvent=="function")&&W.then(k)instanceof X&&w.indexOf("6.6")!==0&&h.indexOf("Chrome/66")===-1}catch(ne){}}(),I=function(W){var X;return v(W)&&typeof(X=W.then)=="function"?X:!1},N=function(W,X){if(W._n)return;W._n=!0;var ne=W._c;c(function(){for(var fe=W._v,me=W._s==1,Ae=0,De=function(ye){var Oe=me?ye.ok:ye.fail,xe=ye.resolve,ue=ye.reject,le=ye.domain,re,pe,ee;try{Oe?(me||(W._h==2&&B(W),W._h=1),Oe===!0?re=fe:(le&&le.enter(),re=Oe(fe),le&&(le.exit(),ee=!0)),re===ye.promise?ue(r("Promise-chain cycle")):(pe=I(re))?pe.call(re,xe,ue):xe(re)):ue(fe)}catch(te){le&&!ee&&le.exit(),ue(te)}};ne.length>Ae;)De(ne[Ae++]);W._c=[],W._n=!1,X&&!W._h&&G(W)})},G=function(W){n.call(g,function(){var X=W._v,ne=H(W),fe,me,Ae;if(ne&&(fe=o(function(){f?a.emit("unhandledRejection",X,W):(me=g.onunhandledrejection)?me({promise:W,reason:X}):(Ae=g.console)&&Ae.error&&Ae.error("Unhandled promise rejection",X)}),W._h=f||H(W)?2:1),W._a=void 0,ne&&fe.e)throw fe.v})},H=function(W){return W._h!==1&&(W._a||W._c).length===0},B=function(W){n.call(g,function(){var X;f?a.emit("rejectionHandled",W):(X=g.onrejectionhandled)&&X({promise:W,reason:W._v})})},K=function(W){var X=this;if(X._d)return;X._d=!0,X=X._w||X,X._v=W,X._s=2,X._a||(X._a=X._c.slice()),N(X,!0)},U=function(W){var X=this,ne;if(X._d)return;X._d=!0,X=X._w||X;try{if(X===W)throw r("Promise can't be resolved itself");(ne=I(W))?c(function(){var fe={_w:X,_d:!1};try{ne.call(W,T(U,fe,1),T(K,fe,1))}catch(me){K.call(fe,me)}}):(X._v=W,X._s=1,N(X,!1))}catch(fe){K.call({_w:X,_d:!1},fe)}};M||(E=function(X){b(this,E,s,"_h"),S(X),O.call(this);try{X(T(U,this,1),T(K,this,1))}catch(ne){K.call(this,ne)}},O=function(X){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=j("./_redefine-all")(E.prototype,{then:function(X,ne){var fe=_(l(this,E));return fe.ok=typeof X=="function"?X:!0,fe.fail=typeof ne=="function"&&ne,fe.domain=f?a.domain:void 0,this._c.push(fe),this._a&&this._a.push(fe),this._s&&N(this,!1),fe.promise},catch:function(W){return this.then(void 0,W)}}),x=function(){var W=new O;this.promise=W,this.resolve=T(U,W,1),this.reject=T(K,W,1)},u.f=_=function(W){return W===E||W===y?new x(W):C(W)}),p(p.G+p.W+p.F*!M,{Promise:E}),j("./_set-to-string-tag")(E,s),j("./_set-species")(s),y=j("./_core")[s],p(p.S+p.F*!M,s,{reject:function(X){var ne=_(this),fe=ne.reject;return fe(X),ne.promise}}),p(p.S+p.F*(L||!M),s,{resolve:function(X){return m(L&&this===y?E:this,X)}}),p(p.S+p.F*!(M&&j("./_iter-detect")(function(W){E.all(W).catch(k)})),s,{all:function(X){var ne=this,fe=_(ne),me=fe.resolve,Ae=fe.reject,De=o(function(){var ye=[],Oe=0,xe=1;d(X,!1,function(ue){var le=Oe++,re=!1;ye.push(void 0),xe++,ne.resolve(ue).then(function(pe){if(re)return;re=!0,ye[le]=pe,--xe||me(ye)},Ae)}),--xe||me(ye)});return De.e&&Ae(De.v),fe.promise},race:function(X){var ne=this,fe=_(ne),me=fe.reject,Ae=o(function(){d(X,!1,function(De){ne.resolve(De).then(fe.resolve,me)})});return Ae.e&&me(Ae.v),fe.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(j,Y,D){var L=j("./_export"),g=j("./_to-absolute-index"),T=String.fromCharCode,P=String.fromCodePoint;L(L.S+L.F*(!!P&&P.length!=1),"String",{fromCodePoint:function(v){for(var S=[],b=arguments.length,d=0,l;b>d;){if(l=+arguments[d++],g(l,1114111)!==l)throw RangeError(l+" is not a valid code point");S.push(l<65536?T(l):T(((l-=65536)>>10)+55296,l%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(j,Y,D){"use strict";var L=j("./_string-at")(!0);j("./_iter-define")(String,"String",function(g){this._t=String(g),this._i=0},function(){var g=this._t,T=this._i,P;return T>=g.length?{value:void 0,done:!0}:(P=L(g,T),this._i+=P.length,{value:P,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(j,Y,D){"use strict";var L=j("./_global"),g=j("./_has"),T=j("./_descriptors"),P=j("./_export"),p=j("./_redefine"),v=j("./_meta").KEY,S=j("./_fails"),b=j("./_shared"),d=j("./_set-to-string-tag"),l=j("./_uid"),n=j("./_wks"),c=j("./_wks-ext"),u=j("./_wks-define"),o=j("./_enum-keys"),h=j("./_is-array"),m=j("./_an-object"),s=j("./_is-object"),r=j("./_to-object"),a=j("./_to-iobject"),t=j("./_to-primitive"),w=j("./_property-desc"),E=j("./_object-create"),f=j("./_object-gopn-ext"),k=j("./_object-gopd"),O=j("./_object-gops"),C=j("./_object-dp"),x=j("./_object-keys"),y=k.f,_=C.f,M=f.f,I=L.Symbol,N=L.JSON,G=N&&N.stringify,H="prototype",B=n("_hidden"),K=n("toPrimitive"),U={}.propertyIsEnumerable,W=b("symbol-registry"),X=b("symbols"),ne=b("op-symbols"),fe=Object[H],me=typeof I=="function"&&!!O.f,Ae=L.QObject,De=!Ae||!Ae[H]||!Ae[H].findChild,ye=T&&S(function(){return E(_({},"a",{get:function(){return _(this,"a",{value:7}).a}})).a!=7})?function(ge,Te,Je){var rt=y(fe,Te);rt&&delete fe[Te],_(ge,Te,Je),rt&&ge!==fe&&_(fe,Te,rt)}:_,Oe=function(ge){var Te=X[ge]=E(I[H]);return Te._k=ge,Te},xe=me&&typeof I.iterator=="symbol"?function(ge){return typeof ge=="symbol"}:function(ge){return ge instanceof I},ue=function(Te,Je,rt){return Te===fe&&ue(ne,Je,rt),m(Te),Je=t(Je,!0),m(rt),g(X,Je)?(rt.enumerable?(g(Te,B)&&Te[B][Je]&&(Te[B][Je]=!1),rt=E(rt,{enumerable:w(0,!1)})):(g(Te,B)||_(Te,B,w(1,{})),Te[B][Je]=!0),ye(Te,Je,rt)):_(Te,Je,rt)},le=function(Te,Je){m(Te);for(var rt=o(Je=a(Je)),nt=0,at=rt.length,ct;at>nt;)ue(Te,ct=rt[nt++],Je[ct]);return Te},re=function(Te,Je){return Je===void 0?E(Te):le(E(Te),Je)},pe=function(Te){var Je=U.call(this,Te=t(Te,!0));return this===fe&&g(X,Te)&&!g(ne,Te)?!1:Je||!g(this,Te)||!g(X,Te)||g(this,B)&&this[B][Te]?Je:!0},ee=function(Te,Je){if(Te=a(Te),Je=t(Je,!0),Te===fe&&g(X,Je)&&!g(ne,Je))return;var rt=y(Te,Je);return rt&&g(X,Je)&&!(g(Te,B)&&Te[B][Je])&&(rt.enumerable=!0),rt},te=function(Te){for(var Je=M(a(Te)),rt=[],nt=0,at;Je.length>nt;)!g(X,at=Je[nt++])&&at!=B&&at!=v&&rt.push(at);return rt},ce=function(Te){for(var Je=Te===fe,rt=M(Je?ne:a(Te)),nt=[],at=0,ct;rt.length>at;)g(X,ct=rt[at++])&&(Je?g(fe,ct):!0)&&nt.push(X[ct]);return nt};me||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var Te=l(arguments.length>0?arguments[0]:void 0),Je=function(rt){this===fe&&Je.call(ne,rt),g(this,B)&&g(this[B],Te)&&(this[B][Te]=!1),ye(this,Te,w(1,rt))};return T&&De&&ye(fe,Te,{configurable:!0,set:Je}),Oe(Te)},p(I[H],"toString",function(){return this._k}),k.f=ee,C.f=ue,j("./_object-gopn").f=f.f=te,j("./_object-pie").f=pe,O.f=ce,T&&!j("./_library")&&p(fe,"propertyIsEnumerable",pe,!0),c.f=function(ge){return Oe(n(ge))}),P(P.G+P.W+P.F*!me,{Symbol:I});for(var q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Q=0;q.length>Q;)n(q[Q++]);for(var V=x(n.store),Z=0;V.length>Z;)u(V[Z++]);P(P.S+P.F*!me,"Symbol",{for:function(ge){return g(W,ge+="")?W[ge]:W[ge]=I(ge)},keyFor:function(Te){if(!xe(Te))throw TypeError(Te+" is not a symbol!");for(var Je in W)if(W[Je]===Te)return Je},useSetter:function(){De=!0},useSimple:function(){De=!1}}),P(P.S+P.F*!me,"Object",{create:re,defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:ee,getOwnPropertyNames:te,getOwnPropertySymbols:ce});var be=S(function(){O.f(1)});P(P.S+P.F*be,"Object",{getOwnPropertySymbols:function(Te){return O.f(r(Te))}}),N&&P(P.S+P.F*(!me||S(function(){var ge=I();return G([ge])!="[null]"||G({a:ge})!="{}"||G(Object(ge))!="{}"})),"JSON",{stringify:function(Te){for(var Je=[Te],rt=1,nt,at;arguments.length>rt;)Je.push(arguments[rt++]);return at=nt=Je[1],!s(nt)&&Te===void 0||xe(Te)?void 0:(h(nt)||(nt=function(ct,ht){if(typeof at=="function"&&(ht=at.call(this,ct,ht)),!xe(ht))return ht}),Je[1]=nt,G.apply(N,Je))}}),I[H][K]||j("./_hide")(I[H],K,I[H].valueOf),d(I,"Symbol"),d(Math,"Math",!0),d(L.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(j,Y,D){var L=j("./_export"),g=j("./_object-to-array")(!0);L(L.S,"Object",{entries:function(P){return g(P)}})},{"./_export":107,"./_object-to-array":143}],183:[function(j,Y,D){"use strict";var L=j("./_export"),g=j("./_core"),T=j("./_global"),P=j("./_species-constructor"),p=j("./_promise-resolve");L(L.P+L.R,"Promise",{finally:function(v){var S=P(this,g.Promise||T.Promise),b=typeof v=="function";return this.then(b?function(d){return p(S,v()).then(function(){return d})}:v,b?function(d){return p(S,v()).then(function(){throw d})}:v)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(j,Y,D){"use strict";var L=j("./_export"),g=j("./_new-promise-capability"),T=j("./_perform");L(L.S,"Promise",{try:function(P){var p=g.f(this),v=T(P);return(v.e?p.reject:p.resolve)(v.v),p.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(j,Y,D){j("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(j,Y,D){j("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(j,Y,D){j("./es6.array.iterator");for(var L=j("./_global"),g=j("./_hide"),T=j("./_iterators"),P=j("./_wks")("toStringTag"),p="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(","),v=0;v0?"-":"+")+v(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][a%10>3?0:(a%100-a%10!=10)*a%10],W:y,N:_};return o.replace(l,function(I){return I in M?M[I]:I.slice(1,I.length-1)})}}();p.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"},p.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 v(l,n){for(l=String(l),n=n||2;l.length]/;Y.exports=g;function g(T){var P=""+T,p=L.exec(P);if(!p)return P;var v,S="",b=0,d=0;for(b=p.index;b0&&this._events[v].length>b&&(this._events[v].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[v].length),typeof console.trace=="function"&&console.trace())),this},L.prototype.on=L.prototype.addListener,L.prototype.once=function(v,S){if(!g(S))throw TypeError("listener must be a function");var b=!1;function d(){this.removeListener(v,d),b||(b=!0,S.apply(this,arguments))}return d.listener=S,this.on(v,d),this},L.prototype.removeListener=function(v,S){var b,d,l,n;if(!g(S))throw TypeError("listener must be a function");if(!this._events||!this._events[v])return this;if(b=this._events[v],l=b.length,d=-1,b===S||g(b.listener)&&b.listener===S)delete this._events[v],this._events.removeListener&&this.emit("removeListener",v,S);else if(P(b)){for(n=l;n-- >0;)if(b[n]===S||b[n].listener&&b[n].listener===S){d=n;break}if(d<0)return this;b.length===1?(b.length=0,delete this._events[v]):b.splice(d,1),this._events.removeListener&&this.emit("removeListener",v,S)}return this},L.prototype.removeAllListeners=function(v){var S,b;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[v]&&delete this._events[v],this;if(arguments.length===0){for(S in this._events){if(S==="removeListener")continue;this.removeAllListeners(S)}return this.removeAllListeners("removeListener"),this._events={},this}if(b=this._events[v],g(b))this.removeListener(v,b);else if(b)for(;b.length;)this.removeListener(v,b[b.length-1]);return delete this._events[v],this},L.prototype.listeners=function(v){var S;return!this._events||!this._events[v]?S=[]:g(this._events[v])?S=[this._events[v]]:S=this._events[v].slice(),S},L.prototype.listenerCount=function(v){if(this._events){var S=this._events[v];if(g(S))return 1;if(S)return S.length}return 0},L.listenerCount=function(v,S){return v.listenerCount(S)};function g(v){return typeof v=="function"}function T(v){return typeof v=="number"}function P(v){return typeof v=="object"&&v!==null}function p(v){return v===void 0}},{}],193:[function(j,Y,D){var L=j("http"),g=Y.exports;for(var T in L)L.hasOwnProperty(T)&&(g[T]=L[T]);g.request=function(P,p){return P||(P={}),P.scheme="https",P.protocol="https:",L.request.call(this,P,p)}},{http:231}],194:[function(j,Y,D){/*! * humanize-ms - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var L=j("util"),g=j("ms");Y.exports=function(T){if(typeof T=="number")return T;var P=g(T);if(P===void 0){var p=new Error(L.format("humanize-ms(%j) result undefined",T));console.warn(p.stack)}return P}},{ms:204,util:243}],195:[function(j,Y,D){D.read=function(L,g,T,P,p){var v,S,b=p*8-P-1,d=(1<>1,n=-7,c=T?p-1:0,u=T?-1:1,o=L[g+c];for(c+=u,v=o&(1<<-n)-1,o>>=-n,n+=b;n>0;v=v*256+L[g+c],c+=u,n-=8);for(S=v&(1<<-n)-1,v>>=-n,n+=P;n>0;S=S*256+L[g+c],c+=u,n-=8);if(v===0)v=1-l;else{if(v===d)return S?NaN:(o?-1:1)*Infinity;S=S+Math.pow(2,P),v=v-l}return(o?-1:1)*S*Math.pow(2,v-P)},D.write=function(L,g,T,P,p,v){var S,b,d,l=v*8-p-1,n=(1<>1,u=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,o=P?0:v-1,h=P?1:-1,m=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(b=isNaN(g)?1:0,S=n):(S=Math.floor(Math.log(g)/Math.LN2),g*(d=Math.pow(2,-S))<1&&(S--,d*=2),S+c>=1?g+=u/d:g+=u*Math.pow(2,1-c),g*d>=2&&(S++,d/=2),S+c>=n?(b=0,S=n):S+c>=1?(b=(g*d-1)*Math.pow(2,p),S=S+c):(b=g*Math.pow(2,c-1)*Math.pow(2,p),S=0));p>=8;L[T+o]=b&255,o+=h,b/=256,p-=8);for(S=S<0;L[T+o]=S&255,o+=h,S/=256,l-=8);L[T+o-h]|=m*128}},{}],196:[function(j,Y,D){typeof Object.create=="function"?Y.exports=function(g,T){T&&(g.super_=T,g.prototype=Object.create(T.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:Y.exports=function(g,T){if(T){g.super_=T;var P=function(){};P.prototype=T.prototype,g.prototype=new P,g.prototype.constructor=g}}},{}],197:[function(j,Y,D){/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */Y.exports=function(T){return T!=null&&(L(T)||g(T)||!!T._isBuffer)};function L(T){return!!T.constructor&&typeof T.constructor.isBuffer=="function"&&T.constructor.isBuffer(T)}function g(T){return typeof T.readFloatLE=="function"&&typeof T.slice=="function"&&L(T.slice(0,0))}},{}],198:[function(j,Y,D){var L={}.toString;Y.exports=Array.isArray||function(g){return L.call(g)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(j,Y){typeof exports=="object"&&typeof module!="undefined"?module.exports=Y(j):typeof define=="function"&&define.amd?define(Y):Y(j)})(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(j){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(j){for(var Y={},D=0,L=j.length;D>>6)+fromCharCode(128|Y&63):fromCharCode(224|Y>>>12&15)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&63)}else{var Y=65536+(j.charCodeAt(0)-55296)*1024+(j.charCodeAt(1)-56320);return fromCharCode(240|Y>>>18&7)+fromCharCode(128|Y>>>12&63)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(j){return j.replace(re_utob,cb_utob)},cb_encode=function(j){var Y=[0,2,1][j.length%3],D=j.charCodeAt(0)<<16|(j.length>1?j.charCodeAt(1):0)<<8|(j.length>2?j.charCodeAt(2):0),L=[b64chars.charAt(D>>>18),b64chars.charAt(D>>>12&63),Y>=2?"=":b64chars.charAt(D>>>6&63),Y>=1?"=":b64chars.charAt(D&63)];return L.join("")},btoa=global.btoa?function(j){return global.btoa(j)}:function(j){return j.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(j){var Y=Object.prototype.toString.call(j)==="[object Uint8Array]";return Y?j.toString("base64"):btoa(utob(String(j)))},encode=function(j,Y){return Y?_encode(String(j)).replace(/[+\/]/g,function(D){return D=="+"?"-":"_"}).replace(/=/g,""):_encode(j)},encodeURI=function(j){return encode(j,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(j){switch(j.length){case 4:var Y=(7&j.charCodeAt(0))<<18|(63&j.charCodeAt(1))<<12|(63&j.charCodeAt(2))<<6|63&j.charCodeAt(3),D=Y-65536;return fromCharCode((D>>>10)+55296)+fromCharCode((D&1023)+56320);case 3:return fromCharCode((15&j.charCodeAt(0))<<12|(63&j.charCodeAt(1))<<6|63&j.charCodeAt(2));default:return fromCharCode((31&j.charCodeAt(0))<<6|63&j.charCodeAt(1))}},btou=function(j){return j.replace(re_btou,cb_btou)},cb_decode=function(j){var Y=j.length,D=Y%4,L=(Y>0?b64tab[j.charAt(0)]<<18:0)|(Y>1?b64tab[j.charAt(1)]<<12:0)|(Y>2?b64tab[j.charAt(2)]<<6:0)|(Y>3?b64tab[j.charAt(3)]:0),g=[fromCharCode(L>>>16),fromCharCode(L>>>8&255),fromCharCode(L&255)];return g.length-=[0,0,2,1][D],g.join("")},_atob=global.atob?function(j){return global.atob(j)}:function(j){return j.replace(/\S{1,4}/g,cb_decode)},atob=function(j){return _atob(String(j).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(j){return(j.constructor===buffer.constructor?j:buffer.from(j,"base64")).toString()}:function(j){return(j.constructor===buffer.constructor?j:new buffer(j,"base64")).toString()}:function(j){return btou(_atob(j))},decode=function(j){return _decode(String(j).replace(/[-_]/g,function(Y){return Y=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var j=global.Base64;return global.Base64=_Base64,j};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(j){return{value:j,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(j){return encode(this,j)})),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(j,Y,D){/*! * merge-descriptors * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */"use strict";Y.exports=g;var L=Object.prototype.hasOwnProperty;function g(T,P,p){if(!T)throw new TypeError("argument dest is required");if(!P)throw new TypeError("argument src is required");return p===void 0&&(p=!0),Object.getOwnPropertyNames(P).forEach(function(S){if(!p&&L.call(T,S))return;var b=Object.getOwnPropertyDescriptor(P,S);Object.defineProperty(T,S,b)}),T}},{}],201:[function(j,Y,D){"use strict";function L(){this._types=Object.create(null),this._extensions=Object.create(null);for(var g=0;g0)return S(n);if(u==="number"&&isFinite(n))return c.long?d(n):b(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function S(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 u=parseFloat(c[1]),o=(c[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return u*v;case"weeks":case"week":case"w":return u*p;case"days":case"day":case"d":return u*P;case"hours":case"hour":case"hrs":case"hr":case"h":return u*T;case"minutes":case"minute":case"mins":case"min":case"m":return u*g;case"seconds":case"second":case"secs":case"sec":case"s":return u*L;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}function b(n){var c=Math.abs(n);return c>=P?Math.round(n/P)+"d":c>=T?Math.round(n/T)+"h":c>=g?Math.round(n/g)+"m":c>=L?Math.round(n/L)+"s":n+"ms"}function d(n){var c=Math.abs(n);return c>=P?l(n,c,P,"day"):c>=T?l(n,c,T,"hour"):c>=g?l(n,c,g,"minute"):c>=L?l(n,c,L,"second"):n+" ms"}function l(n,c,u,o){var h=c>=u*1.5;return Math.round(n/u)+" "+o+(h?"s":"")}},{}],205:[function(j,Y,D){(function(L){function g(v,S){for(var b=0,d=v.length-1;d>=0;d--){var l=v[d];l==="."?v.splice(d,1):l===".."?(v.splice(d,1),b++):b&&(v.splice(d,1),b--)}if(S)for(;b--;b)v.unshift("..");return v}D.resolve=function(){for(var v="",S=!1,b=arguments.length-1;b>=-1&&!S;b--){var d=b>=0?arguments[b]:L.cwd();if(typeof d!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!d)continue;v=d+"/"+v,S=d.charAt(0)==="/"}return v=g(P(v.split("/"),function(l){return!!l}),!S).join("/"),(S?"/":"")+v||"."},D.normalize=function(v){var S=D.isAbsolute(v),b=p(v,-1)==="/";return v=g(P(v.split("/"),function(d){return!!d}),!S).join("/"),!v&&!S&&(v="."),v&&b&&(v+="/"),(S?"/":"")+v},D.isAbsolute=function(v){return v.charAt(0)==="/"},D.join=function(){var v=Array.prototype.slice.call(arguments,0);return D.normalize(P(v,function(S,b){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},D.relative=function(v,S){v=D.resolve(v).substr(1),S=D.resolve(S).substr(1);function b(h){for(var m=0;m=0&&!(h[s]!=="");s--);return m>s?[]:h.slice(m,s-m+1)}for(var d=b(v.split("/")),l=b(S.split("/")),n=Math.min(d.length,l.length),c=n,u=0;u=1;--n)if(S=v.charCodeAt(n),S===47){if(!l){d=n;break}}else l=!1;return d===-1?b?"/":".":b&&d===1?"/":v.slice(0,d)};function T(v){typeof v!="string"&&(v=v+"");var S=0,b=-1,d=!0,l;for(l=v.length-1;l>=0;--l)if(v.charCodeAt(l)===47){if(!d){S=l+1;break}}else b===-1&&(d=!1,b=l+1);return b===-1?"":v.slice(S,b)}D.basename=function(v,S){var b=T(v);return S&&b.substr(-1*S.length)===S&&(b=b.substr(0,b.length-S.length)),b},D.extname=function(v){typeof v!="string"&&(v=v+"");for(var S=-1,b=0,d=-1,l=!0,n=0,c=v.length-1;c>=0;--c){var u=v.charCodeAt(c);if(u===47){if(!l){b=c+1;break}continue}d===-1&&(l=!1,d=c+1),u===46?S===-1?S=c:n!==1&&(n=1):S!==-1&&(n=-1)}return S===-1||d===-1||n===0||n===1&&S===d-1&&S===b+1?"":v.slice(S,d)};function P(v,S){if(v.filter)return v.filter(S);for(var b=[],d=0;d * Copyright 2014-2018 Benjamin Tan * Copyright 2011-2013 John-David Dalton * Available under MIT license */(function(){"use strict";var g={function:!0,object:!0},T=g[typeof window]&&window||this,P=T,p=g[typeof D]&&D,v=g[typeof Y]&&Y&&!Y.nodeType&&Y,S=p&&v&&typeof L=="object"&&L;S&&(S.global===S||S.window===S||S.self===S)&&(T=S);var b=Math.pow(2,53)-1,d=/\bOpera/,l=this,n=Object.prototype,c=n.hasOwnProperty,u=n.toString;function o(C){return C=String(C),C.charAt(0).toUpperCase()+C.slice(1)}function h(C,x,y){var _={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return x&&y&&/^Win/i.test(C)&&!/^Windows Phone /i.test(C)&&(_=_[/[\d.]+$/.exec(C)])&&(C="Windows "+_),C=String(C),x&&y&&(C=C.replace(RegExp(x,"i"),y)),C=s(C.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),C}function m(C,x){var y=-1,_=C?C.length:0;if(typeof _=="number"&&_>-1&&_<=b)for(;++y<_;)x(C[y],y,C);else r(C,x)}function s(C){return C=f(C),/^(?:webOS|i(?:OS|P))/.test(C)?C:o(C)}function r(C,x){for(var y in C)c.call(C,y)&&x(C[y],y,C)}function a(C){return C==null?o(C):u.call(C).slice(8,-1)}function t(C,x){var y=C!=null?typeof C[x]:"number";return!/^(?:boolean|number|string|undefined)$/.test(y)&&(y=="object"?!!C[x]:!0)}function w(C){return String(C).replace(/([ -])(?!$)/g,"$1?")}function E(C,x){var y=null;return m(C,function(_,M){y=x(y,_,M,C)}),y}function f(C){return String(C).replace(/^ +| +$/g,"")}function k(C){var x=T,y=C&&typeof C=="object"&&a(C)!="String";y&&(x=C,C=null);var _=x.navigator||{},M=_.userAgent||"";C||(C=M);var I=y||l==P,N=y?!!_.likeChrome:/\bChrome\b/.test(C)&&!/internal|\n/i.test(u.toString()),G="Object",H=y?G:"ScriptBridgingProxyObject",B=y?G:"Environment",K=y&&x.java?"JavaPackage":a(x.java),U=y?G:"RuntimeObject",W=/\bJava/.test(K)&&x.java,X=W&&a(x.environment)==B,ne=W?"a":"\u03B1",fe=W?"b":"\u03B2",me=x.document||{},Ae=x.operamini||x.opera,De=d.test(De=y&&Ae?Ae["[[Class]]"]:a(Ae))?De:Ae=null,ye,Oe=C,xe=[],ue=null,le=C==M,re=le&&Ae&&typeof Ae.version=="function"&&Ae.version(),pe,ee=V([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),te=be(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),ce=Te([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),q=Z({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),Q=ge(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function V(at){return E(at,function(ct,ht){return ct||RegExp("\\b"+(ht.pattern||w(ht))+"\\b","i").exec(C)&&(ht.label||ht)})}function Z(at){return E(at,function(ct,ht,He){return ct||(ht[ce]||ht[/^[a-z]+(?: +[a-z]+\b)*/i.exec(ce)]||RegExp("\\b"+w(He)+"(?:\\b|\\w*\\d)","i").exec(C))&&He})}function be(at){return E(at,function(ct,ht){return ct||RegExp("\\b"+(ht.pattern||w(ht))+"\\b","i").exec(C)&&(ht.label||ht)})}function ge(at){return E(at,function(ct,ht){var He=ht.pattern||w(ht);return!ct&&(ct=RegExp("\\b"+He+"(?:/[\\d.]+|[ \\w.]*)","i").exec(C))&&(ct=h(ct,He,ht.label||ht)),ct})}function Te(at){return E(at,function(ct,ht){var He=ht.pattern||w(ht);return!ct&&(ct=RegExp("\\b"+He+" *\\d+[.\\w_]*","i").exec(C)||RegExp("\\b"+He+" *\\w+-[\\w]*","i").exec(C)||RegExp("\\b"+He+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(C))&&((ct=String(ht.label&&!RegExp(He,"i").test(ht.label)?ht.label:ct).split("/"))[1]&&!/[\d.]+/.test(ct[0])&&(ct[0]+=" "+ct[1]),ht=ht.label||ht,ct=s(ct[0].replace(RegExp(He,"i"),ht).replace(RegExp("; *(?:"+ht+"[_-])?","i")," ").replace(RegExp("("+ht+")[-_.]?(\\w)","i"),"$1 $2"))),ct})}function Je(at){return E(at,function(ct,ht){return ct||(RegExp(ht+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(C)||0)[1]||null})}function rt(){return this.description||""}if(ee&&(ee=[ee]),q&&!ce&&(ce=Te([q])),(ye=/\bGoogle TV\b/.exec(ce))&&(ce=ye[0]),/\bSimulator\b/i.test(C)&&(ce=(ce?ce+" ":"")+"Simulator"),te=="Opera Mini"&&/\bOPiOS\b/.test(C)&&xe.push("running in Turbo/Uncompressed mode"),te=="IE"&&/\blike iPhone OS\b/.test(C)?(ye=k(C.replace(/like iPhone OS/,"")),q=ye.manufacturer,ce=ye.product):/^iP/.test(ce)?(te||(te="Safari"),Q="iOS"+((ye=/ OS ([\d_]+)/i.exec(C))?" "+ye[1].replace(/_/g,"."):"")):te=="Konqueror"&&!/buntu/i.test(Q)?Q="Kubuntu":q&&q!="Google"&&(/Chrome/.test(te)&&!/\bMobile Safari\b/i.test(C)||/\bVita\b/.test(ce))||/\bAndroid\b/.test(Q)&&/^Chrome/.test(te)&&/\bVersion\//i.test(C)?(te="Android Browser",Q=/\bAndroid\b/.test(Q)?Q:"Android"):te=="Silk"?(/\bMobi/i.test(C)||(Q="Android",xe.unshift("desktop mode")),/Accelerated *= *true/i.test(C)&&xe.unshift("accelerated")):te=="PaleMoon"&&(ye=/\bFirefox\/([\d.]+)\b/.exec(C))?xe.push("identifying as Firefox "+ye[1]):te=="Firefox"&&(ye=/\b(Mobile|Tablet|TV)\b/i.exec(C))?(Q||(Q="Firefox OS"),ce||(ce=ye[1])):!te||(ye=!/\bMinefield\b/i.test(C)&&/\b(?:Firefox|Safari)\b/.exec(te))?(te&&!ce&&/[\/,]|^[^(]+?\)/.test(C.slice(C.indexOf(ye+"/")+8))&&(te=null),(ye=ce||q||Q)&&(ce||q||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Q))&&(te=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Q)?Q:ye)+" Browser")):te=="Electron"&&(ye=(/\bChrome\/([\d.]+)\b/.exec(C)||0)[1])&&xe.push("Chromium "+ye),re||(re=Je(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",w(te),"(?:Firefox|Minefield|NetFront)"])),(ye=ee=="iCab"&&parseFloat(re)>3&&"WebKit"||/\bOpera\b/.test(te)&&(/\bOPR\b/.test(C)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(C)&&!/^(?:Trident|EdgeHTML)$/.test(ee)&&"WebKit"||!ee&&/\bMSIE\b/i.test(C)&&(Q=="Mac OS"?"Tasman":"Trident")||ee=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(te)&&"NetFront")&&(ee=[ye]),te=="IE"&&(ye=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(C)||0)[1])?(te+=" Mobile",Q="Windows Phone "+(/\+$/.test(ye)?ye:ye+".x"),xe.unshift("desktop mode")):/\bWPDesktop\b/i.test(C)?(te="IE Mobile",Q="Windows Phone 8.x",xe.unshift("desktop mode"),re||(re=(/\brv:([\d.]+)/.exec(C)||0)[1])):te!="IE"&&ee=="Trident"&&(ye=/\brv:([\d.]+)/.exec(C))&&(te&&xe.push("identifying as "+te+(re?" "+re:"")),te="IE",re=ye[1]),le){if(t(x,"global"))if(W&&(ye=W.lang.System,Oe=ye.getProperty("os.arch"),Q=Q||ye.getProperty("os.name")+" "+ye.getProperty("os.version")),X){try{re=x.require("ringo/engine").version.join("."),te="RingoJS"}catch(at){(ye=x.system)&&ye.global.system==x.system&&(te="Narwhal",Q||(Q=ye[0].os||null))}te||(te="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(ye=x.process)&&(typeof ye.versions=="object"&&(typeof ye.versions.electron=="string"?(xe.push("Node "+ye.versions.node),te="Electron",re=ye.versions.electron):typeof ye.versions.nw=="string"&&(xe.push("Chromium "+re,"Node "+ye.versions.node),te="NW.js",re=ye.versions.nw)),te||(te="Node.js",Oe=ye.arch,Q=ye.platform,re=/[\d.]+/.exec(ye.version),re=re?re[0]:null));else a(ye=x.runtime)==H?(te="Adobe AIR",Q=ye.flash.system.Capabilities.os):a(ye=x.phantom)==U?(te="PhantomJS",re=(ye=ye.version||null)&&ye.major+"."+ye.minor+"."+ye.patch):typeof me.documentMode=="number"&&(ye=/\bTrident\/(\d+)/i.exec(C))?(re=[re,me.documentMode],(ye=+ye[1]+4)!=re[1]&&(xe.push("IE "+re[1]+" mode"),ee&&(ee[1]=""),re[1]=ye),re=te=="IE"?String(re[1].toFixed(1)):re[0]):typeof me.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(te)&&(xe.push("masking as "+te+" "+re),te="IE",re="11.0",ee=["Trident"],Q="Windows");Q=Q&&s(Q)}if(re&&(ye=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(re)||/(?:alpha|beta)(?: ?\d)?/i.exec(C+";"+(le&&_.appMinorVersion))||/\bMinefield\b/i.test(C)&&"a")&&(ue=/b/i.test(ye)?"beta":"alpha",re=re.replace(RegExp(ye+"\\+?$"),"")+(ue=="beta"?fe:ne)+(/\d+\+?/.exec(ye)||"")),te=="Fennec"||te=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Q))te="Firefox Mobile";else if(te=="Maxthon"&&re)re=re.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(ce))ce=="Xbox 360"&&(Q=null),ce=="Xbox 360"&&/\bIEMobile\b/.test(C)&&xe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(te)||te&&!ce&&!/Browser|Mobi/.test(te))&&(Q=="Windows CE"||/Mobi/i.test(C)))te+=" Mobile";else if(te=="IE"&&le)try{x.external===null&&xe.unshift("platform preview")}catch(at){xe.unshift("embedded")}else(/\bBlackBerry\b/.test(ce)||/\bBB10\b/.test(C))&&(ye=(RegExp(ce.replace(/ +/g," *")+"/([.\\d]+)","i").exec(C)||0)[1]||re)?(ye=[ye,/BB10/.test(C)],Q=(ye[1]?(ce=null,q="BlackBerry"):"Device Software")+" "+ye[0],re=null):this!=r&&ce!="Wii"&&(le&&Ae||/Opera/.test(te)&&/\b(?:MSIE|Firefox)\b/i.test(C)||te=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Q)||te=="IE"&&(Q&&!/^Win/.test(Q)&&re>5.5||/\bWindows XP\b/.test(Q)&&re>8||re==8&&!/\bTrident\b/.test(C)))&&!d.test(ye=k.call(r,C.replace(d,"")+";"))&&ye.name&&(ye="ing as "+ye.name+((ye=ye.version)?" "+ye:""),d.test(te)?(/\bIE\b/.test(ye)&&Q=="Mac OS"&&(Q=null),ye="identify"+ye):(ye="mask"+ye,De?te=s(De.replace(/([a-z])([A-Z])/g,"$1 $2")):te="Opera",/\bIE\b/.test(ye)&&(Q=null),le||(re=null)),ee=["Presto"],xe.push(ye));(ye=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(C)||0)[1])&&(ye=[parseFloat(ye.replace(/\.(\d)$/,".0$1")),ye],te=="Safari"&&ye[1].slice(-1)=="+"?(te="WebKit Nightly",ue="alpha",re=ye[1].slice(0,-1)):(re==ye[1]||re==(ye[2]=(/\bSafari\/([\d.]+\+?)/i.exec(C)||0)[1]))&&(re=null),ye[1]=(/\bChrome\/([\d.]+)/i.exec(C)||0)[1],ye[0]==537.36&&ye[2]==537.36&&parseFloat(ye[1])>=28&&ee=="WebKit"&&(ee=["Blink"]),!le||!N&&!ye[1]?(ee&&(ee[1]="like Safari"),ye=(ye=ye[0],ye<400?1:ye<500?2:ye<526?3:ye<533?4:ye<534?"4+":ye<535?5:ye<537?6:ye<538?7:ye<601?8:"8")):(ee&&(ee[1]="like Chrome"),ye=ye[1]||(ye=ye[0],ye<530?1:ye<532?2:ye<532.05?3:ye<533?4:ye<534.03?5:ye<534.07?6:ye<534.1?7:ye<534.13?8:ye<534.16?9:ye<534.24?10:ye<534.3?11:ye<535.01?12:ye<535.02?"13+":ye<535.07?15:ye<535.11?16:ye<535.19?17:ye<536.05?18:ye<536.1?19:ye<537.01?20:ye<537.11?"21+":ye<537.13?23:ye<537.18?24:ye<537.24?25:ye<537.36?26:ee!="Blink"?"27":"28")),ee&&(ee[1]+=" "+(ye+=typeof ye=="number"?".x":/[.+]/.test(ye)?"":"+")),te=="Safari"&&(!re||parseInt(re)>45)&&(re=ye)),te=="Opera"&&(ye=/\bzbov|zvav$/.exec(Q))?(te+=" ",xe.unshift("desktop mode"),ye=="zvav"?(te+="Mini",re=null):te+="Mobile",Q=Q.replace(RegExp(" *"+ye+"$"),"")):te=="Safari"&&/\bChrome\b/.exec(ee&&ee[1])&&(xe.unshift("desktop mode"),te="Chrome Mobile",re=null,/\bOS X\b/.test(Q)?(q="Apple",Q="iOS 4.3+"):Q=null),re&&re.indexOf(ye=/[\d.]+$/.exec(Q))==0&&C.indexOf("/"+ye+"-")>-1&&(Q=f(Q.replace(ye,""))),ee&&!/\b(?:Avant|Nook)\b/.test(te)&&(/Browser|Lunascape|Maxthon/.test(te)||te!="Safari"&&/^iOS/.test(Q)&&/\bSafari\b/.test(ee[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(te)&&ee[1])&&((ye=ee[ee.length-1])&&xe.push(ye)),xe.length&&(xe=["("+xe.join("; ")+")"]),q&&ce&&ce.indexOf(q)<0&&xe.push("on "+q),ce&&xe.push((/^on /.test(xe[xe.length-1])?"":"on ")+ce),Q&&(ye=/ ([\d.+]+)$/.exec(Q),pe=ye&&Q.charAt(Q.length-ye[0].length-1)=="/",Q={architecture:32,family:ye&&!pe?Q.replace(ye[0],""):Q,version:ye?ye[1]:null,toString:function(){var at=this.version;return this.family+(at&&!pe?" "+at:"")+(this.architecture==64?" 64-bit":"")}}),(ye=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Oe))&&!/\bi686\b/i.test(Oe)?(Q&&(Q.architecture=64,Q.family=Q.family.replace(RegExp(" *"+ye),"")),te&&(/\bWOW64\b/i.test(C)||le&&/\w(?:86|32)$/.test(_.cpuClass||_.platform)&&!/\bWin64; x64\b/i.test(C))&&xe.unshift("32-bit")):Q&&/^OS X/.test(Q.family)&&te=="Chrome"&&parseFloat(re)>=39&&(Q.architecture=64),C||(C=null);var nt={};return nt.description=C,nt.layout=ee&&ee[0],nt.manufacturer=q,nt.name=te,nt.prerelease=ue,nt.product=ce,nt.ua=C,nt.version=te&&re,nt.os=Q||{architecture:null,family:null,version:null,toString:function(){return"null"}},nt.parse=k,nt.toString=rt,nt.version&&xe.unshift(re),nt.name&&xe.unshift(te),Q&&te&&!(Q==String(Q).split(" ")[0]&&(Q==te.split(" ")[0]||ce))&&xe.push(ce?"("+Q+")":"on "+Q),xe.length&&(nt.description=xe.join(" ")),nt}var O=k();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(T.platform=O,define(function(){return O})):p&&v?r(O,function(C,x){p[x]=C}):T.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,Y,D){(function(L){"use strict";typeof L=="undefined"||!L.version||L.version.indexOf("v0.")===0||L.version.indexOf("v1.")===0&&L.version.indexOf("v1.8.")!==0?Y.exports={nextTick:g}:Y.exports=L;function g(T,P,p,v){if(typeof T!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,b,d;switch(S){case 0:case 1:return L.nextTick(T);case 2:return L.nextTick(function(){T.call(null,P)});case 3:return L.nextTick(function(){T.call(null,P,p)});case 4:return L.nextTick(function(){T.call(null,P,p,v)});default:for(b=new Array(S-1),d=0;d1)for(var r=1;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=b-d,w=Math.floor,E=String.fromCharCode,f;function k(K){throw new RangeError(a[K])}function O(K,U){for(var W=K.length,X=[];W--;)X[W]=U(K[W]);return X}function C(K,U){var W=K.split("@"),X="";W.length>1&&(X=W[0]+"@",K=W[1]),K=K.replace(r,".");var ne=K.split("."),fe=O(ne,U).join(".");return X+fe}function x(K){for(var U=[],W=0,X=K.length,ne,fe;W=55296&&ne<=56319&&W65535&&(U-=65536,W+=E(U>>>10&1023|55296),U=56320|U&1023),W+=E(U),W}).join("")}function _(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:b}function M(K,U){return K+22+75*(K<26)-((U!=0)<<5)}function I(K,U,W){var X=0;for(K=W?w(K/c):K>>1,K+=w(K/U);K>t*l>>1;X+=b)K=w(K/t);return w(X+(t+1)*K/(K+n))}function N(K){var U=[],W=K.length,X,ne=0,fe=o,me=u,Ae,De,ye,Oe,xe,ue,le,re,pe;for(Ae=K.lastIndexOf(h),Ae<0&&(Ae=0),De=0;De=128&&k("not-basic"),U.push(K.charCodeAt(De));for(ye=Ae>0?Ae+1:0;ye=W&&k("invalid-input"),le=_(K.charCodeAt(ye++)),(le>=b||le>w((S-ne)/xe))&&k("overflow"),ne+=le*xe,re=ue<=me?d:ue>=me+l?l:ue-me,lew(S/pe)&&k("overflow"),xe*=pe;X=U.length+1,me=I(ne-Oe,X,Oe==0),w(ne/X)>S-fe&&k("overflow"),fe+=w(ne/X),ne%=X,U.splice(ne++,0,fe)}return y(U)}function G(K){var U,W,X,ne,fe,me,Ae,De,ye,Oe,xe,ue=[],le,re,pe,ee;for(K=x(K),le=K.length,U=o,W=0,fe=u,me=0;me=U&&xew((S-W)/re)&&k("overflow"),W+=(Ae-U)*re,U=Ae,me=0;meS&&k("overflow"),xe==U){for(De=W,ye=b;!(Oe=ye<=fe?d:ye>=fe+l?l:ye-fe,De0&&l>d&&(l=d);for(var n=0;n=0?(o=c.substr(0,u),h=c.substr(u+1)):(o=c,h=""),m=decodeURIComponent(o),s=decodeURIComponent(h),L(S,m)?g(S[m])?S[m].push(s):S[m]=[S[m],s]:S[m]=s}return S};var g=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"}},{}],211:[function(j,Y,D){"use strict";var L=function(p){switch(typeof p){case"string":return p;case"boolean":return p?"true":"false";case"number":return isFinite(p)?p:"";default:return""}};Y.exports=function(p,v,S,b){return v=v||"&",S=S||"=",p===null&&(p=void 0),typeof p=="object"?T(P(p),function(d){var l=encodeURIComponent(L(d))+S;return g(p[d])?T(p[d],function(n){return l+encodeURIComponent(L(n))}).join(v):l+encodeURIComponent(L(p[d]))}).join(v):b?encodeURIComponent(L(b))+S+encodeURIComponent(L(p)):""};var g=Array.isArray||function(p){return Object.prototype.toString.call(p)==="[object Array]"};function T(p,v){if(p.map)return p.map(v);for(var S=[],b=0;b0?(typeof te!="string"&&!V.objectMode&&(0,P.default)(te)!==o.prototype&&(te=m(te)),q?V.endEmitted?ee.emit("error",new Error("stream.unshift() after end event")):_(ee,V,te,!0):V.ended?ee.emit("error",new Error("stream.push() after EOF")):(V.reading=!1,V.decoder&&!ce?(te=V.decoder.write(te),V.objectMode||te.length!==0?_(ee,V,te,!1):W(ee,V)):_(ee,V,te,!1))):q||(V.reading=!1)}return I(V)}function _(ee,te,ce,q){te.flowing&&te.length===0&&!te.sync?(ee.emit("data",ce),ee.read(0)):(te.length+=te.objectMode?1:ce.length,q?te.buffer.unshift(ce):te.buffer.push(ce),te.needReadable&&K(ee)),W(ee,te)}function M(ee,te){var ce;return!s(te)&&typeof te!="string"&&te!==void 0&&!ee.objectMode&&(ce=new TypeError("Invalid non-string/buffer chunk")),ce}function I(ee){return!ee.ended&&(ee.needReadable||ee.length=N?ee=N:(ee--,ee|=ee>>>1,ee|=ee>>>2,ee|=ee>>>4,ee|=ee>>>8,ee|=ee>>>16,ee++),ee}function H(ee,te){return ee<=0||te.length===0&&te.ended?0:te.objectMode?1:ee!==ee?te.flowing&&te.length?te.buffer.head.data.length:te.length:(ee>te.highWaterMark&&(te.highWaterMark=G(ee)),ee<=te.length?ee:te.ended?te.length:(te.needReadable=!0,0))}x.prototype.read=function(ee){t("read",ee),ee=parseInt(ee,10);var te=this._readableState,ce=ee;if(ee!==0&&(te.emittedReadable=!1),ee===0&&te.needReadable&&(te.length>=te.highWaterMark||te.ended))return t("read: emitReadable",te.length,te.ended),te.length===0&&te.ended?le(this):K(this),null;if(ee=H(ee,te),ee===0&&te.ended)return te.length===0&&le(this),null;var q=te.needReadable;t("need readable",q),(te.length===0||te.length-ee0?Q=ye(ee,te):Q=null,Q===null?(te.needReadable=!0,ee=0):te.length-=ee,te.length===0&&(te.ended||(te.needReadable=!0),ce!==ee&&te.ended&&le(this)),Q!==null&&this.emit("data",Q),Q};function B(ee,te){if(te.ended)return;if(te.decoder){var ce=te.decoder.end();ce&&ce.length&&(te.buffer.push(ce),te.length+=te.objectMode?1:ce.length)}te.ended=!0,K(ee)}function K(ee){var te=ee._readableState;te.needReadable=!1,te.emittedReadable||(t("emitReadable",te.flowing),te.emittedReadable=!0,te.sync?b.nextTick(U,ee):U(ee))}function U(ee){t("emit readable"),ee.emit("readable"),De(ee)}function W(ee,te){te.readingMore||(te.readingMore=!0,b.nextTick(X,ee,te))}function X(ee,te){for(var ce=te.length;!te.reading&&!te.flowing&&!te.ended&&te.length1&&pe(q.pipes,ee)!==-1)&&!Te&&(t("false write response, pause",ce._readableState.awaitDrain),ce._readableState.awaitDrain++,rt=!0),ce.pause())}function at(Re){t("onerror",Re),He(),ee.removeListener("error",at),c(ee,"error")===0&&ee.emit("error",Re)}O(ee,"error",at);function ct(){ee.removeListener("finish",ht),He()}ee.once("close",ct);function ht(){t("onfinish"),ee.removeListener("close",ct),He()}ee.once("finish",ht);function He(){t("unpipe"),ce.unpipe(ee)}return ee.emit("pipe",ce),q.flowing||(t("pipe resume"),ce.resume()),ee};function ne(ee){return function(){var te=ee._readableState;t("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,te.awaitDrain===0&&c(ee,"data")&&(te.flowing=!0,De(ee))}}x.prototype.unpipe=function(ee){var te=this._readableState,ce={hasUnpiped:!1};if(te.pipesCount===0)return this;if(te.pipesCount===1)return ee&&ee!==te.pipes?this:(ee||(ee=te.pipes),te.pipes=null,te.pipesCount=0,te.flowing=!1,ee&&ee.emit("unpipe",this,ce),this);if(!ee){var q=te.pipes,Q=te.pipesCount;te.pipes=null,te.pipesCount=0,te.flowing=!1;for(var V=0;V=te.length?(te.decoder?ce=te.buffer.join(""):te.buffer.length===1?ce=te.buffer.head.data:ce=te.buffer.concat(te.length),te.buffer.clear()):ce=Oe(ee,te.buffer,te.decoder),ce}function Oe(ee,te,ce){var q;return eeV.length?V.length:ee;if(Z===V.length?Q+=V:Q+=V.slice(0,ee),ee-=Z,ee===0){Z===V.length?(++q,ce.next?te.head=ce.next:te.head=te.tail=null):(te.head=ce,ce.data=V.slice(Z));break}++q}return te.length-=q,Q}function ue(ee,te){var ce=o.allocUnsafe(ee),q=te.head,Q=1;for(q.data.copy(ce),ee-=q.data.length;q=q.next;){var V=q.data,Z=ee>V.length?V.length:ee;if(V.copy(ce,ce.length-ee,0,Z),ee-=Z,ee===0){Z===V.length?(++Q,q.next?te.head=q.next:te.head=te.tail=null):(te.head=q,q.data=V.slice(Z));break}++Q}return te.length-=Q,ce}function le(ee){var te=ee._readableState;if(te.length>0)throw new Error('"endReadable()" called on non-empty stream');te.endEmitted||(te.ended=!0,b.nextTick(re,te,ee))}function re(ee,te){!ee.endEmitted&&ee.length===0&&(ee.endEmitted=!0,te.readable=!1,te.emit("end"))}function pe(ee,te){for(var ce=0,q=ee.length;ce-1?c.default:o.nextTick,r;M.WritableState=y;var a=(0,l.default)(j("core-util-is"));a.inherits=j("inherits");var t={deprecate:j("util-deprecate")},w=j("./internal/streams/stream"),E=j("safe-buffer").Buffer,f=g.Uint8Array||function(){};function k(ue){return E.from(ue)}function O(ue){return E.isBuffer(ue)||ue instanceof f}var C=j("./internal/streams/destroy");a.inherits(M,w);function x(){}function y(ue,le){r=r||j("./_stream_duplex"),ue=ue||{};var re=le instanceof r;this.objectMode=!!ue.objectMode,re&&(this.objectMode=this.objectMode||!!ue.writableObjectMode);var pe=ue.highWaterMark,ee=ue.writableHighWaterMark,te=this.objectMode?16:16*1024;pe||pe===0?this.highWaterMark=pe:re&&(ee||ee===0)?this.highWaterMark=ee:this.highWaterMark=te,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 ce=ue.decodeStrings===!1;this.decodeStrings=!ce,this.defaultEncoding=ue.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(q){W(le,q)},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 m(this)}y.prototype.getBuffer=function(){for(var le=this.bufferedRequest,re=[];le;)re.push(le),le=le.next;return re},function(){try{Object.defineProperty(y.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ue){}}();var _;typeof b.default=="function"&&v.default&&typeof Function.prototype[v.default]=="function"?(_=Function.prototype[v.default],(0,P.default)(M,v.default,{value:function(le){return _.call(this,le)?!0:this!==M?!1:le&&le._writableState instanceof y}})):_=function(le){return le instanceof this};function M(ue){if(r=r||j("./_stream_duplex"),!_.call(M,this)&&!(this instanceof r))return new M(ue);this._writableState=new y(ue,this),this.writable=!0,ue&&(typeof ue.write=="function"&&(this._write=ue.write),typeof ue.writev=="function"&&(this._writev=ue.writev),typeof ue.destroy=="function"&&(this._destroy=ue.destroy),typeof ue.final=="function"&&(this._final=ue.final)),w.call(this)}M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function I(ue,le){var re=new Error("write after end");ue.emit("error",re),o.nextTick(le,re)}function N(ue,le,re,pe){var ee=!0,te=!1;return re===null?te=new TypeError("May not write null values to stream"):typeof re!="string"&&re!==void 0&&!le.objectMode&&(te=new TypeError("Invalid non-string/buffer chunk")),te&&(ue.emit("error",te),o.nextTick(pe,te),ee=!1),ee}M.prototype.write=function(ue,le,re){var pe=this._writableState,ee=!1,te=!pe.objectMode&&O(ue);return te&&!E.isBuffer(ue)&&(ue=k(ue)),typeof le=="function"&&(re=le,le=null),te?le="buffer":le||(le=pe.defaultEncoding),typeof re!="function"&&(re=x),pe.ended?I(this,re):(te||N(this,pe,ue,re))&&(pe.pendingcb++,ee=H(this,pe,te,ue,le,re)),ee},M.prototype.cork=function(){var ue=this._writableState;ue.corked++},M.prototype.uncork=function(){var ue=this._writableState;ue.corked&&(ue.corked--,!ue.writing&&!ue.corked&&!ue.finished&&!ue.bufferProcessing&&ue.bufferedRequest&&fe(this,ue))},M.prototype.setDefaultEncoding=function(le){if(typeof le=="string"&&(le=le.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((le+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+le);return this._writableState.defaultEncoding=le,this};function G(ue,le,re){return!ue.objectMode&&ue.decodeStrings!==!1&&typeof le=="string"&&(le=E.from(le,re)),le}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(ue,le,re,pe,ee,te){if(!re){var ce=G(le,pe,ee);pe!==ce&&(re=!0,ee="buffer",pe=ce)}var q=le.objectMode?1:pe.length;le.length+=q;var Q=le.length0?this.tail.next=b:this.head=b,this.tail=b,++this.length},p.prototype.unshift=function(S){var b={data:S,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},p.prototype.shift=function(){if(this.length===0)return;var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S},p.prototype.clear=function(){this.head=this.tail=null,this.length=0},p.prototype.join=function(S){if(this.length===0)return"";for(var b=this.head,d=""+b.data;b=b.next;)d+=S+b.data;return d},p.prototype.concat=function(S){if(this.length===0)return g.alloc(0);if(this.length===1)return this.head.data;for(var b=g.allocUnsafe(S>>>0),d=this.head,l=0;d;)P(d.data,b,l),l+=d.data.length,d=d.next;return b},p}(),T&&T.inspect&&T.inspect.custom&&(Y.exports.prototype[T.inspect.custom]=function(){var p=T.inspect({length:this.length});return this.constructor.name+" "+p})},{"safe-buffer":228,util:71}],220:[function(j,Y,D){"use strict";var L=j("process-nextick-args");function g(p,v){var S=this,b=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return b||d?(v?v(p):p&&(!this._writableState||!this._writableState.errorEmitted)&&L.nextTick(P,this,p),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(l){!v&&l?(L.nextTick(P,S,l),S._writableState&&(S._writableState.errorEmitted=!0)):v&&v(l)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function P(p,v){p.emit("error",v)}Y.exports={destroy:g,undestroy:T}},{"process-nextick-args":207}],221:[function(j,Y,D){"use strict";Y.exports=j("events").EventEmitter},{events:192}],222:[function(j,Y,D){Y.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,Y,D){D=Y.exports=j("./lib/_stream_readable.js"),D.Stream=D,D.Readable=D,D.Writable=j("./lib/_stream_writable.js"),D.Duplex=j("./lib/_stream_duplex.js"),D.Transform=j("./lib/_stream_transform.js"),D.PassThrough=j("./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(j,Y,D){Y.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,Y,D){Y.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,Y,D){var L=function(){return this}()||Function("return this")(),g=L.regeneratorRuntime&&Object.getOwnPropertyNames(L).indexOf("regeneratorRuntime")>=0,T=g&&L.regeneratorRuntime;if(L.regeneratorRuntime=void 0,Y.exports=j("./runtime"),g)L.regeneratorRuntime=T;else try{delete L.regeneratorRuntime}catch(P){L.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,Y,D){!function(L){"use strict";var g=Object.prototype,T=g.hasOwnProperty,P,p=typeof Symbol=="function"?Symbol:{},v=p.iterator||"@@iterator",S=p.asyncIterator||"@@asyncIterator",b=p.toStringTag||"@@toStringTag",d=typeof Y=="object",l=L.regeneratorRuntime;if(l){d&&(Y.exports=l);return}l=L.regeneratorRuntime=d?Y.exports:{};function n(H,B,K,U){var W=B&&B.prototype instanceof r?B:r,X=Object.create(W.prototype),ne=new I(U||[]);return X._invoke=x(H,K,ne),X}l.wrap=n;function c(H,B,K){try{return{type:"normal",arg:H.call(B,K)}}catch(U){return{type:"throw",arg:U}}}var u="suspendedStart",o="suspendedYield",h="executing",m="completed",s={};function r(){}function a(){}function t(){}var w={};w[v]=function(){return this};var E=Object.getPrototypeOf,f=E&&E(E(N([])));f&&f!==g&&T.call(f,v)&&(w=f);var k=t.prototype=r.prototype=Object.create(w);a.prototype=k.constructor=t,t.constructor=a,t[b]=a.displayName="GeneratorFunction";function O(H){["next","throw","return"].forEach(function(B){H[B]=function(K){return this._invoke(B,K)}})}l.isGeneratorFunction=function(H){var B=typeof H=="function"&&H.constructor;return B?B===a||(B.displayName||B.name)==="GeneratorFunction":!1},l.mark=function(H){return Object.setPrototypeOf?Object.setPrototypeOf(H,t):(H.__proto__=t,b in H||(H[b]="GeneratorFunction")),H.prototype=Object.create(k),H},l.awrap=function(H){return{__await:H}};function C(H){function B(W,X,ne,fe){var me=c(H[W],H,X);if(me.type==="throw")fe(me.arg);else{var Ae=me.arg,De=Ae.value;return De&&typeof De=="object"&&T.call(De,"__await")?Promise.resolve(De.__await).then(function(ye){B("next",ye,ne,fe)},function(ye){B("throw",ye,ne,fe)}):Promise.resolve(De).then(function(ye){Ae.value=ye,ne(Ae)},fe)}}var K;function U(W,X){function ne(){return new Promise(function(fe,me){B(W,X,fe,me)})}return K=K?K.then(ne,ne):ne()}this._invoke=U}O(C.prototype),C.prototype[S]=function(){return this},l.AsyncIterator=C,l.async=function(H,B,K,U){var W=new C(n(H,B,K,U));return l.isGeneratorFunction(B)?W:W.next().then(function(X){return X.done?X.value:W.next()})};function x(H,B,K){var U=u;return function(X,ne){if(U===h)throw new Error("Generator is already running");if(U===m){if(X==="throw")throw ne;return G()}for(K.method=X,K.arg=ne;;){var fe=K.delegate;if(fe){var me=y(fe,K);if(me){if(me===s)continue;return me}}if(K.method==="next")K.sent=K._sent=K.arg;else if(K.method==="throw"){if(U===u)throw U=m,K.arg;K.dispatchException(K.arg)}else K.method==="return"&&K.abrupt("return",K.arg);U=h;var Ae=c(H,B,K);if(Ae.type==="normal"){if(U=K.done?m:o,Ae.arg===s)continue;return{value:Ae.arg,done:K.done}}else Ae.type==="throw"&&(U=m,K.method="throw",K.arg=Ae.arg)}}}function y(H,B){var K=H.iterator[B.method];if(K===P){if(B.delegate=null,B.method==="throw"){if(H.iterator.return&&(B.method="return",B.arg=P,y(H,B),B.method==="throw"))return s;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var U=c(K,H.iterator,B.arg);if(U.type==="throw")return B.method="throw",B.arg=U.arg,B.delegate=null,s;var W=U.arg;if(!W)return B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,s;if(W.done)B[H.resultName]=W.value,B.next=H.nextLoc,B.method!=="return"&&(B.method="next",B.arg=P);else return W;return B.delegate=null,s}O(k),k[b]="Generator",k[v]=function(){return this},k.toString=function(){return"[object Generator]"};function _(H){var B={tryLoc:H[0]};1 in H&&(B.catchLoc=H[1]),2 in H&&(B.finallyLoc=H[2],B.afterLoc=H[3]),this.tryEntries.push(B)}function M(H){var B=H.completion||{};B.type="normal",delete B.arg,H.completion=B}function I(H){this.tryEntries=[{tryLoc:"root"}],H.forEach(_,this),this.reset(!0)}l.keys=function(H){var B=[];for(var K in H)B.push(K);return B.reverse(),function U(){for(;B.length;){var W=B.pop();if(W in H)return U.value=W,U.done=!1,U}return U.done=!0,U}};function N(H){if(H){var B=H[v];if(B)return B.call(H);if(typeof H.next=="function")return H;if(!isNaN(H.length)){var K=-1,U=function W(){for(;++K=0;--U){var W=this.tryEntries[U],X=W.completion;if(W.tryLoc==="root")return K("end");if(W.tryLoc<=this.prev){var ne=T.call(W,"catchLoc"),fe=T.call(W,"finallyLoc");if(ne&&fe){if(this.prev=0;--K){var U=this.tryEntries[K];if(U.tryLoc<=this.prev&&T.call(U,"finallyLoc")&&this.prev=0;--B){var K=this.tryEntries[B];if(K.finallyLoc===H)return this.complete(K.completion,K.afterLoc),M(K),s}},catch:function(H){for(var B=this.tryEntries.length-1;B>=0;--B){var K=this.tryEntries[B];if(K.tryLoc===H){var U=K.completion;if(U.type==="throw"){var W=U.arg;M(K)}return W}}throw new Error("illegal catch attempt")},delegateYield:function(H,B,K){return this.delegate={iterator:N(H),resultName:B,nextLoc:K},this.method==="next"&&(this.arg=P),s}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,Y,D){var L=j("buffer"),g=L.Buffer;function T(p,v){for(var S in p)v[S]=p[S]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?Y.exports=L:(T(L,D),D.Buffer=P);function P(p,v,S){return g(p,v,S)}T(g,P),P.from=function(p,v,S){if(typeof p=="number")throw new TypeError("Argument must not be a number");return g(p,v,S)},P.alloc=function(p,v,S){if(typeof p!="number")throw new TypeError("Argument must be a number");var b=g(p);return v!==void 0?typeof S=="string"?b.fill(v,S):b.fill(v):b.fill(0),b},P.allocUnsafe=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return g(p)},P.allocUnsafeSlow=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return L.SlowBuffer(p)}},{buffer:73}],229:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/core-js/string/from-code-point"),T=o(g),P=j("babel-runtime/core-js/json/stringify"),p=o(P),v=j("babel-runtime/helpers/typeof"),S=o(v),b=j("babel-runtime/core-js/object/define-property"),d=o(b),l=j("babel-runtime/core-js/object/keys"),n=o(l),c=j("babel-runtime/core-js/object/create"),u=o(c);function o(h){return h&&h.__esModule?h:{default:h}}(function(h){h.parser=function(V,Z){return new s(V,Z)},h.SAXParser=s,h.SAXStream=k,h.createStream=f,h.MAX_BUFFER_LENGTH=64*1024;var m=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];h.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function s(V,Z){if(!(this instanceof s))return new s(V,Z);var be=this;a(be),be.q=be.c="",be.bufferCheckPosition=h.MAX_BUFFER_LENGTH,be.opt=Z||{},be.opt.lowercase=be.opt.lowercase||be.opt.lowercasetags,be.looseCase=be.opt.lowercase?"toLowerCase":"toUpperCase",be.tags=[],be.closed=be.closedRoot=be.sawRoot=!1,be.tag=be.error=null,be.strict=!!V,be.noscript=!!(V||be.opt.noscript),be.state=X.BEGIN,be.strictEntities=be.opt.strictEntities,be.ENTITIES=be.strictEntities?(0,u.default)(h.XML_ENTITIES):(0,u.default)(h.ENTITIES),be.attribList=[],be.opt.xmlns&&(be.ns=(0,u.default)(_)),be.trackPosition=be.opt.position!==!1,be.trackPosition&&(be.position=be.line=be.column=0),fe(be,"onready")}u.default||(Object.create=function(V){function Z(){}Z.prototype=V;var be=new Z;return be}),n.default||(Object.keys=function(V){var Z=[];for(var be in V)V.hasOwnProperty(be)&&Z.push(be);return Z});function r(V){for(var Z=Math.max(h.MAX_BUFFER_LENGTH,10),be=0,ge=0,Te=m.length;geZ)switch(m[ge]){case"textNode":Ae(V);break;case"cdata":me(V,"oncdata",V.cdata),V.cdata="";break;case"script":me(V,"onscript",V.script),V.script="";break;default:ye(V,"Max buffer length exceeded: "+m[ge])}be=Math.max(be,Je)}var rt=h.MAX_BUFFER_LENGTH-be;V.bufferCheckPosition=rt+V.position}function a(V){for(var Z=0,be=m.length;Z"||H(V)}function U(V,Z){return V.test(Z)}function W(V,Z){return!U(V,Z)}var X=0;h.STATE={BEGIN:X++,BEGIN_WHITESPACE:X++,TEXT:X++,TEXT_ENTITY:X++,OPEN_WAKA:X++,SGML_DECL:X++,SGML_DECL_QUOTED:X++,DOCTYPE:X++,DOCTYPE_QUOTED:X++,DOCTYPE_DTD:X++,DOCTYPE_DTD_QUOTED:X++,COMMENT_STARTING:X++,COMMENT:X++,COMMENT_ENDING:X++,COMMENT_ENDED:X++,CDATA:X++,CDATA_ENDING:X++,CDATA_ENDING_2:X++,PROC_INST:X++,PROC_INST_BODY:X++,PROC_INST_ENDING:X++,OPEN_TAG:X++,OPEN_TAG_SLASH:X++,ATTRIB:X++,ATTRIB_NAME:X++,ATTRIB_NAME_SAW_WHITE:X++,ATTRIB_VALUE:X++,ATTRIB_VALUE_QUOTED:X++,ATTRIB_VALUE_CLOSED:X++,ATTRIB_VALUE_UNQUOTED:X++,ATTRIB_VALUE_ENTITY_Q:X++,ATTRIB_VALUE_ENTITY_U:X++,CLOSE_TAG:X++,CLOSE_TAG_SAW_WHITE:X++,SCRIPT:X++,SCRIPT_ENDING:X++},h.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},h.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)(h.ENTITIES).forEach(function(V){var Z=h.ENTITIES[V],be=typeof Z=="number"?String.fromCharCode(Z):Z;h.ENTITIES[V]=be});for(var ne in h.STATE)h.STATE[h.STATE[ne]]=ne;X=h.STATE;function fe(V,Z,be){V[Z]&&V[Z](be)}function me(V,Z,be){V.textNode&&Ae(V),fe(V,Z,be)}function Ae(V){V.textNode=De(V.opt,V.textNode),V.textNode&&fe(V,"ontext",V.textNode),V.textNode=""}function De(V,Z){return V.trim&&(Z=Z.trim()),V.normalize&&(Z=Z.replace(/\s+/g," ")),Z}function ye(V,Z){return Ae(V),V.trackPosition&&(Z+=` Line: `+V.line+` Column: `+V.column+` Char: `+V.c),Z=new Error(Z),V.error=Z,fe(V,"onerror",Z),V}function Oe(V){return V.sawRoot&&!V.closedRoot&&xe(V,"Unclosed root tag"),V.state!==X.BEGIN&&V.state!==X.BEGIN_WHITESPACE&&V.state!==X.TEXT&&ye(V,"Unexpected end"),Ae(V),V.c="",V.closed=!0,fe(V,"onend"),s.call(V,V.strict,V.opt),V}function xe(V,Z){if((typeof V=="undefined"?"undefined":(0,S.default)(V))!=="object"||!(V instanceof s))throw new Error("bad call to strictFail");V.strict&&ye(V,Z)}function ue(V){V.strict||(V.tagName=V.tagName[V.looseCase]());var Z=V.tags[V.tags.length-1]||V,be=V.tag={name:V.tagName,attributes:{}};V.opt.xmlns&&(be.ns=Z.ns),V.attribList.length=0,me(V,"onopentagstart",be)}function le(V,Z){var be=V.indexOf(":"),ge=be<0?["",V]:V.split(":"),Te=ge[0],Je=ge[1];return Z&&V==="xmlns"&&(Te="xmlns",Je=""),{prefix:Te,local:Je}}function re(V){if(V.strict||(V.attribName=V.attribName[V.looseCase]()),V.attribList.indexOf(V.attribName)!==-1||V.tag.attributes.hasOwnProperty(V.attribName)){V.attribName=V.attribValue="";return}if(V.opt.xmlns){var Z=le(V.attribName,!0),be=Z.prefix,ge=Z.local;if(be==="xmlns")if(ge==="xml"&&V.attribValue!==x)xe(V,"xml: prefix must be bound to "+x+` Actual: `+V.attribValue);else if(ge==="xmlns"&&V.attribValue!==y)xe(V,"xmlns: prefix must be bound to "+y+` Actual: `+V.attribValue);else{var Te=V.tag,Je=V.tags[V.tags.length-1]||V;Te.ns===Je.ns&&(Te.ns=(0,u.default)(Je.ns)),Te.ns[ge]=V.attribValue}V.attribList.push([V.attribName,V.attribValue])}else V.tag.attributes[V.attribName]=V.attribValue,me(V,"onattribute",{name:V.attribName,value:V.attribValue});V.attribName=V.attribValue=""}function pe(V,Z){if(V.opt.xmlns){var be=V.tag,ge=le(V.tagName);be.prefix=ge.prefix,be.local=ge.local,be.uri=be.ns[ge.prefix]||"",be.prefix&&!be.uri&&(xe(V,"Unbound namespace prefix: "+(0,p.default)(V.tagName)),be.uri=ge.prefix);var Te=V.tags[V.tags.length-1]||V;be.ns&&Te.ns!==be.ns&&(0,n.default)(be.ns).forEach(function(Qe){me(V,"onopennamespace",{prefix:Qe,uri:be.ns[Qe]})});for(var Je=0,rt=V.attribList.length;Je",V.tagName="",V.state=X.SCRIPT;return}me(V,"onscript",V.script),V.script=""}var Z=V.tags.length,be=V.tagName;V.strict||(be=be[V.looseCase]());for(var ge=be;Z--;){var Te=V.tags[Z];if(Te.name!==ge)xe(V,"Unexpected close tag");else break}if(Z<0){xe(V,"Unmatched closing tag: "+V.tagName),V.textNode+="",V.state=X.TEXT;return}V.tagName=be;for(var Je=V.tags.length;Je-- >Z;){var rt=V.tag=V.tags.pop();V.tagName=V.tag.name,me(V,"onclosetag",V.tagName);var nt={};for(var at in rt.ns)nt[at]=rt.ns[at];var ct=V.tags[V.tags.length-1]||V;V.opt.xmlns&&rt.ns!==ct.ns&&(0,n.default)(rt.ns).forEach(function(ht){var He=rt.ns[ht];me(V,"onclosenamespace",{prefix:ht,uri:He})})}Z===0&&(V.closedRoot=!0),V.tagName=V.attribValue=V.attribName="",V.attribList.length=0,V.state=X.TEXT}function te(V){var Z=V.entity,be=Z.toLowerCase(),ge,Te="";return V.ENTITIES[Z]?V.ENTITIES[Z]:V.ENTITIES[be]?V.ENTITIES[be]:(Z=be,Z.charAt(0)==="#"&&(Z.charAt(1)==="x"?(Z=Z.slice(2),ge=parseInt(Z,16),Te=ge.toString(16)):(Z=Z.slice(1),ge=parseInt(Z,10),Te=ge.toString(10))),Z=Z.replace(/^0+/,""),isNaN(ge)||Te.toLowerCase()!==Z?(xe(V,"Invalid character entity"),"&"+V.entity+";"):(0,T.default)(ge))}function ce(V,Z){Z==="<"?(V.state=X.OPEN_WAKA,V.startTagPosition=V.position):H(Z)||(xe(V,"Non-whitespace before first tag."),V.textNode=Z,V.state=X.TEXT)}function q(V,Z){var be="";return Z"?(me(Z,"onsgmldeclaration",Z.sgmlDecl),Z.sgmlDecl="",Z.state=X.TEXT):(B(ge)&&(Z.state=X.SGML_DECL_QUOTED),Z.sgmlDecl+=ge);continue;case X.SGML_DECL_QUOTED:ge===Z.q&&(Z.state=X.SGML_DECL,Z.q=""),Z.sgmlDecl+=ge;continue;case X.DOCTYPE:ge===">"?(Z.state=X.TEXT,me(Z,"ondoctype",Z.doctype),Z.doctype=!0):(Z.doctype+=ge,ge==="["?Z.state=X.DOCTYPE_DTD:B(ge)&&(Z.state=X.DOCTYPE_QUOTED,Z.q=ge));continue;case X.DOCTYPE_QUOTED:Z.doctype+=ge,ge===Z.q&&(Z.q="",Z.state=X.DOCTYPE);continue;case X.DOCTYPE_DTD:Z.doctype+=ge,ge==="]"?Z.state=X.DOCTYPE:B(ge)&&(Z.state=X.DOCTYPE_DTD_QUOTED,Z.q=ge);continue;case X.DOCTYPE_DTD_QUOTED:Z.doctype+=ge,ge===Z.q&&(Z.state=X.DOCTYPE_DTD,Z.q="");continue;case X.COMMENT:ge==="-"?Z.state=X.COMMENT_ENDING:Z.comment+=ge;continue;case X.COMMENT_ENDING:ge==="-"?(Z.state=X.COMMENT_ENDED,Z.comment=De(Z.opt,Z.comment),Z.comment&&me(Z,"oncomment",Z.comment),Z.comment=""):(Z.comment+="-"+ge,Z.state=X.COMMENT);continue;case X.COMMENT_ENDED:ge!==">"?(xe(Z,"Malformed comment"),Z.comment+="--"+ge,Z.state=X.COMMENT):Z.state=X.TEXT;continue;case X.CDATA:ge==="]"?Z.state=X.CDATA_ENDING:Z.cdata+=ge;continue;case X.CDATA_ENDING:ge==="]"?Z.state=X.CDATA_ENDING_2:(Z.cdata+="]"+ge,Z.state=X.CDATA);continue;case X.CDATA_ENDING_2:ge===">"?(Z.cdata&&me(Z,"oncdata",Z.cdata),me(Z,"onclosecdata"),Z.cdata="",Z.state=X.TEXT):ge==="]"?Z.cdata+="]":(Z.cdata+="]]"+ge,Z.state=X.CDATA);continue;case X.PROC_INST:ge==="?"?Z.state=X.PROC_INST_ENDING:H(ge)?Z.state=X.PROC_INST_BODY:Z.procInstName+=ge;continue;case X.PROC_INST_BODY:if(!Z.procInstBody&&H(ge))continue;ge==="?"?Z.state=X.PROC_INST_ENDING:Z.procInstBody+=ge;continue;case X.PROC_INST_ENDING:ge===">"?(me(Z,"onprocessinginstruction",{name:Z.procInstName,body:Z.procInstBody}),Z.procInstName=Z.procInstBody="",Z.state=X.TEXT):(Z.procInstBody+="?"+ge,Z.state=X.PROC_INST_BODY);continue;case X.OPEN_TAG:U(I,ge)?Z.tagName+=ge:(ue(Z),ge===">"?pe(Z):ge==="/"?Z.state=X.OPEN_TAG_SLASH:(H(ge)||xe(Z,"Invalid character in tag name"),Z.state=X.ATTRIB));continue;case X.OPEN_TAG_SLASH:ge===">"?(pe(Z,!0),ee(Z)):(xe(Z,"Forward-slash in opening tag not followed by >"),Z.state=X.ATTRIB);continue;case X.ATTRIB:if(H(ge))continue;ge===">"?pe(Z):ge==="/"?Z.state=X.OPEN_TAG_SLASH:U(M,ge)?(Z.attribName=ge,Z.attribValue="",Z.state=X.ATTRIB_NAME):xe(Z,"Invalid attribute name");continue;case X.ATTRIB_NAME:ge==="="?Z.state=X.ATTRIB_VALUE:ge===">"?(xe(Z,"Attribute without value"),Z.attribValue=Z.attribName,re(Z),pe(Z)):H(ge)?Z.state=X.ATTRIB_NAME_SAW_WHITE:U(I,ge)?Z.attribName+=ge:xe(Z,"Invalid attribute name");continue;case X.ATTRIB_NAME_SAW_WHITE:if(ge==="=")Z.state=X.ATTRIB_VALUE;else{if(H(ge))continue;xe(Z,"Attribute without value"),Z.tag.attributes[Z.attribName]="",Z.attribValue="",me(Z,"onattribute",{name:Z.attribName,value:""}),Z.attribName="",ge===">"?pe(Z):U(M,ge)?(Z.attribName=ge,Z.state=X.ATTRIB_NAME):(xe(Z,"Invalid attribute name"),Z.state=X.ATTRIB)}continue;case X.ATTRIB_VALUE:if(H(ge))continue;B(ge)?(Z.q=ge,Z.state=X.ATTRIB_VALUE_QUOTED):(xe(Z,"Unquoted attribute value"),Z.state=X.ATTRIB_VALUE_UNQUOTED,Z.attribValue=ge);continue;case X.ATTRIB_VALUE_QUOTED:if(ge!==Z.q){ge==="&"?Z.state=X.ATTRIB_VALUE_ENTITY_Q:Z.attribValue+=ge;continue}re(Z),Z.q="",Z.state=X.ATTRIB_VALUE_CLOSED;continue;case X.ATTRIB_VALUE_CLOSED:H(ge)?Z.state=X.ATTRIB:ge===">"?pe(Z):ge==="/"?Z.state=X.OPEN_TAG_SLASH:U(M,ge)?(xe(Z,"No whitespace between attributes"),Z.attribName=ge,Z.attribValue="",Z.state=X.ATTRIB_NAME):xe(Z,"Invalid attribute name");continue;case X.ATTRIB_VALUE_UNQUOTED:if(!K(ge)){ge==="&"?Z.state=X.ATTRIB_VALUE_ENTITY_U:Z.attribValue+=ge;continue}re(Z),ge===">"?pe(Z):Z.state=X.ATTRIB;continue;case X.CLOSE_TAG:if(Z.tagName)ge===">"?ee(Z):U(I,ge)?Z.tagName+=ge:Z.script?(Z.script+=""?ee(Z):xe(Z,"Invalid characters in closing tag");continue;case X.TEXT_ENTITY:case X.ATTRIB_VALUE_ENTITY_Q:case X.ATTRIB_VALUE_ENTITY_U:var rt,nt;switch(Z.state){case X.TEXT_ENTITY:rt=X.TEXT,nt="textNode";break;case X.ATTRIB_VALUE_ENTITY_Q:rt=X.ATTRIB_VALUE_QUOTED,nt="attribValue";break;case X.ATTRIB_VALUE_ENTITY_U:rt=X.ATTRIB_VALUE_UNQUOTED,nt="attribValue";break}ge===";"?(Z[nt]+=te(Z),Z.entity="",Z.state=rt):U(Z.entity.length?G:N,ge)?Z.entity+=ge:(xe(Z,"Invalid character in entity name"),Z[nt]+="&"+Z.entity+ge,Z.entity="",Z.state=rt);continue;default:throw new Error(Z,"Unknown state: "+Z.state)}}return Z.position>=Z.bufferCheckPosition&&r(Z),Z}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */T.default||function(){var V=String.fromCharCode,Z=Math.floor,be=function(){var Te=16384,Je=[],rt,nt,at=-1,ct=arguments.length;if(!ct)return"";for(var ht="";++at1114111||Z(He)!==He)throw RangeError("Invalid code point: "+He);He<=65535?Je.push(He):(He-=65536,rt=(He>>10)+55296,nt=He%1024+56320,Je.push(rt,nt)),(at+1===ct||Je.length>Te)&&(ht+=V.apply(null,Je),Je.length=0)}return ht};d.default?Object.defineProperty(String,"fromCodePoint",{value:be,configurable:!0,writable:!0}):String.fromCodePoint=be}()})(typeof D=="undefined"?(void 0).sax={}:D)}).call(this,j("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(j,Y,D){Y.exports=T;var L=j("events").EventEmitter,g=j("inherits");g(T,L),T.Readable=j("readable-stream/readable.js"),T.Writable=j("readable-stream/writable.js"),T.Duplex=j("readable-stream/duplex.js"),T.Transform=j("readable-stream/transform.js"),T.PassThrough=j("readable-stream/passthrough.js"),T.Stream=T;function T(){L.call(this)}T.prototype.pipe=function(P,p){var v=this;function S(o){P.writable&&(P.write(o)===!1&&v.pause&&v.pause())}v.on("data",S);function b(){v.readable&&v.resume&&v.resume()}P.on("drain",b),!P._isStdio&&(!p||p.end!==!1)&&(v.on("end",l),v.on("close",n));var d=!1;function l(){if(d)return;d=!0,P.end()}function n(){if(d)return;d=!0,typeof P.destroy=="function"&&P.destroy()}function c(o){if(u(),L.listenerCount(this,"error")===0)throw o}v.on("error",c),P.on("error",c);function u(){v.removeListener("data",S),P.removeListener("drain",b),v.removeListener("end",l),v.removeListener("close",n),v.removeListener("error",c),P.removeListener("error",c),v.removeListener("end",u),v.removeListener("close",u),P.removeListener("close",u)}return v.on("end",u),v.on("close",u),P.on("close",u),P.emit("pipe",v),P}},{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(j,Y,D){(function(L){var g=j("./lib/request"),T=j("./lib/response"),P=j("xtend"),p=j("builtin-status-codes"),v=j("url"),S=D;S.request=function(b,d){typeof b=="string"?b=v.parse(b):b=P(b);var l=L.location.protocol.search(/^https?:$/)===-1?"http:":"",n=b.protocol||l,c=b.hostname||b.host,u=b.port,o=b.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),b.url=(c?n+"//"+c:"")+(u?":"+u:"")+o,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var h=new g(b);return d&&h.on("response",d),h},S.get=function(d,l){var n=S.request(d,l);return n.end(),n},S.ClientRequest=g,S.IncomingMessage=T.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=p,S.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(j,Y,D){(function(L){"use strict";D.fetch=S(L.fetch)&&S(L.ReadableStream),D.writableStream=S(L.WritableStream),D.abortController=S(L.AbortController),D.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),D.blobConstructor=!0}catch(b){}var g;function T(){if(g!==void 0)return g;if(L.XMLHttpRequest){g=new L.XMLHttpRequest;try{g.open("GET",L.XDomainRequest?"/":"https://example.com")}catch(b){g=null}}else g=null;return g}function P(b){var d=T();if(!d)return!1;try{return d.responseType=b,d.responseType===b}catch(l){}return!1}var p=typeof L.ArrayBuffer!="undefined",v=p&&S(L.ArrayBuffer.prototype.slice);D.arraybuffer=D.fetch||p&&P("arraybuffer"),D.msstream=!D.fetch&&v&&P("ms-stream"),D.mozchunkedarraybuffer=!D.fetch&&p&&P("moz-chunked-arraybuffer"),D.overrideMimeType=D.fetch||(T()?S(T().overrideMimeType):!1),D.vbArray=S(L.VBArray);function S(b){return typeof b=="function"}g=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(j,Y,D){(function(L,g,T){"use strict";var P=j("babel-runtime/core-js/object/keys"),p=v(P);function v(r){return r&&r.__esModule?r:{default:r}}var S=j("./capability"),b=j("inherits"),d=j("./response"),l=j("readable-stream"),n=j("to-arraybuffer"),c=d.IncomingMessage,u=d.readyStates;function o(r,a){return S.fetch&&a?"fetch":S.mozchunkedarraybuffer?"moz-chunked-arraybuffer":S.msstream?"ms-stream":S.arraybuffer&&r?"arraybuffer":S.vbArray&&r?"text:vbarray":"text"}var h=Y.exports=function(r){var a=this;l.Writable.call(a),a._opts=r,a._body=[],a._headers={},r.auth&&a.setHeader("Authorization","Basic "+new T(r.auth).toString("base64")),(0,p.default)(r.headers).forEach(function(E){a.setHeader(E,r.headers[E])});var t,w=!0;if(r.mode==="disable-fetch"||"requestTimeout"in r&&!S.abortController)w=!1,t=!0;else if(r.mode==="prefer-streaming")t=!1;else if(r.mode==="allow-wrong-content-type")t=!S.overrideMimeType;else if(!r.mode||r.mode==="default"||r.mode==="prefer-fast")t=!0;else throw new Error("Invalid value for opts.mode");a._mode=o(t,w),a._fetchTimer=null,a.on("finish",function(){a._onFinish()})};b(h,l.Writable),h.prototype.setHeader=function(r,a){var t=this,w=r.toLowerCase();if(s.indexOf(w)!==-1)return;t._headers[w]={name:r,value:a}},h.prototype.getHeader=function(r){var a=this._headers[r.toLowerCase()];return a?a.value:null},h.prototype.removeHeader=function(r){var a=this;delete a._headers[r.toLowerCase()]},h.prototype._onFinish=function(){var r=this;if(r._destroyed)return;var a=r._opts,t=r._headers,w=null;a.method!=="GET"&&a.method!=="HEAD"&&(S.arraybuffer?w=n(T.concat(r._body)):S.blobConstructor?w=new g.Blob(r._body.map(function(x){return n(x)}),{type:(t["content-type"]||{}).value||""}):w=T.concat(r._body).toString());var E=[];if((0,p.default)(t).forEach(function(x){var y=t[x].name,_=t[x].value;Array.isArray(_)?_.forEach(function(M){E.push([y,M])}):E.push([y,_])}),r._mode==="fetch"){var f=null,k=null;if(S.abortController){var O=new AbortController;f=O.signal,r._fetchAbortController=O,"requestTimeout"in a&&a.requestTimeout!==0&&(r._fetchTimer=g.setTimeout(function(){r.emit("requestTimeout"),r._fetchAbortController&&r._fetchAbortController.abort()},a.requestTimeout))}g.fetch(r._opts.url,{method:r._opts.method,headers:E,body:w||void 0,mode:"cors",credentials:a.withCredentials?"include":"same-origin",signal:f}).then(function(x){r._fetchResponse=x,r._connect()},function(x){g.clearTimeout(r._fetchTimer),r._destroyed||r.emit("error",x)})}else{var C=r._xhr=new g.XMLHttpRequest;try{C.open(r._opts.method,r._opts.url,!0)}catch(x){L.nextTick(function(){r.emit("error",x)});return}"responseType"in C&&(C.responseType=r._mode.split(":")[0]),"withCredentials"in C&&(C.withCredentials=!!a.withCredentials),r._mode==="text"&&"overrideMimeType"in C&&C.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in a&&(C.timeout=a.requestTimeout,C.ontimeout=function(){r.emit("requestTimeout")}),E.forEach(function(x){C.setRequestHeader(x[0],x[1])}),r._response=null,C.onreadystatechange=function(){switch(C.readyState){case u.LOADING:case u.DONE:r._onXHRProgress();break}},r._mode==="moz-chunked-arraybuffer"&&(C.onprogress=function(){r._onXHRProgress()}),C.onerror=function(){if(r._destroyed)return;r.emit("error",new Error("XHR error"))};try{C.send(w)}catch(x){L.nextTick(function(){r.emit("error",x)});return}}};function m(r){try{var a=r.status;return a!==null&&a!==0}catch(t){return!1}}h.prototype._onXHRProgress=function(){var r=this;if(!m(r._xhr)||r._destroyed)return;r._response||r._connect(),r._response._onXHRProgress()},h.prototype._connect=function(){var r=this;if(r._destroyed)return;r._response=new c(r._xhr,r._fetchResponse,r._mode,r._fetchTimer),r._response.on("error",function(a){r.emit("error",a)}),r.emit("response",r._response)},h.prototype._write=function(r,a,t){var w=this;w._body.push(r),t()},h.prototype.abort=h.prototype.destroy=function(){var r=this;r._destroyed=!0,g.clearTimeout(r._fetchTimer),r._response&&(r._response._destroyed=!0),r._xhr?r._xhr.abort():r._fetchAbortController&&r._fetchAbortController.abort()},h.prototype.end=function(r,a,t){var w=this;typeof r=="function"&&(t=r,r=void 0),l.Writable.prototype.end.call(w,r,a,t)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var s=["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,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("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(j,Y,D){(function(L,g,T){"use strict";var P=j("babel-runtime/core-js/promise"),p=v(P);function v(c){return c&&c.__esModule?c:{default:c}}var S=j("./capability"),b=j("inherits"),d=j("readable-stream"),l=D.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=D.IncomingMessage=function(c,u,o,h){var m=this;if(d.Readable.call(m),m._mode=o,m.headers={},m.rawHeaders=[],m.trailers={},m.rawTrailers=[],m.on("end",function(){L.nextTick(function(){m.emit("close")})}),o==="fetch"){var s=function f(){a.read().then(function(k){if(m._destroyed)return;if(k.done){g.clearTimeout(h),m.push(null);return}m.push(new T(k.value)),f()}).catch(function(k){g.clearTimeout(h),m._destroyed||m.emit("error",k)})};if(m._fetchResponse=u,m.url=u.url,m.statusCode=u.status,m.statusMessage=u.statusText,u.headers.forEach(function(f,k){m.headers[k.toLowerCase()]=f,m.rawHeaders.push(k,f)}),S.writableStream){var r=new WritableStream({write:function(k){return new p.default(function(O,C){m._destroyed?C():m.push(new T(k))?O():m._resumeFetch=O})},close:function(){g.clearTimeout(h),m._destroyed||m.push(null)},abort:function(k){m._destroyed||m.emit("error",k)}});try{u.body.pipeTo(r).catch(function(f){g.clearTimeout(h),m._destroyed||m.emit("error",f)});return}catch(f){}}var a=u.body.getReader();s()}else{m._xhr=c,m._pos=0,m.url=c.responseURL,m.statusCode=c.status,m.statusMessage=c.statusText;var t=c.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(f){var k=f.match(/^([^:]+):\s*(.*)/);if(k){var O=k[1].toLowerCase();O==="set-cookie"?(m.headers[O]===void 0&&(m.headers[O]=[]),m.headers[O].push(k[2])):m.headers[O]!==void 0?m.headers[O]+=", "+k[2]:m.headers[O]=k[2],m.rawHeaders.push(k[1],k[2])}}),m._charset="x-user-defined",!S.overrideMimeType){var w=m.rawHeaders["mime-type"];if(w){var E=w.match(/;\s*charset=([^;])(;|$)/);E&&(m._charset=E[1].toLowerCase())}m._charset||(m._charset="utf-8")}}};b(n,d.Readable),n.prototype._read=function(){var c=this,u=c._resumeFetch;u&&(c._resumeFetch=null,u())},n.prototype._onXHRProgress=function(){var c=this,u=c._xhr,o=null;switch(c._mode){case"text:vbarray":if(u.readyState!==l.DONE)break;try{o=new g.VBArray(u.responseBody).toArray()}catch(a){}if(o!==null){c.push(new T(o));break}case"text":try{o=u.responseText}catch(a){c._mode="text:vbarray";break}if(o.length>c._pos){var h=o.substr(c._pos);if(c._charset==="x-user-defined"){for(var m=new T(h.length),s=0;sc._pos&&(c.push(new T(new Uint8Array(r.result.slice(c._pos)))),c._pos=r.result.byteLength)},r.onload=function(){c.push(null)},r.readAsArrayBuffer(o);break}c._xhr.readyState===l.DONE&&c._mode!=="ms-stream"&&c.push(null)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(j,Y,D){"use strict";var L=j("safe-buffer").Buffer,g=L.isEncoding||function(r){r=""+r;switch(r&&r.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T(r){if(!r)return"utf8";for(var a;;)switch(r){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 r;default:if(a)return;r=(""+r).toLowerCase(),a=!0}}function P(r){var a=T(r);if(typeof a!="string"&&(L.isEncoding===g||!g(r)))throw new Error("Unknown encoding: "+r);return a||r}D.StringDecoder=p;function p(r){this.encoding=P(r);var a;switch(this.encoding){case"utf16le":this.text=c,this.end=u,a=4;break;case"utf8":this.fillLast=d,a=4;break;case"base64":this.text=o,this.end=h,a=3;break;default:this.write=m,this.end=s;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=L.allocUnsafe(a)}p.prototype.write=function(r){if(r.length===0)return"";var a,t;if(this.lastNeed){if(a=this.fillLast(r),a===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t>5===6?2:r>>4===14?3:r>>3===30?4:r>>6===2?-1:-2}function S(r,a,t){var w=a.length-1;if(w=0?(E>0&&(r.lastNeed=E-1),E):--w=0?(E>0&&(r.lastNeed=E-2),E):--w=0?(E>0&&(E===2?E=0:r.lastNeed=E-3),E):0))}function b(r,a,t){if((a[0]&192)!==128)return r.lastNeed=0,"\uFFFD";if(r.lastNeed>1&&a.length>1){if((a[1]&192)!==128)return r.lastNeed=1,"\uFFFD";if(r.lastNeed>2&&a.length>2&&(a[2]&192)!==128)return r.lastNeed=2,"\uFFFD"}}function d(r){var a=this.lastTotal-this.lastNeed,t=b(this,r,a);if(t!==void 0)return t;if(this.lastNeed<=r.length)return r.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,a,0,r.length),this.lastNeed-=r.length}function l(r,a){var t=S(this,r,a);if(!this.lastNeed)return r.toString("utf8",a);this.lastTotal=t;var w=r.length-(t-this.lastNeed);return r.copy(this.lastChar,0,w),r.toString("utf8",a,w)}function n(r){var a=r&&r.length?this.write(r):"";return this.lastNeed?a+"\uFFFD":a}function c(r,a){if((r.length-a)%2===0){var t=r.toString("utf16le",a);if(t){var w=t.charCodeAt(t.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=r[r.length-1],r.toString("utf16le",a,r.length-1)}function u(r){var a=r&&r.length?this.write(r):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,t)}return a}function o(r,a){var t=(r.length-a)%3;return t===0?r.toString("base64",a):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=r[r.length-1]:(this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1]),r.toString("base64",a,r.length-t))}function h(r){var a=r&&r.length?this.write(r):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function m(r){return r.toString(this.encoding)}function s(r){return r&&r.length?this.write(r):""}},{"safe-buffer":228}],236:[function(j,Y,D){(function(L,g){var T=j("process/browser.js").nextTick,P=Function.prototype.apply,p=Array.prototype.slice,v={},S=0;D.setTimeout=function(){return new b(P.call(setTimeout,window,arguments),clearTimeout)},D.setInterval=function(){return new b(P.call(setInterval,window,arguments),clearInterval)},D.clearTimeout=D.clearInterval=function(d){d.close()};function b(d,l){this._id=d,this._clearFn=l}b.prototype.unref=b.prototype.ref=function(){},b.prototype.close=function(){this._clearFn.call(window,this._id)},D.enroll=function(d,l){clearTimeout(d._idleTimeoutId),d._idleTimeout=l},D.unenroll=function(d){clearTimeout(d._idleTimeoutId),d._idleTimeout=-1},D._unrefActive=D.active=function(d){clearTimeout(d._idleTimeoutId);var l=d._idleTimeout;l>=0&&(d._idleTimeoutId=setTimeout(function(){d._onTimeout&&d._onTimeout()},l))},D.setImmediate=typeof L=="function"?L:function(d){var l=S++,n=arguments.length<2?!1:p.call(arguments,1);return v[l]=!0,T(function(){v[l]&&(n?d.apply(null,n):d.call(null),D.clearImmediate(l))}),l},D.clearImmediate=typeof g=="function"?g:function(d){delete v[d]}}).call(this,j("timers").setImmediate,j("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(j,Y,D){var L=j("buffer").Buffer;Y.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(L.isBuffer(g)){for(var T=new Uint8Array(g.length),P=g.length,p=0;p",'"',"`"," ","\r",` `," "],b=["{","}","|","\\","^","`"].concat(S),d=["'"].concat(b),l=["%","/","?",";","#"].concat(d),n=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,o=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},s={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},r=j("querystring");function a(f,k,O){if(f&&g.isObject(f)&&f instanceof T)return f;var C=new T;return C.parse(f,k,O),C}T.prototype.parse=function(f,k,O){if(!g.isString(f))throw new TypeError("Parameter 'url' must be a string, not "+typeof f);var C=f.indexOf("?"),x=C!==-1&&C127?De+="x":De+=Ae[ye];if(!De.match(u)){var xe=fe.slice(0,K),ue=fe.slice(K+1),le=Ae.match(o);le&&(xe.push(le[1]),ue.unshift(le[2])),ue.length&&(M="/"+ue.join(".")+M),this.hostname=xe.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),ne||(this.hostname=L.toASCII(this.hostname));var re=this.port?":"+this.port:"",pe=this.hostname||"";this.host=pe+re,this.href+=this.host,ne&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!h[G])for(var K=0,me=d.length;K0?O.host.split("@"):!1;De&&(O.auth=De.shift(),O.host=O.hostname=De.shift())}return O.search=f.search,O.query=f.query,(!g.isNull(O.pathname)||!g.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!fe.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var ye=fe.slice(-1)[0],Oe=(O.host||f.host||fe.length>1)&&(ye==="."||ye==="..")||ye==="",xe=0,ue=fe.length;ue>=0;ue--)ye=fe[ue],ye==="."?fe.splice(ue,1):ye===".."?(fe.splice(ue,1),xe++):xe&&(fe.splice(ue,1),xe--);if(!X&&!ne)for(;xe--;xe)fe.unshift("..");X&&fe[0]!==""&&(!fe[0]||fe[0].charAt(0)!=="/")&&fe.unshift(""),Oe&&fe.join("/").substr(-1)!=="/"&&fe.push("");var le=fe[0]===""||fe[0]&&fe[0].charAt(0)==="/";if(Ae){O.hostname=O.host=le?"":fe.length?fe.shift():"";var De=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;De&&(O.auth=De.shift(),O.host=O.hostname=De.shift())}return X=X||O.host&&fe.length,X&&!le&&fe.unshift(""),fe.length?O.pathname=fe.join("/"):(O.pathname=null,O.path=null),(!g.isNull(O.pathname)||!g.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=f.auth||O.auth,O.slashes=O.slashes||f.slashes,O.href=O.format(),O},T.prototype.parseHost=function(){var f=this.host,k=p.exec(f);k&&(k=k[0],k!==":"&&(this.port=k.substr(1)),f=f.substr(0,f.length-k.length)),f&&(this.hostname=f)}},{"./util":239,punycode:209,querystring:212}],239:[function(j,Y,D){"use strict";Y.exports={isString:function(L){return typeof L=="string"},isObject:function(L){return typeof L=="object"&&L!==null},isNull:function(L){return L===null},isNullOrUndefined:function(L){return L==null}}},{}],240:[function(j,Y,D){(function(L){Y.exports=g;function g(P,p){if(T("noDeprecation"))return P;var v=!1;function S(){if(!v){if(T("throwDeprecation"))throw new Error(p);T("traceDeprecation")?console.trace(p):console.warn(p),v=!0}return P.apply(this,arguments)}return S}function T(P){try{if(!L.localStorage)return!1}catch(v){return!1}var p=L.localStorage[P];return p==null?!1:String(p).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(j,Y,D){typeof Object.create=="function"?Y.exports=function(g,T){g.super_=T,g.prototype=Object.create(T.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:Y.exports=function(g,T){g.super_=T;var P=function(){};P.prototype=T.prototype,g.prototype=new P,g.prototype.constructor=g}},{}],242:[function(j,Y,D){Y.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],243:[function(j,Y,D){(function(L,g){var T=/%[sdj%]/g;D.format=function(B){if(!w(B)){for(var K=[],U=0;U=X)return me;switch(me){case"%s":return String(W[U++]);case"%d":return Number(W[U++]);case"%j":try{return JSON.stringify(W[U++])}catch(Ae){return"[Circular]"}default:return me}}),fe=W[U];U=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),s(K)?U.showHidden=K:K&&D._extend(U,K),f(U.showHidden)&&(U.showHidden=!1),f(U.depth)&&(U.depth=2),f(U.colors)&&(U.colors=!1),f(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=S),l(U,B,U.depth)}D.inspect=v,v.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]},v.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function S(B,K){var U=v.styles[K];return U?"["+v.colors[U][0]+"m"+B+"["+v.colors[U][1]+"m":B}function b(B,K){return B}function d(B){var K={};return B.forEach(function(U,W){K[U]=!0}),K}function l(B,K,U){if(B.customInspect&&K&&y(K.inspect)&&K.inspect!==D.inspect&&!(K.constructor&&K.constructor.prototype===K)){var W=K.inspect(U,B);return w(W)||(W=l(B,W,U)),W}var X=n(B,K);if(X)return X;var ne=Object.keys(K),fe=d(ne);if(B.showHidden&&(ne=Object.getOwnPropertyNames(K)),x(K)&&(ne.indexOf("message")>=0||ne.indexOf("description")>=0))return c(K);if(ne.length===0){if(y(K)){var me=K.name?": "+K.name:"";return B.stylize("[Function"+me+"]","special")}if(k(K))return B.stylize(RegExp.prototype.toString.call(K),"regexp");if(C(K))return B.stylize(Date.prototype.toString.call(K),"date");if(x(K))return c(K)}var Ae="",De=!1,ye=["{","}"];if(m(K)&&(De=!0,ye=["[","]"]),y(K)){var Oe=K.name?": "+K.name:"";Ae=" [Function"+Oe+"]"}if(k(K)&&(Ae=" "+RegExp.prototype.toString.call(K)),C(K)&&(Ae=" "+Date.prototype.toUTCString.call(K)),x(K)&&(Ae=" "+c(K)),ne.length===0&&(!De||K.length==0))return ye[0]+Ae+ye[1];if(U<0)return k(K)?B.stylize(RegExp.prototype.toString.call(K),"regexp"):B.stylize("[Object]","special");B.seen.push(K);var xe;return De?xe=u(B,K,U,fe,ne):xe=ne.map(function(ue){return o(B,K,U,fe,ue,De)}),B.seen.pop(),h(xe,Ae,ye)}function n(B,K){if(f(K))return B.stylize("undefined","undefined");if(w(K)){var U="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(U,"string")}if(t(K))return B.stylize(""+K,"number");if(s(K))return B.stylize(""+K,"boolean");if(r(K))return B.stylize("null","null")}function c(B){return"["+Error.prototype.toString.call(B)+"]"}function u(B,K,U,W,X){for(var ne=[],fe=0,me=K.length;fe-1&&(ne?me=me.split(` `).map(function(De){return" "+De}).join(` `).substr(2):me=` `+me.split(` `).map(function(De){return" "+De}).join(` `))):me=B.stylize("[Circular]","special")),f(fe)){if(ne&&X.match(/^\d+$/))return me;fe=JSON.stringify(""+X),fe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(fe=fe.substr(1,fe.length-2),fe=B.stylize(fe,"name")):(fe=fe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),fe=B.stylize(fe,"string"))}return fe+": "+me}function h(B,K,U){var W=0,X=B.reduce(function(ne,fe){return W++,fe.indexOf(` `)>=0&&W++,ne+fe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return X>60?U[0]+(K===""?"":K+` `)+" "+B.join(`, `)+" "+U[1]:U[0]+K+" "+B.join(", ")+" "+U[1]}function m(B){return Array.isArray(B)}D.isArray=m;function s(B){return typeof B=="boolean"}D.isBoolean=s;function r(B){return B===null}D.isNull=r;function a(B){return B==null}D.isNullOrUndefined=a;function t(B){return typeof B=="number"}D.isNumber=t;function w(B){return typeof B=="string"}D.isString=w;function E(B){return typeof B=="symbol"}D.isSymbol=E;function f(B){return B===void 0}D.isUndefined=f;function k(B){return O(B)&&M(B)==="[object RegExp]"}D.isRegExp=k;function O(B){return typeof B=="object"&&B!==null}D.isObject=O;function C(B){return O(B)&&M(B)==="[object Date]"}D.isDate=C;function x(B){return O(B)&&(M(B)==="[object Error]"||B instanceof Error)}D.isError=x;function y(B){return typeof B=="function"}D.isFunction=y;function _(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B=="undefined"}D.isPrimitive=_,D.isBuffer=j("./support/isBuffer");function M(B){return Object.prototype.toString.call(B)}function I(B){return B<10?"0"+B.toString(10):B.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var B=new Date,K=[I(B.getHours()),I(B.getMinutes()),I(B.getSeconds())].join(":");return[B.getDate(),N[B.getMonth()],K].join(" ")}D.log=function(){console.log("%s - %s",G(),D.format.apply(D,arguments))},D.inherits=j("inherits"),D._extend=function(B,K){if(!K||!O(K))return B;for(var U=Object.keys(K),W=U.length;W--;)B[U[W]]=K[U[W]];return B};function H(B,K){return Object.prototype.hasOwnProperty.call(B,K)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(j,Y,D){"use strict";(function(){"use strict";D.stripBOM=function(L){return L[0]==="\uFEFF"?L.substring(1):L}}).call(void 0)},{}],245:[function(j,Y,D){"use strict";var L=j("babel-runtime/helpers/typeof"),g=p(L),T=j("babel-runtime/core-js/object/keys"),P=p(T);function p(v){return v&&v.__esModule?v:{default:v}}(function(){"use strict";var v,S,b,d,l,n={}.hasOwnProperty;v=j("xmlbuilder"),S=j("./defaults").defaults,d=function(u){return typeof u=="string"&&(u.indexOf("&")>=0||u.indexOf(">")>=0||u.indexOf("<")>=0)},l=function(u){return""},b=function(u){return u.replace("]]>","]]]]>")},D.Builder=function(){function c(u){var o,h,m;this.options={},h=S["0.2"];for(o in h){if(!n.call(h,o))continue;m=h[o],this.options[o]=m}for(o in u){if(!n.call(u,o))continue;m=u[o],this.options[o]=m}}return c.prototype.buildObject=function(u){var o,h,m,s,r;return o=this.options.attrkey,h=this.options.charkey,(0,P.default)(u).length===1&&this.options.rootName===S["0.2"].rootName?(r=(0,P.default)(u)[0],u=u[r]):r=this.options.rootName,m=function(a){return function(t,w){var E,f,k,O,C,x;if((typeof w=="undefined"?"undefined":(0,g.default)(w))!=="object")a.options.cdata&&d(w)?t.raw(l(w)):t.txt(w);else if(Array.isArray(w))for(O in w){if(!n.call(w,O))continue;f=w[O];for(C in f)k=f[C],t=m(t.ele(C),k).up()}else for(C in w){if(!n.call(w,C))continue;if(f=w[C],C===o){if((typeof f=="undefined"?"undefined":(0,g.default)(f))==="object")for(E in f)x=f[E],t=t.att(E,x)}else if(C===h)a.options.cdata&&d(f)?t=t.raw(l(f)):t=t.txt(f);else if(Array.isArray(f))for(O in f){if(!n.call(f,O))continue;k=f[O],typeof k=="string"?a.options.cdata&&d(k)?t=t.ele(C).raw(l(k)).up():t=t.ele(C,k).up():t=m(t.ele(C),k).up()}else(typeof f=="undefined"?"undefined":(0,g.default)(f))==="object"?t=m(t.ele(C),f).up():typeof f=="string"&&a.options.cdata&&d(f)?t=t.ele(C).raw(l(f)).up():(f==null&&(f=""),t=t.ele(C,f.toString()).up())}return t}}(this),s=v.create(r,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),m(s,u).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(j,Y,D){"use strict";(function(){D.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(j,Y,D){"use strict";var L=j("babel-runtime/core-js/promise"),g=d(L),T=j("babel-runtime/core-js/object/get-own-property-names"),P=d(T),p=j("babel-runtime/core-js/object/keys"),v=d(p),S=j("babel-runtime/helpers/typeof"),b=d(S);function d(l){return l&&l.__esModule?l:{default:l}}(function(){"use strict";var l,n,c,u,o,h,m,s,r=function(E,f){return function(){return E.apply(f,arguments)}},a=function(E,f){for(var k in f)t.call(f,k)&&(E[k]=f[k]);function O(){this.constructor=E}return O.prototype=f.prototype,E.prototype=new O,E.__super__=f.prototype,E},t={}.hasOwnProperty;m=j("sax"),c=j("events"),l=j("./bom"),h=j("./processors"),s=j("timers").setImmediate,n=j("./defaults").defaults,u=function(E){return(typeof E=="undefined"?"undefined":(0,b.default)(E))==="object"&&E!=null&&(0,v.default)(E).length===0},o=function(E,f,k){var O,C,x;for(O=0,C=E.length;O0&&(I[x.options.childkey]=G),G=I;else if(K){K[x.options.childkey]=K[x.options.childkey]||[],H={};for(M in G){if(!t.call(G,M))continue;H[M]=G[M]}K[x.options.childkey].push(H),delete G["#name"],(0,v.default)(G).length===1&&k in G&&!x.EXPLICIT_CHARKEY&&(G=G[k])}}return C.length>0?x.assignOrPush(K,N,G):(x.options.explicitRoot&&(B=G,G={},G[N]=B),x.resultObject=G,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),O=function(x){return function(y){var _,M;if(M=C[C.length-1],M)return M[k]+=y,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||y.replace(/\\n/g,"").trim()!=="")&&(M[x.options.childkey]=M[x.options.childkey]||[],_={"#name":"__text__"},_[k]=y,x.options.normalize&&(_[k]=_[k].replace(/\s{2,}/g," ").trim()),M[x.options.childkey].push(_)),M}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(x){return function(y){var _;if(_=O(y),_)return _.cdata=!0}}(this)},E.prototype.parseString=function(f,k){var O;k!=null&&typeof k=="function"&&(this.on("end",function(C){return this.reset(),k(null,C)}),this.on("error",function(C){return this.reset(),k(C)}));try{return f=f.toString(),f.trim()===""?(this.emit("end",null),!0):(f=l.stripBOM(f),this.options.async?(this.remaining=f,s(this.processAsync),this.saxParser):this.saxParser.write(f).close())}catch(C){if(O=C,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},E.prototype.parseStringPromise=function(f){return new g.default(function(k){return function(O,C){return k.parseString(f,function(x,y){return x?C(x):O(y)})}}(this))},E}(c),D.parseString=function(w,E,f){var k,O,C;return f!=null?(typeof f=="function"&&(k=f),(typeof E=="undefined"?"undefined":(0,b.default)(E))==="object"&&(O=E)):(typeof E=="function"&&(k=E),O={}),C=new D.Parser(O),C.parseString(w,k)},D.parseStringPromise=function(w,E){var f,k;return(typeof E=="undefined"?"undefined":(0,b.default)(E))==="object"&&(f=E),k=new D.Parser(f),k.parseStringPromise(w)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(j,Y,D){"use strict";(function(){"use strict";var L;L=new RegExp(/(?!xmlns)^.*:/),D.normalize=function(g){return g.toLowerCase()},D.firstCharLowerCase=function(g){return g.charAt(0).toLowerCase()+g.slice(1)},D.stripPrefix=function(g){return g.replace(L,"")},D.parseNumbers=function(g){return isNaN(g)||(g=g%1===0?parseInt(g,10):parseFloat(g)),g},D.parseBooleans=function(g){return/^(?:true|false)$/i.test(g)&&(g=g.toLowerCase()==="true"),g}}).call(void 0)},{}],249:[function(j,Y,D){"use strict";(function(){"use strict";var L,g,T,P,p=function(b,d){for(var l in d)v.call(d,l)&&(b[l]=d[l]);function n(){this.constructor=b}return n.prototype=d.prototype,b.prototype=new n,b.__super__=d.prototype,b},v={}.hasOwnProperty;g=j("./defaults"),L=j("./builder"),T=j("./parser"),P=j("./processors"),D.defaults=g.defaults,D.processors=P,D.ValidationError=function(S){p(b,S);function b(d){this.message=d}return b}(Error),D.Builder=L.Builder,D.Parser=T.Parser,D.parseString=T.parseString,D.parseStringPromise=T.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(j,Y,D){"use strict";(function(){Y.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(j,Y,D){"use strict";(function(){Y.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/get-prototype-of"),g=S(L),T=j("babel-runtime/helpers/typeof"),P=S(T),p=j("babel-runtime/core-js/object/assign"),v=S(p);function S(b){return b&&b.__esModule?b:{default:b}}(function(){var b,d,l,n,c,u,o,h=[].slice,m={}.hasOwnProperty;b=function(){var r,a,t,w,E,f;if(f=arguments[0],E=2<=arguments.length?h.call(arguments,1):[],c(v.default))v.default.apply(null,arguments);else for(r=0,t=E.length;r":"attribute: {"+b+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(b){return b.namespaceURI!==this.namespaceURI||(b.prefix!==this.prefix||b.localName!==this.localName)?!1:!(b.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S=function(l,n){for(var c in n)b.call(n,c)&&(l[c]=n[c]);function u(){this.constructor=l}return u.prototype=n.prototype,l.prototype=new u,l.__super__=n.prototype,l},b={}.hasOwnProperty;P=j("./NodeType"),v=j("./XMLCharacterData"),Y.exports=p=function(d){S(l,d);function l(n,c){if(l.__super__.constructor.call(this,n),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=P.CData,this.value=this.stringify.cdata(c)}return l.prototype.clone=function(){return(0,g.default)(this)},l.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},l}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v=function(d,l){for(var n in l)S.call(l,n)&&(d[n]=l[n]);function c(){this.constructor=d}return c.prototype=l.prototype,d.prototype=new c,d.__super__=l.prototype,d},S={}.hasOwnProperty;p=j("./XMLNode"),Y.exports=P=function(b){v(d,b);function d(l){d.__super__.constructor.call(this,l),this.value=""}return Object.defineProperty(d.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(d.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(d.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.substringData=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.appendData=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.insertData=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.deleteData=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.replaceData=function(l,n,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.isEqualNode=function(l){return d.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)?!(l.data!==this.data):!1},d}(p)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S=function(l,n){for(var c in n)b.call(n,c)&&(l[c]=n[c]);function u(){this.constructor=l}return u.prototype=n.prototype,l.prototype=new u,l.__super__=n.prototype,l},b={}.hasOwnProperty;P=j("./NodeType"),p=j("./XMLCharacterData"),Y.exports=v=function(d){S(l,d);function l(n,c){if(l.__super__.constructor.call(this,n),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=P.Comment,this.value=this.stringify.comment(c)}return l.prototype.clone=function(){return(0,g.default)(this)},l.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},l}(p)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=p(L),T=j("babel-runtime/core-js/object/create"),P=p(T);function p(v){return v&&v.__esModule?v:{default:v}}(function(){var v,S,b;S=j("./XMLDOMErrorHandler"),b=j("./XMLDOMStringList"),Y.exports=v=function(){function d(){var l;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new S,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=l=(0,P.default)(this.defaultParams)}return Object.defineProperty(d.prototype,"parameterNames",{get:function(){return new b((0,g.default)(this.defaultParams))}}),d.prototype.getParameter=function(l){return this.params.hasOwnProperty(l)?this.params[l]:null},d.prototype.canSetParameter=function(l,n){return!0},d.prototype.setParameter=function(l,n){return n!=null?this.params[l]=n:delete this.params[l]},d}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(j,Y,D){"use strict";(function(){var L;Y.exports=L=function(){function g(){}return g.prototype.handleError=function(T){throw new Error(T)},g}()}).call(void 0)},{}],260:[function(j,Y,D){"use strict";(function(){var L;Y.exports=L=function(){function g(){}return g.prototype.hasFeature=function(T,P){return!0},g.prototype.createDocumentType=function(T,P,p){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(T,P,p){throw new Error("This DOM method is not implemented.")},g.prototype.createHTMLDocument=function(T){throw new Error("This DOM method is not implemented.")},g.prototype.getFeature=function(T,P){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{}],261:[function(j,Y,D){"use strict";(function(){var L;Y.exports=L=function(){function g(T){this.arr=T||[]}return Object.defineProperty(g.prototype,"length",{get:function(){return this.arr.length}}),g.prototype.item=function(T){return this.arr[T]||null},g.prototype.contains=function(T){return this.arr.indexOf(T)!==-1},g}()}).call(void 0)},{}],262:[function(j,Y,D){"use strict";(function(){var L,g,T,P=function(S,b){for(var d in b)p.call(b,d)&&(S[d]=b[d]);function l(){this.constructor=S}return l.prototype=b.prototype,S.prototype=new l,S.__super__=b.prototype,S},p={}.hasOwnProperty;T=j("./XMLNode"),L=j("./NodeType"),Y.exports=g=function(v){P(S,v);function S(b,d,l,n,c,u){if(S.__super__.constructor.call(this,b),d==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(l==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(d));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(d));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(d));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(d));if(u&&!c.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(d));this.elementName=this.stringify.name(d),this.type=L.AttributeDeclaration,this.attributeName=this.stringify.name(l),this.attributeType=this.stringify.dtdAttType(n),u&&(this.defaultValue=this.stringify.dtdAttDefault(u)),this.defaultValueType=c}return S.prototype.toString=function(b){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(b))},S}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(j,Y,D){"use strict";(function(){var L,g,T,P=function(S,b){for(var d in b)p.call(b,d)&&(S[d]=b[d]);function l(){this.constructor=S}return l.prototype=b.prototype,S.prototype=new l,S.__super__=b.prototype,S},p={}.hasOwnProperty;T=j("./XMLNode"),L=j("./NodeType"),Y.exports=g=function(v){P(S,v);function S(b,d,l){if(S.__super__.constructor.call(this,b),d==null)throw new Error("Missing DTD element name. "+this.debugInfo());l||(l="(#PCDATA)"),Array.isArray(l)&&(l="("+l.join(",")+")"),this.name=this.stringify.name(d),this.type=L.ElementDeclaration,this.value=this.stringify.dtdElementValue(l)}return S.prototype.toString=function(b){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(b))},S}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p=function(b,d){for(var l in d)v.call(d,l)&&(b[l]=d[l]);function n(){this.constructor=b}return n.prototype=d.prototype,b.prototype=new n,b.__super__=d.prototype,b},v={}.hasOwnProperty;P=j("./Utility").isObject,T=j("./XMLNode"),L=j("./NodeType"),Y.exports=g=function(S){p(b,S);function b(d,l,n,c){if(b.__super__.constructor.call(this,d),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=!!l,this.name=this.stringify.name(n),this.type=L.EntityDeclaration,!P(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(d){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(d))},b}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(j,Y,D){"use strict";(function(){var L,g,T,P=function(S,b){for(var d in b)p.call(b,d)&&(S[d]=b[d]);function l(){this.constructor=S}return l.prototype=b.prototype,S.prototype=new l,S.__super__=b.prototype,S},p={}.hasOwnProperty;T=j("./XMLNode"),L=j("./NodeType"),Y.exports=g=function(v){P(S,v);function S(b,d,l){if(S.__super__.constructor.call(this,b),d==null)throw new Error("Missing DTD notation name. "+this.debugInfo(d));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(d));this.name=this.stringify.name(d),this.type=L.NotationDeclaration,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}return Object.defineProperty(S.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(S.prototype,"systemId",{get:function(){return this.sysID}}),S.prototype.toString=function(b){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(b))},S}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p=function(b,d){for(var l in d)v.call(d,l)&&(b[l]=d[l]);function n(){this.constructor=b}return n.prototype=d.prototype,b.prototype=new n,b.__super__=d.prototype,b},v={}.hasOwnProperty;P=j("./Utility").isObject,T=j("./XMLNode"),L=j("./NodeType"),Y.exports=g=function(S){p(b,S);function b(d,l,n,c){var u;b.__super__.constructor.call(this,d),P(l)&&(u=l,l=u.version,n=u.encoding,c=u.standalone),l||(l="1.0"),this.type=L.Declaration,this.version=this.stringify.xmlVersion(l),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return b.prototype.toString=function(d){return this.options.writer.declaration(this,this.options.writer.filterOptions(d))},b}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p,v,S,b,d,l=function(u,o){for(var h in o)n.call(o,h)&&(u[h]=o[h]);function m(){this.constructor=u}return m.prototype=o.prototype,u.prototype=new m,u.__super__=o.prototype,u},n={}.hasOwnProperty;d=j("./Utility").isObject,b=j("./XMLNode"),L=j("./NodeType"),g=j("./XMLDTDAttList"),P=j("./XMLDTDEntity"),T=j("./XMLDTDElement"),p=j("./XMLDTDNotation"),S=j("./XMLNamedNodeMap"),Y.exports=v=function(c){l(u,c);function u(o,h,m){var s,r,a,t,w,E;if(u.__super__.constructor.call(this,o),this.type=L.DocType,o.children){for(t=o.children,r=0,a=t.length;r=0;)this.up();return this.onEnd()},C.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},C.prototype.openNode=function(x){var y,_,M,I;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===L.Element&&(this.root=x),_="",x.type===L.Element){this.writerOptions.state=g.OpenTag,_=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,I=x.attribs;for(M in I){if(!O.call(I,M))continue;y=I[M],_+=this.writer.attribute(y,this.writerOptions,this.currentLevel)}_+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.InsideTag}else this.writerOptions.state=g.OpenTag,_=this.writer.indent(x,this.writerOptions,this.currentLevel)+""),_+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(_,this.currentLevel),x.isOpen=!0}},C.prototype.closeNode=function(x){var y;if(!x.isClosed)return y="",this.writerOptions.state=g.CloseTag,x.type===L.Element?y=this.writer.indent(x,this.writerOptions,this.currentLevel)+""+this.writer.endline(x,this.writerOptions,this.currentLevel):y=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.None,this.onData(y,this.currentLevel),x.isClosed=!0},C.prototype.onData=function(x,y){return this.documentStarted=!0,this.onDataCallback(x,y+1)},C.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},C.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},C.prototype.ele=function(){return this.element.apply(this,arguments)},C.prototype.nod=function(x,y,_){return this.node(x,y,_)},C.prototype.txt=function(x){return this.text(x)},C.prototype.dat=function(x){return this.cdata(x)},C.prototype.com=function(x){return this.comment(x)},C.prototype.ins=function(x,y){return this.instruction(x,y)},C.prototype.dec=function(x,y,_){return this.declaration(x,y,_)},C.prototype.dtd=function(x,y,_){return this.doctype(x,y,_)},C.prototype.e=function(x,y,_){return this.element(x,y,_)},C.prototype.n=function(x,y,_){return this.node(x,y,_)},C.prototype.t=function(x){return this.text(x)},C.prototype.d=function(x){return this.cdata(x)},C.prototype.c=function(x){return this.comment(x)},C.prototype.r=function(x){return this.raw(x)},C.prototype.i=function(x,y){return this.instruction(x,y)},C.prototype.att=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},C.prototype.a=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},C.prototype.ent=function(x,y){return this.entity(x,y)},C.prototype.pent=function(x,y){return this.pEntity(x,y)},C.prototype.not=function(x,y){return this.notation(x,y)},C}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S=function(l,n){for(var c in n)b.call(n,c)&&(l[c]=n[c]);function u(){this.constructor=l}return u.prototype=n.prototype,l.prototype=new u,l.__super__=n.prototype,l},b={}.hasOwnProperty;v=j("./XMLNode"),P=j("./NodeType"),Y.exports=p=function(d){S(l,d);function l(n){l.__super__.constructor.call(this,n),this.type=P.Dummy}return l.prototype.clone=function(){return(0,g.default)(this)},l.prototype.toString=function(n){return""},l}(v)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S,b,d,l,n,c,u=function(m,s){for(var r in s)o.call(s,r)&&(m[r]=s[r]);function a(){this.constructor=m}return a.prototype=s.prototype,m.prototype=new a,m.__super__=s.prototype,m},o={}.hasOwnProperty;c=j("./Utility"),n=c.isObject,l=c.isFunction,d=c.getValue,b=j("./XMLNode"),P=j("./NodeType"),p=j("./XMLAttribute"),S=j("./XMLNamedNodeMap"),Y.exports=v=function(h){u(m,h);function m(s,r,a){var t,w,E,f;if(m.__super__.constructor.call(this,s),r==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(r),this.type=P.Element,this.attribs={},this.schemaTypeInfo=null,a!=null&&this.attribute(a),s.type===P.Document&&(this.isRoot=!0,this.documentObject=s,s.rootObject=this,s.children)){for(f=s.children,w=0,E=f.length;w=t;r=0<=t?++a:--a)if(!this.attribs[r].isEqualNode(s.attribs[r]))return!1;return!0},m}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P;Y.exports=P=function(){function p(v){this.nodes=v}return Object.defineProperty(p.prototype,"length",{get:function(){return(0,g.default)(this.nodes).length||0}}),p.prototype.clone=function(){return this.nodes=null},p.prototype.getNamedItem=function(v){return this.nodes[v]},p.prototype.setNamedItem=function(v){var S;return S=this.nodes[v.nodeName],this.nodes[v.nodeName]=v,S||null},p.prototype.removeNamedItem=function(v){var S;return S=this.nodes[v],delete this.nodes[v],S||null},p.prototype.item=function(v){return this.nodes[(0,g.default)(this.nodes)[v]]||null},p.prototype.getNamedItemNS=function(v,S){throw new Error("This DOM method is not implemented.")},p.prototype.setNamedItemNS=function(v){throw new Error("This DOM method is not implemented.")},p.prototype.removeNamedItemNS=function(v,S){throw new Error("This DOM method is not implemented.")},p}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p,v,S,b,d,l,n,c,u,o,h,m,s,r,a,t={}.hasOwnProperty;a=j("./Utility"),r=a.isObject,s=a.isFunction,m=a.isEmpty,h=a.getValue,b=null,T=null,P=null,p=null,v=null,u=null,o=null,c=null,S=null,g=null,n=null,d=null,L=null,Y.exports=l=function(){function w(E){this.parent=E,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,b||(b=j("./XMLElement"),T=j("./XMLCData"),P=j("./XMLComment"),p=j("./XMLDeclaration"),v=j("./XMLDocType"),u=j("./XMLRaw"),o=j("./XMLText"),c=j("./XMLProcessingInstruction"),S=j("./XMLDummy"),g=j("./NodeType"),n=j("./XMLNodeList"),d=j("./XMLNamedNodeMap"),L=j("./DocumentPosition"))}return Object.defineProperty(w.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(w.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(w.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(w.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(w.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(w.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(w.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(w.prototype,"previousSibling",{get:function(){var f;return f=this.parent.children.indexOf(this),this.parent.children[f-1]||null}}),Object.defineProperty(w.prototype,"nextSibling",{get:function(){var f;return f=this.parent.children.indexOf(this),this.parent.children[f+1]||null}}),Object.defineProperty(w.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(w.prototype,"textContent",{get:function(){var f,k,O,C,x;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(x="",C=this.children,k=0,O=C.length;k":((k=this.parent)!=null?k.name:void 0)?"node: <"+E+">, parent: <"+this.parent.name+">":"node: <"+E+">"},w.prototype.ele=function(E,f,k){return this.element(E,f,k)},w.prototype.nod=function(E,f,k){return this.node(E,f,k)},w.prototype.txt=function(E){return this.text(E)},w.prototype.dat=function(E){return this.cdata(E)},w.prototype.com=function(E){return this.comment(E)},w.prototype.ins=function(E,f){return this.instruction(E,f)},w.prototype.doc=function(){return this.document()},w.prototype.dec=function(E,f,k){return this.declaration(E,f,k)},w.prototype.e=function(E,f,k){return this.element(E,f,k)},w.prototype.n=function(E,f,k){return this.node(E,f,k)},w.prototype.t=function(E){return this.text(E)},w.prototype.d=function(E){return this.cdata(E)},w.prototype.c=function(E){return this.comment(E)},w.prototype.r=function(E){return this.raw(E)},w.prototype.i=function(E,f){return this.instruction(E,f)},w.prototype.u=function(){return this.up()},w.prototype.importXMLBuilder=function(E){return this.importDocument(E)},w.prototype.replaceChild=function(E,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.removeChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.hasChildNodes=function(){return this.children.length!==0},w.prototype.cloneNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isSupported=function(E,f){return!0},w.prototype.hasAttributes=function(){return this.attribs.length!==0},w.prototype.compareDocumentPosition=function(E){var f,k;return f=this,f===E?0:this.document()!==E.document()?(k=L.Disconnected|L.ImplementationSpecific,Math.random()<.5?k|=L.Preceding:k|=L.Following,k):f.isAncestor(E)?L.Contains|L.Preceding:f.isDescendant(E)?L.Contains|L.Following:f.isPreceding(E)?L.Preceding:L.Following},w.prototype.isSameNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupPrefix=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isDefaultNamespace=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupNamespaceURI=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(E){var f,k,O;if(E.nodeType!==this.nodeType)return!1;if(E.children.length!==this.children.length)return!1;for(f=k=0,O=this.children.length-1;0<=O?k<=O:k>=O;f=0<=O?++k:--k)if(!this.children[f].isEqualNode(E.children[f]))return!1;return!0},w.prototype.getFeature=function(E,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.setUserData=function(E,f,k){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getUserData=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.contains=function(E){return E?E===this||this.isDescendant(E):!1},w.prototype.isDescendant=function(E){var f,k,O,C,x;for(x=this.children,O=0,C=x.length;Ok},w.prototype.treePosition=function(E){var f,k;return k=0,f=!1,this.foreachTreeNode(this.document(),function(O){if(k++,!f&&O===E)return f=!0}),f?k:-1},w.prototype.foreachTreeNode=function(E,f){var k,O,C,x,y;for(E||(E=this.document()),x=E.children,O=0,C=x.length;O0){for(this.stream.write(" ["),this.stream.write(this.endline(d,l,n)),l.state=g.InsideTag,h=d.children,u=0,o=h.length;u"),this.stream.write(this.endline(d,l,n)),l.state=g.None,this.closeNode(d,l,n)},b.prototype.element=function(d,l,n){var c,u,o,h,m,s,r,a,t,w;n||(n=0),this.openNode(d,l,n),l.state=g.OpenTag,this.stream.write(this.indent(d,l,n)+"<"+d.name),t=d.attribs;for(r in t){if(!v.call(t,r))continue;c=t[r],this.attribute(c,l,n)}if(o=d.children.length,h=o===0?null:d.children[0],o===0||d.children.every(function(E){return(E.type===L.Text||E.type===L.Raw)&&E.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=g.CloseTag,this.stream.write("")):(l.state=g.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&o===1&&(h.type===L.Text||h.type===L.Raw)&&h.value!=null)this.stream.write(">"),l.state=g.InsideTag,l.suppressPrettyCount++,a=!0,this.writeChildNode(h,l,n+1),l.suppressPrettyCount--,a=!1,l.state=g.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(d,l,n)),l.state=g.InsideTag,w=d.children,m=0,s=w.length;m")}return this.stream.write(this.endline(d,l,n)),l.state=g.None,this.closeNode(d,l,n)},b.prototype.processingInstruction=function(d,l,n){return this.stream.write(b.__super__.processingInstruction.call(this,d,l,n))},b.prototype.raw=function(d,l,n){return this.stream.write(b.__super__.raw.call(this,d,l,n))},b.prototype.text=function(d,l,n){return this.stream.write(b.__super__.text.call(this,d,l,n))},b.prototype.dtdAttList=function(d,l,n){return this.stream.write(b.__super__.dtdAttList.call(this,d,l,n))},b.prototype.dtdElement=function(d,l,n){return this.stream.write(b.__super__.dtdElement.call(this,d,l,n))},b.prototype.dtdEntity=function(d,l,n){return this.stream.write(b.__super__.dtdEntity.call(this,d,l,n))},b.prototype.dtdNotation=function(d,l,n){return this.stream.write(b.__super__.dtdNotation.call(this,d,l,n))},b}(P)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(j,Y,D){"use strict";(function(){var L,g,T=function(v,S){for(var b in S)P.call(S,b)&&(v[b]=S[b]);function d(){this.constructor=v}return d.prototype=S.prototype,v.prototype=new d,v.__super__=S.prototype,v},P={}.hasOwnProperty;g=j("./XMLWriterBase"),Y.exports=L=function(p){T(v,p);function v(S){v.__super__.constructor.call(this,S)}return v.prototype.document=function(S,b){var d,l,n,c,u;for(b=this.filterOptions(b),c="",u=S.children,l=0,n=u.length;l","]]]]>"),this.assertLegalChar(p))},P.prototype.comment=function(p){if(this.options.noValidation)return p;if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},P.prototype.raw=function(p){return this.options.noValidation?p:""+p||""},P.prototype.attValue=function(p){return this.options.noValidation?p:this.assertLegalChar(this.attEscape(p=""+p||""))},P.prototype.insTarget=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.insValue=function(p){if(this.options.noValidation)return p;if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return this.assertLegalChar(p)},P.prototype.xmlVersion=function(p){if(this.options.noValidation)return p;if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},P.prototype.xmlEncoding=function(p){if(this.options.noValidation)return p;if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return this.assertLegalChar(p)},P.prototype.xmlStandalone=function(p){return this.options.noValidation?p:p?"yes":"no"},P.prototype.dtdPubID=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdSysID=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdElementValue=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdAttType=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdAttDefault=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdEntityValue=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdNData=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.convertAttKey="@",P.prototype.convertPIKey="?",P.prototype.convertTextKey="#text",P.prototype.convertCDataKey="#cdata",P.prototype.convertCommentKey="#comment",P.prototype.convertRawKey="#raw",P.prototype.assertLegalChar=function(p){var v,S;if(this.options.noValidation)return p;if(v="",this.options.version==="1.0"){if(v=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=p.match(v))throw new Error("Invalid character in string: "+p+" at index "+S.index)}else if(this.options.version==="1.1"&&(v=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=p.match(v)))throw new Error("Invalid character in string: "+p+" at index "+S.index);return p},P.prototype.assertLegalName=function(p){var v;if(this.options.noValidation)return p;if(this.assertLegalChar(p),v=/^([: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])*$/,!p.match(v))throw new Error("Invalid character in name");return p},P.prototype.textEscape=function(p){var v;return this.options.noValidation?p:(v=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(v,"&").replace(//g,">").replace(/\r/g," "))},P.prototype.attEscape=function(p){var v;return this.options.noValidation?p:(v=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(v,"&").replace(/0)?new Array(f).join(w.indent):""},a.prototype.endline=function(t,w,E){return!w.pretty||w.suppressPrettyCount?"":w.newline},a.prototype.attribute=function(t,w,E){var f;return this.openAttribute(t,w,E),f=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,w,E),f},a.prototype.cdata=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+""+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.comment=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+""+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.declaration=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+"",f+=this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.docType=function(t,w,E){var f,k,O,C,x;if(E||(E=0),this.openNode(t,w,E),w.state=g.OpenTag,C=this.indent(t,w,E),C+="0){for(C+=" [",C+=this.endline(t,w,E),w.state=g.InsideTag,x=t.children,k=0,O=x.length;k",C+=this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),C},a.prototype.element=function(t,w,E){var f,k,O,C,x,y,_,M,I,N,G,H,B,K;E||(E=0),N=!1,G="",this.openNode(t,w,E),w.state=g.OpenTag,G+=this.indent(t,w,E)+"<"+t.name,H=t.attribs;for(I in H){if(!r.call(H,I))continue;f=H[I],G+=this.attribute(f,w,E)}if(O=t.children.length,C=O===0?null:t.children[0],O===0||t.children.every(function(U){return(U.type===L.Text||U.type===L.Raw)&&U.value===""}))w.allowEmpty?(G+=">",w.state=g.CloseTag,G+=""+this.endline(t,w,E)):(w.state=g.CloseTag,G+=w.spaceBeforeSlash+"/>"+this.endline(t,w,E));else if(w.pretty&&O===1&&(C.type===L.Text||C.type===L.Raw)&&C.value!=null)G+=">",w.state=g.InsideTag,w.suppressPrettyCount++,N=!0,G+=this.writeChildNode(C,w,E+1),w.suppressPrettyCount--,N=!1,w.state=g.CloseTag,G+=""+this.endline(t,w,E);else{if(w.dontPrettyTextNodes){for(B=t.children,x=0,_=B.length;x<_;x++)if(k=B[x],(k.type===L.Text||k.type===L.Raw)&&k.value!=null){w.suppressPrettyCount++,N=!0;break}}for(G+=">"+this.endline(t,w,E),w.state=g.InsideTag,K=t.children,y=0,M=K.length;y",N&&w.suppressPrettyCount--,G+=this.endline(t,w,E),w.state=g.None}return this.closeNode(t,w,E),G},a.prototype.writeChildNode=function(t,w,E){switch(t.type){case L.CData:return this.cdata(t,w,E);case L.Comment:return this.comment(t,w,E);case L.Element:return this.element(t,w,E);case L.Raw:return this.raw(t,w,E);case L.Text:return this.text(t,w,E);case L.ProcessingInstruction:return this.processingInstruction(t,w,E);case L.Dummy:return"";case L.Declaration:return this.declaration(t,w,E);case L.DocType:return this.docType(t,w,E);case L.AttributeDeclaration:return this.dtdAttList(t,w,E);case L.ElementDeclaration:return this.dtdElement(t,w,E);case L.EntityDeclaration:return this.dtdEntity(t,w,E);case L.NotationDeclaration:return this.dtdNotation(t,w,E);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},a.prototype.processingInstruction=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+"",f+=this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.raw=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E),w.state=g.InsideTag,f+=t.value,w.state=g.CloseTag,f+=this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.text=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E),w.state=g.InsideTag,f+=t.value,w.state=g.CloseTag,f+=this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.dtdAttList=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+""+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.dtdElement=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+""+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.dtdEntity=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+""+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.dtdNotation=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+""+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.openNode=function(t,w,E){},a.prototype.closeNode=function(t,w,E){},a.prototype.openAttribute=function(t,w,E){},a.prototype.closeAttribute=function(t,w,E){},a}()}).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(j,Y,D){"use strict";(function(){var L,g,T,P,p,v,S,b,d,l;l=j("./Utility"),b=l.assign,d=l.isFunction,T=j("./XMLDOMImplementation"),P=j("./XMLDocument"),p=j("./XMLDocumentCB"),S=j("./XMLStringWriter"),v=j("./XMLStreamWriter"),L=j("./NodeType"),g=j("./WriterState"),Y.exports.create=function(n,c,u,o){var h,m;if(n==null)throw new Error("Root element needs a name.");return o=b({},c,u,o),h=new P(o),m=h.element(n),o.headless||(h.declaration(o),(o.pubID!=null||o.sysID!=null)&&h.dtd(o)),m},Y.exports.begin=function(n,c,u){var o;return d(n)&&(o=[n,c],c=o[0],u=o[1],n={}),c?new p(n,c,u):new P(n)},Y.exports.stringWriter=function(n){return new S(n)},Y.exports.streamWriter=function(n,c){return new v(n,c)},Y.exports.implementation=new T,Y.exports.nodeType=L,Y.exports.writerState=g}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(j,Y,D){Y.exports=g;var L=Object.prototype.hasOwnProperty;function g(){for(var T={},P=0;Pp?n=l(n):n.length>5]|=128<>>9<<4)+14]=c;for(var u=1732584193,o=-271733879,h=-1732584194,m=271733878,s=0;s>16)+(c>>16)+(u>>16);return o<<16|u&65535}function l(n,c){return n<>>32-c}Y.exports=function(c){return L.hash(c,T,16)}},{"./helpers":285}],287:[function(j,Y,D){"use strict";var L=j("./helpers");function g(S,b){S[b>>5]|=128<<24-b%32,S[(b+64>>9<<4)+15]=b;for(var d=Array(80),l=1732584193,n=-271733879,c=-1732584194,u=271733878,o=-1009589776,h=0;h>16)+(b>>16)+(d>>16);return l<<16|d&65535}function v(S,b){return S<>>32-b}Y.exports=function(b){return L.hash(b,g,20,!0)}},{"./helpers":285}],288:[function(j,Y,D){"use strict";Y.exports=function(){return function(){}}},{}],289:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/helpers/typeof"),T=P(g);function P(l){return l&&l.__esModule?l:{default:l}}var p=j("stream"),v=p.Stream,S=j("../lib/common/utils/isArray"),b=S.isArray;Y.exports.string=function(n){return typeof n=="string"},Y.exports.array=b,Y.exports.buffer=L.isBuffer;function d(l){return l instanceof v}Y.exports.writableStream=function(n){return d(n)&&typeof n._write=="function"&&(0,T.default)(n._writableState)==="object"}}).call(this,{isBuffer:j("../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(j,Y,D){"use strict";D.encodeURIComponent=function(L){try{return encodeURIComponent(L)}catch(g){return L}},D.escape=j("escape-html"),D.timestamp=function(g){if(g){var T=g;return typeof T=="string"&&(T=Number(T)),String(g).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,Y,D){(function(L,g){"use strict";var T=j("babel-runtime/core-js/json/stringify"),P=S(T),p=j("babel-runtime/helpers/typeof"),v=S(p);function S(w){return w&&w.__esModule?w:{default:w}}var b=j("util"),d=j("url"),l=j("http"),n=j("https"),c=j("debug")("urllib"),u=j("humanize-ms"),o,h=0,m=Math.pow(2,31)-10,s=/^https?:\/\//i;function r(w,E){return w===void 0?E:w}function a(w,E){return function(f,k,O){if(f)return E(f);w({data:k,status:O.statusCode,headers:O.headers,res:O})}}D.TIMEOUTS=[u("300s"),u("300s")];var t=["json","text"];D.request=function(E,f,k){return arguments.length===2&&typeof f=="function"&&(k=f,f=null),typeof k=="function"?D.requestWithCallback(E,f,k):(o||(o=j("any-promise")),new o(function(O,C){D.requestWithCallback(E,f,a(O,C))}))},D.requestWithCallback=function(E,f,k){if(!E||typeof E!="string"&&(typeof E=="undefined"?"undefined":(0,v.default)(E))!=="object"){var O=b.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(O)}arguments.length===2&&typeof f=="function"&&(k=f,f=null),f=f||{},h>=m&&(h=0);var C=++h;f.requestUrls=f.requestUrls||[];var x={requestId:C,url:E,args:f,ctx:f.ctx};f.emitter&&f.emitter.emit("request",x),f.timeout=f.timeout||D.TIMEOUTS,f.maxRedirects=f.maxRedirects||10,f.streaming=f.streaming||f.customResponse;var y=Date.now(),_;typeof E=="string"?(s.test(E)||(E="http://"+E),_=d.parse(E)):_=E;var M=(f.type||f.method||_.method||"GET").toUpperCase(),I=_.port||80,N=l,G=r(f.agent,D.agent),H=f.fixJSONCtlChars;_.protocol==="https:"&&(N=n,G=r(f.httpsAgent,D.httpsAgent),_.port||(I=443));var B={host:_.hostname||_.host||"localhost",path:_.path||"/",method:M,port:I,agent:G,headers:f.headers||{},lookup:f.lookup};Array.isArray(f.timeout)?B.requestTimeout=f.timeout[f.timeout.length-1]:typeof f.timeout!="undefined"&&(B.requestTimeout=f.timeout);for(var K=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",C,E,Ue),f.headers=f.headers||{},f.headers.Authorization=digestAuthHeader(B.method,B.path,Ue,f.digestAuth),c("Request#%d %s: auth with digest header: %s",C,E,f.headers.Authorization),ft.headers["set-cookie"]&&(f.headers.Cookie=ft.headers["set-cookie"].join(";")),D.requestWithCallback(E,f,Qe)}var Le=Date.now()-y;q&&(q.contentDownload=Le),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Le,re,pe,B.method,B.host,B.path,le,q);var Ie={status:pe,statusCode:pe,headers:lt,size:re,aborted:ee,rt:Le,keepAliveSocket:le,data:tt,requestUrls:f.requestUrls,timing:q,remoteAddress:te,remotePort:ce};if(Re){var Ce="";G&&typeof G.getCurrentStatus=="function"&&(Ce=", agent status: "+(0,P.default)(G.getCurrentStatus())),Re.message+=", "+B.method+" "+E+" "+pe+" (connected: "+ue+", keepalive socket: "+le+Ce+`) headers: `+(0,P.default)(lt),Re.data=tt,Re.path=B.path,Re.status=pe,Re.headers=lt,Re.res=Ie}Qe(Re,tt,f.streaming?ft:Ie),f.emitter&&(x.url=E,x.socket=ht&&ht.connection,x.options=B,x.size=Ae,f.emitter.emit("response",{requestId:C,error:Re,ctx:f.ctx,req:x,res:Ie}))}function be(Re){var tt=null;if(f.followRedirect&&statuses.redirect[Re.statusCode]){f._followRedirectCount=(f._followRedirectCount||0)+1;var ft=Re.headers.location;if(!ft)tt=new Error("Got statusCode "+Re.statusCode+" but cannot resolve next location from headers"),tt.name="FollowRedirectError";else if(f._followRedirectCount>f.maxRedirects)tt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),tt.name="MaxRedirectError";else{var Qe=f.formatRedirectUrl?f.formatRedirectUrl(E,ft):d.resolve(E,ft);c("Request#%d %s: `redirected` from %s to %s",C,B.path,E,Qe),V(),f.headers&&f.headers.Host&&s.test(ft)&&(f.headers.Host=null);var lt=k;return k=null,D.requestWithCallback(Qe,f,lt),{redirect:!0,error:null}}}return{redirect:!1,error:tt}}!B.headers["User-Agent"]&&!B.headers["user-agent"]&&(B.headers["User-Agent"]=navigator.userAgent),f.gzip&&(!B.headers["Accept-Encoding"]&&!B.headers["accept-encoding"]&&(B.headers["Accept-Encoding"]="gzip"));function ge(Re,tt,ft){var Qe=Re.headers["content-encoding"];return ft(null,tt,Qe)}var Te=f.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",C,M,E,B.headers,B.path),f.requestUrls.push(E);function Je(Re){if(q&&(q.waiting=Date.now()-y),c("Request#%d %s `req response` event emit: status %d, headers: %j",C,E,Re.statusCode,Re.headers),f.streaming){var tt=be(Re);if(tt.redirect){Re.resume();return}return tt.error?(Re.resume(),Z(tt.error,null,Re)):Z(null,null,Re)}if(Re.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",C,E,re)}),Re.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",C,E,re)}),Re.on("aborted",function(){ee=!0,c("Request#%d %s: `res aborted` event emit, total size %d",C,E,re)}),Te){var tt=be(Re);if(tt.redirect){Re.resume();return}return tt.error?(Re.resume(),Te.end(),Z(tt.error,null,Re)):(f.consumeWriteStream===!1?Re.on("end",Z.bind(null,null,null,Re)):isNode010||isNode012?first([[Te,"close"],[Re,"aborted"]],function(lt,Ue,Le){c("Request#%d %s: writeStream or res %s event emitted",C,E,Le),Z(xe||null,null,Re)}):Te.on("close",function(){c("Request#%d %s: writeStream close event emitted",C,E),Z(xe||null,null,Re)}),Re.pipe(Te))}var ft=[];Re.on("data",function(Qe){c("Request#%d %s: `res data` event emit, size %d",C,E,Qe.length),re+=Qe.length,ft.push(Qe)}),Re.on("end",function(){var Qe=g.concat(ft,re);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",C,E,re,Re._dumped),xe)return Z(xe,Qe,Re);var lt=be(Re);if(lt.error)return Z(lt.error,Qe,Re);if(lt.redirect)return;ge(Re,Qe,function(Ue,Le,Ie){if(Ue)return Z(Ue,Qe,Re);if(!Ie&&t.indexOf(f.dataType)>=0){try{Le=decodeBodyByCharset(Le,Re)}catch(Se){return c("decodeBodyByCharset error: %s",Se),Z(null,Le,Re)}if(f.dataType==="json")if(re===0)Le=null;else{var Ce=parseJSON(Le,H);Ce.error?Ue=Ce.error:Le=Ce.data}}ee&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",C,E),Z(Ue,Le,Re)})})}var rt,nt;Array.isArray(f.timeout)?(rt=u(f.timeout[0]),nt=u(f.timeout[1])):rt=nt=u(f.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",rt,nt);function at(){c("Connect timer ticking, timeout: %d",rt),ye=setTimeout(function(){ye=null,pe===-1&&(pe=-2);var Re="Connect timeout for "+rt+"ms",tt="ConnectionTimeoutError";ht.socket||(tt="SocketAssignTimeoutError",Re+=", working sockets is full"),xe=new Error(Re),xe.name=tt,xe.requestId=C,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",C,E,xe.name,Re,ue),He()},rt)}function ct(){c("Response timer ticking, timeout: %d",nt),Oe=setTimeout(function(){Oe=null;var Re="Response timeout for "+nt+"ms",tt="ResponseTimeoutError";xe=new Error(Re),xe.name=tt,xe.requestId=C,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",C,E,xe.name,Re,ue),He()},nt)}var ht;B.mode=f.mode?f.mode:"";try{ht=N.request(B,Je)}catch(Re){return Z(Re)}typeof window=="undefined"?at():ht.on("requestTimeout",function(){pe===-1&&(pe=-2);var Re="Connect timeout for "+rt+"ms",tt="ConnectionTimeoutError";xe=new Error(Re),xe.name=tt,xe.requestId=C,He()});function He(){c("Request#%d %s abort, connected: %s",C,E,ue),ht.socket||(xe.noSocket=!0,Z(xe)),ht.abort()}return q&&ht.on("finish",function(){q.requestSent=Date.now()-y}),ht.once("socket",function(Re){q&&(q.queuing=Date.now()-y),isNode010&&Re.socket&&(Re=Re.socket);var tt=Re.readyState;if(tt==="opening"){Re.once("lookup",function(ft,Qe,lt){c("Request#%d %s lookup: %s, %s, %s",C,E,ft,Qe,lt),q&&(q.dnslookup=Date.now()-y),Qe&&(te=Qe)}),Re.once("connect",function(){q&&(q.connected=Date.now()-y),Q(),ct(),c("Request#%d %s new socket connected",C,E),ue=!0,te||(te=Re.remoteAddress),ce=Re.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",C,E,tt),ue=!0,le=!0,te||(te=Re.remoteAddress),ce=Re.remotePort,Q(),ct()}),ht.on("error",function(Re){(Re.name==="Error"||Re.name==="TypeError")&&(Re.name=ue?"ResponseError":"RequestError"),Re.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",C,E,Re.name,Re.message),Z(xe||Re)}),Te&&Te.once("error",function(Re){Re.message+=' (writeStream "error")',xe=Re,c("Request#%d %s `writeStream error` event emit, %s: %s",C,E,Re.name,Re.message),He()}),f.stream?(f.stream.pipe(ht),f.stream.once("error",function(Re){Re.message+=' (stream "error")',xe=Re,c("Request#%d %s `readStream error` event emit, %s: %s",C,E,Re.name,Re.message),He()})):ht.end(ne),ht.requestId=C,ht}}).call(this,j("_process"),j("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(j,Y,D){"use strict";D.d(Y,"a",function(){return b});var L=D("q1tI"),g=D("biw7"),T=D("fyJ8");function P(d){var l=d.className,n=d.index,c=d.children,u=d.colSpan,o=d.rowSpan,h=L.useContext(g.a),m=h.prefixCls,s=h.fixedInfoList,r=s[n];return L.createElement(T.a,Object.assign({className:l,index:n,component:"td",prefixCls:m,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:u,rowSpan:o}}}},r))}function p(d){return L.createElement("tr",Object.assign({},d))}function v(d){var l=d.children,n=L.useContext(g.a),c=n.prefixCls;return L.createElement("tfoot",{className:"".concat(c,"-summary")},l)}var S=Y.b=v,b={Cell:P,Row:p}},nnTU:function(j,Y,D){"use strict";D.d(Y,"b",function(){return b}),D.d(Y,"a",function(){return d});var L=D("pmY6"),g=D("746U"),T=D("Cg/j"),P=D("MI8n"),p=D("24hK"),v=D("QDVR"),S=function(){for(var l=0,n=0,c=arguments.length;n>>2]&255;g.sigBytes-=T}},L.pad.Iso10126})},osHv:function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){"use strict";var g=L.Pos;function T(s,r){return s.line-r.line||s.ch-r.ch}var P="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",p=P+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",v=new RegExp("<(/?)(["+P+"]["+p+"]*)","g");function S(s,r,a,t){this.line=r,this.ch=a,this.cm=s,this.text=s.getLine(r),this.min=t?Math.max(t.from,s.firstLine()):s.firstLine(),this.max=t?Math.min(t.to-1,s.lastLine()):s.lastLine()}function b(s,r){var a=s.cm.getTokenTypeAt(g(s.line,r));return a&&/\btag\b/.test(a)}function d(s){return s.line>=s.max?void 0:(s.ch=0,s.text=s.cm.getLine(++s.line),!0)}function l(s){return s.line<=s.min?void 0:(s.text=s.cm.getLine(--s.line),s.ch=s.text.length,!0)}function n(s){for(;;){var r=s.text.indexOf(">",s.ch);if(r==-1){if(d(s))continue;return}if(!b(s,r+1)){s.ch=r+1;continue}var a=s.text.lastIndexOf("/",r),t=a>-1&&!/\S/.test(s.text.slice(a+1,r));return s.ch=r+1,t?"selfClose":"regular"}}function c(s){for(;;){var r=s.ch?s.text.lastIndexOf("<",s.ch-1):-1;if(r==-1){if(l(s))continue;return}if(!b(s,r+1)){s.ch=r;continue}v.lastIndex=r,s.ch=r;var a=v.exec(s.text);if(a&&a.index==r)return a}}function u(s){for(;;){v.lastIndex=s.ch;var r=v.exec(s.text);if(!r){if(d(s))continue;return}if(!b(s,r.index+1)){s.ch=r.index+1;continue}return s.ch=r.index+r[0].length,r}}function o(s){for(;;){var r=s.ch?s.text.lastIndexOf(">",s.ch-1):-1;if(r==-1){if(l(s))continue;return}if(!b(s,r+1)){s.ch=r;continue}var a=s.text.lastIndexOf("/",r),t=a>-1&&!/\S/.test(s.text.slice(a+1,r));return s.ch=r+1,t?"selfClose":"regular"}}function h(s,r){for(var a=[];;){var t=u(s),w,E=s.line,f=s.ch-(t?t[0].length:0);if(!t||!(w=n(s)))return;if(w=="selfClose")continue;if(t[1]){for(var k=a.length-1;k>=0;--k)if(a[k]==t[2]){a.length=k;break}if(k<0&&(!r||r==t[2]))return{tag:t[2],from:g(E,f),to:g(s.line,s.ch)}}else a.push(t[2])}}function m(s,r){for(var a=[];;){var t=o(s);if(!t)return;if(t=="selfClose"){c(s);continue}var w=s.line,E=s.ch,f=c(s);if(!f)return;if(f[1])a.push(f[2]);else{for(var k=a.length-1;k>=0;--k)if(a[k]==f[2]){a.length=k;break}if(k<0&&(!r||r==f[2]))return{tag:f[2],from:g(s.line,s.ch),to:g(w,E)}}}}L.registerHelper("fold","xml",function(s,r){for(var a=new S(s,r.line,0);;){var t=u(a);if(!t||a.line!=r.line)return;var w=n(a);if(!w)return;if(!t[1]&&w!="selfClose"){var E=g(a.line,a.ch),f=h(a,t[2]);return f&&T(f.from,E)>0?{from:E,to:f.from}:null}}}),L.findMatchingTag=function(s,r,a){var t=new S(s,r.line,r.ch,a);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var w=n(t),E=w&&g(t.line,t.ch),f=w&&c(t);if(!w||!f||T(t,r)>0)return;var k={from:g(t.line,t.ch),to:E,tag:f[2]};return w=="selfClose"?{open:k,close:null,at:"open"}:f[1]?{open:m(t,f[2]),close:k,at:"close"}:(t=new S(s,E.line,E.ch,a),{open:k,close:h(t,f[2]),at:"open"})},L.findEnclosingTag=function(s,r,a,t){for(var w=new S(s,r.line,r.ch,a);;){var E=m(w,t);if(!E)break;var f=new S(s,r.line,r.ch,a),k=h(f,E.tag);if(k)return{open:E,close:k}}},L.scanForClosingTag=function(s,r,a,t){var w=new S(s,r.line,r.ch,t?{from:0,to:t}:null);return h(w,a)}})},p5ED:function(j,Y,D){"use strict";var L=D("+L6B"),g=D("2/Rp"),T=D("5Dmo"),P=D("3S7+"),p=D("k1fw"),v=D("9og8"),S=D("tJVT"),b=D("WmNS"),d=D.n(b),l=D("q1tI"),n=D.n(l),c=D("vHTk"),u=D.n(c),o=D("yEEn"),h=D("ZW9T"),m=D("1vsH"),s=D("V0Rq"),r=D("m3rI");Y.a=function(a){var t,w,E,f,k,O,C=a.editOffice,x=C===void 0?"view":C,y=a.name,_=a.data,M=a.theme,I=a.type,N=a.filename,G=a.monacoEditor,H=a.className,B=a.style,K=a.close,U=a.onClose,W=a.hasMask,X=a.disabledDownload,ne=a.onImgDimensions,fe=a.otherData,me=Object(l.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Ae=Object(S.a)(me,2),De=Ae[0],ye=Ae[1],Oe=Object(l.useState)(""),xe=Object(S.a)(Oe,2),ue=xe[0],le=xe[1],re=Object(l.useState)(),pe=Object(S.a)(re,2),ee=pe[0],te=pe[1],ce=window.ENV==="build"?"/react/build":"",q=location.host.startsWith("localhost")?r.a.PROXY_SERVER:r.a.API_SERVER,Q,V=1024*1024,Z=10*V,be=Object(l.useRef)();(t=_)!==null&&t!==void 0&&t.startsWith("/api")&&I!=="txt"&&(_=r.a.API_SERVER+_),I==="office"&&(Q=Object(m.P)(_).filesize,Q>Z&&(I="other")),N&&(G.filename=N),Object(l.useEffect)(function(){var rt,nt,at=(rt=document.cookie)===null||rt===void 0||((nt=rt.replace(/\s/g,""))===null||nt===void 0)?void 0:nt.split(";");at==null||at.map(function(ct){var ht=ct.split("=");ht[0]==="_educoder_session"&&le(ht[1])})},[]),Object(l.useEffect)(function(){I==="office"&&ge()},[I,_]);var ge=function(){var rt=Object(v.a)(d.a.mark(function nt(){var at,ct,ht;return d.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return console.log("data:",_),at=_,_.startsWith("http")||(at=location.origin+at),ct=new URL(at).pathname.split("/").pop(),Re.next=6,Object(s.U)({attachment_id:ct});case 6:ht=Re.sent,te(ht);case 8:case"end":return Re.stop()}},nt)}));return function(){return rt.apply(this,arguments)}}(),Te=function(){if(_.startsWith("http")||_.startsWith("blob:")){Je();return}Object(m.x)(N||"educoder",_,N)},Je=function(){Object(m.v)(N||"educoder",decodeURIComponent(_))};return n.a.createElement("div",{style:Object(p.a)({},B||{}),className:"".concat(W&&u.a.bgBlack," ").concat(I?u.a.wrp:"hide")},K&&n.a.createElement("div",{className:u.a.close,ref:be},!!ne&&n.a.createElement(P.a,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:function(){return be.current}},n.a.createElement("span",{onClick:function(){U(),ne()}},n.a.createElement("i",{className:"icon-yulanpizhu"}))),!X&&n.a.createElement(P.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return be.current}},n.a.createElement("span",{onClick:Je},n.a.createElement("i",{className:"icon-quxiaozhiding"}))),n.a.createElement(P.a,{title:"\u5173\u95ED",getPopupContainer:function(){return be.current}},n.a.createElement("span",{className:"",onClick:U},n.a.createElement("i",{className:"icon-guanbi1"})))),n.a.createElement("div",{className:"".concat(u.a[H]," ").concat(H," ").concat(u.a.monaco," ").concat(I==="txt"?"show":"hide")},I==="txt"&&n.a.createElement(h.b,G)),I==="audio"&&n.a.createElement("audio",{src:"".concat(((w=_)===null||w===void 0?void 0:w.indexOf("http://"))>-1||((E=_)===null||E===void 0?void 0:E.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(_),autoPlay:!0}),I==="video"&&n.a.createElement(n.a.Fragment,null,((f=_)===null||f===void 0?void 0:f.indexOf("http"))>-1?n.a.createElement("video",{controls:!0,src:"".concat(_),autoPlay:!0}):n.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(_),autoPlay:!0})),I==="office"&&ee&&n.a.createElement("iframe",{src:"".concat(ce,"/office.html?key=").concat(ee.key,"&url=").concat(q+ee.url,"&callbackUrl=").concat(q+ee.callbackUrl,"&fileType=").concat(ee.fileType,"&title=").concat(ee.title,"&model=").concat(x,"&officeServer=").concat(r.a.OFFICE_SERVER,"&disabledDownload=").concat(!!X)}),(I==="xlsx"||I==="doc"||I==="pptx"||I==="docx")&&n.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(fe.key,"&url=").concat(r.a.API_SERVER+fe.url,"&callbackUrl=").concat(r.a.API_SERVER+fe.callbackUrl,"&fileType=").concat(fe.fileType,"&title=").concat(fe.title,"&model=").concat(fe.model)}),I==="html"&&n.a.createElement("iframe",{src:_+"&disposition=inline"}),I==="pdf"&&n.a.createElement("embed",{className:u.a.embed,src:_}),I==="image"&&n.a.createElement("img",{src:"".concat(((k=_)===null||k===void 0?void 0:k.indexOf("http://"))>-1||((O=_)===null||O===void 0?void 0:O.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(_)}),I==="other"&&n.a.createElement("div",null,n.a.createElement(g.a,{type:"primary",size:"large",onClick:Te},n.a.createElement(o.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),I==="download"&&n.a.createElement(g.a,{type:"primary",size:"large",onClick:Te},n.a.createElement(o.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(j,Y,D){},pA7S:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=T.BlockCipher,v=g.algo,S=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],b=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],d=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{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=v.DES=p.extend({_doReset:function(){for(var m=this._key,s=m.words,r=[],a=0;a<56;a++){var t=S[a]-1;r[a]=s[t>>>5]>>>31-t%32&1}for(var w=this._subKeys=[],E=0;E<16;E++){for(var f=w[E]=[],k=d[E],a=0;a<24;a++)f[a/6|0]|=r[(b[a]-1+k)%28]<<31-a%6,f[4+(a/6|0)]|=r[28+(b[a+24]-1+k)%28]<<31-a%6;f[0]=f[0]<<1|f[0]>>>31;for(var a=1;a<7;a++)f[a]=f[a]>>>(a-1)*4+3;f[7]=f[7]<<5|f[7]>>>27}for(var O=this._invSubKeys=[],a=0;a<16;a++)O[a]=w[15-a]},encryptBlock:function(m,s){this._doCryptBlock(m,s,this._subKeys)},decryptBlock:function(m,s){this._doCryptBlock(m,s,this._invSubKeys)},_doCryptBlock:function(m,s,r){this._lBlock=m[s],this._rBlock=m[s+1],u.call(this,4,252645135),u.call(this,16,65535),o.call(this,2,858993459),o.call(this,8,16711935),u.call(this,1,1431655765);for(var a=0;a<16;a++){for(var t=r[a],w=this._lBlock,E=this._rBlock,f=0,k=0;k<8;k++)f|=l[k][((E^t[k])&n[k])>>>0];this._lBlock=E,this._rBlock=w^f}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,u.call(this,1,1431655765),o.call(this,8,16711935),o.call(this,2,858993459),u.call(this,16,65535),u.call(this,4,252645135),m[s]=this._lBlock,m[s+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function u(m,s){var r=(this._lBlock>>>m^this._rBlock)&s;this._rBlock^=r,this._lBlock^=r<>>m^this._lBlock)&s;this._lBlock^=r,this._rBlock^=r<192.");var r=s.slice(0,2),a=s.length<4?s.slice(0,2):s.slice(2,4),t=s.length<6?s.slice(0,2):s.slice(4,6);this._des1=c.createEncryptor(P.create(r)),this._des2=c.createEncryptor(P.create(a)),this._des3=c.createEncryptor(P.create(t))},encryptBlock:function(m,s){this._des1.encryptBlock(m,s),this._des2.decryptBlock(m,s),this._des3.encryptBlock(m,s)},decryptBlock:function(m,s){this._des3.decryptBlock(m,s),this._des2.encryptBlock(m,s),this._des1.decryptBlock(m,s)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=p._createHelper(h)}(),L.TripleDES})},pIsd:function(j,Y,D){var L=D("BJfS"),g=function(p){var v=/[height|width]$/;return v.test(p)},T=function(p){var v="",S=Object.keys(p);return S.forEach(function(b,d){var l=p[b];b=L(b),g(b)&&typeof l=="number"&&(l=l+"px"),l===!0?v+=b:l===!1?v+="not "+b:v+="("+b+": "+l+")",d>>2]|=v<<24-S%4*8,g.sigBytes+=v},unpad:function(g){var T=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=T}},L.pad.Ansix923})},qHvr:function(j,Y,D){"use strict";var L=D("2qtc"),g=D("kLXV"),T=D("5NDa"),P=D("5rEg"),p=D("miYZ"),v=D("tsqr"),S=D("tJVT"),b=D("q1tI"),d=D.n(b),l=D("4i/N");function n(c){var u=c.isAddmodle,o=c.setIsAdd,h=c.createTeam,m=Object(b.useState)(""),s=Object(S.a)(m,2),r=s[0],a=s[1];return d.a.createElement(g.a,{centered:!0,title:d.a.createElement("div",{style:{alignItems:"center",display:"flex"}},d.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),d.a.createElement(l.a,{onClick:function(){return o(!1)},style:{cursor:"porint"}})),visible:u,closable:!1,destroyOnClose:!0,onOk:function(){if(!r){v.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}h(r)},onCancel:function(){return o(!1)}},d.a.createElement("div",null,d.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",d.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},d.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:r,maxLength:60,addonAfter:String(r&&r.length||0)+"/60",onChange:function(w){return a(w.target.value)}}))))}Y.a=n},qM6L:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=g.enc,v=p.Utf16=p.Utf16BE={stringify:function(b){for(var d=b.words,l=b.sigBytes,n=[],c=0;c>>2]>>>16-c%4*8&65535;n.push(String.fromCharCode(u))}return n.join("")},parse:function(b){for(var d=b.length,l=[],n=0;n>>1]|=b.charCodeAt(n)<<16-n%2*16;return P.create(l,d*2)}};p.Utf16LE={stringify:function(b){for(var d=b.words,l=b.sigBytes,n=[],c=0;c>>2]>>>16-c%4*8&65535);n.push(String.fromCharCode(u))}return n.join("")},parse:function(b){for(var d=b.length,l=[],n=0;n>>1]|=S(b.charCodeAt(n)<<16-n%2*16);return P.create(l,d*2)}};function S(b){return b<<8&4278255360|b>>>8&16711935}}(),L.enc.Utf16})},qu8F:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){/** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */return L.mode.CTRGladman=function(){var g=L.lib.BlockCipherMode.extend();function T(v){if((v>>24&255)===255){var S=v>>16&255,b=v>>8&255,d=v&255;S===255?(S=0,b===255?(b=0,d===255?d=0:++d):++b):++S,v=0,v+=S<<16,v+=b<<8,v+=d}else v+=1<<24;return v}function P(v){return(v[0]=T(v[0]))===0&&(v[1]=T(v[1])),v}var p=g.Encryptor=g.extend({processBlock:function(v,S){var b=this._cipher,d=b.blockSize,l=this._iv,n=this._counter;l&&(n=this._counter=l.slice(0),this._iv=void 0),P(n);var c=n.slice(0);b.encryptBlock(c,0);for(var u=0;u=T.length?{done:!0}:{done:!1,value:T[v++]}},e:function(c){throw c},f:S}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b=!0,d=!1,l;return{s:function(){p=T[Symbol.iterator]()},n:function(){var c=p.next();return b=c.done,c},e:function(c){d=!0,l=c},f:function(){try{!b&&p.return!=null&&p.return()}finally{if(d)throw l}}}}},rUJ1:function(j,Y){const D=/[&<>"']/,L=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,T=/[<>"']|&(?!#?\w+;)/g,P={"&":"&","<":"<",">":">",'"':""","'":"'"},p=O=>P[O];function v(O,C){if(C){if(D.test(O))return O.replace(L,p)}else if(g.test(O))return O.replace(T,p);return O}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(O){return O.replace(S,(C,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const d=/(^|[^\[])\^/g;function l(O,C){O=O.source||O,C=C||"";const x={replace:(y,_)=>(_=_.source||_,_=_.replace(d,"$1"),O=O.replace(y,_),x),getRegex:()=>new RegExp(O,C)};return x}const n=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function u(O,C,x){if(O){let y;try{y=decodeURIComponent(b(x)).replace(n,"").toLowerCase()}catch(_){return null}if(y.indexOf("javascript:")===0||y.indexOf("vbscript:")===0||y.indexOf("data:")===0)return null}C&&!c.test(x)&&(x=r(C,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(y){return null}return x}const o={},h=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function r(O,C){o[" "+O]||(h.test(O)?o[" "+O]=O+"/":o[" "+O]=E(O,"/",!0)),O=o[" "+O];const x=O.indexOf(":")===-1;return C.substring(0,2)==="//"?x?C:O.replace(m,"$1")+C:C.charAt(0)==="/"?x?C:O.replace(s,"$1")+C:O+C}const a={exec:function(){}};function t(O){let C=1,x,y;for(;C{let G=!1,H=I;for(;--H>=0&&N[H]==="\\";)G=!G;return G?"|":" |"}),y=x.split(/ \|/);let _=0;if(y.length>C)y.splice(C);else for(;y.length1)Object(l.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(l.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var w=t[0];if(v.isValidElement(w)&&Object(n.c)(w)){var E=w.ref;t[0]=v.cloneElement(w,{ref:Object(n.a)(E,this.setChildNode)})}return t.length===1?t[0]:t.map(function(f,k){return!v.isValidElement(f)||"key"in f&&f.key!==null?f:v.cloneElement(f,{key:"".concat(u,"-").concat(k)})})}}]),s}(v.Component);o.displayName="ResizeObserver",Y.a=o},uGsb:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("MlIO"),D("1uat"))})(this,function(L){return function(){var g=L,T=g.x64,P=T.Word,p=T.WordArray,v=g.algo,S=v.SHA512,b=v.SHA384=S.extend({_doReset:function(){this._hash=new p.init([new P.init(3418070365,3238371032),new P.init(1654270250,914150663),new P.init(2438529370,812702999),new P.init(355462360,4144912697),new P.init(1731405415,4290775857),new P.init(2394180231,1750603025),new P.init(3675008525,1694076839),new P.init(1203062813,3204075428)])},_doFinalize:function(){var d=S._doFinalize.call(this);return d.sigBytes-=16,d}});g.SHA384=S._createHelper(b),g.HmacSHA384=S._createHmacHelper(b)}(),L.SHA384})},uGxW:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.pad.NoPadding={pad:function(){},unpad:function(){}},L.pad.NoPadding})},uK0f:function(j,Y,D){(function(L,g){j.exports=g()})(this,function(){"use strict";function L(g,T,P){P=P||{},P.childrenKeyName=P.childrenKeyName||"children";var p=g||[],v=[],S=0;do{var b=p.filter(function(d){return T(d,S)})[0];if(!b)break;v.push(b),p=b[P.childrenKeyName]||[],S+=1}while(p.length>0);return v}return L})},ulZh:function(j,Y,D){typeof window!="undefined"&&function(g,T){j.exports=T()}(this,function(){return function(L){var g={};function T(P){if(g[P])return g[P].exports;var p=g[P]={i:P,l:!1,exports:{}};return L[P].call(p.exports,p,p.exports,T),p.l=!0,p.exports}return T.m=L,T.c=g,T.d=function(P,p,v){T.o(P,p)||Object.defineProperty(P,p,{enumerable:!0,get:v})},T.r=function(P){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})},T.t=function(P,p){if(p&1&&(P=T(P)),p&8)return P;if(p&4&&typeof P=="object"&&P&&P.__esModule)return P;var v=Object.create(null);if(T.r(v),Object.defineProperty(v,"default",{enumerable:!0,value:P}),p&2&&typeof P!="string")for(var S in P)T.d(v,S,function(b){return P[b]}.bind(null,S));return v},T.n=function(P){var p=P&&P.__esModule?function(){return P.default}:function(){return P};return T.d(p,"a",p),p},T.o=function(P,p){return Object.prototype.hasOwnProperty.call(P,p)},T.p="/dist/",T(T.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(L,g,T){"use strict";var P=Object.prototype.hasOwnProperty,p="~";function v(){}Object.create&&(v.prototype=Object.create(null),new v().__proto__||(p=!1));function S(n,c,u){this.fn=n,this.context=c,this.once=u||!1}function b(n,c,u,o,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new S(u,o||n,h),s=p?p+c:c;return n._events[s]?n._events[s].fn?n._events[s]=[n._events[s],m]:n._events[s].push(m):(n._events[s]=m,n._eventsCount++),n}function d(n,c){--n._eventsCount===0?n._events=new v:delete n._events[c]}function l(){this._events=new v,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],u,o;if(this._eventsCount===0)return c;for(o in u=this._events)P.call(u,o)&&c.push(p?o.slice(1):o);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},l.prototype.listeners=function(c){var u=p?p+c:c,o=this._events[u];if(!o)return[];if(o.fn)return[o.fn];for(var h=0,m=o.length,s=new Array(m);h0},!1)}function n(c,u){for(var o={main:[u]},h={main:[]},m={main:{}};l(o);)for(var s=Object.keys(o),r=0;r=2*k/C||N<=H)return;var B=Number.POSITIVE_INFINITY,K;for(K=s.level-1;K>y;K--){var U=x[K].maxBitrate;if(B=k*U/(8*.8*I),B=N)return;var W=this.bwEstimator.getEstimate();l.logger.warn("Fragment "+s.sn+(r?" part "+r.index:"")+" of level "+s.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+K+` Current BW estimate: `+(Object(P.isFiniteNumber)(W)?(W/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+N.toFixed(3)+` s Estimated load time for the next fragment: `+B.toFixed(3)+` s Time to underbuffer: `+H.toFixed(3)+" s"),a.nextLoadLevel=K,this.bwEstimator.sample(O,f.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),a.trigger(v.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:r,stats:f})},h.onFragLoaded=function(s,r){var a=r.frag,t=r.part;if(a.type===d.PlaylistLevelType.MAIN&&Object(P.isFiniteNumber)(a.sn)){var w=t?t.stats:a.stats,E=t?t.duration:a.duration;if(this.clearTimer(),this.lastLoadedFragLevel=a.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var f=this.hls.levels[a.level],k=(f.loaded?f.loaded.bytes:0)+w.loaded,O=(f.loaded?f.loaded.duration:0)+E;f.loaded={bytes:k,duration:O},f.realBitrate=Math.round(8*k/O)}if(a.bitrateTest){var C={stats:w,frag:a,part:t,id:a.type};this.onFragBuffered(v.Events.FRAG_BUFFERED,C),a.bitrateTest=!1}}},h.onFragBuffered=function(s,r){var a=r.frag,t=r.part,w=t?t.stats:a.stats;if(w.aborted)return;if(a.type!==d.PlaylistLevelType.MAIN||a.sn==="initSegment")return;var E=w.parsing.end-w.loading.start;this.bwEstimator.sample(E,w.loaded),w.bwEstimate=this.bwEstimator.getEstimate(),a.bitrateTest?this.bitrateTestDelay=E/1e3:this.bitrateTestDelay=0},h.onError=function(s,r){switch(r.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},h.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},h.getNextABRAutoLevel=function(){var s=this.fragCurrent,r=this.partCurrent,a=this.hls,t=a.maxAutoLevel,w=a.config,E=a.minAutoLevel,f=a.media,k=r?r.duration:s?s.duration:0,O=f?f.currentTime:0,C=f&&f.playbackRate!==0?Math.abs(f.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():w.abrEwmaDefaultEstimate,y=(S.BufferHelper.bufferInfo(f,O,w.maxBufferHole).end-O)/C,_=this.findBestLevel(x,E,t,y,w.abrBandWidthFactor,w.abrBandWidthUpFactor);if(_>=0)return _;l.logger.trace((y?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var M=k?Math.min(k,w.maxStarvationDelay):w.maxStarvationDelay,I=w.abrBandWidthFactor,N=w.abrBandWidthUpFactor;if(!y){var G=this.bitrateTestDelay;if(G){var H=k?Math.min(k,w.maxLoadingDelay):w.maxLoadingDelay;M=H-G,l.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*M)+" ms"),I=N=1}}return _=this.findBestLevel(x,E,t,y+M,I,N),Math.max(_,0)},h.findBestLevel=function(s,r,a,t,w,E){for(var f,k=this.fragCurrent,O=this.partCurrent,C=this.lastLoadedFragLevel,x=this.hls.levels,y=x[C],_=!!(y!=null&&(f=y.details)!==null&&f!==void 0&&f.live),M=y==null?void 0:y.codecSet,I=O?O.duration:k?k.duration:0,N=a;N>=r;N--){var G=x[N];if(!G||M&&G.codecSet!==M)continue;var H=G.details,B=(O?H==null?void 0:H.partTarget:H==null?void 0:H.averagetargetduration)||I,K=void 0;N<=C?K=w*s:K=E*s;var U=x[N].maxBitrate,W=U*B/K;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+N+"/"+Math.round(K)+"/"+U+"/"+B+"/"+t+"/"+W),K>U&&(!W||_&&!this.bitrateTestDelay||W0&&y===-1?(this.log("Override startPosition with lastCurrentTime @"+_.toFixed(3)),this.state=p.State.IDLE):(this.loadedmetadata=!1,this.state=p.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=y,this.tick()},C.doTick=function(){switch(this.state){case p.State.IDLE:this.doTickIdle();break;case p.State.WAITING_TRACK:{var y,_=this.levels,M=this.trackId,I=_==null||((y=_[M])===null||y===void 0)?void 0:y.details;if(I){if(this.waitForCdnTuneIn(I))break;this.state=p.State.WAITING_INIT_PTS}break}case p.State.FRAG_LOADING_WAITING_RETRY:{var N,G=performance.now(),H=this.retryDate;(!H||G>=H||(N=this.media)!==null&&N!==void 0&&N.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=p.State.IDLE);break}case p.State.WAITING_INIT_PTS:{var B=this.waitingData;if(B){var K=B.frag,U=B.part,W=B.cache,X=B.complete;if(this.initPTS[K.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=p.State.FRAG_LOADING;var ne=W.flush(),fe={frag:K,part:U,payload:ne,networkDetails:null};this._handleFragmentLoadProgress(fe),X&&k.prototype._handleFragmentLoadComplete.call(this,fe)}else if(this.videoTrackCC!==this.waitingVideoCC)r.logger.log("Waiting fragment cc ("+K.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var me=this.getLoadPosition(),Ae=S.BufferHelper.bufferInfo(this.mediaBuffer,me,this.config.maxBufferHole),De=Object(h.fragmentWithinToleranceTest)(Ae.end,this.config.maxFragLookUpTolerance,K);De<0&&(r.logger.log("Waiting fragment cc ("+K.cc+") @ "+K.start+" cancelled because another fragment at "+Ae.end+" is needed"),this.clearWaitingFragment())}}else this.state=p.State.IDLE}}this.onTickEnd()},C.clearWaitingFragment=function(){var y=this.waitingData;y&&(this.fragmentTracker.removeFragment(y.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=p.State.IDLE)},C.onTickEnd=function(){var y=this.media;if(!y||!y.readyState)return;var _=this.mediaBuffer?this.mediaBuffer:y,M=_.buffered;!this.loadedmetadata&&M.length&&(this.loadedmetadata=!0),this.lastCurrentTime=y.currentTime},C.doTickIdle=function(){var y,_,M=this.hls,I=this.levels,N=this.media,G=this.trackId,H=M.config;if(!I||!I[G])return;if(!N&&(this.startFragRequested||!H.startFragPrefetch))return;var B=I[G],K=B.details;if(!K||K.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(K)){this.state=p.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,l.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,l.PlaylistLevelType.AUDIO);if(U===null)return;var W=U.len,X=this.getMaxBufferLength(),ne=this.audioSwitch;if(W>=X&&!ne)return;if(!ne&&this._streamEnded(U,K)){M.trigger(v.Events.BUFFER_EOS,{type:"audio"}),this.state=p.State.ENDED;return}var fe=K.fragments,me=fe[0].start,Ae=U.end;if(ne){var De=this.getLoadPosition();Ae=De,K.PTSKnown&&Deme||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),N.currentTime=me+.05))}var ye=this.getNextFragment(Ae,K);if(!ye){this.bufferFlushed=!0;return}((y=ye.decryptdata)===null||y===void 0?void 0:y.keyFormat)==="identity"&&!((_=ye.decryptdata)!==null&&_!==void 0&&_.key)?this.loadKey(ye,K):this.loadFragment(ye,K,Ae)},C.getMaxBufferLength=function(){var y=k.prototype.getMaxBufferLength.call(this),_=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,l.PlaylistLevelType.MAIN);return _===null?y:Math.max(y,_.len)},C.onMediaDetaching=function(){this.videoBuffer=null,k.prototype.onMediaDetaching.call(this)},C.onAudioTracksUpdated=function(y,_){var M=_.audioTracks;this.resetTransmuxer(),this.levels=M.map(function(I){return new d.Level(I)})},C.onAudioTrackSwitching=function(y,_){var M=!!_.url;this.trackId=_.id;var I=this.fragCurrent;I!=null&&I.loader&&I.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),M?this.setInterval(E):this.resetTransmuxer(),M?(this.audioSwitch=!0,this.state=p.State.IDLE):this.state=p.State.STOPPED,this.tick()},C.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},C.onLevelLoaded=function(y,_){this.mainDetails=_.details},C.onAudioTrackLoaded=function(y,_){var M,I=this.levels,N=_.details,G=_.id;if(!I){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+N.startSN+","+N.endSN+"],duration:"+N.totalduration);var H=I[G],B=0;if(N.live||(M=H.details)!==null&&M!==void 0&&M.live){var K=this.mainDetails;if(N.fragments[0]||(N.deltaUpdateFailed=!0),N.deltaUpdateFailed||!K)return;!H.details&&N.hasProgramDateTime&&K.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(N,K),B=N.fragments[0].start):B=this.alignPlaylists(N,H.details)}H.details=N,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!N.live)&&this.setStartPosition(H.details,B),this.state===p.State.WAITING_TRACK&&!this.waitForCdnTuneIn(N)&&(this.state=p.State.IDLE),this.tick()},C._handleFragmentLoadProgress=function(y){var _,M=y.frag,I=y.part,N=y.payload,G=this.config,H=this.trackId,B=this.levels;if(!B){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+M.sn+" of level "+M.level+" will not be buffered");return}var K=B[H];console.assert(K,"Audio track is defined on fragment load progress");var U=K.details;console.assert(U,"Audio track details are defined on fragment load progress");var W=G.defaultAudioCodec||K.audioCodec||"mp4a.40.2",X=this.transmuxer;X||(X=this.transmuxer=new u.default(this.hls,l.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ne=this.initPTS[M.cc],fe=(_=M.initSegment)===null||_===void 0?void 0:_.data;if(ne!==void 0){var me=!1,Ae=I?I.index:-1,De=Ae!==-1,ye=new o.ChunkMetadata(M.level,M.sn,M.stats.chunkCount,N.byteLength,Ae,De);X.push(N,fe,W,"",M,I,U.totalduration,me,ye,ne)}else{r.logger.log("Unknown video PTS for cc "+M.cc+", waiting for video PTS before demuxing audio frag "+M.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+H);var Oe=this.waitingData=this.waitingData||{frag:M,part:I,cache:new c.default,complete:!1},xe=Oe.cache;xe.push(new Uint8Array(N)),this.waitingVideoCC=this.videoTrackCC,this.state=p.State.WAITING_INIT_PTS}},C._handleFragmentLoadComplete=function(y){if(this.waitingData){this.waitingData.complete=!0;return}k.prototype._handleFragmentLoadComplete.call(this,y)},C.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},C.onBufferCreated=function(y,_){var M=_.tracks.audio;M&&(this.mediaBuffer=M.buffer),_.tracks.video&&(this.videoBuffer=_.tracks.video.buffer)},C.onFragBuffered=function(y,_){var M=_.frag,I=_.part;if(M.type!==l.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(M)){this.warn("Fragment "+M.sn+(I?" p: "+I.index:"")+" of level "+M.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}M.sn!=="initSegment"&&(this.fragPrevious=M,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(v.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(M,I)},C.onError=function(y,_){switch(_.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.AUDIO,_);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==p.State.ERROR&&this.state!==p.State.STOPPED&&(this.state=_.fatal?p.State.ERROR:p.State.IDLE,this.warn(_.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(_.parent==="audio"&&(this.state===p.State.PARSING||this.state===p.State.PARSED)){var M=!0,I=this.getFwdBufferInfo(this.mediaBuffer,l.PlaylistLevelType.AUDIO);I&&I.len>.5&&(M=!this.reduceMaxBufferLength(I.len)),M&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},C.onBufferFlushed=function(y,_){var M=_.type;M===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},C._handleTransmuxComplete=function(y){var _,M="audio",I=this.hls,N=y.remuxResult,G=y.chunkMeta,H=this.getCurrentContext(G);if(!H){this.warn("The loading context changed while buffering fragment "+G.sn+" of level "+G.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(G.level);return}var B=H.frag,K=H.part,U=N.audio,W=N.text,X=N.id3,ne=N.initSegment;if(this.fragContextChanged(B))return;if(this.state=p.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ne!=null&&ne.tracks&&(this._bufferInitSegment(ne.tracks,B,G),I.trigger(v.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:M,tracks:ne.tracks})),U){var fe=U.startPTS,me=U.endPTS,Ae=U.startDTS,De=U.endDTS;K&&(K.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:fe,endPTS:me,startDTS:Ae,endDTS:De}),B.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,fe,me,Ae,De),this.bufferFragmentData(U,B,K,G)}if(X!=null&&(_=X.samples)!==null&&_!==void 0&&_.length){var ye=a({frag:B,id:M},X);I.trigger(v.Events.FRAG_PARSING_METADATA,ye)}if(W){var Oe=a({frag:B,id:M},W);I.trigger(v.Events.FRAG_PARSING_USERDATA,Oe)}},C._bufferInitSegment=function(y,_,M){if(this.state!==p.State.PARSING)return;y.video&&delete y.video;var I=y.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(v.Events.BUFFER_CODECS,y);var N=I.initSegment;if(N!=null&&N.byteLength){var G={type:"audio",frag:_,part:null,chunkMeta:M,parent:_.type,data:N};this.hls.trigger(v.Events.BUFFER_APPENDING,G)}this.tick()},C.loadFragment=function(y,_,M){var I=this.fragmentTracker.getState(y);this.fragCurrent=y,(this.audioSwitch||I===b.FragmentState.NOT_LOADED||I===b.FragmentState.PARTIAL)&&(y.sn==="initSegment"?this._loadInitSegment(y):_.live&&!Object(P.isFiniteNumber)(this.initPTS[y.cc])?(this.log("Waiting for video PTS in continuity counter "+y.cc+" of live stream before loading audio fragment "+y.sn+" of level "+this.trackId),this.state=p.State.WAITING_INIT_PTS):(this.startFragRequested=!0,k.prototype.loadFragment.call(this,y,_,M)))},C.completeAudioSwitch=function(){var y=this.hls,_=this.media,M=this.trackId;_&&(this.log("Switching audio track : flushing all audio"),k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,y.trigger(v.Events.AUDIO_TRACK_SWITCHED,{id:M})},O}(p.default);g.default=f},"./src/controller/audio-track-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/events.ts"),p=T("./src/errors.ts"),v=T("./src/controller/base-playlist-controller.ts"),S=T("./src/types/loader.ts");function b(u,o){for(var h=0;h=r.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var a=r[this.trackId];this.log("Now switching to audio-track index "+s);var t=r[s],w=t.id,E=t.groupId,f=E===void 0?"":E,k=t.name,O=t.type,C=t.url;if(this.trackId=s,this.trackName=k,this.selectDefaultTrack=!1,this.hls.trigger(P.Events.AUDIO_TRACK_SWITCHING,{id:w,groupId:f,name:k,type:O,url:C}),t.details&&!t.details.live)return;var x=this.switchParams(t.url,a==null?void 0:a.details);this.loadPlaylist(x)},h.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var r=this.trackName,a=this.findTrackId(r)||this.findTrackId();a!==-1?this.setAudioTrack(a):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},h.findTrackId=function(s){for(var r=this.tracksInGroup,a=0;ao.partTarget&&(t+=1)}if(Object(P.isFiniteNumber)(a))return new p.HlsUrlParameters(a,Object(P.isFiniteNumber)(t)?t:void 0,p.HlsSkip.No)}}},n.loadPlaylist=function(u){},n.shouldLoadTrack=function(u){return this.canLoad&&u&&!!u.url&&(!u.details||u.details.live)},n.playlistLoaded=function(u,o,h){var m=this,s=o.details,r=o.stats,a=r.loading.end?Math.max(0,self.performance.now()-r.loading.end):0;if(s.advancedDateTime=Date.now()-a,s.live||h!=null&&h.live){if(s.reloaded(h),h&&this.log("live playlist "+u+" "+(s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:"MISSED")),h&&s.fragments.length>0&&Object(v.mergeDetails)(h,s),!this.canLoad||!s.live)return;var t,w=void 0,E=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var f=this.hls.config.lowLatencyMode,k=s.lastPartSn,O=s.endSN,C=s.lastPartIndex,x=C!==-1,y=k===O,_=f?0:C;x?(w=y?O+1:k,E=y?_:C+1):w=O+1;var M=s.age,I=M+s.ageHeader,N=Math.min(I-s.partTarget,s.targetduration*1.5);if(N>0){if(h&&N>h.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+h.tuneInGoal+" to: "+N+" with playlist age: "+s.age),N=0;else{var G=Math.floor(N/s.targetduration);if(w+=G,E!==void 0){var H=Math.round(N%s.targetduration/s.partTarget);E+=H}this.log("CDN Tune-in age: "+s.ageHeader+"s last advanced "+M.toFixed(2)+"s goal: "+N+" skip sn "+G+" to part "+E)}s.tuneInGoal=N}if(t=this.getDeliveryDirectives(s,o.deliveryDirectives,w,E),f||!y){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(s,o.deliveryDirectives,w,E);var B=Object(v.computeReloadInterval)(s,r);w!==void 0&&s.canBlockReload&&(B-=s.partTarget||1),this.log("reload live playlist "+u+" in "+Math.round(B)+" ms"),this.timer=self.setTimeout(function(){return m.loadPlaylist(t)},B)}else this.clearTimer()},n.getDeliveryDirectives=function(u,o,h,m){var s=Object(p.getSkipValue)(u,h);return o!=null&&o.skip&&u.deltaUpdateFailed&&(h=o.msn,m=o.part,s=p.HlsSkip.No),new p.HlsUrlParameters(h,m,s)},n.retryLoadingOrFail=function(u){var o=this,h=this.hls.config,m=this.retryCount-1&&(s=u.context)!==null&&s!==void 0&&s.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+u.details+'"'),this.loadPlaylist();else{var r=Math.min(Math.pow(2,this.retryCount)*h.levelLoadingRetryDelay,h.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return o.loadPlaylist()},r),this.warn("retry playlist loading #"+this.retryCount+" in "+r+' ms after "'+u.details+'"')}}else this.warn('cannot recover from error "'+u.details+'"'),this.clearTimer(),u.fatal=!0;return m},l}()},"./src/controller/base-stream-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"State",function(){return O}),T.d(g,"default",function(){return C});var P=T("./src/polyfills/number.ts"),p=T("./src/task-loop.ts"),v=T("./src/controller/fragment-tracker.ts"),S=T("./src/utils/buffer-helper.ts"),b=T("./src/utils/logger.ts"),d=T("./src/events.ts"),l=T("./src/errors.ts"),n=T("./src/types/transmuxer.ts"),c=T("./src/utils/mp4-tools.ts"),u=T("./src/utils/discontinuities.ts"),o=T("./src/controller/fragment-finders.ts"),h=T("./src/controller/level-helper.ts"),m=T("./src/loader/fragment-loader.ts"),s=T("./src/crypt/decrypter.ts"),r=T("./src/utils/time-ranges.ts"),a=T("./src/types/loader.ts");function t(x,y){for(var _=0;_ne;(K0&&K&&K.key&&K.iv&&K.method==="AES-128"){var U=self.performance.now();return N.decrypter.webCryptoDecrypt(new Uint8Array(B),K.key.buffer,K.iv.buffer).then(function(W){var X=self.performance.now();return H.trigger(d.Events.FRAG_DECRYPTED,{frag:I,payload:W,stats:{tstart:U,tdecrypt:X}}),G.payload=W,G})}return G}).then(function(G){var H=N.fragCurrent,B=N.hls,K=N.levels;if(!K)throw new Error("init load aborted, missing levels");var U=K[I.level].details;console.assert(U,"Level details are defined when init segment is loaded");var W=I.stats;N.state=O.IDLE,N.fragLoadError=0,I.data=new Uint8Array(G.payload),W.parsing.start=W.buffering.start=self.performance.now(),W.parsing.end=W.buffering.end=self.performance.now(),G.frag===H&&B.trigger(d.Events.FRAG_BUFFERED,{stats:W,frag:H,part:null,id:I.type}),N.tick()}).catch(function(G){N.warn(G),N.resetFragmentLoading(I)})},_.fragContextChanged=function(I){var N=this.fragCurrent;return!I||!N||I.level!==N.level||I.sn!==N.sn||I.urlId!==N.urlId},_.fragBufferedComplete=function(I,N){var G=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+I.type+" sn: "+I.sn+(N?" part: "+N.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+I.level+" "+r.default.toString(S.BufferHelper.getBuffered(G))),this.state=O.IDLE,this.tick()},_._handleFragmentLoadComplete=function(I){var N=this.transmuxer;if(!N)return;var G=I.frag,H=I.part,B=I.partsLoaded,K=!B||B.length===0||B.some(function(W){return!W}),U=new n.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,H?H.index:-1,!K);N.flush(U)},_._handleFragmentLoadProgress=function(I){},_._doFragLoad=function(I,N,G,H){var B=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(I.start,G||0),this.config.lowLatencyMode&&N){var K=N.partList;if(K&&H){G>I.end&&N.fragmentHint&&(I=N.fragmentHint);var U=this.getNextPart(K,I,G);if(U>-1){var W=K[U];return this.log("Loading part sn: "+I.sn+" p: "+W.index+" cc: "+I.cc+" of playlist ["+N.startSN+"-"+N.endSN+"] parts [0-"+U+"-"+(K.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+I.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=W.start+W.duration,this.state=O.FRAG_LOADING,this.hls.trigger(d.Events.FRAG_LOADING,{frag:I,part:K[U],targetBufferTime:G}),this.doFragPartsLoad(I,K,U,H).catch(function(X){return B.handleFragLoadError(X)})}else if(!I.url||this.loadedEndOfParts(K,G))return Promise.resolve(null)}}return this.log("Loading fragment "+I.sn+" cc: "+I.cc+" "+(N?"of ["+N.startSN+"-"+N.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+I.level+", target: "+parseFloat(G.toFixed(3))),Object(P.isFiniteNumber)(I.sn)&&!this.bitrateTest&&(this.nextLoadPosition=I.start+I.duration),this.state=O.FRAG_LOADING,this.hls.trigger(d.Events.FRAG_LOADING,{frag:I,targetBufferTime:G}),this.fragmentLoader.load(I,H).catch(function(X){return B.handleFragLoadError(X)})},_.doFragPartsLoad=function(I,N,G,H){var B=this;return new Promise(function(K,U){var W=[],X=function ne(fe){var me=N[fe];B.fragmentLoader.loadPart(I,me,H).then(function(Ae){W[me.index]=Ae;var De=Ae.part;B.hls.trigger(d.Events.FRAG_LOADED,Ae);var ye=N[fe+1];if(ye&&ye.fragment===I)ne(fe+1);else return K({frag:I,part:De,partsLoaded:W})}).catch(U)};X(G)})},_.handleFragLoadError=function(I){var N=I.data;return N&&N.details===l.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(N.frag,N.part):this.hls.trigger(d.Events.ERROR,N),null},_._handleTransmuxerFlush=function(I){var N=this.getCurrentContext(I);if(!N||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var G=N.frag,H=N.part,B=N.level,K=self.performance.now();G.stats.parsing.end=K,H&&(H.stats.parsing.end=K),this.updateLevelTiming(G,H,B,I.partial)},_.getCurrentContext=function(I){var N=this.levels,G=I.level,H=I.sn,B=I.part;if(!N||!N[G])return this.warn("Levels object was unset while buffering fragment "+H+" of level "+G+". The current chunk will not be buffered."),null;var K=N[G],U=B>-1?Object(h.getPartWith)(K,H,B):null,W=U?U.fragment:Object(h.getFragmentWithSN)(K,H,this.fragCurrent);return W?{frag:W,part:U,level:K}:null},_.bufferFragmentData=function(I,N,G,H){if(!I||this.state!==O.PARSING)return;var B=I.data1,K=I.data2,U=B;if(B&&K&&(U=Object(c.appendUint8Array)(B,K)),!U||!U.length)return;var W={type:I.type,frag:N,part:G,chunkMeta:H,parent:N.type,data:U};this.hls.trigger(d.Events.BUFFER_APPENDING,W),I.dropped&&I.independent&&!G&&this.flushBufferGap(N)},_.flushBufferGap=function(I){var N=this.media;if(!N)return;if(!S.BufferHelper.isBuffered(N,N.currentTime)){this.flushMainBuffer(0,I.start);return}var G=N.currentTime,H=S.BufferHelper.bufferInfo(N,G,0),B=I.duration,K=Math.min(this.config.maxFragLookUpTolerance*2,B*.25),U=Math.max(Math.min(I.start-K,H.end-K),G+K);I.start-U>K&&this.flushMainBuffer(U,I.start)},_.getFwdBufferInfo=function(I,N){var G=this.config,H=this.getLoadPosition();if(!Object(P.isFiniteNumber)(H))return null;var B=S.BufferHelper.bufferInfo(I,H,G.maxBufferHole);if(B.len===0&&B.nextStart!==void 0){var K=this.fragmentTracker.getBufferedFrag(H,N);if(K&&B.nextStart=G?(N.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+N.maxMaxBufferLength+"s"),!0):!1},_.getNextFragment=function(I,N){var G,H,B=N.fragments,K=B.length;if(!K)return null;var U=this.config,W=B[0].start,X;if(N.live){var ne=U.initialLiveManifestSize;if(K-1&&GG.start&&G.loaded},_.getInitialLiveFragment=function(I,N){var G=this.fragPrevious,H=null;if(G){if(I.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),H=Object(o.findFragmentByPDT)(N,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!H){var B=G.sn+1;if(B>=I.startSN&&B<=I.endSN){var K=N[B-I.startSN];G.cc===K.cc&&(H=K,this.log("Live playlist, switching playlist, load frag with next SN: "+H.sn))}H||(H=Object(o.findFragWithCC)(N,G.cc),H&&this.log("Live playlist, switching playlist, load frag with same CC: "+H.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(H=this.getFragmentAtPosition(U,this.bitrateTest?I.fragmentEnd:I.edge,I))}return H},_.getFragmentAtPosition=function(I,N,G){var H=this.config,B=this.fragPrevious,K=G.fragments,U=G.endSN,W=G.fragmentHint,X=H.maxFragLookUpTolerance,ne=!!(H.lowLatencyMode&&G.partList&&W);ne&&W&&!this.bitrateTest&&(K=K.concat(W),U=W.sn);var fe;if(IN-X?0:X;fe=Object(o.findFragmentByPTS)(B,K,I,me)}else fe=K[K.length-1];if(fe){var Ae=fe.sn-G.startSN,De=B&&fe.level===B.level,ye=K[Ae+1],Oe=this.fragmentTracker.getState(fe);if(Oe===v.FragmentState.BACKTRACKED){fe=null;for(var xe=Ae;K[xe]&&this.fragmentTracker.getState(K[xe])===v.FragmentState.BACKTRACKED;)B?fe=K[xe--]:fe=K[--xe];fe||(fe=ye)}else B&&fe.sn===B.sn&&!ne&&(De&&(fe.sn=K-N.maxFragLookUpTolerance&&B<=U;if(H!==null&&G.duration>H&&(B"+I.startSN+" prev-sn: "+(B?B.sn:"na")+" fragments: "+U),fe}return W},_.waitForCdnTuneIn=function(I){var N=3;return I.live&&I.canBlockReload&&I.tuneInGoal>Math.max(I.partHoldBack,I.partTarget*N)},_.setStartPosition=function(I,N){var G=this.startPosition;if(G"+I))}}]),y}(p.default)},"./src/controller/buffer-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return o});var P=T("./src/polyfills/number.ts"),p=T("./src/events.ts"),v=T("./src/utils/logger.ts"),S=T("./src/errors.ts"),b=T("./src/utils/buffer-helper.ts"),d=T("./src/utils/mediasource-helper.ts"),l=T("./src/loader/fragment.ts"),n=T("./src/controller/buffer-operation-queue.ts"),c=Object(d.getMediaSource)(),u=/([ha]vc.)(?:\.[^.,]+)+/,o=function(){function h(s){var r=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 a=r.hls,t=r.media,w=r.mediaSource;v.logger.log("[buffer-controller]: Media source opened"),t&&(r.updateMediaElementDuration(),a.trigger(p.Events.MEDIA_ATTACHED,{media:t})),w&&w.removeEventListener("sourceopen",r._onMediaSourceOpen),r.checkPendingTracks()},this._onMediaSourceClose=function(){v.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){v.logger.log("[buffer-controller]: Media source ended")},this.hls=s,this._initSourceBuffer(),this.registerListeners()}var m=h.prototype;return m.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},m.destroy=function(){this.unregisterListeners(),this.details=null},m.registerListeners=function(){var r=this.hls;r.on(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(p.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(p.Events.BUFFER_RESET,this.onBufferReset,this),r.on(p.Events.BUFFER_APPENDING,this.onBufferAppending,this),r.on(p.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(p.Events.BUFFER_EOS,this.onBufferEos,this),r.on(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),r.on(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),r.on(p.Events.FRAG_PARSED,this.onFragParsed,this),r.on(p.Events.FRAG_CHANGED,this.onFragChanged,this)},m.unregisterListeners=function(){var r=this.hls;r.off(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(p.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(p.Events.BUFFER_RESET,this.onBufferReset,this),r.off(p.Events.BUFFER_APPENDING,this.onBufferAppending,this),r.off(p.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(p.Events.BUFFER_EOS,this.onBufferEos,this),r.off(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),r.off(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),r.off(p.Events.FRAG_PARSED,this.onFragParsed,this),r.off(p.Events.FRAG_CHANGED,this.onFragChanged,this)},m._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},m.onManifestParsed=function(r,a){var t=2;(a.audio&&!a.video||!a.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,v.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},m.onMediaAttaching=function(r,a){var t=this.media=a.media;if(t&&c){var w=this.mediaSource=new c;w.addEventListener("sourceopen",this._onMediaSourceOpen),w.addEventListener("sourceended",this._onMediaSourceEnded),w.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(w),this._objectUrl=t.src}},m.onMediaDetaching=function(){var r=this.media,a=this.mediaSource,t=this._objectUrl;if(a){if(v.logger.log("[buffer-controller]: media source detaching"),a.readyState==="open")try{a.endOfStream()}catch(w){v.logger.warn("[buffer-controller]: onMediaDetaching: "+w.message+" while calling endOfStream")}this.onBufferReset(),a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),r&&(t&&self.URL.revokeObjectURL(t),r.src===t?(r.removeAttribute("src"),r.load()):v.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(p.Events.MEDIA_DETACHED,void 0)},m.onBufferReset=function(){var r=this;this.getSourceBufferTypes().forEach(function(a){var t=r.sourceBuffer[a];try{t&&(r.removeBufferListeners(a),r.mediaSource&&r.mediaSource.removeSourceBuffer(t),r.sourceBuffer[a]=void 0)}catch(w){v.logger.warn("[buffer-controller]: Failed to reset the "+a+" buffer",w)}}),this._initSourceBuffer()},m.onBufferCodecs=function(r,a){var t=this,w=this.getSourceBufferTypes().length;if(Object.keys(a).forEach(function(E){if(w){var f=t.tracks[E];if(f&&typeof f.buffer.changeType=="function"){var k=a[E],O=k.codec,C=k.levelCodec,x=k.container,y=(f.levelCodec||f.codec).replace(u,"$1"),_=(C||O).replace(u,"$1");if(y!==_){var M=x+";codecs="+(C||O);t.appendChangeType(E,M)}}}else t.pendingTracks[E]=a[E]}),w)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},m.appendChangeType=function(r,a){var t=this,w=this.operationQueue,E={execute:function(){var k=t.sourceBuffer[r];k&&(v.logger.log("[buffer-controller]: changing "+r+" sourceBuffer type to "+a),k.changeType(a)),w.shiftAndExecuteNext(r)},onStart:function(){},onComplete:function(){},onError:function(k){v.logger.warn("[buffer-controller]: Failed to change "+r+" SourceBuffer type",k)}};w.append(E,r)},m.onBufferAppending=function(r,a){var t=this,w=this.hls,E=this.operationQueue,f=this.tracks,k=a.data,O=a.type,C=a.frag,x=a.part,y=a.chunkMeta,_=y.buffering[O],M=self.performance.now();_.start=M;var I=C.stats.buffering,N=x?x.stats.buffering:null;I.start===0&&(I.start=M),N&&N.start===0&&(N.start=M);var G=f.audio,H=O==="audio"&&y.id===1&&(G==null?void 0:G.container)==="audio/mpeg",B={execute:function(){if(_.executeStart=self.performance.now(),H){var U=t.sourceBuffer[O];if(U){var W=C.start-U.timestampOffset;Math.abs(W)>=.1&&(v.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+C.start+" (delta: "+W+") sn: "+C.sn+")"),U.timestampOffset=C.start)}}t.appendExecutor(k,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();_.executeEnd=_.end=U,I.first===0&&(I.first=U),N&&N.first===0&&(N.first=U);var W=t.sourceBuffer,X={};for(var ne in W)X[ne]=b.BufferHelper.getBuffered(W[ne]);t.appendError=0,t.hls.trigger(p.Events.BUFFER_APPENDED,{type:O,frag:C,part:x,chunkMeta:y,parent:C.type,timeRanges:X})},onError:function(U){v.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var W={type:S.ErrorTypes.MEDIA_ERROR,parent:C.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?W.details=S.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,W.details=S.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>w.config.appendErrorMaxRetry&&(v.logger.error("[buffer-controller]: Failed "+w.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),W.fatal=!0)),w.trigger(p.Events.ERROR,W)}};E.append(B,O)},m.onBufferFlushing=function(r,a){var t=this,w=this.operationQueue,E=function(k){return{execute:t.removeExecutor.bind(t,k,a.startOffset,a.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(p.Events.BUFFER_FLUSHED,{type:k})},onError:function(C){v.logger.warn("[buffer-controller]: Failed to remove from "+k+" SourceBuffer",C)}}};a.type?w.append(E(a.type),a.type):this.getSourceBufferTypes().forEach(function(f){w.append(E(f),f)})},m.onFragParsed=function(r,a){var t=this,w=a.frag,E=a.part,f=[],k=E?E.elementaryStreams:w.elementaryStreams;k[l.ElementaryStreamTypes.AUDIOVIDEO]?f.push("audiovideo"):(k[l.ElementaryStreamTypes.AUDIO]&&f.push("audio"),k[l.ElementaryStreamTypes.VIDEO]&&f.push("video"));var O=function(){var x=self.performance.now();w.stats.buffering.end=x,E&&(E.stats.buffering.end=x);var y=E?E.stats:w.stats;t.hls.trigger(p.Events.FRAG_BUFFERED,{frag:w,part:E,stats:y,id:w.type})};f.length===0&&v.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+w.type+" level: "+w.level+" sn: "+w.sn),this.blockBuffers(O,f)},m.onFragChanged=function(r,a){this.flushBackBuffer()},m.onBufferEos=function(r,a){var t=this,w=this.getSourceBufferTypes().reduce(function(E,f){var k=t.sourceBuffer[f];return(!a.type||a.type===f)&&(k&&!k.ended&&(k.ended=!0,v.logger.log("[buffer-controller]: "+f+" sourceBuffer now EOS"))),E&&!!(!k||k.ended)},!0);w&&this.blockBuffers(function(){var E=t.mediaSource;if(!E||E.readyState!=="open")return;E.endOfStream()})},m.onLevelUpdated=function(r,a){var t=a.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},m.flushBackBuffer=function(){var r=this.hls,a=this.details,t=this.media,w=this.sourceBuffer;if(!t||a===null)return;var E=this.getSourceBufferTypes();if(!E.length)return;var f=a.live&&r.config.liveBackBufferLength!==null?r.config.liveBackBufferLength:r.config.backBufferLength;if(!Object(P.isFiniteNumber)(f)||f<0)return;var k=t.currentTime,O=a.levelTargetDuration,C=Math.max(f,O),x=Math.floor(k/O)*O-C;E.forEach(function(y){var _=w[y];if(_){var M=b.BufferHelper.getBuffered(_);M.length>0&&x>M.start(0)&&(r.trigger(p.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),a.live&&r.trigger(p.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),r.trigger(p.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:y}))}})},m.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var r=this.details,a=this.hls,t=this.media,w=this.mediaSource,E=r.fragments[0].start+r.totalduration,f=t.duration,k=Object(P.isFiniteNumber)(w.duration)?w.duration:0;r.live&&a.config.liveDurationInfinity?(v.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),w.duration=Infinity,this.updateSeekableRange(r)):(E>k&&E>f||!Object(P.isFiniteNumber)(f))&&(v.logger.log("[buffer-controller]: Updating Media Source duration to "+E.toFixed(3)),w.duration=E)},m.updateSeekableRange=function(r){var a=this.mediaSource,t=r.fragments,w=t.length;if(w&&r.live&&a!==null&&a!==void 0&&a.setLiveSeekableRange){var E=Math.max(0,t[0].start),f=Math.max(E,E+r.totalduration);a.setLiveSeekableRange(E,f)}},m.checkPendingTracks=function(){var r=this.bufferCodecEventsExpected,a=this.operationQueue,t=this.pendingTracks,w=Object.keys(t).length;if(w&&!r||w===2){this.createSourceBuffers(t),this.pendingTracks={};var E=this.getSourceBufferTypes();if(E.length===0){this.hls.trigger(p.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}E.forEach(function(f){a.executeNext(f)})}},m.createSourceBuffers=function(r){var a=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var w=0;for(var E in r)if(!a[E]){var f=r[E];if(!f)throw Error("source buffer exists for track "+E+", however track does not");var k=f.levelCodec||f.codec,O=f.container+";codecs="+k;v.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var C=a[E]=t.addSourceBuffer(O),x=E;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[E]={buffer:C,codec:k,container:f.container,levelCodec:f.levelCodec,id:f.id},w++}catch(y){v.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+y.message),this.hls.trigger(p.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:y,mimeType:O})}}w&&this.hls.trigger(p.Events.BUFFER_CREATED,{tracks:this.tracks})},m._onSBUpdateStart=function(r){var a=this.operationQueue,t=a.current(r);t.onStart()},m._onSBUpdateEnd=function(r){var a=this.operationQueue,t=a.current(r);t.onComplete(),a.shiftAndExecuteNext(r)},m._onSBUpdateError=function(r,a){v.logger.error("[buffer-controller]: "+r+" SourceBuffer error",a),this.hls.trigger(p.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(r);t&&t.onError(a)},m.removeExecutor=function(r,a,t){var w=this.media,E=this.mediaSource,f=this.operationQueue,k=this.sourceBuffer,O=k[r];if(!w||!E||!O){v.logger.warn("[buffer-controller]: Attempting to remove from the "+r+" SourceBuffer, but it does not exist"),f.shiftAndExecuteNext(r);return}var C=Object(P.isFiniteNumber)(w.duration)?w.duration:Infinity,x=Object(P.isFiniteNumber)(E.duration)?E.duration:Infinity,y=Math.max(0,a),_=Math.min(t,C,x);_>y?(v.logger.log("[buffer-controller]: Removing ["+y+","+_+"] from the "+r+" SourceBuffer"),console.assert(!O.updating,r+" sourceBuffer must not be updating"),O.remove(y,_)):f.shiftAndExecuteNext(r)},m.appendExecutor=function(r,a){var t=this.operationQueue,w=this.sourceBuffer,E=w[a];if(!E){v.logger.warn("[buffer-controller]: Attempting to append to the "+a+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(a);return}E.ended=!1,console.assert(!E.updating,a+" sourceBuffer must not be updating"),E.appendBuffer(r)},m.blockBuffers=function(r,a){var t=this;if(a===void 0&&(a=this.getSourceBufferTypes()),!a.length){v.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(r);return}var w=this.operationQueue,E=a.map(function(f){return w.appendBlocker(f)});Promise.all(E).then(function(){r(),a.forEach(function(f){var k=t.sourceBuffer[f];(!k||!k.updating)&&w.shiftAndExecuteNext(f)})})},m.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},m.addBufferListener=function(r,a,t){var w=this.sourceBuffer[r];if(!w)return;var E=t.bind(this,r);this.listeners[r].push({event:a,listener:E}),w.addEventListener(a,E)},m.removeBufferListeners=function(r){var a=this.sourceBuffer[r];if(!a)return;this.listeners[r].forEach(function(t){a.removeEventListener(t.event,t.listener)})},h}()},"./src/controller/buffer-operation-queue.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return p});var P=T("./src/utils/logger.ts"),p=function(){function v(b){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=b}var S=v.prototype;return S.append=function(d,l){var n=this.queues[l];n.push(d),n.length===1&&this.buffers[l]&&this.executeNext(l)},S.insertAbort=function(d,l){var n=this.queues[l];n.unshift(d),this.executeNext(l)},S.appendBlocker=function(d){var l,n=new Promise(function(u){l=u}),c={execute:l,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,d),n},S.executeNext=function(d){var l=this.buffers,n=this.queues,c=l[d],u=n[d];if(u.length){var o=u[0];try{o.execute()}catch(h){P.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(h),(!c||!c.updating)&&(u.shift(),this.executeNext(d))}}},S.shiftAndExecuteNext=function(d){this.queues[d].shift(),this.executeNext(d)},S.current=function(d){return this.queues[d][0]},v}()},"./src/controller/cap-level-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/events.ts");function p(b,d){for(var l=0;l0&&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}}},d.getMaxLevel=function(n){var c=this,u=this.hls.levels;if(!u.length)return-1;var o=u.filter(function(h,m){return b.isLevelAllowed(m,c.restrictedLevels)&&m<=n});return this.clientRect=null,b.getMaxLevelByMediaSize(o,this.mediaWidth,this.mediaHeight)},d.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()},d.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},d.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,c={width:0,height:0};if(n){var u=n.getBoundingClientRect();c.width=u.width,c.height=u.height,!c.width&&!c.height&&(c.width=u.right-u.left||n.width||0,c.height=u.bottom-u.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,u){if(!n||!n.length)return-1;for(var o=function(a,t){return t?a.width!==t.width||a.height!==t.height:!0},h=n.length-1,m=0;m=c||s.height>=u)&&o(s,n[m+1])){h=m;break}}return h},v(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=S},"./src/controller/cmcd-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return o});var P=T("./src/events.ts"),p=T("./src/types/cmcd.ts"),v=T("./src/utils/buffer-helper.ts"),S=T("./src/utils/logger.ts");function b(h,m){for(var s=0;s=h.length?{done:!0}:{done:!1,value:h[r++]}}}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(h,m){if(!h)return;if(typeof h=="string")return c(h,m);var s=Object.prototype.toString.call(h).slice(8,-1);if(s==="Object"&&h.constructor&&(s=h.constructor.name),s==="Map"||s==="Set")return Array.from(h);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return c(h,m)}function c(h,m){(m==null||m>h.length)&&(m=h.length);for(var s=0,r=new Array(m);sa&&(a=f.bitrate)}return a>0?a:NaN},m.getBufferLength=function(r){var a=this.hls.media,t=r===p.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!a)return NaN;var w=v.BufferHelper.bufferInfo(t,a.currentTime,this.config.maxBufferHole);return w.len*1e3},m.createPlaylistLoader=function(){var r=this.config.pLoader,a=this.applyPlaylistData,t=r||this.config.loader;return function(){function w(f){this.loader=void 0,this.loader=new t(f)}var E=w.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(k,O,C){a(k),this.loader.load(k,O,C)},d(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},m.createFragmentLoader=function(){var r=this.config.fLoader,a=this.applyFragmentData,t=r||this.config.loader;return function(){function w(f){this.loader=void 0,this.loader=new t(f)}var E=w.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(k,O,C){a(k),this.loader.load(k,O,C)},d(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},h.uuid=function(){var r=URL.createObjectURL(new Blob),a=r.toString();return URL.revokeObjectURL(r),a.substr(a.lastIndexOf("/")+1)},h.serialize=function(r){for(var a=[],t=function(H){return!Number.isNaN(H)&&H!=null&&H!==""&&H!==!1},w=function(H){return Math.round(H)},E=function(H){return w(H/100)*100},f=function(H){return encodeURIComponent(H)},k={br:w,d:w,bl:E,dl:E,mtp:E,nor:f,rtp:E,tb:w},O=Object.keys(r||{}).sort(),C=l(O),x;!(x=C()).done;){var y=x.value,_=r[y];if(!t(_))continue;if(y==="v"&&_===1)continue;if(y=="pr"&&_===1)continue;var M=k[y];M&&(_=M(_));var I=typeof _,N=void 0;y==="ot"||y==="sf"||y==="st"?N=y+"="+_:I==="boolean"?N=y:I==="number"?N=y+"="+_:N=y+"="+JSON.stringify(_),a.push(N)}return a.join(",")},h.toHeaders=function(r){for(var a=Object.keys(r),t={},w=["Object","Request","Session","Status"],E=[{},{},{},{}],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},k=0,O=a;kl){this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var f=l-this._requestLicenseFailureCount+1;v.logger.warn("Retrying license request, "+f+" attempts left"),this._requestLicense(a,t)}break}},h._generateLicenseRequestChallenge=function(s,r){switch(s.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return r}throw new Error("unsupported key-system: "+s.mediaKeySystemDomain)},h._requestLicense=function(s,r){v.logger.log("Requesting content license for key-system");var a=this._mediaKeysList[0];if(!a){v.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(a.mediaKeySystemDomain),w=this._createLicenseXhr(t,s,r);v.logger.log("Sending license request to URL: "+t);var E=this._generateLicenseRequestChallenge(a,s);w.send(E)}catch(f){v.logger.error("Failure requesting DRM license: "+f),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},h.onMediaAttached=function(s,r){if(!this._emeEnabled)return;var a=r.media;this._media=a,a.addEventListener("encrypted",this._onMediaEncrypted)},h.onMediaDetached=function(){var s=this._media,r=this._mediaKeysList;if(!s)return;s.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(r.map(function(a){if(a.mediaKeysSession)return a.mediaKeysSession.close().catch(function(){})})).then(function(){return s.setMediaKeys(null)}).catch(function(){})},h.onManifestParsed=function(s,r){if(!this._emeEnabled)return;var a=r.levels.map(function(w){return w.audioCodec}).filter(function(w){return!!w}),t=r.levels.map(function(w){return w.videoCodec}).filter(function(w){return!!w});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,a,t)},d(o,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),o}();g.default=u},"./src/controller/fps-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/events.ts"),p=T("./src/utils/logger.ts"),v=function(){function S(d){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=d,this.registerListeners()}var b=S.prototype;return b.setStreamController=function(l){this.streamController=l},b.registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},b.unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching)},b.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},b.onMediaAttaching=function(l,n){var c=this.hls.config;if(c.capLevelOnFPSDrop){var u=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=u,u&&typeof u.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},b.checkFPS=function(l,n,c){var u=performance.now();if(n){if(this.lastTime){var o=u-this.lastTime,h=c-this.lastDroppedFrames,m=n-this.lastDecodedFrames,s=1e3*h/o,r=this.hls;if(r.trigger(P.Events.FPS_DROP,{currentDropped:h,currentDecoded:m,totalDroppedFrames:c}),s>0&&h>r.config.fpsDroppedMonitoringThreshold*m){var a=r.currentLevel;p.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+a),a>0&&(r.autoLevelCapping===-1||r.autoLevelCapping>=a)&&(a=a-1,r.trigger(P.Events.FPS_DROP_LEVEL_CAPPING,{level:a,droppedLevel:r.currentLevel}),r.autoLevelCapping=a,this.streamController.nextLevelSwitch())}}this.lastTime=u,this.lastDroppedFrames=c,this.lastDecodedFrames=n}},b.checkFPSInterval=function(){var l=this.media;if(l)if(this.isVideoPlaybackQualityAvailable){var n=l.getVideoPlaybackQuality();this.checkFPS(l,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(l,l.webkitDecodedFrameCount,l.webkitDroppedFrameCount)},S}();g.default=v},"./src/controller/fragment-finders.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"findFragmentByPDT",function(){return v}),T.d(g,"findFragmentByPTS",function(){return S}),T.d(g,"fragmentWithinToleranceTest",function(){return b}),T.d(g,"pdtWithinToleranceTest",function(){return d}),T.d(g,"findFragWithCC",function(){return l});var P=T("./src/polyfills/number.ts"),p=T("./src/utils/binary-search.ts");function v(n,c,u){if(c===null||!Array.isArray(n)||!n.length||!Object(P.isFiniteNumber)(c))return null;var o=n[0].programDateTime;if(c<(o||0))return null;var h=n[n.length-1].endProgramDateTime;if(c>=(h||0))return null;u=u||0;for(var m=0;mn&&u.start?-1:0}function d(n,c,u){var o=Math.min(c,u.duration+(u.deltaPTS?u.deltaPTS:0))*1e3,h=u.endProgramDateTime||0;return h-o>n}function l(n,c){return p.default.search(n,function(u){return u.ccc?-1:0})}},"./src/controller/fragment-tracker.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"FragmentState",function(){return v}),T.d(g,"FragmentTracker",function(){return S});var P=T("./src/events.ts"),p=T("./src/types/loader.ts"),v;(function(l){l.NOT_LOADED="NOT_LOADED",l.BACKTRACKED="BACKTRACKED",l.APPENDING="APPENDING",l.PARTIAL="PARTIAL",l.OK="OK"})(v||(v={}));var S=function(){function l(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=l.prototype;return n._registerListeners=function(){var u=this.hls;u.on(P.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.on(P.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(P.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var u=this.hls;u.off(P.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.off(P.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(P.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(u,o){if(o===p.PlaylistLevelType.MAIN){var h=this.activeFragment,m=this.activeParts;if(!h)return null;if(m)for(var s=m.length;s--;){var r=m[s],a=r?r.end:h.appendedPTS;if(r.start<=u&&a!==void 0&&u<=a)return s>9&&(this.activeParts=m.slice(s-9)),r}else if(h.start<=u&&h.appendedPTS!==void 0&&u<=h.appendedPTS)return h}return this.getBufferedFrag(u,o)},n.getBufferedFrag=function(u,o){for(var h=this.fragments,m=Object.keys(h),s=m.length;s--;){var r=h[m[s]];if((r==null?void 0:r.body.type)===o&&r.buffered){var a=r.body;if(a.start<=u&&u<=a.end)return a}}return null},n.detectEvictedFragments=function(u,o,h){var m=this;Object.keys(this.fragments).forEach(function(s){var r=m.fragments[s];if(!r)return;if(!r.buffered){r.body.type===h&&m.removeFragment(r.body);return}var a=r.range[u];if(!a)return;a.time.some(function(t){var w=!m.isTimeBuffered(t.startPTS,t.endPTS,o);return w&&m.removeFragment(r.body),w})})},n.detectPartialFragments=function(u){var o=this,h=this.timeRanges,m=u.frag,s=u.part;if(!h||m.sn==="initSegment")return;var r=d(m),a=this.fragments[r];if(!a)return;Object.keys(h).forEach(function(t){var w=m.elementaryStreams[t];if(!w)return;var E=h[t],f=s!==null||w.partial===!0;a.range[t]=o.getBufferedTimes(m,s,f,E)}),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body)},n.fragBuffered=function(u){var o=d(u),h=this.fragments[o];h&&(h.backtrack=h.loaded=null,h.buffered=!0)},n.getBufferedTimes=function(u,o,h,m){for(var s={time:[],partial:h},r=o?o.start:u.start,a=o?o.end:u.end,t=u.minEndPTS||a,w=u.maxStartPTS||r,E=0;E=f&&t<=k){s.time.push({startPTS:Math.max(r,m.start(E)),endPTS:Math.min(a,m.end(E))});break}else if(rf)s.partial=!0,s.time.push({startPTS:Math.max(r,m.start(E)),endPTS:Math.min(a,m.end(E))});else if(a<=f)break}return s},n.getPartialFragment=function(u){var o=null,h,m,s,r=0,a=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(w){var E=t[w];if(!E)return;b(E)&&(m=E.body.start-a,s=E.body.end+a,u>=m&&u<=s&&(h=Math.min(u-m,s-u),r<=h&&(o=E.body,r=h)))}),o},n.getState=function(u){var o=d(u),h=this.fragments[o];return h?h.buffered?b(h)?v.PARTIAL:v.OK:h.backtrack?v.BACKTRACKED:v.APPENDING:v.NOT_LOADED},n.backtrack=function(u,o){var h=d(u),m=this.fragments[h];if(!m||m.backtrack)return null;var s=m.backtrack=o||m.loaded;return m.loaded=null,s},n.getBacktrackData=function(u){var o=d(u),h=this.fragments[o];if(h){var m,s=h.backtrack;if(s!=null&&(m=s.payload)!==null&&m!==void 0&&m.byteLength)return s;this.removeFragment(u)}return null},n.isTimeBuffered=function(u,o,h){for(var m,s,r=0;r=m&&o<=s)return!0;if(o<=m)return!1}return!1},n.onFragLoaded=function(u,o){var h=o.frag,m=o.part;if(h.sn==="initSegment"||h.bitrateTest||m)return;var s=d(h);this.fragments[s]={body:h,loaded:o,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(u,o){var h=this,m=o.frag,s=o.part,r=o.timeRanges;if(m.type===p.PlaylistLevelType.MAIN)if(this.activeFragment=m,s){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(s)}else this.activeParts=null;this.timeRanges=r,Object.keys(r).forEach(function(t){var w=r[t];if(h.detectEvictedFragments(t,w),!s)for(var E=0;Eu&&m.removeFragment(a)}})},n.removeFragment=function(u){var o=d(u);u.stats.loaded=0,u.clearElementaryStreamInfo(),delete this.fragments[o]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},l}();function b(l){var n,c;return l.buffered&&(((n=l.range.video)===null||n===void 0?void 0:n.partial)||((c=l.range.audio)===null||c===void 0?void 0:c.partial))}function d(l){return l.type+"_"+l.level+"_"+l.urlId+"_"+l.sn}},"./src/controller/gap-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"STALL_MINIMUM_DURATION_MS",function(){return b}),T.d(g,"MAX_START_GAP_JUMP",function(){return d}),T.d(g,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return l}),T.d(g,"SKIP_BUFFER_RANGE_START",function(){return n}),T.d(g,"default",function(){return c});var P=T("./src/utils/buffer-helper.ts"),p=T("./src/errors.ts"),v=T("./src/events.ts"),S=T("./src/utils/logger.ts"),b=250,d=2,l=.1,n=.05,c=function(){function u(h,m,s,r){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=h,this.media=m,this.fragmentTracker=s,this.hls=r}var o=u.prototype;return o.destroy=function(){this.hls=this.fragmentTracker=this.media=null},o.poll=function(m){var s=this.config,r=this.media,a=this.stalled,t=r.currentTime,w=r.seeking,E=this.seeking&&!w,f=!this.seeking&&w;if(this.seeking=w,t!==m){if(this.moved=!0,a!==null){if(this.stallReported){var k=self.performance.now()-a;S.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((f||E)&&(this.stalled=null),r.paused||r.ended||r.playbackRate===0||!P.BufferHelper.getBuffered(r).length)return;var O=P.BufferHelper.bufferInfo(r,t,0),C=O.len>0,x=O.nextStart||0;if(!C&&!x)return;if(w){var y=O.len>d,_=!x||x-t>d&&!this.fragmentTracker.getPartialFragment(t);if(y||_)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,I=Math.max(x,O.start||0)-t,N=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=N==null||((M=N.details)===null||M===void 0)?void 0:M.live,H=G?N.details.targetduration*2:d;if(I>0&&I<=H){this._trySkipBufferHole(null);return}}var B=self.performance.now();if(a===null){this.stalled=B;return}var K=B-a;!w&&K>=b&&this._reportStall(O.len);var U=P.BufferHelper.bufferInfo(r,t,s.maxBufferHole);this._tryFixBufferStall(U,K)},o._tryFixBufferStall=function(m,s){var r=this.config,a=this.fragmentTracker,t=this.media,w=t.currentTime,E=a.getPartialFragment(w);if(E){var f=this._trySkipBufferHole(E);if(f)return}m.len>r.maxBufferHole&&s>r.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},o._reportStall=function(m){var s=this.hls,r=this.media,a=this.stallReported;a||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+r.currentTime+" due to low buffer (buffer="+m+")"),s.trigger(v.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:m}))},o._trySkipBufferHole=function(m){for(var s=this.config,r=this.hls,a=this.media,t=a.currentTime,w=0,E=P.BufferHelper.getBuffered(a),f=0;f=w&&t.05&&this.forwardBufferLength>1){var f=Math.min(2,Math.max(1,r)),k=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;u.playbackRate=Math.min(f,Math.max(1,k))}else u.playbackRate!==1&&u.playbackRate!==0&&(u.playbackRate=1)},n.estimateLiveEdge=function(){var u=this.levelDetails;return u===null?null:u.edge+u.age},n.computeLatency=function(){var u=this.estimateLiveEdge();return u===null?null:u-this.currentTime},b(l,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var u=this.config,o=this.levelDetails;return u.liveMaxLatencyDuration!==void 0?u.liveMaxLatencyDuration:o?u.liveMaxLatencyDurationCount*o.targetduration:0}},{key:"targetLatency",get:function(){var u=this.levelDetails;if(u===null)return null;var o=u.holdBack,h=u.partHoldBack,m=u.targetduration,s=this.config,r=s.liveSyncDuration,a=s.liveSyncDurationCount,t=s.lowLatencyMode,w=this.hls.userConfig,E=t&&h||o;(w.liveSyncDuration||w.liveSyncDurationCount||E===0)&&(E=r!==void 0?r:a*m);var f=m,k=1;return E+Math.min(this.stallCount*k,f)}},{key:"liveSyncPosition",get:function(){var u=this.estimateLiveEdge(),o=this.targetLatency,h=this.levelDetails;if(u===null||o===null||h===null)return null;var m=h.edge,s=u-o-this.edgeStalled,r=m-h.totalduration,a=m-(this.config.lowLatencyMode&&h.partTarget||h.targetduration);return Math.min(Math.max(r,s),a)}},{key:"drift",get:function(){var u=this.levelDetails;return u===null?1:u.drift}},{key:"edgeStalled",get:function(){var u=this.levelDetails;if(u===null)return 0;var o=(this.config.lowLatencyMode&&u.partTarget||u.targetduration)*3;return Math.max(u.age-o,0)}},{key:"forwardBufferLength",get:function(){var u=this.media,o=this.levelDetails;if(!u||!o)return 0;var h=u.buffered.length;return h?u.buffered.end(h-1):o.edge-this.currentTime}}]),l}()},"./src/controller/level-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return s});var P=T("./src/types/level.ts"),p=T("./src/events.ts"),v=T("./src/errors.ts"),S=T("./src/utils/codecs.ts"),b=T("./src/controller/level-helper.ts"),d=T("./src/controller/base-playlist-controller.ts"),l=T("./src/types/loader.ts");function n(){return n=Object.assign||function(r){for(var a=1;a0){x=k[0].bitrate,k.sort(function(K,U){return K.bitrate-U.bitrate}),this._levels=k;for(var G=0;Gthis.hls.config.fragLoadingMaxRetry&&(y=f.frag.level)):y=f.frag.level}break;case v.ErrorDetails.LEVEL_LOAD_ERROR:case v.ErrorDetails.LEVEL_LOAD_TIMEOUT:k&&(k.deliveryDirectives&&(x=!1),y=k.level),C=!0;break;case v.ErrorDetails.REMUX_ALLOC_ERROR:y=f.level,C=!0;break}y!==void 0&&this.recoverLevel(f,y,C,x)},t.recoverLevel=function(E,f,k,O){var C=E.details,x=this._levels[f];if(x.loadError++,k){var y=this.retryLoadingOrFail(E);if(y)E.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var _=x.url.length;if(_>1&&x.loadError<_)E.levelRetry=!0,this.redundantFailover(f);else if(this.manualLevelIndex===-1){var M=f===0?this._levels.length-1:f-1;this.currentLevelIndex!==M&&this._levels[M].loadError===0&&(this.warn(C+": switch to "+M),E.levelRetry=!0,this.hls.nextAutoLevel=M)}}},t.redundantFailover=function(E){var f=this._levels[E],k=f.url.length;if(k>1){var O=(f.urlId+1)%k;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(C){C.urlId=O}),this.level=E}},t.onFragLoaded=function(E,f){var k=f.frag;if(k!==void 0&&k.type===l.PlaylistLevelType.MAIN){var O=this._levels[k.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},t.onLevelLoaded=function(E,f){var k,O=f.level,C=f.details,x=this._levels[O];if(!x){var y;this.warn("Invalid level index "+O),(y=f.deliveryDirectives)!==null&&y!==void 0&&y.skip&&(C.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(O,f,x.details)):(k=f.deliveryDirectives)!==null&&k!==void 0&&k.skip&&(C.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(E,f){var k=this.hls.levels[this.currentLevelIndex];if(!k)return;if(k.audioGroupIds){for(var O=-1,C=this.hls.audioTracks[f.id].groupId,x=0;x0){var O=k.urlId,C=k.url[O];if(E)try{C=E.addDirectives(C)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+f+(E?" at sn "+E.msn+" part "+E.part:"")+" with URL-id "+O+" "+C),this.clearTimer(),this.hls.trigger(p.Events.LEVEL_LOADING,{url:C,level:f,id:O,deliveryDirectives:E||null})}},t.removeLevel=function(E,f){var k=function(x,y){return y!==f},O=this._levels.filter(function(C,x){return x!==E?!0:C.url.length>1&&f!==void 0?(C.url=C.url.filter(k),C.audioGroupIds&&(C.audioGroupIds=C.audioGroupIds.filter(k)),C.textGroupIds&&(C.textGroupIds=C.textGroupIds.filter(k)),C.urlId=0,!0):!1}).map(function(C,x){var y=C.details;return y!=null&&y.fragments&&y.fragments.forEach(function(_){_.level=x}),C});this._levels=O,this.hls.trigger(p.Events.LEVELS_UPDATED,{levels:O})},u(a,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(E){var f,k=this._levels;if(k.length===0)return;if(this.currentLevelIndex===E&&(f=k[E])!==null&&f!==void 0&&f.details)return;if(E<0||E>=k.length){var O=E<0;if(this.hls.trigger(p.Events.ERROR,{type:v.ErrorTypes.OTHER_ERROR,details:v.ErrorDetails.LEVEL_SWITCH_ERROR,level:E,fatal:O,reason:"invalid level idx"}),O)return;E=Math.min(E,k.length-1)}this.clearTimer();var C=this.currentLevelIndex,x=k[C],y=k[E];this.log("switching to level "+E+" from "+C),this.currentLevelIndex=E;var _=n({},y,{level:E,maxBitrate:y.maxBitrate,uri:y.uri,urlId:y.urlId});delete _._urlId,this.hls.trigger(p.Events.LEVEL_SWITCHING,_);var M=y.details;if(!M||M.live){var I=this.switchParams(y.uri,x==null?void 0:x.details);this.loadPlaylist(I)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(E){this.manualLevelIndex=E,this._startLevel===void 0&&(this._startLevel=E),E!==-1&&(this.level=E)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(E){this._firstLevel=E}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var E=this.hls.config.startLevel;return E!==void 0?E:this._firstLevel}else return this._startLevel},set:function(E){this._startLevel=E}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(E){this.level=E,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=E)}}]),a}(d.default)},"./src/controller/level-helper.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"addGroupId",function(){return v}),T.d(g,"assignTrackIdsByGroup",function(){return S}),T.d(g,"updatePTS",function(){return b}),T.d(g,"updateFragPTSDTS",function(){return l}),T.d(g,"mergeDetails",function(){return n}),T.d(g,"mapPartIntersection",function(){return c}),T.d(g,"mapFragmentIntersection",function(){return u}),T.d(g,"adjustSliding",function(){return o}),T.d(g,"addSliding",function(){return h}),T.d(g,"computeReloadInterval",function(){return m}),T.d(g,"getFragmentWithSN",function(){return s}),T.d(g,"getPartWith",function(){return r});var P=T("./src/polyfills/number.ts"),p=T("./src/utils/logger.ts");function v(a,t,w){switch(t){case"audio":a.audioGroupIds||(a.audioGroupIds=[]),a.audioGroupIds.push(w);break;case"text":a.textGroupIds||(a.textGroupIds=[]),a.textGroupIds.push(w);break}}function S(a){var t={};a.forEach(function(w){var E=w.groupId||"";w.id=t[E]=t[E]||0,t[E]++})}function b(a,t,w){var E=a[t],f=a[w];d(E,f)}function d(a,t){var w=t.startPTS;if(Object(P.isFiniteNumber)(w)){var E=0,f;t.sn>a.sn?(E=w-a.start,f=a):(E=a.start-w,f=t),f.duration!==E&&(f.duration=E)}else if(t.sn>a.sn){var k=a.cc===t.cc;k&&a.minEndPTS?t.start=a.start+(a.minEndPTS-a.start):t.start=a.start+a.duration}else t.start=Math.max(a.start-t.duration,0)}function l(a,t,w,E,f,k){var O=E-w;O<=0&&(p.logger.warn("Fragment should have a positive duration",t),E=w+t.duration,k=f+t.duration);var C=w,x=E,y=t.startPTS,_=t.endPTS;if(Object(P.isFiniteNumber)(y)){var M=Math.abs(y-w);Object(P.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(M,t.deltaPTS):t.deltaPTS=M,C=Math.max(w,y),w=Math.min(w,y),f=Math.min(f,t.startDTS),x=Math.min(E,_),E=Math.max(E,_),k=Math.max(k,t.endDTS)}t.duration=E-w;var I=w-t.start;t.appendedPTS=E,t.start=t.startPTS=w,t.maxStartPTS=C,t.startDTS=f,t.endPTS=E,t.minEndPTS=x,t.endDTS=k;var N=t.sn;if(!a||Na.endSN)return 0;var G,H=N-a.startSN,B=a.fragments;for(B[H]=t,G=H;G>0;G--)d(B[G],B[G-1]);for(G=H;G=0;f--){var k=E[f].initSegment;if(k){w=k;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;var O=0,C;if(u(a,t,function(G,H){G.relurl&&(O=G.cc-H.cc),Object(P.isFiniteNumber)(G.startPTS)&&Object(P.isFiniteNumber)(G.endPTS)&&(H.start=H.startPTS=G.startPTS,H.startDTS=G.startDTS,H.appendedPTS=G.appendedPTS,H.maxStartPTS=G.maxStartPTS,H.endPTS=G.endPTS,H.endDTS=G.endDTS,H.minEndPTS=G.minEndPTS,H.duration=G.endPTS-G.startPTS,H.duration&&(C=H),t.PTSKnown=t.alignedSliding=!0),H.elementaryStreams=G.elementaryStreams,H.loader=G.loader,H.stats=G.stats,H.urlId=G.urlId,G.initSegment&&(H.initSegment=G.initSegment,w=G.initSegment)}),w){var x=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;x.forEach(function(G){var H;(!G.initSegment||G.initSegment.relurl===((H=w)===null||H===void 0?void 0:H.relurl))&&(G.initSegment=w)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(G){return!G}),t.deltaUpdateFailed)){p.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var y=t.skippedSegments;y--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var _=t.fragments;if(O){p.logger.warn("discontinuity sliding from playlist, take drift into account");for(var M=0;M<_.length;M++)_[M].cc+=O}t.skippedSegments&&(t.startCC=t.fragments[0].cc),c(a.partList,t.partList,function(G,H){H.elementaryStreams=G.elementaryStreams,H.stats=G.stats}),C?l(t,C,C.startPTS,C.endPTS,C.startDTS,C.endDTS):o(a,t),_.length&&(t.totalduration=t.edge-_[0].start),t.driftStartTime=a.driftStartTime,t.driftStart=a.driftStart;var I=t.advancedDateTime;if(t.advanced&&I){var N=t.edge;t.driftStart||(t.driftStartTime=I,t.driftStart=N),t.driftEndTime=I,t.driftEnd=N}else t.driftEndTime=a.driftEndTime,t.driftEnd=a.driftEnd,t.advancedDateTime=a.advancedDateTime}function c(a,t,w){if(a&&t)for(var E=0,f=0,k=a.length;f<=k;f++){var O=a[f],C=t[f+E];O&&C&&O.index===C.index&&O.fragment.sn===C.fragment.sn?w(O,C):E--}}function u(a,t,w){for(var E=t.skippedSegments,f=Math.max(a.startSN,t.startSN)-t.startSN,k=(a.fragmentHint?1:0)+(E?t.endSN:Math.min(a.endSN,t.endSN))-t.startSN,O=t.startSN-a.startSN,C=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,x=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,y=f;y<=k;y++){var _=x[O+y],M=C[y];E&&!M&&y=E.length)return;h(t,E[w].start)}function h(a,t){if(t){for(var w=a.fragments,E=a.skippedSegments;E0&&f0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+y.toFixed(3)),x=y),this.state=p.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=p.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,f.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case p.State.IDLE:this.doTickIdle();break;case p.State.WAITING_LEVEL:{var x,y=this.levels,_=this.level,M=y==null||((x=y[_])===null||x===void 0)?void 0:x.details;if(M&&(!M.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(M))break;this.state=p.State.IDLE;break}break}case p.State.FRAG_LOADING_WAITING_RETRY:{var I,N=self.performance.now(),G=this.retryDate;(!G||N>=G||(I=this.media)!==null&&I!==void 0&&I.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=p.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){f.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var x,y,_=this.hls,M=this.levelLastLoaded,I=this.levels,N=this.media,G=_.config,H=_.nextLoadLevel;if(M===null||!N&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!I||!I[H])return;var B=I[H];this.level=_.nextLoadLevel=H;var K=B.details;if(!K||this.state===p.State.WAITING_LEVEL||K.live&&this.levelLastLoaded!==H){this.state=p.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:N,l.PlaylistLevelType.MAIN);if(U===null)return;var W=U.len,X=this.getMaxBufferLength(B.maxBitrate);if(W>=X)return;if(this._streamEnded(U,K)){var ne={};this.altAudio&&(ne.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,ne),this.state=p.State.ENDED;return}var fe=U.end,me=this.getNextFragment(fe,K);if(this.couldBacktrack&&!this.fragPrevious&&me&&me.sn!=="initSegment"){var Ae=me.sn-K.startSN;Ae>1&&(me=K.fragments[Ae-1],this.fragmentTracker.removeFragment(me))}if(me&&this.fragmentTracker.getState(me)===d.FragmentState.OK&&this.nextLoadPosition>fe){var De=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(N,De,l.PlaylistLevelType.MAIN),me=this.getNextFragment(this.nextLoadPosition,K)}if(!me)return;me.initSegment&&!me.initSegment.data&&!this.bitrateTest&&(me=me.initSegment),((x=me.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((y=me.decryptdata)!==null&&y!==void 0&&y.key)?this.loadKey(me,K):this.loadFragment(me,K,fe)},O.loadFragment=function(x,y,_){var M,I=this.fragmentTracker.getState(x);if(this.fragCurrent=x,I===d.FragmentState.BACKTRACKED){var N=this.fragmentTracker.getBacktrackData(x);if(N){this._handleFragmentLoadProgress(N),this._handleFragmentLoadComplete(N);return}else I=d.FragmentState.NOT_LOADED}I===d.FragmentState.NOT_LOADED||I===d.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,f.prototype.loadFragment.call(this,x,y,_)):I===d.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((M=this.media)===null||M===void 0?void 0:M.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(x){var y=this.fragmentTracker.getAppendedFrag(x,l.PlaylistLevelType.MAIN);return y&&"fragment"in y?y.fragment:y},O.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,l.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var x=this.levels,y=this.media;if(y!=null&&y.readyState){var _,M=this.getAppendedFrag(y.currentTime);if(M&&M.start>1&&this.flushMainBuffer(0,M.start-1),!y.paused&&x){var I=this.hls.nextLoadLevel,N=x[I],G=this.fragLastKbps;G&&this.fragCurrent?_=this.fragCurrent.duration*N.maxBitrate/(1e3*G)+1:_=0}else _=0;var H=this.getBufferedFrag(y.currentTime+_);if(H){var B=this.followingBufferedFrag(H);if(B){this.abortCurrentFrag();var K=B.maxStartPTS?B.maxStartPTS:B.start,U=B.duration,W=Math.max(H.end,K+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(W,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===p.State.KEY_LOADING&&(this.state=p.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(x,y){f.prototype.flushMainBuffer.call(this,x,y,this.altAudio?"video":null)},O.onMediaAttached=function(x,y){f.prototype.onMediaAttached.call(this,x,y);var _=y.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),_.addEventListener("playing",this.onvplaying),_.addEventListener("seeked",this.onvseeked),this.gapController=new o.default(this.config,_,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),f.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var x=this.media,y=x?x.currentTime:null;Object(P.isFiniteNumber)(y)&&this.log("Media seeked to "+y.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(S.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(x,y){var _=!1,M=!1,I;y.levels.forEach(function(N){I=N.audioCodec,I&&(I.indexOf("mp4a.40.2")!==-1&&(_=!0),I.indexOf("mp4a.40.5")!==-1&&(M=!0))}),this.audioCodecSwitch=_&&M&&!Object(v.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=y.levels,this.startFragRequested=!1},O.onLevelLoading=function(x,y){var _=this.levels;if(!_||this.state!==p.State.IDLE)return;var M=_[y.level];(!M.details||M.details.live&&this.levelLastLoaded!==y.level||this.waitForCdnTuneIn(M.details))&&(this.state=p.State.WAITING_LEVEL)},O.onLevelLoaded=function(x,y){var _,M=this.levels,I=y.level,N=y.details,G=N.totalduration;if(!M){this.warn("Levels were reset while loading level "+I);return}this.log("Level "+I+" loaded ["+N.startSN+","+N.endSN+"], cc ["+N.startCC+", "+N.endCC+"] duration:"+G);var H=this.fragCurrent;H&&(this.state===p.State.FRAG_LOADING||this.state===p.State.FRAG_LOADING_WAITING_RETRY)&&(H.level!==y.level&&H.loader&&(this.state=p.State.IDLE,H.loader.abort()));var B=M[I],K=0;if(N.live||(_=B.details)!==null&&_!==void 0&&_.live){if(N.fragments[0]||(N.deltaUpdateFailed=!0),N.deltaUpdateFailed)return;K=this.alignPlaylists(N,B.details)}if(B.details=N,this.levelLastLoaded=I,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:N,level:I}),this.state===p.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(N))return;this.state=p.State.IDLE}this.startFragRequested?N.live&&this.synchronizeToLiveEdge(N):this.setStartPosition(N,K),this.tick()},O._handleFragmentLoadProgress=function(x){var y,_=x.frag,M=x.part,I=x.payload,N=this.levels;if(!N){this.warn("Levels were reset while fragment load was in progress. Fragment "+_.sn+" of level "+_.level+" will not be buffered");return}var G=N[_.level],H=G.details;if(!H){this.warn("Dropping fragment "+_.sn+" of level "+_.level+" after level details were reset");return}var B=G.videoCodec,K=H.PTSKnown||!H.live,U=(y=_.initSegment)===null||y===void 0?void 0:y.data,W=this._getAudioCodec(G),X=this.transmuxer=this.transmuxer||new c.default(this.hls,l.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ne=M?M.index:-1,fe=ne!==-1,me=new u.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,I.byteLength,ne,fe),Ae=this.initPTS[_.cc];X.push(I,U,W,B,_,M,H.totalduration,K,me,Ae)},O.onAudioTrackSwitching=function(x,y){var _=this.altAudio,M=!!y.url,I=y.id;if(!M){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var N=this.fragCurrent;N!=null&&N.loader&&(this.log("Switching to main audio track, cancel main fragment load"),N.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;_&&G.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:I})}},O.onAudioTrackSwitched=function(x,y){var _=y.id,M=!!this.hls.audioTracks[_].url;if(M){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=M,this.tick()},O.onBufferCreated=function(x,y){var _=y.tracks,M,I,N=!1;for(var G in _){var H=_[G];if(H.id==="main"){if(I=G,M=H,G==="video"){var B=_[G];B&&(this.videoBuffer=B.buffer)}}else N=!0}N&&M?(this.log("Alternate track found, use "+I+".buffered to schedule main fragment loading"),this.mediaBuffer=M.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(x,y){var _=y.frag,M=y.part;if(_&&_.type!==l.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(_)){this.warn("Fragment "+_.sn+(M?" p: "+M.index:"")+" of level "+_.level+" finished buffering, but was aborted. state: "+this.state),this.state===p.State.PARSED&&(this.state=p.State.IDLE);return}var I=M?M.stats:_.stats;this.fragLastKbps=Math.round(8*I.total/(I.buffering.end-I.loading.first)),_.sn!=="initSegment"&&(this.fragPrevious=_),this.fragBufferedComplete(_,M)},O.onError=function(x,y){switch(y.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(l.PlaylistLevelType.MAIN,y);break;case h.ErrorDetails.LEVEL_LOAD_ERROR:case h.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==p.State.ERROR&&(y.fatal?(this.warn(""+y.details),this.state=p.State.ERROR):!y.levelRetry&&this.state===p.State.WAITING_LEVEL&&(this.state=p.State.IDLE));break;case h.ErrorDetails.BUFFER_FULL_ERROR:if(y.parent==="main"&&(this.state===p.State.PARSING||this.state===p.State.PARSED)){var _=!0,M=this.getFwdBufferInfo(this.media,l.PlaylistLevelType.MAIN);M&&M.len>.5&&(_=!this.reduceMaxBufferLength(M.len)),_&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var x=this.media,y=this.gapController;if(!x||!y||!x.readyState)return;var _=b.BufferHelper.getBuffered(x);!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this.seekToStartPos()):y.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=p.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(x,y){var _=y.type;if(_!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var M=(_===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(M,_,l.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(x,y){this.levels=y.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var x=this.media,y=x.currentTime,_=this.startPosition;if(_>=0&&y<_){if(x.seeking){m.logger.log("could not seek to "+_+", already seeking at "+y);return}var M=b.BufferHelper.getBuffered(x),I=M.length?M.start(0):0,N=I-_;N>0&&(N1&&x.seeking===!1){var _=x.currentTime;if(b.BufferHelper.isBuffered(x,_)?y=this.getAppendedFrag(_):b.BufferHelper.isBuffered(x,_+.1)&&(y=this.getAppendedFrag(_+.1)),y){var M=this.fragPlaying,I=y.level;(!M||y.sn!==M.sn||M.level!==I||y.urlId!==M.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:y}),(!M||M.level!==I)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:I}),this.fragPlaying=y)}}},r(k,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var y=this.getAppendedFrag(x.currentTime);if(y)return y.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var y=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(y)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),k}(p.default)},"./src/controller/subtitle-stream-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"SubtitleStreamController",function(){return a});var P=T("./src/events.ts"),p=T("./src/utils/logger.ts"),v=T("./src/utils/buffer-helper.ts"),S=T("./src/controller/fragment-finders.ts"),b=T("./src/utils/discontinuities.ts"),d=T("./src/controller/level-helper.ts"),l=T("./src/controller/fragment-tracker.ts"),n=T("./src/controller/base-stream-controller.ts"),c=T("./src/types/loader.ts"),u=T("./src/types/level.ts");function o(t,w){for(var E=0;E=y[I].start&&M<=y[I].end){_=y[I];break}var N=C.start+C.duration;_?_.end=N:(_={start:M,end:N},y.push(_)),this.fragmentTracker.fragBuffered(C)},E.onBufferFlushing=function(k,O){var C=O.startOffset,x=O.endOffset;if(C===0&&x!==Number.POSITIVE_INFINITY){var y=this.currentTrackId,_=this.levels;if(!_.length||!_[y]||!_[y].details)return;var M=_[y].details,I=M.targetduration,N=x-I;if(N<=0)return;O.endOffsetSubtitles=Math.max(0,N),this.tracksBuffered.forEach(function(G){for(var H=0;H=M.length||y!==_||!I)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(C=I.details)!==null&&C!==void 0&&C.live){var N=this.mainDetails;if(x.deltaUpdateFailed||!N)return;var G=N.fragments[0];if(!I.details)x.hasProgramDateTime&&N.hasProgramDateTime?Object(b.alignMediaPlaylistByPDT)(x,N):G&&Object(d.addSliding)(x,G.start);else{var H=this.alignPlaylists(x,I.details);H===0&&G&&Object(d.addSliding)(x,G.start)}}if(I.details=x,this.levelLastLoaded=y,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var B=Object(S.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);B||(this.warn("Subtitle playlist not aligned with playback"),I.details=void 0)}},E._handleFragmentLoadComplete=function(k){var O=k.frag,C=k.payload,x=O.decryptdata,y=this.hls;if(this.fragContextChanged(O))return;if(C&&C.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var _=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(C),x.key.buffer,x.iv.buffer).then(function(M){var I=performance.now();y.trigger(P.Events.FRAG_DECRYPTED,{frag:O,payload:M,stats:{tstart:_,tdecrypt:I}})})}},E.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var k,O=this.currentTrackId,C=this.levels;if(!C.length||!C[O]||!C[O].details)return;var x=C[O].details,y=x.targetduration,_=this.config,M=this.media,I=v.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,M.currentTime-y,_.maxBufferHole),N=I.end,G=I.len,H=this.getMaxBufferLength()+y;if(G>H)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var B=x.fragments,K=B.length,U=x.edge,W,X=this.fragPrevious;if(N-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)},m.pollTrackChange=function(r){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,r)},m.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 r=u(this.media.textTracks);r.forEach(function(a){Object(p.clearCurrentCues)(a)}),this.subtitleTrack=-1,this.media=null},m.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},m.onManifestParsed=function(r,a){this.tracks=a.subtitleTracks},m.onSubtitleTrackLoaded=function(r,a){var t=a.id,w=a.details,E=this.trackId,f=this.tracksInGroup[E];if(!f){this.warn("Invalid subtitle track id "+t);return}var k=f.details;f.details=a.details,this.log("subtitle track "+t+" loaded ["+w.startSN+"-"+w.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,a,k))},m.onLevelLoading=function(r,a){this.switchLevel(a.level)},m.onLevelSwitching=function(r,a){this.switchLevel(a.level)},m.switchLevel=function(r){var a=this.hls.levels[r];if(!(a!=null&&a.textGroupIds))return;var t=a.textGroupIds[a.urlId];if(this.groupId!==t){var w=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,E=this.tracks.filter(function(O){return!t||O.groupId===t});this.tracksInGroup=E;var f=this.findTrackId(w==null?void 0:w.name)||this.findTrackId();this.groupId=t;var k={subtitleTracks:E};this.log("Updating subtitle tracks, "+E.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(P.Events.SUBTITLE_TRACKS_UPDATED,k),f!==-1&&this.setSubtitleTrack(f,w)}},m.findTrackId=function(r){for(var a=this.tracksInGroup,t=0;t=w.length)return;this.clearTimer();var E=w[r];if(this.log("Switching to subtitle track "+r),this.trackId=r,E){var f=E.id,k=E.groupId,O=k===void 0?"":k,C=E.name,x=E.type,y=E.url;this.hls.trigger(P.Events.SUBTITLE_TRACK_SWITCH,{id:f,groupId:O,name:C,type:x,url:y});var _=this.switchParams(E.url,a==null?void 0:a.details);this.loadPlaylist(_)}else this.hls.trigger(P.Events.SUBTITLE_TRACK_SWITCH,{id:r})},m.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var r=-1,a=u(this.media.textTracks),t=0;t=0&&(x[0]=Math.min(x[0],w),x[1]=Math.max(x[1],E),O=!0,y/(E-w)>.5))return}if(O||k.push([w,E]),this.config.renderTextTracksNatively){var _=this.captionsTracks[t];this.Cues.newCue(_,w,E,f)}else{var M=this.Cues.newCue(null,w,E,f);this.hls.trigger(p.Events.CUES_PARSED,{type:"captions",cues:M,track:t})}},r.onInitPtsFound=function(t,w){var E=this,f=w.frag,k=w.id,O=w.initPTS,C=w.timescale,x=this.unparsedVttFrags;k==="main"&&(this.initPTS[f.cc]=O,this.timescale[f.cc]=C),x.length&&(this.unparsedVttFrags=[],x.forEach(function(y){E.onFragLoaded(p.Events.FRAG_LOADED,y)}))},r.getExistingTrack=function(t){var w=this.media;if(w)for(var E=0;E>>8^C&255^99,l[f]=C,n[C]=f;var x=E[f],y=E[x],_=E[y],M=E[C]*257^C*16843008;u[f]=M<<24|M>>>8,o[f]=M<<16|M>>>16,h[f]=M<<8|M>>>24,m[f]=M,M=_*16843009^y*65537^x*257^f*16843008,r[C]=M<<24|M>>>8,a[C]=M<<16|M>>>16,t[C]=M<<8|M>>>24,w[C]=M,f?(f=x^E[E[E[_^x]]],k^=E[E[k]]):f=k=1}},b.expandKey=function(l){for(var n=this.uint8ArrayToUint32Array_(l),c=!0,u=0;u>>6)+1;var M=(t[w+2]&60)>>>2;if(M>_.length-1){a.trigger(v.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+M});return}return O=(t[w+2]&1)<<2,O|=(t[w+3]&192)>>>6,P.logger.log("manifest codec:"+E+", ADTS type:"+f+", samplingIndex:"+M),/firefox/i.test(x)?M>=6?(f=5,C=new Array(4),k=M-3):(f=2,C=new Array(2),k=M):x.indexOf("android")!==-1?(f=2,C=new Array(2),k=M):(f=5,C=new Array(4),E&&(E.indexOf("mp4a.40.29")!==-1||E.indexOf("mp4a.40.5")!==-1)||!E&&M>=6?k=M-3:((E&&E.indexOf("mp4a.40.2")!==-1&&(M>=6&&O===1||/vivaldi/i.test(x))||!E&&O===1)&&(f=2,C=new Array(2)),k=M)),C[0]=f<<3,C[0]|=(M&14)>>1,C[1]|=(M&1)<<7,C[1]|=O<<3,f===5&&(C[1]|=(k&14)>>1,C[2]=(k&1)<<7,C[2]|=2<<2,C[3]=0),{config:C,samplerate:_[M],channelCount:O,codec:"mp4a.40."+f,manifestCodec:y}}function b(a,t){return a[t]===255&&(a[t+1]&246)===240}function d(a,t){return a[t+1]&1?7:9}function l(a,t){return(a[t+3]&3)<<11|a[t+4]<<3|(a[t+5]&224)>>>5}function n(a,t){return t+5=a.length)return!1;var E=l(a,t);if(E<=w)return!1;var f=t+E;return f===a.length||c(a,f)}return!1}function h(a,t,w,E,f){if(!a.samplerate){var k=S(t,w,E,f);if(!k)return;a.config=k.config,a.samplerate=k.samplerate,a.channelCount=k.channelCount,a.codec=k.codec,a.manifestCodec=k.manifestCodec,P.logger.log("parsed codec:"+a.codec+", rate:"+k.samplerate+", channels:"+k.channelCount)}}function m(a){return 1024*9e4/a}function s(a,t,w,E,f){var k=d(a,t),O=l(a,t);if(O-=k,O>0){var C=w+E*f;return{headerLength:k,frameLength:O,stamp:C}}}function r(a,t,w,E,f){var k=m(a.samplerate),O=s(t,w,E,f,k);if(O){var C=O.frameLength,x=O.headerLength,y=O.stamp,_=x+C,M=Math.max(0,w+_-t.length),I;M?(I=new Uint8Array(_-x),I.set(t.subarray(w+x,t.length),0)):I=t.subarray(w+x,w+_);var N={unit:I,pts:y};return M||a.samples.push(N),{sample:N,length:_,missing:M}}}},"./src/demux/base-audio-demuxer.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"initPTSFn",function(){return l});var P=T("./src/polyfills/number.ts"),p=T("./src/demux/id3.ts"),v=T("./src/demux/dummy-demuxed-track.ts"),S=T("./src/utils/mp4-tools.ts"),b=T("./src/utils/typed-array.ts"),d=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(o,h,m){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(){},c.resetContiguity=function(){},c.canParse=function(o,h){return!1},c.appendFrame=function(o,h,m){},c.demux=function(o,h){this.cachedData&&(o=Object(S.appendUint8Array)(this.cachedData,o),this.cachedData=null);var m=p.getID3Data(o,0),s=m?m.length:0,r,a,t=this._audioTrack,w=this._id3Track,E=m?p.getTimeStamp(m):void 0,f=o.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=l(E,h)),m&&m.length>0&&w.samples.push({pts:this.initPTS,dts:this.initPTS,data:m}),a=this.initPTS;sd?(this.word<<=d,this.bitsAvailable-=d):(d-=this.bitsAvailable,l=d>>3,d-=l>>3,this.bytesAvailable-=l,this.loadWord(),this.word<<=d,this.bitsAvailable-=d)},S.readBits=function(d){var l=Math.min(this.bitsAvailable,d),n=this.word>>>32-l;return d>32&&P.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=l,this.bitsAvailable>0?this.word<<=l:this.bytesAvailable>0&&this.loadWord(),l=d-l,l>0&&this.bitsAvailable?n<>>d)!==0)return this.word<<=d,this.bitsAvailable-=d,d;return this.loadWord(),d+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var d=this.skipLZ();return this.readBits(d+1)-1},S.readEG=function(){var d=this.readUEG();return 1&d?1+d>>>1:-1*(d>>>1)},S.readBoolean=function(){return this.readBits(1)===1},S.readUByte=function(){return this.readBits(8)},S.readUShort=function(){return this.readBits(16)},S.readUInt=function(){return this.readBits(32)},S.skipScalingList=function(d){for(var l=8,n=8,c,u=0;u0?f.subarray(O,O+C):void 0},S=function(f,k){var O=0;return O=(f[k]&127)<<21,O|=(f[k+1]&127)<<14,O|=(f[k+2]&127)<<7,O|=f[k+3]&127,O},b=function(f,k){return P(f,k)&&S(f,k+6)+10<=f.length-k},d=function(f){for(var k=c(f),O=0;O>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:N+=String.fromCharCode(_);break;case 12:case 13:M=f[G++],N+=String.fromCharCode((_&31)<<6|M&63);break;case 14:M=f[G++],I=f[G++],N+=String.fromCharCode((_&15)<<12|(M&63)<<6|(I&63)<<0);break;default:}}return N},a={decodeTextFrame:h},t;function w(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/demux/base-audio-demuxer.ts"),p=T("./src/demux/id3.ts"),v=T("./src/utils/logger.ts"),S=T("./src/demux/mpegaudio.ts");function b(n,c){n.prototype=Object.create(c.prototype),n.prototype.constructor=n,d(n,c)}function d(n,c){return d=Object.setPrototypeOf||function(o,h){return o.__proto__=h,o},d(n,c)}var l=function(n){b(c,n);function c(){return n.apply(this,arguments)||this}var u=c.prototype;return u.resetInitSegment=function(h,m,s){n.prototype.resetInitSegment.call(this,h,m,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:h,duration:s,inputTimeScale:9e4,dropped:0}},c.probe=function(h){if(!h)return!1;for(var m=p.getID3Data(h,0)||[],s=m.length,r=h.length;s0},b.demux=function(l){var n=l,c=Object(p.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(P.appendUint8Array)(this.remainderData,l));var u=Object(P.segmentValidRange)(n);this.remainderData=u.remainder,c.samples=u.valid||new Uint8Array}else c.samples=n;return{audioTrack:Object(p.dummyTrack)(),avcTrack:c,id3Track:Object(p.dummyTrack)(),textTrack:Object(p.dummyTrack)()}},b.flush=function(){var l=Object(p.dummyTrack)();return l.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(p.dummyTrack)(),avcTrack:l,id3Track:Object(p.dummyTrack)(),textTrack:Object(p.dummyTrack)()}},b.demuxSampleAes=function(l,n,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},b.destroy=function(){},S}();v.minProbeByteLength=1024,g.default=v},"./src/demux/mpegaudio.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"appendFrame",function(){return d}),T.d(g,"parseHeader",function(){return l}),T.d(g,"isHeaderPattern",function(){return n}),T.d(g,"isHeader",function(){return c}),T.d(g,"canParse",function(){return u}),T.d(g,"probe",function(){return o});var P=null,p=[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],v=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],S=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],b=[0,1,1,4];function d(h,m,s,r,a){if(s+24>m.length)return;var t=l(m,s);if(t&&s+t.frameLength<=m.length){var w=t.samplesPerFrame*9e4/t.sampleRate,E=r+a*w,f={unit:m.subarray(s,s+t.frameLength),pts:E,dts:E};return h.config=[],h.channelCount=t.channelCount,h.samplerate=t.sampleRate,h.samples.push(f),{sample:f,length:t.frameLength,missing:0}}}function l(h,m){var s=h[m+1]>>3&3,r=h[m+1]>>1&3,a=h[m+2]>>4&15,t=h[m+2]>>2&3;if(s!==1&&a!==0&&a!==15&&t!==3){var w=h[m+2]>>1&1,E=h[m+3]>>6,f=s===3?3-r:r===3?3:4,k=p[f*14+a-1]*1e3,O=s===3?0:s===2?1:2,C=v[O*3+t],x=E===3?1:2,y=S[s][r],_=b[r],M=y*8*_,I=Math.floor(y*k/C+w)*_;if(P===null){var N=navigator.userAgent||"",G=N.match(/Chrome\/(\d+)/i);P=G?parseInt(G[1]):0}var H=!!P&&P<=87;return H&&r===2&&k>=224e3&&E===0&&(h[m+3]=h[m+3]|128),{sampleRate:C,channelCount:x,frameLength:I,samplesPerFrame:M}}}function n(h,m){return h[m]===255&&(h[m+1]&224)===224&&(h[m+1]&6)!==0}function c(h,m){return m+1=l.length){c();return}if(l[n].unit.length<32)continue;var u=this.decrypter.isSync();if(this.decryptAacSample(l,n,c,u),!u)return}},b.getAvcEncryptedData=function(l){for(var n=Math.floor((l.length-48)/160)*16+16,c=new Int8Array(n),u=0,o=32;o<=l.length-16;o+=160,u+=16)c.set(l.subarray(o,o+16),u);return c},b.getAvcDecryptedUnit=function(l,n){for(var c=new Uint8Array(n),u=0,o=32;o<=l.length-16;o+=160,u+=16)l.set(c.subarray(u,u+16),o);return l},b.decryptAvcSample=function(l,n,c,u,o,h){var m=Object(p.discardEPB)(o.data),s=this.getAvcEncryptedData(m),r=this;this.decryptBuffer(s.buffer,function(a){o.data=r.getAvcDecryptedUnit(m,a),h||r.decryptAvcSamples(l,n,c+1,u)})},b.decryptAvcSamples=function(l,n,c,u){if(l instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,c=0){if(n>=l.length){u();return}for(var o=l[n].units;!(c>=o.length);c++){var h=o[c];if(h.data.length<=48||h.type!==1&&h.type!==5)continue;var m=this.decrypter.isSync();if(this.decryptAvcSample(l,n,c,u,h,m),!m)return}}},S}();g.default=v},"./src/demux/transmuxer-interface.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return o});var P=T("./node_modules/webworkify-webpack/index.js"),p=T.n(P),v=T("./src/events.ts"),S=T("./src/demux/transmuxer.ts"),b=T("./src/utils/logger.ts"),d=T("./src/errors.ts"),l=T("./src/utils/mediasource-helper.ts"),n=T("./node_modules/eventemitter3/index.js"),c=T.n(n),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},o=function(){function h(s,r,a,t){var w=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=s,this.id=r,this.onTransmuxComplete=a,this.onFlush=t;var E=s.config,f=function(y,_){_=_||{},_.frag=w.frag,_.id=w.id,s.trigger(y,_)};this.observer=new n.EventEmitter,this.observer.on(v.Events.FRAG_DECRYPTED,f),this.observer.on(v.Events.ERROR,f);var k={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(E.enableWorker&&typeof Worker!="undefined"){b.logger.log("demuxing in webworker");var C;try{C=this.worker=P("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),C.addEventListener("message",this.onwmsg),C.onerror=function(x){s.trigger(v.Events.ERROR,{type:d.ErrorTypes.OTHER_ERROR,details:d.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},C.postMessage({cmd:"init",typeSupported:k,vendor:O,id:r,config:JSON.stringify(E)})}catch(x){b.logger.warn("Error in worker:",x),b.logger.error("Error while initializing DemuxerWorker, fallback to inline"),C&&self.URL.revokeObjectURL(C.objectURL),this.transmuxer=new S.default(this.observer,k,E,O,r),this.worker=null}}else this.transmuxer=new S.default(this.observer,k,E,O,r)}var m=h.prototype;return m.destroy=function(){var r=this.worker;if(r)r.removeEventListener("message",this.onwmsg),r.terminate(),this.worker=null;else{var a=this.transmuxer;a&&(a.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},m.push=function(r,a,t,w,E,f,k,O,C,x){var y=this;C.transmuxing.start=self.performance.now();var _=this.transmuxer,M=this.worker,I=f?f.start:E.start,N=E.decryptdata,G=this.frag,H=!(G&&E.cc===G.cc),B=!(G&&C.level===G.level),K=G?C.sn-G.sn:-1,U=this.part?C.part-this.part.index:1,W=!B&&(K===1||K===0&&U===1),X=self.performance.now();(B||K||E.stats.parsing.start===0)&&(E.stats.parsing.start=X),f&&(U||!W)&&(f.stats.parsing.start=X);var ne=new S.TransmuxState(H,W,O,B,I);if(!W||H){b.logger.log("[transmuxer-interface, "+E.type+"]: Starting new transmux session for sn: "+C.sn+" p: "+C.part+" level: "+C.level+" id: "+C.id+` discontinuity: `+H+` trackSwitch: `+B+` contiguous: `+W+` accurateTimeOffset: `+O+` timeOffset: `+I);var fe=new S.TransmuxConfig(t,w,a,k,x);this.configureTransmuxer(fe)}if(this.frag=E,this.part=f,M)M.postMessage({cmd:"demux",data:r,decryptdata:N,chunkMeta:C,state:ne},r instanceof ArrayBuffer?[r]:[]);else if(_){var me=_.push(r,N,C,ne);Object(S.isPromise)(me)?me.then(function(Ae){y.handleTransmuxComplete(Ae)}):this.handleTransmuxComplete(me)}},m.flush=function(r){var a=this;r.transmuxing.start=self.performance.now();var t=this.transmuxer,w=this.worker;if(w)w.postMessage({cmd:"flush",chunkMeta:r});else if(t){var E=t.flush(r);Object(S.isPromise)(E)?E.then(function(f){a.handleFlushResult(f,r)}):this.handleFlushResult(E,r)}},m.handleFlushResult=function(r,a){var t=this;r.forEach(function(w){t.handleTransmuxComplete(w)}),this.onFlush(a)},m.onWorkerMessage=function(r){var a=r.data,t=this.hls;switch(a.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(a.data);break}case"flush":{this.onFlush(a.data);break}default:{a.data=a.data||{},a.data.frag=this.frag,a.data.id=this.id,t.trigger(a.event,a.data);break}}},m.configureTransmuxer=function(r){var a=this.worker,t=this.transmuxer;a?a.postMessage({cmd:"configure",config:r}):t&&t.configure(r)},m.handleTransmuxComplete=function(r){r.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(r)},h}()},"./src/demux/transmuxer-worker.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return d});var P=T("./src/demux/transmuxer.ts"),p=T("./src/events.ts"),v=T("./src/utils/logger.ts"),S=T("./node_modules/eventemitter3/index.js"),b=T.n(S);function d(o){var h=new S.EventEmitter,m=function(r,a){o.postMessage({event:r,data:a})};h.on(p.Events.FRAG_DECRYPTED,m),h.on(p.Events.ERROR,m),o.addEventListener("message",function(s){var r=s.data;switch(r.cmd){case"init":{var a=JSON.parse(r.config);o.transmuxer=new P.default(h,r.typeSupported,a,r.vendor,r.id),Object(v.enableLogs)(a.debug),m("init",null);break}case"configure":{o.transmuxer.configure(r.config);break}case"demux":{var t=o.transmuxer.push(r.data,r.decryptdata,r.chunkMeta,r.state);Object(P.isPromise)(t)?t.then(function(f){l(o,f)}):l(o,t);break}case"flush":{var w=r.chunkMeta,E=o.transmuxer.flush(w);Object(P.isPromise)(E)?E.then(function(f){c(o,f,w)}):c(o,E,w);break}default:break}})}function l(o,h){if(u(h.remuxResult))return;var m=[],s=h.remuxResult,r=s.audio,a=s.video;r&&n(m,r),a&&n(m,a),o.postMessage({event:"transmuxComplete",data:h},m)}function n(o,h){h.data1&&o.push(h.data1.buffer),h.data2&&o.push(h.data2.buffer)}function c(o,h,m){h.forEach(function(s){l(o,s)}),o.postMessage({event:"flush",data:m})}function u(o){return!o.audio&&!o.video&&!o.text&&!o.id3&&!o.initSegment}},"./src/demux/transmuxer.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return a}),T.d(g,"isPromise",function(){return E}),T.d(g,"TransmuxConfig",function(){return f}),T.d(g,"TransmuxState",function(){return k});var P=T("./src/events.ts"),p=T("./src/errors.ts"),v=T("./src/crypt/decrypter.ts"),S=T("./src/demux/aacdemuxer.ts"),b=T("./src/demux/mp4demuxer.ts"),d=T("./src/demux/tsdemuxer.ts"),l=T("./src/demux/mp3demuxer.ts"),n=T("./src/remux/mp4-remuxer.ts"),c=T("./src/remux/passthrough-remuxer.ts"),u=T("./src/demux/chunk-cache.ts"),o=T("./src/utils/mp4-tools.ts"),h=T("./src/utils/logger.ts"),m;try{m=self.performance.now.bind(self.performance)}catch(O){h.logger.debug("Unable to use Performance API on this environment"),m=self.Date.now}var s=[{demux:d.default,remux:n.default},{demux:b.default,remux:c.default},{demux:S.default,remux:n.default},{demux:l.default,remux:n.default}],r=1024;s.forEach(function(O){var C=O.demux;r=Math.max(r,C.minProbeByteLength)});var a=function(){function O(x,y,_,M,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 u.default,this.observer=x,this.typeSupported=y,this.config=_,this.vendor=M,this.id=I}var C=O.prototype;return C.configure=function(y){this.transmuxConfig=y,this.decrypter&&this.decrypter.reset()},C.push=function(y,_,M,I){var N=this,G=M.transmuxing;G.executeStart=m();var H=new Uint8Array(y),B=this.cache,K=this.config,U=this.currentTransmuxState,W=this.transmuxConfig;I&&(this.currentTransmuxState=I);var X=t(H,_);if(X&&X.method==="AES-128"){var ne=this.getDecrypter();if(K.enableSoftwareAES){var fe=ne.softwareDecrypt(H,X.key.buffer,X.iv.buffer);if(!fe)return G.executeEnd=m(),w(M);H=new Uint8Array(fe)}else return this.decryptionPromise=ne.webCryptoDecrypt(H,X.key.buffer,X.iv.buffer).then(function(Q){var V=N.push(Q,null,M);return N.decryptionPromise=null,V}),this.decryptionPromise}var me=I||U,Ae=me.contiguous,De=me.discontinuity,ye=me.trackSwitch,Oe=me.accurateTimeOffset,xe=me.timeOffset,ue=W.audioCodec,le=W.videoCodec,re=W.defaultInitPts,pe=W.duration,ee=W.initSegmentData;if((De||ye)&&this.resetInitSegment(ee,ue,le,pe),De&&this.resetInitialTimestamp(re),Ae||this.resetContiguity(),this.needsProbing(H,De,ye)){if(B.dataLength){var te=B.flush();H=Object(o.appendUint8Array)(te,H)}this.configureTransmuxer(H,W)}var ce=this.transmux(H,X,xe,Oe,M),q=this.currentTransmuxState;return q.contiguous=!0,q.discontinuity=!1,q.trackSwitch=!1,G.executeEnd=m(),ce},C.flush=function(y){var _=this,M=y.transmuxing;M.executeStart=m();var I=this.decrypter,N=this.cache,G=this.currentTransmuxState,H=this.decryptionPromise;if(H)return H.then(function(){return _.flush(y)});var B=[],K=G.timeOffset;if(I){var U=I.flush();U&&B.push(this.push(U,null,y))}var W=N.dataLength;N.reset();var X=this.demuxer,ne=this.remuxer;if(!X||!ne)return W>=r&&this.observer.emit(P.Events.ERROR,P.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),M.executeEnd=m(),[w(y)];var fe=X.flush(K);return E(fe)?fe.then(function(me){return _.flushRemux(B,me,y),B}):(this.flushRemux(B,fe,y),B)},C.flushRemux=function(y,_,M){var I=_.audioTrack,N=_.avcTrack,G=_.id3Track,H=_.textTrack,B=this.currentTransmuxState,K=B.accurateTimeOffset,U=B.timeOffset;h.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var W=this.remuxer.remux(I,N,G,H,U,K,!0,this.id);y.push({remuxResult:W,chunkMeta:M}),M.transmuxing.executeEnd=m()},C.resetInitialTimestamp=function(y){var _=this.demuxer,M=this.remuxer;if(!_||!M)return;_.resetTimeStamp(y),M.resetTimeStamp(y)},C.resetContiguity=function(){var y=this.demuxer,_=this.remuxer;if(!y||!_)return;y.resetContiguity(),_.resetNextTimestamp()},C.resetInitSegment=function(y,_,M,I){var N=this.demuxer,G=this.remuxer;if(!N||!G)return;N.resetInitSegment(_,M,I),G.resetInitSegment(y,_,M)},C.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},C.transmux=function(y,_,M,I,N){var G;return _&&_.method==="SAMPLE-AES"?G=this.transmuxSampleAes(y,_,M,I,N):G=this.transmuxUnencrypted(y,M,I,N),G},C.transmuxUnencrypted=function(y,_,M,I){var N=this.demuxer.demux(y,_,!1,!this.config.progressive),G=N.audioTrack,H=N.avcTrack,B=N.id3Track,K=N.textTrack,U=this.remuxer.remux(G,H,B,K,_,M,!1,this.id);return{remuxResult:U,chunkMeta:I}},C.transmuxSampleAes=function(y,_,M,I,N){var G=this;return this.demuxer.demuxSampleAes(y,_,M).then(function(H){var B=G.remuxer.remux(H.audioTrack,H.avcTrack,H.id3Track,H.textTrack,M,I,!1,G.id);return{remuxResult:B,chunkMeta:N}})},C.configureTransmuxer=function(y,_){for(var M=this.config,I=this.observer,N=this.typeSupported,G=this.vendor,H=_.audioCodec,B=_.defaultInitPts,K=_.duration,U=_.initSegmentData,W=_.videoCodec,X,ne=0,fe=s.length;ne0&&C!=null&&C.key!=null&&C.iv!==null&&C.method!=null&&(x=C),x}var w=function(C){return{remuxResult:{},chunkMeta:C}};function E(O){return"then"in O&&O.then instanceof Function}var f=function(C,x,y,_,M){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=C,this.videoCodec=x,this.initSegmentData=y,this.duration=_,this.defaultInitPts=M},k=function(C,x,y,_,M){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=C,this.contiguous=x,this.accurateTimeOffset=y,this.trackSwitch=_,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"discardEPB",function(){return w});var P=T("./src/demux/adts.ts"),p=T("./src/demux/mpegaudio.ts"),v=T("./src/demux/exp-golomb.ts"),S=T("./src/demux/id3.ts"),b=T("./src/demux/sample-aes.ts"),d=T("./src/events.ts"),l=T("./src/utils/mp4-tools.ts"),n=T("./src/utils/logger.ts"),c=T("./src/errors.ts"),u={video:1,audio:2,id3:3,text:4},o=function(){function E(k,O,C){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=k,this.config=O,this.typeSupported=C}E.probe=function(O){var C=E.syncOffset(O);return C<0?!1:(C&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+C+", junk ahead ?"),!0)},E.syncOffset=function(O){for(var C=Math.min(1e3,O.length-3*188),x=0;x>4,ue=void 0;if(xe>1){if(ue=De+5+O[De+4],ue===De+188)continue}else ue=De+4;switch(Oe){case G:ye&&(H&&(_=r(H))&&this.parseAVCPES(_,!1),H={data:[],size:0}),H&&(H.data.push(O.subarray(ue,De+188)),H.size+=De+188-ue);break;case B:ye&&(U&&(_=r(U))&&(I.isAAC?this.parseAACPES(_):this.parseMPEGPES(_)),U={data:[],size:0}),U&&(U.data.push(O.subarray(ue,De+188)),U.size+=De+188-ue);break;case K:ye&&(W&&(_=r(W))&&this.parseID3PES(_),W={data:[],size:0}),W&&(W.data.push(O.subarray(ue,De+188)),W.size+=De+188-ue);break;case 0:ye&&(ue+=O[ue]+1),fe=this._pmtId=m(O,ue);break;case fe:{ye&&(ue+=O[ue]+1);var le=s(O,ue,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);G=le.avc,G>0&&(M.pid=G),B=le.audio,B>0&&(I.pid=B,I.isAAC=le.isAAC),K=le.id3,K>0&&(N.pid=K),X&&!ne&&(n.logger.log("reparse from beginning"),X=!1,De=Ae-188),ne=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=!0;break}}else this.observer.emit(d.Events.ERROR,d.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=H,I.pesData=U,N.pesData=W;var re={audioTrack:I,avcTrack:M,id3Track:N,textTrack:this._txtTrack};return y&&this.extractRemainingSamples(re),re},f.flush=function(){var O=this.remainderData;this.remainderData=null;var C;return O?C=this.demux(O,-1,!1,!0):C={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(C),this.sampleAes?this.decrypt(C,this.sampleAes):C},f.extractRemainingSamples=function(O){var C=O.audioTrack,x=O.avcTrack,y=O.id3Track,_=x.pesData,M=C.pesData,I=y.pesData,N;_&&(N=r(_))?(this.parseAVCPES(N,!0),x.pesData=null):x.pesData=_,M&&(N=r(M))?(C.isAAC?this.parseAACPES(N):this.parseMPEGPES(N),C.pesData=null):(M!=null&&M.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),C.pesData=M),I&&(N=r(I))?(this.parseID3PES(N),y.pesData=null):y.pesData=I},f.demuxSampleAes=function(O,C,x){var y=this.demux(O,x,!0,!this.config.progressive),_=this.sampleAes=new b.default(this.observer,this.config,C);return this.decrypt(y,_)},f.decrypt=function(O,C){return new Promise(function(x){var y=O.audioTrack,_=O.avcTrack;y.samples&&y.isAAC?C.decryptAacSamples(y.samples,0,function(){_.samples?C.decryptAvcSamples(_.samples,0,0,function(){x(O)}):x(O)}):_.samples&&C.decryptAvcSamples(_.samples,0,0,function(){x(O)})})},f.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},f.parseAVCPES=function(O,C){var x=this,y=this._avcTrack,_=this.parseAVCNALu(O.data),M=!1,I=this.avcSample,N,G=!1;O.data=null,I&&_.length&&!y.audFound&&(a(I,y),I=this.avcSample=h(!1,O.pts,O.dts,"")),_.forEach(function(H){switch(H.type){case 1:{N=!0,I||(I=x.avcSample=h(!0,O.pts,O.dts,"")),M&&(I.debug+="NDR "),I.frame=!0;var B=H.data;if(G&&B.length>4){var K=new v.default(B).readSliceType();(K===2||K===4||K===7||K===9)&&(I.key=!0)}break}case 5:N=!0,I||(I=x.avcSample=h(!0,O.pts,O.dts,"")),M&&(I.debug+="IDR "),I.key=!0,I.frame=!0;break;case 6:{N=!0,M&&I&&(I.debug+="SEI ");var U=new v.default(w(H.data));U.readUByte();for(var W=0,X=0,ne=!1,fe=0;!ne&&U.bytesAvailable>1;){W=0;do fe=U.readUByte(),W+=fe;while(fe===255);X=0;do fe=U.readUByte(),X+=fe;while(fe===255);if(W===4&&U.bytesAvailable!==0){ne=!0;var me=U.readUByte();if(me===181){var Ae=U.readUShort();if(Ae===49){var De=U.readUInt();if(De===1195456820){var ye=U.readUByte();if(ye===3){for(var Oe=U.readUByte(),xe=U.readUByte(),ue=31&Oe,le=[Oe,xe],re=0;re16){for(var pe=[],ee=0;ee<16;ee++)pe.push(U.readUByte().toString(16)),(ee===3||ee===5||ee===7||ee===9)&&pe.push("-");for(var te=X-16,ce=new Uint8Array(te),q=0;q=0){var U={data:O.subarray(B,I-y-1),type:K};M.push(U)}else{var W=this.getLastNalUnit();if(W&&(_&&I<=4-_&&(W.state&&(W.data=W.data.subarray(0,W.data.byteLength-_))),G=I-y-1,G>0)){var X=new Uint8Array(W.data.byteLength+G);X.set(W.data,0),X.set(O.subarray(0,G),W.data.byteLength),W.data=X,W.state=0}}I=0&&y>=0){var ne={data:O.subarray(B,C),type:K,state:y};M.push(ne)}if(M.length===0){var fe=this.getLastNalUnit();if(fe){var me=new Uint8Array(fe.data.byteLength+O.byteLength);me.set(fe.data,0),me.set(O,fe.data.byteLength),fe.data=me}}return x.naluState=y,M},f.parseAACPES=function(O){var C=0,x=this._audioTrack,y=this.aacOverFlow,_=O.data;if(y){this.aacOverFlow=null;var M=y.sample.unit.byteLength,I=Math.min(y.missing,M),N=M-I;y.sample.unit.set(_.subarray(0,I),N),x.samples.push(y.sample),C=y.missing}var G,H;for(G=C,H=_.length;G1;){var M=new Uint8Array(_[0].length+_[1].length);M.set(_[0]),M.set(_[1],_[0].length),_[0]=M,_.splice(1,1)}k=_[0];var I=(k[0]<<16)+(k[1]<<8)+k[2];if(I===1){if(O=(k[4]<<8)+k[5],O&&O>E.size-6)return null;var N=k[7];N&192&&(x=(k[9]&14)*536870912+(k[10]&255)*4194304+(k[11]&254)*16384+(k[12]&255)*128+(k[13]&254)/2,N&64?(y=(k[14]&14)*536870912+(k[15]&255)*4194304+(k[16]&254)*16384+(k[17]&255)*128+(k[18]&254)/2,x-y>60*9e4&&(n.logger.warn(Math.round((x-y)/9e4)+"s delta between PTS and DTS, align them"),x=y)):y=x),C=k[8];var G=C+9;if(E.size<=G)return null;E.size-=G;for(var H=new Uint8Array(E.size),B=0,K=_.length;BU){G-=U;continue}else k=k.subarray(G),U-=G,G=0;H.set(k,f),f+=U}return O&&(O-=C+3),{data:H,pts:x,dts:y,len:O}}return null}function a(E,f){if(E.units.length&&E.frame){if(E.pts===void 0){var k=f.samples,O=k.length;if(O){var C=k[O-1];E.pts=C.pts,E.dts=C.dts}else{f.dropped++;return}}f.samples.push(E)}E.debug.length&&n.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function t(E,f){var k=E.length;if(k>0){if(f.pts>=E[k-1].pts)E.push(f);else for(var O=k-1;O>=0;O--)if(f.ptsx)return _;return 0}},{key:"maxAutoLevel",get:function(){var C=this.levels,x=this.autoLevelCapping,y;return x===-1&&C&&C.length?y=C.length-1:y=x,y}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(C){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,C)}},{key:"audioTracks",get:function(){var C=this.audioTrackController;return C?C.audioTracks:[]}},{key:"audioTrack",get:function(){var C=this.audioTrackController;return C?C.audioTrack:-1},set:function(C){var x=this.audioTrackController;x&&(x.audioTrack=C)}},{key:"subtitleTracks",get:function(){var C=this.subtitleTrackController;return C?C.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var C=this.subtitleTrackController;return C?C.subtitleTrack:-1},set:function(C){var x=this.subtitleTrackController;x&&(x.subtitleTrack=C)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var C=this.subtitleTrackController;return C?C.subtitleDisplay:!1},set:function(C){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=C)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(C){this.config.lowLatencyMode=C}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return r.Events}},{key:"ErrorTypes",get:function(){return a.ErrorTypes}},{key:"ErrorDetails",get:function(){return a.ErrorDetails}},{key:"DefaultConfig",get:function(){return f.defaultConfig?f.defaultConfig:h.hlsDefaultConfig},set:function(C){f.defaultConfig=C}}]),f}();E.defaultConfig=void 0},"./src/is-supported.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"isSupported",function(){return v}),T.d(g,"changeTypeSupported",function(){return S});var P=T("./src/utils/mediasource-helper.ts");function p(){return self.SourceBuffer||self.WebKitSourceBuffer}function v(){var b=Object(P.getMediaSource)();if(!b)return!1;var d=p(),l=b&&typeof b.isTypeSupported=="function"&&b.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!d||d.prototype&&typeof d.prototype.appendBuffer=="function"&&typeof d.prototype.remove=="function";return!!l&&!!n}function S(){var b,d=p();return typeof(d==null||((b=d.prototype)===null||b===void 0)?void 0:b.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return o}),T.d(g,"LoadError",function(){return m});var P=T("./src/polyfills/number.ts"),p=T("./src/errors.ts");function v(s,r){s.prototype=Object.create(r.prototype),s.prototype.constructor=s,n(s,r)}function S(s){var r=typeof Map=="function"?new Map:void 0;return S=function(t){if(t===null||!l(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r!="undefined"){if(r.has(t))return r.get(t);r.set(t,w)}function w(){return b(t,arguments,c(this).constructor)}return w.prototype=Object.create(t.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),n(w,t)},S(s)}function b(s,r,a){return d()?b=Reflect.construct:b=function(w,E,f){var k=[null];k.push.apply(k,E);var O=Function.bind.apply(w,k),C=new O;return f&&n(C,f.prototype),C},b.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(s){return!1}}function l(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function n(s,r){return n=Object.setPrototypeOf||function(t,w){return t.__proto__=w,t},n(s,r)}function c(s){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},c(s)}var u=Math.pow(2,17),o=function(){function s(a){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=a}var r=s.prototype;return r.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},r.abort=function(){this.loader&&this.loader.abort()},r.load=function(t,w){var E=this,f=t.url;if(!f)return Promise.reject(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(f?"part list":"url")));this.abort();var k=this.config,O=k.fLoader,C=k.loader;return new Promise(function(x,y){E.loader&&E.loader.destroy();var _=E.loader=t.loader=O?new O(k):new C(k),M=h(t),I={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=_.stats,_.load(M,I,{onSuccess:function(G,H,B,K){E.resetLoader(t,_),x({frag:t,part:null,payload:G.data,networkDetails:K})},onError:function(G,H,B){E.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:G,networkDetails:B}))},onAbort:function(G,H,B){E.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:B}))},onTimeout:function(G,H,B){E.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:B}))},onProgress:function(G,H,B,K){w&&w({frag:t,part:null,payload:B,networkDetails:K})}})})},r.loadPart=function(t,w,E){var f=this;this.abort();var k=this.config,O=k.fLoader,C=k.loader;return new Promise(function(x,y){f.loader&&f.loader.destroy();var _=f.loader=t.loader=O?new O(k):new C(k),M=h(t,w),I={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:u};w.stats=_.stats,_.load(M,I,{onSuccess:function(G,H,B,K){f.resetLoader(t,_),f.updateStatsFromPart(t,w);var U={frag:t,part:w,payload:G.data,networkDetails:K};E(U),x(U)},onError:function(G,H,B){f.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:w,response:G,networkDetails:B}))},onAbort:function(G,H,B){t.stats.aborted=w.stats.aborted,f.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:w,networkDetails:B}))},onTimeout:function(G,H,B){f.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:w,networkDetails:B}))}})})},r.updateStatsFromPart=function(t,w){var E=t.stats,f=w.stats,k=f.total;if(E.loaded+=f.loaded,k){var O=Math.round(t.duration/w.duration),C=Math.min(Math.round(E.loaded/k),O),x=O-C,y=x*Math.round(E.loaded/C);E.total=E.loaded+y}else E.total=Math.max(E.loaded,E.total);var _=E.loading,M=f.loading;_.start?_.first+=M.first-M.start:(_.start=M.start,_.first=M.first),_.end=M.end},r.resetLoader=function(t,w){t.loader=null,this.loader===w&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),w.destroy()},s}();function h(s,r){r===void 0&&(r=null);var a=r||s,t={frag:s,part:r,responseType:"arraybuffer",url:a.url,headers:{},rangeStart:0,rangeEnd:0},w=a.byteRangeStartOffset,E=a.byteRangeEndOffset;return Object(P.isFiniteNumber)(w)&&Object(P.isFiniteNumber)(E)&&(t.rangeStart=w,t.rangeEnd=E),t}var m=function(s){v(r,s);function r(a){for(var t,w=arguments.length,E=new Array(w>1?w-1:0),f=1;f>8*(15-k)&255;return f},t.setDecryptDataFromLevelKey=function(E,f){var k=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(k=b.LevelKey.fromURI(E.uri),k.method=E.method,k.iv=this.createInitializationVector(f),k.keyFormat="identity"),k},t.setElementaryStreamInfo=function(E,f,k,O,C,x){x===void 0&&(x=!1);var y=this.elementaryStreams,_=y[E];if(!_){y[E]={startPTS:f,endPTS:k,startDTS:O,endDTS:C,partial:x};return}_.startPTS=Math.min(_.startPTS,f),_.endPTS=Math.max(_.endPTS,k),_.startDTS=Math.min(_.startDTS,O),_.endDTS=Math.max(_.endDTS,C)},t.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[o.AUDIO]=null,E[o.VIDEO]=null,E[o.AUDIOVIDEO]=null},u(a,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var E=this.sn;typeof E!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&S.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),E=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,E)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(P.isFiniteNumber)(this.programDateTime))return null;var E=Object(P.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+E*1e3}},{key:"encrypted",get:function(){var E;return!!((E=this.decryptdata)!==null&&E!==void 0&&E.keyFormat&&this.decryptdata.uri)}}]),a}(h),s=function(r){l(a,r);function a(t,w,E,f,k){var O;O=r.call(this,E)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new d.LoadStats,O.duration=t.decimalFloatingPoint("DURATION"),O.gap=t.bool("GAP"),O.independent=t.bool("INDEPENDENT"),O.relurl=t.enumeratedString("URI"),O.fragment=w,O.index=f;var C=t.enumeratedString("BYTERANGE");return C&&O.setByteRange(C,k),k&&(O.fragOffset=k.fragOffset+k.duration),O}return u(a,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var w=this.elementaryStreams;return!!(w.audio||w.video||w.audiovideo)}}]),a}(h)},"./src/loader/key-loader.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return S});var P=T("./src/events.ts"),p=T("./src/errors.ts"),v=T("./src/utils/logger.ts"),S=function(){function b(l){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=l,this._registerListeners()}var d=b.prototype;return d._registerListeners=function(){this.hls.on(P.Events.KEY_LOADING,this.onKeyLoading,this)},d._unregisterListeners=function(){this.hls.off(P.Events.KEY_LOADING,this.onKeyLoading)},d.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var c=this.loaders[n];c&&c.destroy()}this.loaders={}},d.onKeyLoading=function(n,c){var u=c.frag,o=u.type,h=this.loaders[o];if(!u.decryptdata){v.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var m=u.decryptdata.uri;if(m!==this.decrypturl||this.decryptkey===null){var s=this.hls.config;if(h&&(v.logger.warn("abort previous key loader for type:"+o),h.abort()),!m){v.logger.warn("key uri is falsy");return}var r=s.loader,a=u.loader=this.loaders[o]=new r(s);this.decrypturl=m,this.decryptkey=null;var t={url:m,frag:u,responseType:"arraybuffer"},w={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};a.load(t,w,E)}else this.decryptkey&&(u.decryptdata.key=this.decryptkey,this.hls.trigger(P.Events.KEY_LOADED,{frag:u}))},d.loadsuccess=function(n,c,u){var o=u.frag;if(!o.decryptdata){v.logger.error("after key load, decryptdata unset");return}this.decryptkey=o.decryptdata.key=new Uint8Array(n.data),o.loader=null,delete this.loaders[o.type],this.hls.trigger(P.Events.KEY_LOADED,{frag:o})},d.loaderror=function(n,c){var u=c.frag,o=u.loader;o&&o.abort(),delete this.loaders[u.type],this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:u,response:n})},d.loadtimeout=function(n,c){var u=c.frag,o=u.loader;o&&o.abort(),delete this.loaders[u.type],this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:u})},b}()},"./src/loader/level-details.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"LevelDetails",function(){return b});var P=T("./src/polyfills/number.ts");function p(d,l){for(var n=0;nc.endSN||u>0||u===0&&o>0,this.updated||this.advanced?this.misses=Math.floor(c.misses*.6):this.misses=c.misses+1,this.availabilityDelay=c.availabilityDelay},v(d,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(P.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||S}},{key:"drift",get:function(){var c=this.driftEndTime-this.driftStartTime;if(c>0){var u=this.driftEnd-this.driftStart;return u*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}}]),d}()},"./src/loader/level-key.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"LevelKey",function(){return b});var P=T("./node_modules/url-toolkit/src/url-toolkit.js"),p=T.n(P);function v(d,l){for(var n=0;n2){var y=x.shift()+".";return y+=parseInt(x.shift()).toString(16),y+=("000"+parseInt(x.shift()).toString(16)).substr(-4),y}return C},k.resolve=function(C,x){return p.buildAbsoluteURL(x,C,{alwaysNormalize:!0})},k.parseMasterPlaylist=function(C,x){var y=[],_={},M=!1;u.lastIndex=0;for(var I;(I=u.exec(C))!=null;)if(I[1]){var N=new l.AttrList(I[1]),G={attrs:N,bitrate:N.decimalInteger("AVERAGE-BANDWIDTH")||N.decimalInteger("BANDWIDTH"),name:N.NAME,url:k.resolve(I[2],x)},H=N.decimalResolution("RESOLUTION");H&&(G.width=H.width,G.height=H.height),t((N.CODECS||"").split(/[ ,]+/).filter(function(K){return K}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=k.convertAVC1ToAVCOTI(G.videoCodec)),y.push(G)}else if(I[3]){var B=new l.AttrList(I[3]);B["DATA-ID"]&&(M=!0,_[B["DATA-ID"]]=B)}return{levels:y,sessionData:M?_:null}},k.parseMasterPlaylistMedia=function(C,x,y,_){_===void 0&&(_=[]);var M,I=[],N=0;for(o.lastIndex=0;(M=o.exec(C))!==null;){var G=new l.AttrList(M[1]);if(G.TYPE===y){var H={attrs:G,bitrate:0,id:N++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:y,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?k.resolve(G.URI,x):""};if(_.length){var B=k.findGroup(_,H.groupId)||_[0];w(H,B,"audioCodec"),w(H,B,"textCodec")}I.push(H)}}return I},k.parseLevelPlaylist=function(C,x,y,_,M){var I=new b.LevelDetails(x),N=I.fragments,G=null,H=0,B=0,K=0,U=0,W=null,X=new S.Fragment(_,x),ne,fe,me,Ae=-1,De=!1;for(h.lastIndex=0,I.m3u8=C;(ne=h.exec(C))!==null;){De&&(De=!1,X=new S.Fragment(_,x),X.start=K,X.sn=H,X.cc=U,X.level=y,G&&(X.initSegment=G,X.rawProgramDateTime=G.rawProgramDateTime));var ye=ne[1];if(ye){X.duration=parseFloat(ye);var Oe=(" "+ne[2]).slice(1);X.title=Oe||null,X.tagList.push(Oe?["INF",ye,Oe]:["INF",ye])}else if(ne[3])Object(P.isFiniteNumber)(X.duration)&&(X.start=K,me&&(X.levelkey=me),X.sn=H,X.level=y,X.cc=U,X.urlId=M,N.push(X),X.relurl=(" "+ne[3]).slice(1),f(X,W),W=X,K+=X.duration,H++,B=0,De=!0);else if(ne[4]){var xe=(" "+ne[4]).slice(1);W?X.setByteRange(xe,W):X.setByteRange(xe)}else if(ne[5])X.rawProgramDateTime=(" "+ne[5]).slice(1),X.tagList.push(["PROGRAM-DATE-TIME",X.rawProgramDateTime]),Ae===-1&&(Ae=N.length);else{if(ne=ne[0].match(m),!ne){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(fe=1;fe-1){n.logger.warn("Keyformat "+Je+" is not supported from the manifest");continue}else if(Je!=="identity")continue;V&&(me=d.LevelKey.fromURL(x,Z),Z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(V)>=0&&(me.method=V,me.keyFormat=Je,Te&&(me.keyID=Te),ge&&(me.keyFormatVersions=ge),me.iv=be));break}case"START":{var nt=new l.AttrList(le),at=nt.decimalFloatingPoint("TIME-OFFSET");Object(P.isFiniteNumber)(at)&&(I.startTimeOffset=at);break}case"MAP":{var ct=new l.AttrList(le);X.relurl=ct.URI,ct.BYTERANGE&&X.setByteRange(ct.BYTERANGE),X.level=y,X.sn="initSegment",me&&(X.levelkey=me),X.initSegment=null,G=X,De=!0;break}case"SERVER-CONTROL":{var ht=new l.AttrList(le);I.canBlockReload=ht.bool("CAN-BLOCK-RELOAD"),I.canSkipUntil=ht.optionalFloat("CAN-SKIP-UNTIL",0),I.canSkipDateRanges=I.canSkipUntil>0&&ht.bool("CAN-SKIP-DATERANGES"),I.partHoldBack=ht.optionalFloat("PART-HOLD-BACK",0),I.holdBack=ht.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var He=new l.AttrList(le);I.partTarget=He.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Re=I.partList;Re||(Re=I.partList=[]);var tt=B>0?Re[Re.length-1]:void 0,ft=B++,Qe=new S.Part(new l.AttrList(le),X,x,ft,tt);Re.push(Qe),X.duration+=Qe.duration;break}case"PRELOAD-HINT":{var lt=new l.AttrList(le);I.preloadHint=lt;break}case"RENDITION-REPORT":{var Ue=new l.AttrList(le);I.renditionReports=I.renditionReports||[],I.renditionReports.push(Ue);break}default:n.logger.warn("line parsed but not handled: "+ne);break}}}W&&!W.relurl?(N.pop(),K-=W.duration,I.partList&&(I.fragmentHint=W)):I.partList&&(f(X,W),X.cc=U,I.fragmentHint=X);var Le=N.length,Ie=N[0],Ce=N[Le-1];if(K+=I.skippedSegments*I.targetduration,K>0&&Le&&Ce){I.averagetargetduration=K/Le;var Se=Ce.sn;I.endSN=Se!=="initSegment"?Se:0,Ie&&(I.startCC=Ie.cc,Ie.initSegment||I.fragments.every(function(ke){return ke.relurl&&r(ke.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),X=new S.Fragment(_,x),X.relurl=Ce.relurl,X.level=y,X.sn="initSegment",Ie.initSegment=X,I.needSidxRanges=!0))}else I.endSN=0,I.startCC=0;return I.fragmentHint&&(K+=I.fragmentHint.duration),I.totalduration=K,I.endCC=U,Ae>0&&E(N,Ae),I},k}();function t(k,O){["video","audio","text"].forEach(function(C){var x=k.filter(function(_){return Object(c.isCodecType)(_,C)});if(x.length){var y=x.filter(function(_){return _.lastIndexOf("avc1",0)===0||_.lastIndexOf("mp4a",0)===0});O[C+"Codec"]=y.length>0?y[0]:x[0],k=k.filter(function(_){return x.indexOf(_)===-1})}}),O.unknownCodecs=k}function w(k,O,C){var x=O[C];x&&(k[C]=x)}function E(k,O){for(var C=k[O],x=O;x--;){var y=k[x];if(!y)return;y.programDateTime=C.programDateTime-y.duration*1e3,C=y}}function f(k,O){k.rawProgramDateTime?k.programDateTime=Date.parse(k.rawProgramDateTime):O!=null&&O.programDateTime&&(k.programDateTime=O.endProgramDateTime),Object(P.isFiniteNumber)(k.programDateTime)||(k.programDateTime=null,k.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/polyfills/number.ts"),p=T("./src/events.ts"),v=T("./src/errors.ts"),S=T("./src/utils/logger.ts"),b=T("./src/utils/mp4-tools.ts"),d=T("./src/loader/m3u8-parser.ts"),l=T("./src/types/loader.ts"),n=T("./src/utils/attr-list.ts");function c(h){var m=h.type;switch(m){case l.PlaylistContextType.AUDIO_TRACK:return l.PlaylistLevelType.AUDIO;case l.PlaylistContextType.SUBTITLE_TRACK:return l.PlaylistLevelType.SUBTITLE;default:return l.PlaylistLevelType.MAIN}}function u(h,m){var s=h.url;return(s===void 0||s.indexOf("data:")===0)&&(s=m.url),s}var o=function(){function h(s){this.hls=void 0,this.loaders=Object.create(null),this.hls=s,this.registerListeners()}var m=h.prototype;return m.registerListeners=function(){var r=this.hls;r.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(p.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(p.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),r.on(p.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},m.unregisterListeners=function(){var r=this.hls;r.off(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(p.Events.LEVEL_LOADING,this.onLevelLoading,this),r.off(p.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),r.off(p.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},m.createInternalLoader=function(r){var a=this.hls.config,t=a.pLoader,w=a.loader,E=t||w,f=new E(a);return r.loader=f,this.loaders[r.type]=f,f},m.getInternalLoader=function(r){return this.loaders[r.type]},m.resetInternalLoader=function(r){this.loaders[r]&&delete this.loaders[r]},m.destroyInternalLoaders=function(){for(var r in this.loaders){var a=this.loaders[r];a&&a.destroy(),this.resetInternalLoader(r)}},m.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},m.onManifestLoading=function(r,a){var t=a.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:l.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},m.onLevelLoading=function(r,a){var t=a.id,w=a.level,E=a.url,f=a.deliveryDirectives;this.load({id:t,groupId:null,level:w,responseType:"text",type:l.PlaylistContextType.LEVEL,url:E,deliveryDirectives:f})},m.onAudioTrackLoading=function(r,a){var t=a.id,w=a.groupId,E=a.url,f=a.deliveryDirectives;this.load({id:t,groupId:w,level:null,responseType:"text",type:l.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:f})},m.onSubtitleTrackLoading=function(r,a){var t=a.id,w=a.groupId,E=a.url,f=a.deliveryDirectives;this.load({id:t,groupId:w,level:null,responseType:"text",type:l.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:f})},m.load=function(r){var a,t=this.hls.config,w=this.getInternalLoader(r);if(w){var E=w.context;if(E&&E.url===r.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+r.type),w.abort()}var f,k,O,C;switch(r.type){case l.PlaylistContextType.MANIFEST:f=t.manifestLoadingMaxRetry,k=t.manifestLoadingTimeOut,O=t.manifestLoadingRetryDelay,C=t.manifestLoadingMaxRetryTimeout;break;case l.PlaylistContextType.LEVEL:case l.PlaylistContextType.AUDIO_TRACK:case l.PlaylistContextType.SUBTITLE_TRACK:f=0,k=t.levelLoadingTimeOut;break;default:f=t.levelLoadingMaxRetry,k=t.levelLoadingTimeOut,O=t.levelLoadingRetryDelay,C=t.levelLoadingMaxRetryTimeout;break}if(w=this.createInternalLoader(r),(a=r.deliveryDirectives)!==null&&a!==void 0&&a.part){var x;if(r.type===l.PlaylistContextType.LEVEL&&r.level!==null?x=this.hls.levels[r.level].details:r.type===l.PlaylistContextType.AUDIO_TRACK&&r.id!==null?x=this.hls.audioTracks[r.id].details:r.type===l.PlaylistContextType.SUBTITLE_TRACK&&r.id!==null&&(x=this.hls.subtitleTracks[r.id].details),x){var y=x.partTarget,_=x.targetduration;y&&_&&(k=Math.min(Math.max(y*3,_*.8)*1e3,k))}}var M={timeout:k,maxRetry:f,retryDelay:O,maxRetryDelay:C,highWaterMark:0},I={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};w.load(r,M,I)},m.loadsuccess=function(r,a,t,w){if(w===void 0&&(w=null),t.isSidxRequest){this.handleSidxRequest(r,t),this.handlePlaylistLoaded(r,a,t,w);return}this.resetInternalLoader(t.type);var E=r.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(r,t,"no EXTM3U delimiter",w);return}a.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(r,a,t,w):this.handleMasterPlaylist(r,a,t,w)},m.loaderror=function(r,a,t){t===void 0&&(t=null),this.handleNetworkError(a,t,!1,r)},m.loadtimeout=function(r,a,t){t===void 0&&(t=null),this.handleNetworkError(a,t,!0)},m.handleMasterPlaylist=function(r,a,t,w){var E=this.hls,f=r.data,k=u(r,t),O=d.default.parseMasterPlaylist(f,k),C=O.levels,x=O.sessionData;if(!C.length){this.handleManifestParsingError(r,t,"no level found in manifest",w);return}var y=C.map(function(H){return{id:H.attrs.AUDIO,audioCodec:H.audioCodec}}),_=C.map(function(H){return{id:H.attrs.SUBTITLES,textCodec:H.textCodec}}),M=d.default.parseMasterPlaylistMedia(f,k,"AUDIO",y),I=d.default.parseMasterPlaylistMedia(f,k,"SUBTITLES",_),N=d.default.parseMasterPlaylistMedia(f,k,"CLOSED-CAPTIONS");if(M.length){var G=M.some(function(H){return!H.url});!G&&C[0].audioCodec&&!C[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),M.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}E.trigger(p.Events.MANIFEST_LOADED,{levels:C,audioTracks:M,subtitles:I,captions:N,url:k,stats:a,networkDetails:w,sessionData:x})},m.handleTrackOrLevelPlaylist=function(r,a,t,w){var E=this.hls,f=t.id,k=t.level,O=t.type,C=u(r,t),x=Object(P.isFiniteNumber)(f)?f:0,y=Object(P.isFiniteNumber)(k)?k:x,_=c(t),M=d.default.parseLevelPlaylist(r.data,C,y,_,x);if(!M.fragments.length){E.trigger(p.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:C,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(O===l.PlaylistContextType.MANIFEST){var I={attrs:new n.AttrList({}),bitrate:0,details:M,name:"",url:C};E.trigger(p.Events.MANIFEST_LOADED,{levels:[I],audioTracks:[],url:C,stats:a,networkDetails:w,sessionData:null})}if(a.parsing.end=performance.now(),M.needSidxRanges){var N,G=(N=M.fragments[0].initSegment)===null||N===void 0?void 0:N.url;this.load({url:G,isSidxRequest:!0,type:O,level:k,levelDetails:M,id:f,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=M,this.handlePlaylistLoaded(r,a,t,w)},m.handleSidxRequest=function(r,a){var t=Object(b.parseSegmentIndex)(new Uint8Array(r.data));if(!t)return;var w=t.references,E=a.levelDetails;w.forEach(function(f,k){var O=f.info,C=E.fragments[k];C.byteRange.length===0&&C.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),C.initSegment&&C.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},m.handleManifestParsingError=function(r,a,t,w){this.hls.trigger(p.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:a.type===l.PlaylistContextType.MANIFEST,url:r.url,reason:t,response:r,context:a,networkDetails:w})},m.handleNetworkError=function(r,a,t,w){t===void 0&&(t=!1),S.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+r.type+" level: "+r.level+" id: "+r.id+' group-id: "'+r.groupId+'"');var E=v.ErrorDetails.UNKNOWN,f=!1,k=this.getInternalLoader(r);switch(r.type){case l.PlaylistContextType.MANIFEST:E=t?v.ErrorDetails.MANIFEST_LOAD_TIMEOUT:v.ErrorDetails.MANIFEST_LOAD_ERROR,f=!0;break;case l.PlaylistContextType.LEVEL:E=t?v.ErrorDetails.LEVEL_LOAD_TIMEOUT:v.ErrorDetails.LEVEL_LOAD_ERROR,f=!1;break;case l.PlaylistContextType.AUDIO_TRACK:E=t?v.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,f=!1;break;case l.PlaylistContextType.SUBTITLE_TRACK:E=t?v.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:v.ErrorDetails.SUBTITLE_LOAD_ERROR,f=!1;break}k&&this.resetInternalLoader(r.type);var O={type:v.ErrorTypes.NETWORK_ERROR,details:E,fatal:f,url:r.url,loader:k,context:r,networkDetails:a};w&&(O.response=w),this.hls.trigger(p.Events.ERROR,O)},m.handlePlaylistLoaded=function(r,a,t,w){var E=t.type,f=t.level,k=t.id,O=t.groupId,C=t.loader,x=t.levelDetails,y=t.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(r,t,"invalid target duration",w);return}if(!C)return;x.live&&(C.getCacheAge&&(x.ageHeader=C.getCacheAge()||0),(!C.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(E){case l.PlaylistContextType.MANIFEST:case l.PlaylistContextType.LEVEL:this.hls.trigger(p.Events.LEVEL_LOADED,{details:x,level:f||0,id:k||0,stats:a,networkDetails:w,deliveryDirectives:y});break;case l.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(p.Events.AUDIO_TRACK_LOADED,{details:x,id:k||0,groupId:O||"",stats:a,networkDetails:w,deliveryDirectives:y});break;case l.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(p.Events.SUBTITLE_TRACK_LOADED,{details:x,id:k||0,groupId:O||"",stats:a,networkDetails:w,deliveryDirectives:y});break}},h}();g.default=o},"./src/polyfills/number.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"isFiniteNumber",function(){return P}),T.d(g,"MAX_SAFE_INTEGER",function(){return p});var P=Number.isFinite||function(v){return typeof v=="number"&&isFinite(v)},p=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(L,g,T){"use strict";T.r(g);var P=function(){function p(){}return p.getSilentFrame=function(S,b){switch(S){case"mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(b===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(b===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},p}();g.default=P},"./src/remux/mp4-generator.ts":function(L,g,T){"use strict";T.r(g);var P=Math.pow(2,32)-1,p=function(){function v(){}return v.init=function(){v.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 v.types)v.types.hasOwnProperty(b)&&(v.types[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.charCodeAt(3)]);var d=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]),l=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]);v.HDLR_TYPES={video:d,audio:l};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]);v.STTS=v.STSC=v.STCO=c,v.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),v.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),v.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),v.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var u=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),h=new Uint8Array([0,0,0,1]);v.FTYP=v.box(v.types.ftyp,u,h,u,o),v.DINF=v.box(v.types.dinf,v.box(v.types.dref,n))},v.box=function(b){for(var d=8,l=arguments.length,n=new Array(l>1?l-1:0),c=1;c>24&255,h[1]=d>>16&255,h[2]=d>>8&255,h[3]=d&255,h.set(b,4),u=0,d=8;u>24&255,b>>16&255,b>>8&255,b&255,l>>24,l>>16&255,l>>8&255,l&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},v.mdia=function(b){return v.box(v.types.mdia,v.mdhd(b.timescale,b.duration),v.hdlr(b.type),v.minf(b))},v.mfhd=function(b){return v.box(v.types.mfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255]))},v.minf=function(b){return b.type==="audio"?v.box(v.types.minf,v.box(v.types.smhd,v.SMHD),v.DINF,v.stbl(b)):v.box(v.types.minf,v.box(v.types.vmhd,v.VMHD),v.DINF,v.stbl(b))},v.moof=function(b,d,l){return v.box(v.types.moof,v.mfhd(b),v.traf(l,d))},v.moov=function(b){for(var d=b.length,l=[];d--;)l[d]=v.trak(b[d]);return v.box.apply(null,[v.types.moov,v.mvhd(b[0].timescale,b[0].duration)].concat(l).concat(v.mvex(b)))},v.mvex=function(b){for(var d=b.length,l=[];d--;)l[d]=v.trex(b[d]);return v.box.apply(null,[v.types.mvex].concat(l))},v.mvhd=function(b,d){d*=b;var l=Math.floor(d/(P+1)),n=Math.floor(d%(P+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,l>>24,l>>16&255,l>>8&255,l&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 v.box(v.types.mvhd,c)},v.sdtp=function(b){var d=b.samples||[],l=new Uint8Array(4+d.length),n,c;for(n=0;n>>8&255),d.push(u&255),d=d.concat(Array.prototype.slice.call(c));for(n=0;n>>8&255),l.push(u&255),l=l.concat(Array.prototype.slice.call(c));var o=v.box(v.types.avcC,new Uint8Array([1,d[3],d[4],d[5],252|3,224|b.sps.length].concat(d).concat([b.pps.length]).concat(l))),h=b.width,m=b.height,s=b.pixelRatio[0],r=b.pixelRatio[1];return v.box(v.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,h>>8&255,h&255,m>>8&255,m&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]),o,v.box(v.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),v.box(v.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,r>>24,r>>16&255,r>>8&255,r&255])))},v.esds=function(b){var d=b.config.length;return new Uint8Array([0,0,0,0,3,23+d,0,1,0,4,15+d,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([d]).concat(b.config).concat([6,1,2]))},v.mp4a=function(b){var d=b.samplerate;return v.box(v.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,d>>8&255,d&255,0,0]),v.box(v.types.esds,v.esds(b)))},v.mp3=function(b){var d=b.samplerate;return v.box(v.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,d>>8&255,d&255,0,0]))},v.stsd=function(b){return b.type==="audio"?!b.isAAC&&b.codec==="mp3"?v.box(v.types.stsd,v.STSD,v.mp3(b)):v.box(v.types.stsd,v.STSD,v.mp4a(b)):v.box(v.types.stsd,v.STSD,v.avc1(b))},v.tkhd=function(b){var d=b.id,l=b.duration*b.timescale,n=b.width,c=b.height,u=Math.floor(l/(P+1)),o=Math.floor(l%(P+1));return v.box(v.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,o>>24,o>>16&255,o>>8&255,o&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]))},v.traf=function(b,d){var l=v.sdtp(b),n=b.id,c=Math.floor(d/(P+1)),u=Math.floor(d%(P+1));return v.box(v.types.traf,v.box(v.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),v.box(v.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,u>>24,u>>16&255,u>>8&255,u&255])),v.trun(b,l.length+16+20+8+16+8+8),l)},v.trak=function(b){return b.duration=b.duration||4294967295,v.box(v.types.trak,v.tkhd(b),v.mdia(b))},v.trex=function(b){var d=b.id;return v.box(v.types.trex,new Uint8Array([0,0,0,0,d>>24,d>>16&255,d>>8&255,d&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},v.trun=function(b,d){var l=b.samples||[],n=l.length,c=12+16*n,u=new Uint8Array(c),o,h,m,s,r,a;for(d+=8+c,u.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255],0),o=0;o>>24&255,m>>>16&255,m>>>8&255,m&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,r.isLeading<<2|r.dependsOn,r.isDependedOn<<6|r.hasRedundancy<<4|r.paddingValue<<1|r.isNonSync,r.degradPrio&240<<8,r.degradPrio&15,a>>>24&255,a>>>16&255,a>>>8&255,a&255],12+16*o);return v.box(v.types.trun,u)},v.initSegment=function(b){v.types||v.init();var d=v.moov(b),l=new Uint8Array(v.FTYP.byteLength+d.byteLength);return l.set(v.FTYP),l.set(d,v.FTYP.byteLength),l},v}();p.types=void 0,p.HDLR_TYPES=void 0,p.STTS=void 0,p.STSC=void 0,p.STCO=void 0,p.STSZ=void 0,p.VMHD=void 0,p.SMHD=void 0,p.STSD=void 0,p.FTYP=void 0,p.DINF=void 0,g.default=p},"./src/remux/mp4-remuxer.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return a}),T.d(g,"normalizePts",function(){return t});var P=T("./src/polyfills/number.ts"),p=T("./src/remux/aac-helper.ts"),v=T("./src/remux/mp4-generator.ts"),S=T("./src/events.ts"),b=T("./src/errors.ts"),d=T("./src/utils/logger.ts"),l=T("./src/types/loader.ts"),n=T("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(k){for(var O=1;O0?M:I.pts},x[0].pts);return y&&d.logger.debug("PTS rollover detected"),_},O.remux=function(x,y,_,M,I,N,G,H){var B,K,U,W,X,ne,fe=I,me=I,Ae=x.pid>-1,De=y.pid>-1,ye=y.samples.length,Oe=x.samples.length>0,xe=ye>1,ue=(!Ae||Oe)&&(!De||xe)||this.ISGenerated||G;if(ue){this.ISGenerated||(U=this.generateIS(x,y,I));var le=this.isVideoContiguous,re=-1;if(xe&&(re=w(y.samples),!le&&this.config.forceKeyFrameOnDiscontinuity))if(ne=!0,re>0){d.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+ye+" video samples due to a missing keyframe");var pe=this.getVideoStartPts(y.samples);y.samples=y.samples.slice(re),y.dropped+=re,me+=(y.samples[0].pts-pe)/(y.timescale||9e4)}else re===-1&&(d.logger.warn("[mp4-remuxer]: No keyframe found out of "+ye+" video samples"),ne=!1);if(this.ISGenerated){if(Oe&&xe){var ee=this.getVideoStartPts(y.samples),te=t(x.samples[0].pts,ee)-ee,ce=te/y.inputTimeScale;fe+=Math.max(0,ce),me+=Math.max(0,-ce)}if(Oe){if(x.samplerate||(d.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(x,y,I)),K=this.remuxAudio(x,fe,this.isAudioContiguous,N,De||xe||H===l.PlaylistLevelType.AUDIO?me:void 0),xe){var q=K?K.endPTS-K.startPTS:0;y.inputTimeScale||(d.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(x,y,I)),B=this.remuxVideo(y,me,le,q)}}else xe&&(B=this.remuxVideo(y,me,le,0));B&&(B.firstKeyFrame=re,B.independent=re!==-1)}}return this.ISGenerated&&(_.samples.length&&(X=this.remuxID3(_,I)),M.samples.length&&(W=this.remuxText(M,I))),{audio:K,video:B,initSegment:U,independent:ne,text:W,id3:X}},O.generateIS=function(x,y,_){var M=x.samples,I=y.samples,N=this.typeSupported,G={},H=!Object(P.isFiniteNumber)(this._initPTS),B="audio/mp4",K,U,W;if(H&&(K=U=Infinity),x.config&&M.length&&(x.timescale=x.samplerate,x.isAAC||(N.mpeg?(B="audio/mpeg",x.codec=""):N.mp3&&(x.codec="mp3")),G.audio={id:"audio",container:B,codec:x.codec,initSegment:!x.isAAC&&N.mpeg?new Uint8Array(0):v.default.initSegment([x]),metadata:{channelCount:x.channelCount}},H&&(W=x.inputTimeScale,K=U=M[0].pts-Math.round(W*_))),y.sps&&y.pps&&I.length&&(y.timescale=y.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:y.codec,initSegment:v.default.initSegment([y]),metadata:{width:y.width,height:y.height}},H)){W=y.inputTimeScale;var X=this.getVideoStartPts(I),ne=Math.round(W*_);U=Math.min(U,t(I[0].dts,X)-ne),K=Math.min(K,X-ne)}if(Object.keys(G).length)return this.ISGenerated=!0,H&&(this._initPTS=K,this._initDTS=U),{tracks:G,initPTS:K,timescale:W}},O.remuxVideo=function(x,y,_,M){var I=x.inputTimeScale,N=x.samples,G=[],H=N.length,B=this._initPTS,K=this.nextAvcDts,U=8,W,X,ne,fe=Number.POSITIVE_INFINITY,me=Number.NEGATIVE_INFINITY,Ae=0,De=!1;if(!_||K===null){var ye=y*I,Oe=N[0].pts-t(N[0].dts,N[0].pts);K=ye-Oe}for(var xe=0;xeue.pts){var le=9e4*.2;Ae=Math.max(Math.min(Ae,ue.pts-ue.dts),-1*le)}ue.dts0?xe-1:xe].dts&&(De=!0)}De&&N.sort(function(hr,mr){var St=hr.dts-mr.dts,Yr=hr.pts-mr.pts;return St||Yr}),X=N[0].dts,ne=N[N.length-1].dts;var re=Math.round((ne-X)/(H-1));if(Ae<0){if(Aere,Q=ce<-1;if(q||Q){q?d.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(ce,!0)+" ms ("+ce+"dts) hole between fragments detected, filling it"):d.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-ce,!0)+" ms ("+ce+"dts) overlapping between fragments detected"),X=K;var V=N[0].pts-ce;N[0].dts=X,N[0].pts=V,d.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(V,!0)+"/"+Object(n.toMsFromMpegTsClock)(X,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(ce,!0)+" ms")}}r&&(X=Math.max(0,X));for(var Z=0,be=0,ge=0;ge0?Re-1:Re].dts;if(Se.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ne=Math.floor(Se.maxBufferHole*I),et=(M?fe+M*I:this.nextAudioPts)-tt.pts;et>Ne?(W=et-ke,W<0&&(W=ke),d.logger.log("[mp4-remuxer]: It is approximately "+et/90+" ms to the next segment; using duration "+W/90+" ms for the last video frame.")):W=ke}else W=ke}var $e=Math.round(tt.pts-tt.dts);G.push(new E(tt.key,W,Qe,$e))}if(G.length&&m&&m<70){var bt=G[0].flags;bt.dependsOn=2,bt.isNonSync=0}console.assert(W!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=K=ne+W,this.isVideoContiguous=!0;var gt=v.default.moof(x.sequenceNumber++,X,c({},x,{samples:G})),Ut="video",Nt={data1:gt,data2:ht,startPTS:fe/I,endPTS:(me+W)/I,startDTS:X/I,endDTS:K/I,type:Ut,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(ht.length,"MDAT length must not be zero"),Nt},O.remuxAudio=function(x,y,_,M,I){var N=x.inputTimeScale,G=x.samplerate?x.samplerate:N,H=N/G,B=x.isAAC?o:h,K=B*H,U=this._initPTS,W=!x.isAAC&&this.typeSupported.mpeg,X=[],ne=x.samples,fe=W?0:8,me=this.nextAudioPts||-1,Ae=y*N;if(this.isAudioContiguous=_=_||ne.length&&me>0&&(M&&Math.abs(Ae-me)<9e3||Math.abs(t(ne[0].pts-U,Ae)-me)<20*K),ne.forEach(function(Ie){Ie.pts=t(Ie.pts-U,Ae)}),!_||me<0){if(ne=ne.filter(function(Ie){return Ie.pts>=0}),!ne.length)return;I===0?me=0:M?me=Math.max(0,Ae):me=ne[0].pts}if(x.isAAC)for(var De=I!==void 0,ye=this.config.maxAudioFramesDrift,Oe=0,xe=me;Oe=ye*K&&pe0){be+=fe;try{Z=new Uint8Array(be)}catch(Ie){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:be,reason:"fail allocating audio mdat "+be});return}if(!W){var ht=new DataView(Z.buffer);ht.setUint32(0,be),Z.set(v.default.types.mdat,4)}}else return;Z.set(nt,fe);var He=nt.byteLength;fe+=He,X.push(new E(!0,B,He,0)),V=at}var Re=X.length;if(!Re)return;var tt=X[X.length-1];this.nextAudioPts=me=V+H*tt.duration;var ft=W?new Uint8Array(0):v.default.moof(x.sequenceNumber++,Q/H,c({},x,{samples:X}));x.samples=[];var Qe=Q/N,lt=me/N,Ue="audio",Le={data1:ft,data2:Z,startPTS:Qe,endPTS:lt,startDTS:Qe,endDTS:lt,type:Ue,hasAudio:!0,hasVideo:!1,nb:Re};return this.isAudioContiguous=!0,console.assert(Z.length,"MDAT length must not be zero"),Le},O.remuxEmptyAudio=function(x,y,_,M){var I=x.inputTimeScale,N=x.samplerate?x.samplerate:I,G=I/N,H=this.nextAudioPts,B=(H!==null?H:M.startDTS*I)+this._initDTS,K=M.endDTS*I+this._initDTS,U=G*o,W=Math.ceil((K-B)/U),X=p.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(d.logger.warn("[mp4-remuxer]: remux empty Audio"),!X){d.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ne=[],fe=0;fe4294967296;)k+=C;return k}function w(k){for(var O=0;O0?this.lastEndDTS=x:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!k.audio,_=!!k.video,M="";y&&(M+="audio"),_&&(M+="video");var I={data1:E,startPTS:C,startDTS:C,endPTS:x,endDTS:x,type:M,hasAudio:y,hasVideo:_,nb:1,dropped:0};return w.audio=I.type==="audio"?I:void 0,w.video=I.type!=="audio"?I:void 0,w.text=s,w.id3=m,w.initSegment=f,w},n}(),d=function(c,u,o){return Object(p.getStartDTS)(c,u)-o};function l(n,c){var u=n==null?void 0:n.codec;return u&&u.length>4?u:u==="hvc1"?"hvc1.1.c.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||c===v.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}g.default=b},"./src/task-loop.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return P});var P=function(){function p(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var v=p.prototype;return v.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},v.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},v.onHandlerDestroyed=function(){},v.hasInterval=function(){return!!this._tickInterval},v.hasNextTick=function(){return!!this._tickTimer},v.setInterval=function(b){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,b),!0)},v.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},v.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},v.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},v.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},v.doTick=function(){},p}()},"./src/types/cmcd.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"CMCDVersion",function(){return P}),T.d(g,"CMCDObjectType",function(){return p}),T.d(g,"CMCDStreamingFormat",function(){return v}),T.d(g,"CMCDStreamType",function(){return S});var P=1,p;(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"})(p||(p={}));var v;(function(b){b.DASH="d",b.HLS="h",b.SMOOTH="s",b.OTHER="o"})(v||(v={}));var S;(function(b){b.VOD="v",b.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"HlsSkip",function(){return v}),T.d(g,"getSkipValue",function(){return S}),T.d(g,"HlsUrlParameters",function(){return b}),T.d(g,"Level",function(){return d});function P(l,n){for(var c=0;cNumber.MAX_SAFE_INTEGER?Infinity:n},b.hexadecimalInteger=function(l){if(this[l]){var n=(this[l]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var c=new Uint8Array(n.length/2),u=0;uNumber.MAX_SAFE_INTEGER?Infinity:n},b.decimalFloatingPoint=function(l){return parseFloat(this[l])},b.optionalFloat=function(l,n){var c=this[l];return c?parseFloat(c):n},b.enumeratedString=function(l){return this[l]},b.bool=function(l){return this[l]==="YES"},b.decimalResolution=function(l){var n=P.exec(this[l]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},S.parseAttrList=function(l){var n,c={},u='"';for(p.lastIndex=0;(n=p.exec(l))!==null;){var o=n[2];o.indexOf(u)===0&&o.lastIndexOf(u)===o.length-1&&(o=o.slice(1,-1)),c[n[1]]=o}return c},S}()},"./src/utils/binary-search.ts":function(L,g,T){"use strict";T.r(g);var P={search:function(v,S){for(var b=0,d=v.length-1,l=null,n=null;b<=d;){l=(b+d)/2|0,n=v[l];var c=S(n);if(c>0)b=l+1;else if(c<0)d=l-1;else return n}return null}};g.default=P},"./src/utils/buffer-helper.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"BufferHelper",function(){return v});var P=T("./src/utils/logger.ts"),p={length:0,start:function(){return 0},end:function(){return 0}},v=function(){function S(){}return S.isBuffered=function(d,l){try{if(d){for(var n=S.getBuffered(d),c=0;c=n.start(c)&&l<=n.end(c))return!0}}catch(u){}return!1},S.bufferInfo=function(d,l,n){try{if(d){var c=S.getBuffered(d),u=[],o;for(o=0;oh&&(c[o-1].end=d[u].end):c.push(d[u])}else c.push(d[u])}else c=d;for(var m=0,s,r=l,a=l,t=0;t=w&&l=_&&P.logger.log(this.time+" ["+_+"] "+M)},C}(),m=function(x){for(var y=[],_=0;_b&&(this.logger.log(o.DEBUG,"Too large cursor position "+this.pos),this.pos=b)},x.moveCursor=function(_){var M=this.pos+_;if(_>1)for(var I=this.pos+1;I=144&&this.backSpace();var M=v(_);if(this.pos>=b){this.logger.log(o.ERROR,"Cannot insert "+_.toString(16)+" ("+M+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(M,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(_){var M;for(M=_;M0&&(_?I="["+M.join(" | ")+"]":I=M.join(` `)),I},x.getTextAndFormat=function(){return this.rows},C}(),w=function(){function C(y,_,M){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=y,this.outputFilter=_,this.mode=null,this.verbose=0,this.displayedMemory=new t(M),this.nonDisplayedMemory=new t(M),this.lastOutputScreen=new t(M),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=M}var x=C.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(_){this.outputFilter=_},x.setPAC=function(_){this.writeScreen.setPAC(_)},x.setBkgData=function(_){this.writeScreen.setBkgData(_)},x.setMode=function(_){if(_===this.mode)return;this.mode=_,this.logger.log(o.INFO,"MODE="+_),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=_},x.insertChars=function(_){for(var M=0;M<_.length;M++)this.writeScreen.insertChar(_[M]);var I=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(o.INFO,I+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(o.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},x.ccRCL=function(){this.logger.log(o.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(o.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},x.ccAOF=function(){},x.ccAON=function(){},x.ccDER=function(){this.logger.log(o.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(_){this.logger.log(o.INFO,"RU("+_+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(_)},x.ccFON=function(){this.logger.log(o.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(o.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(o.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(o.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(o.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(o.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(o.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.ccEOC=function(){if(this.logger.log(o.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var _=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=_,this.writeScreen=this.nonDisplayedMemory,this.logger.log(o.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},x.ccTO=function(_){this.logger.log(o.INFO,"TO("+_+") - Tab Offset"),this.writeScreen.moveCursor(_)},x.ccMIDROW=function(_){var M={flash:!1};if(M.underline=_%2===1,M.italics=_>=46,M.italics)M.foreground="white";else{var I=Math.floor(_/2)-16,N=["white","green","blue","cyan","red","yellow","magenta"];M.foreground=N[I]}this.logger.log(o.INFO,"MIDROW: "+JSON.stringify(M)),this.writeScreen.setPen(M)},x.outputDataUpdate=function(_){_===void 0&&(_=!1);var M=this.logger.time;if(M===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=M:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,M,this.lastOutputScreen),_&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:M),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(_){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,_,this.displayedMemory),this.cueStartTime=_))},C}(),E=function(){function C(y,_,M){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var I=new h;this.channels=[null,new w(y,_,I),new w(y+1,M,I)],this.cmdHistory=O(),this.logger=I}var x=C.prototype;return x.getHandler=function(_){return this.channels[_].getHandler()},x.setHandler=function(_,M){this.channels[_].setHandler(M)},x.addData=function(_,M){var I,N,G,H=!1;this.logger.time=_;for(var B=0;B ("+m([N,G])+")"),I=this.parseCmd(N,G),I||(I=this.parseMidrow(N,G)),I||(I=this.parsePAC(N,G)),I||(I=this.parseBackgroundAttributes(N,G)),!I&&(H=this.parseChars(N,G),H)){var K=this.currentChannel;if(K&&K>0){var U=this.channels[K];U.insertChars(H)}else this.logger.log(o.WARNING,"No channel found yet. TEXT-MODE?")}!I&&!H&&this.logger.log(o.WARNING,"Couldn't parse cleaned data "+m([N,G])+" orig: "+m([M[B],M[B+1]]))}},x.parseCmd=function(_,M){var I=this.cmdHistory,N=(_===20||_===28||_===21||_===29)&&M>=32&&M<=47,G=(_===23||_===31)&&M>=33&&M<=35;if(!(N||G))return!1;if(k(_,M,I))return f(null,null,I),this.logger.log(o.DEBUG,"Repeated command ("+m([_,M])+") is dropped"),!0;var H=_===20||_===21||_===23?1:2,B=this.channels[H];return _===20||_===21||_===28||_===29?M===32?B.ccRCL():M===33?B.ccBS():M===34?B.ccAOF():M===35?B.ccAON():M===36?B.ccDER():M===37?B.ccRU(2):M===38?B.ccRU(3):M===39?B.ccRU(4):M===40?B.ccFON():M===41?B.ccRDC():M===42?B.ccTR():M===43?B.ccRTD():M===44?B.ccEDM():M===45?B.ccCR():M===46?B.ccENM():M===47&&B.ccEOC():B.ccTO(M-32),f(_,M,I),this.currentChannel=H,!0},x.parseMidrow=function(_,M){var I=0;if((_===17||_===25)&&M>=32&&M<=47){if(_===17?I=1:I=2,I!==this.currentChannel)return this.logger.log(o.ERROR,"Mismatch channel in midrow parsing"),!1;var N=this.channels[I];return N?(N.ccMIDROW(M),this.logger.log(o.DEBUG,"MIDROW ("+m([_,M])+")"),!0):!1}return!1},x.parsePAC=function(_,M){var I,N=this.cmdHistory,G=(_>=17&&_<=23||_>=25&&_<=31)&&M>=64&&M<=127,H=(_===16||_===24)&&M>=64&&M<=95;if(!(G||H))return!1;if(k(_,M,N))return f(null,null,N),!0;var B=_<=23?1:2;M>=64&&M<=95?I=B===1?d[_]:n[_]:I=B===1?l[_]:c[_];var K=this.channels[B];return K?(K.setPAC(this.interpretPAC(I,M)),f(_,M,N),this.currentChannel=B,!0):!1},x.interpretPAC=function(_,M){var I,N={color:null,italics:!1,indent:null,underline:!1,row:_};return M>95?I=M-96:I=M-64,N.underline=(I&1)===1,I<=13?N.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(I/2)]:I<=15?(N.italics=!0,N.color="white"):N.indent=Math.floor((I-16)/2)*4,N},x.parseChars=function(_,M){var I,N=null,G=null;if(_>=25?(I=2,G=_-8):(I=1,G=_),G>=17&&G<=19){var H;G===17?H=M+80:G===18?H=M+112:H=M+144,this.logger.log(o.INFO,"Special char '"+v(H)+"' in channel "+I),N=[H]}else _>=32&&_<=127&&(N=M===0?[_]:[_,M]);if(N){var B=m(N);this.logger.log(o.DEBUG,"Char codes = "+B.join(",")),f(_,M,this.cmdHistory)}return N},x.parseBackgroundAttributes=function(_,M){var I=(_===16||_===24)&&M>=32&&M<=47,N=(_===23||_===31)&&M>=45&&M<=47;if(!(I||N))return!1;var G,H={};_===16||_===24?(G=Math.floor((M-32)/2),H.background=u[G],M%2===1&&(H.background=H.background+"_semi")):M===45?H.background="transparent":(H.foreground="black",M===47&&(H.underline=!0));var B=_<=23?1:2,K=this.channels[B];return K.setBkgData(H),f(_,M,this.cmdHistory),!0},x.reset=function(){for(var _=0;_=16?r--:r++;var f=Object(P.fixLineBreaks)(a.trim()),k=Object(p.generateCueId)(n,c,f);(!l||!l.cues||!l.cues.getCueById(k))&&(m=new t(n,c,f),m.id=k,m.line=w+1,m.align="left",m.position=10+Math.min(80,Math.floor(r*8/32)*10),o.push(m))}return l&&o.length&&(o.sort(function(O,C){return O.line==="auto"||C.line==="auto"?0:O.line>8&&C.line>8?C.line-O.line:O.line-C.line}),o.forEach(function(O){return Object(v.addCueToTrack)(l,O)})),o}};g.default=b},"./src/utils/discontinuities.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"findFirstFragWithCC",function(){return S}),T.d(g,"shouldAlignOnDiscontinuities",function(){return b}),T.d(g,"findDiscontinuousReferenceFrag",function(){return d}),T.d(g,"adjustSlidingStart",function(){return n}),T.d(g,"alignStream",function(){return c}),T.d(g,"alignPDT",function(){return o}),T.d(g,"alignFragmentByPDTDelta",function(){return h}),T.d(g,"alignMediaPlaylistByPDT",function(){return m});var P=T("./src/polyfills/number.ts"),p=T("./src/utils/logger.ts"),v=T("./src/controller/level-helper.ts");function S(s,r){for(var a=null,t=0,w=s.length;ta.startCC||s&&s.cc=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},v}();g.default=p},"./src/utils/ewma.ts":function(L,g,T){"use strict";T.r(g);var P=function(){function p(S,b,d){b===void 0&&(b=0),d===void 0&&(d=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=S,this.alpha_=S?Math.exp(Math.log(.5)/S):0,this.estimate_=b,this.totalWeight_=d}var v=p.prototype;return v.sample=function(b,d){var l=Math.pow(this.alpha_,b);this.estimate_=d*(1-l)+l*this.estimate_,this.totalWeight_+=b},v.getTotalWeight=function(){return this.totalWeight_},v.getEstimate=function(){if(this.alpha_){var b=1-Math.pow(this.alpha_,this.totalWeight_);if(b)return this.estimate_/b}return this.estimate_},p}();g.default=P},"./src/utils/fetch-loader.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"fetchSupported",function(){return h});var P=T("./src/polyfills/number.ts"),p=T("./src/loader/load-stats.ts"),v=T("./src/demux/chunk-cache.ts");function S(t,w){t.prototype=Object.create(w.prototype),t.prototype.constructor=t,c(t,w)}function b(t){var w=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 w!="undefined"){if(w.has(f))return w.get(f);w.set(f,k)}function k(){return d(f,arguments,u(this).constructor)}return k.prototype=Object.create(f.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),c(k,f)},b(t)}function d(t,w,E){return l()?d=Reflect.construct:d=function(k,O,C){var x=[null];x.push.apply(x,O);var y=Function.bind.apply(k,x),_=new y;return C&&c(_,C.prototype),_},d.apply(null,arguments)}function l(){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,w){return c=Object.setPrototypeOf||function(f,k){return f.__proto__=k,f},c(t,w)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},u(t)}function o(){return o=Object.assign||function(t){for(var w=1;w=C&&x(k,O,y.flush(),f)):x(k,O,G,f),I()}).catch(function(){return Promise.reject()})};return M()},t}();function s(t,w){var E={method:"GET",mode:"cors",credentials:"same-origin",signal:w,headers:new self.Headers(o({},t.headers))};return t.rangeEnd&&E.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),E}function r(t,w){return new self.Request(t.url,w)}var a=function(t){S(w,t);function w(E,f,k){var O;return O=t.call(this,E)||this,O.code=void 0,O.details=void 0,O.code=f,O.details=k,O}return w}(b(Error));g.default=m},"./src/utils/imsc1-ttml-parser.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"IMSC1_CODEC",function(){return n}),T.d(g,"parseIMSC1",function(){return h});var P=T("./src/utils/mp4-tools.ts"),p=T("./src/utils/vttparser.ts"),v=T("./src/utils/vttcue.ts"),S=T("./src/demux/id3.ts"),b=T("./src/utils/timescale-conversion.ts"),d=T("./src/utils/webvtt-parser.ts");function l(){return l=Object.assign||function(C){for(var x=1;x"):P}function b(n){for(var c=arguments.length,u=new Array(c>1?c-1:0),o=1;o>24,w[E+1]=f>>16&255,w[E+2]=f>>8&255,w[E+3]=f&255}function c(w,E){var f=[];if(!E.length)return f;var k,O,C;"data"in w?(k=w.data,O=w.start,C=w.end):(k=w,O=0,C=k.byteLength);for(var x=O;x1?x+y:C;if(_===E[0])if(E.length===1)f.push({data:k,start:x+8,end:M});else{var I=c({data:k,start:x+8,end:M},E.slice(1));I.length&&S.apply(f,I)}x=M}return f}function u(w){var E=c(w,["moov"]),f=E[0],k=f?f.end:null,O=c(w,["sidx"]);if(!O||!O[0])return null;var C=[],x=O[0],y=x.data[0],_=y===0?8:16,M=l(x,_);_+=4;var I=0,N=0;y===0?_+=8:_+=16,_+=2;var G=x.end+N,H=d(x,_);_+=2;for(var B=0;B>>31;if(X===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ne=l(x,K);K+=4,C.push({referenceSize:W,subsegmentDuration:ne,info:{duration:ne/M,start:G,end:G+W-1}}),G+=W,K+=4,_=K}return{earliestPresentationTime:I,timescale:M,version:y,referencesCount:H,references:C,moovEndOffset:k}}function o(w){for(var E=[],f=c(w,["moov","trak"]),k=0;kb)&&(this.startTime=b),this.endTime=d,this.screen=l,this.timelineController.createCaptionsTrack(this.trackName)},v.reset=function(){this.cueRanges=[]},p}()},"./src/utils/texttrack-utils.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"sendAddTrackEvent",function(){return p}),T.d(g,"addCueToTrack",function(){return v}),T.d(g,"clearCurrentCues",function(){return S}),T.d(g,"removeCuesInRange",function(){return b}),T.d(g,"getCuesInRange",function(){return l});var P=T("./src/utils/logger.ts");function p(n,c){var u;try{u=new Event("addtrack")}catch(o){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=n,c.dispatchEvent(u)}function v(n,c){var u=n.mode;if(u==="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(h){P.logger.debug("[texttrack-utils]: "+h);var o=new self.TextTrackCue(c.startTime,c.endTime,c.text);o.id=c.id,n.addCue(o)}u==="disabled"&&(n.mode=u)}function S(n){var c=n.mode;if(c==="disabled"&&(n.mode="hidden"),n.cues)for(var u=n.cues.length;u--;)n.removeCue(n.cues[u]);c==="disabled"&&(n.mode=c)}function b(n,c,u){var o=n.mode;if(o==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var h=l(n.cues,c,u),m=0;mn[u].endTime)return-1;for(var o=0,h=u;o<=h;){var m=Math.floor((h+o)/2);if(cn[m].startTime&&o-1)for(var m=h,s=n.length;m=c&&r.endTime<=u)o.push(r);else if(r.startTime>u)return o}return o}},"./src/utils/time-ranges.ts":function(L,g,T){"use strict";T.r(g);var P={toString:function(v){for(var S="",b=v.length,d=0;d1?c-1:0),o=1;o100)throw new Error("Position must be between 0 and 100.");C=I,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",d({},h,{get:function(){return x},set:function(I){var N=b(I);if(!N)throw new SyntaxError("An invalid or illegal string was specified.");x=N,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",d({},h,{get:function(){return y},set:function(I){if(I<0||I>100)throw new Error("Size must be between 0 and 100.");y=I,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",d({},h,{get:function(){return _},set:function(I){var N=b(I);if(!N)throw new SyntaxError("An invalid or illegal string was specified.");_=N,this.hasBeenReset=!0}})),o.displayState=void 0}return l.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},l}()},"./src/utils/vttparser.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"parseTimeStamp",function(){return v}),T.d(g,"fixLineBreaks",function(){return c}),T.d(g,"VTTParser",function(){return u});var P=T("./src/utils/vttcue.ts"),p=function(){function o(){}var h=o.prototype;return h.decode=function(s,r){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))},o}();function v(o){function h(s,r,a,t){return(s|0)*3600+(r|0)*60+(a|0)+parseFloat(t||0)}var m=o.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return m?parseFloat(m[2])>59?h(m[2],m[3],0,m[4]):h(m[1],m[2],m[3],m[4]):null}var S=function(){function o(){this.values=Object.create(null)}var h=o.prototype;return h.set=function(s,r){!this.get(s)&&r!==""&&(this.values[s]=r)},h.get=function(s,r,a){return a?this.has(s)?this.values[s]:r[a]:this.has(s)?this.values[s]:r},h.has=function(s){return s in this.values},h.alt=function(s,r,a){for(var t=0;t=0&&a<=100)return this.set(s,a),!0}return!1},o}();function b(o,h,m,s){var r=s?o.split(s):[o];for(var a in r){if(typeof r[a]!="string")continue;var t=r[a].split(m);if(t.length!==2)continue;var w=t[0],E=t[1];h(w,E)}}var d=new P.default(0,0,""),l=d.align==="middle"?"middle":"center";function n(o,h,m){var s=o;function r(){var w=v(o);if(w===null)throw new Error("Malformed timestamp: "+s);return o=o.replace(/^[^\sa-zA-Z-]+/,""),w}function a(w,E){var f=new S;b(w,function(C,x){var y;switch(C){case"region":for(var _=m.length-1;_>=0;_--)if(m[_].id===x){f.set(C,m[_].region);break}break;case"vertical":f.alt(C,x,["rl","lr"]);break;case"line":y=x.split(","),f.integer(C,y[0]),f.percent(C,y[0])&&f.set("snapToLines",!1),f.alt(C,y[0],["auto"]),y.length===2&&f.alt("lineAlign",y[1],["start",l,"end"]);break;case"position":y=x.split(","),f.percent(C,y[0]),y.length===2&&f.alt("positionAlign",y[1],["start",l,"end","line-left","line-right","auto"]);break;case"size":f.percent(C,x);break;case"align":f.alt(C,x,["start",l,"end","left","right"]);break}},/:/,/\s/),E.region=f.get("region",null),E.vertical=f.get("vertical","");var k=f.get("line","auto");k==="auto"&&d.line===-1&&(k=-1),E.line=k,E.lineAlign=f.get("lineAlign","start"),E.snapToLines=f.get("snapToLines",!0),E.size=f.get("size",100),E.align=f.get("align",l);var O=f.get("position","auto");O==="auto"&&d.position===50&&(O=E.align==="start"||E.align==="left"?0:E.align==="end"||E.align==="right"?100:50),E.position=O}function t(){o=o.replace(/^\s+/,"")}if(t(),h.startTime=r(),t(),o.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);o=o.substr(3),t(),h.endTime=r(),t(),a(o,h)}function c(o){return o.replace(//gi,` `)}var u=function(){function o(){this.state="INITIAL",this.buffer="",this.decoder=new p,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var h=o.prototype;return h.parse=function(s){var r=this;s&&(r.buffer+=r.decoder.decode(s,{stream:!0}));function a(){var O=r.buffer,C=0;for(O=c(O);C")===-1){r.cue.id=w;continue}case"CUE":if(!r.cue){r.state="BADCUE";continue}try{n(w,r.cue,r.regionList)}catch(O){r.cue=null,r.state="BADCUE";continue}r.state="CUETEXT";continue;case"CUETEXT":{var k=w.indexOf("-->")!==-1;if(!w||k&&(f=!0)){r.oncue&&r.cue&&r.oncue(r.cue),r.cue=null,r.state="ID";continue}if(r.cue===null)continue;r.cue.text&&(r.cue.text+=` `),r.cue.text+=w}continue;case"BADCUE":w||(r.state="ID")}}}catch(O){r.state==="CUETEXT"&&r.cue&&r.oncue&&r.oncue(r.cue),r.cue=null,r.state=r.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},h.flush=function(){var s=this;try{if((s.cue||s.state==="HEADER")&&(s.buffer+=` `,s.parse()),s.state==="INITIAL"||s.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(r){s.onparsingerror&&s.onparsingerror(r)}return s.onflush&&s.onflush(),this},o}()},"./src/utils/webvtt-parser.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"generateCueId",function(){return u}),T.d(g,"parseWebVTT",function(){return h});var P=T("./src/polyfills/number.ts"),p=T("./src/utils/vttparser.ts"),v=T("./src/demux/id3.ts"),S=T("./src/utils/timescale-conversion.ts"),b=T("./src/remux/mp4-remuxer.ts"),d=/\r\n|\n\r|\n|\r/g,l=function(s,r,a){return a===void 0&&(a=0),s.substr(a,r.length)===r},n=function(s){var r=parseInt(s.substr(-3)),a=parseInt(s.substr(-6,2)),t=parseInt(s.substr(-9,2)),w=s.length>9?parseInt(s.substr(0,s.indexOf(":"))):0;if(!Object(P.isFiniteNumber)(r)||!Object(P.isFiniteNumber)(a)||!Object(P.isFiniteNumber)(t)||!Object(P.isFiniteNumber)(w))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+s);return r+=1e3*a,r+=60*1e3*t,r+=60*60*1e3*w,r},c=function(s){for(var r=5381,a=s.length;a;)r=r*33^s.charCodeAt(--a);return(r>>>0).toString()};function u(m,s,r){return c(m.toString())+c(s.toString())+c(r)}var o=function(s,r,a){var t=s[r],w=s[t.prevCC];if(!w||!w.new&&t.new){s.ccOffset=s.presentationOffset=t.start,t.new=!1;return}for(;(E=w)!==null&&E!==void 0&&E.new;){var E;s.ccOffset+=t.start-w.start,t.new=!1,t=w,w=s[t.prevCC]}s.presentationOffset=a};function h(m,s,r,a,t,w,E,f){var k=new p.VTTParser,O=Object(v.utf8ArrayToStr)(new Uint8Array(m)).trim().replace(d,` `).split(` `),C=[],x=Object(S.toMpegTsClockFromTimescale)(s,r),y="00:00.000",_=0,M=0,I,N=!0,G=!1;k.oncue=function(H){var B=a[t],K=a.ccOffset,U=(_-x)/9e4;if(B!=null&&B.new&&(M!==void 0?K=a.ccOffset=B.start:o(a,t,U)),U&&(K=U-a.presentationOffset),G){var W=H.endTime-H.startTime,X=Object(b.normalizePts)((H.startTime+K-M)*9e4,w*9e4)/9e4;H.startTime=X,H.endTime=X+W}var ne=H.text.trim();H.text=decodeURIComponent(encodeURIComponent(ne)),H.id||(H.id=u(H.startTime,H.endTime,ne)),H.endTime>0&&C.push(H)},k.onparsingerror=function(H){I=H},k.onflush=function(){if(I){f(I);return}E(C)},O.forEach(function(H){if(N)if(l(H,"X-TIMESTAMP-MAP=")){N=!1,G=!0,H.substr(16).split(",").forEach(function(B){l(B,"LOCAL:")?y=B.substr(6):l(B,"MPEGTS:")&&(_=parseInt(B.substr(7)))});try{M=n(y)/1e3}catch(B){G=!1,I=B}return}else H===""&&(N=!1);k.parse(H+` `)}),k.flush()}},"./src/utils/xhr-loader.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/utils/logger.ts"),p=T("./src/loader/load-stats.ts"),v=/^age:\s*[\d.]+\s*$/m,S=function(){function b(l){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=l?l.xhrSetup:null,this.stats=new p.LoadStats,this.retryDelay=0}var d=b.prototype;return d.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},d.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()))},d.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},d.load=function(n,c,u){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=u,this.retryDelay=c.retryDelay,this.loadInternal()},d.loadInternal=function(){var n=this.config,c=this.context;if(!n)return;var u=this.loader=new self.XMLHttpRequest,o=this.stats;o.loading.first=0,o.loaded=0;var h=this.xhrSetup;try{if(h)try{h(u,c.url)}catch(r){u.open("GET",c.url,!0),h(u,c.url)}u.readyState||u.open("GET",c.url,!0);var m=this.context.headers;if(m)for(var s in m)u.setRequestHeader(s,m[s])}catch(r){this.callbacks.onError({code:u.status,text:r.message},c,u);return}c.rangeEnd&&u.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),u.onreadystatechange=this.readystatechange.bind(this),u.onprogress=this.loadprogress.bind(this),u.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),u.send()},d.readystatechange=function(){var n=this.context,c=this.loader,u=this.stats;if(!n||!c)return;var o=c.readyState,h=this.config;if(u.aborted)return;if(o>=2)if(self.clearTimeout(this.requestTimeout),u.loading.first===0&&(u.loading.first=Math.max(self.performance.now(),u.loading.start)),o===4){c.onreadystatechange=null,c.onprogress=null;var m=c.status;if(m>=200&&m<300){u.loading.end=Math.max(self.performance.now(),u.loading.first);var s,r;if(n.responseType==="arraybuffer"?(s=c.response,r=s.byteLength):(s=c.responseText,r=s.length),u.loaded=u.total=r,!this.callbacks)return;var a=this.callbacks.onProgress;if(a&&a(u,n,s,c),!this.callbacks)return;var t={url:c.responseURL,data:s};this.callbacks.onSuccess(t,u,n,c)}else u.retry>=h.maxRetry||m>=400&&m<499?(P.logger.error(m+" while loading "+n.url),this.callbacks.onError({code:m,text:c.statusText},n,c)):(P.logger.warn(m+" 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,h.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout)},d.loadtimeout=function(){P.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},d.loadprogress=function(n){var c=this.stats;c.loaded=n.loaded,n.lengthComputable&&(c.total=n.total)},d.getCacheAge=function(){var n=null;if(this.loader&&v.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");n=c?parseFloat(c):null}return n},b}();g.default=S}}).default})},vHTk:function(j,Y,D){j.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.StreamCipher,p=g.algo,v=p.RC4=P.extend({_doReset:function(){for(var d=this._key,l=d.words,n=d.sigBytes,c=this._S=[],u=0;u<256;u++)c[u]=u;for(var u=0,o=0;u<256;u++){var h=u%n,m=l[h>>>2]>>>24-h%4*8&255;o=(o+c[u]+m)%256;var s=c[u];c[u]=c[o],c[o]=s}this._i=this._j=0},_doProcessBlock:function(d,l){d[l]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var d=this._S,l=this._i,n=this._j,c=0,u=0;u<4;u++){l=(l+1)%256,n=(n+d[l])%256;var o=d[l];d[l]=d[n],d[n]=o,c|=d[(d[l]+d[n])%256]<<24-u*8}return this._i=l,this._j=n,c}g.RC4=P._createHelper(v);var b=p.RC4Drop=v.extend({cfg:v.cfg.extend({drop:192}),_doReset:function(){v._doReset.call(this);for(var d=this.cfg.drop;d>0;d--)S.call(this)}});g.RC4Drop=P._createHelper(b)}(),L.RC4})},wCXF:function(j,Y,D){"use strict";D.d(Y,"a",function(){return nt});var L=D("rePB"),g=D("VTBJ"),T=D("KQm4"),P=D("U8pU"),p=D("ODXe"),v=D("q1tI"),S=D("TSYQ"),b=D.n(S),d=D("Gytx"),l=D.n(d),n=D("Kwbf"),c=D("t23M"),u=D("qx4F"),o=D("6eGT"),h=D("IBYe"),m=D("Ff2n"),s=D("c+Xe"),r=D("fyJ8"),a=D("biw7");function t(He,Re,tt,ft,Qe){var lt=tt[He]||{},Ue=tt[Re]||{},Le,Ie;lt.fixed==="left"?Le=ft.left[He]:Ue.fixed==="right"&&(Ie=ft.right[Re]);var Ce=!1,Se=!1,ke=!1,Ne=!1,et=tt[Re+1],$e=tt[He-1];if(Qe==="rtl"){if(Le!==void 0){var bt=$e&&$e.fixed==="left";Ne=!bt}else if(Ie!==void 0){var gt=et&&et.fixed==="right";ke=!gt}}else if(Le!==void 0){var Ut=et&&et.fixed==="left";Ce=!Ut}else if(Ie!==void 0){var Nt=$e&&$e.fixed==="right";Se=!Nt}return{fixLeft:Le,fixRight:Ie,lastFixLeft:Ce,firstFixRight:Se,lastFixRight:ke,firstFixLeft:Ne,isSticky:ft.isSticky}}var w=D("sR1s");function E(He){var Re=He.cells,tt=He.stickyOffsets,ft=He.flattenColumns,Qe=He.rowComponent,lt=He.cellComponent,Ue=He.onHeaderRow,Le=He.index,Ie=v.useContext(a.a),Ce=Ie.prefixCls,Se=Ie.direction,ke;Ue&&(ke=Ue(Re.map(function(et){return et.column}),Le));var Ne=Object(w.a)(Re.map(function(et){return et.column}));return v.createElement(Qe,Object.assign({},ke),Re.map(function(et,$e){var bt=et.column,gt=t(et.colStart,et.colEnd,ft,tt,Se),Ut;return bt&&bt.onHeaderCell&&(Ut=et.column.onHeaderCell(bt)),v.createElement(r.a,Object.assign({},et,{ellipsis:bt.ellipsis,align:bt.align,component:lt,prefixCls:Ce,key:Ne[$e]},gt,{additionalProps:Ut,rowType:"header"}))}))}E.displayName="HeaderRow";var f=E;function k(He){var Re=[];function tt(Ue,Le){var Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Re[Ie]=Re[Ie]||[];var Ce=Le,Se=Ue.filter(Boolean).map(function(ke){var Ne={key:ke.key,className:ke.className||"",children:ke.title,column:ke,colStart:Ce},et=1,$e=ke.children;return $e&&$e.length>0&&(et=tt($e,Ce,Ie+1).reduce(function(bt,gt){return bt+gt},0),Ne.hasSubColumns=!0),"colSpan"in ke&&(et=ke.colSpan),"rowSpan"in ke&&(Ne.rowSpan=ke.rowSpan),Ne.colSpan=et,Ne.colEnd=Ne.colStart+et-1,Re[Ie].push(Ne),Ce+=et,et});return Se}tt(He,0);for(var ft=Re.length,Qe=function(Le){Re[Le].forEach(function(Ie){!("rowSpan"in Ie)&&!Ie.hasSubColumns&&(Ie.rowSpan=ft-Le)})},lt=0;lt=0;Le-=1){var Ie=Re[Le],Ce=tt&&tt[Le],Se=Ce&&Ce[x.a];(Ie||Se||Ue)&&(Qe.unshift(v.createElement("col",Object.assign({key:Le,style:{width:Ie,minWidth:Ie}},Se))),Ue=!0)}return v.createElement("colgroup",null,Qe)}var _=y;function M(He,Re){return Object(v.useMemo)(function(){for(var tt=[],ft=0;ft1?ie-1:0),se=1;se=ke&&(Xr=ke-Ne),Ue({scrollLeft:Xr/ke*(Se+2)}),Nt.current.x=Kt.pageX},Ar=function(){var Kt=Object(Z.b)(lt.current).top,or=Kt+lt.current.offsetHeight,Xt=document.documentElement.scrollTop+window.innerHeight;or-Object(u.a)()<=Xt||Kt>=Xt-Le?Ut(function(gr){return Object(g.a)(Object(g.a)({},gr),{},{isHiddenScrollBar:!0})}):Ut(function(gr){return Object(g.a)(Object(g.a)({},gr),{},{isHiddenScrollBar:!1})})},vn=function(Kt){Ut(function(or){return Object(g.a)(Object(g.a)({},or),{},{scrollLeft:Kt/Se*ke||0})})};return v.useImperativeHandle(tt,function(){return{setScrollLeft:vn}}),v.useEffect(function(){var mn=Object(V.a)(document.body,"mouseup",Jr,!1),Kt=Object(V.a)(document.body,"mousemove",un,!1);return Ar(),function(){mn.remove(),Kt.remove()}},[Ne,St]),v.useEffect(function(){var mn=Object(V.a)(window,"scroll",Ar,!1),Kt=Object(V.a)(window,"resize",Ar,!1);return function(){mn.remove(),Kt.remove()}},[]),v.useEffect(function(){gt.isHiddenScrollBar||Ut(function(mn){var Kt,or;return Object(g.a)(Object(g.a)({},mn),{},{scrollLeft:lt.current.scrollLeft/((Kt=lt.current)===null||Kt===void 0?void 0:Kt.scrollWidth)*((or=lt.current)===null||or===void 0?void 0:or.clientWidth)})})},[gt.isHiddenScrollBar]),Se<=ke||!Ne||gt.isHiddenScrollBar?null:v.createElement("div",{style:{height:Object(u.a)(),width:ke,bottom:Le},className:"".concat(Ce,"-sticky-scroll")},v.createElement("div",{onMouseDown:Hr,ref:et,className:b()("".concat(Ce,"-sticky-scroll-bar"),Object(L.a)({},"".concat(Ce,"-sticky-scroll-bar-active"),St)),style:{width:"".concat(Ne,"px"),transform:"translate3d(".concat(gt.scrollLeft,"px, 0, 0)")}}))},ge=v.forwardRef(be);function Te(He,Re){return v.useMemo(function(){var tt=!!He;return{isSticky:tt,stickyClassName:tt?"".concat(Re,"-sticky-header"):"",offsetHeader:Object(P.a)(He)==="object"&&He.offsetHeader||0,offsetScroll:Object(P.a)(He)==="object"&&He.offsetScroll||0}},[He,Re])}var Je=[],rt={},nt="rc-table-internal-hook",at=v.memo(function(He){var Re=He.children;return Re},function(He,Re){return l()(He.props,Re.props)?He.pingLeft!==Re.pingLeft||He.pingRight!==Re.pingRight:!1});function ct(He){var Re,tt=He.prefixCls,ft=He.className,Qe=He.rowClassName,lt=He.style,Ue=He.data,Le=He.rowKey,Ie=He.scroll,Ce=He.tableLayout,Se=He.direction,ke=He.title,Ne=He.footer,et=He.summary,$e=He.id,bt=He.showHeader,gt=He.components,Ut=He.emptyText,Nt=He.onRow,hr=He.onHeaderRow,mr=He.internalHooks,St=He.transformColumns,Yr=He.internalRefs,Jr=He.sticky,Hr=Ue||Je,un=!!Hr.length,Ar=v.useState(0),vn=Object(p.a)(Ar,2),mn=vn[0],Kt=vn[1];v.useEffect(function(){Kt(Object(u.a)())});var or=v.useMemo(function(){return Object(w.c)(gt,{})},[gt]),Xt=v.useCallback(function(Pr,Ft){return Object(w.b)(or,Pr)||Ft},[or]),gr=v.useMemo(function(){return typeof Le=="function"?Le:function(Pr){var Ft=Pr&&Pr[Le];return Ft}},[Le]),Xr=Object(x.c)(He),kn=Xr.expandIcon,Ln=Xr.expandedRowKeys,tn=Xr.defaultExpandedRowKeys,ur=Xr.defaultExpandAllRows,Xn=Xr.expandedRowRender,hi=Xr.onExpand,$n=Xr.onExpandedRowsChange,Zr=Xr.expandRowByClick,Bn=Xr.rowExpandable,si=Xr.expandIconColumnIndex,li=Xr.expandedRowClassName,wt=Xr.childrenColumnName,$t=Xr.indentSize,en=kn||q,Cn=wt||"children",_n=v.useMemo(function(){return Xn?"row":He.expandable&&mr===nt&&He.expandable.__PARENT_RENDER_ICON__||Hr.some(function(Pr){return Pr&&Object(P.a)(Pr)==="object"&&Pr[Cn]})?"nest":!1},[!!Xn,Hr]),On=v.useState(function(){return tn||(ur?Q(Hr,gr,Cn):[])}),ae=Object(p.a)(On,2),z=ae[0],$=ae[1],ie=v.useMemo(function(){return new Set(Ln||z||[])},[Ln,z]),de=v.useCallback(function(Pr){var Ft=gr(Pr,Hr.indexOf(Pr)),Zt,wr=ie.has(Ft);wr?(ie.delete(Ft),Zt=Object(T.a)(ie)):Zt=[].concat(Object(T.a)(ie),[Ft]),$(Zt),hi&&hi(!wr,Pr),$n&&$n(Zt)},[gr,ie,Hr,hi,$n]),se=v.useState(0),Ke=Object(p.a)(se,2),Rt=Ke[0],Vt=Ke[1],Er=Object(ye.b)(Object(g.a)(Object(g.a)(Object(g.a)({},He),Xr),{},{expandable:!!Xn,expandedKeys:ie,getRowKey:gr,onTriggerExpand:de,expandIcon:en,expandIconColumnIndex:si,direction:Se}),mr===nt?St:null),Lt=Object(p.a)(Er,2),zr=Lt[0],Br=Lt[1],En=v.useMemo(function(){return{columns:zr,flattenColumns:Br}},[zr,Br]),ui=v.useRef(),Ei=v.useRef(),In=v.useRef(),Li=v.useState(!1),qi=Object(p.a)(Li,2),ni=qi[0],Ti=qi[1],xi=v.useState(!1),Fi=Object(p.a)(xi,2),Ci=Fi[0],Gi=Fi[1],Mi=ue(new Map),oa=Object(p.a)(Mi,2),sa=oa[0],Ii=oa[1],qn=Object(w.a)(Br),Vi=qn.map(function(Pr){return sa.get(Pr)}),ta=v.useMemo(function(){return Vi},[Vi.join("_")]),Tt=pe(ta,Br.length,Se),it=Ie&&Object(w.d)(Ie.y),mt=Ie&&Object(w.d)(Ie.x),Ct=mt&&Br.some(function(Pr){var Ft=Pr.fixed;return Ft}),It=v.useRef(),Pt=Te(Jr,tt),Ht=Pt.isSticky,Wt=Pt.offsetHeader,dt=Pt.offsetScroll,At=Pt.stickyClassName,Dt,yr,tr;it&&(yr={overflowY:"scroll",maxHeight:Ie.y}),mt&&(Dt={overflowX:"auto"},it||(yr={overflowY:"hidden"}),tr={width:Ie.x===!0?"auto":Ie.x,minWidth:"100%"});var qt=v.useCallback(function(Pr,Ft){Ii(function(Zt){var wr=new Map(Zt);return wr.set(Pr,Ft),wr})},[]),Gt=le(null),nr=Object(p.a)(Gt,2),cr=nr[0],st=nr[1];function Lr(Pr,Ft){if(!Ft)return;typeof Ft=="function"?Ft(Pr):Ft.scrollLeft!==Pr&&(Ft.scrollLeft=Pr)}var Fr=function(Ft){var Zt=Ft.currentTarget,wr=Ft.scrollLeft,er=typeof wr=="number"?wr:Zt.scrollLeft,vt=Zt||rt;if(!st()||st()===vt){var yt;cr(vt),Lr(er,Ei.current),Lr(er,In.current),Lr(er,(yt=It.current)===null||yt===void 0?void 0:yt.setScrollLeft)}if(Zt){var zt=Zt.scrollWidth,Mt=Zt.clientWidth;Ti(er>0),Gi(er0?[].concat(Object(g.a)(m),Object(g.a)(n(t).map(function(w){return Object(T.a)({fixed:a},w)}))):[].concat(Object(g.a)(m),[Object(T.a)(Object(T.a)({},s),{},{fixed:a})])},[])}function c(h){for(var m=!0,s=0;s=0;t-=1){var w=h[t];if(a&&w.fixed!=="right")a=!1;else if(!a&&w.fixed==="right"){Object(S.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function u(h){return h.map(function(m){var s=m.fixed,r=Object(P.a)(m,["fixed"]),a=s;return s==="left"?a="right":s==="right"&&(a="left"),Object(T.a)({fixed:a},r)})}function o(h,m){var s=h.prefixCls,r=h.columns,a=h.children,t=h.expandable,w=h.expandedKeys,E=h.getRowKey,f=h.onTriggerExpand,k=h.expandIcon,O=h.rowExpandable,C=h.expandIconColumnIndex,x=h.direction,y=h.expandRowByClick,_=p.useMemo(function(){return r||l(a)},[r,a]),M=p.useMemo(function(){if(t){var G,H=C||0,B=_[H],K=(G={},Object(L.a)(G,d.a,{className:"".concat(s,"-expand-icon-col")}),Object(L.a)(G,"title",""),Object(L.a)(G,"fixed",B?B.fixed:null),Object(L.a)(G,"className","".concat(s,"-row-expand-icon-cell")),Object(L.a)(G,"render",function(X,ne,fe){var me=E(ne,fe),Ae=w.has(me),De=O?O(ne):!0,ye=k({prefixCls:s,expanded:Ae,expandable:De,record:ne,onExpand:f});return y?p.createElement("span",{onClick:function(xe){return xe.stopPropagation()}},ye):ye}),G),U=_.slice();return H>=0&&U.splice(H,0,K),U}return _},[t,_,E,w,k,x]),I=p.useMemo(function(){var G=M;return m&&(G=m(G)),G.length||(G=[{render:function(){return null}}]),G},[m,M,x]),N=p.useMemo(function(){return x==="rtl"?u(n(I)):n(I)},[I,x]);return[I,N]}Y.b=o},wZgz:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.BlockCipher,p=g.algo,v=[],S=[],b=[],d=[],l=[],n=[],c=[],u=[],o=[],h=[];(function(){for(var r=[],a=0;a<256;a++)a<128?r[a]=a<<1:r[a]=a<<1^283;for(var t=0,w=0,a=0;a<256;a++){var E=w^w<<1^w<<2^w<<3^w<<4;E=E>>>8^E&255^99,v[t]=E,S[E]=t;var f=r[t],k=r[f],O=r[k],C=r[E]*257^E*16843008;b[t]=C<<24|C>>>8,d[t]=C<<16|C>>>16,l[t]=C<<8|C>>>24,n[t]=C;var C=O*16843009^k*65537^f*257^t*16843008;c[E]=C<<24|C>>>8,u[E]=C<<16|C>>>16,o[E]=C<<8|C>>>24,h[E]=C,t?(t=f^r[r[r[O^f]]],w^=r[r[w]]):t=w=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],s=p.AES=P.extend({_doReset:function(){var r;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var a=this._keyPriorReset=this._key,t=a.words,w=a.sigBytes/4,E=this._nRounds=w+6,f=(E+1)*4,k=this._keySchedule=[],O=0;O6&&O%w==4&&(r=v[r>>>24]<<24|v[r>>>16&255]<<16|v[r>>>8&255]<<8|v[r&255]):(r=r<<8|r>>>24,r=v[r>>>24]<<24|v[r>>>16&255]<<16|v[r>>>8&255]<<8|v[r&255],r^=m[O/w|0]<<24),k[O]=k[O-w]^r);for(var C=this._invKeySchedule=[],x=0;x>>24]]^u[v[r>>>16&255]]^o[v[r>>>8&255]]^h[v[r&255]]}},encryptBlock:function(r,a){this._doCryptBlock(r,a,this._keySchedule,b,d,l,n,v)},decryptBlock:function(r,a){var t=r[a+1];r[a+1]=r[a+3],r[a+3]=t,this._doCryptBlock(r,a,this._invKeySchedule,c,u,o,h,S);var t=r[a+1];r[a+1]=r[a+3],r[a+3]=t},_doCryptBlock:function(r,a,t,w,E,f,k,O){for(var C=this._nRounds,x=r[a]^t[0],y=r[a+1]^t[1],_=r[a+2]^t[2],M=r[a+3]^t[3],I=4,N=1;N>>24]^E[y>>>16&255]^f[_>>>8&255]^k[M&255]^t[I++],H=w[y>>>24]^E[_>>>16&255]^f[M>>>8&255]^k[x&255]^t[I++],B=w[_>>>24]^E[M>>>16&255]^f[x>>>8&255]^k[y&255]^t[I++],K=w[M>>>24]^E[x>>>16&255]^f[y>>>8&255]^k[_&255]^t[I++];x=G,y=H,_=B,M=K}var G=(O[x>>>24]<<24|O[y>>>16&255]<<16|O[_>>>8&255]<<8|O[M&255])^t[I++],H=(O[y>>>24]<<24|O[_>>>16&255]<<16|O[M>>>8&255]<<8|O[x&255])^t[I++],B=(O[_>>>24]<<24|O[M>>>16&255]<<16|O[x>>>8&255]<<8|O[y&255])^t[I++],K=(O[M>>>24]<<24|O[x>>>16&255]<<16|O[y>>>8&255]<<8|O[_&255])^t[I++];r[a]=G,r[a+1]=H,r[a+2]=B,r[a+3]=K},keySize:256/32});g.AES=P._createHelper(s)}(),L.AES})},wbyO:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=g.enc,v=p.Base64url={stringify:function(b,d=!0){var l=b.words,n=b.sigBytes,c=d?this._safe_map:this._map;b.clamp();for(var u=[],o=0;o>>2]>>>24-o%4*8&255,m=l[o+1>>>2]>>>24-(o+1)%4*8&255,s=l[o+2>>>2]>>>24-(o+2)%4*8&255,r=h<<16|m<<8|s,a=0;a<4&&o+a*.75>>6*(3-a)&63));var t=c.charAt(64);if(t)for(;u.length%4;)u.push(t);return u.join("")},parse:function(b,d=!0){var l=b.length,n=d?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var u=0;u>>6-u%4*2,m=o|h;n[c>>>2]|=m<<24-c%4*8,c++}return P.create(n,c)}}(),L.enc.Base64url})},"y0+3":function(j,Y,D){"use strict";D.d(Y,"a",function(){return n}),D.d(Y,"b",function(){return u});var L=/margin|padding|width|height|max|min|offset/,g={left:!0,top:!0},T={cssFloat:1,styleFloat:1,float:1};function P(o){return o.nodeType===1?o.ownerDocument.defaultView.getComputedStyle(o,null):{}}function p(o,h,m){if(h=h.toLowerCase(),m==="auto"){if(h==="height")return o.offsetHeight;if(h==="width")return o.offsetWidth}return h in g||(g[h]=L.test(h)),g[h]?parseFloat(m)||0:m}function v(o,h){var m=arguments.length,s=P(o);return h=T[h]?"cssFloat"in o.style?"cssFloat":"styleFloat":h,m===1?s:p(o,h,s[h]||o.style[h])}function S(o,h,m){var s=arguments.length;if(h=T[h]?"cssFloat"in o.style?"cssFloat":"styleFloat":h,s===3)return typeof m=="number"&&L.test(h)&&(m="".concat(m,"px")),o.style[h]=m,m;for(var r in h)h.hasOwnProperty(r)&&S(o,r,h[r]);return P(o)}function b(o){return o===document.body?document.documentElement.clientWidth:o.offsetWidth}function d(o){return o===document.body?window.innerHeight||document.documentElement.clientHeight:o.offsetHeight}function l(){var o=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),h=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:o,height:h}}function n(){var o=document.documentElement.clientWidth,h=window.innerHeight||document.documentElement.clientHeight;return{width:o,height:h}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function u(o){var h=o.getBoundingClientRect(),m=document.documentElement;return{left:h.left+(window.pageXOffset||m.scrollLeft)-(m.clientLeft||document.body.clientLeft||0),top:h.top+(window.pageYOffset||m.scrollTop)-(m.clientTop||document.body.clientTop||0)}}},zrhs:function(j,Y,D){"use strict";var L=D("2qtc"),g=D("kLXV"),T=D("PpiC"),P=D("q1tI"),p=D.n(P),v=D("9kvl"),S=function(d){var l=d.shixunsDetail,n=d.globalSetting,c=d.loading,u=d.dispatch,o=Object(T.a)(d,["shixunsDetail","globalSetting","loading","dispatch"]);return p.a.createElement(g.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:l.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){u({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){u({type:"shixunsDetail/setActionTabs",payload:{}})}},p.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",p.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};Y.a=Object(v.a)(function(b){var d=b.shixunsDetail,l=b.loading,n=b.globalSetting;return{shixunsDetail:d,globalSetting:n,loading:l.models.index}})(S)}}]);