@volcengine/veplayer-plugin 2.10.3 → 2.11.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.development.js +4975 -4761
- package/esm/index.production.js +7 -7
- package/esm/veplayer.plugin.abr.development.js +5019 -4804
- package/esm/veplayer.plugin.abr.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +53 -73
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.abr.development.js +5019 -4804
- package/umd/veplayer.plugin.abr.production.js +1 -1
- package/umd/veplayer.plugin.flv.development.js +53 -73
- package/umd/veplayer.plugin.flv.production.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).__VEPLAYER_PLUGIN_FLV__={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n={exports:{}},i=function(e){return e&&e.Math==Math&&e},a=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},s=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=s,c=Function.prototype,l=c.apply,f=c.call,h="object"==typeof Reflect&&Reflect.apply||(u?f.bind(l):function(){return f.apply(l,arguments)}),d=s,p=Function.prototype,v=p.call,y=d&&p.bind.bind(v,v),g=d?y:function(e){return function(){return v.apply(e,arguments)}},m=g,_=m({}.toString),b=m("".slice),w=function(e){return b(_(e),8,-1)},k=w,S=g,x=function(e){if("Function"===k(e))return S(e)},E="object"==typeof document&&document.all,T={all:E,IS_HTMLDDA:void 0===E&&void 0!==E},A=T.all,L=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===A}:function(e){return"function"==typeof e},C={},O=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),D=s,P=Function.prototype.call,R=D?P.bind(P):function(){return P.apply(P,arguments)},M={},U={}.propertyIsEnumerable,I=Object.getOwnPropertyDescriptor,B=I&&!U.call({1:2},1);M.f=B?function(e){var t=I(this,e);return!!t&&t.enumerable}:U;var j,F,N=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},z=o,V=w,G=Object,H=g("".split),q=z((function(){return!G("z").propertyIsEnumerable(0)}))?function(e){return"String"==V(e)?H(e,""):G(e)}:G,K=function(e){return null==e},W=K,Y=TypeError,J=function(e){if(W(e))throw Y("Can't call method on "+e);return e},Q=q,X=J,$=function(e){return Q(X(e))},Z=L,ee=T.all,te=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Z(e)||e===ee}:function(e){return"object"==typeof e?null!==e:Z(e)},re={},ne=re,ie=a,ae=L,oe=function(e){return ae(e)?e:void 0},se=function(e,t){return arguments.length<2?oe(ne[e])||oe(ie[e]):ne[e]&&ne[e][t]||ie[e]&&ie[e][t]},ue=g({}.isPrototypeOf),ce="undefined"!=typeof navigator&&String(navigator.userAgent)||"",le=a,fe=ce,he=le.process,de=le.Deno,pe=he&&he.versions||de&&de.version,ve=pe&&pe.v8;ve&&(F=(j=ve.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!F&&fe&&(!(j=fe.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=fe.match(/Chrome\/(\d+)/))&&(F=+j[1]);var ye=F,ge=ye,me=o,_e=a.String,be=!!Object.getOwnPropertySymbols&&!me((function(){var e=Symbol();return!_e(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ge&&ge<41})),we=be&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ke=se,Se=L,xe=ue,Ee=Object,Te=we?function(e){return"symbol"==typeof e}:function(e){var t=ke("Symbol");return Se(t)&&xe(t.prototype,Ee(e))},Ae=String,Le=function(e){try{return Ae(e)}catch(t){return"Object"}},Ce=L,Oe=Le,De=TypeError,Pe=function(e){if(Ce(e))return e;throw De(Oe(e)+" is not a function")},Re=Pe,Me=K,Ue=function(e,t){var r=e[t];return Me(r)?void 0:Re(r)},Ie=R,Be=L,je=te,Fe=TypeError,Ne={exports:{}},ze=a,Ve=Object.defineProperty,Ge=function(e,t){try{Ve(ze,e,{value:t,configurable:!0,writable:!0})}catch(r){ze[e]=t}return t},He="__core-js_shared__",qe=a[He]||Ge(He,{}),Ke=qe;(Ne.exports=function(e,t){return Ke[e]||(Ke[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var We=Ne.exports,Ye=J,Je=Object,Qe=function(e){return Je(Ye(e))},Xe=Qe,$e=g({}.hasOwnProperty),Ze=Object.hasOwn||function(e,t){return $e(Xe(e),t)},et=g,tt=0,rt=Math.random(),nt=et(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++tt+rt,36)},at=We,ot=Ze,st=it,ut=be,ct=we,lt=a.Symbol,ft=at("wks"),ht=ct?lt.for||lt:lt&<.withoutSetter||st,dt=function(e){return ot(ft,e)||(ft[e]=ut&&ot(lt,e)?lt[e]:ht("Symbol."+e)),ft[e]},pt=R,vt=te,yt=Te,gt=Ue,mt=function(e,t){var r,n;if("string"===t&&Be(r=e.toString)&&!je(n=Ie(r,e)))return n;if(Be(r=e.valueOf)&&!je(n=Ie(r,e)))return n;if("string"!==t&&Be(r=e.toString)&&!je(n=Ie(r,e)))return n;throw Fe("Can't convert object to primitive value")},_t=TypeError,bt=dt("toPrimitive"),wt=function(e,t){if(!vt(e)||yt(e))return e;var r,n=gt(e,bt);if(n){if(void 0===t&&(t="default"),r=pt(n,e,t),!vt(r)||yt(r))return r;throw _t("Can't convert object to primitive value")}return void 0===t&&(t="number"),mt(e,t)},kt=Te,St=function(e){var t=wt(e,"string");return kt(t)?t:t+""},xt=te,Et=a.document,Tt=xt(Et)&&xt(Et.createElement),At=function(e){return Tt?Et.createElement(e):{}},Lt=At,Ct=!O&&!o((function(){return 7!=Object.defineProperty(Lt("div"),"a",{get:function(){return 7}}).a})),Ot=O,Dt=R,Pt=M,Rt=N,Mt=$,Ut=St,It=Ze,Bt=Ct,jt=Object.getOwnPropertyDescriptor;C.f=Ot?jt:function(e,t){if(e=Mt(e),t=Ut(t),Bt)try{return jt(e,t)}catch(r){}if(It(e,t))return Rt(!Dt(Pt.f,e,t),e[t])};var Ft=o,Nt=L,zt=/#|\.prototype\./,Vt=function(e,t){var r=Ht[Gt(e)];return r==Kt||r!=qt&&(Nt(t)?Ft(t):!!t)},Gt=Vt.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},Ht=Vt.data={},qt=Vt.NATIVE="N",Kt=Vt.POLYFILL="P",Wt=Vt,Yt=Pe,Jt=s,Qt=x(x.bind),Xt=function(e,t){return Yt(e),void 0===t?e:Jt?Qt(e,t):function(){return e.apply(t,arguments)}},$t={},Zt=O&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),er=te,tr=String,rr=TypeError,nr=function(e){if(er(e))return e;throw rr(tr(e)+" is not an object")},ir=O,ar=Ct,or=Zt,sr=nr,ur=St,cr=TypeError,lr=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,hr="enumerable",dr="configurable",pr="writable";$t.f=ir?or?function(e,t,r){if(sr(e),t=ur(t),sr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&pr in r&&!r[pr]){var n=fr(e,t);n&&n[pr]&&(e[t]=r.value,r={configurable:dr in r?r[dr]:n[dr],enumerable:hr in r?r[hr]:n[hr],writable:!1})}return lr(e,t,r)}:lr:function(e,t,r){if(sr(e),t=ur(t),sr(r),ar)try{return lr(e,t,r)}catch(n){}if("get"in r||"set"in r)throw cr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var vr=$t,yr=N,gr=O?function(e,t,r){return vr.f(e,t,yr(1,r))}:function(e,t,r){return e[t]=r,e},mr=a,_r=h,br=x,wr=L,kr=C.f,Sr=Wt,xr=re,Er=Xt,Tr=gr,Ar=Ze,Lr=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return _r(e,this,arguments)};return t.prototype=e.prototype,t},Cr=function(e,t){var r,n,i,a,o,s,u,c,l,f=e.target,h=e.global,d=e.stat,p=e.proto,v=h?mr:d?mr[f]:(mr[f]||{}).prototype,y=h?xr:xr[f]||Tr(xr,f,{})[f],g=y.prototype;for(a in t)n=!(r=Sr(h?a:f+(d?".":"#")+a,e.forced))&&v&&Ar(v,a),s=y[a],n&&(u=e.dontCallGetSet?(l=kr(v,a))&&l.value:v[a]),o=n&&u?u:t[a],n&&typeof s==typeof o||(c=e.bind&&n?Er(o,mr):e.wrap&&n?Lr(o):p&&wr(o)?br(o):o,(e.sham||o&&o.sham||s&&s.sham)&&Tr(c,"sham",!0),Tr(y,a,c),p&&(Ar(xr,i=f+"Prototype")||Tr(xr,i,{}),Tr(xr[i],a,o),e.real&&g&&(r||!g[a])&&Tr(g,a,o)))},Or=Cr,Dr=O,Pr=$t.f;Or({target:"Object",stat:!0,forced:Object.defineProperty!==Pr,sham:!Dr},{defineProperty:Pr});var Rr=re.Object,Mr=n.exports=function(e,t,r){return Rr.defineProperty(e,t,r)};Rr.defineProperty.sham&&(Mr.sham=!0);var Ur=n.exports,Ir=r(Ur),Br=w,jr=Array.isArray||function(e){return"Array"==Br(e)},Fr=Math.ceil,Nr=Math.floor,zr=Math.trunc||function(e){var t=+e;return(t>0?Nr:Fr)(t)},Vr=function(e){var t=+e;return t!=t||0===t?0:zr(t)},Gr=Vr,Hr=Math.min,qr=function(e){return e>0?Hr(Gr(e),9007199254740991):0},Kr=qr,Wr=function(e){return Kr(e.length)},Yr=TypeError,Jr=function(e){if(e>9007199254740991)throw Yr("Maximum allowed index exceeded");return e},Qr=St,Xr=$t,$r=N,Zr=function(e,t,r){var n=Qr(t);n in e?Xr.f(e,n,$r(0,r)):e[n]=r},en={};en[dt("toStringTag")]="z";var tn="[object z]"===String(en),rn=tn,nn=L,an=w,on=dt("toStringTag"),sn=Object,un="Arguments"==an(function(){return arguments}()),cn=rn?an:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=sn(e),on))?r:un?an(t):"Object"==(n=an(t))&&nn(t.callee)?"Arguments":n},ln=L,fn=qe,hn=g(Function.toString);ln(fn.inspectSource)||(fn.inspectSource=function(e){return hn(e)});var dn=fn.inspectSource,pn=g,vn=o,yn=L,gn=cn,mn=dn,_n=function(){},bn=[],wn=se("Reflect","construct"),kn=/^\s*(?:class|function)\b/,Sn=pn(kn.exec),xn=!kn.exec(_n),En=function(e){if(!yn(e))return!1;try{return wn(_n,bn,e),!0}catch(t){return!1}},Tn=function(e){if(!yn(e))return!1;switch(gn(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xn||!!Sn(kn,mn(e))}catch(t){return!0}};Tn.sham=!0;var An=!wn||vn((function(){var e;return En(En.call)||!En(Object)||!En((function(){e=!0}))||e}))?Tn:En,Ln=jr,Cn=An,On=te,Dn=dt("species"),Pn=Array,Rn=function(e){var t;return Ln(e)&&(t=e.constructor,(Cn(t)&&(t===Pn||Ln(t.prototype))||On(t)&&null===(t=t[Dn]))&&(t=void 0)),void 0===t?Pn:t},Mn=function(e,t){return new(Rn(e))(0===t?0:t)},Un=o,In=ye,Bn=dt("species"),jn=function(e){return In>=51||!Un((function(){var t=[];return(t.constructor={})[Bn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Fn=Cr,Nn=o,zn=jr,Vn=te,Gn=Qe,Hn=Wr,qn=Jr,Kn=Zr,Wn=Mn,Yn=jn,Jn=ye,Qn=dt("isConcatSpreadable"),Xn=Jn>=51||!Nn((function(){var e=[];return e[Qn]=!1,e.concat()[0]!==e})),$n=function(e){if(!Vn(e))return!1;var t=e[Qn];return void 0!==t?!!t:zn(e)};Fn({target:"Array",proto:!0,arity:1,forced:!Xn||!Yn("concat")},{concat:function(e){var t,r,n,i,a,o=Gn(this),s=Wn(o,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if($n(a=-1===t?o:arguments[t]))for(i=Hn(a),qn(u+i),r=0;r<i;r++,u++)r in a&&Kn(s,u,a[r]);else qn(u+1),Kn(s,u++,a);return s.length=u,s}});var Zn=cn,ei=String,ti=function(e){if("Symbol"===Zn(e))throw TypeError("Cannot convert a Symbol value to a string");return ei(e)},ri={},ni=Vr,ii=Math.max,ai=Math.min,oi=function(e,t){var r=ni(e);return r<0?ii(r+t,0):ai(r,t)},si=$,ui=oi,ci=Wr,li=function(e){return function(t,r,n){var i,a=si(t),o=ci(a),s=ui(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},fi={includes:li(!0),indexOf:li(!1)},hi={},di=Ze,pi=$,vi=fi.indexOf,yi=hi,gi=g([].push),mi=function(e,t){var r,n=pi(e),i=0,a=[];for(r in n)!di(yi,r)&&di(n,r)&&gi(a,r);for(;t.length>i;)di(n,r=t[i++])&&(~vi(a,r)||gi(a,r));return a},_i=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bi=mi,wi=_i,ki=Object.keys||function(e){return bi(e,wi)},Si=O,xi=Zt,Ei=$t,Ti=nr,Ai=$,Li=ki;ri.f=Si&&!xi?Object.defineProperties:function(e,t){Ti(e);for(var r,n=Ai(t),i=Li(t),a=i.length,o=0;a>o;)Ei.f(e,r=i[o++],n[r]);return e};var Ci,Oi=se("document","documentElement"),Di=it,Pi=We("keys"),Ri=function(e){return Pi[e]||(Pi[e]=Di(e))},Mi=nr,Ui=ri,Ii=_i,Bi=hi,ji=Oi,Fi=At,Ni="prototype",zi="script",Vi=Ri("IE_PROTO"),Gi=function(){},Hi=function(e){return"<"+zi+">"+e+"</"+zi+">"},qi=function(e){e.write(Hi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ki=function(){try{Ci=new ActiveXObject("htmlfile")}catch(i){}var e,t,r;Ki="undefined"!=typeof document?document.domain&&Ci?qi(Ci):(t=Fi("iframe"),r="java"+zi+":",t.style.display="none",ji.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Hi("document.F=Object")),e.close(),e.F):qi(Ci);for(var n=Ii.length;n--;)delete Ki[Ni][Ii[n]];return Ki()};Bi[Vi]=!0;var Wi=Object.create||function(e,t){var r;return null!==e?(Gi[Ni]=Mi(e),r=new Gi,Gi[Ni]=null,r[Vi]=e):r=Ki(),void 0===t?r:Ui.f(r,t)},Yi={},Ji=mi,Qi=_i.concat("length","prototype");Yi.f=Object.getOwnPropertyNames||function(e){return Ji(e,Qi)};var Xi={},$i=oi,Zi=Wr,ea=Zr,ta=Array,ra=Math.max,na=function(e,t,r){for(var n=Zi(e),i=$i(t,n),a=$i(void 0===r?n:r,n),o=ta(ra(a-i,0)),s=0;i<a;i++,s++)ea(o,s,e[i]);return o.length=s,o},ia=w,aa=$,oa=Yi.f,sa=na,ua="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Xi.f=function(e){return ua&&"Window"==ia(e)?function(e){try{return oa(e)}catch(t){return sa(ua)}}(e):oa(aa(e))};var ca={};ca.f=Object.getOwnPropertySymbols;var la=gr,fa=function(e,t,r,n){return n&&n.enumerable?e[t]=r:la(e,t,r),e},ha=$t,da=function(e,t,r){return ha.f(e,t,r)},pa={},va=dt;pa.f=va;var ya,ga,ma,_a=re,ba=Ze,wa=pa,ka=$t.f,Sa=function(e){var t=_a.Symbol||(_a.Symbol={});ba(t,e)||ka(t,e,{value:wa.f(e)})},xa=R,Ea=se,Ta=dt,Aa=fa,La=function(){var e=Ea("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Ta("toPrimitive");t&&!t[n]&&Aa(t,n,(function(e){return xa(r,this)}),{arity:1})},Ca=cn,Oa=tn?{}.toString:function(){return"[object "+Ca(this)+"]"},Da=tn,Pa=$t.f,Ra=gr,Ma=Ze,Ua=Oa,Ia=dt("toStringTag"),Ba=function(e,t,r,n){if(e){var i=r?e:e.prototype;Ma(i,Ia)||Pa(i,Ia,{configurable:!0,value:t}),n&&!Da&&Ra(i,"toString",Ua)}},ja=L,Fa=a.WeakMap,Na=ja(Fa)&&/native code/.test(String(Fa)),za=a,Va=te,Ga=gr,Ha=Ze,qa=qe,Ka=Ri,Wa=hi,Ya="Object already initialized",Ja=za.TypeError,Qa=za.WeakMap;if(Na||qa.state){var Xa=qa.state||(qa.state=new Qa);Xa.get=Xa.get,Xa.has=Xa.has,Xa.set=Xa.set,ya=function(e,t){if(Xa.has(e))throw Ja(Ya);return t.facade=e,Xa.set(e,t),t},ga=function(e){return Xa.get(e)||{}},ma=function(e){return Xa.has(e)}}else{var $a=Ka("state");Wa[$a]=!0,ya=function(e,t){if(Ha(e,$a))throw Ja(Ya);return t.facade=e,Ga(e,$a,t),t},ga=function(e){return Ha(e,$a)?e[$a]:{}},ma=function(e){return Ha(e,$a)}}var Za={set:ya,get:ga,has:ma,enforce:function(e){return ma(e)?ga(e):ya(e,{})},getterFor:function(e){return function(t){var r;if(!Va(t)||(r=ga(t)).type!==e)throw Ja("Incompatible receiver, "+e+" required");return r}}},eo=Xt,to=q,ro=Qe,no=Wr,io=Mn,ao=g([].push),oo=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(u,c,l,f){for(var h,d,p=ro(u),v=to(p),y=eo(c,l),g=no(v),m=0,_=f||io,b=t?_(u,g):r||o?_(u,0):void 0;g>m;m++)if((s||m in v)&&(d=y(h=v[m],m,p),e))if(t)b[m]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:ao(b,h)}else switch(e){case 4:return!1;case 7:ao(b,h)}return a?-1:n||i?i:b}},so={forEach:oo(0),map:oo(1),filter:oo(2),some:oo(3),every:oo(4),find:oo(5),findIndex:oo(6),filterReject:oo(7)},uo=Cr,co=a,lo=R,fo=g,ho=O,po=be,vo=o,yo=Ze,go=ue,mo=nr,_o=$,bo=St,wo=ti,ko=N,So=Wi,xo=ki,Eo=Yi,To=Xi,Ao=ca,Lo=C,Co=$t,Oo=ri,Do=M,Po=fa,Ro=da,Mo=We,Uo=hi,Io=it,Bo=dt,jo=pa,Fo=Sa,No=La,zo=Ba,Vo=Za,Go=so.forEach,Ho=Ri("hidden"),qo="Symbol",Ko="prototype",Wo=Vo.set,Yo=Vo.getterFor(qo),Jo=Object[Ko],Qo=co.Symbol,Xo=Qo&&Qo[Ko],$o=co.TypeError,Zo=co.QObject,es=Lo.f,ts=Co.f,rs=To.f,ns=Do.f,is=fo([].push),as=Mo("symbols"),os=Mo("op-symbols"),ss=Mo("wks"),us=!Zo||!Zo[Ko]||!Zo[Ko].findChild,cs=ho&&vo((function(){return 7!=So(ts({},"a",{get:function(){return ts(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=es(Jo,t);n&&delete Jo[t],ts(e,t,r),n&&e!==Jo&&ts(Jo,t,n)}:ts,ls=function(e,t){var r=as[e]=So(Xo);return Wo(r,{type:qo,tag:e,description:t}),ho||(r.description=t),r},fs=function(e,t,r){e===Jo&&fs(os,t,r),mo(e);var n=bo(t);return mo(r),yo(as,n)?(r.enumerable?(yo(e,Ho)&&e[Ho][n]&&(e[Ho][n]=!1),r=So(r,{enumerable:ko(0,!1)})):(yo(e,Ho)||ts(e,Ho,ko(1,{})),e[Ho][n]=!0),cs(e,n,r)):ts(e,n,r)},hs=function(e,t){mo(e);var r=_o(t),n=xo(r).concat(ys(r));return Go(n,(function(t){ho&&!lo(ds,r,t)||fs(e,t,r[t])})),e},ds=function(e){var t=bo(e),r=lo(ns,this,t);return!(this===Jo&&yo(as,t)&&!yo(os,t))&&(!(r||!yo(this,t)||!yo(as,t)||yo(this,Ho)&&this[Ho][t])||r)},ps=function(e,t){var r=_o(e),n=bo(t);if(r!==Jo||!yo(as,n)||yo(os,n)){var i=es(r,n);return!i||!yo(as,n)||yo(r,Ho)&&r[Ho][n]||(i.enumerable=!0),i}},vs=function(e){var t=rs(_o(e)),r=[];return Go(t,(function(e){yo(as,e)||yo(Uo,e)||is(r,e)})),r},ys=function(e){var t=e===Jo,r=rs(t?os:_o(e)),n=[];return Go(r,(function(e){!yo(as,e)||t&&!yo(Jo,e)||is(n,as[e])})),n};po||(Qo=function(){if(go(Xo,this))throw $o("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?wo(arguments[0]):void 0,t=Io(e),r=function(e){this===Jo&&lo(r,os,e),yo(this,Ho)&&yo(this[Ho],t)&&(this[Ho][t]=!1),cs(this,t,ko(1,e))};return ho&&us&&cs(Jo,t,{configurable:!0,set:r}),ls(t,e)},Po(Xo=Qo[Ko],"toString",(function(){return Yo(this).tag})),Po(Qo,"withoutSetter",(function(e){return ls(Io(e),e)})),Do.f=ds,Co.f=fs,Oo.f=hs,Lo.f=ps,Eo.f=To.f=vs,Ao.f=ys,jo.f=function(e){return ls(Bo(e),e)},ho&&Ro(Xo,"description",{configurable:!0,get:function(){return Yo(this).description}})),uo({global:!0,constructor:!0,wrap:!0,forced:!po,sham:!po},{Symbol:Qo}),Go(xo(ss),(function(e){Fo(e)})),uo({target:qo,stat:!0,forced:!po},{useSetter:function(){us=!0},useSimple:function(){us=!1}}),uo({target:"Object",stat:!0,forced:!po,sham:!ho},{create:function(e,t){return void 0===t?So(e):hs(So(e),t)},defineProperty:fs,defineProperties:hs,getOwnPropertyDescriptor:ps}),uo({target:"Object",stat:!0,forced:!po},{getOwnPropertyNames:vs}),No(),zo(Qo,qo),Uo[Ho]=!0;var gs=be&&!!Symbol.for&&!!Symbol.keyFor,ms=Cr,_s=se,bs=Ze,ws=ti,ks=We,Ss=gs,xs=ks("string-to-symbol-registry"),Es=ks("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!Ss},{for:function(e){var t=ws(e);if(bs(xs,t))return xs[t];var r=_s("Symbol")(t);return xs[t]=r,Es[r]=t,r}});var Ts=Cr,As=Ze,Ls=Te,Cs=Le,Os=gs,Ds=We("symbol-to-string-registry");Ts({target:"Symbol",stat:!0,forced:!Os},{keyFor:function(e){if(!Ls(e))throw TypeError(Cs(e)+" is not a symbol");if(As(Ds,e))return Ds[e]}});var Ps=g([].slice),Rs=jr,Ms=L,Us=w,Is=ti,Bs=g([].push),js=Cr,Fs=se,Ns=h,zs=R,Vs=g,Gs=o,Hs=L,qs=Te,Ks=Ps,Ws=function(e){if(Ms(e))return e;if(Rs(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Bs(r,i):"number"!=typeof i&&"Number"!=Us(i)&&"String"!=Us(i)||Bs(r,Is(i))}var a=r.length,o=!0;return function(e,t){if(o)return o=!1,t;if(Rs(this))return t;for(var n=0;n<a;n++)if(r[n]===e)return t}}},Ys=be,Js=String,Qs=Fs("JSON","stringify"),Xs=Vs(/./.exec),$s=Vs("".charAt),Zs=Vs("".charCodeAt),eu=Vs("".replace),tu=Vs(1..toString),ru=/[\uD800-\uDFFF]/g,nu=/^[\uD800-\uDBFF]$/,iu=/^[\uDC00-\uDFFF]$/,au=!Ys||Gs((function(){var e=Fs("Symbol")();return"[null]"!=Qs([e])||"{}"!=Qs({a:e})||"{}"!=Qs(Object(e))})),ou=Gs((function(){return'"\\udf06\\ud834"'!==Qs("\udf06\ud834")||'"\\udead"'!==Qs("\udead")})),su=function(e,t){var r=Ks(arguments),n=Ws(t);if(Hs(n)||void 0!==e&&!qs(e))return r[1]=function(e,t){if(Hs(n)&&(t=zs(n,this,Js(e),t)),!qs(t))return t},Ns(Qs,null,r)},uu=function(e,t,r){var n=$s(r,t-1),i=$s(r,t+1);return Xs(nu,e)&&!Xs(iu,i)||Xs(iu,e)&&!Xs(nu,n)?"\\u"+tu(Zs(e,0),16):e};Qs&&js({target:"JSON",stat:!0,arity:3,forced:au||ou},{stringify:function(e,t,r){var n=Ks(arguments),i=Ns(au?su:Qs,null,n);return ou&&"string"==typeof i?eu(i,ru,uu):i}});var cu=ca,lu=Qe;Cr({target:"Object",stat:!0,forced:!be||o((function(){cu.f(1)}))},{getOwnPropertySymbols:function(e){var t=cu.f;return t?t(lu(e)):[]}}),Sa("asyncIterator"),Sa("hasInstance"),Sa("isConcatSpreadable"),Sa("iterator"),Sa("match"),Sa("matchAll"),Sa("replace"),Sa("search"),Sa("species"),Sa("split");var fu=La;Sa("toPrimitive"),fu();var hu=se,du=Ba;Sa("toStringTag"),du(hu("Symbol"),"Symbol"),Sa("unscopables"),Ba(a.JSON,"JSON",!0);var pu,vu,yu,gu=re.Symbol,mu={},_u=O,bu=Ze,wu=Function.prototype,ku=_u&&Object.getOwnPropertyDescriptor,Su=bu(wu,"name"),xu={EXISTS:Su,PROPER:Su&&"something"===function(){}.name,CONFIGURABLE:Su&&(!_u||_u&&ku(wu,"name").configurable)},Eu=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Tu=Ze,Au=L,Lu=Qe,Cu=Eu,Ou=Ri("IE_PROTO"),Du=Object,Pu=Du.prototype,Ru=Cu?Du.getPrototypeOf:function(e){var t=Lu(e);if(Tu(t,Ou))return t[Ou];var r=t.constructor;return Au(r)&&t instanceof r?r.prototype:t instanceof Du?Pu:null},Mu=o,Uu=L,Iu=te,Bu=Wi,ju=Ru,Fu=fa,Nu=dt("iterator"),zu=!1;[].keys&&("next"in(yu=[].keys())?(vu=ju(ju(yu)))!==Object.prototype&&(pu=vu):zu=!0);var Vu=!Iu(pu)||Mu((function(){var e={};return pu[Nu].call(e)!==e}));Uu((pu=Vu?{}:Bu(pu))[Nu])||Fu(pu,Nu,(function(){return this}));var Gu={IteratorPrototype:pu,BUGGY_SAFARI_ITERATORS:zu},Hu=Gu.IteratorPrototype,qu=Wi,Ku=N,Wu=Ba,Yu=mu,Ju=function(){return this},Qu=function(e,t,r,n){var i=t+" Iterator";return e.prototype=qu(Hu,{next:Ku(+!n,r)}),Wu(e,i,!1,!0),Yu[i]=Ju,e},Xu=g,$u=Pe,Zu=L,ec=String,tc=TypeError,rc=function(e,t,r){try{return Xu($u(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}},nc=nr,ic=function(e){if("object"==typeof e||Zu(e))return e;throw tc("Can't set "+ec(e)+" as a prototype")},ac=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=rc(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(n){}return function(r,n){return nc(r),ic(n),t?e(r,n):r.__proto__=n,r}}():void 0),oc=Cr,sc=R,uc=xu,cc=Qu,lc=Ru,fc=Ba,hc=fa,dc=mu,pc=Gu,vc=uc.PROPER,yc=pc.BUGGY_SAFARI_ITERATORS,gc=dt("iterator"),mc="keys",_c="values",bc="entries",wc=function(){return this},kc=function(e,t,r,n,i,a,o){cc(r,t,n);var s,u,c,l=function(e){if(e===i&&v)return v;if(!yc&&e in d)return d[e];switch(e){case mc:case _c:case bc:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[gc]||d["@@iterator"]||i&&d[i],v=!yc&&p||l(i),y="Array"==t&&d.entries||p;if(y&&(s=lc(y.call(new e)))!==Object.prototype&&s.next&&(fc(s,f,!0,!0),dc[f]=wc),vc&&i==_c&&p&&p.name!==_c&&(h=!0,v=function(){return sc(p,this)}),i)if(u={values:l(_c),keys:a?v:l(mc),entries:l(bc)},o)for(c in u)(yc||h||!(c in d))&&hc(d,c,u[c]);else oc({target:t,proto:!0,forced:yc||h},u);return o&&d[gc]!==v&&hc(d,gc,v,{name:i}),dc[t]=v,u},Sc=function(e,t){return{value:e,done:t}},xc=$,Ec=mu,Tc=Za;$t.f;var Ac=kc,Lc=Sc,Cc="Array Iterator",Oc=Tc.set,Dc=Tc.getterFor(Cc);Ac(Array,"Array",(function(e,t){Oc(this,{type:Cc,target:xc(e),index:0,kind:t})}),(function(){var e=Dc(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,Lc(void 0,!0)):Lc("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),Ec.Arguments=Ec.Array;var Pc={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Rc=a,Mc=cn,Uc=gr,Ic=mu,Bc=dt("toStringTag");for(var jc in Pc){var Fc=Rc[jc],Nc=Fc&&Fc.prototype;Nc&&Mc(Nc)!==Bc&&Uc(Nc,Bc,jc),Ic[jc]=Ic.Array}var zc=gu;Sa("dispose");var Vc=zc;Sa("asyncDispose");var Gc=Cr,Hc=g,qc=se("Symbol"),Kc=qc.keyFor,Wc=Hc(qc.prototype.valueOf);Gc({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Kc(Wc(e))}catch(t){return!1}}});for(var Yc=Cr,Jc=We,Qc=se,Xc=g,$c=Te,Zc=dt,el=Qc("Symbol"),tl=el.isWellKnown,rl=Qc("Object","getOwnPropertyNames"),nl=Xc(el.prototype.valueOf),il=Jc("wks"),al=0,ol=rl(el),sl=ol.length;al<sl;al++)try{var ul=ol[al];$c(el[ul])&&Zc(ul)}catch(VB){}Yc({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(tl&&tl(e))return!0;try{for(var t=nl(e),r=0,n=rl(il),i=n.length;r<i;r++)if(il[n[r]]==t)return!0}catch(VB){}return!1}}),Sa("matcher"),Sa("metadataKey"),Sa("observable"),Sa("metadata"),Sa("patternMatch"),Sa("replaceAll");var cl=Vc,ll=r(cl),fl=g,hl=Vr,dl=ti,pl=J,vl=fl("".charAt),yl=fl("".charCodeAt),gl=fl("".slice),ml=function(e){return function(t,r){var n,i,a=dl(pl(t)),o=hl(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=yl(a,o))<55296||n>56319||o+1===s||(i=yl(a,o+1))<56320||i>57343?e?vl(a,o):n:e?gl(a,o,o+2):i-56320+(n-55296<<10)+65536}},_l={codeAt:ml(!1),charAt:ml(!0)},bl=_l.charAt,wl=ti,kl=Za,Sl=kc,xl=Sc,El="String Iterator",Tl=kl.set,Al=kl.getterFor(El);Sl(String,"String",(function(e){Tl(this,{type:El,string:wl(e),index:0})}),(function(){var e,t=Al(this),r=t.string,n=t.index;return n>=r.length?xl(void 0,!0):(e=bl(r,n),t.index+=e.length,xl(e,!1))}));var Ll=pa.f("iterator"),Cl=r(Ll);function Ol(e){return(Ol="function"==typeof ll&&"symbol"==typeof Cl?function(e){return typeof e}:function(e){return e&&"function"==typeof ll&&e.constructor===ll&&e!==ll.prototype?"symbol":typeof e})(e)}var Dl=pa.f("toPrimitive"),Pl=r(Dl);function Rl(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var r=e[Pl];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ol(t)?t:String(t)}function Ml(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ir(e,Rl(n.key),n)}}function Ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Il=Ze,Bl=R,jl=te,Fl=nr,Nl=function(e){return void 0!==e&&(Il(e,"value")||Il(e,"writable"))},zl=C,Vl=Ru;Cr({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,a=arguments.length<3?t:arguments[2];return Fl(t)===a?t[r]:(n=zl.f(t,r))?Nl(n)?n.value:void 0===n.get?void 0:Bl(n.get,a):jl(i=Vl(t))?e(i,r,a):void 0}});var Gl=re.Reflect.get,Hl=r(Gl),ql=g,Kl=Pe,Wl=te,Yl=Ze,Jl=Ps,Ql=s,Xl=Function,$l=ql([].concat),Zl=ql([].join),ef={},tf=Ql?Xl.bind:function(e){var t=Kl(this),r=t.prototype,n=Jl(arguments,1),i=function(){var r=$l(n,Jl(arguments));return this instanceof i?function(e,t,r){if(!Yl(ef,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";ef[t]=Xl("C,a","return new C("+Zl(n,",")+")")}return ef[t](e,r)}(t,r.length,r):t.apply(e,r)};return Wl(r)&&(i.prototype=r),i},rf=tf;Cr({target:"Function",proto:!0,forced:Function.bind!==rf},{bind:rf});var nf=re,af=function(e){return nf[e+"Prototype"]},of=af("Function").bind,sf=ue,uf=of,cf=Function.prototype,lf=function(e){var t=e.bind;return e===cf||sf(cf,e)&&t===cf.bind?uf:t},ff=r(lf),hf={exports:{}},df=Cr,pf=o,vf=$,yf=C.f,gf=O;df({target:"Object",stat:!0,forced:!gf||pf((function(){yf(1)})),sham:!gf},{getOwnPropertyDescriptor:function(e,t){return yf(vf(e),t)}});var mf=re.Object,_f=hf.exports=function(e,t){return mf.getOwnPropertyDescriptor(e,t)};mf.getOwnPropertyDescriptor.sham&&(_f.sham=!0);var bf=hf.exports,wf=r(bf);Cr({target:"Object",stat:!0},{setPrototypeOf:ac});var kf=re.Object.setPrototypeOf,Sf=r(kf),xf=Qe,Ef=Ru,Tf=Eu;Cr({target:"Object",stat:!0,forced:o((function(){Ef(1)})),sham:!Tf},{getPrototypeOf:function(e){return Ef(xf(e))}});var Af=re.Object.getPrototypeOf,Lf=r(Af);function Cf(e){var t;return(Cf=Sf?ff(t=Lf).call(t):function(e){return e.__proto__||Lf(e)})(e)}function Of(){var e;"undefined"!=typeof Reflect&&Hl?Of=ff(e=Hl).call(e):Of=function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Cf(e)););return e}(e,t);if(n){var i=wf(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return Of.apply(this,arguments)}Cr({target:"Object",stat:!0,sham:!O},{create:Wi});var Df=re.Object,Pf=function(e,t){return Df.create(e,t)},Rf=r(Pf);function Mf(e,t){var r;return(Mf=Sf?ff(r=Sf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}var Uf=An,If=Le,Bf=TypeError,jf=function(e){if(Uf(e))return e;throw Bf(If(e)+" is not a constructor")},Ff=Cr,Nf=h,zf=tf,Vf=jf,Gf=nr,Hf=te,qf=Wi,Kf=o,Wf=se("Reflect","construct"),Yf=Object.prototype,Jf=[].push,Qf=Kf((function(){function e(){}return!(Wf((function(){}),[],e)instanceof e)})),Xf=!Kf((function(){Wf((function(){}))})),$f=Qf||Xf;Ff({target:"Reflect",stat:!0,forced:$f,sham:$f},{construct:function(e,t){Vf(e),Gf(t);var r=arguments.length<3?e:Vf(arguments[2]);if(Xf&&!Qf)return Wf(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return Nf(Jf,n,t),new(Nf(zf,e,n))}var i=r.prototype,a=qf(Hf(i)?i:Yf),o=Nf(e,a,t);return Hf(o)?o:a}});var Zf=re.Reflect.construct,eh=r(Zf);function th(e){var t=function(){if("undefined"==typeof Reflect||!eh)return!1;if(eh.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(eh(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cf(e);if(t){var i=Cf(this).constructor;r=eh(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ul(e)}(this,r)}}var rh=af("Array").concat,nh=ue,ih=rh,ah=Array.prototype,oh=r((function(e){var t=e.concat;return e===ah||nh(ah,e)&&t===ah.concat?ih:t})),sh=Qe,uh=ki;Cr({target:"Object",stat:!0,forced:o((function(){uh(1)}))},{keys:function(e){return uh(sh(e))}});var ch=r(re.Object.keys),lh=r(re.Object.getOwnPropertySymbols),fh=so.filter;Cr({target:"Array",proto:!0,forced:!jn("filter")},{filter:function(e){return fh(this,e,arguments.length>1?arguments[1]:void 0)}});var hh=af("Array").filter,dh=ue,ph=hh,vh=Array.prototype,yh=r((function(e){var t=e.filter;return e===vh||dh(vh,e)&&t===vh.filter?ph:t})),gh=r(bf),mh=o,_h=function(e,t){var r=[][e];return!!r&&mh((function(){r.call(null,t||function(){return 1},1)}))},bh=so.forEach,wh=_h("forEach")?[].forEach:function(e){return bh(this,e,arguments.length>1?arguments[1]:void 0)};Cr({target:"Array",proto:!0,forced:[].forEach!=wh},{forEach:wh});var kh=af("Array").forEach,Sh=cn,xh=Ze,Eh=ue,Th=kh,Ah=Array.prototype,Lh={DOMTokenList:!0,NodeList:!0},Ch=r((function(e){var t=e.forEach;return e===Ah||Eh(Ah,e)&&t===Ah.forEach||xh(Lh,Sh(e))?Th:t})),Oh=se,Dh=Yi,Ph=ca,Rh=nr,Mh=g([].concat),Uh=Oh("Reflect","ownKeys")||function(e){var t=Dh.f(Rh(e)),r=Ph.f;return r?Mh(t,r(e)):t},Ih=Uh,Bh=$,jh=C,Fh=Zr;Cr({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,r,n=Bh(e),i=jh.f,a=Ih(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&Fh(o,t,r);return o}});var Nh=r(re.Object.getOwnPropertyDescriptors),zh={exports:{}},Vh=Cr,Gh=O,Hh=ri.f;Vh({target:"Object",stat:!0,forced:Object.defineProperties!==Hh,sham:!Gh},{defineProperties:Hh});var qh=re.Object,Kh=zh.exports=function(e,t){return qh.defineProperties(e,t)};qh.defineProperties.sham&&(Kh.sham=!0);var Wh=r(zh.exports),Yh=r(Ur),Jh=r(cl),Qh=r(Pf),Xh=r(Af),$h=r(kf),Zh=Ze,ed=Uh,td=C,rd=$t,nd=te,id=gr,ad=Error,od=g("".replace),sd=String(ad("zxcasd").stack),ud=/\n\s*at [^:]*:[^\n]*/,cd=ud.test(sd),ld=N,fd=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",ld(1,7)),7!==e.stack)})),hd=gr,dd=function(e,t){if(cd&&"string"==typeof e&&!ad.prepareStackTrace)for(;t--;)e=od(e,ud,"");return e},pd=fd,vd=Error.captureStackTrace,yd=mu,gd=dt("iterator"),md=Array.prototype,_d=function(e){return void 0!==e&&(yd.Array===e||md[gd]===e)},bd=cn,wd=Ue,kd=K,Sd=mu,xd=dt("iterator"),Ed=function(e){if(!kd(e))return wd(e,xd)||wd(e,"@@iterator")||Sd[bd(e)]},Td=R,Ad=Pe,Ld=nr,Cd=Le,Od=Ed,Dd=TypeError,Pd=function(e,t){var r=arguments.length<2?Od(e):t;if(Ad(r))return Ld(Td(r,e));throw Dd(Cd(e)+" is not iterable")},Rd=R,Md=nr,Ud=Ue,Id=function(e,t,r){var n,i;Md(e);try{if(!(n=Ud(e,"return"))){if("throw"===t)throw r;return r}n=Rd(n,e)}catch(VB){i=!0,n=VB}if("throw"===t)throw r;if(i)throw n;return Md(n),r},Bd=Xt,jd=R,Fd=nr,Nd=Le,zd=_d,Vd=Wr,Gd=ue,Hd=Pd,qd=Ed,Kd=Id,Wd=TypeError,Yd=function(e,t){this.stopped=e,this.result=t},Jd=Yd.prototype,Qd=function(e,t,r){var n,i,a,o,s,u,c,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),v=Bd(t,l),y=function(e){return n&&Kd(n,"normal",e),new Yd(!0,e)},g=function(e){return f?(Fd(e),p?v(e[0],e[1],y):v(e[0],e[1])):p?v(e,y):v(e)};if(h)n=e.iterator;else if(d)n=e;else{if(!(i=qd(e)))throw Wd(Nd(e)+" is not iterable");if(zd(i)){for(a=0,o=Vd(e);o>a;a++)if((s=g(e[a]))&&Gd(Jd,s))return s;return new Yd(!1)}n=Hd(e,i)}for(u=h?e.next:n.next;!(c=jd(u,n)).done;){try{s=g(c.value)}catch(VB){Kd(n,"throw",VB)}if("object"==typeof s&&s&&Gd(Jd,s))return s}return new Yd(!1)},Xd=ti,$d=Cr,Zd=ue,ep=Ru,tp=ac,rp=function(e,t,r){for(var n=ed(t),i=rd.f,a=td.f,o=0;o<n.length;o++){var s=n[o];Zh(e,s)||r&&Zh(r,s)||i(e,s,a(t,s))}},np=Wi,ip=gr,ap=N,op=function(e,t){nd(t)&&"cause"in t&&id(e,"cause",t.cause)},sp=function(e,t,r,n){pd&&(vd?vd(e,t):hd(e,"stack",dd(r,n)))},up=Qd,cp=function(e,t){return void 0===e?arguments.length<2?"":t:Xd(e)},lp=dt("toStringTag"),fp=Error,hp=[].push,dp=function(e,t){var r,n=Zd(pp,this);tp?r=tp(fp(),n?ep(this):pp):(r=n?this:np(pp),ip(r,lp,"Error")),void 0!==t&&ip(r,"message",cp(t)),sp(r,dp,r.stack,1),arguments.length>2&&op(r,arguments[2]);var i=[];return up(e,hp,{that:i}),ip(r,"errors",i),r};tp?tp(dp,fp):rp(dp,fp,{name:!0});var pp=dp.prototype=np(fp.prototype,{constructor:ap(1,dp),message:ap(1,""),name:ap(1,"AggregateError")});$d({global:!0,constructor:!0,arity:2},{AggregateError:dp});var vp,yp,gp,mp,_p="undefined"!=typeof process&&"process"==w(process),bp=se,wp=da,kp=O,Sp=dt("species"),xp=function(e){var t=bp(e);kp&&t&&!t[Sp]&&wp(t,Sp,{configurable:!0,get:function(){return this}})},Ep=ue,Tp=TypeError,Ap=function(e,t){if(Ep(t,e))return e;throw Tp("Incorrect invocation")},Lp=nr,Cp=jf,Op=K,Dp=dt("species"),Pp=function(e,t){var r,n=Lp(e).constructor;return void 0===n||Op(r=Lp(n)[Dp])?t:Cp(r)},Rp=TypeError,Mp=function(e,t){if(e<t)throw Rp("Not enough arguments");return e},Up=/(?:ipad|iphone|ipod).*applewebkit/i.test(ce),Ip=a,Bp=h,jp=Xt,Fp=L,Np=Ze,zp=o,Vp=Oi,Gp=Ps,Hp=At,qp=Mp,Kp=Up,Wp=_p,Yp=Ip.setImmediate,Jp=Ip.clearImmediate,Qp=Ip.process,Xp=Ip.Dispatch,$p=Ip.Function,Zp=Ip.MessageChannel,ev=Ip.String,tv=0,rv={},nv="onreadystatechange";zp((function(){vp=Ip.location}));var iv=function(e){if(Np(rv,e)){var t=rv[e];delete rv[e],t()}},av=function(e){return function(){iv(e)}},ov=function(e){iv(e.data)},sv=function(e){Ip.postMessage(ev(e),vp.protocol+"//"+vp.host)};Yp&&Jp||(Yp=function(e){qp(arguments.length,1);var t=Fp(e)?e:$p(e),r=Gp(arguments,1);return rv[++tv]=function(){Bp(t,void 0,r)},yp(tv),tv},Jp=function(e){delete rv[e]},Wp?yp=function(e){Qp.nextTick(av(e))}:Xp&&Xp.now?yp=function(e){Xp.now(av(e))}:Zp&&!Kp?(mp=(gp=new Zp).port2,gp.port1.onmessage=ov,yp=jp(mp.postMessage,mp)):Ip.addEventListener&&Fp(Ip.postMessage)&&!Ip.importScripts&&vp&&"file:"!==vp.protocol&&!zp(sv)?(yp=sv,Ip.addEventListener("message",ov,!1)):yp=nv in Hp("script")?function(e){Vp.appendChild(Hp("script"))[nv]=function(){Vp.removeChild(this),iv(e)}}:function(e){setTimeout(av(e),0)});var uv={set:Yp,clear:Jp},cv=function(){this.head=null,this.tail=null};cv.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var lv,fv,hv,dv,pv,vv=cv,yv=/ipad|iphone|ipod/i.test(ce)&&"undefined"!=typeof Pebble,gv=/web0s(?!.*chrome)/i.test(ce),mv=a,_v=Xt,bv=C.f,wv=uv.set,kv=vv,Sv=Up,xv=yv,Ev=gv,Tv=_p,Av=mv.MutationObserver||mv.WebKitMutationObserver,Lv=mv.document,Cv=mv.process,Ov=mv.Promise,Dv=bv(mv,"queueMicrotask"),Pv=Dv&&Dv.value;if(!Pv){var Rv=new kv,Mv=function(){var e,t;for(Tv&&(e=Cv.domain)&&e.exit();t=Rv.get();)try{t()}catch(VB){throw Rv.head&&lv(),VB}e&&e.enter()};Sv||Tv||Ev||!Av||!Lv?!xv&&Ov&&Ov.resolve?((dv=Ov.resolve(void 0)).constructor=Ov,pv=_v(dv.then,dv),lv=function(){pv(Mv)}):Tv?lv=function(){Cv.nextTick(Mv)}:(wv=_v(wv,mv),lv=function(){wv(Mv)}):(fv=!0,hv=Lv.createTextNode(""),new Av(Mv).observe(hv,{characterData:!0}),lv=function(){hv.data=fv=!fv}),Pv=function(e){Rv.head||lv(),Rv.add(e)}}var Uv=Pv,Iv=function(e){try{return{error:!1,value:e()}}catch(VB){return{error:!0,value:VB}}},Bv=a.Promise,jv="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Fv=!jv&&!_p&&"object"==typeof window&&"object"==typeof document,Nv=a,zv=Bv,Vv=L,Gv=Wt,Hv=dn,qv=dt,Kv=Fv,Wv=jv,Yv=ye,Jv=zv&&zv.prototype,Qv=qv("species"),Xv=!1,$v=Vv(Nv.PromiseRejectionEvent),Zv={CONSTRUCTOR:Gv("Promise",(function(){var e=Hv(zv),t=e!==String(zv);if(!t&&66===Yv)return!0;if(!Jv.catch||!Jv.finally)return!0;if(!Yv||Yv<51||!/native code/.test(e)){var r=new zv((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Qv]=n,!(Xv=r.then((function(){}))instanceof n))return!0}return!t&&(Kv||Wv)&&!$v})),REJECTION_EVENT:$v,SUBCLASSING:Xv},ey={},ty=Pe,ry=TypeError,ny=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw ry("Bad Promise constructor");t=e,r=n})),this.resolve=ty(t),this.reject=ty(r)};ey.f=function(e){return new ny(e)};var iy,ay,oy=Cr,sy=_p,uy=a,cy=R,ly=fa,fy=Ba,hy=xp,dy=Pe,py=L,vy=te,yy=Ap,gy=Pp,my=uv.set,_y=Uv,by=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(VB){}},wy=Iv,ky=vv,Sy=Za,xy=Bv,Ey=Zv,Ty=ey,Ay="Promise",Ly=Ey.CONSTRUCTOR,Cy=Ey.REJECTION_EVENT,Oy=Sy.getterFor(Ay),Dy=Sy.set,Py=xy&&xy.prototype,Ry=xy,My=Py,Uy=uy.TypeError,Iy=uy.document,By=uy.process,jy=Ty.f,Fy=jy,Ny=!!(Iy&&Iy.createEvent&&uy.dispatchEvent),zy="unhandledrejection",Vy=function(e){var t;return!(!vy(e)||!py(t=e.then))&&t},Gy=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2===t.rejection&&Yy(t),t.rejection=1),!0===s?r=a:(l&&l.enter(),r=s(a),l&&(l.exit(),i=!0)),r===e.promise?c(Uy("Promise-chain cycle")):(n=Vy(r))?cy(n,r,u,c):u(r)):c(a)}catch(VB){l&&!i&&l.exit(),c(VB)}},Hy=function(e,t){e.notified||(e.notified=!0,_y((function(){for(var r,n=e.reactions;r=n.get();)Gy(r,e);e.notified=!1,t&&!e.rejection&&Ky(e)})))},qy=function(e,t,r){var n,i;Ny?((n=Iy.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),uy.dispatchEvent(n)):n={promise:t,reason:r},!Cy&&(i=uy["on"+e])?i(n):e===zy&&by("Unhandled promise rejection",r)},Ky=function(e){cy(my,uy,(function(){var t,r=e.facade,n=e.value;if(Wy(e)&&(t=wy((function(){sy?By.emit("unhandledRejection",n,r):qy(zy,r,n)})),e.rejection=sy||Wy(e)?2:1,t.error))throw t.value}))},Wy=function(e){return 1!==e.rejection&&!e.parent},Yy=function(e){cy(my,uy,(function(){var t=e.facade;sy?By.emit("rejectionHandled",t):qy("rejectionhandled",t,e.value)}))},Jy=function(e,t,r){return function(n){e(t,n,r)}},Qy=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Hy(e,!0))},Xy=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Uy("Promise can't be resolved itself");var n=Vy(t);n?_y((function(){var r={done:!1};try{cy(n,t,Jy(Xy,r,e),Jy(Qy,r,e))}catch(VB){Qy(r,VB,e)}})):(e.value=t,e.state=1,Hy(e,!1))}catch(VB){Qy({done:!1},VB,e)}}};Ly&&(My=(Ry=function(e){yy(this,My),dy(e),cy(iy,this);var t=Oy(this);try{e(Jy(Xy,t),Jy(Qy,t))}catch(VB){Qy(t,VB)}}).prototype,(iy=function(e){Dy(this,{type:Ay,done:!1,notified:!1,parent:!1,reactions:new ky,rejection:!1,state:0,value:void 0})}).prototype=ly(My,"then",(function(e,t){var r=Oy(this),n=jy(gy(this,Ry));return r.parent=!0,n.ok=!py(e)||e,n.fail=py(t)&&t,n.domain=sy?By.domain:void 0,0==r.state?r.reactions.add(n):_y((function(){Gy(n,r)})),n.promise})),ay=function(){var e=new iy,t=Oy(e);this.promise=e,this.resolve=Jy(Xy,t),this.reject=Jy(Qy,t)},Ty.f=jy=function(e){return e===Ry||undefined===e?new ay(e):Fy(e)}),oy({global:!0,constructor:!0,wrap:!0,forced:Ly},{Promise:Ry}),fy(Ry,Ay,!1,!0),hy(Ay);var $y=dt("iterator"),Zy=!1;try{var eg=0,tg={next:function(){return{done:!!eg++}},return:function(){Zy=!0}};tg[$y]=function(){return this},Array.from(tg,(function(){throw 2}))}catch(VB){}var rg=function(e,t){if(!t&&!Zy)return!1;var r=!1;try{var n={};n[$y]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(VB){}return r},ng=Bv,ig=Zv.CONSTRUCTOR||!rg((function(e){ng.all(e).then(void 0,(function(){}))})),ag=R,og=Pe,sg=ey,ug=Iv,cg=Qd;Cr({target:"Promise",stat:!0,forced:ig},{all:function(e){var t=this,r=sg.f(t),n=r.resolve,i=r.reject,a=ug((function(){var r=og(t.resolve),a=[],o=0,s=1;cg(e,(function(e){var u=o++,c=!1;s++,ag(r,t,e).then((function(e){c||(c=!0,a[u]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var lg=Cr,fg=Zv.CONSTRUCTOR;Bv&&Bv.prototype,lg({target:"Promise",proto:!0,forced:fg,real:!0},{catch:function(e){return this.then(void 0,e)}});var hg=R,dg=Pe,pg=ey,vg=Iv,yg=Qd;Cr({target:"Promise",stat:!0,forced:ig},{race:function(e){var t=this,r=pg.f(t),n=r.reject,i=vg((function(){var i=dg(t.resolve);yg(e,(function(e){hg(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var gg=R,mg=ey;Cr({target:"Promise",stat:!0,forced:Zv.CONSTRUCTOR},{reject:function(e){var t=mg.f(this);return gg(t.reject,void 0,e),t.promise}});var _g=nr,bg=te,wg=ey,kg=function(e,t){if(_g(e),bg(t)&&t.constructor===e)return t;var r=wg.f(e);return(0,r.resolve)(t),r.promise},Sg=Cr,xg=Bv,Eg=Zv.CONSTRUCTOR,Tg=kg,Ag=se("Promise"),Lg=!Eg;Sg({target:"Promise",stat:!0,forced:true},{resolve:function(e){return Tg(Lg&&this===Ag?xg:this,e)}});var Cg=R,Og=Pe,Dg=ey,Pg=Iv,Rg=Qd;Cr({target:"Promise",stat:!0,forced:ig},{allSettled:function(e){var t=this,r=Dg.f(t),n=r.resolve,i=r.reject,a=Pg((function(){var r=Og(t.resolve),i=[],a=0,o=1;Rg(e,(function(e){var s=a++,u=!1;o++,Cg(r,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--o||n(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--o||n(i))}))})),--o||n(i)}));return a.error&&i(a.value),r.promise}});var Mg=R,Ug=Pe,Ig=se,Bg=ey,jg=Iv,Fg=Qd,Ng="No one promise resolved";Cr({target:"Promise",stat:!0,forced:ig},{any:function(e){var t=this,r=Ig("AggregateError"),n=Bg.f(t),i=n.resolve,a=n.reject,o=jg((function(){var n=Ug(t.resolve),o=[],s=0,u=1,c=!1;Fg(e,(function(e){var l=s++,f=!1;u++,Mg(n,t,e).then((function(e){f||c||(c=!0,i(e))}),(function(e){f||c||(f=!0,o[l]=e,--u||a(new r(o,Ng)))}))})),--u||a(new r(o,Ng))}));return o.error&&a(o.value),n.promise}});var zg=Cr,Vg=Bv,Gg=o,Hg=se,qg=L,Kg=Pp,Wg=kg,Yg=Vg&&Vg.prototype;zg({target:"Promise",proto:!0,real:!0,forced:!!Vg&&Gg((function(){Yg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Kg(this,Hg("Promise")),r=qg(e);return this.then(r?function(r){return Wg(t,e()).then((function(){return r}))}:e,r?function(r){return Wg(t,e()).then((function(){throw r}))}:e)}});var Jg=re.Promise,Qg=ey,Xg=Iv;Cr({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Qg.f(this),r=Xg(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var $g=r(Jg),Zg=Cr,em=jr,tm=g([].reverse),rm=[1,2];Zg({target:"Array",proto:!0,forced:String(rm)===String(rm.reverse())},{reverse:function(){return em(this)&&(this.length=this.length),tm(this)}});var nm=af("Array").reverse,im=ue,am=nm,om=Array.prototype,sm=r((function(e){var t=e.reverse;return e===om||im(om,e)&&t===om.reverse?am:t})),um=Cr,cm=jr,lm=An,fm=te,hm=oi,dm=Wr,pm=$,vm=Zr,ym=dt,gm=Ps,mm=jn("slice"),_m=ym("species"),bm=Array,wm=Math.max;um({target:"Array",proto:!0,forced:!mm},{slice:function(e,t){var r,n,i,a=pm(this),o=dm(a),s=hm(e,o),u=hm(void 0===t?o:t,o);if(cm(a)&&(r=a.constructor,(lm(r)&&(r===bm||cm(r.prototype))||fm(r)&&null===(r=r[_m]))&&(r=void 0),r===bm||void 0===r))return gm(a,s,u);for(n=new(void 0===r?bm:r)(wm(u-s,0)),i=0;s<u;s++,i++)s in a&&vm(n,i,a[s]);return n.length=i,n}});var km=af("Array").slice,Sm=ue,xm=km,Em=Array.prototype,Tm=r((function(e){var t=e.slice;return e===Em||Sm(Em,e)&&t===Em.slice?xm:t})),Am=r(Ll),Lm=r(lf),Cm=r(Zf),Om=r(Dl);function Dm(e,t){var r=ch(e);if(lh){var n=lh(e);t&&(n=yh(n).call(n,(function(t){return gh(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pm(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?Ch(r=Dm(Object(i),!0)).call(r,(function(t){Nm(e,t,i[t])})):Nh?Wh(e,Nh(i)):Ch(n=Dm(Object(i))).call(n,(function(t){Yh(e,t,gh(i,t))}))}return e}function Rm(){Rm=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Yh||function(e,t,r){e[t]=r.value},i="function"==typeof Jh?Jh:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(A){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var a=t&&t.prototype instanceof h?t:h,o=Qh(a.prototype),s=new x(i||[]);return n(o,"_invoke",{value:b(e,r,s)}),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function h(){}function d(){}function p(){}var v={};u(v,a,(function(){return this}));var y=Xh&&Xh(Xh(E([])));y&&y!==t&&r.call(y,a)&&(v=y);var g=p.prototype=h.prototype=Qh(v);function m(e){var t;Ch(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,a,o,s){var u=l(e[n],e,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Ol(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,o,s)}),(function(e){i("throw",e,o,s)})):t.resolve(f).then((function(e){c.value=e,o(c)}),(function(e){return i("throw",e,o,s)}))}s(u.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return{value:void 0,done:!0}}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=w(o,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=l(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],Ch(e).call(e,k,this),this.reset(!0)}function E(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,n(g,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=u(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return $h?$h(e,p):(e.__proto__=p,u(e,s,"GeneratorFunction")),e.prototype=Qh(g),e},e.awrap=function(e){return{__await:e}},m(_.prototype),u(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,a){void 0===a&&(a=$g);var o=new _(c(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},m(g),u(g,s,"Generator"),u(g,a,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return sm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=E,x.prototype={constructor:x,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,Ch(t=this.tryEntries).call(t,S),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+Tm(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Mm(e){return(Mm="function"==typeof Jh&&"symbol"==typeof Am?function(e){return typeof e}:function(e){return e&&"function"==typeof Jh&&e.constructor===Jh&&e!==Jh.prototype?"symbol":typeof e})(e)}function Um(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(VB){return void r(VB)}s.done?t(u):$g.resolve(u).then(n,i)}function Im(e){return function(){var t=this,r=arguments;return new $g((function(n,i){var a=e.apply(t,r);function o(e){Um(a,n,i,o,s,"next",e)}function s(e){Um(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Bm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Yh(e,Km(n.key),n)}}function Fm(e,t,r){return t&&jm(e.prototype,t),r&&jm(e,r),Yh(e,"prototype",{writable:!1}),e}function Nm(e,t,r){return(t=Km(t))in e?Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zm(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Qh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Yh(e,"prototype",{writable:!1}),t&&Gm(e,t)}function Vm(e){var t;return(Vm=$h?Lm(t=Xh).call(t):function(e){return e.__proto__||Xh(e)})(e)}function Gm(e,t){var r;return(Gm=$h?Lm(r=$h).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function Hm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qm(e){var t=function(){if("undefined"==typeof Reflect||!Cm)return!1;if(Cm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Cm(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vm(e);if(t){var i=Vm(this).constructor;r=Cm(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Hm(e)}(this,r)}}function Km(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var r=e[Om];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ol(t)?t:String(t)}var Wm=Cr,Ym=fi.indexOf,Jm=_h,Qm=x([].indexOf),Xm=!!Qm&&1/Qm([1],1,-0)<0;Wm({target:"Array",proto:!0,forced:Xm||!Jm("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Xm?Qm(this,e,t)||0:Ym(this,e,t)}});var $m=af("Array").indexOf,Zm=ue,e_=$m,t_=Array.prototype,r_=r((function(e){var t=e.indexOf;return e===t_||Zm(t_,e)&&t===t_.indexOf?e_:t})),n_=Cr,i_=so.find,a_="find",o_=!0;a_ in[]&&Array(1)[a_]((function(){o_=!1})),n_({target:"Array",proto:!0,forced:o_},{find:function(e){return i_(this,e,arguments.length>1?arguments[1]:void 0)}});var s_=af("Array").find,u_=ue,c_=s_,l_=Array.prototype,f_=r((function(e){var t=e.find;return e===l_||u_(l_,e)&&t===l_.find?c_:t})),h_=O,d_=jr,p_=TypeError,v_=Object.getOwnPropertyDescriptor,y_=h_&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(VB){return VB instanceof TypeError}}(),g_=Le,m_=TypeError,__=function(e,t){if(!delete e[t])throw m_("Cannot delete property "+g_(t)+" of "+g_(e))},b_=Cr,w_=Qe,k_=oi,S_=Vr,x_=Wr,E_=y_?function(e,t){if(d_(e)&&!v_(e,"length").writable)throw p_("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},T_=Jr,A_=Mn,L_=Zr,C_=__,O_=jn("splice"),D_=Math.max,P_=Math.min;b_({target:"Array",proto:!0,forced:!O_},{splice:function(e,t){var r,n,i,a,o,s,u=w_(this),c=x_(u),l=k_(e,c),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=c-l):(r=f-2,n=P_(D_(S_(t),0),c-l)),T_(c+r-n),i=A_(u,n),a=0;a<n;a++)(o=l+a)in u&&L_(i,a,u[o]);if(i.length=n,r<n){for(a=l;a<c-n;a++)s=a+r,(o=a+n)in u?u[s]=u[o]:C_(u,s);for(a=c;a>c-n+r;a--)C_(u,a-1)}else if(r>n)for(a=c-n;a>l;a--)s=a+r-1,(o=a+n-1)in u?u[s]=u[o]:C_(u,s);for(a=0;a<r;a++)u[a+l]=arguments[a+2];return E_(u,c-n+r),i}});var R_=af("Array").splice,M_=ue,U_=R_,I_=Array.prototype,B_=r((function(e){var t=e.splice;return e===I_||M_(I_,e)&&t===I_.splice?U_:t}));Cr({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var j_=r(re.Number.isNaN),F_="\t\n\v\f\r \u2028\u2029\ufeff",N_=J,z_=ti,V_=F_,G_=g("".replace),H_=RegExp("^["+V_+"]+"),q_=RegExp("(^|[^"+V_+"])["+V_+"]+$"),K_=function(e){return function(t){var r=z_(N_(t));return 1&e&&(r=G_(r,H_,"")),2&e&&(r=G_(r,q_,"$1")),r}},W_={start:K_(1),end:K_(2),trim:K_(3)},Y_=a,J_=o,Q_=g,X_=ti,$_=W_.trim,Z_=F_,eb=Y_.parseInt,tb=Y_.Symbol,rb=tb&&tb.iterator,nb=/^[+-]?0x/i,ib=Q_(nb.exec),ab=8!==eb(Z_+"08")||22!==eb(Z_+"0x16")||rb&&!J_((function(){eb(Object(rb))}))?function(e,t){var r=$_(X_(e));return eb(r,t>>>0||(ib(nb,r)?16:10))}:eb;Cr({global:!0,forced:parseInt!=ab},{parseInt:ab});var ob=r(re.parseInt),sb=so.map;Cr({target:"Array",proto:!0,forced:!jn("map")},{map:function(e){return sb(this,e,arguments.length>1?arguments[1]:void 0)}});var ub=af("Array").map,cb=ue,lb=ub,fb=Array.prototype,hb=r((function(e){var t=e.map;return e===fb||cb(fb,e)&&t===fb.map?lb:t}));Cr({target:"Array",stat:!0},{isArray:jr});var db=r(re.Array.isArray),pb=O,vb=g,yb=R,gb=o,mb=ki,_b=ca,bb=M,wb=Qe,kb=q,Sb=Object.assign,xb=Object.defineProperty,Eb=vb([].concat),Tb=!Sb||gb((function(){if(pb&&1!==Sb({b:1},Sb(xb({},"a",{enumerable:!0,get:function(){xb(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=Sb({},e)[r]||mb(Sb({},t)).join("")!=n}))?function(e,t){for(var r=wb(e),n=arguments.length,i=1,a=_b.f,o=bb.f;n>i;)for(var s,u=kb(arguments[i++]),c=a?Eb(mb(u),a(u)):mb(u),l=c.length,f=0;l>f;)s=c[f++],pb&&!yb(o,u,s)||(r[s]=u[s]);return r}:Sb,Ab=Tb;Cr({target:"Object",stat:!0,arity:2,forced:Object.assign!==Ab},{assign:Ab});var Lb=r(re.Object.assign),Cb=r(Gl),Ob=r(Ed),Db=nr,Pb=Id,Rb=Xt,Mb=R,Ub=Qe,Ib=function(e,t,r,n){try{return n?t(Db(r)[0],r[1]):t(r)}catch(VB){Pb(e,"throw",VB)}},Bb=_d,jb=An,Fb=Wr,Nb=Zr,zb=Pd,Vb=Ed,Gb=Array,Hb=function(e){var t=Ub(e),r=jb(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Rb(i,n>2?arguments[2]:void 0));var o,s,u,c,l,f,h=Vb(t),d=0;if(!h||this===Gb&&Bb(h))for(o=Fb(t),s=r?new this(o):Gb(o);o>d;d++)f=a?i(t[d],d):t[d],Nb(s,d,f);else for(l=(c=zb(t,h)).next,s=r?new this:[];!(u=Mb(l,c)).done;d++)f=a?Ib(c,i,[u.value,d],!0):u.value,Nb(s,d,f);return s.length=d,s},qb=Hb;Cr({target:"Array",stat:!0,forced:!rg((function(e){Array.from(e)}))},{from:qb});var Kb=r(re.Array.from);function Wb(e,t){var r=ch(e);if(lh){var n=lh(e);t&&(n=yh(n).call(n,(function(t){return gh(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yb(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?Ch(r=Wb(Object(i),!0)).call(r,(function(t){Zb(e,t,i[t])})):Nh?Wh(e,Nh(i)):Ch(n=Wb(Object(i))).call(n,(function(t){Yh(e,t,gh(i,t))}))}return e}function Jb(e){return(Jb="function"==typeof Jh&&"symbol"==typeof Am?function(e){return typeof e}:function(e){return e&&"function"==typeof Jh&&e.constructor===Jh&&e!==Jh.prototype?"symbol":typeof e})(e)}function Qb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Yh(e,rw(n.key),n)}}function $b(e,t,r){return t&&Xb(e.prototype,t),r&&Xb(e,r),Yh(e,"prototype",{writable:!1}),e}function Zb(e,t,r){return(t=rw(t))in e?Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ew(e){return function(e){if(db(e))return tw(e)}(e)||function(e){if(void 0!==Jh&&null!=Ob(e)||null!=e["@@iterator"])return Kb(e)}(e)||function(e,t){var r;if(!e)return;if("string"==typeof e)return tw(e,t);var n=Tm(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Kb(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tw(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rw(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var r=e[Om];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ol(t)?t:String(t)}var nw={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,a||e,o),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Qh&&(n.prototype=Qh(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?Tm(n).call(n,1):n);return lh?oh(i).call(i,lh(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=new Array(a);i<a;i++)o[i]=n[i].fn;return o},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,a),!0;case 6:return l.fn.call(l.context,t,n,i,a,o),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,n);break;case 4:l[c].fn.call(l[c].context,t,n,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||o(this,a);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||i&&!s[u].once||n&&s[u].context!==n)&&c.push(s[u]);c.length?this._events[a]=1===c.length?c[0]:c:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&o(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(nw);var iw=r(nw.exports),aw=so.some;Cr({target:"Array",proto:!0,forced:!_h("some")},{some:function(e){return aw(this,e,arguments.length>1?arguments[1]:void 0)}});var ow=af("Array").some,sw=ue,uw=ow,cw=Array.prototype,lw=r((function(e){var t=e.some;return e===cw||sw(cw,e)&&t===cw.some?uw:t})),fw=Vr,hw=ti,dw=J,pw=RangeError,vw=g,yw=qr,gw=ti,mw=J,_w=vw((function(e){var t=hw(dw(this)),r="",n=fw(e);if(n<0||n==1/0)throw pw("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r})),bw=vw("".slice),ww=Math.ceil,kw=function(e){return function(t,r,n){var i,a,o=gw(mw(t)),s=yw(r),u=o.length,c=void 0===n?" ":gw(n);return s<=u||""==c?o:((a=_w(c,ww((i=s-u)/c.length))).length>i&&(a=bw(a,0,i)),e?o+a:a+o)}},Sw={start:kw(!1),end:kw(!0)},xw=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ce),Ew=Sw.start;Cr({target:"String",proto:!0,forced:xw},{padStart:function(e){return Ew(this,e,arguments.length>1?arguments[1]:void 0)}});var Tw,Aw=af("String").padStart,Lw=ue,Cw=Aw,Ow=String.prototype,Dw=r((function(e){var t=e.padStart;return"string"==typeof e||e===Ow||Lw(Ow,e)&&t===Ow.padStart?Cw:t})),Pw="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Rw=a,Mw=h,Uw=L,Iw=Pw,Bw=ce,jw=Ps,Fw=Mp,Nw=Rw.Function,zw=/MSIE .\./.test(Bw)||Iw&&((Tw=Rw.Bun.version.split(".")).length<3||0==Tw[0]&&(Tw[1]<3||3==Tw[1]&&0==Tw[2])),Vw=function(e,t){var r=t?2:1;return zw?function(n,i){var a=Fw(arguments.length,1)>r,o=Uw(n)?n:Nw(n),s=a?jw(arguments,r):[],u=a?function(){Mw(o,this,s)}:o;return t?e(u,i):e(u)}:e},Gw=Cr,Hw=a,qw=Vw(Hw.setInterval,!0);Gw({global:!0,bind:!0,forced:Hw.setInterval!==qw},{setInterval:qw});var Kw=Cr,Ww=a,Yw=Vw(Ww.setTimeout,!0);Kw({global:!0,bind:!0,forced:Ww.setTimeout!==Yw},{setTimeout:Yw});var Jw=r(re.setInterval),Qw=r(re.setTimeout),Xw=so.every;Cr({target:"Array",proto:!0,forced:!_h("every")},{every:function(e){return Xw(this,e,arguments.length>1?arguments[1]:void 0)}});var $w=af("Array").every,Zw=ue,ek=$w,tk=Array.prototype,rk=r((function(e){var t=e.every;return e===tk||Zw(tk,e)&&t===tk.every?ek:t})),nk=a,ik=o,ak=ti,ok=W_.trim,sk=F_,uk=g("".charAt),ck=nk.parseFloat,lk=nk.Symbol,fk=lk&&lk.iterator,hk=1/ck(sk+"-0")!=-1/0||fk&&!ik((function(){ck(Object(fk))}))?function(e){var t=ok(ak(e)),r=ck(t);return 0===r&&"-"==uk(t,0)?-0:r}:ck;Cr({global:!0,forced:parseFloat!=hk},{parseFloat:hk});var dk=r(re.parseFloat),pk=xu.PROPER,vk=o,yk=F_,gk=W_.trim;Cr({target:"String",proto:!0,forced:function(e){return vk((function(){return!!yk[e]()||"
"!=="
"[e]()||pk&&yk[e].name!==e}))}("trim")},{trim:function(){return gk(this)}});var mk=af("String").trim,_k=ue,bk=mk,wk=String.prototype,kk=r((function(e){var t=e.trim;return"string"==typeof e||e===wk||_k(wk,e)&&t===wk.trim?bk:t})),Sk=na,xk=Math.floor,Ek=function(e,t){var r=e.length,n=xk(r/2);return r<8?Tk(e,t):Ak(e,Ek(Sk(e,0,n),t),Ek(Sk(e,n),t),t)},Tk=function(e,t){for(var r,n,i=e.length,a=1;a<i;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},Ak=function(e,t,r,n){for(var i=t.length,a=r.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?n(t[o],r[s])<=0?t[o++]:r[s++]:o<i?t[o++]:r[s++];return e},Lk=Ek,Ck=ce.match(/firefox\/(\d+)/i),Ok=!!Ck&&+Ck[1],Dk=/MSIE|Trident/.test(ce),Pk=ce.match(/AppleWebKit\/(\d+)\./),Rk=!!Pk&&+Pk[1],Mk=Cr,Uk=g,Ik=Pe,Bk=Qe,jk=Wr,Fk=__,Nk=ti,zk=o,Vk=Lk,Gk=_h,Hk=Ok,qk=Dk,Kk=ye,Wk=Rk,Yk=[],Jk=Uk(Yk.sort),Qk=Uk(Yk.push),Xk=zk((function(){Yk.sort(void 0)})),$k=zk((function(){Yk.sort(null)})),Zk=Gk("sort"),eS=!zk((function(){if(Kk)return Kk<70;if(!(Hk&&Hk>3)){if(qk)return!0;if(Wk)return Wk<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Yk.push({k:t+n,v:r})}for(Yk.sort((function(e,t){return t.v-e.v})),n=0;n<Yk.length;n++)t=Yk[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));Mk({target:"Array",proto:!0,forced:Xk||!$k||!Zk||!eS},{sort:function(e){void 0!==e&&Ik(e);var t=Bk(this);if(eS)return void 0===e?Jk(t):Jk(t,e);var r,n,i=[],a=jk(t);for(n=0;n<a;n++)n in t&&Qk(i,t[n]);for(Vk(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Nk(t)>Nk(r)?1:-1}}(e)),r=jk(i),n=0;n<r;)t[n]=i[n++];for(;n<a;)Fk(t,n++);return t}});var tS=af("Array").sort,rS=ue,nS=tS,iS=Array.prototype,aS=r((function(e){var t=e.sort;return e===iS||rS(iS,e)&&t===iS.sort?nS:t})),oS=Cr,sS=Date,uS=g(sS.prototype.getTime);oS({target:"Date",stat:!0},{now:function(){return uS(new sS)}});var cS,lS=r(re.Date.now),fS="undefined"!=typeof window&&window.location&&r_(cS=window.location.href).call(cS,"xgplayerdebugger=1")>-1,hS="color: #525252; background-color: #90ee90;",dS="color: #525252; background-color: red;",pS="color: #525252; background-color: yellow; ",vS="%c[xgplayer]",yS={config:{debug:fS?3:0},logInfo:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];this.config.debug>=3&&(r=console).log.apply(r,oh(t=[vS,hS,e]).call(t,i))},logWarn:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];this.config.debug>=1&&(r=console).warn.apply(r,oh(t=[vS,pS,e]).call(t,i))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];(r=console)[n].apply(r,oh(t=[vS,dS,e]).call(t,a))}}},gS=function(){function e(t){Qb(this,e),this.bufferedList=t}return $b(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),mS={};mS.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=document.createElement(t);return a.className=i,a.innerHTML=r,Ch(e=ch(n)).call(e,(function(e){var r=e,i=n[e];"video"===t||"audio"===t||"live-video"===t?i&&a.setAttribute(r,i):a.setAttribute(r,i)})),a},mS.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var i=n.children;if(n=null,i.length>0){var a;if(i=i[0],r&&mS.addClass(i,r),t)Ch(a=ch(t)).call(a,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(o){return yS.logError("util.createDomFromHtml",o),null}},mS.hasClass=function(e,t){if(!e||!t)return!1;try{return lw(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===Jb(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},mS.addClass=function(e,t){if(e&&t)try{var r;Ch(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(n){mS.hasClass(e,t)||(e.className&&"object"===Jb(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},mS.removeClass=function(e,t){if(e&&t)try{var r;Ch(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(i){var n;if(mS.hasClass(e,t))Ch(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===Jb(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},mS.toggleClass=function(e,t){var r;e&&Ch(r=t.split(/\s+/g)).call(r,(function(t){mS.hasClass(e,t)?mS.removeClass(e,t):mS.addClass(e,t)}))},mS.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===mS.typeOf(e[r]))t.push(e[r]);else if("Object"===mS.typeOf(e[r])){var n;hb(n=ch(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},mS.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){yS.logError("util.findDom",n),0===r_(r).call(r,"#")&&(e=t.getElementById(Tm(r).call(r,1)))}return e},mS.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},mS.padStart=function(e,t,r){for(var n=String(r),i=t>>0,a=Math.ceil(i/n.length),o=[],s=String(e);a--;)o.push(n);return o.join("").substring(0,i-s.length)+s},mS.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=Dw(mS).call(mS,Math.floor(e/3600),2,0),r=Dw(mS).call(mS,Math.floor((e-3600*t)/60),2,0),n=Dw(mS).call(mS,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},mS.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},mS.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},mS.deepCopy=function(e,t){var r;if("Object"===mS.typeOf(t)&&"Object"===mS.typeOf(e))return Ch(r=ch(t)).call(r,(function(r){if("Object"!==mS.typeOf(t[r])||t[r]instanceof Node)if("Array"===mS.typeOf(t[r])){var n;e[r]="Array"===mS.typeOf(e[r])?oh(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:mS.deepCopy(e[r],t[r])})),e},mS.deepMerge=function(e,t){var r;return hb(r=ch(t)).call(r,(function(r){var n;"Array"===mS.typeOf(t[r])&&"Array"===mS.typeOf(e[r])?"Array"===mS.typeOf(e[r])&&(n=e[r]).push.apply(n,ew(t[r])):mS.typeOf(e[r])!==mS.typeOf(t[r])||null===e[r]||"Object"!==mS.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):mS.deepMerge(e[r],t[r])})),e},mS.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},mS.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Ch(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},mS.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=Jw(Lm(r).call(r,e),n))},mS.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},mS.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=Qw((function(){t(),mS.clearTimeout(e,n)}),r);return e._timers.push(n),n},mS.clearTimeout=function(e,t){var r=e._timers;if("Array"===mS.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){B_(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},mS.clearAllTimers=function(e){var t=e._timers;"Array"===mS.typeOf(t)&&(hb(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},mS.createImgBtn=function(e,t,r,n){var i,a,o,s,u,c,l,f,h,d,p,v,y=mS.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(y.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(rk(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(r_(r).call(r,e)>-1&&r_(n).call(n,e)>-1)||(l=dk(kk(t=Tm(r).call(r,0,r_(r).call(r,e))).call(t)),f=dk(kk(i=Tm(n).call(n,0,r_(n).call(n,e))).call(i)),h=e,!1)})),y.style.width=oh(a="".concat(l)).call(a,h),y.style.height=oh(o="".concat(f)).call(o,h),y.style.backgroundSize=oh(s=oh(u=oh(c="".concat(l)).call(c,h," ")).call(u,f)).call(s,h),y.style.margin="start"===e?oh(d=oh(p=oh(v="-".concat(f/2)).call(v,h," auto auto -")).call(p,l/2)).call(d,h):"auto 5px auto 5px");return y},mS.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(ob(e,16))})),oh(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},mS.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},mS.checkIsFunction=function(e){return e&&"function"==typeof e},mS.checkIsObject=function(e){return null!==e&&"object"===Jb(e)},mS.hide=function(e){e.style.display="none"},mS.show=function(e,t){e.style.display=t||"block"},mS.isUndefined=function(e){if(null==e)return!0},mS.isNotNull=function(e){return!(null==e)},mS.setStyleFromCsstext=function(e,t){if(t)if("String"===mS.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");hb(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;hb(n=ch(t)).call(n,(function(r){e.style[r]=t[r]}))}},mS.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var i=n.replace(/\s+/g,"").split(";"),a={},o={};return hb(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var r=0,n=t.length;r<n;r++)if(r_(e).call(e,t[r])>-1)return!0;return!1}(t[0],r)?o[t[0]]=t[1]:a[t[0]]=t[1])}})),e.setAttribute("style",""),hb(t=ch(o)).call(t,(function(t){e.style[t]=o[t]})),a},mS.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return hb(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},mS.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},mS.stopPropagation=function(e){e&&e.stopPropagation()},mS.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},mS.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},mS.checkTouchSupport=function(){return"ontouchstart"in window},mS.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});aS(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(t)for(var a=0;a<r.length;a++){var o=i.length;if(o){var s=i[o-1].end;r[a].start-s<t?r[a].end>s&&(i[o-1].end=r[a].end):i.push(r[a])}else i.push(r[a])}else i=r;return new gS(i)},mS.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},mS.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},mS.getHostFromUrl=function(e){if("String"!==mS.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},mS.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},mS.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},mS.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},mS.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=ob(e)}catch(r){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=ob(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},mS.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},mS.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},mS.createPositionBar=function(e,t){var r=mS.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},mS.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:oh(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=ch(n);return Ch(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),a=oh(t="".concat(e,"(")).call(t,n[e],")");i.test(r)?(i.lastIndex=-1,r=r.replace(i,a)):r+="".concat(a," ")})),r},mS.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},mS.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var i=1;i<r;i++)if(e>t[i-1].end&&e<=t[i].end){n=i;break}return n},mS.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:mS.getIndexByTime(e,t))<0)return-1;var i=t.length,a=t[n],o=a.start,s=a.end,u=a.cTime,c=a.offset;return e<o?u:e>=o&&e<=s?e-c:e>s&&n>=i-1?s:-1},mS.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var i=t[r].start;return r-1<0?i+e:i+(e-t[r-1].duration)}return e};var _S="3.0.21-rc.21",bS={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},wS=$b((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};Qb(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,a=r.mediaError?r.mediaError:t.media.error||{},o=t.duration,s=t.currentTime,u=t.ended,c=t.src,l=t.currentSrc,f=t.media,h=f.readyState,d=f.networkState,p=r.errorCode||a.code;bS[p]&&(p=bS[p]);var v={playerVersion:_S,currentTime:s,duration:o,ended:u,readyState:h,networkState:d,src:c||l,errorType:r.errorType,errorCode:p,message:r.errorMessage||a.message,mediaError:a,originError:r.originError?r.originError.stack:"",host:mS.getHostFromUrl(c||l)};return r.ext&&hb(i=ch(r.ext)).call(i,(function(e){v[e]=r.ext[e]})),v}if(arguments.length>1){for(var y={playerVersion:_S,domain:document.domain},g=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],m=0;m<arguments.length;m++)y[g[m]]=arguments[m];return y.ex=n?(n[arguments[0]]||{}).msg:"",y}}));function kS(e,t,r){for(var n,i=arguments.length,a=new Array(i>3?i-3:0),o=3;o<i;o++)a[o-3]=arguments[o];var s,u=t.call.apply(t,oh(n=[e]).call(n,a));r&&"function"==typeof r&&(u&&u.then?u.then((function(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];r.call.apply(r,oh(t=[e]).call(t,i))})):r.call.apply(r,oh(s=[e]).call(s,a)))}function SS(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),Lm(r=function(){var r,i=arguments,a=this;if(n.pre)try{var o,s;(s=n.pre).call.apply(s,oh(o=[this]).call(o,Tm(Array.prototype).call(arguments)))}catch(v){var u,c;throw v.message=oh(u=oh(c="[pluginName: ".concat(this.pluginName,":")).call(c,e,":pre error] >> ")).call(u,v.message),v}if(this.__hooks&&this.__hooks[e])try{var l,f=function(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),a=3;a<n;a++)i[a-3]=arguments[a];if(e.__hooks&&db(e.__hooks[t])){var o,s=e.__hooks[t],u=-1,c=function e(t,r,n){for(var i,a,o=arguments.length,c=new Array(o>3?o-3:0),l=3;l<o;l++)c[l-3]=arguments[l];if(u++,0===s.length||u===s.length)return n.call.apply(n,oh(a=[t,t]).call(a,c));var f,h=s[u],d=h.call.apply(h,oh(i=[t,t]).call(i,c));return d&&d.then?d.then((function(i){var a;return!1===i?null:e.apply(void 0,oh(a=[t,r,n]).call(a,c))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==d?e.apply(void 0,oh(f=[t,r,n]).call(f,c)):void 0};return c.apply(void 0,oh(o=[e,t,r]).call(o,i))}var l;return r.call.apply(r,oh(l=[e,e]).call(l,i))}(this,e,t);if(f)if(f.then)f.then((function(e){var r;!1!==e&&kS.apply(void 0,oh(r=[a,t,n.next]).call(r,ew(i)))})).catch((function(e){throw e}));else kS.apply(void 0,oh(l=[this,t,n.next]).call(l,Tm(Array.prototype).call(arguments)));else if(void 0===f){var h;kS.apply(void 0,oh(h=[this,t,n.next]).call(h,Tm(Array.prototype).call(arguments)))}}catch(v){var d,p;throw v.message=oh(d=oh(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(d,v.message),v}else kS.apply(void 0,oh(r=[this,t,n.next]).call(r,Tm(Array.prototype).call(arguments)))}).call(r,this)}function xS(e,t){var r=this.__hooks;if(!r||!db(r[e]))return-1;for(var n=r[e],i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function ES(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(db(r[e])||(r[e]=[]),-1===xS.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function TS(e,t){var r=this.__hooks;if(r)if(db(r[e])){var n=r[e],i=xS.call(this,e,t);-1!==i&&B_(n).call(n,i,1)}else r[e]&&(r[e]=null)}function AS(e,t){var r;yS.logError(oh(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var LS=function(){function e(t){Qb(this,e),mS.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&hb(t).call(t,(function(t){e.__hooks[t]=null})),Yh(e,"hooks",{get:function(){var t;return e.__hooks&&hb(t=ch(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return $b(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=mS.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):db(e)&&Ch(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):AS(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):db(e)&&Ch(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):AS(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):db(e)&&Ch(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):AS(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;Ch(e=["__events","__onceEvents"]).call(e,(function(e){var r;Ch(r=ch(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];(r=this.player).emit.apply(r,oh(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=Yb(Yb({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return SS.call.apply(SS,oh(r=[this]).call(r,Tm(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return ES.call.apply(ES,oh(r=[this]).call(r,Tm(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return TS.call.apply(TS,oh(r=[this]).call(r,Tm(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return r&&(t.pluginName=r),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,r=this.player,n=this.pluginName;this.offAll(),mS.clearAllTimers(this),mS.checkIsFunction(this.destroy)&&this.destroy(),hb(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Yh(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&Yh(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),CS=Cr,OS=so.findIndex,DS="findIndex",PS=!0;DS in[]&&Array(1)[DS]((function(){PS=!1})),CS({target:"Array",proto:!0,forced:PS},{findIndex:function(e){return OS(this,e,arguments.length>1?arguments[1]:void 0)}});var RS=af("Array").findIndex,MS=ue,US=RS,IS=Array.prototype,BS=r((function(e){var t=e.findIndex;return e===IS||MS(IS,e)&&t===IS.findIndex?US:t})),jS=o,FS=dt("iterator"),NS=!jS((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[FS]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),zS=g,VS=2147483647,GS=/[^\0-\u007E]/,HS=/[.\u3002\uFF0E\uFF61]/g,qS="Overflow: input needs wider integers to process",KS=RangeError,WS=zS(HS.exec),YS=Math.floor,JS=String.fromCharCode,QS=zS("".charCodeAt),XS=zS([].join),$S=zS([].push),ZS=zS("".replace),ex=zS("".split),tx=zS("".toLowerCase),rx=function(e){return e+22+75*(e<26)},nx=function(e,t,r){var n=0;for(e=r?YS(e/700):e>>1,e+=YS(e/t);e>455;)e=YS(e/35),n+=36;return YS(n+36*e/(e+38))},ix=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=QS(e,r++);if(i>=55296&&i<=56319&&r<n){var a=QS(e,r++);56320==(64512&a)?$S(t,((1023&i)<<10)+(1023&a)+65536):($S(t,i),r--)}else $S(t,i)}return t}(e);var r,n,i=e.length,a=128,o=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&$S(t,JS(n));var u=t.length,c=u;for(u&&$S(t,"-");c<i;){var l=VS;for(r=0;r<e.length;r++)(n=e[r])>=a&&n<l&&(l=n);var f=c+1;if(l-a>YS((VS-o)/f))throw KS(qS);for(o+=(l-a)*f,a=l,r=0;r<e.length;r++){if((n=e[r])<a&&++o>VS)throw KS(qS);if(n==a){for(var h=o,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(h<p)break;var v=h-p,y=36-p;$S(t,JS(rx(p+v%y))),h=YS(v/y),d+=36}$S(t,JS(rx(h))),s=nx(o,f,c==u),o=0,c++}}o++,a++}return XS(t,"")},ax=fa,ox=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:ax(e,n,t[n],r);return e},sx=Cr,ux=a,cx=R,lx=g,fx=O,hx=NS,dx=fa,px=da,vx=ox,yx=Ba,gx=Qu,mx=Za,_x=Ap,bx=L,wx=Ze,kx=Xt,Sx=cn,xx=nr,Ex=te,Tx=ti,Ax=Wi,Lx=N,Cx=Pd,Ox=Ed,Dx=Mp,Px=Lk,Rx=dt("iterator"),Mx="URLSearchParams",Ux=Mx+"Iterator",Ix=mx.set,Bx=mx.getterFor(Mx),jx=mx.getterFor(Ux),Fx=Object.getOwnPropertyDescriptor,Nx=function(e){if(!fx)return ux[e];var t=Fx(ux,e);return t&&t.value},zx=Nx("fetch"),Vx=Nx("Request"),Gx=Nx("Headers"),Hx=Vx&&Vx.prototype,qx=Gx&&Gx.prototype,Kx=ux.RegExp,Wx=ux.TypeError,Yx=ux.decodeURIComponent,Jx=ux.encodeURIComponent,Qx=lx("".charAt),Xx=lx([].join),$x=lx([].push),Zx=lx("".replace),eE=lx([].shift),tE=lx([].splice),rE=lx("".split),nE=lx("".slice),iE=/\+/g,aE=Array(4),oE=function(e){return aE[e-1]||(aE[e-1]=Kx("((?:%[\\da-f]{2}){"+e+"})","gi"))},sE=function(e){try{return Yx(e)}catch(VB){return e}},uE=function(e){var t=Zx(e,iE," "),r=4;try{return Yx(t)}catch(VB){for(;r;)t=Zx(t,oE(r--),sE);return t}},cE=/[!'()~]|%20/g,lE={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},fE=function(e){return lE[e]},hE=function(e){return Zx(Jx(e),cE,fE)},dE=gx((function(e,t){Ix(this,{type:Ux,iterator:Cx(Bx(e).entries),kind:t})}),"Iterator",(function(){var e=jx(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),pE=function(e){this.entries=[],this.url=null,void 0!==e&&(Ex(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Qx(e,0)?nE(e,1):e:Tx(e)))};pE.prototype={type:Mx,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,u=Ox(e);if(u)for(r=(t=Cx(e,u)).next;!(n=cx(r,t)).done;){if(a=(i=Cx(xx(n.value))).next,(o=cx(a,i)).done||(s=cx(a,i)).done||!cx(a,i).done)throw Wx("Expected sequence with length 2");$x(this.entries,{key:Tx(o.value),value:Tx(s.value)})}else for(var c in e)wx(e,c)&&$x(this.entries,{key:c,value:Tx(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=rE(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=rE(t,"="),$x(this.entries,{key:uE(eE(r)),value:uE(Xx(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],$x(r,hE(e.key)+"="+hE(e.value));return Xx(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var vE=function(){_x(this,yE);var e=Ix(this,new pE(arguments.length>0?arguments[0]:void 0));fx||(this.length=e.entries.length)},yE=vE.prototype;if(vx(yE,{append:function(e,t){Dx(arguments.length,2);var r=Bx(this);$x(r.entries,{key:Tx(e),value:Tx(t)}),fx||this.length++,r.updateURL()},delete:function(e){Dx(arguments.length,1);for(var t=Bx(this),r=t.entries,n=Tx(e),i=0;i<r.length;)r[i].key===n?tE(r,i,1):i++;fx||(this.length=r.length),t.updateURL()},get:function(e){Dx(arguments.length,1);for(var t=Bx(this).entries,r=Tx(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Dx(arguments.length,1);for(var t=Bx(this).entries,r=Tx(e),n=[],i=0;i<t.length;i++)t[i].key===r&&$x(n,t[i].value);return n},has:function(e){Dx(arguments.length,1);for(var t=Bx(this).entries,r=Tx(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Dx(arguments.length,1);for(var r,n=Bx(this),i=n.entries,a=!1,o=Tx(e),s=Tx(t),u=0;u<i.length;u++)(r=i[u]).key===o&&(a?tE(i,u--,1):(a=!0,r.value=s));a||$x(i,{key:o,value:s}),fx||(this.length=i.length),n.updateURL()},sort:function(){var e=Bx(this);Px(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Bx(this).entries,n=kx(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new dE(this,"keys")},values:function(){return new dE(this,"values")},entries:function(){return new dE(this,"entries")}},{enumerable:!0}),dx(yE,Rx,yE.entries,{name:"entries"}),dx(yE,"toString",(function(){return Bx(this).serialize()}),{enumerable:!0}),fx&&px(yE,"size",{get:function(){return Bx(this).entries.length},configurable:!0,enumerable:!0}),yx(vE,Mx),sx({global:!0,constructor:!0,forced:!hx},{URLSearchParams:vE}),!hx&&bx(Gx)){var gE=lx(qx.has),mE=lx(qx.set),_E=function(e){if(Ex(e)){var t,r=e.body;if(Sx(r)===Mx)return t=e.headers?new Gx(e.headers):new Gx,gE(t,"content-type")||mE(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ax(e,{body:Lx(0,Tx(r)),headers:Lx(0,t)})}return e};if(bx(zx)&&sx({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return zx(e,arguments.length>1?_E(arguments[1]):{})}}),bx(Vx)){var bE=function(e){return _x(this,Hx),new Vx(e,arguments.length>1?_E(arguments[1]):{})};Hx.constructor=bE,bE.prototype=Hx,sx({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:bE})}}var wE,kE=Cr,SE=O,xE=NS,EE=a,TE=Xt,AE=g,LE=fa,CE=da,OE=Ap,DE=Ze,PE=Tb,RE=Hb,ME=na,UE=_l.codeAt,IE=function(e){var t,r,n=[],i=ex(ZS(tx(e),HS,"."),".");for(t=0;t<i.length;t++)r=i[t],$S(n,WS(GS,r)?"xn--"+ix(r):r);return XS(n,".")},BE=ti,jE=Ba,FE=Mp,NE={URLSearchParams:vE,getState:Bx},zE=Za,VE=zE.set,GE=zE.getterFor("URL"),HE=NE.URLSearchParams,qE=NE.getState,KE=EE.URL,WE=EE.TypeError,YE=EE.parseInt,JE=Math.floor,QE=Math.pow,XE=AE("".charAt),$E=AE(/./.exec),ZE=AE([].join),eT=AE(1..toString),tT=AE([].pop),rT=AE([].push),nT=AE("".replace),iT=AE([].shift),aT=AE("".split),oT=AE("".slice),sT=AE("".toLowerCase),uT=AE([].unshift),cT="Invalid scheme",lT="Invalid host",fT="Invalid port",hT=/[a-z]/i,dT=/[\d+-.a-z]/i,pT=/\d/,vT=/^0x/i,yT=/^[0-7]+$/,gT=/^\d+$/,mT=/^[\da-f]+$/i,_T=/[\0\t\n\r #%/:<>?@[\\\]^|]/,bT=/[\0\t\n\r #/:<>?@[\\\]^|]/,wT=/^[\u0000-\u0020]+/,kT=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ST=/[\t\n\r]/g,xT=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)uT(t,e%256),e=JE(e/256);return ZE(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=eT(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},ET={},TT=PE({},ET,{" ":1,'"':1,"<":1,">":1,"`":1}),AT=PE({},TT,{"#":1,"?":1,"{":1,"}":1}),LT=PE({},AT,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),CT=function(e,t){var r=UE(e,0);return r>32&&r<127&&!DE(t,e)?e:encodeURIComponent(e)},OT={ftp:21,file:null,http:80,https:443,ws:80,wss:443},DT=function(e,t){var r;return 2==e.length&&$E(hT,XE(e,0))&&(":"==(r=XE(e,1))||!t&&"|"==r)},PT=function(e){var t;return e.length>1&&DT(oT(e,0,2))&&(2==e.length||"/"===(t=XE(e,2))||"\\"===t||"?"===t||"#"===t)},RT=function(e){return"."===e||"%2e"===sT(e)},MT={},UT={},IT={},BT={},jT={},FT={},NT={},zT={},VT={},GT={},HT={},qT={},KT={},WT={},YT={},JT={},QT={},XT={},$T={},ZT={},eA={},tA=function(e,t,r){var n,i,a,o=BE(e);if(t){if(i=this.parse(o))throw WE(i);this.searchParams=null}else{if(void 0!==r&&(n=new tA(r,!0)),i=this.parse(o,null,n))throw WE(i);(a=qE(new HE)).bindURL(this),this.searchParams=a}};tA.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,u=this,c=t||MT,l=0,f="",h=!1,d=!1,p=!1;for(e=BE(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=nT(e,wT,""),e=nT(e,kT,"$1")),e=nT(e,ST,""),n=RE(e);l<=n.length;){switch(i=n[l],c){case MT:if(!i||!$E(hT,i)){if(t)return cT;c=IT;continue}f+=sT(i),c=UT;break;case UT:if(i&&($E(dT,i)||"+"==i||"-"==i||"."==i))f+=sT(i);else{if(":"!=i){if(t)return cT;f="",c=IT,l=0;continue}if(t&&(u.isSpecial()!=DE(OT,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&OT[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?c=WT:u.isSpecial()&&r&&r.scheme==u.scheme?c=BT:u.isSpecial()?c=zT:"/"==n[l+1]?(c=jT,l++):(u.cannotBeABaseURL=!0,rT(u.path,""),c=$T)}break;case IT:if(!r||r.cannotBeABaseURL&&"#"!=i)return cT;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=ME(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,c=eA;break}c="file"==r.scheme?WT:FT;continue;case BT:if("/"!=i||"/"!=n[l+1]){c=FT;continue}c=VT,l++;break;case jT:if("/"==i){c=GT;break}c=XT;continue;case FT:if(u.scheme=r.scheme,i==wE)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ME(r.path),u.query=r.query;else if("/"==i||"\\"==i&&u.isSpecial())c=NT;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ME(r.path),u.query="",c=ZT;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ME(r.path),u.path.length--,c=XT;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ME(r.path),u.query=r.query,u.fragment="",c=eA}break;case NT:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,c=XT;continue}c=GT}else c=VT;break;case zT:if(c=VT,"/"!=i||"/"!=XE(f,l+1))continue;l++;break;case VT:if("/"!=i&&"\\"!=i){c=GT;continue}break;case GT:if("@"==i){h&&(f="%40"+f),h=!0,a=RE(f);for(var v=0;v<a.length;v++){var y=a[v];if(":"!=y||p){var g=CT(y,LT);p?u.password+=g:u.username+=g}else p=!0}f=""}else if(i==wE||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(h&&""==f)return"Invalid authority";l-=RE(f).length+1,f="",c=HT}else f+=i;break;case HT:case qT:if(t&&"file"==u.scheme){c=JT;continue}if(":"!=i||d){if(i==wE||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return lT;if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(o=u.parseHost(f))return o;if(f="",c=QT,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),f+=i}else{if(""==f)return lT;if(o=u.parseHost(f))return o;if(f="",c=KT,t==qT)return}break;case KT:if(!$E(pT,i)){if(i==wE||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=f){var m=YE(f,10);if(m>65535)return fT;u.port=u.isSpecial()&&m===OT[u.scheme]?null:m,f=""}if(t)return;c=QT;continue}return fT}f+=i;break;case WT:if(u.scheme="file","/"==i||"\\"==i)c=YT;else{if(!r||"file"!=r.scheme){c=XT;continue}if(i==wE)u.host=r.host,u.path=ME(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=ME(r.path),u.query="",c=ZT;else{if("#"!=i){PT(ZE(ME(n,l),""))||(u.host=r.host,u.path=ME(r.path),u.shortenPath()),c=XT;continue}u.host=r.host,u.path=ME(r.path),u.query=r.query,u.fragment="",c=eA}}break;case YT:if("/"==i||"\\"==i){c=JT;break}r&&"file"==r.scheme&&!PT(ZE(ME(n,l),""))&&(DT(r.path[0],!0)?rT(u.path,r.path[0]):u.host=r.host),c=XT;continue;case JT:if(i==wE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&DT(f))c=XT;else if(""==f){if(u.host="",t)return;c=QT}else{if(o=u.parseHost(f))return o;if("localhost"==u.host&&(u.host=""),t)return;f="",c=QT}continue}f+=i;break;case QT:if(u.isSpecial()){if(c=XT,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=wE&&(c=XT,"/"!=i))continue}else u.fragment="",c=eA;else u.query="",c=ZT;break;case XT:if(i==wE||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=sT(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||rT(u.path,"")):RT(f)?"/"==i||"\\"==i&&u.isSpecial()||rT(u.path,""):("file"==u.scheme&&!u.path.length&&DT(f)&&(u.host&&(u.host=""),f=XE(f,0)+":"),rT(u.path,f)),f="","file"==u.scheme&&(i==wE||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)iT(u.path);"?"==i?(u.query="",c=ZT):"#"==i&&(u.fragment="",c=eA)}else f+=CT(i,AT);break;case $T:"?"==i?(u.query="",c=ZT):"#"==i?(u.fragment="",c=eA):i!=wE&&(u.path[0]+=CT(i,ET));break;case ZT:t||"#"!=i?i!=wE&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":CT(i,ET)):(u.fragment="",c=eA);break;case eA:i!=wE&&(u.fragment+=CT(i,TT))}l++}},parseHost:function(e){var t,r,n;if("["==XE(e,0)){if("]"!=XE(e,e.length-1))return lT;if(t=function(e){var t,r,n,i,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return XE(e,f)};if(":"==h()){if(":"!=XE(e,1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=r=0;r<4&&$E(mT,h());)t=16*t+YE(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,c>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!$E(pT,h()))return;for(;$E(pT,h());){if(a=YE(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(o=c-l,c=7;0!=c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!=c)return;return u}(oT(e,1,-1)),!t)return lT;this.host=t}else if(this.isSpecial()){if(e=IE(e),$E(_T,e))return lT;if(t=function(e){var t,r,n,i,a,o,s,u=aT(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=u[n]))return e;if(a=10,i.length>1&&"0"==XE(i,0)&&(a=$E(vT,i)?16:8,i=oT(i,8==a?1:2)),""===i)o=0;else{if(!$E(10==a?gT:8==a?yT:mT,i))return e;o=YE(i,a)}rT(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=QE(256,5-t))return null}else if(o>255)return null;for(s=tT(r),n=0;n<r.length;n++)s+=r[n]*QE(256,3-n);return s}(e),null===t)return lT;this.host=t}else{if($E(bT,e))return lT;for(t="",r=RE(e),n=0;n<r.length;n++)t+=CT(r[n],ET);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return DE(OT,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&DT(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=xT(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+ZE(o,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw WE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new rA(e.path[0]).origin}catch(VB){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+xT(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(BE(e)+":",MT)},getUsername:function(){return this.username},setUsername:function(e){var t=RE(BE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=CT(t[r],LT)}},getPassword:function(){return this.password},setPassword:function(e){var t=RE(BE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=CT(t[r],LT)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?xT(e):xT(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,HT)},getHostname:function(){var e=this.host;return null===e?"":xT(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,qT)},getPort:function(){var e=this.port;return null===e?"":BE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=BE(e))?this.port=null:this.parse(e,KT))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ZE(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,QT))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=BE(e))?this.query=null:("?"==XE(e,0)&&(e=oT(e,1)),this.query="",this.parse(e,ZT)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=BE(e))?("#"==XE(e,0)&&(e=oT(e,1)),this.fragment="",this.parse(e,eA)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var rA=function(e){var t=OE(this,nA),r=FE(arguments.length,1)>1?arguments[1]:void 0,n=VE(t,new tA(e,!1,r));SE||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},nA=rA.prototype,iA=function(e,t){return{get:function(){return GE(this)[e]()},set:t&&function(e){return GE(this)[t](e)},configurable:!0,enumerable:!0}};if(SE&&(CE(nA,"href",iA("serialize","setHref")),CE(nA,"origin",iA("getOrigin")),CE(nA,"protocol",iA("getProtocol","setProtocol")),CE(nA,"username",iA("getUsername","setUsername")),CE(nA,"password",iA("getPassword","setPassword")),CE(nA,"host",iA("getHost","setHost")),CE(nA,"hostname",iA("getHostname","setHostname")),CE(nA,"port",iA("getPort","setPort")),CE(nA,"pathname",iA("getPathname","setPathname")),CE(nA,"search",iA("getSearch","setSearch")),CE(nA,"searchParams",iA("getSearchParams")),CE(nA,"hash",iA("getHash","setHash"))),LE(nA,"toJSON",(function(){return GE(this).serialize()}),{enumerable:!0}),LE(nA,"toString",(function(){return GE(this).serialize()}),{enumerable:!0}),KE){var aA=KE.createObjectURL,oA=KE.revokeObjectURL;aA&&LE(rA,"createObjectURL",TE(aA,KE)),oA&&LE(rA,"revokeObjectURL",TE(oA,KE))}jE(rA,"URL"),kE({global:!0,constructor:!0,forced:!xE,sham:!SE},{URL:rA});var sA=Cr,uA=o,cA=Mp,lA=ti,fA=NS,hA=se("URL");sA({target:"URL",stat:!0,forced:!(fA&&uA((function(){hA.canParse()})))},{canParse:function(e){var t=cA(arguments.length,1),r=lA(e),n=t<2||void 0===arguments[1]?void 0:lA(arguments[1]);try{return!!new hA(r,n)}catch(VB){return!1}}});var dA=r(re.URL),pA=re,vA=h;pA.JSON||(pA.JSON={stringify:JSON.stringify});var yA=function(e,t,r){return vA(pA.JSON.stringify,null,arguments)},gA=r(yA),mA=te,_A=w,bA=dt("match"),wA=function(e){var t;return mA(e)&&(void 0!==(t=e[bA])?!!t:"RegExp"==_A(e))},kA=TypeError,SA=dt("match"),xA=fi.includes;Cr({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return xA(this,e,arguments.length>1?arguments[1]:void 0)}});var EA=af("Array").includes,TA=Cr,AA=function(e){if(wA(e))throw kA("The method doesn't accept regular expressions");return e},LA=J,CA=ti,OA=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[SA]=!1,"/./"[e](t)}catch(n){}}return!1},DA=g("".indexOf);TA({target:"String",proto:!0,forced:!OA("includes")},{includes:function(e){return!!~DA(CA(LA(this)),CA(AA(e)),arguments.length>1?arguments[1]:void 0)}});var PA=af("String").includes,RA=ue,MA=EA,UA=PA,IA=Array.prototype,BA=String.prototype,jA=r((function(e){var t=e.includes;return e===IA||RA(IA,e)&&t===IA.includes?MA:"string"==typeof e||e===BA||RA(BA,e)&&t===BA.includes?UA:t})),FA={exports:{}},NA=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),zA=o,VA=te,GA=w,HA=NA,qA=Object.isExtensible,KA=zA((function(){qA(1)}))||HA?function(e){return!!VA(e)&&((!HA||"ArrayBuffer"!=GA(e))&&(!qA||qA(e)))}:qA,WA=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),YA=Cr,JA=g,QA=hi,XA=te,$A=Ze,ZA=$t.f,eL=Yi,tL=Xi,rL=KA,nL=WA,iL=!1,aL=it("meta"),oL=0,sL=function(e){ZA(e,aL,{value:{objectID:"O"+oL++,weakData:{}}})},uL=FA.exports={enable:function(){uL.enable=function(){},iL=!0;var e=eL.f,t=JA([].splice),r={};r[aL]=1,e(r).length&&(eL.f=function(r){for(var n=e(r),i=0,a=n.length;i<a;i++)if(n[i]===aL){t(n,i,1);break}return n},YA({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:tL.f}))},fastKey:function(e,t){if(!XA(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!$A(e,aL)){if(!rL(e))return"F";if(!t)return"E";sL(e)}return e[aL].objectID},getWeakData:function(e,t){if(!$A(e,aL)){if(!rL(e))return!0;if(!t)return!1;sL(e)}return e[aL].weakData},onFreeze:function(e){return nL&&iL&&rL(e)&&!$A(e,aL)&&sL(e),e}};QA[aL]=!0;var cL=FA.exports,lL=Cr,fL=a,hL=cL,dL=o,pL=gr,vL=Qd,yL=Ap,gL=L,mL=te,_L=Ba,bL=$t.f,wL=so.forEach,kL=O,SL=Za.set,xL=Za.getterFor,EL=function(e,t,r){var n,i=-1!==e.indexOf("Map"),a=-1!==e.indexOf("Weak"),o=i?"set":"add",s=fL[e],u=s&&s.prototype,c={};if(kL&&gL(s)&&(a||u.forEach&&!dL((function(){(new s).entries().next()})))){var l=(n=t((function(t,r){SL(yL(t,l),{type:e,collection:new s}),null!=r&&vL(r,t[o],{that:t,AS_ENTRIES:i})}))).prototype,f=xL(e);wL(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||a&&"clear"==e||pL(l,e,(function(r,n){var i=f(this).collection;if(!t&&a&&!mL(r))return"get"==e&&void 0;var o=i[e](0===r?0:r,n);return t?this:o}))})),a||bL(l,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else n=r.getConstructor(t,e,i,o),hL.enable();return _L(n,e,!1,!0),c[e]=n,lL({global:!0,forced:!0},c),a||r.setStrong(n,e,i),n},TL=Wi,AL=da,LL=ox,CL=Xt,OL=Ap,DL=K,PL=Qd,RL=kc,ML=Sc,UL=xp,IL=O,BL=cL.fastKey,jL=Za.set,FL=Za.getterFor,NL={getConstructor:function(e,t,r,n){var i=e((function(e,i){OL(e,a),jL(e,{type:t,index:TL(null),first:void 0,last:void 0,size:0}),IL||(e.size=0),DL(i)||PL(i,e[n],{that:e,AS_ENTRIES:r})})),a=i.prototype,o=FL(t),s=function(e,t,r){var n,i,a=o(e),s=u(e,t);return s?s.value=r:(a.last=s={index:i=BL(t,!0),key:t,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=s),n&&(n.next=s),IL?a.size++:e.size++,"F"!==i&&(a.index[i]=s)),e},u=function(e,t){var r,n=o(e),i=BL(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return LL(a,{clear:function(){for(var e=o(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,IL?e.size=0:this.size=0},delete:function(e){var t=this,r=o(t),n=u(t,e);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first==n&&(r.first=i),r.last==n&&(r.last=a),IL?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=o(this),n=CL(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),LL(a,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),IL&&AL(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=FL(t),a=FL(n);RL(e,t,(function(e,t){jL(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?ML("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,ML(void 0,!0))}),r?"entries":"values",!r,!0),UL(t)}};EL("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),NL);var zL=re.Map,VL=Xt,GL=R,HL=Pe,qL=jf,KL=K,WL=Qd,YL=[].push,JL=function(e){var t,r,n,i,a=arguments.length,o=a>1?arguments[1]:void 0;return qL(this),(t=void 0!==o)&&HL(o),KL(e)?new this:(r=[],t?(n=0,i=VL(o,a>2?arguments[2]:void 0),WL(e,(function(e){GL(YL,r,i(e,n++))}))):WL(e,YL,{that:r}),new this(r))};Cr({target:"Map",stat:!0,forced:!0},{from:JL});var QL=Ps,XL=function(){return new this(QL(arguments))};Cr({target:"Map",stat:!0,forced:!0},{of:XL});var $L=Le,ZL=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError($L(e)+" is not a map")},eC=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},tC=eC,rC=se("Map"),nC={Map:rC,set:tC("set",2),get:tC("get",1),has:tC("has",1),remove:tC("delete",1),proto:rC.prototype},iC=ZL,aC=nC.remove;Cr({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=iC(this),r=!0,n=0,i=arguments.length;n<i;n++)e=aC(t,arguments[n]),r=r&&e;return!!r}});var oC=ZL,sC=nC.get,uC=nC.has,cC=nC.set;Cr({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=oC(this);return uC(i,e)?(r=sC(i,e),"update"in t&&(r=t.update(r,e,i),cC(i,e,r)),r):(n=t.insert(e,i),cC(i,e,n),n)}});var lC=R,fC=function(e,t,r){for(var n,i,a=r||e.next;!(n=lC(a,e)).done;)if(void 0!==(i=t(n.value)))return i},hC=fC,dC=function(e,t,r){return r?hC(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},pC=Xt,vC=ZL,yC=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=vC(this),r=pC(e,arguments.length>1?arguments[1]:void 0);return!1!==yC(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var gC=Xt,mC=ZL,_C=dC,bC=nC.Map,wC=nC.set;Cr({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=mC(this),r=gC(e,arguments.length>1?arguments[1]:void 0),n=new bC;return _C(t,(function(e,i){r(e,i,t)&&wC(n,i,e)})),n}});var kC=Xt,SC=ZL,xC=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=SC(this),r=kC(e,arguments.length>1?arguments[1]:void 0),n=xC(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var EC=Xt,TC=ZL,AC=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=TC(this),r=EC(e,arguments.length>1?arguments[1]:void 0),n=AC(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var LC=Cr,CC=R,OC=L,DC=Pe,PC=Qd,RC=nC.Map,MC=g([].push);LC({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(OC(this)?this:RC);DC(t);var n=DC(r.has),i=DC(r.get),a=DC(r.set);return PC(e,(function(e){var o=t(e);CC(n,r,o)?MC(CC(i,r,o),e):CC(a,r,o,[e])})),r}});var UC=function(e,t){return e===t||e!=e&&t!=t},IC=ZL,BC=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===BC(IC(this),(function(t){if(UC(t,e))return!0}),!0)}});var jC=R,FC=Qd,NC=L,zC=Pe,VC=nC.Map;Cr({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(NC(this)?this:VC);zC(t);var n=zC(r.set);return FC(e,(function(e){jC(n,r,t(e),e)})),r}});var GC=ZL,HC=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=HC(GC(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var qC=Xt,KC=ZL,WC=dC,YC=nC.Map,JC=nC.set;Cr({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=KC(this),r=qC(e,arguments.length>1?arguments[1]:void 0),n=new YC;return WC(t,(function(e,i){JC(n,r(e,i,t),e)})),n}});var QC=Xt,XC=ZL,$C=dC,ZC=nC.Map,eO=nC.set;Cr({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=XC(this),r=QC(e,arguments.length>1?arguments[1]:void 0),n=new ZC;return $C(t,(function(e,i){eO(n,i,r(e,i,t))})),n}});var tO=ZL,rO=Qd,nO=nC.set;Cr({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=tO(this),r=arguments.length,n=0;n<r;)rO(arguments[n++],(function(e,r){nO(t,e,r)}),{AS_ENTRIES:!0});return t}});var iO=Pe,aO=ZL,oO=dC,sO=TypeError;Cr({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aO(this),r=arguments.length<2,n=r?void 0:arguments[1];if(iO(e),oO(t,(function(i,a){r?(r=!1,n=i):n=e(n,i,a,t)})),r)throw sO("Reduce of empty map with no initial value");return n}});var uO=Xt,cO=ZL,lO=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=cO(this),r=uO(e,arguments.length>1?arguments[1]:void 0);return!0===lO(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var fO=Pe,hO=ZL,dO=TypeError,pO=nC.get,vO=nC.has,yO=nC.set;Cr({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=hO(this),n=arguments.length;fO(t);var i=vO(r,e);if(!i&&n<3)throw dO("Updating absent value");var a=i?pO(r,e):fO(n>2?arguments[2]:void 0)(e,r);return yO(r,e,t(a,e,r)),r}});var gO=R,mO=Pe,_O=L,bO=nr,wO=TypeError,kO=function(e,t){var r,n=bO(this),i=mO(n.get),a=mO(n.has),o=mO(n.set),s=arguments.length>2?arguments[2]:void 0;if(!_O(t)&&!_O(s))throw wO("At least one callback required");return gO(a,n,e)?(r=gO(i,n,e),_O(t)&&(r=t(r),gO(o,n,e,r))):_O(s)&&(r=s(),gO(o,n,e,r)),r};Cr({target:"Map",proto:!0,real:!0,forced:!0},{upsert:kO}),Cr({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:kO});var SO=r(zL);function xO(e,t){var r=ch(e);if(lh){var n=lh(e);t&&(n=yh(n).call(n,(function(t){return gh(e,t).enumerable}))),r.push.apply(r,n)}return r}function EO(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?Ch(r=xO(Object(i),!0)).call(r,(function(t){RO(e,t,i[t])})):Nh?Wh(e,Nh(i)):Ch(n=xO(Object(i))).call(n,(function(t){Yh(e,t,gh(i,t))}))}return e}function TO(){TO=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Yh||function(e,t,r){e[t]=r.value},i="function"==typeof Jh?Jh:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(A){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var a=t&&t.prototype instanceof h?t:h,o=Qh(a.prototype),s=new x(i||[]);return n(o,"_invoke",{value:b(e,r,s)}),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function h(){}function d(){}function p(){}var v={};u(v,a,(function(){return this}));var y=Xh&&Xh(Xh(E([])));y&&y!==t&&r.call(y,a)&&(v=y);var g=p.prototype=h.prototype=Qh(v);function m(e){var t;Ch(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,a,o,s){var u=l(e[n],e,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Ol(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,o,s)}),(function(e){i("throw",e,o,s)})):t.resolve(f).then((function(e){c.value=e,o(c)}),(function(e){return i("throw",e,o,s)}))}s(u.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return{value:void 0,done:!0}}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=w(o,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=l(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],Ch(e).call(e,k,this),this.reset(!0)}function E(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,n(g,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=u(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return $h?$h(e,p):(e.__proto__=p,u(e,s,"GeneratorFunction")),e.prototype=Qh(g),e},e.awrap=function(e){return{__await:e}},m(_.prototype),u(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,a){void 0===a&&(a=$g);var o=new _(c(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},m(g),u(g,s,"Generator"),u(g,a,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return sm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=E,x.prototype={constructor:x,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,Ch(t=this.tryEntries).call(t,S),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+Tm(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function AO(e){return(AO="function"==typeof Jh&&"symbol"==typeof Am?function(e){return typeof e}:function(e){return e&&"function"==typeof Jh&&e.constructor===Jh&&e!==Jh.prototype?"symbol":typeof e})(e)}function LO(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(VB){return void r(VB)}s.done?t(u):$g.resolve(u).then(n,i)}function CO(e){return function(){var t=this,r=arguments;return new $g((function(n,i){var a=e.apply(t,r);function o(e){LO(a,n,i,o,s,"next",e)}function s(e){LO(a,n,i,o,s,"throw",e)}o(void 0)}))}}function OO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Yh(e,KO(n.key),n)}}function PO(e,t,r){return t&&DO(e.prototype,t),r&&DO(e,r),Yh(e,"prototype",{writable:!1}),e}function RO(e,t,r){return(t=KO(t))in e?Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MO(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Qh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Yh(e,"prototype",{writable:!1}),t&&IO(e,t)}function UO(e){var t;return(UO=$h?Lm(t=Xh).call(t):function(e){return e.__proto__||Xh(e)})(e)}function IO(e,t){var r;return(IO=$h?Lm(r=$h).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function BO(){if("undefined"==typeof Reflect||!Cm)return!1;if(Cm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Cm(Boolean,[],(function(){}))),!0}catch(e){return!1}}function jO(e,t,r){var n;BO()?jO=Lm(n=Cm).call(n):jO=function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Lm(Function).apply(e,n));return r&&IO(i,r.prototype),i};return jO.apply(null,arguments)}function FO(e){var t="function"==typeof SO?new SO:void 0;return FO=function(e){if(null===e||(r=e,-1===r_(n=Function.toString.call(r)).call(n,"[native code]")))return e;var r,n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return jO(e,arguments,UO(this).constructor)}return i.prototype=Qh(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),IO(i,e)},FO(e)}function NO(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=ch(e);for(n=0;n<a.length;n++)r=a[n],r_(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(lh){var a=lh(e);for(n=0;n<a.length;n++)r=a[n],r_(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function zO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VO(e){var t=BO();return function(){var r,n=UO(e);if(t){var i=UO(this).constructor;r=Cm(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return zO(e)}(this,r)}}function GO(){var e;"undefined"!=typeof Reflect&&Cb?GO=Lm(e=Cb).call(e):GO=function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=UO(e)););return e}(e,t);if(n){var i=gh(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return GO.apply(this,arguments)}function HO(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qO(e,t){var r=void 0!==Jh&&Ob(e)||e["@@iterator"];if(!r){if(db(e)||(r=function(e,t){var r;if(e){if("string"==typeof e)return HO(e,t);var n=Tm(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Kb(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?HO(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function KO(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var r=e[Om];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ol(t)?t:String(t)}var WO=Pe,YO=Qe,JO=q,QO=Wr,XO=TypeError,$O=function(e){return function(t,r,n,i){WO(r);var a=YO(t),o=JO(a),s=QO(a),u=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(u in o){i=o[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw XO("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in o&&(i=r(i,o[u],u,a));return i}},ZO={left:$O(!1),right:$O(!0)}.left;Cr({target:"Array",proto:!0,forced:!_p&&ye>79&&ye<83||!_h("reduce")},{reduce:function(e){var t=arguments.length;return ZO(this,e,t,t>1?arguments[1]:void 0)}});var eD,tD=af("Array").reduce,rD=ue,nD=tD,iD=Array.prototype,aD=r((function(e){var t=e.reduce;return e===iD||rD(iD,e)&&t===iD.reduce?nD:t})),oD=function(){function e(){OO(this,e)}return PO(e,null,[{key:"start",value:function(e){return e&&e.length?1===e.length&&e.end(0)-e.start(0)<1e-6||1===e.length&&e.start(0)<0?0:e.start(0):0}},{key:"end",value:function(e){return e&&e.length?1===e.length&&e.end(0)-e.start(0)<1e-6?0:e.end(e.length-1):0}},{key:"get",value:function(e){if(e)try{return e.buffered}catch(VB){}}},{key:"buffers",value:function(e,t){if(!e||!e.length)return[];for(var r=[],n=0,i=e.length;n<i;n++){var a=r.length;if(a&&t){var o=r[a-1],s=o[1];if(e.start(n)-s<=t){var u=e.end(n);u>s&&(o[1]=u)}else r.push([e.start(n),e.end(n)])}else r.push([e.start(n),e.end(n)])}return r}},{key:"totalLength",value:function(e){return e&&e.length?aD(e).call(e,(function(e,t){return e+(t[1]-t[0])}),0):0}},{key:"info",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t||!t.length)return{start:0,end:0,buffers:[]};for(var i=0,a=0,o=0,s=0,u=0,c=0,l=0,f=e.buffers(t,n),h=0,d=f.length;h<d;h++){var p=f[h];if(r+n>=p[0]&&r<=p[1])i=p[0],a=p[1],o=h;else{if(r+n<p[0]){s=p[0],u=p[1];break}r+n>p[1]&&(c=p[0],l=p[1])}}return{start:i,end:a,index:o,buffers:f,nextStart:s,nextEnd:u,prevStart:c,prevEnd:l,currentTime:r,behind:r-i,remaining:a?a-r:0,length:e.totalLength&&e.totalLength(f)}}},{key:"isBuffered",value:function(t,r){if(t){var n=e.get(t);if(null!=n&&n.length)for(var i=0;i<n.length;i++)if(r>=n.start(i)&&r<=n.end(i))return!0}return!1}}]),e}(),sD="undefined"!=typeof window,uD="network",cD="network_timeout",lD="network_forbidden",fD="network_notfound",hD="network_range_not_satisfiable",dD="demux",pD="remux",vD="media",yD="drm",gD="other",mD="runtime",_D={FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",MSE_FULL:"MSE_FULL",MSE_CHANGE_TYPE:"MSE_CHANGE_TYPE",OPTION:"OPTION",DASH:"DASH",LICENSE:"LICENSE",CUSTOM_LICENSE:"CUSTOM_LICENSE",MSE_HIJACK:"MSE_HIJACK",EME_HIJACK:"EME_HIJACK",SIDX:"SIDX",NO_CANPLAY_ERROR:"NO_CANPLAY_ERROR",BUFFERBREAK_ERROR:"BUFFERBREAK_ERROR",WAITING_TIMEOUT_ERROR:"WAITING_TIMEOUT_ERROR",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_CODEC_NOT_SUPPORTED:"MEDIA_ERR_CODEC_NOT_SUPPORTED",MEDIA_ERR_URL_EMPTY:"MEDIA_ERR_URL_EMPTY"},bD=(RO(eD={},"manifest",{HLS:1100,DASH:1200}),RO(eD,uD,2100),RO(eD,cD,2101),RO(eD,lD,2103),RO(eD,fD,2104),RO(eD,hD,2116),RO(eD,dD,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400,SIDX:3410}),RO(eD,pD,{FMP4:4100,MP4:4200}),RO(eD,vD,{MEDIA_ERR_ABORTED:5101,MEDIA_ERR_NETWORK:5102,MEDIA_ERR_DECODE:5103,MEDIA_ERR_SRC_NOT_SUPPORTED:5104,MEDIA_ERR_CODEC_NOT_SUPPORTED:5105,MEDIA_ERR_URL_EMPTY:5106,MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203,MSE_HIJACK:5204,MSE_CHANGE_TYPE:5205,EME_HIJACK:5301}),RO(eD,yD,{LICENSE:7100,CUSTOM_LICENSE:7200}),RO(eD,gD,8e3),RO(eD,mD,{NO_CANPLAY_ERROR:9001,BUFFERBREAK_ERROR:9002,WAITING_TIMEOUT_ERROR:9003}),eD),wD=function(e){MO(r,e);var t=VO(r);function r(e,n,i,a,o){var s;return OO(this,r),(s=t.call(this,o||(null==i?void 0:i.message))).errorType=e===cD?uD:e,s.originError=i,s.ext=a,s.errorCode=bD[e][n]||bD[e],s.errorMessage=s.message,s.errorCode||(s.errorType=gD,s.errorCode=bD[s.errorType]),s}return PO(r,null,[{key:"create",value:function(e,t,n,i,a){return e instanceof r?e:(e instanceof Error&&(n=e,e=""),e||(e=gD),new r(e,t,n,i,a))}},{key:"network",value:function(e){var t;return new r(null!=e&&e.isTimeout?cD:uD,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}]),r}(FO(Error)),kD=1,SD=2,xD=3,ED=4,TD=["Boolean","Number","String","Undefined","Null","Date","Object"],AD=function(){function e(t,r){OO(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==r?void 0:r.logCacheLevel)||3,this.logMaxSize=(null==r?void 0:r.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}return PO(e,[{key:"debug",value:function(){for(var t,r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,oh(t=[kD]).call(t,a)),e.disabled||(n=console).debug.apply(n,oh(r=["[".concat(LD(),"]"),this._prefix]).call(r,a))}},{key:"log",value:function(){for(var t,r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,oh(t=[SD]).call(t,a)),e.disabled||(n=console).log.apply(n,oh(r=["[".concat(LD(),"]"),this._prefix]).call(r,a))}},{key:"warn",value:function(){for(var t,r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,oh(t=[xD]).call(t,a)),e.disabled||(n=console).warn.apply(n,oh(r=["[".concat(LD(),"]"),this._prefix]).call(r,a))}},{key:"error",value:function(){for(var t,r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,oh(t=[ED]).call(t,a)),e.disabled||(n=console).error.apply(n,oh(r=["[".concat(LD(),"]"),this._prefix]).call(r,a))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var a=hb(n).call(n,(function(e){return OD(e)}));t="[".concat(LD(),"]")+this._prefix+gA(a)}catch(s){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var o=this.logTextArray.shift();this.logSize-=o.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function LD(){return(new Date).toLocaleString()}function CD(e){var t;if("object"!==AO(e))return e;var r=Tm(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function OD(e,t,r){var n;r||(r=1),t||(t=2);var i={};if(!e||"object"!==AO(e))return e;var a=Tm(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!jA(TD).call(TD,a))return a;if(!(r>t)){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r===t?i[o]=CD(e[o]):"object"===AO(e[o])?i[o]=OD(e[o],t,r+1):i[o]=e[o]);return i}}function DD(){var e,t,r=new $g((function(r,n){e=r,t=n}));return r.used=!1,r.resolve=function(){return r.used=!0,e.apply(void 0,arguments)},r.reject=function(){return r.used=!0,t.apply(void 0,arguments)},r}function PD(){try{return ob(performance.now(),10)}catch(e){return(new Date).getTime()}}RO(AD,"disabled",!0);var RD=function(e){try{return gA(e)}catch(t){return""}};function MD(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{return sD?e&&"undefined"!=typeof ManagedMediaSource?ManagedMediaSource:window.MediaSource:null}catch(t){}}function UD(e){return/ManagedMediaSource/gi.test(Object.prototype.toString.call(e))}var ID="appendBuffer",BD="removeBuffer",jD="updateDuration",FD=function(){function e(t,r){var n=this;OO(this,e),RO(this,"media",null),RO(this,"mediaSource",null),RO(this,"_openPromise",DD()),RO(this,"_queue",Qh(null)),RO(this,"_sourceBuffer",Qh(null)),RO(this,"_mseFullFlag",{}),RO(this,"_st",0),RO(this,"_opst",0),RO(this,"_logger",null),RO(this,"_config",null),RO(this,"_url",null),RO(this,"_onStartStreaming",(function(){n._logger.debug("startstreaming")})),RO(this,"_onEndStreaming",(function(){n._logger.debug("endstreaming")})),RO(this,"_onSBUpdateEnd",(function(e){var t=n._queue[e];if(t){var r=t[0];if((null==r?void 0:r.opName)!==jD&&t.shift(),r){var i,a,o,s=PD()-n._opst;n._logger.debug(oh(i="UpdateEnd(".concat(e,"/")).call(i,r.opName,")"),RD(function(e){var t=[];if(e instanceof TimeRanges)for(var r=0;r<e.length;r++)t.push({start:e.start(r),end:e.end(r)});return t}(null===(a=n._sourceBuffer[e])||void 0===a?void 0:a.buffered)),s,r.context),r.promise.resolve({name:r.opName,context:r.context,costtime:s});var u=null===(o=r.context)||void 0===o?void 0:o.callback;u&&"function"==typeof u&&u(r.context),n._startQueue(e)}}})),RO(this,"_onSBUpdateError",(function(e,t){var r=n._queue[e];if(r){var i=r[0];i&&(n._logger.error("UpdateError",e,i.opName,i.context),i.promise.reject(new wD(vD,_D.MSE_APPEND_BUFFER,t)))}})),this._config=Lb(e.getDefaultConfig(),r),t&&this.bindMedia(t),this._logger=new AD("MSE"),this._config.openLog&&AD.enable()}var t,r,n;return PO(e,[{key:"isOpened",get:function(){var e;return"open"===(null===(e=this.mediaSource)||void 0===e?void 0:e.readyState)}},{key:"hasOpTasks",get:function(){var e,t=this,r=!1;return Ch(e=ch(this._queue)).call(e,(function(e){var n=t._queue[e];db(n)&&(r||(r=n.length>0))})),r}},{key:"url",get:function(){return this._url}},{key:"duration",get:function(){var e;return(null===(e=this.mediaSource)||void 0===e?void 0:e.duration)||-1}},{key:"isEnded",get:function(){return!!this.mediaSource&&"ended"===this.mediaSource.readyState}},{key:"streaming",get:function(){return!UD(this.mediaSource)||this.mediaSource.streaming}},{key:"isFull",value:function(t){return t?this._mseFullFlag[t]:this._mseFullFlag[e.VIDEO]}},{key:"updateDuration",value:function(e){var t=this,r=this.mediaSource&&this.mediaSource.duration>e;if(this.mediaSource&&this.mediaSource.duration>e){var n,i=0;if(Ch(n=ch(this._sourceBuffer)).call(n,(function(e){try{i=Math.max(t.bufferEnd(e)||0,i)}catch(VB){}})),e<i)return $g.resolve()}return this._enqueueBlockingOp((function(){t.isEnded?t._logger.debug("setDuration but ended"):t.mediaSource&&(t.mediaSource.duration=e,t._logger.debug("setDuration",e))}),jD,{isReduceDuration:r})}},{key:"open",value:function(){var e=this;if(this._openPromise.used&&!this.isOpened&&this.mediaSource){var t=this.mediaSource;t.addEventListener("sourceopen",(function r(){var n=PD()-e._st;e._logger.debug("sourceopen",n),t.removeEventListener("sourceopen",r),e._openPromise.resolve({costtime:n})})),this._openPromise=DD()}return this._openPromise}},{key:"bindMedia",value:(n=CO(TO().mark((function e(t){var r,n,i,a,o=this;return TO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.mediaSource&&!this.media){e.next=3;break}return e.next=3,this.unbindMedia();case 3:if(r=MD(this._config.preferMMS),t&&r){e.next=6;break}throw new Error("Param media or MediaSource does not exist");case 6:return this.media=t,n=this.mediaSource=new r,i=UD(n),this._st=PD(),a=function e(){var r=PD()-o._st;o._logger.debug("sourceopen"),n.removeEventListener("sourceopen",e),dA.revokeObjectURL(t.src),o._openPromise.resolve({costtime:r})},n.addEventListener("sourceopen",a),i&&(n.addEventListener("startstreaming",this._onStartStreaming),n.addEventListener("endstreaming",this._onEndStreaming)),this._url=dA.createObjectURL(n),t.src=this._url,t.disableRemotePlayback=i,e.abrupt("return",this._openPromise);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"unbindMedia",value:(r=CO(TO().mark((function e(){var t,r,n,i=this;return TO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._openPromise.used||this._openPromise.resolve(),t=this.mediaSource){var a,o;if(Ch(a=ch(this._queue)).call(a,(function(e){var t=i._queue[e];t&&Ch(t).call(t,(function(e){var t,r;return null===(t=e.promise)||void 0===t||null===(r=t.resolve)||void 0===r?void 0:r.call(t)}))})),r=!!this.media&&this.media.readyState>=1,n="open"===t.readyState,r&&n)try{t.endOfStream()}catch(VB){}Ch(o=ch(this._sourceBuffer)).call(o,(function(e){try{t.removeSourceBuffer(i._sourceBuffer[e])}catch(VB){}})),UD(t)&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming))}if(this.media){this.media.disableRemotePlayback=!1,this.media.removeAttribute("src");try{this.media.load()}catch(VB){}this.media=null}this.mediaSource=null,this._openPromise=DD(),this._queue=Qh(null),this._sourceBuffer=Qh(null);case 8:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"createSource",value:function(e,t){var r,n;if(!this._sourceBuffer[e]&&this.mediaSource){var i;try{i=this._sourceBuffer[e]=this.mediaSource.addSourceBuffer(t)}catch(VB){throw new wD(vD,_D.MSE_ADD_SB,VB)}i.mimeType=t,i.addEventListener("updateend",Lm(r=this._onSBUpdateEnd).call(r,this,e)),i.addEventListener("error",Lm(n=this._onSBUpdateError).call(n,this,e))}}},{key:"changeType",value:function(e,t){var r=this,n=this._sourceBuffer[e];return this.mediaSource&&n&&n.mimeType!==t?"function"!=typeof n.changeType?$g.reject(new wD(vD,_D.MSE_CHANGE_TYPE,new Error("changeType is not a function"))):this._enqueueOp(e,(function(){try{n.changeType(t)}catch(i){throw new wD(vD,_D.MSE_CHANGE_TYPE,i)}n.mimeType=t,r._onSBUpdateEnd(e)}),"changeType",{mimeType:t}):$g.resolve()}},{key:"createOrChangeSource",value:function(e,t){return this.createSource(e,t),this.changeType(e,t)}},{key:"append",value:function(e,t,r){var n=this;return t&&t.byteLength&&this._sourceBuffer[e]?this._enqueueOp(e,(function(){var i;n.mediaSource&&!n.media.error&&(n._logger.debug("MSE APPEND START",r),n._opst=PD(),null===(i=n._sourceBuffer[e])||void 0===i||i.appendBuffer(t))}),ID,r):$g.resolve()}},{key:"remove",value:function(e,t,r,n){var i=this,a=!1;return this._mseFullFlag[e]&&(a=!0),this._enqueueOp(e,(function(){if(i.mediaSource&&!i.media.error){var a=i._sourceBuffer[e];t>=r||!a?i._onSBUpdateEnd(e):(i._opst=PD(),i._logger.debug("MSE REMOVE START",e,t,r,n),a.remove(t,r))}}),BD,n,a)}},{key:"clearBuffer",value:function(e,t){var r,n,i=this;return Ch(r=ch(this._sourceBuffer)).call(r,(function(r){n=i.remove(r,e,t)})),n||$g.resolve()}},{key:"clearAllBuffer",value:function(){var e,t,r=this;return Ch(e=ch(this._sourceBuffer)).call(e,(function(e){var n=r._sourceBuffer[e];t=r.remove(e,0,oD.end(oD.get(n)))})),t}},{key:"clearOpQueues",value:function(e,t){var r;this._logger.debug("MSE clearOpQueue START");var n=this._queue[e];if(t&&n)this._queue[e]=[];else if(n&&n[e]&&!(n.length<5)){var i=[];Ch(n).call(n,(function(e){e.context&&e.context.isinit&&i.push(e)})),this._queue[e]=Tm(n).call(n,0,2),i.length>0&&(r=this._queue[e]).push.apply(r,i)}}},{key:"endOfStream",value:function(e){var t=this;return this.mediaSource&&"open"===this.mediaSource.readyState?this._enqueueBlockingOp((function(){var r=t.mediaSource;r&&"open"===r.readyState&&(t._logger.debug("MSE endOfStream START"),e?r.endOfStream(e):r.endOfStream())}),"endOfStream"):$g.resolve()}},{key:"setLiveSeekableRange",value:function(e,t){var r=this.mediaSource;e<0||t<e||null==r||!r.setLiveSeekableRange||"open"!==r.readyState||r.setLiveSeekableRange(e,t)}},{key:"getSourceBuffer",value:function(e){return this._sourceBuffer[e]}},{key:"buffered",value:function(e){return oD.get(this._sourceBuffer[e])}},{key:"bufferStart",value:function(e){return oD.start(this.buffered(e))}},{key:"bufferEnd",value:function(e){return oD.end(this.buffered(e))}},{key:"_enqueueOp",value:function(e,t,r,n,i){var a=this;if(!this.mediaSource)return $g.resolve();var o=this._queue[e]=this._queue[e]||[],s={exec:t,promise:DD(),opName:r,context:n};return i?(B_(o).call(o,0,0,s),this._mseFullFlag[e]=!1,this._startQueue(e)):o.push(s),this.isOpened||this.isEnded?1===o.length&&this._startQueue(e):this._openPromise.then((function(){1===o.length&&a._startQueue(e)})),s.promise}},{key:"_enqueueBlockingOp",value:(t=CO(TO().mark((function e(t,r,n){var i,a,o=this;return TO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mediaSource){e.next=2;break}return e.abrupt("return",$g.resolve());case 2:if((i=ch(this._sourceBuffer)).length){e.next=5;break}return e.abrupt("return",t());case 5:return a=[],Ch(i).call(i,(function(e){var t=o._queue[e],i=DD();a.push(i),t.push({exec:function(){i.resolve()},promise:i,opName:r,context:n}),1===t.length&&o._startQueue(e)})),e.abrupt("return",$g.all(a).then((function(){try{return t()}finally{Ch(i).call(i,(function(e){var t=o._queue[e],r=o._sourceBuffer[e];null==t||t.shift(),r&&r.updating||o._startQueue(e)}))}})));case 8:case"end":return e.stop()}}),e,this)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"_startQueue",value:function(e){var t=this._queue[e];if(t){var r=t[0];if(r&&!this._mseFullFlag[e])try{r.exec()}catch(VB){var n,i,a;if(VB&&VB.message&&r_(n=VB.message).call(n,"SourceBuffer is full")>=0)this._mseFullFlag[e]=!0,r.context&&"object"===AO(r.context)&&(r.context.isFull=!0),this._logger.error("[MSE error], context,",r.context," ,name,",r.opName,",err,SourceBuffer is full"),null==r||null===(i=r.promise)||void 0===i||i.reject(new wD(vD,_D.MSE_FULL,VB));else this._logger.error(VB),null==r||null===(a=r.promise)||void 0===a||a.reject(VB.constructor===wD?VB:new wD(vD,_D.MSE_OTHER,VB)),t.shift(),this._startQueue(e)}}}},{key:"setTimeoffset",value:function(e,t,r){var n=this;return this._enqueueOp(e,(function(){t<0&&(t+=.001),n._sourceBuffer[e].timestampOffset=t,n._onSBUpdateEnd(e)}),"setTimeoffset",r)}},{key:"abort",value:function(e,t){var r=this;return this.isOpened?this._enqueueOp(e,(function(){r._sourceBuffer[e].abort(),r._onSBUpdateEnd(e)}),"abort",t):$g.resolve()}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"',t=MD(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]);if(!t)return!1;try{return t.isTypeSupported(e)}catch(VB){return this._logger.error(e,VB),!1}}},{key:"isMMSOnly",value:function(){return"undefined"!=typeof ManagedMediaSource&&"undefined"==typeof MediaSource}},{key:"getDefaultConfig",value:function(){return{openLog:!1,preferMMS:!1}}}]),e}();RO(FD,"VIDEO","video"),RO(FD,"AUDIO","audio");var ND="fetch",zD="xhr",VD="arraybuffer",GD="text",HD="json",qD=function(e){MO(r,e);var t=VO(r);function r(e,n,i,a){var o;return OO(this,r),RO(zO(o=t.call(this,a)),"retryCount",0),RO(zO(o),"isTimeout",!1),RO(zO(o),"loaderType",ND),RO(zO(o),"startTime",0),RO(zO(o),"endTime",0),RO(zO(o),"options",{}),o.url=e,o.request=n,o.response=i,o}return PO(r)}(FO(Error)),KD=Object.prototype.toString;function WD(e){if("[object Object]"!==KD.call(e))return!1;var t=Xh(e);return null===t||t===Object.prototype}function YD(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function JD(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function QD(e,t){var r,n;if(e){if(!t)return e;var i,a=yh(r=hb(n=ch(t)).call(n,(function(e){if(null!=(i=t[e]))return db(i)?e+="[]":i=[i],hb(i).call(i,(function(t){var r,n;return n=t,"[object Date]"===KD.call(n)?t=t.toISOString():function(e){return null!==e&&"object"===AO(e)}(t)&&(t=gA(t)),oh(r="".concat(JD(e),"=")).call(r,JD(t))})).join("&")}))).call(r,Boolean).join("&");if(a){var o=r_(e).call(e,"#");-1!==o&&(e=Tm(e).call(e,0,o)),e+=(-1===r_(e).call(e,"?")?"?":"&")+a}return e}}function XD(e,t,r,n,i,a,o,s,u,c,l){return i=null!=i?dk(i):null,n=ob(n||"0",10),j_(n)&&(n=0),{data:e,done:t,options:{range:u,vid:c,index:s,contentLength:n,age:i,startTime:a,firstByteTime:o,endTime:lS(),priOptions:l},response:r}}function $D(e,t){return Math.round(8*e*1e3/t/1024)}var ZD="error",eP="core.ttfb",tP="core.loadstart",rP="core.loadresponseheaders",nP="core.loadcomplete",iP="core.loadretry",aP="core.sourcebuffercreated",oP="core.analyzedurationexceeded",sP="core.appendbuffer",uP="core.removebuffer",cP="core.buffereos",lP="core.keyframe",fP="core.chaseframe",hP="core.metadataparsed",dP="core.sei",pP="core.seiintime",vP="core.flvscriptdata",yP="core.lowdecode",gP="core.switchurlsuccess",mP="core.switchurlfailed",_P="core.demuxedtrack",bP="core.streamexception",wP="LARGE_AV_FIRST_FRAME_GAP_DETECT",kP="LARGE_VIDEO_DTS_GAP_DETECT",SP="LARGE_AUDIO_DTS_GAP_DETECT",xP="AUDIO_GAP_DETECT",EP="AUDIO_OVERLAP_DETECT",TP="MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT",AP="real_time_speed",LP=2097152,CP=function(e){MO(n,e);var t,r=VO(n);function n(){var e;return OO(this,n),RO(zO(e=r.call(this)),"_abortController",null),RO(zO(e),"_timeoutTimer",null),RO(zO(e),"_reader",null),RO(zO(e),"_response",null),RO(zO(e),"_aborted",!1),RO(zO(e),"_index",-1),RO(zO(e),"_range",null),RO(zO(e),"_receivedLength",0),RO(zO(e),"_running",!1),RO(zO(e),"_logger",null),RO(zO(e),"_vid",""),RO(zO(e),"_firtstByte",0),RO(zO(e),"_onProcessMinLen",0),RO(zO(e),"_onCancel",null),RO(zO(e),"_priOptions",null),e}return PO(n,[{key:"load",value:function(e){var t,r=this,n=e.url,i=e.vid,a=e.timeout,o=e.responseType,s=e.onProgress,u=e.index,c=e.onTimeout,l=e.onCancel,f=e.range,h=e.transformResponse,d=e.request,p=e.params,v=e.logger,y=e.method,g=e.headers,m=e.body,_=e.mode,b=e.credentials,w=e.cache,k=e.redirect,S=e.referrer,x=e.referrerPolicy,E=e.onProcessMinLen,T=e.priOptions,A=e.streamRes,L=e.firstMaxChunkSize;this._logger=v,this._aborted=!1,this._onProcessMinLen=E,this._onCancel=l,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=u,this._range=f||[0,0],this._vid=i||n,this._priOptions=T||{},this._firstMaxChunkSize=L;var C={method:y,headers:g,body:m,mode:_,credentials:b,cache:w,redirect:k,referrer:S,referrerPolicy:x,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},O=!1;clearTimeout(this._timeoutTimer),n=QD(n,p);var D=YD(f);D&&(g=d?d.headers:C.headers=C.headers||(Headers?new Headers:{}),Headers&&g instanceof Headers?g.append("Range",D):g.Range=D),a&&(this._timeoutTimer=Qw((function(){if(O=!0,r.cancel(),c){var e=new qD(n,C,null,"timeout");e.isTimeout=!0,c(e,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions})}}),a));var P=lS();return this._logger.debug("[fetch load start], index,",u,",range,",f),new $g((function(e,t){(A?new $g((function(e){e(A)})):fetch(d||n,d?void 0:C)).then(function(){var i=CO(TO().mark((function i(a){var c,l,d,p;return TO().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=a,!r._aborted&&r._running){i.next=4;break}return i.abrupt("return");case 4:if(h&&(a=h(a,n)||a),a.ok){i.next=7;break}throw new qD(n,C,a,"bad network response");case 7:if(c=lS(),o!==GD){i.next=15;break}return i.next=11,a.text();case 11:l=i.sent,r._running=!1,i.next=37;break;case 15:if(o!==HD){i.next=22;break}return i.next=18,a.json();case 18:l=i.sent,r._running=!1,i.next=37;break;case 22:if(!s){i.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(a,s,P,c),i.abrupt("return");case 29:return i.next=31,a.arrayBuffer();case 31:l=i.sent,l=new Uint8Array(l),r._running=!1,d=lS()-P,p=$D(l.byteLength,d),r.emit(AP,{speed:p,len:l.byteLength,time:d,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 37:r._logger.debug("[fetch load end], index,",u,",range,",f),e(XD(l,!0,a,a.headers.get("Content-Length"),a.headers.get("age"),P,c,u,f,r._vid,r._priOptions));case 39:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){var i;clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!O||((e=e instanceof qD?e:new qD(n,C,null,null===(i=e)||void 0===i?void 0:i.message)).startTime=P,e.endTime=lS(),e.isTimeout=O,e.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},t(e))}))}))}},{key:"cancel",value:(t=CO(TO().mark((function e(){return TO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(VB){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var i=this;if(!e.body||!e.body.getReader){this._running=!1;var a=new qD(e.url,"",e,"onProgress of bad response.body.getReader");return a.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(a)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(LP),this._writeIdx=0);var o,s,u,c=this._reader=e.body.getReader(),l=function(){var a=CO(TO().mark((function a(){var f,h,d,p,v,y,g,m,_,b;return TO().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s=lS(),a.prev=1,a.next=4,c.read();case 4:o=a.sent,u=lS(),a.next=13;break;case 8:return a.prev=8,a.t0=a.catch(1),u=lS(),i._aborted||(i._running=!1,a.t0.options={index:i._index,range:i._range,vid:i._vid,priOptions:i._priOptions},i.reject(a.t0)),a.abrupt("return");case 13:if(h=(null===(f=i._range)||void 0===f?void 0:f.length)>0?i._range[0]:0,d=h+i._receivedLength,!i._aborted){a.next=19;break}return i._running=!1,t(void 0,!1,{range:[d,d],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e),a.abrupt("return");case 19:var w;if(p=o.value?o.value.byteLength:0,i._receivedLength+=p,i._logger.debug("【fetchLoader,onProgress call】,task,",i._range,", start,",d,", end,",h+i._receivedLength,", done,",o.done),i._onProcessMinLen>0){if(i._writeIdx+p>=i._onProcessMinLen||o.done)(v=new Uint8Array(i._writeIdx+p)).set(Tm(w=i._cache).call(w,0,i._writeIdx),0),p>0&&v.set(o.value,i._writeIdx),i._writeIdx=0,i._logger.debug("【fetchLoader,onProgress enough】,done,",o.done,",len,",v.byteLength,", writeIdx,",i._writeIdx);else if(p>0&&i._writeIdx+p<LP)i._cache.set(o.value,i._writeIdx),i._writeIdx+=p,i._logger.debug("【fetchLoader,onProgress cache】,len,",p,", writeIdx,",i._writeIdx);else if(p>0){var k;y=new Uint8Array(i._writeIdx+p+2048),i._logger.debug("【fetchLoader,onProgress extra start】,size,",i._writeIdx+p+2048,", datalen,",p,", writeIdx,",i._writeIdx),y.set(Tm(k=i._cache).call(k,0,i._writeIdx),0),p>0&&y.set(o.value,i._writeIdx),i._writeIdx+=p,delete i._cache,i._cache=y,i._logger.debug("【fetchLoader,onProgress extra end】,len,",p,", writeIdx,",i._writeIdx)}}else v=o.value;(v&&v.byteLength>0||o.done)&&(i._firstMaxChunkSize&&(i._firtstByte?i._cacheData&&((m=new Uint8Array(i._cacheData.byteLength+v.byteLength)).set(i._cacheData,0),m.set(v,i._cacheData.byteLength),v=m,i._cacheData=null):(i._firtstByte++,g=Tm(v).call(v,0,i._firstMaxChunkSize),i._cacheData=Tm(v).call(v,i._firstMaxChunkSize),v=g)),t(v,o.done,{range:[i._range[0]+i._receivedLength-(v?v.byteLength:0),i._range[0]+i._receivedLength],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e)),o.done?(_=lS()-r,b=$D(i._receivedLength,_),i.emit(AP,{speed:b,len:i._receivedLength,time:_,vid:i._vid,index:i._index,range:i._range,priOptions:i._priOptions}),i._running=!1,i._logger.debug("[fetchLoader onProgress end],task,",i._range,",done,",o.done),i.resolve(XD(o,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),r,n,i._index,i._range,i._vid,i._priOptions))):i._firstMaxChunkSize?Qw((function(){l()}),0):l();case 25:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(){return a.apply(this,arguments)}}();l()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),n}(iw);var OP=function(e){MO(r,e);var t=VO(r);function r(){var e;return OO(this,r),RO(zO(e=t.call(this)),"_xhr",null),RO(zO(e),"_aborted",!1),RO(zO(e),"_timeoutTimer",null),RO(zO(e),"_range",null),RO(zO(e),"_receivedLength",0),RO(zO(e),"_url",null),RO(zO(e),"_onProgress",null),RO(zO(e),"_index",-1),RO(zO(e),"_headers",null),RO(zO(e),"_currentChunkSizeKB",384),RO(zO(e),"_timeout",null),RO(zO(e),"_xhr",null),RO(zO(e),"_withCredentials",null),RO(zO(e),"_startTime",-1),RO(zO(e),"_loadCompleteResolve",null),RO(zO(e),"_loadCompleteReject",null),RO(zO(e),"_runing",!1),RO(zO(e),"_logger",!1),RO(zO(e),"_vid",""),RO(zO(e),"_responseType",void 0),RO(zO(e),"_credentials",void 0),RO(zO(e),"_method",void 0),RO(zO(e),"_transformResponse",void 0),RO(zO(e),"_firstRtt",void 0),RO(zO(e),"_onCancel",null),RO(zO(e),"_priOptions",null),e}return PO(r,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=QD(e.url,e.params);var r=lS();return new $g((function(e,r){t._loadCompleteResolve=e,t._loadCompleteReject=r,t._startLoad()})).catch((function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof qD?e:new qD(t._url,t._request)).startTime=r,e.endTime=lS(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e}))}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===VD&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{var r,n;this._startTime=lS();var i=this._xhr=new XMLHttpRequest;i.open(this._method||"GET",this._url,!0),i.responseType=this._responseType,this._timeout&&(i.timeout=this._timeout),i.withCredentials=this._withCredentials,i.onload=Lm(r=this._onLoad).call(r,this),i.onreadystatechange=Lm(n=this._onReadyStatechange).call(n,this),i.onerror=function(e){var r,n,i;t._running=!1;var a=new qD(t._url,t._request,null==e||null===(r=e.currentTarget)||void 0===r?void 0:r.response,"xhr.onerror.status:"+(null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.status)+",statusText,"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.statusText));a.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(a)},i.ontimeout=function(e){t.cancel();var r=new qD(t._url,t._request,{status:408},"timeout");t._onTimeout&&(r.isTimeout=!0,t._onTimeout(r,{index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions})),r.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(r)};var a,o=this._headers||{},s=YD(e);if(s&&(o.Range=s),o)Ch(a=ch(o)).call(a,(function(e){i.setRequestHeader(e,o[e])}));this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),i.send(this._body)}catch(u){u.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(u)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=lS())}},{key:"_onLoad",value:function(e){var t,r=e.target.status;if(r<200||r>299){var n=new qD(this._url,null,EO(EO({},e.target.response),{},{status:r}),"bad response,status:"+r);return n.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(n)}var i,a=null,o=!1,s=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===VD){var u,c=new Uint8Array(e.target.response);if(i=s+this._receivedLength,c&&c.byteLength>0){this._receivedLength+=c.byteLength;var l=lS()-this._startTime,f=$D(this._receivedLength,l);this.emit(AP,{speed:f,len:this._receivedLength,time:l,vid:this._vid,index:this._index,range:[i,s+this._receivedLength],priOptions:this._priOptions})}a=c,o=!((null===(u=this._range)||void 0===u?void 0:u.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",i,"end ",s+this._receivedLength,",dataLen,",c?c.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",o)}else o=!0,a=e.target.response;var h={ok:r>=200&&r<300,status:r,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(h=this._transformResponse(h,this._url)||h),this._onProgress&&this._onProgress(a,o,{index:this._index,vid:this._vid,range:[i,s+this._receivedLength],startTime:this._startTime,endTime:lS(),priOptions:this._priOptions},h),o?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(XD(this._onProgress?null:a,o,h,h.headers["content-length"],h.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted)return this._aborted=!0,this._runing=!1,GO(UO(r.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},i=qO(kk(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(i.s();!(r=i.n()).done;){var a=r.value.split(": ");n[a[0].toLowerCase()]=Tm(a).call(a,1).join(": ")}}catch(o){i.e(o)}finally{i.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),r}(iw),DP=["retry","retryDelay","onRetryError","transformError"],PP=function(){function e(t,r){OO(this,e),this.promise=DD(),this.alive=!!r.onProgress,!r.logger&&(r.logger=new AD("Loader")),this._loaderType=t,this._loader=t===ND&&"undefined"!=typeof fetch?new CP:new OP,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=r.retryCheckFunc,this._logger=r.logger}var t;return PO(e,[{key:"exec",value:function(){var e=this,t=this._config,r=t.retry,n=t.retryDelay,i=t.onRetryError,a=t.transformError,o=NO(t,DP),s=function(){var t=CO(TO().mark((function t(){var u,c,l;return TO().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(o);case 3:u=t.sent,e.promise.resolve(u),t.next=27;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,c=t.t0,a&&(c=a(c)||c),i&&e._retryCount>0&&i(c,e._retryCount,{index:o.index,vid:o.vid,range:o.range,priOptions:o.priOptions}),e._retryCount++,l=!0,e._retryCheckFunc&&(l=e._retryCheckFunc(t.t0)),!(l&&e._retryCount<=r)){t.next=26;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",o.range),e._retryTimer=Qw(s,n),t.abrupt("return");case 26:e.promise.reject(c);case 27:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=CO(TO().mark((function e(){return TO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function RP(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if((t=yh(t).call(t,Boolean)).length<2)return t[0];var n=new Uint8Array(aD(t).call(t,(function(e,t){return e+t.byteLength}),0)),i=0;return Ch(t).call(t,(function(e){n.set(e,i),i+=e.byteLength})),n}function MP(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new $g((function(t){return Qw(t,e)}))}var UP=function(e){MO(n,e);var t,r=VO(n);function n(e){var t;return OO(this,n),RO(zO(t=r.call(this,e)),"type",ND),RO(zO(t),"_queue",[]),RO(zO(t),"_alive",[]),RO(zO(t),"_currentTask",null),RO(zO(t),"_finnalUrl",""),RO(zO(t),"_config",void 0),t._config=function(e){return EO({loaderType:ND,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:GD,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}(e),t._config.loaderType!==zD&&CP.isSupported()||(t.type=zD),t.log=e.logger,t}return PO(n,[{key:"isFetch",value:function(){return this.type===ND}},{key:"load",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?r=e:r.url=e||r.url||this._config.url,(r=Lb({},this._config,r)).params&&(r.params=Lb({},r.params)),r.headers&&WD(r.headers)&&(r.headers=Lb({},r.headers)),r.body&&WD(r.body)&&(r.body=Lb({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new PP(this.type,r);return n.loader.on(AP,(function(e){t.emit(AP,e)})),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(t=CO(TO().mark((function e(){var t;return TO().wrap((function(e){for(var r,n,i;;)switch(e.prev=e.next){case 0:return t=oh(r=hb(n=this._queue).call(n,(function(e){return e.cancel()}))).call(r,hb(i=this._alive).call(i,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,$g.all(t);case 6:return e.next=8,MP();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch((function(e){}));t&&"function"==typeof t.finally&&t.finally((function(){var t,r,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(r=e._alive)||void 0===r?void 0:r.length)>0&&(e._alive=yh(n=e._alive).call(n,(function(t){return t&&t!==e._currentTask})));e._processTask()}))}}}],[{key:"isFetchSupport",value:function(){return CP.isSupported()}}]),n}(iw),IP=function(){function e(){OO(this,e),RO(this,"_prevCurrentTime",0)}return PO(e,[{key:"do",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(e){var i=e.currentTime,a=0;if(this._prevCurrentTime===i){var o=oD.info(oD.get(e),i);if(!o.buffers.length)return;r&&o.nextStart||o.nextStart&&o.nextStart-i<t?a=o.nextStart+.1:o.end&&o.end-i>n&&!e.seeking&&(a=i+.1)}this._prevCurrentTime=i,a&&i!==a&&(e.currentTime=a)}}}]),e}();EL("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),NL);var BP=re.Set,jP=Le,FP=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"add"in e&&"delete"in e&&"keys"in e)return e;throw TypeError(jP(e)+" is not a set")},NP=eC,zP=se("Set"),VP=zP.prototype,GP={Set:zP,add:NP("add",1),has:NP("has",1),remove:NP("delete",1),proto:VP},HP=fC,qP=function(e,t,r){return r?HP(e.keys(),t):e.forEach(t)},KP=qP,WP=GP.Set,YP=GP.add,JP=function(e){var t=new WP;return KP(e,(function(e){YP(t,e)})),t},QP=function(e){return e.size},XP=Pe,$P=nr,ZP=R,eR=Vr,tR=TypeError,rR=Math.max,nR=function(e,t,r,n){this.set=e,this.size=t,this.has=r,this.keys=n};nR.prototype={getIterator:function(){return $P(ZP(this.keys,this.set))},includes:function(e){return ZP(this.has,this.set,e)}};var iR=function(e){$P(e);var t=+e.size;if(t!=t)throw tR("Invalid size");return new nR(e,rR(eR(t),0),XP(e.has),XP(e.keys))},aR=FP,oR=JP,sR=QP,uR=iR,cR=qP,lR=fC,fR=GP.has,hR=GP.remove,dR=function(e){var t=aR(this),r=uR(e),n=oR(t);return sR(t)<=r.size?cR(t,(function(e){r.includes(e)&&hR(n,e)})):lR(r.getIterator(),(function(e){fR(t,e)&&hR(n,e)})),n},pR=function(){return!1},vR=dR;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{difference:vR});var yR=FP,gR=QP,mR=iR,_R=qP,bR=fC,wR=GP.Set,kR=GP.add,SR=GP.has,xR=function(e){var t=yR(this),r=mR(e),n=new wR;return gR(t)>r.size?bR(r.getIterator(),(function(e){SR(t,e)&&kR(n,e)})):_R(t,(function(e){r.includes(e)&&kR(n,e)})),n},ER=xR;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{intersection:ER});var TR=FP,AR=GP.has,LR=QP,CR=iR,OR=qP,DR=fC,PR=Id,RR=function(e){var t=TR(this),r=CR(e);if(LR(t)<=r.size)return!1!==OR(t,(function(e){if(r.includes(e))return!1}),!0);var n=r.getIterator();return!1!==DR(n,(function(e){if(AR(t,e))return PR(n,"normal",!1)}))},MR=RR;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{isDisjointFrom:MR});var UR=FP,IR=QP,BR=qP,jR=iR,FR=function(e){var t=UR(this),r=jR(e);return!(IR(t)>r.size)&&!1!==BR(t,(function(e){if(!r.includes(e))return!1}),!0)},NR=FR;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{isSubsetOf:NR});var zR=FP,VR=GP.has,GR=QP,HR=iR,qR=fC,KR=Id,WR=function(e){var t=zR(this),r=HR(e);if(GR(t)<r.size)return!1;var n=r.getIterator();return!1!==qR(n,(function(e){if(!VR(t,e))return KR(n,"normal",!1)}))},YR=WR;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{isSupersetOf:YR});var JR=FP,QR=JP,XR=iR,$R=fC,ZR=GP.add,eM=GP.has,tM=GP.remove,rM=function(e){var t=JR(this),r=XR(e).getIterator(),n=QR(t);return $R(r,(function(e){eM(t,e)?tM(n,e):ZR(n,e)})),n},nM=rM;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{symmetricDifference:nM});var iM=FP,aM=GP.add,oM=JP,sM=iR,uM=fC,cM=function(e){var t=iM(this),r=sM(e).getIterator(),n=oM(t);return uM(r,(function(e){aM(n,e)})),n},lM=cM;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{union:lM});var fM=BP;Cr({target:"Set",stat:!0,forced:!0},{from:JL}),Cr({target:"Set",stat:!0,forced:!0},{of:XL});var hM=FP,dM=GP.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=hM(this),t=0,r=arguments.length;t<r;t++)dM(e,arguments[t]);return e}});var pM=FP,vM=GP.remove;Cr({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=pM(this),r=!0,n=0,i=arguments.length;n<i;n++)e=vM(t,arguments[n]),r=r&&e;return!!r}});var yM=Xt,gM=FP,mM=qP;Cr({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=gM(this),r=yM(e,arguments.length>1?arguments[1]:void 0);return!1!==mM(t,(function(e){if(!r(e,e,t))return!1}),!0)}});var _M=cn,bM=Ze,wM=K,kM=mu,SM=dt("iterator"),xM=Object,EM=L,TM=function(e){if(wM(e))return!1;var t=xM(e);return void 0!==t[SM]||"@@iterator"in t||bM(kM,_M(t))},AM=te,LM=se("Set"),CM=function(e){return function(e){return AM(e)&&"number"==typeof e.size&&EM(e.has)&&EM(e.keys)}(e)?e:TM(e)?new LM(e):e},OM=R,DM=CM,PM=dR;Cr({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return OM(PM,this,DM(e))}});var RM=Xt,MM=FP,UM=qP,IM=GP.Set,BM=GP.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=MM(this),r=RM(e,arguments.length>1?arguments[1]:void 0),n=new IM;return UM(t,(function(e){r(e,e,t)&&BM(n,e)})),n}});var jM=Xt,FM=FP,NM=qP;Cr({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=FM(this),r=jM(e,arguments.length>1?arguments[1]:void 0),n=NM(t,(function(e){if(r(e,e,t))return{value:e}}),!0);return n&&n.value}});var zM=R,VM=CM,GM=xR;Cr({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return zM(GM,this,VM(e))}});var HM=R,qM=CM,KM=RR;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return HM(KM,this,qM(e))}});var WM=R,YM=CM,JM=FR;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return WM(JM,this,YM(e))}});var QM=R,XM=CM,$M=WR;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return QM($M,this,XM(e))}});var ZM=Cr,eU=g,tU=FP,rU=qP,nU=ti,iU=eU([].join),aU=eU([].push);ZM({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=tU(this),r=void 0===e?",":nU(e),n=[];return rU(t,(function(e){aU(n,e)})),iU(n,r)}});var oU=Xt,sU=FP,uU=qP,cU=GP.Set,lU=GP.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=sU(this),r=oU(e,arguments.length>1?arguments[1]:void 0),n=new cU;return uU(t,(function(e){lU(n,r(e,e,t))})),n}});var fU=Pe,hU=FP,dU=qP,pU=TypeError;Cr({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=hU(this),r=arguments.length<2,n=r?void 0:arguments[1];if(fU(e),dU(t,(function(i){r?(r=!1,n=i):n=e(n,i,i,t)})),r)throw pU("Reduce of empty set with no initial value");return n}});var vU=Xt,yU=FP,gU=qP;Cr({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=yU(this),r=vU(e,arguments.length>1?arguments[1]:void 0);return!0===gU(t,(function(e){if(r(e,e,t))return!0}),!0)}});var mU=R,_U=CM,bU=rM;Cr({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return mU(bU,this,_U(e))}});var wU=R,kU=CM,SU=cM;Cr({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return wU(SU,this,kU(e))}});var xU=r(fM),EU=function(){function e(t){var r=this;OO(this,e),RO(this,"_seiSet",new xU),this.emitter=t,t.on(dP,(function(e){e&&r._seiSet.add(e)}))}return PO(e,[{key:"throw",value:function(e,t){var r,n,i=this;if(null!=e&&this._seiSet.size){var a=e-.2,o=e+.2,s=[];Ch(r=this._seiSet).call(r,(function(e){e.time>=a&&e.time<=o&&s.push(e)})),Ch(s).call(s,(function(e){i._seiSet.delete(e),i.emitter.emit(pP,e)})),t&&Ch(n=this._seiSet).call(n,(function(t){t.time<e-5&&i._seiSet.delete(t)}))}}},{key:"reset",value:function(){this._seiSet.clear()}}]),e}(),TU=function(){function e(t){OO(this,e),RO(this,"_chunkSpeed",0),RO(this,"_chunkCache",[]),RO(this,"_speeds",[]),RO(this,"_totalSize",0),RO(this,"_totalCost",0),this._opts=t||{}}return PO(e,[{key:"addRecord",value:function(e,t){var r;e&&t&&(this._speeds.push(8e3*e/t),this._speeds=Tm(r=this._speeds).call(r,-3))}},{key:"addChunkRecord",value:function(e,t){var r,n;if(e&&t&&!(e<((null===(r=this._opts)||void 0===r?void 0:r.skipChunkSize)||1e3))){this._totalSize+=e,this._totalCost+=t,this._chunkSpeed=8e3*e/t,this._chunkCache.push({size:e,duration:t,timestamp:performance.now()});var i,a=(null===(n=this._opts)||void 0===n?void 0:n.chunkCountForSpeed)||50;if(this._chunkCache.length>a)this._chunkCache=Tm(i=this._chunkCache).call(i,-a)}}},{key:"getAvgSpeed",value:function(){var e,t,r,n;if(!this._chunkCache.length&&!this._speeds.length)return 0;if(this._speeds.length)return aD(n=this._speeds).call(n,(function(e,t){return e+t}))/this._speeds.length;var i=this._chunkCache[this._chunkCache.length-1],a=performance.now()-i.timestamp;return a>((null===(r=this._opts)||void 0===r?void 0:r.longtimeNoReceived)||3e3)&&this._chunkCache.push({size:0,duration:a,timestamp:performance.now()}),8e3*aD(e=this._chunkCache).call(e,(function(e,t){return e+t.size}),0)/aD(t=this._chunkCache).call(t,(function(e,t){return e+t.duration}),0)}},{key:"getLatestSpeed",value:function(){return this._chunkCache.length||this._speeds.length?this._speeds.length?this._speeds[this._speeds.length-1]:this._chunkSpeed:0}},{key:"getTotalSize",value:function(){return this._totalSize}},{key:"getTotalCost",value:function(){return this._totalCost}},{key:"reset",value:function(){this._chunkCache=[],this._speeds=[],this._totalSize=0,this._totalCost=0}}]),e}(),AU=function(){function e(t){OO(this,e),RO(this,"encodeType",""),RO(this,"audioCodec",""),RO(this,"videoCodec",""),RO(this,"domain",""),RO(this,"fps",0),RO(this,"bitrate",0),RO(this,"width",0),RO(this,"height",0),RO(this,"samplerate",0),RO(this,"channelCount",0),RO(this,"gop",0),RO(this,"_bitsAccumulateSize",0),RO(this,"_bitsAccumulateDuration",0),RO(this,"_startGopId",-1),this._timescale=t}return PO(e,[{key:"getStats",value:function(){return{encodeType:this.encodeType,audioCodec:this.audioCodec,videoCodec:this.videoCodec,domain:this.domain,fps:this.fps,bitrate:this.bitrate,width:this.width,height:this.height,samplerate:this.samplerate,channelCount:this.channelCount,gop:this.gop}}},{key:"setEncodeType",value:function(e){this.encodeType=e}},{key:"setFpsFromScriptData",value:function(e){var t,r=e.data,n=null==r||null===(t=r.onMetaData)||void 0===t?void 0:t.framerate;n&&n>0&&n<100&&(this.fps=n)}},{key:"setVideoMeta",value:function(e){if(this.width=e.width,this.height=e.height,this.videoCodec=e.codec,this.encodeType=e.codecType,e.fpsNum&&e.fpsDen){var t=e.fpsNum/e.fpsDen;t>0&&t<100&&(this.fps=t)}}},{key:"setAudioMeta",value:function(e){this.audioCodec=e.codec,this.samplerate=e.sampleRate,this.channelCount=e.channelCount}},{key:"setDomain",value:function(e){var t;this.domain=Tm(t=e.split("/")).call(t,2,3)[0]}},{key:"updateBitrate",value:function(e){var t=this;if((!this.fps||this.fps>=100)&&e.length){var r=aD(e).call(e,(function(e,t){return e+t.duration}),0)/e.length;this.fps=Math.round(this._timescale/r)}Ch(e).call(e,(function(e){var r;-1===t._startGopId&&(t._startGopId=e.gopId),e.gopId===t._startGopId&&t.gop++,t._bitsAccumulateDuration+=e.duration/(t._timescale/1e3),t._bitsAccumulateSize+=aD(r=e.units).call(r,(function(e,t){return e+t.length}),0),t._bitsAccumulateDuration>=1e3&&(t.bitrate=8*t._bitsAccumulateSize,t._bitsAccumulateDuration=0,t._bitsAccumulateSize=0)}))}}]),e}(),LU=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;OO(this,e),RO(this,"_core",null),RO(this,"_samples",[]),this._core=t,this._timescale=r,this._stats=new AU(r),this._bindEvents()}return PO(e,[{key:"getStats",value:function(){var e,t,r,n,i,a,o,s,u,c,l,f=(null===(e=this._core)||void 0===e?void 0:e.media)||{},h=f.currentTime,d=void 0===h?0:h,p=f.decodeFps,v=void 0===p?0:p;return EO(EO({},this._stats.getStats()),{},{downloadSpeed:(null===(t=this._core)||void 0===t||null===(r=t.speedInfo)||void 0===r?void 0:r.call(t).speed)||0,avgSpeed:(null===(n=this._core)||void 0===n||null===(i=n.speedInfo)||void 0===i?void 0:i.call(n).avgSpeed)||0,totalReceivedByte:(null===(a=this._core)||void 0===a||null===(o=a.speedInfo)||void 0===o?void 0:o.call(a).totalSize)||0,totalReceivedCost:(null===(s=this._core)||void 0===s||null===(u=s.speedInfo)||void 0===u?void 0:u.call(s).totalCost)||0,currentTime:d,bufferEnd:(null===(c=this._core)||void 0===c||null===(l=c.bufferInfo())||void 0===l?void 0:l.remaining)||0,decodeFps:v})}},{key:"_bindEvents",value:function(){var e=this;this._core.on(_P,(function(t){var r=t.videoTrack;return e._stats.updateBitrate(r.samples)})),this._core.on(vP,(function(t){e._stats.setFpsFromScriptData(t)})),this._core.on(hP,(function(t){"video"===t.type?e._stats.setVideoMeta(t.track):e._stats.setAudioMeta(t.track)})),this._core.on(eP,(function(t){e._stats.setDomain(t.responseUrl)}))}},{key:"reset",value:function(){this._samples=[],this._stats=new AU(this._timescale)}}]),e}();function CU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OU(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Yh(e,VU(n.key),n)}}function DU(e,t,r){return t&&OU(e.prototype,t),r&&OU(e,r),Yh(e,"prototype",{writable:!1}),e}function PU(e,t,r){return(t=VU(t))in e?Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RU(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Qh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Yh(e,"prototype",{writable:!1}),t&&UU(e,t)}function MU(e){var t;return(MU=$h?Lm(t=Xh).call(t):function(e){return e.__proto__||Xh(e)})(e)}function UU(e,t){var r;return(UU=$h?Lm(r=$h).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function IU(e,t){if(t&&("object"===Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function BU(e){var t=function(){if("undefined"==typeof Reflect||!Cm)return!1;if(Cm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Cm(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=MU(e);if(t){var i=MU(this).constructor;r=Cm(n,arguments,i)}else r=n.apply(this,arguments);return IU(this,r)}}function jU(e,t){return function(e){if(db(e))return e}(e)||function(e,t){var r=null==e?null:void 0!==Jh&&Ob(e)||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(l){c=!0,i=l}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||NU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function FU(e){return function(e){if(db(e))return zU(e)}(e)||function(e){if(void 0!==Jh&&null!=Ob(e)||null!=e["@@iterator"])return Kb(e)}(e)||NU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NU(e,t){var r;if(e){if("string"==typeof e)return zU(e,t);var n=Tm(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Kb(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zU(e,t):void 0}}function zU(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VU(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var r=e[Om];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ol(t)?t:String(t)}var GU="video",HU="audio",qU="metadata",KU="avc",WU="hevc",YU="aac",JU="g7110a",QU="g7110m",XU="opus",$U="mp3",ZU="LARGE_AV_SHIFT",eI="LARGE_VIDEO_GAP",tI="LARGE_VIDEO_GAP_BETWEEN_CHUNK",rI="LARGE_AUDIO_GAP",nI="AUDIO_FILLED",iI="AUDIO_DROPPED",aI=function(){function e(){CU(this,e),PU(this,"id",1),PU(this,"type",GU),PU(this,"codecType",KU),PU(this,"pid",-1),PU(this,"hvcC",void 0),PU(this,"codec",""),PU(this,"timescale",0),PU(this,"formatTimescale",0),PU(this,"sequenceNumber",0),PU(this,"baseMediaDecodeTime",0),PU(this,"baseDts",0),PU(this,"duration",0),PU(this,"warnings",[]),PU(this,"samples",[]),PU(this,"pps",[]),PU(this,"sps",[]),PU(this,"vps",[]),PU(this,"fpsNum",0),PU(this,"fpsDen",0),PU(this,"sarRatio",[]),PU(this,"width",0),PU(this,"height",0),PU(this,"nalUnitSize",4),PU(this,"present",!1),PU(this,"isVideoEncryption",!1),PU(this,"isAudioEncryption",!1),PU(this,"isVideo",!0),PU(this,"lastKeyFrameDts",0),PU(this,"kid",null),PU(this,"pssh",null),PU(this,"ext",void 0)}return DU(e,[{key:"reset",value:function(){this.sequenceNumber=this.width=this.height=this.fpsDen=this.fpsNum=this.duration=this.baseMediaDecodeTime=this.timescale=0,this.codec="",this.present=!1,this.pid=-1,this.pps=[],this.sps=[],this.vps=[],this.sarRatio=[],this.samples=[],this.warnings=[],this.hvcC=null}},{key:"firstDts",get:function(){return this.samples.length?this.samples[0].dts:null}},{key:"firstPts",get:function(){return this.samples.length?this.samples[0].pts:null}},{key:"samplesDuration",get:function(){if(this.samples.length>0){var e=this.samples[0],t=this.samples[this.samples.length-1];return t.dts-e.dts+t.duration}return 0}},{key:"exist",value:function(){return!!/av01/.test(this.codec)||!!(this.pps.length&&this.sps.length&&this.codec)}},{key:"hasSample",value:function(){return!!this.samples.length}},{key:"isEncryption",get:function(){return this.isVideoEncryption}}]),e}(),oI=function(){function e(){CU(this,e),PU(this,"id",2),PU(this,"type",HU),PU(this,"codecType",YU),PU(this,"pid",-1),PU(this,"codec",""),PU(this,"container",""),PU(this,"sequenceNumber",0),PU(this,"sampleDuration",0),PU(this,"timescale",0),PU(this,"formatTimescale",0),PU(this,"baseMediaDecodeTime",0),PU(this,"duration",0),PU(this,"warnings",[]),PU(this,"samples",[]),PU(this,"baseDts",0),PU(this,"sampleSize",16),PU(this,"sampleRate",0),PU(this,"channelCount",0),PU(this,"objectType",0),PU(this,"sampleRateIndex",0),PU(this,"config",[]),PU(this,"present",!1),PU(this,"isVideoEncryption",!1),PU(this,"isAudioEncryption",!1),PU(this,"kid",null),PU(this,"ext",void 0)}return DU(e,[{key:"reset",value:function(){this.sequenceNumber=0,this.timescale=0,this.sampleDuration=0,this.sampleRate=0,this.channelCount=0,this.baseMediaDecodeTime=0,this.present=!1,this.pid=-1,this.codec="",this.samples=[],this.config=[],this.warnings=[]}},{key:"exist",value:function(){return!(!this.sampleRate||!this.channelCount||!this.codec&&!this.container||this.codecType!==YU&&this.codecType!==JU&&this.codecType!==QU&&this.codecType!==XU&&this.codecType!==$U)}},{key:"hasSample",value:function(){return!!this.samples.length}},{key:"isEncryption",get:function(){return this.isAudioEncryption}},{key:"firstDts",get:function(){return this.samples.length?this.samples[0].dts:null}},{key:"firstPts",get:function(){return this.samples.length?this.samples[0].pts:null}},{key:"samplesDuration",get:function(){if(this.samples.length>0){var e=this.samples[0],t=this.samples[this.samples.length-1];return t.dts-e.dts+t.duration}return 0}}]),e}(),sI=function(){function e(t,r,n){CU(this,e),PU(this,"flag",{}),PU(this,"keyframe",!1),PU(this,"gopId",0),PU(this,"duration",0),PU(this,"size",0),PU(this,"units",[]),PU(this,"chromaFormat",420),this.originPts=this.pts=t,this.originDts=this.dts=r,n&&(this.units=n)}return DU(e,[{key:"cts",get:function(){return this.pts-this.dts}},{key:"setToKeyframe",value:function(){this.keyframe=!0,this.flag.dependsOn=2,this.flag.isNonSyncSample=0}}]),e}(),uI=DU((function e(t,r,n,i){CU(this,e),PU(this,"duration",1024),PU(this,"flag",{dependsOn:2,isNonSyncSample:0}),PU(this,"keyframe",!0),this.originPts=this.pts=this.dts=t,this.data=r,this.size=r.byteLength,this.sampleOffset=i,n&&(this.duration=n)})),cI=DU((function e(t,r){CU(this,e),PU(this,"time",0),this.data=t,this.originPts=this.pts=r})),lI=function(e){RU(r,e);var t=BU(r);function r(){return CU(this,r),t.apply(this,arguments)}return DU(r)}(cI),fI=function(e){RU(r,e);var t=BU(r);function r(){return CU(this,r),t.apply(this,arguments)}return DU(r)}(cI),hI=function(){function e(){CU(this,e),PU(this,"id",3),PU(this,"type",qU),PU(this,"timescale",0),PU(this,"flvScriptSamples",[]),PU(this,"seiSamples",[])}return DU(e,[{key:"exist",value:function(){return!(!this.flvScriptSamples.length&&!this.seiSamples.length||!this.timescale)}},{key:"reset",value:function(){this.timescale=0,this.flvScriptSamples=[],this.seiSamples=[]}},{key:"hasSample",value:function(){return!(!this.flvScriptSamples.length&&!this.seiSamples.length)}}]),e}(),dI=a.isFinite;Cr({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&dI(e)}});var pI=r(re.Number.isFinite),vI=function(){function e(t){CU(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]")}return DU(e,[{key:"warn",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(r=console).warn.apply(r,oh(t=[this._prefix]).call(t,i))}}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();PU(vI,"disabled",!0);var yI="undefined"!=typeof window,gI=yI&&navigator.userAgent.toLocaleLowerCase(),mI=yI&&/^((?!chrome|android).)*safari/.test(gI),_I=yI&&jA(gI).call(gI,"firefox"),bI=yI&&jA(gI).call(gI,"android"),wI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"getRateIndexByRate",value:function(t){var r;return r_(r=e.FREQ).call(r,t)}},{key:"parseADTS",value:function(t,r){for(var n=t.length,i=0;i+2<n&&(255!==t[i]||240!=(246&t[i+1]));)i++;if(!(i>=n)){var a=i,o=[],s=(60&t[i+2])>>>2,u=e.FREQ[s];if(!u)throw new Error("Invalid sampling index: ".concat(s));for(var c,l,f=1+((192&t[i+2])>>>6),h=(1&t[i+2])<<2|(192&t[i+3])>>>6,d=e._getConfig(s,h,f),p=d.config,v=d.codec,y=0,g=e.getFrameDuration(u);i+7<n;)if(255===t[i]&&240==(246&t[i+1])){if(!(l=(3&t[i+3])<<11|t[i+4]<<3|(224&t[i+5])>>5)||n-i<l)break;c=2*(1&~t[i+1]),o.push({pts:r+y*g,data:t.subarray(i+7+c,i+l)}),y++,i+=l}else i++;return{skip:a,remaining:i>=n?void 0:t.subarray(i),frames:o,samplingFrequencyIndex:s,sampleRate:u,objectType:f,channelCount:h,codec:v,config:p,originCodec:"mp4a.40.".concat(f)}}}},{key:"parseAudioSpecificConfig",value:function(t){if(t.length){var r=t[0]>>>3,n=(7&t[0])<<1|t[1]>>>7,i=(120&t[1])>>>3,a=e.FREQ[n];if(a){var o=e._getConfig(n,i,r);return{samplingFrequencyIndex:n,sampleRate:a,objectType:r,channelCount:i,config:o.config,codec:o.codec,originCodec:"mp4a.40.".concat(r)}}}}},{key:"getFrameDuration",value:function(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}},{key:"_getConfig",value:function(e,t,r){var n,i,a=[];return _I?e>=6?(n=5,i=e-3):(n=2,i=e):bI?(n=2,i=e):(n=5,i=e,e>=6?i=e-3:1===t&&(n=2,i=e)),a[0]=n<<3,a[0]|=(14&e)>>1,a[1]=(1&e)<<7,a[1]|=t<<3,5===n&&(a[1]|=(14&i)>>1,a[2]=(1&i)<<7,a[2]|=8,a[3]=0),{config:a,codec:"mp4a.40.".concat(n)}}},{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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(6===t)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])}else{if(1===t)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(2===t)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(3===t)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])}}}]),e}();PU(wI,"FREQ",[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350]);var kI=Cr,SI=g,xI=oi,EI=RangeError,TI=String.fromCharCode,AI=String.fromCodePoint,LI=SI([].join);kI({target:"String",stat:!0,arity:1,forced:!!AI&&1!=AI.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,i=0;n>i;){if(t=+arguments[i++],xI(t,1114111)!==t)throw EI(t+" is not a valid code point");r[i]=t<65536?TI(t):TI(55296+((t-=65536)>>10),t%1024+56320)}return LI(r,"")}});var CI=r(re.String.fromCodePoint),OI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"getFrameDuration",value:function(e){return 20}},{key:"parseHeaderPackets",value:function(e){if(e.length){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r="",n=0;n<8;n++)r+=CI(e[n]);if("OpusHead"!==r)throw new Error("Invalid Opus MagicSignature");var i=e[9];console.log("Pre-skip",e[10],e[11]);var a=t.getUint32(12,!0),o=t.getInt16(16,!0);if(a){return{outputGain:o,sampleRate:a,channelCount:i,config:new Uint8Array(e.buffer,e.byteOffset+8,e.byteLength-8),codec:"opus",originCodec:"opus"}}}}}]),e}(),DI=1e3,PI=5e3,RI=function(){function e(t,r,n){CU(this,e),this.videoTrack=t,this.audioTrack=r,this.metadataTrack=n,this._baseDts=-1,this._baseDtsInited=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=0,this._videoTimestampBreak=0,this._lastVideoDuration=0,this._keyFrameInNextChunk=!1,this._lastAudioExceptionGapDot=-1/0,this._lastAudioExceptionOverlapDot=-1/0,this._lastAudioExceptionLargeGapDot=-1/0,this._lastVideoExceptionLargeGapDot=-1/0,this._lastVideoExceptionChunkFirstDtsDot=-1/0}return DU(e,[{key:"fix",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t=Math.round(1e3*t);var i=this.videoTrack,a=this.audioTrack;if(!r&&n||(this._videoLastSample=null,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=0,this._videoTimestampBreak=0,this._lastAudioExceptionGapDot=-1/0,this._lastAudioExceptionOverlapDot=-1/0,this._lastAudioExceptionLargeGapDot=-1/0,this._lastVideoExceptionLargeGapDot=-1/0,this._lastVideoExceptionChunkFirstDtsDot=-1/0),r&&!n&&(this._baseDtsInited=!1),this._baseDtsInited||this._calculateBaseDts(a,i),!n&&t&&(this._audioNextPts=this._videoNextDts=t),this._baseDtsInited&&(this._videoTimestampBreak||!this.videoTrack.exist())&&(this._audioTimestampBreak||!this.audioTrack.exist())&&this._resetBaseDtsWhenStreamBreaked(),this._fixAudio(a),this._keyFrameInNextChunk=!1,this._fixVideo(i),this.metadataTrack.exist()){var o,s,u=this.metadataTrack.timescale;Ch(o=this.metadataTrack.seiSamples).call(o,(function(t){t.pts=t.originPts-e._baseDts,t.time=Math.max(0,t.pts)/u})),Ch(s=this.metadataTrack.flvScriptSamples).call(s,(function(t){t.pts=t.originPts-e._baseDts,t.time=Math.max(0,t.pts)/u}))}i.samples.length&&(i.baseMediaDecodeTime=i.samples[0].dts),a.samples.length&&(a.baseMediaDecodeTime=a.samples[0].pts*a.timescale/1e3)}},{key:"_fixVideo",value:function(e){var t=this,r=e.samples;if(r.length){var n;if(Ch(r).call(r,(function(e){e.dts-=t._baseDts,e.pts-=t._baseDts,e.keyframe&&(t._keyFrameInNextChunk=!0)})),e.fpsNum&&e.fpsDen)n=e.timescale*(e.fpsDen/e.fpsNum);else if(e.length>1){var i=e.samples[0],a=e.samples[r.length-1];n=Math.floor((a.dts-i.dts)/(r.length-1))}else n=this._lastVideoDuration||40;var o=r.pop();if(this._videoLastSample&&r.unshift(this._videoLastSample),this._videoLastSample=o,r.length){if(void 0===this._videoNextDts){var s=r[0];this._videoNextDts=s.dts}var u=r.length,c=0,l=r[0],f=this._videoNextDts-l.dts;if(Math.abs(f)>200){var h;if(Math.abs(l.dts-this._lastVideoExceptionChunkFirstDtsDot)>5e3)this._lastVideoExceptionChunkFirstDtsDot=l.dts,e.warnings.push({type:tI,nextDts:this._videoNextDts,firstSampleDts:l.dts,nextSampleDts:null===(h=r[1])||void 0===h?void 0:h.dts,sampleDuration:f});this._videoTimestampBreak>=5?(this._videoNextDts=l.dts,this._videoTimestampBreak=0):(l.dts+=f,l.pts+=f,this.audioTrack.exist()||(this._videoTimestampBreak=1))}for(var d=0;d<u;d++){var p=r[d].dts,v=r[d+1];((c=d<u-1?v.dts-p:o?o.dts-p:n)>1e3||c<0)&&(this._videoTimestampBreak++,Math.abs(p-this._lastVideoExceptionLargeGapDot)>5e3&&(this._lastVideoExceptionLargeGapDot=p,e.warnings.push({type:eI,time:p/e.timescale,dts:p,originDts:r[d].originDts,nextDts:this._videoNextDts,sampleDuration:c,refSampleDuration:n})),c=n),r[d].duration=c,this._videoNextDts+=c,this._lastVideoDuration=c}}}}},{key:"_fixAudio",value:function(e){var t=this,r=e.samples;r.length&&(Ch(r).call(r,(function(e){e.dts=e.pts-=t._baseDts})),this._doFixAudioInternal(e,r,1e3))}},{key:"_calculateBaseDts",value:function(e,t){var r=e.samples,n=t.samples;if(!r.length&&!n.length)return!1;var i=1/0,a=1/0;r.length&&(e.baseDts=i=r[0].pts),n.length&&(t.baseDts=a=n[0].dts),this._baseDts=Math.min(i,a);var o=a-i;return pI(o)&&Math.abs(o)>500&&t.warnings.push({type:ZU,videoBaseDts:a,audioBasePts:i,baseDts:this._baseDts,delta:o}),this._baseDtsInited=!0,!0}},{key:"_resetBaseDtsWhenStreamBreaked",value:function(){this._calculateBaseDts(this.audioTrack,this.videoTrack)&&(this.audioTrack.exist()?this.videoTrack.exist()?this._baseDts-=Math.min(this._audioNextPts,this._videoNextDts):this._baseDts-=this._audioNextPts:this._baseDts-=this._videoNextDts,this._videoTimestampBreak=0,this._audioTimestampBreak=0)}},{key:"_doFixAudioInternal",value:function(e,t,r){if(!e.sampleDuration)switch(e.codecType){case YU:e.sampleDuration=wI.getFrameDuration(e.timescale,r);break;case XU:e.sampleDuration=OI.getFrameDuration(e.samples,r);break;case JU:case QU:e.sampleDuration=this._getG711Duration(e);break;default:console.error("can't fix audio codecType:",e.codecType)}var n=e.sampleDuration,i=e.codecType===XU?20:e.codecType===YU?1024:n*e.timescale/1e3;if(void 0===this._audioNextPts){var a=t[0];this._audioNextPts=a.pts}for(var o=0;o<t.length;o++){var s=this._audioNextPts,u=t[o],c=u.pts-s;if(0===o&&this._audioTimestampBreak>=5&&this._keyFrameInNextChunk&&(s=this._audioNextPts=u.dts,c=0,this._audioTimestampBreak=0),!this._audioTimestampBreak&&c>=3*n&&c<=DI&&!mI){var l=this._getSilentFrame(e)||t[0].data.subarray(),f=Math.floor(c/n);Math.abs(u.pts-this._lastAudioExceptionGapDot)>PI&&(this._lastAudioExceptionGapDot=u.pts,e.warnings.push({type:nI,pts:u.pts,originPts:u.originPts,count:f,nextPts:s,refSampleDuration:n}));for(var h=0;h<f;h++){var d=new uI(Math.floor(this._audioNextPts+n)-Math.floor(this._audioNextPts),l,i);d.originPts=Math.floor(this._baseDts+s),B_(t).call(t,o,0,d),this._audioNextPts+=n,o++}o--}else if(c<=-3*n&&c>=-1e3)Math.abs(u.pts-this._lastAudioExceptionOverlapDot)>PI&&(this._lastAudioExceptionOverlapDot=u.pts,e.warnings.push({type:iI,pts:u.pts,originPts:u.originPts,nextPts:s,refSampleDuration:n})),B_(t).call(t,o,1),o--;else{if(Math.abs(c)>DI&&(this._audioTimestampBreak++,Math.abs(u.pts-this._lastAudioExceptionLargeGapDot)>PI&&(this._lastAudioExceptionLargeGapDot=u.pts,e.warnings.push({type:rI,time:u.pts/1e3,pts:u.pts,originPts:u.originPts,nextPts:s,sampleDuration:c,refSampleDuration:n}))),e.codecType===XU){var p=t[t.length-1];p&&(p.duration=u.pts-p.pts)}else u.dts=u.pts=s,u.duration=i;this._audioNextPts+=n}}}},{key:"_getG711Duration",value:function(e){var t=e.sampleSize,r=e.channelCount,n=e.sampleRate,i=e.samples[0];if(i)return 2*i.data.byteLength/r/(t/8)/n*1e3}},{key:"_getSilentFrame",value:function(e){return e.codecType===YU?wI.getSilentFrame(e.codec,e.channelCount):new Uint8Array(8*e.sampleDuration*e.channelCount)}}]),e}();function MI(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t=yh(t).call(t,Boolean);var n=new Uint8Array(aD(t).call(t,(function(e,t){return e+t.byteLength}),0)),i=0;return Ch(t).call(t,(function(e){n.set(e,i),i+=e.byteLength})),n}function UI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function II(e){for(var t,r="avc1.",n=0;n<3;n++)(t=e[n].toString(16)).length<2&&(t="0".concat(t)),r+=t;return r}function BI(e){if(!db(e)){for(var t=[],r="",n=0;n<e.length;n++)n%2&&(r=e[n-1]+e[n],t.push(ob(r,16)),r="");return t}return hb(e).call(e,(function(e){return ob(e,16)}))}var jI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"parseAnnexB",value:function(e){var t=e.byteLength-1,r=0;do{if(0!==e[t])break;r++,t--}while(t>0);r>=3&&(e=e.subarray(0,t+1));for(var n=e.length,i=2,a=0;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if((a=++i+2)>=n)return[];for(var o=[];a<n;)switch(e[a]){case 0:if(0!==e[a-1]){a+=2;break}if(0!==e[a-2]){a++;break}if(a<n-1&&1!==e[a+1]){a++;break}i!==a-2&&o.push(e.subarray(i,a-2));do{a++}while(1!==e[a]&&a<n);a=(i=a+1)+2;break;case 1:if(0!==e[a-1]||0!==e[a-2]){a+=3;break}i!==a-2&&o.push(e.subarray(i,a-2)),a=(i=a+1)+2;break;default:a+=3}return i<n&&o.push(e.subarray(i)),o}},{key:"parseAvcC",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var r,n=e.length,i=[],a=0;a+t<n;)if(r=UI(e,a),3===t&&(r>>>=8),a+=t,r){if(a+r>n)break;i.push(e.subarray(a,a+r)),a+=r}return i}}},{key:"parseSEI",value:function(e,t){for(var r=e.length,n=t?2:1,i=0,a=0,o="";255===e[n];)i+=255,n++;for(i+=e[n++];255===e[n];)a+=255,n++;if(a+=e[n++],5===i&&r>n+16)for(var s=0;s<16;s++)o+=e[n].toString(16),n++;return{payload:e.subarray(n,n+a),type:i,size:a,uuid:o}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,r=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(r.push(n+2),n+=2):n++;if(!r.length)return e;var i=t-r.length,a=new Uint8Array(i),o=0;for(n=0;n<i;o++,n++)o===r[0]&&(o++,r.shift()),a[n]=e[o];return a}}]),e}(),FI=function(){function e(t){if(CU(this,e),PU(this,"_bytesAvailable",void 0),PU(this,"_bitsAvailable",0),PU(this,"_word",0),!t)throw new Error("ExpGolomb data params is required");this._data=t,this._bytesAvailable=t.byteLength,this._bytesAvailable&&this._loadWord()}return DU(e,[{key:"bitsAvailable",get:function(){return this._bitsAvailable}},{key:"_loadWord",value:function(){var e=this._data.byteLength-this._bytesAvailable,t=Math.min(4,this._bytesAvailable);if(0===t)throw new Error("No bytes available");var r=new Uint8Array(4);r.set(this._data.subarray(e,e+t)),this._word=new DataView(r.buffer).getUint32(0),this._bitsAvailable=8*t,this._bytesAvailable-=t}},{key:"skipBits",value:function(e){if(this._bitsAvailable>e)this._word<<=e,this._bitsAvailable-=e;else{e-=this._bitsAvailable;var t=Math.floor(e/8);e-=8*t,this._bytesAvailable-=t,this._loadWord(),this._word<<=e,this._bitsAvailable-=e}}},{key:"readBits",value:function(e){if(e>32)throw new Error("Cannot read more than 32 bits");var t=Math.min(this._bitsAvailable,e),r=this._word>>>32-t;return this._bitsAvailable-=t,this._bitsAvailable>0?this._word<<=t:this._bytesAvailable>0&&this._loadWord(),(t=e-t)>0&&this._bitsAvailable?r<<t|this.readBits(t):r}},{key:"skipLZ",value:function(){var e;for(e=0;e<this._bitsAvailable;++e)if(0!=(this._word&2147483648>>>e))return this._word<<=e,this._bitsAvailable-=e,e;return this._loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"skipScalingList",value:function(e){for(var t=8,r=8,n=0;n<e;n++)0!==r&&(r=(t+this.readEG()+256)%256),t=0===r?t:r}}]),e}(),NI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"parseAVCDecoderConfigurationRecord",value:function(t){if(!(t.length<7)){for(var r,n,i=1+(3&t[4]),a=[],o=[],s=6,u=31&t[5],c=0;c<u;c++)if(n=t[s]<<8|t[s+1],s+=2,n){var l=t.subarray(s,s+n);s+=n,a.push(l),r||(r=e.parseSPS(jI.removeEPB(l)))}var f,h=t[s];s++;for(var d=0;d<h;d++)f=t[s]<<8|t[s+1],s+=2,f&&(o.push(t.subarray(s,s+f)),s+=f);return{sps:r,spsArr:a,ppsArr:o,nalUnitSize:i}}}},{key:"parseSPS",value:function(e){var t=new FI(e);t.readUByte();var r=t.readUByte(),n=t.readUByte(),i=t.readUByte();t.skipUEG();var a=420;if(100===r||110===r||122===r||244===r||44===r||83===r||86===r||118===r||128===r||138===r||144===r){var o=t.readUEG();if(o<=3&&(a=[0,420,422,444][o]),3===o&&t.skipBits(1),t.skipUEG(),t.skipUEG(),t.skipBits(1),t.readBool())for(var s=3!==o?8:12,u=0;u<s;u++)t.readBool()&&(u<6?t.skipScalingList(16):t.skipScalingList(64))}t.skipUEG();var c=t.readUEG();if(0===c)t.readUEG();else if(1===c){t.skipBits(1),t.skipUEG(),t.skipUEG();for(var l=t.readUEG(),f=0;f<l;f++)t.skipUEG()}t.skipUEG(),t.skipBits(1);var h=t.readUEG(),d=t.readUEG(),p=t.readBits(1);0===p&&t.skipBits(1),t.skipBits(1);var v,y,g,m,_,b=0,w=0,k=0,S=0;if(t.readBool()&&(b=t.readUEG(),w=t.readUEG(),k=t.readUEG(),S=t.readUEG()),t.readBool()){if(t.readBool())switch(t.readUByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUByte()<<8|t.readUByte(),t.readUByte()<<8|t.readUByte()]}if(t.readBool()&&t.readBool(),t.readBool()&&(t.readBits(4),t.readBool()&&t.readBits(24)),t.readBool()&&(t.readUEG(),t.readUEG()),t.readBool()){var x=t.readBits(32),E=t.readBits(32);y=t.readBool(),_=(g=E)/(m=2*x)}}return{codec:II(e.subarray(1,4)),profileIdc:r,profileCompatibility:n,levelIdc:i,chromaFormat:a,width:Math.ceil(16*(h+1)-2*(b+w)),height:(2-p)*(d+1)*16-(p?2:4)*(k+S),sarRatio:v,fpsNum:g,fpsDen:m,fps:_,fixedFrame:y}}}]),e}(),zI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"parseHEVCDecoderConfigurationRecord",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t.length<23)){r=r||{};for(var n,i,a,o,s,u=1+(3&t[21]),c=[],l=[],f=[],h=23,d=t[22],p=0;p<d;p++){a=63&t[h],o=t[h+1]<<8|t[h+2],h+=3;for(var v=0;v<o;v++)if(s=t[h]<<8|t[h+1],h+=2,s){switch(a){case 32:var y=t.subarray(h,h+s);n||(n=e.parseVPS(jI.removeEPB(y),r)),f.push(y);break;case 33:var g=t.subarray(h,h+s);i||(i=e.parseSPS(jI.removeEPB(g),r)),c.push(g);break;case 34:l.push(t.subarray(h,h+s))}h+=s}}return{hvcC:r,sps:i,spsArr:c,ppsArr:l,vpsArr:f,nalUnitSize:u}}}},{key:"parseVPS",value:function(t,r){r=r||{};var n=new FI(t);n.readUByte(),n.readUByte(),n.readBits(12);var i=n.readBits(3);return r.numTemporalLayers=Math.max(r.numTemporalLayers||0,i+1),n.readBits(17),e._parseProfileTierLevel(n,i,r),r}},{key:"parseSPS",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r=r||{};var n=new FI(t);n.readUByte(),n.readUByte(),n.readBits(4);var i=n.readBits(3);r.numTemporalLayers=Math.max(i+1,r.numTemporalLayers||0),r.temporalIdNested=n.readBits(1),e._parseProfileTierLevel(n,i,r),n.readUEG();var a=r.chromaFormatIdc=n.readUEG(),o=420;a<=3&&(o=[0,420,422,444][a]);var s=0;3===a&&(s=n.readBits(1));var u,c,l,f,h=n.readUEG(),d=n.readUEG(),p=n.readBits(1);(1===p&&(u=n.readUEG(),c=n.readUEG(),l=n.readUEG(),f=n.readUEG()),r.bitDepthLumaMinus8=n.readUEG(),r.bitDepthChromaMinus8=n.readUEG(),1===p)&&(h-=(1!==a&&2!==a||0!==s?1:2)*(c+u),d-=(1===a&&0===s?2:1)*(f+l));return{codec:"hev1.1.6.L93.B0",width:h,height:d,chromaFormat:o,hvcC:r}}},{key:"_parseProfileTierLevel",value:function(e,t,r){var n=r.generalTierFlag||0;r.generalProfileSpace=e.readBits(2),r.generalTierFlag=Math.max(e.readBits(1),n),r.generalProfileIdc=Math.max(e.readBits(5),r.generalProfileIdc||0),r.generalProfileCompatibilityFlags=e.readBits(32),r.generalConstraintIndicatorFlags=[e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8)];var i=e.readBits(8);n<r.generalTierFlag?r.generalLevelIdc=i:r.generalLevelIdc=Math.max(i,r.generalLevelIdc||0);var a=[],o=[];if(t>e.bitsAvailable)throw new Error("maxSubLayersMinus inavlid size ".concat(t));for(var s=0;s<t;s++)a[s]=e.readBits(1),o[s]=e.readBits(1);t>0&&e.readBits(2*(8-t));for(var u=0;u<t;u++)0!==a[u]&&(e.readBits(2),e.readBits(1),e.readBits(5),e.readBits(16),e.readBits(16),e.readBits(4),e.readBits(16),e.readBits(16),e.readBits(12)),0!==o[u]&&e.readBits(8)}}]),e}(),VI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"decode",value:function(t){for(var r=[],n=t,i=0,a=t.length;i<a;)if(n[i]<128)r.push(String.fromCharCode(n[i])),++i;else{if(n[i]<192);else if(n[i]<224){if(e._checkContinuation(n,i,1)){var o=(31&n[i])<<6|63&n[i+1];if(o>=128){r.push(String.fromCharCode(65535&o)),i+=2;continue}}}else if(n[i]<240){if(e._checkContinuation(n,i,2)){var s=(15&n[i])<<12|(63&n[i+1])<<6|63&n[i+2];if(s>=2048&&55296!=(63488&s)){r.push(String.fromCharCode(65535&s)),i+=3;continue}}}else if(n[i]<248&&e._checkContinuation(n,i,3)){var u=(7&n[i])<<18|(63&n[i+1])<<12|(63&n[i+2])<<6|63&n[i+3];if(u>65536&&u<1114112){u-=65536,r.push(String.fromCharCode(u>>>10|55296)),r.push(String.fromCharCode(1023&u|56320)),i+=4;continue}}r.push(String.fromCharCode(65533)),++i}return r.join("")}},{key:"_checkContinuation",value:function(e,t,r){var n=e;if(t+r<n.length){for(;r--;)if(128!=(192&n[++t]))return!1;return!0}return!1}}]),e}(),GI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"parse",value:function(t){if(!(t.length<3)){var r={},n=e._parseValue(new DataView(t.buffer,t.byteOffset,t.byteLength)),i=e._parseValue(new DataView(t.buffer,t.byteOffset+n.size,t.byteLength-n.size));return r[n.data]=i.data,r}}},{key:"_parseValue",value:function(t){var r,n=t.byteLength,i=1,a=!1;switch(t.getUint8(0)){case 0:r=t.getFloat64(1),i+=8;break;case 1:r=!!t.getUint8(1),i+=1;break;case 2:var o=e._parseString(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i));r=o.data,i+=o.size;break;case 3:r={};var s=0;for(9==(16777215&t.getUint32(n-4))&&(s=3);i<n-4;){var u=e._parseObject(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i-s)),c=u.size,l=u.data;if(u.isEnd)break;r[l.name]=l.value,i+=c}if(i<=n-3)9===(16777215&t.getUint32(i-1))&&(i+=3);break;case 8:r={},i+=4;var f=0;for(9==(16777215&t.getUint32(n-4))&&(f=3);i<n-8;){var h=e._parseObject(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i-f)),d=h.size,p=h.data;if(h.isEnd)break;r[p.name]=p.value,i+=d}if(i<=n-3)9===(16777215&t.getUint32(i-1))&&(i+=3);break;case 9:r=void 0,i=1,a=!0;break;case 10:r=[];var v=t.getUint32(1);i+=4;for(var y=0;y<v;y++){var g=e._parseValue(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i)),m=g.data,_=g.size;r.push(m),i+=_}break;case 11:var b=t.getFloat64(i)+6e4*t.getInt16(i+8);r=new Date(b),i+=10;break;case 12:var w=t.getUint32(1);i+=4,r="",w>0&&(r=VI.decode(new Uint8Array(t.buffer,t.byteOffset+i,w))),i+=w;break;default:i=n}return{data:r,size:i,isEnd:a}}},{key:"_parseString",value:function(e){var t=e.getUint16(0),r="";return t>0&&(r=VI.decode(new Uint8Array(e.buffer,e.byteOffset+2,t))),{data:r,size:2+t}}},{key:"_parseObject",value:function(t){if(!(t.byteLength<3)){var r=e._parseString(t),n=e._parseValue(new DataView(t.buffer,t.byteOffset+r.size,t.byteLength-r.size));return{data:{name:r.data,value:n.data},size:r.size+n.size,isEnd:n.isEnd}}}}]),e}(),HI=7,qI=8,KI=10,WI=13,YI=new vI("FlvDemuxer"),JI=function(){function e(t,r,n){CU(this,e),PU(this,"_headerParsed",!1),PU(this,"_remainingData",null),PU(this,"_gopId",0),PU(this,"_needAddMetaBeforeKeyFrameNal",!0),this.videoTrack=t||new aI,this.audioTrack=r||new oI,this.metadataTrack=n||new hI,this._fixer=new RI(this.videoTrack,this.audioTrack,this.metadataTrack)}return DU(e,[{key:"demux",value:function(t){var r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0,o=this.audioTrack,s=this.videoTrack,u=this.metadataTrack;if(!n&&i||(this._remainingData=null),n&&(this._headerParsed=!1),n?(s.reset(),o.reset(),u.reset()):(s.samples=[],o.samples=[],u.seiSamples=[],u.flvScriptSamples=[],s.warnings=[],o.warnings=[],this._remainingData&&(t=MI(this._remainingData,t),this._remainingData=null)),!t.length)return{videoTrack:s,audioTrack:o,metadataTrack:u};var c=0;if(!this._headerParsed){if(!e.probe(t))throw new Error("Invalid flv file");o.present=(4&t[4])>>>2!=0,s.present=0!=(1&t[4]),this._headerParsed=!0,c=UI(t,5)+4}for(var l,f,h,d,p,v=t.length;c+15<v&&(l=t[c],!(c+15+(f=t[c+1]<<16|t[c+2]<<8|t[c+3])>v));){var y;h=(t[c+7]<<24>>>0)+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6],c+=11,d=t.subarray(c,c+f),8===l?this._parseAudio(d,h):9===l?(a&&(this.seamlessLoadingSwitching=!0),this._parseVideo(d,h)):18===l?this._parseScript(d,h):YI.warn("Invalid tag type: ".concat(l)),(p=UI(t,c+=f))!==11+f&&YI.warn(oh(y="Invalid PrevTagSize ".concat(p," (")).call(y,11+f,")")),c+=4}c<v&&(this._remainingData=t.subarray(c)),o.formatTimescale=s.formatTimescale=s.timescale=u.timescale=1e3,o.timescale=o.codecType===XU?1e3:o.sampleRate||0,!o.exist()&&o.hasSample()&&o.reset(),!s.exist()&&s.hasSample()&&s.reset();var g=u.flvScriptSamples[u.flvScriptSamples.length-1],m=null==g||null===(r=g.data)||void 0===r?void 0:r.onMetaData;return m&&(null!=s&&s.exist()&&(m.hasOwnProperty("duration")&&(s.duration=1e3*m.duration),!s.width&&m.hasOwnProperty("width")&&(s.width=m.width),!s.height&&m.hasOwnProperty("height")&&(s.height=m.height)),null!=o&&o.exist()&&m.hasOwnProperty("duration")&&(o.duration=1e3*m.duration)),{videoTrack:s,audioTrack:o,metadataTrack:u}}},{key:"fix",value:function(e,t,r){return this._fixer.fix(e,t,r),{videoTrack:this.videoTrack,audioTrack:this.audioTrack,metadataTrack:this.metadataTrack}}},{key:"demuxAndFix",value:function(e,t,r,n,i){return this.demux(e,t,r,i),this.fix(n,t,r)}},{key:"_parseAudio",value:function(t,r){if(t.length){var n=(240&t[0])>>>4,i=this.audioTrack;if(n!==KI&&n!==HI&&n!==qI&&n!==WI)return YI.warn("Unsupported sound format: ".concat(n)),void i.reset();if(n!==KI&&n!==WI){var a=(12&t[0])>>2,o=(2&t[0])>>1,s=1&t[0];i.sampleRate=e.AUDIO_RATE[a],i.sampleSize=o?16:8,i.channelCount=s+1}switch(n){case HI:case qI:this._parseG711(t,r,n);break;case KI:this._parseAac(t,r);break;case WI:this._parseOpus(t,r)}}}},{key:"_parseOpus",value:function(e,t){var r=this.audioTrack,n=e[1];switch(r.codecType=XU,n){case 0:var i=OI.parseHeaderPackets(e.subarray(2));i?(r.codec=i.codec,r.channelCount=i.channelCount,r.sampleRate=i.sampleRate,r.config=i.config,r.sampleDuration=OI.getFrameDuration([],r.timescale)):(r.reset(),YI.warn("Cannot parse AudioSpecificConfig",e));break;case 1:if(null==t)return;var a=new uI(t,e.subarray(2),r.sampleDuration);r.samples.push(a);break;default:YI.warn("Unknown OpusPacketType: ".concat(n))}}},{key:"_parseG711",value:function(e,t,r){var n=this.audioTrack,i=e.subarray(1);if(!(i.byteLength<1)){var a=new uI(t,i);n.codecType=7===r?JU:QU,n.sampleRate=8e3,n.codec=n.codecType,n.samples.push(a)}}},{key:"_parseAac",value:function(e,t){var r=this.audioTrack;if(r.codecType=YU,0===e[1]){var n=wI.parseAudioSpecificConfig(e.subarray(2));n?(r.codec=n.codec,r.channelCount=n.channelCount,r.sampleRate=n.sampleRate,r.config=n.config,r.objectType=n.objectType,r.sampleRateIndex=n.samplingFrequencyIndex):(r.reset(),YI.warn("Cannot parse AudioSpecificConfig",e))}else if(1===e[1]){if(null==t)return;r.samples.push(new uI(t,e.subarray(2)))}else YI.warn("Unknown AACPacketType: ".concat(e[1]))}},{key:"_parseVideo",value:function(e,t){var r=this;if(!(e.length<6)){var n=(240&e[0])>>>4,i=15&e[0],a=this.videoTrack;if(7!==i&&12!==i)return a.reset(),void YI.warn("Unsupported codecId: ".concat(i));var o=12===i;a.codecType=o?WU:KU;var s=e[1],u=(e[2]<<16|e[3]<<8|e[4])<<8>>8;if(0===s){var c=e.subarray(5),l=o?zI.parseHEVCDecoderConfigurationRecord(c):NI.parseAVCDecoderConfigurationRecord(c);if(l){var f=l.hvcC,h=l.sps,d=l.ppsArr,p=l.spsArr,v=l.vpsArr,y=l.nalUnitSize;f&&(a.hvcC=a.hvcC||f),h&&(a.codec=h.codec,a.width=h.width,a.height=h.height,a.sarRatio=h.sarRatio,a.fpsNum=h.fpsNum,a.fpsDen=h.fpsDen),p.length&&(a.sps=p),d.length&&(a.pps=d),v&&v.length&&(a.vps=v),y&&(a.nalUnitSize=y)}else YI.warn("Cannot parse ".concat(o?"HEVC":"AVC","DecoderConfigurationRecord"),e)}else if(1===s){var g=jI.parseAvcC(e.subarray(5),a.nalUnitSize);if((g=this._checkAddMetaNalToUnits(o,g,a))&&g.length){var m=new sI(t+u,t,g);if(this.seamlessLoadingSwitching&&t<a.lastKeyFrameDts)return;this.seamlessLoadingSwitching=!1,1===n&&(m.setToKeyframe(),a.lastKeyFrameDts=t),a.samples.push(m),Ch(g).call(g,(function(e){var n=o?e[0]>>>1&63:31&e[0];switch(n){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!o&&5!==n||o&&5===n)break;m.setToKeyframe();break;case 6:case 39:case 40:if(!o&&6!==n||o&&6===n)break;r.metadataTrack.seiSamples.push(new fI(jI.parseSEI(jI.removeEPB(e),o),t+u))}})),m.keyframe&&this._gopId++,m.gopId=this._gopId}else YI.warn("Cannot parse NALUs",e)}else 2===s||YI.warn("Unknown AVCPacketType: ".concat(s))}}},{key:"_checkAddMetaNalToUnits",value:function(e,t,r){if(!e||!this._needAddMetaBeforeKeyFrameNal)return this._needAddMetaBeforeKeyFrameNal=!1,t;var n=hb(t).call(t,(function(e){return e[0]>>>1&63}));return jA(n).call(n,32)?(this._needAddMetaBeforeKeyFrameNal=!1,t):(t.unshift(r.pps[0]),t.unshift(r.sps[0]),t.unshift(r.vps[0]),yh(t).call(t,Boolean))}},{key:"_parseScript",value:function(e,t){this.metadataTrack.flvScriptSamples.push(new lI(GI.parse(e),t))}}],[{key:"probe",value:function(e){return 70===e[0]&&76===e[1]&&86===e[2]&&1===e[3]&&UI(e,5)>=9}}]),e}();PU(JI,"AUDIO_RATE",[5500,11e3,22e3,44e3]);var QI=nr,XI=R,$I=Ze,ZI=ue,eB=function(){var e=QI(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},tB=RegExp.prototype,rB=ue,nB=function(e){var t=e.flags;return void 0!==t||"flags"in tB||$I(e,"flags")||!ZI(tB,e)?t:XI(eB,e)},iB=RegExp.prototype,aB=r((function(e){return e===iB||rB(iB,e)?nB(e):e.flags})),oB=af("Array").entries,sB=cn,uB=Ze,cB=ue,lB=oB,fB=Array.prototype,hB={DOMTokenList:!0,NodeList:!0},dB=r((function(e){var t=e.entries;return e===fB||cB(fB,e)&&t===fB.entries||uB(hB,sB(e))?lB:t}));var pB,vB=function(){function e(){CU(this,e),this.buffer=new Uint8Array(0)}return DU(e,[{key:"write",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];Ch(r).call(r,(function(t){t?e.buffer=function(e){for(var t=0,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];Ch(n).call(n,(function(e){t+=e.length}));var a=new e(t),o=0;return Ch(n).call(n,(function(e){a.set(e,o),o+=e.length})),a}(Uint8Array,e.buffer,t):window.console.warn(t)}))}}],[{key:"writeUint16",value:function(e){return new Uint8Array([e>>8&255,255&e])}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>24,e>>16&255,e>>8&255,255&e])}}]),e}(),yB=Math.pow(2,32)-1,gB=function(){function e(){CU(this,e)}return DU(e,null,[{key:"box",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];r=yh(r).call(r,Boolean);var i=8+aD(r).call(r,(function(e,t){return e+t.byteLength}),0),a=new Uint8Array(i);a[0]=i>>24&255,a[1]=i>>16&255,a[2]=i>>8&255,a[3]=255&i,a.set(e,4);var o=8;return Ch(r).call(r,(function(e){a.set(e,o),o+=e.byteLength})),a}},{key:"ftyp",value:function(t){return f_(t).call(t,(function(e){return e.type===GU&&e.codecType===WU}))?e.FTYPHEV1:e.FTYPAVC1}},{key:"initSegment",value:function(t){return MI(e.ftyp(t),e.moov(t))}},{key:"pssh",value:function(t){var r,n=new Uint8Array(oh(r=[1,0,0,0]).call(r,[16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75],[0,0,0,1],BI(t.kid),[0,0,0,0]));return e.box(e.types.pssh,n)}},{key:"moov",value:function(t){if(t[0].useEME&&(t[0].encv||t[0].enca)){var r;t[0].pssh||(t[0].pssh={kid:t[0].kid});var n=this.pssh(t[0].pssh);return e.box.apply(e,oh(r=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale),e.mvex(t)]).call(r,FU(hb(t).call(t,(function(t){return e.trak(t)}))),[n]))}var i;return e.box.apply(e,oh(i=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale)]).call(i,FU(hb(t).call(t,(function(t){return e.trak(t)}))),[e.mvex(t)]))}},{key:"mvhd",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,t>>24&255,t>>16&255,t>>8&255,255&t,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]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.tkhdDuration||0,t.width,t.height),e.mdia(t))}},{key:"tkhd",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,1,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,255&n,0,0,i>>8&255,255&i,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minf(t))}},{key:"mdhd",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,t>>24&255,t>>16&255,t>>8&255,255&t,85,196,0,0]))}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"minf",value:function(t){return e.box(e.types.minf,t.type===GU?e.VMHD:e.SMHD,e.DINF,e.stbl(t))}},{key:"stbl",value:function(t){var r=[];return t&&t.ext&&t.ext.stss&&r.push(e.stss(dB(t.ext.stss))),e.box(e.types.stbl,e.stsd(t),e.STTS,r[0],e.STSC,e.STSZ,e.STCO)}},{key:"stsd",value:function(t){var r;return r="audio"===t.type?t.useEME&&t.enca?e.enca(t):t.codecType===XU?e.opus(t):e.mp4a(t):t.useEME&&t.encv?e.encv(t):t.av1C?e.av01(t):e.avc1hev1(t),e.box(e.types.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),r)}},{key:"enca",value:function(t){var r=t.enca.channelCount,n=t.enca.sampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>8&255,255&n,0,0]),a=e.esds(t.config),o=e.sinf(t.enca);return e.box(e.types.enca,i,a,o)}},{key:"encv",value:function(t){var r,n,i,a=t.sps.length>0?t.sps[0]:[],o=t.pps.length>0?t.pps[0]:[],s=t.width,u=t.height,c=t.sarRatio[0],l=t.sarRatio[1],f=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,s>>8&255,255&s,u>>8&255,255&u,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]),h=new Uint8Array(oh(n=oh(r=oh(i=[1,a[1],a[2],a[3],255,225,a.length>>>8&255,255&a.length]).apply(i,FU(a))).call(r,[1,o.length>>>8&255,255&o.length])).apply(n,FU(o))),d=new Uint8Array([0,0,88,57,0,15,200,192,0,4,86,72]),p=e.sinf(t.encv),v=new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,l>>24,l>>16&255,l>>8&255,255&l]);return e.box(e.types.encv,f,e.box(e.types.avcC,h),e.box(e.types.btrt,d),p,e.box(e.types.pasp,v))}},{key:"schi",value:function(t){var r=new Uint8Array([]),n=e.tenc(t);return e.box(e.types.schi,r,n)}},{key:"tenc",value:function(t){var r,n=new Uint8Array(oh(r=[0,0,0,0,0,0,255&t.default_IsEncrypted,255&t.default_IV_size]).call(r,BI(t.default_KID)));return e.box(e.types.tenc,n)}},{key:"sinf",value:function(t){var r=new Uint8Array([]),n=new Uint8Array([t.data_format.charCodeAt(0),t.data_format.charCodeAt(1),t.data_format.charCodeAt(2),t.data_format.charCodeAt(3)]),i=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]),a=e.schi(t);return e.box(e.types.sinf,r,e.box(e.types.frma,n),e.box(e.types.schm,i),a)}},{key:"av01",value:function(t){return e.box(e.types.av01,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,t.width>>8&255,255&t.width,t.height>>8&255,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,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,0,0,0,0,0,0,24,17,17]),t.av1C,t.colr)}},{key:"avc1hev1",value:function(t){var r,n=t.codecType===WU,i=n?e.types.hvc1:e.types.avc1,a=n?e.hvcC(t):e.avcC(t),o=[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,t.width>>8&255,255&t.width,t.height>>8&255,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,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,0,0,0,0,0,0,24,17,17]),a];return n?o.push(e.box(e.types.fiel,new Uint8Array([1,0]))):t.sarRatio&&t.sarRatio.length>1&&o.push(e.pasp(t.sarRatio)),e.box.apply(e,oh(r=[i]).call(r,o))}},{key:"avcC",value:function(t){var r,n,i,a,o,s,u=[],c=[];return Ch(r=t.sps).call(r,(function(e){s=e.byteLength,u.push(s>>>8&255),u.push(255&s),u.push.apply(u,FU(e))})),Ch(n=t.pps).call(n,(function(e){s=e.byteLength,c.push(s>>>8&255),c.push(255&s),c.push.apply(c,FU(e))})),e.box(e.types.avcC,new Uint8Array(oh(a=oh(i=oh(o=[1,u[3],u[4],u[5],255,224|t.sps.length]).apply(o,u)).call(i,[t.pps.length])).apply(a,c)))}},{key:"hvcC",value:function(t){var r=t.hvcC;if(r instanceof ArrayBuffer||r instanceof Uint8Array)return r;var n,i=t.vps,a=t.sps,o=t.pps;if(r){var s=r.generalProfileCompatibilityFlags,u=r.generalConstraintIndicatorFlags,c=(i.length&&1)+(a.length&&1)+(o.length&&1);n=[1,r.generalProfileSpace<<6|r.generalTierFlag<<5|r.generalProfileIdc,s>>>24,s>>>16,s>>>8,s,u[0],u[1],u[2],u[3],u[4],u[5],r.generalLevelIdc,240,0,252,252|r.chromaFormatIdc,248|r.bitDepthLumaMinus8,248|r.bitDepthChromaMinus8,0,0,r.numTemporalLayers<<3|r.temporalIdNested<<2|3,c];var l=function(e){var t;n.push(e.length>>8,e.length),(t=n).push.apply(t,FU(e))};i.length&&(n.push(160,0,i.length),Ch(i).call(i,l)),a.length&&(n.push(161,0,a.length),Ch(a).call(a,l)),o.length&&(n.push(162,0,o.length),Ch(o).call(o,l))}else n=[1,1,96,0,0,0,144,0,0,0,0,0,93,240,0,252,253,248,248,0,0,15,3,160,0,1,0,24,64,1,12,1,255,255,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,153,152,9,161,0,1,0,45,66,1,1,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,160,2,128,128,45,22,89,153,164,147,43,154,128,128,128,130,0,0,3,0,2,0,0,3,0,50,16,162,0,1,0,7,68,1,193,114,180,98,64];return e.box(e.types.hvcC,new Uint8Array(n))}},{key:"pasp",value:function(t){var r=jU(t,2),n=r[0],i=r[1];return e.box(e.types.pasp,new Uint8Array([n>>24,n>>16&255,n>>8&255,255&n,i>>24,i>>16&255,i>>8&255,255&i]))}},{key:"mp4a",value:function(t){return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.sampleRate>>8&255,255&t.sampleRate,0,0]),t.config.length?e.esds(t.config):void 0)}},{key:"esds",value:function(t){var r,n,i,a=t.length;return e.box(e.types.esds,new Uint8Array(oh(r=oh(n=oh(i=[0,0,0,0,3,23+a,0,0,0,4,15+a,64,21,0,6,0,0,0,218,192,0,0,218,192,5]).call(i,[a])).call(n,t)).call(r,[6,1,2])))}},{key:"opus",value:function(t){var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.sampleRate>>8&255,255&t.sampleRate,0,0]),n=t.config.length?e.dOps(t):[];return e.box(e.types.Opus,r,n)}},{key:"dOps",value:function(t){if(t.config)return t.config[4]=t.sampleRate>>>24&255,t.config[5]=t.sampleRate>>>16&255,t.config[6]=t.sampleRate>>>8&255,t.config[7]=255&t.sampleRate,e.box(e.types.dOps,t.config)}},{key:"mvex",value:function(t){var r;return e.box.apply(e,oh(r=[e.types.mvex]).call(r,FU(hb(t).call(t,(function(t){return e.trex(t.id)})))))}},{key:"trex",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trex1",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,2,0,0,0,0,0,0,1,0,0]))}},{key:"trex2",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,4,0,0,0,0,0,2,0,0,0]))}},{key:"moof",value:function(t){var r;return e.box.apply(e,oh(r=[e.types.moof,e.mfhd(t[0].samples?t[0].samples[0].gopId:0)]).call(r,FU(hb(t).call(t,(function(t){return e.traf(t)})))))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"traf",value:function(t){var r,n=e.tfhd(t.id),i=e.tfdt(t,t.baseMediaDecodeTime),a=0;if(t.isVideo&&t.videoSenc&&(r=t.videoSenc,Ch(r).call(r,(function(e){a+=8,e.subsamples&&e.subsamples.length&&(a+=2,a+=6*e.subsamples.length)}))),t.videoSencLength=a,t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)){if(t.isVideoEncryption){if(t.isVideo){var o=e.saiz(t),s=e.saio(t),u=e.trun1(t),c=e.senc(t);return e.box(e.types.traf,n,i,o,s,u,c)}if(t.isAudioEncryption){var l=e.sbgp(),f=e.saiz(t),h=e.saio(t),d=e.senc(t),p=e.trun1(t);return e.box(e.types.traf,n,i,l,f,h,d,p)}var v=e.sbgp(),y=e.trun1(t);return e.box(e.types.traf,n,i,v,y)}if(t.isVideo){var g=e.trun1(t);return e.box(e.types.traf,n,i,g)}var m=e.sbgp(),_=e.saiz(t),b=e.saio(t),w=e.senc(t),k=e.trun1(t);return e.box(e.types.traf,n,i,m,_,b,w,k)}var S=e.sdtp(t);return e.box(e.types.traf,n,i,S,e.trun(t.samples,S.byteLength+76))}},{key:"sdtp",value:function(t){var r,n=new vB;return Ch(r=t.samples).call(r,(function(e){n.write(new Uint8Array(t.isVideo?[e.keyframe?32:16]:[16]))})),e.box(e.types.sdtp,this.extension(0,0),n.buffer)}},{key:"trun1",value:function(t){var r,n=new vB,i=vB.writeUint32(t.samples.length),a=null;if(t.isVideo){var o=t.videoSencLength;a=vB.writeUint32(16*t.samples.length+o+149),!t.isVideoEncryption&&t.isAudioEncryption&&(a=vB.writeUint32(16*t.samples.length+92))}else{var s=12*t.samples.length+124;t.isAudioEncryption&&(s=12*t.samples.length+8*t.audioSenc.length+177),a=vB.writeUint32(s)}return Ch(r=t.samples).call(r,(function(e){n.write(vB.writeUint32(e.duration)),n.write(vB.writeUint32(e.size)),n.write(vB.writeUint32(e.keyframe?33554432:65536)),t.isVideo&&n.write(vB.writeUint32(e.cts?e.cts:0))})),e.box(e.types.trun,this.extension(0,aB(t)),i,a,n.buffer)}},{key:"senc",value:function(t){var r=new vB,n=t.samples.length,i=t.isVideo?16:8,a=t.isVideo?2:0,o=[],s=0;return t.isVideo?(o=t.videoSenc,s=t.videoSencLength):o=t.audioSenc,s=s||i*n,r.write(vB.writeUint32(16+s),e.types.senc,this.extension(0,a)),r.write(vB.writeUint32(n)),Ch(o).call(o,(function(e){for(var t=0;t<e.InitializationVector.length;t++)r.write(new Uint8Array([e.InitializationVector[t]]));var n;e.subsamples&&e.subsamples.length&&(r.write(vB.writeUint16(e.subsamples.length)),Ch(n=e.subsamples).call(n,(function(e){r.write(vB.writeUint16(e.BytesOfClearData)),r.write(vB.writeUint32(e.BytesOfProtectedData))})))})),r.buffer}},{key:"saio",value:function(t){var r=12*t.samples.length+141;!t.isVideo&&t.isAudioEncryption&&(r=149);var n=new Uint8Array([1,0,0,0,0,0,0,1,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r]);return e.box(e.types.saio,n)}},{key:"saiz",value:function(t){var r=t.samples.length,n=new Uint8Array([0,0,0,0,16,r>>24&255,r>>16&255,r>>8&255,255&r]);return e.box(e.types.saiz,n)}},{key:"sbgp",value:function(){var t=new Uint8Array([114,111,108,108,0,0,0,1,0,0,1,25,0,0,0,1]);return e.box(e.types.sbgp,this.extension(0,0),t)}},{key:"extension",value:function(e,t){return new Uint8Array([e,t>>16&255,t>>8&255,255&t])}},{key:"tfhd",value:function(t){return e.box(e.types.tfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"tfdt",value:function(t,r){var n=Math.floor(r/(yB+1)),i=Math.floor(r%(yB+1));return t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)?e.box(e.types.tfdt,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])):e.box(e.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,i>>24,i>>16&255,i>>8&255,255&i]))}},{key:"trun",value:function(t,r){var n=t.length,i=12+16*n;r+=8+i;var a=new Uint8Array(i);a.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0);for(var o=0;o<n;o++){var s=t[o],u=s.duration,c=s.size,l=s.flag,f=void 0===l?{}:l,h=s.cts,d=void 0===h?0:h;a.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,c>>>24&255,c>>>16&255,c>>>8&255,255&c,f.isLeading<<2|(null===f.dependsOn||void 0===f.dependsOn?1:f.dependsOn),f.isDependedOn<<6|f.hasRedundancy<<4|f.paddingValue<<1|(null===f.isNonSyncSample||void 0===f.isNonSyncSample?1:f.isNonSyncSample),61440&f.degradationPriority,15&f.degradationPriority,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*o)}return e.box(e.types.trun,a)}},{key:"moovMP4",value:function(t){var r;return e.box.apply(e,oh(r=[e.types.moov,e.mvhd(t[0].duration,t[0].timescale)]).call(r,FU(hb(t).call(t,(function(t){return e.trackMP4(t)})))))}},{key:"trackMP4",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.duration,t.width,t.height),e.mdiaMP4(t))}},{key:"mdiaMP4",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minfMP4(t))}},{key:"minfMP4",value:function(t){return e.box(e.types.minf,t.type===GU?e.VMHD:e.SMHD,e.DINF,e.stblMP4(t))}},{key:"stblMP4",value:function(t){var r,n=t.ext,i=[e.stsd(t),e.stts(n.stts),e.stsc(n.stsc),e.stsz(n.stsz),e.stco(n.stco)];return n.stss.length&&i.push(e.stss(n.stss)),n.ctts.length&&i.push(e.ctts(n.ctts)),e.box.apply(e,oh(r=[e.types.stbl]).call(r,i))}},{key:"stts",value:function(t){var r=t.length,n=new Uint8Array(8*r),i=0;return Ch(t).call(t,(function(e){var t=e.value,r=e.count;n.set([r>>24,r>>16&255,r>>8&255,255&r,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8})),e.box(e.types.stts,MI(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stsc",value:function(t){var r=t.length,n=new Uint8Array(12*r),i=0;return Ch(t).call(t,(function(e){var t=e.firstChunk,r=e.samplesPerChunk,a=e.sampleDescIndex;n.set([t>>24,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,a>>24,a>>16&255,a>>8&255,255&a],i),i+=12})),e.box(e.types.stsc,MI(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stsz",value:function(t){var r=t.length,n=new Uint8Array(4*r),i=0;return Ch(t).call(t,(function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stsz,MI(new Uint8Array([0,0,0,0,0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stco",value:function(t){var r=t.length,n=new Uint8Array(4*r),i=0;return Ch(t).call(t,(function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stco,MI(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stss",value:function(t){var r=t.length,n=new Uint8Array(4*r),i=0;return Ch(t).call(t,(function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stss,MI(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"ctts",value:function(t){var r=t.length,n=new Uint8Array(8*r),i=0;return Ch(t).call(t,(function(e){var t=e.value,r=e.count;n.set([r>>24,r>>16&255,r>>8&255,255&r,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8})),e.box(e.types.ctts,MI(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"styp",value:function(){return e.box(e.types.styp,new Uint8Array([109,115,100,104,0,0,0,0,109,115,100,104,109,115,105,120]))}},{key:"sidx",value:function(t){var r,n=t.timescale,i=t.samples[0].duration,a=i*t.samples.length,o=t.samples[0].sampleOffset*i,s=8;Ch(r=t.samples).call(r,(function(e){s+=e.size}));var u=0;if(t.isVideo){var c,l=0;t.videoSenc&&(c=t.videoSenc),t.isVideo&&Ch(c).call(c,(function(e){l+=8,e.subsamples&&e.subsamples.length&&(l+=2,l+=6*e.subsamples.length)})),t.videoSencLength=l,u=s+141+16*t.samples.length+l,t.useEME&&t.isAudioEncryption&&!t.isVideoEncryption&&(u=s+16*t.samples.length+84)}else u=s+116+12*t.samples.length,t.useEME&&t.isAudioEncryption&&(u=s+169+12*t.samples.length+8*t.audioSenc.length);var f=new Uint8Array([0,0,0,0,0,0,0,255&t.id,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,1,0,u>>16&255,u>>8&255,255&u,a>>24&255,a>>16&255,a>>8&255,255&a,144,0,0,0]);return e.box(e.types.sidx,f)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();PU(gB,"types",aD(pB=["Opus","dOps","av01","av1C","avc1","avcC","hvc1","hvcC","dinf","dref","esds","ftyp","hdlr","mdat","mdhd","mdia","mfhd","minf","moof","moov","mp4a","mvex","mvhd","pasp","stbl","stco","stsc","stsd","stsz","stts","tfdt","tfhd","traf","trak","trex","tkhd","vmhd","smhd","ctts","stss","styp","pssh","sidx","sbgp","saiz","saio","senc","trun","encv","enca","sinf","btrt","frma","tenc","schm","schi","mehd","fiel","sdtp"]).call(pB,(function(e,t){return e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)],e}),Qh(null))),PU(gB,"HDLR_TYPES",{video: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]),audio: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])}),PU(gB,"FTYPAVC1",gB.box(gB.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))),PU(gB,"FTYPHEV1",gB.box(gB.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,104,101,118,49]))),PU(gB,"DINF",gB.box(gB.types.dinf,gB.box(gB.types.dref,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])))),PU(gB,"VMHD",gB.box(gB.types.vmhd,new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))),PU(gB,"SMHD",gB.box(gB.types.smhd,new Uint8Array([0,0,0,0,0,0,0,0]))),PU(gB,"StblTable",new Uint8Array([0,0,0,0,0,0,0,0])),PU(gB,"STTS",gB.box(gB.types.stts,gB.StblTable)),PU(gB,"STSC",gB.box(gB.types.stsc,gB.StblTable)),PU(gB,"STSZ",gB.box(gB.types.stsz,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]))),PU(gB,"STCO",gB.box(gB.types.stco,gB.StblTable));var mB=function(){function e(t,r){CU(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=r}return DU(e,[{key:"debug",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(r=console).debug.apply(r,oh(t=[this._prefix]).call(t,i))}}},{key:"log",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(r=console).log.apply(r,oh(t=[this._prefix]).call(t,i))}}},{key:"warn",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(r=console).warn.apply(r,oh(t=[this._prefix]).call(t,i))}}},{key:"error",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(r=console).error.apply(r,oh(t=[this._prefix]).call(t,i))}}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();PU(mB,"disabled",!0);var _B=function(){function e(t,r,n){CU(this,e),this.videoTrack=t,this.audioTrack=r;var i=/Chrome\/([^.]+)/.exec(navigator.userAgent);this.forceFirstIDR=i&&Number(i[1])<50,this.log=new mB("FMP4Remuxer",!n||!n.openLog||!n.openLog)}return DU(e,[{key:"remux",value:function(){var e,t,r,n,i,a=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.videoTrack,u=this.audioTrack,c=s.exist(),l=u.exist(),f=[];return a&&(o&&o.initMerge?(c&&f.push(this.videoTrack),l&&f.push(this.audioTrack),r=gB.initSegment(f)):(c&&(e=gB.initSegment([this.videoTrack])),l&&(t=gB.initSegment([this.audioTrack])))),c&&s.hasSample()&&(n=this._remuxVideo()),l&&u.hasSample()&&(i=this._remuxAudio()),s.samples=[],u.samples=[],{initSegment:r,videoInitSegment:e,audioInitSegment:t,videoSegment:n,audioSegment:i}}},{key:"_remuxVideo",value:function(){var e=this.videoTrack;this.forceFirstIDR&&(e.samples[0].flag={dependsOn:2,isNonSyncSample:0});var t=e.samples,r=/av01/.test(e.codec),n=0;r?Ch(t).call(t,(function(e){n+=e.data.byteLength})):Ch(t).call(t,(function(e){var t;n+=aD(t=e.units).call(t,(function(e,t){return e+t.byteLength}),0),n+=4*e.units.length}));var i=new Uint8Array(n);if(r)for(var a,o=0,s=t.length,u=0;o<s;o++)a=t[o],i.set(a.data,u),a.size=a.data.byteLength,u+=a.size;else for(var c,l=new DataView(i.buffer),f=function(e,r){var n;r=t[h];var a=0;Ch(n=r.units).call(n,(function(t){l.setUint32(e,t.byteLength),e+=4,i.set(t,e),e+=t.byteLength,a+=4+t.byteLength})),r.size=a,p=e,c=r},h=0,d=t.length,p=0;h<d;h++)f(p,c);var v=gB.mdat(i);return MI(gB.moof([e]),v)}},{key:"_remuxAudio",value:function(){var e,t,r=this.audioTrack,n=new Uint8Array(aD(e=r.samples).call(e,(function(e,t){return e+t.size}),0));aD(t=r.samples).call(t,(function(e,t){return n.set(t.data,e),e+t.size}),0);var i=gB.mdat(n);return MI(gB.moof([r]),i)}},{key:"reset",value:function(){this.videoTrack.reset(),this.audioTrack.reset()}}]),e}(),bB=function(){function e(){Bm(this,e),Nm(this,"_ttfb",0),Nm(this,"_demuxStart",0),Nm(this,"_demuxEnd",0),Nm(this,"_demuxCost",0),Nm(this,"_remuxStart",0),Nm(this,"_remuxEnd",0),Nm(this,"_remuxCost",0),Nm(this,"_appendStart",0),Nm(this,"_appendEnd",0),Nm(this,"_appendCost",0)}return Fm(e,[{key:"set",value:function(e,t){this["_".concat(e)]=t}},{key:"start",value:function(e){this["_".concat(e,"Start")]=lS()}},{key:"end",value:function(e){this["_".concat(e,"End")]=lS(),this["_".concat(e,"Cost")]=this["_".concat(e,"Cost")]+(this["_".concat(e,"End")]-this["_".concat(e,"Start")])}},{key:"transferCost",get:function(){return{ttfbCost:this._ttfb,demuxCost:this._demuxCost,remuxCost:this._remuxCost,appendCost:this._appendCost}}}]),e}(),wB="ttfb",kB="demux",SB="remux",xB="append",EB=new AD("BufferService"),TB=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Bm(this,e),Nm(this,"flv",null),Nm(this,"_demuxer",new JI),Nm(this,"_remuxer",null),Nm(this,"_mse",null),Nm(this,"_softVideo",null),Nm(this,"_sourceCreated",!1),Nm(this,"_needInitSegment",!0),Nm(this,"_discontinuity",!0),Nm(this,"_contiguous",!1),Nm(this,"_initSegmentId",""),Nm(this,"_cachedBuffer",null),Nm(this,"_demuxStartTime",0),Nm(this,"_opts",null),this.flv=t,this._opts=n,r?this._softVideo=r:(this._remuxer=new _B(this._demuxer.videoTrack,this._demuxer.audioTrack),this._mse=new FD(null,{preferMMS:"boolean"==typeof n.preferMMS?n.preferMMS:!!n.perferMMS}),this._mse.bindMedia(t.media))}var t,r,n,i,a,o;return Fm(e,[{key:"baseDts",get:function(){var e,t;return null===(e=this._demuxer)||void 0===e||null===(t=e._fixer)||void 0===t?void 0:t._baseDts}},{key:"blobUrl",get:function(){var e;return null===(e=this._mse)||void 0===e?void 0:e.url}},{key:"isFull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:FD.VIDEO;return this._mse.isFull(e)}},{key:"seamlessSwitch",value:function(){this._needInitSegment=!0,this._discontinuity=!0,this._contiguous=!0,this._initSegmentId=""}},{key:"unContiguous",value:function(e){this._contiguous=!1,this._demuxStartTime=e}},{key:"reset",value:(o=Im(Rm().mark((function e(){var t,r=arguments;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]&&r[0],!this._mse||t){e.next=6;break}return e.next=4,this._mse.unbindMedia();case 4:return e.next=6,this._mse.bindMedia(this.flv.media);case 6:this._needInitSegment=!0,this._discontinuity=!0,this._contiguous=!1,this._sourceCreated=!1,this._initSegmentId="",this.resetSeamlessSwitchStats();case 12:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"resetSeamlessSwitchStats",value:function(){this.seamlessLoadingSwitch=null,this.seamlessLoadingSwitching=!1,this._demuxer&&(this._demuxer.seamlessLoadingSwitching=!1)}},{key:"endOfStream",value:(a=Im(Rm().mark((function e(){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=7;break}if(!this._sourceCreated){e.next=5;break}return e.next=4,this._mse.endOfStream();case 4:this.flv.emit(cP);case 5:e.next=8;break;case 7:this._softVideo&&this._softVideo.endOfStream();case 8:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"updateDuration",value:(i=Im(Rm().mark((function e(t){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=7;break}if(this._mse.isOpened){e.next=4;break}return e.next=4,this._mse.open();case 4:return EB.debug("update duration",t),e.next=7,this._mse.updateDuration(t);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"destroy",value:(n=Im(Rm().mark((function e(){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=3;break}return e.next=3,this._mse.unbindMedia();case 3:this._mse=null,this._softVideo=null,this._demuxer=null,this._remuxer=null;case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"appendBuffer",value:(r=Im(Rm().mark((function e(t){var r,n,i,a,o,s,u,c,l,f,h,d,p,v,y,g,m,_,b=this;return Rm().wrap((function(e){for(var w,k,S,x,E,T;;)switch(e.prev=e.next){case 0:if(r=!1,this._cachedBuffer&&(t=RP(this._cachedBuffer,t),this._cachedBuffer=null),n=this._demuxer,t&&t.length&&n){e.next=5;break}return e.abrupt("return");case 5:e.prev=5,this.flv._transferCost.start(kB),n.demuxAndFix(t,this.seamlessLoadingSwitching||this._discontinuity,this._contiguous,this._demuxStartTime,this.seamlessLoadingSwitching),this.seamlessLoadingSwitching=!1,this.flv._transferCost.end(kB),e.next=15;break;case 12:throw e.prev=12,e.t0=e.catch(5),new wD(dD,_D.FLV,e.t0);case 15:if(i=n.videoTrack,a=n.audioTrack,o=n.metadataTrack,!this.seamlessLoadingSwitch){e.next=25;break}if(!((s=BS(w=i.samples).call(w,(function(e){return e.originDts===i.lastKeyFrameDts})))>=0)){e.next=25;break}return B_(k=i.samples).call(k,s),e.next=22,this.seamlessLoadingSwitch();case 22:this.seamlessLoadingSwitch=null,t=null,r=!0;case 25:if(u=i.exist(),c=a.exist(),this._opts.onlyAudio&&(u=!1,i.present=!1),this._opts.onlyVideo&&(c=!1,a.present=!1),!(!u&&i.present||!c&&a.present)){e.next=42;break}if(l=0,(f=u?i:c?a:void 0)&&f.samples.length&&(l=(f.samples[f.samples.length-1].originPts-f.samples[0].originPts)/f.timescale*1e3),!(l>this._opts.analyzeDuration)){e.next=40;break}EB.warn("analyze duration exceeded, ".concat(l,"ms"),f),i.present=u,a.present=c,this.flv.emit(oP,{duration:l}),e.next=42;break;case 40:return this._cachedBuffer=t,e.abrupt("return");case 42:if(h=i.type,d=a.type,this._fireEvents(i,a,o),r||(this._discontinuity=!1,this._contiguous=!0,this._demuxStartTime=0),p=this._mse,v=function(){var e,t;null!==(e=b.flv)&&void 0!==e&&e.emit&&(null===(t=b.flv)||void 0===t||t.emit(sP,{}))},this.flv.emit(_P,{videoTrack:i}),(y=oh(S=oh(x=oh(E=oh(T="".concat(i.codec,"/")).call(T,i.width,"/")).call(E,i.height,"/")).call(x,a.codec,"/")).call(S,a.config))!==this._initSegmentId&&(this._needInitSegment=!0,this._initSegmentId=y,this._emitMetaParsedEvent(i,a)),!p){e.next=83;break}if(this._sourceCreated){e.next=59;break}return e.next=55,p.open();case 55:u&&(EB.log("codec: video/mp4;codecs=".concat(i.codec)),p.createSource(h,"video/mp4;codecs=".concat(i.codec))),c&&(EB.log("codec: audio/mp4;codecs=".concat(a.codec)),p.createSource(d,"audio/mp4;codecs=".concat(a.codec))),this._sourceCreated=!0,this.flv.emit(aP);case 59:e.prev=59,this._needInitSegment&&!this._opts.mseLowLatency&&(i.duration=this._opts.durationForMSELowLatencyOff*i.timescale,a.duration=this._opts.durationForMSELowLatencyOff*c.timescale),this.flv._transferCost.start(SB),g=this._remuxer.remux(this._needInitSegment),this.flv._transferCost.end(SB),e.next=69;break;case 66:throw e.prev=66,e.t1=e.catch(59),new wD(pD,_D.FMP4,e.t1);case 69:if(!this._needInitSegment||g.videoInitSegment||g.audioInitSegment){e.next=71;break}return e.abrupt("return");case 71:return this._needInitSegment=!1,m=[],g.videoInitSegment&&m.push(p.append(h,g.videoInitSegment)),g.audioInitSegment&&m.push(p.append(d,g.audioInitSegment)),g.videoSegment&&m.push(p.append(h,g.videoSegment)),g.audioSegment&&m.push(p.append(d,g.audioSegment)),this.flv._transferCost.start(xB),(_=$g.all(m)).then(v).then((function(){b.flv._transferCost.end(xB),v()})),e.abrupt("return",_);case 83:this._softVideo&&(this._softVideo.appendBuffer(i,a),v());case 84:case"end":return e.stop()}}),e,this,[[5,12],[59,66]])}))),function(e){return r.apply(this,arguments)})},{key:"evictBuffer",value:(t=Im(Rm().mark((function e(t){var r,n,i,a=this;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.flv.media,this._mse&&this._demuxer&&r&&t&&!(t<0)){e.next=3;break}return e.abrupt("return");case 3:if(n=r.currentTime,!((i=n-t)<=0)){e.next=7;break}return e.abrupt("return");case 7:if(!(oD.start(oD.get(r))+1>=i)){e.next=10;break}return e.abrupt("return");case 10:return e.abrupt("return",this._mse.clearBuffer(0,i).then((function(){return a.flv.emit(uP,{removeEnd:i})})));case 11:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_emitMetaParsedEvent",value:function(e,t){e.exist()&&this.flv.emit(hP,{type:"video",track:e,meta:{codec:e.codec,timescale:e.timescale,width:e.width,height:e.height,sarRatio:e.sarRatio,baseDts:e.baseDts}}),t.exist()&&this.flv.emit(hP,{type:"audio",track:t,meta:{codec:t.codec,channelCount:t.channelCount,sampleRate:t.sampleRate,timescale:t.timescale,baseDts:t.baseDts}}),EB.debug("track parsed",e,t)}},{key:"_fireEvents",value:function(e,t,r){var n,i,a,o,s,u,c=this;EB.debug(oh(n="videoTrack samples count: ".concat(e.samples.length,", audioTrack samples count: ")).call(n,t.samples.length)),Ch(i=r.flvScriptSamples).call(i,(function(e){c.flv.emit(vP,e),EB.debug("flvScriptData",e)})),Ch(a=e.samples).call(a,(function(e){e.keyframe&&c.flv.emit(lP,{pts:e.originPts})})),Ch(o=e.warnings).call(o,(function(e){var t;switch(e.type){case ZU:t=wP;break;case eI:t=kP;break;case tI:t=TP}t&&c.flv.emit(bP,Pm(Pm({},e),{},{type:t})),EB.warn("video exception",e)})),Ch(s=t.warnings).call(s,(function(e){var t;switch(e.type){case rI:t=SP;break;case nI:t=xP;break;case iI:t=EP}t&&c.flv.emit(bP,Pm(Pm({},e),{},{type:t})),EB.warn("audio exception",e)})),Ch(u=r.seiSamples).call(u,(function(e){c.flv.emit(dP,Pm(Pm({},e),{},{sei:{code:e.data.type,content:e.data.payload,dts:e.pts}}))}))}}]),e}();function AB(e,t){var r=0,n=e.length-1,i=0,a=0,o=n;for(t<e[0]&&(r=0,a=o+1);a<=o;){if((i=a+Math.floor((o-a)/2))===n||t>=e[i]&&t<e[i+1]){r=i;break}e[i]<t?a=i+1:o=i-1}return r}var LB=new AD("flv"),CB=.1,OB=function(e){zm(c,e);var t,r,n,i,a,o,s,u=qm(c);function c(e){var t,r;return Bm(this,c),Nm(Hm(t=u.call(this)),"media",null),Nm(Hm(t),"_loading",!1),Nm(Hm(t),"_opts",null),Nm(Hm(t),"_bufferService",null),Nm(Hm(t),"_gapService",null),Nm(Hm(t),"_stats",null),Nm(Hm(t),"_mediaLoader",null),Nm(Hm(t),"_maxChunkWaitTimer",null),Nm(Hm(t),"_tickTimer",null),Nm(Hm(t),"_tickInterval",500),Nm(Hm(t),"_urlSwitching",!1),Nm(Hm(t),"_seamlessSwitching",!1),Nm(Hm(t),"_disconnectRetryCount",0),Nm(Hm(t),"_preLoadEndPoint",0),Nm(Hm(t),"_keyframes",null),Nm(Hm(t),"_acceptRanges",!0),Nm(Hm(t),"_onProgress",function(){var e=Im(Rm().mark((function e(r,n,i,a){var o,s,u,c,l,f,h,d,p,v;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=i.startTime,s=i.endTime,u=i.st,c=i.firstByteTime,t._loading=!n,t._firstProgressEmit){e.next=13;break}if(t.media){e.next=6;break}return null===(l=t._mediaLoader)||void 0===l||l.cancel(),e.abrupt("return");case 6:f=a.headers,h=u?c-u:s-o,t.emit(eP,{url:t._opts.url,responseUrl:a.url,elapsed:h}),t.emit(rP,{headers:f}),t._transferCost.set(wB,h),t._acceptRanges=!(null==f||!f.get("Accept-Ranges"))||!(null==f||!f.get("Content-Range")),t._firstProgressEmit=!0;case 13:if(t._bufferService){e.next=15;break}return e.abrupt("return");case 15:return clearTimeout(t._maxChunkWaitTimer),t._bandwidthService.addChunkRecord(null==r?void 0:r.byteLength,s-o),e.prev=17,e.next=20,t._bufferService.appendBuffer(r);case 20:null===(d=t._bufferService)||void 0===d||d.evictBuffer(t._opts.bufferBehind),e.next=33;break;case 23:if(e.prev=23,e.t0=e.catch(17),t.isLive||!t._bufferService.isFull()){e.next=32;break}return e.next=28,t._mediaLoader.cancel();case 28:return t._loading=!1,p=t.bufferInfo().remaining,t._opts.preloadTime=ob(p)/2,e.abrupt("return");case 32:return e.abrupt("return",t._emitError(wD.create(e.t0)));case 33:if(t._urlSwitching&&(t._urlSwitching=!1,t.emit(gP,{url:t._opts.url})),t._seamlessSwitching&&(t._seamlessSwitching=!1,t._tick()),!n||t.media.seeking){e.next=40;break}return t.emit(nP),LB.debug("load done"),t.isLive&&t._disconnectRetryCount<=0&&t._end(),e.abrupt("return");case 40:if(t.isLive){e.next=42;break}return e.abrupt("return");case 42:(v=t._opts.maxReaderInterval)&&t._firstProgressEmit&&(clearTimeout(t._maxChunkWaitTimer),t._maxChunkWaitTimer=Qw((function(){if(t._disconnectRetryCount)return t._disconnectRetryCount--,void t.load();LB.debug("onMaxChunkWait",v),t._end()}),v));case 44:case"end":return e.stop()}}),e,null,[[17,23]])})));return function(t,r,n,i){return e.apply(this,arguments)}}()),Nm(Hm(t),"_onRetryError",(function(e,r){LB.debug("load retry",e,r),t.emit(iP,{error:wD.network(e),retryTime:r})})),Nm(Hm(t),"_end",(function(){t._clear(),t._bufferService&&t._bufferService.endOfStream(),LB.debug("end stream")})),Nm(Hm(t),"_resetDisconnectCount",(function(){t._disconnectRetryCount=t._opts.disconnectRetryCount})),Nm(Hm(t),"_tick",(function(){clearTimeout(t._tickTimer);var e=Hm(t).media;if(e){t._tickTimer=Qw(t._tick,t._tickInterval);var r=oD.end(oD.get(e));if(!(r<CB)&&e.readyState){var n=t._opts;if(function(e){return e&&!e.paused&&!e.ended&&0!==e.playbackRate&&0!==e.readyState}(e)&&e.currentTime)t._gapService&&t._gapService.do(e,n.maxJumpDistance,t.isLive,3);else{if(!e.currentTime&&t._gapService&&n.enableStartGapJump)return void((t._opts.mseLowLatency||!1===t._opts.mseLowLatency&&t.bufferInfo(.3).nextStart)&&t._gapService.do(e,n.maxJumpDistance,t.isLive,3));n.isLive&&4===e.readyState&&r-e.currentTime>n.disconnectTime&&t.disconnect()}}}})),Nm(Hm(t),"_onPlay",(function(){var e,r,n=t._opts.softDecode||(null===(e=t.media)||void 0===e||null===(r=e.buffered)||void 0===r?void 0:r.length);if(t.isLive)!t._loading&&n&&t.replay(void 0,!0);else{var i=t.bufferInfo();(i.start||i.nextStart)>CB&&t._tick()}})),Nm(Hm(t),"_onLoadeddata",(function(){t.isLive&&!t._opts.mseLowLatency&&t.media.duration!==1/0&&t._bufferService.updateDuration(1/0).catch((function(e){}))})),Nm(Hm(t),"_onSeeking",Im(Rm().mark((function e(){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:!t.isLive&&t.seekable&&(t._preLoadEndPoint=-1,t._checkPreload());case 1:case"end":return e.stop()}}),e)})))),Nm(Hm(t),"_onTimeupdate",(function(){if(t.media){var e=t._opts,r=t.media.currentTime;if(e.isLive&&e.maxLatency&&e.targetLatency){var n=oD.end(oD.get(t.media));n-r>=e.maxLatency&&(t.media.currentTime=n-e.targetLatency,t.emit(fP,{currentTime:t.media.currentTime,latency:e.targetLatency}))}t._seiService.throw(r,!0),e.isLive||!t.seekable||t._loading||t._checkPreload()}})),Nm(Hm(t),"_onWaiting",(function(){t.isLive&&!t._loading&&t._disconnectRetryCount&&(t._disconnectRetryCount--,t.load())})),Nm(Hm(t),"_onBufferUpdate",(function(){if(!t._opts.isLive){var e=t.bufferInfo(),r=e.end,n=e.nextEnd;Math.abs((r||n)-t.media.duration)<1&&(t._end(),t.media.readyState<=2&&t._tick())}})),Nm(Hm(t),"_checkPreload",Im(Rm().mark((function e(){var r,n,i,a,o,s,u,c,l,f;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.bufferInfo(),n=r.remaining,i=void 0===n?0:n,a=t._opts,o=t._keyframes.filepositions,s=t._keyframes.times,u=t.media.currentTime,!(i<a.preloadTime)){e.next=19;break}if(c=AB(t._keyframes.times,u+i+CB),(l=AB(t._keyframes.times,u+i+t._opts.preloadTime))===c&&(l=c+1),t._preLoadEndPoint!==l){e.next=11;break}return e.abrupt("return");case 11:if(null!=(f=o[c])){e.next=14;break}return e.abrupt("return");case 14:return e.next=16,t._mediaLoader.cancel();case 16:t._loadData(null,[f,o[l]]),t._preLoadEndPoint=l,t._bufferService.unContiguous(s[c]);case 19:case"end":return e.stop()}}),e)})))),Nm(Hm(t),"_onFlvScriptData",(function(e){var r,n,i,a,o=null===(r=e.data)||void 0===r||null===(n=r.onMetaData)||void 0===n?void 0:n.keyframes,s=null===(i=e.data)||void 0===i||null===(a=i.onMetaData)||void 0===a?void 0:a.duration;o&&(t._keyframes=o),!t._opts.isLive&&s&&t._bufferService.updateDuration(s)})),t._opts=((r=Pm({retryCount:3,retryDelay:1e3,disconnectRetryCount:0,loadTimeout:1e4,maxReaderInterval:5e3,preloadTime:5,defaultVodLoadSize:1e7,isLive:!1,softDecode:!1,bufferBehind:10,maxJumpDistance:3,analyzeDuration:2e4,seamlesslyReload:!1,keepStatusAfterSwitch:!0,onlyVideo:!1,onlyAudio:!1,preferMMS:!1,mseLowLatency:!0,durationForMSELowLatencyOff:6,chunkCountForSpeed:50,skipChunkSize:1e3,longtimeNoReceived:3e3,enableStartGapJump:!0},e)).isLive&&r.preloadTime&&(r.maxLatency||(r.maxLatency=2*r.preloadTime),r.targetLatency||(r.targetLatency=r.preloadTime),null!==r.disconnectTime&&void 0!==r.disconnectTime||(r.disconnectTime=r.maxLatency)),r),t.media=t._opts.media||document.createElement("video"),t._opts.media=null,t._firstProgressEmit=!1,t._mediaLoader=new UP(Pm(Pm({},t._opts.fetchOptions),{},{retry:t._opts.retryCount,retryDelay:t._opts.retryDelay,timeout:t._opts.loadTimeout,onRetryError:t._onRetryError,onProgress:t._onProgress,responseType:"arraybuffer"})),t._disconnectRetryCount=t._opts.disconnectRetryCount,t._transferCost=new bB,t._bufferService=new TB(Hm(t),t._opts.softDecode?t.media:void 0,t._opts),t._seiService=new EU(Hm(t)),t._bandwidthService=new TU({chunkCountForSpeed:t._opts.chunkCountForSpeed,skipChunkSize:t._opts.skipChunkSize,longtimeNoReceived:t._opts.longtimeNoReceived}),t._stats=new LU(Hm(t)),t._opts.softDecode||(t._gapService=new IP),t.media.addEventListener("play",t._onPlay),t.media.addEventListener("loadeddata",t._onLoadeddata),t.media.addEventListener("seeking",t._onSeeking),t.media.addEventListener("timeupdate",t._onTimeupdate),t.media.addEventListener("progress",t._onBufferUpdate),t.media.addEventListener("waiting",t._onWaiting),t.on(vP,t._onFlvScriptData),t}return Fm(c,[{key:"version",get:function(){return"3.0.23-rc.6"}},{key:"isLive",get:function(){return this._opts.isLive}},{key:"baseDts",get:function(){var e;return null===(e=this._bufferService)||void 0===e?void 0:e.baseDts}},{key:"seekable",get:function(){return!!this._keyframes&&this._acceptRanges}},{key:"loader",get:function(){return this._mediaLoader}},{key:"blobUrl",get:function(){var e;return null===(e=this._bufferService)||void 0===e?void 0:e.blobUrl}},{key:"speedInfo",value:function(){return{speed:this._bandwidthService.getLatestSpeed(),avgSpeed:this._bandwidthService.getAvgSpeed(),totalSize:this._bandwidthService.getTotalSize(),totalCost:this._bandwidthService.getTotalCost()}}},{key:"getStats",value:function(){return this._stats.getStats()}},{key:"bufferInfo",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CB;return oD.info(oD.get(this.media),null===(e=this.media)||void 0===e?void 0:e.currentTime,t)}},{key:"playbackQuality",value:function(){return function(e){if(!e)return{};if("function"==typeof e.getVideoPlaybackQuality){var t=e.getVideoPlaybackQuality();return{droppedVideoFrames:t.droppedVideoFrames||t.corruptedVideoFrames,totalVideoFrames:t.totalVideoFrames,creationTime:t.creationTime}}return{droppedVideoFrames:e.webkitDroppedFrameCount,totalVideoFrames:e.webkitDecodedFrameCount,creationTime:performance.now()}}(this.media)}},{key:"load",value:(s=Im(Rm().mark((function e(t){var r,n,i=arguments;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i.length>1&&void 0!==i[1]&&i[1],n=i.length>2?i[2]:void 0,this._bufferService){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,this._reset(r);case 6:this._loadData(t,this._opts.isLive?[]:[0,this._opts.defaultVodLoadSize],n),clearTimeout(this._tickTimer),this._tickTimer=Qw(this._tick,this._tickInterval);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"replay",value:(o=Im(Rm().mark((function e(){var t,r,n=this,i=arguments;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=i.length>0&&void 0!==i[0]?i[0]:this._opts.seamlesslyReload,r=i.length>1?i[1]:void 0,this.media){e.next=4;break}return e.abrupt("return");case 4:if(this._resetDisconnectCount(),!t){e.next=11;break}return e.next=8,this._clear();case 8:Qw((function(){n._seamlessSwitching=!0,n._loadData(n._opts.url),n._bufferService.seamlessSwitch()})),e.next=13;break;case 11:return e.next=13,this.load();case 13:return e.abrupt("return",this.media.play(!r).catch((function(){})));case 14:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"disconnect",value:function(){var e;return LB.debug("disconnect!"),null===(e=this._bufferService)||void 0===e||e.resetSeamlessSwitchStats(),this._clear()}},{key:"switchURL",value:(a=Im(Rm().mark((function e(t,r){var n=this;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._bufferService){e.next=2;break}return e.abrupt("return");case 2:if(this._resetDisconnectCount(),!this._loading||!r){e.next=6;break}return this._bufferService.seamlessLoadingSwitch=function(){var e=Im(Rm().mark((function e(r){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n._clear();case 2:n._bufferService.seamlessLoadingSwitching=!0,n._urlSwitching=!0,n._seamlessSwitching=!0,n._bufferService.seamlessSwitch(),n._loadData(t);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.abrupt("return");case 6:if(r&&this._opts.isLive){e.next=11;break}return e.next=9,this.load(t);case 9:return this._urlSwitching=!0,e.abrupt("return",this.media.play(!0).catch((function(){})));case 11:return e.next=13,this._clear();case 13:Qw((function(){n._urlSwitching=!0,n._seamlessSwitching=!0,n._loadData(t),n._bufferService.seamlessSwitch()}));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"destroy",value:(i=Im(Rm().mark((function e(){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.media){e.next=2;break}return e.abrupt("return");case 2:return this.removeAllListeners(),this._seiService.reset(),this.media.removeEventListener("play",this._onPlay),this.media.removeEventListener("loadeddata",this._onLoadeddata),this.media.removeEventListener("seeking",this._onSeeking),this.media.removeEventListener("timeupdate",this._onTimeupdate),this.media.removeEventListener("waiting",this._onWaiting),this.media.removeEventListener("progress",this._onBufferUpdate),e.next=12,$g.all([this._clear(),this._bufferService.destroy()]);case 12:this.media=null,this._bufferService=null;case 14:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"_emitError",value:function(e){var t,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];LB.table(e),LB.error(e),LB.error(null===(t=this.media)||void 0===t?void 0:t.error),this._urlSwitching&&(this._urlSwitching=!1,this._seamlessSwitching=!1,this.emit(mP,e)),this.emit(ZD,e),r&&(this._seiService.reset(),this._end())}},{key:"_reset",value:(n=Im(Rm().mark((function e(){var t,r=arguments;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]&&r[0],this._seiService.reset(),this._bandwidthService.reset(),this._stats.reset(),e.next=6,this._clear();case 6:return e.next=8,this._bufferService.reset(t);case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"_loadData",value:(r=Im(Rm().mark((function e(t,r,n){var i;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(this._opts.url=t),i=t=this._opts.url,t){e.next=4;break}throw new Error("Source url is missing");case 4:if(this._opts.preProcessUrl&&(i=this._opts.preProcessUrl(t).url),this._mediaLoader.finnalUrl=i,this.emit(tP,{url:i,seamlessSwitching:this._seamlessSwitching}),LB.debug("load data, loading:",this._loading,i),!this._loading){e.next=11;break}return e.next=11,this._mediaLoader.cancel();case 11:return this._loading=!0,e.prev=12,e.next=15,this._mediaLoader.load({url:i,range:r,streamRes:n,firstMaxChunkSize:this._opts.firstMaxChunkSize});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(12),this._loading=!1,e.abrupt("return",this._emitError(wD.network(e.t0),!1));case 21:case"end":return e.stop()}}),e,this,[[12,17]])}))),function(e,t,n){return r.apply(this,arguments)})},{key:"_clear",value:(t=Im(Rm().mark((function e(){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mediaLoader){e.next=3;break}return e.next=3,this._mediaLoader.cancel();case 3:clearTimeout(this._maxChunkWaitTimer),clearTimeout(this._tickTimer),this._loading=!1,this._firstProgressEmit=!1;case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"isSupported",value:function(e){return e&&"video"!==e&&"audio"!==e?"undefined"!=typeof WebAssembly:FD.isSupported()}},{key:"enableLogger",value:function(){AD.enable(),vI.enable()}},{key:"disableLogger",value:function(){AD.disable(),vI.disable()}}]),c}(iw);try{localStorage.getItem("xgd")?OB.enableLogger():OB.disableLogger()}catch(VB){}var DB=function(){function e(t,r){var n=this;Bm(this,e),Nm(this,"_onLowDecode",(function(){var e,t,r,i,a=n._opts,o=a.media,s=a.innerDegrade,u=a.backupURL;null===(e=n._plugin)||void 0===e||null===(t=e.player)||void 0===t||t.emit("lowdecode",o.degradeInfo),null===(r=n._plugin)||void 0===r||null===(i=r.player)||void 0===i||i.emit("core_event",Pm(Pm({},o.degradeInfo),{},{eventName:yP})),1!==s&&3!==s||!u||n._degrade(u)})),Nm(this,"_degrade",(function(e){var t=n._plugin.player,r=t.video;if("MVideo"===(null==r?void 0:r.TAG)){var i=t.video.degradeVideo;t.video=i,r.degrade(e),e&&(t.config.url=e);var a=t.root.firstChild;"MVideo"===a.TAG&&t.root.replaceChild(i,a);var o=n._plugin.constructor.pluginName.toLowerCase();t.unRegisterPlugin(o),t.once("canplay",(function(){t.play()}))}})),Nm(this,"forceDegradeToVideo",(function(e){var t=n._opts.innerDegrade;1!==t&&3!==t||n._degrade(e)})),this._opts=t,this._plugin=r,this._init()}return Fm(e,[{key:"_init",value:function(){var e=this._opts,t=e.media,r=e.isLive,n=e.preloadTime,i=e.innerDegrade,a=e.decodeMode;t&&(r||!t.setPlayMode?(i&&t.setAttribute("innerdegrade",i),n&&t.setAttribute("preloadtime",n),t.setDecodeMode&&t.setDecodeMode(a),this._bindEvents()):t.setPlayMode("VOD"))}},{key:"_bindEvents",value:function(){this._opts.media.addEventListener("lowdecode",this._onLowDecode)}},{key:"destroy",value:function(){var e,t;null===(e=this._opts)||void 0===e||null===(t=e.media)||void 0===t||t.removeEventListener("lowdecode",this._onLowDecode),this._plugin=null}}]),e}(),PB=function(e){zm(r,e);var t=qm(r);function r(){var e,n;Bm(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return Nm(Hm(n=t.call.apply(t,oh(e=[this]).call(e,a))),"logger",LB),Nm(Hm(n),"flv",null),Nm(Hm(n),"pluginExtension",null),Nm(Hm(n),"getStats",(function(){var e;return null===(e=n.flv)||void 0===e?void 0:e.getStats()})),Nm(Hm(n),"loadSource",(function(){var e;arguments.length>0&&void 0!==arguments[0]||n.player.config.url;var t=arguments.length>1?arguments[1]:void 0;null===(e=n.flv)||void 0===e||e.load(n.player.config.url,!0,t)})),Nm(Hm(n),"destroy",(function(){var e;n.flv&&(n.flv.destroy(),n.flv=null),null===(e=n.pluginExtension)||void 0===e||e.destroy(),n.pluginExtension=null})),Nm(Hm(n),"_onSwitchURL",(function(e,t){var r,i;n.flv&&(n.player.config.url=e,"object"===Mm(t)&&(t=t.seamless),n.flv.switchURL(e,t),!t&&null!==(r=n.player.config)&&void 0!==r&&null!==(i=r.flv)&&void 0!==i&&i.keepStatusAfterSwitch&&n._keepPauseStatus())})),Nm(Hm(n),"_keepPauseStatus",(function(){n.player.paused&&n.player.once("canplay",(function(){n.player.pause()}))})),Nm(Hm(n),"_onDefinitionChange",(function(e){var t=e.to;n.flv&&n.flv.switchURL(t)})),n}return Fm(r,[{key:"core",get:function(){return this.flv}},{key:"version",get:function(){var e;return null===(e=this.flv)||void 0===e?void 0:e.version}},{key:"softDecode",get:function(){var e,t,r=null===(e=this.player)||void 0===e||null===(t=e.config)||void 0===t?void 0:t.mediaType;return!!r&&"video"!==r&&"audio"!==r&&"offscreen-video"!==r}},{key:"loader",get:function(){var e;return null===(e=this.flv)||void 0===e?void 0:e.loader}},{key:"transferCost",get:function(){return this.flv._transferCost.transferCost}},{key:"beforePlayerInit",value:function(){var e=this,t=this.player.config,r=this.player.media||this.player.video;if(t.url){this.flv&&this.flv.destroy(),this.player.switchURL=this._onSwitchURL;var n,i=t.flv||{};if(null!==i.disconnectTime&&void 0!==i.disconnectTime||(i.disconnectTime=0),this.flv=new OB(Pm({softDecode:this.softDecode,isLive:t.isLive,media:r,preProcessUrl:function(t,r){var n,i;return(null===(n=e.player)||void 0===n||null===(i=n.preProcessUrl)||void 0===i?void 0:i.call(n,t,r))||{url:t,ext:r}}},i)),this.softDecode||LS.defineGetterOrSetter(this.player,{url:{get:function(){var t;return null===(t=e.flv)||void 0===t?void 0:t.blobUrl},configurable:!0}}),this.softDecode&&(this.pluginExtension=new DB(Pm({media:this.player.video,isLive:t.isLive},t.flv),this),this.player.forceDegradeToVideo=function(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return null===(t=e.pluginExtension)||void 0===t?void 0:t.forceDegradeToVideo.apply(t,n)}),t.isLive)null===(n=this.player)||void 0===n||n.useHooks("replay",(function(){var t;return null===(t=e.flv)||void 0===t?void 0:t.replay()}));this.on("urlchange",this._onSwitchURL),this.on("destroy",this.destroy),this._transError(),this._transCoreEvent(eP),this._transCoreEvent(tP),this._transCoreEvent(rP),this._transCoreEvent(nP),this._transCoreEvent(iP),this._transCoreEvent(aP),this._transCoreEvent(oP),this._transCoreEvent(sP),this._transCoreEvent(uP),this._transCoreEvent(cP),this._transCoreEvent(lP),this._transCoreEvent(fP),this._transCoreEvent(hP),this._transCoreEvent(dP),this._transCoreEvent(pP),this._transCoreEvent(vP),this._transCoreEvent(bP),this._transCoreEvent(gP),this._transCoreEvent(mP),i.manualLoad||this.loadSource(t.url,i.streamRes)}}},{key:"_transError",value:function(){var e=this;this.flv.on(ZD,(function(t){e.player&&e.player.emit("error",new wS(e.player,t))}))}},{key:"_transCoreEvent",value:function(e){var t=this;this.flv.on(e,(function(r){t.player&&t.player.emit("core_event",Pm(Pm({},r),{},{eventName:e}))}))}}],[{key:"pluginName",get:function(){return"flv"}},{key:"isSupported",value:function(e,t){return OB.isSupported(e,t)}},{key:"isSupportedMMS",value:function(){return"undefined"!=typeof ManagedMediaSource}}]),r}(LS);function RB(e,t,r){return t=BB(t),function(e,t){if(t&&("object"===Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,MB()?Cm(t,r||[],BB(e).constructor):t.apply(e,r))}function MB(){try{var e=!Boolean.prototype.valueOf.call(Cm(Boolean,[],(function(){})))}catch(t){}return(MB=function(){return!!e})()}function UB(e){var t=function(e,t){if("object"!=Ol(e)||!e)return e;var r=e[Om];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ol(t)?t:String(t)}function IB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Yh(e,UB(n.key),n)}}function BB(e){var t;return(BB=$h?Lm(t=Xh).call(t):function(e){return e.__proto__||Xh(e)})(e)}function jB(e,t){var r;return(jB=$h?Lm(r=$h).call(r):function(e,t){return e.__proto__=t,e})(e,t)}Nm(PB,"Flv",OB);var FB=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),RB(this,t,arguments)}var r,n,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Qh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Yh(e,"prototype",{writable:!1}),t&&jB(e,t)}(t,e),r=t,i=[{key:"pluginName",get:function(){return"adaptive"}},{key:"defaultConfig",get:function(){return{hurryEndMs:1800,hurryStartMs:2500,hurrySpeed:1.1}}}],(n=[{key:"afterCreate",value:function(){var e;this.on("timeupdate",Lm(e=this.onTimeUpdate).call(e,this))}},{key:"onTimeUpdate",value:function(){var e=this.bufferLength;this.speed===this.config.hurrySpeed?e<=this.config.hurryEndMs&&(this.speed=1):1===this.speed&&e>=this.config.hurryStartMs&&(this.speed=this.config.hurrySpeed)}},{key:"bufferLength",get:function(){var e=this.player.getBufferedRange(),t=this.player.video.currentTime,r=e[1]-Math.max(e[0],t);return r=Math.round(1e3*Math.max(0,r))}},{key:"speed",get:function(){return this.player.playbackRate},set:function(e){this.speed!==e&&(this.player.playbackRate=e)}}])&&IB(r.prototype,n),i&&IB(r,i),Yh(r,"prototype",{writable:!1}),t}(LS),NB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Rf(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ir(e,"prototype",{writable:!1}),t&&Mf(e,t)}(a,e);var t,r,n,i=th(a);function a(){var e,t,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return t=i.call.apply(i,oh(e=[this]).call(e,u)),r=Ul(t),o=void 0,(n=Rl(n="_originSwitchURL"))in r?Ir(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,t}return t=a,(r=[{key:"beforePlayerInit",value:function(){var e=this;this._originSwitchURL=this.player.switchURL;var t=this.destroy;this.destroy=function(){e.player.switchURL=e._originSwitchURL,t()},Of(Cf(a.prototype),"beforePlayerInit",this).call(this)}}])&&Ml(t.prototype,r),n&&Ml(t,n),Ir(t,"prototype",{writable:!1}),a}(PB),zB=window.VePlayer.DynamicModule;VePlayer.registerPlugin(zB.PluginFlv,{FlvPlugin:NB,Adaptive:FB}),e.Adaptive=FB,e.FlvPlugin=NB}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).__VEPLAYER_PLUGIN_FLV__={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n={exports:{}},i=function(e){return e&&e.Math==Math&&e},a=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},s=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=s,c=Function.prototype,l=c.apply,f=c.call,h="object"==typeof Reflect&&Reflect.apply||(u?f.bind(l):function(){return f.apply(l,arguments)}),d=s,p=Function.prototype,v=p.call,y=d&&p.bind.bind(v,v),g=d?y:function(e){return function(){return v.apply(e,arguments)}},m=g,_=m({}.toString),b=m("".slice),w=function(e){return b(_(e),8,-1)},k=w,S=g,x=function(e){if("Function"===k(e))return S(e)},E="object"==typeof document&&document.all,T={all:E,IS_HTMLDDA:void 0===E&&void 0!==E},A=T.all,L=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===A}:function(e){return"function"==typeof e},C={},O=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),D=s,P=Function.prototype.call,R=D?P.bind(P):function(){return P.apply(P,arguments)},M={},U={}.propertyIsEnumerable,I=Object.getOwnPropertyDescriptor,B=I&&!U.call({1:2},1);M.f=B?function(e){var t=I(this,e);return!!t&&t.enumerable}:U;var j,F,N=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},z=o,V=w,G=Object,H=g("".split),q=z((function(){return!G("z").propertyIsEnumerable(0)}))?function(e){return"String"==V(e)?H(e,""):G(e)}:G,K=function(e){return null==e},W=K,Y=TypeError,J=function(e){if(W(e))throw Y("Can't call method on "+e);return e},Q=q,X=J,$=function(e){return Q(X(e))},Z=L,ee=T.all,te=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Z(e)||e===ee}:function(e){return"object"==typeof e?null!==e:Z(e)},re={},ne=re,ie=a,ae=L,oe=function(e){return ae(e)?e:void 0},se=function(e,t){return arguments.length<2?oe(ne[e])||oe(ie[e]):ne[e]&&ne[e][t]||ie[e]&&ie[e][t]},ue=g({}.isPrototypeOf),ce="undefined"!=typeof navigator&&String(navigator.userAgent)||"",le=a,fe=ce,he=le.process,de=le.Deno,pe=he&&he.versions||de&&de.version,ve=pe&&pe.v8;ve&&(F=(j=ve.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!F&&fe&&(!(j=fe.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=fe.match(/Chrome\/(\d+)/))&&(F=+j[1]);var ye=F,ge=ye,me=o,_e=a.String,be=!!Object.getOwnPropertySymbols&&!me((function(){var e=Symbol();return!_e(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ge&&ge<41})),we=be&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ke=se,Se=L,xe=ue,Ee=Object,Te=we?function(e){return"symbol"==typeof e}:function(e){var t=ke("Symbol");return Se(t)&&xe(t.prototype,Ee(e))},Ae=String,Le=function(e){try{return Ae(e)}catch(t){return"Object"}},Ce=L,Oe=Le,De=TypeError,Pe=function(e){if(Ce(e))return e;throw De(Oe(e)+" is not a function")},Re=Pe,Me=K,Ue=function(e,t){var r=e[t];return Me(r)?void 0:Re(r)},Ie=R,Be=L,je=te,Fe=TypeError,Ne={exports:{}},ze=a,Ve=Object.defineProperty,Ge=function(e,t){try{Ve(ze,e,{value:t,configurable:!0,writable:!0})}catch(r){ze[e]=t}return t},He="__core-js_shared__",qe=a[He]||Ge(He,{}),Ke=qe;(Ne.exports=function(e,t){return Ke[e]||(Ke[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var We=Ne.exports,Ye=J,Je=Object,Qe=function(e){return Je(Ye(e))},Xe=Qe,$e=g({}.hasOwnProperty),Ze=Object.hasOwn||function(e,t){return $e(Xe(e),t)},et=g,tt=0,rt=Math.random(),nt=et(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++tt+rt,36)},at=We,ot=Ze,st=it,ut=be,ct=we,lt=a.Symbol,ft=at("wks"),ht=ct?lt.for||lt:lt&<.withoutSetter||st,dt=function(e){return ot(ft,e)||(ft[e]=ut&&ot(lt,e)?lt[e]:ht("Symbol."+e)),ft[e]},pt=R,vt=te,yt=Te,gt=Ue,mt=function(e,t){var r,n;if("string"===t&&Be(r=e.toString)&&!je(n=Ie(r,e)))return n;if(Be(r=e.valueOf)&&!je(n=Ie(r,e)))return n;if("string"!==t&&Be(r=e.toString)&&!je(n=Ie(r,e)))return n;throw Fe("Can't convert object to primitive value")},_t=TypeError,bt=dt("toPrimitive"),wt=function(e,t){if(!vt(e)||yt(e))return e;var r,n=gt(e,bt);if(n){if(void 0===t&&(t="default"),r=pt(n,e,t),!vt(r)||yt(r))return r;throw _t("Can't convert object to primitive value")}return void 0===t&&(t="number"),mt(e,t)},kt=Te,St=function(e){var t=wt(e,"string");return kt(t)?t:t+""},xt=te,Et=a.document,Tt=xt(Et)&&xt(Et.createElement),At=function(e){return Tt?Et.createElement(e):{}},Lt=At,Ct=!O&&!o((function(){return 7!=Object.defineProperty(Lt("div"),"a",{get:function(){return 7}}).a})),Ot=O,Dt=R,Pt=M,Rt=N,Mt=$,Ut=St,It=Ze,Bt=Ct,jt=Object.getOwnPropertyDescriptor;C.f=Ot?jt:function(e,t){if(e=Mt(e),t=Ut(t),Bt)try{return jt(e,t)}catch(r){}if(It(e,t))return Rt(!Dt(Pt.f,e,t),e[t])};var Ft=o,Nt=L,zt=/#|\.prototype\./,Vt=function(e,t){var r=Ht[Gt(e)];return r==Kt||r!=qt&&(Nt(t)?Ft(t):!!t)},Gt=Vt.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},Ht=Vt.data={},qt=Vt.NATIVE="N",Kt=Vt.POLYFILL="P",Wt=Vt,Yt=Pe,Jt=s,Qt=x(x.bind),Xt=function(e,t){return Yt(e),void 0===t?e:Jt?Qt(e,t):function(){return e.apply(t,arguments)}},$t={},Zt=O&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),er=te,tr=String,rr=TypeError,nr=function(e){if(er(e))return e;throw rr(tr(e)+" is not an object")},ir=O,ar=Ct,or=Zt,sr=nr,ur=St,cr=TypeError,lr=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,hr="enumerable",dr="configurable",pr="writable";$t.f=ir?or?function(e,t,r){if(sr(e),t=ur(t),sr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&pr in r&&!r[pr]){var n=fr(e,t);n&&n[pr]&&(e[t]=r.value,r={configurable:dr in r?r[dr]:n[dr],enumerable:hr in r?r[hr]:n[hr],writable:!1})}return lr(e,t,r)}:lr:function(e,t,r){if(sr(e),t=ur(t),sr(r),ar)try{return lr(e,t,r)}catch(n){}if("get"in r||"set"in r)throw cr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var vr=$t,yr=N,gr=O?function(e,t,r){return vr.f(e,t,yr(1,r))}:function(e,t,r){return e[t]=r,e},mr=a,_r=h,br=x,wr=L,kr=C.f,Sr=Wt,xr=re,Er=Xt,Tr=gr,Ar=Ze,Lr=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return _r(e,this,arguments)};return t.prototype=e.prototype,t},Cr=function(e,t){var r,n,i,a,o,s,u,c,l,f=e.target,h=e.global,d=e.stat,p=e.proto,v=h?mr:d?mr[f]:(mr[f]||{}).prototype,y=h?xr:xr[f]||Tr(xr,f,{})[f],g=y.prototype;for(a in t)n=!(r=Sr(h?a:f+(d?".":"#")+a,e.forced))&&v&&Ar(v,a),s=y[a],n&&(u=e.dontCallGetSet?(l=kr(v,a))&&l.value:v[a]),o=n&&u?u:t[a],n&&typeof s==typeof o||(c=e.bind&&n?Er(o,mr):e.wrap&&n?Lr(o):p&&wr(o)?br(o):o,(e.sham||o&&o.sham||s&&s.sham)&&Tr(c,"sham",!0),Tr(y,a,c),p&&(Ar(xr,i=f+"Prototype")||Tr(xr,i,{}),Tr(xr[i],a,o),e.real&&g&&(r||!g[a])&&Tr(g,a,o)))},Or=Cr,Dr=O,Pr=$t.f;Or({target:"Object",stat:!0,forced:Object.defineProperty!==Pr,sham:!Dr},{defineProperty:Pr});var Rr=re.Object,Mr=n.exports=function(e,t,r){return Rr.defineProperty(e,t,r)};Rr.defineProperty.sham&&(Mr.sham=!0);var Ur=n.exports,Ir=r(Ur),Br=w,jr=Array.isArray||function(e){return"Array"==Br(e)},Fr=Math.ceil,Nr=Math.floor,zr=Math.trunc||function(e){var t=+e;return(t>0?Nr:Fr)(t)},Vr=function(e){var t=+e;return t!=t||0===t?0:zr(t)},Gr=Vr,Hr=Math.min,qr=function(e){return e>0?Hr(Gr(e),9007199254740991):0},Kr=qr,Wr=function(e){return Kr(e.length)},Yr=TypeError,Jr=function(e){if(e>9007199254740991)throw Yr("Maximum allowed index exceeded");return e},Qr=St,Xr=$t,$r=N,Zr=function(e,t,r){var n=Qr(t);n in e?Xr.f(e,n,$r(0,r)):e[n]=r},en={};en[dt("toStringTag")]="z";var tn="[object z]"===String(en),rn=tn,nn=L,an=w,on=dt("toStringTag"),sn=Object,un="Arguments"==an(function(){return arguments}()),cn=rn?an:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=sn(e),on))?r:un?an(t):"Object"==(n=an(t))&&nn(t.callee)?"Arguments":n},ln=L,fn=qe,hn=g(Function.toString);ln(fn.inspectSource)||(fn.inspectSource=function(e){return hn(e)});var dn=fn.inspectSource,pn=g,vn=o,yn=L,gn=cn,mn=dn,_n=function(){},bn=[],wn=se("Reflect","construct"),kn=/^\s*(?:class|function)\b/,Sn=pn(kn.exec),xn=!kn.exec(_n),En=function(e){if(!yn(e))return!1;try{return wn(_n,bn,e),!0}catch(t){return!1}},Tn=function(e){if(!yn(e))return!1;switch(gn(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xn||!!Sn(kn,mn(e))}catch(t){return!0}};Tn.sham=!0;var An=!wn||vn((function(){var e;return En(En.call)||!En(Object)||!En((function(){e=!0}))||e}))?Tn:En,Ln=jr,Cn=An,On=te,Dn=dt("species"),Pn=Array,Rn=function(e){var t;return Ln(e)&&(t=e.constructor,(Cn(t)&&(t===Pn||Ln(t.prototype))||On(t)&&null===(t=t[Dn]))&&(t=void 0)),void 0===t?Pn:t},Mn=function(e,t){return new(Rn(e))(0===t?0:t)},Un=o,In=ye,Bn=dt("species"),jn=function(e){return In>=51||!Un((function(){var t=[];return(t.constructor={})[Bn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Fn=Cr,Nn=o,zn=jr,Vn=te,Gn=Qe,Hn=Wr,qn=Jr,Kn=Zr,Wn=Mn,Yn=jn,Jn=ye,Qn=dt("isConcatSpreadable"),Xn=Jn>=51||!Nn((function(){var e=[];return e[Qn]=!1,e.concat()[0]!==e})),$n=function(e){if(!Vn(e))return!1;var t=e[Qn];return void 0!==t?!!t:zn(e)};Fn({target:"Array",proto:!0,arity:1,forced:!Xn||!Yn("concat")},{concat:function(e){var t,r,n,i,a,o=Gn(this),s=Wn(o,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if($n(a=-1===t?o:arguments[t]))for(i=Hn(a),qn(u+i),r=0;r<i;r++,u++)r in a&&Kn(s,u,a[r]);else qn(u+1),Kn(s,u++,a);return s.length=u,s}});var Zn=cn,ei=String,ti=function(e){if("Symbol"===Zn(e))throw TypeError("Cannot convert a Symbol value to a string");return ei(e)},ri={},ni=Vr,ii=Math.max,ai=Math.min,oi=function(e,t){var r=ni(e);return r<0?ii(r+t,0):ai(r,t)},si=$,ui=oi,ci=Wr,li=function(e){return function(t,r,n){var i,a=si(t),o=ci(a),s=ui(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},fi={includes:li(!0),indexOf:li(!1)},hi={},di=Ze,pi=$,vi=fi.indexOf,yi=hi,gi=g([].push),mi=function(e,t){var r,n=pi(e),i=0,a=[];for(r in n)!di(yi,r)&&di(n,r)&&gi(a,r);for(;t.length>i;)di(n,r=t[i++])&&(~vi(a,r)||gi(a,r));return a},_i=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bi=mi,wi=_i,ki=Object.keys||function(e){return bi(e,wi)},Si=O,xi=Zt,Ei=$t,Ti=nr,Ai=$,Li=ki;ri.f=Si&&!xi?Object.defineProperties:function(e,t){Ti(e);for(var r,n=Ai(t),i=Li(t),a=i.length,o=0;a>o;)Ei.f(e,r=i[o++],n[r]);return e};var Ci,Oi=se("document","documentElement"),Di=it,Pi=We("keys"),Ri=function(e){return Pi[e]||(Pi[e]=Di(e))},Mi=nr,Ui=ri,Ii=_i,Bi=hi,ji=Oi,Fi=At,Ni="prototype",zi="script",Vi=Ri("IE_PROTO"),Gi=function(){},Hi=function(e){return"<"+zi+">"+e+"</"+zi+">"},qi=function(e){e.write(Hi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ki=function(){try{Ci=new ActiveXObject("htmlfile")}catch(i){}var e,t,r;Ki="undefined"!=typeof document?document.domain&&Ci?qi(Ci):(t=Fi("iframe"),r="java"+zi+":",t.style.display="none",ji.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Hi("document.F=Object")),e.close(),e.F):qi(Ci);for(var n=Ii.length;n--;)delete Ki[Ni][Ii[n]];return Ki()};Bi[Vi]=!0;var Wi=Object.create||function(e,t){var r;return null!==e?(Gi[Ni]=Mi(e),r=new Gi,Gi[Ni]=null,r[Vi]=e):r=Ki(),void 0===t?r:Ui.f(r,t)},Yi={},Ji=mi,Qi=_i.concat("length","prototype");Yi.f=Object.getOwnPropertyNames||function(e){return Ji(e,Qi)};var Xi={},$i=oi,Zi=Wr,ea=Zr,ta=Array,ra=Math.max,na=function(e,t,r){for(var n=Zi(e),i=$i(t,n),a=$i(void 0===r?n:r,n),o=ta(ra(a-i,0)),s=0;i<a;i++,s++)ea(o,s,e[i]);return o.length=s,o},ia=w,aa=$,oa=Yi.f,sa=na,ua="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Xi.f=function(e){return ua&&"Window"==ia(e)?function(e){try{return oa(e)}catch(t){return sa(ua)}}(e):oa(aa(e))};var ca={};ca.f=Object.getOwnPropertySymbols;var la=gr,fa=function(e,t,r,n){return n&&n.enumerable?e[t]=r:la(e,t,r),e},ha=$t,da=function(e,t,r){return ha.f(e,t,r)},pa={},va=dt;pa.f=va;var ya,ga,ma,_a=re,ba=Ze,wa=pa,ka=$t.f,Sa=function(e){var t=_a.Symbol||(_a.Symbol={});ba(t,e)||ka(t,e,{value:wa.f(e)})},xa=R,Ea=se,Ta=dt,Aa=fa,La=function(){var e=Ea("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Ta("toPrimitive");t&&!t[n]&&Aa(t,n,(function(e){return xa(r,this)}),{arity:1})},Ca=cn,Oa=tn?{}.toString:function(){return"[object "+Ca(this)+"]"},Da=tn,Pa=$t.f,Ra=gr,Ma=Ze,Ua=Oa,Ia=dt("toStringTag"),Ba=function(e,t,r,n){if(e){var i=r?e:e.prototype;Ma(i,Ia)||Pa(i,Ia,{configurable:!0,value:t}),n&&!Da&&Ra(i,"toString",Ua)}},ja=L,Fa=a.WeakMap,Na=ja(Fa)&&/native code/.test(String(Fa)),za=a,Va=te,Ga=gr,Ha=Ze,qa=qe,Ka=Ri,Wa=hi,Ya="Object already initialized",Ja=za.TypeError,Qa=za.WeakMap;if(Na||qa.state){var Xa=qa.state||(qa.state=new Qa);Xa.get=Xa.get,Xa.has=Xa.has,Xa.set=Xa.set,ya=function(e,t){if(Xa.has(e))throw Ja(Ya);return t.facade=e,Xa.set(e,t),t},ga=function(e){return Xa.get(e)||{}},ma=function(e){return Xa.has(e)}}else{var $a=Ka("state");Wa[$a]=!0,ya=function(e,t){if(Ha(e,$a))throw Ja(Ya);return t.facade=e,Ga(e,$a,t),t},ga=function(e){return Ha(e,$a)?e[$a]:{}},ma=function(e){return Ha(e,$a)}}var Za={set:ya,get:ga,has:ma,enforce:function(e){return ma(e)?ga(e):ya(e,{})},getterFor:function(e){return function(t){var r;if(!Va(t)||(r=ga(t)).type!==e)throw Ja("Incompatible receiver, "+e+" required");return r}}},eo=Xt,to=q,ro=Qe,no=Wr,io=Mn,ao=g([].push),oo=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(u,c,l,f){for(var h,d,p=ro(u),v=to(p),y=eo(c,l),g=no(v),m=0,_=f||io,b=t?_(u,g):r||o?_(u,0):void 0;g>m;m++)if((s||m in v)&&(d=y(h=v[m],m,p),e))if(t)b[m]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:ao(b,h)}else switch(e){case 4:return!1;case 7:ao(b,h)}return a?-1:n||i?i:b}},so={forEach:oo(0),map:oo(1),filter:oo(2),some:oo(3),every:oo(4),find:oo(5),findIndex:oo(6),filterReject:oo(7)},uo=Cr,co=a,lo=R,fo=g,ho=O,po=be,vo=o,yo=Ze,go=ue,mo=nr,_o=$,bo=St,wo=ti,ko=N,So=Wi,xo=ki,Eo=Yi,To=Xi,Ao=ca,Lo=C,Co=$t,Oo=ri,Do=M,Po=fa,Ro=da,Mo=We,Uo=hi,Io=it,Bo=dt,jo=pa,Fo=Sa,No=La,zo=Ba,Vo=Za,Go=so.forEach,Ho=Ri("hidden"),qo="Symbol",Ko="prototype",Wo=Vo.set,Yo=Vo.getterFor(qo),Jo=Object[Ko],Qo=co.Symbol,Xo=Qo&&Qo[Ko],$o=co.TypeError,Zo=co.QObject,es=Lo.f,ts=Co.f,rs=To.f,ns=Do.f,is=fo([].push),as=Mo("symbols"),os=Mo("op-symbols"),ss=Mo("wks"),us=!Zo||!Zo[Ko]||!Zo[Ko].findChild,cs=ho&&vo((function(){return 7!=So(ts({},"a",{get:function(){return ts(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=es(Jo,t);n&&delete Jo[t],ts(e,t,r),n&&e!==Jo&&ts(Jo,t,n)}:ts,ls=function(e,t){var r=as[e]=So(Xo);return Wo(r,{type:qo,tag:e,description:t}),ho||(r.description=t),r},fs=function(e,t,r){e===Jo&&fs(os,t,r),mo(e);var n=bo(t);return mo(r),yo(as,n)?(r.enumerable?(yo(e,Ho)&&e[Ho][n]&&(e[Ho][n]=!1),r=So(r,{enumerable:ko(0,!1)})):(yo(e,Ho)||ts(e,Ho,ko(1,{})),e[Ho][n]=!0),cs(e,n,r)):ts(e,n,r)},hs=function(e,t){mo(e);var r=_o(t),n=xo(r).concat(ys(r));return Go(n,(function(t){ho&&!lo(ds,r,t)||fs(e,t,r[t])})),e},ds=function(e){var t=bo(e),r=lo(ns,this,t);return!(this===Jo&&yo(as,t)&&!yo(os,t))&&(!(r||!yo(this,t)||!yo(as,t)||yo(this,Ho)&&this[Ho][t])||r)},ps=function(e,t){var r=_o(e),n=bo(t);if(r!==Jo||!yo(as,n)||yo(os,n)){var i=es(r,n);return!i||!yo(as,n)||yo(r,Ho)&&r[Ho][n]||(i.enumerable=!0),i}},vs=function(e){var t=rs(_o(e)),r=[];return Go(t,(function(e){yo(as,e)||yo(Uo,e)||is(r,e)})),r},ys=function(e){var t=e===Jo,r=rs(t?os:_o(e)),n=[];return Go(r,(function(e){!yo(as,e)||t&&!yo(Jo,e)||is(n,as[e])})),n};po||(Qo=function(){if(go(Xo,this))throw $o("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?wo(arguments[0]):void 0,t=Io(e),r=function(e){this===Jo&&lo(r,os,e),yo(this,Ho)&&yo(this[Ho],t)&&(this[Ho][t]=!1),cs(this,t,ko(1,e))};return ho&&us&&cs(Jo,t,{configurable:!0,set:r}),ls(t,e)},Po(Xo=Qo[Ko],"toString",(function(){return Yo(this).tag})),Po(Qo,"withoutSetter",(function(e){return ls(Io(e),e)})),Do.f=ds,Co.f=fs,Oo.f=hs,Lo.f=ps,Eo.f=To.f=vs,Ao.f=ys,jo.f=function(e){return ls(Bo(e),e)},ho&&Ro(Xo,"description",{configurable:!0,get:function(){return Yo(this).description}})),uo({global:!0,constructor:!0,wrap:!0,forced:!po,sham:!po},{Symbol:Qo}),Go(xo(ss),(function(e){Fo(e)})),uo({target:qo,stat:!0,forced:!po},{useSetter:function(){us=!0},useSimple:function(){us=!1}}),uo({target:"Object",stat:!0,forced:!po,sham:!ho},{create:function(e,t){return void 0===t?So(e):hs(So(e),t)},defineProperty:fs,defineProperties:hs,getOwnPropertyDescriptor:ps}),uo({target:"Object",stat:!0,forced:!po},{getOwnPropertyNames:vs}),No(),zo(Qo,qo),Uo[Ho]=!0;var gs=be&&!!Symbol.for&&!!Symbol.keyFor,ms=Cr,_s=se,bs=Ze,ws=ti,ks=We,Ss=gs,xs=ks("string-to-symbol-registry"),Es=ks("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!Ss},{for:function(e){var t=ws(e);if(bs(xs,t))return xs[t];var r=_s("Symbol")(t);return xs[t]=r,Es[r]=t,r}});var Ts=Cr,As=Ze,Ls=Te,Cs=Le,Os=gs,Ds=We("symbol-to-string-registry");Ts({target:"Symbol",stat:!0,forced:!Os},{keyFor:function(e){if(!Ls(e))throw TypeError(Cs(e)+" is not a symbol");if(As(Ds,e))return Ds[e]}});var Ps=g([].slice),Rs=jr,Ms=L,Us=w,Is=ti,Bs=g([].push),js=Cr,Fs=se,Ns=h,zs=R,Vs=g,Gs=o,Hs=L,qs=Te,Ks=Ps,Ws=function(e){if(Ms(e))return e;if(Rs(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Bs(r,i):"number"!=typeof i&&"Number"!=Us(i)&&"String"!=Us(i)||Bs(r,Is(i))}var a=r.length,o=!0;return function(e,t){if(o)return o=!1,t;if(Rs(this))return t;for(var n=0;n<a;n++)if(r[n]===e)return t}}},Ys=be,Js=String,Qs=Fs("JSON","stringify"),Xs=Vs(/./.exec),$s=Vs("".charAt),Zs=Vs("".charCodeAt),eu=Vs("".replace),tu=Vs(1..toString),ru=/[\uD800-\uDFFF]/g,nu=/^[\uD800-\uDBFF]$/,iu=/^[\uDC00-\uDFFF]$/,au=!Ys||Gs((function(){var e=Fs("Symbol")();return"[null]"!=Qs([e])||"{}"!=Qs({a:e})||"{}"!=Qs(Object(e))})),ou=Gs((function(){return'"\\udf06\\ud834"'!==Qs("\udf06\ud834")||'"\\udead"'!==Qs("\udead")})),su=function(e,t){var r=Ks(arguments),n=Ws(t);if(Hs(n)||void 0!==e&&!qs(e))return r[1]=function(e,t){if(Hs(n)&&(t=zs(n,this,Js(e),t)),!qs(t))return t},Ns(Qs,null,r)},uu=function(e,t,r){var n=$s(r,t-1),i=$s(r,t+1);return Xs(nu,e)&&!Xs(iu,i)||Xs(iu,e)&&!Xs(nu,n)?"\\u"+tu(Zs(e,0),16):e};Qs&&js({target:"JSON",stat:!0,arity:3,forced:au||ou},{stringify:function(e,t,r){var n=Ks(arguments),i=Ns(au?su:Qs,null,n);return ou&&"string"==typeof i?eu(i,ru,uu):i}});var cu=ca,lu=Qe;Cr({target:"Object",stat:!0,forced:!be||o((function(){cu.f(1)}))},{getOwnPropertySymbols:function(e){var t=cu.f;return t?t(lu(e)):[]}}),Sa("asyncIterator"),Sa("hasInstance"),Sa("isConcatSpreadable"),Sa("iterator"),Sa("match"),Sa("matchAll"),Sa("replace"),Sa("search"),Sa("species"),Sa("split");var fu=La;Sa("toPrimitive"),fu();var hu=se,du=Ba;Sa("toStringTag"),du(hu("Symbol"),"Symbol"),Sa("unscopables"),Ba(a.JSON,"JSON",!0);var pu,vu,yu,gu=re.Symbol,mu={},_u=O,bu=Ze,wu=Function.prototype,ku=_u&&Object.getOwnPropertyDescriptor,Su=bu(wu,"name"),xu={EXISTS:Su,PROPER:Su&&"something"===function(){}.name,CONFIGURABLE:Su&&(!_u||_u&&ku(wu,"name").configurable)},Eu=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Tu=Ze,Au=L,Lu=Qe,Cu=Eu,Ou=Ri("IE_PROTO"),Du=Object,Pu=Du.prototype,Ru=Cu?Du.getPrototypeOf:function(e){var t=Lu(e);if(Tu(t,Ou))return t[Ou];var r=t.constructor;return Au(r)&&t instanceof r?r.prototype:t instanceof Du?Pu:null},Mu=o,Uu=L,Iu=te,Bu=Wi,ju=Ru,Fu=fa,Nu=dt("iterator"),zu=!1;[].keys&&("next"in(yu=[].keys())?(vu=ju(ju(yu)))!==Object.prototype&&(pu=vu):zu=!0);var Vu=!Iu(pu)||Mu((function(){var e={};return pu[Nu].call(e)!==e}));Uu((pu=Vu?{}:Bu(pu))[Nu])||Fu(pu,Nu,(function(){return this}));var Gu={IteratorPrototype:pu,BUGGY_SAFARI_ITERATORS:zu},Hu=Gu.IteratorPrototype,qu=Wi,Ku=N,Wu=Ba,Yu=mu,Ju=function(){return this},Qu=function(e,t,r,n){var i=t+" Iterator";return e.prototype=qu(Hu,{next:Ku(+!n,r)}),Wu(e,i,!1,!0),Yu[i]=Ju,e},Xu=g,$u=Pe,Zu=L,ec=String,tc=TypeError,rc=function(e,t,r){try{return Xu($u(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}},nc=nr,ic=function(e){if("object"==typeof e||Zu(e))return e;throw tc("Can't set "+ec(e)+" as a prototype")},ac=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=rc(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(n){}return function(r,n){return nc(r),ic(n),t?e(r,n):r.__proto__=n,r}}():void 0),oc=Cr,sc=R,uc=xu,cc=Qu,lc=Ru,fc=Ba,hc=fa,dc=mu,pc=Gu,vc=uc.PROPER,yc=pc.BUGGY_SAFARI_ITERATORS,gc=dt("iterator"),mc="keys",_c="values",bc="entries",wc=function(){return this},kc=function(e,t,r,n,i,a,o){cc(r,t,n);var s,u,c,l=function(e){if(e===i&&v)return v;if(!yc&&e in d)return d[e];switch(e){case mc:case _c:case bc:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[gc]||d["@@iterator"]||i&&d[i],v=!yc&&p||l(i),y="Array"==t&&d.entries||p;if(y&&(s=lc(y.call(new e)))!==Object.prototype&&s.next&&(fc(s,f,!0,!0),dc[f]=wc),vc&&i==_c&&p&&p.name!==_c&&(h=!0,v=function(){return sc(p,this)}),i)if(u={values:l(_c),keys:a?v:l(mc),entries:l(bc)},o)for(c in u)(yc||h||!(c in d))&&hc(d,c,u[c]);else oc({target:t,proto:!0,forced:yc||h},u);return o&&d[gc]!==v&&hc(d,gc,v,{name:i}),dc[t]=v,u},Sc=function(e,t){return{value:e,done:t}},xc=$,Ec=mu,Tc=Za;$t.f;var Ac=kc,Lc=Sc,Cc="Array Iterator",Oc=Tc.set,Dc=Tc.getterFor(Cc);Ac(Array,"Array",(function(e,t){Oc(this,{type:Cc,target:xc(e),index:0,kind:t})}),(function(){var e=Dc(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,Lc(void 0,!0)):Lc("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),Ec.Arguments=Ec.Array;var Pc={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Rc=a,Mc=cn,Uc=gr,Ic=mu,Bc=dt("toStringTag");for(var jc in Pc){var Fc=Rc[jc],Nc=Fc&&Fc.prototype;Nc&&Mc(Nc)!==Bc&&Uc(Nc,Bc,jc),Ic[jc]=Ic.Array}var zc=gu;Sa("dispose");var Vc=zc;Sa("asyncDispose");var Gc=Cr,Hc=g,qc=se("Symbol"),Kc=qc.keyFor,Wc=Hc(qc.prototype.valueOf);Gc({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Kc(Wc(e))}catch(t){return!1}}});for(var Yc=Cr,Jc=We,Qc=se,Xc=g,$c=Te,Zc=dt,el=Qc("Symbol"),tl=el.isWellKnown,rl=Qc("Object","getOwnPropertyNames"),nl=Xc(el.prototype.valueOf),il=Jc("wks"),al=0,ol=rl(el),sl=ol.length;al<sl;al++)try{var ul=ol[al];$c(el[ul])&&Zc(ul)}catch(VB){}Yc({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(tl&&tl(e))return!0;try{for(var t=nl(e),r=0,n=rl(il),i=n.length;r<i;r++)if(il[n[r]]==t)return!0}catch(VB){}return!1}}),Sa("matcher"),Sa("metadataKey"),Sa("observable"),Sa("metadata"),Sa("patternMatch"),Sa("replaceAll");var cl=Vc,ll=r(cl),fl=g,hl=Vr,dl=ti,pl=J,vl=fl("".charAt),yl=fl("".charCodeAt),gl=fl("".slice),ml=function(e){return function(t,r){var n,i,a=dl(pl(t)),o=hl(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=yl(a,o))<55296||n>56319||o+1===s||(i=yl(a,o+1))<56320||i>57343?e?vl(a,o):n:e?gl(a,o,o+2):i-56320+(n-55296<<10)+65536}},_l={codeAt:ml(!1),charAt:ml(!0)},bl=_l.charAt,wl=ti,kl=Za,Sl=kc,xl=Sc,El="String Iterator",Tl=kl.set,Al=kl.getterFor(El);Sl(String,"String",(function(e){Tl(this,{type:El,string:wl(e),index:0})}),(function(){var e,t=Al(this),r=t.string,n=t.index;return n>=r.length?xl(void 0,!0):(e=bl(r,n),t.index+=e.length,xl(e,!1))}));var Ll=pa.f("iterator"),Cl=r(Ll);function Ol(e){return(Ol="function"==typeof ll&&"symbol"==typeof Cl?function(e){return typeof e}:function(e){return e&&"function"==typeof ll&&e.constructor===ll&&e!==ll.prototype?"symbol":typeof e})(e)}var Dl=pa.f("toPrimitive"),Pl=r(Dl);function Rl(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var r=e[Pl];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ol(t)?t:String(t)}function Ml(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ir(e,Rl(n.key),n)}}function Ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Il=Ze,Bl=R,jl=te,Fl=nr,Nl=function(e){return void 0!==e&&(Il(e,"value")||Il(e,"writable"))},zl=C,Vl=Ru;Cr({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,a=arguments.length<3?t:arguments[2];return Fl(t)===a?t[r]:(n=zl.f(t,r))?Nl(n)?n.value:void 0===n.get?void 0:Bl(n.get,a):jl(i=Vl(t))?e(i,r,a):void 0}});var Gl=re.Reflect.get,Hl=r(Gl),ql=g,Kl=Pe,Wl=te,Yl=Ze,Jl=Ps,Ql=s,Xl=Function,$l=ql([].concat),Zl=ql([].join),ef={},tf=Ql?Xl.bind:function(e){var t=Kl(this),r=t.prototype,n=Jl(arguments,1),i=function(){var r=$l(n,Jl(arguments));return this instanceof i?function(e,t,r){if(!Yl(ef,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";ef[t]=Xl("C,a","return new C("+Zl(n,",")+")")}return ef[t](e,r)}(t,r.length,r):t.apply(e,r)};return Wl(r)&&(i.prototype=r),i},rf=tf;Cr({target:"Function",proto:!0,forced:Function.bind!==rf},{bind:rf});var nf=re,af=function(e){return nf[e+"Prototype"]},of=af("Function").bind,sf=ue,uf=of,cf=Function.prototype,lf=function(e){var t=e.bind;return e===cf||sf(cf,e)&&t===cf.bind?uf:t},ff=r(lf),hf={exports:{}},df=Cr,pf=o,vf=$,yf=C.f,gf=O;df({target:"Object",stat:!0,forced:!gf||pf((function(){yf(1)})),sham:!gf},{getOwnPropertyDescriptor:function(e,t){return yf(vf(e),t)}});var mf=re.Object,_f=hf.exports=function(e,t){return mf.getOwnPropertyDescriptor(e,t)};mf.getOwnPropertyDescriptor.sham&&(_f.sham=!0);var bf=hf.exports,wf=r(bf);Cr({target:"Object",stat:!0},{setPrototypeOf:ac});var kf=re.Object.setPrototypeOf,Sf=r(kf),xf=Qe,Ef=Ru,Tf=Eu;Cr({target:"Object",stat:!0,forced:o((function(){Ef(1)})),sham:!Tf},{getPrototypeOf:function(e){return Ef(xf(e))}});var Af=re.Object.getPrototypeOf,Lf=r(Af);function Cf(e){var t;return(Cf=Sf?ff(t=Lf).call(t):function(e){return e.__proto__||Lf(e)})(e)}function Of(){var e;"undefined"!=typeof Reflect&&Hl?Of=ff(e=Hl).call(e):Of=function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Cf(e)););return e}(e,t);if(n){var i=wf(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return Of.apply(this,arguments)}Cr({target:"Object",stat:!0,sham:!O},{create:Wi});var Df=re.Object,Pf=function(e,t){return Df.create(e,t)},Rf=r(Pf);function Mf(e,t){var r;return(Mf=Sf?ff(r=Sf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}var Uf=An,If=Le,Bf=TypeError,jf=function(e){if(Uf(e))return e;throw Bf(If(e)+" is not a constructor")},Ff=Cr,Nf=h,zf=tf,Vf=jf,Gf=nr,Hf=te,qf=Wi,Kf=o,Wf=se("Reflect","construct"),Yf=Object.prototype,Jf=[].push,Qf=Kf((function(){function e(){}return!(Wf((function(){}),[],e)instanceof e)})),Xf=!Kf((function(){Wf((function(){}))})),$f=Qf||Xf;Ff({target:"Reflect",stat:!0,forced:$f,sham:$f},{construct:function(e,t){Vf(e),Gf(t);var r=arguments.length<3?e:Vf(arguments[2]);if(Xf&&!Qf)return Wf(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return Nf(Jf,n,t),new(Nf(zf,e,n))}var i=r.prototype,a=qf(Hf(i)?i:Yf),o=Nf(e,a,t);return Hf(o)?o:a}});var Zf=re.Reflect.construct,eh=r(Zf);function th(e){var t=function(){if("undefined"==typeof Reflect||!eh)return!1;if(eh.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(eh(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cf(e);if(t){var i=Cf(this).constructor;r=eh(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ul(e)}(this,r)}}var rh=af("Array").concat,nh=ue,ih=rh,ah=Array.prototype,oh=r((function(e){var t=e.concat;return e===ah||nh(ah,e)&&t===ah.concat?ih:t})),sh=Qe,uh=ki;Cr({target:"Object",stat:!0,forced:o((function(){uh(1)}))},{keys:function(e){return uh(sh(e))}});var ch=r(re.Object.keys),lh=r(re.Object.getOwnPropertySymbols),fh=so.filter;Cr({target:"Array",proto:!0,forced:!jn("filter")},{filter:function(e){return fh(this,e,arguments.length>1?arguments[1]:void 0)}});var hh=af("Array").filter,dh=ue,ph=hh,vh=Array.prototype,yh=r((function(e){var t=e.filter;return e===vh||dh(vh,e)&&t===vh.filter?ph:t})),gh=r(bf),mh=o,_h=function(e,t){var r=[][e];return!!r&&mh((function(){r.call(null,t||function(){return 1},1)}))},bh=so.forEach,wh=_h("forEach")?[].forEach:function(e){return bh(this,e,arguments.length>1?arguments[1]:void 0)};Cr({target:"Array",proto:!0,forced:[].forEach!=wh},{forEach:wh});var kh=af("Array").forEach,Sh=cn,xh=Ze,Eh=ue,Th=kh,Ah=Array.prototype,Lh={DOMTokenList:!0,NodeList:!0},Ch=r((function(e){var t=e.forEach;return e===Ah||Eh(Ah,e)&&t===Ah.forEach||xh(Lh,Sh(e))?Th:t})),Oh=se,Dh=Yi,Ph=ca,Rh=nr,Mh=g([].concat),Uh=Oh("Reflect","ownKeys")||function(e){var t=Dh.f(Rh(e)),r=Ph.f;return r?Mh(t,r(e)):t},Ih=Uh,Bh=$,jh=C,Fh=Zr;Cr({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,r,n=Bh(e),i=jh.f,a=Ih(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&Fh(o,t,r);return o}});var Nh=r(re.Object.getOwnPropertyDescriptors),zh={exports:{}},Vh=Cr,Gh=O,Hh=ri.f;Vh({target:"Object",stat:!0,forced:Object.defineProperties!==Hh,sham:!Gh},{defineProperties:Hh});var qh=re.Object,Kh=zh.exports=function(e,t){return qh.defineProperties(e,t)};qh.defineProperties.sham&&(Kh.sham=!0);var Wh=r(zh.exports),Yh=r(Ur),Jh=r(cl),Qh=r(Pf),Xh=r(Af),$h=r(kf),Zh=Ze,ed=Uh,td=C,rd=$t,nd=te,id=gr,ad=Error,od=g("".replace),sd=String(ad("zxcasd").stack),ud=/\n\s*at [^:]*:[^\n]*/,cd=ud.test(sd),ld=N,fd=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",ld(1,7)),7!==e.stack)})),hd=gr,dd=function(e,t){if(cd&&"string"==typeof e&&!ad.prepareStackTrace)for(;t--;)e=od(e,ud,"");return e},pd=fd,vd=Error.captureStackTrace,yd=mu,gd=dt("iterator"),md=Array.prototype,_d=function(e){return void 0!==e&&(yd.Array===e||md[gd]===e)},bd=cn,wd=Ue,kd=K,Sd=mu,xd=dt("iterator"),Ed=function(e){if(!kd(e))return wd(e,xd)||wd(e,"@@iterator")||Sd[bd(e)]},Td=R,Ad=Pe,Ld=nr,Cd=Le,Od=Ed,Dd=TypeError,Pd=function(e,t){var r=arguments.length<2?Od(e):t;if(Ad(r))return Ld(Td(r,e));throw Dd(Cd(e)+" is not iterable")},Rd=R,Md=nr,Ud=Ue,Id=function(e,t,r){var n,i;Md(e);try{if(!(n=Ud(e,"return"))){if("throw"===t)throw r;return r}n=Rd(n,e)}catch(VB){i=!0,n=VB}if("throw"===t)throw r;if(i)throw n;return Md(n),r},Bd=Xt,jd=R,Fd=nr,Nd=Le,zd=_d,Vd=Wr,Gd=ue,Hd=Pd,qd=Ed,Kd=Id,Wd=TypeError,Yd=function(e,t){this.stopped=e,this.result=t},Jd=Yd.prototype,Qd=function(e,t,r){var n,i,a,o,s,u,c,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),v=Bd(t,l),y=function(e){return n&&Kd(n,"normal",e),new Yd(!0,e)},g=function(e){return f?(Fd(e),p?v(e[0],e[1],y):v(e[0],e[1])):p?v(e,y):v(e)};if(h)n=e.iterator;else if(d)n=e;else{if(!(i=qd(e)))throw Wd(Nd(e)+" is not iterable");if(zd(i)){for(a=0,o=Vd(e);o>a;a++)if((s=g(e[a]))&&Gd(Jd,s))return s;return new Yd(!1)}n=Hd(e,i)}for(u=h?e.next:n.next;!(c=jd(u,n)).done;){try{s=g(c.value)}catch(VB){Kd(n,"throw",VB)}if("object"==typeof s&&s&&Gd(Jd,s))return s}return new Yd(!1)},Xd=ti,$d=Cr,Zd=ue,ep=Ru,tp=ac,rp=function(e,t,r){for(var n=ed(t),i=rd.f,a=td.f,o=0;o<n.length;o++){var s=n[o];Zh(e,s)||r&&Zh(r,s)||i(e,s,a(t,s))}},np=Wi,ip=gr,ap=N,op=function(e,t){nd(t)&&"cause"in t&&id(e,"cause",t.cause)},sp=function(e,t,r,n){pd&&(vd?vd(e,t):hd(e,"stack",dd(r,n)))},up=Qd,cp=function(e,t){return void 0===e?arguments.length<2?"":t:Xd(e)},lp=dt("toStringTag"),fp=Error,hp=[].push,dp=function(e,t){var r,n=Zd(pp,this);tp?r=tp(fp(),n?ep(this):pp):(r=n?this:np(pp),ip(r,lp,"Error")),void 0!==t&&ip(r,"message",cp(t)),sp(r,dp,r.stack,1),arguments.length>2&&op(r,arguments[2]);var i=[];return up(e,hp,{that:i}),ip(r,"errors",i),r};tp?tp(dp,fp):rp(dp,fp,{name:!0});var pp=dp.prototype=np(fp.prototype,{constructor:ap(1,dp),message:ap(1,""),name:ap(1,"AggregateError")});$d({global:!0,constructor:!0,arity:2},{AggregateError:dp});var vp,yp,gp,mp,_p="undefined"!=typeof process&&"process"==w(process),bp=se,wp=da,kp=O,Sp=dt("species"),xp=function(e){var t=bp(e);kp&&t&&!t[Sp]&&wp(t,Sp,{configurable:!0,get:function(){return this}})},Ep=ue,Tp=TypeError,Ap=function(e,t){if(Ep(t,e))return e;throw Tp("Incorrect invocation")},Lp=nr,Cp=jf,Op=K,Dp=dt("species"),Pp=function(e,t){var r,n=Lp(e).constructor;return void 0===n||Op(r=Lp(n)[Dp])?t:Cp(r)},Rp=TypeError,Mp=function(e,t){if(e<t)throw Rp("Not enough arguments");return e},Up=/(?:ipad|iphone|ipod).*applewebkit/i.test(ce),Ip=a,Bp=h,jp=Xt,Fp=L,Np=Ze,zp=o,Vp=Oi,Gp=Ps,Hp=At,qp=Mp,Kp=Up,Wp=_p,Yp=Ip.setImmediate,Jp=Ip.clearImmediate,Qp=Ip.process,Xp=Ip.Dispatch,$p=Ip.Function,Zp=Ip.MessageChannel,ev=Ip.String,tv=0,rv={},nv="onreadystatechange";zp((function(){vp=Ip.location}));var iv=function(e){if(Np(rv,e)){var t=rv[e];delete rv[e],t()}},av=function(e){return function(){iv(e)}},ov=function(e){iv(e.data)},sv=function(e){Ip.postMessage(ev(e),vp.protocol+"//"+vp.host)};Yp&&Jp||(Yp=function(e){qp(arguments.length,1);var t=Fp(e)?e:$p(e),r=Gp(arguments,1);return rv[++tv]=function(){Bp(t,void 0,r)},yp(tv),tv},Jp=function(e){delete rv[e]},Wp?yp=function(e){Qp.nextTick(av(e))}:Xp&&Xp.now?yp=function(e){Xp.now(av(e))}:Zp&&!Kp?(mp=(gp=new Zp).port2,gp.port1.onmessage=ov,yp=jp(mp.postMessage,mp)):Ip.addEventListener&&Fp(Ip.postMessage)&&!Ip.importScripts&&vp&&"file:"!==vp.protocol&&!zp(sv)?(yp=sv,Ip.addEventListener("message",ov,!1)):yp=nv in Hp("script")?function(e){Vp.appendChild(Hp("script"))[nv]=function(){Vp.removeChild(this),iv(e)}}:function(e){setTimeout(av(e),0)});var uv={set:Yp,clear:Jp},cv=function(){this.head=null,this.tail=null};cv.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var lv,fv,hv,dv,pv,vv=cv,yv=/ipad|iphone|ipod/i.test(ce)&&"undefined"!=typeof Pebble,gv=/web0s(?!.*chrome)/i.test(ce),mv=a,_v=Xt,bv=C.f,wv=uv.set,kv=vv,Sv=Up,xv=yv,Ev=gv,Tv=_p,Av=mv.MutationObserver||mv.WebKitMutationObserver,Lv=mv.document,Cv=mv.process,Ov=mv.Promise,Dv=bv(mv,"queueMicrotask"),Pv=Dv&&Dv.value;if(!Pv){var Rv=new kv,Mv=function(){var e,t;for(Tv&&(e=Cv.domain)&&e.exit();t=Rv.get();)try{t()}catch(VB){throw Rv.head&&lv(),VB}e&&e.enter()};Sv||Tv||Ev||!Av||!Lv?!xv&&Ov&&Ov.resolve?((dv=Ov.resolve(void 0)).constructor=Ov,pv=_v(dv.then,dv),lv=function(){pv(Mv)}):Tv?lv=function(){Cv.nextTick(Mv)}:(wv=_v(wv,mv),lv=function(){wv(Mv)}):(fv=!0,hv=Lv.createTextNode(""),new Av(Mv).observe(hv,{characterData:!0}),lv=function(){hv.data=fv=!fv}),Pv=function(e){Rv.head||lv(),Rv.add(e)}}var Uv=Pv,Iv=function(e){try{return{error:!1,value:e()}}catch(VB){return{error:!0,value:VB}}},Bv=a.Promise,jv="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Fv=!jv&&!_p&&"object"==typeof window&&"object"==typeof document,Nv=a,zv=Bv,Vv=L,Gv=Wt,Hv=dn,qv=dt,Kv=Fv,Wv=jv,Yv=ye,Jv=zv&&zv.prototype,Qv=qv("species"),Xv=!1,$v=Vv(Nv.PromiseRejectionEvent),Zv={CONSTRUCTOR:Gv("Promise",(function(){var e=Hv(zv),t=e!==String(zv);if(!t&&66===Yv)return!0;if(!Jv.catch||!Jv.finally)return!0;if(!Yv||Yv<51||!/native code/.test(e)){var r=new zv((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Qv]=n,!(Xv=r.then((function(){}))instanceof n))return!0}return!t&&(Kv||Wv)&&!$v})),REJECTION_EVENT:$v,SUBCLASSING:Xv},ey={},ty=Pe,ry=TypeError,ny=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw ry("Bad Promise constructor");t=e,r=n})),this.resolve=ty(t),this.reject=ty(r)};ey.f=function(e){return new ny(e)};var iy,ay,oy=Cr,sy=_p,uy=a,cy=R,ly=fa,fy=Ba,hy=xp,dy=Pe,py=L,vy=te,yy=Ap,gy=Pp,my=uv.set,_y=Uv,by=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(VB){}},wy=Iv,ky=vv,Sy=Za,xy=Bv,Ey=Zv,Ty=ey,Ay="Promise",Ly=Ey.CONSTRUCTOR,Cy=Ey.REJECTION_EVENT,Oy=Sy.getterFor(Ay),Dy=Sy.set,Py=xy&&xy.prototype,Ry=xy,My=Py,Uy=uy.TypeError,Iy=uy.document,By=uy.process,jy=Ty.f,Fy=jy,Ny=!!(Iy&&Iy.createEvent&&uy.dispatchEvent),zy="unhandledrejection",Vy=function(e){var t;return!(!vy(e)||!py(t=e.then))&&t},Gy=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2===t.rejection&&Yy(t),t.rejection=1),!0===s?r=a:(l&&l.enter(),r=s(a),l&&(l.exit(),i=!0)),r===e.promise?c(Uy("Promise-chain cycle")):(n=Vy(r))?cy(n,r,u,c):u(r)):c(a)}catch(VB){l&&!i&&l.exit(),c(VB)}},Hy=function(e,t){e.notified||(e.notified=!0,_y((function(){for(var r,n=e.reactions;r=n.get();)Gy(r,e);e.notified=!1,t&&!e.rejection&&Ky(e)})))},qy=function(e,t,r){var n,i;Ny?((n=Iy.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),uy.dispatchEvent(n)):n={promise:t,reason:r},!Cy&&(i=uy["on"+e])?i(n):e===zy&&by("Unhandled promise rejection",r)},Ky=function(e){cy(my,uy,(function(){var t,r=e.facade,n=e.value;if(Wy(e)&&(t=wy((function(){sy?By.emit("unhandledRejection",n,r):qy(zy,r,n)})),e.rejection=sy||Wy(e)?2:1,t.error))throw t.value}))},Wy=function(e){return 1!==e.rejection&&!e.parent},Yy=function(e){cy(my,uy,(function(){var t=e.facade;sy?By.emit("rejectionHandled",t):qy("rejectionhandled",t,e.value)}))},Jy=function(e,t,r){return function(n){e(t,n,r)}},Qy=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Hy(e,!0))},Xy=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Uy("Promise can't be resolved itself");var n=Vy(t);n?_y((function(){var r={done:!1};try{cy(n,t,Jy(Xy,r,e),Jy(Qy,r,e))}catch(VB){Qy(r,VB,e)}})):(e.value=t,e.state=1,Hy(e,!1))}catch(VB){Qy({done:!1},VB,e)}}};Ly&&(My=(Ry=function(e){yy(this,My),dy(e),cy(iy,this);var t=Oy(this);try{e(Jy(Xy,t),Jy(Qy,t))}catch(VB){Qy(t,VB)}}).prototype,(iy=function(e){Dy(this,{type:Ay,done:!1,notified:!1,parent:!1,reactions:new ky,rejection:!1,state:0,value:void 0})}).prototype=ly(My,"then",(function(e,t){var r=Oy(this),n=jy(gy(this,Ry));return r.parent=!0,n.ok=!py(e)||e,n.fail=py(t)&&t,n.domain=sy?By.domain:void 0,0==r.state?r.reactions.add(n):_y((function(){Gy(n,r)})),n.promise})),ay=function(){var e=new iy,t=Oy(e);this.promise=e,this.resolve=Jy(Xy,t),this.reject=Jy(Qy,t)},Ty.f=jy=function(e){return e===Ry||undefined===e?new ay(e):Fy(e)}),oy({global:!0,constructor:!0,wrap:!0,forced:Ly},{Promise:Ry}),fy(Ry,Ay,!1,!0),hy(Ay);var $y=dt("iterator"),Zy=!1;try{var eg=0,tg={next:function(){return{done:!!eg++}},return:function(){Zy=!0}};tg[$y]=function(){return this},Array.from(tg,(function(){throw 2}))}catch(VB){}var rg=function(e,t){if(!t&&!Zy)return!1;var r=!1;try{var n={};n[$y]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(VB){}return r},ng=Bv,ig=Zv.CONSTRUCTOR||!rg((function(e){ng.all(e).then(void 0,(function(){}))})),ag=R,og=Pe,sg=ey,ug=Iv,cg=Qd;Cr({target:"Promise",stat:!0,forced:ig},{all:function(e){var t=this,r=sg.f(t),n=r.resolve,i=r.reject,a=ug((function(){var r=og(t.resolve),a=[],o=0,s=1;cg(e,(function(e){var u=o++,c=!1;s++,ag(r,t,e).then((function(e){c||(c=!0,a[u]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var lg=Cr,fg=Zv.CONSTRUCTOR;Bv&&Bv.prototype,lg({target:"Promise",proto:!0,forced:fg,real:!0},{catch:function(e){return this.then(void 0,e)}});var hg=R,dg=Pe,pg=ey,vg=Iv,yg=Qd;Cr({target:"Promise",stat:!0,forced:ig},{race:function(e){var t=this,r=pg.f(t),n=r.reject,i=vg((function(){var i=dg(t.resolve);yg(e,(function(e){hg(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var gg=R,mg=ey;Cr({target:"Promise",stat:!0,forced:Zv.CONSTRUCTOR},{reject:function(e){var t=mg.f(this);return gg(t.reject,void 0,e),t.promise}});var _g=nr,bg=te,wg=ey,kg=function(e,t){if(_g(e),bg(t)&&t.constructor===e)return t;var r=wg.f(e);return(0,r.resolve)(t),r.promise},Sg=Cr,xg=Bv,Eg=Zv.CONSTRUCTOR,Tg=kg,Ag=se("Promise"),Lg=!Eg;Sg({target:"Promise",stat:!0,forced:true},{resolve:function(e){return Tg(Lg&&this===Ag?xg:this,e)}});var Cg=R,Og=Pe,Dg=ey,Pg=Iv,Rg=Qd;Cr({target:"Promise",stat:!0,forced:ig},{allSettled:function(e){var t=this,r=Dg.f(t),n=r.resolve,i=r.reject,a=Pg((function(){var r=Og(t.resolve),i=[],a=0,o=1;Rg(e,(function(e){var s=a++,u=!1;o++,Cg(r,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--o||n(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--o||n(i))}))})),--o||n(i)}));return a.error&&i(a.value),r.promise}});var Mg=R,Ug=Pe,Ig=se,Bg=ey,jg=Iv,Fg=Qd,Ng="No one promise resolved";Cr({target:"Promise",stat:!0,forced:ig},{any:function(e){var t=this,r=Ig("AggregateError"),n=Bg.f(t),i=n.resolve,a=n.reject,o=jg((function(){var n=Ug(t.resolve),o=[],s=0,u=1,c=!1;Fg(e,(function(e){var l=s++,f=!1;u++,Mg(n,t,e).then((function(e){f||c||(c=!0,i(e))}),(function(e){f||c||(f=!0,o[l]=e,--u||a(new r(o,Ng)))}))})),--u||a(new r(o,Ng))}));return o.error&&a(o.value),n.promise}});var zg=Cr,Vg=Bv,Gg=o,Hg=se,qg=L,Kg=Pp,Wg=kg,Yg=Vg&&Vg.prototype;zg({target:"Promise",proto:!0,real:!0,forced:!!Vg&&Gg((function(){Yg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Kg(this,Hg("Promise")),r=qg(e);return this.then(r?function(r){return Wg(t,e()).then((function(){return r}))}:e,r?function(r){return Wg(t,e()).then((function(){throw r}))}:e)}});var Jg=re.Promise,Qg=ey,Xg=Iv;Cr({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Qg.f(this),r=Xg(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var $g=r(Jg),Zg=Cr,em=jr,tm=g([].reverse),rm=[1,2];Zg({target:"Array",proto:!0,forced:String(rm)===String(rm.reverse())},{reverse:function(){return em(this)&&(this.length=this.length),tm(this)}});var nm=af("Array").reverse,im=ue,am=nm,om=Array.prototype,sm=r((function(e){var t=e.reverse;return e===om||im(om,e)&&t===om.reverse?am:t})),um=Cr,cm=jr,lm=An,fm=te,hm=oi,dm=Wr,pm=$,vm=Zr,ym=dt,gm=Ps,mm=jn("slice"),_m=ym("species"),bm=Array,wm=Math.max;um({target:"Array",proto:!0,forced:!mm},{slice:function(e,t){var r,n,i,a=pm(this),o=dm(a),s=hm(e,o),u=hm(void 0===t?o:t,o);if(cm(a)&&(r=a.constructor,(lm(r)&&(r===bm||cm(r.prototype))||fm(r)&&null===(r=r[_m]))&&(r=void 0),r===bm||void 0===r))return gm(a,s,u);for(n=new(void 0===r?bm:r)(wm(u-s,0)),i=0;s<u;s++,i++)s in a&&vm(n,i,a[s]);return n.length=i,n}});var km=af("Array").slice,Sm=ue,xm=km,Em=Array.prototype,Tm=r((function(e){var t=e.slice;return e===Em||Sm(Em,e)&&t===Em.slice?xm:t})),Am=r(Ll),Lm=r(lf),Cm=r(Zf),Om=r(Dl);function Dm(e,t){var r=ch(e);if(lh){var n=lh(e);t&&(n=yh(n).call(n,(function(t){return gh(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pm(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?Ch(r=Dm(Object(i),!0)).call(r,(function(t){Nm(e,t,i[t])})):Nh?Wh(e,Nh(i)):Ch(n=Dm(Object(i))).call(n,(function(t){Yh(e,t,gh(i,t))}))}return e}function Rm(){Rm=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Yh||function(e,t,r){e[t]=r.value},i="function"==typeof Jh?Jh:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(A){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var a=t&&t.prototype instanceof h?t:h,o=Qh(a.prototype),s=new x(i||[]);return n(o,"_invoke",{value:b(e,r,s)}),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function h(){}function d(){}function p(){}var v={};u(v,a,(function(){return this}));var y=Xh&&Xh(Xh(E([])));y&&y!==t&&r.call(y,a)&&(v=y);var g=p.prototype=h.prototype=Qh(v);function m(e){var t;Ch(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,a,o,s){var u=l(e[n],e,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Ol(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,o,s)}),(function(e){i("throw",e,o,s)})):t.resolve(f).then((function(e){c.value=e,o(c)}),(function(e){return i("throw",e,o,s)}))}s(u.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return{value:void 0,done:!0}}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=w(o,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=l(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],Ch(e).call(e,k,this),this.reset(!0)}function E(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,n(g,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=u(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return $h?$h(e,p):(e.__proto__=p,u(e,s,"GeneratorFunction")),e.prototype=Qh(g),e},e.awrap=function(e){return{__await:e}},m(_.prototype),u(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,a){void 0===a&&(a=$g);var o=new _(c(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},m(g),u(g,s,"Generator"),u(g,a,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return sm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=E,x.prototype={constructor:x,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,Ch(t=this.tryEntries).call(t,S),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+Tm(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Mm(e){return(Mm="function"==typeof Jh&&"symbol"==typeof Am?function(e){return typeof e}:function(e){return e&&"function"==typeof Jh&&e.constructor===Jh&&e!==Jh.prototype?"symbol":typeof e})(e)}function Um(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(VB){return void r(VB)}s.done?t(u):$g.resolve(u).then(n,i)}function Im(e){return function(){var t=this,r=arguments;return new $g((function(n,i){var a=e.apply(t,r);function o(e){Um(a,n,i,o,s,"next",e)}function s(e){Um(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Bm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Yh(e,Km(n.key),n)}}function Fm(e,t,r){return t&&jm(e.prototype,t),r&&jm(e,r),Yh(e,"prototype",{writable:!1}),e}function Nm(e,t,r){return(t=Km(t))in e?Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zm(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Qh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Yh(e,"prototype",{writable:!1}),t&&Gm(e,t)}function Vm(e){var t;return(Vm=$h?Lm(t=Xh).call(t):function(e){return e.__proto__||Xh(e)})(e)}function Gm(e,t){var r;return(Gm=$h?Lm(r=$h).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function Hm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qm(e){var t=function(){if("undefined"==typeof Reflect||!Cm)return!1;if(Cm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Cm(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vm(e);if(t){var i=Vm(this).constructor;r=Cm(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Hm(e)}(this,r)}}function Km(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var r=e[Om];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ol(t)?t:String(t)}var Wm=Cr,Ym=fi.indexOf,Jm=_h,Qm=x([].indexOf),Xm=!!Qm&&1/Qm([1],1,-0)<0;Wm({target:"Array",proto:!0,forced:Xm||!Jm("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Xm?Qm(this,e,t)||0:Ym(this,e,t)}});var $m=af("Array").indexOf,Zm=ue,e_=$m,t_=Array.prototype,r_=r((function(e){var t=e.indexOf;return e===t_||Zm(t_,e)&&t===t_.indexOf?e_:t})),n_=Cr,i_=so.find,a_="find",o_=!0;a_ in[]&&Array(1)[a_]((function(){o_=!1})),n_({target:"Array",proto:!0,forced:o_},{find:function(e){return i_(this,e,arguments.length>1?arguments[1]:void 0)}});var s_=af("Array").find,u_=ue,c_=s_,l_=Array.prototype,f_=r((function(e){var t=e.find;return e===l_||u_(l_,e)&&t===l_.find?c_:t})),h_=O,d_=jr,p_=TypeError,v_=Object.getOwnPropertyDescriptor,y_=h_&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(VB){return VB instanceof TypeError}}(),g_=Le,m_=TypeError,__=function(e,t){if(!delete e[t])throw m_("Cannot delete property "+g_(t)+" of "+g_(e))},b_=Cr,w_=Qe,k_=oi,S_=Vr,x_=Wr,E_=y_?function(e,t){if(d_(e)&&!v_(e,"length").writable)throw p_("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},T_=Jr,A_=Mn,L_=Zr,C_=__,O_=jn("splice"),D_=Math.max,P_=Math.min;b_({target:"Array",proto:!0,forced:!O_},{splice:function(e,t){var r,n,i,a,o,s,u=w_(this),c=x_(u),l=k_(e,c),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=c-l):(r=f-2,n=P_(D_(S_(t),0),c-l)),T_(c+r-n),i=A_(u,n),a=0;a<n;a++)(o=l+a)in u&&L_(i,a,u[o]);if(i.length=n,r<n){for(a=l;a<c-n;a++)s=a+r,(o=a+n)in u?u[s]=u[o]:C_(u,s);for(a=c;a>c-n+r;a--)C_(u,a-1)}else if(r>n)for(a=c-n;a>l;a--)s=a+r-1,(o=a+n-1)in u?u[s]=u[o]:C_(u,s);for(a=0;a<r;a++)u[a+l]=arguments[a+2];return E_(u,c-n+r),i}});var R_=af("Array").splice,M_=ue,U_=R_,I_=Array.prototype,B_=r((function(e){var t=e.splice;return e===I_||M_(I_,e)&&t===I_.splice?U_:t}));Cr({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var j_=r(re.Number.isNaN),F_="\t\n\v\f\r \u2028\u2029\ufeff",N_=J,z_=ti,V_=F_,G_=g("".replace),H_=RegExp("^["+V_+"]+"),q_=RegExp("(^|[^"+V_+"])["+V_+"]+$"),K_=function(e){return function(t){var r=z_(N_(t));return 1&e&&(r=G_(r,H_,"")),2&e&&(r=G_(r,q_,"$1")),r}},W_={start:K_(1),end:K_(2),trim:K_(3)},Y_=a,J_=o,Q_=g,X_=ti,$_=W_.trim,Z_=F_,eb=Y_.parseInt,tb=Y_.Symbol,rb=tb&&tb.iterator,nb=/^[+-]?0x/i,ib=Q_(nb.exec),ab=8!==eb(Z_+"08")||22!==eb(Z_+"0x16")||rb&&!J_((function(){eb(Object(rb))}))?function(e,t){var r=$_(X_(e));return eb(r,t>>>0||(ib(nb,r)?16:10))}:eb;Cr({global:!0,forced:parseInt!=ab},{parseInt:ab});var ob=r(re.parseInt),sb=so.map;Cr({target:"Array",proto:!0,forced:!jn("map")},{map:function(e){return sb(this,e,arguments.length>1?arguments[1]:void 0)}});var ub=af("Array").map,cb=ue,lb=ub,fb=Array.prototype,hb=r((function(e){var t=e.map;return e===fb||cb(fb,e)&&t===fb.map?lb:t}));Cr({target:"Array",stat:!0},{isArray:jr});var db=r(re.Array.isArray),pb=O,vb=g,yb=R,gb=o,mb=ki,_b=ca,bb=M,wb=Qe,kb=q,Sb=Object.assign,xb=Object.defineProperty,Eb=vb([].concat),Tb=!Sb||gb((function(){if(pb&&1!==Sb({b:1},Sb(xb({},"a",{enumerable:!0,get:function(){xb(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=Sb({},e)[r]||mb(Sb({},t)).join("")!=n}))?function(e,t){for(var r=wb(e),n=arguments.length,i=1,a=_b.f,o=bb.f;n>i;)for(var s,u=kb(arguments[i++]),c=a?Eb(mb(u),a(u)):mb(u),l=c.length,f=0;l>f;)s=c[f++],pb&&!yb(o,u,s)||(r[s]=u[s]);return r}:Sb,Ab=Tb;Cr({target:"Object",stat:!0,arity:2,forced:Object.assign!==Ab},{assign:Ab});var Lb=r(re.Object.assign),Cb=r(Gl),Ob=r(Ed),Db=nr,Pb=Id,Rb=Xt,Mb=R,Ub=Qe,Ib=function(e,t,r,n){try{return n?t(Db(r)[0],r[1]):t(r)}catch(VB){Pb(e,"throw",VB)}},Bb=_d,jb=An,Fb=Wr,Nb=Zr,zb=Pd,Vb=Ed,Gb=Array,Hb=function(e){var t=Ub(e),r=jb(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Rb(i,n>2?arguments[2]:void 0));var o,s,u,c,l,f,h=Vb(t),d=0;if(!h||this===Gb&&Bb(h))for(o=Fb(t),s=r?new this(o):Gb(o);o>d;d++)f=a?i(t[d],d):t[d],Nb(s,d,f);else for(l=(c=zb(t,h)).next,s=r?new this:[];!(u=Mb(l,c)).done;d++)f=a?Ib(c,i,[u.value,d],!0):u.value,Nb(s,d,f);return s.length=d,s},qb=Hb;Cr({target:"Array",stat:!0,forced:!rg((function(e){Array.from(e)}))},{from:qb});var Kb=r(re.Array.from);function Wb(e,t){var r=ch(e);if(lh){var n=lh(e);t&&(n=yh(n).call(n,(function(t){return gh(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yb(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?Ch(r=Wb(Object(i),!0)).call(r,(function(t){Zb(e,t,i[t])})):Nh?Wh(e,Nh(i)):Ch(n=Wb(Object(i))).call(n,(function(t){Yh(e,t,gh(i,t))}))}return e}function Jb(e){return(Jb="function"==typeof Jh&&"symbol"==typeof Am?function(e){return typeof e}:function(e){return e&&"function"==typeof Jh&&e.constructor===Jh&&e!==Jh.prototype?"symbol":typeof e})(e)}function Qb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Yh(e,rw(n.key),n)}}function $b(e,t,r){return t&&Xb(e.prototype,t),r&&Xb(e,r),Yh(e,"prototype",{writable:!1}),e}function Zb(e,t,r){return(t=rw(t))in e?Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ew(e){return function(e){if(db(e))return tw(e)}(e)||function(e){if(void 0!==Jh&&null!=Ob(e)||null!=e["@@iterator"])return Kb(e)}(e)||function(e,t){var r;if(!e)return;if("string"==typeof e)return tw(e,t);var n=Tm(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Kb(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tw(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rw(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var r=e[Om];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ol(t)?t:String(t)}var nw={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,a||e,o),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Qh&&(n.prototype=Qh(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?Tm(n).call(n,1):n);return lh?oh(i).call(i,lh(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=new Array(a);i<a;i++)o[i]=n[i].fn;return o},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,a),!0;case 6:return l.fn.call(l.context,t,n,i,a,o),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,n);break;case 4:l[c].fn.call(l[c].context,t,n,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||o(this,a);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||i&&!s[u].once||n&&s[u].context!==n)&&c.push(s[u]);c.length?this._events[a]=1===c.length?c[0]:c:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&o(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(nw);var iw=r(nw.exports),aw=so.some;Cr({target:"Array",proto:!0,forced:!_h("some")},{some:function(e){return aw(this,e,arguments.length>1?arguments[1]:void 0)}});var ow=af("Array").some,sw=ue,uw=ow,cw=Array.prototype,lw=r((function(e){var t=e.some;return e===cw||sw(cw,e)&&t===cw.some?uw:t})),fw=Vr,hw=ti,dw=J,pw=RangeError,vw=g,yw=qr,gw=ti,mw=J,_w=vw((function(e){var t=hw(dw(this)),r="",n=fw(e);if(n<0||n==1/0)throw pw("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r})),bw=vw("".slice),ww=Math.ceil,kw=function(e){return function(t,r,n){var i,a,o=gw(mw(t)),s=yw(r),u=o.length,c=void 0===n?" ":gw(n);return s<=u||""==c?o:((a=_w(c,ww((i=s-u)/c.length))).length>i&&(a=bw(a,0,i)),e?o+a:a+o)}},Sw={start:kw(!1),end:kw(!0)},xw=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ce),Ew=Sw.start;Cr({target:"String",proto:!0,forced:xw},{padStart:function(e){return Ew(this,e,arguments.length>1?arguments[1]:void 0)}});var Tw,Aw=af("String").padStart,Lw=ue,Cw=Aw,Ow=String.prototype,Dw=r((function(e){var t=e.padStart;return"string"==typeof e||e===Ow||Lw(Ow,e)&&t===Ow.padStart?Cw:t})),Pw="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Rw=a,Mw=h,Uw=L,Iw=Pw,Bw=ce,jw=Ps,Fw=Mp,Nw=Rw.Function,zw=/MSIE .\./.test(Bw)||Iw&&((Tw=Rw.Bun.version.split(".")).length<3||0==Tw[0]&&(Tw[1]<3||3==Tw[1]&&0==Tw[2])),Vw=function(e,t){var r=t?2:1;return zw?function(n,i){var a=Fw(arguments.length,1)>r,o=Uw(n)?n:Nw(n),s=a?jw(arguments,r):[],u=a?function(){Mw(o,this,s)}:o;return t?e(u,i):e(u)}:e},Gw=Cr,Hw=a,qw=Vw(Hw.setInterval,!0);Gw({global:!0,bind:!0,forced:Hw.setInterval!==qw},{setInterval:qw});var Kw=Cr,Ww=a,Yw=Vw(Ww.setTimeout,!0);Kw({global:!0,bind:!0,forced:Ww.setTimeout!==Yw},{setTimeout:Yw});var Jw=r(re.setInterval),Qw=r(re.setTimeout),Xw=so.every;Cr({target:"Array",proto:!0,forced:!_h("every")},{every:function(e){return Xw(this,e,arguments.length>1?arguments[1]:void 0)}});var $w=af("Array").every,Zw=ue,ek=$w,tk=Array.prototype,rk=r((function(e){var t=e.every;return e===tk||Zw(tk,e)&&t===tk.every?ek:t})),nk=a,ik=o,ak=ti,ok=W_.trim,sk=F_,uk=g("".charAt),ck=nk.parseFloat,lk=nk.Symbol,fk=lk&&lk.iterator,hk=1/ck(sk+"-0")!=-1/0||fk&&!ik((function(){ck(Object(fk))}))?function(e){var t=ok(ak(e)),r=ck(t);return 0===r&&"-"==uk(t,0)?-0:r}:ck;Cr({global:!0,forced:parseFloat!=hk},{parseFloat:hk});var dk=r(re.parseFloat),pk=xu.PROPER,vk=o,yk=F_,gk=W_.trim;Cr({target:"String",proto:!0,forced:function(e){return vk((function(){return!!yk[e]()||"
"!=="
"[e]()||pk&&yk[e].name!==e}))}("trim")},{trim:function(){return gk(this)}});var mk=af("String").trim,_k=ue,bk=mk,wk=String.prototype,kk=r((function(e){var t=e.trim;return"string"==typeof e||e===wk||_k(wk,e)&&t===wk.trim?bk:t})),Sk=na,xk=Math.floor,Ek=function(e,t){var r=e.length,n=xk(r/2);return r<8?Tk(e,t):Ak(e,Ek(Sk(e,0,n),t),Ek(Sk(e,n),t),t)},Tk=function(e,t){for(var r,n,i=e.length,a=1;a<i;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},Ak=function(e,t,r,n){for(var i=t.length,a=r.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?n(t[o],r[s])<=0?t[o++]:r[s++]:o<i?t[o++]:r[s++];return e},Lk=Ek,Ck=ce.match(/firefox\/(\d+)/i),Ok=!!Ck&&+Ck[1],Dk=/MSIE|Trident/.test(ce),Pk=ce.match(/AppleWebKit\/(\d+)\./),Rk=!!Pk&&+Pk[1],Mk=Cr,Uk=g,Ik=Pe,Bk=Qe,jk=Wr,Fk=__,Nk=ti,zk=o,Vk=Lk,Gk=_h,Hk=Ok,qk=Dk,Kk=ye,Wk=Rk,Yk=[],Jk=Uk(Yk.sort),Qk=Uk(Yk.push),Xk=zk((function(){Yk.sort(void 0)})),$k=zk((function(){Yk.sort(null)})),Zk=Gk("sort"),eS=!zk((function(){if(Kk)return Kk<70;if(!(Hk&&Hk>3)){if(qk)return!0;if(Wk)return Wk<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Yk.push({k:t+n,v:r})}for(Yk.sort((function(e,t){return t.v-e.v})),n=0;n<Yk.length;n++)t=Yk[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));Mk({target:"Array",proto:!0,forced:Xk||!$k||!Zk||!eS},{sort:function(e){void 0!==e&&Ik(e);var t=Bk(this);if(eS)return void 0===e?Jk(t):Jk(t,e);var r,n,i=[],a=jk(t);for(n=0;n<a;n++)n in t&&Qk(i,t[n]);for(Vk(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Nk(t)>Nk(r)?1:-1}}(e)),r=jk(i),n=0;n<r;)t[n]=i[n++];for(;n<a;)Fk(t,n++);return t}});var tS=af("Array").sort,rS=ue,nS=tS,iS=Array.prototype,aS=r((function(e){var t=e.sort;return e===iS||rS(iS,e)&&t===iS.sort?nS:t})),oS=Cr,sS=Date,uS=g(sS.prototype.getTime);oS({target:"Date",stat:!0},{now:function(){return uS(new sS)}});var cS,lS=r(re.Date.now),fS="undefined"!=typeof window&&window.location&&r_(cS=window.location.href).call(cS,"xgplayerdebugger=1")>-1,hS="color: #525252; background-color: #90ee90;",dS="color: #525252; background-color: red;",pS="color: #525252; background-color: yellow; ",vS="%c[xgplayer]",yS={config:{debug:fS?3:0},logInfo:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];this.config.debug>=3&&(r=console).log.apply(r,oh(t=[vS,hS,e]).call(t,i))},logWarn:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];this.config.debug>=1&&(r=console).warn.apply(r,oh(t=[vS,pS,e]).call(t,i))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];(r=console)[n].apply(r,oh(t=[vS,dS,e]).call(t,a))}}},gS=function(){function e(t){Qb(this,e),this.bufferedList=t}return $b(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),mS={};mS.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=document.createElement(t);return a.className=i,a.innerHTML=r,Ch(e=ch(n)).call(e,(function(e){var r=e,i=n[e];"video"===t||"audio"===t||"live-video"===t?i&&a.setAttribute(r,i):a.setAttribute(r,i)})),a},mS.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var i=n.children;if(n=null,i.length>0){var a;if(i=i[0],r&&mS.addClass(i,r),t)Ch(a=ch(t)).call(a,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(o){return yS.logError("util.createDomFromHtml",o),null}},mS.hasClass=function(e,t){if(!e||!t)return!1;try{return lw(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===Jb(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},mS.addClass=function(e,t){if(e&&t)try{var r;Ch(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(n){mS.hasClass(e,t)||(e.className&&"object"===Jb(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},mS.removeClass=function(e,t){if(e&&t)try{var r;Ch(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(i){var n;if(mS.hasClass(e,t))Ch(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===Jb(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},mS.toggleClass=function(e,t){var r;e&&Ch(r=t.split(/\s+/g)).call(r,(function(t){mS.hasClass(e,t)?mS.removeClass(e,t):mS.addClass(e,t)}))},mS.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===mS.typeOf(e[r]))t.push(e[r]);else if("Object"===mS.typeOf(e[r])){var n;hb(n=ch(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},mS.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){yS.logError("util.findDom",n),0===r_(r).call(r,"#")&&(e=t.getElementById(Tm(r).call(r,1)))}return e},mS.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},mS.padStart=function(e,t,r){for(var n=String(r),i=t>>0,a=Math.ceil(i/n.length),o=[],s=String(e);a--;)o.push(n);return o.join("").substring(0,i-s.length)+s},mS.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=Dw(mS).call(mS,Math.floor(e/3600),2,0),r=Dw(mS).call(mS,Math.floor((e-3600*t)/60),2,0),n=Dw(mS).call(mS,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},mS.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},mS.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},mS.deepCopy=function(e,t){var r;if("Object"===mS.typeOf(t)&&"Object"===mS.typeOf(e))return Ch(r=ch(t)).call(r,(function(r){if("Object"!==mS.typeOf(t[r])||t[r]instanceof Node)if("Array"===mS.typeOf(t[r])){var n;e[r]="Array"===mS.typeOf(e[r])?oh(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:mS.deepCopy(e[r],t[r])})),e},mS.deepMerge=function(e,t){var r;return hb(r=ch(t)).call(r,(function(r){var n;"Array"===mS.typeOf(t[r])&&"Array"===mS.typeOf(e[r])?"Array"===mS.typeOf(e[r])&&(n=e[r]).push.apply(n,ew(t[r])):mS.typeOf(e[r])!==mS.typeOf(t[r])||null===e[r]||"Object"!==mS.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):mS.deepMerge(e[r],t[r])})),e},mS.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},mS.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Ch(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},mS.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=Jw(Lm(r).call(r,e),n))},mS.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},mS.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=Qw((function(){t(),mS.clearTimeout(e,n)}),r);return e._timers.push(n),n},mS.clearTimeout=function(e,t){var r=e._timers;if("Array"===mS.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){B_(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},mS.clearAllTimers=function(e){var t=e._timers;"Array"===mS.typeOf(t)&&(hb(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},mS.createImgBtn=function(e,t,r,n){var i,a,o,s,u,c,l,f,h,d,p,v,y=mS.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(y.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(rk(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(r_(r).call(r,e)>-1&&r_(n).call(n,e)>-1)||(l=dk(kk(t=Tm(r).call(r,0,r_(r).call(r,e))).call(t)),f=dk(kk(i=Tm(n).call(n,0,r_(n).call(n,e))).call(i)),h=e,!1)})),y.style.width=oh(a="".concat(l)).call(a,h),y.style.height=oh(o="".concat(f)).call(o,h),y.style.backgroundSize=oh(s=oh(u=oh(c="".concat(l)).call(c,h," ")).call(u,f)).call(s,h),y.style.margin="start"===e?oh(d=oh(p=oh(v="-".concat(f/2)).call(v,h," auto auto -")).call(p,l/2)).call(d,h):"auto 5px auto 5px");return y},mS.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(ob(e,16))})),oh(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},mS.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},mS.checkIsFunction=function(e){return e&&"function"==typeof e},mS.checkIsObject=function(e){return null!==e&&"object"===Jb(e)},mS.hide=function(e){e.style.display="none"},mS.show=function(e,t){e.style.display=t||"block"},mS.isUndefined=function(e){if(null==e)return!0},mS.isNotNull=function(e){return!(null==e)},mS.setStyleFromCsstext=function(e,t){if(t)if("String"===mS.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");hb(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;hb(n=ch(t)).call(n,(function(r){e.style[r]=t[r]}))}},mS.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var i=n.replace(/\s+/g,"").split(";"),a={},o={};return hb(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var r=0,n=t.length;r<n;r++)if(r_(e).call(e,t[r])>-1)return!0;return!1}(t[0],r)?o[t[0]]=t[1]:a[t[0]]=t[1])}})),e.setAttribute("style",""),hb(t=ch(o)).call(t,(function(t){e.style[t]=o[t]})),a},mS.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return hb(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},mS.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},mS.stopPropagation=function(e){e&&e.stopPropagation()},mS.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},mS.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},mS.checkTouchSupport=function(){return"ontouchstart"in window},mS.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});aS(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(t)for(var a=0;a<r.length;a++){var o=i.length;if(o){var s=i[o-1].end;r[a].start-s<t?r[a].end>s&&(i[o-1].end=r[a].end):i.push(r[a])}else i.push(r[a])}else i=r;return new gS(i)},mS.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},mS.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},mS.getHostFromUrl=function(e){if("String"!==mS.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},mS.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},mS.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},mS.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},mS.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=ob(e)}catch(r){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=ob(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},mS.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},mS.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},mS.createPositionBar=function(e,t){var r=mS.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},mS.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:oh(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=ch(n);return Ch(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),a=oh(t="".concat(e,"(")).call(t,n[e],")");i.test(r)?(i.lastIndex=-1,r=r.replace(i,a)):r+="".concat(a," ")})),r},mS.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},mS.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var i=1;i<r;i++)if(e>t[i-1].end&&e<=t[i].end){n=i;break}return n},mS.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:mS.getIndexByTime(e,t))<0)return-1;var i=t.length,a=t[n],o=a.start,s=a.end,u=a.cTime,c=a.offset;return e<o?u:e>=o&&e<=s?e-c:e>s&&n>=i-1?s:-1},mS.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var i=t[r].start;return r-1<0?i+e:i+(e-t[r-1].duration)}return e};var _S="3.0.21-rc.21",bS={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},wS=$b((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};Qb(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,a=r.mediaError?r.mediaError:t.media.error||{},o=t.duration,s=t.currentTime,u=t.ended,c=t.src,l=t.currentSrc,f=t.media,h=f.readyState,d=f.networkState,p=r.errorCode||a.code;bS[p]&&(p=bS[p]);var v={playerVersion:_S,currentTime:s,duration:o,ended:u,readyState:h,networkState:d,src:c||l,errorType:r.errorType,errorCode:p,message:r.errorMessage||a.message,mediaError:a,originError:r.originError?r.originError.stack:"",host:mS.getHostFromUrl(c||l)};return r.ext&&hb(i=ch(r.ext)).call(i,(function(e){v[e]=r.ext[e]})),v}if(arguments.length>1){for(var y={playerVersion:_S,domain:document.domain},g=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],m=0;m<arguments.length;m++)y[g[m]]=arguments[m];return y.ex=n?(n[arguments[0]]||{}).msg:"",y}}));function kS(e,t,r){for(var n,i=arguments.length,a=new Array(i>3?i-3:0),o=3;o<i;o++)a[o-3]=arguments[o];var s,u=t.call.apply(t,oh(n=[e]).call(n,a));r&&"function"==typeof r&&(u&&u.then?u.then((function(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];r.call.apply(r,oh(t=[e]).call(t,i))})):r.call.apply(r,oh(s=[e]).call(s,a)))}function SS(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),Lm(r=function(){var r,i=arguments,a=this;if(n.pre)try{var o,s;(s=n.pre).call.apply(s,oh(o=[this]).call(o,Tm(Array.prototype).call(arguments)))}catch(v){var u,c;throw v.message=oh(u=oh(c="[pluginName: ".concat(this.pluginName,":")).call(c,e,":pre error] >> ")).call(u,v.message),v}if(this.__hooks&&this.__hooks[e])try{var l,f=function(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),a=3;a<n;a++)i[a-3]=arguments[a];if(e.__hooks&&db(e.__hooks[t])){var o,s=e.__hooks[t],u=-1,c=function e(t,r,n){for(var i,a,o=arguments.length,c=new Array(o>3?o-3:0),l=3;l<o;l++)c[l-3]=arguments[l];if(u++,0===s.length||u===s.length)return n.call.apply(n,oh(a=[t,t]).call(a,c));var f,h=s[u],d=h.call.apply(h,oh(i=[t,t]).call(i,c));return d&&d.then?d.then((function(i){var a;return!1===i?null:e.apply(void 0,oh(a=[t,r,n]).call(a,c))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==d?e.apply(void 0,oh(f=[t,r,n]).call(f,c)):void 0};return c.apply(void 0,oh(o=[e,t,r]).call(o,i))}var l;return r.call.apply(r,oh(l=[e,e]).call(l,i))}(this,e,t);if(f)if(f.then)f.then((function(e){var r;!1!==e&&kS.apply(void 0,oh(r=[a,t,n.next]).call(r,ew(i)))})).catch((function(e){throw e}));else kS.apply(void 0,oh(l=[this,t,n.next]).call(l,Tm(Array.prototype).call(arguments)));else if(void 0===f){var h;kS.apply(void 0,oh(h=[this,t,n.next]).call(h,Tm(Array.prototype).call(arguments)))}}catch(v){var d,p;throw v.message=oh(d=oh(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(d,v.message),v}else kS.apply(void 0,oh(r=[this,t,n.next]).call(r,Tm(Array.prototype).call(arguments)))}).call(r,this)}function xS(e,t){var r=this.__hooks;if(!r||!db(r[e]))return-1;for(var n=r[e],i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function ES(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(db(r[e])||(r[e]=[]),-1===xS.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function TS(e,t){var r=this.__hooks;if(r)if(db(r[e])){var n=r[e],i=xS.call(this,e,t);-1!==i&&B_(n).call(n,i,1)}else r[e]&&(r[e]=null)}function AS(e,t){var r;yS.logError(oh(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var LS=function(){function e(t){Qb(this,e),mS.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&hb(t).call(t,(function(t){e.__hooks[t]=null})),Yh(e,"hooks",{get:function(){var t;return e.__hooks&&hb(t=ch(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return $b(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=mS.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):db(e)&&Ch(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):AS(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):db(e)&&Ch(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):AS(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):db(e)&&Ch(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):AS(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;Ch(e=["__events","__onceEvents"]).call(e,(function(e){var r;Ch(r=ch(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];(r=this.player).emit.apply(r,oh(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=Yb(Yb({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return SS.call.apply(SS,oh(r=[this]).call(r,Tm(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return ES.call.apply(ES,oh(r=[this]).call(r,Tm(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return TS.call.apply(TS,oh(r=[this]).call(r,Tm(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return r&&(t.pluginName=r),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,r=this.player,n=this.pluginName;this.offAll(),mS.clearAllTimers(this),mS.checkIsFunction(this.destroy)&&this.destroy(),hb(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Yh(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&Yh(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),CS=Cr,OS=so.findIndex,DS="findIndex",PS=!0;DS in[]&&Array(1)[DS]((function(){PS=!1})),CS({target:"Array",proto:!0,forced:PS},{findIndex:function(e){return OS(this,e,arguments.length>1?arguments[1]:void 0)}});var RS=af("Array").findIndex,MS=ue,US=RS,IS=Array.prototype,BS=r((function(e){var t=e.findIndex;return e===IS||MS(IS,e)&&t===IS.findIndex?US:t})),jS=o,FS=dt("iterator"),NS=!jS((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[FS]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),zS=g,VS=2147483647,GS=/[^\0-\u007E]/,HS=/[.\u3002\uFF0E\uFF61]/g,qS="Overflow: input needs wider integers to process",KS=RangeError,WS=zS(HS.exec),YS=Math.floor,JS=String.fromCharCode,QS=zS("".charCodeAt),XS=zS([].join),$S=zS([].push),ZS=zS("".replace),ex=zS("".split),tx=zS("".toLowerCase),rx=function(e){return e+22+75*(e<26)},nx=function(e,t,r){var n=0;for(e=r?YS(e/700):e>>1,e+=YS(e/t);e>455;)e=YS(e/35),n+=36;return YS(n+36*e/(e+38))},ix=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=QS(e,r++);if(i>=55296&&i<=56319&&r<n){var a=QS(e,r++);56320==(64512&a)?$S(t,((1023&i)<<10)+(1023&a)+65536):($S(t,i),r--)}else $S(t,i)}return t}(e);var r,n,i=e.length,a=128,o=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&$S(t,JS(n));var u=t.length,c=u;for(u&&$S(t,"-");c<i;){var l=VS;for(r=0;r<e.length;r++)(n=e[r])>=a&&n<l&&(l=n);var f=c+1;if(l-a>YS((VS-o)/f))throw KS(qS);for(o+=(l-a)*f,a=l,r=0;r<e.length;r++){if((n=e[r])<a&&++o>VS)throw KS(qS);if(n==a){for(var h=o,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(h<p)break;var v=h-p,y=36-p;$S(t,JS(rx(p+v%y))),h=YS(v/y),d+=36}$S(t,JS(rx(h))),s=nx(o,f,c==u),o=0,c++}}o++,a++}return XS(t,"")},ax=fa,ox=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:ax(e,n,t[n],r);return e},sx=Cr,ux=a,cx=R,lx=g,fx=O,hx=NS,dx=fa,px=da,vx=ox,yx=Ba,gx=Qu,mx=Za,_x=Ap,bx=L,wx=Ze,kx=Xt,Sx=cn,xx=nr,Ex=te,Tx=ti,Ax=Wi,Lx=N,Cx=Pd,Ox=Ed,Dx=Mp,Px=Lk,Rx=dt("iterator"),Mx="URLSearchParams",Ux=Mx+"Iterator",Ix=mx.set,Bx=mx.getterFor(Mx),jx=mx.getterFor(Ux),Fx=Object.getOwnPropertyDescriptor,Nx=function(e){if(!fx)return ux[e];var t=Fx(ux,e);return t&&t.value},zx=Nx("fetch"),Vx=Nx("Request"),Gx=Nx("Headers"),Hx=Vx&&Vx.prototype,qx=Gx&&Gx.prototype,Kx=ux.RegExp,Wx=ux.TypeError,Yx=ux.decodeURIComponent,Jx=ux.encodeURIComponent,Qx=lx("".charAt),Xx=lx([].join),$x=lx([].push),Zx=lx("".replace),eE=lx([].shift),tE=lx([].splice),rE=lx("".split),nE=lx("".slice),iE=/\+/g,aE=Array(4),oE=function(e){return aE[e-1]||(aE[e-1]=Kx("((?:%[\\da-f]{2}){"+e+"})","gi"))},sE=function(e){try{return Yx(e)}catch(VB){return e}},uE=function(e){var t=Zx(e,iE," "),r=4;try{return Yx(t)}catch(VB){for(;r;)t=Zx(t,oE(r--),sE);return t}},cE=/[!'()~]|%20/g,lE={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},fE=function(e){return lE[e]},hE=function(e){return Zx(Jx(e),cE,fE)},dE=gx((function(e,t){Ix(this,{type:Ux,iterator:Cx(Bx(e).entries),kind:t})}),"Iterator",(function(){var e=jx(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),pE=function(e){this.entries=[],this.url=null,void 0!==e&&(Ex(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Qx(e,0)?nE(e,1):e:Tx(e)))};pE.prototype={type:Mx,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,u=Ox(e);if(u)for(r=(t=Cx(e,u)).next;!(n=cx(r,t)).done;){if(a=(i=Cx(xx(n.value))).next,(o=cx(a,i)).done||(s=cx(a,i)).done||!cx(a,i).done)throw Wx("Expected sequence with length 2");$x(this.entries,{key:Tx(o.value),value:Tx(s.value)})}else for(var c in e)wx(e,c)&&$x(this.entries,{key:c,value:Tx(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=rE(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=rE(t,"="),$x(this.entries,{key:uE(eE(r)),value:uE(Xx(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],$x(r,hE(e.key)+"="+hE(e.value));return Xx(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var vE=function(){_x(this,yE);var e=Ix(this,new pE(arguments.length>0?arguments[0]:void 0));fx||(this.length=e.entries.length)},yE=vE.prototype;if(vx(yE,{append:function(e,t){Dx(arguments.length,2);var r=Bx(this);$x(r.entries,{key:Tx(e),value:Tx(t)}),fx||this.length++,r.updateURL()},delete:function(e){Dx(arguments.length,1);for(var t=Bx(this),r=t.entries,n=Tx(e),i=0;i<r.length;)r[i].key===n?tE(r,i,1):i++;fx||(this.length=r.length),t.updateURL()},get:function(e){Dx(arguments.length,1);for(var t=Bx(this).entries,r=Tx(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Dx(arguments.length,1);for(var t=Bx(this).entries,r=Tx(e),n=[],i=0;i<t.length;i++)t[i].key===r&&$x(n,t[i].value);return n},has:function(e){Dx(arguments.length,1);for(var t=Bx(this).entries,r=Tx(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Dx(arguments.length,1);for(var r,n=Bx(this),i=n.entries,a=!1,o=Tx(e),s=Tx(t),u=0;u<i.length;u++)(r=i[u]).key===o&&(a?tE(i,u--,1):(a=!0,r.value=s));a||$x(i,{key:o,value:s}),fx||(this.length=i.length),n.updateURL()},sort:function(){var e=Bx(this);Px(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Bx(this).entries,n=kx(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new dE(this,"keys")},values:function(){return new dE(this,"values")},entries:function(){return new dE(this,"entries")}},{enumerable:!0}),dx(yE,Rx,yE.entries,{name:"entries"}),dx(yE,"toString",(function(){return Bx(this).serialize()}),{enumerable:!0}),fx&&px(yE,"size",{get:function(){return Bx(this).entries.length},configurable:!0,enumerable:!0}),yx(vE,Mx),sx({global:!0,constructor:!0,forced:!hx},{URLSearchParams:vE}),!hx&&bx(Gx)){var gE=lx(qx.has),mE=lx(qx.set),_E=function(e){if(Ex(e)){var t,r=e.body;if(Sx(r)===Mx)return t=e.headers?new Gx(e.headers):new Gx,gE(t,"content-type")||mE(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ax(e,{body:Lx(0,Tx(r)),headers:Lx(0,t)})}return e};if(bx(zx)&&sx({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return zx(e,arguments.length>1?_E(arguments[1]):{})}}),bx(Vx)){var bE=function(e){return _x(this,Hx),new Vx(e,arguments.length>1?_E(arguments[1]):{})};Hx.constructor=bE,bE.prototype=Hx,sx({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:bE})}}var wE,kE=Cr,SE=O,xE=NS,EE=a,TE=Xt,AE=g,LE=fa,CE=da,OE=Ap,DE=Ze,PE=Tb,RE=Hb,ME=na,UE=_l.codeAt,IE=function(e){var t,r,n=[],i=ex(ZS(tx(e),HS,"."),".");for(t=0;t<i.length;t++)r=i[t],$S(n,WS(GS,r)?"xn--"+ix(r):r);return XS(n,".")},BE=ti,jE=Ba,FE=Mp,NE={URLSearchParams:vE,getState:Bx},zE=Za,VE=zE.set,GE=zE.getterFor("URL"),HE=NE.URLSearchParams,qE=NE.getState,KE=EE.URL,WE=EE.TypeError,YE=EE.parseInt,JE=Math.floor,QE=Math.pow,XE=AE("".charAt),$E=AE(/./.exec),ZE=AE([].join),eT=AE(1..toString),tT=AE([].pop),rT=AE([].push),nT=AE("".replace),iT=AE([].shift),aT=AE("".split),oT=AE("".slice),sT=AE("".toLowerCase),uT=AE([].unshift),cT="Invalid scheme",lT="Invalid host",fT="Invalid port",hT=/[a-z]/i,dT=/[\d+-.a-z]/i,pT=/\d/,vT=/^0x/i,yT=/^[0-7]+$/,gT=/^\d+$/,mT=/^[\da-f]+$/i,_T=/[\0\t\n\r #%/:<>?@[\\\]^|]/,bT=/[\0\t\n\r #/:<>?@[\\\]^|]/,wT=/^[\u0000-\u0020]+/,kT=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ST=/[\t\n\r]/g,xT=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)uT(t,e%256),e=JE(e/256);return ZE(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=eT(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},ET={},TT=PE({},ET,{" ":1,'"':1,"<":1,">":1,"`":1}),AT=PE({},TT,{"#":1,"?":1,"{":1,"}":1}),LT=PE({},AT,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),CT=function(e,t){var r=UE(e,0);return r>32&&r<127&&!DE(t,e)?e:encodeURIComponent(e)},OT={ftp:21,file:null,http:80,https:443,ws:80,wss:443},DT=function(e,t){var r;return 2==e.length&&$E(hT,XE(e,0))&&(":"==(r=XE(e,1))||!t&&"|"==r)},PT=function(e){var t;return e.length>1&&DT(oT(e,0,2))&&(2==e.length||"/"===(t=XE(e,2))||"\\"===t||"?"===t||"#"===t)},RT=function(e){return"."===e||"%2e"===sT(e)},MT={},UT={},IT={},BT={},jT={},FT={},NT={},zT={},VT={},GT={},HT={},qT={},KT={},WT={},YT={},JT={},QT={},XT={},$T={},ZT={},eA={},tA=function(e,t,r){var n,i,a,o=BE(e);if(t){if(i=this.parse(o))throw WE(i);this.searchParams=null}else{if(void 0!==r&&(n=new tA(r,!0)),i=this.parse(o,null,n))throw WE(i);(a=qE(new HE)).bindURL(this),this.searchParams=a}};tA.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,u=this,c=t||MT,l=0,f="",h=!1,d=!1,p=!1;for(e=BE(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=nT(e,wT,""),e=nT(e,kT,"$1")),e=nT(e,ST,""),n=RE(e);l<=n.length;){switch(i=n[l],c){case MT:if(!i||!$E(hT,i)){if(t)return cT;c=IT;continue}f+=sT(i),c=UT;break;case UT:if(i&&($E(dT,i)||"+"==i||"-"==i||"."==i))f+=sT(i);else{if(":"!=i){if(t)return cT;f="",c=IT,l=0;continue}if(t&&(u.isSpecial()!=DE(OT,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&OT[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?c=WT:u.isSpecial()&&r&&r.scheme==u.scheme?c=BT:u.isSpecial()?c=zT:"/"==n[l+1]?(c=jT,l++):(u.cannotBeABaseURL=!0,rT(u.path,""),c=$T)}break;case IT:if(!r||r.cannotBeABaseURL&&"#"!=i)return cT;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=ME(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,c=eA;break}c="file"==r.scheme?WT:FT;continue;case BT:if("/"!=i||"/"!=n[l+1]){c=FT;continue}c=VT,l++;break;case jT:if("/"==i){c=GT;break}c=XT;continue;case FT:if(u.scheme=r.scheme,i==wE)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ME(r.path),u.query=r.query;else if("/"==i||"\\"==i&&u.isSpecial())c=NT;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ME(r.path),u.query="",c=ZT;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ME(r.path),u.path.length--,c=XT;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ME(r.path),u.query=r.query,u.fragment="",c=eA}break;case NT:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,c=XT;continue}c=GT}else c=VT;break;case zT:if(c=VT,"/"!=i||"/"!=XE(f,l+1))continue;l++;break;case VT:if("/"!=i&&"\\"!=i){c=GT;continue}break;case GT:if("@"==i){h&&(f="%40"+f),h=!0,a=RE(f);for(var v=0;v<a.length;v++){var y=a[v];if(":"!=y||p){var g=CT(y,LT);p?u.password+=g:u.username+=g}else p=!0}f=""}else if(i==wE||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(h&&""==f)return"Invalid authority";l-=RE(f).length+1,f="",c=HT}else f+=i;break;case HT:case qT:if(t&&"file"==u.scheme){c=JT;continue}if(":"!=i||d){if(i==wE||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return lT;if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(o=u.parseHost(f))return o;if(f="",c=QT,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),f+=i}else{if(""==f)return lT;if(o=u.parseHost(f))return o;if(f="",c=KT,t==qT)return}break;case KT:if(!$E(pT,i)){if(i==wE||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=f){var m=YE(f,10);if(m>65535)return fT;u.port=u.isSpecial()&&m===OT[u.scheme]?null:m,f=""}if(t)return;c=QT;continue}return fT}f+=i;break;case WT:if(u.scheme="file","/"==i||"\\"==i)c=YT;else{if(!r||"file"!=r.scheme){c=XT;continue}if(i==wE)u.host=r.host,u.path=ME(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=ME(r.path),u.query="",c=ZT;else{if("#"!=i){PT(ZE(ME(n,l),""))||(u.host=r.host,u.path=ME(r.path),u.shortenPath()),c=XT;continue}u.host=r.host,u.path=ME(r.path),u.query=r.query,u.fragment="",c=eA}}break;case YT:if("/"==i||"\\"==i){c=JT;break}r&&"file"==r.scheme&&!PT(ZE(ME(n,l),""))&&(DT(r.path[0],!0)?rT(u.path,r.path[0]):u.host=r.host),c=XT;continue;case JT:if(i==wE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&DT(f))c=XT;else if(""==f){if(u.host="",t)return;c=QT}else{if(o=u.parseHost(f))return o;if("localhost"==u.host&&(u.host=""),t)return;f="",c=QT}continue}f+=i;break;case QT:if(u.isSpecial()){if(c=XT,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=wE&&(c=XT,"/"!=i))continue}else u.fragment="",c=eA;else u.query="",c=ZT;break;case XT:if(i==wE||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=sT(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||rT(u.path,"")):RT(f)?"/"==i||"\\"==i&&u.isSpecial()||rT(u.path,""):("file"==u.scheme&&!u.path.length&&DT(f)&&(u.host&&(u.host=""),f=XE(f,0)+":"),rT(u.path,f)),f="","file"==u.scheme&&(i==wE||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)iT(u.path);"?"==i?(u.query="",c=ZT):"#"==i&&(u.fragment="",c=eA)}else f+=CT(i,AT);break;case $T:"?"==i?(u.query="",c=ZT):"#"==i?(u.fragment="",c=eA):i!=wE&&(u.path[0]+=CT(i,ET));break;case ZT:t||"#"!=i?i!=wE&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":CT(i,ET)):(u.fragment="",c=eA);break;case eA:i!=wE&&(u.fragment+=CT(i,TT))}l++}},parseHost:function(e){var t,r,n;if("["==XE(e,0)){if("]"!=XE(e,e.length-1))return lT;if(t=function(e){var t,r,n,i,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return XE(e,f)};if(":"==h()){if(":"!=XE(e,1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=r=0;r<4&&$E(mT,h());)t=16*t+YE(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,c>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!$E(pT,h()))return;for(;$E(pT,h());){if(a=YE(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(o=c-l,c=7;0!=c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!=c)return;return u}(oT(e,1,-1)),!t)return lT;this.host=t}else if(this.isSpecial()){if(e=IE(e),$E(_T,e))return lT;if(t=function(e){var t,r,n,i,a,o,s,u=aT(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=u[n]))return e;if(a=10,i.length>1&&"0"==XE(i,0)&&(a=$E(vT,i)?16:8,i=oT(i,8==a?1:2)),""===i)o=0;else{if(!$E(10==a?gT:8==a?yT:mT,i))return e;o=YE(i,a)}rT(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=QE(256,5-t))return null}else if(o>255)return null;for(s=tT(r),n=0;n<r.length;n++)s+=r[n]*QE(256,3-n);return s}(e),null===t)return lT;this.host=t}else{if($E(bT,e))return lT;for(t="",r=RE(e),n=0;n<r.length;n++)t+=CT(r[n],ET);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return DE(OT,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&DT(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=xT(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+ZE(o,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw WE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new rA(e.path[0]).origin}catch(VB){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+xT(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(BE(e)+":",MT)},getUsername:function(){return this.username},setUsername:function(e){var t=RE(BE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=CT(t[r],LT)}},getPassword:function(){return this.password},setPassword:function(e){var t=RE(BE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=CT(t[r],LT)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?xT(e):xT(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,HT)},getHostname:function(){var e=this.host;return null===e?"":xT(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,qT)},getPort:function(){var e=this.port;return null===e?"":BE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=BE(e))?this.port=null:this.parse(e,KT))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ZE(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,QT))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=BE(e))?this.query=null:("?"==XE(e,0)&&(e=oT(e,1)),this.query="",this.parse(e,ZT)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=BE(e))?("#"==XE(e,0)&&(e=oT(e,1)),this.fragment="",this.parse(e,eA)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var rA=function(e){var t=OE(this,nA),r=FE(arguments.length,1)>1?arguments[1]:void 0,n=VE(t,new tA(e,!1,r));SE||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},nA=rA.prototype,iA=function(e,t){return{get:function(){return GE(this)[e]()},set:t&&function(e){return GE(this)[t](e)},configurable:!0,enumerable:!0}};if(SE&&(CE(nA,"href",iA("serialize","setHref")),CE(nA,"origin",iA("getOrigin")),CE(nA,"protocol",iA("getProtocol","setProtocol")),CE(nA,"username",iA("getUsername","setUsername")),CE(nA,"password",iA("getPassword","setPassword")),CE(nA,"host",iA("getHost","setHost")),CE(nA,"hostname",iA("getHostname","setHostname")),CE(nA,"port",iA("getPort","setPort")),CE(nA,"pathname",iA("getPathname","setPathname")),CE(nA,"search",iA("getSearch","setSearch")),CE(nA,"searchParams",iA("getSearchParams")),CE(nA,"hash",iA("getHash","setHash"))),LE(nA,"toJSON",(function(){return GE(this).serialize()}),{enumerable:!0}),LE(nA,"toString",(function(){return GE(this).serialize()}),{enumerable:!0}),KE){var aA=KE.createObjectURL,oA=KE.revokeObjectURL;aA&&LE(rA,"createObjectURL",TE(aA,KE)),oA&&LE(rA,"revokeObjectURL",TE(oA,KE))}jE(rA,"URL"),kE({global:!0,constructor:!0,forced:!xE,sham:!SE},{URL:rA});var sA=Cr,uA=o,cA=Mp,lA=ti,fA=NS,hA=se("URL");sA({target:"URL",stat:!0,forced:!(fA&&uA((function(){hA.canParse()})))},{canParse:function(e){var t=cA(arguments.length,1),r=lA(e),n=t<2||void 0===arguments[1]?void 0:lA(arguments[1]);try{return!!new hA(r,n)}catch(VB){return!1}}});var dA=r(re.URL),pA=re,vA=h;pA.JSON||(pA.JSON={stringify:JSON.stringify});var yA=function(e,t,r){return vA(pA.JSON.stringify,null,arguments)},gA=r(yA),mA=te,_A=w,bA=dt("match"),wA=function(e){var t;return mA(e)&&(void 0!==(t=e[bA])?!!t:"RegExp"==_A(e))},kA=TypeError,SA=dt("match"),xA=fi.includes;Cr({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return xA(this,e,arguments.length>1?arguments[1]:void 0)}});var EA=af("Array").includes,TA=Cr,AA=function(e){if(wA(e))throw kA("The method doesn't accept regular expressions");return e},LA=J,CA=ti,OA=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[SA]=!1,"/./"[e](t)}catch(n){}}return!1},DA=g("".indexOf);TA({target:"String",proto:!0,forced:!OA("includes")},{includes:function(e){return!!~DA(CA(LA(this)),CA(AA(e)),arguments.length>1?arguments[1]:void 0)}});var PA=af("String").includes,RA=ue,MA=EA,UA=PA,IA=Array.prototype,BA=String.prototype,jA=r((function(e){var t=e.includes;return e===IA||RA(IA,e)&&t===IA.includes?MA:"string"==typeof e||e===BA||RA(BA,e)&&t===BA.includes?UA:t})),FA={exports:{}},NA=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),zA=o,VA=te,GA=w,HA=NA,qA=Object.isExtensible,KA=zA((function(){qA(1)}))||HA?function(e){return!!VA(e)&&((!HA||"ArrayBuffer"!=GA(e))&&(!qA||qA(e)))}:qA,WA=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),YA=Cr,JA=g,QA=hi,XA=te,$A=Ze,ZA=$t.f,eL=Yi,tL=Xi,rL=KA,nL=WA,iL=!1,aL=it("meta"),oL=0,sL=function(e){ZA(e,aL,{value:{objectID:"O"+oL++,weakData:{}}})},uL=FA.exports={enable:function(){uL.enable=function(){},iL=!0;var e=eL.f,t=JA([].splice),r={};r[aL]=1,e(r).length&&(eL.f=function(r){for(var n=e(r),i=0,a=n.length;i<a;i++)if(n[i]===aL){t(n,i,1);break}return n},YA({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:tL.f}))},fastKey:function(e,t){if(!XA(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!$A(e,aL)){if(!rL(e))return"F";if(!t)return"E";sL(e)}return e[aL].objectID},getWeakData:function(e,t){if(!$A(e,aL)){if(!rL(e))return!0;if(!t)return!1;sL(e)}return e[aL].weakData},onFreeze:function(e){return nL&&iL&&rL(e)&&!$A(e,aL)&&sL(e),e}};QA[aL]=!0;var cL=FA.exports,lL=Cr,fL=a,hL=cL,dL=o,pL=gr,vL=Qd,yL=Ap,gL=L,mL=te,_L=Ba,bL=$t.f,wL=so.forEach,kL=O,SL=Za.set,xL=Za.getterFor,EL=function(e,t,r){var n,i=-1!==e.indexOf("Map"),a=-1!==e.indexOf("Weak"),o=i?"set":"add",s=fL[e],u=s&&s.prototype,c={};if(kL&&gL(s)&&(a||u.forEach&&!dL((function(){(new s).entries().next()})))){var l=(n=t((function(t,r){SL(yL(t,l),{type:e,collection:new s}),null!=r&&vL(r,t[o],{that:t,AS_ENTRIES:i})}))).prototype,f=xL(e);wL(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||a&&"clear"==e||pL(l,e,(function(r,n){var i=f(this).collection;if(!t&&a&&!mL(r))return"get"==e&&void 0;var o=i[e](0===r?0:r,n);return t?this:o}))})),a||bL(l,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else n=r.getConstructor(t,e,i,o),hL.enable();return _L(n,e,!1,!0),c[e]=n,lL({global:!0,forced:!0},c),a||r.setStrong(n,e,i),n},TL=Wi,AL=da,LL=ox,CL=Xt,OL=Ap,DL=K,PL=Qd,RL=kc,ML=Sc,UL=xp,IL=O,BL=cL.fastKey,jL=Za.set,FL=Za.getterFor,NL={getConstructor:function(e,t,r,n){var i=e((function(e,i){OL(e,a),jL(e,{type:t,index:TL(null),first:void 0,last:void 0,size:0}),IL||(e.size=0),DL(i)||PL(i,e[n],{that:e,AS_ENTRIES:r})})),a=i.prototype,o=FL(t),s=function(e,t,r){var n,i,a=o(e),s=u(e,t);return s?s.value=r:(a.last=s={index:i=BL(t,!0),key:t,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=s),n&&(n.next=s),IL?a.size++:e.size++,"F"!==i&&(a.index[i]=s)),e},u=function(e,t){var r,n=o(e),i=BL(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return LL(a,{clear:function(){for(var e=o(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,IL?e.size=0:this.size=0},delete:function(e){var t=this,r=o(t),n=u(t,e);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first==n&&(r.first=i),r.last==n&&(r.last=a),IL?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=o(this),n=CL(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),LL(a,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),IL&&AL(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=FL(t),a=FL(n);RL(e,t,(function(e,t){jL(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?ML("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,ML(void 0,!0))}),r?"entries":"values",!r,!0),UL(t)}};EL("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),NL);var zL=re.Map,VL=Xt,GL=R,HL=Pe,qL=jf,KL=K,WL=Qd,YL=[].push,JL=function(e){var t,r,n,i,a=arguments.length,o=a>1?arguments[1]:void 0;return qL(this),(t=void 0!==o)&&HL(o),KL(e)?new this:(r=[],t?(n=0,i=VL(o,a>2?arguments[2]:void 0),WL(e,(function(e){GL(YL,r,i(e,n++))}))):WL(e,YL,{that:r}),new this(r))};Cr({target:"Map",stat:!0,forced:!0},{from:JL});var QL=Ps,XL=function(){return new this(QL(arguments))};Cr({target:"Map",stat:!0,forced:!0},{of:XL});var $L=Le,ZL=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError($L(e)+" is not a map")},eC=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},tC=eC,rC=se("Map"),nC={Map:rC,set:tC("set",2),get:tC("get",1),has:tC("has",1),remove:tC("delete",1),proto:rC.prototype},iC=ZL,aC=nC.remove;Cr({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=iC(this),r=!0,n=0,i=arguments.length;n<i;n++)e=aC(t,arguments[n]),r=r&&e;return!!r}});var oC=ZL,sC=nC.get,uC=nC.has,cC=nC.set;Cr({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=oC(this);return uC(i,e)?(r=sC(i,e),"update"in t&&(r=t.update(r,e,i),cC(i,e,r)),r):(n=t.insert(e,i),cC(i,e,n),n)}});var lC=R,fC=function(e,t,r){for(var n,i,a=r||e.next;!(n=lC(a,e)).done;)if(void 0!==(i=t(n.value)))return i},hC=fC,dC=function(e,t,r){return r?hC(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},pC=Xt,vC=ZL,yC=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=vC(this),r=pC(e,arguments.length>1?arguments[1]:void 0);return!1!==yC(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var gC=Xt,mC=ZL,_C=dC,bC=nC.Map,wC=nC.set;Cr({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=mC(this),r=gC(e,arguments.length>1?arguments[1]:void 0),n=new bC;return _C(t,(function(e,i){r(e,i,t)&&wC(n,i,e)})),n}});var kC=Xt,SC=ZL,xC=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=SC(this),r=kC(e,arguments.length>1?arguments[1]:void 0),n=xC(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var EC=Xt,TC=ZL,AC=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=TC(this),r=EC(e,arguments.length>1?arguments[1]:void 0),n=AC(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var LC=Cr,CC=R,OC=L,DC=Pe,PC=Qd,RC=nC.Map,MC=g([].push);LC({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(OC(this)?this:RC);DC(t);var n=DC(r.has),i=DC(r.get),a=DC(r.set);return PC(e,(function(e){var o=t(e);CC(n,r,o)?MC(CC(i,r,o),e):CC(a,r,o,[e])})),r}});var UC=function(e,t){return e===t||e!=e&&t!=t},IC=ZL,BC=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===BC(IC(this),(function(t){if(UC(t,e))return!0}),!0)}});var jC=R,FC=Qd,NC=L,zC=Pe,VC=nC.Map;Cr({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(NC(this)?this:VC);zC(t);var n=zC(r.set);return FC(e,(function(e){jC(n,r,t(e),e)})),r}});var GC=ZL,HC=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=HC(GC(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var qC=Xt,KC=ZL,WC=dC,YC=nC.Map,JC=nC.set;Cr({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=KC(this),r=qC(e,arguments.length>1?arguments[1]:void 0),n=new YC;return WC(t,(function(e,i){JC(n,r(e,i,t),e)})),n}});var QC=Xt,XC=ZL,$C=dC,ZC=nC.Map,eO=nC.set;Cr({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=XC(this),r=QC(e,arguments.length>1?arguments[1]:void 0),n=new ZC;return $C(t,(function(e,i){eO(n,i,r(e,i,t))})),n}});var tO=ZL,rO=Qd,nO=nC.set;Cr({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=tO(this),r=arguments.length,n=0;n<r;)rO(arguments[n++],(function(e,r){nO(t,e,r)}),{AS_ENTRIES:!0});return t}});var iO=Pe,aO=ZL,oO=dC,sO=TypeError;Cr({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aO(this),r=arguments.length<2,n=r?void 0:arguments[1];if(iO(e),oO(t,(function(i,a){r?(r=!1,n=i):n=e(n,i,a,t)})),r)throw sO("Reduce of empty map with no initial value");return n}});var uO=Xt,cO=ZL,lO=dC;Cr({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=cO(this),r=uO(e,arguments.length>1?arguments[1]:void 0);return!0===lO(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var fO=Pe,hO=ZL,dO=TypeError,pO=nC.get,vO=nC.has,yO=nC.set;Cr({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=hO(this),n=arguments.length;fO(t);var i=vO(r,e);if(!i&&n<3)throw dO("Updating absent value");var a=i?pO(r,e):fO(n>2?arguments[2]:void 0)(e,r);return yO(r,e,t(a,e,r)),r}});var gO=R,mO=Pe,_O=L,bO=nr,wO=TypeError,kO=function(e,t){var r,n=bO(this),i=mO(n.get),a=mO(n.has),o=mO(n.set),s=arguments.length>2?arguments[2]:void 0;if(!_O(t)&&!_O(s))throw wO("At least one callback required");return gO(a,n,e)?(r=gO(i,n,e),_O(t)&&(r=t(r),gO(o,n,e,r))):_O(s)&&(r=s(),gO(o,n,e,r)),r};Cr({target:"Map",proto:!0,real:!0,forced:!0},{upsert:kO}),Cr({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:kO});var SO=r(zL);function xO(e,t){var r=ch(e);if(lh){var n=lh(e);t&&(n=yh(n).call(n,(function(t){return gh(e,t).enumerable}))),r.push.apply(r,n)}return r}function EO(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?Ch(r=xO(Object(i),!0)).call(r,(function(t){RO(e,t,i[t])})):Nh?Wh(e,Nh(i)):Ch(n=xO(Object(i))).call(n,(function(t){Yh(e,t,gh(i,t))}))}return e}function TO(){TO=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Yh||function(e,t,r){e[t]=r.value},i="function"==typeof Jh?Jh:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(A){u=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var a=t&&t.prototype instanceof h?t:h,o=Qh(a.prototype),s=new x(i||[]);return n(o,"_invoke",{value:b(e,r,s)}),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function h(){}function d(){}function p(){}var v={};u(v,a,(function(){return this}));var y=Xh&&Xh(Xh(E([])));y&&y!==t&&r.call(y,a)&&(v=y);var g=p.prototype=h.prototype=Qh(v);function m(e){var t;Ch(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,a,o,s){var u=l(e[n],e,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Ol(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,o,s)}),(function(e){i("throw",e,o,s)})):t.resolve(f).then((function(e){c.value=e,o(c)}),(function(e){return i("throw",e,o,s)}))}s(u.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return{value:void 0,done:!0}}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=w(o,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=l(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],Ch(e).call(e,k,this),this.reset(!0)}function E(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,n(g,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=u(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return $h?$h(e,p):(e.__proto__=p,u(e,s,"GeneratorFunction")),e.prototype=Qh(g),e},e.awrap=function(e){return{__await:e}},m(_.prototype),u(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,a){void 0===a&&(a=$g);var o=new _(c(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},m(g),u(g,s,"Generator"),u(g,a,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return sm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=E,x.prototype={constructor:x,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,Ch(t=this.tryEntries).call(t,S),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+Tm(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function AO(e){return(AO="function"==typeof Jh&&"symbol"==typeof Am?function(e){return typeof e}:function(e){return e&&"function"==typeof Jh&&e.constructor===Jh&&e!==Jh.prototype?"symbol":typeof e})(e)}function LO(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(VB){return void r(VB)}s.done?t(u):$g.resolve(u).then(n,i)}function CO(e){return function(){var t=this,r=arguments;return new $g((function(n,i){var a=e.apply(t,r);function o(e){LO(a,n,i,o,s,"next",e)}function s(e){LO(a,n,i,o,s,"throw",e)}o(void 0)}))}}function OO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Yh(e,KO(n.key),n)}}function PO(e,t,r){return t&&DO(e.prototype,t),r&&DO(e,r),Yh(e,"prototype",{writable:!1}),e}function RO(e,t,r){return(t=KO(t))in e?Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MO(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Qh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Yh(e,"prototype",{writable:!1}),t&&IO(e,t)}function UO(e){var t;return(UO=$h?Lm(t=Xh).call(t):function(e){return e.__proto__||Xh(e)})(e)}function IO(e,t){var r;return(IO=$h?Lm(r=$h).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function BO(){if("undefined"==typeof Reflect||!Cm)return!1;if(Cm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Cm(Boolean,[],(function(){}))),!0}catch(e){return!1}}function jO(e,t,r){var n;BO()?jO=Lm(n=Cm).call(n):jO=function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Lm(Function).apply(e,n));return r&&IO(i,r.prototype),i};return jO.apply(null,arguments)}function FO(e){var t="function"==typeof SO?new SO:void 0;return FO=function(e){if(null===e||(r=e,-1===r_(n=Function.toString.call(r)).call(n,"[native code]")))return e;var r,n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return jO(e,arguments,UO(this).constructor)}return i.prototype=Qh(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),IO(i,e)},FO(e)}function NO(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=ch(e);for(n=0;n<a.length;n++)r=a[n],r_(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(lh){var a=lh(e);for(n=0;n<a.length;n++)r=a[n],r_(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function zO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VO(e){var t=BO();return function(){var r,n=UO(e);if(t){var i=UO(this).constructor;r=Cm(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return zO(e)}(this,r)}}function GO(){var e;"undefined"!=typeof Reflect&&Cb?GO=Lm(e=Cb).call(e):GO=function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=UO(e)););return e}(e,t);if(n){var i=gh(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return GO.apply(this,arguments)}function HO(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qO(e,t){var r=void 0!==Jh&&Ob(e)||e["@@iterator"];if(!r){if(db(e)||(r=function(e,t){var r;if(e){if("string"==typeof e)return HO(e,t);var n=Tm(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Kb(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?HO(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function KO(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var r=e[Om];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ol(t)?t:String(t)}var WO=Pe,YO=Qe,JO=q,QO=Wr,XO=TypeError,$O=function(e){return function(t,r,n,i){WO(r);var a=YO(t),o=JO(a),s=QO(a),u=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(u in o){i=o[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw XO("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in o&&(i=r(i,o[u],u,a));return i}},ZO={left:$O(!1),right:$O(!0)}.left;Cr({target:"Array",proto:!0,forced:!_p&&ye>79&&ye<83||!_h("reduce")},{reduce:function(e){var t=arguments.length;return ZO(this,e,t,t>1?arguments[1]:void 0)}});var eD,tD=af("Array").reduce,rD=ue,nD=tD,iD=Array.prototype,aD=r((function(e){var t=e.reduce;return e===iD||rD(iD,e)&&t===iD.reduce?nD:t})),oD=function(){function e(){OO(this,e)}return PO(e,null,[{key:"start",value:function(e){return e&&e.length?1===e.length&&e.end(0)-e.start(0)<1e-6||1===e.length&&e.start(0)<0?0:e.start(0):0}},{key:"end",value:function(e){return e&&e.length?1===e.length&&e.end(0)-e.start(0)<1e-6?0:e.end(e.length-1):0}},{key:"get",value:function(e){if(e)try{return e.buffered}catch(VB){}}},{key:"buffers",value:function(e,t){if(!e||!e.length)return[];for(var r=[],n=0,i=e.length;n<i;n++){var a=r.length;if(a&&t){var o=r[a-1],s=o[1];if(e.start(n)-s<=t){var u=e.end(n);u>s&&(o[1]=u)}else r.push([e.start(n),e.end(n)])}else r.push([e.start(n),e.end(n)])}return r}},{key:"totalLength",value:function(e){return e&&e.length?aD(e).call(e,(function(e,t){return e+(t[1]-t[0])}),0):0}},{key:"info",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t||!t.length)return{start:0,end:0,buffers:[]};for(var i=0,a=0,o=0,s=0,u=0,c=0,l=0,f=e.buffers(t,n),h=0,d=f.length;h<d;h++){var p=f[h];if(r+n>=p[0]&&r<=p[1])i=p[0],a=p[1],o=h;else{if(r+n<p[0]){s=p[0],u=p[1];break}r+n>p[1]&&(c=p[0],l=p[1])}}return{start:i,end:a,index:o,buffers:f,nextStart:s,nextEnd:u,prevStart:c,prevEnd:l,currentTime:r,behind:r-i,remaining:a?a-r:0,length:e.totalLength&&e.totalLength(f)}}},{key:"isBuffered",value:function(t,r){if(t){var n=e.get(t);if(null!=n&&n.length)for(var i=0;i<n.length;i++)if(r>=n.start(i)&&r<=n.end(i))return!0}return!1}}]),e}(),sD="undefined"!=typeof window,uD="network",cD="network_timeout",lD="network_forbidden",fD="network_notfound",hD="network_range_not_satisfiable",dD="demux",pD="remux",vD="media",yD="drm",gD="other",mD="runtime",_D={FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",MSE_FULL:"MSE_FULL",MSE_CHANGE_TYPE:"MSE_CHANGE_TYPE",OPTION:"OPTION",DASH:"DASH",LICENSE:"LICENSE",CUSTOM_LICENSE:"CUSTOM_LICENSE",MSE_HIJACK:"MSE_HIJACK",EME_HIJACK:"EME_HIJACK",SIDX:"SIDX",NO_CANPLAY_ERROR:"NO_CANPLAY_ERROR",BUFFERBREAK_ERROR:"BUFFERBREAK_ERROR",WAITING_TIMEOUT_ERROR:"WAITING_TIMEOUT_ERROR",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_CODEC_NOT_SUPPORTED:"MEDIA_ERR_CODEC_NOT_SUPPORTED",MEDIA_ERR_URL_EMPTY:"MEDIA_ERR_URL_EMPTY"},bD=(RO(eD={},"manifest",{HLS:1100,DASH:1200}),RO(eD,uD,2100),RO(eD,cD,2101),RO(eD,lD,2103),RO(eD,fD,2104),RO(eD,hD,2116),RO(eD,dD,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400,SIDX:3410}),RO(eD,pD,{FMP4:4100,MP4:4200}),RO(eD,vD,{MEDIA_ERR_ABORTED:5101,MEDIA_ERR_NETWORK:5102,MEDIA_ERR_DECODE:5103,MEDIA_ERR_SRC_NOT_SUPPORTED:5104,MEDIA_ERR_CODEC_NOT_SUPPORTED:5105,MEDIA_ERR_URL_EMPTY:5106,MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203,MSE_HIJACK:5204,MSE_CHANGE_TYPE:5205,EME_HIJACK:5301}),RO(eD,yD,{LICENSE:7100,CUSTOM_LICENSE:7200}),RO(eD,gD,8e3),RO(eD,mD,{NO_CANPLAY_ERROR:9001,BUFFERBREAK_ERROR:9002,WAITING_TIMEOUT_ERROR:9003}),eD),wD=function(e){MO(r,e);var t=VO(r);function r(e,n,i,a,o){var s;return OO(this,r),(s=t.call(this,o||(null==i?void 0:i.message))).errorType=e===cD?uD:e,s.originError=i,s.ext=a,s.errorCode=bD[e][n]||bD[e],s.errorMessage=s.message,s.errorCode||(s.errorType=gD,s.errorCode=bD[s.errorType]),s}return PO(r,null,[{key:"create",value:function(e,t,n,i,a){return e instanceof r?e:(e instanceof Error&&(n=e,e=""),e||(e=gD),new r(e,t,n,i,a))}},{key:"network",value:function(e){var t;return new r(null!=e&&e.isTimeout?cD:uD,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}]),r}(FO(Error)),kD=1,SD=2,xD=3,ED=4,TD=["Boolean","Number","String","Undefined","Null","Date","Object"],AD=function(){function e(t,r){OO(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==r?void 0:r.logCacheLevel)||3,this.logMaxSize=(null==r?void 0:r.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}return PO(e,[{key:"debug",value:function(){for(var t,r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,oh(t=[kD]).call(t,a)),e.disabled||(n=console).debug.apply(n,oh(r=["[".concat(LD(),"]"),this._prefix]).call(r,a))}},{key:"log",value:function(){for(var t,r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,oh(t=[SD]).call(t,a)),e.disabled||(n=console).log.apply(n,oh(r=["[".concat(LD(),"]"),this._prefix]).call(r,a))}},{key:"warn",value:function(){for(var t,r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,oh(t=[xD]).call(t,a)),e.disabled||(n=console).warn.apply(n,oh(r=["[".concat(LD(),"]"),this._prefix]).call(r,a))}},{key:"error",value:function(){for(var t,r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,oh(t=[ED]).call(t,a)),e.disabled||(n=console).error.apply(n,oh(r=["[".concat(LD(),"]"),this._prefix]).call(r,a))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var a=hb(n).call(n,(function(e){return OD(e)}));t="[".concat(LD(),"]")+this._prefix+gA(a)}catch(s){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var o=this.logTextArray.shift();this.logSize-=o.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function LD(){return(new Date).toLocaleString()}function CD(e){var t;if("object"!==AO(e))return e;var r=Tm(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function OD(e,t,r){var n;r||(r=1),t||(t=2);var i={};if(!e||"object"!==AO(e))return e;var a=Tm(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!jA(TD).call(TD,a))return a;if(!(r>t)){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r===t?i[o]=CD(e[o]):"object"===AO(e[o])?i[o]=OD(e[o],t,r+1):i[o]=e[o]);return i}}function DD(){var e,t,r=new $g((function(r,n){e=r,t=n}));return r.used=!1,r.resolve=function(){return r.used=!0,e.apply(void 0,arguments)},r.reject=function(){return r.used=!0,t.apply(void 0,arguments)},r}function PD(){try{return ob(performance.now(),10)}catch(e){return(new Date).getTime()}}RO(AD,"disabled",!0);var RD=function(e){try{return gA(e)}catch(t){return""}};function MD(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{return sD?e&&"undefined"!=typeof ManagedMediaSource?ManagedMediaSource:window.MediaSource:null}catch(t){}}function UD(e){return/ManagedMediaSource/gi.test(Object.prototype.toString.call(e))}var ID="appendBuffer",BD="removeBuffer",jD="updateDuration",FD=function(){function e(t,r){var n=this;OO(this,e),RO(this,"media",null),RO(this,"mediaSource",null),RO(this,"_openPromise",DD()),RO(this,"_queue",Qh(null)),RO(this,"_sourceBuffer",Qh(null)),RO(this,"_mseFullFlag",{}),RO(this,"_st",0),RO(this,"_opst",0),RO(this,"_logger",null),RO(this,"_config",null),RO(this,"_url",null),RO(this,"_onStartStreaming",(function(){n._logger.debug("startstreaming")})),RO(this,"_onEndStreaming",(function(){n._logger.debug("endstreaming")})),RO(this,"_onSBUpdateEnd",(function(e){var t=n._queue[e];if(t){var r=t[0];if((null==r?void 0:r.opName)!==jD&&t.shift(),r){var i,a,o,s=PD()-n._opst;n._logger.debug(oh(i="UpdateEnd(".concat(e,"/")).call(i,r.opName,")"),RD(function(e){var t=[];if(e instanceof TimeRanges)for(var r=0;r<e.length;r++)t.push({start:e.start(r),end:e.end(r)});return t}(null===(a=n._sourceBuffer[e])||void 0===a?void 0:a.buffered)),s,r.context),r.promise.resolve({name:r.opName,context:r.context,costtime:s});var u=null===(o=r.context)||void 0===o?void 0:o.callback;u&&"function"==typeof u&&u(r.context),n._startQueue(e)}}})),RO(this,"_onSBUpdateError",(function(e,t){var r=n._queue[e];if(r){var i=r[0];i&&(n._logger.error("UpdateError",e,i.opName,i.context),i.promise.reject(new wD(vD,_D.MSE_APPEND_BUFFER,t)))}})),this._config=Lb(e.getDefaultConfig(),r),t&&this.bindMedia(t),this._logger=new AD("MSE"),this._config.openLog&&AD.enable()}var t,r,n;return PO(e,[{key:"isOpened",get:function(){var e;return"open"===(null===(e=this.mediaSource)||void 0===e?void 0:e.readyState)}},{key:"hasOpTasks",get:function(){var e,t=this,r=!1;return Ch(e=ch(this._queue)).call(e,(function(e){var n=t._queue[e];db(n)&&(r||(r=n.length>0))})),r}},{key:"url",get:function(){return this._url}},{key:"duration",get:function(){var e;return(null===(e=this.mediaSource)||void 0===e?void 0:e.duration)||-1}},{key:"isEnded",get:function(){return!!this.mediaSource&&"ended"===this.mediaSource.readyState}},{key:"streaming",get:function(){return!UD(this.mediaSource)||this.mediaSource.streaming}},{key:"isFull",value:function(t){return t?this._mseFullFlag[t]:this._mseFullFlag[e.VIDEO]}},{key:"updateDuration",value:function(e){var t=this,r=this.mediaSource&&this.mediaSource.duration>e;if(this.mediaSource&&this.mediaSource.duration>e){var n,i=0;if(Ch(n=ch(this._sourceBuffer)).call(n,(function(e){try{i=Math.max(t.bufferEnd(e)||0,i)}catch(VB){}})),e<i)return $g.resolve()}return this._enqueueBlockingOp((function(){t.isEnded?t._logger.debug("setDuration but ended"):t.mediaSource&&(t.mediaSource.duration=e,t._logger.debug("setDuration",e))}),jD,{isReduceDuration:r})}},{key:"open",value:function(){var e=this;if(this._openPromise.used&&!this.isOpened&&this.mediaSource){var t=this.mediaSource;t.addEventListener("sourceopen",(function r(){var n=PD()-e._st;e._logger.debug("sourceopen",n),t.removeEventListener("sourceopen",r),e._openPromise.resolve({costtime:n})})),this._openPromise=DD()}return this._openPromise}},{key:"bindMedia",value:(n=CO(TO().mark((function e(t){var r,n,i,a,o=this;return TO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.mediaSource&&!this.media){e.next=3;break}return e.next=3,this.unbindMedia();case 3:if(r=MD(this._config.preferMMS),t&&r){e.next=6;break}throw new Error("Param media or MediaSource does not exist");case 6:return this.media=t,n=this.mediaSource=new r,i=UD(n),this._st=PD(),a=function e(){var r=PD()-o._st;o._logger.debug("sourceopen"),n.removeEventListener("sourceopen",e),dA.revokeObjectURL(t.src),o._openPromise.resolve({costtime:r})},n.addEventListener("sourceopen",a),i&&(n.addEventListener("startstreaming",this._onStartStreaming),n.addEventListener("endstreaming",this._onEndStreaming)),this._url=dA.createObjectURL(n),t.src=this._url,t.disableRemotePlayback=i,e.abrupt("return",this._openPromise);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"unbindMedia",value:(r=CO(TO().mark((function e(){var t,r,n,i=this;return TO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._openPromise.used||this._openPromise.resolve(),t=this.mediaSource){var a,o;if(Ch(a=ch(this._queue)).call(a,(function(e){var t=i._queue[e];t&&Ch(t).call(t,(function(e){var t,r;return null===(t=e.promise)||void 0===t||null===(r=t.resolve)||void 0===r?void 0:r.call(t)}))})),r=!!this.media&&this.media.readyState>=1,n="open"===t.readyState,r&&n)try{t.endOfStream()}catch(VB){}Ch(o=ch(this._sourceBuffer)).call(o,(function(e){try{t.removeSourceBuffer(i._sourceBuffer[e])}catch(VB){}})),UD(t)&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming))}if(this.media){this.media.disableRemotePlayback=!1,this.media.removeAttribute("src");try{this.media.load()}catch(VB){}this.media=null}this.mediaSource=null,this._openPromise=DD(),this._queue=Qh(null),this._sourceBuffer=Qh(null);case 8:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"createSource",value:function(e,t){var r,n;if(!this._sourceBuffer[e]&&this.mediaSource){var i;try{i=this._sourceBuffer[e]=this.mediaSource.addSourceBuffer(t)}catch(VB){throw new wD(vD,_D.MSE_ADD_SB,VB)}i.mimeType=t,i.addEventListener("updateend",Lm(r=this._onSBUpdateEnd).call(r,this,e)),i.addEventListener("error",Lm(n=this._onSBUpdateError).call(n,this,e))}}},{key:"changeType",value:function(e,t){var r=this,n=this._sourceBuffer[e];return this.mediaSource&&n&&n.mimeType!==t?"function"!=typeof n.changeType?$g.reject(new wD(vD,_D.MSE_CHANGE_TYPE,new Error("changeType is not a function"))):this._enqueueOp(e,(function(){try{n.changeType(t)}catch(i){throw new wD(vD,_D.MSE_CHANGE_TYPE,i)}n.mimeType=t,r._onSBUpdateEnd(e)}),"changeType",{mimeType:t}):$g.resolve()}},{key:"createOrChangeSource",value:function(e,t){return this.createSource(e,t),this.changeType(e,t)}},{key:"append",value:function(e,t,r){var n=this;return t&&t.byteLength&&this._sourceBuffer[e]?this._enqueueOp(e,(function(){var i;n.mediaSource&&!n.media.error&&(n._logger.debug("MSE APPEND START",r),n._opst=PD(),null===(i=n._sourceBuffer[e])||void 0===i||i.appendBuffer(t))}),ID,r):$g.resolve()}},{key:"remove",value:function(e,t,r,n){var i=this,a=!1;return this._mseFullFlag[e]&&(a=!0),this._enqueueOp(e,(function(){if(i.mediaSource&&!i.media.error){var a=i._sourceBuffer[e];t>=r||!a?i._onSBUpdateEnd(e):(i._opst=PD(),i._logger.debug("MSE REMOVE START",e,t,r,n),a.remove(t,r))}}),BD,n,a)}},{key:"clearBuffer",value:function(e,t){var r,n,i=this;return Ch(r=ch(this._sourceBuffer)).call(r,(function(r){n=i.remove(r,e,t)})),n||$g.resolve()}},{key:"clearAllBuffer",value:function(){var e,t,r=this;return Ch(e=ch(this._sourceBuffer)).call(e,(function(e){var n=r._sourceBuffer[e];t=r.remove(e,0,oD.end(oD.get(n)))})),t}},{key:"clearOpQueues",value:function(e,t){var r;this._logger.debug("MSE clearOpQueue START");var n=this._queue[e];if(t&&n)this._queue[e]=[];else if(n&&n[e]&&!(n.length<5)){var i=[];Ch(n).call(n,(function(e){e.context&&e.context.isinit&&i.push(e)})),this._queue[e]=Tm(n).call(n,0,2),i.length>0&&(r=this._queue[e]).push.apply(r,i)}}},{key:"endOfStream",value:function(e){var t=this;return this.mediaSource&&"open"===this.mediaSource.readyState?this._enqueueBlockingOp((function(){var r=t.mediaSource;r&&"open"===r.readyState&&(t._logger.debug("MSE endOfStream START"),e?r.endOfStream(e):r.endOfStream())}),"endOfStream"):$g.resolve()}},{key:"setLiveSeekableRange",value:function(e,t){var r=this.mediaSource;e<0||t<e||null==r||!r.setLiveSeekableRange||"open"!==r.readyState||r.setLiveSeekableRange(e,t)}},{key:"getSourceBuffer",value:function(e){return this._sourceBuffer[e]}},{key:"buffered",value:function(e){return oD.get(this._sourceBuffer[e])}},{key:"bufferStart",value:function(e){return oD.start(this.buffered(e))}},{key:"bufferEnd",value:function(e){return oD.end(this.buffered(e))}},{key:"_enqueueOp",value:function(e,t,r,n,i){var a=this;if(!this.mediaSource)return $g.resolve();var o=this._queue[e]=this._queue[e]||[],s={exec:t,promise:DD(),opName:r,context:n};return i?(B_(o).call(o,0,0,s),this._mseFullFlag[e]=!1,this._startQueue(e)):o.push(s),this.isOpened||this.isEnded?1===o.length&&this._startQueue(e):this._openPromise.then((function(){1===o.length&&a._startQueue(e)})),s.promise}},{key:"_enqueueBlockingOp",value:(t=CO(TO().mark((function e(t,r,n){var i,a,o=this;return TO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mediaSource){e.next=2;break}return e.abrupt("return",$g.resolve());case 2:if((i=ch(this._sourceBuffer)).length){e.next=5;break}return e.abrupt("return",t());case 5:return a=[],Ch(i).call(i,(function(e){var t=o._queue[e],i=DD();a.push(i),t.push({exec:function(){i.resolve()},promise:i,opName:r,context:n}),1===t.length&&o._startQueue(e)})),e.abrupt("return",$g.all(a).then((function(){try{return t()}finally{Ch(i).call(i,(function(e){var t=o._queue[e],r=o._sourceBuffer[e];null==t||t.shift(),r&&r.updating||o._startQueue(e)}))}})));case 8:case"end":return e.stop()}}),e,this)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"_startQueue",value:function(e){var t=this._queue[e];if(t){var r=t[0];if(r&&!this._mseFullFlag[e])try{r.exec()}catch(VB){var n,i,a;if(VB&&VB.message&&r_(n=VB.message).call(n,"SourceBuffer is full")>=0)this._mseFullFlag[e]=!0,r.context&&"object"===AO(r.context)&&(r.context.isFull=!0),this._logger.error("[MSE error], context,",r.context," ,name,",r.opName,",err,SourceBuffer is full"),null==r||null===(i=r.promise)||void 0===i||i.reject(new wD(vD,_D.MSE_FULL,VB));else this._logger.error(VB),null==r||null===(a=r.promise)||void 0===a||a.reject(VB.constructor===wD?VB:new wD(vD,_D.MSE_OTHER,VB)),t.shift(),this._startQueue(e)}}}},{key:"setTimeoffset",value:function(e,t,r){var n=this;return this._enqueueOp(e,(function(){t<0&&(t+=.001),n._sourceBuffer[e].timestampOffset=t,n._onSBUpdateEnd(e)}),"setTimeoffset",r)}},{key:"abort",value:function(e,t){var r=this;return this.isOpened?this._enqueueOp(e,(function(){r._sourceBuffer[e].abort(),r._onSBUpdateEnd(e)}),"abort",t):$g.resolve()}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"',t=MD(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]);if(!t)return!1;try{return t.isTypeSupported(e)}catch(VB){return this._logger.error(e,VB),!1}}},{key:"isMMSOnly",value:function(){return"undefined"!=typeof ManagedMediaSource&&"undefined"==typeof MediaSource}},{key:"getDefaultConfig",value:function(){return{openLog:!1,preferMMS:!1}}}]),e}();RO(FD,"VIDEO","video"),RO(FD,"AUDIO","audio");var ND="fetch",zD="xhr",VD="arraybuffer",GD="text",HD="json",qD=function(e){MO(r,e);var t=VO(r);function r(e,n,i,a){var o;return OO(this,r),RO(zO(o=t.call(this,a)),"retryCount",0),RO(zO(o),"isTimeout",!1),RO(zO(o),"loaderType",ND),RO(zO(o),"startTime",0),RO(zO(o),"endTime",0),RO(zO(o),"options",{}),o.url=e,o.request=n,o.response=i,o}return PO(r)}(FO(Error)),KD=Object.prototype.toString;function WD(e){if("[object Object]"!==KD.call(e))return!1;var t=Xh(e);return null===t||t===Object.prototype}function YD(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function JD(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function QD(e,t){var r,n;if(e){if(!t)return e;var i,a=yh(r=hb(n=ch(t)).call(n,(function(e){if(null!=(i=t[e]))return db(i)?e+="[]":i=[i],hb(i).call(i,(function(t){var r,n;return n=t,"[object Date]"===KD.call(n)?t=t.toISOString():function(e){return null!==e&&"object"===AO(e)}(t)&&(t=gA(t)),oh(r="".concat(JD(e),"=")).call(r,JD(t))})).join("&")}))).call(r,Boolean).join("&");if(a){var o=r_(e).call(e,"#");-1!==o&&(e=Tm(e).call(e,0,o)),e+=(-1===r_(e).call(e,"?")?"?":"&")+a}return e}}function XD(e,t,r,n,i,a,o,s,u,c,l){return i=null!=i?dk(i):null,n=ob(n||"0",10),j_(n)&&(n=0),{data:e,done:t,options:{range:u,vid:c,index:s,contentLength:n,age:i,startTime:a,firstByteTime:o,endTime:lS(),priOptions:l},response:r}}function $D(e,t){return Math.round(8*e*1e3/t/1024)}var ZD="error",eP="core.ttfb",tP="core.loadstart",rP="core.loadresponseheaders",nP="core.loadcomplete",iP="core.loadretry",aP="core.sourcebuffercreated",oP="core.analyzedurationexceeded",sP="core.appendbuffer",uP="core.removebuffer",cP="core.buffereos",lP="core.keyframe",fP="core.chaseframe",hP="core.metadataparsed",dP="core.sei",pP="core.seiintime",vP="core.flvscriptdata",yP="core.lowdecode",gP="core.switchurlsuccess",mP="core.switchurlfailed",_P="core.demuxedtrack",bP="core.streamexception",wP="LARGE_AV_FIRST_FRAME_GAP_DETECT",kP="LARGE_VIDEO_DTS_GAP_DETECT",SP="LARGE_AUDIO_DTS_GAP_DETECT",xP="AUDIO_GAP_DETECT",EP="AUDIO_OVERLAP_DETECT",TP="MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT",AP="real_time_speed",LP=2097152,CP=function(e){MO(n,e);var t,r=VO(n);function n(){var e;return OO(this,n),RO(zO(e=r.call(this)),"_abortController",null),RO(zO(e),"_timeoutTimer",null),RO(zO(e),"_reader",null),RO(zO(e),"_response",null),RO(zO(e),"_aborted",!1),RO(zO(e),"_index",-1),RO(zO(e),"_range",null),RO(zO(e),"_receivedLength",0),RO(zO(e),"_running",!1),RO(zO(e),"_logger",null),RO(zO(e),"_vid",""),RO(zO(e),"_firtstByte",0),RO(zO(e),"_onProcessMinLen",0),RO(zO(e),"_onCancel",null),RO(zO(e),"_priOptions",null),e}return PO(n,[{key:"load",value:function(e){var t,r=this,n=e.url,i=e.vid,a=e.timeout,o=e.responseType,s=e.onProgress,u=e.index,c=e.onTimeout,l=e.onCancel,f=e.range,h=e.transformResponse,d=e.request,p=e.params,v=e.logger,y=e.method,g=e.headers,m=e.body,_=e.mode,b=e.credentials,w=e.cache,k=e.redirect,S=e.referrer,x=e.referrerPolicy,E=e.onProcessMinLen,T=e.priOptions,A=e.streamRes,L=e.firstMaxChunkSize;this._logger=v,this._aborted=!1,this._onProcessMinLen=E,this._onCancel=l,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=u,this._range=f||[0,0],this._vid=i||n,this._priOptions=T||{},this._firstMaxChunkSize=L;var C={method:y,headers:g,body:m,mode:_,credentials:b,cache:w,redirect:k,referrer:S,referrerPolicy:x,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},O=!1;clearTimeout(this._timeoutTimer),n=QD(n,p);var D=YD(f);D&&(g=d?d.headers:C.headers=C.headers||(Headers?new Headers:{}),Headers&&g instanceof Headers?g.append("Range",D):g.Range=D),a&&(this._timeoutTimer=Qw((function(){if(O=!0,r.cancel(),c){var e=new qD(n,C,null,"timeout");e.isTimeout=!0,c(e,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions})}}),a));var P=lS();return this._logger.debug("[fetch load start], index,",u,",range,",f),new $g((function(e,t){(A?new $g((function(e){e(A)})):fetch(d||n,d?void 0:C)).then(function(){var i=CO(TO().mark((function i(a){var c,l,d,p;return TO().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=a,!r._aborted&&r._running){i.next=4;break}return i.abrupt("return");case 4:if(h&&(a=h(a,n)||a),a.ok){i.next=7;break}throw new qD(n,C,a,"bad network response");case 7:if(c=lS(),o!==GD){i.next=15;break}return i.next=11,a.text();case 11:l=i.sent,r._running=!1,i.next=37;break;case 15:if(o!==HD){i.next=22;break}return i.next=18,a.json();case 18:l=i.sent,r._running=!1,i.next=37;break;case 22:if(!s){i.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(a,s,P,c),i.abrupt("return");case 29:return i.next=31,a.arrayBuffer();case 31:l=i.sent,l=new Uint8Array(l),r._running=!1,d=lS()-P,p=$D(l.byteLength,d),r.emit(AP,{speed:p,len:l.byteLength,time:d,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 37:r._logger.debug("[fetch load end], index,",u,",range,",f),e(XD(l,!0,a,a.headers.get("Content-Length"),a.headers.get("age"),P,c,u,f,r._vid,r._priOptions));case 39:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){var i;clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!O||((e=e instanceof qD?e:new qD(n,C,null,null===(i=e)||void 0===i?void 0:i.message)).startTime=P,e.endTime=lS(),e.isTimeout=O,e.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},t(e))}))}))}},{key:"cancel",value:(t=CO(TO().mark((function e(){return TO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(VB){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var i=this;if(!e.body||!e.body.getReader){this._running=!1;var a=new qD(e.url,"",e,"onProgress of bad response.body.getReader");return a.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(a)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(LP),this._writeIdx=0);var o,s,u,c=this._reader=e.body.getReader(),l=function(){var a=CO(TO().mark((function a(){var f,h,d,p,v,y,g,m,_,b;return TO().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s=lS(),a.prev=1,a.next=4,c.read();case 4:o=a.sent,u=lS(),a.next=13;break;case 8:return a.prev=8,a.t0=a.catch(1),u=lS(),i._aborted||(i._running=!1,a.t0.options={index:i._index,range:i._range,vid:i._vid,priOptions:i._priOptions},i.reject(a.t0)),a.abrupt("return");case 13:if(h=(null===(f=i._range)||void 0===f?void 0:f.length)>0?i._range[0]:0,d=h+i._receivedLength,!i._aborted){a.next=19;break}return i._running=!1,t(void 0,!1,{range:[d,d],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e),a.abrupt("return");case 19:var w;if(p=o.value?o.value.byteLength:0,i._receivedLength+=p,i._logger.debug("【fetchLoader,onProgress call】,task,",i._range,", start,",d,", end,",h+i._receivedLength,", done,",o.done),i._onProcessMinLen>0){if(i._writeIdx+p>=i._onProcessMinLen||o.done)(v=new Uint8Array(i._writeIdx+p)).set(Tm(w=i._cache).call(w,0,i._writeIdx),0),p>0&&v.set(o.value,i._writeIdx),i._writeIdx=0,i._logger.debug("【fetchLoader,onProgress enough】,done,",o.done,",len,",v.byteLength,", writeIdx,",i._writeIdx);else if(p>0&&i._writeIdx+p<LP)i._cache.set(o.value,i._writeIdx),i._writeIdx+=p,i._logger.debug("【fetchLoader,onProgress cache】,len,",p,", writeIdx,",i._writeIdx);else if(p>0){var k;y=new Uint8Array(i._writeIdx+p+2048),i._logger.debug("【fetchLoader,onProgress extra start】,size,",i._writeIdx+p+2048,", datalen,",p,", writeIdx,",i._writeIdx),y.set(Tm(k=i._cache).call(k,0,i._writeIdx),0),p>0&&y.set(o.value,i._writeIdx),i._writeIdx+=p,delete i._cache,i._cache=y,i._logger.debug("【fetchLoader,onProgress extra end】,len,",p,", writeIdx,",i._writeIdx)}}else v=o.value;(v&&v.byteLength>0||o.done)&&(i._firstMaxChunkSize&&(i._firtstByte?i._cacheData&&((m=new Uint8Array(i._cacheData.byteLength+v.byteLength)).set(i._cacheData,0),m.set(v,i._cacheData.byteLength),v=m,i._cacheData=null):(i._firtstByte++,g=Tm(v).call(v,0,i._firstMaxChunkSize),i._cacheData=Tm(v).call(v,i._firstMaxChunkSize),v=g)),t(v,o.done,{range:[i._range[0]+i._receivedLength-(v?v.byteLength:0),i._range[0]+i._receivedLength],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e)),o.done?(_=lS()-r,b=$D(i._receivedLength,_),i.emit(AP,{speed:b,len:i._receivedLength,time:_,vid:i._vid,index:i._index,range:i._range,priOptions:i._priOptions}),i._running=!1,i._logger.debug("[fetchLoader onProgress end],task,",i._range,",done,",o.done),i.resolve(XD(o,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),r,n,i._index,i._range,i._vid,i._priOptions))):i._firstMaxChunkSize?Qw((function(){l()}),0):l();case 25:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(){return a.apply(this,arguments)}}();l()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),n}(iw);var OP=function(e){MO(r,e);var t=VO(r);function r(){var e;return OO(this,r),RO(zO(e=t.call(this)),"_xhr",null),RO(zO(e),"_aborted",!1),RO(zO(e),"_timeoutTimer",null),RO(zO(e),"_range",null),RO(zO(e),"_receivedLength",0),RO(zO(e),"_url",null),RO(zO(e),"_onProgress",null),RO(zO(e),"_index",-1),RO(zO(e),"_headers",null),RO(zO(e),"_currentChunkSizeKB",384),RO(zO(e),"_timeout",null),RO(zO(e),"_xhr",null),RO(zO(e),"_withCredentials",null),RO(zO(e),"_startTime",-1),RO(zO(e),"_loadCompleteResolve",null),RO(zO(e),"_loadCompleteReject",null),RO(zO(e),"_runing",!1),RO(zO(e),"_logger",!1),RO(zO(e),"_vid",""),RO(zO(e),"_responseType",void 0),RO(zO(e),"_credentials",void 0),RO(zO(e),"_method",void 0),RO(zO(e),"_transformResponse",void 0),RO(zO(e),"_firstRtt",void 0),RO(zO(e),"_onCancel",null),RO(zO(e),"_priOptions",null),e}return PO(r,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=QD(e.url,e.params);var r=lS();return new $g((function(e,r){t._loadCompleteResolve=e,t._loadCompleteReject=r,t._startLoad()})).catch((function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof qD?e:new qD(t._url,t._request)).startTime=r,e.endTime=lS(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e}))}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===VD&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{var r,n;this._startTime=lS();var i=this._xhr=new XMLHttpRequest;i.open(this._method||"GET",this._url,!0),i.responseType=this._responseType,this._timeout&&(i.timeout=this._timeout),i.withCredentials=this._withCredentials,i.onload=Lm(r=this._onLoad).call(r,this),i.onreadystatechange=Lm(n=this._onReadyStatechange).call(n,this),i.onerror=function(e){var r,n,i;t._running=!1;var a=new qD(t._url,t._request,null==e||null===(r=e.currentTarget)||void 0===r?void 0:r.response,"xhr.onerror.status:"+(null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.status)+",statusText,"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.statusText));a.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(a)},i.ontimeout=function(e){t.cancel();var r=new qD(t._url,t._request,{status:408},"timeout");t._onTimeout&&(r.isTimeout=!0,t._onTimeout(r,{index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions})),r.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(r)};var a,o=this._headers||{},s=YD(e);if(s&&(o.Range=s),o)Ch(a=ch(o)).call(a,(function(e){i.setRequestHeader(e,o[e])}));this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),i.send(this._body)}catch(u){u.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(u)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=lS())}},{key:"_onLoad",value:function(e){var t,r=e.target.status;if(r<200||r>299){var n=new qD(this._url,null,EO(EO({},e.target.response),{},{status:r}),"bad response,status:"+r);return n.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(n)}var i,a=null,o=!1,s=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===VD){var u,c=new Uint8Array(e.target.response);if(i=s+this._receivedLength,c&&c.byteLength>0){this._receivedLength+=c.byteLength;var l=lS()-this._startTime,f=$D(this._receivedLength,l);this.emit(AP,{speed:f,len:this._receivedLength,time:l,vid:this._vid,index:this._index,range:[i,s+this._receivedLength],priOptions:this._priOptions})}a=c,o=!((null===(u=this._range)||void 0===u?void 0:u.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",i,"end ",s+this._receivedLength,",dataLen,",c?c.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",o)}else o=!0,a=e.target.response;var h={ok:r>=200&&r<300,status:r,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(h=this._transformResponse(h,this._url)||h),this._onProgress&&this._onProgress(a,o,{index:this._index,vid:this._vid,range:[i,s+this._receivedLength],startTime:this._startTime,endTime:lS(),priOptions:this._priOptions},h),o?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(XD(this._onProgress?null:a,o,h,h.headers["content-length"],h.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted)return this._aborted=!0,this._runing=!1,GO(UO(r.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},i=qO(kk(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(i.s();!(r=i.n()).done;){var a=r.value.split(": ");n[a[0].toLowerCase()]=Tm(a).call(a,1).join(": ")}}catch(o){i.e(o)}finally{i.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),r}(iw),DP=["retry","retryDelay","onRetryError","transformError"],PP=function(){function e(t,r){OO(this,e),this.promise=DD(),this.alive=!!r.onProgress,!r.logger&&(r.logger=new AD("Loader")),this._loaderType=t,this._loader=t===ND&&"undefined"!=typeof fetch?new CP:new OP,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=r.retryCheckFunc,this._logger=r.logger}var t;return PO(e,[{key:"exec",value:function(){var e=this,t=this._config,r=t.retry,n=t.retryDelay,i=t.onRetryError,a=t.transformError,o=NO(t,DP),s=function(){var t=CO(TO().mark((function t(){var u,c,l;return TO().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(o);case 3:u=t.sent,e.promise.resolve(u),t.next=27;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,c=t.t0,a&&(c=a(c)||c),i&&e._retryCount>0&&i(c,e._retryCount,{index:o.index,vid:o.vid,range:o.range,priOptions:o.priOptions}),e._retryCount++,l=!0,e._retryCheckFunc&&(l=e._retryCheckFunc(t.t0)),!(l&&e._retryCount<=r)){t.next=26;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",o.range),e._retryTimer=Qw(s,n),t.abrupt("return");case 26:e.promise.reject(c);case 27:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=CO(TO().mark((function e(){return TO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function RP(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if((t=yh(t).call(t,Boolean)).length<2)return t[0];var n=new Uint8Array(aD(t).call(t,(function(e,t){return e+t.byteLength}),0)),i=0;return Ch(t).call(t,(function(e){n.set(e,i),i+=e.byteLength})),n}function MP(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new $g((function(t){return Qw(t,e)}))}var UP=function(e){MO(n,e);var t,r=VO(n);function n(e){var t;return OO(this,n),RO(zO(t=r.call(this,e)),"type",ND),RO(zO(t),"_queue",[]),RO(zO(t),"_alive",[]),RO(zO(t),"_currentTask",null),RO(zO(t),"_finnalUrl",""),RO(zO(t),"_config",void 0),t._config=function(e){return EO({loaderType:ND,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:GD,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}(e),t._config.loaderType!==zD&&CP.isSupported()||(t.type=zD),t.log=e.logger,t}return PO(n,[{key:"isFetch",value:function(){return this.type===ND}},{key:"load",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?r=e:r.url=e||r.url||this._config.url,(r=Lb({},this._config,r)).params&&(r.params=Lb({},r.params)),r.headers&&WD(r.headers)&&(r.headers=Lb({},r.headers)),r.body&&WD(r.body)&&(r.body=Lb({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new PP(this.type,r);return n.loader.on(AP,(function(e){t.emit(AP,e)})),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(t=CO(TO().mark((function e(){var t;return TO().wrap((function(e){for(var r,n,i;;)switch(e.prev=e.next){case 0:return t=oh(r=hb(n=this._queue).call(n,(function(e){return e.cancel()}))).call(r,hb(i=this._alive).call(i,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,$g.all(t);case 6:return e.next=8,MP();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch((function(e){}));t&&"function"==typeof t.finally&&t.finally((function(){var t,r,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(r=e._alive)||void 0===r?void 0:r.length)>0&&(e._alive=yh(n=e._alive).call(n,(function(t){return t&&t!==e._currentTask})));e._processTask()}))}}}],[{key:"isFetchSupport",value:function(){return CP.isSupported()}}]),n}(iw),IP=function(){function e(){OO(this,e),RO(this,"_prevCurrentTime",0)}return PO(e,[{key:"do",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(e){var i=e.currentTime,a=0;if(this._prevCurrentTime===i){var o=oD.info(oD.get(e),i);if(!o.buffers.length)return;r&&o.nextStart||o.nextStart&&o.nextStart-i<t?a=o.nextStart+.1:o.end&&o.end-i>n&&!e.seeking&&(a=i+.1)}this._prevCurrentTime=i,a&&i!==a&&(e.currentTime=a)}}}]),e}();EL("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),NL);var BP=re.Set,jP=Le,FP=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"add"in e&&"delete"in e&&"keys"in e)return e;throw TypeError(jP(e)+" is not a set")},NP=eC,zP=se("Set"),VP=zP.prototype,GP={Set:zP,add:NP("add",1),has:NP("has",1),remove:NP("delete",1),proto:VP},HP=fC,qP=function(e,t,r){return r?HP(e.keys(),t):e.forEach(t)},KP=qP,WP=GP.Set,YP=GP.add,JP=function(e){var t=new WP;return KP(e,(function(e){YP(t,e)})),t},QP=function(e){return e.size},XP=Pe,$P=nr,ZP=R,eR=Vr,tR=TypeError,rR=Math.max,nR=function(e,t,r,n){this.set=e,this.size=t,this.has=r,this.keys=n};nR.prototype={getIterator:function(){return $P(ZP(this.keys,this.set))},includes:function(e){return ZP(this.has,this.set,e)}};var iR=function(e){$P(e);var t=+e.size;if(t!=t)throw tR("Invalid size");return new nR(e,rR(eR(t),0),XP(e.has),XP(e.keys))},aR=FP,oR=JP,sR=QP,uR=iR,cR=qP,lR=fC,fR=GP.has,hR=GP.remove,dR=function(e){var t=aR(this),r=uR(e),n=oR(t);return sR(t)<=r.size?cR(t,(function(e){r.includes(e)&&hR(n,e)})):lR(r.getIterator(),(function(e){fR(t,e)&&hR(n,e)})),n},pR=function(){return!1},vR=dR;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{difference:vR});var yR=FP,gR=QP,mR=iR,_R=qP,bR=fC,wR=GP.Set,kR=GP.add,SR=GP.has,xR=function(e){var t=yR(this),r=mR(e),n=new wR;return gR(t)>r.size?bR(r.getIterator(),(function(e){SR(t,e)&&kR(n,e)})):_R(t,(function(e){r.includes(e)&&kR(n,e)})),n},ER=xR;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{intersection:ER});var TR=FP,AR=GP.has,LR=QP,CR=iR,OR=qP,DR=fC,PR=Id,RR=function(e){var t=TR(this),r=CR(e);if(LR(t)<=r.size)return!1!==OR(t,(function(e){if(r.includes(e))return!1}),!0);var n=r.getIterator();return!1!==DR(n,(function(e){if(AR(t,e))return PR(n,"normal",!1)}))},MR=RR;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{isDisjointFrom:MR});var UR=FP,IR=QP,BR=qP,jR=iR,FR=function(e){var t=UR(this),r=jR(e);return!(IR(t)>r.size)&&!1!==BR(t,(function(e){if(!r.includes(e))return!1}),!0)},NR=FR;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{isSubsetOf:NR});var zR=FP,VR=GP.has,GR=QP,HR=iR,qR=fC,KR=Id,WR=function(e){var t=zR(this),r=HR(e);if(GR(t)<r.size)return!1;var n=r.getIterator();return!1!==qR(n,(function(e){if(!VR(t,e))return KR(n,"normal",!1)}))},YR=WR;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{isSupersetOf:YR});var JR=FP,QR=JP,XR=iR,$R=fC,ZR=GP.add,eM=GP.has,tM=GP.remove,rM=function(e){var t=JR(this),r=XR(e).getIterator(),n=QR(t);return $R(r,(function(e){eM(t,e)?tM(n,e):ZR(n,e)})),n},nM=rM;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{symmetricDifference:nM});var iM=FP,aM=GP.add,oM=JP,sM=iR,uM=fC,cM=function(e){var t=iM(this),r=sM(e).getIterator(),n=oM(t);return uM(r,(function(e){aM(n,e)})),n},lM=cM;Cr({target:"Set",proto:!0,real:!0,forced:!pR()},{union:lM});var fM=BP;Cr({target:"Set",stat:!0,forced:!0},{from:JL}),Cr({target:"Set",stat:!0,forced:!0},{of:XL});var hM=FP,dM=GP.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=hM(this),t=0,r=arguments.length;t<r;t++)dM(e,arguments[t]);return e}});var pM=FP,vM=GP.remove;Cr({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=pM(this),r=!0,n=0,i=arguments.length;n<i;n++)e=vM(t,arguments[n]),r=r&&e;return!!r}});var yM=Xt,gM=FP,mM=qP;Cr({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=gM(this),r=yM(e,arguments.length>1?arguments[1]:void 0);return!1!==mM(t,(function(e){if(!r(e,e,t))return!1}),!0)}});var _M=cn,bM=Ze,wM=K,kM=mu,SM=dt("iterator"),xM=Object,EM=L,TM=function(e){if(wM(e))return!1;var t=xM(e);return void 0!==t[SM]||"@@iterator"in t||bM(kM,_M(t))},AM=te,LM=se("Set"),CM=function(e){return function(e){return AM(e)&&"number"==typeof e.size&&EM(e.has)&&EM(e.keys)}(e)?e:TM(e)?new LM(e):e},OM=R,DM=CM,PM=dR;Cr({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return OM(PM,this,DM(e))}});var RM=Xt,MM=FP,UM=qP,IM=GP.Set,BM=GP.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=MM(this),r=RM(e,arguments.length>1?arguments[1]:void 0),n=new IM;return UM(t,(function(e){r(e,e,t)&&BM(n,e)})),n}});var jM=Xt,FM=FP,NM=qP;Cr({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=FM(this),r=jM(e,arguments.length>1?arguments[1]:void 0),n=NM(t,(function(e){if(r(e,e,t))return{value:e}}),!0);return n&&n.value}});var zM=R,VM=CM,GM=xR;Cr({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return zM(GM,this,VM(e))}});var HM=R,qM=CM,KM=RR;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return HM(KM,this,qM(e))}});var WM=R,YM=CM,JM=FR;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return WM(JM,this,YM(e))}});var QM=R,XM=CM,$M=WR;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return QM($M,this,XM(e))}});var ZM=Cr,eU=g,tU=FP,rU=qP,nU=ti,iU=eU([].join),aU=eU([].push);ZM({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=tU(this),r=void 0===e?",":nU(e),n=[];return rU(t,(function(e){aU(n,e)})),iU(n,r)}});var oU=Xt,sU=FP,uU=qP,cU=GP.Set,lU=GP.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=sU(this),r=oU(e,arguments.length>1?arguments[1]:void 0),n=new cU;return uU(t,(function(e){lU(n,r(e,e,t))})),n}});var fU=Pe,hU=FP,dU=qP,pU=TypeError;Cr({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=hU(this),r=arguments.length<2,n=r?void 0:arguments[1];if(fU(e),dU(t,(function(i){r?(r=!1,n=i):n=e(n,i,i,t)})),r)throw pU("Reduce of empty set with no initial value");return n}});var vU=Xt,yU=FP,gU=qP;Cr({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=yU(this),r=vU(e,arguments.length>1?arguments[1]:void 0);return!0===gU(t,(function(e){if(r(e,e,t))return!0}),!0)}});var mU=R,_U=CM,bU=rM;Cr({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return mU(bU,this,_U(e))}});var wU=R,kU=CM,SU=cM;Cr({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return wU(SU,this,kU(e))}});var xU=r(fM),EU=function(){function e(t){var r=this;OO(this,e),RO(this,"_seiSet",new xU),this.emitter=t,t.on(dP,(function(e){e&&r._seiSet.add(e)}))}return PO(e,[{key:"throw",value:function(e,t){var r,n,i=this;if(null!=e&&this._seiSet.size){var a=e-.2,o=e+.2,s=[];Ch(r=this._seiSet).call(r,(function(e){e.time>=a&&e.time<=o&&s.push(e)})),Ch(s).call(s,(function(e){i._seiSet.delete(e),i.emitter.emit(pP,e)})),t&&Ch(n=this._seiSet).call(n,(function(t){t.time<e-5&&i._seiSet.delete(t)}))}}},{key:"reset",value:function(){this._seiSet.clear()}}]),e}(),TU=function(){function e(t){OO(this,e),RO(this,"_chunkSpeed",0),RO(this,"_chunkCache",[]),RO(this,"_speeds",[]),RO(this,"_totalSize",0),RO(this,"_totalCost",0),this._opts=t||{}}return PO(e,[{key:"addRecord",value:function(e,t){var r;e&&t&&(this._speeds.push(8e3*e/t),this._speeds=Tm(r=this._speeds).call(r,-3))}},{key:"addChunkRecord",value:function(e,t){var r,n;if(e&&t&&!(e<((null===(r=this._opts)||void 0===r?void 0:r.skipChunkSize)||1e3))){this._totalSize+=e,this._totalCost+=t,this._chunkSpeed=8e3*e/t,this._chunkCache.push({size:e,duration:t,timestamp:performance.now()});var i,a=(null===(n=this._opts)||void 0===n?void 0:n.chunkCountForSpeed)||50;if(this._chunkCache.length>a)this._chunkCache=Tm(i=this._chunkCache).call(i,-a)}}},{key:"getAvgSpeed",value:function(){var e,t,r,n;if(!this._chunkCache.length&&!this._speeds.length)return 0;if(this._speeds.length)return aD(n=this._speeds).call(n,(function(e,t){return e+t}))/this._speeds.length;var i=this._chunkCache[this._chunkCache.length-1],a=performance.now()-i.timestamp;return a>((null===(r=this._opts)||void 0===r?void 0:r.longtimeNoReceived)||3e3)&&this._chunkCache.push({size:0,duration:a,timestamp:performance.now()}),8e3*aD(e=this._chunkCache).call(e,(function(e,t){return e+t.size}),0)/aD(t=this._chunkCache).call(t,(function(e,t){return e+t.duration}),0)}},{key:"getLatestSpeed",value:function(){return this._chunkCache.length||this._speeds.length?this._speeds.length?this._speeds[this._speeds.length-1]:this._chunkSpeed:0}},{key:"getTotalSize",value:function(){return this._totalSize}},{key:"getTotalCost",value:function(){return this._totalCost}},{key:"reset",value:function(){this._chunkCache=[],this._speeds=[],this._totalSize=0,this._totalCost=0}}]),e}(),AU=function(){function e(t){OO(this,e),RO(this,"encodeType",""),RO(this,"audioCodec",""),RO(this,"videoCodec",""),RO(this,"domain",""),RO(this,"fps",0),RO(this,"bitrate",0),RO(this,"width",0),RO(this,"height",0),RO(this,"samplerate",0),RO(this,"channelCount",0),RO(this,"gop",0),RO(this,"_bitsAccumulateSize",0),RO(this,"_bitsAccumulateDuration",0),RO(this,"_startGopId",-1),this._timescale=t}return PO(e,[{key:"getStats",value:function(){return{encodeType:this.encodeType,audioCodec:this.audioCodec,videoCodec:this.videoCodec,domain:this.domain,fps:this.fps,bitrate:this.bitrate,width:this.width,height:this.height,samplerate:this.samplerate,channelCount:this.channelCount,gop:this.gop}}},{key:"setEncodeType",value:function(e){this.encodeType=e}},{key:"setFpsFromScriptData",value:function(e){var t,r=e.data,n=null==r||null===(t=r.onMetaData)||void 0===t?void 0:t.framerate;n&&n>0&&n<100&&(this.fps=n)}},{key:"setVideoMeta",value:function(e){if(this.width=e.width,this.height=e.height,this.videoCodec=e.codec,this.encodeType=e.codecType,e.fpsNum&&e.fpsDen){var t=e.fpsNum/e.fpsDen;t>0&&t<100&&(this.fps=t)}}},{key:"setAudioMeta",value:function(e){this.audioCodec=e.codec,this.samplerate=e.sampleRate,this.channelCount=e.channelCount}},{key:"setDomain",value:function(e){var t;this.domain=Tm(t=e.split("/")).call(t,2,3)[0]}},{key:"updateBitrate",value:function(e){var t=this;if((!this.fps||this.fps>=100)&&e.length){var r=aD(e).call(e,(function(e,t){return e+t.duration}),0)/e.length;this.fps=Math.round(this._timescale/r)}Ch(e).call(e,(function(e){var r;-1===t._startGopId&&(t._startGopId=e.gopId),e.gopId===t._startGopId&&t.gop++,t._bitsAccumulateDuration+=e.duration/(t._timescale/1e3),t._bitsAccumulateSize+=aD(r=e.units).call(r,(function(e,t){return e+t.length}),0),t._bitsAccumulateDuration>=1e3&&(t.bitrate=8*t._bitsAccumulateSize,t._bitsAccumulateDuration=0,t._bitsAccumulateSize=0)}))}}]),e}(),LU=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;OO(this,e),RO(this,"_core",null),RO(this,"_samples",[]),this._core=t,this._timescale=r,this._stats=new AU(r),this._bindEvents()}return PO(e,[{key:"getStats",value:function(){var e,t,r,n,i,a,o,s,u,c,l,f=(null===(e=this._core)||void 0===e?void 0:e.media)||{},h=f.currentTime,d=void 0===h?0:h,p=f.decodeFps,v=void 0===p?0:p;return EO(EO({},this._stats.getStats()),{},{downloadSpeed:(null===(t=this._core)||void 0===t||null===(r=t.speedInfo)||void 0===r?void 0:r.call(t).speed)||0,avgSpeed:(null===(n=this._core)||void 0===n||null===(i=n.speedInfo)||void 0===i?void 0:i.call(n).avgSpeed)||0,totalReceivedByte:(null===(a=this._core)||void 0===a||null===(o=a.speedInfo)||void 0===o?void 0:o.call(a).totalSize)||0,totalReceivedCost:(null===(s=this._core)||void 0===s||null===(u=s.speedInfo)||void 0===u?void 0:u.call(s).totalCost)||0,currentTime:d,bufferEnd:(null===(c=this._core)||void 0===c||null===(l=c.bufferInfo())||void 0===l?void 0:l.remaining)||0,decodeFps:v})}},{key:"_bindEvents",value:function(){var e=this;this._core.on(_P,(function(t){var r=t.videoTrack;return e._stats.updateBitrate(r.samples)})),this._core.on(vP,(function(t){e._stats.setFpsFromScriptData(t)})),this._core.on(hP,(function(t){"video"===t.type?e._stats.setVideoMeta(t.track):e._stats.setAudioMeta(t.track)})),this._core.on(eP,(function(t){e._stats.setDomain(t.responseUrl)}))}},{key:"reset",value:function(){this._samples=[],this._stats=new AU(this._timescale)}}]),e}();function CU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OU(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Yh(e,VU(n.key),n)}}function DU(e,t,r){return t&&OU(e.prototype,t),r&&OU(e,r),Yh(e,"prototype",{writable:!1}),e}function PU(e,t,r){return(t=VU(t))in e?Yh(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RU(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Qh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Yh(e,"prototype",{writable:!1}),t&&UU(e,t)}function MU(e){var t;return(MU=$h?Lm(t=Xh).call(t):function(e){return e.__proto__||Xh(e)})(e)}function UU(e,t){var r;return(UU=$h?Lm(r=$h).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function IU(e,t){if(t&&("object"===Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function BU(e){var t=function(){if("undefined"==typeof Reflect||!Cm)return!1;if(Cm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Cm(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=MU(e);if(t){var i=MU(this).constructor;r=Cm(n,arguments,i)}else r=n.apply(this,arguments);return IU(this,r)}}function jU(e,t){return function(e){if(db(e))return e}(e)||function(e,t){var r=null==e?null:void 0!==Jh&&Ob(e)||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(l){c=!0,i=l}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||NU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function FU(e){return function(e){if(db(e))return zU(e)}(e)||function(e){if(void 0!==Jh&&null!=Ob(e)||null!=e["@@iterator"])return Kb(e)}(e)||NU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NU(e,t){var r;if(e){if("string"==typeof e)return zU(e,t);var n=Tm(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Kb(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zU(e,t):void 0}}function zU(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VU(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var r=e[Om];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ol(t)?t:String(t)}var GU="video",HU="audio",qU="metadata",KU="avc",WU="hevc",YU="aac",JU="g7110a",QU="g7110m",XU="opus",$U="mp3",ZU="LARGE_AV_SHIFT",eI="LARGE_VIDEO_GAP",tI="LARGE_VIDEO_GAP_BETWEEN_CHUNK",rI="LARGE_AUDIO_GAP",nI="AUDIO_FILLED",iI="AUDIO_DROPPED",aI=function(){function e(){CU(this,e),PU(this,"id",1),PU(this,"type",GU),PU(this,"codecType",KU),PU(this,"pid",-1),PU(this,"hvcC",void 0),PU(this,"codec",""),PU(this,"timescale",0),PU(this,"formatTimescale",0),PU(this,"sequenceNumber",0),PU(this,"baseMediaDecodeTime",0),PU(this,"baseDts",0),PU(this,"duration",0),PU(this,"warnings",[]),PU(this,"samples",[]),PU(this,"pps",[]),PU(this,"sps",[]),PU(this,"vps",[]),PU(this,"fpsNum",0),PU(this,"fpsDen",0),PU(this,"sarRatio",[]),PU(this,"width",0),PU(this,"height",0),PU(this,"nalUnitSize",4),PU(this,"present",!1),PU(this,"isVideoEncryption",!1),PU(this,"isAudioEncryption",!1),PU(this,"isVideo",!0),PU(this,"lastKeyFrameDts",0),PU(this,"kid",null),PU(this,"pssh",null),PU(this,"ext",void 0)}return DU(e,[{key:"reset",value:function(){this.sequenceNumber=this.width=this.height=this.fpsDen=this.fpsNum=this.duration=this.baseMediaDecodeTime=this.timescale=0,this.codec="",this.present=!1,this.pid=-1,this.pps=[],this.sps=[],this.vps=[],this.sarRatio=[],this.samples=[],this.warnings=[],this.hvcC=null}},{key:"firstDts",get:function(){return this.samples.length?this.samples[0].dts:null}},{key:"firstPts",get:function(){return this.samples.length?this.samples[0].pts:null}},{key:"samplesDuration",get:function(){if(this.samples.length>0){var e=this.samples[0],t=this.samples[this.samples.length-1];return t.dts-e.dts+t.duration}return 0}},{key:"exist",value:function(){return!!/av01/.test(this.codec)||!!(this.pps.length&&this.sps.length&&this.codec)}},{key:"hasSample",value:function(){return!!this.samples.length}},{key:"isEncryption",get:function(){return this.isVideoEncryption}}]),e}(),oI=function(){function e(){CU(this,e),PU(this,"id",2),PU(this,"type",HU),PU(this,"codecType",YU),PU(this,"pid",-1),PU(this,"codec",""),PU(this,"container",""),PU(this,"sequenceNumber",0),PU(this,"sampleDuration",0),PU(this,"timescale",0),PU(this,"formatTimescale",0),PU(this,"baseMediaDecodeTime",0),PU(this,"duration",0),PU(this,"warnings",[]),PU(this,"samples",[]),PU(this,"baseDts",0),PU(this,"sampleSize",16),PU(this,"sampleRate",0),PU(this,"channelCount",0),PU(this,"objectType",0),PU(this,"sampleRateIndex",0),PU(this,"config",[]),PU(this,"present",!1),PU(this,"isVideoEncryption",!1),PU(this,"isAudioEncryption",!1),PU(this,"kid",null),PU(this,"ext",void 0)}return DU(e,[{key:"reset",value:function(){this.sequenceNumber=0,this.timescale=0,this.sampleDuration=0,this.sampleRate=0,this.channelCount=0,this.baseMediaDecodeTime=0,this.present=!1,this.pid=-1,this.codec="",this.samples=[],this.config=[],this.warnings=[]}},{key:"exist",value:function(){return!(!this.sampleRate||!this.channelCount||!this.codec&&!this.container||this.codecType!==YU&&this.codecType!==JU&&this.codecType!==QU&&this.codecType!==XU&&this.codecType!==$U)}},{key:"hasSample",value:function(){return!!this.samples.length}},{key:"isEncryption",get:function(){return this.isAudioEncryption}},{key:"firstDts",get:function(){return this.samples.length?this.samples[0].dts:null}},{key:"firstPts",get:function(){return this.samples.length?this.samples[0].pts:null}},{key:"samplesDuration",get:function(){if(this.samples.length>0){var e=this.samples[0],t=this.samples[this.samples.length-1];return t.dts-e.dts+t.duration}return 0}}]),e}(),sI=function(){function e(t,r,n){CU(this,e),PU(this,"flag",{}),PU(this,"keyframe",!1),PU(this,"gopId",0),PU(this,"duration",0),PU(this,"size",0),PU(this,"units",[]),PU(this,"chromaFormat",420),this.originPts=this.pts=t,this.originDts=this.dts=r,n&&(this.units=n)}return DU(e,[{key:"cts",get:function(){return this.pts-this.dts}},{key:"setToKeyframe",value:function(){this.keyframe=!0,this.flag.dependsOn=2,this.flag.isNonSyncSample=0}}]),e}(),uI=DU((function e(t,r,n,i){CU(this,e),PU(this,"duration",1024),PU(this,"flag",{dependsOn:2,isNonSyncSample:0}),PU(this,"keyframe",!0),this.originPts=this.pts=this.dts=t,this.data=r,this.size=r.byteLength,this.sampleOffset=i,n&&(this.duration=n)})),cI=DU((function e(t,r){CU(this,e),PU(this,"time",0),this.data=t,this.originPts=this.pts=r})),lI=function(e){RU(r,e);var t=BU(r);function r(){return CU(this,r),t.apply(this,arguments)}return DU(r)}(cI),fI=function(e){RU(r,e);var t=BU(r);function r(){return CU(this,r),t.apply(this,arguments)}return DU(r)}(cI),hI=function(){function e(){CU(this,e),PU(this,"id",3),PU(this,"type",qU),PU(this,"timescale",0),PU(this,"flvScriptSamples",[]),PU(this,"seiSamples",[])}return DU(e,[{key:"exist",value:function(){return!(!this.flvScriptSamples.length&&!this.seiSamples.length||!this.timescale)}},{key:"reset",value:function(){this.timescale=0,this.flvScriptSamples=[],this.seiSamples=[]}},{key:"hasSample",value:function(){return!(!this.flvScriptSamples.length&&!this.seiSamples.length)}}]),e}(),dI=a.isFinite;Cr({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&dI(e)}});var pI=r(re.Number.isFinite),vI=function(){function e(t){CU(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]")}return DU(e,[{key:"warn",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(r=console).warn.apply(r,oh(t=[this._prefix]).call(t,i))}}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();PU(vI,"disabled",!0);var yI="undefined"!=typeof window,gI=yI&&navigator.userAgent.toLocaleLowerCase(),mI=yI&&/^((?!chrome|android).)*safari/.test(gI),_I=yI&&jA(gI).call(gI,"firefox"),bI=yI&&jA(gI).call(gI,"android"),wI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"getRateIndexByRate",value:function(t){var r;return r_(r=e.FREQ).call(r,t)}},{key:"parseADTS",value:function(t,r){for(var n=t.length,i=0;i+2<n&&(255!==t[i]||240!=(246&t[i+1]));)i++;if(!(i>=n)){var a=i,o=[],s=(60&t[i+2])>>>2,u=e.FREQ[s];if(!u)throw new Error("Invalid sampling index: ".concat(s));for(var c,l,f=1+((192&t[i+2])>>>6),h=(1&t[i+2])<<2|(192&t[i+3])>>>6,d=e._getConfig(s,h,f),p=d.config,v=d.codec,y=0,g=e.getFrameDuration(u);i+7<n;)if(255===t[i]&&240==(246&t[i+1])){if(!(l=(3&t[i+3])<<11|t[i+4]<<3|(224&t[i+5])>>5)||n-i<l)break;c=2*(1&~t[i+1]),o.push({pts:r+y*g,data:t.subarray(i+7+c,i+l)}),y++,i+=l}else i++;return{skip:a,remaining:i>=n?void 0:t.subarray(i),frames:o,samplingFrequencyIndex:s,sampleRate:u,objectType:f,channelCount:h,codec:v,config:p,originCodec:"mp4a.40.".concat(f)}}}},{key:"parseAudioSpecificConfig",value:function(t){if(t.length){var r=t[0]>>>3,n=(7&t[0])<<1|t[1]>>>7,i=(120&t[1])>>>3,a=e.FREQ[n];if(a){var o=e._getConfig(n,i,r);return{samplingFrequencyIndex:n,sampleRate:a,objectType:r,channelCount:i,config:o.config,codec:o.codec,originCodec:"mp4a.40.".concat(r)}}}}},{key:"getFrameDuration",value:function(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}},{key:"_getConfig",value:function(e,t,r){var n,i,a=[];return _I?e>=6?(n=5,i=e-3):(n=2,i=e):bI?(n=2,i=e):(n=5,i=e,e>=6?i=e-3:1===t&&(n=2,i=e)),a[0]=n<<3,a[0]|=(14&e)>>1,a[1]=(1&e)<<7,a[1]|=t<<3,5===n&&(a[1]|=(14&i)>>1,a[2]=(1&i)<<7,a[2]|=8,a[3]=0),{config:a,codec:"mp4a.40.".concat(n)}}},{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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(6===t)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])}else{if(1===t)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(2===t)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(3===t)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])}}}]),e}();PU(wI,"FREQ",[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350]);var kI=Cr,SI=g,xI=oi,EI=RangeError,TI=String.fromCharCode,AI=String.fromCodePoint,LI=SI([].join);kI({target:"String",stat:!0,arity:1,forced:!!AI&&1!=AI.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,i=0;n>i;){if(t=+arguments[i++],xI(t,1114111)!==t)throw EI(t+" is not a valid code point");r[i]=t<65536?TI(t):TI(55296+((t-=65536)>>10),t%1024+56320)}return LI(r,"")}});var CI=r(re.String.fromCodePoint),OI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"getFrameDuration",value:function(e){return 20}},{key:"parseHeaderPackets",value:function(e){if(e.length){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r="",n=0;n<8;n++)r+=CI(e[n]);if("OpusHead"!==r)throw new Error("Invalid Opus MagicSignature");var i=e[9];console.log("Pre-skip",e[10],e[11]);var a=t.getUint32(12,!0),o=t.getInt16(16,!0);if(a){return{outputGain:o,sampleRate:a,channelCount:i,config:new Uint8Array(e.buffer,e.byteOffset+8,e.byteLength-8),codec:"opus",originCodec:"opus"}}}}}]),e}(),DI=1e3,PI=5e3,RI=function(){function e(t,r,n){CU(this,e),this.videoTrack=t,this.audioTrack=r,this.metadataTrack=n,this._baseDts=-1,this._baseDtsInited=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=0,this._videoTimestampBreak=0,this._lastVideoDuration=0,this._keyFrameInNextChunk=!1,this._lastAudioExceptionGapDot=-1/0,this._lastAudioExceptionOverlapDot=-1/0,this._lastAudioExceptionLargeGapDot=-1/0,this._lastVideoExceptionLargeGapDot=-1/0,this._lastVideoExceptionChunkFirstDtsDot=-1/0}return DU(e,[{key:"fix",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t=Math.round(1e3*t);var i=this.videoTrack,a=this.audioTrack;if(!r&&n||(this._videoLastSample=null,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=0,this._videoTimestampBreak=0,this._lastAudioExceptionGapDot=-1/0,this._lastAudioExceptionOverlapDot=-1/0,this._lastAudioExceptionLargeGapDot=-1/0,this._lastVideoExceptionLargeGapDot=-1/0,this._lastVideoExceptionChunkFirstDtsDot=-1/0),r&&!n&&(this._baseDtsInited=!1),this._baseDtsInited||this._calculateBaseDts(a,i),!n&&t&&(this._audioNextPts=this._videoNextDts=t),this._baseDtsInited&&(this._videoTimestampBreak||!this.videoTrack.exist())&&(this._audioTimestampBreak||!this.audioTrack.exist())&&this._resetBaseDtsWhenStreamBreaked(),this._fixAudio(a),this._keyFrameInNextChunk=!1,this._fixVideo(i),this.metadataTrack.exist()){var o,s,u=this.metadataTrack.timescale;Ch(o=this.metadataTrack.seiSamples).call(o,(function(t){t.pts=t.originPts-e._baseDts,t.time=Math.max(0,t.pts)/u})),Ch(s=this.metadataTrack.flvScriptSamples).call(s,(function(t){t.pts=t.originPts-e._baseDts,t.time=Math.max(0,t.pts)/u}))}i.samples.length&&(i.baseMediaDecodeTime=i.samples[0].dts),a.samples.length&&(a.baseMediaDecodeTime=a.samples[0].pts*a.timescale/1e3)}},{key:"_fixVideo",value:function(e){var t=this,r=e.samples;if(r.length){var n;if(Ch(r).call(r,(function(e){e.dts-=t._baseDts,e.pts-=t._baseDts,e.keyframe&&(t._keyFrameInNextChunk=!0)})),e.fpsNum&&e.fpsDen)n=e.timescale*(e.fpsDen/e.fpsNum);else if(e.length>1){var i=e.samples[0],a=e.samples[r.length-1];n=Math.floor((a.dts-i.dts)/(r.length-1))}else n=this._lastVideoDuration||40;var o=r.pop();if(this._videoLastSample&&r.unshift(this._videoLastSample),this._videoLastSample=o,r.length){if(void 0===this._videoNextDts){var s=r[0];this._videoNextDts=s.dts}var u=r.length,c=0,l=r[0],f=this._videoNextDts-l.dts;if(Math.abs(f)>200){var h;if(Math.abs(l.dts-this._lastVideoExceptionChunkFirstDtsDot)>5e3)this._lastVideoExceptionChunkFirstDtsDot=l.dts,e.warnings.push({type:tI,nextDts:this._videoNextDts,firstSampleDts:l.dts,nextSampleDts:null===(h=r[1])||void 0===h?void 0:h.dts,sampleDuration:f});this._videoTimestampBreak>=5?(this._videoNextDts=l.dts,this._videoTimestampBreak=0):(l.dts+=f,l.pts+=f,this.audioTrack.exist()||(this._videoTimestampBreak=1))}for(var d=0;d<u;d++){var p=r[d].dts,v=r[d+1];((c=d<u-1?v.dts-p:o?o.dts-p:n)>1e3||c<0)&&(this._videoTimestampBreak++,Math.abs(p-this._lastVideoExceptionLargeGapDot)>5e3&&(this._lastVideoExceptionLargeGapDot=p,e.warnings.push({type:eI,time:p/e.timescale,dts:p,originDts:r[d].originDts,nextDts:this._videoNextDts,sampleDuration:c,refSampleDuration:n})),c=n),r[d].duration=c,this._videoNextDts+=c,this._lastVideoDuration=c}}}}},{key:"_fixAudio",value:function(e){var t=this,r=e.samples;r.length&&(Ch(r).call(r,(function(e){e.dts=e.pts-=t._baseDts})),this._doFixAudioInternal(e,r,1e3))}},{key:"_calculateBaseDts",value:function(e,t){var r=e.samples,n=t.samples;if(!r.length&&!n.length)return!1;var i=1/0,a=1/0;r.length&&(e.baseDts=i=r[0].pts),n.length&&(t.baseDts=a=n[0].dts),this._baseDts=Math.min(i,a);var o=a-i;return pI(o)&&Math.abs(o)>500&&t.warnings.push({type:ZU,videoBaseDts:a,audioBasePts:i,baseDts:this._baseDts,delta:o}),this._baseDtsInited=!0,!0}},{key:"_resetBaseDtsWhenStreamBreaked",value:function(){this._calculateBaseDts(this.audioTrack,this.videoTrack)&&(this.audioTrack.exist()?this.videoTrack.exist()?this._baseDts-=Math.min(this._audioNextPts,this._videoNextDts):this._baseDts-=this._audioNextPts:this._baseDts-=this._videoNextDts,this._videoTimestampBreak=0,this._audioTimestampBreak=0)}},{key:"_doFixAudioInternal",value:function(e,t,r){if(!e.sampleDuration)switch(e.codecType){case YU:e.sampleDuration=wI.getFrameDuration(e.timescale,r);break;case XU:e.sampleDuration=OI.getFrameDuration(e.samples,r);break;case JU:case QU:e.sampleDuration=this._getG711Duration(e);break;default:console.error("can't fix audio codecType:",e.codecType)}var n=e.sampleDuration,i=e.codecType===XU?20:e.codecType===YU?1024:n*e.timescale/1e3;if(void 0===this._audioNextPts){var a=t[0];this._audioNextPts=a.pts}for(var o=0;o<t.length;o++){var s=this._audioNextPts,u=t[o],c=u.pts-s;if(0===o&&this._audioTimestampBreak>=5&&this._keyFrameInNextChunk&&(s=this._audioNextPts=u.dts,c=0,this._audioTimestampBreak=0),!this._audioTimestampBreak&&c>=3*n&&c<=DI&&!mI){var l=this._getSilentFrame(e)||t[0].data.subarray(),f=Math.floor(c/n);Math.abs(u.pts-this._lastAudioExceptionGapDot)>PI&&(this._lastAudioExceptionGapDot=u.pts,e.warnings.push({type:nI,pts:u.pts,originPts:u.originPts,count:f,nextPts:s,refSampleDuration:n}));for(var h=0;h<f;h++){var d=new uI(Math.floor(this._audioNextPts+n)-Math.floor(this._audioNextPts),l,i);d.originPts=Math.floor(this._baseDts+s),B_(t).call(t,o,0,d),this._audioNextPts+=n,o++}o--}else if(c<=-3*n&&c>=-1e3)Math.abs(u.pts-this._lastAudioExceptionOverlapDot)>PI&&(this._lastAudioExceptionOverlapDot=u.pts,e.warnings.push({type:iI,pts:u.pts,originPts:u.originPts,nextPts:s,refSampleDuration:n})),B_(t).call(t,o,1),o--;else{if(Math.abs(c)>DI&&(this._audioTimestampBreak++,Math.abs(u.pts-this._lastAudioExceptionLargeGapDot)>PI&&(this._lastAudioExceptionLargeGapDot=u.pts,e.warnings.push({type:rI,time:u.pts/1e3,pts:u.pts,originPts:u.originPts,nextPts:s,sampleDuration:c,refSampleDuration:n}))),e.codecType===XU){var p=t[t.length-1];p&&(p.duration=u.pts-p.pts)}else u.dts=u.pts=s,u.duration=i;this._audioNextPts+=n}}}},{key:"_getG711Duration",value:function(e){var t=e.sampleSize,r=e.channelCount,n=e.sampleRate,i=e.samples[0];if(i)return 2*i.data.byteLength/r/(t/8)/n*1e3}},{key:"_getSilentFrame",value:function(e){return e.codecType===YU?wI.getSilentFrame(e.codec,e.channelCount):new Uint8Array(8*e.sampleDuration*e.channelCount)}}]),e}();function MI(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t=yh(t).call(t,Boolean);var n=new Uint8Array(aD(t).call(t,(function(e,t){return e+t.byteLength}),0)),i=0;return Ch(t).call(t,(function(e){n.set(e,i),i+=e.byteLength})),n}function UI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function II(e){for(var t,r="avc1.",n=0;n<3;n++)(t=e[n].toString(16)).length<2&&(t="0".concat(t)),r+=t;return r}function BI(e){if(!db(e)){for(var t=[],r="",n=0;n<e.length;n++)n%2&&(r=e[n-1]+e[n],t.push(ob(r,16)),r="");return t}return hb(e).call(e,(function(e){return ob(e,16)}))}var jI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"parseAnnexB",value:function(e){var t=e.byteLength-1,r=0;do{if(0!==e[t])break;r++,t--}while(t>0);r>=3&&(e=e.subarray(0,t+1));for(var n=e.length,i=2,a=0;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if((a=++i+2)>=n)return[];for(var o=[];a<n;)switch(e[a]){case 0:if(0!==e[a-1]){a+=2;break}if(0!==e[a-2]){a++;break}if(a<n-1&&1!==e[a+1]){a++;break}i!==a-2&&o.push(e.subarray(i,a-2));do{a++}while(1!==e[a]&&a<n);a=(i=a+1)+2;break;case 1:if(0!==e[a-1]||0!==e[a-2]){a+=3;break}i!==a-2&&o.push(e.subarray(i,a-2)),a=(i=a+1)+2;break;default:a+=3}return i<n&&o.push(e.subarray(i)),o}},{key:"parseAvcC",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var r,n=e.length,i=[],a=0;a+t<n;)if(r=UI(e,a),3===t&&(r>>>=8),a+=t,r){if(a+r>n)break;i.push(e.subarray(a,a+r)),a+=r}return i}}},{key:"parseSEI",value:function(e,t){for(var r=e.length,n=t?2:1,i=0,a=0,o="";255===e[n];)i+=255,n++;for(i+=e[n++];255===e[n];)a+=255,n++;if(a+=e[n++],5===i&&r>n+16)for(var s=0;s<16;s++)o+=e[n].toString(16),n++;return{payload:e.subarray(n,n+a),type:i,size:a,uuid:o}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,r=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(r.push(n+2),n+=2):n++;if(!r.length)return e;var i=t-r.length,a=new Uint8Array(i),o=0;for(n=0;n<i;o++,n++)o===r[0]&&(o++,r.shift()),a[n]=e[o];return a}}]),e}(),FI=function(){function e(t){if(CU(this,e),PU(this,"_bytesAvailable",void 0),PU(this,"_bitsAvailable",0),PU(this,"_word",0),!t)throw new Error("ExpGolomb data params is required");this._data=t,this._bytesAvailable=t.byteLength,this._bytesAvailable&&this._loadWord()}return DU(e,[{key:"bitsAvailable",get:function(){return this._bitsAvailable}},{key:"_loadWord",value:function(){var e=this._data.byteLength-this._bytesAvailable,t=Math.min(4,this._bytesAvailable);if(0===t)throw new Error("No bytes available");var r=new Uint8Array(4);r.set(this._data.subarray(e,e+t)),this._word=new DataView(r.buffer).getUint32(0),this._bitsAvailable=8*t,this._bytesAvailable-=t}},{key:"skipBits",value:function(e){if(this._bitsAvailable>e)this._word<<=e,this._bitsAvailable-=e;else{e-=this._bitsAvailable;var t=Math.floor(e/8);e-=8*t,this._bytesAvailable-=t,this._loadWord(),this._word<<=e,this._bitsAvailable-=e}}},{key:"readBits",value:function(e){if(e>32)throw new Error("Cannot read more than 32 bits");var t=Math.min(this._bitsAvailable,e),r=this._word>>>32-t;return this._bitsAvailable-=t,this._bitsAvailable>0?this._word<<=t:this._bytesAvailable>0&&this._loadWord(),(t=e-t)>0&&this._bitsAvailable?r<<t|this.readBits(t):r}},{key:"skipLZ",value:function(){var e;for(e=0;e<this._bitsAvailable;++e)if(0!=(this._word&2147483648>>>e))return this._word<<=e,this._bitsAvailable-=e,e;return this._loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"skipScalingList",value:function(e){for(var t=8,r=8,n=0;n<e;n++)0!==r&&(r=(t+this.readEG()+256)%256),t=0===r?t:r}}]),e}(),NI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"parseAVCDecoderConfigurationRecord",value:function(t){if(!(t.length<7)){for(var r,n,i=1+(3&t[4]),a=[],o=[],s=6,u=31&t[5],c=0;c<u;c++)if(n=t[s]<<8|t[s+1],s+=2,n){var l=t.subarray(s,s+n);s+=n,a.push(l),r||(r=e.parseSPS(jI.removeEPB(l)))}var f,h=t[s];s++;for(var d=0;d<h;d++)f=t[s]<<8|t[s+1],s+=2,f&&(o.push(t.subarray(s,s+f)),s+=f);return{sps:r,spsArr:a,ppsArr:o,nalUnitSize:i}}}},{key:"parseSPS",value:function(e){var t=new FI(e);t.readUByte();var r=t.readUByte(),n=t.readUByte(),i=t.readUByte();t.skipUEG();var a=420;if(100===r||110===r||122===r||244===r||44===r||83===r||86===r||118===r||128===r||138===r||144===r){var o=t.readUEG();if(o<=3&&(a=[0,420,422,444][o]),3===o&&t.skipBits(1),t.skipUEG(),t.skipUEG(),t.skipBits(1),t.readBool())for(var s=3!==o?8:12,u=0;u<s;u++)t.readBool()&&(u<6?t.skipScalingList(16):t.skipScalingList(64))}t.skipUEG();var c=t.readUEG();if(0===c)t.readUEG();else if(1===c){t.skipBits(1),t.skipUEG(),t.skipUEG();for(var l=t.readUEG(),f=0;f<l;f++)t.skipUEG()}t.skipUEG(),t.skipBits(1);var h=t.readUEG(),d=t.readUEG(),p=t.readBits(1);0===p&&t.skipBits(1),t.skipBits(1);var v,y,g,m,_,b=0,w=0,k=0,S=0;if(t.readBool()&&(b=t.readUEG(),w=t.readUEG(),k=t.readUEG(),S=t.readUEG()),t.readBool()){if(t.readBool())switch(t.readUByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUByte()<<8|t.readUByte(),t.readUByte()<<8|t.readUByte()]}if(t.readBool()&&t.readBool(),t.readBool()&&(t.readBits(4),t.readBool()&&t.readBits(24)),t.readBool()&&(t.readUEG(),t.readUEG()),t.readBool()){var x=t.readBits(32),E=t.readBits(32);y=t.readBool(),_=(g=E)/(m=2*x)}}return{codec:II(e.subarray(1,4)),profileIdc:r,profileCompatibility:n,levelIdc:i,chromaFormat:a,width:Math.ceil(16*(h+1)-2*(b+w)),height:(2-p)*(d+1)*16-(p?2:4)*(k+S),sarRatio:v,fpsNum:g,fpsDen:m,fps:_,fixedFrame:y}}}]),e}(),zI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"parseHEVCDecoderConfigurationRecord",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t.length<23)){r=r||{};for(var n,i,a,o,s,u=1+(3&t[21]),c=[],l=[],f=[],h=23,d=t[22],p=0;p<d;p++){a=63&t[h],o=t[h+1]<<8|t[h+2],h+=3;for(var v=0;v<o;v++)if(s=t[h]<<8|t[h+1],h+=2,s){switch(a){case 32:var y=t.subarray(h,h+s);n||(n=e.parseVPS(jI.removeEPB(y),r)),f.push(y);break;case 33:var g=t.subarray(h,h+s);i||(i=e.parseSPS(jI.removeEPB(g),r)),c.push(g);break;case 34:l.push(t.subarray(h,h+s))}h+=s}}return{hvcC:r,sps:i,spsArr:c,ppsArr:l,vpsArr:f,nalUnitSize:u}}}},{key:"parseVPS",value:function(t,r){r=r||{};var n=new FI(t);n.readUByte(),n.readUByte(),n.readBits(12);var i=n.readBits(3);return r.numTemporalLayers=Math.max(r.numTemporalLayers||0,i+1),n.readBits(17),e._parseProfileTierLevel(n,i,r),r}},{key:"parseSPS",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r=r||{};var n=new FI(t);n.readUByte(),n.readUByte(),n.readBits(4);var i=n.readBits(3);r.numTemporalLayers=Math.max(i+1,r.numTemporalLayers||0),r.temporalIdNested=n.readBits(1),e._parseProfileTierLevel(n,i,r),n.readUEG();var a=r.chromaFormatIdc=n.readUEG(),o=420;a<=3&&(o=[0,420,422,444][a]);var s=0;3===a&&(s=n.readBits(1));var u,c,l,f,h=n.readUEG(),d=n.readUEG(),p=n.readBits(1);(1===p&&(u=n.readUEG(),c=n.readUEG(),l=n.readUEG(),f=n.readUEG()),r.bitDepthLumaMinus8=n.readUEG(),r.bitDepthChromaMinus8=n.readUEG(),1===p)&&(h-=(1!==a&&2!==a||0!==s?1:2)*(c+u),d-=(1===a&&0===s?2:1)*(f+l));return{codec:"hev1.1.6.L93.B0",width:h,height:d,chromaFormat:o,hvcC:r}}},{key:"_parseProfileTierLevel",value:function(e,t,r){var n=r.generalTierFlag||0;r.generalProfileSpace=e.readBits(2),r.generalTierFlag=Math.max(e.readBits(1),n),r.generalProfileIdc=Math.max(e.readBits(5),r.generalProfileIdc||0),r.generalProfileCompatibilityFlags=e.readBits(32),r.generalConstraintIndicatorFlags=[e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8)];var i=e.readBits(8);n<r.generalTierFlag?r.generalLevelIdc=i:r.generalLevelIdc=Math.max(i,r.generalLevelIdc||0);var a=[],o=[];if(t>e.bitsAvailable)throw new Error("maxSubLayersMinus inavlid size ".concat(t));for(var s=0;s<t;s++)a[s]=e.readBits(1),o[s]=e.readBits(1);t>0&&e.readBits(2*(8-t));for(var u=0;u<t;u++)0!==a[u]&&(e.readBits(2),e.readBits(1),e.readBits(5),e.readBits(16),e.readBits(16),e.readBits(4),e.readBits(16),e.readBits(16),e.readBits(12)),0!==o[u]&&e.readBits(8)}}]),e}(),VI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"decode",value:function(t){for(var r=[],n=t,i=0,a=t.length;i<a;)if(n[i]<128)r.push(String.fromCharCode(n[i])),++i;else{if(n[i]<192);else if(n[i]<224){if(e._checkContinuation(n,i,1)){var o=(31&n[i])<<6|63&n[i+1];if(o>=128){r.push(String.fromCharCode(65535&o)),i+=2;continue}}}else if(n[i]<240){if(e._checkContinuation(n,i,2)){var s=(15&n[i])<<12|(63&n[i+1])<<6|63&n[i+2];if(s>=2048&&55296!=(63488&s)){r.push(String.fromCharCode(65535&s)),i+=3;continue}}}else if(n[i]<248&&e._checkContinuation(n,i,3)){var u=(7&n[i])<<18|(63&n[i+1])<<12|(63&n[i+2])<<6|63&n[i+3];if(u>65536&&u<1114112){u-=65536,r.push(String.fromCharCode(u>>>10|55296)),r.push(String.fromCharCode(1023&u|56320)),i+=4;continue}}r.push(String.fromCharCode(65533)),++i}return r.join("")}},{key:"_checkContinuation",value:function(e,t,r){var n=e;if(t+r<n.length){for(;r--;)if(128!=(192&n[++t]))return!1;return!0}return!1}}]),e}(),GI=function(){function e(){CU(this,e)}return DU(e,null,[{key:"parse",value:function(t){if(!(t.length<3)){var r={},n=e._parseValue(new DataView(t.buffer,t.byteOffset,t.byteLength)),i=e._parseValue(new DataView(t.buffer,t.byteOffset+n.size,t.byteLength-n.size));return r[n.data]=i.data,r}}},{key:"_parseValue",value:function(t){var r,n=t.byteLength,i=1,a=!1;switch(t.getUint8(0)){case 0:r=t.getFloat64(1),i+=8;break;case 1:r=!!t.getUint8(1),i+=1;break;case 2:var o=e._parseString(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i));r=o.data,i+=o.size;break;case 3:r={};var s=0;for(9==(16777215&t.getUint32(n-4))&&(s=3);i<n-4;){var u=e._parseObject(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i-s)),c=u.size,l=u.data;if(u.isEnd)break;r[l.name]=l.value,i+=c}if(i<=n-3)9===(16777215&t.getUint32(i-1))&&(i+=3);break;case 8:r={},i+=4;var f=0;for(9==(16777215&t.getUint32(n-4))&&(f=3);i<n-8;){var h=e._parseObject(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i-f)),d=h.size,p=h.data;if(h.isEnd)break;r[p.name]=p.value,i+=d}if(i<=n-3)9===(16777215&t.getUint32(i-1))&&(i+=3);break;case 9:r=void 0,i=1,a=!0;break;case 10:r=[];var v=t.getUint32(1);i+=4;for(var y=0;y<v;y++){var g=e._parseValue(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i)),m=g.data,_=g.size;r.push(m),i+=_}break;case 11:var b=t.getFloat64(i)+6e4*t.getInt16(i+8);r=new Date(b),i+=10;break;case 12:var w=t.getUint32(1);i+=4,r="",w>0&&(r=VI.decode(new Uint8Array(t.buffer,t.byteOffset+i,w))),i+=w;break;default:i=n}return{data:r,size:i,isEnd:a}}},{key:"_parseString",value:function(e){var t=e.getUint16(0),r="";return t>0&&(r=VI.decode(new Uint8Array(e.buffer,e.byteOffset+2,t))),{data:r,size:2+t}}},{key:"_parseObject",value:function(t){if(!(t.byteLength<3)){var r=e._parseString(t),n=e._parseValue(new DataView(t.buffer,t.byteOffset+r.size,t.byteLength-r.size));return{data:{name:r.data,value:n.data},size:r.size+n.size,isEnd:n.isEnd}}}}]),e}(),HI=7,qI=8,KI=10,WI=13,YI=new vI("FlvDemuxer"),JI=function(){function e(t,r,n){CU(this,e),PU(this,"_headerParsed",!1),PU(this,"_remainingData",null),PU(this,"_gopId",0),PU(this,"_needAddMetaBeforeKeyFrameNal",!0),this.videoTrack=t||new aI,this.audioTrack=r||new oI,this.metadataTrack=n||new hI,this._fixer=new RI(this.videoTrack,this.audioTrack,this.metadataTrack)}return DU(e,[{key:"demux",value:function(t){var r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0,o=this.audioTrack,s=this.videoTrack,u=this.metadataTrack;if(!n&&i||(this._remainingData=null),n&&(this._headerParsed=!1),n?(s.reset(),o.reset(),u.reset()):(s.samples=[],o.samples=[],u.seiSamples=[],u.flvScriptSamples=[],s.warnings=[],o.warnings=[],this._remainingData&&(t=MI(this._remainingData,t),this._remainingData=null)),!t.length)return{videoTrack:s,audioTrack:o,metadataTrack:u};var c=0;if(!this._headerParsed){if(!e.probe(t))throw new Error("Invalid flv file");o.present=(4&t[4])>>>2!=0,s.present=0!=(1&t[4]),this._headerParsed=!0,c=UI(t,5)+4}for(var l,f,h,d,p,v=t.length;c+15<v&&(l=t[c],!(c+15+(f=t[c+1]<<16|t[c+2]<<8|t[c+3])>v));){var y;h=(t[c+7]<<24>>>0)+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6],c+=11,d=t.subarray(c,c+f),8===l?this._parseAudio(d,h):9===l?(a&&(this.seamlessLoadingSwitching=!0),this._parseVideo(d,h)):18===l?this._parseScript(d,h):YI.warn("Invalid tag type: ".concat(l)),(p=UI(t,c+=f))!==11+f&&YI.warn(oh(y="Invalid PrevTagSize ".concat(p," (")).call(y,11+f,")")),c+=4}c<v&&(this._remainingData=t.subarray(c)),o.formatTimescale=s.formatTimescale=s.timescale=u.timescale=1e3,o.timescale=o.codecType===XU?1e3:o.sampleRate||0,!o.exist()&&o.hasSample()&&o.reset(),!s.exist()&&s.hasSample()&&s.reset();var g=u.flvScriptSamples[u.flvScriptSamples.length-1],m=null==g||null===(r=g.data)||void 0===r?void 0:r.onMetaData;return m&&(null!=s&&s.exist()&&(m.hasOwnProperty("duration")&&(s.duration=1e3*m.duration),!s.width&&m.hasOwnProperty("width")&&(s.width=m.width),!s.height&&m.hasOwnProperty("height")&&(s.height=m.height)),null!=o&&o.exist()&&m.hasOwnProperty("duration")&&(o.duration=1e3*m.duration)),{videoTrack:s,audioTrack:o,metadataTrack:u}}},{key:"fix",value:function(e,t,r){return this._fixer.fix(e,t,r),{videoTrack:this.videoTrack,audioTrack:this.audioTrack,metadataTrack:this.metadataTrack}}},{key:"demuxAndFix",value:function(e,t,r,n,i){return this.demux(e,t,r,i),this.fix(n,t,r)}},{key:"_parseAudio",value:function(t,r){if(t.length){var n=(240&t[0])>>>4,i=this.audioTrack;if(n!==KI&&n!==HI&&n!==qI&&n!==WI)return YI.warn("Unsupported sound format: ".concat(n)),void i.reset();if(n!==KI&&n!==WI){var a=(12&t[0])>>2,o=(2&t[0])>>1,s=1&t[0];i.sampleRate=e.AUDIO_RATE[a],i.sampleSize=o?16:8,i.channelCount=s+1}switch(n){case HI:case qI:this._parseG711(t,r,n);break;case KI:this._parseAac(t,r);break;case WI:this._parseOpus(t,r)}}}},{key:"_parseOpus",value:function(e,t){var r=this.audioTrack,n=e[1];switch(r.codecType=XU,n){case 0:var i=OI.parseHeaderPackets(e.subarray(2));i?(r.codec=i.codec,r.channelCount=i.channelCount,r.sampleRate=i.sampleRate,r.config=i.config,r.sampleDuration=OI.getFrameDuration([],r.timescale)):(r.reset(),YI.warn("Cannot parse AudioSpecificConfig",e));break;case 1:if(null==t)return;var a=new uI(t,e.subarray(2),r.sampleDuration);r.samples.push(a);break;default:YI.warn("Unknown OpusPacketType: ".concat(n))}}},{key:"_parseG711",value:function(e,t,r){var n=this.audioTrack,i=e.subarray(1);if(!(i.byteLength<1)){var a=new uI(t,i);n.codecType=7===r?JU:QU,n.sampleRate=8e3,n.codec=n.codecType,n.samples.push(a)}}},{key:"_parseAac",value:function(e,t){var r=this.audioTrack;if(r.codecType=YU,0===e[1]){var n=wI.parseAudioSpecificConfig(e.subarray(2));n?(r.codec=n.codec,r.channelCount=n.channelCount,r.sampleRate=n.sampleRate,r.config=n.config,r.objectType=n.objectType,r.sampleRateIndex=n.samplingFrequencyIndex):(r.reset(),YI.warn("Cannot parse AudioSpecificConfig",e))}else if(1===e[1]){if(null==t)return;r.samples.push(new uI(t,e.subarray(2)))}else YI.warn("Unknown AACPacketType: ".concat(e[1]))}},{key:"_parseVideo",value:function(e,t){var r=this;if(!(e.length<6)){var n=(240&e[0])>>>4,i=15&e[0],a=this.videoTrack;if(7!==i&&12!==i)return a.reset(),void YI.warn("Unsupported codecId: ".concat(i));var o=12===i;a.codecType=o?WU:KU;var s=e[1],u=(e[2]<<16|e[3]<<8|e[4])<<8>>8;if(0===s){var c=e.subarray(5),l=o?zI.parseHEVCDecoderConfigurationRecord(c):NI.parseAVCDecoderConfigurationRecord(c);if(l){var f=l.hvcC,h=l.sps,d=l.ppsArr,p=l.spsArr,v=l.vpsArr,y=l.nalUnitSize;f&&(a.hvcC=a.hvcC||f),h&&(a.codec=h.codec,a.width=h.width,a.height=h.height,a.sarRatio=h.sarRatio,a.fpsNum=h.fpsNum,a.fpsDen=h.fpsDen),p.length&&(a.sps=p),d.length&&(a.pps=d),v&&v.length&&(a.vps=v),y&&(a.nalUnitSize=y)}else YI.warn("Cannot parse ".concat(o?"HEVC":"AVC","DecoderConfigurationRecord"),e)}else if(1===s){var g=jI.parseAvcC(e.subarray(5),a.nalUnitSize);if((g=this._checkAddMetaNalToUnits(o,g,a))&&g.length){var m=new sI(t+u,t,g);if(this.seamlessLoadingSwitching&&t<a.lastKeyFrameDts)return;this.seamlessLoadingSwitching=!1,1===n&&(m.setToKeyframe(),a.lastKeyFrameDts=t),a.samples.push(m),Ch(g).call(g,(function(e){var n=o?e[0]>>>1&63:31&e[0];switch(n){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!o&&5!==n||o&&5===n)break;m.setToKeyframe();break;case 6:case 39:case 40:if(!o&&6!==n||o&&6===n)break;r.metadataTrack.seiSamples.push(new fI(jI.parseSEI(jI.removeEPB(e),o),t+u))}})),m.keyframe&&this._gopId++,m.gopId=this._gopId}else YI.warn("Cannot parse NALUs",e)}else 2===s||YI.warn("Unknown AVCPacketType: ".concat(s))}}},{key:"_checkAddMetaNalToUnits",value:function(e,t,r){if(!e||!this._needAddMetaBeforeKeyFrameNal)return this._needAddMetaBeforeKeyFrameNal=!1,t;var n=hb(t).call(t,(function(e){return e[0]>>>1&63}));return jA(n).call(n,32)?(this._needAddMetaBeforeKeyFrameNal=!1,t):(t.unshift(r.pps[0]),t.unshift(r.sps[0]),t.unshift(r.vps[0]),yh(t).call(t,Boolean))}},{key:"_parseScript",value:function(e,t){this.metadataTrack.flvScriptSamples.push(new lI(GI.parse(e),t))}}],[{key:"probe",value:function(e){return 70===e[0]&&76===e[1]&&86===e[2]&&1===e[3]&&UI(e,5)>=9}}]),e}();PU(JI,"AUDIO_RATE",[5500,11e3,22e3,44e3]);var QI=nr,XI=R,$I=Ze,ZI=ue,eB=function(){var e=QI(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},tB=RegExp.prototype,rB=ue,nB=function(e){var t=e.flags;return void 0!==t||"flags"in tB||$I(e,"flags")||!ZI(tB,e)?t:XI(eB,e)},iB=RegExp.prototype,aB=r((function(e){return e===iB||rB(iB,e)?nB(e):e.flags})),oB=af("Array").entries,sB=cn,uB=Ze,cB=ue,lB=oB,fB=Array.prototype,hB={DOMTokenList:!0,NodeList:!0},dB=r((function(e){var t=e.entries;return e===fB||cB(fB,e)&&t===fB.entries||uB(hB,sB(e))?lB:t}));var pB,vB=function(){function e(){CU(this,e),this.buffer=new Uint8Array(0)}return DU(e,[{key:"write",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];Ch(r).call(r,(function(t){t?e.buffer=function(e){for(var t=0,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];Ch(n).call(n,(function(e){t+=e.length}));var a=new e(t),o=0;return Ch(n).call(n,(function(e){a.set(e,o),o+=e.length})),a}(Uint8Array,e.buffer,t):window.console.warn(t)}))}}],[{key:"writeUint16",value:function(e){return new Uint8Array([e>>8&255,255&e])}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>24,e>>16&255,e>>8&255,255&e])}}]),e}(),yB=Math.pow(2,32)-1,gB=function(){function e(){CU(this,e)}return DU(e,null,[{key:"box",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];r=yh(r).call(r,Boolean);var i=8+aD(r).call(r,(function(e,t){return e+t.byteLength}),0),a=new Uint8Array(i);a[0]=i>>24&255,a[1]=i>>16&255,a[2]=i>>8&255,a[3]=255&i,a.set(e,4);var o=8;return Ch(r).call(r,(function(e){a.set(e,o),o+=e.byteLength})),a}},{key:"ftyp",value:function(t){return f_(t).call(t,(function(e){return e.type===GU&&e.codecType===WU}))?e.FTYPHEV1:e.FTYPAVC1}},{key:"initSegment",value:function(t){return MI(e.ftyp(t),e.moov(t))}},{key:"pssh",value:function(t){var r,n=new Uint8Array(oh(r=[1,0,0,0]).call(r,[16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75],[0,0,0,1],BI(t.kid),[0,0,0,0]));return e.box(e.types.pssh,n)}},{key:"moov",value:function(t){if(t[0].useEME&&(t[0].encv||t[0].enca)){var r;t[0].pssh||(t[0].pssh={kid:t[0].kid});var n=this.pssh(t[0].pssh);return e.box.apply(e,oh(r=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale),e.mvex(t)]).call(r,FU(hb(t).call(t,(function(t){return e.trak(t)}))),[n]))}var i;return e.box.apply(e,oh(i=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale)]).call(i,FU(hb(t).call(t,(function(t){return e.trak(t)}))),[e.mvex(t)]))}},{key:"mvhd",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,t>>24&255,t>>16&255,t>>8&255,255&t,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]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.tkhdDuration||0,t.width,t.height),e.mdia(t))}},{key:"tkhd",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,1,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,255&n,0,0,i>>8&255,255&i,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minf(t))}},{key:"mdhd",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,t>>24&255,t>>16&255,t>>8&255,255&t,85,196,0,0]))}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"minf",value:function(t){return e.box(e.types.minf,t.type===GU?e.VMHD:e.SMHD,e.DINF,e.stbl(t))}},{key:"stbl",value:function(t){var r=[];return t&&t.ext&&t.ext.stss&&r.push(e.stss(dB(t.ext.stss))),e.box(e.types.stbl,e.stsd(t),e.STTS,r[0],e.STSC,e.STSZ,e.STCO)}},{key:"stsd",value:function(t){var r;return r="audio"===t.type?t.useEME&&t.enca?e.enca(t):t.codecType===XU?e.opus(t):e.mp4a(t):t.useEME&&t.encv?e.encv(t):t.av1C?e.av01(t):e.avc1hev1(t),e.box(e.types.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),r)}},{key:"enca",value:function(t){var r=t.enca.channelCount,n=t.enca.sampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>8&255,255&n,0,0]),a=e.esds(t.config),o=e.sinf(t.enca);return e.box(e.types.enca,i,a,o)}},{key:"encv",value:function(t){var r,n,i,a=t.sps.length>0?t.sps[0]:[],o=t.pps.length>0?t.pps[0]:[],s=t.width,u=t.height,c=t.sarRatio[0],l=t.sarRatio[1],f=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,s>>8&255,255&s,u>>8&255,255&u,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]),h=new Uint8Array(oh(n=oh(r=oh(i=[1,a[1],a[2],a[3],255,225,a.length>>>8&255,255&a.length]).apply(i,FU(a))).call(r,[1,o.length>>>8&255,255&o.length])).apply(n,FU(o))),d=new Uint8Array([0,0,88,57,0,15,200,192,0,4,86,72]),p=e.sinf(t.encv),v=new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,l>>24,l>>16&255,l>>8&255,255&l]);return e.box(e.types.encv,f,e.box(e.types.avcC,h),e.box(e.types.btrt,d),p,e.box(e.types.pasp,v))}},{key:"schi",value:function(t){var r=new Uint8Array([]),n=e.tenc(t);return e.box(e.types.schi,r,n)}},{key:"tenc",value:function(t){var r,n=new Uint8Array(oh(r=[0,0,0,0,0,0,255&t.default_IsEncrypted,255&t.default_IV_size]).call(r,BI(t.default_KID)));return e.box(e.types.tenc,n)}},{key:"sinf",value:function(t){var r=new Uint8Array([]),n=new Uint8Array([t.data_format.charCodeAt(0),t.data_format.charCodeAt(1),t.data_format.charCodeAt(2),t.data_format.charCodeAt(3)]),i=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]),a=e.schi(t);return e.box(e.types.sinf,r,e.box(e.types.frma,n),e.box(e.types.schm,i),a)}},{key:"av01",value:function(t){return e.box(e.types.av01,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,t.width>>8&255,255&t.width,t.height>>8&255,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,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,0,0,0,0,0,0,24,17,17]),t.av1C,t.colr)}},{key:"avc1hev1",value:function(t){var r,n=t.codecType===WU,i=n?e.types.hvc1:e.types.avc1,a=n?e.hvcC(t):e.avcC(t),o=[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,t.width>>8&255,255&t.width,t.height>>8&255,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,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,0,0,0,0,0,0,24,17,17]),a];return n?o.push(e.box(e.types.fiel,new Uint8Array([1,0]))):t.sarRatio&&t.sarRatio.length>1&&o.push(e.pasp(t.sarRatio)),e.box.apply(e,oh(r=[i]).call(r,o))}},{key:"avcC",value:function(t){var r,n,i,a,o,s,u=[],c=[];return Ch(r=t.sps).call(r,(function(e){s=e.byteLength,u.push(s>>>8&255),u.push(255&s),u.push.apply(u,FU(e))})),Ch(n=t.pps).call(n,(function(e){s=e.byteLength,c.push(s>>>8&255),c.push(255&s),c.push.apply(c,FU(e))})),e.box(e.types.avcC,new Uint8Array(oh(a=oh(i=oh(o=[1,u[3],u[4],u[5],255,224|t.sps.length]).apply(o,u)).call(i,[t.pps.length])).apply(a,c)))}},{key:"hvcC",value:function(t){var r=t.hvcC;if(r instanceof ArrayBuffer||r instanceof Uint8Array)return r;var n,i=t.vps,a=t.sps,o=t.pps;if(r){var s=r.generalProfileCompatibilityFlags,u=r.generalConstraintIndicatorFlags,c=(i.length&&1)+(a.length&&1)+(o.length&&1);n=[1,r.generalProfileSpace<<6|r.generalTierFlag<<5|r.generalProfileIdc,s>>>24,s>>>16,s>>>8,s,u[0],u[1],u[2],u[3],u[4],u[5],r.generalLevelIdc,240,0,252,252|r.chromaFormatIdc,248|r.bitDepthLumaMinus8,248|r.bitDepthChromaMinus8,0,0,r.numTemporalLayers<<3|r.temporalIdNested<<2|3,c];var l=function(e){var t;n.push(e.length>>8,e.length),(t=n).push.apply(t,FU(e))};i.length&&(n.push(160,0,i.length),Ch(i).call(i,l)),a.length&&(n.push(161,0,a.length),Ch(a).call(a,l)),o.length&&(n.push(162,0,o.length),Ch(o).call(o,l))}else n=[1,1,96,0,0,0,144,0,0,0,0,0,93,240,0,252,253,248,248,0,0,15,3,160,0,1,0,24,64,1,12,1,255,255,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,153,152,9,161,0,1,0,45,66,1,1,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,160,2,128,128,45,22,89,153,164,147,43,154,128,128,128,130,0,0,3,0,2,0,0,3,0,50,16,162,0,1,0,7,68,1,193,114,180,98,64];return e.box(e.types.hvcC,new Uint8Array(n))}},{key:"pasp",value:function(t){var r=jU(t,2),n=r[0],i=r[1];return e.box(e.types.pasp,new Uint8Array([n>>24,n>>16&255,n>>8&255,255&n,i>>24,i>>16&255,i>>8&255,255&i]))}},{key:"mp4a",value:function(t){return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.sampleRate>>8&255,255&t.sampleRate,0,0]),t.config.length?e.esds(t.config):void 0)}},{key:"esds",value:function(t){var r,n,i,a=t.length;return e.box(e.types.esds,new Uint8Array(oh(r=oh(n=oh(i=[0,0,0,0,3,23+a,0,0,0,4,15+a,64,21,0,6,0,0,0,218,192,0,0,218,192,5]).call(i,[a])).call(n,t)).call(r,[6,1,2])))}},{key:"opus",value:function(t){var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.sampleRate>>8&255,255&t.sampleRate,0,0]),n=t.config.length?e.dOps(t):[];return e.box(e.types.Opus,r,n)}},{key:"dOps",value:function(t){if(t.config)return t.config[4]=t.sampleRate>>>24&255,t.config[5]=t.sampleRate>>>16&255,t.config[6]=t.sampleRate>>>8&255,t.config[7]=255&t.sampleRate,e.box(e.types.dOps,t.config)}},{key:"mvex",value:function(t){var r;return e.box.apply(e,oh(r=[e.types.mvex]).call(r,FU(hb(t).call(t,(function(t){return e.trex(t.id)})))))}},{key:"trex",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trex1",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,2,0,0,0,0,0,0,1,0,0]))}},{key:"trex2",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,4,0,0,0,0,0,2,0,0,0]))}},{key:"moof",value:function(t){var r;return e.box.apply(e,oh(r=[e.types.moof,e.mfhd(t[0].samples?t[0].samples[0].gopId:0)]).call(r,FU(hb(t).call(t,(function(t){return e.traf(t)})))))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"traf",value:function(t){var r,n=e.tfhd(t.id),i=e.tfdt(t,t.baseMediaDecodeTime),a=0;if(t.isVideo&&t.videoSenc&&(r=t.videoSenc,Ch(r).call(r,(function(e){a+=8,e.subsamples&&e.subsamples.length&&(a+=2,a+=6*e.subsamples.length)}))),t.videoSencLength=a,t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)){if(t.isVideoEncryption){if(t.isVideo){var o=e.saiz(t),s=e.saio(t),u=e.trun1(t),c=e.senc(t);return e.box(e.types.traf,n,i,o,s,u,c)}if(t.isAudioEncryption){var l=e.sbgp(),f=e.saiz(t),h=e.saio(t),d=e.senc(t),p=e.trun1(t);return e.box(e.types.traf,n,i,l,f,h,d,p)}var v=e.sbgp(),y=e.trun1(t);return e.box(e.types.traf,n,i,v,y)}if(t.isVideo){var g=e.trun1(t);return e.box(e.types.traf,n,i,g)}var m=e.sbgp(),_=e.saiz(t),b=e.saio(t),w=e.senc(t),k=e.trun1(t);return e.box(e.types.traf,n,i,m,_,b,w,k)}var S=e.sdtp(t);return e.box(e.types.traf,n,i,S,e.trun(t.samples,S.byteLength+76))}},{key:"sdtp",value:function(t){var r,n=new vB;return Ch(r=t.samples).call(r,(function(e){n.write(new Uint8Array(t.isVideo?[e.keyframe?32:16]:[16]))})),e.box(e.types.sdtp,this.extension(0,0),n.buffer)}},{key:"trun1",value:function(t){var r,n=new vB,i=vB.writeUint32(t.samples.length),a=null;if(t.isVideo){var o=t.videoSencLength;a=vB.writeUint32(16*t.samples.length+o+149),!t.isVideoEncryption&&t.isAudioEncryption&&(a=vB.writeUint32(16*t.samples.length+92))}else{var s=12*t.samples.length+124;t.isAudioEncryption&&(s=12*t.samples.length+8*t.audioSenc.length+177),a=vB.writeUint32(s)}return Ch(r=t.samples).call(r,(function(e){n.write(vB.writeUint32(e.duration)),n.write(vB.writeUint32(e.size)),n.write(vB.writeUint32(e.keyframe?33554432:65536)),t.isVideo&&n.write(vB.writeUint32(e.cts?e.cts:0))})),e.box(e.types.trun,this.extension(0,aB(t)),i,a,n.buffer)}},{key:"senc",value:function(t){var r=new vB,n=t.samples.length,i=t.isVideo?16:8,a=t.isVideo?2:0,o=[],s=0;return t.isVideo?(o=t.videoSenc,s=t.videoSencLength):o=t.audioSenc,s=s||i*n,r.write(vB.writeUint32(16+s),e.types.senc,this.extension(0,a)),r.write(vB.writeUint32(n)),Ch(o).call(o,(function(e){for(var t=0;t<e.InitializationVector.length;t++)r.write(new Uint8Array([e.InitializationVector[t]]));var n;e.subsamples&&e.subsamples.length&&(r.write(vB.writeUint16(e.subsamples.length)),Ch(n=e.subsamples).call(n,(function(e){r.write(vB.writeUint16(e.BytesOfClearData)),r.write(vB.writeUint32(e.BytesOfProtectedData))})))})),r.buffer}},{key:"saio",value:function(t){var r=12*t.samples.length+141;!t.isVideo&&t.isAudioEncryption&&(r=149);var n=new Uint8Array([1,0,0,0,0,0,0,1,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r]);return e.box(e.types.saio,n)}},{key:"saiz",value:function(t){var r=t.samples.length,n=new Uint8Array([0,0,0,0,16,r>>24&255,r>>16&255,r>>8&255,255&r]);return e.box(e.types.saiz,n)}},{key:"sbgp",value:function(){var t=new Uint8Array([114,111,108,108,0,0,0,1,0,0,1,25,0,0,0,1]);return e.box(e.types.sbgp,this.extension(0,0),t)}},{key:"extension",value:function(e,t){return new Uint8Array([e,t>>16&255,t>>8&255,255&t])}},{key:"tfhd",value:function(t){return e.box(e.types.tfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"tfdt",value:function(t,r){var n=Math.floor(r/(yB+1)),i=Math.floor(r%(yB+1));return t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)?e.box(e.types.tfdt,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])):e.box(e.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,i>>24,i>>16&255,i>>8&255,255&i]))}},{key:"trun",value:function(t,r){var n=t.length,i=12+16*n;r+=8+i;var a=new Uint8Array(i);a.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0);for(var o=0;o<n;o++){var s=t[o],u=s.duration,c=s.size,l=s.flag,f=void 0===l?{}:l,h=s.cts,d=void 0===h?0:h;a.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,c>>>24&255,c>>>16&255,c>>>8&255,255&c,f.isLeading<<2|(null===f.dependsOn||void 0===f.dependsOn?1:f.dependsOn),f.isDependedOn<<6|f.hasRedundancy<<4|f.paddingValue<<1|(null===f.isNonSyncSample||void 0===f.isNonSyncSample?1:f.isNonSyncSample),61440&f.degradationPriority,15&f.degradationPriority,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*o)}return e.box(e.types.trun,a)}},{key:"moovMP4",value:function(t){var r;return e.box.apply(e,oh(r=[e.types.moov,e.mvhd(t[0].duration,t[0].timescale)]).call(r,FU(hb(t).call(t,(function(t){return e.trackMP4(t)})))))}},{key:"trackMP4",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.duration,t.width,t.height),e.mdiaMP4(t))}},{key:"mdiaMP4",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minfMP4(t))}},{key:"minfMP4",value:function(t){return e.box(e.types.minf,t.type===GU?e.VMHD:e.SMHD,e.DINF,e.stblMP4(t))}},{key:"stblMP4",value:function(t){var r,n=t.ext,i=[e.stsd(t),e.stts(n.stts),e.stsc(n.stsc),e.stsz(n.stsz),e.stco(n.stco)];return n.stss.length&&i.push(e.stss(n.stss)),n.ctts.length&&i.push(e.ctts(n.ctts)),e.box.apply(e,oh(r=[e.types.stbl]).call(r,i))}},{key:"stts",value:function(t){var r=t.length,n=new Uint8Array(8*r),i=0;return Ch(t).call(t,(function(e){var t=e.value,r=e.count;n.set([r>>24,r>>16&255,r>>8&255,255&r,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8})),e.box(e.types.stts,MI(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stsc",value:function(t){var r=t.length,n=new Uint8Array(12*r),i=0;return Ch(t).call(t,(function(e){var t=e.firstChunk,r=e.samplesPerChunk,a=e.sampleDescIndex;n.set([t>>24,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,a>>24,a>>16&255,a>>8&255,255&a],i),i+=12})),e.box(e.types.stsc,MI(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stsz",value:function(t){var r=t.length,n=new Uint8Array(4*r),i=0;return Ch(t).call(t,(function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stsz,MI(new Uint8Array([0,0,0,0,0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stco",value:function(t){var r=t.length,n=new Uint8Array(4*r),i=0;return Ch(t).call(t,(function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stco,MI(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stss",value:function(t){var r=t.length,n=new Uint8Array(4*r),i=0;return Ch(t).call(t,(function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stss,MI(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"ctts",value:function(t){var r=t.length,n=new Uint8Array(8*r),i=0;return Ch(t).call(t,(function(e){var t=e.value,r=e.count;n.set([r>>24,r>>16&255,r>>8&255,255&r,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8})),e.box(e.types.ctts,MI(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"styp",value:function(){return e.box(e.types.styp,new Uint8Array([109,115,100,104,0,0,0,0,109,115,100,104,109,115,105,120]))}},{key:"sidx",value:function(t){var r,n=t.timescale,i=t.samples[0].duration,a=i*t.samples.length,o=t.samples[0].sampleOffset*i,s=8;Ch(r=t.samples).call(r,(function(e){s+=e.size}));var u=0;if(t.isVideo){var c,l=0;t.videoSenc&&(c=t.videoSenc),t.isVideo&&Ch(c).call(c,(function(e){l+=8,e.subsamples&&e.subsamples.length&&(l+=2,l+=6*e.subsamples.length)})),t.videoSencLength=l,u=s+141+16*t.samples.length+l,t.useEME&&t.isAudioEncryption&&!t.isVideoEncryption&&(u=s+16*t.samples.length+84)}else u=s+116+12*t.samples.length,t.useEME&&t.isAudioEncryption&&(u=s+169+12*t.samples.length+8*t.audioSenc.length);var f=new Uint8Array([0,0,0,0,0,0,0,255&t.id,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,1,0,u>>16&255,u>>8&255,255&u,a>>24&255,a>>16&255,a>>8&255,255&a,144,0,0,0]);return e.box(e.types.sidx,f)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();PU(gB,"types",aD(pB=["Opus","dOps","av01","av1C","avc1","avcC","hvc1","hvcC","dinf","dref","esds","ftyp","hdlr","mdat","mdhd","mdia","mfhd","minf","moof","moov","mp4a","mvex","mvhd","pasp","stbl","stco","stsc","stsd","stsz","stts","tfdt","tfhd","traf","trak","trex","tkhd","vmhd","smhd","ctts","stss","styp","pssh","sidx","sbgp","saiz","saio","senc","trun","encv","enca","sinf","btrt","frma","tenc","schm","schi","mehd","fiel","sdtp"]).call(pB,(function(e,t){return e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)],e}),Qh(null))),PU(gB,"HDLR_TYPES",{video: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]),audio: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])}),PU(gB,"FTYPAVC1",gB.box(gB.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))),PU(gB,"FTYPHEV1",gB.box(gB.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,104,101,118,49]))),PU(gB,"DINF",gB.box(gB.types.dinf,gB.box(gB.types.dref,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])))),PU(gB,"VMHD",gB.box(gB.types.vmhd,new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))),PU(gB,"SMHD",gB.box(gB.types.smhd,new Uint8Array([0,0,0,0,0,0,0,0]))),PU(gB,"StblTable",new Uint8Array([0,0,0,0,0,0,0,0])),PU(gB,"STTS",gB.box(gB.types.stts,gB.StblTable)),PU(gB,"STSC",gB.box(gB.types.stsc,gB.StblTable)),PU(gB,"STSZ",gB.box(gB.types.stsz,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]))),PU(gB,"STCO",gB.box(gB.types.stco,gB.StblTable));var mB=function(){function e(t,r){CU(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=r}return DU(e,[{key:"debug",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(r=console).debug.apply(r,oh(t=[this._prefix]).call(t,i))}}},{key:"log",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(r=console).log.apply(r,oh(t=[this._prefix]).call(t,i))}}},{key:"warn",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(r=console).warn.apply(r,oh(t=[this._prefix]).call(t,i))}}},{key:"error",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(r=console).error.apply(r,oh(t=[this._prefix]).call(t,i))}}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();PU(mB,"disabled",!0);var _B=function(){function e(t,r,n){CU(this,e),this.videoTrack=t,this.audioTrack=r;var i=/Chrome\/([^.]+)/.exec(navigator.userAgent);this.forceFirstIDR=i&&Number(i[1])<50,this.log=new mB("FMP4Remuxer",!n||!n.openLog||!n.openLog)}return DU(e,[{key:"remux",value:function(){var e,t,r,n,i,a=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.videoTrack,u=this.audioTrack,c=s.exist(),l=u.exist(),f=[];return a&&(o&&o.initMerge?(c&&f.push(this.videoTrack),l&&f.push(this.audioTrack),r=gB.initSegment(f)):(c&&(e=gB.initSegment([this.videoTrack])),l&&(t=gB.initSegment([this.audioTrack])))),c&&s.hasSample()&&(n=this._remuxVideo()),l&&u.hasSample()&&(i=this._remuxAudio()),s.samples=[],u.samples=[],{initSegment:r,videoInitSegment:e,audioInitSegment:t,videoSegment:n,audioSegment:i}}},{key:"_remuxVideo",value:function(){var e=this.videoTrack;this.forceFirstIDR&&(e.samples[0].flag={dependsOn:2,isNonSyncSample:0});var t=e.samples,r=/av01/.test(e.codec),n=0;r?Ch(t).call(t,(function(e){n+=e.data.byteLength})):Ch(t).call(t,(function(e){var t;n+=aD(t=e.units).call(t,(function(e,t){return e+t.byteLength}),0),n+=4*e.units.length}));var i=new Uint8Array(n);if(r)for(var a,o=0,s=t.length,u=0;o<s;o++)a=t[o],i.set(a.data,u),a.size=a.data.byteLength,u+=a.size;else for(var c,l=new DataView(i.buffer),f=function(e,r){var n;r=t[h];var a=0;Ch(n=r.units).call(n,(function(t){l.setUint32(e,t.byteLength),e+=4,i.set(t,e),e+=t.byteLength,a+=4+t.byteLength})),r.size=a,p=e,c=r},h=0,d=t.length,p=0;h<d;h++)f(p,c);var v=gB.mdat(i);return MI(gB.moof([e]),v)}},{key:"_remuxAudio",value:function(){var e,t,r=this.audioTrack,n=new Uint8Array(aD(e=r.samples).call(e,(function(e,t){return e+t.size}),0));aD(t=r.samples).call(t,(function(e,t){return n.set(t.data,e),e+t.size}),0);var i=gB.mdat(n);return MI(gB.moof([r]),i)}},{key:"reset",value:function(){this.videoTrack.reset(),this.audioTrack.reset()}}]),e}(),bB=function(){function e(){Bm(this,e),Nm(this,"_ttfb",0),Nm(this,"_demuxStart",0),Nm(this,"_demuxEnd",0),Nm(this,"_demuxCost",0),Nm(this,"_remuxStart",0),Nm(this,"_remuxEnd",0),Nm(this,"_remuxCost",0),Nm(this,"_appendStart",0),Nm(this,"_appendEnd",0),Nm(this,"_appendCost",0)}return Fm(e,[{key:"set",value:function(e,t){this["_".concat(e)]=t}},{key:"start",value:function(e){this["_".concat(e,"Start")]=lS()}},{key:"end",value:function(e){this["_".concat(e,"End")]=lS(),this["_".concat(e,"Cost")]=this["_".concat(e,"Cost")]+(this["_".concat(e,"End")]-this["_".concat(e,"Start")])}},{key:"transferCost",get:function(){return{ttfbCost:this._ttfb,demuxCost:this._demuxCost,remuxCost:this._remuxCost,appendCost:this._appendCost}}}]),e}(),wB="ttfb",kB="demux",SB="remux",xB="append",EB=new AD("BufferService"),TB=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Bm(this,e),Nm(this,"flv",null),Nm(this,"_demuxer",new JI),Nm(this,"_remuxer",null),Nm(this,"_mse",null),Nm(this,"_softVideo",null),Nm(this,"_sourceCreated",!1),Nm(this,"_needInitSegment",!0),Nm(this,"_discontinuity",!0),Nm(this,"_contiguous",!1),Nm(this,"_initSegmentId",""),Nm(this,"_cachedBuffer",null),Nm(this,"_demuxStartTime",0),Nm(this,"_opts",null),this.flv=t,this._opts=n,r?this._softVideo=r:(this._remuxer=new _B(this._demuxer.videoTrack,this._demuxer.audioTrack),this._mse=new FD(null,{preferMMS:"boolean"==typeof n.preferMMS?n.preferMMS:!!n.perferMMS}),this._mse.bindMedia(t.media))}var t,r,n,i,a,o;return Fm(e,[{key:"baseDts",get:function(){var e,t;return null===(e=this._demuxer)||void 0===e||null===(t=e._fixer)||void 0===t?void 0:t._baseDts}},{key:"blobUrl",get:function(){var e;return null===(e=this._mse)||void 0===e?void 0:e.url}},{key:"isFull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:FD.VIDEO;return this._mse.isFull(e)}},{key:"seamlessSwitch",value:function(){this._needInitSegment=!0,this._discontinuity=!0,this._contiguous=!0,this._initSegmentId=""}},{key:"unContiguous",value:function(e){this._contiguous=!1,this._demuxStartTime=e}},{key:"reset",value:(o=Im(Rm().mark((function e(){var t,r=arguments;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]&&r[0],!this._mse||t){e.next=6;break}return e.next=4,this._mse.unbindMedia();case 4:return e.next=6,this._mse.bindMedia(this.flv.media);case 6:this._needInitSegment=!0,this._discontinuity=!0,this._contiguous=!1,this._sourceCreated=!1,this._initSegmentId="",this.resetSeamlessSwitchStats();case 12:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"resetSeamlessSwitchStats",value:function(){this.seamlessLoadingSwitch=null,this.seamlessLoadingSwitching=!1,this._demuxer&&(this._demuxer.seamlessLoadingSwitching=!1)}},{key:"endOfStream",value:(a=Im(Rm().mark((function e(){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=7;break}if(!this._sourceCreated){e.next=5;break}return e.next=4,this._mse.endOfStream();case 4:this.flv.emit(cP);case 5:e.next=8;break;case 7:this._softVideo&&this._softVideo.endOfStream();case 8:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"updateDuration",value:(i=Im(Rm().mark((function e(t){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=7;break}if(this._mse.isOpened){e.next=4;break}return e.next=4,this._mse.open();case 4:return EB.debug("update duration",t),e.next=7,this._mse.updateDuration(t);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"destroy",value:(n=Im(Rm().mark((function e(){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=3;break}return e.next=3,this._mse.unbindMedia();case 3:this._mse=null,this._softVideo=null,this._demuxer=null,this._remuxer=null;case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"appendBuffer",value:(r=Im(Rm().mark((function e(t){var r,n,i,a,o,s,u,c,l,f,h,d,p,v,y,g,m,_,b=this;return Rm().wrap((function(e){for(var w,k,S,x,E,T;;)switch(e.prev=e.next){case 0:if(r=!1,this._cachedBuffer&&(t=RP(this._cachedBuffer,t),this._cachedBuffer=null),n=this._demuxer,t&&t.length&&n){e.next=5;break}return e.abrupt("return");case 5:e.prev=5,this.flv._transferCost.start(kB),n.demuxAndFix(t,this.seamlessLoadingSwitching||this._discontinuity,this._contiguous,this._demuxStartTime,this.seamlessLoadingSwitching),this.seamlessLoadingSwitching=!1,this.flv._transferCost.end(kB),e.next=15;break;case 12:throw e.prev=12,e.t0=e.catch(5),new wD(dD,_D.FLV,e.t0);case 15:if(i=n.videoTrack,a=n.audioTrack,o=n.metadataTrack,!this.seamlessLoadingSwitch){e.next=25;break}if(!((s=BS(w=i.samples).call(w,(function(e){return e.originDts===i.lastKeyFrameDts})))>=0)){e.next=25;break}return B_(k=i.samples).call(k,s),e.next=22,this.seamlessLoadingSwitch();case 22:this.seamlessLoadingSwitch=null,t=null,r=!0;case 25:if(u=i.exist(),c=a.exist(),this._opts.onlyAudio&&(u=!1,i.present=!1),this._opts.onlyVideo&&(c=!1,a.present=!1),!(!u&&i.present||!c&&a.present)){e.next=42;break}if(l=0,(f=u?i:c?a:void 0)&&f.samples.length&&(l=(f.samples[f.samples.length-1].originPts-f.samples[0].originPts)/f.timescale*1e3),!(l>this._opts.analyzeDuration)){e.next=40;break}EB.warn("analyze duration exceeded, ".concat(l,"ms"),f),i.present=u,a.present=c,this.flv.emit(oP,{duration:l}),e.next=42;break;case 40:return this._cachedBuffer=t,e.abrupt("return");case 42:if(h=i.type,d=a.type,this._fireEvents(i,a,o),r||(this._discontinuity=!1,this._contiguous=!0,this._demuxStartTime=0),p=this._mse,v=function(){var e,t;null!==(e=b.flv)&&void 0!==e&&e.emit&&(null===(t=b.flv)||void 0===t||t.emit(sP,{}))},this.flv.emit(_P,{videoTrack:i}),(y=oh(S=oh(x=oh(E=oh(T="".concat(i.codec,"/")).call(T,i.width,"/")).call(E,i.height,"/")).call(x,a.codec,"/")).call(S,a.config))!==this._initSegmentId&&(this._needInitSegment=!0,this._initSegmentId=y,this._emitMetaParsedEvent(i,a)),!p){e.next=83;break}if(this._sourceCreated){e.next=59;break}return e.next=55,p.open();case 55:u&&(EB.log("codec: video/mp4;codecs=".concat(i.codec)),p.createSource(h,"video/mp4;codecs=".concat(i.codec))),c&&(EB.log("codec: audio/mp4;codecs=".concat(a.codec)),p.createSource(d,"audio/mp4;codecs=".concat(a.codec))),this._sourceCreated=!0,this.flv.emit(aP);case 59:e.prev=59,this._needInitSegment&&!this._opts.mseLowLatency&&(i.duration=this._opts.durationForMSELowLatencyOff*i.timescale,a.duration=this._opts.durationForMSELowLatencyOff*c.timescale),this.flv._transferCost.start(SB),g=this._remuxer.remux(this._needInitSegment),this.flv._transferCost.end(SB),e.next=69;break;case 66:throw e.prev=66,e.t1=e.catch(59),new wD(pD,_D.FMP4,e.t1);case 69:if(!this._needInitSegment||g.videoInitSegment||g.audioInitSegment){e.next=71;break}return e.abrupt("return");case 71:return this._needInitSegment=!1,m=[],g.videoInitSegment&&m.push(p.append(h,g.videoInitSegment)),g.audioInitSegment&&m.push(p.append(d,g.audioInitSegment)),g.videoSegment&&m.push(p.append(h,g.videoSegment)),g.audioSegment&&m.push(p.append(d,g.audioSegment)),this.flv._transferCost.start(xB),(_=$g.all(m)).then(v).then((function(){b.flv._transferCost.end(xB),v()})),e.abrupt("return",_);case 83:this._softVideo&&(this._softVideo.appendBuffer(i,a),v());case 84:case"end":return e.stop()}}),e,this,[[5,12],[59,66]])}))),function(e){return r.apply(this,arguments)})},{key:"evictBuffer",value:(t=Im(Rm().mark((function e(t){var r,n,i,a=this;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.flv.media,this._mse&&this._demuxer&&r&&t&&!(t<0)){e.next=3;break}return e.abrupt("return");case 3:if(n=r.currentTime,!((i=n-t)<=0)){e.next=7;break}return e.abrupt("return");case 7:if(!(oD.start(oD.get(r))+1>=i)){e.next=10;break}return e.abrupt("return");case 10:return e.abrupt("return",this._mse.clearBuffer(0,i).then((function(){return a.flv.emit(uP,{removeEnd:i})})));case 11:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_emitMetaParsedEvent",value:function(e,t){e.exist()&&this.flv.emit(hP,{type:"video",track:e,meta:{codec:e.codec,timescale:e.timescale,width:e.width,height:e.height,sarRatio:e.sarRatio,baseDts:e.baseDts}}),t.exist()&&this.flv.emit(hP,{type:"audio",track:t,meta:{codec:t.codec,channelCount:t.channelCount,sampleRate:t.sampleRate,timescale:t.timescale,baseDts:t.baseDts}}),EB.debug("track parsed",e,t)}},{key:"_fireEvents",value:function(e,t,r){var n,i,a,o,s,u,c=this;EB.debug(oh(n="videoTrack samples count: ".concat(e.samples.length,", audioTrack samples count: ")).call(n,t.samples.length)),Ch(i=r.flvScriptSamples).call(i,(function(e){c.flv.emit(vP,e),EB.debug("flvScriptData",e)})),Ch(a=e.samples).call(a,(function(e){e.keyframe&&c.flv.emit(lP,{pts:e.originPts})})),Ch(o=e.warnings).call(o,(function(e){var t;switch(e.type){case ZU:t=wP;break;case eI:t=kP;break;case tI:t=TP}t&&c.flv.emit(bP,Pm(Pm({},e),{},{type:t})),EB.warn("video exception",e)})),Ch(s=t.warnings).call(s,(function(e){var t;switch(e.type){case rI:t=SP;break;case nI:t=xP;break;case iI:t=EP}t&&c.flv.emit(bP,Pm(Pm({},e),{},{type:t})),EB.warn("audio exception",e)})),Ch(u=r.seiSamples).call(u,(function(e){c.flv.emit(dP,Pm(Pm({},e),{},{sei:{code:e.data.type,content:e.data.payload,dts:e.pts}}))}))}}]),e}();function AB(e,t){var r=0,n=e.length-1,i=0,a=0,o=n;for(t<e[0]&&(r=0,a=o+1);a<=o;){if((i=a+Math.floor((o-a)/2))===n||t>=e[i]&&t<e[i+1]){r=i;break}e[i]<t?a=i+1:o=i-1}return r}var LB=new AD("flv"),CB=.1,OB=function(e){zm(c,e);var t,r,n,i,a,o,s,u=qm(c);function c(e){var t,r;return Bm(this,c),Nm(Hm(t=u.call(this)),"media",null),Nm(Hm(t),"_loading",!1),Nm(Hm(t),"_opts",null),Nm(Hm(t),"_bufferService",null),Nm(Hm(t),"_gapService",null),Nm(Hm(t),"_stats",null),Nm(Hm(t),"_mediaLoader",null),Nm(Hm(t),"_maxChunkWaitTimer",null),Nm(Hm(t),"_tickTimer",null),Nm(Hm(t),"_tickInterval",500),Nm(Hm(t),"_urlSwitching",!1),Nm(Hm(t),"_seamlessSwitching",!1),Nm(Hm(t),"_disconnectRetryCount",0),Nm(Hm(t),"_preLoadEndPoint",0),Nm(Hm(t),"_keyframes",null),Nm(Hm(t),"_acceptRanges",!0),Nm(Hm(t),"_onProgress",function(){var e=Im(Rm().mark((function e(r,n,i,a){var o,s,u,c,l,f,h,d,p,v;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=i.startTime,s=i.endTime,u=i.st,c=i.firstByteTime,t._loading=!n,t._firstProgressEmit){e.next=13;break}if(t.media){e.next=6;break}return null===(l=t._mediaLoader)||void 0===l||l.cancel(),e.abrupt("return");case 6:f=a.headers,h=u?c-u:s-o,t.emit(eP,{url:t._opts.url,responseUrl:a.url,elapsed:h}),t.emit(rP,{headers:f}),t._transferCost.set(wB,h),t._acceptRanges=!(null==f||!f.get("Accept-Ranges"))||!(null==f||!f.get("Content-Range")),t._firstProgressEmit=!0;case 13:if(t._bufferService){e.next=15;break}return e.abrupt("return");case 15:return clearTimeout(t._maxChunkWaitTimer),t._bandwidthService.addChunkRecord(null==r?void 0:r.byteLength,s-o),e.prev=17,e.next=20,t._bufferService.appendBuffer(r);case 20:null===(d=t._bufferService)||void 0===d||d.evictBuffer(t._opts.bufferBehind),e.next=33;break;case 23:if(e.prev=23,e.t0=e.catch(17),t.isLive||!t._bufferService.isFull()){e.next=32;break}return e.next=28,t._mediaLoader.cancel();case 28:return t._loading=!1,p=t.bufferInfo().remaining,t._opts.preloadTime=ob(p)/2,e.abrupt("return");case 32:return e.abrupt("return",t._emitError(wD.create(e.t0)));case 33:if(t._urlSwitching&&(t._urlSwitching=!1,t.emit(gP,{url:t._opts.url})),t._seamlessSwitching&&(t._seamlessSwitching=!1,t._tick()),!n||t.media.seeking){e.next=40;break}return t.emit(nP),LB.debug("load done"),t.isLive&&t._disconnectRetryCount<=0&&t._end(),e.abrupt("return");case 40:if(t.isLive){e.next=42;break}return e.abrupt("return");case 42:(v=t._opts.maxReaderInterval)&&t._firstProgressEmit&&(clearTimeout(t._maxChunkWaitTimer),t._maxChunkWaitTimer=Qw((function(){if(t._disconnectRetryCount)return t._disconnectRetryCount--,void t.load();LB.debug("onMaxChunkWait",v),t._end()}),v));case 44:case"end":return e.stop()}}),e,null,[[17,23]])})));return function(t,r,n,i){return e.apply(this,arguments)}}()),Nm(Hm(t),"_onRetryError",(function(e,r){LB.debug("load retry",e,r),t.emit(iP,{error:wD.network(e),retryTime:r})})),Nm(Hm(t),"_end",(function(){t._clear(),t._bufferService&&t._bufferService.endOfStream(),LB.debug("end stream")})),Nm(Hm(t),"_resetDisconnectCount",(function(){t._disconnectRetryCount=t._opts.disconnectRetryCount})),Nm(Hm(t),"_tick",(function(){clearTimeout(t._tickTimer);var e=Hm(t).media;if(e){t._tickTimer=Qw(t._tick,t._tickInterval);var r=oD.end(oD.get(e));if(!(r<CB)&&e.readyState){var n=t._opts;if(function(e){return e&&!e.paused&&!e.ended&&0!==e.playbackRate&&0!==e.readyState}(e)&&e.currentTime)t._gapService&&t._gapService.do(e,n.maxJumpDistance,t.isLive,3);else{if(!e.currentTime&&t._gapService&&n.enableStartGapJump)return void((t._opts.mseLowLatency||!1===t._opts.mseLowLatency&&t.bufferInfo(.3).nextStart)&&t._gapService.do(e,n.maxJumpDistance,t.isLive,3));n.isLive&&4===e.readyState&&r-e.currentTime>n.disconnectTime&&t.disconnect()}}}})),Nm(Hm(t),"_onPlay",(function(){var e,r,n=t._opts.softDecode||(null===(e=t.media)||void 0===e||null===(r=e.buffered)||void 0===r?void 0:r.length);if(t.isLive)!t._loading&&n&&t.replay(void 0,!0);else{var i=t.bufferInfo();(i.start||i.nextStart)>CB&&t._tick()}})),Nm(Hm(t),"_onLoadeddata",(function(){t.isLive&&!t._opts.mseLowLatency&&t.media.duration!==1/0&&t._bufferService.updateDuration(1/0).catch((function(e){}))})),Nm(Hm(t),"_onSeeking",Im(Rm().mark((function e(){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:!t.isLive&&t.seekable&&(t._preLoadEndPoint=-1,t._checkPreload());case 1:case"end":return e.stop()}}),e)})))),Nm(Hm(t),"_onTimeupdate",(function(){if(t.media){var e=t._opts,r=t.media.currentTime;if(e.isLive&&e.maxLatency&&e.targetLatency){var n=oD.end(oD.get(t.media));n-r>=e.maxLatency&&(t.media.currentTime=n-e.targetLatency,t.emit(fP,{currentTime:t.media.currentTime,latency:e.targetLatency}))}t._seiService.throw(r,!0),e.isLive||!t.seekable||t._loading||t._checkPreload()}})),Nm(Hm(t),"_onWaiting",(function(){t.isLive&&!t._loading&&t._disconnectRetryCount&&(t._disconnectRetryCount--,t.load())})),Nm(Hm(t),"_onBufferUpdate",(function(){if(!t._opts.isLive){var e=t.bufferInfo(),r=e.end,n=e.nextEnd;Math.abs((r||n)-t.media.duration)<1&&(t._end(),t.media.readyState<=2&&t._tick())}})),Nm(Hm(t),"_checkPreload",Im(Rm().mark((function e(){var r,n,i,a,o,s,u,c,l,f;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.bufferInfo(),n=r.remaining,i=void 0===n?0:n,a=t._opts,o=t._keyframes.filepositions,s=t._keyframes.times,u=t.media.currentTime,!(i<a.preloadTime)){e.next=19;break}if(c=AB(t._keyframes.times,u+i+CB),(l=AB(t._keyframes.times,u+i+t._opts.preloadTime))===c&&(l=c+1),t._preLoadEndPoint!==l){e.next=11;break}return e.abrupt("return");case 11:if(null!=(f=o[c])){e.next=14;break}return e.abrupt("return");case 14:return e.next=16,t._mediaLoader.cancel();case 16:t._loadData(null,[f,o[l]]),t._preLoadEndPoint=l,t._bufferService.unContiguous(s[c]);case 19:case"end":return e.stop()}}),e)})))),Nm(Hm(t),"_onFlvScriptData",(function(e){var r,n,i,a,o=null===(r=e.data)||void 0===r||null===(n=r.onMetaData)||void 0===n?void 0:n.keyframes,s=null===(i=e.data)||void 0===i||null===(a=i.onMetaData)||void 0===a?void 0:a.duration;o&&(t._keyframes=o),!t._opts.isLive&&s&&t._bufferService.updateDuration(s)})),t._opts=((r=Pm({retryCount:3,retryDelay:1e3,disconnectRetryCount:0,loadTimeout:1e4,maxReaderInterval:5e3,preloadTime:5,defaultVodLoadSize:1e7,isLive:!1,softDecode:!1,bufferBehind:10,maxJumpDistance:3,analyzeDuration:2e4,seamlesslyReload:!1,keepStatusAfterSwitch:!0,onlyVideo:!1,onlyAudio:!1,preferMMS:!1,mseLowLatency:!0,durationForMSELowLatencyOff:6,chunkCountForSpeed:50,skipChunkSize:1e3,longtimeNoReceived:3e3,enableStartGapJump:!0},e)).isLive&&r.preloadTime&&(r.maxLatency||(r.maxLatency=2*r.preloadTime),r.targetLatency||(r.targetLatency=r.preloadTime),null!==r.disconnectTime&&void 0!==r.disconnectTime||(r.disconnectTime=r.maxLatency)),r),t.media=t._opts.media||document.createElement("video"),t._opts.media=null,t._firstProgressEmit=!1,t._mediaLoader=new UP(Pm(Pm({},t._opts.fetchOptions),{},{retry:t._opts.retryCount,retryDelay:t._opts.retryDelay,timeout:t._opts.loadTimeout,onRetryError:t._onRetryError,onProgress:t._onProgress,responseType:"arraybuffer"})),t._disconnectRetryCount=t._opts.disconnectRetryCount,t._transferCost=new bB,t._bufferService=new TB(Hm(t),t._opts.softDecode?t.media:void 0,t._opts),t._seiService=new EU(Hm(t)),t._bandwidthService=new TU({chunkCountForSpeed:t._opts.chunkCountForSpeed,skipChunkSize:t._opts.skipChunkSize,longtimeNoReceived:t._opts.longtimeNoReceived}),t._stats=new LU(Hm(t)),t._opts.softDecode||(t._gapService=new IP),t.media.addEventListener("play",t._onPlay),t.media.addEventListener("loadeddata",t._onLoadeddata),t.media.addEventListener("seeking",t._onSeeking),t.media.addEventListener("timeupdate",t._onTimeupdate),t.media.addEventListener("progress",t._onBufferUpdate),t.media.addEventListener("waiting",t._onWaiting),t.on(vP,t._onFlvScriptData),t}return Fm(c,[{key:"version",get:function(){return"3.0.23-rc.6"}},{key:"isLive",get:function(){return this._opts.isLive}},{key:"baseDts",get:function(){var e;return null===(e=this._bufferService)||void 0===e?void 0:e.baseDts}},{key:"seekable",get:function(){return!!this._keyframes&&this._acceptRanges}},{key:"loader",get:function(){return this._mediaLoader}},{key:"blobUrl",get:function(){var e;return null===(e=this._bufferService)||void 0===e?void 0:e.blobUrl}},{key:"speedInfo",value:function(){return{speed:this._bandwidthService.getLatestSpeed(),avgSpeed:this._bandwidthService.getAvgSpeed(),totalSize:this._bandwidthService.getTotalSize(),totalCost:this._bandwidthService.getTotalCost()}}},{key:"getStats",value:function(){return this._stats.getStats()}},{key:"bufferInfo",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CB;return oD.info(oD.get(this.media),null===(e=this.media)||void 0===e?void 0:e.currentTime,t)}},{key:"playbackQuality",value:function(){return function(e){if(!e)return{};if("function"==typeof e.getVideoPlaybackQuality){var t=e.getVideoPlaybackQuality();return{droppedVideoFrames:t.droppedVideoFrames||t.corruptedVideoFrames,totalVideoFrames:t.totalVideoFrames,creationTime:t.creationTime}}return{droppedVideoFrames:e.webkitDroppedFrameCount,totalVideoFrames:e.webkitDecodedFrameCount,creationTime:performance.now()}}(this.media)}},{key:"load",value:(s=Im(Rm().mark((function e(t){var r,n,i=arguments;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i.length>1&&void 0!==i[1]&&i[1],n=i.length>2?i[2]:void 0,this._bufferService){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,this._reset(r);case 6:this._loadData(t,this._opts.isLive?[]:[0,this._opts.defaultVodLoadSize],n),clearTimeout(this._tickTimer),this._tickTimer=Qw(this._tick,this._tickInterval);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"replay",value:(o=Im(Rm().mark((function e(){var t,r,n=this,i=arguments;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=i.length>0&&void 0!==i[0]?i[0]:this._opts.seamlesslyReload,r=i.length>1?i[1]:void 0,this.media){e.next=4;break}return e.abrupt("return");case 4:if(this._resetDisconnectCount(),!t){e.next=11;break}return e.next=8,this._clear();case 8:Qw((function(){n._seamlessSwitching=!0,n._loadData(n._opts.url),n._bufferService.seamlessSwitch()})),e.next=13;break;case 11:return e.next=13,this.load();case 13:return e.abrupt("return",this.media.play(!r).catch((function(){})));case 14:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"disconnect",value:function(){var e;return LB.debug("disconnect!"),null===(e=this._bufferService)||void 0===e||e.resetSeamlessSwitchStats(),this._clear()}},{key:"switchURL",value:(a=Im(Rm().mark((function e(t,r){var n=this;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._bufferService){e.next=2;break}return e.abrupt("return");case 2:if(this._resetDisconnectCount(),!this._loading||!r){e.next=6;break}return this._bufferService.seamlessLoadingSwitch=function(){var e=Im(Rm().mark((function e(r){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n._clear();case 2:n._bufferService.seamlessLoadingSwitching=!0,n._urlSwitching=!0,n._seamlessSwitching=!0,n._bufferService.seamlessSwitch(),n._loadData(t);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.abrupt("return");case 6:if(r&&this._opts.isLive){e.next=11;break}return e.next=9,this.load(t);case 9:return this._urlSwitching=!0,e.abrupt("return",this.media.play(!0).catch((function(){})));case 11:return e.next=13,this._clear();case 13:Qw((function(){n._urlSwitching=!0,n._seamlessSwitching=!0,n._loadData(t),n._bufferService.seamlessSwitch()}));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"destroy",value:(i=Im(Rm().mark((function e(){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.media){e.next=2;break}return e.abrupt("return");case 2:return this.removeAllListeners(),this._seiService.reset(),this.media.removeEventListener("play",this._onPlay),this.media.removeEventListener("loadeddata",this._onLoadeddata),this.media.removeEventListener("seeking",this._onSeeking),this.media.removeEventListener("timeupdate",this._onTimeupdate),this.media.removeEventListener("waiting",this._onWaiting),this.media.removeEventListener("progress",this._onBufferUpdate),e.next=12,$g.all([this._clear(),this._bufferService.destroy()]);case 12:this.media=null,this._bufferService=null;case 14:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"_emitError",value:function(e){var t,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];LB.table(e),LB.error(e),LB.error(null===(t=this.media)||void 0===t?void 0:t.error),this._urlSwitching&&(this._urlSwitching=!1,this._seamlessSwitching=!1,this.emit(mP,e)),this.emit(ZD,e),r&&(this._seiService.reset(),this._end())}},{key:"_reset",value:(n=Im(Rm().mark((function e(){var t,r=arguments;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]&&r[0],this._seiService.reset(),this._bandwidthService.reset(),this._stats.reset(),e.next=6,this._clear();case 6:return e.next=8,this._bufferService.reset(t);case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"_loadData",value:(r=Im(Rm().mark((function e(t,r,n){var i;return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(this._opts.url=t),i=t=this._opts.url,t){e.next=4;break}throw new Error("Source url is missing");case 4:if(this._opts.preProcessUrl&&(i=this._opts.preProcessUrl(t).url),this._mediaLoader.finnalUrl=i,this.emit(tP,{url:i,seamlessSwitching:this._seamlessSwitching}),LB.debug("load data, loading:",this._loading,i),!this._loading){e.next=11;break}return e.next=11,this._mediaLoader.cancel();case 11:return this._loading=!0,e.prev=12,e.next=15,this._mediaLoader.load({url:i,range:r,streamRes:n,firstMaxChunkSize:this._opts.firstMaxChunkSize});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(12),this._loading=!1,e.abrupt("return",this._emitError(wD.network(e.t0),!1));case 21:case"end":return e.stop()}}),e,this,[[12,17]])}))),function(e,t,n){return r.apply(this,arguments)})},{key:"_clear",value:(t=Im(Rm().mark((function e(){return Rm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mediaLoader){e.next=3;break}return e.next=3,this._mediaLoader.cancel();case 3:clearTimeout(this._maxChunkWaitTimer),clearTimeout(this._tickTimer),this._loading=!1,this._firstProgressEmit=!1;case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"isSupported",value:function(e){return e&&"video"!==e&&"audio"!==e?"undefined"!=typeof WebAssembly:FD.isSupported()}},{key:"enableLogger",value:function(){AD.enable(),vI.enable()}},{key:"disableLogger",value:function(){AD.disable(),vI.disable()}}]),c}(iw);try{localStorage.getItem("xgd")?OB.enableLogger():OB.disableLogger()}catch(VB){}var DB=function(){function e(t,r){var n=this;Bm(this,e),Nm(this,"_onLowDecode",(function(){var e,t,r,i,a=n._opts,o=a.media,s=a.innerDegrade,u=a.backupURL;null===(e=n._plugin)||void 0===e||null===(t=e.player)||void 0===t||t.emit("lowdecode",o.degradeInfo),null===(r=n._plugin)||void 0===r||null===(i=r.player)||void 0===i||i.emit("core_event",Pm(Pm({},o.degradeInfo),{},{eventName:yP})),1!==s&&3!==s||!u||n._degrade(u)})),Nm(this,"_degrade",(function(e){var t=n._plugin.player,r=t.video;if("MVideo"===(null==r?void 0:r.TAG)){var i=t.video.degradeVideo;t.video=i,r.degrade(e),e&&(t.config.url=e);var a=t.root.firstChild;"MVideo"===a.TAG&&t.root.replaceChild(i,a);var o=n._plugin.constructor.pluginName.toLowerCase();t.unRegisterPlugin(o),t.once("canplay",(function(){t.play()}))}})),Nm(this,"forceDegradeToVideo",(function(e){var t=n._opts.innerDegrade;1!==t&&3!==t||n._degrade(e)})),this._opts=t,this._plugin=r,this._init()}return Fm(e,[{key:"_init",value:function(){var e=this._opts,t=e.media,r=e.isLive,n=e.preloadTime,i=e.innerDegrade,a=e.decodeMode;t&&(r||!t.setPlayMode?(i&&t.setAttribute("innerdegrade",i),n&&t.setAttribute("preloadtime",n),t.setDecodeMode&&t.setDecodeMode(a),this._bindEvents()):t.setPlayMode("VOD"))}},{key:"_bindEvents",value:function(){this._opts.media.addEventListener("lowdecode",this._onLowDecode)}},{key:"destroy",value:function(){var e,t;null===(e=this._opts)||void 0===e||null===(t=e.media)||void 0===t||t.removeEventListener("lowdecode",this._onLowDecode),this._plugin=null}}]),e}(),PB=function(e){zm(r,e);var t=qm(r);function r(){var e,n;Bm(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return Nm(Hm(n=t.call.apply(t,oh(e=[this]).call(e,a))),"logger",LB),Nm(Hm(n),"flv",null),Nm(Hm(n),"pluginExtension",null),Nm(Hm(n),"getStats",(function(){var e;return null===(e=n.flv)||void 0===e?void 0:e.getStats()})),Nm(Hm(n),"loadSource",(function(){var e;arguments.length>0&&void 0!==arguments[0]||n.player.config.url;var t=arguments.length>1?arguments[1]:void 0;null===(e=n.flv)||void 0===e||e.load(n.player.config.url,!0,t)})),Nm(Hm(n),"destroy",(function(){var e;n.flv&&(n.flv.destroy(),n.flv=null),null===(e=n.pluginExtension)||void 0===e||e.destroy(),n.pluginExtension=null})),Nm(Hm(n),"_onSwitchURL",(function(e,t){var r,i;n.flv&&(n.player.config.url=e,"object"===Mm(t)&&(t=t.seamless),n.flv.switchURL(e,t),!t&&null!==(r=n.player.config)&&void 0!==r&&null!==(i=r.flv)&&void 0!==i&&i.keepStatusAfterSwitch&&n._keepPauseStatus())})),Nm(Hm(n),"_keepPauseStatus",(function(){n.player.paused&&n.player.once("canplay",(function(){n.player.pause()}))})),Nm(Hm(n),"_onDefinitionChange",(function(e){var t=e.to;n.flv&&n.flv.switchURL(t)})),n}return Fm(r,[{key:"core",get:function(){return this.flv}},{key:"version",get:function(){var e;return null===(e=this.flv)||void 0===e?void 0:e.version}},{key:"softDecode",get:function(){var e,t,r=null===(e=this.player)||void 0===e||null===(t=e.config)||void 0===t?void 0:t.mediaType;return!!r&&"video"!==r&&"audio"!==r&&"offscreen-video"!==r}},{key:"loader",get:function(){var e;return null===(e=this.flv)||void 0===e?void 0:e.loader}},{key:"transferCost",get:function(){return this.flv._transferCost.transferCost}},{key:"beforePlayerInit",value:function(){var e=this,t=this.player.config,r=this.player.media||this.player.video;if(t.url){this.flv&&this.flv.destroy(),this.player.switchURL=this._onSwitchURL;var n,i=t.flv||{};if(null!==i.disconnectTime&&void 0!==i.disconnectTime||(i.disconnectTime=0),this.flv=new OB(Pm({softDecode:this.softDecode,isLive:t.isLive,media:r,preProcessUrl:function(t,r){var n,i;return(null===(n=e.player)||void 0===n||null===(i=n.preProcessUrl)||void 0===i?void 0:i.call(n,t,r))||{url:t,ext:r}}},i)),this.softDecode||LS.defineGetterOrSetter(this.player,{url:{get:function(){var t;return null===(t=e.flv)||void 0===t?void 0:t.blobUrl},configurable:!0}}),this.softDecode&&(this.pluginExtension=new DB(Pm({media:this.player.video,isLive:t.isLive},t.flv),this),this.player.forceDegradeToVideo=function(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return null===(t=e.pluginExtension)||void 0===t?void 0:t.forceDegradeToVideo.apply(t,n)}),t.isLive)null===(n=this.player)||void 0===n||n.useHooks("replay",(function(){var t;return null===(t=e.flv)||void 0===t?void 0:t.replay()}));this.on("urlchange",this._onSwitchURL),this.on("destroy",this.destroy),this._transError(),this._transCoreEvent(eP),this._transCoreEvent(tP),this._transCoreEvent(rP),this._transCoreEvent(nP),this._transCoreEvent(iP),this._transCoreEvent(aP),this._transCoreEvent(oP),this._transCoreEvent(sP),this._transCoreEvent(uP),this._transCoreEvent(cP),this._transCoreEvent(lP),this._transCoreEvent(fP),this._transCoreEvent(hP),this._transCoreEvent(dP),this._transCoreEvent(pP),this._transCoreEvent(vP),this._transCoreEvent(bP),this._transCoreEvent(gP),this._transCoreEvent(mP),i.manualLoad||this.loadSource(t.url,i.streamRes)}}},{key:"_transError",value:function(){var e=this;this.flv.on(ZD,(function(t){e.player&&e.player.emit("error",new wS(e.player,t))}))}},{key:"_transCoreEvent",value:function(e){var t=this;this.flv.on(e,(function(r){t.player&&t.player.emit("core_event",Pm(Pm({},r),{},{eventName:e}))}))}}],[{key:"pluginName",get:function(){return"flv"}},{key:"isSupported",value:function(e,t){return OB.isSupported(e,t)}},{key:"isSupportedMMS",value:function(){return"undefined"!=typeof ManagedMediaSource}}]),r}(LS);function RB(e,t,r){return t=UB(t),function(e,t){if(t&&("object"==Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,IB()?Cm(t,r||[],UB(e).constructor):t.apply(e,r))}function MB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Yh(e,jB(n.key),n)}}function UB(e){var t;return(UB=$h?Lm(t=Xh).call(t):function(e){return e.__proto__||Xh(e)})(e)}function IB(){try{var e=!Boolean.prototype.valueOf.call(Cm(Boolean,[],(function(){})))}catch(t){}return(IB=function(){return!!e})()}function BB(e,t){var r;return(BB=$h?Lm(r=$h).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function jB(e){var t=function(e,t){if("object"!=Ol(e)||!e)return e;var r=e[Om];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ol(t)?t:t+""}Nm(PB,"Flv",OB);var FB=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),RB(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Qh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Yh(e,"prototype",{writable:!1}),t&&BB(e,t)}(t,e),r=t,i=[{key:"pluginName",get:function(){return"adaptive"}},{key:"defaultConfig",get:function(){return{hurryEndMs:1800,hurryStartMs:2500,hurrySpeed:1.1}}}],(n=[{key:"afterCreate",value:function(){var e;this.on("timeupdate",Lm(e=this.onTimeUpdate).call(e,this))}},{key:"onTimeUpdate",value:function(){var e=this.bufferLength;this.speed===this.config.hurrySpeed?e<=this.config.hurryEndMs&&(this.speed=1):1===this.speed&&e>=this.config.hurryStartMs&&(this.speed=this.config.hurrySpeed)}},{key:"bufferLength",get:function(){var e=this.player.getBufferedRange(),t=this.player.video.currentTime,r=e[1]-Math.max(e[0],t);return r=Math.round(1e3*Math.max(0,r))}},{key:"speed",get:function(){return this.player.playbackRate},set:function(e){this.speed!==e&&(this.player.playbackRate=e)}}])&&MB(r.prototype,n),i&&MB(r,i),Yh(r,"prototype",{writable:!1}),r;var r,n,i}(LS),NB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Rf(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ir(e,"prototype",{writable:!1}),t&&Mf(e,t)}(a,e);var t,r,n,i=th(a);function a(){var e,t,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return t=i.call.apply(i,oh(e=[this]).call(e,u)),r=Ul(t),o=void 0,(n=Rl(n="_originSwitchURL"))in r?Ir(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,t}return t=a,(r=[{key:"beforePlayerInit",value:function(){var e=this;this._originSwitchURL=this.player.switchURL;var t=this.destroy;this.destroy=function(){e.player.switchURL=e._originSwitchURL,t()},Of(Cf(a.prototype),"beforePlayerInit",this).call(this)}}])&&Ml(t.prototype,r),n&&Ml(t,n),Ir(t,"prototype",{writable:!1}),a}(PB),zB=window.VePlayer.DynamicModule;VePlayer.registerPlugin(zB.PluginFlv,{FlvPlugin:NB,Adaptive:FB}),e.Adaptive=FB,e.FlvPlugin=NB}));
|