@volcengine/veplayer-plugin 2.0.0-rc.0 → 2.2.0-rc.0

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.
Files changed (30) hide show
  1. package/README.md +21 -0
  2. package/esm/index.development.js +45768 -41842
  3. package/esm/index.production.js +5 -4
  4. package/esm/veplayer.plugin.flv.development.js +1988 -8535
  5. package/esm/veplayer.plugin.flv.production.js +1 -1
  6. package/esm/veplayer.plugin.hls.development.js +3548 -10507
  7. package/esm/veplayer.plugin.hls.production.js +1 -1
  8. package/esm/veplayer.plugin.mp4.development.js +87 -4
  9. package/esm/veplayer.plugin.mp4.production.js +1 -1
  10. package/esm/veplayer.plugin.rtm.development.js +159 -43
  11. package/esm/veplayer.plugin.rtm.production.js +1 -1
  12. package/esm/veplayer.plugin.shaka.development.js +86 -3
  13. package/esm/veplayer.plugin.shaka.production.js +1 -1
  14. package/esm/veplayer.plugin.xgvideo.development.js +226 -225
  15. package/esm/veplayer.plugin.xgvideo.production.js +1 -1
  16. package/package.json +2 -1
  17. package/umd/index.development.js +35422 -31496
  18. package/umd/index.production.js +1 -1
  19. package/umd/veplayer.plugin.flv.development.js +2034 -8580
  20. package/umd/veplayer.plugin.flv.production.js +1 -1
  21. package/umd/veplayer.plugin.hls.development.js +3654 -10614
  22. package/umd/veplayer.plugin.hls.production.js +1 -1
  23. package/umd/veplayer.plugin.mp4.development.js +87 -4
  24. package/umd/veplayer.plugin.mp4.production.js +1 -1
  25. package/umd/veplayer.plugin.rtm.development.js +180 -65
  26. package/umd/veplayer.plugin.rtm.production.js +1 -1
  27. package/umd/veplayer.plugin.shaka.development.js +86 -3
  28. package/umd/veplayer.plugin.shaka.production.js +1 -1
  29. package/umd/veplayer.plugin.xgvideo.development.js +26 -26
  30. package/umd/veplayer.plugin.xgvideo.production.js +1 -1
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).__VEPLAYER_PLUGIN_XGVIDEO__=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n=function(e){return e&&e.Math==Math&&e},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),i=function(e){try{return!!e()}catch(t){return!0}},o=!i((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),a=o,s=Function.prototype,u=s.apply,c=s.call,l="object"==typeof Reflect&&Reflect.apply||(a?c.bind(u):function(){return c.apply(u,arguments)}),h=o,A=Function.prototype,d=A.call,f=h&&A.bind.bind(d,d),v=h?f:function(e){return function(){return d.apply(e,arguments)}},p=v,m=p({}.toString),y=p("".slice),g=function(e){return y(m(e),8,-1)},_=g,b=v,E=function(e){if("Function"===_(e))return b(e)},k="object"==typeof document&&document.all,T={all:k,IS_HTMLDDA:void 0===k&&void 0!==k},R=T.all,S=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===R}:function(e){return"function"==typeof e},w={},D=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=o,C=Function.prototype.call,L=I?C.bind(C):function(){return C.apply(C,arguments)},V={},x={}.propertyIsEnumerable,F=Object.getOwnPropertyDescriptor,G=F&&!x.call({1:2},1);V.f=G?function(e){var t=F(this,e);return!!t&&t.enumerable}:x;var O,Z,P=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},U=i,N=g,B=Object,M=v("".split),W=U((function(){return!B("z").propertyIsEnumerable(0)}))?function(e){return"String"==N(e)?M(e,""):B(e)}:B,Y=function(e){return null==e},X=Y,Q=TypeError,j=function(e){if(X(e))throw Q("Can't call method on "+e);return e},H=W,J=j,K=function(e){return H(J(e))},z=S,q=T.all,$=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:z(e)||e===q}:function(e){return"object"==typeof e?null!==e:z(e)},ee={},te=ee,ne=r,re=S,ie=function(e){return re(e)?e:void 0},oe=function(e,t){return arguments.length<2?ie(te[e])||ie(ne[e]):te[e]&&te[e][t]||ne[e]&&ne[e][t]},ae=v({}.isPrototypeOf),se="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=r,ce=se,le=ue.process,he=ue.Deno,Ae=le&&le.versions||he&&he.version,de=Ae&&Ae.v8;de&&(Z=(O=de.split("."))[0]>0&&O[0]<4?1:+(O[0]+O[1])),!Z&&ce&&(!(O=ce.match(/Edge\/(\d+)/))||O[1]>=74)&&(O=ce.match(/Chrome\/(\d+)/))&&(Z=+O[1]);var fe=Z,ve=fe,pe=i,me=r.String,ye=!!Object.getOwnPropertySymbols&&!pe((function(){var e=Symbol();return!me(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ve&&ve<41})),ge=ye&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_e=oe,be=S,Ee=ae,ke=Object,Te=ge?function(e){return"symbol"==typeof e}:function(e){var t=_e("Symbol");return be(t)&&Ee(t.prototype,ke(e))},Re=String,Se=function(e){try{return Re(e)}catch(t){return"Object"}},we=S,De=Se,Ie=TypeError,Ce=function(e){if(we(e))return e;throw Ie(De(e)+" is not a function")},Le=Ce,Ve=Y,xe=function(e,t){var n=e[t];return Ve(n)?void 0:Le(n)},Fe=L,Ge=S,Oe=$,Ze=TypeError,Pe={exports:{}},Ue=r,Ne=Object.defineProperty,Be=function(e,t){try{Ne(Ue,e,{value:t,configurable:!0,writable:!0})}catch(n){Ue[e]=t}return t},Me="__core-js_shared__",We=r[Me]||Be(Me,{}),Ye=We;(Pe.exports=function(e,t){return Ye[e]||(Ye[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 Xe=Pe.exports,Qe=j,je=Object,He=function(e){return je(Qe(e))},Je=He,Ke=v({}.hasOwnProperty),ze=Object.hasOwn||function(e,t){return Ke(Je(e),t)},qe=v,$e=0,et=Math.random(),tt=qe(1..toString),nt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+tt(++$e+et,36)},rt=Xe,it=ze,ot=nt,at=ye,st=ge,ut=r.Symbol,ct=rt("wks"),lt=st?ut.for||ut:ut&&ut.withoutSetter||ot,ht=function(e){return it(ct,e)||(ct[e]=at&&it(ut,e)?ut[e]:lt("Symbol."+e)),ct[e]},At=L,dt=$,ft=Te,vt=xe,pt=function(e,t){var n,r;if("string"===t&&Ge(n=e.toString)&&!Oe(r=Fe(n,e)))return r;if(Ge(n=e.valueOf)&&!Oe(r=Fe(n,e)))return r;if("string"!==t&&Ge(n=e.toString)&&!Oe(r=Fe(n,e)))return r;throw Ze("Can't convert object to primitive value")},mt=TypeError,yt=ht("toPrimitive"),gt=function(e,t){if(!dt(e)||ft(e))return e;var n,r=vt(e,yt);if(r){if(void 0===t&&(t="default"),n=At(r,e,t),!dt(n)||ft(n))return n;throw mt("Can't convert object to primitive value")}return void 0===t&&(t="number"),pt(e,t)},_t=Te,bt=function(e){var t=gt(e,"string");return _t(t)?t:t+""},Et=$,kt=r.document,Tt=Et(kt)&&Et(kt.createElement),Rt=function(e){return Tt?kt.createElement(e):{}},St=Rt,wt=!D&&!i((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),Dt=D,It=L,Ct=V,Lt=P,Vt=K,xt=bt,Ft=ze,Gt=wt,Ot=Object.getOwnPropertyDescriptor;w.f=Dt?Ot:function(e,t){if(e=Vt(e),t=xt(t),Gt)try{return Ot(e,t)}catch(n){}if(Ft(e,t))return Lt(!It(Ct.f,e,t),e[t])};var Zt=i,Pt=S,Ut=/#|\.prototype\./,Nt=function(e,t){var n=Mt[Bt(e)];return n==Yt||n!=Wt&&(Pt(t)?Zt(t):!!t)},Bt=Nt.normalize=function(e){return String(e).replace(Ut,".").toLowerCase()},Mt=Nt.data={},Wt=Nt.NATIVE="N",Yt=Nt.POLYFILL="P",Xt=Nt,Qt=Ce,jt=o,Ht=E(E.bind),Jt=function(e,t){return Qt(e),void 0===t?e:jt?Ht(e,t):function(){return e.apply(t,arguments)}},Kt={},zt=D&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),qt=$,$t=String,en=TypeError,tn=function(e){if(qt(e))return e;throw en($t(e)+" is not an object")},nn=D,rn=wt,on=zt,an=tn,sn=bt,un=TypeError,cn=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,hn="enumerable",An="configurable",dn="writable";Kt.f=nn?on?function(e,t,n){if(an(e),t=sn(t),an(n),"function"==typeof e&&"prototype"===t&&"value"in n&&dn in n&&!n[dn]){var r=ln(e,t);r&&r[dn]&&(e[t]=n.value,n={configurable:An in n?n[An]:r[An],enumerable:hn in n?n[hn]:r[hn],writable:!1})}return cn(e,t,n)}:cn:function(e,t,n){if(an(e),t=sn(t),an(n),rn)try{return cn(e,t,n)}catch(r){}if("get"in n||"set"in n)throw un("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var fn=Kt,vn=P,pn=D?function(e,t,n){return fn.f(e,t,vn(1,n))}:function(e,t,n){return e[t]=n,e},mn=r,yn=l,gn=E,_n=S,bn=w.f,En=Xt,kn=ee,Tn=Jt,Rn=pn,Sn=ze,wn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return yn(e,this,arguments)};return t.prototype=e.prototype,t},Dn=function(e,t){var n,r,i,o,a,s,u,c,l,h=e.target,A=e.global,d=e.stat,f=e.proto,v=A?mn:d?mn[h]:(mn[h]||{}).prototype,p=A?kn:kn[h]||Rn(kn,h,{})[h],m=p.prototype;for(o in t)r=!(n=En(A?o:h+(d?".":"#")+o,e.forced))&&v&&Sn(v,o),s=p[o],r&&(u=e.dontCallGetSet?(l=bn(v,o))&&l.value:v[o]),a=r&&u?u:t[o],r&&typeof s==typeof a||(c=e.bind&&r?Tn(a,mn):e.wrap&&r?wn(a):f&&_n(a)?gn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Rn(c,"sham",!0),Rn(p,o,c),f&&(Sn(kn,i=h+"Prototype")||Rn(kn,i,{}),Rn(kn[i],o,a),e.real&&m&&(n||!m[o])&&Rn(m,o,a)))},In=g,Cn=Array.isArray||function(e){return"Array"==In(e)},Ln=Math.ceil,Vn=Math.floor,xn=Math.trunc||function(e){var t=+e;return(t>0?Vn:Ln)(t)},Fn=function(e){var t=+e;return t!=t||0===t?0:xn(t)},Gn=Fn,On=Math.min,Zn=function(e){return e>0?On(Gn(e),9007199254740991):0},Pn=function(e){return Zn(e.length)},Un=TypeError,Nn=function(e){if(e>9007199254740991)throw Un("Maximum allowed index exceeded");return e},Bn=bt,Mn=Kt,Wn=P,Yn=function(e,t,n){var r=Bn(t);r in e?Mn.f(e,r,Wn(0,n)):e[r]=n},Xn={};Xn[ht("toStringTag")]="z";var Qn="[object z]"===String(Xn),jn=Qn,Hn=S,Jn=g,Kn=ht("toStringTag"),zn=Object,qn="Arguments"==Jn(function(){return arguments}()),$n=jn?Jn:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=zn(e),Kn))?n:qn?Jn(t):"Object"==(r=Jn(t))&&Hn(t.callee)?"Arguments":r},er=S,tr=We,nr=v(Function.toString);er(tr.inspectSource)||(tr.inspectSource=function(e){return nr(e)});var rr=tr.inspectSource,ir=v,or=i,ar=S,sr=$n,ur=rr,cr=function(){},lr=[],hr=oe("Reflect","construct"),Ar=/^\s*(?:class|function)\b/,dr=ir(Ar.exec),fr=!Ar.exec(cr),vr=function(e){if(!ar(e))return!1;try{return hr(cr,lr,e),!0}catch(t){return!1}},pr=function(e){if(!ar(e))return!1;switch(sr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fr||!!dr(Ar,ur(e))}catch(t){return!0}};pr.sham=!0;var mr=!hr||or((function(){var e;return vr(vr.call)||!vr(Object)||!vr((function(){e=!0}))||e}))?pr:vr,yr=Cn,gr=mr,_r=$,br=ht("species"),Er=Array,kr=function(e){var t;return yr(e)&&(t=e.constructor,(gr(t)&&(t===Er||yr(t.prototype))||_r(t)&&null===(t=t[br]))&&(t=void 0)),void 0===t?Er:t},Tr=function(e,t){return new(kr(e))(0===t?0:t)},Rr=i,Sr=fe,wr=ht("species"),Dr=function(e){return Sr>=51||!Rr((function(){var t=[];return(t.constructor={})[wr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ir=Dn,Cr=i,Lr=Cn,Vr=$,xr=He,Fr=Pn,Gr=Nn,Or=Yn,Zr=Tr,Pr=Dr,Ur=fe,Nr=ht("isConcatSpreadable"),Br=Ur>=51||!Cr((function(){var e=[];return e[Nr]=!1,e.concat()[0]!==e})),Mr=function(e){if(!Vr(e))return!1;var t=e[Nr];return void 0!==t?!!t:Lr(e)};Ir({target:"Array",proto:!0,arity:1,forced:!Br||!Pr("concat")},{concat:function(e){var t,n,r,i,o,a=xr(this),s=Zr(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Mr(o=-1===t?a:arguments[t]))for(i=Fr(o),Gr(u+i),n=0;n<i;n++,u++)n in o&&Or(s,u,o[n]);else Gr(u+1),Or(s,u++,o);return s.length=u,s}});var Wr=$n,Yr=String,Xr=function(e){if("Symbol"===Wr(e))throw TypeError("Cannot convert a Symbol value to a string");return Yr(e)},Qr={},jr=Fn,Hr=Math.max,Jr=Math.min,Kr=function(e,t){var n=jr(e);return n<0?Hr(n+t,0):Jr(n,t)},zr=K,qr=Kr,$r=Pn,ei=function(e){return function(t,n,r){var i,o=zr(t),a=$r(o),s=qr(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ti={includes:ei(!0),indexOf:ei(!1)},ni={},ri=ze,ii=K,oi=ti.indexOf,ai=ni,si=v([].push),ui=function(e,t){var n,r=ii(e),i=0,o=[];for(n in r)!ri(ai,n)&&ri(r,n)&&si(o,n);for(;t.length>i;)ri(r,n=t[i++])&&(~oi(o,n)||si(o,n));return o},ci=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],li=ui,hi=ci,Ai=Object.keys||function(e){return li(e,hi)},di=D,fi=zt,vi=Kt,pi=tn,mi=K,yi=Ai;Qr.f=di&&!fi?Object.defineProperties:function(e,t){pi(e);for(var n,r=mi(t),i=yi(t),o=i.length,a=0;o>a;)vi.f(e,n=i[a++],r[n]);return e};var gi,_i=oe("document","documentElement"),bi=nt,Ei=Xe("keys"),ki=function(e){return Ei[e]||(Ei[e]=bi(e))},Ti=tn,Ri=Qr,Si=ci,wi=ni,Di=_i,Ii=Rt,Ci="prototype",Li="script",Vi=ki("IE_PROTO"),xi=function(){},Fi=function(e){return"<"+Li+">"+e+"</"+Li+">"},Gi=function(e){e.write(Fi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Oi=function(){try{gi=new ActiveXObject("htmlfile")}catch(i){}var e,t,n;Oi="undefined"!=typeof document?document.domain&&gi?Gi(gi):(t=Ii("iframe"),n="java"+Li+":",t.style.display="none",Di.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Fi("document.F=Object")),e.close(),e.F):Gi(gi);for(var r=Si.length;r--;)delete Oi[Ci][Si[r]];return Oi()};wi[Vi]=!0;var Zi=Object.create||function(e,t){var n;return null!==e?(xi[Ci]=Ti(e),n=new xi,xi[Ci]=null,n[Vi]=e):n=Oi(),void 0===t?n:Ri.f(n,t)},Pi={},Ui=ui,Ni=ci.concat("length","prototype");Pi.f=Object.getOwnPropertyNames||function(e){return Ui(e,Ni)};var Bi={},Mi=Kr,Wi=Pn,Yi=Yn,Xi=Array,Qi=Math.max,ji=function(e,t,n){for(var r=Wi(e),i=Mi(t,r),o=Mi(void 0===n?r:n,r),a=Xi(Qi(o-i,0)),s=0;i<o;i++,s++)Yi(a,s,e[i]);return a.length=s,a},Hi=g,Ji=K,Ki=Pi.f,zi=ji,qi="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Bi.f=function(e){return qi&&"Window"==Hi(e)?function(e){try{return Ki(e)}catch(t){return zi(qi)}}(e):Ki(Ji(e))};var $i={};$i.f=Object.getOwnPropertySymbols;var eo=pn,to=function(e,t,n,r){return r&&r.enumerable?e[t]=n:eo(e,t,n),e},no=Kt,ro=function(e,t,n){return no.f(e,t,n)},io={},oo=ht;io.f=oo;var ao,so,uo,co=ee,lo=ze,ho=io,Ao=Kt.f,fo=function(e){var t=co.Symbol||(co.Symbol={});lo(t,e)||Ao(t,e,{value:ho.f(e)})},vo=L,po=oe,mo=ht,yo=to,go=function(){var e=po("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=mo("toPrimitive");t&&!t[r]&&yo(t,r,(function(e){return vo(n,this)}),{arity:1})},_o=$n,bo=Qn?{}.toString:function(){return"[object "+_o(this)+"]"},Eo=Qn,ko=Kt.f,To=pn,Ro=ze,So=bo,wo=ht("toStringTag"),Do=function(e,t,n,r){if(e){var i=n?e:e.prototype;Ro(i,wo)||ko(i,wo,{configurable:!0,value:t}),r&&!Eo&&To(i,"toString",So)}},Io=S,Co=r.WeakMap,Lo=Io(Co)&&/native code/.test(String(Co)),Vo=r,xo=$,Fo=pn,Go=ze,Oo=We,Zo=ki,Po=ni,Uo="Object already initialized",No=Vo.TypeError,Bo=Vo.WeakMap;if(Lo||Oo.state){var Mo=Oo.state||(Oo.state=new Bo);Mo.get=Mo.get,Mo.has=Mo.has,Mo.set=Mo.set,ao=function(e,t){if(Mo.has(e))throw No(Uo);return t.facade=e,Mo.set(e,t),t},so=function(e){return Mo.get(e)||{}},uo=function(e){return Mo.has(e)}}else{var Wo=Zo("state");Po[Wo]=!0,ao=function(e,t){if(Go(e,Wo))throw No(Uo);return t.facade=e,Fo(e,Wo,t),t},so=function(e){return Go(e,Wo)?e[Wo]:{}},uo=function(e){return Go(e,Wo)}}var Yo={set:ao,get:so,has:uo,enforce:function(e){return uo(e)?so(e):ao(e,{})},getterFor:function(e){return function(t){var n;if(!xo(t)||(n=so(t)).type!==e)throw No("Incompatible receiver, "+e+" required");return n}}},Xo=Jt,Qo=W,jo=He,Ho=Pn,Jo=Tr,Ko=v([].push),zo=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,c,l,h){for(var A,d,f=jo(u),v=Qo(f),p=Xo(c,l),m=Ho(v),y=0,g=h||Jo,_=t?g(u,m):n||a?g(u,0):void 0;m>y;y++)if((s||y in v)&&(d=p(A=v[y],y,f),e))if(t)_[y]=d;else if(d)switch(e){case 3:return!0;case 5:return A;case 6:return y;case 2:Ko(_,A)}else switch(e){case 4:return!1;case 7:Ko(_,A)}return o?-1:r||i?i:_}},qo={forEach:zo(0),map:zo(1),filter:zo(2),some:zo(3),every:zo(4),find:zo(5),findIndex:zo(6),filterReject:zo(7)},$o=Dn,ea=r,ta=L,na=v,ra=D,ia=ye,oa=i,aa=ze,sa=ae,ua=tn,ca=K,la=bt,ha=Xr,Aa=P,da=Zi,fa=Ai,va=Pi,pa=Bi,ma=$i,ya=w,ga=Kt,_a=Qr,ba=V,Ea=to,ka=ro,Ta=Xe,Ra=ni,Sa=nt,wa=ht,Da=io,Ia=fo,Ca=go,La=Do,Va=Yo,xa=qo.forEach,Fa=ki("hidden"),Ga="Symbol",Oa="prototype",Za=Va.set,Pa=Va.getterFor(Ga),Ua=Object[Oa],Na=ea.Symbol,Ba=Na&&Na[Oa],Ma=ea.TypeError,Wa=ea.QObject,Ya=ya.f,Xa=ga.f,Qa=pa.f,ja=ba.f,Ha=na([].push),Ja=Ta("symbols"),Ka=Ta("op-symbols"),za=Ta("wks"),qa=!Wa||!Wa[Oa]||!Wa[Oa].findChild,$a=ra&&oa((function(){return 7!=da(Xa({},"a",{get:function(){return Xa(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ya(Ua,t);r&&delete Ua[t],Xa(e,t,n),r&&e!==Ua&&Xa(Ua,t,r)}:Xa,es=function(e,t){var n=Ja[e]=da(Ba);return Za(n,{type:Ga,tag:e,description:t}),ra||(n.description=t),n},ts=function(e,t,n){e===Ua&&ts(Ka,t,n),ua(e);var r=la(t);return ua(n),aa(Ja,r)?(n.enumerable?(aa(e,Fa)&&e[Fa][r]&&(e[Fa][r]=!1),n=da(n,{enumerable:Aa(0,!1)})):(aa(e,Fa)||Xa(e,Fa,Aa(1,{})),e[Fa][r]=!0),$a(e,r,n)):Xa(e,r,n)},ns=function(e,t){ua(e);var n=ca(t),r=fa(n).concat(as(n));return xa(r,(function(t){ra&&!ta(rs,n,t)||ts(e,t,n[t])})),e},rs=function(e){var t=la(e),n=ta(ja,this,t);return!(this===Ua&&aa(Ja,t)&&!aa(Ka,t))&&(!(n||!aa(this,t)||!aa(Ja,t)||aa(this,Fa)&&this[Fa][t])||n)},is=function(e,t){var n=ca(e),r=la(t);if(n!==Ua||!aa(Ja,r)||aa(Ka,r)){var i=Ya(n,r);return!i||!aa(Ja,r)||aa(n,Fa)&&n[Fa][r]||(i.enumerable=!0),i}},os=function(e){var t=Qa(ca(e)),n=[];return xa(t,(function(e){aa(Ja,e)||aa(Ra,e)||Ha(n,e)})),n},as=function(e){var t=e===Ua,n=Qa(t?Ka:ca(e)),r=[];return xa(n,(function(e){!aa(Ja,e)||t&&!aa(Ua,e)||Ha(r,Ja[e])})),r};ia||(Na=function(){if(sa(Ba,this))throw Ma("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ha(arguments[0]):void 0,t=Sa(e),n=function(e){this===Ua&&ta(n,Ka,e),aa(this,Fa)&&aa(this[Fa],t)&&(this[Fa][t]=!1),$a(this,t,Aa(1,e))};return ra&&qa&&$a(Ua,t,{configurable:!0,set:n}),es(t,e)},Ea(Ba=Na[Oa],"toString",(function(){return Pa(this).tag})),Ea(Na,"withoutSetter",(function(e){return es(Sa(e),e)})),ba.f=rs,ga.f=ts,_a.f=ns,ya.f=is,va.f=pa.f=os,ma.f=as,Da.f=function(e){return es(wa(e),e)},ra&&ka(Ba,"description",{configurable:!0,get:function(){return Pa(this).description}})),$o({global:!0,constructor:!0,wrap:!0,forced:!ia,sham:!ia},{Symbol:Na}),xa(fa(za),(function(e){Ia(e)})),$o({target:Ga,stat:!0,forced:!ia},{useSetter:function(){qa=!0},useSimple:function(){qa=!1}}),$o({target:"Object",stat:!0,forced:!ia,sham:!ra},{create:function(e,t){return void 0===t?da(e):ns(da(e),t)},defineProperty:ts,defineProperties:ns,getOwnPropertyDescriptor:is}),$o({target:"Object",stat:!0,forced:!ia},{getOwnPropertyNames:os}),Ca(),La(Na,Ga),Ra[Fa]=!0;var ss=ye&&!!Symbol.for&&!!Symbol.keyFor,us=Dn,cs=oe,ls=ze,hs=Xr,As=Xe,ds=ss,fs=As("string-to-symbol-registry"),vs=As("symbol-to-string-registry");us({target:"Symbol",stat:!0,forced:!ds},{for:function(e){var t=hs(e);if(ls(fs,t))return fs[t];var n=cs("Symbol")(t);return fs[t]=n,vs[n]=t,n}});var ps=Dn,ms=ze,ys=Te,gs=Se,_s=ss,bs=Xe("symbol-to-string-registry");ps({target:"Symbol",stat:!0,forced:!_s},{keyFor:function(e){if(!ys(e))throw TypeError(gs(e)+" is not a symbol");if(ms(bs,e))return bs[e]}});var Es=v([].slice),ks=Cn,Ts=S,Rs=g,Ss=Xr,ws=v([].push),Ds=Dn,Is=oe,Cs=l,Ls=L,Vs=v,xs=i,Fs=S,Gs=Te,Os=Es,Zs=function(e){if(Ts(e))return e;if(ks(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?ws(n,i):"number"!=typeof i&&"Number"!=Rs(i)&&"String"!=Rs(i)||ws(n,Ss(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(ks(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}},Ps=ye,Us=String,Ns=Is("JSON","stringify"),Bs=Vs(/./.exec),Ms=Vs("".charAt),Ws=Vs("".charCodeAt),Ys=Vs("".replace),Xs=Vs(1..toString),Qs=/[\uD800-\uDFFF]/g,js=/^[\uD800-\uDBFF]$/,Hs=/^[\uDC00-\uDFFF]$/,Js=!Ps||xs((function(){var e=Is("Symbol")();return"[null]"!=Ns([e])||"{}"!=Ns({a:e})||"{}"!=Ns(Object(e))})),Ks=xs((function(){return'"\\udf06\\ud834"'!==Ns("\udf06\ud834")||'"\\udead"'!==Ns("\udead")})),zs=function(e,t){var n=Os(arguments),r=Zs(t);if(Fs(r)||void 0!==e&&!Gs(e))return n[1]=function(e,t){if(Fs(r)&&(t=Ls(r,this,Us(e),t)),!Gs(t))return t},Cs(Ns,null,n)},qs=function(e,t,n){var r=Ms(n,t-1),i=Ms(n,t+1);return Bs(js,e)&&!Bs(Hs,i)||Bs(Hs,e)&&!Bs(js,r)?"\\u"+Xs(Ws(e,0),16):e};Ns&&Ds({target:"JSON",stat:!0,arity:3,forced:Js||Ks},{stringify:function(e,t,n){var r=Os(arguments),i=Cs(Js?zs:Ns,null,r);return Ks&&"string"==typeof i?Ys(i,Qs,qs):i}});var $s=$i,eu=He;Dn({target:"Object",stat:!0,forced:!ye||i((function(){$s.f(1)}))},{getOwnPropertySymbols:function(e){var t=$s.f;return t?t(eu(e)):[]}}),fo("asyncIterator"),fo("hasInstance"),fo("isConcatSpreadable"),fo("iterator"),fo("match"),fo("matchAll"),fo("replace"),fo("search"),fo("species"),fo("split");var tu=go;fo("toPrimitive"),tu();var nu=oe,ru=Do;fo("toStringTag"),ru(nu("Symbol"),"Symbol"),fo("unscopables"),Do(r.JSON,"JSON",!0);var iu,ou,au,su=ee.Symbol,uu={},cu=D,lu=ze,hu=Function.prototype,Au=cu&&Object.getOwnPropertyDescriptor,du=lu(hu,"name"),fu={EXISTS:du,PROPER:du&&"something"===function(){}.name,CONFIGURABLE:du&&(!cu||cu&&Au(hu,"name").configurable)},vu=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),pu=ze,mu=S,yu=He,gu=vu,_u=ki("IE_PROTO"),bu=Object,Eu=bu.prototype,ku=gu?bu.getPrototypeOf:function(e){var t=yu(e);if(pu(t,_u))return t[_u];var n=t.constructor;return mu(n)&&t instanceof n?n.prototype:t instanceof bu?Eu:null},Tu=i,Ru=S,Su=$,wu=Zi,Du=ku,Iu=to,Cu=ht("iterator"),Lu=!1;[].keys&&("next"in(au=[].keys())?(ou=Du(Du(au)))!==Object.prototype&&(iu=ou):Lu=!0);var Vu=!Su(iu)||Tu((function(){var e={};return iu[Cu].call(e)!==e}));Ru((iu=Vu?{}:wu(iu))[Cu])||Iu(iu,Cu,(function(){return this}));var xu={IteratorPrototype:iu,BUGGY_SAFARI_ITERATORS:Lu},Fu=xu.IteratorPrototype,Gu=Zi,Ou=P,Zu=Do,Pu=uu,Uu=function(){return this},Nu=function(e,t,n,r){var i=t+" Iterator";return e.prototype=Gu(Fu,{next:Ou(+!r,n)}),Zu(e,i,!1,!0),Pu[i]=Uu,e},Bu=v,Mu=Ce,Wu=S,Yu=String,Xu=TypeError,Qu=function(e,t,n){try{return Bu(Mu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},ju=tn,Hu=function(e){if("object"==typeof e||Wu(e))return e;throw Xu("Can't set "+Yu(e)+" as a prototype")},Ju=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Qu(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return ju(n),Hu(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ku=Dn,zu=L,qu=fu,$u=Nu,ec=ku,tc=Do,nc=to,rc=uu,ic=xu,oc=qu.PROPER,ac=ic.BUGGY_SAFARI_ITERATORS,sc=ht("iterator"),uc="keys",cc="values",lc="entries",hc=function(){return this},Ac=function(e,t,n,r,i,o,a){$u(n,t,r);var s,u,c,l=function(e){if(e===i&&v)return v;if(!ac&&e in d)return d[e];switch(e){case uc:case cc:case lc:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",A=!1,d=e.prototype,f=d[sc]||d["@@iterator"]||i&&d[i],v=!ac&&f||l(i),p="Array"==t&&d.entries||f;if(p&&(s=ec(p.call(new e)))!==Object.prototype&&s.next&&(tc(s,h,!0,!0),rc[h]=hc),oc&&i==cc&&f&&f.name!==cc&&(A=!0,v=function(){return zu(f,this)}),i)if(u={values:l(cc),keys:o?v:l(uc),entries:l(lc)},a)for(c in u)(ac||A||!(c in d))&&nc(d,c,u[c]);else Ku({target:t,proto:!0,forced:ac||A},u);return a&&d[sc]!==v&&nc(d,sc,v,{name:i}),rc[t]=v,u},dc=function(e,t){return{value:e,done:t}},fc=K,vc=uu,pc=Yo;Kt.f;var mc=Ac,yc=dc,gc="Array Iterator",_c=pc.set,bc=pc.getterFor(gc);mc(Array,"Array",(function(e,t){_c(this,{type:gc,target:fc(e),index:0,kind:t})}),(function(){var e=bc(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,yc(void 0,!0)):yc("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),vc.Arguments=vc.Array;var Ec={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},kc=r,Tc=$n,Rc=pn,Sc=uu,wc=ht("toStringTag");for(var Dc in Ec){var Ic=kc[Dc],Cc=Ic&&Ic.prototype;Cc&&Tc(Cc)!==wc&&Rc(Cc,wc,Dc),Sc[Dc]=Sc.Array}var Lc=su;fo("dispose");var Vc=Lc;fo("asyncDispose");var xc=Dn,Fc=v,Gc=oe("Symbol"),Oc=Gc.keyFor,Zc=Fc(Gc.prototype.valueOf);xc({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Oc(Zc(e))}catch(t){return!1}}});for(var Pc=Dn,Uc=Xe,Nc=oe,Bc=v,Mc=Te,Wc=ht,Yc=Nc("Symbol"),Xc=Yc.isWellKnown,Qc=Nc("Object","getOwnPropertyNames"),jc=Bc(Yc.prototype.valueOf),Hc=Uc("wks"),Jc=0,Kc=Qc(Yc),zc=Kc.length;Jc<zc;Jc++)try{var qc=Kc[Jc];Mc(Yc[qc])&&Wc(qc)}catch(g6){}Pc({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Xc&&Xc(e))return!0;try{for(var t=jc(e),n=0,r=Qc(Hc),i=r.length;n<i;n++)if(Hc[r[n]]==t)return!0}catch(g6){}return!1}}),fo("matcher"),fo("metadataKey"),fo("observable"),fo("metadata"),fo("patternMatch"),fo("replaceAll");var $c=Vc,el=t($c),tl=v,nl=Fn,rl=Xr,il=j,ol=tl("".charAt),al=tl("".charCodeAt),sl=tl("".slice),ul=function(e){return function(t,n){var r,i,o=rl(il(t)),a=nl(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=al(o,a))<55296||r>56319||a+1===s||(i=al(o,a+1))<56320||i>57343?e?ol(o,a):r:e?sl(o,a,a+2):i-56320+(r-55296<<10)+65536}},cl={codeAt:ul(!1),charAt:ul(!0)},ll=cl.charAt,hl=Xr,Al=Yo,dl=Ac,fl=dc,vl="String Iterator",pl=Al.set,ml=Al.getterFor(vl);dl(String,"String",(function(e){pl(this,{type:vl,string:hl(e),index:0})}),(function(){var e,t=ml(this),n=t.string,r=t.index;return r>=n.length?fl(void 0,!0):(e=ll(n,r),t.index+=e.length,fl(e,!1))}));var yl=t(io.f("iterator"));function gl(e){return(gl="function"==typeof el&&"symbol"==typeof yl?function(e){return typeof e}:function(e){return e&&"function"==typeof el&&e.constructor===el&&e!==el.prototype?"symbol":typeof e})(e)}var _l=He,bl=Ai;Dn({target:"Object",stat:!0,forced:i((function(){bl(1)}))},{keys:function(e){return bl(_l(e))}});var El=t(ee.Object.keys),kl=t(ee.Object.getOwnPropertySymbols),Tl=qo.filter;Dn({target:"Array",proto:!0,forced:!Dr("filter")},{filter:function(e){return Tl(this,e,arguments.length>1?arguments[1]:void 0)}});var Rl=ee,Sl=function(e){return Rl[e+"Prototype"]},wl=Sl("Array").filter,Dl=ae,Il=wl,Cl=Array.prototype,Ll=t((function(e){var t=e.filter;return e===Cl||Dl(Cl,e)&&t===Cl.filter?Il:t})),Vl={exports:{}},xl=Dn,Fl=i,Gl=K,Ol=w.f,Zl=D;xl({target:"Object",stat:!0,forced:!Zl||Fl((function(){Ol(1)})),sham:!Zl},{getOwnPropertyDescriptor:function(e,t){return Ol(Gl(e),t)}});var Pl=ee.Object,Ul=Vl.exports=function(e,t){return Pl.getOwnPropertyDescriptor(e,t)};Pl.getOwnPropertyDescriptor.sham&&(Ul.sham=!0);var Nl=t(Vl.exports),Bl=i,Ml=function(e,t){var n=[][e];return!!n&&Bl((function(){n.call(null,t||function(){return 1},1)}))},Wl=qo.forEach,Yl=Ml("forEach")?[].forEach:function(e){return Wl(this,e,arguments.length>1?arguments[1]:void 0)};Dn({target:"Array",proto:!0,forced:[].forEach!=Yl},{forEach:Yl});var Xl=Sl("Array").forEach,Ql=$n,jl=ze,Hl=ae,Jl=Xl,Kl=Array.prototype,zl={DOMTokenList:!0,NodeList:!0},ql=t((function(e){var t=e.forEach;return e===Kl||Hl(Kl,e)&&t===Kl.forEach||jl(zl,Ql(e))?Jl:t})),$l=oe,eh=Pi,th=$i,nh=tn,rh=v([].concat),ih=$l("Reflect","ownKeys")||function(e){var t=eh.f(nh(e)),n=th.f;return n?rh(t,n(e)):t},oh=ih,ah=K,sh=w,uh=Yn;Dn({target:"Object",stat:!0,sham:!D},{getOwnPropertyDescriptors:function(e){for(var t,n,r=ah(e),i=sh.f,o=oh(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&uh(a,t,n);return a}});var ch=t(ee.Object.getOwnPropertyDescriptors),lh={exports:{}},hh=Dn,Ah=D,dh=Qr.f;hh({target:"Object",stat:!0,forced:Object.defineProperties!==dh,sham:!Ah},{defineProperties:dh});var fh=ee.Object,vh=lh.exports=function(e,t){return fh.defineProperties(e,t)};fh.defineProperties.sham&&(vh.sham=!0);var ph=t(lh.exports),mh={exports:{}},yh=Dn,gh=D,_h=Kt.f;yh({target:"Object",stat:!0,forced:Object.defineProperty!==_h,sham:!gh},{defineProperty:_h});var bh=ee.Object,Eh=mh.exports=function(e,t,n){return bh.defineProperty(e,t,n)};bh.defineProperty.sham&&(Eh.sham=!0);var kh=t(mh.exports),Th=t($c);Dn({target:"Object",stat:!0,sham:!D},{create:Zi});var Rh=ee.Object,Sh=t((function(e,t){return Rh.create(e,t)})),wh=He,Dh=ku,Ih=vu;Dn({target:"Object",stat:!0,forced:i((function(){Dh(1)})),sham:!Ih},{getPrototypeOf:function(e){return Dh(wh(e))}});var Ch=t(ee.Object.getPrototypeOf);Dn({target:"Object",stat:!0},{setPrototypeOf:Ju});var Lh=t(ee.Object.setPrototypeOf),Vh=ze,xh=ih,Fh=w,Gh=Kt,Oh=$,Zh=pn,Ph=Error,Uh=v("".replace),Nh=String(Ph("zxcasd").stack),Bh=/\n\s*at [^:]*:[^\n]*/,Mh=Bh.test(Nh),Wh=P,Yh=!i((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Wh(1,7)),7!==e.stack)})),Xh=pn,Qh=function(e,t){if(Mh&&"string"==typeof e&&!Ph.prepareStackTrace)for(;t--;)e=Uh(e,Bh,"");return e},jh=Yh,Hh=Error.captureStackTrace,Jh=uu,Kh=ht("iterator"),zh=Array.prototype,qh=function(e){return void 0!==e&&(Jh.Array===e||zh[Kh]===e)},$h=$n,eA=xe,tA=Y,nA=uu,rA=ht("iterator"),iA=function(e){if(!tA(e))return eA(e,rA)||eA(e,"@@iterator")||nA[$h(e)]},oA=L,aA=Ce,sA=tn,uA=Se,cA=iA,lA=TypeError,hA=function(e,t){var n=arguments.length<2?cA(e):t;if(aA(n))return sA(oA(n,e));throw lA(uA(e)+" is not iterable")},AA=L,dA=tn,fA=xe,vA=function(e,t,n){var r,i;dA(e);try{if(!(r=fA(e,"return"))){if("throw"===t)throw n;return n}r=AA(r,e)}catch(g6){i=!0,r=g6}if("throw"===t)throw n;if(i)throw r;return dA(r),n},pA=Jt,mA=L,yA=tn,gA=Se,_A=qh,bA=Pn,EA=ae,kA=hA,TA=iA,RA=vA,SA=TypeError,wA=function(e,t){this.stopped=e,this.result=t},DA=wA.prototype,IA=function(e,t,n){var r,i,o,a,s,u,c,l=n&&n.that,h=!(!n||!n.AS_ENTRIES),A=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),v=pA(t,l),p=function(e){return r&&RA(r,"normal",e),new wA(!0,e)},m=function(e){return h?(yA(e),f?v(e[0],e[1],p):v(e[0],e[1])):f?v(e,p):v(e)};if(A)r=e.iterator;else if(d)r=e;else{if(!(i=TA(e)))throw SA(gA(e)+" is not iterable");if(_A(i)){for(o=0,a=bA(e);a>o;o++)if((s=m(e[o]))&&EA(DA,s))return s;return new wA(!1)}r=kA(e,i)}for(u=A?e.next:r.next;!(c=mA(u,r)).done;){try{s=m(c.value)}catch(g6){RA(r,"throw",g6)}if("object"==typeof s&&s&&EA(DA,s))return s}return new wA(!1)},CA=Xr,LA=Dn,VA=ae,xA=ku,FA=Ju,GA=function(e,t,n){for(var r=xh(t),i=Gh.f,o=Fh.f,a=0;a<r.length;a++){var s=r[a];Vh(e,s)||n&&Vh(n,s)||i(e,s,o(t,s))}},OA=Zi,ZA=pn,PA=P,UA=function(e,t){Oh(t)&&"cause"in t&&Zh(e,"cause",t.cause)},NA=function(e,t,n,r){jh&&(Hh?Hh(e,t):Xh(e,"stack",Qh(n,r)))},BA=IA,MA=function(e,t){return void 0===e?arguments.length<2?"":t:CA(e)},WA=ht("toStringTag"),YA=Error,XA=[].push,QA=function(e,t){var n,r=VA(jA,this);FA?n=FA(YA(),r?xA(this):jA):(n=r?this:OA(jA),ZA(n,WA,"Error")),void 0!==t&&ZA(n,"message",MA(t)),NA(n,QA,n.stack,1),arguments.length>2&&UA(n,arguments[2]);var i=[];return BA(e,XA,{that:i}),ZA(n,"errors",i),n};FA?FA(QA,YA):GA(QA,YA,{name:!0});var jA=QA.prototype=OA(YA.prototype,{constructor:PA(1,QA),message:PA(1,""),name:PA(1,"AggregateError")});LA({global:!0,constructor:!0,arity:2},{AggregateError:QA});var HA,JA,KA,zA,qA="undefined"!=typeof process&&"process"==g(process),$A=oe,ed=ro,td=D,nd=ht("species"),rd=function(e){var t=$A(e);td&&t&&!t[nd]&&ed(t,nd,{configurable:!0,get:function(){return this}})},id=ae,od=TypeError,ad=function(e,t){if(id(t,e))return e;throw od("Incorrect invocation")},sd=mr,ud=Se,cd=TypeError,ld=function(e){if(sd(e))return e;throw cd(ud(e)+" is not a constructor")},hd=tn,Ad=ld,dd=Y,fd=ht("species"),vd=function(e,t){var n,r=hd(e).constructor;return void 0===r||dd(n=hd(r)[fd])?t:Ad(n)},pd=TypeError,md=function(e,t){if(e<t)throw pd("Not enough arguments");return e},yd=/(?:ipad|iphone|ipod).*applewebkit/i.test(se),gd=r,_d=l,bd=Jt,Ed=S,kd=ze,Td=i,Rd=_i,Sd=Es,wd=Rt,Dd=md,Id=yd,Cd=qA,Ld=gd.setImmediate,Vd=gd.clearImmediate,xd=gd.process,Fd=gd.Dispatch,Gd=gd.Function,Od=gd.MessageChannel,Zd=gd.String,Pd=0,Ud={},Nd="onreadystatechange";Td((function(){HA=gd.location}));var Bd=function(e){if(kd(Ud,e)){var t=Ud[e];delete Ud[e],t()}},Md=function(e){return function(){Bd(e)}},Wd=function(e){Bd(e.data)},Yd=function(e){gd.postMessage(Zd(e),HA.protocol+"//"+HA.host)};Ld&&Vd||(Ld=function(e){Dd(arguments.length,1);var t=Ed(e)?e:Gd(e),n=Sd(arguments,1);return Ud[++Pd]=function(){_d(t,void 0,n)},JA(Pd),Pd},Vd=function(e){delete Ud[e]},Cd?JA=function(e){xd.nextTick(Md(e))}:Fd&&Fd.now?JA=function(e){Fd.now(Md(e))}:Od&&!Id?(zA=(KA=new Od).port2,KA.port1.onmessage=Wd,JA=bd(zA.postMessage,zA)):gd.addEventListener&&Ed(gd.postMessage)&&!gd.importScripts&&HA&&"file:"!==HA.protocol&&!Td(Yd)?(JA=Yd,gd.addEventListener("message",Wd,!1)):JA=Nd in wd("script")?function(e){Rd.appendChild(wd("script"))[Nd]=function(){Rd.removeChild(this),Bd(e)}}:function(e){setTimeout(Md(e),0)});var Xd={set:Ld,clear:Vd},Qd=function(){this.head=null,this.tail=null};Qd.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.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 jd,Hd,Jd,Kd,zd,qd=Qd,$d=/ipad|iphone|ipod/i.test(se)&&"undefined"!=typeof Pebble,ef=/web0s(?!.*chrome)/i.test(se),tf=r,nf=Jt,rf=w.f,of=Xd.set,af=qd,sf=yd,uf=$d,cf=ef,lf=qA,hf=tf.MutationObserver||tf.WebKitMutationObserver,Af=tf.document,df=tf.process,ff=tf.Promise,vf=rf(tf,"queueMicrotask"),pf=vf&&vf.value;if(!pf){var mf=new af,yf=function(){var e,t;for(lf&&(e=df.domain)&&e.exit();t=mf.get();)try{t()}catch(g6){throw mf.head&&jd(),g6}e&&e.enter()};sf||lf||cf||!hf||!Af?!uf&&ff&&ff.resolve?((Kd=ff.resolve(void 0)).constructor=ff,zd=nf(Kd.then,Kd),jd=function(){zd(yf)}):lf?jd=function(){df.nextTick(yf)}:(of=nf(of,tf),jd=function(){of(yf)}):(Hd=!0,Jd=Af.createTextNode(""),new hf(yf).observe(Jd,{characterData:!0}),jd=function(){Jd.data=Hd=!Hd}),pf=function(e){mf.head||jd(),mf.add(e)}}var gf=pf,_f=function(e){try{return{error:!1,value:e()}}catch(g6){return{error:!0,value:g6}}},bf=r.Promise,Ef="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,kf=!Ef&&!qA&&"object"==typeof window&&"object"==typeof document,Tf=r,Rf=bf,Sf=S,wf=Xt,Df=rr,If=ht,Cf=kf,Lf=Ef,Vf=fe,xf=Rf&&Rf.prototype,Ff=If("species"),Gf=!1,Of=Sf(Tf.PromiseRejectionEvent),Zf={CONSTRUCTOR:wf("Promise",(function(){var e=Df(Rf),t=e!==String(Rf);if(!t&&66===Vf)return!0;if(!xf.catch||!xf.finally)return!0;if(!Vf||Vf<51||!/native code/.test(e)){var n=new Rf((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Ff]=r,!(Gf=n.then((function(){}))instanceof r))return!0}return!t&&(Cf||Lf)&&!Of})),REJECTION_EVENT:Of,SUBCLASSING:Gf},Pf={},Uf=Ce,Nf=TypeError,Bf=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Nf("Bad Promise constructor");t=e,n=r})),this.resolve=Uf(t),this.reject=Uf(n)};Pf.f=function(e){return new Bf(e)};var Mf,Wf,Yf=Dn,Xf=qA,Qf=r,jf=L,Hf=to,Jf=Do,Kf=rd,zf=Ce,qf=S,$f=$,ev=ad,tv=vd,nv=Xd.set,rv=gf,iv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(g6){}},ov=_f,av=qd,sv=Yo,uv=bf,cv=Zf,lv=Pf,hv="Promise",Av=cv.CONSTRUCTOR,dv=cv.REJECTION_EVENT,fv=sv.getterFor(hv),vv=sv.set,pv=uv&&uv.prototype,mv=uv,yv=pv,gv=Qf.TypeError,_v=Qf.document,bv=Qf.process,Ev=lv.f,kv=Ev,Tv=!!(_v&&_v.createEvent&&Qf.dispatchEvent),Rv="unhandledrejection",Sv=function(e){var t;return!(!$f(e)||!qf(t=e.then))&&t},wv=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&Vv(t),t.rejection=1),!0===s?n=o:(l&&l.enter(),n=s(o),l&&(l.exit(),i=!0)),n===e.promise?c(gv("Promise-chain cycle")):(r=Sv(n))?jf(r,n,u,c):u(n)):c(o)}catch(g6){l&&!i&&l.exit(),c(g6)}},Dv=function(e,t){e.notified||(e.notified=!0,rv((function(){for(var n,r=e.reactions;n=r.get();)wv(n,e);e.notified=!1,t&&!e.rejection&&Cv(e)})))},Iv=function(e,t,n){var r,i;Tv?((r=_v.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Qf.dispatchEvent(r)):r={promise:t,reason:n},!dv&&(i=Qf["on"+e])?i(r):e===Rv&&iv("Unhandled promise rejection",n)},Cv=function(e){jf(nv,Qf,(function(){var t,n=e.facade,r=e.value;if(Lv(e)&&(t=ov((function(){Xf?bv.emit("unhandledRejection",r,n):Iv(Rv,n,r)})),e.rejection=Xf||Lv(e)?2:1,t.error))throw t.value}))},Lv=function(e){return 1!==e.rejection&&!e.parent},Vv=function(e){jf(nv,Qf,(function(){var t=e.facade;Xf?bv.emit("rejectionHandled",t):Iv("rejectionhandled",t,e.value)}))},xv=function(e,t,n){return function(r){e(t,r,n)}},Fv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Dv(e,!0))},Gv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw gv("Promise can't be resolved itself");var r=Sv(t);r?rv((function(){var n={done:!1};try{jf(r,t,xv(Gv,n,e),xv(Fv,n,e))}catch(g6){Fv(n,g6,e)}})):(e.value=t,e.state=1,Dv(e,!1))}catch(g6){Fv({done:!1},g6,e)}}};Av&&(yv=(mv=function(e){ev(this,yv),zf(e),jf(Mf,this);var t=fv(this);try{e(xv(Gv,t),xv(Fv,t))}catch(g6){Fv(t,g6)}}).prototype,(Mf=function(e){vv(this,{type:hv,done:!1,notified:!1,parent:!1,reactions:new av,rejection:!1,state:0,value:void 0})}).prototype=Hf(yv,"then",(function(e,t){var n=fv(this),r=Ev(tv(this,mv));return n.parent=!0,r.ok=!qf(e)||e,r.fail=qf(t)&&t,r.domain=Xf?bv.domain:void 0,0==n.state?n.reactions.add(r):rv((function(){wv(r,n)})),r.promise})),Wf=function(){var e=new Mf,t=fv(e);this.promise=e,this.resolve=xv(Gv,t),this.reject=xv(Fv,t)},lv.f=Ev=function(e){return e===mv||undefined===e?new Wf(e):kv(e)}),Yf({global:!0,constructor:!0,wrap:!0,forced:Av},{Promise:mv}),Jf(mv,hv,!1,!0),Kf(hv);var Ov=ht("iterator"),Zv=!1;try{var Pv=0,Uv={next:function(){return{done:!!Pv++}},return:function(){Zv=!0}};Uv[Ov]=function(){return this},Array.from(Uv,(function(){throw 2}))}catch(g6){}var Nv=function(e,t){if(!t&&!Zv)return!1;var n=!1;try{var r={};r[Ov]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(g6){}return n},Bv=bf,Mv=Zf.CONSTRUCTOR||!Nv((function(e){Bv.all(e).then(void 0,(function(){}))})),Wv=L,Yv=Ce,Xv=Pf,Qv=_f,jv=IA;Dn({target:"Promise",stat:!0,forced:Mv},{all:function(e){var t=this,n=Xv.f(t),r=n.resolve,i=n.reject,o=Qv((function(){var n=Yv(t.resolve),o=[],a=0,s=1;jv(e,(function(e){var u=a++,c=!1;s++,Wv(n,t,e).then((function(e){c||(c=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Hv=Dn,Jv=Zf.CONSTRUCTOR;bf&&bf.prototype,Hv({target:"Promise",proto:!0,forced:Jv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Kv=L,zv=Ce,qv=Pf,$v=_f,ep=IA;Dn({target:"Promise",stat:!0,forced:Mv},{race:function(e){var t=this,n=qv.f(t),r=n.reject,i=$v((function(){var i=zv(t.resolve);ep(e,(function(e){Kv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var tp=L,np=Pf;Dn({target:"Promise",stat:!0,forced:Zf.CONSTRUCTOR},{reject:function(e){var t=np.f(this);return tp(t.reject,void 0,e),t.promise}});var rp=tn,ip=$,op=Pf,ap=function(e,t){if(rp(e),ip(t)&&t.constructor===e)return t;var n=op.f(e);return(0,n.resolve)(t),n.promise},sp=Dn,up=bf,cp=Zf.CONSTRUCTOR,lp=ap,hp=oe("Promise"),Ap=!cp;sp({target:"Promise",stat:!0,forced:true},{resolve:function(e){return lp(Ap&&this===hp?up:this,e)}});var dp=L,fp=Ce,vp=Pf,pp=_f,mp=IA;Dn({target:"Promise",stat:!0,forced:Mv},{allSettled:function(e){var t=this,n=vp.f(t),r=n.resolve,i=n.reject,o=pp((function(){var n=fp(t.resolve),i=[],o=0,a=1;mp(e,(function(e){var s=o++,u=!1;a++,dp(n,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var yp=L,gp=Ce,_p=oe,bp=Pf,Ep=_f,kp=IA,Tp="No one promise resolved";Dn({target:"Promise",stat:!0,forced:Mv},{any:function(e){var t=this,n=_p("AggregateError"),r=bp.f(t),i=r.resolve,o=r.reject,a=Ep((function(){var r=gp(t.resolve),a=[],s=0,u=1,c=!1;kp(e,(function(e){var l=s++,h=!1;u++,yp(r,t,e).then((function(e){h||c||(c=!0,i(e))}),(function(e){h||c||(h=!0,a[l]=e,--u||o(new n(a,Tp)))}))})),--u||o(new n(a,Tp))}));return a.error&&o(a.value),r.promise}});var Rp=Dn,Sp=bf,wp=i,Dp=oe,Ip=S,Cp=vd,Lp=ap,Vp=Sp&&Sp.prototype;Rp({target:"Promise",proto:!0,real:!0,forced:!!Sp&&wp((function(){Vp.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Cp(this,Dp("Promise")),n=Ip(e);return this.then(n?function(n){return Lp(t,e()).then((function(){return n}))}:e,n?function(n){return Lp(t,e()).then((function(){throw n}))}:e)}});var xp=ee.Promise,Fp=Pf,Gp=_f;Dn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Fp.f(this),n=Gp(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Op=t(xp),Zp=Dn,Pp=Cn,Up=v([].reverse),Np=[1,2];Zp({target:"Array",proto:!0,forced:String(Np)===String(Np.reverse())},{reverse:function(){return Pp(this)&&(this.length=this.length),Up(this)}});var Bp=Sl("Array").reverse,Mp=ae,Wp=Bp,Yp=Array.prototype,Xp=t((function(e){var t=e.reverse;return e===Yp||Mp(Yp,e)&&t===Yp.reverse?Wp:t})),Qp=Dn,jp=Cn,Hp=mr,Jp=$,Kp=Kr,zp=Pn,qp=K,$p=Yn,em=ht,tm=Es,nm=Dr("slice"),rm=em("species"),im=Array,om=Math.max;Qp({target:"Array",proto:!0,forced:!nm},{slice:function(e,t){var n,r,i,o=qp(this),a=zp(o),s=Kp(e,a),u=Kp(void 0===t?a:t,a);if(jp(o)&&(n=o.constructor,(Hp(n)&&(n===im||jp(n.prototype))||Jp(n)&&null===(n=n[rm]))&&(n=void 0),n===im||void 0===n))return tm(o,s,u);for(r=new(void 0===n?im:n)(om(u-s,0)),i=0;s<u;s++,i++)s in o&&$p(r,i,o[s]);return r.length=i,r}});var am=Sl("Array").slice,sm=ae,um=am,cm=Array.prototype,lm=t((function(e){var t=e.slice;return e===cm||sm(cm,e)&&t===cm.slice?um:t})),hm=v,Am=Ce,dm=$,fm=ze,vm=Es,pm=o,mm=Function,ym=hm([].concat),gm=hm([].join),_m={},bm=pm?mm.bind:function(e){var t=Am(this),n=t.prototype,r=vm(arguments,1),i=function(){var n=ym(r,vm(arguments));return this instanceof i?function(e,t,n){if(!fm(_m,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";_m[t]=mm("C,a","return new C("+gm(r,",")+")")}return _m[t](e,n)}(t,n.length,n):t.apply(e,n)};return dm(n)&&(i.prototype=n),i},Em=bm;Dn({target:"Function",proto:!0,forced:Function.bind!==Em},{bind:Em});var km=Sl("Function").bind,Tm=ae,Rm=km,Sm=Function.prototype,wm=t((function(e){var t=e.bind;return e===Sm||Tm(Sm,e)&&t===Sm.bind?Rm:t})),Dm=Dn,Im=l,Cm=bm,Lm=ld,Vm=tn,xm=$,Fm=Zi,Gm=i,Om=oe("Reflect","construct"),Zm=Object.prototype,Pm=[].push,Um=Gm((function(){function e(){}return!(Om((function(){}),[],e)instanceof e)})),Nm=!Gm((function(){Om((function(){}))})),Bm=Um||Nm;Dm({target:"Reflect",stat:!0,forced:Bm,sham:Bm},{construct:function(e,t){Lm(e),Vm(t);var n=arguments.length<3?e:Lm(arguments[2]);if(Nm&&!Um)return Om(e,t,n);if(e==n){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 r=[null];return Im(Pm,r,t),new(Im(Cm,e,r))}var i=n.prototype,o=Fm(xm(i)?i:Zm),a=Im(e,o,t);return xm(a)?a:o}});var Mm=t(ee.Reflect.construct),Wm=ze,Ym=L,Xm=$,Qm=tn,jm=function(e){return void 0!==e&&(Wm(e,"value")||Wm(e,"writable"))},Hm=w,Jm=ku;Dn({target:"Reflect",stat:!0},{get:function e(t,n){var r,i,o=arguments.length<3?t:arguments[2];return Qm(t)===o?t[n]:(r=Hm.f(t,n))?jm(r)?r.value:void 0===r.get?void 0:Ym(r.get,o):Xm(i=Jm(t))?e(i,n,o):void 0}});var Km=t(ee.Reflect.get);Dn({target:"Array",stat:!0},{isArray:Cn});var zm=t(ee.Array.isArray),qm=t(iA),$m=tn,ey=vA,ty=Jt,ny=L,ry=He,iy=function(e,t,n,r){try{return r?t($m(n)[0],n[1]):t(n)}catch(g6){ey(e,"throw",g6)}},oy=qh,ay=mr,sy=Pn,uy=Yn,cy=hA,ly=iA,hy=Array,Ay=function(e){var t=ry(e),n=ay(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ty(i,r>2?arguments[2]:void 0));var a,s,u,c,l,h,A=ly(t),d=0;if(!A||this===hy&&oy(A))for(a=sy(t),s=n?new this(a):hy(a);a>d;d++)h=o?i(t[d],d):t[d],uy(s,d,h);else for(l=(c=cy(t,A)).next,s=n?new this:[];!(u=ny(l,c)).done;d++)h=o?iy(c,i,[u.value,d],!0):u.value,uy(s,d,h);return s.length=d,s},dy=Ay;Dn({target:"Array",stat:!0,forced:!Nv((function(e){Array.from(e)}))},{from:dy});var fy=t(ee.Array.from);function vy(e,t){var n=El(e);if(kl){var r=kl(e);t&&(r=Ll(r).call(r,(function(t){return Nl(e,t).enumerable}))),n.push.apply(n,r)}return n}function py(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?ql(n=vy(Object(i),!0)).call(n,(function(t){ky(e,t,i[t])})):ch?ph(e,ch(i)):ql(r=vy(Object(i))).call(r,(function(t){kh(e,t,Nl(i,t))}))}return e}function my(){my=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=kh||function(e,t,n){e[t]=n.value},i="function"==typeof Th?Th:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return kh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(w){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof A?t:A,a=Sh(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:_(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(w){return{type:"throw",arg:w}}}e.wrap=c;var h={};function A(){}function d(){}function f(){}var v={};u(v,o,(function(){return this}));var p=Ch&&Ch(Ch(R([])));p&&p!==t&&n.call(p,o)&&(v=p);var m=f.prototype=A.prototype=Sh(v);function y(e){var t;ql(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function i(r,o,a,s){var u=l(e[r],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==gl(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function _(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],ql(e).call(e,E,this),this.reset(!0)}function R(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=f,r(m,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:d,configurable:!0}),d.displayName=u(f,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 Lh?Lh(e,f):(e.__proto__=f,u(e,s,"GeneratorFunction")),e.prototype=Sh(m),e},e.awrap=function(e){return{__await:e}},y(g.prototype),u(g.prototype,a,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,i,o){void 0===o&&(o=Op);var a=new g(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return Xp(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=R,T.prototype={constructor:T,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,ql(t=this.tryEntries).call(t,k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+lm(r).call(r,1))&&(this[r]=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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function yy(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(g6){return void n(g6)}s.done?t(u):Op.resolve(u).then(r,i)}function gy(e){return function(){var t=this,n=arguments;return new Op((function(r,i){var o=e.apply(t,n);function a(e){yy(o,r,i,a,s,"next",e)}function s(e){yy(o,r,i,a,s,"throw",e)}a(void 0)}))}}function _y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function by(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),kh(e,r.key,r)}}function Ey(e,t,n){return t&&by(e.prototype,t),n&&by(e,n),kh(e,"prototype",{writable:!1}),e}function ky(e,t,n){return t in e?kh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ty(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Sh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),kh(e,"prototype",{writable:!1}),t&&Sy(e,t)}function Ry(e){var t;return(Ry=Lh?wm(t=Ch).call(t):function(e){return e.__proto__||Ch(e)})(e)}function Sy(e,t){var n;return(Sy=Lh?wm(n=Lh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function wy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dy(e){var t=function(){if("undefined"==typeof Reflect||!Mm)return!1;if(Mm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Mm(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ry(e);if(t){var i=Ry(this).constructor;n=Mm(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wy(e)}(this,n)}}function Iy(){var e;"undefined"!=typeof Reflect&&Km?Iy=wm(e=Km).call(e):Iy=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ry(e)););return e}(e,t);if(r){var i=Nl(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}};return Iy.apply(this,arguments)}function Cy(e,t){return function(e){if(zm(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Th&&qm(e)||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Vy(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 Ly(e){return function(e){if(zm(e))return xy(e)}(e)||function(e){if(void 0!==Th&&null!=qm(e)||null!=e["@@iterator"])return fy(e)}(e)||Vy(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 Vy(e,t){var n;if(e){if("string"==typeof e)return xy(e,t);var r=lm(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?fy(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xy(e,t):void 0}}function xy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Fy=Dn,Gy=i,Oy=Bi.f;Fy({target:"Object",stat:!0,forced:Gy((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:Oy});var Zy=ee.Object,Py=t((function(e){return Zy.getOwnPropertyNames(e)})),Uy="\t\n\v\f\r                 \u2028\u2029\ufeff",Ny=j,By=Xr,My=Uy,Wy=v("".replace),Yy=RegExp("^["+My+"]+"),Xy=RegExp("(^|[^"+My+"])["+My+"]+$"),Qy=function(e){return function(t){var n=By(Ny(t));return 1&e&&(n=Wy(n,Yy,"")),2&e&&(n=Wy(n,Xy,"$1")),n}},jy={start:Qy(1),end:Qy(2),trim:Qy(3)},Hy=r,Jy=i,Ky=v,zy=Xr,qy=jy.trim,$y=Uy,eg=Hy.parseInt,tg=Hy.Symbol,ng=tg&&tg.iterator,rg=/^[+-]?0x/i,ig=Ky(rg.exec),og=8!==eg($y+"08")||22!==eg($y+"0x16")||ng&&!Jy((function(){eg(Object(ng))}))?function(e,t){var n=qy(zy(e));return eg(n,t>>>0||(ig(rg,n)?16:10))}:eg;Dn({global:!0,forced:parseInt!=og},{parseInt:og});var ag,sg=t(ee.parseInt),ug=Sl("Array").concat,cg=ae,lg=ug,hg=Array.prototype,Ag=t((function(e){var t=e.concat;return e===hg||cg(hg,e)&&t===hg.concat?lg:t})),dg="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,fg=r,vg=l,pg=S,mg=dg,yg=se,gg=Es,_g=md,bg=fg.Function,Eg=/MSIE .\./.test(yg)||mg&&((ag=fg.Bun.version.split(".")).length<3||0==ag[0]&&(ag[1]<3||3==ag[1]&&0==ag[2])),kg=function(e,t){var n=t?2:1;return Eg?function(r,i){var o=_g(arguments.length,1)>n,a=pg(r)?r:bg(r),s=o?gg(arguments,n):[],u=o?function(){vg(a,this,s)}:a;return t?e(u,i):e(u)}:e},Tg=Dn,Rg=r,Sg=kg(Rg.setInterval,!0);Tg({global:!0,bind:!0,forced:Rg.setInterval!==Sg},{setInterval:Sg});var wg=Dn,Dg=r,Ig=kg(Dg.setTimeout,!0);wg({global:!0,bind:!0,forced:Dg.setTimeout!==Ig},{setTimeout:Ig});var Cg=t(ee.setTimeout),Lg=r,Vg=i,xg=Xr,Fg=jy.trim,Gg=Uy,Og=v("".charAt),Zg=Lg.parseFloat,Pg=Lg.Symbol,Ug=Pg&&Pg.iterator,Ng=1/Zg(Gg+"-0")!=-1/0||Ug&&!Vg((function(){Zg(Object(Ug))}))?function(e){var t=Fg(xg(e)),n=Zg(t);return 0===n&&"-"==Og(t,0)?-0:n}:Zg;Dn({global:!0,forced:parseFloat!=Ng},{parseFloat:Ng});var Bg=t(ee.parseFloat),Mg=Ng;Dn({target:"Number",stat:!0,forced:Number.parseFloat!=Mg},{parseFloat:Mg});var Wg=t(ee.Number.parseFloat);Dn({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Yg=t(ee.Number.isNaN),Xg=qo.map;Dn({target:"Array",proto:!0,forced:!Dr("map")},{map:function(e){return Xg(this,e,arguments.length>1?arguments[1]:void 0)}});var Qg=Sl("Array").map,jg=ae,Hg=Qg,Jg=Array.prototype,Kg=t((function(e){var t=e.map;return e===Jg||jg(Jg,e)&&t===Jg.map?Hg:t})),zg=He,qg=Kr,$g=Pn,e_=function(e){for(var t=zg(this),n=$g(t),r=arguments.length,i=qg(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:qg(o,n);a>i;)t[i++]=e;return t};Dn({target:"Array",proto:!0},{fill:e_});var t_=Sl("Array").fill,n_=ae,r_=t_,i_=Array.prototype,o_=t((function(e){var t=e.fill;return e===i_||n_(i_,e)&&t===i_.fill?r_:t})),a_=function(e){return e&&e.Math==Math&&e},s_=a_("object"==typeof globalThis&&globalThis)||a_("object"==typeof window&&window)||a_("object"==typeof self&&self)||a_("object"==typeof e&&e)||function(){return this}()||Function("return this")(),u_={exports:{}},c_=s_,l_=Object.defineProperty,h_=function(e,t){try{l_(c_,e,{value:t,configurable:!0,writable:!0})}catch(g6){c_[e]=t}return t},A_=h_,d_="__core-js_shared__",f_=s_[d_]||A_(d_,{}),v_=f_;(u_.exports=function(e,t){return v_[e]||(v_[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var p_,m_,y_=u_.exports,g_=function(e){try{return!!e()}catch(g6){return!0}},__=!g_((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),b_=__,E_=Function.prototype,k_=E_.call,T_=b_&&E_.bind.bind(k_,k_),R_=b_?T_:function(e){return function(){return k_.apply(e,arguments)}},S_=function(e){return null==e},w_=S_,D_=TypeError,I_=function(e){if(w_(e))throw D_("Can't call method on "+e);return e},C_=I_,L_=Object,V_=function(e){return L_(C_(e))},x_=V_,F_=R_({}.hasOwnProperty),G_=Object.hasOwn||function(e,t){return F_(x_(e),t)},O_=R_,Z_=0,P_=Math.random(),U_=O_(1..toString),N_=function(e){return"Symbol("+(void 0===e?"":e)+")_"+U_(++Z_+P_,36)},B_="object"==typeof document&&document.all,M_={all:B_,IS_HTMLDDA:void 0===B_&&void 0!==B_},W_=M_.all,Y_=M_.IS_HTMLDDA?function(e){return"function"==typeof e||e===W_}:function(e){return"function"==typeof e},X_=s_,Q_=Y_,j_=function(e,t){return arguments.length<2?(n=X_[e],Q_(n)?n:void 0):X_[e]&&X_[e][t];var n},H_=j_("navigator","userAgent")||"",J_=s_,K_=H_,z_=J_.process,q_=J_.Deno,$_=z_&&z_.versions||q_&&q_.version,eb=$_&&$_.v8;eb&&(m_=(p_=eb.split("."))[0]>0&&p_[0]<4?1:+(p_[0]+p_[1])),!m_&&K_&&(!(p_=K_.match(/Edge\/(\d+)/))||p_[1]>=74)&&(p_=K_.match(/Chrome\/(\d+)/))&&(m_=+p_[1]);var tb=m_,nb=tb,rb=g_,ib=!!Object.getOwnPropertySymbols&&!rb((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&nb&&nb<41})),ob=ib&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ab=s_,sb=G_,ub=N_,cb=ib,lb=ob,hb=y_("wks"),Ab=ab.Symbol,db=Ab&&Ab.for,fb=lb?Ab:Ab&&Ab.withoutSetter||ub,vb=function(e){if(!sb(hb,e)||!cb&&"string"!=typeof hb[e]){var t="Symbol."+e;cb&&sb(Ab,e)?hb[e]=Ab[e]:hb[e]=lb&&db?db(t):fb(t)}return hb[e]},pb={};pb[vb("toStringTag")]="z";var mb="[object z]"===String(pb),yb={},gb=!g_((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),_b=Y_,bb=M_.all,Eb=M_.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:_b(e)||e===bb}:function(e){return"object"==typeof e?null!==e:_b(e)},kb=Eb,Tb=s_.document,Rb=kb(Tb)&&kb(Tb.createElement),Sb=function(e){return Rb?Tb.createElement(e):{}},wb=Sb,Db=!gb&&!g_((function(){return 7!=Object.defineProperty(wb("div"),"a",{get:function(){return 7}}).a})),Ib=gb&&g_((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Cb=Eb,Lb=String,Vb=TypeError,xb=function(e){if(Cb(e))return e;throw Vb(Lb(e)+" is not an object")},Fb=__,Gb=Function.prototype.call,Ob=Fb?Gb.bind(Gb):function(){return Gb.apply(Gb,arguments)},Zb=R_({}.isPrototypeOf),Pb=j_,Ub=Y_,Nb=Zb,Bb=Object,Mb=ob?function(e){return"symbol"==typeof e}:function(e){var t=Pb("Symbol");return Ub(t)&&Nb(t.prototype,Bb(e))},Wb=String,Yb=function(e){try{return Wb(e)}catch(g6){return"Object"}},Xb=Y_,Qb=Yb,jb=TypeError,Hb=function(e){if(Xb(e))return e;throw jb(Qb(e)+" is not a function")},Jb=Hb,Kb=S_,zb=function(e,t){var n=e[t];return Kb(n)?void 0:Jb(n)},qb=Ob,$b=Y_,eE=Eb,tE=TypeError,nE=Ob,rE=Eb,iE=Mb,oE=zb,aE=function(e,t){var n,r;if("string"===t&&$b(n=e.toString)&&!eE(r=qb(n,e)))return r;if($b(n=e.valueOf)&&!eE(r=qb(n,e)))return r;if("string"!==t&&$b(n=e.toString)&&!eE(r=qb(n,e)))return r;throw tE("Can't convert object to primitive value")},sE=TypeError,uE=vb("toPrimitive"),cE=function(e,t){if(!rE(e)||iE(e))return e;var n,r=oE(e,uE);if(r){if(void 0===t&&(t="default"),n=nE(r,e,t),!rE(n)||iE(n))return n;throw sE("Can't convert object to primitive value")}return void 0===t&&(t="number"),aE(e,t)},lE=cE,hE=Mb,AE=function(e){var t=lE(e,"string");return hE(t)?t:t+""},dE=gb,fE=Db,vE=Ib,pE=xb,mE=AE,yE=TypeError,gE=Object.defineProperty,_E=Object.getOwnPropertyDescriptor,bE="enumerable",EE="configurable",kE="writable";yb.f=dE?vE?function(e,t,n){if(pE(e),t=mE(t),pE(n),"function"==typeof e&&"prototype"===t&&"value"in n&&kE in n&&!n[kE]){var r=_E(e,t);r&&r[kE]&&(e[t]=n.value,n={configurable:EE in n?n[EE]:r[EE],enumerable:bE in n?n[bE]:r[bE],writable:!1})}return gE(e,t,n)}:gE:function(e,t,n){if(pE(e),t=mE(t),pE(n),fE)try{return gE(e,t,n)}catch(g6){}if("get"in n||"set"in n)throw yE("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var TE={exports:{}},RE=gb,SE=G_,wE=Function.prototype,DE=RE&&Object.getOwnPropertyDescriptor,IE=SE(wE,"name"),CE={EXISTS:IE,PROPER:IE&&"something"===function(){}.name,CONFIGURABLE:IE&&(!RE||RE&&DE(wE,"name").configurable)},LE=Y_,VE=f_,xE=R_(Function.toString);LE(VE.inspectSource)||(VE.inspectSource=function(e){return xE(e)});var FE,GE,OE,ZE=VE.inspectSource,PE=Y_,UE=s_.WeakMap,NE=PE(UE)&&/native code/.test(String(UE)),BE=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ME=yb,WE=BE,YE=gb?function(e,t,n){return ME.f(e,t,WE(1,n))}:function(e,t,n){return e[t]=n,e},XE=N_,QE=y_("keys"),jE=function(e){return QE[e]||(QE[e]=XE(e))},HE={},JE=NE,KE=s_,zE=Eb,qE=YE,$E=G_,ek=f_,tk=jE,nk=HE,rk="Object already initialized",ik=KE.TypeError,ok=KE.WeakMap;if(JE||ek.state){var ak=ek.state||(ek.state=new ok);ak.get=ak.get,ak.has=ak.has,ak.set=ak.set,FE=function(e,t){if(ak.has(e))throw ik(rk);return t.facade=e,ak.set(e,t),t},GE=function(e){return ak.get(e)||{}},OE=function(e){return ak.has(e)}}else{var sk=tk("state");nk[sk]=!0,FE=function(e,t){if($E(e,sk))throw ik(rk);return t.facade=e,qE(e,sk,t),t},GE=function(e){return $E(e,sk)?e[sk]:{}},OE=function(e){return $E(e,sk)}}var uk={set:FE,get:GE,has:OE,enforce:function(e){return OE(e)?GE(e):FE(e,{})},getterFor:function(e){return function(t){var n;if(!zE(t)||(n=GE(t)).type!==e)throw ik("Incompatible receiver, "+e+" required");return n}}},ck=g_,lk=Y_,hk=G_,Ak=gb,dk=CE.CONFIGURABLE,fk=ZE,vk=uk.enforce,pk=uk.get,mk=Object.defineProperty,yk=Ak&&!ck((function(){return 8!==mk((function(){}),"length",{value:8}).length})),gk=String(String).split("String"),_k=TE.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hk(e,"name")||dk&&e.name!==t)&&(Ak?mk(e,"name",{value:t,configurable:!0}):e.name=t),yk&&n&&hk(n,"arity")&&e.length!==n.arity&&mk(e,"length",{value:n.arity});try{n&&hk(n,"constructor")&&n.constructor?Ak&&mk(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(g6){}var r=vk(e);return hk(r,"source")||(r.source=gk.join("string"==typeof t?t:"")),e};Function.prototype.toString=_k((function(){return lk(this)&&pk(this).source||fk(this)}),"toString");var bk=TE.exports,Ek=Y_,kk=yb,Tk=bk,Rk=h_,Sk=function(e,t,n,r){r||(r={});var i=r.enumerable,o=void 0!==r.name?r.name:t;if(Ek(n)&&Tk(n,o,r),r.global)i?e[t]=n:Rk(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(g6){}i?e[t]=n:kk.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},wk=R_,Dk=wk({}.toString),Ik=wk("".slice),Ck=function(e){return Ik(Dk(e),8,-1)},Lk=mb,Vk=Y_,xk=Ck,Fk=vb("toStringTag"),Gk=Object,Ok="Arguments"==xk(function(){return arguments}()),Zk=Lk?xk:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(g6){}}(t=Gk(e),Fk))?n:Ok?xk(t):"Object"==(r=xk(t))&&Vk(t.callee)?"Arguments":r},Pk=Zk,Uk=mb?{}.toString:function(){return"[object "+Pk(this)+"]"};mb||Sk(Object.prototype,"toString",Uk,{unsafe:!0});var Nk={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},Bk=Sb("span").classList,Mk=Bk&&Bk.constructor&&Bk.constructor.prototype,Wk=Mk===Object.prototype?void 0:Mk,Yk=Ck,Xk=R_,Qk=function(e){if("Function"===Yk(e))return Xk(e)},jk=Hb,Hk=__,Jk=Qk(Qk.bind),Kk=function(e,t){return jk(e),void 0===t?e:Hk?Jk(e,t):function(){return e.apply(t,arguments)}},zk=g_,qk=Ck,$k=Object,eT=R_("".split),tT=zk((function(){return!$k("z").propertyIsEnumerable(0)}))?function(e){return"String"==qk(e)?eT(e,""):$k(e)}:$k,nT=Math.ceil,rT=Math.floor,iT=Math.trunc||function(e){var t=+e;return(t>0?rT:nT)(t)},oT=function(e){var t=+e;return t!=t||0===t?0:iT(t)},aT=oT,sT=Math.min,uT=function(e){return e>0?sT(aT(e),9007199254740991):0},cT=uT,lT=function(e){return cT(e.length)},hT=Ck,AT=Array.isArray||function(e){return"Array"==hT(e)},dT=R_,fT=g_,vT=Y_,pT=Zk,mT=ZE,yT=function(){},gT=[],_T=j_("Reflect","construct"),bT=/^\s*(?:class|function)\b/,ET=dT(bT.exec),kT=!bT.exec(yT),TT=function(e){if(!vT(e))return!1;try{return _T(yT,gT,e),!0}catch(g6){return!1}},RT=function(e){if(!vT(e))return!1;switch(pT(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return kT||!!ET(bT,mT(e))}catch(g6){return!0}};RT.sham=!0;var ST=!_T||fT((function(){var e;return TT(TT.call)||!TT(Object)||!TT((function(){e=!0}))||e}))?RT:TT,wT=AT,DT=ST,IT=Eb,CT=vb("species"),LT=Array,VT=function(e){var t;return wT(e)&&(t=e.constructor,(DT(t)&&(t===LT||wT(t.prototype))||IT(t)&&null===(t=t[CT]))&&(t=void 0)),void 0===t?LT:t},xT=function(e,t){return new(VT(e))(0===t?0:t)},FT=Kk,GT=tT,OT=V_,ZT=lT,PT=xT,UT=R_([].push),NT=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,c,l,h){for(var A,d,f=OT(u),v=GT(f),p=FT(c,l),m=ZT(v),y=0,g=h||PT,_=t?g(u,m):n||a?g(u,0):void 0;m>y;y++)if((s||y in v)&&(d=p(A=v[y],y,f),e))if(t)_[y]=d;else if(d)switch(e){case 3:return!0;case 5:return A;case 6:return y;case 2:UT(_,A)}else switch(e){case 4:return!1;case 7:UT(_,A)}return o?-1:r||i?i:_}},BT={forEach:NT(0),map:NT(1),filter:NT(2),some:NT(3),every:NT(4),find:NT(5),findIndex:NT(6),filterReject:NT(7)},MT=g_,WT=function(e,t){var n=[][e];return!!n&&MT((function(){n.call(null,t||function(){return 1},1)}))},YT=BT.forEach,XT=WT("forEach")?[].forEach:function(e){return YT(this,e,arguments.length>1?arguments[1]:void 0)},QT=s_,jT=Nk,HT=Wk,JT=XT,KT=YE,zT=function(e){if(e&&e.forEach!==JT)try{KT(e,"forEach",JT)}catch(g6){e.forEach=JT}};for(var qT in jT)jT[qT]&&zT(QT[qT]&&QT[qT].prototype);zT(HT);var $T={},eR={},tR={}.propertyIsEnumerable,nR=Object.getOwnPropertyDescriptor,rR=nR&&!tR.call({1:2},1);eR.f=rR?function(e){var t=nR(this,e);return!!t&&t.enumerable}:tR;var iR=tT,oR=I_,aR=function(e){return iR(oR(e))},sR=gb,uR=Ob,cR=eR,lR=BE,hR=aR,AR=AE,dR=G_,fR=Db,vR=Object.getOwnPropertyDescriptor;$T.f=sR?vR:function(e,t){if(e=hR(e),t=AR(t),fR)try{return vR(e,t)}catch(g6){}if(dR(e,t))return lR(!uR(cR.f,e,t),e[t])};var pR={},mR=oT,yR=Math.max,gR=Math.min,_R=function(e,t){var n=mR(e);return n<0?yR(n+t,0):gR(n,t)},bR=aR,ER=_R,kR=lT,TR=function(e){return function(t,n,r){var i,o=bR(t),a=kR(o),s=ER(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},RR={includes:TR(!0),indexOf:TR(!1)},SR=G_,wR=aR,DR=RR.indexOf,IR=HE,CR=R_([].push),LR=function(e,t){var n,r=wR(e),i=0,o=[];for(n in r)!SR(IR,n)&&SR(r,n)&&CR(o,n);for(;t.length>i;)SR(r,n=t[i++])&&(~DR(o,n)||CR(o,n));return o},VR=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xR=LR,FR=VR.concat("length","prototype");pR.f=Object.getOwnPropertyNames||function(e){return xR(e,FR)};var GR={};GR.f=Object.getOwnPropertySymbols;var OR=j_,ZR=pR,PR=GR,UR=xb,NR=R_([].concat),BR=OR("Reflect","ownKeys")||function(e){var t=ZR.f(UR(e)),n=PR.f;return n?NR(t,n(e)):t},MR=G_,WR=BR,YR=$T,XR=yb,QR=g_,jR=Y_,HR=/#|\.prototype\./,JR=function(e,t){var n=zR[KR(e)];return n==$R||n!=qR&&(jR(t)?QR(t):!!t)},KR=JR.normalize=function(e){return String(e).replace(HR,".").toLowerCase()},zR=JR.data={},qR=JR.NATIVE="N",$R=JR.POLYFILL="P",eS=JR,tS=s_,nS=$T.f,rS=YE,iS=Sk,oS=h_,aS=function(e,t,n){for(var r=WR(t),i=XR.f,o=YR.f,a=0;a<r.length;a++){var s=r[a];MR(e,s)||n&&MR(n,s)||i(e,s,o(t,s))}},sS=eS,uS=function(e,t){var n,r,i,o,a,s=e.target,u=e.global,c=e.stat;if(n=u?tS:c?tS[s]||oS(s,{}):(tS[s]||{}).prototype)for(r in t){if(o=t[r],i=e.dontCallGetSet?(a=nS(n,r))&&a.value:n[r],!sS(u?r:s+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;aS(o,i)}(e.sham||i&&i.sham)&&rS(o,"sham",!0),iS(n,r,o,e)}},cS={},lS=AE,hS=yb,AS=BE,dS=function(e,t,n){var r=lS(t);r in e?hS.f(e,r,AS(0,n)):e[r]=n},fS=_R,vS=lT,pS=dS,mS=Array,yS=Math.max,gS=function(e,t,n){for(var r=vS(e),i=fS(t,r),o=fS(void 0===n?r:n,r),a=mS(yS(o-i,0)),s=0;i<o;i++,s++)pS(a,s,e[i]);return a.length=s,a},_S=Ck,bS=aR,ES=pR.f,kS=gS,TS="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];cS.f=function(e){return TS&&"Window"==_S(e)?function(e){try{return ES(e)}catch(g6){return kS(TS)}}(e):ES(bS(e))};var RS=uS,SS=g_,wS=cS.f;RS({target:"Object",stat:!0,forced:SS((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:wS});var DS=Zk,IS=String,CS=function(e){if("Symbol"===DS(e))throw TypeError("Cannot convert a Symbol value to a string");return IS(e)},LS=xb,VS=function(){var e=LS(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},xS=g_,FS=s_.RegExp,GS=xS((function(){var e=FS("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),OS=GS||xS((function(){return!FS("a","y").sticky})),ZS=GS||xS((function(){var e=FS("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),PS={BROKEN_CARET:ZS,MISSED_STICKY:OS,UNSUPPORTED_Y:GS},US={},NS=LR,BS=VR,MS=Object.keys||function(e){return NS(e,BS)},WS=gb,YS=Ib,XS=yb,QS=xb,jS=aR,HS=MS;US.f=WS&&!YS?Object.defineProperties:function(e,t){QS(e);for(var n,r=jS(t),i=HS(t),o=i.length,a=0;o>a;)XS.f(e,n=i[a++],r[n]);return e};var JS,KS=j_("document","documentElement"),zS=xb,qS=US,$S=VR,ew=HE,tw=KS,nw=Sb,rw="prototype",iw="script",ow=jE("IE_PROTO"),aw=function(){},sw=function(e){return"<"+iw+">"+e+"</"+iw+">"},uw=function(e){e.write(sw("")),e.close();var t=e.parentWindow.Object;return e=null,t},cw=function(){try{JS=new ActiveXObject("htmlfile")}catch(g6){}var e,t,n;cw="undefined"!=typeof document?document.domain&&JS?uw(JS):(t=nw("iframe"),n="java"+iw+":",t.style.display="none",tw.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(sw("document.F=Object")),e.close(),e.F):uw(JS);for(var r=$S.length;r--;)delete cw[rw][$S[r]];return cw()};ew[ow]=!0;var lw,hw,Aw=Object.create||function(e,t){var n;return null!==e?(aw[rw]=zS(e),n=new aw,aw[rw]=null,n[ow]=e):n=cw(),void 0===t?n:qS.f(n,t)},dw=g_,fw=s_.RegExp,vw=dw((function(){var e=fw(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),pw=g_,mw=s_.RegExp,yw=pw((function(){var e=mw("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),gw=Ob,_w=R_,bw=CS,Ew=VS,kw=PS,Tw=Aw,Rw=uk.get,Sw=vw,ww=yw,Dw=y_("native-string-replace",String.prototype.replace),Iw=RegExp.prototype.exec,Cw=Iw,Lw=_w("".charAt),Vw=_w("".indexOf),xw=_w("".replace),Fw=_w("".slice),Gw=(hw=/b*/g,gw(Iw,lw=/a/,"a"),gw(Iw,hw,"a"),0!==lw.lastIndex||0!==hw.lastIndex),Ow=kw.BROKEN_CARET,Zw=void 0!==/()??/.exec("")[1];(Gw||Zw||Ow||Sw||ww)&&(Cw=function(e){var t,n,r,i,o,a,s,u=this,c=Rw(u),l=bw(e),h=c.raw;if(h)return h.lastIndex=u.lastIndex,t=gw(Cw,h,l),u.lastIndex=h.lastIndex,t;var A=c.groups,d=Ow&&u.sticky,f=gw(Ew,u),v=u.source,p=0,m=l;if(d&&(f=xw(f,"y",""),-1===Vw(f,"g")&&(f+="g"),m=Fw(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Lw(l,u.lastIndex-1))&&(v="(?: "+v+")",m=" "+m,p++),n=new RegExp("^(?:"+v+")",f)),Zw&&(n=new RegExp("^"+v+"$(?!\\s)",f)),Gw&&(r=u.lastIndex),i=gw(Iw,d?n:u,m),d?i?(i.input=Fw(i.input,p),i[0]=Fw(i[0],p),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:Gw&&i&&(u.lastIndex=u.global?i.index+i[0].length:r),Zw&&i&&i.length>1&&gw(Dw,i[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&A)for(i.groups=a=Tw(null),o=0;o<A.length;o++)a[(s=A[o])[0]]=i[s[1]];return i});var Pw=Cw;uS({target:"RegExp",proto:!0,forced:/./.exec!==Pw},{exec:Pw});var Uw,Nw,Bw=uS,Mw=Ob,Ww=Y_,Yw=xb,Xw=CS,Qw=(Uw=!1,(Nw=/[ac]/).exec=function(){return Uw=!0,/./.exec.apply(this,arguments)},!0===Nw.test("abc")&&Uw),jw=/./.test;Bw({target:"RegExp",proto:!0,forced:!Qw},{test:function(e){var t=Yw(this),n=Xw(e),r=t.exec;if(!Ww(r))return Mw(jw,t,n);var i=Mw(r,t,n);return null!==i&&(Yw(i),!0)}});var Hw=__,Jw=Function.prototype,Kw=Jw.apply,zw=Jw.call,qw="object"==typeof Reflect&&Reflect.apply||(Hw?zw.bind(Kw):function(){return zw.apply(Kw,arguments)}),$w=Qk,eD=Sk,tD=Pw,nD=g_,rD=vb,iD=YE,oD=rD("species"),aD=RegExp.prototype,sD=R_,uD=oT,cD=CS,lD=I_,hD=sD("".charAt),AD=sD("".charCodeAt),dD=sD("".slice),fD=function(e){return function(t,n){var r,i,o=cD(lD(t)),a=uD(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=AD(o,a))<55296||r>56319||a+1===s||(i=AD(o,a+1))<56320||i>57343?e?hD(o,a):r:e?dD(o,a,a+2):i-56320+(r-55296<<10)+65536}},vD={codeAt:fD(!1),charAt:fD(!0)},pD=vD.charAt,mD=R_,yD=V_,gD=Math.floor,_D=mD("".charAt),bD=mD("".replace),ED=mD("".slice),kD=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,TD=/\$([$&'`]|\d{1,2})/g,RD=Ob,SD=xb,wD=Y_,DD=Ck,ID=Pw,CD=TypeError,LD=qw,VD=Ob,xD=R_,FD=function(e,t,n,r){var i=rD(e),o=!nD((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),a=o&&!nD((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[oD]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!o||!a||n){var s=$w(/./[i]),u=t(i,""[e],(function(e,t,n,r,i){var a=$w(e),u=t.exec;return u===tD||u===aD.exec?o&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));eD(String.prototype,e,u[0]),eD(aD,i,u[1])}r&&iD(aD[i],"sham",!0)},GD=g_,OD=xb,ZD=Y_,PD=S_,UD=oT,ND=uT,BD=CS,MD=I_,WD=function(e,t,n){return t+(n?pD(e,t).length:1)},YD=zb,XD=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,u=TD;return void 0!==i&&(i=yD(i),u=kD),bD(o,u,(function(o,u){var c;switch(_D(u,0)){case"$":return"$";case"&":return e;case"`":return ED(t,0,n);case"'":return ED(t,a);case"<":c=i[ED(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>s){var h=gD(l/10);return 0===h?o:h<=s?void 0===r[h-1]?_D(u,1):r[h-1]+_D(u,1):o}c=r[l-1]}return void 0===c?"":c}))},QD=function(e,t){var n=e.exec;if(wD(n)){var r=RD(n,e,t);return null!==r&&SD(r),r}if("RegExp"===DD(e))return RD(ID,e,t);throw CD("RegExp#exec called on incompatible receiver")},jD=vb("replace"),HD=Math.max,JD=Math.min,KD=xD([].concat),zD=xD([].push),qD=xD("".indexOf),$D=xD("".slice),eI="$0"==="a".replace(/./,"$0"),tI=!!/./[jD]&&""===/./[jD]("a","$0"),nI=!GD((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));FD("replace",(function(e,t,n){var r=tI?"$":"$0";return[function(e,n){var r=MD(this),i=PD(e)?void 0:YD(e,jD);return i?VD(i,e,r,n):VD(t,BD(r),e,n)},function(e,i){var o=OD(this),a=BD(e);if("string"==typeof i&&-1===qD(i,r)&&-1===qD(i,"$<")){var s=n(t,o,a,i);if(s.done)return s.value}var u=ZD(i);u||(i=BD(i));var c=o.global;if(c){var l=o.unicode;o.lastIndex=0}for(var h=[];;){var A=QD(o,a);if(null===A)break;if(zD(h,A),!c)break;""===BD(A[0])&&(o.lastIndex=WD(a,ND(o.lastIndex),l))}for(var d,f="",v=0,p=0;p<h.length;p++){for(var m=BD((A=h[p])[0]),y=HD(JD(UD(A.index),a.length),0),g=[],_=1;_<A.length;_++)zD(g,void 0===(d=A[_])?d:String(d));var b=A.groups;if(u){var E=KD([m],g,y,a);void 0!==b&&zD(E,b);var k=BD(LD(i,void 0,E))}else k=XD(m,a,y,g,b,i);y>=v&&(f+=$D(a,v,y)+k,v=y+m.length)}return f+$D(a,v)}]}),!nI||!eI||tI);var rI=g_,iI=tb,oI=vb("species"),aI=function(e){return iI>=51||!rI((function(){var t=[];return(t.constructor={})[oI]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},sI=BT.filter;uS({target:"Array",proto:!0,forced:!aI("filter")},{filter:function(e){return sI(this,e,arguments.length>1?arguments[1]:void 0)}});var uI,cI,lI,hI,AI="process"==Ck(s_.process),dI=Y_,fI=String,vI=TypeError,pI=R_,mI=xb,yI=function(e){if("object"==typeof e||dI(e))return e;throw vI("Can't set "+fI(e)+" as a prototype")},gI=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=pI(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(g6){}return function(n,r){return mI(n),yI(r),t?e(n,r):n.__proto__=r,n}}():void 0),_I=yb.f,bI=G_,EI=vb("toStringTag"),kI=function(e,t,n){e&&!n&&(e=e.prototype),e&&!bI(e,EI)&&_I(e,EI,{configurable:!0,value:t})},TI=j_,RI=yb,SI=gb,wI=vb("species"),DI=function(e){var t=TI(e),n=RI.f;SI&&t&&!t[wI]&&n(t,wI,{configurable:!0,get:function(){return this}})},II=Zb,CI=TypeError,LI=function(e,t){if(II(t,e))return e;throw CI("Incorrect invocation")},VI=ST,xI=Yb,FI=TypeError,GI=function(e){if(VI(e))return e;throw FI(xI(e)+" is not a constructor")},OI=xb,ZI=GI,PI=S_,UI=vb("species"),NI=function(e,t){var n,r=OI(e).constructor;return void 0===r||PI(n=OI(r)[UI])?t:ZI(n)},BI=R_([].slice),MI=TypeError,WI=function(e,t){if(e<t)throw MI("Not enough arguments");return e},YI=/(?:ipad|iphone|ipod).*applewebkit/i.test(H_),XI=s_,QI=qw,jI=Kk,HI=Y_,JI=G_,KI=g_,zI=KS,qI=BI,$I=Sb,eC=WI,tC=YI,nC=AI,rC=XI.setImmediate,iC=XI.clearImmediate,oC=XI.process,aC=XI.Dispatch,sC=XI.Function,uC=XI.MessageChannel,cC=XI.String,lC=0,hC={},AC="onreadystatechange";try{uI=XI.location}catch(g6){}var dC=function(e){if(JI(hC,e)){var t=hC[e];delete hC[e],t()}},fC=function(e){return function(){dC(e)}},vC=function(e){dC(e.data)},pC=function(e){XI.postMessage(cC(e),uI.protocol+"//"+uI.host)};rC&&iC||(rC=function(e){eC(arguments.length,1);var t=HI(e)?e:sC(e),n=qI(arguments,1);return hC[++lC]=function(){QI(t,void 0,n)},cI(lC),lC},iC=function(e){delete hC[e]},nC?cI=function(e){oC.nextTick(fC(e))}:aC&&aC.now?cI=function(e){aC.now(fC(e))}:uC&&!tC?(hI=(lI=new uC).port2,lI.port1.onmessage=vC,cI=jI(hI.postMessage,hI)):XI.addEventListener&&HI(XI.postMessage)&&!XI.importScripts&&uI&&"file:"!==uI.protocol&&!KI(pC)?(cI=pC,XI.addEventListener("message",vC,!1)):cI=AC in $I("script")?function(e){zI.appendChild($I("script"))[AC]=function(){zI.removeChild(this),dC(e)}}:function(e){setTimeout(fC(e),0)});var mC,yC,gC,_C,bC,EC,kC,TC,RC={set:rC,clear:iC},SC=s_,wC=/ipad|iphone|ipod/i.test(H_)&&void 0!==SC.Pebble,DC=/web0s(?!.*chrome)/i.test(H_),IC=s_,CC=Kk,LC=$T.f,VC=RC.set,xC=YI,FC=wC,GC=DC,OC=AI,ZC=IC.MutationObserver||IC.WebKitMutationObserver,PC=IC.document,UC=IC.process,NC=IC.Promise,BC=LC(IC,"queueMicrotask"),MC=BC&&BC.value;MC||(mC=function(){var e,t;for(OC&&(e=UC.domain)&&e.exit();yC;){t=yC.fn,yC=yC.next;try{t()}catch(g6){throw yC?_C():gC=void 0,g6}}gC=void 0,e&&e.enter()},xC||OC||GC||!ZC||!PC?!FC&&NC&&NC.resolve?((kC=NC.resolve(void 0)).constructor=NC,TC=CC(kC.then,kC),_C=function(){TC(mC)}):OC?_C=function(){UC.nextTick(mC)}:(VC=CC(VC,IC),_C=function(){VC(mC)}):(bC=!0,EC=PC.createTextNode(""),new ZC(mC).observe(EC,{characterData:!0}),_C=function(){EC.data=bC=!bC}));var WC=MC||function(e){var t={fn:e,next:void 0};gC&&(gC.next=t),yC||(yC=t,_C()),gC=t},YC=s_,XC=function(e){try{return{error:!1,value:e()}}catch(g6){return{error:!0,value:g6}}},QC=function(){this.head=null,this.tail=null};QC.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var jC=QC,HC=s_.Promise,JC="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,KC=!JC&&!AI&&"object"==typeof window&&"object"==typeof document,zC=s_,qC=HC,$C=Y_,eL=eS,tL=ZE,nL=vb,rL=KC,iL=JC,oL=tb;qC&&qC.prototype;var aL=nL("species"),sL=!1,uL=$C(zC.PromiseRejectionEvent),cL={CONSTRUCTOR:eL("Promise",(function(){var e=tL(qC),t=e!==String(qC);if(!t&&66===oL)return!0;if(!oL||oL<51||!/native code/.test(e)){var n=new qC((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[aL]=r,!(sL=n.then((function(){}))instanceof r))return!0}return!t&&(rL||iL)&&!uL})),REJECTION_EVENT:uL,SUBCLASSING:sL},lL={},hL=Hb,AL=TypeError,dL=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw AL("Bad Promise constructor");t=e,n=r})),this.resolve=hL(t),this.reject=hL(n)};lL.f=function(e){return new dL(e)};var fL,vL,pL,mL=uS,yL=AI,gL=s_,_L=Ob,bL=Sk,EL=gI,kL=kI,TL=DI,RL=Hb,SL=Y_,wL=Eb,DL=LI,IL=NI,CL=RC.set,LL=WC,VL=function(e,t){var n=YC.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},xL=XC,FL=jC,GL=uk,OL=HC,ZL=lL,PL="Promise",UL=cL.CONSTRUCTOR,NL=cL.REJECTION_EVENT,BL=cL.SUBCLASSING,ML=GL.getterFor(PL),WL=GL.set,YL=OL&&OL.prototype,XL=OL,QL=YL,jL=gL.TypeError,HL=gL.document,JL=gL.process,KL=ZL.f,zL=KL,qL=!!(HL&&HL.createEvent&&gL.dispatchEvent),$L="unhandledrejection",eV=function(e){var t;return!(!wL(e)||!SL(t=e.then))&&t},tV=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&aV(t),t.rejection=1),!0===s?n=o:(l&&l.enter(),n=s(o),l&&(l.exit(),i=!0)),n===e.promise?c(jL("Promise-chain cycle")):(r=eV(n))?_L(r,n,u,c):u(n)):c(o)}catch(g6){l&&!i&&l.exit(),c(g6)}},nV=function(e,t){e.notified||(e.notified=!0,LL((function(){for(var n,r=e.reactions;n=r.get();)tV(n,e);e.notified=!1,t&&!e.rejection&&iV(e)})))},rV=function(e,t,n){var r,i;qL?((r=HL.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),gL.dispatchEvent(r)):r={promise:t,reason:n},!NL&&(i=gL["on"+e])?i(r):e===$L&&VL("Unhandled promise rejection",n)},iV=function(e){_L(CL,gL,(function(){var t,n=e.facade,r=e.value;if(oV(e)&&(t=xL((function(){yL?JL.emit("unhandledRejection",r,n):rV($L,n,r)})),e.rejection=yL||oV(e)?2:1,t.error))throw t.value}))},oV=function(e){return 1!==e.rejection&&!e.parent},aV=function(e){_L(CL,gL,(function(){var t=e.facade;yL?JL.emit("rejectionHandled",t):rV("rejectionhandled",t,e.value)}))},sV=function(e,t,n){return function(r){e(t,r,n)}},uV=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,nV(e,!0))},cV=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw jL("Promise can't be resolved itself");var r=eV(t);r?LL((function(){var n={done:!1};try{_L(r,t,sV(cV,n,e),sV(uV,n,e))}catch(g6){uV(n,g6,e)}})):(e.value=t,e.state=1,nV(e,!1))}catch(g6){uV({done:!1},g6,e)}}};if(UL&&(QL=(XL=function(e){DL(this,QL),RL(e),_L(fL,this);var t=ML(this);try{e(sV(cV,t),sV(uV,t))}catch(g6){uV(t,g6)}}).prototype,(fL=function(e){WL(this,{type:PL,done:!1,notified:!1,parent:!1,reactions:new FL,rejection:!1,state:0,value:void 0})}).prototype=bL(QL,"then",(function(e,t){var n=ML(this),r=KL(IL(this,XL));return n.parent=!0,r.ok=!SL(e)||e,r.fail=SL(t)&&t,r.domain=yL?JL.domain:void 0,0==n.state?n.reactions.add(r):LL((function(){tV(r,n)})),r.promise})),vL=function(){var e=new fL,t=ML(e);this.promise=e,this.resolve=sV(cV,t),this.reject=sV(uV,t)},ZL.f=KL=function(e){return e===XL||undefined===e?new vL(e):zL(e)},SL(OL)&&YL!==Object.prototype)){pL=YL.then,BL||bL(YL,"then",(function(e,t){var n=this;return new XL((function(e,t){_L(pL,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete YL.constructor}catch(g6){}EL&&EL(YL,QL)}mL({global:!0,constructor:!0,wrap:!0,forced:UL},{Promise:XL}),kL(XL,PL,!1),TL(PL);var lV={},hV=lV,AV=vb("iterator"),dV=Array.prototype,fV=function(e){return void 0!==e&&(hV.Array===e||dV[AV]===e)},vV=Zk,pV=zb,mV=S_,yV=lV,gV=vb("iterator"),_V=function(e){if(!mV(e))return pV(e,gV)||pV(e,"@@iterator")||yV[vV(e)]},bV=Ob,EV=Hb,kV=xb,TV=Yb,RV=_V,SV=TypeError,wV=function(e,t){var n=arguments.length<2?RV(e):t;if(EV(n))return kV(bV(n,e));throw SV(TV(e)+" is not iterable")},DV=Ob,IV=xb,CV=zb,LV=function(e,t,n){var r,i;IV(e);try{if(!(r=CV(e,"return"))){if("throw"===t)throw n;return n}r=DV(r,e)}catch(g6){i=!0,r=g6}if("throw"===t)throw n;if(i)throw r;return IV(r),n},VV=Kk,xV=Ob,FV=xb,GV=Yb,OV=fV,ZV=lT,PV=Zb,UV=wV,NV=_V,BV=LV,MV=TypeError,WV=function(e,t){this.stopped=e,this.result=t},YV=WV.prototype,XV=function(e,t,n){var r,i,o,a,s,u,c,l=n&&n.that,h=!(!n||!n.AS_ENTRIES),A=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),v=VV(t,l),p=function(e){return r&&BV(r,"normal",e),new WV(!0,e)},m=function(e){return h?(FV(e),f?v(e[0],e[1],p):v(e[0],e[1])):f?v(e,p):v(e)};if(A)r=e.iterator;else if(d)r=e;else{if(!(i=NV(e)))throw MV(GV(e)+" is not iterable");if(OV(i)){for(o=0,a=ZV(e);a>o;o++)if((s=m(e[o]))&&PV(YV,s))return s;return new WV(!1)}r=UV(e,i)}for(u=A?e.next:r.next;!(c=xV(u,r)).done;){try{s=m(c.value)}catch(g6){BV(r,"throw",g6)}if("object"==typeof s&&s&&PV(YV,s))return s}return new WV(!1)},QV=vb("iterator"),jV=!1;try{var HV=0,JV={next:function(){return{done:!!HV++}},return:function(){jV=!0}};JV[QV]=function(){return this},Array.from(JV,(function(){throw 2}))}catch(g6){}var KV=function(e,t){if(!t&&!jV)return!1;var n=!1;try{var r={};r[QV]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(g6){}return n},zV=HC,qV=cL.CONSTRUCTOR||!KV((function(e){zV.all(e).then(void 0,(function(){}))})),$V=Ob,ex=Hb,tx=lL,nx=XC,rx=XV;uS({target:"Promise",stat:!0,forced:qV},{all:function(e){var t=this,n=tx.f(t),r=n.resolve,i=n.reject,o=nx((function(){var n=ex(t.resolve),o=[],a=0,s=1;rx(e,(function(e){var u=a++,c=!1;s++,$V(n,t,e).then((function(e){c||(c=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var ix=uS,ox=cL.CONSTRUCTOR,ax=HC,sx=j_,ux=Y_,cx=Sk,lx=ax&&ax.prototype;if(ix({target:"Promise",proto:!0,forced:ox,real:!0},{catch:function(e){return this.then(void 0,e)}}),ux(ax)){var hx=sx("Promise").prototype.catch;lx.catch!==hx&&cx(lx,"catch",hx,{unsafe:!0})}var Ax=Ob,dx=Hb,fx=lL,vx=XC,px=XV;uS({target:"Promise",stat:!0,forced:qV},{race:function(e){var t=this,n=fx.f(t),r=n.reject,i=vx((function(){var i=dx(t.resolve);px(e,(function(e){Ax(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var mx=Ob,yx=lL;uS({target:"Promise",stat:!0,forced:cL.CONSTRUCTOR},{reject:function(e){var t=yx.f(this);return mx(t.reject,void 0,e),t.promise}});var gx=xb,_x=Eb,bx=lL,Ex=function(e,t){if(gx(e),_x(t)&&t.constructor===e)return t;var n=bx.f(e);return(0,n.resolve)(t),n.promise},kx=uS,Tx=cL.CONSTRUCTOR,Rx=Ex;j_("Promise"),kx({target:"Promise",stat:!0,forced:Tx},{resolve:function(e){return Rx(this,e)}});var Sx=TypeError,wx=function(e){if(e>9007199254740991)throw Sx("Maximum allowed index exceeded");return e},Dx=uS,Ix=g_,Cx=AT,Lx=Eb,Vx=V_,xx=lT,Fx=wx,Gx=dS,Ox=xT,Zx=aI,Px=tb,Ux=vb("isConcatSpreadable"),Nx=Px>=51||!Ix((function(){var e=[];return e[Ux]=!1,e.concat()[0]!==e})),Bx=Zx("concat"),Mx=function(e){if(!Lx(e))return!1;var t=e[Ux];return void 0!==t?!!t:Cx(e)};Dx({target:"Array",proto:!0,arity:1,forced:!Nx||!Bx},{concat:function(e){var t,n,r,i,o,a=Vx(this),s=Ox(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Mx(o=-1===t?a:arguments[t]))for(i=xx(o),Fx(u+i),n=0;n<i;n++,u++)n in o&&Gx(s,u,o[n]);else Fx(u+1),Gx(s,u++,o);return s.length=u,s}});var Wx=uS,Yx=HC,Xx=g_,Qx=j_,jx=Y_,Hx=NI,Jx=Ex,Kx=Sk,zx=Yx&&Yx.prototype;if(Wx({target:"Promise",proto:!0,real:!0,forced:!!Yx&&Xx((function(){zx.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Hx(this,Qx("Promise")),n=jx(e);return this.then(n?function(n){return Jx(t,e()).then((function(){return n}))}:e,n?function(n){return Jx(t,e()).then((function(){throw n}))}:e)}}),jx(Yx)){var qx=Qx("Promise").prototype.finally;zx.finally!==qx&&Kx(zx,"finally",qx,{unsafe:!0})}var $x=Y_,eF=Eb,tF=gI,nF=function(e,t,n){var r,i;return tF&&$x(r=t.constructor)&&r!==n&&eF(i=r.prototype)&&i!==n.prototype&&tF(e,i),e},rF=R_(1..valueOf),iF="\t\n\v\f\r                 \u2028\u2029\ufeff",oF=I_,aF=CS,sF=iF,uF=R_("".replace),cF="["+sF+"]",lF=RegExp("^"+cF+cF+"*"),hF=RegExp(cF+cF+"*$"),AF=function(e){return function(t){var n=aF(oF(t));return 1&e&&(n=uF(n,lF,"")),2&e&&(n=uF(n,hF,"")),n}},dF={start:AF(1),end:AF(2),trim:AF(3)},fF=gb,vF=s_,pF=R_,mF=eS,yF=Sk,gF=G_,_F=nF,bF=Zb,EF=Mb,kF=cE,TF=g_,RF=pR.f,SF=$T.f,wF=yb.f,DF=rF,IF=dF.trim,CF="Number",LF=vF[CF],VF=LF.prototype,xF=vF.TypeError,FF=pF("".slice),GF=pF("".charCodeAt),OF=function(e){var t,n,r,i,o,a,s,u,c=kF(e,"number");if(EF(c))throw xF("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=IF(c),43===(t=GF(c,0))||45===t){if(88===(n=GF(c,2))||120===n)return NaN}else if(48===t){switch(GF(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=FF(c,2)).length,s=0;s<a;s++)if((u=GF(o,s))<48||u>i)return NaN;return parseInt(o,r)}return+c};if(mF(CF,!LF(" 0o1")||!LF("0b1")||LF("+0x1"))){for(var ZF,PF=function(e){var t=arguments.length<1?0:LF(function(e){var t=kF(e,"number");return"bigint"==typeof t?t:OF(t)}(e)),n=this;return bF(VF,n)&&TF((function(){DF(n)}))?_F(Object(t),n,PF):t},UF=fF?RF(LF):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),NF=0;UF.length>NF;NF++)gF(LF,ZF=UF[NF])&&!gF(PF,ZF)&&wF(PF,ZF,SF(LF,ZF));PF.prototype=VF,VF.constructor=PF,yF(vF,CF,PF,{constructor:!0})}var BF=s_,MF=g_,WF=CS,YF=dF.trim,XF=iF,QF=R_("".charAt),jF=BF.parseFloat,HF=BF.Symbol,JF=HF&&HF.iterator,KF=1/jF(XF+"-0")!=-1/0||JF&&!MF((function(){jF(Object(JF))}))?function(e){var t=YF(WF(e)),n=jF(t);return 0===n&&"-"==QF(t,0)?-0:n}:jF;uS({target:"Number",stat:!0,forced:Number.parseFloat!=KF},{parseFloat:KF}),uS({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var zF=BT.map;uS({target:"Array",proto:!0,forced:!aI("map")},{map:function(e){return zF(this,e,arguments.length>1?arguments[1]:void 0)}});var qF=V_,$F=_R,eG=lT,tG=function(e){for(var t=qF(this),n=eG(t),r=arguments.length,i=$F(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:$F(o,n);a>i;)t[i++]=e;return t},nG=vb,rG=Aw,iG=yb.f,oG=nG("unscopables"),aG=Array.prototype;null==aG[oG]&&iG(aG,oG,{configurable:!0,value:rG(null)});var sG=function(e){aG[oG][e]=!0},uG=sG;uS({target:"Array",proto:!0},{fill:tG}),uG("fill");var cG,lG=t(ee.setInterval),hG=function(){return"undefined"!=typeof navigator&&Bg((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream},AG=function(){return"wakeLock"in navigator},dG=function(){function e(){var t=this;_y(this,e),this.enabled=!1,AG()?(this._wakeLock=null,this.handleVisibilityChange=function(){null!==t._wakeLock&&t.visible&&t.enable()},document.addEventListener("visibilitychange",this.handleVisibilityChange),document.addEventListener("fullscreenchange",this.handleVisibilityChange)):hG()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64, AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK"),this.noSleepVideo.addEventListener("loadedmetadata",(function(){t.noSleepVideo&&(t.noSleepVideo.duration<=1?t.noSleepVideo.setAttribute("loop",""):(t.onTimeupdate=function(){t.noSleepVideo.currentTime>.5&&(t.noSleepVideo.currentTime=Math.random())},t.noSleepVideo.addEventListener("timeupdate",t.onTimeupdate)))})))}return Ey(e,[{key:"_addSourceToVideo",value:function(e,t,n){var r=document.createElement("source");r.src=n,r.type="video/".concat(t),e.appendChild(r)}},{key:"visible",get:function(){return"visible"===document.visibilityState}},{key:"isEnabled",get:function(){return this.enabled}},{key:"enable",value:function(){var e,t=this;if(AG()&&this.visible)return navigator.wakeLock.request("screen").then((function(e){t._wakeLock=e,t.enabled=!0,t._wakeLock.addEventListener("release",(function(){}))})).catch((function(){t.enabled=!1}));if(hG())return this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=lG((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],Cg(window.stop,0))}),15e3),this.enabled=!0,Op.resolve();if(null!==(e=this.noSleepVideo)&&void 0!==e&&e.paused){var n=this.noSleepVideo.play();return n&&n.then((function(e){return t.enabled=!0,e})).catch((function(e){console.log("noSleep: ",e.message),t.enabled=!1}))}}},{key:"disable",value:function(){AG()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):hG()?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}},{key:"toPlay",value:function(){if(this.noSleepVideo&&this.noSleepVideo.paused){var e=performance.now();this.lastTs||(this.lastTs=e),e-this.lastTs>1e4&&(this.enable(),this.lastTs=e)}}},{key:"destroy",value:function(){this.disable(),this.handleVisibilityChange&&(document.removeEventListener("visibilitychange",this.handleVisibilityChange),document.removeEventListener("fullscreenchange",this.handleVisibilityChange)),this.onTimeupdate&&this.noSleepVideo.removeEventListener("timeupdate",this.onTimeupdate),this.noSleepVideo=null}}]),e}();function fG(){if(!document.querySelector("#hackAudioPP")){var e=document.createElement("div");e.innerHTML="<audio id='hackAudioPP'></audio>",document.body.appendChild(e);var t=e.children.item(0);t.controls=!1,t.preload="auto",t.innerHTML="<source src=".concat("data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAABhTEFNRTMuMTAwA8MAAAAAAAAAABQgJAUHQQAB9AAAAnGMHkkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADgnABGiAAQBCqgCRMAAgEAH///////////////7+n/9FTuQsQH//////2NG0jWUGlio5gLQTOtIoeR2WX////X4s9Atb/JRVCbBUpeRUq//////////////////9RUi0f2jn/+xDECgPCjAEQAABN4AAANIAAAAQVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",' type="audio/mpeg"></source>'),t.muted=!0,t.loop=!0,t.play().catch((function(){}))}}function vG(){var e=cG||(cG=document.querySelector("#hackAudioPP"));e?!1===e.paused&&!1===e.muted||(e.muted=!1,e.play().catch((function(e){console.log("bgAudio: ",e.message)}))):fG()}var pG=Dn,mG=Date,yG=v(mG.prototype.getTime);pG({target:"Date",stat:!0},{now:function(){return yG(new mG)}});var gG,_G,bG,EG=t(ee.Date.now),kG=!g_((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),TG=G_,RG=Y_,SG=V_,wG=kG,DG=jE("IE_PROTO"),IG=Object,CG=IG.prototype,LG=wG?IG.getPrototypeOf:function(e){var t=SG(e);if(TG(t,DG))return t[DG];var n=t.constructor;return RG(n)&&t instanceof n?n.prototype:t instanceof IG?CG:null},VG=g_,xG=Y_,FG=Eb,GG=LG,OG=Sk,ZG=vb("iterator"),PG=!1;[].keys&&("next"in(bG=[].keys())?(_G=GG(GG(bG)))!==Object.prototype&&(gG=_G):PG=!0),(!FG(gG)||VG((function(){var e={};return gG[ZG].call(e)!==e})))&&(gG={}),xG(gG[ZG])||OG(gG,ZG,(function(){return this}));var UG={IteratorPrototype:gG,BUGGY_SAFARI_ITERATORS:PG},NG=UG.IteratorPrototype,BG=Aw,MG=BE,WG=kI,YG=lV,XG=function(){return this},QG=function(e,t,n,r){var i=t+" Iterator";return e.prototype=BG(NG,{next:MG(+!r,n)}),WG(e,i,!1),YG[i]=XG,e},jG=uS,HG=Ob,JG=Y_,KG=QG,zG=LG,qG=gI,$G=kI,eO=YE,tO=Sk,nO=lV,rO=CE.PROPER,iO=CE.CONFIGURABLE,oO=UG.IteratorPrototype,aO=UG.BUGGY_SAFARI_ITERATORS,sO=vb("iterator"),uO="keys",cO="values",lO="entries",hO=function(){return this},AO=function(e,t,n,r,i,o,a){KG(n,t,r);var s,u,c,l=function(e){if(e===i&&v)return v;if(!aO&&e in d)return d[e];switch(e){case uO:case cO:case lO:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",A=!1,d=e.prototype,f=d[sO]||d["@@iterator"]||i&&d[i],v=!aO&&f||l(i),p="Array"==t&&d.entries||f;if(p&&(s=zG(p.call(new e)))!==Object.prototype&&s.next&&(zG(s)!==oO&&(qG?qG(s,oO):JG(s[sO])||tO(s,sO,hO)),$G(s,h,!0)),rO&&i==cO&&f&&f.name!==cO&&(iO?eO(d,"name",cO):(A=!0,v=function(){return HG(f,this)})),i)if(u={values:l(cO),keys:o?v:l(uO),entries:l(lO)},a)for(c in u)(aO||A||!(c in d))&&tO(d,c,u[c]);else jG({target:t,proto:!0,forced:aO||A},u);return d[sO]!==v&&tO(d,sO,v,{name:i}),nO[t]=v,u},dO=function(e,t){return{value:e,done:t}},fO=aR,vO=sG,pO=lV,mO=uk,yO=yb.f,gO=AO,_O=dO,bO=gb,EO="Array Iterator",kO=mO.set,TO=mO.getterFor(EO),RO=gO(Array,"Array",(function(e,t){kO(this,{type:EO,target:fO(e),index:0,kind:t})}),(function(){var e=TO(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,_O(void 0,!0)):_O("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),SO=pO.Arguments=pO.Array;if(vO("keys"),vO("values"),vO("entries"),bO&&"values"!==SO.name)try{yO(SO,"name",{value:"values"})}catch(g6){}var wO,DO,IO,CO={exports:{}},LO="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,VO=LO,xO=gb,FO=s_,GO=Y_,OO=Eb,ZO=G_,PO=Zk,UO=Yb,NO=YE,BO=Sk,MO=yb.f,WO=Zb,YO=LG,XO=gI,QO=vb,jO=N_,HO=uk.enforce,JO=uk.get,KO=FO.Int8Array,zO=KO&&KO.prototype,qO=FO.Uint8ClampedArray,$O=qO&&qO.prototype,eZ=KO&&YO(KO),tZ=zO&&YO(zO),nZ=Object.prototype,rZ=FO.TypeError,iZ=QO("toStringTag"),oZ=jO("TYPED_ARRAY_TAG"),aZ="TypedArrayConstructor",sZ=VO&&!!XO&&"Opera"!==PO(FO.opera),uZ=!1,cZ={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},lZ={BigInt64Array:8,BigUint64Array:8},hZ=function(e){var t=YO(e);if(OO(t)){var n=JO(t);return n&&ZO(n,aZ)?n[aZ]:hZ(t)}},AZ=function(e){if(!OO(e))return!1;var t=PO(e);return ZO(cZ,t)||ZO(lZ,t)};for(wO in cZ)(IO=(DO=FO[wO])&&DO.prototype)?HO(IO)[aZ]=DO:sZ=!1;for(wO in lZ)(IO=(DO=FO[wO])&&DO.prototype)&&(HO(IO)[aZ]=DO);if((!sZ||!GO(eZ)||eZ===Function.prototype)&&(eZ=function(){throw rZ("Incorrect invocation")},sZ))for(wO in cZ)FO[wO]&&XO(FO[wO],eZ);if((!sZ||!tZ||tZ===nZ)&&(tZ=eZ.prototype,sZ))for(wO in cZ)FO[wO]&&XO(FO[wO].prototype,tZ);if(sZ&&YO($O)!==tZ&&XO($O,tZ),xO&&!ZO(tZ,iZ))for(wO in uZ=!0,MO(tZ,iZ,{get:function(){return OO(this)?this[oZ]:void 0}}),cZ)FO[wO]&&NO(FO[wO],oZ,wO);var dZ={NATIVE_ARRAY_BUFFER_VIEWS:sZ,TYPED_ARRAY_TAG:uZ&&oZ,aTypedArray:function(e){if(AZ(e))return e;throw rZ("Target is not a typed array")},aTypedArrayConstructor:function(e){if(GO(e)&&(!XO||WO(eZ,e)))return e;throw rZ(UO(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(xO){if(n)for(var i in cZ){var o=FO[i];if(o&&ZO(o.prototype,e))try{delete o.prototype[e]}catch(g6){try{o.prototype[e]=t}catch(a){}}}tZ[e]&&!n||BO(tZ,e,n?t:sZ&&zO[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(xO){if(XO){if(n)for(r in cZ)if((i=FO[r])&&ZO(i,e))try{delete i[e]}catch(g6){}if(eZ[e]&&!n)return;try{return BO(eZ,e,n?t:sZ&&eZ[e]||t)}catch(g6){}}for(r in cZ)!(i=FO[r])||i[e]&&!n||BO(i,e,t)}},getTypedArrayConstructor:hZ,isView:function(e){if(!OO(e))return!1;var t=PO(e);return"DataView"===t||ZO(cZ,t)||ZO(lZ,t)},isTypedArray:AZ,TypedArray:eZ,TypedArrayPrototype:tZ},fZ=s_,vZ=g_,pZ=KV,mZ=dZ.NATIVE_ARRAY_BUFFER_VIEWS,yZ=fZ.ArrayBuffer,gZ=fZ.Int8Array,_Z=!mZ||!vZ((function(){gZ(1)}))||!vZ((function(){new gZ(-1)}))||!pZ((function(e){new gZ,new gZ(null),new gZ(1.5),new gZ(e)}),!0)||vZ((function(){return 1!==new gZ(new yZ(2),1,void 0).length})),bZ=Sk,EZ=function(e,t,n){for(var r in t)bZ(e,r,t[r],n);return e},kZ=oT,TZ=uT,RZ=RangeError,SZ=function(e){if(void 0===e)return 0;var t=kZ(e),n=TZ(t);if(t!==n)throw RZ("Wrong length or index");return n},wZ=Array,DZ=Math.abs,IZ=Math.pow,CZ=Math.floor,LZ=Math.log,VZ=Math.LN2,xZ=s_,FZ=R_,GZ=gb,OZ=LO,ZZ=CE,PZ=YE,UZ=EZ,NZ=g_,BZ=LI,MZ=oT,WZ=uT,YZ=SZ,XZ={pack:function(e,t,n){var r,i,o,a=wZ(n),s=8*n-t-1,u=(1<<s)-1,c=u>>1,l=23===t?IZ(2,-24)-IZ(2,-77):0,h=e<0||0===e&&1/e<0?1:0,A=0;for((e=DZ(e))!=e||e===1/0?(i=e!=e?1:0,r=u):(r=CZ(LZ(e)/VZ),e*(o=IZ(2,-r))<1&&(r--,o*=2),(e+=r+c>=1?l/o:l*IZ(2,1-c))*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*IZ(2,t),r+=c):(i=e*IZ(2,c-1)*IZ(2,t),r=0));t>=8;)a[A++]=255&i,i/=256,t-=8;for(r=r<<t|i,s+=t;s>0;)a[A++]=255&r,r/=256,s-=8;return a[--A]|=128*h,a},unpack:function(e,t){var n,r=e.length,i=8*r-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=r-1,c=e[u--],l=127&c;for(c>>=7;s>0;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===o)return n?NaN:c?-1/0:1/0;n+=IZ(2,t),l-=a}return(c?-1:1)*n*IZ(2,l-t)}},QZ=LG,jZ=gI,HZ=pR.f,JZ=yb.f,KZ=tG,zZ=gS,qZ=kI,$Z=ZZ.PROPER,eP=ZZ.CONFIGURABLE,tP=uk.get,nP=uk.set,rP="ArrayBuffer",iP="DataView",oP="prototype",aP="Wrong index",sP=xZ[rP],uP=sP,cP=uP&&uP[oP],lP=xZ[iP],hP=lP&&lP[oP],AP=Object.prototype,dP=xZ.Array,fP=xZ.RangeError,vP=FZ(KZ),pP=FZ([].reverse),mP=XZ.pack,yP=XZ.unpack,gP=function(e){return[255&e]},_P=function(e){return[255&e,e>>8&255]},bP=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},EP=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},kP=function(e){return mP(e,23,4)},TP=function(e){return mP(e,52,8)},RP=function(e,t){JZ(e[oP],t,{get:function(){return tP(this)[t]}})},SP=function(e,t,n,r){var i=YZ(n),o=tP(e);if(i+t>o.byteLength)throw fP(aP);var a=tP(o.buffer).bytes,s=i+o.byteOffset,u=zZ(a,s,s+t);return r?u:pP(u)},wP=function(e,t,n,r,i,o){var a=YZ(n),s=tP(e);if(a+t>s.byteLength)throw fP(aP);for(var u=tP(s.buffer).bytes,c=a+s.byteOffset,l=r(+i),h=0;h<t;h++)u[c+h]=l[o?h:t-h-1]};if(OZ){var DP=$Z&&sP.name!==rP;if(NZ((function(){sP(1)}))&&NZ((function(){new sP(-1)}))&&!NZ((function(){return new sP,new sP(1.5),new sP(NaN),1!=sP.length||DP&&!eP})))DP&&eP&&PZ(sP,"name",rP);else{(uP=function(e){return BZ(this,cP),new sP(YZ(e))})[oP]=cP;for(var IP,CP=HZ(sP),LP=0;CP.length>LP;)(IP=CP[LP++])in uP||PZ(uP,IP,sP[IP]);cP.constructor=uP}jZ&&QZ(hP)!==AP&&jZ(hP,AP);var VP=new lP(new uP(2)),xP=FZ(hP.setInt8);VP.setInt8(0,2147483648),VP.setInt8(1,2147483649),!VP.getInt8(0)&&VP.getInt8(1)||UZ(hP,{setInt8:function(e,t){xP(this,e,t<<24>>24)},setUint8:function(e,t){xP(this,e,t<<24>>24)}},{unsafe:!0})}else cP=(uP=function(e){BZ(this,cP);var t=YZ(e);nP(this,{bytes:vP(dP(t),0),byteLength:t}),GZ||(this.byteLength=t)})[oP],hP=(lP=function(e,t,n){BZ(this,hP),BZ(e,cP);var r=tP(e).byteLength,i=MZ(t);if(i<0||i>r)throw fP("Wrong offset");if(i+(n=void 0===n?r-i:WZ(n))>r)throw fP("Wrong length");nP(this,{buffer:e,byteLength:n,byteOffset:i}),GZ||(this.buffer=e,this.byteLength=n,this.byteOffset=i)})[oP],GZ&&(RP(uP,"byteLength"),RP(lP,"buffer"),RP(lP,"byteLength"),RP(lP,"byteOffset")),UZ(hP,{getInt8:function(e){return SP(this,1,e)[0]<<24>>24},getUint8:function(e){return SP(this,1,e)[0]},getInt16:function(e){var t=SP(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=SP(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return EP(SP(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return EP(SP(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return yP(SP(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return yP(SP(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){wP(this,1,e,gP,t)},setUint8:function(e,t){wP(this,1,e,gP,t)},setInt16:function(e,t){wP(this,2,e,_P,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){wP(this,2,e,_P,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){wP(this,4,e,bP,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){wP(this,4,e,bP,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){wP(this,4,e,kP,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){wP(this,8,e,TP,t,arguments.length>2?arguments[2]:void 0)}});qZ(uP,rP),qZ(lP,iP);var FP={ArrayBuffer:uP,DataView:lP},GP=Eb,OP=Math.floor,ZP=Number.isInteger||function(e){return!GP(e)&&isFinite(e)&&OP(e)===e},PP=oT,UP=RangeError,NP=function(e){var t=PP(e);if(t<0)throw UP("The argument can't be less than 0");return t},BP=RangeError,MP=function(e,t){var n=NP(e);if(n%t)throw BP("Wrong offset");return n},WP=Zk,YP=R_("".slice),XP=cE,QP=TypeError,jP=function(e){var t=XP(e,"number");if("number"==typeof t)throw QP("Can't convert number to bigint");return BigInt(t)},HP=Kk,JP=Ob,KP=GI,zP=V_,qP=lT,$P=wV,eU=_V,tU=fV,nU=function(e){return"Big"===YP(WP(e),0,3)},rU=dZ.aTypedArrayConstructor,iU=jP,oU=uS,aU=s_,sU=Ob,uU=gb,cU=_Z,lU=dZ,hU=FP,AU=LI,dU=BE,fU=YE,vU=ZP,pU=uT,mU=SZ,yU=MP,gU=AE,_U=G_,bU=Zk,EU=Eb,kU=Mb,TU=Aw,RU=Zb,SU=gI,wU=pR.f,DU=function(e){var t,n,r,i,o,a,s,u,c=KP(this),l=zP(e),h=arguments.length,A=h>1?arguments[1]:void 0,d=void 0!==A,f=eU(l);if(f&&!tU(f))for(u=(s=$P(l,f)).next,l=[];!(a=JP(u,s)).done;)l.push(a.value);for(d&&h>2&&(A=HP(A,arguments[2])),n=qP(l),r=new(rU(c))(n),i=nU(r),t=0;n>t;t++)o=d?A(l[t],t):l[t],r[t]=i?iU(o):+o;return r},IU=BT.forEach,CU=DI,LU=yb,VU=$T,xU=nF,FU=uk.get,GU=uk.set,OU=uk.enforce,ZU=LU.f,PU=VU.f,UU=Math.round,NU=aU.RangeError,BU=hU.ArrayBuffer,MU=BU.prototype,WU=hU.DataView,YU=lU.NATIVE_ARRAY_BUFFER_VIEWS,XU=lU.TYPED_ARRAY_TAG,QU=lU.TypedArray,jU=lU.TypedArrayPrototype,HU=lU.aTypedArrayConstructor,JU=lU.isTypedArray,KU="BYTES_PER_ELEMENT",zU="Wrong length",qU=function(e,t){HU(e);for(var n=0,r=t.length,i=new e(r);r>n;)i[n]=t[n++];return i},$U=function(e,t){ZU(e,t,{get:function(){return FU(this)[t]}})},eN=function(e){var t;return RU(MU,e)||"ArrayBuffer"==(t=bU(e))||"SharedArrayBuffer"==t},tN=function(e,t){return JU(e)&&!kU(t)&&t in e&&vU(+t)&&t>=0},nN=function(e,t){return t=gU(t),tN(e,t)?dU(2,e[t]):PU(e,t)},rN=function(e,t,n){return t=gU(t),!(tN(e,t)&&EU(n)&&_U(n,"value"))||_U(n,"get")||_U(n,"set")||n.configurable||_U(n,"writable")&&!n.writable||_U(n,"enumerable")&&!n.enumerable?ZU(e,t,n):(e[t]=n.value,e)};uU?(YU||(VU.f=nN,LU.f=rN,$U(jU,"buffer"),$U(jU,"byteOffset"),$U(jU,"byteLength"),$U(jU,"length")),oU({target:"Object",stat:!0,forced:!YU},{getOwnPropertyDescriptor:nN,defineProperty:rN}),CO.exports=function(e,t,n){var r=e.match(/\d+$/)[0]/8,i=e+(n?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=aU[i],u=s,c=u&&u.prototype,l={},h=function(e,t){ZU(e,t,{get:function(){return function(e,t){var n=FU(e);return n.view[o](t*r+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,i){var o=FU(e);n&&(i=(i=UU(i))<0?0:i>255?255:255&i),o.view[a](t*r+o.byteOffset,i,!0)}(this,t,e)},enumerable:!0})};YU?cU&&(u=t((function(e,t,n,i){return AU(e,c),xU(EU(t)?eN(t)?void 0!==i?new s(t,yU(n,r),i):void 0!==n?new s(t,yU(n,r)):new s(t):JU(t)?qU(u,t):sU(DU,u,t):new s(mU(t)),e,u)})),SU&&SU(u,QU),IU(wU(s),(function(e){e in u||fU(u,e,s[e])})),u.prototype=c):(u=t((function(e,t,n,i){AU(e,c);var o,a,s,l=0,A=0;if(EU(t)){if(!eN(t))return JU(t)?qU(u,t):sU(DU,u,t);o=t,A=yU(n,r);var d=t.byteLength;if(void 0===i){if(d%r)throw NU(zU);if((a=d-A)<0)throw NU(zU)}else if((a=pU(i)*r)+A>d)throw NU(zU);s=a/r}else s=mU(t),o=new BU(a=s*r);for(GU(e,{buffer:o,byteOffset:A,byteLength:a,length:s,view:new WU(o)});l<s;)h(e,l++)})),SU&&SU(u,QU),c=u.prototype=TU(jU)),c.constructor!==u&&fU(c,"constructor",u),OU(c).TypedArrayConstructor=u,XU&&fU(c,XU,i);var A=u!=s;l[i]=u,oU({global:!0,constructor:!0,forced:A,sham:!YU},l),KU in u||fU(u,KU,r),KU in c||fU(c,KU,r),CU(i)}):CO.exports=function(){};var iN=CO.exports;iN("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var oN=lT,aN=oT,sN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("at",(function(e){var t=sN(this),n=oN(t),r=aN(e),i=r>=0?r:n+r;return i<0||i>=n?void 0:t[i]}));var uN=Yb,cN=TypeError,lN=function(e,t){if(!delete e[t])throw cN("Cannot delete property "+uN(t)+" of "+uN(e))},hN=V_,AN=_R,dN=lT,fN=lN,vN=Math.min,pN=[].copyWithin||function(e,t){var n=hN(this),r=dN(n),i=AN(e,r),o=AN(t,r),a=arguments.length>2?arguments[2]:void 0,s=vN((void 0===a?r:AN(a,r))-o,r-i),u=1;for(o<i&&i<o+s&&(u=-1,o+=s-1,i+=s-1);s-- >0;)o in n?n[i]=n[o]:fN(n,i),i+=u,o+=u;return n},mN=dZ,yN=R_(pN),gN=mN.aTypedArray;(0,mN.exportTypedArrayMethod)("copyWithin",(function(e,t){return yN(gN(this),e,t,arguments.length>2?arguments[2]:void 0)}));var _N=BT.every,bN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("every",(function(e){return _N(bN(this),e,arguments.length>1?arguments[1]:void 0)}));var EN=tG,kN=jP,TN=Zk,RN=Ob,SN=g_,wN=dZ.aTypedArray,DN=dZ.exportTypedArrayMethod,IN=R_("".slice);DN("fill",(function(e){var t=arguments.length;wN(this);var n="Big"===IN(TN(this),0,3)?kN(e):+e;return RN(EN,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),SN((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var CN=lT,LN=NI,VN=dZ.aTypedArrayConstructor,xN=dZ.getTypedArrayConstructor,FN=function(e){return VN(LN(e,xN(e)))},GN=function(e,t){for(var n=0,r=CN(t),i=new e(r);r>n;)i[n]=t[n++];return i},ON=FN,ZN=BT.filter,PN=function(e,t){return GN(ON(e),t)},UN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("filter",(function(e){var t=ZN(UN(this),e,arguments.length>1?arguments[1]:void 0);return PN(this,t)}));var NN=BT.find,BN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("find",(function(e){return NN(BN(this),e,arguments.length>1?arguments[1]:void 0)}));var MN=BT.findIndex,WN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("findIndex",(function(e){return MN(WN(this),e,arguments.length>1?arguments[1]:void 0)}));var YN=Kk,XN=tT,QN=V_,jN=lT,HN=function(e){var t=1==e;return function(n,r,i){for(var o,a=QN(n),s=XN(a),u=YN(r,i),c=jN(s);c-- >0;)if(u(o=s[c],c,a))switch(e){case 0:return o;case 1:return c}return t?-1:void 0}},JN={findLast:HN(0),findLastIndex:HN(1)},KN=JN.findLast,zN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("findLast",(function(e){return KN(zN(this),e,arguments.length>1?arguments[1]:void 0)}));var qN=JN.findLastIndex,$N=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("findLastIndex",(function(e){return qN($N(this),e,arguments.length>1?arguments[1]:void 0)}));var eB=BT.forEach,tB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("forEach",(function(e){eB(tB(this),e,arguments.length>1?arguments[1]:void 0)}));var nB=RR.includes,rB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("includes",(function(e){return nB(rB(this),e,arguments.length>1?arguments[1]:void 0)}));var iB=RR.indexOf,oB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("indexOf",(function(e){return iB(oB(this),e,arguments.length>1?arguments[1]:void 0)}));var aB=s_,sB=g_,uB=R_,cB=dZ,lB=RO,hB=vb("iterator"),AB=aB.Uint8Array,dB=uB(lB.values),fB=uB(lB.keys),vB=uB(lB.entries),pB=cB.aTypedArray,mB=cB.exportTypedArrayMethod,yB=AB&&AB.prototype,gB=!sB((function(){yB[hB].call([1])})),_B=!!yB&&yB.values&&yB[hB]===yB.values&&"values"===yB.values.name,bB=function(){return dB(pB(this))};mB("entries",(function(){return vB(pB(this))}),gB),mB("keys",(function(){return fB(pB(this))}),gB),mB("values",bB,gB||!_B,{name:"values"}),mB(hB,bB,gB||!_B,{name:"values"});var EB=dZ.aTypedArray,kB=dZ.exportTypedArrayMethod,TB=R_([].join);kB("join",(function(e){return TB(EB(this),e)}));var RB=qw,SB=aR,wB=oT,DB=lT,IB=WT,CB=Math.min,LB=[].lastIndexOf,VB=!!LB&&1/[1].lastIndexOf(1,-0)<0,xB=IB("lastIndexOf"),FB=VB||!xB?function(e){if(VB)return RB(LB,this,arguments)||0;var t=SB(this),n=DB(t),r=n-1;for(arguments.length>1&&(r=CB(r,wB(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:LB,GB=qw,OB=FB,ZB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return GB(OB,ZB(this),t>1?[e,arguments[1]]:[e])}));var PB=BT.map,UB=FN,NB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("map",(function(e){return PB(NB(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(UB(e))(t)}))}));var BB=Hb,MB=V_,WB=tT,YB=lT,XB=TypeError,QB=function(e){return function(t,n,r,i){BB(n);var o=MB(t),a=WB(o),s=YB(o),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw XB("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in a&&(i=n(i,a[u],u,o));return i}},jB={left:QB(!1),right:QB(!0)},HB=jB.left,JB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return HB(JB(this),e,t,t>1?arguments[1]:void 0)}));var KB=jB.right,zB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return KB(zB(this),e,t,t>1?arguments[1]:void 0)}));var qB=dZ.aTypedArray,$B=dZ.exportTypedArrayMethod,eM=Math.floor;$B("reverse",(function(){for(var e,t=this,n=qB(t).length,r=eM(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t}));var tM=s_,nM=Ob,rM=dZ,iM=lT,oM=MP,aM=V_,sM=g_,uM=tM.RangeError,cM=tM.Int8Array,lM=cM&&cM.prototype,hM=lM&&lM.set,AM=rM.aTypedArray,dM=rM.exportTypedArrayMethod,fM=!sM((function(){var e=new Uint8ClampedArray(2);return nM(hM,e,{length:1,0:3},1),3!==e[1]})),vM=fM&&rM.NATIVE_ARRAY_BUFFER_VIEWS&&sM((function(){var e=new cM(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));dM("set",(function(e){AM(this);var t=oM(arguments.length>1?arguments[1]:void 0,1),n=aM(e);if(fM)return nM(hM,this,n,t);var r=this.length,i=iM(n),o=0;if(i+t>r)throw uM("Wrong length");for(;o<i;)this[t+o]=n[o++]}),!fM||vM);var pM=FN,mM=BI,yM=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("slice",(function(e,t){for(var n=mM(yM(this),e,t),r=pM(this),i=0,o=n.length,a=new r(o);o>i;)a[i]=n[i++];return a}),g_((function(){new Int8Array(1).slice()})));var gM=BT.some,_M=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("some",(function(e){return gM(_M(this),e,arguments.length>1?arguments[1]:void 0)}));var bM=gS,EM=Math.floor,kM=function(e,t){var n=e.length,r=EM(n/2);return n<8?TM(e,t):RM(e,kM(bM(e,0,r),t),kM(bM(e,r),t),t)},TM=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},RM=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},SM=kM,wM=H_.match(/firefox\/(\d+)/i),DM=!!wM&&+wM[1],IM=/MSIE|Trident/.test(H_),CM=H_.match(/AppleWebKit\/(\d+)\./),LM=!!CM&&+CM[1],VM=Qk,xM=g_,FM=Hb,GM=SM,OM=DM,ZM=IM,PM=tb,UM=LM,NM=dZ.aTypedArray,BM=dZ.exportTypedArrayMethod,MM=s_.Uint16Array,WM=MM&&VM(MM.prototype.sort),YM=!(!WM||xM((function(){WM(new MM(2),null)}))&&xM((function(){WM(new MM(2),{})}))),XM=!!WM&&!xM((function(){if(PM)return PM<74;if(OM)return OM<67;if(ZM)return!0;if(UM)return UM<602;var e,t,n=new MM(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(WM(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));BM("sort",(function(e){return void 0!==e&&FM(e),XM?WM(this,e):GM(NM(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!XM||YM);var QM=uT,jM=_R,HM=FN,JM=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("subarray",(function(e,t){var n=JM(this),r=n.length,i=jM(e,r);return new(HM(n))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,QM((void 0===t?r:jM(t,r))-i))}));var KM=qw,zM=dZ,qM=g_,$M=BI,eW=s_.Int8Array,tW=zM.aTypedArray,nW=zM.exportTypedArrayMethod,rW=[].toLocaleString,iW=!!eW&&qM((function(){rW.call(new eW(1))}));nW("toLocaleString",(function(){return KM(rW,iW?$M(tW(this)):tW(this),$M(arguments))}),qM((function(){return[1,2].toLocaleString()!=new eW([1,2]).toLocaleString()}))||!qM((function(){eW.prototype.toLocaleString.call([1,2])})));var oW=dZ.exportTypedArrayMethod,aW=g_,sW=R_,uW=s_.Uint8Array,cW=uW&&uW.prototype||{},lW=[].toString,hW=sW([].join);aW((function(){lW.call({})}))&&(lW=function(){return hW(this)});var AW=cW.toString!=lW;oW("toString",lW,AW);var dW=new(function(){function e(){var t,n=this;_y(this,e);try{var r=/xgd=(\d)/.exec(document.cookie);this._status=!!r,this._level=r&&r[1]}catch(i){this._status=!1}ql(t=["group","groupEnd","log","warn","error"]).call(t,(function(e){n[e]=function(t,r,i,o,a,s,u,c,l,h){var A,d,f;if(n._status){var v=t,p=Ll(A=[r,i,o,a,s,u,c,l,h]).call(A,(function(e){return void 0!==e}));(f=console)[e].apply(f,Ag(d=["["+v+"]:"]).call(d,Ly(p)))}}}))}return Ey(e,[{key:"enable",get:function(){return this._status}},{key:"long",get:function(){return"2"===this._level}}]),e}());function fW(e,t){if(e&&t){var n=new Uint8Array(e.byteLength+t.byteLength+11);n[0]=1,n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=255,n[5]=225;var r=6;return n.set(new Uint8Array([e.byteLength>>>8&255,255&e.byteLength]),r),r+=2,n.set(e,r),n[r+=e.byteLength]=1,r++,n.set(new Uint8Array([t.byteLength>>>8&255,255&t.byteLength]),r),r+=2,n.set(t,r),n}}var vW=D,pW=v,mW=L,yW=i,gW=Ai,_W=$i,bW=V,EW=He,kW=W,TW=Object.assign,RW=Object.defineProperty,SW=pW([].concat),wW=!TW||yW((function(){if(vW&&1!==TW({b:1},TW(RW({},"a",{enumerable:!0,get:function(){RW(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=TW({},e)[n]||gW(TW({},t)).join("")!=r}))?function(e,t){for(var n=EW(e),r=arguments.length,i=1,o=_W.f,a=bW.f;r>i;)for(var s,u=kW(arguments[i++]),c=o?SW(gW(u),o(u)):gW(u),l=c.length,h=0;l>h;)s=c[h++],vW&&!mW(a,u,s)||(n[s]=u[s]);return n}:TW,DW=wW;Dn({target:"Object",stat:!0,arity:2,forced:Object.assign!==DW},{assign:DW});var IW=t(ee.Object.assign),CW=gb,LW=R_,VW=Ob,xW=g_,FW=MS,GW=GR,OW=eR,ZW=V_,PW=tT,UW=Object.assign,NW=Object.defineProperty,BW=LW([].concat),MW=!UW||xW((function(){if(CW&&1!==UW({b:1},UW(NW({},"a",{enumerable:!0,get:function(){NW(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=UW({},e)[n]||FW(UW({},t)).join("")!=r}))?function(e,t){for(var n=ZW(e),r=arguments.length,i=1,o=GW.f,a=OW.f;r>i;)for(var s,u=PW(arguments[i++]),c=o?BW(FW(u),o(u)):FW(u),l=c.length,h=0;l>h;)s=c[h++],CW&&!VW(a,u,s)||(n[s]=u[s]);return n}:UW,WW=MW;uS({target:"Object",stat:!0,arity:2,forced:Object.assign!==WW},{assign:WW});var YW="xg-video",XW=!1;try{XW=WebAssembly&&WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))}catch(_6){}var QW={preloadDecoder:!1,reuseWasmDecoder:!0,reuseMseForAudio:!1,preciseSeek:0,h264WithWebcodec:!0,lowDecodeThreshold:100,wasmFallbackToAsm:!1,audioWithMse:!0,canUseThreadMode:!1,disabledWhenErrorOccur:!0,disabledDuration:43200,evaluateVVCount:0,disabledByLowdecodePrecent:.5,maxDecodeOnceWasm:XW?6:8,maxDecodeOnceFirstTime:8,maxDecodeOnceWebcodec:20};function jW(){return YW}function HW(){return QW}function JW(){var e="undefined"!=typeof customElements&&customElements.get(YW);return e?{H264_DECODER_URL:e.h264Url,ASM_H264_DECODER_URL:e.h264AsmUrl,H265_DECODER_URL:e.h265Url,H265_THREAD_DECODER_URL:e.h265ThreadUrl,H265_SIMD_DECODER_URL:e.h265SimdUrl,ASM_H265_DECODER_URL:e.h265AsmUrl}:{}}function KW(){if("undefined"==typeof customElements)return!1;var e=customElements.get(YW);return XW&&!(null==e||!e.h265SimdUrl)}function zW(){if("undefined"==typeof customElements)return!1;var e=customElements.get(YW);return!!window.SharedArrayBuffer&&!(null==e||!e.h265ThreadUrl)}var qW=!1;try{var $W,eY;qW="1"===(null===($W=localStorage)||void 0===$W||null===(eY=$W.getItem)||void 0===eY?void 0:eY.call($W,"_sds"))}catch(_6){}var tY=0,nY=0,rY=0,iY=!1;function oY(e){localStorage.setItem("xgv_dis",e),2===e&&localStorage.setItem("xgv_dist",(new Date).getTime())}function aY(){if(!0===(!!iY||0!==HW().evaluateVVCount&&(tY===HW().evaluateVVCount&&(rY=nY/tY),rY>=HW().disabledByLowdecodePrecent&&(iY=!0),iY)))return!0;var e=localStorage.getItem("xgv_dis");if(!e)return!1;if("1"===e)return!0;if("2"===e){var t=localStorage.getItem("xgv_dist")||0;if(t=Number(t),((new Date).getTime()-t)/1e3<HW().disabledDuration)return!0;sY()}}function sY(){localStorage.removeItem("xgv_dist"),localStorage.removeItem("xgv_dis")}var uY={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),u=n?n+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 a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Sh&&(r.prototype=Sh(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?lm(r).call(r,1):r);return kl?Ag(i).call(i,kl(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){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,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,a),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var A,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),h){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,r);break;case 4:l[c].fn.call(l[c].context,t,r,i);break;default:if(!u)for(A=1,u=new Array(h-1);A<h;A++)u[A-1]=arguments[A];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(uY);var cY=t(uY.exports),lY=r.isFinite;Dn({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&lY(e)}});var hY=t(ee.Number.isFinite),AY=Ce,dY=He,fY=W,vY=Pn,pY=TypeError,mY=function(e){return function(t,n,r,i){AY(n);var o=dY(t),a=fY(o),s=vY(o),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw pY("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in a&&(i=n(i,a[u],u,o));return i}},yY={left:mY(!1),right:mY(!0)}.left;Dn({target:"Array",proto:!0,forced:!qA&&fe>79&&fe<83||!Ml("reduce")},{reduce:function(e){var t=arguments.length;return yY(this,e,t,t>1?arguments[1]:void 0)}});var gY=Sl("Array").reduce,_Y=ae,bY=gY,EY=Array.prototype,kY=t((function(e){var t=e.reduce;return e===EY||_Y(EY,e)&&t===EY.reduce?bY:t})),TY=s_.isFinite;uS({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&TY(e)}});var RY=uS,SY=AT,wY=ST,DY=Eb,IY=_R,CY=lT,LY=aR,VY=dS,xY=vb,FY=BI,GY=aI("slice"),OY=xY("species"),ZY=Array,PY=Math.max;RY({target:"Array",proto:!0,forced:!GY},{slice:function(e,t){var n,r,i,o=LY(this),a=CY(o),s=IY(e,a),u=IY(void 0===t?a:t,a);if(SY(o)&&(n=o.constructor,(wY(n)&&(n===ZY||SY(n.prototype))||DY(n)&&null===(n=n[OY]))&&(n=void 0),n===ZY||void 0===n))return FY(o,s,u);for(r=new(void 0===n?ZY:n)(PY(u-s,0)),i=0;s<u;s++,i++)s in o&&VY(r,i,o[s]);return r.length=i,r}});var UY={WAITING:0,CANPLAY:1,PLAY:2,PLAYING:3,PAUSE:4,SEEKING:5,SEEKED:6,LOADEDDATA:7,LOADEDMETADATA:8,TIMEUPDATE:9,DURATION_CHANGE:10,VOLUME_CHANGE:11,PROGRESS:12,ERROR:13,ENDED:14,RESIZE:15,LOADSTART:16,DECODE_FPS:17,LOW_DECODE:18,LARGE_AV_GAP:19,FIRST_FRAME:20},NY=["waiting","canplay","play","playing","pause","seeking","seeked","loadeddata","loadedmetadata","timeupdate","durationchange","volumechange","progress","error","ended","resize","loadstart","decodefps","lowdecode","largeavgap","firstframe"],BY={AUDIO_READY:"audio_ready",AUDIO_NOT_ALLOWED_AUTOPLAY:"audio_not_allowed_autoplay",AUDIO_WAITING:"audio_waiting",AUDIO_SYNC_DTS:"audio_sync_dts"},MY={VIDEO_DECODER_INIT:"video_decode_init",VIDEO_READY:"video_ready",VIDEO_WAITING:"video_waiting",AUTO_RUN:"auto_run",DECODE_LOW_FPS:"decode_low_fps",UPDATE_VIDEO_FILLTYPE:"update_video_filltype",UPDATE_VIDEO_COVER_POSITION:"update_video_cover_position"},WY={PLAY_EVENT:"play_event",SET_METADATA:"set_metadata",APPEND_CHUNKS:"append_chunks",START_RENDER:"start_render",DO_PLAY:"do_play",DO_PAUSE:"do_pause",DO_SEEK:"do_seek",SET_PLAYBACKRATE:"set_playbackrate",SYNC_DTS:"sync_dts",RESET_BASE_DTS:"reset_base_dts",UPDATE_VOLUME:"update_volume",SINGLE_TRACK:"single_track",DESTROY:"destroy",READY:"ready",UPDATE_GL_OPTIONS:"update_gl_options",SET_VIDEO_DURATION:"set_video_duration",SET_PLAY_MODE:"set_play_mode",UPDATE_CAPABILITY_LEVEL:"update_capability_level",INNER_DEGRADE:"inner_degrade",ADJUST_SEEK_TIME:"adjust_seek_time",CHASE_FRAME:"chase_frame",END_OF_STREAM:"end_of_stream",UPDATE_SEGMENT_END:"update_segment_end"},YY={INIT:"init",READY:"decoderready",REMUX:"remux",INIT_FAILED:"initfailed",DATAREADY:"dataReady",PLAY_FAILED:"playfailed",FRAGMENT_END:"fragmentEnd",APPEND_VIDEO:"appendVideo",FIRST_FRAME:"firstFrame",DECODED:"decoded",RENDE_END:"rendeEnd",CHASE_VIDEO_FRAME:"chaseVideoFrame",CHASE_VIDEO_FRAME_END:"chaseVideoFrameEnd",CHASE_AUDIO_FRAME:"chaseAudioFrame",INIT_SEGMENT:"initSegment",MEDIA_SEGMENT:"mediaSegment",FRAME_MAX_COUNY:"frameMaxCount",FRAME_MIN_COUNY:"frameMinCount"},XY=function(e){Ty(n,e);var t=Dy(n);function n(e,r){var i;return _y(this,n),(i=t.call(this))._config=e,i._parent=r,i._meta=null,i._ready=!1,i._isLive=!0,i._innerDegrade=!1,i._singleTrack=-1,i}return Ey(n,[{key:"analyse",get:function(){return this._parent.analyse}},{key:"isLive",get:function(){return this._isLive}},{key:"innerDegrade",get:function(){return this._innerDegrade}},{key:"noAudio",get:function(){return 1===this._singleTrack||2===this._singleTrack}},{key:"noVideo",get:function(){return 3===this._singleTrack}},{key:"duration",get:function(){return this._timeRange.duration},set:function(e){this._timeRange&&(this._timeRange.duration=e)}},{key:"_bindEvents",value:function(){var e,t,n,r,i,o,a,s,u=this;this._parent.on(WY.APPEND_CHUNKS,wm(e=this._appendChunk).call(e,this)),this._parent.on(WY.RESET_BASE_DTS,wm(t=this._resetDts).call(t,this)),this._parent.on(WY.START_RENDER,wm(n=this._startRender).call(n,this)),this._parent.on(WY.DO_PLAY,wm(r=this._doPlay).call(r,this)),this._parent.on(WY.DO_PAUSE,wm(i=this._doPause).call(i,this)),this._parent.on(WY.DO_SEEK,wm(o=this._doSeek).call(o,this)),this._parent.on(WY.DESTROY,wm(a=this._destroy).call(a,this)),this._parent.on(WY.CHASE_FRAME,wm(s=this._doChaseFrame).call(s,this)),this._parent.on(WY.SINGLE_TRACK,(function(e){u._singleTrack=e})),this._parent.on(WY.SET_PLAY_MODE,(function(e){u._isLive="LIVE"===e})),this._parent.on(WY.INNER_DEGRADE,(function(){u._innerDegrade=!0})),this._parent.on(WY.SET_VIDEO_DURATION,(function(e){u.duration=e}))}}]),n}(cY),QY=Se,jY=TypeError,HY=function(e,t){if(!delete e[t])throw jY("Cannot delete property "+QY(t)+" of "+QY(e))},JY=ji,KY=Math.floor,zY=function(e,t){var n=e.length,r=KY(n/2);return n<8?qY(e,t):$Y(e,zY(JY(e,0,r),t),zY(JY(e,r),t),t)},qY=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},$Y=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},eX=zY,tX=se.match(/firefox\/(\d+)/i),nX=!!tX&&+tX[1],rX=/MSIE|Trident/.test(se),iX=se.match(/AppleWebKit\/(\d+)\./),oX=!!iX&&+iX[1],aX=Dn,sX=v,uX=Ce,cX=He,lX=Pn,hX=HY,AX=Xr,dX=i,fX=eX,vX=Ml,pX=nX,mX=rX,yX=fe,gX=oX,_X=[],bX=sX(_X.sort),EX=sX(_X.push),kX=dX((function(){_X.sort(void 0)})),TX=dX((function(){_X.sort(null)})),RX=vX("sort"),SX=!dX((function(){if(yX)return yX<70;if(!(pX&&pX>3)){if(mX)return!0;if(gX)return gX<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)_X.push({k:t+r,v:n})}for(_X.sort((function(e,t){return t.v-e.v})),r=0;r<_X.length;r++)t=_X[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));aX({target:"Array",proto:!0,forced:kX||!TX||!RX||!SX},{sort:function(e){void 0!==e&&uX(e);var t=cX(this);if(SX)return void 0===e?bX(t):bX(t,e);var n,r,i=[],o=lX(t);for(r=0;r<o;r++)r in t&&EX(i,t[r]);for(fX(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:AX(t)>AX(n)?1:-1}}(e)),n=lX(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)hX(t,r++);return t}});var wX=Sl("Array").sort,DX=ae,IX=wX,CX=Array.prototype,LX=t((function(e){var t=e.sort;return e===CX||DX(CX,e)&&t===CX.sort?IX:t})),VX=uS,xX=R_,FX=Hb,GX=V_,OX=lT,ZX=lN,PX=CS,UX=g_,NX=SM,BX=WT,MX=DM,WX=IM,YX=tb,XX=LM,QX=[],jX=xX(QX.sort),HX=xX(QX.push),JX=UX((function(){QX.sort(void 0)})),KX=UX((function(){QX.sort(null)})),zX=BX("sort"),qX=!UX((function(){if(YX)return YX<70;if(!(MX&&MX>3)){if(WX)return!0;if(XX)return XX<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)QX.push({k:t+r,v:n})}for(QX.sort((function(e,t){return t.v-e.v})),r=0;r<QX.length;r++)t=QX[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));VX({target:"Array",proto:!0,forced:JX||!KX||!zX||!qX},{sort:function(e){void 0!==e&&FX(e);var t=GX(this);if(qX)return void 0===e?jX(t):jX(t,e);var n,r,i=[],o=OX(t);for(r=0;r<o;r++)r in t&&HX(i,t[r]);for(NX(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:PX(t)>PX(n)?1:-1}}(e)),n=OX(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)ZX(t,r++);return t}});var $X=function(){function e(t){_y(this,e),this.TAG="AudioTimeRange",this._parent=t,this._buffers=[],this._duration=0,this._baseDts=0,this._lastBuffer=null}return Ey(e,[{key:"isLive",get:function(){return this._parent.isLive}},{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e}},{key:"buffered",get:function(){var e=this;if(this.isLive)return{length:this._duration?1:0,start:function(){return 0},end:function(){return e._duration}};var t=this._mergeBufferRanges();return{length:t.length,start:function(e){var n=t[e];return n?n.start:0},end:function(e){var n=t[e];return n?n.end:1/0}}}},{key:"resetDts",value:function(e){this._baseDts=e}},{key:"_transitionSamples",value:function(e){for(var t=e.numberOfChannels,n=e.length,r=512,i=0;i<t;i++){for(var o=e.getChannelData(i),a=0;a<r;a++)o[a]=o[a]*a/r;for(var s=n-r;s<n;s++)o[s]=o[s]*(n-s)/r}}},{key:"append",value:function(e,t,n,r){var i,o,a;-1===this._baseDts&&(this._baseDts=n),this._transitionSamples(e);var s=(n-this._baseDts)/1e3,u=s+t,c={start:s,end:u,startDts:n,source:e,duration:t,delay:r};if(dW.log(this.TAG,Ag(i=Ag(o="add new buffer range, startDts:".concat(n,", [")).call(o,c.start," , ")).call(i,c.end,"]")),!Ll(a=this._buffers).call(a,(function(e){return e.start===s})).length)return this._buffers.push(c),this.isLive&&(this._duration=u),c.start;console.error("音频重复")}},{key:"deletePassed",value:function(e){var t;return this._buffers=Ll(t=this._buffers).call(t,(function(t){return t.start>=e})),this._buffers[0]}},{key:"canSeek",value:function(e){var t=this._buffers[this._buffers.length-1];return!!t&&!(t.start<e)}},{key:"_mergeBufferRanges",value:function(){var e,t,n=LX(e=lm(t=this._buffers).call(t)).call(e,(function(e,t){return e.start>t.start?1:-1})),r=n.length,i=[];if(!r)return i;for(var o={start:n[0].start,end:n[0].end},a=1;a<r;a++){var s=n[a];Math.abs(o.end-s.start)<.5?o.end=s.end:(i.push(o),o={start:s.start,end:s.end})}return i.push(o),i}},{key:"getBuffer",value:function(e){var t,n,r;if(this.isLive)return this._buffers.shift();var i=Ll(t=this._buffers).call(t,(function(t){return t.start<e+.5&&t.end>e+.5}))[0];return dW.log(this.TAG,Ag(n=Ag(r="get audio buffer , currentTime:".concat(e," ,buffer:[")).call(r,i&&i.start," , ")).call(n,i&&i.end,"]")),0!==e||i?i:this._buffers[0]}},{key:"hasBuffer",value:function(){var e;return!(null===(e=this._buffers)||void 0===e||!e.length)}}]),e}(),eQ=[-5504,-5248,-6016,-5760,-4480,-4224,-4992,-4736,-7552,-7296,-8064,-7808,-6528,-6272,-7040,-6784,-2752,-2624,-3008,-2880,-2240,-2112,-2496,-2368,-3776,-3648,-4032,-3904,-3264,-3136,-3520,-3392,-22016,-20992,-24064,-23040,-17920,-16896,-19968,-18944,-30208,-29184,-32256,-31232,-26112,-25088,-28160,-27136,-11008,-10496,-12032,-11520,-8960,-8448,-9984,-9472,-15104,-14592,-16128,-15616,-13056,-12544,-14080,-13568,-344,-328,-376,-360,-280,-264,-312,-296,-472,-456,-504,-488,-408,-392,-440,-424,-88,-72,-120,-104,-24,-8,-56,-40,-216,-200,-248,-232,-152,-136,-184,-168,-1376,-1312,-1504,-1440,-1120,-1056,-1248,-1184,-1888,-1824,-2016,-1952,-1632,-1568,-1760,-1696,-688,-656,-752,-720,-560,-528,-624,-592,-944,-912,-1008,-976,-816,-784,-880,-848,5504,5248,6016,5760,4480,4224,4992,4736,7552,7296,8064,7808,6528,6272,7040,6784,2752,2624,3008,2880,2240,2112,2496,2368,3776,3648,4032,3904,3264,3136,3520,3392,22016,20992,24064,23040,17920,16896,19968,18944,30208,29184,32256,31232,26112,25088,28160,27136,11008,10496,12032,11520,8960,8448,9984,9472,15104,14592,16128,15616,13056,12544,14080,13568,344,328,376,360,280,264,312,296,472,456,504,488,408,392,440,424,88,72,120,104,24,8,56,40,216,200,248,232,152,136,184,168,1376,1312,1504,1440,1120,1056,1248,1184,1888,1824,2016,1952,1632,1568,1760,1696,688,656,752,720,560,528,624,592,944,912,1008,976,816,784,880,848],tQ=[-32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956,-23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764,-15996,-15484,-14972,-14460,-13948,-13436,-12924,-12412,-11900,-11388,-10876,-10364,-9852,-9340,-8828,-8316,-7932,-7676,-7420,-7164,-6908,-6652,-6396,-6140,-5884,-5628,-5372,-5116,-4860,-4604,-4348,-4092,-3900,-3772,-3644,-3516,-3388,-3260,-3132,-3004,-2876,-2748,-2620,-2492,-2364,-2236,-2108,-1980,-1884,-1820,-1756,-1692,-1628,-1564,-1500,-1436,-1372,-1308,-1244,-1180,-1116,-1052,-988,-924,-876,-844,-812,-780,-748,-716,-684,-652,-620,-588,-556,-524,-492,-460,-428,-396,-372,-356,-340,-324,-308,-292,-276,-260,-244,-228,-212,-196,-180,-164,-148,-132,-120,-112,-104,-96,-88,-80,-72,-64,-56,-48,-40,-32,-24,-16,-8,0,32124,31100,30076,29052,28028,27004,25980,24956,23932,22908,21884,20860,19836,18812,17788,16764,15996,15484,14972,14460,13948,13436,12924,12412,11900,11388,10876,10364,9852,9340,8828,8316,7932,7676,7420,7164,6908,6652,6396,6140,5884,5628,5372,5116,4860,4604,4348,4092,3900,3772,3644,3516,3388,3260,3132,3004,2876,2748,2620,2492,2364,2236,2108,1980,1884,1820,1756,1692,1628,1564,1500,1436,1372,1308,1244,1180,1116,1052,988,924,876,844,812,780,748,716,684,652,620,588,556,524,492,460,428,396,372,356,340,324,308,292,276,260,244,228,212,196,180,164,148,132,120,112,104,96,88,80,72,64,56,48,40,32,24,16,8,0],nQ=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]);var rQ={decodeG711:function(e,t){if("g7110a"===t)return function(e){for(var t=new Uint8Array(2*e.length),n=0,r=0;n<e.length;){var i=eQ[e[n]];if(void 0===i)throw new Error("can not decode g711 alaw data!");t[r]=255&i,t[r+1]=i>>8,n+=1,r+=2}return t}(e);if("g7110m"===t)return function(e){for(var t=new Uint8Array(2*e.length),n=0,r=0;n<e.length;){var i=tQ[e[n]];if(void 0===i)throw new Error("can not decode g711 ulaw data!");t[r]=255&i,t[r+1]=i>>8,n+=1,r+=2}return t}(e);throw new Error("no supported format=".concat(t," for g711"))},createAudioBufferFromPcm:function(e,t,n,r,i){for(var o,a=function(e,t,n){return e/t/n}(t.byteLength,n,i),s=e.createBuffer(n,a,r),u=new DataView(t),c=0;c<n;c++)for(var l=s.getChannelData(c),h=void 0,A=0;A<a;A++)h=u.getUint16(A*(2*n)+2*c,!0),l[A]=(o=h)>=32768?-(65536-o)/32768:o/32767;return{audioBuffer:s,duration:a/r}},packageAACToAdts:function(e,t){var n=new Uint8Array(t.data.byteLength+7),r=function(e,t){var n=e.sampleRateIndex,r=e.channelCount;n=function(e,t){var n=(7&e[0])<<1|e[1]>>>7;return n!==t?n:t}(e.config,n);var i=new Uint8Array(7);i[0]=255,i[1]=240,i[1]=1|i[1],i[2]=64,i[2]=i[2]|60&n<<2,i[2]=i[2]|1&r>>2,i[3]=192&r<<6;var o=t.byteLength+7;return i[3]=i[3]|3&o>>11,i[4]=255&o>>3,i[5]=224&o<<5,i[5]=31|i[5],i[6]=252,i}(e,t.data);return n.set(r),n.set(t.data,7),n},concatAdts:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0,r=0,i=e.length;r<i;r++)t&&r%t==0||(n+=e[r].byteLength);for(var o=new Uint8Array(n),a=0,s=0,u=e.length;s<u;s++)t&&s%t==0||(o.set(e[s],a),a+=e[s].byteLength);return o},checkRefillFrame:function(e){var t=e[0].dts,n=Ll(e).call(e,(function(e){return e.dts===t})).length;if(!(n<=1))for(var r=0;r<n;r++)e[r].data=nQ}},iQ="create new AudioContext error",oQ=function(e){Ty(i,e);var t,n,r=Dy(i);function i(e,t){var n,o;return _y(this,i),ky(wy(o=r.call(this,e,t)),"doPause",o._doPause),o.TAG="AudioRender",o._timeRange=new $X(wy(o)),o._lastTimeLineTime=0,o._sampleQueue=[],o._source=null,o._audioCanAutoplay=!0,o._lastBuffer=null,o._inDecoding=!1,o._endOfStream=!1,o._delay=0,o._isSourceBufferEnd=-1,o._onSourceBufferEnded=wm(n=o._onSourceBufferEnded).call(n,wy(o)),o._initAudioCtx(e.volume||.6),o._bindEvents(),o}return Ey(i,[{key:"baseDts",get:function(){return this._timeRange._baseDts}},{key:"currentTime",get:function(){return this._audioCtx?this._lastTimeLineTime+this._audioCtx.currentTime:0}},{key:"preloadTime",get:function(){return this.isLive?1:0}},{key:"timescale",get:function(){return 1e3}},{key:"buffered",get:function(){return this._timeRange.buffered}},{key:"ctxState",get:function(){return this._audioCtx.state}},{key:"audioCanAutoplay",get:function(){return this._audioCanAutoplay}},{key:"resume",value:function(){if(this._audioCtx&&"suspended"===this._audioCtx.state)return this._audioCtx.resume().catch((function(e){}))}},{key:"canSeek",value:function(e){return this._timeRange.canSeek(e)}},{key:"_assembleErr",value:function(e){var t=new Error(e);return t.code=3,t}},{key:"_emitTimelineEvents",value:function(e,t,n){var r,i;null===(r=this._parent)||void 0===r||null===(i=r.emit)||void 0===i||i.call(r,e,t,n)}},{key:"_initAudioCtx",value:function(e){var t=this;dW.log(this.TAG,"init audioCtx");var n=window.AudioContext||window.webkitAudioContext;return this._audioCtx=new n,this._audioCtx?(this._gainNode=this._audioCtx.createGain(),this._gainNode.gain.value=e,this._gainNode.connect(this._audioCtx.destination),this._audioCanAutoplay="running"===this._audioCtx.state,dW.log(this.TAG,"webAudio state:",this._audioCtx.state),fG(),this._bindAudioCtxEvent(),this._audioCtx.suspend()):(dW.warn(this.TAG,"create webaudio error!"),void Cg((function(){t._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,t._assembleErr(iQ))})))}},{key:"_bindAudioCtxEvent",value:function(){var e=this;this._onStateChange=function(){e._audioCtx&&"running"===e._audioCtx.state&&e._ready&&e._emitTimelineEvents(WY.PLAY_EVENT,UY.PLAYING)},this._audioCtx.addEventListener("statechange",this._onStateChange)}},{key:"_bindEvents",value:function(){var e,t=this;Iy(Ry(i.prototype),"_bindEvents",this).call(this),this._parent.on(YY.CHASE_AUDIO_FRAME,wm(e=this._doChaseFrame).call(e,this)),this._parent.on(WY.UPDATE_VOLUME,(function(e){t._gainNode&&(t._gainNode.gain.value=hY(e)?e:1,t._emitTimelineEvents(WY.PLAY_EVENT,UY.VOLUME_CHANGE))})),this._parent.on(WY.END_OF_STREAM,(function(){var e;t._endOfStream=!0,t.noAudio||null!==(e=t._timeRange)&&void 0!==e&&e.hasBuffer()||null==t||t._emitTimelineEvents(WY.PLAY_EVENT,UY.ENDED)}))}},{key:"_appendChunk",value:function(e,t){if(!this.noAudio){this._meta||(this._meta=t,dW.warn(this.TAG,"audio set metadata",this._meta));var n,r=t.samples;if(r.length)if(this._sampleQueue=Ag(n=this._sampleQueue).call(n,r),t.samples=[],"aac"===this._meta.codecType){if(this._inDecoding)return;this._decodeAACWrapper()}else this._decodeG711()}}},{key:"_resetDts",value:function(e,t){"video"!==t&&this._timeRange.resetDts(e)}},{key:"_doPlay",value:function(){this.noAudio||this._parent.seeking||(this._source||!this.currentTime?this.resume():this._startRender())}},{key:"_doPause",value:function(){this.noAudio||this._audioCtx.suspend()}},{key:"_reInitAudioCtx",value:function(e){var t=this;if(this._lastTimeLineTime=e,this._lastBuffer=null,this._lastAudioBufferInfo=null,this._delay=0,!this._ready||!this._audioCtx.currentTime)return Op.resolve();var n=this._gainNode.gain.value;return this._audioCtx.close().then((function(){return t._audioCtx.removeEventListener("statechange",t._onStateChange),t._audioCtx=null,t._source&&t._source.removeEventListener("ended",t._onSourceBufferEnded),t._source=null,t._initAudioCtx(n)}))}},{key:"_doSeek",value:function(e){var t=this;this._reInitAudioCtx(e).then((function(){t._getAudioBuffer(!0)})).catch((function(e){}))}},{key:"_doChaseFrame",value:function(e){var t=this,n=e.position,r=this._timeRange.deletePassed(n);r&&(dW.log(this.TAG,"_doChaseFrame","startTime:",r.start,"buffeLength:",this.buffered.end(0)-r.start),this._reInitAudioCtx(r.start).then((function(){t._startRender(),t._emitTimelineEvents(WY.PLAY_EVENT,UY.TIMEUPDATE)})).catch((function(e){})))}},{key:"_decodeAACWrapper",value:(n=gy(my().mark((function e(){var t,n,r,i,o,a,s,u,c,l;return my().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._sampleQueue.length,n=this._sampleQueue[0],r=this._sampleQueue[t-1],!((i=(r.dts-n.dts)/this.timescale)<1)){e.next=6;break}return e.abrupt("return");case 6:for(o=sg(i/3-1)||1,a=sg(t/o),s=[],u=0;u<o;u++){var h,A;u<o-1?s.push(lm(h=this._sampleQueue).call(h,u*a,(u+1)*a)):s.push(lm(A=this._sampleQueue).call(A,u*a))}return this._sampleQueue=[],this._inDecoding=!0,e.prev=12,e.next=15,this._decodeCycle(s);case 15:this._isLive||(c=this._timeRange._buffers,(l=c[c.length-1])&&this._emitTimelineEvents(WY.UPDATE_SEGMENT_END,l.end)),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),this._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,this._assembleErr("ERROR_MSG.DECODE_ERR:".concat(e.t0&&e.t0.message)));case 21:this._inDecoding=!1;case 22:case"end":return e.stop()}}),e,this,[[12,18]])}))),function(){return n.apply(this,arguments)})},{key:"_decodeCycle",value:(t=gy(my().mark((function e(t){var n;return my().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.shift()){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._decodeAAC(n);case 5:return e.next=7,this._decodeCycle(t);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_decodeAAC",value:function(e){var t=this,n=e[0],r=0;rQ.checkRefillFrame(e);var i=Kg(e).call(e,(function(e){return rQ.packageAACToAdts(t._meta,e)})),o=rQ.concatAdts(i,0);return new Op((function(e,i){var a=t._audioCtx.decodeAudioData(o.buffer,(function(i){if(t._timeRange){if(t._lastAudioBufferInfo&&t.isLive){var o=t._lastAudioBufferInfo,a=o.dts+o.duration;(r=n.dts-a)>1&&(t._timeRange._duration+=r/1e3,dW.log(t.TAG,"_decodeAAC","audio data dts is not continue, last end dts:",a,",now start Dts:",n.dts,"delay:",r))}t._lastAudioBufferInfo={duration:Math.floor(1e3*i.duration),dts:n.dts};var s=t._timeRange.append(i,i.duration,n.dts,r/1e3);if(!t._ready){var u=Math.abs(s+i.duration-t.currentTime)<.5;(t.isLive||!u)&&(t._ready=!0,dW.log(t.TAG,"_decodeAAC","set ready true start=",s),t.emit(BY.AUDIO_READY,s))}t._emitTimelineEvents(WY.PLAY_EVENT,UY.PROGRESS),t._emitTimelineEvents(WY.PLAY_EVENT,UY.DURATION_CHANGE),e()}}),i);a.catch&&a.catch(i)}))}},{key:"_decodeG711",value:function(){var e,t,n=this._sampleQueue.length,r=this._sampleQueue[0];if(!((this._sampleQueue[n-1].dts-r.dts)/this.timescale<.5)){var i=kY(e=this._sampleQueue).call(e,(function(e,t){return e+=t.data.byteLength}),0),o=new Uint8Array(i),a=0,s=0;ql(t=this._sampleQueue).call(t,(function(e,t){0===t&&(a=e.dts),o.set(e.data,s),s+=e.data.byteLength})),this._sampleQueue=[];try{var u=this._meta,c=u.codecType,l=u.channelCount,h=u.sampleSize,A=u.sampleRate,d=rQ.decodeG711(o,c),f=rQ.createAudioBufferFromPcm(this._audioCtx,d.buffer,l,A,h/8),v=f.audioBuffer,p=f.duration,m=this._timeRange.append(v,p,a,0);this._ready||(this._ready=!0,dW.log(this.TAG,"_decodeG711","set ready true"),this.emit(BY.AUDIO_READY,m)),this._emitTimelineEvents(WY.PLAY_EVENT,UY.PROGRESS),this._emitTimelineEvents(WY.PLAY_EVENT,UY.DURATION_CHANGE)}catch(_6){this._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,this._assembleErr("ERROR_MSG.DECODE_ERR:".concat(_6&&_6.message)))}}}},{key:"_onSourceBufferEnded",value:function(){var e;(this._isSourceBufferEnd=!0,dW.long)&&dW.log(this.TAG,Ag(e="source play end! currentTime:".concat(this.currentTime," , duration:")).call(e,this.duration));this._startRender()}},{key:"_ajustSeekTime",value:function(e){var t=this._timeRange.getBuffer(e,0);t&&(dW.log(this.TAG,"ajust seek time to:",t.start),this._lastTimeLineTime=t.start)}},{key:"_getAudioBuffer",value:function(e){var t=this;if(this._timeRange){var n=this._timeRange.getBuffer(this._lastBuffer?this._lastBuffer.end:this.currentTime,0);return n?e?(this._ajustSeekTime(n.start),void this.emit(BY.AUDIO_READY)):n:(this._endOfStream||!this._isLive)&&this.currentTime-this.duration>-.5?(this._emitTimelineEvents(WY.PLAY_EVENT,UY.TIMEUPDATE),void this._emitTimelineEvents(WY.PLAY_EVENT,UY.ENDED)):(this._ready=!1,this._audioCtx.suspend(),this.emit(BY.AUDIO_WAITING),void(e&&(this._onAudioReady||(this._onAudioReady=function(e){t._ajustSeekTime(e)}),this.removeListener(BY.AUDIO_READY,this._onAudioReady),this.once(BY.AUDIO_READY,this._onAudioReady))))}}},{key:"_startRender",value:function(e){if(!this.noAudio){if("video"===e&&this.isLive&&this._ready&&!this._isSourceBufferEnd)return console.log(this.TAG,"_startRender, audio currentTime",this.currentTime,"from:",e,"_isSourceBufferEnd:",this._isSourceBufferEnd,"ready:",this._ready),void this._doPlay();var t=this._getAudioBuffer();if(t){"suspended"===this._audioCtx.state&&(this._audioCtx.resume().catch((function(e){})),vG()),this._lastBuffer=t,this._source=null;var n=this._audioCtx.createBufferSource();n.buffer=t.source,n.loop=!1,this._source=n,n.addEventListener("ended",this._onSourceBufferEnded),n.connect(this._gainNode),t.delay&&t.delay>.001&&(this._delay+=t.delay),this.startDts=t.startDts;try{this._isSourceBufferEnd=!1,n.start()}catch(_6){}t.startDts&&this._emitTimelineEvents(WY.SYNC_DTS,t.startDts)}}}},{key:"_destroy",value:function(){dW.log(this.TAG,"destroy audio..."),this._source&&this._source.removeEventListener("ended",this._onSourceBufferEnded),this._audioCtx&&"closed"!==this.ctxState&&this._audioCtx.close(),this._audioCtx=null,this._sampleQueue=null,this._timeRange=null,this._parent=null,this.removeAllListeners()}}]),i}(XY),aQ=Dn,sQ=qo.findIndex,uQ="findIndex",cQ=!0;uQ in[]&&Array(1)[uQ]((function(){cQ=!1})),aQ({target:"Array",proto:!0,forced:cQ},{findIndex:function(e){return sQ(this,e,arguments.length>1?arguments[1]:void 0)}});var lQ=Sl("Array").findIndex,hQ=ae,AQ=lQ,dQ=Array.prototype,fQ=t((function(e){var t=e.findIndex;return e===dQ||hQ(dQ,e)&&t===dQ.findIndex?AQ:t})),vQ=D,pQ=Cn,mQ=TypeError,yQ=Object.getOwnPropertyDescriptor,gQ=vQ&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(g6){return g6 instanceof TypeError}}(),_Q=Dn,bQ=He,EQ=Kr,kQ=Fn,TQ=Pn,RQ=gQ?function(e,t){if(pQ(e)&&!yQ(e,"length").writable)throw mQ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},SQ=Nn,wQ=Tr,DQ=Yn,IQ=HY,CQ=Dr("splice"),LQ=Math.max,VQ=Math.min;_Q({target:"Array",proto:!0,forced:!CQ},{splice:function(e,t){var n,r,i,o,a,s,u=bQ(this),c=TQ(u),l=EQ(e,c),h=arguments.length;for(0===h?n=r=0:1===h?(n=0,r=c-l):(n=h-2,r=VQ(LQ(kQ(t),0),c-l)),SQ(c+n-r),i=wQ(u,r),o=0;o<r;o++)(a=l+o)in u&&DQ(i,o,u[a]);if(i.length=r,n<r){for(o=l;o<c-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:IQ(u,s);for(o=c;o>c-r+n;o--)IQ(u,o-1)}else if(n>r)for(o=c-r;o>l;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:IQ(u,s);for(o=0;o<n;o++)u[o+l]=arguments[o+2];return RQ(u,c-r+n),i}});var xQ=Sl("Array").splice,FQ=ae,GQ=xQ,OQ=Array.prototype,ZQ=t((function(e){var t=e.splice;return e===OQ||FQ(OQ,e)&&t===OQ.splice?GQ:t})),PQ=uS,UQ=BT.findIndex,NQ=sG,BQ="findIndex",MQ=!0;BQ in[]&&Array(1)[BQ]((function(){MQ=!1})),PQ({target:"Array",proto:!0,forced:MQ},{findIndex:function(e){return UQ(this,e,arguments.length>1?arguments[1]:void 0)}}),NQ(BQ);var WQ=gb,YQ=AT,XQ=TypeError,QQ=Object.getOwnPropertyDescriptor,jQ=WQ&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(g6){return g6 instanceof TypeError}}(),HQ=uS,JQ=V_,KQ=_R,zQ=oT,qQ=lT,$Q=jQ?function(e,t){if(YQ(e)&&!QQ(e,"length").writable)throw XQ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},ej=wx,tj=xT,nj=dS,rj=lN,ij=aI("splice"),oj=Math.max,aj=Math.min;HQ({target:"Array",proto:!0,forced:!ij},{splice:function(e,t){var n,r,i,o,a,s,u=JQ(this),c=qQ(u),l=KQ(e,c),h=arguments.length;for(0===h?n=r=0:1===h?(n=0,r=c-l):(n=h-2,r=aj(oj(zQ(t),0),c-l)),ej(c+n-r),i=tj(u,r),o=0;o<r;o++)(a=l+o)in u&&nj(i,o,u[a]);if(i.length=r,n<r){for(o=l;o<c-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:rj(u,s);for(o=c;o>c-r+n;o--)rj(u,o-1)}else if(n>r)for(o=c-r;o>l;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:rj(u,s);for(o=0;o<n;o++)u[o+l]=arguments[o+2];return $Q(u,c-r+n),i}});var sj=V_,uj=MS;uS({target:"Object",stat:!0,forced:g_((function(){uj(1)}))},{keys:function(e){return uj(sj(e))}});var cj=vD.charAt,lj=CS,hj=uk,Aj=AO,dj=dO,fj="String Iterator",vj=hj.set,pj=hj.getterFor(fj);Aj(String,"String",(function(e){vj(this,{type:fj,string:lj(e),index:0})}),(function(){var e,t=pj(this),n=t.string,r=t.index;return r>=n.length?dj(void 0,!0):(e=cj(n,r),t.index+=e.length,dj(e,!1))}));var mj=s_,yj=Nk,gj=Wk,_j=RO,bj=YE,Ej=vb,kj=Ej("iterator"),Tj=Ej("toStringTag"),Rj=_j.values,Sj=function(e,t){if(e){if(e[kj]!==Rj)try{bj(e,kj,Rj)}catch(g6){e[kj]=Rj}if(e[Tj]||bj(e,Tj,t),yj[t])for(var n in _j)if(e[n]!==_j[n])try{bj(e,n,_j[n])}catch(g6){e[n]=_j[n]}}};for(var wj in yj)Sj(mj[wj]&&mj[wj].prototype,wj);function Dj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ij(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),kh(e,r.key,r)}}function Cj(e,t,n){return t&&Ij(e.prototype,t),n&&Ij(e,n),kh(e,"prototype",{writable:!1}),e}function Lj(e,t,n){return t in e?kh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vj(e,t){return function(e){if(zm(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Th&&qm(e)||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Fj(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 xj(e){return function(e){if(zm(e))return Gj(e)}(e)||function(e){if(void 0!==Th&&null!=qm(e)||null!=e["@@iterator"])return fy(e)}(e)||Fj(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 Fj(e,t){var n;if(e){if("string"==typeof e)return Gj(e,t);var r=lm(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?fy(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gj(e,t):void 0}}function Gj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Sj(gj,"DOMTokenList");var Oj="video",Zj="hevc",Pj=Ob,Uj=G_,Nj=Zb,Bj=VS,Mj=RegExp.prototype,Wj=CE.PROPER,Yj=Sk,Xj=xb,Qj=CS,jj=g_,Hj=function(e){var t=e.flags;return void 0!==t||"flags"in Mj||Uj(e,"flags")||!Nj(Mj,e)?t:Pj(Bj,e)},Jj="toString",Kj=RegExp.prototype[Jj],zj=jj((function(){return"/a/b"!=Kj.call({source:"a",flags:"b"})})),qj=Wj&&Kj.name!=Jj;(zj||qj)&&Yj(RegExp.prototype,Jj,(function(){var e=Xj(this);return"/"+Qj(e.source)+"/"+Qj(Hj(e))}),{unsafe:!0});var $j=gb,eH=CE.EXISTS,tH=R_,nH=yb.f,rH=Function.prototype,iH=tH(rH.toString),oH=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,aH=tH(oH.exec);$j&&!eH&&nH(rH,"name",{configurable:!0,get:function(){try{return aH(oH,iH(this))[1]}catch(g6){return""}}});var sH=uS,uH=tT,cH=aR,lH=WT,hH=R_([].join),AH=uH!=Object,dH=lH("join",",");sH({target:"Array",proto:!0,forced:AH||!dH},{join:function(e){return hH(cH(this),void 0===e?",":e)}});var fH=Dn,vH=ti.indexOf,pH=Ml,mH=E([].indexOf),yH=!!mH&&1/mH([1],1,-0)<0;fH({target:"Array",proto:!0,forced:yH||!pH("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return yH?mH(this,e,t)||0:vH(this,e,t)}});var gH=Sl("Array").indexOf,_H=ae,bH=gH,EH=Array.prototype,kH=t((function(e){var t=e.indexOf;return e===EH||_H(EH,e)&&t===EH.indexOf?bH:t}));function TH(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=Ll(t).call(t,Boolean);var r=new Uint8Array(kY(t).call(t,(function(e,t){return e+t.byteLength}),0)),i=0;return ql(t).call(t,(function(e){r.set(e,i),i+=e.byteLength})),r}function RH(e){if(!zm(e)){for(var t=[],n="",r=0;r<e.length;r++)r%2&&(n=e[r-1]+e[r],t.push(sg(n,16)),n="");return t}return Kg(e).call(e,(function(e){return sg(e,16)}))}var SH=tn,wH=L,DH=ze,IH=ae,CH=function(){var e=SH(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},LH=RegExp.prototype,VH=ae,xH=function(e){var t=e.flags;return void 0!==t||"flags"in LH||DH(e,"flags")||!IH(LH,e)?t:wH(CH,e)},FH=RegExp.prototype,GH=t((function(e){return e===FH||VH(FH,e)?xH(e):e.flags})),OH=Sl("Array").entries,ZH=$n,PH=ze,UH=ae,NH=OH,BH=Array.prototype,MH={DOMTokenList:!0,NodeList:!0},WH=t((function(e){var t=e.entries;return e===BH||UH(BH,e)&&t===BH.entries||PH(MH,ZH(e))?NH:t})),YH=Dn,XH=qo.find,QH="find",jH=!0;QH in[]&&Array(1)[QH]((function(){jH=!1})),YH({target:"Array",proto:!0,forced:jH},{find:function(e){return XH(this,e,arguments.length>1?arguments[1]:void 0)}});var HH=Sl("Array").find,JH=ae,KH=HH,zH=Array.prototype,qH=t((function(e){var t=e.find;return e===zH||JH(zH,e)&&t===zH.find?KH:t})),$H=bk,eJ=yb,tJ=function(e,t,n){return n.get&&$H(n.get,t,{getter:!0}),n.set&&$H(n.set,t,{setter:!0}),eJ.f(e,t,n)},nJ=gb,rJ=tJ,iJ=VS,oJ=g_,aJ=s_.RegExp,sJ=aJ.prototype;nJ&&oJ((function(){var e=!0;try{aJ(".","d")}catch(g6){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(o.hasIndices="d"),o)i(a,o[a]);return Object.getOwnPropertyDescriptor(sJ,"flags").get.call(t)!==r||n!==r}))&&rJ(sJ,"flags",{configurable:!0,get:iJ});var uJ=oT,cJ=CS,lJ=I_,hJ=RangeError,AJ=uS,dJ=BT.find,fJ=sG,vJ="find",pJ=!0;vJ in[]&&Array(1)[vJ]((function(){pJ=!1})),AJ({target:"Array",proto:!0,forced:pJ},{find:function(e){return dJ(this,e,arguments.length>1?arguments[1]:void 0)}}),fJ(vJ);var mJ=xb,yJ=LV,gJ=Kk,_J=Ob,bJ=V_,EJ=function(e,t,n,r){try{return r?t(mJ(n)[0],n[1]):t(n)}catch(g6){yJ(e,"throw",g6)}},kJ=fV,TJ=ST,RJ=lT,SJ=dS,wJ=wV,DJ=_V,IJ=Array,CJ=DI,LJ="ArrayBuffer",VJ=FP[LJ];uS({global:!0,constructor:!0,forced:s_[LJ]!==VJ},{ArrayBuffer:VJ}),CJ(LJ);var xJ,FJ=function(){function e(){Dj(this,e),this.buffer=new Uint8Array(0)}return Cj(e,[{key:"write",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];ql(n).call(n,(function(t){t?e.buffer=function(e){for(var t=0,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];ql(r).call(r,(function(e){t+=e.length}));var o=new e(t),a=0;return ql(r).call(r,(function(e){o.set(e,a),a+=e.length})),o}(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}(),GJ=Math.pow(2,32)-1,OJ=function(){function e(){Dj(this,e)}return Cj(e,null,[{key:"box",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n=Ll(n).call(n,Boolean);var i=8+kY(n).call(n,(function(e,t){return e+t.byteLength}),0),o=new Uint8Array(i);o[0]=i>>24&255,o[1]=i>>16&255,o[2]=i>>8&255,o[3]=255&i,o.set(e,4);var a=8;return ql(n).call(n,(function(e){o.set(e,a),a+=e.byteLength})),o}},{key:"ftyp",value:function(t){return qH(t).call(t,(function(e){return e.type===Oj&&e.codecType===Zj}))?e.FTYPHEV1:e.FTYPAVC1}},{key:"initSegment",value:function(t){return TH(e.ftyp(t),e.moov(t))}},{key:"pssh",value:function(t){var n,r=new Uint8Array(Ag(n=[1,0,0,0]).call(n,[16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75],[0,0,0,1],RH(t.kid),[0,0,0,0]));return e.box(e.types.pssh,r)}},{key:"moov",value:function(t){if(t[0].useEME&&(t[0].encv||t[0].enca)){var n;t[0].pssh||(t[0].pssh={kid:t[0].kid});var r=this.pssh(t[0].pssh);return e.box.apply(e,Ag(n=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale),e.mvex(t)]).call(n,xj(Kg(t).call(t,(function(t){return e.trak(t)}))),[r]))}var i;return e.box.apply(e,Ag(i=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale)]).call(i,xj(Kg(t).call(t,(function(t){return e.trak(t)}))),[e.mvex(t)]))}},{key:"mvhd",value:function(t){var n=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,n>>24&255,n>>16&255,n>>8&255,255&n,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,n){var r=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,n>>24&255,n>>16&255,n>>8&255,255&n,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,r>>8&255,255&r,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 n=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,n>>24&255,n>>16&255,n>>8&255,255&n,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===Oj?e.VMHD:e.SMHD,e.DINF,e.stbl(t))}},{key:"stbl",value:function(t){var n=[];return t&&t.ext&&t.ext.stss&&n.push(e.stss(WH(t.ext.stss))),e.box(e.types.stbl,e.stsd(t),e.STTS,n[0],e.STSC,e.STSZ,e.STCO)}},{key:"stsd",value:function(t){var n;return n="audio"===t.type?t.useEME&&t.enca?e.enca(t):e.mp4a(t):t.useEME&&t.encv?e.encv(t):e.avc1hev1(t),e.box(e.types.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),n)}},{key:"enca",value:function(t){var n=t.enca.channelCount,r=t.enca.sampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>8&255,255&r,0,0]),o=e.esds(t.config),a=e.sinf(t.enca);return e.box(e.types.enca,i,o,a)}},{key:"encv",value:function(t){var n,r,i,o=t.sps.length>0?t.sps[0]:[],a=t.pps.length>0?t.pps[0]:[],s=t.width,u=t.height,c=t.sarRatio[0],l=t.sarRatio[1],h=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]),A=new Uint8Array(Ag(r=Ag(n=Ag(i=[1,o[1],o[2],o[3],255,225,o.length>>>8&255,255&o.length]).apply(i,xj(o))).call(n,[1,a.length>>>8&255,255&a.length])).apply(r,xj(a))),d=new Uint8Array([0,0,88,57,0,15,200,192,0,4,86,72]),f=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,h,e.box(e.types.avcC,A),e.box(e.types.btrt,d),f,e.box(e.types.pasp,v))}},{key:"schi",value:function(t){var n=new Uint8Array([]),r=e.tenc(t);return e.box(e.types.schi,n,r)}},{key:"tenc",value:function(t){var n,r=new Uint8Array(Ag(n=[0,0,0,0,0,0,255&t.default_IsEncrypted,255&t.default_IV_size]).call(n,RH(t.default_KID)));return e.box(e.types.tenc,r)}},{key:"sinf",value:function(t){var n=new Uint8Array([]),r=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]),o=e.schi(t);return e.box(e.types.sinf,n,e.box(e.types.frma,r),e.box(e.types.schm,i),o)}},{key:"avc1hev1",value:function(t){var n,r=t.codecType===Zj,i=r?e.types.hvc1:e.types.avc1,o=r?e.hvcC(t):e.avcC(t),a=[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]),o];return r?a.push(e.box(e.types.fiel,new Uint8Array([1,0]))):t.sarRatio&&t.sarRatio.length>1&&a.push(e.pasp(t.sarRatio)),e.box.apply(e,Ag(n=[i]).call(n,a))}},{key:"avcC",value:function(t){var n,r,i,o,a,s,u=[],c=[];return ql(n=t.sps).call(n,(function(e){s=e.byteLength,u.push(s>>>8&255),u.push(255&s),u.push.apply(u,xj(e))})),ql(r=t.pps).call(r,(function(e){s=e.byteLength,c.push(s>>>8&255),c.push(255&s),c.push.apply(c,xj(e))})),e.box(e.types.avcC,new Uint8Array(Ag(o=Ag(i=Ag(a=[1,u[3],u[4],u[5],255,224|t.sps.length]).apply(a,u)).call(i,[t.pps.length])).apply(o,c)))}},{key:"hvcC",value:function(t){var n=t.hvcC;if(n instanceof ArrayBuffer||n instanceof Uint8Array)return n;var r,i=t.vps,o=t.sps,a=t.pps;if(n){var s=n.generalProfileCompatibilityFlags,u=n.generalConstraintIndicatorFlags,c=(i.length&&1)+(o.length&&1)+(a.length&&1);r=[1,n.generalProfileSpace<<6|n.generalTierFlag<<5|n.generalProfileIdc,s>>>24,s>>>16,s>>>8,s,u[0],u[1],u[2],u[3],u[4],u[5],n.generalLevelIdc,240,0,252,252|n.chromaFormatIdc,248|n.bitDepthLumaMinus8,248|n.bitDepthChromaMinus8,0,0,n.numTemporalLayers<<3|n.temporalIdNested<<2|3,c];var l=function(e){var t;r.push(e.length>>8,e.length),(t=r).push.apply(t,xj(e))};i.length&&(r.push(160,0,i.length),ql(i).call(i,l)),o.length&&(r.push(161,0,o.length),ql(o).call(o,l)),a.length&&(r.push(162,0,a.length),ql(a).call(a,l))}else r=[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(r))}},{key:"pasp",value:function(t){var n=Vj(t,2),r=n[0],i=n[1];return e.box(e.types.pasp,new Uint8Array([r>>24,r>>16&255,r>>8&255,255&r,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 n,r,i,o=t.length;return e.box(e.types.esds,new Uint8Array(Ag(n=Ag(r=Ag(i=[0,0,0,0,3,23+o,0,0,0,4,15+o,64,21,0,6,0,0,0,218,192,0,0,218,192,5]).call(i,[o])).call(r,t)).call(n,[6,1,2])))}},{key:"mvex",value:function(t){var n;return e.box.apply(e,Ag(n=[e.types.mvex]).call(n,xj(Kg(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 n;return e.box.apply(e,Ag(n=[e.types.moof,e.mfhd(t[0].samples?t[0].samples[0].gopId:0)]).call(n,xj(Kg(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 n,r=e.tfhd(t.id),i=e.tfdt(t,t.baseMediaDecodeTime),o=0;if(t.isVideo&&t.videoSenc&&(n=t.videoSenc,ql(n).call(n,(function(e){o+=8,e.subsamples&&e.subsamples.length&&(o+=2,o+=6*e.subsamples.length)}))),t.videoSencLength=o,t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)){if(t.isVideoEncryption){if(t.isVideo){var a=e.saiz(t),s=e.saio(t),u=e.trun1(t),c=e.senc(t);return e.box(e.types.traf,r,i,a,s,u,c)}if(t.isAudioEncryption){var l=e.sbgp(),h=e.saiz(t),A=e.saio(t),d=e.senc(t),f=e.trun1(t);return e.box(e.types.traf,r,i,l,h,A,d,f)}var v=e.sbgp(),p=e.trun1(t);return e.box(e.types.traf,r,i,v,p)}if(t.isVideo){var m=e.trun1(t);return e.box(e.types.traf,r,i,m)}var y=e.sbgp(),g=e.saiz(t),_=e.saio(t),b=e.senc(t),E=e.trun1(t);return e.box(e.types.traf,r,i,y,g,_,b,E)}var k=e.sdtp(t);return e.box(e.types.traf,r,i,k,e.trun(t.samples,k.byteLength+76))}},{key:"sdtp",value:function(t){var n,r=new FJ;return ql(n=t.samples).call(n,(function(e){r.write(new Uint8Array(t.isVideo?[e.keyframe?32:16]:[16]))})),e.box(e.types.sdtp,this.extension(0,0),r.buffer)}},{key:"trun1",value:function(t){var n,r=new FJ,i=FJ.writeUint32(t.samples.length),o=null;if(t.isVideo){var a=t.videoSencLength;o=FJ.writeUint32(16*t.samples.length+a+149),!t.isVideoEncryption&&t.isAudioEncryption&&(o=FJ.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),o=FJ.writeUint32(s)}return ql(n=t.samples).call(n,(function(e){r.write(FJ.writeUint32(e.duration)),r.write(FJ.writeUint32(e.size)),r.write(FJ.writeUint32(e.keyframe?33554432:65536)),t.isVideo&&r.write(FJ.writeUint32(e.cts?e.cts:0))})),e.box(e.types.trun,this.extension(0,GH(t)),i,o,r.buffer)}},{key:"senc",value:function(t){var n=new FJ,r=t.samples.length,i=t.isVideo?16:8,o=t.isVideo?2:0,a=[],s=0;return t.isVideo?(a=t.videoSenc,s=t.videoSencLength):a=t.audioSenc,s=s||i*r,n.write(FJ.writeUint32(16+s),e.types.senc,this.extension(0,o)),n.write(FJ.writeUint32(r)),ql(a).call(a,(function(e){for(var t=0;t<e.InitializationVector.length;t++)n.write(new Uint8Array([e.InitializationVector[t]]));var r;e.subsamples&&e.subsamples.length&&(n.write(FJ.writeUint16(e.subsamples.length)),ql(r=e.subsamples).call(r,(function(e){n.write(FJ.writeUint16(e.BytesOfClearData)),n.write(FJ.writeUint32(e.BytesOfProtectedData))})))})),n.buffer}},{key:"saio",value:function(t){var n=12*t.samples.length+141;!t.isVideo&&t.isAudioEncryption&&(n=149);var r=new Uint8Array([1,0,0,0,0,0,0,1,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n]);return e.box(e.types.saio,r)}},{key:"saiz",value:function(t){var n=t.samples.length,r=new Uint8Array([0,0,0,0,16,n>>24&255,n>>16&255,n>>8&255,255&n]);return e.box(e.types.saiz,r)}},{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,n){var r=Math.floor(n/(GJ+1)),i=Math.floor(n%(GJ+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,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i]))}},{key:"trun",value:function(t,n){var r=t.length,i=12+16*r;n+=8+i;var o=new Uint8Array(i);o.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var a=0;a<r;a++){var s=t[a],u=s.duration,c=s.size,l=s.flag,h=void 0===l?{}:l,A=s.cts,d=void 0===A?0:A;o.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,c>>>24&255,c>>>16&255,c>>>8&255,255&c,h.isLeading<<2|(null===h.dependsOn||void 0===h.dependsOn?1:h.dependsOn),h.isDependedOn<<6|h.hasRedundancy<<4|h.paddingValue<<1|(null===h.isNonSyncSample||void 0===h.isNonSyncSample?1:h.isNonSyncSample),61440&h.degradationPriority,15&h.degradationPriority,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*a)}return e.box(e.types.trun,o)}},{key:"moovMP4",value:function(t){var n;return e.box.apply(e,Ag(n=[e.types.moov,e.mvhd(t[0].duration,t[0].timescale)]).call(n,xj(Kg(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===Oj?e.VMHD:e.SMHD,e.DINF,e.stblMP4(t))}},{key:"stblMP4",value:function(t){var n,r=t.ext,i=[e.stsd(t),e.stts(r.stts),e.stsc(r.stsc),e.stsz(r.stsz),e.stco(r.stco)];return r.stss.length&&i.push(e.stss(r.stss)),r.ctts.length&&i.push(e.ctts(r.ctts)),e.box.apply(e,Ag(n=[e.types.stbl]).call(n,i))}},{key:"stts",value:function(t){var n=t.length,r=new Uint8Array(8*n),i=0;return ql(t).call(t,(function(e){var t=e.value,n=e.count;r.set([n>>24,n>>16&255,n>>8&255,255&n,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8})),e.box(e.types.stts,TH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stsc",value:function(t){var n=t.length,r=new Uint8Array(12*n),i=0;return ql(t).call(t,(function(e){var t=e.firstChunk,n=e.samplesPerChunk,o=e.sampleDescIndex;r.set([t>>24,t>>16&255,t>>8&255,255&t,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o],i),i+=12})),e.box(e.types.stsc,TH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stsz",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return ql(t).call(t,(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stsz,TH(new Uint8Array([0,0,0,0,0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stco",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return ql(t).call(t,(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stco,TH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stss",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return ql(t).call(t,(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stss,TH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"ctts",value:function(t){var n=t.length,r=new Uint8Array(8*n),i=0;return ql(t).call(t,(function(e){var t=e.value,n=e.count;r.set([n>>24,n>>16&255,n>>8&255,255&n,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8})),e.box(e.types.ctts,TH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{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 n,r=t.timescale,i=t.samples[0].duration,o=i*t.samples.length,a=t.samples[0].sampleOffset*i,s=8;ql(n=t.samples).call(n,(function(e){s+=e.size}));var u=0;if(t.isVideo){var c,l=0;t.videoSenc&&(c=t.videoSenc),t.isVideo&&ql(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 h=new Uint8Array([0,0,0,0,0,0,0,255&t.id,r>>24&255,r>>16&255,r>>8&255,255&r,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,0,0,0,0,1,0,u>>16&255,u>>8&255,255&u,o>>24&255,o>>16&255,o>>8&255,255&o,144,0,0,0]);return e.box(e.types.sidx,h)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();Lj(OJ,"types",kY(xJ=["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(xJ,(function(e,t){return e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)],e}),Sh(null))),Lj(OJ,"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])}),Lj(OJ,"FTYPAVC1",OJ.box(OJ.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))),Lj(OJ,"FTYPHEV1",OJ.box(OJ.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,104,101,118,49]))),Lj(OJ,"DINF",OJ.box(OJ.types.dinf,OJ.box(OJ.types.dref,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])))),Lj(OJ,"VMHD",OJ.box(OJ.types.vmhd,new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))),Lj(OJ,"SMHD",OJ.box(OJ.types.smhd,new Uint8Array([0,0,0,0,0,0,0,0]))),Lj(OJ,"StblTable",new Uint8Array([0,0,0,0,0,0,0,0])),Lj(OJ,"STTS",OJ.box(OJ.types.stts,OJ.StblTable)),Lj(OJ,"STSC",OJ.box(OJ.types.stsc,OJ.StblTable)),Lj(OJ,"STSZ",OJ.box(OJ.types.stsz,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]))),Lj(OJ,"STCO",OJ.box(OJ.types.stco,OJ.StblTable));var ZJ=function(){function e(t,n){Dj(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=n}return Cj(e,[{key:"debug",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).debug.apply(n,Ag(t=[this._prefix]).call(t,i))}}},{key:"log",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).log.apply(n,Ag(t=[this._prefix]).call(t,i))}}},{key:"warn",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).warn.apply(n,Ag(t=[this._prefix]).call(t,i))}}},{key:"error",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).error.apply(n,Ag(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}();Lj(ZJ,"disabled",!0);var PJ=function(){function e(t,n,r){Dj(this,e),this.videoTrack=t,this.audioTrack=n;var i=/Chrome\/([^.]+)/.exec(navigator.userAgent);this.forceFirstIDR=i&&Number(i[1])<50,this.log=new ZJ("FMP4Remuxer",!r||!r.openLog||!r.openLog)}return Cj(e,[{key:"remux",value:function(){var e,t,n,r,i,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.videoTrack,u=this.audioTrack,c=s.exist(),l=u.exist(),h=[];return o&&(a&&a.initMerge?(c&&h.push(this.videoTrack),l&&h.push(this.audioTrack),n=OJ.initSegment(h)):(c&&(e=OJ.initSegment([this.videoTrack])),l&&(t=OJ.initSegment([this.audioTrack])))),c&&s.hasSample()&&(r=this._remuxVideo()),l&&u.hasSample()&&(i=this._remuxAudio()),s.samples=[],u.samples=[],{initSegment:n,videoInitSegment:e,audioInitSegment:t,videoSegment:r,audioSegment:i}}},{key:"_remuxVideo",value:function(){var e=this.videoTrack;this.forceFirstIDR&&(e.samples[0].flag={dependsOn:2,isNonSyncSample:0});var t=e.samples,n=0;ql(t).call(t,(function(e){var t;n+=kY(t=e.units).call(t,(function(e,t){return e+t.byteLength}),0),n+=4*e.units.length}));for(var r,i=new Uint8Array(n),o=new DataView(i.buffer),a=function(e,n,a,s){var u;s=t[e];var l=0;ql(u=s.units).call(u,(function(e){o.setUint32(a,e.byteLength),a+=4,i.set(e,a),a+=e.byteLength,l+=4+e.byteLength})),s.size=l,c=a,r=s},s=0,u=t.length,c=0;s<u;s++)a(s,0,c,r);var l=OJ.mdat(i);return TH(OJ.moof([e]),l)}},{key:"_remuxAudio",value:function(){var e,t,n=this.audioTrack,r=new Uint8Array(kY(e=n.samples).call(e,(function(e,t){return e+t.size}),0));kY(t=n.samples).call(t,(function(e,t){return r.set(t.data,e),e+t.size}),0);var i=OJ.mdat(r);return TH(OJ.moof([n]),i)}},{key:"reset",value:function(){this.videoTrack.reset(),this.audioTrack.reset()}}]),e}(),UJ=function(){function e(t,n){Dj(this,e),this.videoTrack=t,this.audioTrack=n}return Cj(e,[{key:"remux",value:function(e,t){this.videoTrack=e||this.videoTrack,this.audioTrack=t||this.audioTrack;var n,r,i=(null==e?void 0:e.exist())&&(null==e?void 0:e.hasSample()),o=(null==t?void 0:t.exist())&&(null==t?void 0:t.hasSample());return i&&o?n=this._remuxMix(e,t):i?n=this._remuxTrack(e):o&&(r=this._remuxTrack(t)),e&&(e.samples=[]),t&&(t.samples=[]),{videoSegment:n,audioSegment:r}}},{key:"_remuxMix",value:function(e,t){var n=OJ.ftyp([e,t]),r=this._remuxData(e,n.byteLength+8),i=r.mdatData,o=r.chunkOffset,a=this._remuxData(t,o).mdatData,s=OJ.mdat(TH(i,a)),u=OJ.moovMP4([e,t]);return e.ext=void 0,t.ext=void 0,e.samples=[],t.samples=[],TH(n,s,u)}},{key:"_remuxTrack",value:function(e){var t=OJ.ftyp([e]),n=this._remuxData(e,t.byteLength+8).mdatData,r=OJ.mdat(n),i=OJ.moovMP4([e]);return e.ext=void 0,e.samples=[],TH(t,r,i)}},{key:"_remuxData",value:function(e,t){var n=e.type===Oj,r=e.samples,i=0;n?ql(r).call(r,(function(e){var t;i+=kY(t=e.units).call(t,(function(e,t){return e+t.byteLength}),0),i+=4*e.units.length})):i=kY(r).call(r,(function(e,t){return e+t.size}),0);for(var o,a=new Uint8Array(i),s=new DataView(a.buffer),u=e.ext={stts:[],stsc:[],stsz:[],stco:[],stss:[],ctts:[]},c=0,l=0,h=r.length,A=0;A<h;A++){l+=(o=r[A]).duration;var d,f=n?0:o.size;if(n)ql(d=o.units).call(d,(function(e){s.setUint32(c,e.byteLength),c+=4,a.set(e,c),c+=e.byteLength,f+=4+e.byteLength}));else a.set(o.data,c),c+=f;o.size=f,u.stsz.push(f),n&&this._fillCttsSamples(u.ctts,o.cts),this._fillSttsSamples(u.stts,o,r[A+1]),this._fillStcoSamples(u.stco,A,1,t),t+=f,n&&o.keyframe&&u.stss.push(A+1)}return e.duration=l,this._fillStscSamples(u.stsc,h,1),{mdatData:a,chunkOffset:t}}},{key:"_fillSttsSamples",value:function(e,t,n){var r=e[e.length-1];n?r&&r.value===t.duration?r.count++:e.push({value:t.duration,count:1}):r?r.count++:e.push({value:40,count:1})}},{key:"_fillCttsSamples",value:function(e,t){var n=e[e.length-1];n&&n.value===t?n.count++:e.push({value:t,count:1})}},{key:"_fillStcoSamples",value:function(e,t,n,r){t%n||e.push(r)}},{key:"_fillStscSamples",value:function(e,t,n){if(t<=n)e.push({firstChunk:1,samplesPerChunk:t,sampleDescIndex:1});else{var r=Math.floor(t/n),i=t%n;e.push({firstChunk:1,samplesPerChunk:n,sampleDescIndex:1}),i&&e.push({firstChunk:r+1,samplesPerChunk:i,sampleDescIndex:1})}}}]),e}(),NJ=i,BJ=ht("iterator"),MJ=!NJ((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+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[BJ]||"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"!==n||"x"!==new URL("http://x",void 0).host})),WJ=v,YJ=2147483647,XJ=/[^\0-\u007E]/,QJ=/[.\u3002\uFF0E\uFF61]/g,jJ="Overflow: input needs wider integers to process",HJ=RangeError,JJ=WJ(QJ.exec),KJ=Math.floor,zJ=String.fromCharCode,qJ=WJ("".charCodeAt),$J=WJ([].join),eK=WJ([].push),tK=WJ("".replace),nK=WJ("".split),rK=WJ("".toLowerCase),iK=function(e){return e+22+75*(e<26)},oK=function(e,t,n){var r=0;for(e=n?KJ(e/700):e>>1,e+=KJ(e/t);e>455;)e=KJ(e/35),r+=36;return KJ(r+36*e/(e+38))},aK=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=qJ(e,n++);if(i>=55296&&i<=56319&&n<r){var o=qJ(e,n++);56320==(64512&o)?eK(t,((1023&i)<<10)+(1023&o)+65536):(eK(t,i),n--)}else eK(t,i)}return t}(e);var n,r,i=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&eK(t,zJ(r));var u=t.length,c=u;for(u&&eK(t,"-");c<i;){var l=YJ;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<l&&(l=r);var h=c+1;if(l-o>KJ((YJ-a)/h))throw HJ(jJ);for(a+=(l-o)*h,o=l,n=0;n<e.length;n++){if((r=e[n])<o&&++a>YJ)throw HJ(jJ);if(r==o){for(var A=a,d=36;;){var f=d<=s?1:d>=s+26?26:d-s;if(A<f)break;var v=A-f,p=36-f;eK(t,zJ(iK(f+v%p))),A=KJ(v/p),d+=36}eK(t,zJ(iK(A))),s=oK(a,h,c==u),a=0,c++}}a++,o++}return $J(t,"")},sK=to,uK=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:sK(e,r,t[r],n);return e},cK=Dn,lK=r,hK=L,AK=v,dK=D,fK=MJ,vK=to,pK=ro,mK=uK,yK=Do,gK=Nu,_K=Yo,bK=ad,EK=S,kK=ze,TK=Jt,RK=$n,SK=tn,wK=$,DK=Xr,IK=Zi,CK=P,LK=hA,VK=iA,xK=md,FK=eX,GK=ht("iterator"),OK="URLSearchParams",ZK=OK+"Iterator",PK=_K.set,UK=_K.getterFor(OK),NK=_K.getterFor(ZK),BK=Object.getOwnPropertyDescriptor,MK=function(e){if(!dK)return lK[e];var t=BK(lK,e);return t&&t.value},WK=MK("fetch"),YK=MK("Request"),XK=MK("Headers"),QK=YK&&YK.prototype,jK=XK&&XK.prototype,HK=lK.RegExp,JK=lK.TypeError,KK=lK.decodeURIComponent,zK=lK.encodeURIComponent,qK=AK("".charAt),$K=AK([].join),ez=AK([].push),tz=AK("".replace),nz=AK([].shift),rz=AK([].splice),iz=AK("".split),oz=AK("".slice),az=/\+/g,sz=Array(4),uz=function(e){return sz[e-1]||(sz[e-1]=HK("((?:%[\\da-f]{2}){"+e+"})","gi"))},cz=function(e){try{return KK(e)}catch(g6){return e}},lz=function(e){var t=tz(e,az," "),n=4;try{return KK(t)}catch(g6){for(;n;)t=tz(t,uz(n--),cz);return t}},hz=/[!'()~]|%20/g,Az={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},dz=function(e){return Az[e]},fz=function(e){return tz(zK(e),hz,dz)},vz=gK((function(e,t){PK(this,{type:ZK,iterator:LK(UK(e).entries),kind:t})}),"Iterator",(function(){var e=NK(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),pz=function(e){this.entries=[],this.url=null,void 0!==e&&(wK(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===qK(e,0)?oz(e,1):e:DK(e)))};pz.prototype={type:OK,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,u=VK(e);if(u)for(n=(t=LK(e,u)).next;!(r=hK(n,t)).done;){if(o=(i=LK(SK(r.value))).next,(a=hK(o,i)).done||(s=hK(o,i)).done||!hK(o,i).done)throw JK("Expected sequence with length 2");ez(this.entries,{key:DK(a.value),value:DK(s.value)})}else for(var c in e)kK(e,c)&&ez(this.entries,{key:c,value:DK(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=iz(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=iz(t,"="),ez(this.entries,{key:lz(nz(n)),value:lz($K(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],ez(n,fz(e.key)+"="+fz(e.value));return $K(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var mz=function(){bK(this,yz);var e=PK(this,new pz(arguments.length>0?arguments[0]:void 0));dK||(this.length=e.entries.length)},yz=mz.prototype;if(mK(yz,{append:function(e,t){xK(arguments.length,2);var n=UK(this);ez(n.entries,{key:DK(e),value:DK(t)}),dK||this.length++,n.updateURL()},delete:function(e){xK(arguments.length,1);for(var t=UK(this),n=t.entries,r=DK(e),i=0;i<n.length;)n[i].key===r?rz(n,i,1):i++;dK||(this.length=n.length),t.updateURL()},get:function(e){xK(arguments.length,1);for(var t=UK(this).entries,n=DK(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){xK(arguments.length,1);for(var t=UK(this).entries,n=DK(e),r=[],i=0;i<t.length;i++)t[i].key===n&&ez(r,t[i].value);return r},has:function(e){xK(arguments.length,1);for(var t=UK(this).entries,n=DK(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){xK(arguments.length,1);for(var n,r=UK(this),i=r.entries,o=!1,a=DK(e),s=DK(t),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?rz(i,u--,1):(o=!0,n.value=s));o||ez(i,{key:a,value:s}),dK||(this.length=i.length),r.updateURL()},sort:function(){var e=UK(this);FK(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=UK(this).entries,r=TK(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new vz(this,"keys")},values:function(){return new vz(this,"values")},entries:function(){return new vz(this,"entries")}},{enumerable:!0}),vK(yz,GK,yz.entries,{name:"entries"}),vK(yz,"toString",(function(){return UK(this).serialize()}),{enumerable:!0}),dK&&pK(yz,"size",{get:function(){return UK(this).entries.length},configurable:!0,enumerable:!0}),yK(mz,OK),cK({global:!0,constructor:!0,forced:!fK},{URLSearchParams:mz}),!fK&&EK(XK)){var gz=AK(jK.has),_z=AK(jK.set),bz=function(e){if(wK(e)){var t,n=e.body;if(RK(n)===OK)return t=e.headers?new XK(e.headers):new XK,gz(t,"content-type")||_z(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),IK(e,{body:CK(0,DK(n)),headers:CK(0,t)})}return e};if(EK(WK)&&cK({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return WK(e,arguments.length>1?bz(arguments[1]):{})}}),EK(YK)){var Ez=function(e){return bK(this,QK),new YK(e,arguments.length>1?bz(arguments[1]):{})};QK.constructor=Ez,Ez.prototype=QK,cK({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ez})}}var kz,Tz=Dn,Rz=D,Sz=MJ,wz=r,Dz=Jt,Iz=v,Cz=to,Lz=ro,Vz=ad,xz=ze,Fz=wW,Gz=Ay,Oz=ji,Zz=cl.codeAt,Pz=function(e){var t,n,r=[],i=nK(tK(rK(e),QJ,"."),".");for(t=0;t<i.length;t++)n=i[t],eK(r,JJ(XJ,n)?"xn--"+aK(n):n);return $J(r,".")},Uz=Xr,Nz=Do,Bz=md,Mz={URLSearchParams:mz,getState:UK},Wz=Yo,Yz=Wz.set,Xz=Wz.getterFor("URL"),Qz=Mz.URLSearchParams,jz=Mz.getState,Hz=wz.URL,Jz=wz.TypeError,Kz=wz.parseInt,zz=Math.floor,qz=Math.pow,$z=Iz("".charAt),eq=Iz(/./.exec),tq=Iz([].join),nq=Iz(1..toString),rq=Iz([].pop),iq=Iz([].push),oq=Iz("".replace),aq=Iz([].shift),sq=Iz("".split),uq=Iz("".slice),cq=Iz("".toLowerCase),lq=Iz([].unshift),hq="Invalid scheme",Aq="Invalid host",dq="Invalid port",fq=/[a-z]/i,vq=/[\d+-.a-z]/i,pq=/\d/,mq=/^0x/i,yq=/^[0-7]+$/,gq=/^\d+$/,_q=/^[\da-f]+$/i,bq=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Eq=/[\0\t\n\r #/:<>?@[\\\]^|]/,kq=/^[\u0000-\u0020]+/,Tq=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Rq=/[\t\n\r]/g,Sq=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)lq(t,e%256),e=zz(e/256);return tq(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=nq(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},wq={},Dq=Fz({},wq,{" ":1,'"':1,"<":1,">":1,"`":1}),Iq=Fz({},Dq,{"#":1,"?":1,"{":1,"}":1}),Cq=Fz({},Iq,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Lq=function(e,t){var n=Zz(e,0);return n>32&&n<127&&!xz(t,e)?e:encodeURIComponent(e)},Vq={ftp:21,file:null,http:80,https:443,ws:80,wss:443},xq=function(e,t){var n;return 2==e.length&&eq(fq,$z(e,0))&&(":"==(n=$z(e,1))||!t&&"|"==n)},Fq=function(e){var t;return e.length>1&&xq(uq(e,0,2))&&(2==e.length||"/"===(t=$z(e,2))||"\\"===t||"?"===t||"#"===t)},Gq=function(e){return"."===e||"%2e"===cq(e)},Oq={},Zq={},Pq={},Uq={},Nq={},Bq={},Mq={},Wq={},Yq={},Xq={},Qq={},jq={},Hq={},Jq={},Kq={},zq={},qq={},$q={},e$={},t$={},n$={},r$=function(e,t,n){var r,i,o,a=Uz(e);if(t){if(i=this.parse(a))throw Jz(i);this.searchParams=null}else{if(void 0!==n&&(r=new r$(n,!0)),i=this.parse(a,null,r))throw Jz(i);(o=jz(new Qz)).bindURL(this),this.searchParams=o}};r$.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,u=this,c=t||Oq,l=0,h="",A=!1,d=!1,f=!1;for(e=Uz(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=oq(e,kq,""),e=oq(e,Tq,"$1")),e=oq(e,Rq,""),r=Gz(e);l<=r.length;){switch(i=r[l],c){case Oq:if(!i||!eq(fq,i)){if(t)return hq;c=Pq;continue}h+=cq(i),c=Zq;break;case Zq:if(i&&(eq(vq,i)||"+"==i||"-"==i||"."==i))h+=cq(i);else{if(":"!=i){if(t)return hq;h="",c=Pq,l=0;continue}if(t&&(u.isSpecial()!=xz(Vq,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&Vq[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?c=Jq:u.isSpecial()&&n&&n.scheme==u.scheme?c=Uq:u.isSpecial()?c=Wq:"/"==r[l+1]?(c=Nq,l++):(u.cannotBeABaseURL=!0,iq(u.path,""),c=e$)}break;case Pq:if(!n||n.cannotBeABaseURL&&"#"!=i)return hq;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=Oz(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=n$;break}c="file"==n.scheme?Jq:Bq;continue;case Uq:if("/"!=i||"/"!=r[l+1]){c=Bq;continue}c=Yq,l++;break;case Nq:if("/"==i){c=Xq;break}c=$q;continue;case Bq:if(u.scheme=n.scheme,i==kz)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Oz(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())c=Mq;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Oz(n.path),u.query="",c=t$;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Oz(n.path),u.path.length--,c=$q;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Oz(n.path),u.query=n.query,u.fragment="",c=n$}break;case Mq:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=$q;continue}c=Xq}else c=Yq;break;case Wq:if(c=Yq,"/"!=i||"/"!=$z(h,l+1))continue;l++;break;case Yq:if("/"!=i&&"\\"!=i){c=Xq;continue}break;case Xq:if("@"==i){A&&(h="%40"+h),A=!0,o=Gz(h);for(var v=0;v<o.length;v++){var p=o[v];if(":"!=p||f){var m=Lq(p,Cq);f?u.password+=m:u.username+=m}else f=!0}h=""}else if(i==kz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(A&&""==h)return"Invalid authority";l-=Gz(h).length+1,h="",c=Qq}else h+=i;break;case Qq:case jq:if(t&&"file"==u.scheme){c=zq;continue}if(":"!=i||d){if(i==kz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return Aq;if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(h))return a;if(h="",c=qq,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return Aq;if(a=u.parseHost(h))return a;if(h="",c=Hq,t==jq)return}break;case Hq:if(!eq(pq,i)){if(i==kz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=h){var y=Kz(h,10);if(y>65535)return dq;u.port=u.isSpecial()&&y===Vq[u.scheme]?null:y,h=""}if(t)return;c=qq;continue}return dq}h+=i;break;case Jq:if(u.scheme="file","/"==i||"\\"==i)c=Kq;else{if(!n||"file"!=n.scheme){c=$q;continue}if(i==kz)u.host=n.host,u.path=Oz(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=Oz(n.path),u.query="",c=t$;else{if("#"!=i){Fq(tq(Oz(r,l),""))||(u.host=n.host,u.path=Oz(n.path),u.shortenPath()),c=$q;continue}u.host=n.host,u.path=Oz(n.path),u.query=n.query,u.fragment="",c=n$}}break;case Kq:if("/"==i||"\\"==i){c=zq;break}n&&"file"==n.scheme&&!Fq(tq(Oz(r,l),""))&&(xq(n.path[0],!0)?iq(u.path,n.path[0]):u.host=n.host),c=$q;continue;case zq:if(i==kz||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&xq(h))c=$q;else if(""==h){if(u.host="",t)return;c=qq}else{if(a=u.parseHost(h))return a;if("localhost"==u.host&&(u.host=""),t)return;h="",c=qq}continue}h+=i;break;case qq:if(u.isSpecial()){if(c=$q,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=kz&&(c=$q,"/"!=i))continue}else u.fragment="",c=n$;else u.query="",c=t$;break;case $q:if(i==kz||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=cq(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||iq(u.path,"")):Gq(h)?"/"==i||"\\"==i&&u.isSpecial()||iq(u.path,""):("file"==u.scheme&&!u.path.length&&xq(h)&&(u.host&&(u.host=""),h=$z(h,0)+":"),iq(u.path,h)),h="","file"==u.scheme&&(i==kz||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)aq(u.path);"?"==i?(u.query="",c=t$):"#"==i&&(u.fragment="",c=n$)}else h+=Lq(i,Iq);break;case e$:"?"==i?(u.query="",c=t$):"#"==i?(u.fragment="",c=n$):i!=kz&&(u.path[0]+=Lq(i,wq));break;case t$:t||"#"!=i?i!=kz&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":Lq(i,wq)):(u.fragment="",c=n$);break;case n$:i!=kz&&(u.fragment+=Lq(i,Dq))}l++}},parseHost:function(e){var t,n,r;if("["==$z(e,0)){if("]"!=$z(e,e.length-1))return Aq;if(t=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,A=function(){return $z(e,h)};if(":"==A()){if(":"!=$z(e,1))return;h+=2,l=++c}for(;A();){if(8==c)return;if(":"!=A()){for(t=n=0;n<4&&eq(_q,A());)t=16*t+Kz(A(),16),h++,n++;if("."==A()){if(0==n)return;if(h-=n,c>6)return;for(r=0;A();){if(i=null,r>0){if(!("."==A()&&r<4))return;h++}if(!eq(pq,A()))return;for(;eq(pq,A());){if(o=Kz(A(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==A()){if(h++,!A())return}else if(A())return;u[c++]=t}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u}(uq(e,1,-1)),!t)return Aq;this.host=t}else if(this.isSpecial()){if(e=Pz(e),eq(bq,e))return Aq;if(t=function(e){var t,n,r,i,o,a,s,u=sq(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==$z(i,0)&&(o=eq(mq,i)?16:8,i=uq(i,8==o?1:2)),""===i)a=0;else{if(!eq(10==o?gq:8==o?yq:_q,i))return e;a=Kz(i,o)}iq(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=qz(256,5-t))return null}else if(a>255)return null;for(s=rq(n),r=0;r<n.length;r++)s+=n[r]*qz(256,3-r);return s}(e),null===t)return Aq;this.host=t}else{if(eq(Eq,e))return Aq;for(t="",n=Gz(e),r=0;r<n.length;r++)t+=Lq(n[r],wq);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return xz(Vq,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&xq(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=Sq(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+tq(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw Jz(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new i$(e.path[0]).origin}catch(g6){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Sq(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Uz(e)+":",Oq)},getUsername:function(){return this.username},setUsername:function(e){var t=Gz(Uz(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Lq(t[n],Cq)}},getPassword:function(){return this.password},setPassword:function(e){var t=Gz(Uz(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Lq(t[n],Cq)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Sq(e):Sq(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Qq)},getHostname:function(){var e=this.host;return null===e?"":Sq(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,jq)},getPort:function(){var e=this.port;return null===e?"":Uz(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Uz(e))?this.port=null:this.parse(e,Hq))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+tq(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,qq))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Uz(e))?this.query=null:("?"==$z(e,0)&&(e=uq(e,1)),this.query="",this.parse(e,t$)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Uz(e))?("#"==$z(e,0)&&(e=uq(e,1)),this.fragment="",this.parse(e,n$)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var i$=function(e){var t=Vz(this,o$),n=Bz(arguments.length,1)>1?arguments[1]:void 0,r=Yz(t,new r$(e,!1,n));Rz||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},o$=i$.prototype,a$=function(e,t){return{get:function(){return Xz(this)[e]()},set:t&&function(e){return Xz(this)[t](e)},configurable:!0,enumerable:!0}};if(Rz&&(Lz(o$,"href",a$("serialize","setHref")),Lz(o$,"origin",a$("getOrigin")),Lz(o$,"protocol",a$("getProtocol","setProtocol")),Lz(o$,"username",a$("getUsername","setUsername")),Lz(o$,"password",a$("getPassword","setPassword")),Lz(o$,"host",a$("getHost","setHost")),Lz(o$,"hostname",a$("getHostname","setHostname")),Lz(o$,"port",a$("getPort","setPort")),Lz(o$,"pathname",a$("getPathname","setPathname")),Lz(o$,"search",a$("getSearch","setSearch")),Lz(o$,"searchParams",a$("getSearchParams")),Lz(o$,"hash",a$("getHash","setHash"))),Cz(o$,"toJSON",(function(){return Xz(this).serialize()}),{enumerable:!0}),Cz(o$,"toString",(function(){return Xz(this).serialize()}),{enumerable:!0}),Hz){var s$=Hz.createObjectURL,u$=Hz.revokeObjectURL;s$&&Cz(i$,"createObjectURL",Dz(s$,Hz)),u$&&Cz(i$,"revokeObjectURL",Dz(u$,Hz))}Nz(i$,"URL"),Tz({global:!0,constructor:!0,forced:!Sz,sham:!Rz},{URL:i$});var c$=Dn,l$=i,h$=md,A$=Xr,d$=MJ,f$=oe("URL");c$({target:"URL",stat:!0,forced:!(d$&&l$((function(){f$.canParse()})))},{canParse:function(e){var t=h$(arguments.length,1),n=A$(e),r=t<2||void 0===arguments[1]?void 0:A$(arguments[1]);try{return!!new f$(n,r)}catch(g6){return!1}}});var v$=t(ee.URL),p$={exports:{}},m$=i((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),y$=i,g$=$,_$=g,b$=m$,E$=Object.isExtensible,k$=y$((function(){E$(1)}))||b$?function(e){return!!g$(e)&&((!b$||"ArrayBuffer"!=_$(e))&&(!E$||E$(e)))}:E$,T$=!i((function(){return Object.isExtensible(Object.preventExtensions({}))})),R$=Dn,S$=v,w$=ni,D$=$,I$=ze,C$=Kt.f,L$=Pi,V$=Bi,x$=k$,F$=T$,G$=!1,O$=nt("meta"),Z$=0,P$=function(e){C$(e,O$,{value:{objectID:"O"+Z$++,weakData:{}}})},U$=p$.exports={enable:function(){U$.enable=function(){},G$=!0;var e=L$.f,t=S$([].splice),n={};n[O$]=1,e(n).length&&(L$.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===O$){t(r,i,1);break}return r},R$({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:V$.f}))},fastKey:function(e,t){if(!D$(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!I$(e,O$)){if(!x$(e))return"F";if(!t)return"E";P$(e)}return e[O$].objectID},getWeakData:function(e,t){if(!I$(e,O$)){if(!x$(e))return!0;if(!t)return!1;P$(e)}return e[O$].weakData},onFreeze:function(e){return F$&&G$&&x$(e)&&!I$(e,O$)&&P$(e),e}};w$[O$]=!0;var N$=p$.exports,B$=Dn,M$=r,W$=N$,Y$=i,X$=pn,Q$=IA,j$=ad,H$=S,J$=$,K$=Do,z$=Kt.f,q$=qo.forEach,$$=D,e0=Yo.set,t0=Yo.getterFor,n0=Zi,r0=ro,i0=uK,o0=Jt,a0=ad,s0=Y,u0=IA,c0=Ac,l0=dc,h0=rd,A0=D,d0=N$.fastKey,f0=Yo.set,v0=Yo.getterFor,p0={getConstructor:function(e,t,n,r){var i=e((function(e,i){a0(e,o),f0(e,{type:t,index:n0(null),first:void 0,last:void 0,size:0}),A0||(e.size=0),s0(i)||u0(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=v0(t),s=function(e,t,n){var r,i,o=a(e),s=u(e,t);return s?s.value=n:(o.last=s={index:i=d0(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),A0?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var n,r=a(e),i=d0(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i0(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,A0?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),A0?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=o0(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),i0(o,n?{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)}}),A0&&r0(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=v0(t),o=v0(r);c0(e,t,(function(e,t){f0(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?l0("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,l0(void 0,!0))}),n?"entries":"values",!n,!0),h0(t)}};(function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=M$[e],u=s&&s.prototype,c={};if($$&&H$(s)&&(o||u.forEach&&!Y$((function(){(new s).entries().next()})))){var l=(r=t((function(t,n){e0(j$(t,l),{type:e,collection:new s}),null!=n&&Q$(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,h=t0(e);q$(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||X$(l,e,(function(n,r){var i=h(this).collection;if(!t&&o&&!J$(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||z$(l,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else r=n.getConstructor(t,e,i,a),W$.enable();K$(r,e,!1,!0),c[e]=r,B$({global:!0,forced:!0},c),o||n.setStrong(r,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),p0);var m0=ee.Map,y0=Jt,g0=L,_0=Ce,b0=ld,E0=Y,k0=IA,T0=[].push,R0=function(e){var t,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return b0(this),(t=void 0!==a)&&_0(a),E0(e)?new this:(n=[],t?(r=0,i=y0(a,o>2?arguments[2]:void 0),k0(e,(function(e){g0(T0,n,i(e,r++))}))):k0(e,T0,{that:n}),new this(n))};Dn({target:"Map",stat:!0,forced:!0},{from:R0});var S0=Es,w0=function(){return new this(S0(arguments))};Dn({target:"Map",stat:!0,forced:!0},{of:w0});var D0=Se,I0=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(D0(e)+" is not a map")},C0=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},L0=oe("Map"),V0={Map:L0,set:C0("set",2),get:C0("get",1),has:C0("has",1),remove:C0("delete",1),proto:L0.prototype},x0=I0,F0=V0.remove;Dn({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=x0(this),n=!0,r=0,i=arguments.length;r<i;r++)e=F0(t,arguments[r]),n=n&&e;return!!n}});var G0=I0,O0=V0.get,Z0=V0.has,P0=V0.set;Dn({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=G0(this);return Z0(i,e)?(n=O0(i,e),"update"in t&&(n=t.update(n,e,i),P0(i,e,n)),n):(r=t.insert(e,i),P0(i,e,r),r)}});var U0=L,N0=function(e,t,n){for(var r,i,o=n||e.next;!(r=U0(o,e)).done;)if(void 0!==(i=t(r.value)))return i},B0=function(e,t,n){return n?N0(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},M0=Jt,W0=I0,Y0=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=W0(this),n=M0(e,arguments.length>1?arguments[1]:void 0);return!1!==Y0(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var X0=Jt,Q0=I0,j0=B0,H0=V0.Map,J0=V0.set;Dn({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=Q0(this),n=X0(e,arguments.length>1?arguments[1]:void 0),r=new H0;return j0(t,(function(e,i){n(e,i,t)&&J0(r,i,e)})),r}});var K0=Jt,z0=I0,q0=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=z0(this),n=K0(e,arguments.length>1?arguments[1]:void 0),r=q0(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var $0=Jt,e1=I0,t1=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=e1(this),n=$0(e,arguments.length>1?arguments[1]:void 0),r=t1(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var n1=Dn,r1=L,i1=S,o1=Ce,a1=IA,s1=V0.Map,u1=v([].push);n1({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(i1(this)?this:s1);o1(t);var r=o1(n.has),i=o1(n.get),o=o1(n.set);return a1(e,(function(e){var a=t(e);r1(r,n,a)?u1(r1(i,n,a),e):r1(o,n,a,[e])})),n}});var c1=function(e,t){return e===t||e!=e&&t!=t},l1=I0,h1=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===h1(l1(this),(function(t){if(c1(t,e))return!0}),!0)}});var A1=L,d1=IA,f1=S,v1=Ce,p1=V0.Map;Dn({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(f1(this)?this:p1);v1(t);var r=v1(n.set);return d1(e,(function(e){A1(r,n,t(e),e)})),n}});var m1=I0,y1=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=y1(m1(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var g1=Jt,_1=I0,b1=B0,E1=V0.Map,k1=V0.set;Dn({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=_1(this),n=g1(e,arguments.length>1?arguments[1]:void 0),r=new E1;return b1(t,(function(e,i){k1(r,n(e,i,t),e)})),r}});var T1=Jt,R1=I0,S1=B0,w1=V0.Map,D1=V0.set;Dn({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=R1(this),n=T1(e,arguments.length>1?arguments[1]:void 0),r=new w1;return S1(t,(function(e,i){D1(r,i,n(e,i,t))})),r}});var I1=I0,C1=IA,L1=V0.set;Dn({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=I1(this),n=arguments.length,r=0;r<n;)C1(arguments[r++],(function(e,n){L1(t,e,n)}),{AS_ENTRIES:!0});return t}});var V1=Ce,x1=I0,F1=B0,G1=TypeError;Dn({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=x1(this),n=arguments.length<2,r=n?void 0:arguments[1];if(V1(e),F1(t,(function(i,o){n?(n=!1,r=i):r=e(r,i,o,t)})),n)throw G1("Reduce of empty map with no initial value");return r}});var O1=Jt,Z1=I0,P1=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=Z1(this),n=O1(e,arguments.length>1?arguments[1]:void 0);return!0===P1(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var U1=Ce,N1=I0,B1=TypeError,M1=V0.get,W1=V0.has,Y1=V0.set;Dn({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=N1(this),r=arguments.length;U1(t);var i=W1(n,e);if(!i&&r<3)throw B1("Updating absent value");var o=i?M1(n,e):U1(r>2?arguments[2]:void 0)(e,n);return Y1(n,e,t(o,e,n)),n}});var X1=L,Q1=Ce,j1=S,H1=tn,J1=TypeError,K1=function(e,t){var n,r=H1(this),i=Q1(r.get),o=Q1(r.has),a=Q1(r.set),s=arguments.length>2?arguments[2]:void 0;if(!j1(t)&&!j1(s))throw J1("At least one callback required");return X1(o,r,e)?(n=X1(i,r,e),j1(t)&&(n=t(n),X1(a,r,e,n))):j1(s)&&(n=s(),X1(a,r,e,n)),n};Dn({target:"Map",proto:!0,real:!0,forced:!0},{upsert:K1}),Dn({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:K1});var z1=t(m0);function q1(){q1=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=kh||function(e,t,n){e[t]=n.value},i="function"==typeof Th?Th:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return kh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(w){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof A?t:A,a=Sh(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:_(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(w){return{type:"throw",arg:w}}}e.wrap=c;var h={};function A(){}function d(){}function f(){}var v={};u(v,o,(function(){return this}));var p=Ch&&Ch(Ch(R([])));p&&p!==t&&n.call(p,o)&&(v=p);var m=f.prototype=A.prototype=Sh(v);function y(e){var t;ql(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function i(r,o,a,s){var u=l(e[r],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==gl(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function _(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],ql(e).call(e,E,this),this.reset(!0)}function R(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=f,r(m,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:d,configurable:!0}),d.displayName=u(f,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 Lh?Lh(e,f):(e.__proto__=f,u(e,s,"GeneratorFunction")),e.prototype=Sh(m),e},e.awrap=function(e){return{__await:e}},y(g.prototype),u(g.prototype,a,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,i,o){void 0===o&&(o=Op);var a=new g(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return Xp(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=R,T.prototype={constructor:T,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,ql(t=this.tryEntries).call(t,k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+lm(r).call(r,1))&&(this[r]=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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function $1(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(g6){return void n(g6)}s.done?t(u):Op.resolve(u).then(r,i)}function e2(e){return function(){var t=this,n=arguments;return new Op((function(r,i){var o=e.apply(t,n);function a(e){$1(o,r,i,a,s,"next",e)}function s(e){$1(o,r,i,a,s,"throw",e)}a(void 0)}))}}function t2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),kh(e,r.key,r)}}function r2(e,t,n){return t&&n2(e.prototype,t),n&&n2(e,n),kh(e,"prototype",{writable:!1}),e}function i2(e,t,n){return t in e?kh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o2(e){var t;return(o2=Lh?wm(t=Ch).call(t):function(e){return e.__proto__||Ch(e)})(e)}function a2(e,t){var n;return(a2=Lh?wm(n=Lh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function s2(){if("undefined"==typeof Reflect||!Mm)return!1;if(Mm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Mm(Boolean,[],(function(){}))),!0}catch(_6){return!1}}function u2(e,t,n){var r;s2()?u2=wm(r=Mm).call(r):u2=function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(wm(Function).apply(e,r));return n&&a2(i,n.prototype),i};return u2.apply(null,arguments)}function c2(e){var t="function"==typeof z1?new z1:void 0;return c2=function(e){if(null===e||(n=e,-1===kH(r=Function.toString.call(n)).call(r,"[native code]")))return e;var n,r;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 u2(e,arguments,o2(this).constructor)}return i.prototype=Sh(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a2(i,e)},c2(e)}function l2(e,t){if(t&&("object"===gl(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)}var h2=g_,A2=vb("iterator"),d2=!h2((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[A2]||"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"!==n||"x"!==new URL("http://x",void 0).host})),f2=R_,v2=2147483647,p2=/[^\0-\u007E]/,m2=/[.\u3002\uFF0E\uFF61]/g,y2="Overflow: input needs wider integers to process",g2=RangeError,_2=f2(m2.exec),b2=Math.floor,E2=String.fromCharCode,k2=f2("".charCodeAt),T2=f2([].join),R2=f2([].push),S2=f2("".replace),w2=f2("".split),D2=f2("".toLowerCase),I2=function(e){return e+22+75*(e<26)},C2=function(e,t,n){var r=0;for(e=n?b2(e/700):e>>1,e+=b2(e/t);e>455;)e=b2(e/35),r+=36;return b2(r+36*e/(e+38))},L2=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=k2(e,n++);if(i>=55296&&i<=56319&&n<r){var o=k2(e,n++);56320==(64512&o)?R2(t,((1023&i)<<10)+(1023&o)+65536):(R2(t,i),n--)}else R2(t,i)}return t}(e);var n,r,i=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&R2(t,E2(r));var u=t.length,c=u;for(u&&R2(t,"-");c<i;){var l=v2;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<l&&(l=r);var h=c+1;if(l-o>b2((v2-a)/h))throw g2(y2);for(a+=(l-o)*h,o=l,n=0;n<e.length;n++){if((r=e[n])<o&&++a>v2)throw g2(y2);if(r==o){for(var A=a,d=36;;){var f=d<=s?1:d>=s+26?26:d-s;if(A<f)break;var v=A-f,p=36-f;R2(t,E2(I2(f+v%p))),A=b2(v/p),d+=36}R2(t,E2(I2(A))),s=C2(a,h,c==u),a=0,c++}}a++,o++}return T2(t,"")},V2=uS,x2=s_,F2=Ob,G2=R_,O2=gb,Z2=d2,P2=Sk,U2=EZ,N2=kI,B2=QG,M2=uk,W2=LI,Y2=Y_,X2=G_,Q2=Kk,j2=Zk,H2=xb,J2=Eb,K2=CS,z2=Aw,q2=BE,$2=wV,e5=_V,t5=WI,n5=SM,r5=vb("iterator"),i5="URLSearchParams",o5=i5+"Iterator",a5=M2.set,s5=M2.getterFor(i5),u5=M2.getterFor(o5),c5=Object.getOwnPropertyDescriptor,l5=function(e){if(!O2)return x2[e];var t=c5(x2,e);return t&&t.value},h5=l5("fetch"),A5=l5("Request"),d5=l5("Headers"),f5=A5&&A5.prototype,v5=d5&&d5.prototype,p5=x2.RegExp,m5=x2.TypeError,y5=x2.decodeURIComponent,g5=x2.encodeURIComponent,_5=G2("".charAt),b5=G2([].join),E5=G2([].push),k5=G2("".replace),T5=G2([].shift),R5=G2([].splice),S5=G2("".split),w5=G2("".slice),D5=/\+/g,I5=Array(4),C5=function(e){return I5[e-1]||(I5[e-1]=p5("((?:%[\\da-f]{2}){"+e+"})","gi"))},L5=function(e){try{return y5(e)}catch(g6){return e}},V5=function(e){var t=k5(e,D5," "),n=4;try{return y5(t)}catch(g6){for(;n;)t=k5(t,C5(n--),L5);return t}},x5=/[!'()~]|%20/g,F5={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},G5=function(e){return F5[e]},O5=function(e){return k5(g5(e),x5,G5)},Z5=B2((function(e,t){a5(this,{type:o5,iterator:$2(s5(e).entries),kind:t})}),"Iterator",(function(){var e=u5(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),P5=function(e){this.entries=[],this.url=null,void 0!==e&&(J2(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===_5(e,0)?w5(e,1):e:K2(e)))};P5.prototype={type:i5,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,u=e5(e);if(u)for(n=(t=$2(e,u)).next;!(r=F2(n,t)).done;){if(o=(i=$2(H2(r.value))).next,(a=F2(o,i)).done||(s=F2(o,i)).done||!F2(o,i).done)throw m5("Expected sequence with length 2");E5(this.entries,{key:K2(a.value),value:K2(s.value)})}else for(var c in e)X2(e,c)&&E5(this.entries,{key:c,value:K2(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=S5(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=S5(t,"="),E5(this.entries,{key:V5(T5(n)),value:V5(b5(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],E5(n,O5(e.key)+"="+O5(e.value));return b5(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var U5=function(){W2(this,N5),a5(this,new P5(arguments.length>0?arguments[0]:void 0))},N5=U5.prototype;if(U2(N5,{append:function(e,t){t5(arguments.length,2);var n=s5(this);E5(n.entries,{key:K2(e),value:K2(t)}),n.updateURL()},delete:function(e){t5(arguments.length,1);for(var t=s5(this),n=t.entries,r=K2(e),i=0;i<n.length;)n[i].key===r?R5(n,i,1):i++;t.updateURL()},get:function(e){t5(arguments.length,1);for(var t=s5(this).entries,n=K2(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){t5(arguments.length,1);for(var t=s5(this).entries,n=K2(e),r=[],i=0;i<t.length;i++)t[i].key===n&&E5(r,t[i].value);return r},has:function(e){t5(arguments.length,1);for(var t=s5(this).entries,n=K2(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){t5(arguments.length,1);for(var n,r=s5(this),i=r.entries,o=!1,a=K2(e),s=K2(t),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?R5(i,u--,1):(o=!0,n.value=s));o||E5(i,{key:a,value:s}),r.updateURL()},sort:function(){var e=s5(this);n5(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=s5(this).entries,r=Q2(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new Z5(this,"keys")},values:function(){return new Z5(this,"values")},entries:function(){return new Z5(this,"entries")}},{enumerable:!0}),P2(N5,r5,N5.entries,{name:"entries"}),P2(N5,"toString",(function(){return s5(this).serialize()}),{enumerable:!0}),N2(U5,i5),V2({global:!0,constructor:!0,forced:!Z2},{URLSearchParams:U5}),!Z2&&Y2(d5)){var B5=G2(v5.has),M5=G2(v5.set),W5=function(e){if(J2(e)){var t,n=e.body;if(j2(n)===i5)return t=e.headers?new d5(e.headers):new d5,B5(t,"content-type")||M5(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),z2(e,{body:q2(0,K2(n)),headers:q2(0,t)})}return e};if(Y2(h5)&&V2({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return h5(e,arguments.length>1?W5(arguments[1]):{})}}),Y2(A5)){var Y5=function(e){return W2(this,f5),new A5(e,arguments.length>1?W5(arguments[1]):{})};f5.constructor=Y5,Y5.prototype=f5,V2({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Y5})}}var X5,Q5=uS,j5=gb,H5=d2,J5=s_,K5=Kk,z5=R_,q5=Sk,$5=tJ,e4=LI,t4=G_,n4=MW,r4=function(e){var t=bJ(e),n=TJ(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=gJ(i,r>2?arguments[2]:void 0));var a,s,u,c,l,h,A=DJ(t),d=0;if(!A||this===IJ&&kJ(A))for(a=RJ(t),s=n?new this(a):IJ(a);a>d;d++)h=o?i(t[d],d):t[d],SJ(s,d,h);else for(l=(c=wJ(t,A)).next,s=n?new this:[];!(u=_J(l,c)).done;d++)h=o?EJ(c,i,[u.value,d],!0):u.value,SJ(s,d,h);return s.length=d,s},i4=gS,o4=vD.codeAt,a4=function(e){var t,n,r=[],i=w2(S2(D2(e),m2,"."),".");for(t=0;t<i.length;t++)n=i[t],R2(r,_2(p2,n)?"xn--"+L2(n):n);return T2(r,".")},s4=CS,u4=kI,c4=WI,l4={URLSearchParams:U5,getState:s5},h4=uk,A4=h4.set,d4=h4.getterFor("URL"),f4=l4.URLSearchParams,v4=l4.getState,p4=J5.URL,m4=J5.TypeError,y4=J5.parseInt,g4=Math.floor,_4=Math.pow,b4=z5("".charAt),E4=z5(/./.exec),k4=z5([].join),T4=z5(1..toString),R4=z5([].pop),S4=z5([].push),w4=z5("".replace),D4=z5([].shift),I4=z5("".split),C4=z5("".slice),L4=z5("".toLowerCase),V4=z5([].unshift),x4="Invalid scheme",F4="Invalid host",G4="Invalid port",O4=/[a-z]/i,Z4=/[\d+-.a-z]/i,P4=/\d/,U4=/^0x/i,N4=/^[0-7]+$/,B4=/^\d+$/,M4=/^[\da-f]+$/i,W4=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Y4=/[\0\t\n\r #/:<>?@[\\\]^|]/,X4=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Q4=/[\t\n\r]/g,j4=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)V4(t,e%256),e=g4(e/256);return k4(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=T4(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},H4={},J4=n4({},H4,{" ":1,'"':1,"<":1,">":1,"`":1}),K4=n4({},J4,{"#":1,"?":1,"{":1,"}":1}),z4=n4({},K4,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),q4=function(e,t){var n=o4(e,0);return n>32&&n<127&&!t4(t,e)?e:encodeURIComponent(e)},$4={ftp:21,file:null,http:80,https:443,ws:80,wss:443},e3=function(e,t){var n;return 2==e.length&&E4(O4,b4(e,0))&&(":"==(n=b4(e,1))||!t&&"|"==n)},t3=function(e){var t;return e.length>1&&e3(C4(e,0,2))&&(2==e.length||"/"===(t=b4(e,2))||"\\"===t||"?"===t||"#"===t)},n3=function(e){return"."===e||"%2e"===L4(e)},r3={},i3={},o3={},a3={},s3={},u3={},c3={},l3={},h3={},A3={},d3={},f3={},v3={},p3={},m3={},y3={},g3={},_3={},b3={},E3={},k3={},T3=function(e,t,n){var r,i,o,a=s4(e);if(t){if(i=this.parse(a))throw m4(i);this.searchParams=null}else{if(void 0!==n&&(r=new T3(n,!0)),i=this.parse(a,null,r))throw m4(i);(o=v4(new f4)).bindURL(this),this.searchParams=o}};T3.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,u=this,c=t||r3,l=0,h="",A=!1,d=!1,f=!1;for(e=s4(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=w4(e,X4,"")),e=w4(e,Q4,""),r=r4(e);l<=r.length;){switch(i=r[l],c){case r3:if(!i||!E4(O4,i)){if(t)return x4;c=o3;continue}h+=L4(i),c=i3;break;case i3:if(i&&(E4(Z4,i)||"+"==i||"-"==i||"."==i))h+=L4(i);else{if(":"!=i){if(t)return x4;h="",c=o3,l=0;continue}if(t&&(u.isSpecial()!=t4($4,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&$4[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?c=p3:u.isSpecial()&&n&&n.scheme==u.scheme?c=a3:u.isSpecial()?c=l3:"/"==r[l+1]?(c=s3,l++):(u.cannotBeABaseURL=!0,S4(u.path,""),c=b3)}break;case o3:if(!n||n.cannotBeABaseURL&&"#"!=i)return x4;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=i4(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=k3;break}c="file"==n.scheme?p3:u3;continue;case a3:if("/"!=i||"/"!=r[l+1]){c=u3;continue}c=h3,l++;break;case s3:if("/"==i){c=A3;break}c=_3;continue;case u3:if(u.scheme=n.scheme,i==X5)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=i4(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())c=c3;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=i4(n.path),u.query="",c=E3;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=i4(n.path),u.path.length--,c=_3;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=i4(n.path),u.query=n.query,u.fragment="",c=k3}break;case c3:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=_3;continue}c=A3}else c=h3;break;case l3:if(c=h3,"/"!=i||"/"!=b4(h,l+1))continue;l++;break;case h3:if("/"!=i&&"\\"!=i){c=A3;continue}break;case A3:if("@"==i){A&&(h="%40"+h),A=!0,o=r4(h);for(var v=0;v<o.length;v++){var p=o[v];if(":"!=p||f){var m=q4(p,z4);f?u.password+=m:u.username+=m}else f=!0}h=""}else if(i==X5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(A&&""==h)return"Invalid authority";l-=r4(h).length+1,h="",c=d3}else h+=i;break;case d3:case f3:if(t&&"file"==u.scheme){c=y3;continue}if(":"!=i||d){if(i==X5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return F4;if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(h))return a;if(h="",c=g3,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return F4;if(a=u.parseHost(h))return a;if(h="",c=v3,t==f3)return}break;case v3:if(!E4(P4,i)){if(i==X5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=h){var y=y4(h,10);if(y>65535)return G4;u.port=u.isSpecial()&&y===$4[u.scheme]?null:y,h=""}if(t)return;c=g3;continue}return G4}h+=i;break;case p3:if(u.scheme="file","/"==i||"\\"==i)c=m3;else{if(!n||"file"!=n.scheme){c=_3;continue}if(i==X5)u.host=n.host,u.path=i4(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=i4(n.path),u.query="",c=E3;else{if("#"!=i){t3(k4(i4(r,l),""))||(u.host=n.host,u.path=i4(n.path),u.shortenPath()),c=_3;continue}u.host=n.host,u.path=i4(n.path),u.query=n.query,u.fragment="",c=k3}}break;case m3:if("/"==i||"\\"==i){c=y3;break}n&&"file"==n.scheme&&!t3(k4(i4(r,l),""))&&(e3(n.path[0],!0)?S4(u.path,n.path[0]):u.host=n.host),c=_3;continue;case y3:if(i==X5||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&e3(h))c=_3;else if(""==h){if(u.host="",t)return;c=g3}else{if(a=u.parseHost(h))return a;if("localhost"==u.host&&(u.host=""),t)return;h="",c=g3}continue}h+=i;break;case g3:if(u.isSpecial()){if(c=_3,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=X5&&(c=_3,"/"!=i))continue}else u.fragment="",c=k3;else u.query="",c=E3;break;case _3:if(i==X5||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=L4(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||S4(u.path,"")):n3(h)?"/"==i||"\\"==i&&u.isSpecial()||S4(u.path,""):("file"==u.scheme&&!u.path.length&&e3(h)&&(u.host&&(u.host=""),h=b4(h,0)+":"),S4(u.path,h)),h="","file"==u.scheme&&(i==X5||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)D4(u.path);"?"==i?(u.query="",c=E3):"#"==i&&(u.fragment="",c=k3)}else h+=q4(i,K4);break;case b3:"?"==i?(u.query="",c=E3):"#"==i?(u.fragment="",c=k3):i!=X5&&(u.path[0]+=q4(i,H4));break;case E3:t||"#"!=i?i!=X5&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":q4(i,H4)):(u.fragment="",c=k3);break;case k3:i!=X5&&(u.fragment+=q4(i,J4))}l++}},parseHost:function(e){var t,n,r;if("["==b4(e,0)){if("]"!=b4(e,e.length-1))return F4;if(t=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,A=function(){return b4(e,h)};if(":"==A()){if(":"!=b4(e,1))return;h+=2,l=++c}for(;A();){if(8==c)return;if(":"!=A()){for(t=n=0;n<4&&E4(M4,A());)t=16*t+y4(A(),16),h++,n++;if("."==A()){if(0==n)return;if(h-=n,c>6)return;for(r=0;A();){if(i=null,r>0){if(!("."==A()&&r<4))return;h++}if(!E4(P4,A()))return;for(;E4(P4,A());){if(o=y4(A(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==A()){if(h++,!A())return}else if(A())return;u[c++]=t}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u}(C4(e,1,-1)),!t)return F4;this.host=t}else if(this.isSpecial()){if(e=a4(e),E4(W4,e))return F4;if(t=function(e){var t,n,r,i,o,a,s,u=I4(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==b4(i,0)&&(o=E4(U4,i)?16:8,i=C4(i,8==o?1:2)),""===i)a=0;else{if(!E4(10==o?B4:8==o?N4:M4,i))return e;a=y4(i,o)}S4(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=_4(256,5-t))return null}else if(a>255)return null;for(s=R4(n),r=0;r<n.length;r++)s+=n[r]*_4(256,3-r);return s}(e),null===t)return F4;this.host=t}else{if(E4(Y4,e))return F4;for(t="",n=r4(e),r=0;r<n.length;r++)t+=q4(n[r],H4);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return t4($4,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&e3(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=j4(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+k4(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw m4(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new R3(e.path[0]).origin}catch(g6){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+j4(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(s4(e)+":",r3)},getUsername:function(){return this.username},setUsername:function(e){var t=r4(s4(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=q4(t[n],z4)}},getPassword:function(){return this.password},setPassword:function(e){var t=r4(s4(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=q4(t[n],z4)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?j4(e):j4(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,d3)},getHostname:function(){var e=this.host;return null===e?"":j4(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,f3)},getPort:function(){var e=this.port;return null===e?"":s4(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=s4(e))?this.port=null:this.parse(e,v3))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+k4(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,g3))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=s4(e))?this.query=null:("?"==b4(e,0)&&(e=C4(e,1)),this.query="",this.parse(e,E3)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=s4(e))?("#"==b4(e,0)&&(e=C4(e,1)),this.fragment="",this.parse(e,k3)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var R3=function(e){var t=e4(this,S3),n=c4(arguments.length,1)>1?arguments[1]:void 0,r=A4(t,new T3(e,!1,n));j5||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},S3=R3.prototype,w3=function(e,t){return{get:function(){return d4(this)[e]()},set:t&&function(e){return d4(this)[t](e)},configurable:!0,enumerable:!0}};if(j5&&($5(S3,"href",w3("serialize","setHref")),$5(S3,"origin",w3("getOrigin")),$5(S3,"protocol",w3("getProtocol","setProtocol")),$5(S3,"username",w3("getUsername","setUsername")),$5(S3,"password",w3("getPassword","setPassword")),$5(S3,"host",w3("getHost","setHost")),$5(S3,"hostname",w3("getHostname","setHostname")),$5(S3,"port",w3("getPort","setPort")),$5(S3,"pathname",w3("getPathname","setPathname")),$5(S3,"search",w3("getSearch","setSearch")),$5(S3,"searchParams",w3("getSearchParams")),$5(S3,"hash",w3("getHash","setHash"))),q5(S3,"toJSON",(function(){return d4(this).serialize()}),{enumerable:!0}),q5(S3,"toString",(function(){return d4(this).serialize()}),{enumerable:!0}),p4){var D3=p4.createObjectURL,I3=p4.revokeObjectURL;D3&&q5(R3,"createObjectURL",K5(D3,p4)),I3&&q5(R3,"revokeObjectURL",K5(I3,p4))}function C3(){var e,t,n=new Op((function(n,r){e=n,t=r}));return n.used=!1,n.resolve=function(){return n.used=!0,e.apply(void 0,arguments)},n.reject=function(){return n.used=!0,t.apply(void 0,arguments)},n}function L3(){try{return sg(performance.now(),10)}catch(_6){return(new Date).getTime()}}u4(R3,"URL"),Q5({global:!0,constructor:!0,forced:!H5,sham:!j5},{URL:R3});var V3,x3=function(){function e(){t2(this,e)}return r2(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(g6){}}},{key:"buffers",value:function(e,t){if(!e||!e.length)return[];for(var n=[],r=0,i=e.length;r<i;r++){var o=n.length;if(o&&t){var a=n[o-1],s=a[1];if(e.start(r)-s<=t){var u=e.end(r);u>s&&(a[1]=u)}else n.push([e.start(r),e.end(r)])}else n.push([e.start(r),e.end(r)])}return n}},{key:"totalLength",value:function(e){return e&&e.length?kY(e).call(e,(function(e,t){return e+(t[1]-t[0])}),0):0}},{key:"info",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t||!t.length)return{start:0,end:0,buffers:[]};for(var i=0,o=0,a=0,s=0,u=0,c=0,l=0,h=e.buffers(t,r),A=0,d=h.length;A<d;A++){var f=h[A];if(n+r>=f[0]&&n<f[1])i=f[0],o=f[1],a=A;else{if(n+r<f[0]){s=f[0],u=f[1];break}n+r>f[1]&&(c=f[0],l=f[1])}}return{start:i,end:o,index:a,buffers:h,nextStart:s,nextEnd:u,prevStart:c,prevEnd:l,currentTime:n,behind:n-i,remaining:o?o-n:0,length:e.totalLength&&e.totalLength(h)}}}]),e}(),F3="network",G3="network_timeout",O3="demux",Z3="remux",P3="media",U3="other",N3={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",OPTION:"OPTION"},B3=(i2(V3={},"manifest",{HLS:1100}),i2(V3,F3,2100),i2(V3,G3,2101),i2(V3,O3,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400}),i2(V3,Z3,{FMP4:4100,MP4:4200}),i2(V3,P3,{MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203}),i2(V3,U3,8e3),V3),M3=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=Sh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),kh(e,"prototype",{writable:!1}),t&&a2(e,t)}(i,e);var t,n,r=(t=i,n=s2(),function(){var e,r=o2(t);if(n){var i=o2(this).constructor;e=Mm(r,arguments,i)}else e=r.apply(this,arguments);return l2(this,e)});function i(e,t,n,o,a){var s;return t2(this,i),(s=r.call(this,a||(null==n?void 0:n.message))).errorType=e===G3?F3:e,s.originError=n,s.ext=o,s.errorCode=B3[e][t]||B3[e],s.errorMessage=s.message,s.errorCode||(s.errorType=U3,s.errorCode=B3[s.errorType]),s}return r2(i,null,[{key:"create",value:function(e,t,n,r,o){return e instanceof i?e:(e instanceof Error&&(n=e,e=""),e||(e=U3),new i(e,t,n,r,o))}},{key:"network",value:function(e){var t;return new i(null!=e&&e.isTimeout?G3:F3,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})}}]),i}(c2(Error)),W3="undefined"!=typeof window,Y3=function(){function e(t){t2(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]")}return r2(e,[{key:"debug",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).debug.apply(n,Ag(t=[this._prefix,L3()]).call(t,i))}}},{key:"log",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).log.apply(n,Ag(t=[this._prefix,L3()]).call(t,i))}}},{key:"warn",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).warn.apply(n,Ag(t=[this._prefix,L3()]).call(t,i))}}},{key:"error",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).error.apply(n,Ag(t=[this._prefix,L3()]).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}();i2(Y3,"disabled",!0);var X3=function(){try{return W3?window.MediaSource:null}catch(_6){}}(),Q3="appendBuffer",j3="removeBuffer",H3=function(){function e(t,n){var r=this;t2(this,e),i2(this,"media",null),i2(this,"mediaSource",null),i2(this,"_openPromise",C3()),i2(this,"_queue",Sh(null)),i2(this,"_sourceBuffer",Sh(null)),i2(this,"_mseFullFlag",{}),i2(this,"_st",0),i2(this,"_opst",0),i2(this,"_logger",null),i2(this,"_config",null),i2(this,"_url",null),i2(this,"_onSBUpdateEnd",(function(e){var t=r._queue[e];if(t){var n=t.shift();if(n){var i=L3()-r._opst;r._logger.debug("UpdateEnd",n.opName,i,n.context),n.promise.resolve({name:n.opName,context:n.context,costtime:i}),r._startQueue(e)}}})),i2(this,"_onSBUpdateError",(function(e,t){var n=r._queue[e];if(n){var i=n[0];i&&(r._logger.error("UpdateError",e,i.opName,i.context),i.promise.reject(new M3(P3,N3.MSE_APPEND_BUFFER,t)))}})),this._config=IW(e.getDefaultConfig(),n),t&&this.bindMedia(t),this._logger=new Y3("MSE"),this._config.openLog&&Y3.enable()}var t,n,r;return r2(e,[{key:"isOpened",get:function(){var e;return"open"===(null===(e=this.mediaSource)||void 0===e?void 0:e.readyState)}},{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:"isFull",value:function(t){return t?this._mseFullFlag[t]:this._mseFullFlag[e.VIDEO]}},{key:"updateDuration",value:function(e){var t=this;return this.mediaSource&&this.mediaSource.duration>e?Op.resolve():this._enqueueBlockingOp((function(){t.isEnded?t._logger.debug("[debug mse] setDuration ended"):t.mediaSource&&(t.mediaSource.duration=e,t._logger.debug("[debug mse] setDuration"))}),"updateDuration")}},{key:"open",value:function(){var e=this;if(this._openPromise.used&&!this.isOpened&&this.mediaSource){var t=this.mediaSource;t.addEventListener("sourceopen",(function n(){var r=L3()-e._st;e._logger.debug("MSE OPEN",r),t.removeEventListener("sourceopen",n),e._openPromise.resolve({costtime:r})})),this._openPromise=C3()}return this._openPromise}},{key:"bindMedia",value:(r=e2(q1().mark((function e(t){var n,r,i=this;return q1().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(t&&X3){e.next=5;break}throw new Error("Param media or MediaSource does not exist");case 5:return this.media=t,n=this.mediaSource=new X3,this._st=L3(),r=function e(){var r=L3()-i._st;i._logger.debug("MSE OPEN"),n.removeEventListener("sourceopen",e),v$.revokeObjectURL(t.src),i._openPromise.resolve({costtime:r})},n.addEventListener("sourceopen",r),this._url=v$.createObjectURL(n),t.src=this._url,e.abrupt("return",this._openPromise);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"unbindMedia",value:(n=e2(q1().mark((function e(){var t,n,r,i=this;return q1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._openPromise.used||this._openPromise.resolve(),t=this.mediaSource){var o,a;if(ql(o=El(this._queue)).call(o,(function(e){var t=i._queue[e];t&&ql(t).call(t,(function(e){return e.promise.resolve}))})),n=!!this.media&&this.media.readyState>=1,r="open"===t.readyState,n&&r)try{t.endOfStream()}catch(g6){}ql(a=El(this._sourceBuffer)).call(a,(function(e){try{t.removeSourceBuffer(i._sourceBuffer[e])}catch(g6){}}))}if(this.media){this.media.removeAttribute("src");try{this.media.load()}catch(g6){}this.media=null}this.mediaSource=null,this._openPromise=C3(),this._queue=Sh(null),this._sourceBuffer=Sh(null);case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"createSource",value:function(e,t){var n,r;if(!this._sourceBuffer[e]&&this.mediaSource){var i;try{i=this._sourceBuffer[e]=this.mediaSource.addSourceBuffer(t)}catch(g6){throw new M3(P3,N3.MSE_ADD_SB,g6)}i.mimeType=t,i.addEventListener("updateend",wm(n=this._onSBUpdateEnd).call(n,this,e)),i.addEventListener("error",wm(r=this._onSBUpdateError).call(r,this,e))}}},{key:"changeType",value:function(e,t){var n=this,r=this._sourceBuffer[e];return this.mediaSource&&r&&r.mimeType!==t&&"function"==typeof r.changeType?this._enqueueOp(e,(function(){r.changeType(t),r.mimeType=t,n._onSBUpdateEnd(e)})):Op.resolve()}},{key:"createOrChangeSource",value:function(e,t){return this.createSource(e,t),this.changeType(e,t)}},{key:"append",value:function(e,t,n){var r=this;return t&&t.byteLength&&this._sourceBuffer[e]?this._enqueueOp(e,(function(){var i;r.mediaSource&&(r._logger.debug("MSE APPEND START",n),r._opst=L3(),null===(i=r._sourceBuffer[e])||void 0===i||i.appendBuffer(t))}),Q3,n):Op.resolve()}},{key:"remove",value:function(e,t,n,r){var i=this,o=!1;return this._mseFullFlag[e]&&(o=!0),this._enqueueOp(e,(function(){if(i.mediaSource){var o=i._sourceBuffer[e];t>=n||!o?i._onSBUpdateEnd(e):(i._opst=L3(),i._logger.debug("MSE REMOVE START",e,t,n,r),o.remove(t,n))}}),j3,r,o)}},{key:"clearBuffer",value:function(e,t){var n,r,i=this;return ql(n=El(this._sourceBuffer)).call(n,(function(n){r=i._enqueueOp(n,(function(){if(i.mediaSource){var r=i._sourceBuffer[n];i._logger.debug("MSE clearBuffer START",n,e,t),r.remove(e,t)}}))})),r}},{key:"clearAllBuffer",value:function(){var e,t,n=this;return ql(e=El(this._sourceBuffer)).call(e,(function(e){t=n._enqueueOp(e,(function(){if(n.mediaSource){var t=n._sourceBuffer[e];n._logger.debug("MSE clearAllBuffer START",e),t.remove(0,x3.end(x3.get(t)))}}))})),t}},{key:"clearOpQueues",value:function(e){var t;this._logger.debug("MSE clearOpQueue START");var n=this._queue[e];if(n&&n[e]&&!(n.length<5)){var r=[];ql(n).call(n,(function(e){e.context&&e.context.isinit&&r.push(e)})),this._queue[e]=lm(n).call(n,0,2),r.length>0&&(t=this._queue[e]).push.apply(t,r)}}},{key:"endOfStream",value:function(e){var t=this;return this.mediaSource&&"open"===this.mediaSource.readyState?this._enqueueBlockingOp((function(){var n=t.mediaSource;n&&"open"===n.readyState&&(t._logger.debug("MSE endOfStream START"),e?n.endOfStream(e):n.endOfStream())}),"endOfStream"):Op.resolve()}},{key:"setLiveSeekableRange",value:function(e,t){var n=this.mediaSource;e<0||t<e||null==n||!n.setLiveSeekableRange||"open"!==n.readyState||n.setLiveSeekableRange(e,t)}},{key:"getSourceBuffer",value:function(e){return this._sourceBuffer[e]}},{key:"buffered",value:function(e){return x3.get(this._sourceBuffer[e])}},{key:"bufferStart",value:function(e){return x3.start(this.buffered(e))}},{key:"bufferEnd",value:function(e){return x3.end(this.buffered(e))}},{key:"_enqueueOp",value:function(e,t,n,r,i){var o=this;if(!this.mediaSource)return Op.resolve();var a=this._queue[e]=this._queue[e]||[],s={exec:t,promise:C3(),opName:n,context:r};return i?(ZQ(a).call(a,0,0,s),this._mseFullFlag[e]=!1,this._startQueue(e)):a.push(s),this.isOpened?1===a.length&&this._startQueue(e):this._openPromise.then((function(){1===a.length&&o._startQueue(e)})),s.promise}},{key:"_enqueueBlockingOp",value:(t=e2(q1().mark((function e(t,n){var r,i,o=this;return q1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mediaSource){e.next=2;break}return e.abrupt("return",Op.resolve());case 2:if((r=El(this._sourceBuffer)).length){e.next=5;break}return e.abrupt("return",t());case 5:return i=[],ql(r).call(r,(function(e){var t=o._queue[e],r=C3();i.push(r),t.push({exec:function(){return r.resolve()},promise:r,opName:n}),1===t.length&&o._startQueue(e)})),e.abrupt("return",Op.all(i).then((function(){try{return t()}finally{ql(r).call(r,(function(e){var t=o._queue[e],n=o._sourceBuffer[e];null==t||t.shift(),n&&n.updating||o._startQueue(e)}))}})));case 8:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"_startQueue",value:function(e){var t=this._queue[e];if(t){var n=t[0];if(n&&!this._mseFullFlag[e])try{n.exec()}catch(g6){var r;g6&&g6.message&&kH(r=g6.message).call(r,"SourceBuffer is full")>=0?(this._mseFullFlag[e]=!0,this._logger.error("[MSE error], context,",n.context," ,name,",n.opName,",err,SourceBuffer is full"),n.promise.reject(new M3(P3,N3.MSE_FULL,g6))):(this._logger.error(g6),n.promise.reject(new M3(P3,N3.MSE_OTHER,g6)),t.shift(),this._startQueue(e))}}}},{key:"setTimeoffset",value:function(e,t,n){var r=this;return this._enqueueOp(e,(function(){t<0&&(t+=.001),r._sourceBuffer[e].timestampOffset=t,r._onSBUpdateEnd(e)}),"setTimeoffset",n)}},{key:"abort",value:function(e,t){var n=this;return this.isOpened?this._enqueueOp(e,(function(){n._sourceBuffer[e].abort(),n._onSBUpdateEnd(e)}),"abort",t):Op.resolve()}}],[{key:"getDefaultConfig",value:function(){return{openLog:!1}}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if(!X3)return!1;try{return X3.isTypeSupported(e)}catch(g6){return this._logger.error(e,g6),!1}}}]),e}();i2(H3,"VIDEO","video"),i2(H3,"AUDIO","audio");var J3={"mp4a.40.5":1,"mp4a.40.2":2},K3=.05,z3=new(function(){function e(){_y(this,e),ky(this,"_queue",[]),"undefined"!=typeof document&&(this._tempMedia=document.createElement("video"))}return Ey(e,[{key:"tempMedia",get:function(){return this._tempMedia}},{key:"hasCached",get:function(){var e,t;return-1!==fQ(e=this._queue).call(e,(function(e){return 1===e.codec}))&&-1!==fQ(t=this._queue).call(t,(function(e){return 2===e.codec}))}},{key:"getCachedMedia",value:function(e){var t,n,r=fQ(t=this._queue).call(t,(function(t){return t.codec===e}));return-1!==r?ZQ(n=this._queue).call(n,r,1)[0]:null}},{key:"cacheMedia",value:function(e){var t,n,r=e.codec,i=e.media,o=e.mse,a=J3[r];if(this._queue=Ll(t=this._queue).call(t,(function(e){var t;return e.mse&&!e.mse.isOpened&&e.mse.unbindMedia(),null===(t=e.mse)||void 0===t?void 0:t.isOpened})),!r||Ll(n=this._queue).call(n,(function(e){return e.codec===a})).length>2)return null==o||o.endOfStream(),void(null==o||o.unbindMedia());this._queue.push({codec:a,media:i,mse:o})}}]),e}()),q3=function(e){Ty(o,e);var t,n,r,i=Dy(o);function o(e,t){var n;return _y(this,o),ky(wy(n=i.call(this,e,t)),"_media",void 0),ky(wy(n),"_isTempMedia",!1),ky(wy(n),"_mse",void 0),ky(wy(n),"_remuxer",null),ky(wy(n),"_codec",""),ky(wy(n),"_sourceCreated",!1),ky(wy(n),"_needInitSegment",!0),ky(wy(n),"_seekNoSideEffect",!1),ky(wy(n),"_startRendered",!1),ky(wy(n),"_firstTimeAppendedBuffer",!1),ky(wy(n),"_sampleQueue",[]),ky(wy(n),"_inProcessing",!1),ky(wy(n),"_duration",0),ky(wy(n),"_mediaCache",z3),ky(wy(n),"_resetDts",(function(){})),ky(wy(n),"_onCanplay",(function(){n._ready||(n._ready=!0,n.emit(BY.AUDIO_READY))})),ky(wy(n),"_onPlaying",(function(){n._parent.ready&&(n._audioCanAutoplay=!0,n._emitTimelineEvents(WY.PLAY_EVENT,UY.PLAYING))})),ky(wy(n),"_onWaiting",(function(){if(!n._seekNoSideEffect){try{for(var e,t=n._media.buffered,r=n._media.currentTime,i=0,o=0,a=t.length;o<a;o++)t.start(o)<r&&t.end(o)>r&&(i=t.end(o)-r);if(Math.abs(i)>.5)return;if(Math.abs(n._media.duration-n._media.currentTime)<.3)return n._reuseMse||n._mse.endOfStream(),void(null===(e=wy(n))||void 0===e||e._emitTimelineEvents(WY.PLAY_EVENT,UY.ENDED))}catch(_6){}n._ready=!1,n.emit(BY.AUDIO_WAITING)}})),ky(wy(n),"_onSeeked",(function(){n._seekNoSideEffect||n._isLive?n._seekNoSideEffect=!1:(dW.log(n.TAG,"seeked"),n._ready||(n._media.pause(),n._ready=!0,n.emit(BY.AUDIO_READY)))})),ky(wy(n),"_onProgress",(function(){if(n._media.readyState<=1){var e=n._getBufferGap();e>0&&e<1&&(n._media.currentTime+=e+K3,dW.warn(n.TAG,"progress, gap=",e))}n._emitTimelineEvents(WY.PLAY_EVENT,UY.PROGRESS),n._emitTimelineEvents(WY.PLAY_EVENT,UY.DURATION_CHANGE)})),ky(wy(n),"_onEnded",(function(){var e;dW.log(n.TAG,"ended!"),null===(e=wy(n))||void 0===e||e._emitTimelineEvents(WY.PLAY_EVENT,UY.ENDED)})),ky(wy(n),"_onOnceProgress",(function(){if(n._media.buffered.length){var e=n._media.buffered.start(0);e&&(n._media.currentTime=e+K3,dW.log(n.TAG,"start gap:",e)),n._media.removeEventListener("progress",n._onOnceProgress)}})),ky(wy(n),"_onError",(function(){var e;n._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,n._assembleErr("audio error: ".concat(null===(e=n._media.error)||void 0===e?void 0:e.message),3))})),ky(wy(n),"_appendChunk",(function(e,t){var r;if(!n.noAudio&&t.samples.length){if(n._codec||(2!==t.objectType&&5!==t.objectType?n._codec="mp4a.40.5":n._codec=t.codec,n._isTempMedia&&n._switchMedia(n._codec)),ql(r=t.samples).call(r,(function(e){e.baseMediaDecodeTime=t.baseMediaDecodeTime,n._sampleQueue.push(e)})),t.samples=[],!n._meta)return n._meta=py(py({},t),{},{exist:function(){return!0},hasSample:function(){return!0},samples:[]}),dW.warn(n.TAG,"audio set metadata",n._meta),void n._doAppendWrapper();var i,o;if(n._meta.sampleRate!==t.sampleRate)dW.warn(n.TAG,Ag(i="discontinue: ".concat(n._meta.sampleRate," -> ")).call(i,t.sampleRate)),n._needInitSegment=!0,ql(o=El(t)).call(o,(function(e){n._meta[e]=t[e]}));!n._inProcessing&&n._sampleQueue.length&&n._doAppendWrapper()}})),ky(wy(n),"_doAppend",function(){var e=gy(my().mark((function e(t){var r,i,o;return my().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._remuxer||(n._remuxer=new PJ({samples:[],exist:function(){return!1}},t)),r=t.samples,n._sourceCreated){e.next=12;break}return n.analyse.addAudioMseOpenStart(),e.next=6,n._mse.open();case 6:n._sourceCreated=!0,dW.log(n.TAG,"video/mp4;codecs=".concat(n._codec)),n._mse.createSource(t.type,"video/mp4;codecs=".concat(n._codec)),n.analyse.addAudioMseOpend(),dW.log(n.TAG,"sb created!"),n._checkAutoPlay();case 12:if(i=n._remuxer.remux(n._needInitSegment),!n._needInitSegment||i.audioInitSegment){e.next=15;break}return e.abrupt("return");case 15:return n._needInitSegment=!1,o=[],i.audioInitSegment&&o.push(n._mse.append(t.type,i.audioInitSegment)),i.audioSegment&&o.push(n._mse.append(t.type,i.audioSegment)),e.abrupt("return",Op.all(o).then((function(){return r[r.length-1].dts/1e3})).then((function(){n._firstTimeAppendedBuffer||(n._firstTimeAppendedBuffer=!0,n.analyse.addAudioFirstTimeAppended())})));case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),ky(wy(n),"_doPlay",(function(){n._media.play().catch((function(){}))})),ky(wy(n),"_doPause",(function(){n._media.pause()})),ky(wy(n),"_doSeek",(function(e){n._ready=!1,n._media.currentTime=e})),ky(wy(n),"_doChaseFrame",(function(e){var t=e.position;n._seekNoSideEffect=!0,n._media.currentTime=t})),ky(wy(n),"_startRender",(function(){dW.log(n.TAG,"start render"),n._startRendered=!0,n._media.play().catch((function(){}))})),n.TAG="AudioMseRender",n._reuseMse=HW().reuseMseForAudio,n._initMedia(),n}return Ey(o,[{key:"isMse",get:function(){return!0}},{key:"media",get:function(){return this._media}},{key:"currentTime",get:function(){return this._media.currentTime}},{key:"buffered",get:function(){return this._media.buffered}},{key:"duration",get:function(){return Yg(this._media.duration)?1/0:this._media.duration},set:function(e){this._duration=e,this._updateDuration(e)}},{key:"audioCanAutoplay",get:function(){return this._audioCanAutoplay||this.noAudio}},{key:"_initMedia",value:function(){if(!this._reuseMse||!z3.hasCached)return dW.log(this.TAG,"init media and mse directly"),this._media=document.createElement("video"),this._media.autoplay=!0,this._mse=new H3,this._bindEvents(),this._bindMediaEvents(),void this._mse.bindMedia(this._media);dW.log(this.TAG,"bind media temporary"),this._media=z3.tempMedia,this._bindEvents(),this._isTempMedia=!0}},{key:"_switchMedia",value:function(e){var t=this._media,n=z3.getCachedMedia(J3[e]);n?(dW.warn(this.TAG,"switch to cached media for audio play! codec=".concat(e)),this._media=n.media,this._mse=n.mse,this._bindMediaEvents(),this._updateDuration(this._duration),this._media.currentTime=K3,this._sourceCreated=!0,this._audioCanAutoplay=!0,this.analyse.addAudioMseOpend()):this._initMedia(),this._media.volume=t.volume,this._media.playbackRate=t.playbackRate,this._isTempMedia=!1}},{key:"_getBufferGap",value:function(){for(var e=this.buffered,t=0,n=e.length;t<n;t++)if(!(e.end(t)<this.currentTime))return e.start(t)-this.currentTime;return 0}},{key:"canSeek",value:function(){return!0}},{key:"resume",value:function(){return this._media.play()}},{key:"pause",value:function(){return this._media.pause()}},{key:"seekNoSideEffect",value:function(e){this._doChaseFrame(e)}},{key:"dump",value:function(){}},{key:"_emitTimelineEvents",value:function(e,t,n){var r,i;null===(r=this._parent)||void 0===r||null===(i=r.emit)||void 0===i||i.call(r,e,t,n)}},{key:"_assembleErr",value:function(e,t){var n=new Error(e);return n.code=3,n.subCode=t,n}},{key:"_bindEvents",value:function(){var e=this;Iy(Ry(o.prototype),"_bindEvents",this).call(this),this._parent.on(YY.CHASE_AUDIO_FRAME,this._doChaseFrame),this._parent.on(WY.UPDATE_VOLUME,(function(t){e._media.volume=t,e._emitTimelineEvents(WY.PLAY_EVENT,UY.VOLUME_CHANGE)})),this._parent.on(WY.END_OF_STREAM,(function(){var t;e.reuseMseForAudio||(null===(t=e._mse)||void 0===t||t.endOfStream())})),this._parent.on(WY.SET_PLAYBACKRATE,(function(t){dW.log(e.TAG,"change playbackrate, ",t),e._media.playbackRate=t}))}},{key:"_bindMediaEvents",value:function(){this._media.addEventListener("canplay",this._onCanplay),this._media.addEventListener("playing",this._onPlaying),this._media.addEventListener("waiting",this._onWaiting),this._media.addEventListener("seeked",this._onSeeked),this._media.addEventListener("progress",this._onProgress),this._media.addEventListener("ended",this._onEnded),this._media.addEventListener("progress",this._onOnceProgress),this._media.addEventListener("error",this._onError)}},{key:"_updateDuration",value:(r=gy(my().mark((function e(t){return my().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 e.next=6,this._mse.updateDuration(t);case 6:dW.log(this.TAG,"update duration",t);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_doAppendWrapper",value:(n=gy(my().mark((function e(){var t;return my().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:return this._meta.samples=lm(n=this._sampleQueue).call(n),this._meta.baseMediaDecodeTime=this._meta.samples[0].baseMediaDecodeTime,this._sampleQueue=[],e.prev=3,this._inProcessing=!0,e.next=7,this._doAppend(this._meta);case 7:if(t=e.sent,this.isLive&&this._emitTimelineEvents(WY.UPDATE_SEGMENT_END,t),this._inProcessing=!1,!this._sampleQueue.length){e.next=13;break}return e.next=13,this._doAppendWrapper();case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),this._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,this._assembleErr("audio error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message),3));case 18:case"end":return e.stop()}}),e,this,[[3,15]])}))),function(){return n.apply(this,arguments)})},{key:"_checkAutoPlay",value:function(){var e=this;this._media.addEventListener("canplay",(function t(){var n=e._media.volume;e._media.volume=Math.min(n,.1);var r=e._media.play();(r=r.then?r:Op.reject()).then((function(){dW.log(e.TAG,"auto play by checkAutoPlay!"),e._audioCanAutoplay=!0})).catch((function(){dW.warn(e.TAG,"can’t auto play!"),e._audioCanAutoplay=!1,e.emit(BY.AUDIO_NOT_ALLOWED_AUTOPLAY)})).finally((function(){e._media.volume=n,e._startRendered||(e._media.pause(),dW.log(e.TAG,"auto paused by checkAutoPlay!")),e._media.removeEventListener("canplay",t)}))}))}},{key:"_destroy",value:(t=gy(my().mark((function e(){var t,n,r;return my().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(dW.log(this.TAG,"destroy audio render"),this._remuxer=null,this.removeAllListeners(),this._media.removeEventListener("canplay",this._onCanplay),this._media.removeEventListener("playing",this._onPlaying),this._media.removeEventListener("waiting",this._onWaiting),this._media.removeEventListener("seeked",this._onSeeked),this._media.removeEventListener("progress",this._onProgress),this._media.removeEventListener("ended",this._onEnded),this._media.removeEventListener("progress",this._onOnceProgress),this._media.removeEventListener("error",this._onError),this._reuseMse){e.next=17;break}return null===(t=this._mse)||void 0===t||t.endOfStream(),e.next=15,null===(n=this._mse)||void 0===n?void 0:n.unbindMedia();case 15:e.next=20;break;case 17:null===(r=this._mse)||void 0===r||r.clearAllBuffer(),z3.cacheMedia({codec:this._codec,media:this._media,mse:this._mse}),dW.log(this.TAG,"cache media for audio play, codec=",this._codec);case 20:this._meta&&(this._meta.duration=0),this._mse=null,this._media=null;case 23:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"isSupported",value:function(){return HW().audioWithMse&&!!window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="mp4a.40.5"')}}]),o}(XY),$3=function(){function e(t){_y(this,e),this.TAG="VideoTimeRange",this._parent=t,this._baseDts=0,this._lastDuration=0,this._duration=0,this._bitrate=0,this._totalSize=0,this._buffers=[],this._currentFrameQueue=[],this._frameIndexInQueue=0,this._delayEstimateList=[],this._keyframeQueue=[]}return Ey(e,[{key:"isLive",get:function(){return this._parent.isLive}},{key:"baseDts",get:function(){return this._baseDts}},{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e}},{key:"buffered",get:function(){var e=this;if(this.isLive)return{length:this._duration?1:0,start:function(){return 0},end:function(){return e._duration}};var t=this._mergeBufferRanges();return{length:t.length,start:function(e){var n=t[e];return n?n.start:0},end:function(e){var n=t[e];return n?n.end:1/0}}}},{key:"bufferStart",get:function(){var e;return(null===(e=this._buffers[0])||void 0===e?void 0:e.start)||0}},{key:"frameLength",get:function(){return this._currentFrameQueue.length}},{key:"keyFrameLength",get:function(){return this._keyframeQueue.length}},{key:"totalSize",get:function(){return this._totalSize}},{key:"bitrate",get:function(){return this._bitrate},set:function(e){this._bitrate=e}},{key:"lastDuration",get:function(){return this._lastDuration}},{key:"frames",get:function(){return this._currentFrameQueue}},{key:"getCurrentTime",value:function(e){return this._lastDuration+(e-this._baseDts)/1e3}},{key:"resetDts",value:function(e){this._baseDts=e}},{key:"_mergeBufferRanges",value:function(){var e,t=LX(e=this._buffers).call(e,(function(e,t){return e.start>t.start?1:-1})),n=t.length,r=[];if(!n)return r;for(var i={start:t[0].start,end:t[0].end},o=1;o<n;o++){var a=t[o];Math.abs(i.end-a.start)<.1?i.end=a.end:(r.push(i),i={start:a.start,end:a.end})}return r.push(i),r}},{key:"_caclBaseDts",value:function(e){-1===this._baseDts&&e&&(this._baseDts=e.dts,dW.log(this.TAG,"set baseDts: ",this._baseDts,"frame len:",this._currentFrameQueue.length))}},{key:"_updateDuration",value:function(e){for(var t=e.length,n=e[t-1],r=0;r<t;r++){var i=e[r];if(i&&i.options&&i.options.meta){var o=e[r-1]||this._currentFrameQueue[this._currentFrameQueue.length-1];o?this._lastDuration+=(o.dts-this._baseDts)/1e3:this._lastDuration=this._duration,dW.log(this.TAG,"updateBaseDts,record lastDuration:",this._lastDuration),this._baseDts=i.dts;break}}n&&(this._duration=(n.dts-this._baseDts)/1e3+this._lastDuration)}},{key:"_estimateBitRate",value:function(e){var t=e.length;if(t<=2){var n;if(this._delayEstimateList=Ag(n=this._delayEstimateList).call(n,e),(t=this._delayEstimateList.length)<=30)return;e=this._delayEstimateList,this._delayEstimateList=[]}for(var r=0,i=0;i<t;i++){var o,a=e[i];r+=a.data?a.data.length:kY(o=a.units).call(o,(function(e,t){return e+t.byteLength}),0)}this._totalSize+=r;var s=r/(e[t-1].dts-e[0].dts);this._bitrate=sg(8e3*s)}},{key:"_beforeAppendVodBuffer",value:function(e){var t=this;if(e.length){for(var n=[],r=[],i=0,o=e.length;i<o;i++)e[i].keyframe&&(n.push(r),r=[]),r.push(e[i]);r.length&&n.push(r),ql(n).call(n,(function(e){return t._appendVodBuffer(e)}))}}},{key:"_appendVodBuffer",value:function(e){var t,n;if(e.length){var r,i=e[0],o=e[e.length-1],a=(i.dts-this._baseDts)/1e3,s=(o.dts-this._baseDts)/1e3;if(dW.enable)dW.log(this.TAG,Ag(r="add new buffer range [".concat(a," , ")).call(r,s,"]"));Ll(t=this._buffers).call(t,(function(e){return a>=e.start&&s<=e.end})).length||(this._buffers.push({start:a,end:s,duartion:s-a,frames:lm(e).call(e)}),LX(n=this._buffers).call(n,(function(e,t){return e.start>t.start?1:-1})),this._afterAppendVodBuffer())}}},{key:"_afterAppendVodBuffer",value:function(){var e;if(Ll(e=this._buffers).call(e,(function(e){var t;return!(null!==(t=e.frames[0])&&void 0!==t&&t.keyframe)})).length){for(var t=this._buffers,n=this._buffers.length,r=[],i=this._buffers[0],o=1;o<n;o++){var a,s;if(null!==(a=t[o].frames[0])&&void 0!==a&&a.keyframe)r.push(i),i=t[o];else i.frames=Ag(s=i.frames).call(s,t[o].frames),i.end=t[o].end,i.duartion=i.end-i.start}r.push(i),this._buffers=r}}},{key:"_recordKeyframes",value:function(e){var t,n,r=this;(ql(e).call(e,(function(e){if(e.keyframe){var t=(e.dts-r._baseDts)/1e3;r._keyframeQueue.push({position:t,frame:e})}})),this._keyframeQueue=LX(t=this._keyframeQueue).call(t,(function(e,t){return e.position>t.position?1:-1})),this.isLive&&this._keyframeQueue.length>40)&&ZQ(n=this._keyframeQueue).call(n,0,20)}},{key:"toAnnexBNalu",value:function(e){ql(e).call(e,(function(e){var t=e.units;if(t){var n=kY(t).call(t,(function(e,t){return e+4+t.byteLength}),0),r=new Uint8Array(n),i=0;ql(t).call(t,(function(e){r.set([0,0,0,1],i),i+=4,r.set(e,i),i+=e.byteLength})),e.units=null,e.data=r}}))}},{key:"append",value:function(e,t,n){var r;(n&&this.toAnnexBNalu(e),this._caclBaseDts(e[0]),t&&this._updateDuration(e),this._estimateBitRate(e),this._recordKeyframes(e),this.isLive)?this._currentFrameQueue=Ag(r=this._currentFrameQueue).call(r,e):this._beforeAppendVodBuffer(e)}},{key:"updateSegmentEnd",value:function(e){var t=this._buffers[this._buffers.length-1];t&&(Math.abs(t.end-e)<.5||(t.end=e,t.duartion=e-t.start,dW.log(this.TAG,"video data lack, reset end:",e)))}},{key:"getFrame",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.isLive)return this._currentFrameQueue.shift();if(!(e=this._currentFrameQueue[this._frameIndexInQueue])){if(!(e=this._currentFrameQueue[--this._frameIndexInQueue]))return;if(!this.switchBuffer((e.dts-this._baseDts)/1e3,this._frameIndexInQueue++,t))return;return this.getFrame(++t)}return this._frameIndexInQueue++,e}},{key:"getFramesForPreciseSeek",value:function(e){var t;return Ll(t=this._currentFrameQueue).call(t,(function(t){return t.dts<=e}))}},{key:"updateFrameIndexForPreciseSeek",value:function(e){this._frameIndexInQueue=e}},{key:"switchBuffer",value:function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)>=20)){e=e||this.bufferStart;var a,s,u,c,l,h,A,d=Ll(t=this._buffers).call(t,(function(t){return t.start<e+.1&&t.end>=e+.1}))[0];if(!d){var f,v,p=qH(f=this._buffers).call(f,(function(t){return t.start>=e}));return p&&p.start-e<1?(this._currentFrameQueue=lm(v=p.frames).call(v,0),this._frameIndexInQueue=0,p):void 0}if(d.frames[0].dts>=e)return this._currentFrameQueue=lm(a=d.frames).call(a,0),this._frameIndexInQueue=0,dW.log(this.TAG,Ag(s=Ag(u="switch video buffer, time:".concat(e," , buffer:[")).call(u,d.start," , ")).call(s,d.end,"], index=0")),d;if(d.frames.length>o)return this._currentFrameQueue=lm(c=d.frames).call(c,0),dW.log(this.TAG,Ag(l=Ag(h=Ag(A="switch video buffer, in the same gop and more frame got, time:".concat(e," , buffer:[")).call(A,d.start," , ")).call(h,d.end,"], index=")).call(l,o)),d;dW.log(this.TAG,Ag(n=Ag(r=Ag(i="switch video buffer, in the same gop and no more frame got, time:".concat(e," , buffer:[")).call(i,d.start," , ")).call(r,d.end,"], index=")).call(n,o))}}},{key:"getSeekStartPosition",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(ql(t=this._keyframeQueue).call(t,(function(t){t.position<=e&&(n=t)})),n)return e-n.position<r?n:void 0}},{key:"nextFrame",value:function(){return this._currentFrameQueue[0]}},{key:"deletePassed",value:function(e){var t;this._currentFrameQueue=Ll(t=this._currentFrameQueue).call(t,(function(t){return t.dts>=e}))}},{key:"getDtsOfTime",value:function(e){var t=e-this._lastDuration;return this._baseDts+1e3*t}},{key:"clean",value:function(){this._currentFrameQueue=[]}},{key:"destroy",value:function(){this._currentFrameQueue=[],this._buffers=[]}}]),e}();function e9(e){var t;(null===(t=e.buffer)||void 0===t?void 0:t.close)&&e.buffer.close()}var t9=function(){function e(t){_y(this,e),this.TAG="FrameQueue",this._parent=t,this._lastGopId=0,this._frames=[]}return Ey(e,[{key:"currentTimeDts",get:function(){return this._parent.preciseVideoDts}},{key:"length",get:function(){return this._frames.length}},{key:"frames",get:function(){return this._frames}},{key:"append",value:function(e){e.info?this._frames.push(e):e9(e)}},{key:"appendVodFrame",value:function(e){this._frames.push(e)}},{key:"nextFrame",value:function(){var e,t=this._frames.length;1===this._parent.noAudio&&t>3&&(this._frames=lm(e=this._frames).call(e,t-2));return this._frames[0]}},{key:"shift",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this._frames.shift();return this.deletePassed(e),t}},{key:"deletePassed",value:function(e){var t;this._frames=Ll(t=this._frames).call(t,(function(t){return!!(t.info&&t.info.dts>e)||(e9(t),!1)}))}},{key:"empty",value:function(){var e;ql(e=this._frames).call(e,(function(e){return e9(e)})),this._frames=[]}},{key:"destroy",value:function(){this.empty(),this._lastGopId=0}}]),e}();iN("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var n9=new(function(){function e(){_y(this,e),ky(this,"_queue",[]),ky(this,"TAG","FrameRenderCache")}return Ey(e,[{key:"cacheCvs",value:function(e){this._queue.push(e),dW.log(this.TAG,"cache canvas!")}},{key:"getCachedCvs",value:function(){var e=this._queue.pop();return e&&dW.log(this.TAG,"get cached canvas!"),e}}]),e}()),r9=function(){function e(t,n){_y(this,e),this.TAG="FrameRender",this.configs=IW({},t),this.parent=n,this.canvas=this.configs.canvas,this.canvas.glInstance=this,this.meta=IW({},this.configs.meta),this.frameRenderCache=n9,this._initMeta(),this._initContextGL(),this.contextGL&&(this._initProgram(),this._initBuffers(),this._initTextures())}return Ey(e,[{key:"_initMeta",value:function(){this.chroma=this.meta.chromaFormat,this.height=this.meta.height,this.width=this.meta.width,this.canvas.width===this.meta.width&&this.canvas.height===this.meta.height||(this.canvas.width=this.meta.width,this.canvas.height=this.meta.height,this.parent.emitResizeEvent())}},{key:"_initContextGL",value:function(){if("2d"!==this.configs.type){for(var e=this.canvas,t=null,n=["webgl","experimental-webgl","moz-webgl","webkit-3d"],r=0;!t&&r<n.length;){var i=n[r];try{t=e.getContext(i,this.configs.glCtxOptions),dW.log("FrameRender","use=",i,this.configs.glCtxOptions);break}catch(_6){t=null}t&&"function"==typeof t.getParameter||(t=null),++r}this.contextGL=t}else this.ctx=this.canvas.getContext("2d")}},{key:"_initProgram",value:function(){var e=this.contextGL,t=["attribute vec4 vertexPos;","attribute vec4 texturePos;","attribute vec4 uTexturePos;","attribute vec4 vTexturePos;","varying vec2 textureCoord;","varying vec2 uTextureCoord;","varying vec2 vTextureCoord;","void main()","{"," gl_Position = vertexPos;"," textureCoord = texturePos.xy;"," uTextureCoord = uTexturePos.xy;"," vTextureCoord = vTexturePos.xy;","}"].join("\n"),n=["precision highp float;","varying highp vec2 textureCoord;","varying highp vec2 uTextureCoord;","varying highp vec2 vTextureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","uniform mat4 YUV2RGB;","void main(void) {"," highp float y = texture2D(ySampler, textureCoord).r;"," highp float u = texture2D(uSampler, uTextureCoord).r;"," highp float v = texture2D(vSampler, vTextureCoord).r;"," gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n"),r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,t),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+e.getShaderInfoLog(r));var i=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(i,n),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+e.getShaderInfoLog(i));var o=e.createProgram();e.attachShader(o,r),e.attachShader(o,i),e.linkProgram(o),e.getProgramParameter(o,e.LINK_STATUS)||console.log("Program failed to compile: "+e.getProgramInfoLog(o)),e.useProgram(o);var a=e.getUniformLocation(o,"YUV2RGB");e.uniformMatrix4fv(a,!1,[1.16438,0,1.59603,-.87079,1.16438,-.39176,-.81297,.52959,1.16438,2.01723,0,-1.08139,0,0,0,1]),this.shaderProgram=o}},{key:"_initBuffers",value:function(){var e=this.contextGL,t=this.shaderProgram,n=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,n),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW);var r=e.getAttribLocation(t,"vertexPos");e.enableVertexAttribArray(r),e.vertexAttribPointer(r,2,e.FLOAT,!1,0,0);var i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var o=e.getAttribLocation(t,"texturePos");e.enableVertexAttribArray(o),e.vertexAttribPointer(o,2,e.FLOAT,!1,0,0),this.texturePosBuffer=i;var a=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var s=e.getAttribLocation(t,"uTexturePos");e.enableVertexAttribArray(s),e.vertexAttribPointer(s,2,e.FLOAT,!1,0,0),this.uTexturePosBuffer=a;var u=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var c=e.getAttribLocation(t,"vTexturePos");e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0),this.vTexturePosBuffer=u}},{key:"_initTextures",value:function(){var e=this.contextGL,t=this.shaderProgram,n=this._initTexture(),r=e.getUniformLocation(t,"ySampler");e.uniform1i(r,0),this.yTextureRef=n;var i=this._initTexture(),o=e.getUniformLocation(t,"uSampler");e.uniform1i(o,1),this.uTextureRef=i;var a=this._initTexture(),s=e.getUniformLocation(t,"vSampler");e.uniform1i(s,2),this.vTextureRef=a,e.pixelStorei(e.UNPACK_ALIGNMENT,1)}},{key:"_initTexture",value:function(){var e=this.contextGL,t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),t}},{key:"_drawPictureGL",value:function(e,t,n,r,i){var o=r*n,a=i*n/2;444!==this.chroma&&422!==this.chroma||(a*=2);var s={yData:(e=new Uint8Array(e)).subarray(0,o),uData:e.subarray(o,o+a),vData:e.subarray(o+a,o+a+a)};this._drawPictureGL420(s,t,n,r,i)}},{key:"_drawPictureGL420",value:function(e,t,n,r,i){var o=this.contextGL,a=this.texturePosBuffer,s=this.uTexturePosBuffer,u=this.vTexturePosBuffer,c=this.yTextureRef,l=this.uTextureRef,h=this.vTextureRef,A=e.yData,d=e.uData,f=e.vData,v=r,p=n,m=i,y=n/2;422!==this.chroma&&444!==this.chroma||(y=n);var g=i,_=y,b=this.canvas.width/this.width,E=this.canvas.height/this.height,k=0,T=0,R=this.canvas.width,S=this.canvas.height;b<E?(S=this.height*this.canvas.width/this.width,T=sg((this.canvas.height-this.height*this.canvas.width/this.width)/2)):(R=this.width*this.canvas.height/this.height,k=sg((this.canvas.width-this.width*this.canvas.height/this.height)/2)),o.viewport(k,T,R,S);var w=new Float32Array([1,0,0,0,1,1,0,1]);o.bindBuffer(o.ARRAY_BUFFER,a),o.bufferData(o.ARRAY_BUFFER,w,o.DYNAMIC_DRAW);var D=new Float32Array([1,0,0,0,1,1,0,1]);o.bindBuffer(o.ARRAY_BUFFER,s),o.bufferData(o.ARRAY_BUFFER,D,o.DYNAMIC_DRAW);var I=new Float32Array([1,0,0,0,1,1,0,1]);o.bindBuffer(o.ARRAY_BUFFER,u),o.bufferData(o.ARRAY_BUFFER,I,o.DYNAMIC_DRAW),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,c),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,v,p,0,o.LUMINANCE,o.UNSIGNED_BYTE,A),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,l),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,m,y,0,o.LUMINANCE,o.UNSIGNED_BYTE,d),o.activeTexture(o.TEXTURE2),o.bindTexture(o.TEXTURE_2D,h),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,g,_,0,o.LUMINANCE,o.UNSIGNED_BYTE,f),o.drawArrays(o.TRIANGLE_STRIP,0,4)}},{key:"_drawPicture2d",value:function(e){if(e&&this.canvas){this.ctx||(this.ctx=this.canvas.getContext("2d"));var t=e.displayWidth||e.width,n=e.displayHeight||e.height;this.canvas.height===n&&this.canvas.width===t||(this.canvas.height=n,this.canvas.width=t);try{this.ctx.drawImage(e.dom||e,0,0,t,n)}catch(g6){console.error(this.TAG,"_drawPicture2d",e,e.dom,g6,g6.message)}}}},{key:"_resize",value:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.canvas.width=e,this.canvas.height=t,this.parent.emitResizeEvent())}},{key:"render",value:function(e,t,n,r,i){this._resize(t,n),this.contextGL?this._drawPictureGL(e,t,n,r,i):this._drawPicture2d(e)}},{key:"resetMeta",value:function(e){this.meta=IW({},e)}},{key:"updateBind",value:function(e,t){this.parent=e,this.resetMeta(t)}},{key:"destroy",value:function(e){this.parent=null,this.canvas.style.display="none",e&&(this.contextGL&&this.contextGL.clear(this.contextGL.DEPTH_BUFFER_BIT|this.contextGL.COLOR_BUFFER_BIT),n9.cacheCvs(this.canvas))}}]),e}(),i9=function(){function e(t){_y(this,e),ky(this,"_lowDecodeThreshold",HW().lowDecodeThreshold/5),this.TAG="DecodeEstimate",this._needEstimate=!0,this._parent=t,this._lastDecodeDot=0,this._lastDecodeCost=0,this._lastFrameDts=0,this._dtsDeltas=[],this._decodeCosts=[],this._lowDecodeQueue=[],this._fps=0,this._decodeFps=0,this._gopLength=0,this._webcodec=!1}return Ey(e,[{key:"fps",get:function(){return this._fps}},{key:"decodeFps",get:function(){return this._decodeFps}},{key:"decodeCost",get:function(){return this._lastDecodeCost}},{key:"gopLength",get:function(){return this._gopLength}},{key:"webcodec",set:function(e){this._webcodec=e}},{key:"updateGopCount",value:function(){this._gopLength++}},{key:"needEstimateFps",value:function(){this._needEstimate=!0}},{key:"addDecodeInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{dts:0};this._estimateDecodeFps(e),this._estimateFps(e)}},{key:"resetDecodeDot",value:function(e){this._lastDecodeDot=e||0}},{key:"reset",value:function(){this._decodeCosts=[],this._lowDecodeQueue=[]}},{key:"_estimateFps",value:function(e){if(this._needEstimate)if(this._lastFrameDts){var t=e.dts-this._lastFrameDts;if(this._lastFrameDts=e.dts,!(Math.abs(t)>200)){this._dtsDeltas.push(t);var n=this._dtsDeltas.length;n<5||(this._fps=Math.ceil(1e3/this._avg(this._dtsDeltas,n)),dW.log(this.TAG,"estimate fps:",this._fps),this._needEstimate=!1)}}else this._lastFrameDts=e.dts}},{key:"_estimateDecodeFps",value:function(e){if(this._lastDecodeDot){var t=performance.now(),n=t-this._lastDecodeDot;this._lastDecodeDot=t,e.cost=n,this._lastDecodeCost=n,this._decodeCosts.push(n);var r=this._decodeCosts.length;if(!(r<5)){var i=this._avg(this._decodeCosts,r);this._decodeFps=Math.floor(1e3/i),this._decodeCosts=[],this._lowDecodeDetect()}}else this._lastDecodeDot=performance.now()}},{key:"_avg",value:function(e,t){var n=kY(e).call(e,(function(e,t){return e+=t}),0);return Math.floor(n/t)||1}},{key:"_lowDecodeDetect",value:function(){this._decodeFps?(this._decodeFps<this._fps*this._parent.playbackRate+(this.webcodec?0:3)?this._lowDecodeQueue.push(this._decodeFps):this._lowDecodeQueue.pop(),this._lowDecodeQueue.length>this._lowDecodeThreshold&&(this._lowDecodeQueue=[],dW.log(this.TAG,"解码效率过低,应该降级"),this._parent.emit(MY.DECODE_LOW_FPS))):this._parent.emit(MY.DECODE_LOW_FPS)}}]),e}(),o9=[],a9=function(){function e(t){var n=this;_y(this,e),ky(this,"_doTask",(function(){var e;null===(e=n._task)||void 0===e||e.call(n)})),this._task=t;var r=new Blob(["\n var timer;\n\n function initTimer (interval) {\n destroy()\n clearInterval(timer);\n timer = setInterval(() => {\n self.postMessage({type: 'NEXT_TICK'});\n }, interval)\n }\n\n function destroy () {\n clearInterval(timer);\n }\n\n self.onmessage = function (e) {\n var {type,interval} = e.data;\n switch (type) {\n case 'START':\n initTimer(interval);\n break;\n case 'DESTROY':\n destroy();\n break;\n }\n }\n"],{type:"application/javascript"});this._worker=o9.pop()||new Worker(v$.createObjectURL(r)),this._bindEvent()}return Ey(e,[{key:"_bindEvent",value:function(){this._worker.addEventListener("message",this._doTask)}},{key:"start",value:function(e){(e=sg(e))<10&&(e=10),e>60?e=60:e>25&&(e=25),this._worker.postMessage({type:"START",interval:e})}},{key:"stop",value:function(){this._worker.postMessage({type:"DESTROY"})}},{key:"destroy",value:function(){this._worker&&(this._worker.postMessage({type:"DESTROY"}),this._worker.removeEventListener("message",this._doTask),o9.push(this._worker),dW.log("TickTimer","unbind timer event"),this._worker=null,this._task=null)}}]),e}(),s9=function(e){Ty(n,e);var t=Dy(n);function n(e,r){var i,o;return _y(this,n),(o=t.call(this,e,r))._timeRange=new $3(wy(o)),o._decodeEstimate=new i9(wy(o)),o._frameQueue=new t9(wy(o)),o._lastTimeupdate=0,o._renderCost=0,o._canAutoPlay=!0,o._videoDecode=!1,o._inSeeking=!1,o._frameRender=null,o._configuration=null,o._render=wm(i=o._render).call(i,wy(o)),o._tickTimer=new a9(o._render),o._initCanvas(e),o._bindEvents(),o}return Ey(n,[{key:"canAutoPlay",get:function(){return this._canAutoPlay}},{key:"canvas",get:function(){return this._canvas}},{key:"timescale",get:function(){return 1e3}},{key:"fps",get:function(){return this._decodeEstimate.fps||this._meta&&this._meta.fpsNum/this._meta.fpsDen||24}},{key:"decodeFps",get:function(){return this._decodeEstimate.decodeFps}},{key:"decodeCost",get:function(){return this._decodeEstimate.decodeCost}},{key:"renderCost",get:function(){return this._renderCost}},{key:"totalSize",get:function(){return this._timeRange.totalSize}},{key:"bitrate",get:function(){return this._timeRange.bitrate},set:function(e){this._timeRange.bitrate=e}},{key:"gopLength",get:function(){return this._decodeEstimate.gopLength}},{key:"is540p",get:function(){return this._canvas.height<720}},{key:"buffered",get:function(){return this._timeRange.buffered}},{key:"inSeeking",get:function(){return this._inSeeking}},{key:"interval",get:function(){return Math.floor(1e3/this.fps/this.playbackRate)}},{key:"playbackRate",get:function(){return this._playbackRate||1}},{key:"baseDts",get:function(){return this._timeRange.baseDts}},{key:"currentTime",get:function(){return this._timeRange.getCurrentTime(this.preciseVideoDts)}},{key:"timelinePosition",get:function(){return this._parent.timelinePosition}},{key:"lastTimelinePosition",get:function(){return this._lastTimelinePosition||0},set:function(e){this._lastTimelinePosition=e}},{key:"audioSyncDts",get:function(){return this._audioDts||this.baseDts},set:function(e){this._audioDts=e}},{key:"preciseVideoDts",get:function(){return this.audioSyncDts+Math.floor(1e3*(this.timelinePosition-this.lastTimelinePosition))}},{key:"readyState",get:function(){var e=this._frameQueue.length||(this.currentTime?1:0);return e?e>=8?4:e>=4?3:e>=2?2:1:0}},{key:"isHevc",get:function(){return!("hev1.1.6.L93.B0"!==(this._meta||{}).codec)}},{key:"videoDecode",get:function(){return this._videoDecode}},{key:"decoderMode",get:function(){var e;return null===(e=this._decodeController)||void 0===e?void 0:e.decoderMode}},{key:"configuration",get:function(){var e,t;return this._configuration||(this._configuration=this._meta.configuration||fW(null===(e=this._meta)||void 0===e?void 0:e.sps[0],null===(t=this._meta)||void 0===t?void 0:t.pps[0])),this._configuration},set:function(e){this._configuration=e.configuration||fW(e.sps[0],e.pps[0])}},{key:"setSeekingStatus",value:function(e){this._inSeeking=e}},{key:"getDtsOfTime",value:function(e){return this._timeRange.getDtsOfTime(e)}},{key:"updateReady",value:function(){this._whenReady()}},{key:"forceRender",value:function(){this._render(!0)}},{key:"getSeekStartPosition",value:function(e,t){return this._timeRange.getSeekStartPosition(e,t)}},{key:"canSeek",value:function(){throw new Error("need override by children")}},{key:"emitResizeEvent",value:function(){null==this||this._emitTimelineEvents(WY.PLAY_EVENT,UY.RESIZE)}},{key:"_assembleErr",value:function(e,t){var n=new Error(e);return n.code=3,n.subCode=t,n}},{key:"_emitTimelineEvents",value:function(e,t,n){var r;null===(r=this._parent)||void 0===r||r.emit(e,t,n)}},{key:"_initCanvas",value:function(e){e.canvas?this._canvas=e.canvas:this._canvas=n9.getCachedCvs()||document.createElement("canvas"),this._canvas.style.margin="auto",this._canvas.style.position="absolute",this._canvas.style.pointerEvents="none"}},{key:"_bindEvents",value:function(){var e,t,r=this;Iy(Ry(n.prototype),"_bindEvents",this).call(this);var i=function(e){var t,n,i,o,a,s,u,c,l=e.width,h=e.height,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,f=r._canvas,v=f.width,p=f.height,m=h*v/p,y=l*p/v,g=l-m,_=h-y,b=g*A+"px",E=_*d+"px";r._canvas.style.left=b,r._canvas.style.top=E,dW.warn(r.TAG,Ag(t=Ag(n=Ag(i="cvsWidth=".concat(v,", cvsHeight=")).call(i,p,", scaleCvsWidth=")).call(n,m,", scaleCvsHeight=")).call(t,y)),dW.warn(r.TAG,Ag(o=Ag(a=Ag(s=Ag(u=Ag(c="cover position: deltaX=".concat(g,", deltaY=")).call(c,_,", width=")).call(u,l,", height=")).call(s,h,", pX=")).call(a,b,", pY=")).call(o,E))};this._parent.on(MY.UPDATE_VIDEO_FILLTYPE,(function(e,t){var n=t.width,o=t.height,a=r._canvas,s=a.width,u=a.height,c=!n||n/o>s/u;if(dW.warn(r.TAG,"UPDATE_VIDEO_FILLTYPE isGapX =",c,"type =",e,s,u,n,o),r._canvas.style.maxWidth="initial",r._canvas.style.maxHeight="initial","cover"===e)return c?(r._canvas.style.left=0,r._canvas.style.top=0,r._canvas.style.height="auto",r._canvas.style.width="100%",void i({width:n,height:o},0,.5)):(r._canvas.style.left=0,r._canvas.style.top=0,r._canvas.style.width="auto",r._canvas.style.height="100%",void i({width:n,height:o},.5,0));if("fill"===e)return r._canvas.style.width="100%",void(r._canvas.style.height="100%");(r._canvas.style.top=0,r._canvas.style.bottom=0,r._canvas.style.left=0,r._canvas.style.right=0,r._canvas.style.maxWidth="100%",r._canvas.style.maxHeight="100%",r._canvas.style.width="initial",r._canvas.style.height="initial",s<n&&u<o)&&(s/n>u/o?r._canvas.style.width="100%":r._canvas.style.height="100%")})),this._parent.on(MY.UPDATE_VIDEO_COVER_POSITION,i),this._parent.on(WY.SYNC_DTS,(function(e){var t,n=r._frameQueue.nextFrame(),i=n&&n.info&&n.info.dts;if(r.lastTimelinePosition=r.timelinePosition,r.noAudio){var o=r._timeRange.nextFrame();e=e||i||o&&o.dts||0}if(r.audioSyncDts=e,i&&i-e>500&&r._emitTimelineEvents(WY.PLAY_EVENT,UY.LARGE_AV_GAP,{aDts:e,vDts:i,frameLength:r._frameQueue.length,currentTime:r._parent.currentTime,duration:r._parent.duration}),dW.log(r.TAG,"audio current buffer play finish, next buffer dts=",e,"currentTime:",r._parent.currentTime,"preciseVideoDts:",r.preciseVideoDts,"next video frame dts:",i,"frame length:",r._frameQueue.length),!(r._isLive||null!==(t=r._parent)&&void 0!==t&&t.seeking)){var a=r._timeRange.nextFrame();if(a){var s=(a.dts-a.baseDts)/1e3;r._parent.currentTime-s>1&&(dW.warn(r.TAG,"丢帧!"),r.ajustSeekTime(r._parent.currentTime))}}})),this._parent.on(WY.UPDATE_GL_OPTIONS,(function(e){r._config.glCtxOptions=e})),this._parent.on(WY.UPDATE_SEGMENT_END,wm(e=this._updateSegmentEnd).call(e,this)),this.on(MY.AUTO_RUN,wm(t=this._startRender).call(t,this)),this._parent.on(WY.SET_PLAYBACKRATE,(function(e){r._playbackRate=e,r._startRender()}))}},{key:"ajustSeekTime",value:function(){throw new Error("need override by children")}},{key:"_resetDts",value:function(e,t){"audio"!==t&&this._timeRange.resetDts(e)}},{key:"_setMetadata",value:function(e,t){if("audio"!==e){dW.warn(this.TAG,"video set metadata"),this._meta=t;var n=t&&t.frameRate&&t.frameRate.fps;n?dW.log(this.TAG,"detect fps:",n):dW.warn(this.TAG,"no detect fps,start estimate"),this._initDecoder()}}},{key:"_initDecoder",value:function(){throw new Error("need override by children")}},{key:"_whenDecoderReady",value:function(){throw new Error("need override by children")}},{key:"_appendChunk",value:function(){throw new Error("need override by children")}},{key:"_startDecode",value:function(){throw new Error("need override by children")}},{key:"_receiveFrame",value:function(e,t){if(this._parent&&this._timeRange){var n=e.info||{};if(this._decodeEstimate.addDecodeInfo(n),!this._isLive&&((n.output||n.keyframe)&&(this.setSeekingStatus(!1),dW.warn(this.TAG,"set seeking status=",!1)),this.inSeeking))return dW.log(this.TAG,"drop frame"),void e9(e);this._isLive?this._frameQueue.append(e):this._frameQueue.appendVodFrame(e),t&&t(),this._ready||this.readyState>=1&&this._whenReady()}}},{key:"_startRender",value:function(){dW.log(this.TAG,"start render"),this._tickTimer.start(this.interval)}},{key:"_render",value:function(){throw new Error("need override by children")}},{key:"_updateSegmentEnd",value:function(){throw new Error("need override by children")}},{key:"_whenReady",value:function(){this._ready=!0,this.emit(MY.VIDEO_READY),this.noAudio&&this._emitTimelineEvents(WY.PLAY_EVENT,UY.PLAYING)}},{key:"_doPlay",value:function(){this._tickTimer.start()}},{key:"_doPause",value:function(){this._tickTimer.stop()}},{key:"_doSeek",value:function(){this._ready=!1,this._frameQueue.destroy()}},{key:"_doChaseFrame",value:function(){throw new Error("need override by children")}},{key:"destroy",value:function(e){var t,n,r,i;null===(t=this._tickTimer)||void 0===t||t.destroy(),null===(n=this._timeRange)||void 0===n||n.destroy(),null===(r=this._frameQueue)||void 0===r||r.destroy(),null===(i=this._frameRender)||void 0===i||i.destroy(e),this._tickTimer=null,this._canvas=null,this._timeRange=null,this._frameQueue=null,this._frameRender=null,this._decodeEstimate=null,this._parent=null,this.removeAllListeners()}}]),n}(XY),u9=function(e){Ty(n,e);var t=Dy(n);function n(e){var r;return _y(this,n),(r=t.call(this)).TAG="VideoDecoder",r._video=r._createVideo(),r._IsInDecoding=!1,r._fps=0,r._framId=null,r._screenShotNum=0,r._allPicNum=0,r._currentBlob=null,r._basePTS=0,r._totleTime=0,r._isVideoONRun=!0,r.firstEmit=!1,r.ptsArray=[],r._currentCanvasHeight=0,r._canvasList=[],r._realFrameDuration=25,r._maxVideoHeight=e.maxVideoHeight||720,r._minFPSTime=0,r._maxFPSTime=0,r._playFailed=!1,r._isPhoneSafari=!1,r._createCanvasList(),r._bindEvents(),r}return Ey(n,[{key:"_createCanvasList",value:function(){this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d",{alpha:!1});for(var e=0;e<45;e++){var t=this._createCanvas(),n=t.dom,r=t.ctx;this._canvasList.push({dom:n,ctx:r})}}},{key:"_createCanvas",value:function(){var e=document.createElement("canvas"),t=e.getContext("2d");return{dom:e,ctx:t}}},{key:"_createVideo",value:function(){var e=document.createElement("video");return e.setAttribute("muted",!0),e.setAttribute("autoplay",!0),e.setAttribute("controls",!0),e.setAttribute("webkit-playsinline",!0),e.setAttribute("playsinline",!0),e.setAttribute("x5-video-player-type","h5"),e.setAttribute("x5-video-player-type","h5-page"),e.style.position="absolute",e}},{key:"_initVideo",value:function(e,t){if(e.blobUrl&&void 0!==e.dts){var n=e.blobUrl;this._currentBlob=n,this._basePTS=e.dts,this._currentDuration=e.duration;try{dW.log(this.TAG,"_initVideo, basePTS:",e.dts),this._setVideoSrc(n,t),this._video.paused&&this._videoPlay("_initVideo")}catch(_6){console.error(this.TAG,"_initVideo, load error",_6)}}else console.error(this.TAG,"_initVideo","input info is error, blobUrl:",e.blobUrl,"dts:",e.dts)}},{key:"_setVideoSrc",value:function(e,t){try{var n=this._video;n.src=e,n.load(),n.playbackRate=2}catch(_6){console.error(this.TAG,"_setVideoSrc",_6)}}},{key:"_videoPlay",value:function(e){var t=this,n=this._video;if(dW.log(this.TAG,"_videoPlay, video is pause:",n.paused,e),n&&n.paused){var r=n.play();void 0!==r&&r.then((function(){t._playFailed=!1,dW.log(t.TAG,"_videoPlay success")})).catch((function(e){console.error(t.TAG,"_videoPlay failed,",e.message),t._playFailed=!0,t.emit(YY.PLAY_FAILED,t.firstEmit)}))}}},{key:"_removeEvents",value:function(){var e,t,n,r,i,o=this._video;o.removeEventListener("playing",wm(e=this._onPlaying).call(e,this)),o.removeEventListener("ended",wm(t=this._onEnded).call(t,this)),o.removeEventListener("error",wm(n=this._onError).call(n,this)),o.removeEventListener("loadeddata",wm(r=this._onLoadeddata).call(r,this)),o.removeEventListener("timeupdate",wm(i=this._onTimeUpdate).call(i,this))}},{key:"_bindEvents",value:function(){var e,t,n,r,i,o,a,s=this,u=this._video;u?(document.addEventListener("visibilitychange",wm(e=this._onVisibilityChange).call(e,this)),u.addEventListener("playing",wm(t=this._onPlaying).call(t,this)),u.addEventListener("ended",wm(n=this._onEnded).call(n,this)),u.addEventListener("error",wm(r=this._onError).call(r,this)),u.addEventListener("loadeddata",wm(i=this._onLoadeddata).call(i,this)),u.addEventListener("timeupdate",wm(o=this._onTimeUpdate).call(o,this)),u.addEventListener("pause",(function(){dW.log("on pause, currentTime, duration:",s._vCurrentTime,s._vDuration)})),this.on("outputresolutionchange",wm(a=this._onChange).call(a,this)),this.on("fpsreduce",(function(e){s._adaptFrameDuration(e)}))):console.error(this.TAG,"_bindEvents")}},{key:"_onTimeUpdate",value:function(){this._lastCurrentTime=this._vCurrentTime}},{key:"_onVisibilityChange",value:function(){this._isVideoONRun="visible"===document.visibilityState}},{key:"_onChange",value:function(e,t){this._width=e,this._height=t}},{key:"_onPlaying",value:function(){this._IsInDecoding&&(console.warn(this.TAG,"_onPlaying","last video not correct end"),this._framId&&(window.cancelAnimationFrame(this._framId),this._framId=null)),dW.log(this.TAG,"_onPlaying, video duration:",this._vDuration,"currentTime:",this._vCurrentTime,"_lastPts:",this._lastPts),this._isInDecoding=!0,this._lastCurrentTime=this._vCurrentTime,this.ptsArray=[],this.playingTime||(this.playingTime=!0),this._getFrame()}},{key:"_onEnded",value:function(e,t){dW.log(this.TAG,"_onEnded","current fmp4 duration is:",this._vDuration,"_isInDecoding:",this._isInDecoding,"_lastPts:",this._lastPts,"_realFrameDuration:",this._realFrameDuration,"from:",t),this._isInDecoding&&(this._isInDecoding=!1,this._lastMp4Duration=Math.min(this._vDuration,this._vCurrentTime),this._framId&&(dW.log(this.TAG,"_onEnded","cancelAnimationFrame"),window.cancelAnimationFrame(this._framId),this._framId=null),this._decodeFPS=sg(this._screenShotNum/(this._vDuration/1e3)),this.emit("fps",this._screenShotNum,this._totleTime,this._vDuration,this._metaFPS,{height:this._currentCanvasHeight,relHeight:this._video.videoHeight}),dW.log("_timePerFrame",this._totleTime/this._screenShotNum),this._timePerFrame=this._totleTime/this._screenShotNum,this._screenShotNum=0,this._allPicNum=0,this._totleTime=0,this._currentBlob&&(v$.revokeObjectURL(this._currentBlob),this._currentBlob=null,this._basePTS=0),this.emit(YY.FRAGMENT_END,this._decodeFPS,this._video.duration))}},{key:"_onError",value:function(){this._isInDecoding=!1;var e=this._video;console.error("video error:",e.error.code,e.error.message),this.emit("error",e.error,this.firstEmit)}},{key:"_onLoadeddata",value:function(){var e=this,t=this._video;t.currentTime=.001,this.firstEmit||(this._playFailed?(t.style.visibility="hidden",this.emit(YY.APPEND_VIDEO,t),Cg((function(){dW.log(e.TAG,"onloadeddata, setTimeout firstEmit:",e.firstEmit),e._getFirstFrame()}),40)):(dW.log(this.TAG,"onloadeddata, firstEmit:",this.firstEmit),this._getFirstFrame()))}},{key:"_getFirstFrame",value:function(){this.firstTime=EG();var e=this._vCurrentTime,t=this._basePTS+e,n=this._getImageData(t).imageData;this.firstEmit=!0,this.emit(YY.FIRST_FRAME,n,t)}},{key:"_getFrame",value:function(){var e,t=this._video,n=t.videoWidth,r=t.videoHeight;if(this._allPicNum++,this._isInDecoding){if(n||r){var i,o,a,s=this._vCurrentTime,u=this._basePTS+s;if(this.ptsArray.push(u),this._lastCurrentTime&&this._lastCurrentTime===this._vDuration&&(dW.log(this.TAG,"_getFrame, video ended, lastCurrentTime",this._lastCurrentTime,"duration:",this._vDuration,"isInDecoding:",this._isInDecoding),this._onEnded(null,"getFrame")),this._lastPts)if(u<=this._lastPts)return void(this._framId=window.requestAnimationFrame(wm(o=this._getFrame).call(o,this)));if(this._lastPts&&u-this._lastPts<this._realFrameDuration)return void(this._framId=window.requestAnimationFrame(wm(a=this._getFrame).call(a,this)));this._screenShotNum++;var c,l=null,h=EG();try{l=(c=this._getImageData(u)).imageData}catch(_6){console.error(_6,c,this._canvasList.length)}this._lastPts=u;var A=EG()-h;return this._totleTime+=A,this.emit(YY.DECODED,l,u),void(this._framId=window.requestAnimationFrame(wm(i=this._getFrame).call(i,this)))}this._framId=window.requestAnimationFrame(wm(e=this._getFrame).call(e,this))}else this._framId&&(window.cancelAnimationFrame(this._framId),this._framId=null)}},{key:"_getImageData",value:function(){var e,t=this._video,n=t.videoWidth,r=t.videoHeight,i=n,o=r;this._width&&this._height&&(i=this._width,o=this._height),o>this._maxVideoHeight&&(o=this._maxVideoHeight,i=sg(o*(n/r))),(e=this._canvasList.shift())||(console.warn(this.TAG,"_getImageData, _canvansList length is 0"),e=this._createCanvas()),e.width=i,e.height=o;var a=e.dom,s=e.ctx;if(this._currentCanvasHeight=o,!a)return{imageData:e};a.width!==i&&(a.width=i,a.height=o);try{r&&n&&i&&o&&s.drawImage(t,0,0,n,r,0,0,i,o)}catch(_6){console.error(this.TAG,"_getImageData, drawImage:",_6)}return{imageData:e}}},{key:"_adaptFrameDuration",value:function(e){e<15?this._minFPSTime++:this._minFPSTime=0,e>30?this._maxFPSTime++:this._maxFPSTime=0,this._minFPSTime>0&&this._decodeFPS<15&&(this._realFrameDuration-=this._timePerFrame,this._realFrameDuration<15&&(this._realFrameDuration=15),this._minFPSTime=0),this._maxFPSTime>0&&this._decodeFPS>30&&(this._realFrameDuration+=this._timePerFrame,this._maxFPSTime=0)}},{key:"_vDuration",get:function(){return sg(1e3*this._video.duration)}},{key:"_vCurrentTime",get:function(){return sg(1e3*this._video.currentTime)}},{key:"_reset",value:function(){this._isInDecoding=!1,this._lastPts=0,this._screenShotNum=0,this._allPicNum=0,this._totleTime=0}},{key:"reStartDecode",value:function(){this._video.pause(),this._reset();var e=this._currentBlob,t=this._basePTS;this._framId&&(window.cancelAnimationFrame(this._framId),this._framId=null),this._initVideo({blobUrl:e,dts:t})}},{key:"doSeek",value:function(e){if(this._isInDecoding){if(e<=0)return;var t=this._vCurrentTime/1e3+e>=this._vDuration/1e3?this._vDuration/1e3:this._vCurrentTime/1e3+1;console.error("doSeek",t),this._video.currentTime=t}}},{key:"pause",value:function(){this._isInDecoding&&this._video.pause()}},{key:"play",value:function(){if(this._isInDecoding&&this._video.paused)return dW.log("video play",this._vCurrentTime),this._video.play()}},{key:"startDecode",value:function(e,t,n){this._initVideo(e,n),this._metaFPS=t}},{key:"stopDecode",value:function(){this._video.paused||(this._video.pause(),this._reset())}},{key:"canPlayType",value:function(e){return this._video.canPlayType(e)}},{key:"destroy",value:function(){this._isInDecoding=!1,window.cancelAnimationFrame(this._framId),this._video.pause(),this._removeEvents()}},{key:"videoWidth",get:function(){return this._video?this._video.videoWidth:0}},{key:"videoHeight",get:function(){return this._video?this._video.videoHeight:0}}]),n}(cY),c9=[{base:720,level:1},{base:540,level:2},{base:360,level:3},{base:280,level:4}],l9=function(e){Ty(n,e);var t=Dy(n);function n(e,r){var i,o;return _y(this,n),(o=t.call(this)).TAG="VideoDecoderController",o._decoder=new u9(e),o._remux=new UJ,o._bindEvents(),o._isInit=!1,o._isDataReady=!1,o._ready=!1,o._blobURLList=[],o._isInDecoding=!1,o._mediaSegmentReady=!1,o._parent=r,o._isDecodePause=!1,o._playSuccess=!0,o._isVideoOnRun=!0,o._startDts=0,o._fDuration=0,o._minFPSTime=0,o._lastPts=0,o._frameLengthPerFragment=0,o._gopBufferLength=0,o._maxGopDuration=0,o._minGopDuration=0,o._currentLevel=-1,o._endLevel=e.endLevel||2,o.currentFragmentDuration=0,o._handleKeyFrameVideo=wm(i=o._handleKeyFrameVideo).call(i,wy(o)),o}return Ey(n,[{key:"_bindEvents",value:function(){var e,t,n,r,i,o,a,s=this;document.addEventListener("visibilitychange",wm(e=this._onVisibilityChange).call(e,this)),this._decoder.on(YY.APPEND_VIDEO,wm(t=this._onAppendVideo).call(t,this)),this._decoder.on(YY.PLAY_FAILED,wm(n=this._onPlayFailed).call(n,this)),this._decoder.on("error",wm(r=this._onError).call(r,this)),this._decoder.on(YY.DECODED,wm(i=this._onDecoded).call(i,this)),this._decoder.on(YY.FIRST_FRAME,wm(o=this._onFirstFrame).call(o,this)),this._decoder.on(YY.FRAGMENT_END,wm(a=this._onFragmentEnd).call(a,this)),this._decoder.on("fps",(function(){for(var e,t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=Ag(e=[s._metaFPS]).call(e,r,[s._frameLengthPerFragment]);s.emit.apply(s,Ag(t=["fps"]).call(t,Ly(o)))})),this.on("keyFrame",this._handleKeyFrameVideo)}},{key:"_onRemuxed",value:function(e){var t={blobUrl:this._createBlobURL(e),dts:this.currentFragmentDts,duration:this.currentFragmentDuration,frameDuration:Math.floor(1e3/this._metaFPS)};this._recordGopDuration(this.currentFragmentDuration),this._pushBlob(t),dW.log(this.TAG,"_onRemuxed","maxgopduration:",this._maxGopDuration,"_gopBufferLength:",this._gopBufferLength),!this._isDataReady&&this._gopBufferLength>=this._maxGopDuration&&this._checkDataReady()}},{key:"_onPlayFailed",value:function(e){this._isInDecoding=!1,this._parent.emit(YY.PLAY_FAILED,e)}},{key:"_onAppendVideo",value:function(e){this._parent.emit(YY.APPEND_VIDEO,e)}},{key:"_onVisibilityChange",value:function(){this._isVideoOnRun="visible"===document.visibilityState}},{key:"_onDecoded",value:function(e,t){this._frameLengthPerFragment++;var n=this._buildFrameInfo(e,t);this._parent.emit(YY.DECODED,n),this._lastPts=t}},{key:"_onFirstFrame",value:function(e,t){var n=this._buildFrameInfo(e,t);this._parent.emit(YY.FIRST_FRAME,n)}},{key:"_onFragmentEnd",value:function(e,t){var n=this;dW.log(this.TAG,"_onFragmentEnd ,_isDecodePause:",this._isDecodePause,"decodeFPS:",e),e&&this._reduceResolution(e),this._isInDecoding=!1,this._inDecodeId=-1,this._currentInfo=null,this._frameLengthPerFragment=0,this._getBlobLength()&&!this._isDecodePause?this.startDecode():this.loadNextHandle=lG((function(){n._getBlobLength()&&!n._isDecodePause&&n._isVideoOnRun&&!n._isInDecoding&&(dW.log(n.TAG,"_onFragmentEnd, setInterval start next mp4 decode"),n.startDecode(),clearInterval(n.loadNextHandle))}))}},{key:"_onError",value:function(e,t){this._isInDecoding=!1,this._parent.emit("error",e,t)}},{key:"_checkReady",value:function(){this._isDataReady&&this._isInit&&(this.ready=!0,dW.log(this.TAG,"checkReady trigger ready"),this._parent.emit(YY.READY))}},{key:"_checkDataReady",value:function(){this._isDataReady=!0,this._checkReady()}},{key:"_reduceResolution",value:function(e){if(dW.log(this.TAG,"_reduceResolution","currentLevel:",this._currentLevel,"endLevel:",this._endLevel),this._videoHeight>720&&(dW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS"),this._parent.emit(MY.DECODE_LOW_FPS)),e&&e<20?(this._minFPSTime++,this._decoder.emit("fpsreduce",e)):this._minFPSTime=0,this._currentLevel>=this._endLevel)return dW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS",this._currentLevel,this._endLevel),void this._parent.emit(MY.DECODE_LOW_FPS);if(this._minFPSTime>2){var t,n=this._videoWidth,r=this._videoHeight;if(t=this._findLevel(r,this._currentLevel)){if(this._currentLevel=t.level,4===this._currentLevel)return dW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS, _currentLevel: ",this._currentLevel),void this._parent.emit(MY.DECODE_LOW_FPS);this.width=t.base*(n/r),this.height=t.base,this._decoder.emit("outputresolutionchange",this.width,this.height)}this._minFPSTime=0}}},{key:"_findLevel",value:function(e,t){return qH(c9).call(c9,(function(n){return n.base<e&&n.level>t}))}},{key:"_buildFrameInfo",value:function(e,t){try{var n=e.width,r=e.height;return{msg:"DECODED",width:n,height:r,buffer:e,yLinesize:n,uvLinesize:n/2,info:{baseDts:void 0,dts:t,gopId:0,isGop:void 0,key:!1,pts:t},type:"rgb"}}catch(_6){dW.log(this.TAG,_6)}}},{key:"_pushBlob",value:function(e){dW.log("push blob",e.dts,e.duration),e&&e.duration&&(this._gopBufferLength+=e.duration),this._blobURLList.push(e)}},{key:"_shiftBlob",value:function(){var e=this._blobURLList.shift();return e&&e.duration&&(this._gopBufferLength-=e.duration),e}},{key:"_filterBlob",value:function(e){var t,n=this;this._blobURLList=Ll(t=this._blobURLList).call(t,(function(t){return t.dts<e&&(v$.revokeObjectURL(t.blobUrl),t.duration&&(n._gopBufferLength-=t.duration)),t.dts>=e}))}},{key:"_emptyBlobList",value:function(){this._blobURLList=[],this._gopBufferLength=0}},{key:"_getBlobLength",value:function(){return this._blobURLList.length}},{key:"_handleKeyFrameVideo",value:function(e){try{var t=this._parent._timeRange.frames||[];if(this._parent._timeRange.clean(),!t.length)return;var n=t[0].dts,r=t[t.length-1].dts,i=n-this.endDts;dW.log(this.TAG,"_handleKeyFrameVideo","startDts:",n,"endDts:",r,"samples length:",t.length),this.endDts&&i>Math.floor(1e3/this._metaFPS)+1&&dW.log(this.TAG,"_handleKeyFrame, keyFrame dts:",n,"sample length:",t.length,"endDts:",r,"delay:",i);var o=r-n;if(this._fDuration||(this._fDuration=o),o<1500)return void dW.log(this.TAG,"_handleKeyFrame gopDuration :",o,"sample length:",t.length,"gopStartDts:",n,"gopEndDts:",r);if(this.firstDts||(this.firstDts=t[0].dts),this.currentFragmentDts=t[0].dts,this.currentFragmentDuration=this._getFragmentDuration(t),this.endDts=r,this.currentFragmentDts<this._startDts)return console.warn(this.TAG,"_handleKeyFrameVideo","currentFragmentDts < this._startDts",this.currentFragmentDts,this._startDts),void(t=[]);this.startRemux(t),t=[]}catch(_6){console.error(this.TAG,"_handleKeyFrameVideo",_6)}}},{key:"_getFragmentDuration",value:function(e){var t=0,n=0;return e[0].keyframe||console.error(this.TAG,"_getFragmentDuration","gop firstFrame is not keyframe"),ql(e).call(e,(function(r,i){r.keyframe&&i&&(t+=e[i-1].dts-e[n].dts,n=i)})),t+=e[e.length-1].dts-e[n].dts}},{key:"_createBlobURL",value:function(e){if(e){var t=new window.Blob([e.buffer],{type:"video/mp4"});return v$.createObjectURL(t)}}},{key:"_recordGopDuration",value:function(e){var t=e;this._minGopDuration||(this._minGopDuration=t),t>this._maxGopDuration&&(this._maxGopDuration=t),t<this._minGopDuration&&(this._minGopDuration=t)}},{key:"checkMaxFrames",value:function(e){"number"==typeof e&&(this._isDecodePause=e>40,this._playSuccess&&this._isDecodePause&&this._decoder.pause())}},{key:"checkMinFrames",value:function(e){var t=this;if("number"==typeof e&&(this._isDecodePause=!(e<25),!this._isDecodePause)){var n=this._decoder.play();void 0!==n?n.then((function(){t._playSuccess=!0})).catch((function(){t._playSuccess=!1})):Cg((function(){t._playSuccess=!0}),20)}}},{key:"frameRendend",value:function(e){if(e.dom){if(e.dom.width=0,e.dom.height=0,this._decoder._canvasList.length>40)return;this._decoder._canvasList.push(e)}else dW.error(this.TAG,"_onRendend","imageObj. is error",e)}},{key:"checkValidBlob",value:function(e){this._filterBlob(e)}},{key:"chaseVideoFrame",value:function(e){dW.log(this.TAG,e,e.frame.dts,this.currentFragmentDts);var t=e.frame.dts;if(this._startDts=t,t===this.currentFragmentDts){if(dW.log(this.TAG,"_onChaseFrame","_inDecodeId:",this._inDecodeId,"currentFragmentDts:",this.currentFragmentDts),this._inDecodeId>0&&this._inDecodeId<t)return dW.log(this.TAG,"_onChaseFrame, _inDecodeId > 0 && _inDecodeId < startDts, _inDecodeId:",this._inDecodeId,"startDts:",t),this.stopDecode(),this._filterBlob(t),void this.startDecode();if(this._inDecodeId===t)return dW.log(this.TAG,"_onChaseFrame, _inDecodeId === startDts, startDts:",t),this.stopDecode(),void this.reStrartDecode(this._currentInfo);-1===this._inDecodeId&&(dW.log(this.TAG,"_onChaseFrame","_inDecodeId==-1"),this.startDecode())}t>this.currentFragmentDts&&(dW.log(this.TAG,"_onChaseFrame, startDts > currentFragmentDts, startDts:",t,"currentFragmentDts:",this.currentFragmentDts),this.stopDecode(),this._emptyBlobList()),t<this.currentFragmentDts&&(dW.log(this.TAG,"_onChaseFrame, startDts < currentFragmentDts, startDts:",t,"currentFragmentDts:",this.currentFragmentDts),t>this._inDecodeId&&(this._filterBlob(t),this.stopDecode(),this.startDecode()))}},{key:"init",value:function(e){this._isInit||(this._metaFPS=e.fpsNum/e.fpsDen||25,this._videoWidth=e.width,this._videoHeight=e.height,this._width=this._videoWidth,this._height=this._videoHeight,this._frameDuration=sg(1e3/this._metaFPS),this._isInit=!0,dW.log("".concat(this.TAG," has inited")),this._isInit=!0,this._checkReady())}},{key:"reStrartDecode",value:function(e){if(e)try{dW.log(this.TAG,"reStrartDecode"),this._isInDecoding=!0,this._inDecodeId=e.dts,this._currentInfo=e,this._decoder.startDecode(e,this._metaFPS,this._startTime),this._startTime=0}catch(_6){console.error("load error",_6)}}},{key:"stopDecode",value:function(){this._isInDecoding=!1,this._inDecodeId=-1,this._currentInfo=null,this._frameLengthPerFragment=0,this._decoder.stopDecode()}},{key:"startDecode",value:function(){if(this._isInDecoding)dW.log(this.TAG,"startDecode","this decoder is in decoding");else{var e=this._getBlobLength();if(this._decoder&&e){dW.log(this.TAG,"startDecode","blob url length:",e);var t=this._shiftBlob()||{};try{dW.log(this.TAG,"startDecode",t.dts,t.duration),this._isInDecoding=!0,this._inDecodeId=t.dts,this._currentInfo=t,this._decoder.startDecode(t,this._metaFPS)}catch(_6){console.error(this.TAG,"startDecode","load error",_6)}}}}},{key:"canSeek",value:function(e){var t=e.frame.dts;return!!(this.currentFragmentDts>=t&&this._isInDecoding)&&(this._inDecodeId!==t&&this._inDecodeId<t)}},{key:"startRemux",value:function(e){if(dW.log("startRemux samples length:",e.length),e.length){var t=this._parent._meta;t.samples=e;var n=this._remux.remux(t).videoSegment;this._onRemuxed(n)}else console.error("frame length is 0")}},{key:"canPlayType",value:function(e){if(this._decoder)try{return this._decoder.canPlayType('video/mp4;codecs="'+e.codec+'"')}catch(_6){console.error(_6)}}},{key:"destroy",value:function(){this._blobURLList=[],this._decoder.destroy()}},{key:"empty",value:function(){if(dW.log("empty"),this._decoder){var e=this._decoder._canvasList;return dW.log(this.TAG,"empty >>>>>>>>>>>>>>>>>>length:",e.length),ql(e).call(e,(function(e){e.dom&&(dW.log("clear >>>>>>>>>>>>>>>>>>"),e.dom.width=0,e.dom.height=0,e.dom=null)})),e.length}}},{key:"isIDLE",get:function(){return dW.log(this.TAG,"isIDEL","blob length:",this._getBlobLength(),"_isInDecoding:",this._isInDecoding,"isVideoOnRun:",this._isVideoOnRun,"_isDecodePause",this._isDecodePause),!this._getBlobLength()&&!this._isInDecoding&&this._isVideoOnRun}},{key:"ready",get:function(){return this._ready},set:function(e){this._ready=e}},{key:"remux",get:function(){return this._remux}},{key:"isInit",get:function(){return this._isInit}}]),n}(cY),h9=function(e){Ty(n,e);var t=Dy(n);function n(e,r){var i;return _y(this,n),(i=t.call(this,e,r)).TAG="VideoRenderFromVideo",i._videoDecodeController=new l9(e,wy(i)),i._canAutoPlay=!0,i._videoDecode=e.videoDecode,i._chaseToFrame=null,i}return Ey(n,[{key:"videoDecode",get:function(){return this._videoDecode},set:function(e){this._videoDecode=e}},{key:"_bindEvents",value:function(){var e,t,r,i,o,a,s,u,c,l=this;Iy(Ry(n.prototype),"_bindEvents",this).call(this),this.on("keyFrame",wm(e=this._onKeyFrame).call(e,this)),this.on(YY.READY,wm(t=this._onReady).call(t,this)),this.on(YY.DECODED,wm(r=this._onDecoded).call(r,this)),this.on(YY.PLAY_FAILED,wm(i=this._onPlayFailed).call(i,this)),this.on("error",wm(o=this._onError).call(o,this)),this.on(YY.APPEND_VIDEO,wm(a=this._onAppendVideo).call(a,this)),this.on(YY.FIRST_FRAME,wm(s=this._onFirstFrame).call(s,this)),this._parent.on(YY.CHASE_VIDEO_FRAME,wm(u=this._onChaseVideoFrame).call(u,this)),this._parent.on(WY.SYNC_DTS,wm(c=this._onTimeLineSyncDTS).call(c,this)),window.addEventListener("unload",(function(){l._empty()}))}},{key:"_onTimeLineSyncDTS",value:function(e){this._videoDecodeController.checkValidBlob(e)}},{key:"_onChaseVideoFrame",value:function(e){this._doChaseVideoFrame(e)}},{key:"_onAppendVideo",value:function(e){try{this._parent._parent.appendChild(e)}catch(_6){cosole.error(this.TAG,"onAppendVideo",_6)}}},{key:"_onKeyFrame",value:function(){dW.log(this.TAG,"_onKeyFrame, keyframe"),this._videoDecodeController.emit("keyFrame")}},{key:"_onError",value:function(e,t){console.error(this.TAG,"decoder error",e,t),t||this._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,this._assembleErr(e&&e.message))}},{key:"_onReady",value:function(){if(!this._frameRender){var e=IW(this._config,{meta:this._meta,canvas:this._canvas,type:"2d"});try{this._frameRender=new r9(e,this)}catch(_6){this._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,this._assembleErr(_6&&_6.message))}}this._startDecode()}},{key:"_onFirstFrame",value:function(e){dW.log(this.TAG,"onFirstFrame"),this._receiveFrame(e),this._firstFrame=!0}},{key:"_onDecoded",value:function(e){var t=this;if(this._inChaseFrame){if(this.chaseFrameAfter++,1===this.chaseFrameAfter&&this._chaseToFrame){if(this._parent.emit(YY.CHASE_VIDEO_FRAME_END,this._chaseToFrame),this._frameQueue.length){var n=this._frameQueue.frames;ql(n).call(n,(function(e){t._videoDecodeController.frameRendend(e.buffer)}))}this._frameQueue.empty(),this._videoDecodeController.checkMinFrames(this._frameQueue.length),this._timeRange.deletePassed(this._chaseToFrame.frame.dts),this._inChaseFrame=!1,this._chaseToFrame=null,console.warn(this.TAG,"onDecoded","_inChaseFrame end")}}else this.chaseFrameAfter=0;this._receiveFrame(e)}},{key:"_onPlayFailed",value:function(e){console.warn(this.TAG,"onPlayFailed, this._ready:",this._ready,",firstEmit:",e,",frame length:",this._frameQueue.length),this._ready||e||this._whenReady(),this._canAutoPlay=!1}},{key:"canSeek",value:function(e){return this._videoDecodeController.canSeek(e)}},{key:"_initDecoder",value:function(){this._isInit||(dW.log(this.TAG,"_initDecoder"),this._videoDecodeController.isInit||this._videoDecodeController.init(this._meta),this._isInit=!0)}},{key:"_receiveFrame",value:function(e){Iy(Ry(n.prototype),"_receiveFrame",this).call(this,e),this._videoDecodeController.checkMaxFrames(this._frameQueue._frames.length)}},{key:"_setMetadata",value:function(e){dW.warn(this.TAG,"video set metadata",e),this._meta=e;var t=e.fpsNum/e.fpsDen;t?dW.log(this.TAG,"detect fps:",t):dW.warn(this.TAG,"no detect fps,start estimate"),this._initDecoder(e)}},{key:"_doChaseVideoFrame",value:function(e){this._inChaseFrame=!0,this._chaseToFrame=e,this._videoDecodeController.chaseVideoFrame(e)}},{key:"_appendChunk",value:function(e){var t;this._meta||this._setMetadata(e);for(var n=lm(t=e.samples).call(t),r=n.length,i=0;i<r;i++){var o=n.shift();o.keyframe&&this.emit("keyFrame"),this._timeRange.append([o],this.noAudio,!1)}}},{key:"_startDecode",value:function(){this._videoDecodeController.startDecode()}},{key:"_checkToDecode",value:function(){this._startDecode()}},{key:"_startRender",value:function(){dW.log(this.TAG,"_startRender interval",this.interval),this._tickTimer.start(this.interval)}},{key:"_render",value:function(e){var t=this,n=this._frameQueue.nextFrame(),r=this.preciseVideoDts;if(n&&this._timeRange){var i=n.info;if(!i)return this._frameQueue.shift(),void console.error("not info");this._renderDts=i.dts;var o=i.dts-r;if(o<-150){this.lastPrecise;var a=this._frameQueue.frames,s=this._getDeleteFrames(a,r),u=s.deleteFrames,c=s.useFrames;return ZQ(a).call(a,0),ql(c).call(c,(function(e){a.push(e)})),ql(u).call(u,(function(e){t._videoDecodeController.frameRendend(e.buffer)})),this._videoDecodeController.emit("renderDelay",o,this._frameQueue._frames.length),void this._videoDecodeController.checkMinFrames(this._frameQueue.length)}if(!(!e&&o>30&&o<6e4)){var l,h,A,d,f,v;if(Math.abs(this._lastTimeupdate-i.dts)>250&&(this._emitTimelineEvents(WY.PLAY_EVENT,UY.TIMEUPDATE),this._lastTimeupdate=i.dts),dW.long)dW.log(this.TAG,Ag(l=Ag(h=Ag(A=Ag(d=Ag(f=Ag(v="render delay:".concat(o," , timelinePosition:")).call(v,r," , dts:")).call(f,i.dts," , cost:")).call(d,i.cost," , gopID:")).call(A,i.gopId," , rest:")).call(h,this._frameQueue.length,", buffer frame:")).call(l,this._timeRange.frameLength));var p=performance.now();this._frameRender.render(n.buffer,n.width,n.height,n.yLinesize,n.uvLinesize),this.hasFirstFrame||e||(this.hasFirstFrame=!0,this._parent.emit(WY.PLAY_EVENT,"firstframe")),this._videoDecodeController.frameRendend(n.buffer),this._frameQueue.shift(),this._videoDecodeController.checkMinFrames(this._frameQueue.length),this._videoDecodeController.emit("renderDelay",o,this._frameQueue._frames.length),this._renderCost=performance.now()-p,e||(this.lastTime&&(this.lastPrecise,EG(),this.lastTime),this.lastFrameinfo=i.dts,this.lastPrecise=r,this.lastTime=EG(),this.lastAudioTime=this._parent.audioRender.currentTime)}}else{if(this._videoDecodeController.checkMinFrames(this._frameQueue._frames.length),this._parent._paused)return;if(!this._firstFrame)return void dW.log(this.TAG,"_render","not first frame return");var m=this._videoDecodeController;if(dW.log(this.TAG,",lack frame, _inDecoding:",this._videoDecodeController._isInDecoding,this._videoDecodeController._isDecodePause,",_frameQueue.length:",this._frameQueue.length),!this._frameQueue.length&&m.isIDLE){this._ready=!1;var y=this._parent.audioRender;console.warn(this.TAG,"trigger video waiting vdecode, preciseVideoDts:",r,y.currentTime,y.duration,y.buffered.end(0),y.baseDts),this.emit(MY.VIDEO_WAITING)}this._checkToDecode()}}},{key:"_updateSegmentEnd",value:function(){}},{key:"_destroy",value:function(e){this._empty(),Iy(Ry(n.prototype),"destroy",this).call(this,e),this._videoDecodeController.destroy()}},{key:"_doPause",value:function(){dW.log(this.TAG,">>>>>>>>doPause"),this._tickTimer.stop()}},{key:"_getDeleteFrames",value:function(e,t){var n=[],r=[];return ql(e).call(e,(function(e){e.info&&e.info.dts>t?r.push(e):e.info&&e.info.dts<=t&&n.push(e)})),{deleteFrames:n,useFrames:r}}},{key:"_empty",value:function(){var e;this._videoDecodeController&&(this._videoDecodeController.empty(),ql(e=this._frameQueue.frames).call(e,(function(e){e.buffer&&e.buffer.dom&&(e.buffer.dom.width=0,e.buffer.dom.height=0,e.buffer.dom=null)})))}}]),n}(s9),A9=function(e){Ty(n,e);var t=Dy(n);function n(e){var r;return _y(this,n),ky(wy(r=t.call(this)),"_parent",null),ky(wy(r),"_decoderReady",!1),ky(wy(r),"_inDecoding",!1),ky(wy(r),"_toDecodeFirstframe",!0),ky(wy(r),"_id",(new Date).getMilliseconds()),ky(wy(r),"_workerErrorCallback",null),ky(wy(r),"_workerMessageCallback",null),ky(wy(r),"_decoderWorker",null),r._parent=e,r}return Ey(n,[{key:"analyse",get:function(){return this._parent.analyse}},{key:"inDecoding",get:function(){return this._inDecoding}},{key:"decoderMode",get:function(){return this._decoderMode}},{key:"decoderReady",get:function(){return this._decoderReady}},{key:"needToDecode",get:function(){return this._inDecoding?0:this._continueDecodeThreshold}},{key:"maxDecodeOnce",get:function(){return this._maxDecodeOnce}},{key:"meta",get:function(){var e;return null===(e=this._parent)||void 0===e?void 0:e._meta},set:function(e){this._parent&&(this._parent._meta=e)}},{key:"init",value:function(e,t){this._workerMessageCallback=e,this._workerErrorCallback=t,this._initWorker()}},{key:"_initWorker",value:function(){throw new Error("need override by children")}},{key:"checkToDecode",value:function(e){this.webcodec?e<=this.needToDecode&&this.doDecode():!this._inDecoding&&e<=this.needToDecode&&this.doDecode()}},{key:"doDecode",value:function(){var e=this,t=this._getFramesToDecode();t&&t.length&&this.meta&&(this._toDecodeFirstframe&&(this._toDecodeFirstframe=!1,this.analyse.addFirstFrameToDecode()),this._avccpushed||this._initDecoderWithConfiguration(this._decoderWorker,this.meta),dW.enable&&dW.log(this.TAG,"doDecode ".concat(t.length," frames")),ql(t).call(t,(function(t){e._doDecodeInternal(t)})),this._inDecoding=!0,this._decoderWorker.postMessage({msg:"finish_flag"}))}},{key:"preciseSeek",value:function(e){var t,n,r,i,o=this,a=1e3*e,s=null===(t=this._parent)||void 0===t||null===(n=t._timeRange)||void 0===n?void 0:n.getFramesForPreciseSeek(a),u=s.length;u<this.maxDecodeOnce?this.doDecode():(null===(r=this._parent)||void 0===r||null===(i=r._timeRange)||void 0===i||i.updateFrameIndexForPreciseSeek(u),dW.enable&&dW.log(this.TAG,"doDecode ".concat(s.length," frames for precise seek")),ql(s).call(s,(function(e,t){o._doDecodeInternal(e,!0,t>=u-6)})),this._inDecoding=!0,this._decoderWorker.postMessage({msg:"finish_flag"}))}},{key:"_getFramesToDecode",value:function(){var e=this._parent,t=e._timeRange,n=e._decodeEstimate;if(this._decoderReady&&t){var r=t.frameLength;if(r){var i=this._toDecodeFirstframe?HW().maxDecodeOnceFirstTime:this.maxDecodeOnce;1===r&&n.resetDecodeDot(performance.now());for(var o=[];i>0;){var a=t&&t.getFrame();if(!a)break;o.push(a),a.gopId&&a.gopId-1==0&&n.updateGopCount(),i--}return o}}}},{key:"_doDecodeInternal",value:function(e,t,n){var r;null!=e&&e.meta&&(this.meta=e.meta,dW.warn(this.TAG,"detect metadata! flush decoder"),this._initDecoderWithConfiguration(this.__decoderWorker,e.meta));var i={dts:e.dts,pts:e.pts||e.dts+e.cts,keyframe:e.keyframe,gopId:e.gopId,id:this._id};t&&(i.preciseSeek=!0,i.output=n);var o=lm(r=e.data).call(r);this._decoderWorker.postMessage({msg:"decode",data:o,info:i},[o.buffer])}},{key:"_initDecoderWithConfiguration",value:function(){throw new Error("need override by children")}},{key:"flushDecoder",value:function(){this._decoderWorker.postMessage({msg:"flush"})}},{key:"destroy",value:function(){throw new Error("need override by children")}}]),n}(cY),d9="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPW51bGwsdD1bXSxzPTAsYT0hMTtzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLChmdW5jdGlvbihvKXtzd2l0Y2goby5kYXRhLm1zZyl7Y2FzZSJjb25maWd1cmF0aW9uIjplPW5ldyBzZWxmLlZpZGVvRGVjb2Rlcih7b3V0cHV0OmZ1bmN0aW9uKG8pe2E9ITAscyYmY2xlYXJUaW1lb3V0KHMpO3ZhciBuPXQuc2hpZnQoKTtuP3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkRFQ09ERUQiLHdpZHRoOm8uZGlzcGxheVdpZHRoLGhlaWdodDpvLmRpc3BsYXlIZWlnaHQsaW5mbzpuLGJ1ZmZlcjpvfSxbb10pOm8uY2xvc2UoKSxlLmRlY29kZVF1ZXVlU2l6ZT09PXQubGVuZ3RoJiZzZWxmLnBvc3RNZXNzYWdlKHt0eXBlOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KX0sZXJyb3I6ZnVuY3Rpb24oZSl7Y29uc29sZS5sb2coIltXZWJjb2RlY1dvcmtlcl06IixlKSwiQ29kZWMgcmVjbGFpbWVkIGR1ZSB0byBpbmFjdGl2aXR5LiIhPT1lLm1lc3NhZ2UmJnNlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkZBSUxFRCIsbWVzc2FnZTplJiZlLm1lc3NhZ2V9KX19KSxzZWxmLlZpZGVvRGVjb2Rlci5pc0NvbmZpZ1N1cHBvcnRlZChvLmRhdGEuZGF0YSkudGhlbigoZnVuY3Rpb24odCl7dC5zdXBwb3J0ZWQmJihlLmNvbmZpZ3VyZShvLmRhdGEuZGF0YSksY29uc29sZS5sb2coIltXZWJjb2RlY1dvcmtlcl06IiwiaXNDb25maWdTdXBwb3J0ZWQiLHQpKX0pKS50aGVuKChmdW5jdGlvbigpe3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkRFQ09ERVJfUkVBRFkifSkscz1zZXRUaW1lb3V0KChmdW5jdGlvbigpe2F8fHNlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkZBSUxFRCIsbWVzc2FnZToibm8gZnJhbWUgb3V0cHV0In0pfSksMmUzKX0pKS5jYXRjaCgoZnVuY3Rpb24oZSl7c2VsZi5wb3N0TWVzc2FnZSh7dHlwZToiRkFJTEVEIixtZXNzYWdlOmUmJmUubWVzc2FnZX0pfSkpO2JyZWFrO2Nhc2UiZGVjb2RlIjp2YXIgbj1vLmRhdGEuZGF0YSxpPW8uZGF0YS5pbmZvO3QucHVzaChpKTt2YXIgZD1uLmJ5dGVMZW5ndGgtNCxjPW5ldyBEYXRhVmlldyhuZXcgQXJyYXlCdWZmZXIoNCkpO2Muc2V0VWludDMyKDAsZCwhMSksbi5zZXQobmV3IFVpbnQ4QXJyYXkoYy5idWZmZXIpLDApLGkua2V5ZnJhbWUmJmUuZmx1c2goKTt2YXIgcj1uZXcgc2VsZi5FbmNvZGVkVmlkZW9DaHVuayh7dHlwZTppLmtleWZyYW1lPyJrZXkiOiJkZWx0YSIsdGltZXN0YW1wOmkucHRzLGRhdGE6bn0pO2UuZGVjb2RlKHIpO2JyZWFrO2Nhc2UiZGVzdHJveSI6ZSYmKGUuZmx1c2goKSxlLmNsb3NlKCkpLGNsZWFyVGltZW91dChzKTticmVhaztjYXNlImNoZWNrRGVjb2RlIjpzZWxmLnBvc3RNZXNzYWdlKHt0eXBlOiJDSEVDS19UT19ERUNPREUiLGRhdGE6MD09PU1hdGguYWJzKGUuZGVjb2RlUXVldWVTaXplLXQubGVuZ3RoKX0pfX0pKX0oKTsK",f9="undefined"!=typeof window&&window.Blob&&new Blob([atob(d9)],{type:"text/javascript;charset=utf-8"});function v9(){var e=f9&&(v$||window.webkitURL).createObjectURL(f9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+d9,{type:"module"})}finally{e&&(v$||window.webkitURL).revokeObjectURL(e)}}var p9=HW().maxDecodeOnceWebcodec,m9=function(e){Ty(n,e);var t=Dy(n);function n(){var e,r;_y(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return ky(wy(r=t.call.apply(t,Ag(e=[this]).call(e,o))),"TAG","WebCodecController"),ky(wy(r),"_decoderMode",5),ky(wy(r),"_maxDecodeOnce",p9),ky(wy(r),"_continueDecodeThreshold",p9/2),ky(wy(r),"_avccpushed",!1),r}return Ey(n,[{key:"webcodec",get:function(){return!0}},{key:"needToDecode",get:function(){return this._inDecoding?(this._checkToDecode(),0):this._continueDecodeThreshold}},{key:"_initWorker",value:function(){var e=this;dW.log(this.TAG,"start init webcodec worker");var t=new v9;t.onMessage=function(t){var n,r;switch(t.data.type){case"DECODER_READY":dW.log(e.TAG,"webcodec worker ready "),e._decoderReady=!0,e._workerMessageCallback({type:"DECODER_READY"});break;case"DECODED":if(e._inDecoding=!0,(null===(n=t.data)||void 0===n||null===(r=n.info)||void 0===r?void 0:r.id)!==e._id)return;e._workerMessageCallback({type:"RECEIVE_FRAME",data:t.data});break;case"BATCH_FINISH_FLAG":if(e._inDecoding=!1,!e._workerMessageCallback)return;e._workerMessageCallback({type:"BATCH_FINISH"});break;case"CHECK_TO_DECODE":e._inDecoding=t.data.data;break;case"FAILED":e._whenError(t.data.message)}},t.onError=function(t){var n,r,i=null===(n=e._parent)||void 0===n||null===(r=n._parent)||void 0===r?void 0:r._parent;i&&i.removeChild(i.querySelector("canvas")),e._whenError(t.message)},t.addEventListener("message",t.onMessage),t.addEventListener("error",t.onError),this._decoderWorker=t,this._initDecoderWithConfiguration(t,this._parent.configuration)}},{key:"_whenError",value:function(e){n.canUse=!1,this._workerErrorCallback(e)}},{key:"_initDecoderWithConfiguration",value:function(e,t){e.postMessage({msg:"configuration",data:{codec:this._parent._meta.codec,codedHeight:this._parent._meta.height,codedWidth:this._parent._meta.width,description:t}}),this._avccpushed=!0}},{key:"_checkToDecode",value:function(){this._decoderWorker.postMessage({msg:"checkDecode"})}},{key:"destroy",value:function(){var e=this._decoderWorker;e.removeEventListener("message",e.onMessage),e.removeEventListener("error",e.onError),e.postMessage({msg:"destroy"}),e.terminate(),this._decoderWorker=null}}],[{key:"isSupported",value:function(){return HW().h264WithWebcodec&&!!window.VideoDecoder&&!1!==n.canUse}}]),n}(A9),y9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD0zMTQ1NzI4LGluaXRUcz0wLERlY29kZXI9ZnVuY3Rpb24oZSl7dGhpcy5pbml0ZWQ9ITEsdGhpcy5pbmZvSWQ9MCx0aGlzLnNlbGY9ZSx0aGlzLm1ldGE9dGhpcy5zZWxmLm1ldGEsdGhpcy50cz0wLHRoaXMuaW5mb2xpc3Q9W10sZS5wYXJfYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkPXRoaXMuYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkLmJpbmQodGhpcyksZS5wYXJfYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPXRoaXMuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkLmJpbmQodGhpcyl9LGRlY29kZXI7ZnVuY3Rpb24gb25Qb3N0UnVuKCl7KGRlY29kZXI9bmV3IERlY29kZXIodGhpcykpLmluaXQoKX1EZWNvZGVyLnByb3RvdHlwZS50b1U4QXJyYXk9ZnVuY3Rpb24oZSx0KXtyZXR1cm4gTW9kdWxlLkhFQVBVOC5zdWJhcnJheShlLGUrdCl9LERlY29kZXIucHJvdG90eXBlLmluaXQ9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5SW5pdCgwLDEpLHRoaXMub2Zmc2V0PU1vZHVsZS5fYnJvYWR3YXlDcmVhdGVTdHJlYW0oTUFYX1NUUkVBTV9CVUZGRVJfTEVOR1RIKX0sRGVjb2Rlci5wcm90b3R5cGUuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPWZ1bmN0aW9uKGUsdCxvLG4saSl7dmFyIHM9dGhpcy5pbmZvbGlzdC5zaGlmdCgpLHI9byxhPW8vMixjPXQsZD10LzI7aWYoIXRoaXMubWV0YXx8NDQ0IT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdCYmNDIyIT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdHx8KGE9byksIXN8fCFzLnByZWNpc2VTZWVrfHxzLm91dHB1dCl7dmFyIGY9dGhpcy50b1U4QXJyYXkoZSxjKnIrZCphKjIpLHU9bmV3IFVpbnQ4QXJyYXkoZi5sZW5ndGgpO3Uuc2V0KGYpO3ZhciBsPXUuYnVmZmVyO3RoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVEIix3aWR0aDp0LGhlaWdodDpvLHlMaW5lc2l6ZTpjLHV2TGluZXNpemU6ZCxpbmZvOnMsYnVmZmVyOmx9LFtsXSl9fSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXtpZighdGhpcy5pbml0ZWQpe3RoaXMuaW5pdGVkPSEwO3ZhciBlPTA7aW5pdFRzJiYoZT1wZXJmb3JtYW5jZS5ub3coKS1pbml0VHMpLHRoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVSX1JFQURZIixjb3N0OmV9KX19LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlLHQpe3ZhciBvPXBhcnNlSW50KChuZXcgRGF0ZSkuZ2V0VGltZSgpKSxuPW8tMWU5Kk1hdGguZmxvb3Ioby8xZTkpO3RoaXMuaW5mb2xpc3QucHVzaCh0KSx0JiZ0LmtleWZyYW1lJiYodGhpcy5pbmZvbGlzdD1bdF0sTW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKG4pKSxNb2R1bGUuSEVBUFU4LnNldChlLHRoaXMub2Zmc2V0KSxNb2R1bGUuX2Jyb2Fkd2F5UGxheVN0cmVhbShlLmxlbmd0aCx0aGlzLmluZm9JZCl9LERlY29kZXIucHJvdG90eXBlLmZsdXNoPWZ1bmN0aW9uKCl7TW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKCl9LERlY29kZXIucHJvdG90eXBlLmRlc3Ryb3k9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5RXhpdCgpfSxEZWNvZGVyLnByb3RvdHlwZS51cGRhdGVNZXRhPWZ1bmN0aW9uKGUpe3RoaXMubWV0YT1lfTt2YXIgV0FTTV9DRE5fUEFUSF9QUkVGSVg9IiI7ZnVuY3Rpb24gaW5pdChlKXtXQVNNX0NETl9QQVRIX1BSRUZJWD1lLnNwbGl0KCIvIikuc2xpY2UoMCwtMSkuam9pbigiLyIpLGluaXRUcz1wZXJmb3JtYW5jZS5ub3coKTt2YXIgdD0vYXNtLy50ZXN0KGUpO2RlY29kZXJ8fChzZWxmLmltcG9ydFNjcmlwdHM/bmV3IFByb21pc2UoKGZ1bmN0aW9uKHQsbyl7c2VsZi5jb25zb2xlfHwoc2VsZi5jb25zb2xlPXtsb2c6ZnVuY3Rpb24oKXt9LHdhcm46ZnVuY3Rpb24oKXt9LGluZm86ZnVuY3Rpb24oKXt9LGVycm9yOmZ1bmN0aW9uKCl7fX0pO3RyeXtzZWxmLmltcG9ydFNjcmlwdHMoZSksdCgpfWNhdGNoKG4pe2lmKG4ubWVzc2FnZS5pbmNsdWRlcygiTW9kdWxlIHNjcmlwdHMgZG9uJ3Qgc3VwcG9ydCBpbXBvcnRTY3JpcHRzIikpcmV0dXJuIHQoc2hpbUltcG9ydFNjcmlwdHMoZSkpO28obil9fSkpOnNoaW1JbXBvcnRTY3JpcHRzKGUpKS50aGVuKChmdW5jdGlvbigpe3JldHVybiB0Pyhjb25zb2xlLmxvZygiYXV0byBpbnN0YW5jZSBEZWNvZGVyISIpLG5ldyBQcm9taXNlKChmdW5jdGlvbihlLHQpe3NldFRpbWVvdXQoKGZ1bmN0aW9uKCl7dHJ5e29uUG9zdFJ1bi5jYWxsKHNlbGYpLGUoKX1jYXRjaChvKXt0KG8pfX0pKX0pKSk6c2VsZi5tP3NlbGYubSh7aW5zdGFudGlhdGVXYXNtOmZ1bmN0aW9uKGUsdCl7ZmV0Y2goIiIuY29uY2F0KFdBU01fQ0ROX1BBVEhfUFJFRklYLCIvZGVjb2Rlci53YXNtLmpzIikpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiBlLmFycmF5QnVmZmVyKCl9KSkudGhlbigoZnVuY3Rpb24odCl7cmV0dXJuIFdlYkFzc2VtYmx5Lmluc3RhbnRpYXRlKHQsZSl9KSkudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIHQoZS5pbnN0YW5jZSl9KSl9fSkudGhlbigoZnVuY3Rpb24oZSl7c2VsZi5Nb2R1bGU9ZSxvblBvc3RSdW4uY2FsbChzZWxmKX0pKTpuZXcgUHJvbWlzZSgoZnVuY3Rpb24oZSx0KXthZGRPblBvc3RSdW4ob25Qb3N0UnVuLmJpbmQoc2VsZikpLE1vZHVsZS5vblJ1bnRpbWVJbml0aWFsaXplZD1mdW5jdGlvbigpe2UoKX0sTW9kdWxlLm9uQWJvcnQ9ZnVuY3Rpb24oZSl7dChlJiZlLm1lc3NhZ2U/ZTpuZXcgRXJyb3IoIndhc20gaW5pdCBlcnJvciIpKX0sc2V0VGltZW91dCgoZnVuY3Rpb24oKXt0KG5ldyBFcnJvcigid2FzbSBsb2FkIHRpbWVvdXQiKSl9KSw2ZTMpfSkpfSkpLmNhdGNoKChmdW5jdGlvbihlKXtzZWxmLnBvc3RNZXNzYWdlKHttc2c6IklOSVRfRkFJTEVEIixsb2c6ZS5tZXNzYWdlfSl9KSl9c2VsZi5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7dmFyIHQ9ZS5kYXRhO2lmKHQubXNnKXtpZigiaW5pdCIhPT10Lm1zZyYmInByZWxvYWQiIT09dC5tc2cmJiFkZWNvZGVyKXJldHVybjtzd2l0Y2godC5tc2cpe2Nhc2UicHJlbG9hZCI6aW5pdCh0LnVybCk7YnJlYWs7Y2FzZSJpbml0IjpzZWxmLm1ldGE9dC5tZXRhLGluaXQodC51cmwpO2JyZWFrO2Nhc2UidXBkYXRlbWV0YSI6c2VsZi5tZXRhPXQubWV0YSxkZWNvZGVyLnVwZGF0ZU1ldGEodC5tZXRhKTticmVhaztjYXNlImluaXREZWNvZGVyIjpkZWNvZGVyLmRlY29kZSh0LmRhdGEpO2JyZWFrO2Nhc2UiZGVjb2RlIjpkZWNvZGVyLmRlY29kZSh0LmRhdGEsdC5pbmZvKTticmVhaztjYXNlImZsdXNoIjpkZWNvZGVyLmZsdXNoKCk7YnJlYWs7Y2FzZSJmaW5pc2hfZmxhZyI6c2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KTticmVhaztjYXNlImRlc3RvcnkiOmRlY29kZXIuZGVzdHJveSgpfX1lbHNlIHNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiRVJST1I6aW52YWxpZCBtZXNzYWdlIn0pfX0pKCk7Cg==",g9="undefined"!=typeof window&&window.Blob&&new Blob([atob(y9)],{type:"text/javascript;charset=utf-8"});function _9(){var e=g9&&(v$||window.webkitURL).createObjectURL(g9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+y9,{type:"module"})}finally{e&&(v$||window.webkitURL).revokeObjectURL(e)}}var b9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD01MjQyODgwLEJBVENIX0RFQ09ERV9TSVpFPTgsaW5pdFRzPTAsRGVjb2Rlcj1mdW5jdGlvbihlKXt0aGlzLmluaXRlZD0hMSx0aGlzLmluZm9JZD0wLHRoaXMuc2VsZj1lLHRoaXMubWV0YT1lLm1ldGEsdGhpcy50cz0wLHRoaXMuaW5mb2xpc3Q9W10sZS5wYXJfYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkPXRoaXMuYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkLmJpbmQodGhpcyksZS5wYXJfYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPXRoaXMuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkLmJpbmQodGhpcyl9LGRlY29kZXI7ZnVuY3Rpb24gb25Qb3N0UnVuKCl7KGRlY29kZXI9bmV3IERlY29kZXIodGhpcykpLmluaXQoKX1EZWNvZGVyLnByb3RvdHlwZS50b1U4QXJyYXk9ZnVuY3Rpb24oZSx0KXtyZXR1cm4gTW9kdWxlLkhFQVBVOC5zdWJhcnJheShlLGUrdCl9LERlY29kZXIucHJvdG90eXBlLmluaXQ9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5SW5pdCgwLDIpLHRoaXMuc3RyZWFtQnVmZmVyUHRyPU1vZHVsZS5fYnJvYWR3YXlDcmVhdGVTdHJlYW0oTUFYX1NUUkVBTV9CVUZGRVJfTEVOR1RIKSx0aGlzLnN0cmVhbUJ1ZmZlcj10aGlzLnRvVThBcnJheSh0aGlzLnN0cmVhbUJ1ZmZlclB0cixNQVhfU1RSRUFNX0JVRkZFUl9MRU5HVEgpLHRoaXMuYnVmZmVyU2l6ZXNQdHI9TW9kdWxlLl9tYWxsb2MoNCpCQVRDSF9ERUNPREVfU0laRSksdGhpcy5idWZmZXJTaXplcz10aGlzLnRvVThBcnJheSh0aGlzLmJ1ZmZlclNpemVzUHRyLDQqQkFUQ0hfREVDT0RFX1NJWkUpLHRoaXMuc3RyZWFtQnVmZmVyT2Zmc2V0PTAsdGhpcy5mcmFtZUxlbnNPZmZzZXQ9MCx0aGlzLmZyYW1lTGVuc0J1ZmZlcj1uZXcgVWludDMyQXJyYXkoQkFUQ0hfREVDT0RFX1NJWkUpfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uUGljdHVyZURlY29kZWQ9ZnVuY3Rpb24oZSx0LHIpe3ZhciBzPXRoaXMuaW5mb2xpc3Quc2hpZnQoKSxvPXIsaT1yLzIsbj10LGY9dC8yOyF0aGlzLm1ldGF8fDQ0NCE9PXRoaXMubWV0YS5jaHJvbWFGb3JtYXQmJjQyMiE9PXRoaXMubWV0YS5jaHJvbWFGb3JtYXR8fChpPXIpO3ZhciBhPXRoaXMudG9VOEFycmF5KGUsbipvK2YqaSoyKSxjPW5ldyBVaW50OEFycmF5KGEubGVuZ3RoKTtjLnNldChhKTt2YXIgZD1jLmJ1ZmZlcjt0aGlzLnNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiREVDT0RFRCIsd2lkdGg6dCxoZWlnaHQ6cix5TGluZXNpemU6bix1dkxpbmVzaXplOmYsaW5mbzpzLGJ1ZmZlcjpkfSxbZF0pfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXtpZighdGhpcy5pbml0ZWQpe3RoaXMuaW5pdGVkPSEwO3ZhciBlPTA7aW5pdFRzJiYoZT1wZXJmb3JtYW5jZS5ub3coKS1pbml0VHMpLHRoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVSX1JFQURZIixjb3N0OmV9KX19LERlY29kZXIucHJvdG90eXBlLnN0b3JlQnVmZmVyPWZ1bmN0aW9uKGUsdCl7dCYmdC5rZXlmcmFtZSYmdGhpcy5mbHVzaCgpLHRoaXMuaW5mb2xpc3QucHVzaCh0KSx0aGlzLnN0cmVhbUJ1ZmZlci5zZXQoZSx0aGlzLnN0cmVhbUJ1ZmZlck9mZnNldCksdGhpcy5mcmFtZUxlbnNCdWZmZXJbdGhpcy5mcmFtZUxlbnNPZmZzZXRdPWUubGVuZ3RoLHRoaXMuc3RyZWFtQnVmZmVyT2Zmc2V0Kz1lLmxlbmd0aCx0aGlzLmZyYW1lTGVuc09mZnNldCs9MSx0aGlzLmJhdGNoRGVjb2RlKCl9LERlY29kZXIucHJvdG90eXBlLmJhdGNoRGVjb2RlPWZ1bmN0aW9uKGUpeyh0aGlzLmZyYW1lTGVuc09mZnNldD49QkFUQ0hfREVDT0RFX1NJWkV8fGUmJnRoaXMuZnJhbWVMZW5zT2Zmc2V0KSYmKHRoaXMuYnVmZmVyU2l6ZXMuc2V0KG5ldyBVaW50OEFycmF5KHRoaXMuZnJhbWVMZW5zQnVmZmVyLmJ1ZmZlciksMCksTW9kdWxlLl9icm9hZHdheVBsYXlTdHJlYW0xKHRoaXMuYnVmZmVyU2l6ZXNQdHIsdGhpcy5mcmFtZUxlbnNPZmZzZXQpLHRoaXMuZnJhbWVMZW5zT2Zmc2V0PTAsdGhpcy5zdHJlYW1CdWZmZXJPZmZzZXQ9MCl9LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlKXt0aGlzLnN0cmVhbUJ1ZmZlci5zZXQoZSksTW9kdWxlLl9icm9hZHdheVBsYXlTdHJlYW0oZS5sZW5ndGgsMCl9LERlY29kZXIucHJvdG90eXBlLmZsdXNoPWZ1bmN0aW9uKCl7dGhpcy5iYXRjaERlY29kZSghMCksTW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKCl9LERlY29kZXIucHJvdG90eXBlLmRlc3Ryb3k9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5RXhpdCgpfSxEZWNvZGVyLnByb3RvdHlwZS51cGRhdGVNZXRhPWZ1bmN0aW9uKGUpe3RoaXMubWV0YT1lfTt2YXIgV0FTTV9DRE5fUEFUSF9QUkVGSVg9IiI7ZnVuY3Rpb24gaW5pdChlKXsoV0FTTV9DRE5fUEFUSF9QUkVGSVg9ZS5zcGxpdCgiLyIpLnNsaWNlKDAsLTEpLmpvaW4oIi8iKSxpbml0VHM9cGVyZm9ybWFuY2Uubm93KCksZGVjb2Rlcil8fChzZWxmLmltcG9ydFNjcmlwdHM/bmV3IFByb21pc2UoKGZ1bmN0aW9uKHQscil7c2VsZi5jb25zb2xlfHwoc2VsZi5jb25zb2xlPXtsb2c6ZnVuY3Rpb24oKXt9LHdhcm46ZnVuY3Rpb24oKXt9LGluZm86ZnVuY3Rpb24oKXt9LGVycm9yOmZ1bmN0aW9uKCl7fX0pO3RyeXtzZWxmLmltcG9ydFNjcmlwdHMoZSksdCgpfWNhdGNoKHMpe2lmKHMubWVzc2FnZS5pbmNsdWRlcygiTW9kdWxlIHNjcmlwdHMgZG9uJ3Qgc3VwcG9ydCBpbXBvcnRTY3JpcHRzIikpcmV0dXJuIHQoc2hpbUltcG9ydFNjcmlwdHMoZSkpO3Iocyl9fSkpOnNoaW1JbXBvcnRTY3JpcHRzKGUpKS50aGVuKChmdW5jdGlvbigpe3JldHVybiBmZXRjaChXQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIud29ya2VyLmpzIikudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUuYmxvYigpfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiBzZWxmLm0oe2xvY2F0ZUZpbGU6ZnVuY3Rpb24odCl7cmV0dXJuL1wud29ya2VyXC5qcyQvLnRlc3QodCk/VVJMLmNyZWF0ZU9iamVjdFVSTChlKTovXC53YXNtJC8udGVzdCh0KT9XQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIud2FzbSI6L1wubWVtJC8udGVzdCh0KT9XQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIuanMubWVtIjp2b2lkIDB9LG1haW5TY3JpcHRVcmxPckJsb2I6V0FTTV9DRE5fUEFUSF9QUkVGSVgrIi9kZWNvZGVyLmpzIn0pfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3NlbGYuTW9kdWxlPWUsb25Qb3N0UnVuLmNhbGwoc2VsZil9KSl9KSkuY2F0Y2goKGZ1bmN0aW9uKGUpe3NlbGYucG9zdE1lc3NhZ2Uoe21zZzoiSU5JVF9GQUlMRUQiLGxvZzplLm1lc3NhZ2V9KX0pKX1zZWxmLm9ubWVzc2FnZT1mdW5jdGlvbihlKXt2YXIgdD1lLmRhdGE7aWYoImluaXQiPT09dC5tc2d8fCJwcmVsb2FkIj09PXQubXNnfHxkZWNvZGVyKXN3aXRjaCh0Lm1zZyl7Y2FzZSJwcmVsb2FkIjppbml0KHQudXJsKSxCQVRDSF9ERUNPREVfU0laRT10LmJhdGNoRGVjb2RlQ291bnQ7YnJlYWs7Y2FzZSJpbml0IjpzZWxmLm1ldGE9dC5tZXRhLEJBVENIX0RFQ09ERV9TSVpFPXQuYmF0Y2hEZWNvZGVDb3VudCxpbml0KHQudXJsKTticmVhaztjYXNlInVwZGF0ZW1ldGEiOnNlbGYubWV0YT10Lm1ldGEsZGVjb2Rlci51cGRhdGVNZXRhKHQubWV0YSk7YnJlYWs7Y2FzZSJpbml0RGVjb2RlciI6ZGVjb2Rlci5mcmFtZUxlbnNPZmZzZXQmJmRlY29kZXIuYmF0Y2hEZWNvZGUoITApLGRlY29kZXIuZmx1c2goKSxkZWNvZGVyLmRlY29kZSh0LmRhdGEpO2JyZWFrO2Nhc2UiZGVjb2RlIjpkZWNvZGVyLnN0b3JlQnVmZmVyKHQuZGF0YSx0LmluZm8pO2JyZWFrO2Nhc2UiZmx1c2giOmRlY29kZXIuZmx1c2goKTticmVhaztjYXNlImZpbmlzaF9mbGFnIjpzZWxmLnBvc3RNZXNzYWdlKHttc2c6IkJBVENIX0ZJTklTSF9GTEFHIn0pO2JyZWFrO2Nhc2UiZGVzdG9yeSI6ZGVjb2Rlci5kZXN0cm95KCl9fX0pKCk7Cg==",E9="undefined"!=typeof window&&window.Blob&&new Blob([atob(b9)],{type:"text/javascript;charset=utf-8"});function k9(){var e=E9&&(v$||window.webkitURL).createObjectURL(E9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+b9,{type:"module"})}finally{e&&(v$||window.webkitURL).revokeObjectURL(e)}}var T9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD0xMDQ4NTc2LGluaXRUcz0wLERlY29kZXI9ZnVuY3Rpb24oZSl7dGhpcy5pbml0ZWQ9ITEsdGhpcy5zZWxmPWUsdGhpcy5tZXRhPWUubWV0YSx0aGlzLmluZm9saXN0PVtdLGUucGFyX2Jyb2Fkd2F5T25Ccm9hZHdheUluaXRlZD10aGlzLmJyb2Fkd2F5T25Ccm9hZHdheUluaXRlZC5iaW5kKHRoaXMpLGUucGFyX2Jyb2Fkd2F5T25QaWN0dXJlRGVjb2RlZD10aGlzLmJyb2Fkd2F5T25QaWN0dXJlRGVjb2RlZC5iaW5kKHRoaXMpfSxkZWNvZGVyO2Z1bmN0aW9uIG9uUG9zdFJ1bigpeyhkZWNvZGVyPW5ldyBEZWNvZGVyKHRoaXMpKS5pbml0KCl9RGVjb2Rlci5wcm90b3R5cGUudG9VOEFycmF5PWZ1bmN0aW9uKGUsdCl7cmV0dXJuIE1vZHVsZS5IRUFQVTguc3ViYXJyYXkoZSxlK3QpfSxEZWNvZGVyLnByb3RvdHlwZS5pbml0PWZ1bmN0aW9uKCl7TW9kdWxlLl9icm9hZHdheUluaXQoKSx0aGlzLnN0cmVhbUJ1ZmZlcj10aGlzLnRvVThBcnJheShNb2R1bGUuX2Jyb2Fkd2F5Q3JlYXRlU3RyZWFtKE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSCwwKSxNQVhfU1RSRUFNX0JVRkZFUl9MRU5HVEgpfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uUGljdHVyZURlY29kZWQ9ZnVuY3Rpb24oZSx0LG8saSxuLHMscil7dmFyIGE9dGhpcy5pbmZvbGlzdFswXTtpZighYXx8IWEua2V5ZnJhbWV8fHIpe3ZhciBjPU9iamVjdC5hc3NpZ24oe30sdGhpcy5pbmZvbGlzdC5zaGlmdCgpKSxkPW8sZj1vLzI7IXRoaXMubWV0YXx8NDQ0IT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdCYmNDIyIT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdHx8KGY9byk7dmFyIHU9dGhpcy50b1U4QXJyYXkoZSxpKmQrbipmKjIpLGw9bmV3IFVpbnQ4QXJyYXkodS5sZW5ndGgpO2wuc2V0KHUpO3ZhciBtPWwuYnVmZmVyO3RoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVEIix3aWR0aDp0LGhlaWdodDpvLHlMaW5lc2l6ZTppLHV2TGluZXNpemU6bixpbmZvOmMsYnVmZmVyOm19LFttXSl9fSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXt0aGlzLmluaXRlZD0hMDt2YXIgZT0wO2luaXRUcyYmKGU9cGVyZm9ybWFuY2Uubm93KCktaW5pdFRzKSx0aGlzLnNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiREVDT0RFUl9SRUFEWSIsY29zdDplfSl9LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlLHQpe3QmJnRoaXMuaW5mb2xpc3QucHVzaCh0KSx0JiZ0LmtleWZyYW1lJiYodGhpcy5pbmZvbGlzdD1bdF0pLHRoaXMuc3RyZWFtQnVmZmVyLnNldChlKSxNb2R1bGUuX2Jyb2Fkd2F5UGxheVN0cmVhbShlLmxlbmd0aCwwKX0sRGVjb2Rlci5wcm90b3R5cGUuZGVzdHJveT1mdW5jdGlvbigpe01vZHVsZS5fYnJvYWR3YXlFeGl0KCl9LERlY29kZXIucHJvdG90eXBlLnVwZGF0ZU1ldGE9ZnVuY3Rpb24oZSl7dGhpcy5tZXRhPWV9O3ZhciBXQVNNX0NETl9QQVRIX1BSRUZJWD0iIjtmdW5jdGlvbiBpbml0KGUpe1dBU01fQ0ROX1BBVEhfUFJFRklYPWUuc3BsaXQoIi8iKS5zbGljZSgwLC0xKS5qb2luKCIvIiksaW5pdFRzPXBlcmZvcm1hbmNlLm5vdygpO3ZhciB0PS9hc20vLnRlc3QoZSk7ZGVjb2Rlcnx8KHNlbGYuaW1wb3J0U2NyaXB0cz9uZXcgUHJvbWlzZSgoZnVuY3Rpb24odCxvKXtzZWxmLmNvbnNvbGV8fChzZWxmLmNvbnNvbGU9e2xvZzpmdW5jdGlvbigpe30sd2FybjpmdW5jdGlvbigpe30saW5mbzpmdW5jdGlvbigpe30sZXJyb3I6ZnVuY3Rpb24oKXt9fSk7dHJ5e3NlbGYuaW1wb3J0U2NyaXB0cyhlKSx0KCl9Y2F0Y2goaSl7aWYoaS5tZXNzYWdlLmluY2x1ZGVzKCJNb2R1bGUgc2NyaXB0cyBkb24ndCBzdXBwb3J0IGltcG9ydFNjcmlwdHMiKSlyZXR1cm4gdChzaGltSW1wb3J0U2NyaXB0cyhlKSk7byhpKX19KSk6c2hpbUltcG9ydFNjcmlwdHMoZSkpLnRoZW4oKGZ1bmN0aW9uKCl7cmV0dXJuIHQ/KGNvbnNvbGUubG9nKCJhdXRvIGluc3RhbmNlIERlY29kZXIhIiksbmV3IFByb21pc2UoKGZ1bmN0aW9uKGUsdCl7c2V0VGltZW91dCgoZnVuY3Rpb24oKXt0cnl7b25Qb3N0UnVuLmNhbGwoc2VsZiksZSgpfWNhdGNoKG8pe3Qobyl9fSkpfSkpKTpzZWxmLm0oe2luc3RhbnRpYXRlV2FzbTpmdW5jdGlvbihlLHQpe2ZldGNoKCIiLmNvbmNhdChXQVNNX0NETl9QQVRIX1BSRUZJWCwiL2RlY29kZXIud2FzbS5qcyIpKS50aGVuKChmdW5jdGlvbihlKXtyZXR1cm4gZS5hcnJheUJ1ZmZlcigpfSkpLnRoZW4oKGZ1bmN0aW9uKHQpe3JldHVybiBXZWJBc3NlbWJseS5pbnN0YW50aWF0ZSh0LGUpfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiB0KGUuaW5zdGFuY2UpfSkpfX0pLnRoZW4oKGZ1bmN0aW9uKGUpe3NlbGYuTW9kdWxlPWUsb25Qb3N0UnVuLmNhbGwoc2VsZil9KSl9KSkuY2F0Y2goKGZ1bmN0aW9uKGUpe3NlbGYucG9zdE1lc3NhZ2Uoe21zZzoiSU5JVF9GQUlMRUQiLGxvZzplLm1lc3NhZ2V9KX0pKX1zZWxmLm9ubWVzc2FnZT1mdW5jdGlvbihlKXt2YXIgdD1lLmRhdGE7aWYoImluaXQiPT09dC5tc2d8fCJwcmVsb2FkIj09PXQubXNnfHxkZWNvZGVyKXN3aXRjaCh0Lm1zZyl7Y2FzZSJwcmVsb2FkIjppbml0KHQudXJsKTticmVhaztjYXNlImluaXQiOnNlbGYubWV0YT10Lm1ldGEsc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJMT0ciLGxvZzoid29ya2VyIGluaXRlZCJ9KSxpbml0KHQudXJsKTticmVhaztjYXNlInVwZGF0ZW1ldGEiOnNlbGYubWV0YT10Lm1ldGEsZGVjb2Rlci51cGRhdGVNZXRhKHQubWV0YSk7YnJlYWs7Y2FzZSJpbml0RGVjb2RlciI6ZGVjb2Rlci5kZWNvZGUodC5kYXRhKTticmVhaztjYXNlImRlY29kZSI6ZGVjb2Rlci5kZWNvZGUodC5kYXRhLHQuaW5mbyk7YnJlYWs7Y2FzZSJmaW5pc2hfZmxhZyI6c2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KTticmVhaztjYXNlImRlc3RvcnkiOmRlY29kZXIuZGVzdHJveSgpfX19KSgpOwo=",R9="undefined"!=typeof window&&window.Blob&&new Blob([atob(T9)],{type:"text/javascript;charset=utf-8"});function S9(){var e=R9&&(v$||window.webkitURL).createObjectURL(R9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+T9,{type:"module"})}finally{e&&(v$||window.webkitURL).revokeObjectURL(e)}}var w9=new(function(){function e(){_y(this,e),ky(this,"_queue",[]),ky(this,"_pendingDecoder",null),ky(this,"TAG","DecoderCache")}return Ey(e,[{key:"genDecoder",value:function(e){return this._initDecoder(e)}},{key:"_initDecoder",value:function(e){var t=this,n=HW(),r=n.preloadDecoder,i=n.maxDecodeOnceWasm;e=e||r;var o,a,s=JW(),u=s.H264_DECODER_URL,c=s.H265_SIMD_DECODER_URL,l=s.H265_DECODER_URL,h=s.H265_THREAD_DECODER_URL,A=1;if("h265"===e&&(KW()?(o=new _9,a=c,A=2):zW()&&HW().canUseThreadMode?(o=new k9,a=h,A=1):(o=new _9,a=l,A=3)),"h264"===e&&(o=new S9,a=u,A=3),!o)return Op.resolve();var d,f,v,p=((v=new Op((function(e,t){d=e,f=t}))).resolve=d,v.reject=f,v);o.postMessage({msg:"preload",batchDecodeCount:i,url:a}),this._pendingDecoder=o,o.id=EG()+sg(1e3*Math.random()),o.isHevc="h265"===e,o.using=!1,o.ready=!1,dW.log(this.TAG,"start init decoder worker, id=",o.id,"hevc=",o.isHevc,"mode=",A);var m=function e(n){t._pendingDecoder=null;var r=n.data.msg;switch("DECODER_READY"!==r&&"INIT_FAILED"!==r||(o.removeEventListener("message",e),o.removeEventListener("error",y)),r){case"DECODER_READY":dW.log(t.TAG,"decoder worker inited!, id=",o.id,"cost:",n.data.cost),o.ready=!0,o.using||t._queue.push(o),p.resolve();break;case"INIT_FAILED":dW.log(t.TAG,"decoder worker init failed!",n.data.log),p.reject(n.data.log)}},y=function e(t){o.removeEventListener("message",m),o.removeEventListener("error",e),p.reject(null==t?void 0:t.message)};return o.addEventListener("message",m),o.addEventListener("error",y),p}},{key:"cacheDecoder",value:function(e){var t;e.using=!1,e.ready=!0,e.id||(e.id=EG()+sg(1e3*Math.random())),this._queue.push(e),dW.log(this.TAG,"cache decoder, id=",e.id),"h265"===HW().preloadDecoder&&1===Ll(t=this._queue).call(t,(function(e){return!e.using&&e.isHevc})).length&&this.genDecoder("h265")}},{key:"getCachedDecoder",value:function(e){var t,n,r,i,o=fQ(t=this._queue).call(t,(function(t){return!t.using&&t.isHevc===e}));-1!==o&&(r=ZQ(i=this._queue).call(i,o,1)[0]);if(!r&&this._pendingDecoder&&(r=this._pendingDecoder,this._pendingDecoder=null),r)return r.using=!0,dW.warn(this.TAG,Ag(n="get cached decoder, id=".concat(r.id,", ready=")).call(n,r.ready)),r}}]),e}()),D9=HW().maxDecodeOnceWasm,I9=function(e){Ty(n,e);var t=Dy(n);function n(){var e,r;_y(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return ky(wy(r=t.call.apply(t,Ag(e=[this]).call(e,o))),"TAG","WasmController"),ky(wy(r),"_avccpushed",!1),ky(wy(r),"_maxDecodeOnce",D9),ky(wy(r),"_continueDecodeThreshold",D9/2),ky(wy(r),"_wasmInitCost",0),ky(wy(r),"_threadSupported",zW()&&HW().canUseThreadMode),ky(wy(r),"_simdSuppported",KW()),ky(wy(r),"_decoderMode",window.WebAssembly?3:4),r}return Ey(n,[{key:"wasmInitCost",get:function(){var e;return null===(e=this._decoderWorker)||void 0===e?void 0:e._wasmInitCost}},{key:"isHevc",get:function(){var e;return null===(e=this._parent)||void 0===e?void 0:e.isHevc}},{key:"_selectDecodeWorker",value:function(){this.analyse.addWasmInit();var e,t=JW(),n=t.H264_DECODER_URL,r=t.H265_DECODER_URL,i=t.H265_THREAD_DECODER_URL,o=t.H265_SIMD_DECODER_URL,a=t.ASM_H264_DECODER_URL,s=t.ASM_H265_DECODER_URL;return dW.log(this.TAG,"start init wasm worker:",performance.now(),"hevc:",this.isHevc,"decoderMode:",this._decoderMode),this.isHevc?(e=1===this._decoderMode?i:2===this._decoderMode?o:3===this._decoderMode?r:s)?{decoder:1===this._decoderMode?new k9:new _9,url:e}:void this._workerErrorCallback("no found decoder url, decodeMode:".concat(this._decoderMode)):(e=4===this._decoderMode?a:n)?{decoder:new S9,url:e}:void this._workerErrorCallback("no found decoder url, decodeMode:".concat(this._decoderMode))}},{key:"_initWorker",value:function(){this.isHevc&&(this._threadSupported&&(this._decoderMode=1),this._simdSuppported&&(this._decoderMode=2)),this._initDecodeWorkerInternal()}},{key:"_initDecodeWorkerInternal",value:function(){var e=w9.getCachedDecoder(this.isHevc);if(e)return dW.warn(this.TAG,"select decoder from cache"),this.analyse.addWasmInit(),this._avccpushed=!1,this._bindWorkerEvent(e),this._decoderWorker=e,void(e.ready&&(this._decoderReady=!0,this._initDecoderWithConfiguration(e,this.meta),this._workerMessageCallback({type:"DECODER_READY",data:e}),dW.log(this.TAG,"decoder ready!")));var t=this._selectDecodeWorker()||{},n=t.decoder,r=t.url;n&&(this._avccpushed=!1,this._bindWorkerEvent(n),n.isHevc=this.isHevc,n.postMessage({msg:"init",meta:this.meta,batchDecodeCount:D9,url:r}),this._decoderWorker=n)}},{key:"_bindWorkerEvent",value:function(e){var t=this,n=function(n,r){dW.log(t.TAG,"worker failed: ",n,r),t._terminateWorker(e),t._decoderWorker=null,!1===HW().wasmFallbackToAsm||4===t._decoderMode?t._workerErrorCallback(n):(t._decoderMode=1===t._decoderMode||2===t._decoderMode?3:4,t._initDecodeWorkerInternal())};e._onMessage=function(r){var i,o;switch(r.data.msg){case"DECODER_READY":if(dW.log(t.TAG,"wasm worker ready!","cost:",r.data.cost),t._decoderReady=!0,e._wasmInitCost=sg(r.data.cost),!t.meta)return;t._avccpushed||t._initDecoderWithConfiguration(e,t.meta),t.emit(MY.VIDEO_DECODER_INIT,e),t._workerMessageCallback({type:"DECODER_READY",data:e});break;case"DECODED":if(t._inDecoding=!0,(null===(i=r.data)||void 0===i||null===(o=i.info)||void 0===o?void 0:o.id)!==t._id)return;t._workerMessageCallback({type:"RECEIVE_FRAME",data:r.data});break;case"BATCH_FINISH_FLAG":if(t._inDecoding=!1,!t._workerMessageCallback)return;t._workerMessageCallback({type:"BATCH_FINISH"});break;case"INIT_FAILED":n(r.data.log,1)}},e._onError=function(e){n(e.message,2)},e.addEventListener("message",e._onMessage),e.addEventListener("error",e._onError)}},{key:"_initDecoderWithConfiguration",value:function(e,t){var n;dW.log(this.TAG,"init decoder with configuration"),this._avccpushed=!0,e.postMessage({msg:"updatemeta",meta:t});var r=t.rawVps||t.vps[0],i=t.rawSps||t.sps[0],o=t.rawPps||t.pps[0],a=Ll(n=[r,i,o]).call(n,Boolean),s=kY(a).call(a,(function(e,t){return e+(t.byteLength+4)}),0),u=new Uint8Array(s),c=0;ql(a).call(a,(function(e){u.set([0,0,0,1],c),c+=4,u.set(e,c),c+=e.byteLength})),e.postMessage({msg:"initDecoder",data:u})}},{key:"destroy",value:function(){if(this._decoderWorker)return HW().reuseWasmDecoder?(this._offWorkerBind(this._decoderWorker),void w9.cacheDecoder(this._decoderWorker)):void this._terminateWorker(this._decoderWorker)}},{key:"_offWorkerBind",value:function(e){e.removeEventListener("message",e._onMessage),e.removeEventListener("error",e._onError),e.postMessage({msg:"flush"}),e._onMessage=null,e._onError=null,dW.log(this.TAG,"flush decoder and unbind worker event")}},{key:"_terminateWorker",value:function(e){this._offWorkerBind(e),e.postMessage({msg:"destroy"}),e.terminate(),dW.log(this.TAG,"destroy decoder worker")}}]),n}(A9),C9=function(e){Ty(n,e);var t=Dy(n);function n(){var e,r;_y(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return ky(wy(r=t.call.apply(t,Ag(e=[this]).call(e,o))),"TAG","VideoRenderWithDecoder"),ky(wy(r),"_hideRenderFlag",0),ky(wy(r),"_recentMeta",null),ky(wy(r),"_inChaseFrame",!1),ky(wy(r),"_decoderErrorCallback",(function(e){r._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,r._assembleErr(e,1))})),ky(wy(r),"_decoderMessageCallback",(function(e){var t,n,i,o=e.type,a=e.data;switch(o){case"DECODER_READY":if(r.analyse.addWasmReady(),!r._frameRender){var s=IW(r._config,{meta:r._meta,canvas:r._canvas,type:r._decodeController.webcodec?"2d":""});try{r._canvas.glInstance?(r._frameRender=r._canvas.glInstance,r._frameRender.updateBind(wy(r),r._meta),dW.warn(r.TAG,"reuse canvas and context")):(r._frameRender=new r9(s,wy(r)),dW.log(r.TAG,"create frameRender with config",s))}catch(_6){r._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,r._assembleErr(_6&&_6.message,2))}}r._startDecode();break;case"RECEIVE_FRAME":if(r._inChaseFrame&&(null===(t=r._decodeController)||void 0===t||!t.webcodec))return;r._receiveFrame(a);break;case"BATCH_FINISH":null===(n=wy(r))||void 0===n||n._decodeEstimate.resetDecodeDot(),r._inChaseFrame&&(r._inChaseFrame=!1,r._frameQueue.empty()),r._ready||r.inSeeking||null===(i=r._decodeController)||void 0===i||!i.decoderReady||r._startDecode()}})),r}return Ey(n,[{key:"wasmInitCost",get:function(){var e;return null===(e=this._decodeController)||void 0===e?void 0:e.wasmInitCost}},{key:"hevcThread",get:function(){return 1===this.decodeMode}},{key:"lowlatency",get:function(){return this._parent.lowlatency}},{key:"nextFrameTime",get:function(){var e=this._frameQueue.nextFrame();return(e&&e.info&&e.info.dts||0)/1e3}},{key:"ajustSeekTime",value:function(e,t){var n;dW.log(this.TAG,"ajust seek time: ",e),this._frameQueue.empty(),null===(n=this._decodeController)||void 0===n||n.flushDecoder(),this._switchVideoBuffer(e,t)}},{key:"canSeek",value:function(){return!0}},{key:"_appendChunk",value:function(e){var t;if(!this.noVideo&&this._timeRange){if(this._meta){if(this._recentMeta.width!==e.width||this._recentMeta.height!==e.height){var n,r,i;dW.warn(this.TAG,Ag(n=Ag(r=Ag(i="metadata changed! width: ".concat(this._recentMeta.width," -> ")).call(i,e.width,", height: ")).call(r,this._recentMeta.height," -> ")).call(n,e.height));var o=e.samples[0];o&&(this._recentMeta=o.meta=IW({},e,{samples:null}))}}else{this._emitTimelineEvents(WY.PLAY_EVENT,UY.LOADEDMETADATA),this._recentMeta=this._meta=IW({},e,{samples:null}),dW.warn(this.TAG,"video set metadata",this._meta,"configuration:",this.configuration);var a=e.fpsNum/e.fpsDen;a?dW.log(this.TAG,"detect fps:",a):dW.warn(this.TAG,"no detect fps,start estimate"),this._selectDecoder(),this._initDecoder()}if(this._timeRange.append(e.samples,this._isLive&&this.noAudio,!this.videoDecode),e.samples=[],!this.inSeeking){var s;if(this.isLive||this._timeRange.frameLength||this._switchVideoBuffer(this._parent.currentTime),!this._ready&&null!==(t=this._decodeController)&&void 0!==t&&t.decoderReady)!this.noAudio&&null!==(s=this._decodeController)&&void 0!==s&&s.inDecoding||this._startDecode();this.noAudio&&this._emitTimelineEvents(WY.PLAY_EVENT,UY.DURATION_CHANGE)}}}},{key:"_selectDecoder",value:function(){if(!this.isHevc&&m9.isSupported())return this._decodeController=new m9(this),void(this._decodeEstimate.webcodec=!0);this._decodeController=new I9(this)}},{key:"_initDecoder",value:function(){var e;null===(e=this._decodeController)||void 0===e||e.init(this._decoderMessageCallback,this._decoderErrorCallback)}},{key:"_startDecode",value:function(){var e;null===(e=this._decodeController)||void 0===e||e.doDecode()}},{key:"_switchVideoBuffer",value:function(e,t){var n=this._timeRange.switchBuffer(e);if(n){var r;if(this.noAudio&&this._parent.emit(WY.SYNC_DTS,this.getDtsOfTime(n.start)),t)return void(null===(r=this._decodeController)||void 0===r||r.preciseSeek(e));this._startDecode(t)}}},{key:"_checkToDecode",value:function(){var e;this.inSeeking||null===(e=this._decodeController)||void 0===e||e.checkToDecode(this._frameQueue.length)}},{key:"_render",value:function(e){var t;if(!this.noVideo){var n=this._frameQueue&&this._frameQueue.nextFrame();if(n){var r=n.info;if(!r)return this._frameQueue.shift(),void console.error("not info");this._renderDts=r.dts;var i=r.dts-this.preciseVideoDts;if(!(!e&&i>0&&i<6e4)){var o,a,s,u,c,l;if(this._frameQueue.shift(this.preciseVideoDts),Math.abs(this._lastTimeupdate-r.dts)>250&&(this._emitTimelineEvents(WY.PLAY_EVENT,UY.TIMEUPDATE,{pts:r.originPts/90}),this._lastTimeupdate=r.dts),dW.long)dW.log(this.TAG,Ag(o=Ag(a=Ag(s=Ag(u=Ag(c=Ag(l="render delay:".concat(i," , timelinePosition:")).call(l,this.preciseVideoDts," , dts:")).call(c,r.dts," , cost:")).call(u,r.cost," , gopID:")).call(s,r.gopId," , rest:")).call(a,this._frameQueue.length,", buffer frame:")).call(o,this._timeRange.frameLength));var h=performance.now();this._hideRenderFlag++,("visible"===document.visibilityState||this._hideRenderFlag%15)&&this._frameRender.render(n.buffer,n.width,n.height,n.yLinesize,n.uvLinesize),null!==(t=this._decodeController)&&void 0!==t&&t.webcodec&&n.buffer.close(),this._renderCost=performance.now()-h,this._checkToDecode()}}else{var A;if(dW.log(this.TAG,"lack frame, ","inDecoding:",null===(A=this._decodeController)||void 0===A?void 0:A.inDecoding),this._checkToDecode(),this.noAudio){var d;if(!this.isLive&&Math.abs(this.currentTime-this.duration)<.5)return null==this||this._emitTimelineEvents(WY.PLAY_EVENT,UY.TIMEUPDATE),null==this||this._emitTimelineEvents(WY.PLAY_EVENT,UY.ENDED),void(null===(d=this._timeRange)||void 0===d||d.clean());this._timeRange.frameLength||(this._ready=!1,this.emit(MY.VIDEO_WAITING))}}}}},{key:"_updateSegmentEnd",value:function(e){var t;null===(t=this._timeRange)||void 0===t||t.updateSegmentEnd(e)}},{key:"_doChaseFrame",value:function(e){var t=e.frame;this._inChaseFrame=!0,this._timeRange.deletePassed(t.dts),this._frameQueue.empty(),this.noAudio&&this._parent.emit(WY.SYNC_DTS,t.dts)}},{key:"_destroy",value:function(e){var t;dW.log(this.TAG,"destroy video render"),Iy(Ry(n.prototype),"destroy",this).call(this,e),null===(t=this._decodeController)||void 0===t||t.destroy(),this._decodeController=null}}]),n}(s9),L9=.1,V9=function(e){Ty(n,e);var t=Dy(n);function n(e,r){var i;return _y(this,n),(i=t.call(this)).TAG="TimeLine",i._parent=r,i._seeking=!1,i.audioRender=q3.isSupported()?new q3(e,wy(i)):new oQ(e,wy(i)),i.videoRender=new C9(e,wy(i)),i._readyStatus={audio:!1,video:!1},i._paused=!0,i._switchToMultiWorker=!1,i._lowdecodeEmited=!1,i._startPlayed=!1,i._emitReady=!1,i._lastSeekTime=1e-4,i._singleTrack=-1,i._bindEvent(),i._decodeVideo=e.video,i}return Ey(n,[{key:"analyse",get:function(){return this._parent.analyse}},{key:"ready",get:function(){return this._readyStatus.video&&this._readyStatus.audio}},{key:"played",get:function(){var e=this;return{length:this.currentTime?1:0,start:function(){return 0},end:function(){return e.currentTime}}}},{key:"noAudio",get:function(){return 1===this._singleTrack||2===this._singleTrack}},{key:"isLive",get:function(){return this._parent.live}},{key:"seeking",get:function(){return this._seeking}},{key:"decodeFps",get:function(){return this.videoRender.decodeFps}},{key:"decodeCost",get:function(){return this.videoRender.decodeCost}},{key:"renderCost",get:function(){return this.videoRender.renderCost}},{key:"wasmInitCost",get:function(){return this.videoRender.wasmInitCost}},{key:"fps",get:function(){return this.videoRender.fps}},{key:"totalSize",get:function(){return this.videoRender.totalSize}},{key:"bitrate",get:function(){return this.videoRender.bitrate}},{key:"gopLength",get:function(){return this.videoRender.gopLength}},{key:"currentTime",get:function(){return this.noAudio?this.paused?this.videoRender.nextFrameTime:this.videoRender.currentTime:this.audioRender.currentTime}},{key:"timelinePosition",get:function(){return this.noAudio?performance.now()/1e3:this.audioRender.currentTime}},{key:"canvas",get:function(){return this.videoRender.canvas}},{key:"readyState",get:function(){return this.videoRender.readyState}},{key:"buffered",get:function(){var e=this;return this.noAudio?this.videoRender.buffered:this.isLive?this.audioRender.buffered:{length:this.audioRender.buffered.length,start:function(t){return Math.max(e.audioRender.buffered.start(t),e.videoRender.buffered.start(t))},end:function(t){return Math.min(e.audioRender.buffered.end(t),e.videoRender.buffered.end(t))}}}},{key:"duration",get:function(){return this.noAudio?this.videoRender.duration:this.isLive?this.audioRender.duration:Math.min(this.audioRender.duration,this.videoRender.duration)}},{key:"paused",get:function(){return this._paused},set:function(e){this._paused=e}},{key:"lowlatency",get:function(){return this._parent.lowlatency}},{key:"decoderMode",get:function(){return this.videoRender.decoderMode}},{key:"currentAudioCanAutoplay",get:function(){return this.audioRender.audioCanAutoplay}},{key:"_getController",value:function(e,t){return e?new h9(t,this):new C9(t,this)}},{key:"_checkInBuffer",value:function(){for(var e=this.buffered,t=0,n=e.length;t<n;t++)if(e.start(t)<=this.currentTime+L9&&e.end(t)>=this.currentTime)return!0;return!1}},{key:"_resetReadyStatus",value:function(){this._readyStatus.audio=!1,this._readyStatus.video=!1}},{key:"_bindEvent",value:function(){var e=this;this.on(YY.REMUX,(function(t){e.videoRender.setRemux(t)})),this.on(YY.CHASE_VIDEO_FRAME_END,(function(t){e.emit(YY.CHASE_AUDIO_FRAME,t)})),this.audioRender.on(BY.AUDIO_READY,(function(){dW.log(e.TAG,"audio ready! seeking=",e._seeking),e._seeking&&Cg((function(){try{var t=e.videoRender.getSeekStartPosition(e.currentTime,1/0);if(e.audioRender.isMse&&t)return HW().preciseSeek>e.duration&&e.currentTime>L9?(e.audioRender.seekNoSideEffect({position:e.currentTime+L9}),void e.videoRender.ajustSeekTime(e.currentTime,!0)):(e.audioRender.seekNoSideEffect({position:t.position+L9}),void e.videoRender.ajustSeekTime(t.position));e.videoRender.ajustSeekTime(e.currentTime)}catch(_6){}}),10),e._readyStatus.video&&e._startRender(),e._readyStatus.audio=!0,e._startPlayed||e.analyse.addAudioReady()})),this.audioRender.on(BY.AUDIO_NOT_ALLOWED_AUTOPLAY,(function(){e._emitReady&&e.pause()})),this.audioRender.on(BY.AUDIO_WAITING,(function(){!e.noAudio&&e.currentTime&&(dW.warn(e.TAG,"lack data, audio waiting,currentTime:",e.currentTime),e.emit(WY.PLAY_EVENT,UY.TIMEUPDATE),e.emit(WY.PLAY_EVENT,UY.WAITING),e.emit(WY.DO_PAUSE),e._readyStatus.audio=!1)})),this.videoRender.on(MY.VIDEO_WAITING,(function(){dW.warn(e.TAG,"lack data, video waiting"),e.emit(WY.PLAY_EVENT,UY.WAITING),e.emit(WY.DO_PAUSE),e._readyStatus.video=!1})),this.videoRender.on(MY.VIDEO_READY,(function(){dW.log(e.TAG,"video ready!"),e._startPlayed||e.analyse.addVideoReady(),e._readyStatus.audio&&e._startRender("video"),e._readyStatus.video=!0})),this.videoRender.on(MY.DECODE_LOW_FPS,(function(){e.currentTime<2||(e.analyse.increaseLowDecodeCount(),e._lowdecodeEmited||(nY++,e._lowdecodeEmited=!0),e.emit(WY.PLAY_EVENT,UY.LOW_DECODE))})),this.on(WY.SINGLE_TRACK,(function(t){e._singleTrack=t,1!==t&&2!==t||(e._readyStatus.audio=!0),3===t&&(e._readyStatus.video=!0),e.emit(WY.SYNC_DTS,0)})),this.on(WY.DESTROY,(function(){e.removeAllListeners(),e.videoRender=null,e.audioRender=null})),this.on(WY.DO_PLAY,(function(){e.emit(WY.START_RENDER),e._paused=!1,e._lastSeekTime=1e-4,e.noAudio&&e.emit(WY.SYNC_DTS,0)}))}},{key:"_startRender",value:function(e){if(!this._parent.error&&this.videoRender){if(this.noAudio&&this.emit(WY.SYNC_DTS,0),this.videoRender.forceRender(),!this.isLive&&this._paused&&this.seeking&&this._checkInBuffer())return dW.log(this.TAG,"set seeking = false"),this._seeking=!1,this.emit(WY.PLAY_EVENT,UY.SEEKED),void dW.groupEnd();this._startPlayed||(this.analyse.addFirstframe(),this.emit(WY.PLAY_EVENT,UY.LOADEDDATA),this.emit(WY.PLAY_EVENT,UY.FIRST_FRAME),this._startPlayed=!0),dW.log(this.TAG,"emit canplay"),this.emit(WY.PLAY_EVENT,UY.CANPLAY),this._parent.autoplay?(dW.warn(this.TAG,"startRender: time=",this.currentTime,"paused:",this.paused,"seeking:",this.seeking),this.emit(WY.START_RENDER,e)):(this._parent.autoplay=!0,this.emit(WY.PLAY_EVENT,UY.PAUSE)),this.emit(WY.READY),this._emitReady=!0,this._seeking&&this._checkInBuffer()&&(dW.log(this.TAG,"set seeking = false"),this._seeking=!1,this.emit(WY.PLAY_EVENT,UY.SEEKED),dW.groupEnd())}}},{key:"_checkHlsTracks",value:function(e){if(!(null==e?void 0:e.samples[0])){if(!this.buffered.length){var t=new Error("lack video sample");t.code=3,this.emit(WY.PLAY_EVENT,UY.ERROR,t)}return!1}return!0}},{key:"appendBuffer",value:function(e,t){this.emit(WY.APPEND_CHUNKS,e,t),this.noAudio&&this._seeking&&this.videoRender.ajustSeekTime(this.currentTime)}},{key:"play",value:function(){var e=this;return new Op((function(t,n){var r=e.currentAudioCanAutoplay;e.noAudio?r=!0:e.audioRender&&e.audioRender.resume().then((function(){var t;if(dW.log(e.TAG,Ag(t="audio render resumed, pause status: ".concat(e._paused,", audioCanAutoplay:")).call(t,e.currentAudioCanAutoplay)),e._paused||!e.currentAudioCanAutoplay)return r=!1,void e.emit(WY.DO_PAUSE);r=!0})).catch((function(){})),Cg((function(){var i;return dW.log(e.TAG,Ag(i="play() timer done, resumed=".concat(r,", paused=")).call(i,e.paused)),r?e.videoRender&&!e.videoRender.canAutoPlay?(console.warn("video render an't autoplay"),e.pause(),void t()):(e._paused=!1,void t()):e.paused?void 0:(dW.log(e.TAG,"audioCtx can't autoplay"),e.pause(),void n({name:"NotAllowedError"}))}),e.audioRender.isMse?10:60)}))}},{key:"pause",value:function(){this._paused||!this.ready&&!this._seeking||(this.emit(WY.DO_PAUSE),this._paused=!0,this.emit(WY.PLAY_EVENT,UY.PAUSE))}},{key:"seek",value:function(e){var t=this;if(this._seeking&&dW.groupEnd(),this.isLive){if(this.currentTime<L9||!this.currentAudioCanAutoplay||this.paused)return;var n=this.videoRender.getSeekStartPosition(e,this._parent.preloadTime+1);if(n){if(n.position<this.currentTime)return;var r=this.audioRender.canSeek(n.position),i=this.videoRender.canSeek(n);if(!r||!i)return void dW.log(this.TAG,"seek, !!!!!!!!!can not seek, audioCanSeek:",r,"videoCanSeek:",i);dW.warn(this.TAG,"seek, chase frame to time: ",n.position,"currentTime:",this.currentTime,"duration:",this.duration),this.videoRender.videoDecode?(this.audioRender.doPause(),n.position=n.position-1.5,this.emit(YY.CHASE_VIDEO_FRAME,n)):this.emit(WY.CHASE_FRAME,n)}}else this._lastSeekTime!==e&&(e&&Math.abs(this._lastSeekTime-e)<=.2||(this._lastSeekTime=e,e>=this.duration&&(e=this.duration-1),e<0&&(e=0),dW.group(this.TAG,"start seek to:".concat(e,", set seeking status=true")),this._seeking=!0,this.videoRender.setSeekingStatus(!0),this.noAudio?(this.emit(WY.SYNC_DTS,this.videoRender.getDtsOfTime(e)),this.videoRender.ajustSeekTime(e)):this._resetReadyStatus(),this.emit(WY.DO_SEEK,e),new Op((function(e){t.emit(WY.PLAY_EVENT,UY.SEEKING),e()}))))}}]),n}(cY),x9=D,F9=v,G9=Ai,O9=K,Z9=F9(V.f),P9=F9([].push),U9=function(e){return function(t){for(var n,r=O9(t),i=G9(r),o=i.length,a=0,s=[];o>a;)n=i[a++],x9&&!Z9(r,n)||P9(s,e?[n,r[n]]:r[n]);return s}},N9={entries:U9(!0),values:U9(!1)}.entries;Dn({target:"Object",stat:!0},{entries:function(e){return N9(e)}});var B9=t(ee.Object.entries),M9=gb,W9=R_,Y9=MS,X9=aR,Q9=W9(eR.f),j9=W9([].push),H9=function(e){return function(t){for(var n,r=X9(t),i=Y9(r),o=i.length,a=0,s=[];o>a;)n=i[a++],M9&&!Q9(r,n)||j9(s,e?[n,r[n]]:r[n]);return s}},J9={entries:H9(!0),values:H9(!1)}.entries;uS({target:"Object",stat:!0},{entries:function(e){return J9(e)}});var K9=uS,z9=R_,q9=oT,$9=rF,e6=function(e){var t=cJ(lJ(this)),n="",r=uJ(e);if(r<0||r==1/0)throw hJ("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},t6=g_,n6=RangeError,r6=String,i6=Math.floor,o6=z9(e6),a6=z9("".slice),s6=z9(1..toFixed),u6=function(e,t,n){return 0===t?n:t%2==1?u6(e,t-1,n*e):u6(e*e,t/2,n)},c6=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=i6(i/1e7)},l6=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=i6(r/t),r=r%t*1e7},h6=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=r6(e[t]);n=""===n?r:n+o6("0",7-r.length)+r}return n};K9({target:"Number",proto:!0,forced:t6((function(){return"0.000"!==s6(8e-5,3)||"1"!==s6(.9,0)||"1.25"!==s6(1.255,2)||"1000000000000000128"!==s6(0xde0b6b3a7640080,0)}))||!t6((function(){s6({})}))},{toFixed:function(e){var t,n,r,i,o=$9(this),a=q9(e),s=[0,0,0,0,0,0],u="",c="0";if(a<0||a>20)throw n6("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return r6(o);if(o<0&&(u="-",o=-o),o>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(o*u6(2,69,1))-69)<0?o*u6(2,-t,1):o/u6(2,t,1),n*=4503599627370496,(t=52-t)>0){for(c6(s,0,n),r=a;r>=7;)c6(s,1e7,0),r-=7;for(c6(s,u6(10,r,1),0),r=t-1;r>=23;)l6(s,1<<23),r-=23;l6(s,1<<r),c6(s,1,1),l6(s,2),c=h6(s)}else c6(s,0,n),c6(s,1<<-t,0),c=h6(s)+o6("0",a);return c=a>0?u+((i=c.length)<=a?"0."+o6("0",a-i)+c:a6(c,0,i-a)+"."+a6(c,i-a)):u+c}});var A6={FIRST_DATA:1,AUDIO_MSE_OPEN_START:2,AUDIO_MSE_OPEND:3,AUDIO_FIRSTTIME_APPENDED:4,AUDIO_READY:5,WASM_WORKER_INIT:6,WASM_WORKER_READY:7,FIRST_FRAME_TODECODE:8,VIDEO_READY:9,FIRST_FRAME:10,WAITIGN:11,SEEKING:12,SEEKED:13},d6=B9(A6),f6=function(){function e(){_y(this,e),ky(this,"_dot",[]),ky(this,"_currentLowDecodeCount",0)}return Ey(e,[{key:"getBootStats",value:function(){var e,t,n=(null===(t=this._dot[0])||void 0===t?void 0:t.dot)||0;return Kg(e=this._dot).call(e,(function(e){return{action:Ll(d6).call(d6,(function(t){return t[1]===e.action}))[0][1],dot:sg(e.dot-n)}}))}},{key:"getStats",value:function(e){var t,n=this.getBootStats();return{bootStats:n,bitrate:Math.abs(e.bitrate/1e3),decodeFps:e.decodeFps,fps:e.fps,playbackRate:e.playbackRate,firstframe:null===(t=Ll(n).call(n,(function(e){return 10===e.action}))[0])||void 0===t?void 0:t.dot,width:e.videoWidth,height:e.videoHeight,decoderMode:e.decoderMode,vv:tY,lowdecodeVV:nY,h265FailureRate:Number((100*rY).toFixed(2)),currentLowDecodeCount:this._currentLowDecodeCount}}},{key:"seekElapses",value:function(){for(var e=this.getBootStats(),t=[],n=0,r=0,i=e.length;r<i;r++){var o=e[r];o.action===A6.SEEKING&&(n=o.dot),o.action===A6.SEEKED&&t.push(o.dot-n)}return t}},{key:"addFirstData",value:function(){this._dot.push({action:A6.FIRST_DATA,dot:this._getTimestap()})}},{key:"addAudioBoundMedia",value:function(){this._dot.push({action:A6.AUDIO_BOUND_MEDIA,dot:this._getTimestap()})}},{key:"addAudioMseOpenStart",value:function(){this._dot.push({action:A6.AUDIO_MSE_OPEN_START,dot:this._getTimestap()})}},{key:"addAudioMseOpend",value:function(){this._dot.push({action:A6.AUDIO_MSE_OPEND,dot:this._getTimestap()})}},{key:"addAudioFirstTimeAppended",value:function(){this._dot.push({action:A6.AUDIO_FIRSTTIME_APPENDED,dot:this._getTimestap()})}},{key:"addAudioReady",value:function(){this._dot.push({action:A6.AUDIO_READY,dot:this._getTimestap()})}},{key:"addWasmInit",value:function(){this._dot.push({action:A6.WASM_WORKER_INIT,dot:this._getTimestap()})}},{key:"addWasmReady",value:function(){this._dot.push({action:A6.WASM_WORKER_READY,dot:this._getTimestap()})}},{key:"addFirstFrameToDecode",value:function(){this._dot.push({action:A6.FIRST_FRAME_TODECODE,dot:this._getTimestap()})}},{key:"addVideoReady",value:function(){this._dot.push({action:A6.VIDEO_READY,dot:this._getTimestap()})}},{key:"addFirstframe",value:function(){this._dot.push({action:A6.FIRST_FRAME,dot:this._getTimestap()})}},{key:"addWaiting",value:function(){this._dot.push({action:A6.WAITIGN,dot:this._getTimestap()})}},{key:"addSeeking",value:function(){this._dot.push({action:A6.SEEKING,dot:this._getTimestap()})}},{key:"addSeeked",value:function(){this._dot.push({action:A6.SEEKED,dot:this._getTimestap()})}},{key:"_getTimestap",value:function(){return performance.now()}},{key:"increaseLowDecodeCount",value:function(){this._currentLowDecodeCount++}},{key:"reset",value:function(){this._currentLowDecodeCount=0,this._dot=[]}}]),e}(),v6=1,p6=2,m6=3,y6=function(e){Ty(n,e);var t=Dy(n);function n(){var e,r,i,o,a,s,u,c;return _y(this,n),(i=t.call(this)).TAG="XGVideo",i._proxyProps(),i._isLive=!0,i._vMeta=null,i._aMeta=null,i._resizeObserver=null,i._eventsBackup=[],i._hevc="h265"===HW().preloadDecoder,i._hevc||(i._degradeVideo=document.createElement("video")),i._debounceSeek=(o=wm(e=i._seek).call(e,wy(i)),a=300,s=EG(),u=null,c=!0,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=EG();c&&(s=EG(),c=!1,o.apply(void 0,t)),r-s>a?(s=r,o.apply(void 0,t)):(u&&window.clearTimeout(u),u=Cg((function(){o.apply(void 0,t)}),a))}),i._onTouchEnd=wm(r=i._onTouchEnd).call(r,wy(i)),i.analyse=new f6,i}return Ey(n,[{key:"_proxyProps",value:function(){var e,t=this;ql(e=Py(n.prototype)).call(e,(function(e){if(/^__/.test(e)){var n=e.replace("__","");kh(t,n,{get:function(){try{return this[e]}catch(_6){}return 0},set:function(t){try{this[e]=t}catch(_6){}}})}}))}},{key:"addEventListener",value:function(e,t,r){Iy(Ry(n.prototype),"addEventListener",this).call(this,e,t,r),this._degradeVideo&&this._eventsBackup.push([e,t,r])}},{key:"removeEventListener",value:function(e,t,r){var i;(Iy(Ry(n.prototype),"removeEventListener",this).call(this,e,t,r),this._degradeVideo)&&(this._eventsBackup=Ll(i=this._eventsBackup).call(i,(function(n){return!(n.eventName===e&&n.handler===t&&n.capture===r)})))}},{key:"setAttribute",value:function(e,t){var r;Iy(Ry(n.prototype),"setAttribute",this).call(this,e,t),"src"!==e&&(null===(r=this._degradeVideo)||void 0===r||r.setAttribute(e,t))}},{key:"_init",value:function(){this.analyse.reset(),this.timeline=new V9({volume:this.volume,canvas:this.querySelector("canvas"),videoContext:this.videoContext,videoDecode:this.videoDecode,maxVideoHeight:this.getAttribute("maxVideoHeight"),endLevel:sg(this.getAttribute("endLevel"))},this),dW.log(this.TAG,"timeline init"),this._noSleep=new dG,this._logFirstFrame=!1,this._playRequest=null,this._degradeVideoUserGestured=!1,this._bindEvents(),this._vMeta&&!this.videoDecode&&this.setVideoMeta(this._vMeta),this._glCtxOptions&&(this.glCtxOptions=this._glCtxOptions),this.timeline&&(this.innerDegrade&&this.timeline.emit(WY.INNER_DEGRADE),this.timeline.emit(WY.SET_PLAY_MODE,this._isLive?"LIVE":"VOD"),this.timeline.emit(WY.SET_PLAYBACKRATE,this.playbackRate),this.muted=this.muted)}},{key:"_bindEvents",value:function(){var e=this;this.timeline.on(WY.PLAY_EVENT,(function(t,n){var r;t===UY.LOADEDDATA&&(e.querySelector("canvas")||(dW.log(e.TAG,"_bindEvents, appendChild canvas"),e.appendChild(e.canvas)),e.canvas.style.display="block",null===(r=e.timeline)||void 0===r||r.emit(WY.SET_PLAYBACKRATE,e.playbackRate));if(t!==UY.LOADEDMETADATA&&t!==UY.RESIZE||Op.resolve().then((function(){e.updateVideoPostion()})),t===UY.ERROR){if(dW.warn(e.TAG,"detect error:",null==n?void 0:n.message),e.pause(),e._disabled(!0),e.innerDegrade||5===e.decoderMode)return e.degradeInfo={decodeFps:e.decodeFps,bitrate:e.bitrate,wasmInitCost:e.wasmInitCost,fps:e.fps,url:e.src,msg:null==n?void 0:n.message,decoderMode:e.decoderMode},void e._innerDispatchEvent("lowdecode");e._err=n}if(t===UY.LOW_DECODE)return e._disabled(),e.degradeInfo={decodeFps:e.decodeFps,bitrate:e.bitrate,wasmInitCost:e.wasmInitCost,fps:e.fps,url:e.src,decoderMode:e.decoderMode},void e._innerDispatchEvent(NY[t],e.degradeInfo);if(t===UY.LARGE_AV_GAP&&(e.unsyncInfo=n),t===UY.ENDED){if(e.paused)return;e.pause()}t===UY.PROGRESS&&e._noSleep.toPlay(),t===UY.WAITING&&e.analyse.addWaiting(),t===UY.SEEKING&&e.analyse.addSeeking(),t===UY.SEEKED&&e.analyse.addSeeked(),e._innerDispatchEvent(NY[t],n)}))}},{key:"_disabled",value:function(e){(this.innerDegrade||e)&&(e?HW().disabledWhenErrorOccur&&oY(1):HW().evaluateVVCount||(this.decodeFps/this.fps<=.6&&this.bitrate<2e6?oY(1):oY(2)))}},{key:"degrade",value:function(e){var t,r=this;!!this.querySelector("canvas")?this.replaceChild(this._degradeVideo,this.canvas):this.appendChild(this._degradeVideo),this.destroy(),ql(t=this._eventsBackup).call(t,(function(e){var t,i=Cy(e,3),o=i[0],a=i[1],s=i[2];Iy(Ry(n.prototype),"removeEventListener",r).call(r,o,a,s),null===(t=r._degradeVideo)||void 0===t||t.addEventListener(o,a,s)})),this._eventsBackup=[],e&&(this._degradeVideo.muted=!1,this._degradeVideo.src=e,this._degradeVideo.load())}},{key:"disconnectedCallback",value:function(){dW.log(this.TAG,"video disconnected"),document.removeEventListener("touchend",this._onTouchEnd,!0),this.destroy(!0),this._resizeObserver&&this._resizeObserver.disconnect(this)}},{key:"connectedCallback",value:function(){var e=this;dW.log(this.TAG,"video connected to document",performance.now()),this.timeline||this._init(),this.style.width="100%",this.style.height="100%",this.style.position="absolute",this.style.left="0px",this.style.top="0px",document.addEventListener("touchend",this._onTouchEnd,!0),ResizeObserver&&(this._resizeObserver=new ResizeObserver((function(t){var n;null!==(n=e.timeline)&&void 0!==n&&n.ready&&e.updateVideoPostion()})),this._resizeObserver.observe(this))}},{key:"_onTouchEnd",value:function(){vG(),this._degradeVideoInteract(),this._noSleep&&this._noSleep.enable()}},{key:"_degradeVideoInteract",value:function(){var e=this;if(this._degradeVideo&&(1===this.innerDegrade||3===this.innerDegrade)){if(this._degradeVideoUserGestured)return;var t=this._degradeVideo.play();t&&t.then((function(){e._degradeVideo.pause(),e._degradeVideoUserGestured=!0})).catch((function(e){console.log("degrade video: ",e.message)}))}}},{key:"play",value:function(e){var t,n,r=this;if(this.timeline){dW.log(this.TAG,Ag(t=Ag(n="play() called, ready:".concat(this.timeline.ready,", paused:")).call(n,this.timeline.paused,", force:")).call(t,e)),this._degradeVideoInteract();var i=0;if(this.timeline.ready&&this.timeline.paused||e){if(e=e||this._isLive,this._playRequest=null,!e)return this.timeline.emit(WY.DO_PLAY),this._innerDispatchEvent("play"),Op.resolve();this.destroy(),this._init(),i=Cg((function(){try{r._innerDispatchEvent("waiting")}catch(_6){}}),300)}return this._playRequest||!this.timeline.ready||this.timeline.paused?(dW.log(this.TAG,"request play!"),this._playRequest=this._playRequest||new Op((function(e,t){r.timeline._paused=!1,r._innerDispatchEvent("play"),r._noSleep.enable(),r.timeline.once("ready",(function(){dW.log(r.TAG,"timeline emit ready"),clearTimeout(i),r.timeline.play().then(e).catch(t).finally((function(){r._playRequest=null}))}))})),this.autoplay=!0,this._playRequest):Op.resolve()}}},{key:"pause",value:function(){this._playRequest=null,this.timeline&&this.timeline.pause();try{this._noSleep.disable(),(e=cG||(cG=document.querySelector("#hackAudioPP")))&&e.pause()}catch(_6){}var e}},{key:"load",value:function(){}},{key:"appendBuffer",value:function(e,t){if(this.timeline&&!this._err){if(!this._logFirstFrame){var n=e&&e.samples[0],r=t&&t.samples[0];if(!n&&!r)return;if(n||r){var i,o,a,s=(null==e?void 0:e.duration)/((null==e?void 0:e.formatTimescale)||1/0),u=(null==t?void 0:t.duration)/((null==t?void 0:t.formatTimescale)||1/0);dW.warn(this.TAG,Ag(i=Ag(o=Ag(a="video firstDts:".concat(n&&n.dts," , audio firstDts:")).call(a,r&&r.dts," videoTrack.duration=")).call(o,s,", audioTrack.duration=")).call(i,u)),this._logFirstFrame=!0,(s||u)&&(this.setPlayMode("VOD"),this.timeline.emit(WY.SET_PLAY_MODE,this._isLive?"LIVE":"VOD"),this.duration=Math.min(s||u,u||s)),this.analyse.addFirstData()}this.lowlatency&&(dW.warn(this.TAG,"single track! type=",v6),this.timeline.emit(WY.SINGLE_TRACK,v6)),t.exist()||(dW.warn(this.TAG,"single track! type=",p6),this.timeline.emit(WY.SINGLE_TRACK,p6)),e.exist()||(dW.warn(this.TAG,"single track! type=",m6),this.timeline.emit(WY.SINGLE_TRACK,m6))}var c,l;if(e.formatTimescale)ql(c=e.samples).call(c,(function(t){t.dts=Math.floor(t.dts/e.formatTimescale*1e3),t.pts=Math.floor(t.pts/e.formatTimescale*1e3)}));if(t.formatTimescale)ql(l=t.samples).call(l,(function(e){e.dts=Math.floor(e.dts/t.formatTimescale*1e3),e.pts=Math.floor(e.pts/t.formatTimescale*1e3)}));this.timeline.appendBuffer(e,t)}}},{key:"setAudioMeta",value:function(e){this._aMeta=e,this.timeline.emit(WY.SET_METADATA,"audio",e)}},{key:"setVideoMeta",value:function(e){!this._isLive&&this._vMeta||(this.timeline.emit(WY.SET_METADATA,"video",e),this._vMeta=e)}},{key:"setDecodeMode",value:function(e){this.setAttribute("decodeMode",e)}},{key:"setPlayMode",value:function(e){this._isLive="LIVE"===e}},{key:"endOfStream",value:function(){var e;this.currentTime&&(null===(e=this.timeline)||void 0===e||e.emit(WY.END_OF_STREAM))}},{key:"updateVideoPostion",value:function(){var e;null===(e=this.timeline)||void 0===e||e.emit(MY.UPDATE_VIDEO_FILLTYPE,this.xgfillType,this.containerLayout)}},{key:"_innerDispatchEvent",value:function(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))}},{key:"destroy",value:function(e){this.timeline&&(this._noSleep.destroy(),dW.log(this.TAG,"call destroy"),this.timeline.emit(WY.DESTROY,e),this.querySelector("video")&&this.removeChild(this.querySelector("video")),this.timeline=null,this._err=null,this._noSleep=null,this._eventsBackup=null)}},{key:"updateObjectPosition",value:function(e,t){var n;(this.timeline.emit(MY.UPDATE_VIDEO_COVER_POSITION,this.containerLayout,e,t),this._degradeVideo)&&(this._degradeVideo.style.objectPosition=Ag(n="".concat(100*e,"% ")).call(n,100*t,"%"))}},{key:"setVideoDecode",value:function(){dW.log(this.TAG,"set videoDecode",this.videoDecode),this.videoDecode&&this.timeline&&this.timeline.videoRender&&(this.timeline.videoRender.videoDecode=this.videoDecode)}},{key:"live",get:function(){return this._isLive}},{key:"lowlatency",get:function(){return"true"===this.getAttribute("lowlatency")},set:function(e){this.setAttribute("lowlatency",e)}},{key:"autoplay",get:function(){return"true"===this.getAttribute("autoplay")},set:function(e){this.setAttribute("autoplay",e)}},{key:"__canvas",get:function(){return this.timeline.canvas}},{key:"__ended",get:function(){return Math.abs(this.currentTime-this.duration)<.5}},{key:"__width",get:function(){return this.getAttribute("width")||this.videoWidth},set:function(e){var t="number"==typeof e?"".concat(e,"px"):e;this.setAttribute("width",t),this.canvas.width=e}},{key:"__height",get:function(){return this.getAttribute("height")},set:function(e){var t="number"==typeof e?"".concat(e,"px"):e;this.setAttribute("height",t),this.canvas.height=e}},{key:"__videoWidth",get:function(){return this.canvas.width}},{key:"__videoHeight",get:function(){return this.canvas.height}},{key:"__volume",get:function(){return Number(this.getAttribute("volume"))},set:function(e){e<=0&&(e=0),e>=1&&(e=1),this.setAttribute("volume",e),this.muted||this.timeline.emit(WY.UPDATE_VOLUME,e)}},{key:"__muted",get:function(){return"true"===this.getAttribute("muted")},set:function(e){this.setAttribute("muted",e),this._degradeVideoInteract(),this._noSleep.enable(),this.timeline.emit(WY.UPDATE_VOLUME,e?0:this.volume)}},{key:"__currentTime",get:function(){if(!this.timeline)return 0;var e=this.timeline.currentTime,t=this.timeline.duration;return Math.min(e,t)},set:function(e){this._debounceSeek(e)}},{key:"_seek",value:function(e){this.timeline&&(this.buffered.length||this.play(),this.paused&&!this._isLive&&0===e&&this.play(),this.timeline.seek(Number(e)))}},{key:"__duration",get:function(){return this._isLive?1/0:this.timeline.duration},set:function(e){this.timeline.emit(WY.SET_VIDEO_DURATION,e),this._innerDispatchEvent("durationchange")}},{key:"__seeking",get:function(){return this.timeline.seeking}},{key:"__paused",get:function(){return this.timeline.paused}},{key:"__fps",get:function(){return this.timeline.fps}},{key:"__decodeFps",get:function(){return this.timeline.decodeFps}},{key:"__decodeCost",get:function(){return sg(this.timeline.decodeCost)}},{key:"__renderCost",get:function(){return this.timeline.renderCost}},{key:"__wasmInitCost",get:function(){return this.timeline.wasmInitCost}},{key:"__totalSize",get:function(){return this.timeline.totalSize}},{key:"__bitrate",get:function(){return this.timeline.bitrate}},{key:"__gopLength",get:function(){return this.timeline.gopLength}},{key:"__readyState",get:function(){return this.timeline.readyState}},{key:"__buffered",get:function(){return this.timeline.buffered}},{key:"__decoderMode",get:function(){return this.timeline.decoderMode}},{key:"src",get:function(){return this.getAttribute("src")||""},set:function(e){dW.log(this.TAG,"set src ",e),this.setAttribute("src",e),this._vMeta=null,this.play(!0),this.timeline||this._init(),this._innerDispatchEvent("loadstart"),tY++}},{key:"currentSrc",get:function(){return this.getAttribute("src")||""}},{key:"playbackRate",get:function(){return Bg(this.getAttribute("playbackrate")||1)},set:function(e){var t;this.setAttribute("playbackrate",e),null===(t=this.timeline)||void 0===t||t.emit(WY.SET_PLAYBACKRATE,e)}},{key:"networkState",get:function(){return 1}},{key:"preloadTime",get:function(){var e=this.getAttribute("preloadtime");if(e){var t=Wg(e);if(t>0&&!Yg(t))return t}return 1/0},set:function(e){e&&Number(e)>0&&this.setAttribute("preloadtime",e)}},{key:"innerDegrade",get:function(){var e=this.getAttribute("innerdegrade");return sg(e)}},{key:"__glCtxOptions",set:function(e){this._glCtxOptions=e,this.timeline.emit(WY.UPDATE_GL_OPTIONS,e)}},{key:"__error",get:function(){return this._err},set:function(e){this.timeline.emit(WY.PLAY_EVENT,UY.ERROR,e)}},{key:"degradeVideo",get:function(){return this._degradeVideo}},{key:"degradeInfo",get:function(){return this._deradeInfo},set:function(e){this._deradeInfo=e}},{key:"unsyncInfo",get:function(){return this._unsyncInfo},set:function(e){this._unsyncInfo=e}},{key:"xgfillType",get:function(){return this.parentNode.getAttribute("data-xgfill")}},{key:"containerLayout",get:function(){var e=this.parentNode;return{width:e.clientWidth,height:e.clientHeight}}},{key:"videoDecode",get:function(){return"7"===this.getAttribute("decodeMode")}},{key:"audioMedia",get:function(){var e,t;return null===(e=this.timeline)||void 0===e||null===(t=e.audioRender)||void 0===t?void 0:t.media}},{key:"getStats",value:function(){return this.analyse.getStats(this)}},{key:"getSeekElapses",value:function(){return this.analyse.seekElapses()}},{key:"dump",value:function(){var e,t,n=this.buffered;return console.log(n),Kg(e=o_(t=new Array(n.length)).call(t,0)).call(e,(function(e,t){return[n.start(t),n.end(t)]}))}}],[{key:"version",get:function(){return"0.1.16"}},{key:"init",value:function(e){var t=e.h264Url,r=e.h264AsmUrl,i=e.h265AsmUrl,o=e.h265Url,a=e.h265ThreadUrl,s=e.h265SimdUrl;n.h264Url=t,n.h265Url=o,n.h265AsmUrl=i,n.h264AsmUrl=r,n.h265ThreadUrl=a,n.h265SimdUrl=s}},{key:"getDecodeCapacity",value:function(){return HW()}},{key:"getDeviceCapacity",value:function(){return{simd:XW,thread:zW(),nbCpu:navigator.hardwareConcurrency}}},{key:"setDecodeCapacity",value:function(e){QW=IW({},QW,e),e.preloadDecoder&&w9.genDecoder().catch((function(){}))}},{key:"genDecoder",value:function(e){return w9.genDecoder(e)}},{key:"cleanDisabled",value:function(){sY()}},{key:"isSupported",value:function(){return!!function(){if("undefined"==typeof customElements)return!1;if(qW)return!0;var e=!1,t=!1;try{var n=new(window.AudioContext||window.webkitAudioContext);n.close(),n=null,e=!0}catch(_6){}try{for(var r=document.createElement("canvas"),i=["webgl","experimental-webgl","moz-webgl","webkit-3d"],o=0;o<i.length;o++){var a=r.getContext(i[o]);if(a){a=null,r=null,t=!0;break}}qW=e&&t&&!!WebAssembly,localStorage.setItem("_sds",qW?1:0)}catch(_6){}return qW}()&&!1===aY()}}]),n}("undefined"!=typeof HTMLElement?HTMLElement:function(){});ky(y6,"decoderCache",w9);y6.init({h264Url:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/decoder/1.1.1/h264/decoder.js",h264AsmUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/decoder/1.1.1/h264/decoder_asm.js",h265Url:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/base/decoder.js",h265SimdUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/high/decoder_1656041798666.js",h265ThreadUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/main/decoder.js",h265AsmUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/high/decoder_asm.js"}),y6.setEleName=function(e){!function(e){YW=e}(e);var t=function(e){Ty(n,e);var t=Dy(n);function n(){return _y(this,n),t.apply(this,arguments)}return Ey(n)}(y6);customElements.get(jW())||customElements.define(jW(),t)};try{customElements.get(jW())||customElements.define(jW(),y6)}catch(_6){}return VePlayer.register("plugin:xgvideo",y6),y6}));
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_XGVIDEO__={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r=function(e){return e&&e.Math==Math&&e},i=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},a=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=a,u=Function.prototype,c=u.apply,l=u.call,h="object"==typeof Reflect&&Reflect.apply||(s?l.bind(c):function(){return l.apply(c,arguments)}),A=a,d=Function.prototype,f=d.call,v=A&&d.bind.bind(f,f),p=A?v:function(e){return function(){return f.apply(e,arguments)}},m=p,y=m({}.toString),g=m("".slice),_=function(e){return g(y(e),8,-1)},b=_,E=p,k=function(e){if("Function"===b(e))return E(e)},T="object"==typeof document&&document.all,R={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},S=R.all,w=R.IS_HTMLDDA?function(e){return"function"==typeof e||e===S}:function(e){return"function"==typeof e},D={},I=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),C=a,L=Function.prototype.call,V=C?L.bind(L):function(){return L.apply(L,arguments)},x={},F={}.propertyIsEnumerable,G=Object.getOwnPropertyDescriptor,O=G&&!F.call({1:2},1);x.f=O?function(e){var t=G(this,e);return!!t&&t.enumerable}:F;var Z,P,U=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},N=o,B=_,M=Object,W=p("".split),Y=N((function(){return!M("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?W(e,""):M(e)}:M,X=function(e){return null==e},Q=X,j=TypeError,H=function(e){if(Q(e))throw j("Can't call method on "+e);return e},J=Y,K=H,z=function(e){return J(K(e))},q=w,$=R.all,ee=R.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:q(e)||e===$}:function(e){return"object"==typeof e?null!==e:q(e)},te={},ne=te,re=i,ie=w,oe=function(e){return ie(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(ne[e])||oe(re[e]):ne[e]&&ne[e][t]||re[e]&&re[e][t]},se=p({}.isPrototypeOf),ue="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ce=i,le=ue,he=ce.process,Ae=ce.Deno,de=he&&he.versions||Ae&&Ae.version,fe=de&&de.v8;fe&&(P=(Z=fe.split("."))[0]>0&&Z[0]<4?1:+(Z[0]+Z[1])),!P&&le&&(!(Z=le.match(/Edge\/(\d+)/))||Z[1]>=74)&&(Z=le.match(/Chrome\/(\d+)/))&&(P=+Z[1]);var ve=P,pe=ve,me=o,ye=i.String,ge=!!Object.getOwnPropertySymbols&&!me((function(){var e=Symbol();return!ye(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&pe&&pe<41})),_e=ge&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,be=ae,Ee=w,ke=se,Te=Object,Re=_e?function(e){return"symbol"==typeof e}:function(e){var t=be("Symbol");return Ee(t)&&ke(t.prototype,Te(e))},Se=String,we=function(e){try{return Se(e)}catch(t){return"Object"}},De=w,Ie=we,Ce=TypeError,Le=function(e){if(De(e))return e;throw Ce(Ie(e)+" is not a function")},Ve=Le,xe=X,Fe=function(e,t){var n=e[t];return xe(n)?void 0:Ve(n)},Ge=V,Oe=w,Ze=ee,Pe=TypeError,Ue={exports:{}},Ne=i,Be=Object.defineProperty,Me=function(e,t){try{Be(Ne,e,{value:t,configurable:!0,writable:!0})}catch(n){Ne[e]=t}return t},We="__core-js_shared__",Ye=i[We]||Me(We,{}),Xe=Ye;(Ue.exports=function(e,t){return Xe[e]||(Xe[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 Qe=Ue.exports,je=H,He=Object,Je=function(e){return He(je(e))},Ke=Je,ze=p({}.hasOwnProperty),qe=Object.hasOwn||function(e,t){return ze(Ke(e),t)},$e=p,et=0,tt=Math.random(),nt=$e(1..toString),rt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},it=Qe,ot=qe,at=rt,st=ge,ut=_e,ct=i.Symbol,lt=it("wks"),ht=ut?ct.for||ct:ct&&ct.withoutSetter||at,At=function(e){return ot(lt,e)||(lt[e]=st&&ot(ct,e)?ct[e]:ht("Symbol."+e)),lt[e]},dt=V,ft=ee,vt=Re,pt=Fe,mt=function(e,t){var n,r;if("string"===t&&Oe(n=e.toString)&&!Ze(r=Ge(n,e)))return r;if(Oe(n=e.valueOf)&&!Ze(r=Ge(n,e)))return r;if("string"!==t&&Oe(n=e.toString)&&!Ze(r=Ge(n,e)))return r;throw Pe("Can't convert object to primitive value")},yt=TypeError,gt=At("toPrimitive"),_t=function(e,t){if(!ft(e)||vt(e))return e;var n,r=pt(e,gt);if(r){if(void 0===t&&(t="default"),n=dt(r,e,t),!ft(n)||vt(n))return n;throw yt("Can't convert object to primitive value")}return void 0===t&&(t="number"),mt(e,t)},bt=Re,Et=function(e){var t=_t(e,"string");return bt(t)?t:t+""},kt=ee,Tt=i.document,Rt=kt(Tt)&&kt(Tt.createElement),St=function(e){return Rt?Tt.createElement(e):{}},wt=St,Dt=!I&&!o((function(){return 7!=Object.defineProperty(wt("div"),"a",{get:function(){return 7}}).a})),It=I,Ct=V,Lt=x,Vt=U,xt=z,Ft=Et,Gt=qe,Ot=Dt,Zt=Object.getOwnPropertyDescriptor;D.f=It?Zt:function(e,t){if(e=xt(e),t=Ft(t),Ot)try{return Zt(e,t)}catch(n){}if(Gt(e,t))return Vt(!Ct(Lt.f,e,t),e[t])};var Pt=o,Ut=w,Nt=/#|\.prototype\./,Bt=function(e,t){var n=Wt[Mt(e)];return n==Xt||n!=Yt&&(Ut(t)?Pt(t):!!t)},Mt=Bt.normalize=function(e){return String(e).replace(Nt,".").toLowerCase()},Wt=Bt.data={},Yt=Bt.NATIVE="N",Xt=Bt.POLYFILL="P",Qt=Bt,jt=Le,Ht=a,Jt=k(k.bind),Kt=function(e,t){return jt(e),void 0===t?e:Ht?Jt(e,t):function(){return e.apply(t,arguments)}},zt={},qt=I&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$t=ee,en=String,tn=TypeError,nn=function(e){if($t(e))return e;throw tn(en(e)+" is not an object")},rn=I,on=Dt,an=qt,sn=nn,un=Et,cn=TypeError,ln=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,An="enumerable",dn="configurable",fn="writable";zt.f=rn?an?function(e,t,n){if(sn(e),t=un(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&fn in n&&!n[fn]){var r=hn(e,t);r&&r[fn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:An in n?n[An]:r[An],writable:!1})}return ln(e,t,n)}:ln:function(e,t,n){if(sn(e),t=un(t),sn(n),on)try{return ln(e,t,n)}catch(r){}if("get"in n||"set"in n)throw cn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var vn=zt,pn=U,mn=I?function(e,t,n){return vn.f(e,t,pn(1,n))}:function(e,t,n){return e[t]=n,e},yn=i,gn=h,_n=k,bn=w,En=D.f,kn=Qt,Tn=te,Rn=Kt,Sn=mn,wn=qe,Dn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return gn(e,this,arguments)};return t.prototype=e.prototype,t},In=function(e,t){var n,r,i,o,a,s,u,c,l,h=e.target,A=e.global,d=e.stat,f=e.proto,v=A?yn:d?yn[h]:(yn[h]||{}).prototype,p=A?Tn:Tn[h]||Sn(Tn,h,{})[h],m=p.prototype;for(o in t)r=!(n=kn(A?o:h+(d?".":"#")+o,e.forced))&&v&&wn(v,o),s=p[o],r&&(u=e.dontCallGetSet?(l=En(v,o))&&l.value:v[o]),a=r&&u?u:t[o],r&&typeof s==typeof a||(c=e.bind&&r?Rn(a,yn):e.wrap&&r?Dn(a):f&&bn(a)?_n(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Sn(c,"sham",!0),Sn(p,o,c),f&&(wn(Tn,i=h+"Prototype")||Sn(Tn,i,{}),Sn(Tn[i],o,a),e.real&&m&&(n||!m[o])&&Sn(m,o,a)))},Cn=_,Ln=Array.isArray||function(e){return"Array"==Cn(e)},Vn=Math.ceil,xn=Math.floor,Fn=Math.trunc||function(e){var t=+e;return(t>0?xn:Vn)(t)},Gn=function(e){var t=+e;return t!=t||0===t?0:Fn(t)},On=Gn,Zn=Math.min,Pn=function(e){return e>0?Zn(On(e),9007199254740991):0},Un=function(e){return Pn(e.length)},Nn=TypeError,Bn=function(e){if(e>9007199254740991)throw Nn("Maximum allowed index exceeded");return e},Mn=Et,Wn=zt,Yn=U,Xn=function(e,t,n){var r=Mn(t);r in e?Wn.f(e,r,Yn(0,n)):e[r]=n},Qn={};Qn[At("toStringTag")]="z";var jn="[object z]"===String(Qn),Hn=jn,Jn=w,Kn=_,zn=At("toStringTag"),qn=Object,$n="Arguments"==Kn(function(){return arguments}()),er=Hn?Kn:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=qn(e),zn))?n:$n?Kn(t):"Object"==(r=Kn(t))&&Jn(t.callee)?"Arguments":r},tr=w,nr=Ye,rr=p(Function.toString);tr(nr.inspectSource)||(nr.inspectSource=function(e){return rr(e)});var ir=nr.inspectSource,or=p,ar=o,sr=w,ur=er,cr=ir,lr=function(){},hr=[],Ar=ae("Reflect","construct"),dr=/^\s*(?:class|function)\b/,fr=or(dr.exec),vr=!dr.exec(lr),pr=function(e){if(!sr(e))return!1;try{return Ar(lr,hr,e),!0}catch(t){return!1}},mr=function(e){if(!sr(e))return!1;switch(ur(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return vr||!!fr(dr,cr(e))}catch(t){return!0}};mr.sham=!0;var yr=!Ar||ar((function(){var e;return pr(pr.call)||!pr(Object)||!pr((function(){e=!0}))||e}))?mr:pr,gr=Ln,_r=yr,br=ee,Er=At("species"),kr=Array,Tr=function(e){var t;return gr(e)&&(t=e.constructor,(_r(t)&&(t===kr||gr(t.prototype))||br(t)&&null===(t=t[Er]))&&(t=void 0)),void 0===t?kr:t},Rr=function(e,t){return new(Tr(e))(0===t?0:t)},Sr=o,wr=ve,Dr=At("species"),Ir=function(e){return wr>=51||!Sr((function(){var t=[];return(t.constructor={})[Dr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Cr=In,Lr=o,Vr=Ln,xr=ee,Fr=Je,Gr=Un,Or=Bn,Zr=Xn,Pr=Rr,Ur=Ir,Nr=ve,Br=At("isConcatSpreadable"),Mr=Nr>=51||!Lr((function(){var e=[];return e[Br]=!1,e.concat()[0]!==e})),Wr=function(e){if(!xr(e))return!1;var t=e[Br];return void 0!==t?!!t:Vr(e)};Cr({target:"Array",proto:!0,arity:1,forced:!Mr||!Ur("concat")},{concat:function(e){var t,n,r,i,o,a=Fr(this),s=Pr(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Wr(o=-1===t?a:arguments[t]))for(i=Gr(o),Or(u+i),n=0;n<i;n++,u++)n in o&&Zr(s,u,o[n]);else Or(u+1),Zr(s,u++,o);return s.length=u,s}});var Yr=er,Xr=String,Qr=function(e){if("Symbol"===Yr(e))throw TypeError("Cannot convert a Symbol value to a string");return Xr(e)},jr={},Hr=Gn,Jr=Math.max,Kr=Math.min,zr=function(e,t){var n=Hr(e);return n<0?Jr(n+t,0):Kr(n,t)},qr=z,$r=zr,ei=Un,ti=function(e){return function(t,n,r){var i,o=qr(t),a=ei(o),s=$r(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ni={includes:ti(!0),indexOf:ti(!1)},ri={},ii=qe,oi=z,ai=ni.indexOf,si=ri,ui=p([].push),ci=function(e,t){var n,r=oi(e),i=0,o=[];for(n in r)!ii(si,n)&&ii(r,n)&&ui(o,n);for(;t.length>i;)ii(r,n=t[i++])&&(~ai(o,n)||ui(o,n));return o},li=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hi=ci,Ai=li,di=Object.keys||function(e){return hi(e,Ai)},fi=I,vi=qt,pi=zt,mi=nn,yi=z,gi=di;jr.f=fi&&!vi?Object.defineProperties:function(e,t){mi(e);for(var n,r=yi(t),i=gi(t),o=i.length,a=0;o>a;)pi.f(e,n=i[a++],r[n]);return e};var _i,bi=ae("document","documentElement"),Ei=rt,ki=Qe("keys"),Ti=function(e){return ki[e]||(ki[e]=Ei(e))},Ri=nn,Si=jr,wi=li,Di=ri,Ii=bi,Ci=St,Li="prototype",Vi="script",xi=Ti("IE_PROTO"),Fi=function(){},Gi=function(e){return"<"+Vi+">"+e+"</"+Vi+">"},Oi=function(e){e.write(Gi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Zi=function(){try{_i=new ActiveXObject("htmlfile")}catch(i){}var e,t,n;Zi="undefined"!=typeof document?document.domain&&_i?Oi(_i):(t=Ci("iframe"),n="java"+Vi+":",t.style.display="none",Ii.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Gi("document.F=Object")),e.close(),e.F):Oi(_i);for(var r=wi.length;r--;)delete Zi[Li][wi[r]];return Zi()};Di[xi]=!0;var Pi=Object.create||function(e,t){var n;return null!==e?(Fi[Li]=Ri(e),n=new Fi,Fi[Li]=null,n[xi]=e):n=Zi(),void 0===t?n:Si.f(n,t)},Ui={},Ni=ci,Bi=li.concat("length","prototype");Ui.f=Object.getOwnPropertyNames||function(e){return Ni(e,Bi)};var Mi={},Wi=zr,Yi=Un,Xi=Xn,Qi=Array,ji=Math.max,Hi=function(e,t,n){for(var r=Yi(e),i=Wi(t,r),o=Wi(void 0===n?r:n,r),a=Qi(ji(o-i,0)),s=0;i<o;i++,s++)Xi(a,s,e[i]);return a.length=s,a},Ji=_,Ki=z,zi=Ui.f,qi=Hi,$i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Mi.f=function(e){return $i&&"Window"==Ji(e)?function(e){try{return zi(e)}catch(t){return qi($i)}}(e):zi(Ki(e))};var eo={};eo.f=Object.getOwnPropertySymbols;var to=mn,no=function(e,t,n,r){return r&&r.enumerable?e[t]=n:to(e,t,n),e},ro=zt,io=function(e,t,n){return ro.f(e,t,n)},oo={},ao=At;oo.f=ao;var so,uo,co,lo=te,ho=qe,Ao=oo,fo=zt.f,vo=function(e){var t=lo.Symbol||(lo.Symbol={});ho(t,e)||fo(t,e,{value:Ao.f(e)})},po=V,mo=ae,yo=At,go=no,_o=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=yo("toPrimitive");t&&!t[r]&&go(t,r,(function(e){return po(n,this)}),{arity:1})},bo=er,Eo=jn?{}.toString:function(){return"[object "+bo(this)+"]"},ko=jn,To=zt.f,Ro=mn,So=qe,wo=Eo,Do=At("toStringTag"),Io=function(e,t,n,r){if(e){var i=n?e:e.prototype;So(i,Do)||To(i,Do,{configurable:!0,value:t}),r&&!ko&&Ro(i,"toString",wo)}},Co=w,Lo=i.WeakMap,Vo=Co(Lo)&&/native code/.test(String(Lo)),xo=i,Fo=ee,Go=mn,Oo=qe,Zo=Ye,Po=Ti,Uo=ri,No="Object already initialized",Bo=xo.TypeError,Mo=xo.WeakMap;if(Vo||Zo.state){var Wo=Zo.state||(Zo.state=new Mo);Wo.get=Wo.get,Wo.has=Wo.has,Wo.set=Wo.set,so=function(e,t){if(Wo.has(e))throw Bo(No);return t.facade=e,Wo.set(e,t),t},uo=function(e){return Wo.get(e)||{}},co=function(e){return Wo.has(e)}}else{var Yo=Po("state");Uo[Yo]=!0,so=function(e,t){if(Oo(e,Yo))throw Bo(No);return t.facade=e,Go(e,Yo,t),t},uo=function(e){return Oo(e,Yo)?e[Yo]:{}},co=function(e){return Oo(e,Yo)}}var Xo={set:so,get:uo,has:co,enforce:function(e){return co(e)?uo(e):so(e,{})},getterFor:function(e){return function(t){var n;if(!Fo(t)||(n=uo(t)).type!==e)throw Bo("Incompatible receiver, "+e+" required");return n}}},Qo=Kt,jo=Y,Ho=Je,Jo=Un,Ko=Rr,zo=p([].push),qo=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,c,l,h){for(var A,d,f=Ho(u),v=jo(f),p=Qo(c,l),m=Jo(v),y=0,g=h||Ko,_=t?g(u,m):n||a?g(u,0):void 0;m>y;y++)if((s||y in v)&&(d=p(A=v[y],y,f),e))if(t)_[y]=d;else if(d)switch(e){case 3:return!0;case 5:return A;case 6:return y;case 2:zo(_,A)}else switch(e){case 4:return!1;case 7:zo(_,A)}return o?-1:r||i?i:_}},$o={forEach:qo(0),map:qo(1),filter:qo(2),some:qo(3),every:qo(4),find:qo(5),findIndex:qo(6),filterReject:qo(7)},ea=In,ta=i,na=V,ra=p,ia=I,oa=ge,aa=o,sa=qe,ua=se,ca=nn,la=z,ha=Et,Aa=Qr,da=U,fa=Pi,va=di,pa=Ui,ma=Mi,ya=eo,ga=D,_a=zt,ba=jr,Ea=x,ka=no,Ta=io,Ra=Qe,Sa=ri,wa=rt,Da=At,Ia=oo,Ca=vo,La=_o,Va=Io,xa=Xo,Fa=$o.forEach,Ga=Ti("hidden"),Oa="Symbol",Za="prototype",Pa=xa.set,Ua=xa.getterFor(Oa),Na=Object[Za],Ba=ta.Symbol,Ma=Ba&&Ba[Za],Wa=ta.TypeError,Ya=ta.QObject,Xa=ga.f,Qa=_a.f,ja=ma.f,Ha=Ea.f,Ja=ra([].push),Ka=Ra("symbols"),za=Ra("op-symbols"),qa=Ra("wks"),$a=!Ya||!Ya[Za]||!Ya[Za].findChild,es=ia&&aa((function(){return 7!=fa(Qa({},"a",{get:function(){return Qa(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Xa(Na,t);r&&delete Na[t],Qa(e,t,n),r&&e!==Na&&Qa(Na,t,r)}:Qa,ts=function(e,t){var n=Ka[e]=fa(Ma);return Pa(n,{type:Oa,tag:e,description:t}),ia||(n.description=t),n},ns=function(e,t,n){e===Na&&ns(za,t,n),ca(e);var r=ha(t);return ca(n),sa(Ka,r)?(n.enumerable?(sa(e,Ga)&&e[Ga][r]&&(e[Ga][r]=!1),n=fa(n,{enumerable:da(0,!1)})):(sa(e,Ga)||Qa(e,Ga,da(1,{})),e[Ga][r]=!0),es(e,r,n)):Qa(e,r,n)},rs=function(e,t){ca(e);var n=la(t),r=va(n).concat(ss(n));return Fa(r,(function(t){ia&&!na(is,n,t)||ns(e,t,n[t])})),e},is=function(e){var t=ha(e),n=na(Ha,this,t);return!(this===Na&&sa(Ka,t)&&!sa(za,t))&&(!(n||!sa(this,t)||!sa(Ka,t)||sa(this,Ga)&&this[Ga][t])||n)},os=function(e,t){var n=la(e),r=ha(t);if(n!==Na||!sa(Ka,r)||sa(za,r)){var i=Xa(n,r);return!i||!sa(Ka,r)||sa(n,Ga)&&n[Ga][r]||(i.enumerable=!0),i}},as=function(e){var t=ja(la(e)),n=[];return Fa(t,(function(e){sa(Ka,e)||sa(Sa,e)||Ja(n,e)})),n},ss=function(e){var t=e===Na,n=ja(t?za:la(e)),r=[];return Fa(n,(function(e){!sa(Ka,e)||t&&!sa(Na,e)||Ja(r,Ka[e])})),r};oa||(Ba=function(){if(ua(Ma,this))throw Wa("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Aa(arguments[0]):void 0,t=wa(e),n=function(e){this===Na&&na(n,za,e),sa(this,Ga)&&sa(this[Ga],t)&&(this[Ga][t]=!1),es(this,t,da(1,e))};return ia&&$a&&es(Na,t,{configurable:!0,set:n}),ts(t,e)},ka(Ma=Ba[Za],"toString",(function(){return Ua(this).tag})),ka(Ba,"withoutSetter",(function(e){return ts(wa(e),e)})),Ea.f=is,_a.f=ns,ba.f=rs,ga.f=os,pa.f=ma.f=as,ya.f=ss,Ia.f=function(e){return ts(Da(e),e)},ia&&Ta(Ma,"description",{configurable:!0,get:function(){return Ua(this).description}})),ea({global:!0,constructor:!0,wrap:!0,forced:!oa,sham:!oa},{Symbol:Ba}),Fa(va(qa),(function(e){Ca(e)})),ea({target:Oa,stat:!0,forced:!oa},{useSetter:function(){$a=!0},useSimple:function(){$a=!1}}),ea({target:"Object",stat:!0,forced:!oa,sham:!ia},{create:function(e,t){return void 0===t?fa(e):rs(fa(e),t)},defineProperty:ns,defineProperties:rs,getOwnPropertyDescriptor:os}),ea({target:"Object",stat:!0,forced:!oa},{getOwnPropertyNames:as}),La(),Va(Ba,Oa),Sa[Ga]=!0;var us=ge&&!!Symbol.for&&!!Symbol.keyFor,cs=In,ls=ae,hs=qe,As=Qr,ds=Qe,fs=us,vs=ds("string-to-symbol-registry"),ps=ds("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!fs},{for:function(e){var t=As(e);if(hs(vs,t))return vs[t];var n=ls("Symbol")(t);return vs[t]=n,ps[n]=t,n}});var ms=In,ys=qe,gs=Re,_s=we,bs=us,Es=Qe("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!bs},{keyFor:function(e){if(!gs(e))throw TypeError(_s(e)+" is not a symbol");if(ys(Es,e))return Es[e]}});var ks=p([].slice),Ts=Ln,Rs=w,Ss=_,ws=Qr,Ds=p([].push),Is=In,Cs=ae,Ls=h,Vs=V,xs=p,Fs=o,Gs=w,Os=Re,Zs=ks,Ps=function(e){if(Rs(e))return e;if(Ts(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Ds(n,i):"number"!=typeof i&&"Number"!=Ss(i)&&"String"!=Ss(i)||Ds(n,ws(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ts(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}},Us=ge,Ns=String,Bs=Cs("JSON","stringify"),Ms=xs(/./.exec),Ws=xs("".charAt),Ys=xs("".charCodeAt),Xs=xs("".replace),Qs=xs(1..toString),js=/[\uD800-\uDFFF]/g,Hs=/^[\uD800-\uDBFF]$/,Js=/^[\uDC00-\uDFFF]$/,Ks=!Us||Fs((function(){var e=Cs("Symbol")();return"[null]"!=Bs([e])||"{}"!=Bs({a:e})||"{}"!=Bs(Object(e))})),zs=Fs((function(){return'"\\udf06\\ud834"'!==Bs("\udf06\ud834")||'"\\udead"'!==Bs("\udead")})),qs=function(e,t){var n=Zs(arguments),r=Ps(t);if(Gs(r)||void 0!==e&&!Os(e))return n[1]=function(e,t){if(Gs(r)&&(t=Vs(r,this,Ns(e),t)),!Os(t))return t},Ls(Bs,null,n)},$s=function(e,t,n){var r=Ws(n,t-1),i=Ws(n,t+1);return Ms(Hs,e)&&!Ms(Js,i)||Ms(Js,e)&&!Ms(Hs,r)?"\\u"+Qs(Ys(e,0),16):e};Bs&&Is({target:"JSON",stat:!0,arity:3,forced:Ks||zs},{stringify:function(e,t,n){var r=Zs(arguments),i=Ls(Ks?qs:Bs,null,r);return zs&&"string"==typeof i?Xs(i,js,$s):i}});var eu=eo,tu=Je;In({target:"Object",stat:!0,forced:!ge||o((function(){eu.f(1)}))},{getOwnPropertySymbols:function(e){var t=eu.f;return t?t(tu(e)):[]}}),vo("asyncIterator"),vo("hasInstance"),vo("isConcatSpreadable"),vo("iterator"),vo("match"),vo("matchAll"),vo("replace"),vo("search"),vo("species"),vo("split");var nu=_o;vo("toPrimitive"),nu();var ru=ae,iu=Io;vo("toStringTag"),iu(ru("Symbol"),"Symbol"),vo("unscopables"),Io(i.JSON,"JSON",!0);var ou,au,su,uu=te.Symbol,cu={},lu=I,hu=qe,Au=Function.prototype,du=lu&&Object.getOwnPropertyDescriptor,fu=hu(Au,"name"),vu={EXISTS:fu,PROPER:fu&&"something"===function(){}.name,CONFIGURABLE:fu&&(!lu||lu&&du(Au,"name").configurable)},pu=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),mu=qe,yu=w,gu=Je,_u=pu,bu=Ti("IE_PROTO"),Eu=Object,ku=Eu.prototype,Tu=_u?Eu.getPrototypeOf:function(e){var t=gu(e);if(mu(t,bu))return t[bu];var n=t.constructor;return yu(n)&&t instanceof n?n.prototype:t instanceof Eu?ku:null},Ru=o,Su=w,wu=ee,Du=Pi,Iu=Tu,Cu=no,Lu=At("iterator"),Vu=!1;[].keys&&("next"in(su=[].keys())?(au=Iu(Iu(su)))!==Object.prototype&&(ou=au):Vu=!0);var xu=!wu(ou)||Ru((function(){var e={};return ou[Lu].call(e)!==e}));Su((ou=xu?{}:Du(ou))[Lu])||Cu(ou,Lu,(function(){return this}));var Fu={IteratorPrototype:ou,BUGGY_SAFARI_ITERATORS:Vu},Gu=Fu.IteratorPrototype,Ou=Pi,Zu=U,Pu=Io,Uu=cu,Nu=function(){return this},Bu=function(e,t,n,r){var i=t+" Iterator";return e.prototype=Ou(Gu,{next:Zu(+!r,n)}),Pu(e,i,!1,!0),Uu[i]=Nu,e},Mu=p,Wu=Le,Yu=w,Xu=String,Qu=TypeError,ju=function(e,t,n){try{return Mu(Wu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},Hu=nn,Ju=function(e){if("object"==typeof e||Yu(e))return e;throw Qu("Can't set "+Xu(e)+" as a prototype")},Ku=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=ju(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return Hu(n),Ju(r),t?e(n,r):n.__proto__=r,n}}():void 0),zu=In,qu=V,$u=vu,ec=Bu,tc=Tu,nc=Io,rc=no,ic=cu,oc=Fu,ac=$u.PROPER,sc=oc.BUGGY_SAFARI_ITERATORS,uc=At("iterator"),cc="keys",lc="values",hc="entries",Ac=function(){return this},dc=function(e,t,n,r,i,o,a){ec(n,t,r);var s,u,c,l=function(e){if(e===i&&v)return v;if(!sc&&e in d)return d[e];switch(e){case cc:case lc:case hc:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",A=!1,d=e.prototype,f=d[uc]||d["@@iterator"]||i&&d[i],v=!sc&&f||l(i),p="Array"==t&&d.entries||f;if(p&&(s=tc(p.call(new e)))!==Object.prototype&&s.next&&(nc(s,h,!0,!0),ic[h]=Ac),ac&&i==lc&&f&&f.name!==lc&&(A=!0,v=function(){return qu(f,this)}),i)if(u={values:l(lc),keys:o?v:l(cc),entries:l(hc)},a)for(c in u)(sc||A||!(c in d))&&rc(d,c,u[c]);else zu({target:t,proto:!0,forced:sc||A},u);return a&&d[uc]!==v&&rc(d,uc,v,{name:i}),ic[t]=v,u},fc=function(e,t){return{value:e,done:t}},vc=z,pc=cu,mc=Xo;zt.f;var yc=dc,gc=fc,_c="Array Iterator",bc=mc.set,Ec=mc.getterFor(_c);yc(Array,"Array",(function(e,t){bc(this,{type:_c,target:vc(e),index:0,kind:t})}),(function(){var e=Ec(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,gc(void 0,!0)):gc("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),pc.Arguments=pc.Array;var kc={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},Tc=i,Rc=er,Sc=mn,wc=cu,Dc=At("toStringTag");for(var Ic in kc){var Cc=Tc[Ic],Lc=Cc&&Cc.prototype;Lc&&Rc(Lc)!==Dc&&Sc(Lc,Dc,Ic),wc[Ic]=wc.Array}var Vc=uu;vo("dispose");var xc=Vc;vo("asyncDispose");var Fc=In,Gc=p,Oc=ae("Symbol"),Zc=Oc.keyFor,Pc=Gc(Oc.prototype.valueOf);Fc({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Zc(Pc(e))}catch(t){return!1}}});for(var Uc=In,Nc=Qe,Bc=ae,Mc=p,Wc=Re,Yc=At,Xc=Bc("Symbol"),Qc=Xc.isWellKnown,jc=Bc("Object","getOwnPropertyNames"),Hc=Mc(Xc.prototype.valueOf),Jc=Nc("wks"),Kc=0,zc=jc(Xc),qc=zc.length;Kc<qc;Kc++)try{var $c=zc[Kc];Wc(Xc[$c])&&Yc($c)}catch(_6){}Uc({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Qc&&Qc(e))return!0;try{for(var t=Hc(e),n=0,r=jc(Jc),i=r.length;n<i;n++)if(Jc[r[n]]==t)return!0}catch(_6){}return!1}}),vo("matcher"),vo("metadataKey"),vo("observable"),vo("metadata"),vo("patternMatch"),vo("replaceAll");var el=xc,tl=n(el),nl=p,rl=Gn,il=Qr,ol=H,al=nl("".charAt),sl=nl("".charCodeAt),ul=nl("".slice),cl=function(e){return function(t,n){var r,i,o=il(ol(t)),a=rl(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=sl(o,a))<55296||r>56319||a+1===s||(i=sl(o,a+1))<56320||i>57343?e?al(o,a):r:e?ul(o,a,a+2):i-56320+(r-55296<<10)+65536}},ll={codeAt:cl(!1),charAt:cl(!0)},hl=ll.charAt,Al=Qr,dl=Xo,fl=dc,vl=fc,pl="String Iterator",ml=dl.set,yl=dl.getterFor(pl);fl(String,"String",(function(e){ml(this,{type:pl,string:Al(e),index:0})}),(function(){var e,t=yl(this),n=t.string,r=t.index;return r>=n.length?vl(void 0,!0):(e=hl(n,r),t.index+=e.length,vl(e,!1))}));var gl=n(oo.f("iterator"));function _l(e){return(_l="function"==typeof tl&&"symbol"==typeof gl?function(e){return typeof e}:function(e){return e&&"function"==typeof tl&&e.constructor===tl&&e!==tl.prototype?"symbol":typeof e})(e)}var bl=Je,El=di;In({target:"Object",stat:!0,forced:o((function(){El(1)}))},{keys:function(e){return El(bl(e))}});var kl=n(te.Object.keys),Tl=n(te.Object.getOwnPropertySymbols),Rl=$o.filter;In({target:"Array",proto:!0,forced:!Ir("filter")},{filter:function(e){return Rl(this,e,arguments.length>1?arguments[1]:void 0)}});var Sl=te,wl=function(e){return Sl[e+"Prototype"]},Dl=wl("Array").filter,Il=se,Cl=Dl,Ll=Array.prototype,Vl=n((function(e){var t=e.filter;return e===Ll||Il(Ll,e)&&t===Ll.filter?Cl:t})),xl={exports:{}},Fl=In,Gl=o,Ol=z,Zl=D.f,Pl=I;Fl({target:"Object",stat:!0,forced:!Pl||Gl((function(){Zl(1)})),sham:!Pl},{getOwnPropertyDescriptor:function(e,t){return Zl(Ol(e),t)}});var Ul=te.Object,Nl=xl.exports=function(e,t){return Ul.getOwnPropertyDescriptor(e,t)};Ul.getOwnPropertyDescriptor.sham&&(Nl.sham=!0);var Bl=n(xl.exports),Ml=o,Wl=function(e,t){var n=[][e];return!!n&&Ml((function(){n.call(null,t||function(){return 1},1)}))},Yl=$o.forEach,Xl=Wl("forEach")?[].forEach:function(e){return Yl(this,e,arguments.length>1?arguments[1]:void 0)};In({target:"Array",proto:!0,forced:[].forEach!=Xl},{forEach:Xl});var Ql=wl("Array").forEach,jl=er,Hl=qe,Jl=se,Kl=Ql,zl=Array.prototype,ql={DOMTokenList:!0,NodeList:!0},$l=n((function(e){var t=e.forEach;return e===zl||Jl(zl,e)&&t===zl.forEach||Hl(ql,jl(e))?Kl:t})),eh=ae,th=Ui,nh=eo,rh=nn,ih=p([].concat),oh=eh("Reflect","ownKeys")||function(e){var t=th.f(rh(e)),n=nh.f;return n?ih(t,n(e)):t},ah=oh,sh=z,uh=D,ch=Xn;In({target:"Object",stat:!0,sham:!I},{getOwnPropertyDescriptors:function(e){for(var t,n,r=sh(e),i=uh.f,o=ah(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&ch(a,t,n);return a}});var lh=n(te.Object.getOwnPropertyDescriptors),hh={exports:{}},Ah=In,dh=I,fh=jr.f;Ah({target:"Object",stat:!0,forced:Object.defineProperties!==fh,sham:!dh},{defineProperties:fh});var vh=te.Object,ph=hh.exports=function(e,t){return vh.defineProperties(e,t)};vh.defineProperties.sham&&(ph.sham=!0);var mh=n(hh.exports),yh={exports:{}},gh=In,_h=I,bh=zt.f;gh({target:"Object",stat:!0,forced:Object.defineProperty!==bh,sham:!_h},{defineProperty:bh});var Eh=te.Object,kh=yh.exports=function(e,t,n){return Eh.defineProperty(e,t,n)};Eh.defineProperty.sham&&(kh.sham=!0);var Th=n(yh.exports),Rh=n(el);In({target:"Object",stat:!0,sham:!I},{create:Pi});var Sh=te.Object,wh=n((function(e,t){return Sh.create(e,t)})),Dh=Je,Ih=Tu,Ch=pu;In({target:"Object",stat:!0,forced:o((function(){Ih(1)})),sham:!Ch},{getPrototypeOf:function(e){return Ih(Dh(e))}});var Lh=n(te.Object.getPrototypeOf);In({target:"Object",stat:!0},{setPrototypeOf:Ku});var Vh=n(te.Object.setPrototypeOf),xh=qe,Fh=oh,Gh=D,Oh=zt,Zh=ee,Ph=mn,Uh=Error,Nh=p("".replace),Bh=String(Uh("zxcasd").stack),Mh=/\n\s*at [^:]*:[^\n]*/,Wh=Mh.test(Bh),Yh=U,Xh=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Yh(1,7)),7!==e.stack)})),Qh=mn,jh=function(e,t){if(Wh&&"string"==typeof e&&!Uh.prepareStackTrace)for(;t--;)e=Nh(e,Mh,"");return e},Hh=Xh,Jh=Error.captureStackTrace,Kh=cu,zh=At("iterator"),qh=Array.prototype,$h=function(e){return void 0!==e&&(Kh.Array===e||qh[zh]===e)},eA=er,tA=Fe,nA=X,rA=cu,iA=At("iterator"),oA=function(e){if(!nA(e))return tA(e,iA)||tA(e,"@@iterator")||rA[eA(e)]},aA=V,sA=Le,uA=nn,cA=we,lA=oA,hA=TypeError,AA=function(e,t){var n=arguments.length<2?lA(e):t;if(sA(n))return uA(aA(n,e));throw hA(cA(e)+" is not iterable")},dA=V,fA=nn,vA=Fe,pA=function(e,t,n){var r,i;fA(e);try{if(!(r=vA(e,"return"))){if("throw"===t)throw n;return n}r=dA(r,e)}catch(_6){i=!0,r=_6}if("throw"===t)throw n;if(i)throw r;return fA(r),n},mA=Kt,yA=V,gA=nn,_A=we,bA=$h,EA=Un,kA=se,TA=AA,RA=oA,SA=pA,wA=TypeError,DA=function(e,t){this.stopped=e,this.result=t},IA=DA.prototype,CA=function(e,t,n){var r,i,o,a,s,u,c,l=n&&n.that,h=!(!n||!n.AS_ENTRIES),A=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),v=mA(t,l),p=function(e){return r&&SA(r,"normal",e),new DA(!0,e)},m=function(e){return h?(gA(e),f?v(e[0],e[1],p):v(e[0],e[1])):f?v(e,p):v(e)};if(A)r=e.iterator;else if(d)r=e;else{if(!(i=RA(e)))throw wA(_A(e)+" is not iterable");if(bA(i)){for(o=0,a=EA(e);a>o;o++)if((s=m(e[o]))&&kA(IA,s))return s;return new DA(!1)}r=TA(e,i)}for(u=A?e.next:r.next;!(c=yA(u,r)).done;){try{s=m(c.value)}catch(_6){SA(r,"throw",_6)}if("object"==typeof s&&s&&kA(IA,s))return s}return new DA(!1)},LA=Qr,VA=In,xA=se,FA=Tu,GA=Ku,OA=function(e,t,n){for(var r=Fh(t),i=Oh.f,o=Gh.f,a=0;a<r.length;a++){var s=r[a];xh(e,s)||n&&xh(n,s)||i(e,s,o(t,s))}},ZA=Pi,PA=mn,UA=U,NA=function(e,t){Zh(t)&&"cause"in t&&Ph(e,"cause",t.cause)},BA=function(e,t,n,r){Hh&&(Jh?Jh(e,t):Qh(e,"stack",jh(n,r)))},MA=CA,WA=function(e,t){return void 0===e?arguments.length<2?"":t:LA(e)},YA=At("toStringTag"),XA=Error,QA=[].push,jA=function(e,t){var n,r=xA(HA,this);GA?n=GA(XA(),r?FA(this):HA):(n=r?this:ZA(HA),PA(n,YA,"Error")),void 0!==t&&PA(n,"message",WA(t)),BA(n,jA,n.stack,1),arguments.length>2&&NA(n,arguments[2]);var i=[];return MA(e,QA,{that:i}),PA(n,"errors",i),n};GA?GA(jA,XA):OA(jA,XA,{name:!0});var HA=jA.prototype=ZA(XA.prototype,{constructor:UA(1,jA),message:UA(1,""),name:UA(1,"AggregateError")});VA({global:!0,constructor:!0,arity:2},{AggregateError:jA});var JA,KA,zA,qA,$A="undefined"!=typeof process&&"process"==_(process),ed=ae,td=io,nd=I,rd=At("species"),id=function(e){var t=ed(e);nd&&t&&!t[rd]&&td(t,rd,{configurable:!0,get:function(){return this}})},od=se,ad=TypeError,sd=function(e,t){if(od(t,e))return e;throw ad("Incorrect invocation")},ud=yr,cd=we,ld=TypeError,hd=function(e){if(ud(e))return e;throw ld(cd(e)+" is not a constructor")},Ad=nn,dd=hd,fd=X,vd=At("species"),pd=function(e,t){var n,r=Ad(e).constructor;return void 0===r||fd(n=Ad(r)[vd])?t:dd(n)},md=TypeError,yd=function(e,t){if(e<t)throw md("Not enough arguments");return e},gd=/(?:ipad|iphone|ipod).*applewebkit/i.test(ue),_d=i,bd=h,Ed=Kt,kd=w,Td=qe,Rd=o,Sd=bi,wd=ks,Dd=St,Id=yd,Cd=gd,Ld=$A,Vd=_d.setImmediate,xd=_d.clearImmediate,Fd=_d.process,Gd=_d.Dispatch,Od=_d.Function,Zd=_d.MessageChannel,Pd=_d.String,Ud=0,Nd={},Bd="onreadystatechange";Rd((function(){JA=_d.location}));var Md=function(e){if(Td(Nd,e)){var t=Nd[e];delete Nd[e],t()}},Wd=function(e){return function(){Md(e)}},Yd=function(e){Md(e.data)},Xd=function(e){_d.postMessage(Pd(e),JA.protocol+"//"+JA.host)};Vd&&xd||(Vd=function(e){Id(arguments.length,1);var t=kd(e)?e:Od(e),n=wd(arguments,1);return Nd[++Ud]=function(){bd(t,void 0,n)},KA(Ud),Ud},xd=function(e){delete Nd[e]},Ld?KA=function(e){Fd.nextTick(Wd(e))}:Gd&&Gd.now?KA=function(e){Gd.now(Wd(e))}:Zd&&!Cd?(qA=(zA=new Zd).port2,zA.port1.onmessage=Yd,KA=Ed(qA.postMessage,qA)):_d.addEventListener&&kd(_d.postMessage)&&!_d.importScripts&&JA&&"file:"!==JA.protocol&&!Rd(Xd)?(KA=Xd,_d.addEventListener("message",Yd,!1)):KA=Bd in Dd("script")?function(e){Sd.appendChild(Dd("script"))[Bd]=function(){Sd.removeChild(this),Md(e)}}:function(e){setTimeout(Wd(e),0)});var Qd={set:Vd,clear:xd},jd=function(){this.head=null,this.tail=null};jd.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.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 Hd,Jd,Kd,zd,qd,$d=jd,ef=/ipad|iphone|ipod/i.test(ue)&&"undefined"!=typeof Pebble,tf=/web0s(?!.*chrome)/i.test(ue),nf=i,rf=Kt,of=D.f,af=Qd.set,sf=$d,uf=gd,cf=ef,lf=tf,hf=$A,Af=nf.MutationObserver||nf.WebKitMutationObserver,df=nf.document,ff=nf.process,vf=nf.Promise,pf=of(nf,"queueMicrotask"),mf=pf&&pf.value;if(!mf){var yf=new sf,gf=function(){var e,t;for(hf&&(e=ff.domain)&&e.exit();t=yf.get();)try{t()}catch(_6){throw yf.head&&Hd(),_6}e&&e.enter()};uf||hf||lf||!Af||!df?!cf&&vf&&vf.resolve?((zd=vf.resolve(void 0)).constructor=vf,qd=rf(zd.then,zd),Hd=function(){qd(gf)}):hf?Hd=function(){ff.nextTick(gf)}:(af=rf(af,nf),Hd=function(){af(gf)}):(Jd=!0,Kd=df.createTextNode(""),new Af(gf).observe(Kd,{characterData:!0}),Hd=function(){Kd.data=Jd=!Jd}),mf=function(e){yf.head||Hd(),yf.add(e)}}var _f=mf,bf=function(e){try{return{error:!1,value:e()}}catch(_6){return{error:!0,value:_6}}},Ef=i.Promise,kf="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Tf=!kf&&!$A&&"object"==typeof window&&"object"==typeof document,Rf=i,Sf=Ef,wf=w,Df=Qt,If=ir,Cf=At,Lf=Tf,Vf=kf,xf=ve,Ff=Sf&&Sf.prototype,Gf=Cf("species"),Of=!1,Zf=wf(Rf.PromiseRejectionEvent),Pf={CONSTRUCTOR:Df("Promise",(function(){var e=If(Sf),t=e!==String(Sf);if(!t&&66===xf)return!0;if(!Ff.catch||!Ff.finally)return!0;if(!xf||xf<51||!/native code/.test(e)){var n=new Sf((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Gf]=r,!(Of=n.then((function(){}))instanceof r))return!0}return!t&&(Lf||Vf)&&!Zf})),REJECTION_EVENT:Zf,SUBCLASSING:Of},Uf={},Nf=Le,Bf=TypeError,Mf=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Bf("Bad Promise constructor");t=e,n=r})),this.resolve=Nf(t),this.reject=Nf(n)};Uf.f=function(e){return new Mf(e)};var Wf,Yf,Xf=In,Qf=$A,jf=i,Hf=V,Jf=no,Kf=Io,zf=id,qf=Le,$f=w,ev=ee,tv=sd,nv=pd,rv=Qd.set,iv=_f,ov=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(_6){}},av=bf,sv=$d,uv=Xo,cv=Ef,lv=Pf,hv=Uf,Av="Promise",dv=lv.CONSTRUCTOR,fv=lv.REJECTION_EVENT,vv=uv.getterFor(Av),pv=uv.set,mv=cv&&cv.prototype,yv=cv,gv=mv,_v=jf.TypeError,bv=jf.document,Ev=jf.process,kv=hv.f,Tv=kv,Rv=!!(bv&&bv.createEvent&&jf.dispatchEvent),Sv="unhandledrejection",wv=function(e){var t;return!(!ev(e)||!$f(t=e.then))&&t},Dv=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&xv(t),t.rejection=1),!0===s?n=o:(l&&l.enter(),n=s(o),l&&(l.exit(),i=!0)),n===e.promise?c(_v("Promise-chain cycle")):(r=wv(n))?Hf(r,n,u,c):u(n)):c(o)}catch(_6){l&&!i&&l.exit(),c(_6)}},Iv=function(e,t){e.notified||(e.notified=!0,iv((function(){for(var n,r=e.reactions;n=r.get();)Dv(n,e);e.notified=!1,t&&!e.rejection&&Lv(e)})))},Cv=function(e,t,n){var r,i;Rv?((r=bv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),jf.dispatchEvent(r)):r={promise:t,reason:n},!fv&&(i=jf["on"+e])?i(r):e===Sv&&ov("Unhandled promise rejection",n)},Lv=function(e){Hf(rv,jf,(function(){var t,n=e.facade,r=e.value;if(Vv(e)&&(t=av((function(){Qf?Ev.emit("unhandledRejection",r,n):Cv(Sv,n,r)})),e.rejection=Qf||Vv(e)?2:1,t.error))throw t.value}))},Vv=function(e){return 1!==e.rejection&&!e.parent},xv=function(e){Hf(rv,jf,(function(){var t=e.facade;Qf?Ev.emit("rejectionHandled",t):Cv("rejectionhandled",t,e.value)}))},Fv=function(e,t,n){return function(r){e(t,r,n)}},Gv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Iv(e,!0))},Ov=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw _v("Promise can't be resolved itself");var r=wv(t);r?iv((function(){var n={done:!1};try{Hf(r,t,Fv(Ov,n,e),Fv(Gv,n,e))}catch(_6){Gv(n,_6,e)}})):(e.value=t,e.state=1,Iv(e,!1))}catch(_6){Gv({done:!1},_6,e)}}};dv&&(gv=(yv=function(e){tv(this,gv),qf(e),Hf(Wf,this);var t=vv(this);try{e(Fv(Ov,t),Fv(Gv,t))}catch(_6){Gv(t,_6)}}).prototype,(Wf=function(e){pv(this,{type:Av,done:!1,notified:!1,parent:!1,reactions:new sv,rejection:!1,state:0,value:void 0})}).prototype=Jf(gv,"then",(function(e,t){var n=vv(this),r=kv(nv(this,yv));return n.parent=!0,r.ok=!$f(e)||e,r.fail=$f(t)&&t,r.domain=Qf?Ev.domain:void 0,0==n.state?n.reactions.add(r):iv((function(){Dv(r,n)})),r.promise})),Yf=function(){var e=new Wf,t=vv(e);this.promise=e,this.resolve=Fv(Ov,t),this.reject=Fv(Gv,t)},hv.f=kv=function(e){return e===yv||undefined===e?new Yf(e):Tv(e)}),Xf({global:!0,constructor:!0,wrap:!0,forced:dv},{Promise:yv}),Kf(yv,Av,!1,!0),zf(Av);var Zv=At("iterator"),Pv=!1;try{var Uv=0,Nv={next:function(){return{done:!!Uv++}},return:function(){Pv=!0}};Nv[Zv]=function(){return this},Array.from(Nv,(function(){throw 2}))}catch(_6){}var Bv=function(e,t){if(!t&&!Pv)return!1;var n=!1;try{var r={};r[Zv]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(_6){}return n},Mv=Ef,Wv=Pf.CONSTRUCTOR||!Bv((function(e){Mv.all(e).then(void 0,(function(){}))})),Yv=V,Xv=Le,Qv=Uf,jv=bf,Hv=CA;In({target:"Promise",stat:!0,forced:Wv},{all:function(e){var t=this,n=Qv.f(t),r=n.resolve,i=n.reject,o=jv((function(){var n=Xv(t.resolve),o=[],a=0,s=1;Hv(e,(function(e){var u=a++,c=!1;s++,Yv(n,t,e).then((function(e){c||(c=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Jv=In,Kv=Pf.CONSTRUCTOR;Ef&&Ef.prototype,Jv({target:"Promise",proto:!0,forced:Kv,real:!0},{catch:function(e){return this.then(void 0,e)}});var zv=V,qv=Le,$v=Uf,ep=bf,tp=CA;In({target:"Promise",stat:!0,forced:Wv},{race:function(e){var t=this,n=$v.f(t),r=n.reject,i=ep((function(){var i=qv(t.resolve);tp(e,(function(e){zv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var np=V,rp=Uf;In({target:"Promise",stat:!0,forced:Pf.CONSTRUCTOR},{reject:function(e){var t=rp.f(this);return np(t.reject,void 0,e),t.promise}});var ip=nn,op=ee,ap=Uf,sp=function(e,t){if(ip(e),op(t)&&t.constructor===e)return t;var n=ap.f(e);return(0,n.resolve)(t),n.promise},up=In,cp=Ef,lp=Pf.CONSTRUCTOR,hp=sp,Ap=ae("Promise"),dp=!lp;up({target:"Promise",stat:!0,forced:true},{resolve:function(e){return hp(dp&&this===Ap?cp:this,e)}});var fp=V,vp=Le,pp=Uf,mp=bf,yp=CA;In({target:"Promise",stat:!0,forced:Wv},{allSettled:function(e){var t=this,n=pp.f(t),r=n.resolve,i=n.reject,o=mp((function(){var n=vp(t.resolve),i=[],o=0,a=1;yp(e,(function(e){var s=o++,u=!1;a++,fp(n,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var gp=V,_p=Le,bp=ae,Ep=Uf,kp=bf,Tp=CA,Rp="No one promise resolved";In({target:"Promise",stat:!0,forced:Wv},{any:function(e){var t=this,n=bp("AggregateError"),r=Ep.f(t),i=r.resolve,o=r.reject,a=kp((function(){var r=_p(t.resolve),a=[],s=0,u=1,c=!1;Tp(e,(function(e){var l=s++,h=!1;u++,gp(r,t,e).then((function(e){h||c||(c=!0,i(e))}),(function(e){h||c||(h=!0,a[l]=e,--u||o(new n(a,Rp)))}))})),--u||o(new n(a,Rp))}));return a.error&&o(a.value),r.promise}});var Sp=In,wp=Ef,Dp=o,Ip=ae,Cp=w,Lp=pd,Vp=sp,xp=wp&&wp.prototype;Sp({target:"Promise",proto:!0,real:!0,forced:!!wp&&Dp((function(){xp.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Lp(this,Ip("Promise")),n=Cp(e);return this.then(n?function(n){return Vp(t,e()).then((function(){return n}))}:e,n?function(n){return Vp(t,e()).then((function(){throw n}))}:e)}});var Fp=te.Promise,Gp=Uf,Op=bf;In({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Gp.f(this),n=Op(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Zp=n(Fp),Pp=In,Up=Ln,Np=p([].reverse),Bp=[1,2];Pp({target:"Array",proto:!0,forced:String(Bp)===String(Bp.reverse())},{reverse:function(){return Up(this)&&(this.length=this.length),Np(this)}});var Mp=wl("Array").reverse,Wp=se,Yp=Mp,Xp=Array.prototype,Qp=n((function(e){var t=e.reverse;return e===Xp||Wp(Xp,e)&&t===Xp.reverse?Yp:t})),jp=In,Hp=Ln,Jp=yr,Kp=ee,zp=zr,qp=Un,$p=z,em=Xn,tm=At,nm=ks,rm=Ir("slice"),im=tm("species"),om=Array,am=Math.max;jp({target:"Array",proto:!0,forced:!rm},{slice:function(e,t){var n,r,i,o=$p(this),a=qp(o),s=zp(e,a),u=zp(void 0===t?a:t,a);if(Hp(o)&&(n=o.constructor,(Jp(n)&&(n===om||Hp(n.prototype))||Kp(n)&&null===(n=n[im]))&&(n=void 0),n===om||void 0===n))return nm(o,s,u);for(r=new(void 0===n?om:n)(am(u-s,0)),i=0;s<u;s++,i++)s in o&&em(r,i,o[s]);return r.length=i,r}});var sm=wl("Array").slice,um=se,cm=sm,lm=Array.prototype,hm=n((function(e){var t=e.slice;return e===lm||um(lm,e)&&t===lm.slice?cm:t})),Am=p,dm=Le,fm=ee,vm=qe,pm=ks,mm=a,ym=Function,gm=Am([].concat),_m=Am([].join),bm={},Em=mm?ym.bind:function(e){var t=dm(this),n=t.prototype,r=pm(arguments,1),i=function(){var n=gm(r,pm(arguments));return this instanceof i?function(e,t,n){if(!vm(bm,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";bm[t]=ym("C,a","return new C("+_m(r,",")+")")}return bm[t](e,n)}(t,n.length,n):t.apply(e,n)};return fm(n)&&(i.prototype=n),i},km=Em;In({target:"Function",proto:!0,forced:Function.bind!==km},{bind:km});var Tm=wl("Function").bind,Rm=se,Sm=Tm,wm=Function.prototype,Dm=n((function(e){var t=e.bind;return e===wm||Rm(wm,e)&&t===wm.bind?Sm:t})),Im=In,Cm=h,Lm=Em,Vm=hd,xm=nn,Fm=ee,Gm=Pi,Om=o,Zm=ae("Reflect","construct"),Pm=Object.prototype,Um=[].push,Nm=Om((function(){function e(){}return!(Zm((function(){}),[],e)instanceof e)})),Bm=!Om((function(){Zm((function(){}))})),Mm=Nm||Bm;Im({target:"Reflect",stat:!0,forced:Mm,sham:Mm},{construct:function(e,t){Vm(e),xm(t);var n=arguments.length<3?e:Vm(arguments[2]);if(Bm&&!Nm)return Zm(e,t,n);if(e==n){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 r=[null];return Cm(Um,r,t),new(Cm(Lm,e,r))}var i=n.prototype,o=Gm(Fm(i)?i:Pm),a=Cm(e,o,t);return Fm(a)?a:o}});var Wm=n(te.Reflect.construct),Ym=qe,Xm=V,Qm=ee,jm=nn,Hm=function(e){return void 0!==e&&(Ym(e,"value")||Ym(e,"writable"))},Jm=D,Km=Tu;In({target:"Reflect",stat:!0},{get:function e(t,n){var r,i,o=arguments.length<3?t:arguments[2];return jm(t)===o?t[n]:(r=Jm.f(t,n))?Hm(r)?r.value:void 0===r.get?void 0:Xm(r.get,o):Qm(i=Km(t))?e(i,n,o):void 0}});var zm=n(te.Reflect.get);In({target:"Array",stat:!0},{isArray:Ln});var qm=n(te.Array.isArray),$m=n(oA),ey=nn,ty=pA,ny=Kt,ry=V,iy=Je,oy=function(e,t,n,r){try{return r?t(ey(n)[0],n[1]):t(n)}catch(_6){ty(e,"throw",_6)}},ay=$h,sy=yr,uy=Un,cy=Xn,ly=AA,hy=oA,Ay=Array,dy=function(e){var t=iy(e),n=sy(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ny(i,r>2?arguments[2]:void 0));var a,s,u,c,l,h,A=hy(t),d=0;if(!A||this===Ay&&ay(A))for(a=uy(t),s=n?new this(a):Ay(a);a>d;d++)h=o?i(t[d],d):t[d],cy(s,d,h);else for(l=(c=ly(t,A)).next,s=n?new this:[];!(u=ry(l,c)).done;d++)h=o?oy(c,i,[u.value,d],!0):u.value,cy(s,d,h);return s.length=d,s},fy=dy;In({target:"Array",stat:!0,forced:!Bv((function(e){Array.from(e)}))},{from:fy});var vy=n(te.Array.from);function py(e,t){var n=kl(e);if(Tl){var r=Tl(e);t&&(r=Vl(r).call(r,(function(t){return Bl(e,t).enumerable}))),n.push.apply(n,r)}return n}function my(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?$l(n=py(Object(i),!0)).call(n,(function(t){Ty(e,t,i[t])})):lh?mh(e,lh(i)):$l(r=py(Object(i))).call(r,(function(t){Th(e,t,Bl(i,t))}))}return e}function yy(){yy=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Th||function(e,t,n){e[t]=n.value},i="function"==typeof Rh?Rh:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Th(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(w){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof A?t:A,a=wh(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:_(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(w){return{type:"throw",arg:w}}}e.wrap=c;var h={};function A(){}function d(){}function f(){}var v={};u(v,o,(function(){return this}));var p=Lh&&Lh(Lh(R([])));p&&p!==t&&n.call(p,o)&&(v=p);var m=f.prototype=A.prototype=wh(v);function y(e){var t;$l(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function i(r,o,a,s){var u=l(e[r],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==_l(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function _(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],$l(e).call(e,E,this),this.reset(!0)}function R(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=f,r(m,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:d,configurable:!0}),d.displayName=u(f,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 Vh?Vh(e,f):(e.__proto__=f,u(e,s,"GeneratorFunction")),e.prototype=wh(m),e},e.awrap=function(e){return{__await:e}},y(g.prototype),u(g.prototype,a,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,i,o){void 0===o&&(o=Zp);var a=new g(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return Qp(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=R,T.prototype={constructor:T,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,$l(t=this.tryEntries).call(t,k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+hm(r).call(r,1))&&(this[r]=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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function gy(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(_6){return void n(_6)}s.done?t(u):Zp.resolve(u).then(r,i)}function _y(e){return function(){var t=this,n=arguments;return new Zp((function(r,i){var o=e.apply(t,n);function a(e){gy(o,r,i,a,s,"next",e)}function s(e){gy(o,r,i,a,s,"throw",e)}a(void 0)}))}}function by(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ey(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Th(e,r.key,r)}}function ky(e,t,n){return t&&Ey(e.prototype,t),n&&Ey(e,n),Th(e,"prototype",{writable:!1}),e}function Ty(e,t,n){return t in e?Th(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ry(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=wh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Th(e,"prototype",{writable:!1}),t&&wy(e,t)}function Sy(e){var t;return(Sy=Vh?Dm(t=Lh).call(t):function(e){return e.__proto__||Lh(e)})(e)}function wy(e,t){var n;return(wy=Vh?Dm(n=Vh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function Dy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Iy(e){var t=function(){if("undefined"==typeof Reflect||!Wm)return!1;if(Wm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Wm(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sy(e);if(t){var i=Sy(this).constructor;n=Wm(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Dy(e)}(this,n)}}function Cy(){var e;"undefined"!=typeof Reflect&&zm?Cy=Dm(e=zm).call(e):Cy=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Sy(e)););return e}(e,t);if(r){var i=Bl(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}};return Cy.apply(this,arguments)}function Ly(e,t){return function(e){if(qm(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Rh&&$m(e)||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||xy(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 Vy(e){return function(e){if(qm(e))return Fy(e)}(e)||function(e){if(void 0!==Rh&&null!=$m(e)||null!=e["@@iterator"])return vy(e)}(e)||xy(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 xy(e,t){var n;if(e){if("string"==typeof e)return Fy(e,t);var r=hm(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?vy(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fy(e,t):void 0}}function Fy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Gy=In,Oy=o,Zy=Mi.f;Gy({target:"Object",stat:!0,forced:Oy((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:Zy});var Py=te.Object,Uy=n((function(e){return Py.getOwnPropertyNames(e)})),Ny="\t\n\v\f\r                 \u2028\u2029\ufeff",By=H,My=Qr,Wy=Ny,Yy=p("".replace),Xy=RegExp("^["+Wy+"]+"),Qy=RegExp("(^|[^"+Wy+"])["+Wy+"]+$"),jy=function(e){return function(t){var n=My(By(t));return 1&e&&(n=Yy(n,Xy,"")),2&e&&(n=Yy(n,Qy,"$1")),n}},Hy={start:jy(1),end:jy(2),trim:jy(3)},Jy=i,Ky=o,zy=p,qy=Qr,$y=Hy.trim,eg=Ny,tg=Jy.parseInt,ng=Jy.Symbol,rg=ng&&ng.iterator,ig=/^[+-]?0x/i,og=zy(ig.exec),ag=8!==tg(eg+"08")||22!==tg(eg+"0x16")||rg&&!Ky((function(){tg(Object(rg))}))?function(e,t){var n=$y(qy(e));return tg(n,t>>>0||(og(ig,n)?16:10))}:tg;In({global:!0,forced:parseInt!=ag},{parseInt:ag});var sg,ug=n(te.parseInt),cg=wl("Array").concat,lg=se,hg=cg,Ag=Array.prototype,dg=n((function(e){var t=e.concat;return e===Ag||lg(Ag,e)&&t===Ag.concat?hg:t})),fg="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,vg=i,pg=h,mg=w,yg=fg,gg=ue,_g=ks,bg=yd,Eg=vg.Function,kg=/MSIE .\./.test(gg)||yg&&((sg=vg.Bun.version.split(".")).length<3||0==sg[0]&&(sg[1]<3||3==sg[1]&&0==sg[2])),Tg=function(e,t){var n=t?2:1;return kg?function(r,i){var o=bg(arguments.length,1)>n,a=mg(r)?r:Eg(r),s=o?_g(arguments,n):[],u=o?function(){pg(a,this,s)}:a;return t?e(u,i):e(u)}:e},Rg=In,Sg=i,wg=Tg(Sg.setInterval,!0);Rg({global:!0,bind:!0,forced:Sg.setInterval!==wg},{setInterval:wg});var Dg=In,Ig=i,Cg=Tg(Ig.setTimeout,!0);Dg({global:!0,bind:!0,forced:Ig.setTimeout!==Cg},{setTimeout:Cg});var Lg=n(te.setTimeout),Vg=i,xg=o,Fg=Qr,Gg=Hy.trim,Og=Ny,Zg=p("".charAt),Pg=Vg.parseFloat,Ug=Vg.Symbol,Ng=Ug&&Ug.iterator,Bg=1/Pg(Og+"-0")!=-1/0||Ng&&!xg((function(){Pg(Object(Ng))}))?function(e){var t=Gg(Fg(e)),n=Pg(t);return 0===n&&"-"==Zg(t,0)?-0:n}:Pg;In({global:!0,forced:parseFloat!=Bg},{parseFloat:Bg});var Mg=n(te.parseFloat),Wg=Bg;In({target:"Number",stat:!0,forced:Number.parseFloat!=Wg},{parseFloat:Wg});var Yg=n(te.Number.parseFloat);In({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Xg=n(te.Number.isNaN),Qg=$o.map;In({target:"Array",proto:!0,forced:!Ir("map")},{map:function(e){return Qg(this,e,arguments.length>1?arguments[1]:void 0)}});var jg=wl("Array").map,Hg=se,Jg=jg,Kg=Array.prototype,zg=n((function(e){var t=e.map;return e===Kg||Hg(Kg,e)&&t===Kg.map?Jg:t})),qg=Je,$g=zr,e_=Un,t_=function(e){for(var t=qg(this),n=e_(t),r=arguments.length,i=$g(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:$g(o,n);a>i;)t[i++]=e;return t};In({target:"Array",proto:!0},{fill:t_});var n_=wl("Array").fill,r_=se,i_=n_,o_=Array.prototype,a_=n((function(e){var t=e.fill;return e===o_||r_(o_,e)&&t===o_.fill?i_:t})),s_=function(e){return e&&e.Math==Math&&e},u_=s_("object"==typeof globalThis&&globalThis)||s_("object"==typeof window&&window)||s_("object"==typeof self&&self)||s_("object"==typeof t&&t)||function(){return this}()||Function("return this")(),c_={exports:{}},l_=u_,h_=Object.defineProperty,A_=function(e,t){try{h_(l_,e,{value:t,configurable:!0,writable:!0})}catch(_6){l_[e]=t}return t},d_=A_,f_="__core-js_shared__",v_=u_[f_]||d_(f_,{}),p_=v_;(c_.exports=function(e,t){return p_[e]||(p_[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var m_,y_,g_=c_.exports,__=function(e){try{return!!e()}catch(_6){return!0}},b_=!__((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),E_=b_,k_=Function.prototype,T_=k_.call,R_=E_&&k_.bind.bind(T_,T_),S_=E_?R_:function(e){return function(){return T_.apply(e,arguments)}},w_=function(e){return null==e},D_=w_,I_=TypeError,C_=function(e){if(D_(e))throw I_("Can't call method on "+e);return e},L_=C_,V_=Object,x_=function(e){return V_(L_(e))},F_=x_,G_=S_({}.hasOwnProperty),O_=Object.hasOwn||function(e,t){return G_(F_(e),t)},Z_=S_,P_=0,U_=Math.random(),N_=Z_(1..toString),B_=function(e){return"Symbol("+(void 0===e?"":e)+")_"+N_(++P_+U_,36)},M_="object"==typeof document&&document.all,W_={all:M_,IS_HTMLDDA:void 0===M_&&void 0!==M_},Y_=W_.all,X_=W_.IS_HTMLDDA?function(e){return"function"==typeof e||e===Y_}:function(e){return"function"==typeof e},Q_=u_,j_=X_,H_=function(e,t){return arguments.length<2?(n=Q_[e],j_(n)?n:void 0):Q_[e]&&Q_[e][t];var n},J_=H_("navigator","userAgent")||"",K_=u_,z_=J_,q_=K_.process,$_=K_.Deno,eb=q_&&q_.versions||$_&&$_.version,tb=eb&&eb.v8;tb&&(y_=(m_=tb.split("."))[0]>0&&m_[0]<4?1:+(m_[0]+m_[1])),!y_&&z_&&(!(m_=z_.match(/Edge\/(\d+)/))||m_[1]>=74)&&(m_=z_.match(/Chrome\/(\d+)/))&&(y_=+m_[1]);var nb=y_,rb=nb,ib=__,ob=!!Object.getOwnPropertySymbols&&!ib((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&rb&&rb<41})),ab=ob&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,sb=u_,ub=O_,cb=B_,lb=ob,hb=ab,Ab=g_("wks"),db=sb.Symbol,fb=db&&db.for,vb=hb?db:db&&db.withoutSetter||cb,pb=function(e){if(!ub(Ab,e)||!lb&&"string"!=typeof Ab[e]){var t="Symbol."+e;lb&&ub(db,e)?Ab[e]=db[e]:Ab[e]=hb&&fb?fb(t):vb(t)}return Ab[e]},mb={};mb[pb("toStringTag")]="z";var yb="[object z]"===String(mb),gb={},_b=!__((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),bb=X_,Eb=W_.all,kb=W_.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:bb(e)||e===Eb}:function(e){return"object"==typeof e?null!==e:bb(e)},Tb=kb,Rb=u_.document,Sb=Tb(Rb)&&Tb(Rb.createElement),wb=function(e){return Sb?Rb.createElement(e):{}},Db=wb,Ib=!_b&&!__((function(){return 7!=Object.defineProperty(Db("div"),"a",{get:function(){return 7}}).a})),Cb=_b&&__((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Lb=kb,Vb=String,xb=TypeError,Fb=function(e){if(Lb(e))return e;throw xb(Vb(e)+" is not an object")},Gb=b_,Ob=Function.prototype.call,Zb=Gb?Ob.bind(Ob):function(){return Ob.apply(Ob,arguments)},Pb=S_({}.isPrototypeOf),Ub=H_,Nb=X_,Bb=Pb,Mb=Object,Wb=ab?function(e){return"symbol"==typeof e}:function(e){var t=Ub("Symbol");return Nb(t)&&Bb(t.prototype,Mb(e))},Yb=String,Xb=function(e){try{return Yb(e)}catch(_6){return"Object"}},Qb=X_,jb=Xb,Hb=TypeError,Jb=function(e){if(Qb(e))return e;throw Hb(jb(e)+" is not a function")},Kb=Jb,zb=w_,qb=function(e,t){var n=e[t];return zb(n)?void 0:Kb(n)},$b=Zb,eE=X_,tE=kb,nE=TypeError,rE=Zb,iE=kb,oE=Wb,aE=qb,sE=function(e,t){var n,r;if("string"===t&&eE(n=e.toString)&&!tE(r=$b(n,e)))return r;if(eE(n=e.valueOf)&&!tE(r=$b(n,e)))return r;if("string"!==t&&eE(n=e.toString)&&!tE(r=$b(n,e)))return r;throw nE("Can't convert object to primitive value")},uE=TypeError,cE=pb("toPrimitive"),lE=function(e,t){if(!iE(e)||oE(e))return e;var n,r=aE(e,cE);if(r){if(void 0===t&&(t="default"),n=rE(r,e,t),!iE(n)||oE(n))return n;throw uE("Can't convert object to primitive value")}return void 0===t&&(t="number"),sE(e,t)},hE=lE,AE=Wb,dE=function(e){var t=hE(e,"string");return AE(t)?t:t+""},fE=_b,vE=Ib,pE=Cb,mE=Fb,yE=dE,gE=TypeError,_E=Object.defineProperty,bE=Object.getOwnPropertyDescriptor,EE="enumerable",kE="configurable",TE="writable";gb.f=fE?pE?function(e,t,n){if(mE(e),t=yE(t),mE(n),"function"==typeof e&&"prototype"===t&&"value"in n&&TE in n&&!n[TE]){var r=bE(e,t);r&&r[TE]&&(e[t]=n.value,n={configurable:kE in n?n[kE]:r[kE],enumerable:EE in n?n[EE]:r[EE],writable:!1})}return _E(e,t,n)}:_E:function(e,t,n){if(mE(e),t=yE(t),mE(n),vE)try{return _E(e,t,n)}catch(_6){}if("get"in n||"set"in n)throw gE("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var RE={exports:{}},SE=_b,wE=O_,DE=Function.prototype,IE=SE&&Object.getOwnPropertyDescriptor,CE=wE(DE,"name"),LE={EXISTS:CE,PROPER:CE&&"something"===function(){}.name,CONFIGURABLE:CE&&(!SE||SE&&IE(DE,"name").configurable)},VE=X_,xE=v_,FE=S_(Function.toString);VE(xE.inspectSource)||(xE.inspectSource=function(e){return FE(e)});var GE,OE,ZE,PE=xE.inspectSource,UE=X_,NE=u_.WeakMap,BE=UE(NE)&&/native code/.test(String(NE)),ME=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},WE=gb,YE=ME,XE=_b?function(e,t,n){return WE.f(e,t,YE(1,n))}:function(e,t,n){return e[t]=n,e},QE=B_,jE=g_("keys"),HE=function(e){return jE[e]||(jE[e]=QE(e))},JE={},KE=BE,zE=u_,qE=kb,$E=XE,ek=O_,tk=v_,nk=HE,rk=JE,ik="Object already initialized",ok=zE.TypeError,ak=zE.WeakMap;if(KE||tk.state){var sk=tk.state||(tk.state=new ak);sk.get=sk.get,sk.has=sk.has,sk.set=sk.set,GE=function(e,t){if(sk.has(e))throw ok(ik);return t.facade=e,sk.set(e,t),t},OE=function(e){return sk.get(e)||{}},ZE=function(e){return sk.has(e)}}else{var uk=nk("state");rk[uk]=!0,GE=function(e,t){if(ek(e,uk))throw ok(ik);return t.facade=e,$E(e,uk,t),t},OE=function(e){return ek(e,uk)?e[uk]:{}},ZE=function(e){return ek(e,uk)}}var ck={set:GE,get:OE,has:ZE,enforce:function(e){return ZE(e)?OE(e):GE(e,{})},getterFor:function(e){return function(t){var n;if(!qE(t)||(n=OE(t)).type!==e)throw ok("Incompatible receiver, "+e+" required");return n}}},lk=__,hk=X_,Ak=O_,dk=_b,fk=LE.CONFIGURABLE,vk=PE,pk=ck.enforce,mk=ck.get,yk=Object.defineProperty,gk=dk&&!lk((function(){return 8!==yk((function(){}),"length",{value:8}).length})),_k=String(String).split("String"),bk=RE.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Ak(e,"name")||fk&&e.name!==t)&&(dk?yk(e,"name",{value:t,configurable:!0}):e.name=t),gk&&n&&Ak(n,"arity")&&e.length!==n.arity&&yk(e,"length",{value:n.arity});try{n&&Ak(n,"constructor")&&n.constructor?dk&&yk(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(_6){}var r=pk(e);return Ak(r,"source")||(r.source=_k.join("string"==typeof t?t:"")),e};Function.prototype.toString=bk((function(){return hk(this)&&mk(this).source||vk(this)}),"toString");var Ek=RE.exports,kk=X_,Tk=gb,Rk=Ek,Sk=A_,wk=function(e,t,n,r){r||(r={});var i=r.enumerable,o=void 0!==r.name?r.name:t;if(kk(n)&&Rk(n,o,r),r.global)i?e[t]=n:Sk(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(_6){}i?e[t]=n:Tk.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Dk=S_,Ik=Dk({}.toString),Ck=Dk("".slice),Lk=function(e){return Ck(Ik(e),8,-1)},Vk=yb,xk=X_,Fk=Lk,Gk=pb("toStringTag"),Ok=Object,Zk="Arguments"==Fk(function(){return arguments}()),Pk=Vk?Fk:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(_6){}}(t=Ok(e),Gk))?n:Zk?Fk(t):"Object"==(r=Fk(t))&&xk(t.callee)?"Arguments":r},Uk=Pk,Nk=yb?{}.toString:function(){return"[object "+Uk(this)+"]"};yb||wk(Object.prototype,"toString",Nk,{unsafe:!0});var Bk={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},Mk=wb("span").classList,Wk=Mk&&Mk.constructor&&Mk.constructor.prototype,Yk=Wk===Object.prototype?void 0:Wk,Xk=Lk,Qk=S_,jk=function(e){if("Function"===Xk(e))return Qk(e)},Hk=Jb,Jk=b_,Kk=jk(jk.bind),zk=function(e,t){return Hk(e),void 0===t?e:Jk?Kk(e,t):function(){return e.apply(t,arguments)}},qk=__,$k=Lk,eT=Object,tT=S_("".split),nT=qk((function(){return!eT("z").propertyIsEnumerable(0)}))?function(e){return"String"==$k(e)?tT(e,""):eT(e)}:eT,rT=Math.ceil,iT=Math.floor,oT=Math.trunc||function(e){var t=+e;return(t>0?iT:rT)(t)},aT=function(e){var t=+e;return t!=t||0===t?0:oT(t)},sT=aT,uT=Math.min,cT=function(e){return e>0?uT(sT(e),9007199254740991):0},lT=cT,hT=function(e){return lT(e.length)},AT=Lk,dT=Array.isArray||function(e){return"Array"==AT(e)},fT=S_,vT=__,pT=X_,mT=Pk,yT=PE,gT=function(){},_T=[],bT=H_("Reflect","construct"),ET=/^\s*(?:class|function)\b/,kT=fT(ET.exec),TT=!ET.exec(gT),RT=function(e){if(!pT(e))return!1;try{return bT(gT,_T,e),!0}catch(_6){return!1}},ST=function(e){if(!pT(e))return!1;switch(mT(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return TT||!!kT(ET,yT(e))}catch(_6){return!0}};ST.sham=!0;var wT=!bT||vT((function(){var e;return RT(RT.call)||!RT(Object)||!RT((function(){e=!0}))||e}))?ST:RT,DT=dT,IT=wT,CT=kb,LT=pb("species"),VT=Array,xT=function(e){var t;return DT(e)&&(t=e.constructor,(IT(t)&&(t===VT||DT(t.prototype))||CT(t)&&null===(t=t[LT]))&&(t=void 0)),void 0===t?VT:t},FT=function(e,t){return new(xT(e))(0===t?0:t)},GT=zk,OT=nT,ZT=x_,PT=hT,UT=FT,NT=S_([].push),BT=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,c,l,h){for(var A,d,f=ZT(u),v=OT(f),p=GT(c,l),m=PT(v),y=0,g=h||UT,_=t?g(u,m):n||a?g(u,0):void 0;m>y;y++)if((s||y in v)&&(d=p(A=v[y],y,f),e))if(t)_[y]=d;else if(d)switch(e){case 3:return!0;case 5:return A;case 6:return y;case 2:NT(_,A)}else switch(e){case 4:return!1;case 7:NT(_,A)}return o?-1:r||i?i:_}},MT={forEach:BT(0),map:BT(1),filter:BT(2),some:BT(3),every:BT(4),find:BT(5),findIndex:BT(6),filterReject:BT(7)},WT=__,YT=function(e,t){var n=[][e];return!!n&&WT((function(){n.call(null,t||function(){return 1},1)}))},XT=MT.forEach,QT=YT("forEach")?[].forEach:function(e){return XT(this,e,arguments.length>1?arguments[1]:void 0)},jT=u_,HT=Bk,JT=Yk,KT=QT,zT=XE,qT=function(e){if(e&&e.forEach!==KT)try{zT(e,"forEach",KT)}catch(_6){e.forEach=KT}};for(var $T in HT)HT[$T]&&qT(jT[$T]&&jT[$T].prototype);qT(JT);var eR={},tR={},nR={}.propertyIsEnumerable,rR=Object.getOwnPropertyDescriptor,iR=rR&&!nR.call({1:2},1);tR.f=iR?function(e){var t=rR(this,e);return!!t&&t.enumerable}:nR;var oR=nT,aR=C_,sR=function(e){return oR(aR(e))},uR=_b,cR=Zb,lR=tR,hR=ME,AR=sR,dR=dE,fR=O_,vR=Ib,pR=Object.getOwnPropertyDescriptor;eR.f=uR?pR:function(e,t){if(e=AR(e),t=dR(t),vR)try{return pR(e,t)}catch(_6){}if(fR(e,t))return hR(!cR(lR.f,e,t),e[t])};var mR={},yR=aT,gR=Math.max,_R=Math.min,bR=function(e,t){var n=yR(e);return n<0?gR(n+t,0):_R(n,t)},ER=sR,kR=bR,TR=hT,RR=function(e){return function(t,n,r){var i,o=ER(t),a=TR(o),s=kR(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},SR={includes:RR(!0),indexOf:RR(!1)},wR=O_,DR=sR,IR=SR.indexOf,CR=JE,LR=S_([].push),VR=function(e,t){var n,r=DR(e),i=0,o=[];for(n in r)!wR(CR,n)&&wR(r,n)&&LR(o,n);for(;t.length>i;)wR(r,n=t[i++])&&(~IR(o,n)||LR(o,n));return o},xR=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],FR=VR,GR=xR.concat("length","prototype");mR.f=Object.getOwnPropertyNames||function(e){return FR(e,GR)};var OR={};OR.f=Object.getOwnPropertySymbols;var ZR=H_,PR=mR,UR=OR,NR=Fb,BR=S_([].concat),MR=ZR("Reflect","ownKeys")||function(e){var t=PR.f(NR(e)),n=UR.f;return n?BR(t,n(e)):t},WR=O_,YR=MR,XR=eR,QR=gb,jR=__,HR=X_,JR=/#|\.prototype\./,KR=function(e,t){var n=qR[zR(e)];return n==eS||n!=$R&&(HR(t)?jR(t):!!t)},zR=KR.normalize=function(e){return String(e).replace(JR,".").toLowerCase()},qR=KR.data={},$R=KR.NATIVE="N",eS=KR.POLYFILL="P",tS=KR,nS=u_,rS=eR.f,iS=XE,oS=wk,aS=A_,sS=function(e,t,n){for(var r=YR(t),i=QR.f,o=XR.f,a=0;a<r.length;a++){var s=r[a];WR(e,s)||n&&WR(n,s)||i(e,s,o(t,s))}},uS=tS,cS=function(e,t){var n,r,i,o,a,s=e.target,u=e.global,c=e.stat;if(n=u?nS:c?nS[s]||aS(s,{}):(nS[s]||{}).prototype)for(r in t){if(o=t[r],i=e.dontCallGetSet?(a=rS(n,r))&&a.value:n[r],!uS(u?r:s+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;sS(o,i)}(e.sham||i&&i.sham)&&iS(o,"sham",!0),oS(n,r,o,e)}},lS={},hS=dE,AS=gb,dS=ME,fS=function(e,t,n){var r=hS(t);r in e?AS.f(e,r,dS(0,n)):e[r]=n},vS=bR,pS=hT,mS=fS,yS=Array,gS=Math.max,_S=function(e,t,n){for(var r=pS(e),i=vS(t,r),o=vS(void 0===n?r:n,r),a=yS(gS(o-i,0)),s=0;i<o;i++,s++)mS(a,s,e[i]);return a.length=s,a},bS=Lk,ES=sR,kS=mR.f,TS=_S,RS="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];lS.f=function(e){return RS&&"Window"==bS(e)?function(e){try{return kS(e)}catch(_6){return TS(RS)}}(e):kS(ES(e))};var SS=cS,wS=__,DS=lS.f;SS({target:"Object",stat:!0,forced:wS((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:DS});var IS=Pk,CS=String,LS=function(e){if("Symbol"===IS(e))throw TypeError("Cannot convert a Symbol value to a string");return CS(e)},VS=Fb,xS=function(){var e=VS(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},FS=__,GS=u_.RegExp,OS=FS((function(){var e=GS("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ZS=OS||FS((function(){return!GS("a","y").sticky})),PS=OS||FS((function(){var e=GS("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),US={BROKEN_CARET:PS,MISSED_STICKY:ZS,UNSUPPORTED_Y:OS},NS={},BS=VR,MS=xR,WS=Object.keys||function(e){return BS(e,MS)},YS=_b,XS=Cb,QS=gb,jS=Fb,HS=sR,JS=WS;NS.f=YS&&!XS?Object.defineProperties:function(e,t){jS(e);for(var n,r=HS(t),i=JS(t),o=i.length,a=0;o>a;)QS.f(e,n=i[a++],r[n]);return e};var KS,zS=H_("document","documentElement"),qS=Fb,$S=NS,ew=xR,tw=JE,nw=zS,rw=wb,iw="prototype",ow="script",aw=HE("IE_PROTO"),sw=function(){},uw=function(e){return"<"+ow+">"+e+"</"+ow+">"},cw=function(e){e.write(uw("")),e.close();var t=e.parentWindow.Object;return e=null,t},lw=function(){try{KS=new ActiveXObject("htmlfile")}catch(_6){}var e,t,n;lw="undefined"!=typeof document?document.domain&&KS?cw(KS):(t=rw("iframe"),n="java"+ow+":",t.style.display="none",nw.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(uw("document.F=Object")),e.close(),e.F):cw(KS);for(var r=ew.length;r--;)delete lw[iw][ew[r]];return lw()};tw[aw]=!0;var hw,Aw,dw=Object.create||function(e,t){var n;return null!==e?(sw[iw]=qS(e),n=new sw,sw[iw]=null,n[aw]=e):n=lw(),void 0===t?n:$S.f(n,t)},fw=__,vw=u_.RegExp,pw=fw((function(){var e=vw(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),mw=__,yw=u_.RegExp,gw=mw((function(){var e=yw("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),_w=Zb,bw=S_,Ew=LS,kw=xS,Tw=US,Rw=dw,Sw=ck.get,ww=pw,Dw=gw,Iw=g_("native-string-replace",String.prototype.replace),Cw=RegExp.prototype.exec,Lw=Cw,Vw=bw("".charAt),xw=bw("".indexOf),Fw=bw("".replace),Gw=bw("".slice),Ow=(Aw=/b*/g,_w(Cw,hw=/a/,"a"),_w(Cw,Aw,"a"),0!==hw.lastIndex||0!==Aw.lastIndex),Zw=Tw.BROKEN_CARET,Pw=void 0!==/()??/.exec("")[1];(Ow||Pw||Zw||ww||Dw)&&(Lw=function(e){var t,n,r,i,o,a,s,u=this,c=Sw(u),l=Ew(e),h=c.raw;if(h)return h.lastIndex=u.lastIndex,t=_w(Lw,h,l),u.lastIndex=h.lastIndex,t;var A=c.groups,d=Zw&&u.sticky,f=_w(kw,u),v=u.source,p=0,m=l;if(d&&(f=Fw(f,"y",""),-1===xw(f,"g")&&(f+="g"),m=Gw(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Vw(l,u.lastIndex-1))&&(v="(?: "+v+")",m=" "+m,p++),n=new RegExp("^(?:"+v+")",f)),Pw&&(n=new RegExp("^"+v+"$(?!\\s)",f)),Ow&&(r=u.lastIndex),i=_w(Cw,d?n:u,m),d?i?(i.input=Gw(i.input,p),i[0]=Gw(i[0],p),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:Ow&&i&&(u.lastIndex=u.global?i.index+i[0].length:r),Pw&&i&&i.length>1&&_w(Iw,i[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&A)for(i.groups=a=Rw(null),o=0;o<A.length;o++)a[(s=A[o])[0]]=i[s[1]];return i});var Uw=Lw;cS({target:"RegExp",proto:!0,forced:/./.exec!==Uw},{exec:Uw});var Nw,Bw,Mw=cS,Ww=Zb,Yw=X_,Xw=Fb,Qw=LS,jw=(Nw=!1,(Bw=/[ac]/).exec=function(){return Nw=!0,/./.exec.apply(this,arguments)},!0===Bw.test("abc")&&Nw),Hw=/./.test;Mw({target:"RegExp",proto:!0,forced:!jw},{test:function(e){var t=Xw(this),n=Qw(e),r=t.exec;if(!Yw(r))return Ww(Hw,t,n);var i=Ww(r,t,n);return null!==i&&(Xw(i),!0)}});var Jw=b_,Kw=Function.prototype,zw=Kw.apply,qw=Kw.call,$w="object"==typeof Reflect&&Reflect.apply||(Jw?qw.bind(zw):function(){return qw.apply(zw,arguments)}),eD=jk,tD=wk,nD=Uw,rD=__,iD=pb,oD=XE,aD=iD("species"),sD=RegExp.prototype,uD=S_,cD=aT,lD=LS,hD=C_,AD=uD("".charAt),dD=uD("".charCodeAt),fD=uD("".slice),vD=function(e){return function(t,n){var r,i,o=lD(hD(t)),a=cD(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=dD(o,a))<55296||r>56319||a+1===s||(i=dD(o,a+1))<56320||i>57343?e?AD(o,a):r:e?fD(o,a,a+2):i-56320+(r-55296<<10)+65536}},pD={codeAt:vD(!1),charAt:vD(!0)},mD=pD.charAt,yD=S_,gD=x_,_D=Math.floor,bD=yD("".charAt),ED=yD("".replace),kD=yD("".slice),TD=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,RD=/\$([$&'`]|\d{1,2})/g,SD=Zb,wD=Fb,DD=X_,ID=Lk,CD=Uw,LD=TypeError,VD=$w,xD=Zb,FD=S_,GD=function(e,t,n,r){var i=iD(e),o=!rD((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),a=o&&!rD((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[aD]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!o||!a||n){var s=eD(/./[i]),u=t(i,""[e],(function(e,t,n,r,i){var a=eD(e),u=t.exec;return u===nD||u===sD.exec?o&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));tD(String.prototype,e,u[0]),tD(sD,i,u[1])}r&&oD(sD[i],"sham",!0)},OD=__,ZD=Fb,PD=X_,UD=w_,ND=aT,BD=cT,MD=LS,WD=C_,YD=function(e,t,n){return t+(n?mD(e,t).length:1)},XD=qb,QD=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,u=RD;return void 0!==i&&(i=gD(i),u=TD),ED(o,u,(function(o,u){var c;switch(bD(u,0)){case"$":return"$";case"&":return e;case"`":return kD(t,0,n);case"'":return kD(t,a);case"<":c=i[kD(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>s){var h=_D(l/10);return 0===h?o:h<=s?void 0===r[h-1]?bD(u,1):r[h-1]+bD(u,1):o}c=r[l-1]}return void 0===c?"":c}))},jD=function(e,t){var n=e.exec;if(DD(n)){var r=SD(n,e,t);return null!==r&&wD(r),r}if("RegExp"===ID(e))return SD(CD,e,t);throw LD("RegExp#exec called on incompatible receiver")},HD=pb("replace"),JD=Math.max,KD=Math.min,zD=FD([].concat),qD=FD([].push),$D=FD("".indexOf),eI=FD("".slice),tI="$0"==="a".replace(/./,"$0"),nI=!!/./[HD]&&""===/./[HD]("a","$0"),rI=!OD((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));GD("replace",(function(e,t,n){var r=nI?"$":"$0";return[function(e,n){var r=WD(this),i=UD(e)?void 0:XD(e,HD);return i?xD(i,e,r,n):xD(t,MD(r),e,n)},function(e,i){var o=ZD(this),a=MD(e);if("string"==typeof i&&-1===$D(i,r)&&-1===$D(i,"$<")){var s=n(t,o,a,i);if(s.done)return s.value}var u=PD(i);u||(i=MD(i));var c=o.global;if(c){var l=o.unicode;o.lastIndex=0}for(var h=[];;){var A=jD(o,a);if(null===A)break;if(qD(h,A),!c)break;""===MD(A[0])&&(o.lastIndex=YD(a,BD(o.lastIndex),l))}for(var d,f="",v=0,p=0;p<h.length;p++){for(var m=MD((A=h[p])[0]),y=JD(KD(ND(A.index),a.length),0),g=[],_=1;_<A.length;_++)qD(g,void 0===(d=A[_])?d:String(d));var b=A.groups;if(u){var E=zD([m],g,y,a);void 0!==b&&qD(E,b);var k=MD(VD(i,void 0,E))}else k=QD(m,a,y,g,b,i);y>=v&&(f+=eI(a,v,y)+k,v=y+m.length)}return f+eI(a,v)}]}),!rI||!tI||nI);var iI=__,oI=nb,aI=pb("species"),sI=function(e){return oI>=51||!iI((function(){var t=[];return(t.constructor={})[aI]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},uI=MT.filter;cS({target:"Array",proto:!0,forced:!sI("filter")},{filter:function(e){return uI(this,e,arguments.length>1?arguments[1]:void 0)}});var cI,lI,hI,AI,dI="process"==Lk(u_.process),fI=X_,vI=String,pI=TypeError,mI=S_,yI=Fb,gI=function(e){if("object"==typeof e||fI(e))return e;throw pI("Can't set "+vI(e)+" as a prototype")},_I=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=mI(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(_6){}return function(n,r){return yI(n),gI(r),t?e(n,r):n.__proto__=r,n}}():void 0),bI=gb.f,EI=O_,kI=pb("toStringTag"),TI=function(e,t,n){e&&!n&&(e=e.prototype),e&&!EI(e,kI)&&bI(e,kI,{configurable:!0,value:t})},RI=H_,SI=gb,wI=_b,DI=pb("species"),II=function(e){var t=RI(e),n=SI.f;wI&&t&&!t[DI]&&n(t,DI,{configurable:!0,get:function(){return this}})},CI=Pb,LI=TypeError,VI=function(e,t){if(CI(t,e))return e;throw LI("Incorrect invocation")},xI=wT,FI=Xb,GI=TypeError,OI=function(e){if(xI(e))return e;throw GI(FI(e)+" is not a constructor")},ZI=Fb,PI=OI,UI=w_,NI=pb("species"),BI=function(e,t){var n,r=ZI(e).constructor;return void 0===r||UI(n=ZI(r)[NI])?t:PI(n)},MI=S_([].slice),WI=TypeError,YI=function(e,t){if(e<t)throw WI("Not enough arguments");return e},XI=/(?:ipad|iphone|ipod).*applewebkit/i.test(J_),QI=u_,jI=$w,HI=zk,JI=X_,KI=O_,zI=__,qI=zS,$I=MI,eC=wb,tC=YI,nC=XI,rC=dI,iC=QI.setImmediate,oC=QI.clearImmediate,aC=QI.process,sC=QI.Dispatch,uC=QI.Function,cC=QI.MessageChannel,lC=QI.String,hC=0,AC={},dC="onreadystatechange";try{cI=QI.location}catch(_6){}var fC=function(e){if(KI(AC,e)){var t=AC[e];delete AC[e],t()}},vC=function(e){return function(){fC(e)}},pC=function(e){fC(e.data)},mC=function(e){QI.postMessage(lC(e),cI.protocol+"//"+cI.host)};iC&&oC||(iC=function(e){tC(arguments.length,1);var t=JI(e)?e:uC(e),n=$I(arguments,1);return AC[++hC]=function(){jI(t,void 0,n)},lI(hC),hC},oC=function(e){delete AC[e]},rC?lI=function(e){aC.nextTick(vC(e))}:sC&&sC.now?lI=function(e){sC.now(vC(e))}:cC&&!nC?(AI=(hI=new cC).port2,hI.port1.onmessage=pC,lI=HI(AI.postMessage,AI)):QI.addEventListener&&JI(QI.postMessage)&&!QI.importScripts&&cI&&"file:"!==cI.protocol&&!zI(mC)?(lI=mC,QI.addEventListener("message",pC,!1)):lI=dC in eC("script")?function(e){qI.appendChild(eC("script"))[dC]=function(){qI.removeChild(this),fC(e)}}:function(e){setTimeout(vC(e),0)});var yC,gC,_C,bC,EC,kC,TC,RC,SC={set:iC,clear:oC},wC=u_,DC=/ipad|iphone|ipod/i.test(J_)&&void 0!==wC.Pebble,IC=/web0s(?!.*chrome)/i.test(J_),CC=u_,LC=zk,VC=eR.f,xC=SC.set,FC=XI,GC=DC,OC=IC,ZC=dI,PC=CC.MutationObserver||CC.WebKitMutationObserver,UC=CC.document,NC=CC.process,BC=CC.Promise,MC=VC(CC,"queueMicrotask"),WC=MC&&MC.value;WC||(yC=function(){var e,t;for(ZC&&(e=NC.domain)&&e.exit();gC;){t=gC.fn,gC=gC.next;try{t()}catch(_6){throw gC?bC():_C=void 0,_6}}_C=void 0,e&&e.enter()},FC||ZC||OC||!PC||!UC?!GC&&BC&&BC.resolve?((TC=BC.resolve(void 0)).constructor=BC,RC=LC(TC.then,TC),bC=function(){RC(yC)}):ZC?bC=function(){NC.nextTick(yC)}:(xC=LC(xC,CC),bC=function(){xC(yC)}):(EC=!0,kC=UC.createTextNode(""),new PC(yC).observe(kC,{characterData:!0}),bC=function(){kC.data=EC=!EC}));var YC=WC||function(e){var t={fn:e,next:void 0};_C&&(_C.next=t),gC||(gC=t,bC()),_C=t},XC=u_,QC=function(e){try{return{error:!1,value:e()}}catch(_6){return{error:!0,value:_6}}},jC=function(){this.head=null,this.tail=null};jC.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var HC=jC,JC=u_.Promise,KC="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,zC=!KC&&!dI&&"object"==typeof window&&"object"==typeof document,qC=u_,$C=JC,eL=X_,tL=tS,nL=PE,rL=pb,iL=zC,oL=KC,aL=nb;$C&&$C.prototype;var sL=rL("species"),uL=!1,cL=eL(qC.PromiseRejectionEvent),lL={CONSTRUCTOR:tL("Promise",(function(){var e=nL($C),t=e!==String($C);if(!t&&66===aL)return!0;if(!aL||aL<51||!/native code/.test(e)){var n=new $C((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[sL]=r,!(uL=n.then((function(){}))instanceof r))return!0}return!t&&(iL||oL)&&!cL})),REJECTION_EVENT:cL,SUBCLASSING:uL},hL={},AL=Jb,dL=TypeError,fL=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw dL("Bad Promise constructor");t=e,n=r})),this.resolve=AL(t),this.reject=AL(n)};hL.f=function(e){return new fL(e)};var vL,pL,mL,yL=cS,gL=dI,_L=u_,bL=Zb,EL=wk,kL=_I,TL=TI,RL=II,SL=Jb,wL=X_,DL=kb,IL=VI,CL=BI,LL=SC.set,VL=YC,xL=function(e,t){var n=XC.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},FL=QC,GL=HC,OL=ck,ZL=JC,PL=hL,UL="Promise",NL=lL.CONSTRUCTOR,BL=lL.REJECTION_EVENT,ML=lL.SUBCLASSING,WL=OL.getterFor(UL),YL=OL.set,XL=ZL&&ZL.prototype,QL=ZL,jL=XL,HL=_L.TypeError,JL=_L.document,KL=_L.process,zL=PL.f,qL=zL,$L=!!(JL&&JL.createEvent&&_L.dispatchEvent),eV="unhandledrejection",tV=function(e){var t;return!(!DL(e)||!wL(t=e.then))&&t},nV=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&sV(t),t.rejection=1),!0===s?n=o:(l&&l.enter(),n=s(o),l&&(l.exit(),i=!0)),n===e.promise?c(HL("Promise-chain cycle")):(r=tV(n))?bL(r,n,u,c):u(n)):c(o)}catch(_6){l&&!i&&l.exit(),c(_6)}},rV=function(e,t){e.notified||(e.notified=!0,VL((function(){for(var n,r=e.reactions;n=r.get();)nV(n,e);e.notified=!1,t&&!e.rejection&&oV(e)})))},iV=function(e,t,n){var r,i;$L?((r=JL.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),_L.dispatchEvent(r)):r={promise:t,reason:n},!BL&&(i=_L["on"+e])?i(r):e===eV&&xL("Unhandled promise rejection",n)},oV=function(e){bL(LL,_L,(function(){var t,n=e.facade,r=e.value;if(aV(e)&&(t=FL((function(){gL?KL.emit("unhandledRejection",r,n):iV(eV,n,r)})),e.rejection=gL||aV(e)?2:1,t.error))throw t.value}))},aV=function(e){return 1!==e.rejection&&!e.parent},sV=function(e){bL(LL,_L,(function(){var t=e.facade;gL?KL.emit("rejectionHandled",t):iV("rejectionhandled",t,e.value)}))},uV=function(e,t,n){return function(r){e(t,r,n)}},cV=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,rV(e,!0))},lV=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw HL("Promise can't be resolved itself");var r=tV(t);r?VL((function(){var n={done:!1};try{bL(r,t,uV(lV,n,e),uV(cV,n,e))}catch(_6){cV(n,_6,e)}})):(e.value=t,e.state=1,rV(e,!1))}catch(_6){cV({done:!1},_6,e)}}};if(NL&&(jL=(QL=function(e){IL(this,jL),SL(e),bL(vL,this);var t=WL(this);try{e(uV(lV,t),uV(cV,t))}catch(_6){cV(t,_6)}}).prototype,(vL=function(e){YL(this,{type:UL,done:!1,notified:!1,parent:!1,reactions:new GL,rejection:!1,state:0,value:void 0})}).prototype=EL(jL,"then",(function(e,t){var n=WL(this),r=zL(CL(this,QL));return n.parent=!0,r.ok=!wL(e)||e,r.fail=wL(t)&&t,r.domain=gL?KL.domain:void 0,0==n.state?n.reactions.add(r):VL((function(){nV(r,n)})),r.promise})),pL=function(){var e=new vL,t=WL(e);this.promise=e,this.resolve=uV(lV,t),this.reject=uV(cV,t)},PL.f=zL=function(e){return e===QL||undefined===e?new pL(e):qL(e)},wL(ZL)&&XL!==Object.prototype)){mL=XL.then,ML||EL(XL,"then",(function(e,t){var n=this;return new QL((function(e,t){bL(mL,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete XL.constructor}catch(_6){}kL&&kL(XL,jL)}yL({global:!0,constructor:!0,wrap:!0,forced:NL},{Promise:QL}),TL(QL,UL,!1),RL(UL);var hV={},AV=hV,dV=pb("iterator"),fV=Array.prototype,vV=function(e){return void 0!==e&&(AV.Array===e||fV[dV]===e)},pV=Pk,mV=qb,yV=w_,gV=hV,_V=pb("iterator"),bV=function(e){if(!yV(e))return mV(e,_V)||mV(e,"@@iterator")||gV[pV(e)]},EV=Zb,kV=Jb,TV=Fb,RV=Xb,SV=bV,wV=TypeError,DV=function(e,t){var n=arguments.length<2?SV(e):t;if(kV(n))return TV(EV(n,e));throw wV(RV(e)+" is not iterable")},IV=Zb,CV=Fb,LV=qb,VV=function(e,t,n){var r,i;CV(e);try{if(!(r=LV(e,"return"))){if("throw"===t)throw n;return n}r=IV(r,e)}catch(_6){i=!0,r=_6}if("throw"===t)throw n;if(i)throw r;return CV(r),n},xV=zk,FV=Zb,GV=Fb,OV=Xb,ZV=vV,PV=hT,UV=Pb,NV=DV,BV=bV,MV=VV,WV=TypeError,YV=function(e,t){this.stopped=e,this.result=t},XV=YV.prototype,QV=function(e,t,n){var r,i,o,a,s,u,c,l=n&&n.that,h=!(!n||!n.AS_ENTRIES),A=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),v=xV(t,l),p=function(e){return r&&MV(r,"normal",e),new YV(!0,e)},m=function(e){return h?(GV(e),f?v(e[0],e[1],p):v(e[0],e[1])):f?v(e,p):v(e)};if(A)r=e.iterator;else if(d)r=e;else{if(!(i=BV(e)))throw WV(OV(e)+" is not iterable");if(ZV(i)){for(o=0,a=PV(e);a>o;o++)if((s=m(e[o]))&&UV(XV,s))return s;return new YV(!1)}r=NV(e,i)}for(u=A?e.next:r.next;!(c=FV(u,r)).done;){try{s=m(c.value)}catch(_6){MV(r,"throw",_6)}if("object"==typeof s&&s&&UV(XV,s))return s}return new YV(!1)},jV=pb("iterator"),HV=!1;try{var JV=0,KV={next:function(){return{done:!!JV++}},return:function(){HV=!0}};KV[jV]=function(){return this},Array.from(KV,(function(){throw 2}))}catch(_6){}var zV=function(e,t){if(!t&&!HV)return!1;var n=!1;try{var r={};r[jV]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(_6){}return n},qV=JC,$V=lL.CONSTRUCTOR||!zV((function(e){qV.all(e).then(void 0,(function(){}))})),ex=Zb,tx=Jb,nx=hL,rx=QC,ix=QV;cS({target:"Promise",stat:!0,forced:$V},{all:function(e){var t=this,n=nx.f(t),r=n.resolve,i=n.reject,o=rx((function(){var n=tx(t.resolve),o=[],a=0,s=1;ix(e,(function(e){var u=a++,c=!1;s++,ex(n,t,e).then((function(e){c||(c=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var ox=cS,ax=lL.CONSTRUCTOR,sx=JC,ux=H_,cx=X_,lx=wk,hx=sx&&sx.prototype;if(ox({target:"Promise",proto:!0,forced:ax,real:!0},{catch:function(e){return this.then(void 0,e)}}),cx(sx)){var Ax=ux("Promise").prototype.catch;hx.catch!==Ax&&lx(hx,"catch",Ax,{unsafe:!0})}var dx=Zb,fx=Jb,vx=hL,px=QC,mx=QV;cS({target:"Promise",stat:!0,forced:$V},{race:function(e){var t=this,n=vx.f(t),r=n.reject,i=px((function(){var i=fx(t.resolve);mx(e,(function(e){dx(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var yx=Zb,gx=hL;cS({target:"Promise",stat:!0,forced:lL.CONSTRUCTOR},{reject:function(e){var t=gx.f(this);return yx(t.reject,void 0,e),t.promise}});var _x=Fb,bx=kb,Ex=hL,kx=function(e,t){if(_x(e),bx(t)&&t.constructor===e)return t;var n=Ex.f(e);return(0,n.resolve)(t),n.promise},Tx=cS,Rx=lL.CONSTRUCTOR,Sx=kx;H_("Promise"),Tx({target:"Promise",stat:!0,forced:Rx},{resolve:function(e){return Sx(this,e)}});var wx=TypeError,Dx=function(e){if(e>9007199254740991)throw wx("Maximum allowed index exceeded");return e},Ix=cS,Cx=__,Lx=dT,Vx=kb,xx=x_,Fx=hT,Gx=Dx,Ox=fS,Zx=FT,Px=sI,Ux=nb,Nx=pb("isConcatSpreadable"),Bx=Ux>=51||!Cx((function(){var e=[];return e[Nx]=!1,e.concat()[0]!==e})),Mx=Px("concat"),Wx=function(e){if(!Vx(e))return!1;var t=e[Nx];return void 0!==t?!!t:Lx(e)};Ix({target:"Array",proto:!0,arity:1,forced:!Bx||!Mx},{concat:function(e){var t,n,r,i,o,a=xx(this),s=Zx(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Wx(o=-1===t?a:arguments[t]))for(i=Fx(o),Gx(u+i),n=0;n<i;n++,u++)n in o&&Ox(s,u,o[n]);else Gx(u+1),Ox(s,u++,o);return s.length=u,s}});var Yx=cS,Xx=JC,Qx=__,jx=H_,Hx=X_,Jx=BI,Kx=kx,zx=wk,qx=Xx&&Xx.prototype;if(Yx({target:"Promise",proto:!0,real:!0,forced:!!Xx&&Qx((function(){qx.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Jx(this,jx("Promise")),n=Hx(e);return this.then(n?function(n){return Kx(t,e()).then((function(){return n}))}:e,n?function(n){return Kx(t,e()).then((function(){throw n}))}:e)}}),Hx(Xx)){var $x=jx("Promise").prototype.finally;qx.finally!==$x&&zx(qx,"finally",$x,{unsafe:!0})}var eF=X_,tF=kb,nF=_I,rF=function(e,t,n){var r,i;return nF&&eF(r=t.constructor)&&r!==n&&tF(i=r.prototype)&&i!==n.prototype&&nF(e,i),e},iF=S_(1..valueOf),oF="\t\n\v\f\r                 \u2028\u2029\ufeff",aF=C_,sF=LS,uF=oF,cF=S_("".replace),lF="["+uF+"]",hF=RegExp("^"+lF+lF+"*"),AF=RegExp(lF+lF+"*$"),dF=function(e){return function(t){var n=sF(aF(t));return 1&e&&(n=cF(n,hF,"")),2&e&&(n=cF(n,AF,"")),n}},fF={start:dF(1),end:dF(2),trim:dF(3)},vF=_b,pF=u_,mF=S_,yF=tS,gF=wk,_F=O_,bF=rF,EF=Pb,kF=Wb,TF=lE,RF=__,SF=mR.f,wF=eR.f,DF=gb.f,IF=iF,CF=fF.trim,LF="Number",VF=pF[LF],xF=VF.prototype,FF=pF.TypeError,GF=mF("".slice),OF=mF("".charCodeAt),ZF=function(e){var t,n,r,i,o,a,s,u,c=TF(e,"number");if(kF(c))throw FF("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=CF(c),43===(t=OF(c,0))||45===t){if(88===(n=OF(c,2))||120===n)return NaN}else if(48===t){switch(OF(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=GF(c,2)).length,s=0;s<a;s++)if((u=OF(o,s))<48||u>i)return NaN;return parseInt(o,r)}return+c};if(yF(LF,!VF(" 0o1")||!VF("0b1")||VF("+0x1"))){for(var PF,UF=function(e){var t=arguments.length<1?0:VF(function(e){var t=TF(e,"number");return"bigint"==typeof t?t:ZF(t)}(e)),n=this;return EF(xF,n)&&RF((function(){IF(n)}))?bF(Object(t),n,UF):t},NF=vF?SF(VF):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),BF=0;NF.length>BF;BF++)_F(VF,PF=NF[BF])&&!_F(UF,PF)&&DF(UF,PF,wF(VF,PF));UF.prototype=xF,xF.constructor=UF,gF(pF,LF,UF,{constructor:!0})}var MF=u_,WF=__,YF=LS,XF=fF.trim,QF=oF,jF=S_("".charAt),HF=MF.parseFloat,JF=MF.Symbol,KF=JF&&JF.iterator,zF=1/HF(QF+"-0")!=-1/0||KF&&!WF((function(){HF(Object(KF))}))?function(e){var t=XF(YF(e)),n=HF(t);return 0===n&&"-"==jF(t,0)?-0:n}:HF;cS({target:"Number",stat:!0,forced:Number.parseFloat!=zF},{parseFloat:zF}),cS({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var qF=MT.map;cS({target:"Array",proto:!0,forced:!sI("map")},{map:function(e){return qF(this,e,arguments.length>1?arguments[1]:void 0)}});var $F=x_,eG=bR,tG=hT,nG=function(e){for(var t=$F(this),n=tG(t),r=arguments.length,i=eG(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:eG(o,n);a>i;)t[i++]=e;return t},rG=pb,iG=dw,oG=gb.f,aG=rG("unscopables"),sG=Array.prototype;null==sG[aG]&&oG(sG,aG,{configurable:!0,value:iG(null)});var uG=function(e){sG[aG][e]=!0},cG=uG;cS({target:"Array",proto:!0},{fill:nG}),cG("fill");var lG,hG=n(te.setInterval),AG=function(){return"undefined"!=typeof navigator&&Mg((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream},dG=function(){return"wakeLock"in navigator},fG=function(){function e(){var t=this;by(this,e),this.enabled=!1,dG()?(this._wakeLock=null,this.handleVisibilityChange=function(){null!==t._wakeLock&&t.visible&&t.enable()},document.addEventListener("visibilitychange",this.handleVisibilityChange),document.addEventListener("fullscreenchange",this.handleVisibilityChange)):AG()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64, AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK"),this.noSleepVideo.addEventListener("loadedmetadata",(function(){t.noSleepVideo&&(t.noSleepVideo.duration<=1?t.noSleepVideo.setAttribute("loop",""):(t.onTimeupdate=function(){t.noSleepVideo.currentTime>.5&&(t.noSleepVideo.currentTime=Math.random())},t.noSleepVideo.addEventListener("timeupdate",t.onTimeupdate)))})))}return ky(e,[{key:"_addSourceToVideo",value:function(e,t,n){var r=document.createElement("source");r.src=n,r.type="video/".concat(t),e.appendChild(r)}},{key:"visible",get:function(){return"visible"===document.visibilityState}},{key:"isEnabled",get:function(){return this.enabled}},{key:"enable",value:function(){var e,t=this;if(dG()&&this.visible)return navigator.wakeLock.request("screen").then((function(e){t._wakeLock=e,t.enabled=!0,t._wakeLock.addEventListener("release",(function(){}))})).catch((function(){t.enabled=!1}));if(AG())return this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=hG((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],Lg(window.stop,0))}),15e3),this.enabled=!0,Zp.resolve();if(null!==(e=this.noSleepVideo)&&void 0!==e&&e.paused){var n=this.noSleepVideo.play();return n&&n.then((function(e){return t.enabled=!0,e})).catch((function(e){console.log("noSleep: ",e.message),t.enabled=!1}))}}},{key:"disable",value:function(){dG()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):AG()?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}},{key:"toPlay",value:function(){if(this.noSleepVideo&&this.noSleepVideo.paused){var e=performance.now();this.lastTs||(this.lastTs=e),e-this.lastTs>1e4&&(this.enable(),this.lastTs=e)}}},{key:"destroy",value:function(){this.disable(),this.handleVisibilityChange&&(document.removeEventListener("visibilitychange",this.handleVisibilityChange),document.removeEventListener("fullscreenchange",this.handleVisibilityChange)),this.onTimeupdate&&this.noSleepVideo.removeEventListener("timeupdate",this.onTimeupdate),this.noSleepVideo=null}}]),e}();function vG(){if(!document.querySelector("#hackAudioPP")){var e=document.createElement("div");e.innerHTML="<audio id='hackAudioPP'></audio>",document.body.appendChild(e);var t=e.children.item(0);t.controls=!1,t.preload="auto",t.innerHTML="<source src=".concat("data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAABhTEFNRTMuMTAwA8MAAAAAAAAAABQgJAUHQQAB9AAAAnGMHkkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADgnABGiAAQBCqgCRMAAgEAH///////////////7+n/9FTuQsQH//////2NG0jWUGlio5gLQTOtIoeR2WX////X4s9Atb/JRVCbBUpeRUq//////////////////9RUi0f2jn/+xDECgPCjAEQAABN4AAANIAAAAQVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",' type="audio/mpeg"></source>'),t.muted=!0,t.loop=!0,t.play().catch((function(){}))}}function pG(){var e=lG||(lG=document.querySelector("#hackAudioPP"));e?!1===e.paused&&!1===e.muted||(e.muted=!1,e.play().catch((function(e){console.log("bgAudio: ",e.message)}))):vG()}var mG=In,yG=Date,gG=p(yG.prototype.getTime);mG({target:"Date",stat:!0},{now:function(){return gG(new yG)}});var _G,bG,EG,kG=n(te.Date.now),TG=!__((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),RG=O_,SG=X_,wG=x_,DG=TG,IG=HE("IE_PROTO"),CG=Object,LG=CG.prototype,VG=DG?CG.getPrototypeOf:function(e){var t=wG(e);if(RG(t,IG))return t[IG];var n=t.constructor;return SG(n)&&t instanceof n?n.prototype:t instanceof CG?LG:null},xG=__,FG=X_,GG=kb,OG=VG,ZG=wk,PG=pb("iterator"),UG=!1;[].keys&&("next"in(EG=[].keys())?(bG=OG(OG(EG)))!==Object.prototype&&(_G=bG):UG=!0),(!GG(_G)||xG((function(){var e={};return _G[PG].call(e)!==e})))&&(_G={}),FG(_G[PG])||ZG(_G,PG,(function(){return this}));var NG={IteratorPrototype:_G,BUGGY_SAFARI_ITERATORS:UG},BG=NG.IteratorPrototype,MG=dw,WG=ME,YG=TI,XG=hV,QG=function(){return this},jG=function(e,t,n,r){var i=t+" Iterator";return e.prototype=MG(BG,{next:WG(+!r,n)}),YG(e,i,!1),XG[i]=QG,e},HG=cS,JG=Zb,KG=X_,zG=jG,qG=VG,$G=_I,eO=TI,tO=XE,nO=wk,rO=hV,iO=LE.PROPER,oO=LE.CONFIGURABLE,aO=NG.IteratorPrototype,sO=NG.BUGGY_SAFARI_ITERATORS,uO=pb("iterator"),cO="keys",lO="values",hO="entries",AO=function(){return this},dO=function(e,t,n,r,i,o,a){zG(n,t,r);var s,u,c,l=function(e){if(e===i&&v)return v;if(!sO&&e in d)return d[e];switch(e){case cO:case lO:case hO:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",A=!1,d=e.prototype,f=d[uO]||d["@@iterator"]||i&&d[i],v=!sO&&f||l(i),p="Array"==t&&d.entries||f;if(p&&(s=qG(p.call(new e)))!==Object.prototype&&s.next&&(qG(s)!==aO&&($G?$G(s,aO):KG(s[uO])||nO(s,uO,AO)),eO(s,h,!0)),iO&&i==lO&&f&&f.name!==lO&&(oO?tO(d,"name",lO):(A=!0,v=function(){return JG(f,this)})),i)if(u={values:l(lO),keys:o?v:l(cO),entries:l(hO)},a)for(c in u)(sO||A||!(c in d))&&nO(d,c,u[c]);else HG({target:t,proto:!0,forced:sO||A},u);return d[uO]!==v&&nO(d,uO,v,{name:i}),rO[t]=v,u},fO=function(e,t){return{value:e,done:t}},vO=sR,pO=uG,mO=hV,yO=ck,gO=gb.f,_O=dO,bO=fO,EO=_b,kO="Array Iterator",TO=yO.set,RO=yO.getterFor(kO),SO=_O(Array,"Array",(function(e,t){TO(this,{type:kO,target:vO(e),index:0,kind:t})}),(function(){var e=RO(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,bO(void 0,!0)):bO("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),wO=mO.Arguments=mO.Array;if(pO("keys"),pO("values"),pO("entries"),EO&&"values"!==wO.name)try{gO(wO,"name",{value:"values"})}catch(_6){}var DO,IO,CO,LO={exports:{}},VO="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,xO=VO,FO=_b,GO=u_,OO=X_,ZO=kb,PO=O_,UO=Pk,NO=Xb,BO=XE,MO=wk,WO=gb.f,YO=Pb,XO=VG,QO=_I,jO=pb,HO=B_,JO=ck.enforce,KO=ck.get,zO=GO.Int8Array,qO=zO&&zO.prototype,$O=GO.Uint8ClampedArray,eZ=$O&&$O.prototype,tZ=zO&&XO(zO),nZ=qO&&XO(qO),rZ=Object.prototype,iZ=GO.TypeError,oZ=jO("toStringTag"),aZ=HO("TYPED_ARRAY_TAG"),sZ="TypedArrayConstructor",uZ=xO&&!!QO&&"Opera"!==UO(GO.opera),cZ=!1,lZ={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},hZ={BigInt64Array:8,BigUint64Array:8},AZ=function(e){var t=XO(e);if(ZO(t)){var n=KO(t);return n&&PO(n,sZ)?n[sZ]:AZ(t)}},dZ=function(e){if(!ZO(e))return!1;var t=UO(e);return PO(lZ,t)||PO(hZ,t)};for(DO in lZ)(CO=(IO=GO[DO])&&IO.prototype)?JO(CO)[sZ]=IO:uZ=!1;for(DO in hZ)(CO=(IO=GO[DO])&&IO.prototype)&&(JO(CO)[sZ]=IO);if((!uZ||!OO(tZ)||tZ===Function.prototype)&&(tZ=function(){throw iZ("Incorrect invocation")},uZ))for(DO in lZ)GO[DO]&&QO(GO[DO],tZ);if((!uZ||!nZ||nZ===rZ)&&(nZ=tZ.prototype,uZ))for(DO in lZ)GO[DO]&&QO(GO[DO].prototype,nZ);if(uZ&&XO(eZ)!==nZ&&QO(eZ,nZ),FO&&!PO(nZ,oZ))for(DO in cZ=!0,WO(nZ,oZ,{get:function(){return ZO(this)?this[aZ]:void 0}}),lZ)GO[DO]&&BO(GO[DO],aZ,DO);var fZ={NATIVE_ARRAY_BUFFER_VIEWS:uZ,TYPED_ARRAY_TAG:cZ&&aZ,aTypedArray:function(e){if(dZ(e))return e;throw iZ("Target is not a typed array")},aTypedArrayConstructor:function(e){if(OO(e)&&(!QO||YO(tZ,e)))return e;throw iZ(NO(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(FO){if(n)for(var i in lZ){var o=GO[i];if(o&&PO(o.prototype,e))try{delete o.prototype[e]}catch(_6){try{o.prototype[e]=t}catch(a){}}}nZ[e]&&!n||MO(nZ,e,n?t:uZ&&qO[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(FO){if(QO){if(n)for(r in lZ)if((i=GO[r])&&PO(i,e))try{delete i[e]}catch(_6){}if(tZ[e]&&!n)return;try{return MO(tZ,e,n?t:uZ&&tZ[e]||t)}catch(_6){}}for(r in lZ)!(i=GO[r])||i[e]&&!n||MO(i,e,t)}},getTypedArrayConstructor:AZ,isView:function(e){if(!ZO(e))return!1;var t=UO(e);return"DataView"===t||PO(lZ,t)||PO(hZ,t)},isTypedArray:dZ,TypedArray:tZ,TypedArrayPrototype:nZ},vZ=u_,pZ=__,mZ=zV,yZ=fZ.NATIVE_ARRAY_BUFFER_VIEWS,gZ=vZ.ArrayBuffer,_Z=vZ.Int8Array,bZ=!yZ||!pZ((function(){_Z(1)}))||!pZ((function(){new _Z(-1)}))||!mZ((function(e){new _Z,new _Z(null),new _Z(1.5),new _Z(e)}),!0)||pZ((function(){return 1!==new _Z(new gZ(2),1,void 0).length})),EZ=wk,kZ=function(e,t,n){for(var r in t)EZ(e,r,t[r],n);return e},TZ=aT,RZ=cT,SZ=RangeError,wZ=function(e){if(void 0===e)return 0;var t=TZ(e),n=RZ(t);if(t!==n)throw SZ("Wrong length or index");return n},DZ=Array,IZ=Math.abs,CZ=Math.pow,LZ=Math.floor,VZ=Math.log,xZ=Math.LN2,FZ=u_,GZ=S_,OZ=_b,ZZ=VO,PZ=LE,UZ=XE,NZ=kZ,BZ=__,MZ=VI,WZ=aT,YZ=cT,XZ=wZ,QZ={pack:function(e,t,n){var r,i,o,a=DZ(n),s=8*n-t-1,u=(1<<s)-1,c=u>>1,l=23===t?CZ(2,-24)-CZ(2,-77):0,h=e<0||0===e&&1/e<0?1:0,A=0;for((e=IZ(e))!=e||e===1/0?(i=e!=e?1:0,r=u):(r=LZ(VZ(e)/xZ),e*(o=CZ(2,-r))<1&&(r--,o*=2),(e+=r+c>=1?l/o:l*CZ(2,1-c))*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*CZ(2,t),r+=c):(i=e*CZ(2,c-1)*CZ(2,t),r=0));t>=8;)a[A++]=255&i,i/=256,t-=8;for(r=r<<t|i,s+=t;s>0;)a[A++]=255&r,r/=256,s-=8;return a[--A]|=128*h,a},unpack:function(e,t){var n,r=e.length,i=8*r-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=r-1,c=e[u--],l=127&c;for(c>>=7;s>0;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===o)return n?NaN:c?-1/0:1/0;n+=CZ(2,t),l-=a}return(c?-1:1)*n*CZ(2,l-t)}},jZ=VG,HZ=_I,JZ=mR.f,KZ=gb.f,zZ=nG,qZ=_S,$Z=TI,eP=PZ.PROPER,tP=PZ.CONFIGURABLE,nP=ck.get,rP=ck.set,iP="ArrayBuffer",oP="DataView",aP="prototype",sP="Wrong index",uP=FZ[iP],cP=uP,lP=cP&&cP[aP],hP=FZ[oP],AP=hP&&hP[aP],dP=Object.prototype,fP=FZ.Array,vP=FZ.RangeError,pP=GZ(zZ),mP=GZ([].reverse),yP=QZ.pack,gP=QZ.unpack,_P=function(e){return[255&e]},bP=function(e){return[255&e,e>>8&255]},EP=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},kP=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},TP=function(e){return yP(e,23,4)},RP=function(e){return yP(e,52,8)},SP=function(e,t){KZ(e[aP],t,{get:function(){return nP(this)[t]}})},wP=function(e,t,n,r){var i=XZ(n),o=nP(e);if(i+t>o.byteLength)throw vP(sP);var a=nP(o.buffer).bytes,s=i+o.byteOffset,u=qZ(a,s,s+t);return r?u:mP(u)},DP=function(e,t,n,r,i,o){var a=XZ(n),s=nP(e);if(a+t>s.byteLength)throw vP(sP);for(var u=nP(s.buffer).bytes,c=a+s.byteOffset,l=r(+i),h=0;h<t;h++)u[c+h]=l[o?h:t-h-1]};if(ZZ){var IP=eP&&uP.name!==iP;if(BZ((function(){uP(1)}))&&BZ((function(){new uP(-1)}))&&!BZ((function(){return new uP,new uP(1.5),new uP(NaN),1!=uP.length||IP&&!tP})))IP&&tP&&UZ(uP,"name",iP);else{(cP=function(e){return MZ(this,lP),new uP(XZ(e))})[aP]=lP;for(var CP,LP=JZ(uP),VP=0;LP.length>VP;)(CP=LP[VP++])in cP||UZ(cP,CP,uP[CP]);lP.constructor=cP}HZ&&jZ(AP)!==dP&&HZ(AP,dP);var xP=new hP(new cP(2)),FP=GZ(AP.setInt8);xP.setInt8(0,2147483648),xP.setInt8(1,2147483649),!xP.getInt8(0)&&xP.getInt8(1)||NZ(AP,{setInt8:function(e,t){FP(this,e,t<<24>>24)},setUint8:function(e,t){FP(this,e,t<<24>>24)}},{unsafe:!0})}else lP=(cP=function(e){MZ(this,lP);var t=XZ(e);rP(this,{bytes:pP(fP(t),0),byteLength:t}),OZ||(this.byteLength=t)})[aP],AP=(hP=function(e,t,n){MZ(this,AP),MZ(e,lP);var r=nP(e).byteLength,i=WZ(t);if(i<0||i>r)throw vP("Wrong offset");if(i+(n=void 0===n?r-i:YZ(n))>r)throw vP("Wrong length");rP(this,{buffer:e,byteLength:n,byteOffset:i}),OZ||(this.buffer=e,this.byteLength=n,this.byteOffset=i)})[aP],OZ&&(SP(cP,"byteLength"),SP(hP,"buffer"),SP(hP,"byteLength"),SP(hP,"byteOffset")),NZ(AP,{getInt8:function(e){return wP(this,1,e)[0]<<24>>24},getUint8:function(e){return wP(this,1,e)[0]},getInt16:function(e){var t=wP(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=wP(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return kP(wP(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return kP(wP(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return gP(wP(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return gP(wP(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){DP(this,1,e,_P,t)},setUint8:function(e,t){DP(this,1,e,_P,t)},setInt16:function(e,t){DP(this,2,e,bP,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){DP(this,2,e,bP,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){DP(this,4,e,EP,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){DP(this,4,e,EP,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){DP(this,4,e,TP,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){DP(this,8,e,RP,t,arguments.length>2?arguments[2]:void 0)}});$Z(cP,iP),$Z(hP,oP);var GP={ArrayBuffer:cP,DataView:hP},OP=kb,ZP=Math.floor,PP=Number.isInteger||function(e){return!OP(e)&&isFinite(e)&&ZP(e)===e},UP=aT,NP=RangeError,BP=function(e){var t=UP(e);if(t<0)throw NP("The argument can't be less than 0");return t},MP=RangeError,WP=function(e,t){var n=BP(e);if(n%t)throw MP("Wrong offset");return n},YP=Pk,XP=S_("".slice),QP=lE,jP=TypeError,HP=function(e){var t=QP(e,"number");if("number"==typeof t)throw jP("Can't convert number to bigint");return BigInt(t)},JP=zk,KP=Zb,zP=OI,qP=x_,$P=hT,eU=DV,tU=bV,nU=vV,rU=function(e){return"Big"===XP(YP(e),0,3)},iU=fZ.aTypedArrayConstructor,oU=HP,aU=cS,sU=u_,uU=Zb,cU=_b,lU=bZ,hU=fZ,AU=GP,dU=VI,fU=ME,vU=XE,pU=PP,mU=cT,yU=wZ,gU=WP,_U=dE,bU=O_,EU=Pk,kU=kb,TU=Wb,RU=dw,SU=Pb,wU=_I,DU=mR.f,IU=function(e){var t,n,r,i,o,a,s,u,c=zP(this),l=qP(e),h=arguments.length,A=h>1?arguments[1]:void 0,d=void 0!==A,f=tU(l);if(f&&!nU(f))for(u=(s=eU(l,f)).next,l=[];!(a=KP(u,s)).done;)l.push(a.value);for(d&&h>2&&(A=JP(A,arguments[2])),n=$P(l),r=new(iU(c))(n),i=rU(r),t=0;n>t;t++)o=d?A(l[t],t):l[t],r[t]=i?oU(o):+o;return r},CU=MT.forEach,LU=II,VU=gb,xU=eR,FU=rF,GU=ck.get,OU=ck.set,ZU=ck.enforce,PU=VU.f,UU=xU.f,NU=Math.round,BU=sU.RangeError,MU=AU.ArrayBuffer,WU=MU.prototype,YU=AU.DataView,XU=hU.NATIVE_ARRAY_BUFFER_VIEWS,QU=hU.TYPED_ARRAY_TAG,jU=hU.TypedArray,HU=hU.TypedArrayPrototype,JU=hU.aTypedArrayConstructor,KU=hU.isTypedArray,zU="BYTES_PER_ELEMENT",qU="Wrong length",$U=function(e,t){JU(e);for(var n=0,r=t.length,i=new e(r);r>n;)i[n]=t[n++];return i},eN=function(e,t){PU(e,t,{get:function(){return GU(this)[t]}})},tN=function(e){var t;return SU(WU,e)||"ArrayBuffer"==(t=EU(e))||"SharedArrayBuffer"==t},nN=function(e,t){return KU(e)&&!TU(t)&&t in e&&pU(+t)&&t>=0},rN=function(e,t){return t=_U(t),nN(e,t)?fU(2,e[t]):UU(e,t)},iN=function(e,t,n){return t=_U(t),!(nN(e,t)&&kU(n)&&bU(n,"value"))||bU(n,"get")||bU(n,"set")||n.configurable||bU(n,"writable")&&!n.writable||bU(n,"enumerable")&&!n.enumerable?PU(e,t,n):(e[t]=n.value,e)};cU?(XU||(xU.f=rN,VU.f=iN,eN(HU,"buffer"),eN(HU,"byteOffset"),eN(HU,"byteLength"),eN(HU,"length")),aU({target:"Object",stat:!0,forced:!XU},{getOwnPropertyDescriptor:rN,defineProperty:iN}),LO.exports=function(e,t,n){var r=e.match(/\d+$/)[0]/8,i=e+(n?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=sU[i],u=s,c=u&&u.prototype,l={},h=function(e,t){PU(e,t,{get:function(){return function(e,t){var n=GU(e);return n.view[o](t*r+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,i){var o=GU(e);n&&(i=(i=NU(i))<0?0:i>255?255:255&i),o.view[a](t*r+o.byteOffset,i,!0)}(this,t,e)},enumerable:!0})};XU?lU&&(u=t((function(e,t,n,i){return dU(e,c),FU(kU(t)?tN(t)?void 0!==i?new s(t,gU(n,r),i):void 0!==n?new s(t,gU(n,r)):new s(t):KU(t)?$U(u,t):uU(IU,u,t):new s(yU(t)),e,u)})),wU&&wU(u,jU),CU(DU(s),(function(e){e in u||vU(u,e,s[e])})),u.prototype=c):(u=t((function(e,t,n,i){dU(e,c);var o,a,s,l=0,A=0;if(kU(t)){if(!tN(t))return KU(t)?$U(u,t):uU(IU,u,t);o=t,A=gU(n,r);var d=t.byteLength;if(void 0===i){if(d%r)throw BU(qU);if((a=d-A)<0)throw BU(qU)}else if((a=mU(i)*r)+A>d)throw BU(qU);s=a/r}else s=yU(t),o=new MU(a=s*r);for(OU(e,{buffer:o,byteOffset:A,byteLength:a,length:s,view:new YU(o)});l<s;)h(e,l++)})),wU&&wU(u,jU),c=u.prototype=RU(HU)),c.constructor!==u&&vU(c,"constructor",u),ZU(c).TypedArrayConstructor=u,QU&&vU(c,QU,i);var A=u!=s;l[i]=u,aU({global:!0,constructor:!0,forced:A,sham:!XU},l),zU in u||vU(u,zU,r),zU in c||vU(c,zU,r),LU(i)}):LO.exports=function(){};var oN=LO.exports;oN("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var aN=hT,sN=aT,uN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("at",(function(e){var t=uN(this),n=aN(t),r=sN(e),i=r>=0?r:n+r;return i<0||i>=n?void 0:t[i]}));var cN=Xb,lN=TypeError,hN=function(e,t){if(!delete e[t])throw lN("Cannot delete property "+cN(t)+" of "+cN(e))},AN=x_,dN=bR,fN=hT,vN=hN,pN=Math.min,mN=[].copyWithin||function(e,t){var n=AN(this),r=fN(n),i=dN(e,r),o=dN(t,r),a=arguments.length>2?arguments[2]:void 0,s=pN((void 0===a?r:dN(a,r))-o,r-i),u=1;for(o<i&&i<o+s&&(u=-1,o+=s-1,i+=s-1);s-- >0;)o in n?n[i]=n[o]:vN(n,i),i+=u,o+=u;return n},yN=fZ,gN=S_(mN),_N=yN.aTypedArray;(0,yN.exportTypedArrayMethod)("copyWithin",(function(e,t){return gN(_N(this),e,t,arguments.length>2?arguments[2]:void 0)}));var bN=MT.every,EN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("every",(function(e){return bN(EN(this),e,arguments.length>1?arguments[1]:void 0)}));var kN=nG,TN=HP,RN=Pk,SN=Zb,wN=__,DN=fZ.aTypedArray,IN=fZ.exportTypedArrayMethod,CN=S_("".slice);IN("fill",(function(e){var t=arguments.length;DN(this);var n="Big"===CN(RN(this),0,3)?TN(e):+e;return SN(kN,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),wN((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var LN=hT,VN=BI,xN=fZ.aTypedArrayConstructor,FN=fZ.getTypedArrayConstructor,GN=function(e){return xN(VN(e,FN(e)))},ON=function(e,t){for(var n=0,r=LN(t),i=new e(r);r>n;)i[n]=t[n++];return i},ZN=GN,PN=MT.filter,UN=function(e,t){return ON(ZN(e),t)},NN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("filter",(function(e){var t=PN(NN(this),e,arguments.length>1?arguments[1]:void 0);return UN(this,t)}));var BN=MT.find,MN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("find",(function(e){return BN(MN(this),e,arguments.length>1?arguments[1]:void 0)}));var WN=MT.findIndex,YN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("findIndex",(function(e){return WN(YN(this),e,arguments.length>1?arguments[1]:void 0)}));var XN=zk,QN=nT,jN=x_,HN=hT,JN=function(e){var t=1==e;return function(n,r,i){for(var o,a=jN(n),s=QN(a),u=XN(r,i),c=HN(s);c-- >0;)if(u(o=s[c],c,a))switch(e){case 0:return o;case 1:return c}return t?-1:void 0}},KN={findLast:JN(0),findLastIndex:JN(1)},zN=KN.findLast,qN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("findLast",(function(e){return zN(qN(this),e,arguments.length>1?arguments[1]:void 0)}));var $N=KN.findLastIndex,eB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("findLastIndex",(function(e){return $N(eB(this),e,arguments.length>1?arguments[1]:void 0)}));var tB=MT.forEach,nB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("forEach",(function(e){tB(nB(this),e,arguments.length>1?arguments[1]:void 0)}));var rB=SR.includes,iB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("includes",(function(e){return rB(iB(this),e,arguments.length>1?arguments[1]:void 0)}));var oB=SR.indexOf,aB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("indexOf",(function(e){return oB(aB(this),e,arguments.length>1?arguments[1]:void 0)}));var sB=u_,uB=__,cB=S_,lB=fZ,hB=SO,AB=pb("iterator"),dB=sB.Uint8Array,fB=cB(hB.values),vB=cB(hB.keys),pB=cB(hB.entries),mB=lB.aTypedArray,yB=lB.exportTypedArrayMethod,gB=dB&&dB.prototype,_B=!uB((function(){gB[AB].call([1])})),bB=!!gB&&gB.values&&gB[AB]===gB.values&&"values"===gB.values.name,EB=function(){return fB(mB(this))};yB("entries",(function(){return pB(mB(this))}),_B),yB("keys",(function(){return vB(mB(this))}),_B),yB("values",EB,_B||!bB,{name:"values"}),yB(AB,EB,_B||!bB,{name:"values"});var kB=fZ.aTypedArray,TB=fZ.exportTypedArrayMethod,RB=S_([].join);TB("join",(function(e){return RB(kB(this),e)}));var SB=$w,wB=sR,DB=aT,IB=hT,CB=YT,LB=Math.min,VB=[].lastIndexOf,xB=!!VB&&1/[1].lastIndexOf(1,-0)<0,FB=CB("lastIndexOf"),GB=xB||!FB?function(e){if(xB)return SB(VB,this,arguments)||0;var t=wB(this),n=IB(t),r=n-1;for(arguments.length>1&&(r=LB(r,DB(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:VB,OB=$w,ZB=GB,PB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return OB(ZB,PB(this),t>1?[e,arguments[1]]:[e])}));var UB=MT.map,NB=GN,BB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("map",(function(e){return UB(BB(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(NB(e))(t)}))}));var MB=Jb,WB=x_,YB=nT,XB=hT,QB=TypeError,jB=function(e){return function(t,n,r,i){MB(n);var o=WB(t),a=YB(o),s=XB(o),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw QB("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in a&&(i=n(i,a[u],u,o));return i}},HB={left:jB(!1),right:jB(!0)},JB=HB.left,KB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return JB(KB(this),e,t,t>1?arguments[1]:void 0)}));var zB=HB.right,qB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return zB(qB(this),e,t,t>1?arguments[1]:void 0)}));var $B=fZ.aTypedArray,eM=fZ.exportTypedArrayMethod,tM=Math.floor;eM("reverse",(function(){for(var e,t=this,n=$B(t).length,r=tM(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t}));var nM=u_,rM=Zb,iM=fZ,oM=hT,aM=WP,sM=x_,uM=__,cM=nM.RangeError,lM=nM.Int8Array,hM=lM&&lM.prototype,AM=hM&&hM.set,dM=iM.aTypedArray,fM=iM.exportTypedArrayMethod,vM=!uM((function(){var e=new Uint8ClampedArray(2);return rM(AM,e,{length:1,0:3},1),3!==e[1]})),pM=vM&&iM.NATIVE_ARRAY_BUFFER_VIEWS&&uM((function(){var e=new lM(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));fM("set",(function(e){dM(this);var t=aM(arguments.length>1?arguments[1]:void 0,1),n=sM(e);if(vM)return rM(AM,this,n,t);var r=this.length,i=oM(n),o=0;if(i+t>r)throw cM("Wrong length");for(;o<i;)this[t+o]=n[o++]}),!vM||pM);var mM=GN,yM=MI,gM=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("slice",(function(e,t){for(var n=yM(gM(this),e,t),r=mM(this),i=0,o=n.length,a=new r(o);o>i;)a[i]=n[i++];return a}),__((function(){new Int8Array(1).slice()})));var _M=MT.some,bM=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("some",(function(e){return _M(bM(this),e,arguments.length>1?arguments[1]:void 0)}));var EM=_S,kM=Math.floor,TM=function(e,t){var n=e.length,r=kM(n/2);return n<8?RM(e,t):SM(e,TM(EM(e,0,r),t),TM(EM(e,r),t),t)},RM=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},SM=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},wM=TM,DM=J_.match(/firefox\/(\d+)/i),IM=!!DM&&+DM[1],CM=/MSIE|Trident/.test(J_),LM=J_.match(/AppleWebKit\/(\d+)\./),VM=!!LM&&+LM[1],xM=jk,FM=__,GM=Jb,OM=wM,ZM=IM,PM=CM,UM=nb,NM=VM,BM=fZ.aTypedArray,MM=fZ.exportTypedArrayMethod,WM=u_.Uint16Array,YM=WM&&xM(WM.prototype.sort),XM=!(!YM||FM((function(){YM(new WM(2),null)}))&&FM((function(){YM(new WM(2),{})}))),QM=!!YM&&!FM((function(){if(UM)return UM<74;if(ZM)return ZM<67;if(PM)return!0;if(NM)return NM<602;var e,t,n=new WM(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(YM(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));MM("sort",(function(e){return void 0!==e&&GM(e),QM?YM(this,e):OM(BM(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!QM||XM);var jM=cT,HM=bR,JM=GN,KM=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("subarray",(function(e,t){var n=KM(this),r=n.length,i=HM(e,r);return new(JM(n))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,jM((void 0===t?r:HM(t,r))-i))}));var zM=$w,qM=fZ,$M=__,eW=MI,tW=u_.Int8Array,nW=qM.aTypedArray,rW=qM.exportTypedArrayMethod,iW=[].toLocaleString,oW=!!tW&&$M((function(){iW.call(new tW(1))}));rW("toLocaleString",(function(){return zM(iW,oW?eW(nW(this)):nW(this),eW(arguments))}),$M((function(){return[1,2].toLocaleString()!=new tW([1,2]).toLocaleString()}))||!$M((function(){tW.prototype.toLocaleString.call([1,2])})));var aW=fZ.exportTypedArrayMethod,sW=__,uW=S_,cW=u_.Uint8Array,lW=cW&&cW.prototype||{},hW=[].toString,AW=uW([].join);sW((function(){hW.call({})}))&&(hW=function(){return AW(this)});var dW=lW.toString!=hW;aW("toString",hW,dW);var fW=new(function(){function e(){var t,n=this;by(this,e);try{var r=/xgd=(\d)/.exec(document.cookie);this._status=!!r,this._level=r&&r[1]}catch(i){this._status=!1}$l(t=["group","groupEnd","log","warn","error"]).call(t,(function(e){n[e]=function(t,r,i,o,a,s,u,c,l,h){var A,d,f;if(n._status){var v=t,p=Vl(A=[r,i,o,a,s,u,c,l,h]).call(A,(function(e){return void 0!==e}));(f=console)[e].apply(f,dg(d=["["+v+"]:"]).call(d,Vy(p)))}}}))}return ky(e,[{key:"enable",get:function(){return this._status}},{key:"long",get:function(){return"2"===this._level}}]),e}());function vW(e,t){if(e&&t){var n=new Uint8Array(e.byteLength+t.byteLength+11);n[0]=1,n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=255,n[5]=225;var r=6;return n.set(new Uint8Array([e.byteLength>>>8&255,255&e.byteLength]),r),r+=2,n.set(e,r),n[r+=e.byteLength]=1,r++,n.set(new Uint8Array([t.byteLength>>>8&255,255&t.byteLength]),r),r+=2,n.set(t,r),n}}var pW=I,mW=p,yW=V,gW=o,_W=di,bW=eo,EW=x,kW=Je,TW=Y,RW=Object.assign,SW=Object.defineProperty,wW=mW([].concat),DW=!RW||gW((function(){if(pW&&1!==RW({b:1},RW(SW({},"a",{enumerable:!0,get:function(){SW(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=RW({},e)[n]||_W(RW({},t)).join("")!=r}))?function(e,t){for(var n=kW(e),r=arguments.length,i=1,o=bW.f,a=EW.f;r>i;)for(var s,u=TW(arguments[i++]),c=o?wW(_W(u),o(u)):_W(u),l=c.length,h=0;l>h;)s=c[h++],pW&&!yW(a,u,s)||(n[s]=u[s]);return n}:RW,IW=DW;In({target:"Object",stat:!0,arity:2,forced:Object.assign!==IW},{assign:IW});var CW=n(te.Object.assign),LW=_b,VW=S_,xW=Zb,FW=__,GW=WS,OW=OR,ZW=tR,PW=x_,UW=nT,NW=Object.assign,BW=Object.defineProperty,MW=VW([].concat),WW=!NW||FW((function(){if(LW&&1!==NW({b:1},NW(BW({},"a",{enumerable:!0,get:function(){BW(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=NW({},e)[n]||GW(NW({},t)).join("")!=r}))?function(e,t){for(var n=PW(e),r=arguments.length,i=1,o=OW.f,a=ZW.f;r>i;)for(var s,u=UW(arguments[i++]),c=o?MW(GW(u),o(u)):GW(u),l=c.length,h=0;l>h;)s=c[h++],LW&&!xW(a,u,s)||(n[s]=u[s]);return n}:NW,YW=WW;cS({target:"Object",stat:!0,arity:2,forced:Object.assign!==YW},{assign:YW});var XW="xg-video",QW=!1;try{QW=WebAssembly&&WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))}catch(b6){}var jW={preloadDecoder:!1,reuseWasmDecoder:!0,reuseMseForAudio:!1,preciseSeek:0,h264WithWebcodec:!0,lowDecodeThreshold:100,wasmFallbackToAsm:!1,audioWithMse:!0,canUseThreadMode:!1,disabledWhenErrorOccur:!0,disabledDuration:43200,evaluateVVCount:0,disabledByLowdecodePrecent:.5,maxDecodeOnceWasm:QW?6:8,maxDecodeOnceFirstTime:8,maxDecodeOnceWebcodec:20};function HW(){return XW}function JW(){return jW}function KW(){var e="undefined"!=typeof customElements&&customElements.get(XW);return e?{H264_DECODER_URL:e.h264Url,ASM_H264_DECODER_URL:e.h264AsmUrl,H265_DECODER_URL:e.h265Url,H265_THREAD_DECODER_URL:e.h265ThreadUrl,H265_SIMD_DECODER_URL:e.h265SimdUrl,ASM_H265_DECODER_URL:e.h265AsmUrl}:{}}function zW(){if("undefined"==typeof customElements)return!1;var e=customElements.get(XW);return QW&&!(null==e||!e.h265SimdUrl)}function qW(){if("undefined"==typeof customElements)return!1;var e=customElements.get(XW);return!!window.SharedArrayBuffer&&!(null==e||!e.h265ThreadUrl)}var $W=!1;try{var eY,tY;$W="1"===(null===(eY=localStorage)||void 0===eY||null===(tY=eY.getItem)||void 0===tY?void 0:tY.call(eY,"_sds"))}catch(b6){}var nY=0,rY=0,iY=0,oY=!1;function aY(e){localStorage.setItem("xgv_dis",e),2===e&&localStorage.setItem("xgv_dist",(new Date).getTime())}function sY(){if(!0===(!!oY||0!==JW().evaluateVVCount&&(nY===JW().evaluateVVCount&&(iY=rY/nY),iY>=JW().disabledByLowdecodePrecent&&(oY=!0),oY)))return!0;var e=localStorage.getItem("xgv_dis");if(!e)return!1;if("1"===e)return!0;if("2"===e){var t=localStorage.getItem("xgv_dist")||0;if(t=Number(t),((new Date).getTime()-t)/1e3<JW().disabledDuration)return!0;uY()}}function uY(){localStorage.removeItem("xgv_dist"),localStorage.removeItem("xgv_dis")}var cY={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),u=n?n+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 a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}wh&&(r.prototype=wh(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?hm(r).call(r,1):r);return Tl?dg(i).call(i,Tl(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){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,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,a),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var A,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),h){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,r);break;case 4:l[c].fn.call(l[c].context,t,r,i);break;default:if(!u)for(A=1,u=new Array(h-1);A<h;A++)u[A-1]=arguments[A];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(cY);var lY=n(cY.exports),hY=i.isFinite;In({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&hY(e)}});var AY=n(te.Number.isFinite),dY=Le,fY=Je,vY=Y,pY=Un,mY=TypeError,yY=function(e){return function(t,n,r,i){dY(n);var o=fY(t),a=vY(o),s=pY(o),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw mY("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in a&&(i=n(i,a[u],u,o));return i}},gY={left:yY(!1),right:yY(!0)}.left;In({target:"Array",proto:!0,forced:!$A&&ve>79&&ve<83||!Wl("reduce")},{reduce:function(e){var t=arguments.length;return gY(this,e,t,t>1?arguments[1]:void 0)}});var _Y=wl("Array").reduce,bY=se,EY=_Y,kY=Array.prototype,TY=n((function(e){var t=e.reduce;return e===kY||bY(kY,e)&&t===kY.reduce?EY:t})),RY=u_.isFinite;cS({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&RY(e)}});var SY=cS,wY=dT,DY=wT,IY=kb,CY=bR,LY=hT,VY=sR,xY=fS,FY=pb,GY=MI,OY=sI("slice"),ZY=FY("species"),PY=Array,UY=Math.max;SY({target:"Array",proto:!0,forced:!OY},{slice:function(e,t){var n,r,i,o=VY(this),a=LY(o),s=CY(e,a),u=CY(void 0===t?a:t,a);if(wY(o)&&(n=o.constructor,(DY(n)&&(n===PY||wY(n.prototype))||IY(n)&&null===(n=n[ZY]))&&(n=void 0),n===PY||void 0===n))return GY(o,s,u);for(r=new(void 0===n?PY:n)(UY(u-s,0)),i=0;s<u;s++,i++)s in o&&xY(r,i,o[s]);return r.length=i,r}});var NY={WAITING:0,CANPLAY:1,PLAY:2,PLAYING:3,PAUSE:4,SEEKING:5,SEEKED:6,LOADEDDATA:7,LOADEDMETADATA:8,TIMEUPDATE:9,DURATION_CHANGE:10,VOLUME_CHANGE:11,PROGRESS:12,ERROR:13,ENDED:14,RESIZE:15,LOADSTART:16,DECODE_FPS:17,LOW_DECODE:18,LARGE_AV_GAP:19,FIRST_FRAME:20},BY=["waiting","canplay","play","playing","pause","seeking","seeked","loadeddata","loadedmetadata","timeupdate","durationchange","volumechange","progress","error","ended","resize","loadstart","decodefps","lowdecode","largeavgap","firstframe"],MY={AUDIO_READY:"audio_ready",AUDIO_NOT_ALLOWED_AUTOPLAY:"audio_not_allowed_autoplay",AUDIO_WAITING:"audio_waiting",AUDIO_SYNC_DTS:"audio_sync_dts"},WY={VIDEO_DECODER_INIT:"video_decode_init",VIDEO_READY:"video_ready",VIDEO_WAITING:"video_waiting",AUTO_RUN:"auto_run",DECODE_LOW_FPS:"decode_low_fps",UPDATE_VIDEO_FILLTYPE:"update_video_filltype",UPDATE_VIDEO_COVER_POSITION:"update_video_cover_position"},YY={PLAY_EVENT:"play_event",SET_METADATA:"set_metadata",APPEND_CHUNKS:"append_chunks",START_RENDER:"start_render",DO_PLAY:"do_play",DO_PAUSE:"do_pause",DO_SEEK:"do_seek",SET_PLAYBACKRATE:"set_playbackrate",SYNC_DTS:"sync_dts",RESET_BASE_DTS:"reset_base_dts",UPDATE_VOLUME:"update_volume",SINGLE_TRACK:"single_track",DESTROY:"destroy",READY:"ready",UPDATE_GL_OPTIONS:"update_gl_options",SET_VIDEO_DURATION:"set_video_duration",SET_PLAY_MODE:"set_play_mode",UPDATE_CAPABILITY_LEVEL:"update_capability_level",INNER_DEGRADE:"inner_degrade",ADJUST_SEEK_TIME:"adjust_seek_time",CHASE_FRAME:"chase_frame",END_OF_STREAM:"end_of_stream",UPDATE_SEGMENT_END:"update_segment_end"},XY={INIT:"init",READY:"decoderready",REMUX:"remux",INIT_FAILED:"initfailed",DATAREADY:"dataReady",PLAY_FAILED:"playfailed",FRAGMENT_END:"fragmentEnd",APPEND_VIDEO:"appendVideo",FIRST_FRAME:"firstFrame",DECODED:"decoded",RENDE_END:"rendeEnd",CHASE_VIDEO_FRAME:"chaseVideoFrame",CHASE_VIDEO_FRAME_END:"chaseVideoFrameEnd",CHASE_AUDIO_FRAME:"chaseAudioFrame",INIT_SEGMENT:"initSegment",MEDIA_SEGMENT:"mediaSegment",FRAME_MAX_COUNY:"frameMaxCount",FRAME_MIN_COUNY:"frameMinCount"},QY=function(e){Ry(n,e);var t=Iy(n);function n(e,r){var i;return by(this,n),(i=t.call(this))._config=e,i._parent=r,i._meta=null,i._ready=!1,i._isLive=!0,i._innerDegrade=!1,i._singleTrack=-1,i}return ky(n,[{key:"analyse",get:function(){return this._parent.analyse}},{key:"isLive",get:function(){return this._isLive}},{key:"innerDegrade",get:function(){return this._innerDegrade}},{key:"noAudio",get:function(){return 1===this._singleTrack||2===this._singleTrack}},{key:"noVideo",get:function(){return 3===this._singleTrack}},{key:"duration",get:function(){return this._timeRange.duration},set:function(e){this._timeRange&&(this._timeRange.duration=e)}},{key:"_bindEvents",value:function(){var e,t,n,r,i,o,a,s,u=this;this._parent.on(YY.APPEND_CHUNKS,Dm(e=this._appendChunk).call(e,this)),this._parent.on(YY.RESET_BASE_DTS,Dm(t=this._resetDts).call(t,this)),this._parent.on(YY.START_RENDER,Dm(n=this._startRender).call(n,this)),this._parent.on(YY.DO_PLAY,Dm(r=this._doPlay).call(r,this)),this._parent.on(YY.DO_PAUSE,Dm(i=this._doPause).call(i,this)),this._parent.on(YY.DO_SEEK,Dm(o=this._doSeek).call(o,this)),this._parent.on(YY.DESTROY,Dm(a=this._destroy).call(a,this)),this._parent.on(YY.CHASE_FRAME,Dm(s=this._doChaseFrame).call(s,this)),this._parent.on(YY.SINGLE_TRACK,(function(e){u._singleTrack=e})),this._parent.on(YY.SET_PLAY_MODE,(function(e){u._isLive="LIVE"===e})),this._parent.on(YY.INNER_DEGRADE,(function(){u._innerDegrade=!0})),this._parent.on(YY.SET_VIDEO_DURATION,(function(e){u.duration=e}))}}]),n}(lY),jY=we,HY=TypeError,JY=function(e,t){if(!delete e[t])throw HY("Cannot delete property "+jY(t)+" of "+jY(e))},KY=Hi,zY=Math.floor,qY=function(e,t){var n=e.length,r=zY(n/2);return n<8?$Y(e,t):eX(e,qY(KY(e,0,r),t),qY(KY(e,r),t),t)},$Y=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},eX=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},tX=qY,nX=ue.match(/firefox\/(\d+)/i),rX=!!nX&&+nX[1],iX=/MSIE|Trident/.test(ue),oX=ue.match(/AppleWebKit\/(\d+)\./),aX=!!oX&&+oX[1],sX=In,uX=p,cX=Le,lX=Je,hX=Un,AX=JY,dX=Qr,fX=o,vX=tX,pX=Wl,mX=rX,yX=iX,gX=ve,_X=aX,bX=[],EX=uX(bX.sort),kX=uX(bX.push),TX=fX((function(){bX.sort(void 0)})),RX=fX((function(){bX.sort(null)})),SX=pX("sort"),wX=!fX((function(){if(gX)return gX<70;if(!(mX&&mX>3)){if(yX)return!0;if(_X)return _X<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)bX.push({k:t+r,v:n})}for(bX.sort((function(e,t){return t.v-e.v})),r=0;r<bX.length;r++)t=bX[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));sX({target:"Array",proto:!0,forced:TX||!RX||!SX||!wX},{sort:function(e){void 0!==e&&cX(e);var t=lX(this);if(wX)return void 0===e?EX(t):EX(t,e);var n,r,i=[],o=hX(t);for(r=0;r<o;r++)r in t&&kX(i,t[r]);for(vX(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:dX(t)>dX(n)?1:-1}}(e)),n=hX(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)AX(t,r++);return t}});var DX=wl("Array").sort,IX=se,CX=DX,LX=Array.prototype,VX=n((function(e){var t=e.sort;return e===LX||IX(LX,e)&&t===LX.sort?CX:t})),xX=cS,FX=S_,GX=Jb,OX=x_,ZX=hT,PX=hN,UX=LS,NX=__,BX=wM,MX=YT,WX=IM,YX=CM,XX=nb,QX=VM,jX=[],HX=FX(jX.sort),JX=FX(jX.push),KX=NX((function(){jX.sort(void 0)})),zX=NX((function(){jX.sort(null)})),qX=MX("sort"),$X=!NX((function(){if(XX)return XX<70;if(!(WX&&WX>3)){if(YX)return!0;if(QX)return QX<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)jX.push({k:t+r,v:n})}for(jX.sort((function(e,t){return t.v-e.v})),r=0;r<jX.length;r++)t=jX[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));xX({target:"Array",proto:!0,forced:KX||!zX||!qX||!$X},{sort:function(e){void 0!==e&&GX(e);var t=OX(this);if($X)return void 0===e?HX(t):HX(t,e);var n,r,i=[],o=ZX(t);for(r=0;r<o;r++)r in t&&JX(i,t[r]);for(BX(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:UX(t)>UX(n)?1:-1}}(e)),n=ZX(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)PX(t,r++);return t}});var eQ=function(){function e(t){by(this,e),this.TAG="AudioTimeRange",this._parent=t,this._buffers=[],this._duration=0,this._baseDts=0,this._lastBuffer=null}return ky(e,[{key:"isLive",get:function(){return this._parent.isLive}},{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e}},{key:"buffered",get:function(){var e=this;if(this.isLive)return{length:this._duration?1:0,start:function(){return 0},end:function(){return e._duration}};var t=this._mergeBufferRanges();return{length:t.length,start:function(e){var n=t[e];return n?n.start:0},end:function(e){var n=t[e];return n?n.end:1/0}}}},{key:"resetDts",value:function(e){this._baseDts=e}},{key:"_transitionSamples",value:function(e){for(var t=e.numberOfChannels,n=e.length,r=512,i=0;i<t;i++){for(var o=e.getChannelData(i),a=0;a<r;a++)o[a]=o[a]*a/r;for(var s=n-r;s<n;s++)o[s]=o[s]*(n-s)/r}}},{key:"append",value:function(e,t,n,r){var i,o,a;-1===this._baseDts&&(this._baseDts=n),this._transitionSamples(e);var s=(n-this._baseDts)/1e3,u=s+t,c={start:s,end:u,startDts:n,source:e,duration:t,delay:r};if(fW.log(this.TAG,dg(i=dg(o="add new buffer range, startDts:".concat(n,", [")).call(o,c.start," , ")).call(i,c.end,"]")),!Vl(a=this._buffers).call(a,(function(e){return e.start===s})).length)return this._buffers.push(c),this.isLive&&(this._duration=u),c.start;console.error("音频重复")}},{key:"deletePassed",value:function(e){var t;return this._buffers=Vl(t=this._buffers).call(t,(function(t){return t.start>=e})),this._buffers[0]}},{key:"canSeek",value:function(e){var t=this._buffers[this._buffers.length-1];return!!t&&!(t.start<e)}},{key:"_mergeBufferRanges",value:function(){var e,t,n=VX(e=hm(t=this._buffers).call(t)).call(e,(function(e,t){return e.start>t.start?1:-1})),r=n.length,i=[];if(!r)return i;for(var o={start:n[0].start,end:n[0].end},a=1;a<r;a++){var s=n[a];Math.abs(o.end-s.start)<.5?o.end=s.end:(i.push(o),o={start:s.start,end:s.end})}return i.push(o),i}},{key:"getBuffer",value:function(e){var t,n,r;if(this.isLive)return this._buffers.shift();var i=Vl(t=this._buffers).call(t,(function(t){return t.start<e+.5&&t.end>e+.5}))[0];return fW.log(this.TAG,dg(n=dg(r="get audio buffer , currentTime:".concat(e," ,buffer:[")).call(r,i&&i.start," , ")).call(n,i&&i.end,"]")),0!==e||i?i:this._buffers[0]}},{key:"hasBuffer",value:function(){var e;return!(null===(e=this._buffers)||void 0===e||!e.length)}}]),e}(),tQ=[-5504,-5248,-6016,-5760,-4480,-4224,-4992,-4736,-7552,-7296,-8064,-7808,-6528,-6272,-7040,-6784,-2752,-2624,-3008,-2880,-2240,-2112,-2496,-2368,-3776,-3648,-4032,-3904,-3264,-3136,-3520,-3392,-22016,-20992,-24064,-23040,-17920,-16896,-19968,-18944,-30208,-29184,-32256,-31232,-26112,-25088,-28160,-27136,-11008,-10496,-12032,-11520,-8960,-8448,-9984,-9472,-15104,-14592,-16128,-15616,-13056,-12544,-14080,-13568,-344,-328,-376,-360,-280,-264,-312,-296,-472,-456,-504,-488,-408,-392,-440,-424,-88,-72,-120,-104,-24,-8,-56,-40,-216,-200,-248,-232,-152,-136,-184,-168,-1376,-1312,-1504,-1440,-1120,-1056,-1248,-1184,-1888,-1824,-2016,-1952,-1632,-1568,-1760,-1696,-688,-656,-752,-720,-560,-528,-624,-592,-944,-912,-1008,-976,-816,-784,-880,-848,5504,5248,6016,5760,4480,4224,4992,4736,7552,7296,8064,7808,6528,6272,7040,6784,2752,2624,3008,2880,2240,2112,2496,2368,3776,3648,4032,3904,3264,3136,3520,3392,22016,20992,24064,23040,17920,16896,19968,18944,30208,29184,32256,31232,26112,25088,28160,27136,11008,10496,12032,11520,8960,8448,9984,9472,15104,14592,16128,15616,13056,12544,14080,13568,344,328,376,360,280,264,312,296,472,456,504,488,408,392,440,424,88,72,120,104,24,8,56,40,216,200,248,232,152,136,184,168,1376,1312,1504,1440,1120,1056,1248,1184,1888,1824,2016,1952,1632,1568,1760,1696,688,656,752,720,560,528,624,592,944,912,1008,976,816,784,880,848],nQ=[-32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956,-23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764,-15996,-15484,-14972,-14460,-13948,-13436,-12924,-12412,-11900,-11388,-10876,-10364,-9852,-9340,-8828,-8316,-7932,-7676,-7420,-7164,-6908,-6652,-6396,-6140,-5884,-5628,-5372,-5116,-4860,-4604,-4348,-4092,-3900,-3772,-3644,-3516,-3388,-3260,-3132,-3004,-2876,-2748,-2620,-2492,-2364,-2236,-2108,-1980,-1884,-1820,-1756,-1692,-1628,-1564,-1500,-1436,-1372,-1308,-1244,-1180,-1116,-1052,-988,-924,-876,-844,-812,-780,-748,-716,-684,-652,-620,-588,-556,-524,-492,-460,-428,-396,-372,-356,-340,-324,-308,-292,-276,-260,-244,-228,-212,-196,-180,-164,-148,-132,-120,-112,-104,-96,-88,-80,-72,-64,-56,-48,-40,-32,-24,-16,-8,0,32124,31100,30076,29052,28028,27004,25980,24956,23932,22908,21884,20860,19836,18812,17788,16764,15996,15484,14972,14460,13948,13436,12924,12412,11900,11388,10876,10364,9852,9340,8828,8316,7932,7676,7420,7164,6908,6652,6396,6140,5884,5628,5372,5116,4860,4604,4348,4092,3900,3772,3644,3516,3388,3260,3132,3004,2876,2748,2620,2492,2364,2236,2108,1980,1884,1820,1756,1692,1628,1564,1500,1436,1372,1308,1244,1180,1116,1052,988,924,876,844,812,780,748,716,684,652,620,588,556,524,492,460,428,396,372,356,340,324,308,292,276,260,244,228,212,196,180,164,148,132,120,112,104,96,88,80,72,64,56,48,40,32,24,16,8,0],rQ=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]);var iQ={decodeG711:function(e,t){if("g7110a"===t)return function(e){for(var t=new Uint8Array(2*e.length),n=0,r=0;n<e.length;){var i=tQ[e[n]];if(void 0===i)throw new Error("can not decode g711 alaw data!");t[r]=255&i,t[r+1]=i>>8,n+=1,r+=2}return t}(e);if("g7110m"===t)return function(e){for(var t=new Uint8Array(2*e.length),n=0,r=0;n<e.length;){var i=nQ[e[n]];if(void 0===i)throw new Error("can not decode g711 ulaw data!");t[r]=255&i,t[r+1]=i>>8,n+=1,r+=2}return t}(e);throw new Error("no supported format=".concat(t," for g711"))},createAudioBufferFromPcm:function(e,t,n,r,i){for(var o,a=function(e,t,n){return e/t/n}(t.byteLength,n,i),s=e.createBuffer(n,a,r),u=new DataView(t),c=0;c<n;c++)for(var l=s.getChannelData(c),h=void 0,A=0;A<a;A++)h=u.getUint16(A*(2*n)+2*c,!0),l[A]=(o=h)>=32768?-(65536-o)/32768:o/32767;return{audioBuffer:s,duration:a/r}},packageAACToAdts:function(e,t){var n=new Uint8Array(t.data.byteLength+7),r=function(e,t){var n=e.sampleRateIndex,r=e.channelCount;n=function(e,t){var n=(7&e[0])<<1|e[1]>>>7;return n!==t?n:t}(e.config,n);var i=new Uint8Array(7);i[0]=255,i[1]=240,i[1]=1|i[1],i[2]=64,i[2]=i[2]|60&n<<2,i[2]=i[2]|1&r>>2,i[3]=192&r<<6;var o=t.byteLength+7;return i[3]=i[3]|3&o>>11,i[4]=255&o>>3,i[5]=224&o<<5,i[5]=31|i[5],i[6]=252,i}(e,t.data);return n.set(r),n.set(t.data,7),n},concatAdts:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0,r=0,i=e.length;r<i;r++)t&&r%t==0||(n+=e[r].byteLength);for(var o=new Uint8Array(n),a=0,s=0,u=e.length;s<u;s++)t&&s%t==0||(o.set(e[s],a),a+=e[s].byteLength);return o},checkRefillFrame:function(e){var t=e[0].dts,n=Vl(e).call(e,(function(e){return e.dts===t})).length;if(!(n<=1))for(var r=0;r<n;r++)e[r].data=rQ}},oQ="create new AudioContext error",aQ=function(e){Ry(i,e);var t,n,r=Iy(i);function i(e,t){var n,o;return by(this,i),Ty(Dy(o=r.call(this,e,t)),"doPause",o._doPause),o.TAG="AudioRender",o._timeRange=new eQ(Dy(o)),o._lastTimeLineTime=0,o._sampleQueue=[],o._source=null,o._audioCanAutoplay=!0,o._lastBuffer=null,o._inDecoding=!1,o._endOfStream=!1,o._delay=0,o._isSourceBufferEnd=-1,o._onSourceBufferEnded=Dm(n=o._onSourceBufferEnded).call(n,Dy(o)),o._initAudioCtx(e.volume||.6),o._bindEvents(),o}return ky(i,[{key:"baseDts",get:function(){return this._timeRange._baseDts}},{key:"currentTime",get:function(){return this._audioCtx?this._lastTimeLineTime+this._audioCtx.currentTime:0}},{key:"preloadTime",get:function(){return this.isLive?1:0}},{key:"timescale",get:function(){return 1e3}},{key:"buffered",get:function(){return this._timeRange.buffered}},{key:"ctxState",get:function(){return this._audioCtx.state}},{key:"audioCanAutoplay",get:function(){return this._audioCanAutoplay}},{key:"resume",value:function(){if(this._audioCtx&&"suspended"===this._audioCtx.state)return this._audioCtx.resume().catch((function(e){}))}},{key:"canSeek",value:function(e){return this._timeRange.canSeek(e)}},{key:"_assembleErr",value:function(e){var t=new Error(e);return t.code=3,t}},{key:"_emitTimelineEvents",value:function(e,t,n){var r,i;null===(r=this._parent)||void 0===r||null===(i=r.emit)||void 0===i||i.call(r,e,t,n)}},{key:"_initAudioCtx",value:function(e){var t=this;fW.log(this.TAG,"init audioCtx");var n=window.AudioContext||window.webkitAudioContext;return this._audioCtx=new n,this._audioCtx?(this._gainNode=this._audioCtx.createGain(),this._gainNode.gain.value=e,this._gainNode.connect(this._audioCtx.destination),this._audioCanAutoplay="running"===this._audioCtx.state,fW.log(this.TAG,"webAudio state:",this._audioCtx.state),vG(),this._bindAudioCtxEvent(),this._audioCtx.suspend()):(fW.warn(this.TAG,"create webaudio error!"),void Lg((function(){t._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,t._assembleErr(oQ))})))}},{key:"_bindAudioCtxEvent",value:function(){var e=this;this._onStateChange=function(){e._audioCtx&&"running"===e._audioCtx.state&&e._ready&&e._emitTimelineEvents(YY.PLAY_EVENT,NY.PLAYING)},this._audioCtx.addEventListener("statechange",this._onStateChange)}},{key:"_bindEvents",value:function(){var e,t=this;Cy(Sy(i.prototype),"_bindEvents",this).call(this),this._parent.on(XY.CHASE_AUDIO_FRAME,Dm(e=this._doChaseFrame).call(e,this)),this._parent.on(YY.UPDATE_VOLUME,(function(e){t._gainNode&&(t._gainNode.gain.value=AY(e)?e:1,t._emitTimelineEvents(YY.PLAY_EVENT,NY.VOLUME_CHANGE))})),this._parent.on(YY.END_OF_STREAM,(function(){var e;t._endOfStream=!0,t.noAudio||null!==(e=t._timeRange)&&void 0!==e&&e.hasBuffer()||null==t||t._emitTimelineEvents(YY.PLAY_EVENT,NY.ENDED)}))}},{key:"_appendChunk",value:function(e,t){if(!this.noAudio){this._meta||(this._meta=t,fW.warn(this.TAG,"audio set metadata",this._meta));var n,r=t.samples;if(r.length)if(this._sampleQueue=dg(n=this._sampleQueue).call(n,r),t.samples=[],"aac"===this._meta.codecType){if(this._inDecoding)return;this._decodeAACWrapper()}else this._decodeG711()}}},{key:"_resetDts",value:function(e,t){"video"!==t&&this._timeRange.resetDts(e)}},{key:"_doPlay",value:function(){this.noAudio||this._parent.seeking||(this._source||!this.currentTime?this.resume():this._startRender())}},{key:"_doPause",value:function(){this.noAudio||this._audioCtx.suspend()}},{key:"_reInitAudioCtx",value:function(e){var t=this;if(this._lastTimeLineTime=e,this._lastBuffer=null,this._lastAudioBufferInfo=null,this._delay=0,!this._ready||!this._audioCtx.currentTime)return Zp.resolve();var n=this._gainNode.gain.value;return this._audioCtx.close().then((function(){return t._audioCtx.removeEventListener("statechange",t._onStateChange),t._audioCtx=null,t._source&&t._source.removeEventListener("ended",t._onSourceBufferEnded),t._source=null,t._initAudioCtx(n)}))}},{key:"_doSeek",value:function(e){var t=this;this._reInitAudioCtx(e).then((function(){t._getAudioBuffer(!0)})).catch((function(e){}))}},{key:"_doChaseFrame",value:function(e){var t=this,n=e.position,r=this._timeRange.deletePassed(n);r&&(fW.log(this.TAG,"_doChaseFrame","startTime:",r.start,"buffeLength:",this.buffered.end(0)-r.start),this._reInitAudioCtx(r.start).then((function(){t._startRender(),t._emitTimelineEvents(YY.PLAY_EVENT,NY.TIMEUPDATE)})).catch((function(e){})))}},{key:"_decodeAACWrapper",value:(n=_y(yy().mark((function e(){var t,n,r,i,o,a,s,u,c,l;return yy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._sampleQueue.length,n=this._sampleQueue[0],r=this._sampleQueue[t-1],!((i=(r.dts-n.dts)/this.timescale)<1)){e.next=6;break}return e.abrupt("return");case 6:for(o=ug(i/3-1)||1,a=ug(t/o),s=[],u=0;u<o;u++){var h,A;u<o-1?s.push(hm(h=this._sampleQueue).call(h,u*a,(u+1)*a)):s.push(hm(A=this._sampleQueue).call(A,u*a))}return this._sampleQueue=[],this._inDecoding=!0,e.prev=12,e.next=15,this._decodeCycle(s);case 15:this._isLive||(c=this._timeRange._buffers,(l=c[c.length-1])&&this._emitTimelineEvents(YY.UPDATE_SEGMENT_END,l.end)),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),this._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,this._assembleErr("ERROR_MSG.DECODE_ERR:".concat(e.t0&&e.t0.message)));case 21:this._inDecoding=!1;case 22:case"end":return e.stop()}}),e,this,[[12,18]])}))),function(){return n.apply(this,arguments)})},{key:"_decodeCycle",value:(t=_y(yy().mark((function e(t){var n;return yy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.shift()){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._decodeAAC(n);case 5:return e.next=7,this._decodeCycle(t);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_decodeAAC",value:function(e){var t=this,n=e[0],r=0;iQ.checkRefillFrame(e);var i=zg(e).call(e,(function(e){return iQ.packageAACToAdts(t._meta,e)})),o=iQ.concatAdts(i,0);return new Zp((function(e,i){var a=t._audioCtx.decodeAudioData(o.buffer,(function(i){if(t._timeRange){if(t._lastAudioBufferInfo&&t.isLive){var o=t._lastAudioBufferInfo,a=o.dts+o.duration;(r=n.dts-a)>1&&(t._timeRange._duration+=r/1e3,fW.log(t.TAG,"_decodeAAC","audio data dts is not continue, last end dts:",a,",now start Dts:",n.dts,"delay:",r))}t._lastAudioBufferInfo={duration:Math.floor(1e3*i.duration),dts:n.dts};var s=t._timeRange.append(i,i.duration,n.dts,r/1e3);if(!t._ready){var u=Math.abs(s+i.duration-t.currentTime)<.5;(t.isLive||!u)&&(t._ready=!0,fW.log(t.TAG,"_decodeAAC","set ready true start=",s),t.emit(MY.AUDIO_READY,s))}t._emitTimelineEvents(YY.PLAY_EVENT,NY.PROGRESS),t._emitTimelineEvents(YY.PLAY_EVENT,NY.DURATION_CHANGE),e()}}),i);a.catch&&a.catch(i)}))}},{key:"_decodeG711",value:function(){var e,t,n=this._sampleQueue.length,r=this._sampleQueue[0];if(!((this._sampleQueue[n-1].dts-r.dts)/this.timescale<.5)){var i=TY(e=this._sampleQueue).call(e,(function(e,t){return e+=t.data.byteLength}),0),o=new Uint8Array(i),a=0,s=0;$l(t=this._sampleQueue).call(t,(function(e,t){0===t&&(a=e.dts),o.set(e.data,s),s+=e.data.byteLength})),this._sampleQueue=[];try{var u=this._meta,c=u.codecType,l=u.channelCount,h=u.sampleSize,A=u.sampleRate,d=iQ.decodeG711(o,c),f=iQ.createAudioBufferFromPcm(this._audioCtx,d.buffer,l,A,h/8),v=f.audioBuffer,p=f.duration,m=this._timeRange.append(v,p,a,0);this._ready||(this._ready=!0,fW.log(this.TAG,"_decodeG711","set ready true"),this.emit(MY.AUDIO_READY,m)),this._emitTimelineEvents(YY.PLAY_EVENT,NY.PROGRESS),this._emitTimelineEvents(YY.PLAY_EVENT,NY.DURATION_CHANGE)}catch(b6){this._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,this._assembleErr("ERROR_MSG.DECODE_ERR:".concat(b6&&b6.message)))}}}},{key:"_onSourceBufferEnded",value:function(){var e;(this._isSourceBufferEnd=!0,fW.long)&&fW.log(this.TAG,dg(e="source play end! currentTime:".concat(this.currentTime," , duration:")).call(e,this.duration));this._startRender()}},{key:"_ajustSeekTime",value:function(e){var t=this._timeRange.getBuffer(e,0);t&&(fW.log(this.TAG,"ajust seek time to:",t.start),this._lastTimeLineTime=t.start)}},{key:"_getAudioBuffer",value:function(e){var t=this;if(this._timeRange){var n=this._timeRange.getBuffer(this._lastBuffer?this._lastBuffer.end:this.currentTime,0);return n?e?(this._ajustSeekTime(n.start),void this.emit(MY.AUDIO_READY)):n:(this._endOfStream||!this._isLive)&&this.currentTime-this.duration>-.5?(this._emitTimelineEvents(YY.PLAY_EVENT,NY.TIMEUPDATE),void this._emitTimelineEvents(YY.PLAY_EVENT,NY.ENDED)):(this._ready=!1,this._audioCtx.suspend(),this.emit(MY.AUDIO_WAITING),void(e&&(this._onAudioReady||(this._onAudioReady=function(e){t._ajustSeekTime(e)}),this.removeListener(MY.AUDIO_READY,this._onAudioReady),this.once(MY.AUDIO_READY,this._onAudioReady))))}}},{key:"_startRender",value:function(e){if(!this.noAudio){if("video"===e&&this.isLive&&this._ready&&!this._isSourceBufferEnd)return console.log(this.TAG,"_startRender, audio currentTime",this.currentTime,"from:",e,"_isSourceBufferEnd:",this._isSourceBufferEnd,"ready:",this._ready),void this._doPlay();var t=this._getAudioBuffer();if(t){"suspended"===this._audioCtx.state&&(this._audioCtx.resume().catch((function(e){})),pG()),this._lastBuffer=t,this._source=null;var n=this._audioCtx.createBufferSource();n.buffer=t.source,n.loop=!1,this._source=n,n.addEventListener("ended",this._onSourceBufferEnded),n.connect(this._gainNode),t.delay&&t.delay>.001&&(this._delay+=t.delay),this.startDts=t.startDts;try{this._isSourceBufferEnd=!1,n.start()}catch(b6){}t.startDts&&this._emitTimelineEvents(YY.SYNC_DTS,t.startDts)}}}},{key:"_destroy",value:function(){fW.log(this.TAG,"destroy audio..."),this._source&&this._source.removeEventListener("ended",this._onSourceBufferEnded),this._audioCtx&&"closed"!==this.ctxState&&this._audioCtx.close(),this._audioCtx=null,this._sampleQueue=null,this._timeRange=null,this._parent=null,this.removeAllListeners()}}]),i}(QY),sQ=In,uQ=$o.findIndex,cQ="findIndex",lQ=!0;cQ in[]&&Array(1)[cQ]((function(){lQ=!1})),sQ({target:"Array",proto:!0,forced:lQ},{findIndex:function(e){return uQ(this,e,arguments.length>1?arguments[1]:void 0)}});var hQ=wl("Array").findIndex,AQ=se,dQ=hQ,fQ=Array.prototype,vQ=n((function(e){var t=e.findIndex;return e===fQ||AQ(fQ,e)&&t===fQ.findIndex?dQ:t})),pQ=I,mQ=Ln,yQ=TypeError,gQ=Object.getOwnPropertyDescriptor,_Q=pQ&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(_6){return _6 instanceof TypeError}}(),bQ=In,EQ=Je,kQ=zr,TQ=Gn,RQ=Un,SQ=_Q?function(e,t){if(mQ(e)&&!gQ(e,"length").writable)throw yQ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},wQ=Bn,DQ=Rr,IQ=Xn,CQ=JY,LQ=Ir("splice"),VQ=Math.max,xQ=Math.min;bQ({target:"Array",proto:!0,forced:!LQ},{splice:function(e,t){var n,r,i,o,a,s,u=EQ(this),c=RQ(u),l=kQ(e,c),h=arguments.length;for(0===h?n=r=0:1===h?(n=0,r=c-l):(n=h-2,r=xQ(VQ(TQ(t),0),c-l)),wQ(c+n-r),i=DQ(u,r),o=0;o<r;o++)(a=l+o)in u&&IQ(i,o,u[a]);if(i.length=r,n<r){for(o=l;o<c-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:CQ(u,s);for(o=c;o>c-r+n;o--)CQ(u,o-1)}else if(n>r)for(o=c-r;o>l;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:CQ(u,s);for(o=0;o<n;o++)u[o+l]=arguments[o+2];return SQ(u,c-r+n),i}});var FQ=wl("Array").splice,GQ=se,OQ=FQ,ZQ=Array.prototype,PQ=n((function(e){var t=e.splice;return e===ZQ||GQ(ZQ,e)&&t===ZQ.splice?OQ:t})),UQ=cS,NQ=MT.findIndex,BQ=uG,MQ="findIndex",WQ=!0;MQ in[]&&Array(1)[MQ]((function(){WQ=!1})),UQ({target:"Array",proto:!0,forced:WQ},{findIndex:function(e){return NQ(this,e,arguments.length>1?arguments[1]:void 0)}}),BQ(MQ);var YQ=_b,XQ=dT,QQ=TypeError,jQ=Object.getOwnPropertyDescriptor,HQ=YQ&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(_6){return _6 instanceof TypeError}}(),JQ=cS,KQ=x_,zQ=bR,qQ=aT,$Q=hT,ej=HQ?function(e,t){if(XQ(e)&&!jQ(e,"length").writable)throw QQ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},tj=Dx,nj=FT,rj=fS,ij=hN,oj=sI("splice"),aj=Math.max,sj=Math.min;JQ({target:"Array",proto:!0,forced:!oj},{splice:function(e,t){var n,r,i,o,a,s,u=KQ(this),c=$Q(u),l=zQ(e,c),h=arguments.length;for(0===h?n=r=0:1===h?(n=0,r=c-l):(n=h-2,r=sj(aj(qQ(t),0),c-l)),tj(c+n-r),i=nj(u,r),o=0;o<r;o++)(a=l+o)in u&&rj(i,o,u[a]);if(i.length=r,n<r){for(o=l;o<c-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:ij(u,s);for(o=c;o>c-r+n;o--)ij(u,o-1)}else if(n>r)for(o=c-r;o>l;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:ij(u,s);for(o=0;o<n;o++)u[o+l]=arguments[o+2];return ej(u,c-r+n),i}});var uj=x_,cj=WS;cS({target:"Object",stat:!0,forced:__((function(){cj(1)}))},{keys:function(e){return cj(uj(e))}});var lj=pD.charAt,hj=LS,Aj=ck,dj=dO,fj=fO,vj="String Iterator",pj=Aj.set,mj=Aj.getterFor(vj);dj(String,"String",(function(e){pj(this,{type:vj,string:hj(e),index:0})}),(function(){var e,t=mj(this),n=t.string,r=t.index;return r>=n.length?fj(void 0,!0):(e=lj(n,r),t.index+=e.length,fj(e,!1))}));var yj=u_,gj=Bk,_j=Yk,bj=SO,Ej=XE,kj=pb,Tj=kj("iterator"),Rj=kj("toStringTag"),Sj=bj.values,wj=function(e,t){if(e){if(e[Tj]!==Sj)try{Ej(e,Tj,Sj)}catch(_6){e[Tj]=Sj}if(e[Rj]||Ej(e,Rj,t),gj[t])for(var n in bj)if(e[n]!==bj[n])try{Ej(e,n,bj[n])}catch(_6){e[n]=bj[n]}}};for(var Dj in gj)wj(yj[Dj]&&yj[Dj].prototype,Dj);function Ij(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Th(e,r.key,r)}}function Lj(e,t,n){return t&&Cj(e.prototype,t),n&&Cj(e,n),Th(e,"prototype",{writable:!1}),e}function Vj(e,t,n){return t in e?Th(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xj(e,t){return function(e){if(qm(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Rh&&$m(e)||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Gj(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 Fj(e){return function(e){if(qm(e))return Oj(e)}(e)||function(e){if(void 0!==Rh&&null!=$m(e)||null!=e["@@iterator"])return vy(e)}(e)||Gj(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 Gj(e,t){var n;if(e){if("string"==typeof e)return Oj(e,t);var r=hm(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?vy(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Oj(e,t):void 0}}function Oj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}wj(_j,"DOMTokenList");var Zj="video",Pj="hevc",Uj=Zb,Nj=O_,Bj=Pb,Mj=xS,Wj=RegExp.prototype,Yj=LE.PROPER,Xj=wk,Qj=Fb,jj=LS,Hj=__,Jj=function(e){var t=e.flags;return void 0!==t||"flags"in Wj||Nj(e,"flags")||!Bj(Wj,e)?t:Uj(Mj,e)},Kj="toString",zj=RegExp.prototype[Kj],qj=Hj((function(){return"/a/b"!=zj.call({source:"a",flags:"b"})})),$j=Yj&&zj.name!=Kj;(qj||$j)&&Xj(RegExp.prototype,Kj,(function(){var e=Qj(this);return"/"+jj(e.source)+"/"+jj(Jj(e))}),{unsafe:!0});var eH=_b,tH=LE.EXISTS,nH=S_,rH=gb.f,iH=Function.prototype,oH=nH(iH.toString),aH=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,sH=nH(aH.exec);eH&&!tH&&rH(iH,"name",{configurable:!0,get:function(){try{return sH(aH,oH(this))[1]}catch(_6){return""}}});var uH=cS,cH=nT,lH=sR,hH=YT,AH=S_([].join),dH=cH!=Object,fH=hH("join",",");uH({target:"Array",proto:!0,forced:dH||!fH},{join:function(e){return AH(lH(this),void 0===e?",":e)}});var vH=In,pH=ni.indexOf,mH=Wl,yH=k([].indexOf),gH=!!yH&&1/yH([1],1,-0)<0;vH({target:"Array",proto:!0,forced:gH||!mH("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return gH?yH(this,e,t)||0:pH(this,e,t)}});var _H=wl("Array").indexOf,bH=se,EH=_H,kH=Array.prototype,TH=n((function(e){var t=e.indexOf;return e===kH||bH(kH,e)&&t===kH.indexOf?EH:t}));function RH(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=Vl(t).call(t,Boolean);var r=new Uint8Array(TY(t).call(t,(function(e,t){return e+t.byteLength}),0)),i=0;return $l(t).call(t,(function(e){r.set(e,i),i+=e.byteLength})),r}function SH(e){if(!qm(e)){for(var t=[],n="",r=0;r<e.length;r++)r%2&&(n=e[r-1]+e[r],t.push(ug(n,16)),n="");return t}return zg(e).call(e,(function(e){return ug(e,16)}))}var wH=nn,DH=V,IH=qe,CH=se,LH=function(){var e=wH(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},VH=RegExp.prototype,xH=se,FH=function(e){var t=e.flags;return void 0!==t||"flags"in VH||IH(e,"flags")||!CH(VH,e)?t:DH(LH,e)},GH=RegExp.prototype,OH=n((function(e){return e===GH||xH(GH,e)?FH(e):e.flags})),ZH=wl("Array").entries,PH=er,UH=qe,NH=se,BH=ZH,MH=Array.prototype,WH={DOMTokenList:!0,NodeList:!0},YH=n((function(e){var t=e.entries;return e===MH||NH(MH,e)&&t===MH.entries||UH(WH,PH(e))?BH:t})),XH=In,QH=$o.find,jH="find",HH=!0;jH in[]&&Array(1)[jH]((function(){HH=!1})),XH({target:"Array",proto:!0,forced:HH},{find:function(e){return QH(this,e,arguments.length>1?arguments[1]:void 0)}});var JH=wl("Array").find,KH=se,zH=JH,qH=Array.prototype,$H=n((function(e){var t=e.find;return e===qH||KH(qH,e)&&t===qH.find?zH:t})),eJ=Ek,tJ=gb,nJ=function(e,t,n){return n.get&&eJ(n.get,t,{getter:!0}),n.set&&eJ(n.set,t,{setter:!0}),tJ.f(e,t,n)},rJ=_b,iJ=nJ,oJ=xS,aJ=__,sJ=u_.RegExp,uJ=sJ.prototype;rJ&&aJ((function(){var e=!0;try{sJ(".","d")}catch(_6){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(o.hasIndices="d"),o)i(a,o[a]);return Object.getOwnPropertyDescriptor(uJ,"flags").get.call(t)!==r||n!==r}))&&iJ(uJ,"flags",{configurable:!0,get:oJ});var cJ=aT,lJ=LS,hJ=C_,AJ=RangeError,dJ=cS,fJ=MT.find,vJ=uG,pJ="find",mJ=!0;pJ in[]&&Array(1)[pJ]((function(){mJ=!1})),dJ({target:"Array",proto:!0,forced:mJ},{find:function(e){return fJ(this,e,arguments.length>1?arguments[1]:void 0)}}),vJ(pJ);var yJ=Fb,gJ=VV,_J=zk,bJ=Zb,EJ=x_,kJ=function(e,t,n,r){try{return r?t(yJ(n)[0],n[1]):t(n)}catch(_6){gJ(e,"throw",_6)}},TJ=vV,RJ=wT,SJ=hT,wJ=fS,DJ=DV,IJ=bV,CJ=Array,LJ=II,VJ="ArrayBuffer",xJ=GP[VJ];cS({global:!0,constructor:!0,forced:u_[VJ]!==xJ},{ArrayBuffer:xJ}),LJ(VJ);var FJ,GJ=function(){function e(){Ij(this,e),this.buffer=new Uint8Array(0)}return Lj(e,[{key:"write",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];$l(n).call(n,(function(t){t?e.buffer=function(e){for(var t=0,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];$l(r).call(r,(function(e){t+=e.length}));var o=new e(t),a=0;return $l(r).call(r,(function(e){o.set(e,a),a+=e.length})),o}(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}(),OJ=Math.pow(2,32)-1,ZJ=function(){function e(){Ij(this,e)}return Lj(e,null,[{key:"box",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n=Vl(n).call(n,Boolean);var i=8+TY(n).call(n,(function(e,t){return e+t.byteLength}),0),o=new Uint8Array(i);o[0]=i>>24&255,o[1]=i>>16&255,o[2]=i>>8&255,o[3]=255&i,o.set(e,4);var a=8;return $l(n).call(n,(function(e){o.set(e,a),a+=e.byteLength})),o}},{key:"ftyp",value:function(t){return $H(t).call(t,(function(e){return e.type===Zj&&e.codecType===Pj}))?e.FTYPHEV1:e.FTYPAVC1}},{key:"initSegment",value:function(t){return RH(e.ftyp(t),e.moov(t))}},{key:"pssh",value:function(t){var n,r=new Uint8Array(dg(n=[1,0,0,0]).call(n,[16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75],[0,0,0,1],SH(t.kid),[0,0,0,0]));return e.box(e.types.pssh,r)}},{key:"moov",value:function(t){if(t[0].useEME&&(t[0].encv||t[0].enca)){var n;t[0].pssh||(t[0].pssh={kid:t[0].kid});var r=this.pssh(t[0].pssh);return e.box.apply(e,dg(n=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale),e.mvex(t)]).call(n,Fj(zg(t).call(t,(function(t){return e.trak(t)}))),[r]))}var i;return e.box.apply(e,dg(i=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale)]).call(i,Fj(zg(t).call(t,(function(t){return e.trak(t)}))),[e.mvex(t)]))}},{key:"mvhd",value:function(t){var n=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,n>>24&255,n>>16&255,n>>8&255,255&n,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,n){var r=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,n>>24&255,n>>16&255,n>>8&255,255&n,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,r>>8&255,255&r,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 n=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,n>>24&255,n>>16&255,n>>8&255,255&n,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===Zj?e.VMHD:e.SMHD,e.DINF,e.stbl(t))}},{key:"stbl",value:function(t){var n=[];return t&&t.ext&&t.ext.stss&&n.push(e.stss(YH(t.ext.stss))),e.box(e.types.stbl,e.stsd(t),e.STTS,n[0],e.STSC,e.STSZ,e.STCO)}},{key:"stsd",value:function(t){var n;return n="audio"===t.type?t.useEME&&t.enca?e.enca(t):e.mp4a(t):t.useEME&&t.encv?e.encv(t):e.avc1hev1(t),e.box(e.types.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),n)}},{key:"enca",value:function(t){var n=t.enca.channelCount,r=t.enca.sampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>8&255,255&r,0,0]),o=e.esds(t.config),a=e.sinf(t.enca);return e.box(e.types.enca,i,o,a)}},{key:"encv",value:function(t){var n,r,i,o=t.sps.length>0?t.sps[0]:[],a=t.pps.length>0?t.pps[0]:[],s=t.width,u=t.height,c=t.sarRatio[0],l=t.sarRatio[1],h=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]),A=new Uint8Array(dg(r=dg(n=dg(i=[1,o[1],o[2],o[3],255,225,o.length>>>8&255,255&o.length]).apply(i,Fj(o))).call(n,[1,a.length>>>8&255,255&a.length])).apply(r,Fj(a))),d=new Uint8Array([0,0,88,57,0,15,200,192,0,4,86,72]),f=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,h,e.box(e.types.avcC,A),e.box(e.types.btrt,d),f,e.box(e.types.pasp,v))}},{key:"schi",value:function(t){var n=new Uint8Array([]),r=e.tenc(t);return e.box(e.types.schi,n,r)}},{key:"tenc",value:function(t){var n,r=new Uint8Array(dg(n=[0,0,0,0,0,0,255&t.default_IsEncrypted,255&t.default_IV_size]).call(n,SH(t.default_KID)));return e.box(e.types.tenc,r)}},{key:"sinf",value:function(t){var n=new Uint8Array([]),r=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]),o=e.schi(t);return e.box(e.types.sinf,n,e.box(e.types.frma,r),e.box(e.types.schm,i),o)}},{key:"avc1hev1",value:function(t){var n,r=t.codecType===Pj,i=r?e.types.hvc1:e.types.avc1,o=r?e.hvcC(t):e.avcC(t),a=[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]),o];return r?a.push(e.box(e.types.fiel,new Uint8Array([1,0]))):t.sarRatio&&t.sarRatio.length>1&&a.push(e.pasp(t.sarRatio)),e.box.apply(e,dg(n=[i]).call(n,a))}},{key:"avcC",value:function(t){var n,r,i,o,a,s,u=[],c=[];return $l(n=t.sps).call(n,(function(e){s=e.byteLength,u.push(s>>>8&255),u.push(255&s),u.push.apply(u,Fj(e))})),$l(r=t.pps).call(r,(function(e){s=e.byteLength,c.push(s>>>8&255),c.push(255&s),c.push.apply(c,Fj(e))})),e.box(e.types.avcC,new Uint8Array(dg(o=dg(i=dg(a=[1,u[3],u[4],u[5],255,224|t.sps.length]).apply(a,u)).call(i,[t.pps.length])).apply(o,c)))}},{key:"hvcC",value:function(t){var n=t.hvcC;if(n instanceof ArrayBuffer||n instanceof Uint8Array)return n;var r,i=t.vps,o=t.sps,a=t.pps;if(n){var s=n.generalProfileCompatibilityFlags,u=n.generalConstraintIndicatorFlags,c=(i.length&&1)+(o.length&&1)+(a.length&&1);r=[1,n.generalProfileSpace<<6|n.generalTierFlag<<5|n.generalProfileIdc,s>>>24,s>>>16,s>>>8,s,u[0],u[1],u[2],u[3],u[4],u[5],n.generalLevelIdc,240,0,252,252|n.chromaFormatIdc,248|n.bitDepthLumaMinus8,248|n.bitDepthChromaMinus8,0,0,n.numTemporalLayers<<3|n.temporalIdNested<<2|3,c];var l=function(e){var t;r.push(e.length>>8,e.length),(t=r).push.apply(t,Fj(e))};i.length&&(r.push(160,0,i.length),$l(i).call(i,l)),o.length&&(r.push(161,0,o.length),$l(o).call(o,l)),a.length&&(r.push(162,0,a.length),$l(a).call(a,l))}else r=[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(r))}},{key:"pasp",value:function(t){var n=xj(t,2),r=n[0],i=n[1];return e.box(e.types.pasp,new Uint8Array([r>>24,r>>16&255,r>>8&255,255&r,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 n,r,i,o=t.length;return e.box(e.types.esds,new Uint8Array(dg(n=dg(r=dg(i=[0,0,0,0,3,23+o,0,0,0,4,15+o,64,21,0,6,0,0,0,218,192,0,0,218,192,5]).call(i,[o])).call(r,t)).call(n,[6,1,2])))}},{key:"mvex",value:function(t){var n;return e.box.apply(e,dg(n=[e.types.mvex]).call(n,Fj(zg(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 n;return e.box.apply(e,dg(n=[e.types.moof,e.mfhd(t[0].samples?t[0].samples[0].gopId:0)]).call(n,Fj(zg(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 n,r=e.tfhd(t.id),i=e.tfdt(t,t.baseMediaDecodeTime),o=0;if(t.isVideo&&t.videoSenc&&(n=t.videoSenc,$l(n).call(n,(function(e){o+=8,e.subsamples&&e.subsamples.length&&(o+=2,o+=6*e.subsamples.length)}))),t.videoSencLength=o,t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)){if(t.isVideoEncryption){if(t.isVideo){var a=e.saiz(t),s=e.saio(t),u=e.trun1(t),c=e.senc(t);return e.box(e.types.traf,r,i,a,s,u,c)}if(t.isAudioEncryption){var l=e.sbgp(),h=e.saiz(t),A=e.saio(t),d=e.senc(t),f=e.trun1(t);return e.box(e.types.traf,r,i,l,h,A,d,f)}var v=e.sbgp(),p=e.trun1(t);return e.box(e.types.traf,r,i,v,p)}if(t.isVideo){var m=e.trun1(t);return e.box(e.types.traf,r,i,m)}var y=e.sbgp(),g=e.saiz(t),_=e.saio(t),b=e.senc(t),E=e.trun1(t);return e.box(e.types.traf,r,i,y,g,_,b,E)}var k=e.sdtp(t);return e.box(e.types.traf,r,i,k,e.trun(t.samples,k.byteLength+76))}},{key:"sdtp",value:function(t){var n,r=new GJ;return $l(n=t.samples).call(n,(function(e){r.write(new Uint8Array(t.isVideo?[e.keyframe?32:16]:[16]))})),e.box(e.types.sdtp,this.extension(0,0),r.buffer)}},{key:"trun1",value:function(t){var n,r=new GJ,i=GJ.writeUint32(t.samples.length),o=null;if(t.isVideo){var a=t.videoSencLength;o=GJ.writeUint32(16*t.samples.length+a+149),!t.isVideoEncryption&&t.isAudioEncryption&&(o=GJ.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),o=GJ.writeUint32(s)}return $l(n=t.samples).call(n,(function(e){r.write(GJ.writeUint32(e.duration)),r.write(GJ.writeUint32(e.size)),r.write(GJ.writeUint32(e.keyframe?33554432:65536)),t.isVideo&&r.write(GJ.writeUint32(e.cts?e.cts:0))})),e.box(e.types.trun,this.extension(0,OH(t)),i,o,r.buffer)}},{key:"senc",value:function(t){var n=new GJ,r=t.samples.length,i=t.isVideo?16:8,o=t.isVideo?2:0,a=[],s=0;return t.isVideo?(a=t.videoSenc,s=t.videoSencLength):a=t.audioSenc,s=s||i*r,n.write(GJ.writeUint32(16+s),e.types.senc,this.extension(0,o)),n.write(GJ.writeUint32(r)),$l(a).call(a,(function(e){for(var t=0;t<e.InitializationVector.length;t++)n.write(new Uint8Array([e.InitializationVector[t]]));var r;e.subsamples&&e.subsamples.length&&(n.write(GJ.writeUint16(e.subsamples.length)),$l(r=e.subsamples).call(r,(function(e){n.write(GJ.writeUint16(e.BytesOfClearData)),n.write(GJ.writeUint32(e.BytesOfProtectedData))})))})),n.buffer}},{key:"saio",value:function(t){var n=12*t.samples.length+141;!t.isVideo&&t.isAudioEncryption&&(n=149);var r=new Uint8Array([1,0,0,0,0,0,0,1,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n]);return e.box(e.types.saio,r)}},{key:"saiz",value:function(t){var n=t.samples.length,r=new Uint8Array([0,0,0,0,16,n>>24&255,n>>16&255,n>>8&255,255&n]);return e.box(e.types.saiz,r)}},{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,n){var r=Math.floor(n/(OJ+1)),i=Math.floor(n%(OJ+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,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i]))}},{key:"trun",value:function(t,n){var r=t.length,i=12+16*r;n+=8+i;var o=new Uint8Array(i);o.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var a=0;a<r;a++){var s=t[a],u=s.duration,c=s.size,l=s.flag,h=void 0===l?{}:l,A=s.cts,d=void 0===A?0:A;o.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,c>>>24&255,c>>>16&255,c>>>8&255,255&c,h.isLeading<<2|(null===h.dependsOn||void 0===h.dependsOn?1:h.dependsOn),h.isDependedOn<<6|h.hasRedundancy<<4|h.paddingValue<<1|(null===h.isNonSyncSample||void 0===h.isNonSyncSample?1:h.isNonSyncSample),61440&h.degradationPriority,15&h.degradationPriority,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*a)}return e.box(e.types.trun,o)}},{key:"moovMP4",value:function(t){var n;return e.box.apply(e,dg(n=[e.types.moov,e.mvhd(t[0].duration,t[0].timescale)]).call(n,Fj(zg(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===Zj?e.VMHD:e.SMHD,e.DINF,e.stblMP4(t))}},{key:"stblMP4",value:function(t){var n,r=t.ext,i=[e.stsd(t),e.stts(r.stts),e.stsc(r.stsc),e.stsz(r.stsz),e.stco(r.stco)];return r.stss.length&&i.push(e.stss(r.stss)),r.ctts.length&&i.push(e.ctts(r.ctts)),e.box.apply(e,dg(n=[e.types.stbl]).call(n,i))}},{key:"stts",value:function(t){var n=t.length,r=new Uint8Array(8*n),i=0;return $l(t).call(t,(function(e){var t=e.value,n=e.count;r.set([n>>24,n>>16&255,n>>8&255,255&n,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8})),e.box(e.types.stts,RH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stsc",value:function(t){var n=t.length,r=new Uint8Array(12*n),i=0;return $l(t).call(t,(function(e){var t=e.firstChunk,n=e.samplesPerChunk,o=e.sampleDescIndex;r.set([t>>24,t>>16&255,t>>8&255,255&t,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o],i),i+=12})),e.box(e.types.stsc,RH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stsz",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return $l(t).call(t,(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stsz,RH(new Uint8Array([0,0,0,0,0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stco",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return $l(t).call(t,(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stco,RH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stss",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return $l(t).call(t,(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stss,RH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"ctts",value:function(t){var n=t.length,r=new Uint8Array(8*n),i=0;return $l(t).call(t,(function(e){var t=e.value,n=e.count;r.set([n>>24,n>>16&255,n>>8&255,255&n,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8})),e.box(e.types.ctts,RH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{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 n,r=t.timescale,i=t.samples[0].duration,o=i*t.samples.length,a=t.samples[0].sampleOffset*i,s=8;$l(n=t.samples).call(n,(function(e){s+=e.size}));var u=0;if(t.isVideo){var c,l=0;t.videoSenc&&(c=t.videoSenc),t.isVideo&&$l(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 h=new Uint8Array([0,0,0,0,0,0,0,255&t.id,r>>24&255,r>>16&255,r>>8&255,255&r,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,0,0,0,0,1,0,u>>16&255,u>>8&255,255&u,o>>24&255,o>>16&255,o>>8&255,255&o,144,0,0,0]);return e.box(e.types.sidx,h)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();Vj(ZJ,"types",TY(FJ=["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(FJ,(function(e,t){return e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)],e}),wh(null))),Vj(ZJ,"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])}),Vj(ZJ,"FTYPAVC1",ZJ.box(ZJ.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))),Vj(ZJ,"FTYPHEV1",ZJ.box(ZJ.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,104,101,118,49]))),Vj(ZJ,"DINF",ZJ.box(ZJ.types.dinf,ZJ.box(ZJ.types.dref,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])))),Vj(ZJ,"VMHD",ZJ.box(ZJ.types.vmhd,new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))),Vj(ZJ,"SMHD",ZJ.box(ZJ.types.smhd,new Uint8Array([0,0,0,0,0,0,0,0]))),Vj(ZJ,"StblTable",new Uint8Array([0,0,0,0,0,0,0,0])),Vj(ZJ,"STTS",ZJ.box(ZJ.types.stts,ZJ.StblTable)),Vj(ZJ,"STSC",ZJ.box(ZJ.types.stsc,ZJ.StblTable)),Vj(ZJ,"STSZ",ZJ.box(ZJ.types.stsz,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]))),Vj(ZJ,"STCO",ZJ.box(ZJ.types.stco,ZJ.StblTable));var PJ=function(){function e(t,n){Ij(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=n}return Lj(e,[{key:"debug",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).debug.apply(n,dg(t=[this._prefix]).call(t,i))}}},{key:"log",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).log.apply(n,dg(t=[this._prefix]).call(t,i))}}},{key:"warn",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).warn.apply(n,dg(t=[this._prefix]).call(t,i))}}},{key:"error",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).error.apply(n,dg(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}();Vj(PJ,"disabled",!0);var UJ=function(){function e(t,n,r){Ij(this,e),this.videoTrack=t,this.audioTrack=n;var i=/Chrome\/([^.]+)/.exec(navigator.userAgent);this.forceFirstIDR=i&&Number(i[1])<50,this.log=new PJ("FMP4Remuxer",!r||!r.openLog||!r.openLog)}return Lj(e,[{key:"remux",value:function(){var e,t,n,r,i,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.videoTrack,u=this.audioTrack,c=s.exist(),l=u.exist(),h=[];return o&&(a&&a.initMerge?(c&&h.push(this.videoTrack),l&&h.push(this.audioTrack),n=ZJ.initSegment(h)):(c&&(e=ZJ.initSegment([this.videoTrack])),l&&(t=ZJ.initSegment([this.audioTrack])))),c&&s.hasSample()&&(r=this._remuxVideo()),l&&u.hasSample()&&(i=this._remuxAudio()),s.samples=[],u.samples=[],{initSegment:n,videoInitSegment:e,audioInitSegment:t,videoSegment:r,audioSegment:i}}},{key:"_remuxVideo",value:function(){var e=this.videoTrack;this.forceFirstIDR&&(e.samples[0].flag={dependsOn:2,isNonSyncSample:0});var t=e.samples,n=0;$l(t).call(t,(function(e){var t;n+=TY(t=e.units).call(t,(function(e,t){return e+t.byteLength}),0),n+=4*e.units.length}));for(var r,i=new Uint8Array(n),o=new DataView(i.buffer),a=function(e,n,a,s){var u;s=t[e];var l=0;$l(u=s.units).call(u,(function(e){o.setUint32(a,e.byteLength),a+=4,i.set(e,a),a+=e.byteLength,l+=4+e.byteLength})),s.size=l,c=a,r=s},s=0,u=t.length,c=0;s<u;s++)a(s,0,c,r);var l=ZJ.mdat(i);return RH(ZJ.moof([e]),l)}},{key:"_remuxAudio",value:function(){var e,t,n=this.audioTrack,r=new Uint8Array(TY(e=n.samples).call(e,(function(e,t){return e+t.size}),0));TY(t=n.samples).call(t,(function(e,t){return r.set(t.data,e),e+t.size}),0);var i=ZJ.mdat(r);return RH(ZJ.moof([n]),i)}},{key:"reset",value:function(){this.videoTrack.reset(),this.audioTrack.reset()}}]),e}(),NJ=function(){function e(t,n){Ij(this,e),this.videoTrack=t,this.audioTrack=n}return Lj(e,[{key:"remux",value:function(e,t){this.videoTrack=e||this.videoTrack,this.audioTrack=t||this.audioTrack;var n,r,i=(null==e?void 0:e.exist())&&(null==e?void 0:e.hasSample()),o=(null==t?void 0:t.exist())&&(null==t?void 0:t.hasSample());return i&&o?n=this._remuxMix(e,t):i?n=this._remuxTrack(e):o&&(r=this._remuxTrack(t)),e&&(e.samples=[]),t&&(t.samples=[]),{videoSegment:n,audioSegment:r}}},{key:"_remuxMix",value:function(e,t){var n=ZJ.ftyp([e,t]),r=this._remuxData(e,n.byteLength+8),i=r.mdatData,o=r.chunkOffset,a=this._remuxData(t,o).mdatData,s=ZJ.mdat(RH(i,a)),u=ZJ.moovMP4([e,t]);return e.ext=void 0,t.ext=void 0,e.samples=[],t.samples=[],RH(n,s,u)}},{key:"_remuxTrack",value:function(e){var t=ZJ.ftyp([e]),n=this._remuxData(e,t.byteLength+8).mdatData,r=ZJ.mdat(n),i=ZJ.moovMP4([e]);return e.ext=void 0,e.samples=[],RH(t,r,i)}},{key:"_remuxData",value:function(e,t){var n=e.type===Zj,r=e.samples,i=0;n?$l(r).call(r,(function(e){var t;i+=TY(t=e.units).call(t,(function(e,t){return e+t.byteLength}),0),i+=4*e.units.length})):i=TY(r).call(r,(function(e,t){return e+t.size}),0);for(var o,a=new Uint8Array(i),s=new DataView(a.buffer),u=e.ext={stts:[],stsc:[],stsz:[],stco:[],stss:[],ctts:[]},c=0,l=0,h=r.length,A=0;A<h;A++){l+=(o=r[A]).duration;var d,f=n?0:o.size;if(n)$l(d=o.units).call(d,(function(e){s.setUint32(c,e.byteLength),c+=4,a.set(e,c),c+=e.byteLength,f+=4+e.byteLength}));else a.set(o.data,c),c+=f;o.size=f,u.stsz.push(f),n&&this._fillCttsSamples(u.ctts,o.cts),this._fillSttsSamples(u.stts,o,r[A+1]),this._fillStcoSamples(u.stco,A,1,t),t+=f,n&&o.keyframe&&u.stss.push(A+1)}return e.duration=l,this._fillStscSamples(u.stsc,h,1),{mdatData:a,chunkOffset:t}}},{key:"_fillSttsSamples",value:function(e,t,n){var r=e[e.length-1];n?r&&r.value===t.duration?r.count++:e.push({value:t.duration,count:1}):r?r.count++:e.push({value:40,count:1})}},{key:"_fillCttsSamples",value:function(e,t){var n=e[e.length-1];n&&n.value===t?n.count++:e.push({value:t,count:1})}},{key:"_fillStcoSamples",value:function(e,t,n,r){t%n||e.push(r)}},{key:"_fillStscSamples",value:function(e,t,n){if(t<=n)e.push({firstChunk:1,samplesPerChunk:t,sampleDescIndex:1});else{var r=Math.floor(t/n),i=t%n;e.push({firstChunk:1,samplesPerChunk:n,sampleDescIndex:1}),i&&e.push({firstChunk:r+1,samplesPerChunk:i,sampleDescIndex:1})}}}]),e}(),BJ=o,MJ=At("iterator"),WJ=!BJ((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+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[MJ]||"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"!==n||"x"!==new URL("http://x",void 0).host})),YJ=p,XJ=2147483647,QJ=/[^\0-\u007E]/,jJ=/[.\u3002\uFF0E\uFF61]/g,HJ="Overflow: input needs wider integers to process",JJ=RangeError,KJ=YJ(jJ.exec),zJ=Math.floor,qJ=String.fromCharCode,$J=YJ("".charCodeAt),eK=YJ([].join),tK=YJ([].push),nK=YJ("".replace),rK=YJ("".split),iK=YJ("".toLowerCase),oK=function(e){return e+22+75*(e<26)},aK=function(e,t,n){var r=0;for(e=n?zJ(e/700):e>>1,e+=zJ(e/t);e>455;)e=zJ(e/35),r+=36;return zJ(r+36*e/(e+38))},sK=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=$J(e,n++);if(i>=55296&&i<=56319&&n<r){var o=$J(e,n++);56320==(64512&o)?tK(t,((1023&i)<<10)+(1023&o)+65536):(tK(t,i),n--)}else tK(t,i)}return t}(e);var n,r,i=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&tK(t,qJ(r));var u=t.length,c=u;for(u&&tK(t,"-");c<i;){var l=XJ;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<l&&(l=r);var h=c+1;if(l-o>zJ((XJ-a)/h))throw JJ(HJ);for(a+=(l-o)*h,o=l,n=0;n<e.length;n++){if((r=e[n])<o&&++a>XJ)throw JJ(HJ);if(r==o){for(var A=a,d=36;;){var f=d<=s?1:d>=s+26?26:d-s;if(A<f)break;var v=A-f,p=36-f;tK(t,qJ(oK(f+v%p))),A=zJ(v/p),d+=36}tK(t,qJ(oK(A))),s=aK(a,h,c==u),a=0,c++}}a++,o++}return eK(t,"")},uK=no,cK=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:uK(e,r,t[r],n);return e},lK=In,hK=i,AK=V,dK=p,fK=I,vK=WJ,pK=no,mK=io,yK=cK,gK=Io,_K=Bu,bK=Xo,EK=sd,kK=w,TK=qe,RK=Kt,SK=er,wK=nn,DK=ee,IK=Qr,CK=Pi,LK=U,VK=AA,xK=oA,FK=yd,GK=tX,OK=At("iterator"),ZK="URLSearchParams",PK=ZK+"Iterator",UK=bK.set,NK=bK.getterFor(ZK),BK=bK.getterFor(PK),MK=Object.getOwnPropertyDescriptor,WK=function(e){if(!fK)return hK[e];var t=MK(hK,e);return t&&t.value},YK=WK("fetch"),XK=WK("Request"),QK=WK("Headers"),jK=XK&&XK.prototype,HK=QK&&QK.prototype,JK=hK.RegExp,KK=hK.TypeError,zK=hK.decodeURIComponent,qK=hK.encodeURIComponent,$K=dK("".charAt),ez=dK([].join),tz=dK([].push),nz=dK("".replace),rz=dK([].shift),iz=dK([].splice),oz=dK("".split),az=dK("".slice),sz=/\+/g,uz=Array(4),cz=function(e){return uz[e-1]||(uz[e-1]=JK("((?:%[\\da-f]{2}){"+e+"})","gi"))},lz=function(e){try{return zK(e)}catch(_6){return e}},hz=function(e){var t=nz(e,sz," "),n=4;try{return zK(t)}catch(_6){for(;n;)t=nz(t,cz(n--),lz);return t}},Az=/[!'()~]|%20/g,dz={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},fz=function(e){return dz[e]},vz=function(e){return nz(qK(e),Az,fz)},pz=_K((function(e,t){UK(this,{type:PK,iterator:VK(NK(e).entries),kind:t})}),"Iterator",(function(){var e=BK(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),mz=function(e){this.entries=[],this.url=null,void 0!==e&&(DK(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===$K(e,0)?az(e,1):e:IK(e)))};mz.prototype={type:ZK,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,u=xK(e);if(u)for(n=(t=VK(e,u)).next;!(r=AK(n,t)).done;){if(o=(i=VK(wK(r.value))).next,(a=AK(o,i)).done||(s=AK(o,i)).done||!AK(o,i).done)throw KK("Expected sequence with length 2");tz(this.entries,{key:IK(a.value),value:IK(s.value)})}else for(var c in e)TK(e,c)&&tz(this.entries,{key:c,value:IK(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=oz(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=oz(t,"="),tz(this.entries,{key:hz(rz(n)),value:hz(ez(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],tz(n,vz(e.key)+"="+vz(e.value));return ez(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var yz=function(){EK(this,gz);var e=UK(this,new mz(arguments.length>0?arguments[0]:void 0));fK||(this.length=e.entries.length)},gz=yz.prototype;if(yK(gz,{append:function(e,t){FK(arguments.length,2);var n=NK(this);tz(n.entries,{key:IK(e),value:IK(t)}),fK||this.length++,n.updateURL()},delete:function(e){FK(arguments.length,1);for(var t=NK(this),n=t.entries,r=IK(e),i=0;i<n.length;)n[i].key===r?iz(n,i,1):i++;fK||(this.length=n.length),t.updateURL()},get:function(e){FK(arguments.length,1);for(var t=NK(this).entries,n=IK(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){FK(arguments.length,1);for(var t=NK(this).entries,n=IK(e),r=[],i=0;i<t.length;i++)t[i].key===n&&tz(r,t[i].value);return r},has:function(e){FK(arguments.length,1);for(var t=NK(this).entries,n=IK(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){FK(arguments.length,1);for(var n,r=NK(this),i=r.entries,o=!1,a=IK(e),s=IK(t),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?iz(i,u--,1):(o=!0,n.value=s));o||tz(i,{key:a,value:s}),fK||(this.length=i.length),r.updateURL()},sort:function(){var e=NK(this);GK(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=NK(this).entries,r=RK(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new pz(this,"keys")},values:function(){return new pz(this,"values")},entries:function(){return new pz(this,"entries")}},{enumerable:!0}),pK(gz,OK,gz.entries,{name:"entries"}),pK(gz,"toString",(function(){return NK(this).serialize()}),{enumerable:!0}),fK&&mK(gz,"size",{get:function(){return NK(this).entries.length},configurable:!0,enumerable:!0}),gK(yz,ZK),lK({global:!0,constructor:!0,forced:!vK},{URLSearchParams:yz}),!vK&&kK(QK)){var _z=dK(HK.has),bz=dK(HK.set),Ez=function(e){if(DK(e)){var t,n=e.body;if(SK(n)===ZK)return t=e.headers?new QK(e.headers):new QK,_z(t,"content-type")||bz(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),CK(e,{body:LK(0,IK(n)),headers:LK(0,t)})}return e};if(kK(YK)&&lK({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return YK(e,arguments.length>1?Ez(arguments[1]):{})}}),kK(XK)){var kz=function(e){return EK(this,jK),new XK(e,arguments.length>1?Ez(arguments[1]):{})};jK.constructor=kz,kz.prototype=jK,lK({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:kz})}}var Tz,Rz=In,Sz=I,wz=WJ,Dz=i,Iz=Kt,Cz=p,Lz=no,Vz=io,xz=sd,Fz=qe,Gz=DW,Oz=dy,Zz=Hi,Pz=ll.codeAt,Uz=function(e){var t,n,r=[],i=rK(nK(iK(e),jJ,"."),".");for(t=0;t<i.length;t++)n=i[t],tK(r,KJ(QJ,n)?"xn--"+sK(n):n);return eK(r,".")},Nz=Qr,Bz=Io,Mz=yd,Wz={URLSearchParams:yz,getState:NK},Yz=Xo,Xz=Yz.set,Qz=Yz.getterFor("URL"),jz=Wz.URLSearchParams,Hz=Wz.getState,Jz=Dz.URL,Kz=Dz.TypeError,zz=Dz.parseInt,qz=Math.floor,$z=Math.pow,eq=Cz("".charAt),tq=Cz(/./.exec),nq=Cz([].join),rq=Cz(1..toString),iq=Cz([].pop),oq=Cz([].push),aq=Cz("".replace),sq=Cz([].shift),uq=Cz("".split),cq=Cz("".slice),lq=Cz("".toLowerCase),hq=Cz([].unshift),Aq="Invalid scheme",dq="Invalid host",fq="Invalid port",vq=/[a-z]/i,pq=/[\d+-.a-z]/i,mq=/\d/,yq=/^0x/i,gq=/^[0-7]+$/,_q=/^\d+$/,bq=/^[\da-f]+$/i,Eq=/[\0\t\n\r #%/:<>?@[\\\]^|]/,kq=/[\0\t\n\r #/:<>?@[\\\]^|]/,Tq=/^[\u0000-\u0020]+/,Rq=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Sq=/[\t\n\r]/g,wq=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)hq(t,e%256),e=qz(e/256);return nq(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=rq(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Dq={},Iq=Gz({},Dq,{" ":1,'"':1,"<":1,">":1,"`":1}),Cq=Gz({},Iq,{"#":1,"?":1,"{":1,"}":1}),Lq=Gz({},Cq,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Vq=function(e,t){var n=Pz(e,0);return n>32&&n<127&&!Fz(t,e)?e:encodeURIComponent(e)},xq={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Fq=function(e,t){var n;return 2==e.length&&tq(vq,eq(e,0))&&(":"==(n=eq(e,1))||!t&&"|"==n)},Gq=function(e){var t;return e.length>1&&Fq(cq(e,0,2))&&(2==e.length||"/"===(t=eq(e,2))||"\\"===t||"?"===t||"#"===t)},Oq=function(e){return"."===e||"%2e"===lq(e)},Zq={},Pq={},Uq={},Nq={},Bq={},Mq={},Wq={},Yq={},Xq={},Qq={},jq={},Hq={},Jq={},Kq={},zq={},qq={},$q={},e$={},t$={},n$={},r$={},i$=function(e,t,n){var r,i,o,a=Nz(e);if(t){if(i=this.parse(a))throw Kz(i);this.searchParams=null}else{if(void 0!==n&&(r=new i$(n,!0)),i=this.parse(a,null,r))throw Kz(i);(o=Hz(new jz)).bindURL(this),this.searchParams=o}};i$.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,u=this,c=t||Zq,l=0,h="",A=!1,d=!1,f=!1;for(e=Nz(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=aq(e,Tq,""),e=aq(e,Rq,"$1")),e=aq(e,Sq,""),r=Oz(e);l<=r.length;){switch(i=r[l],c){case Zq:if(!i||!tq(vq,i)){if(t)return Aq;c=Uq;continue}h+=lq(i),c=Pq;break;case Pq:if(i&&(tq(pq,i)||"+"==i||"-"==i||"."==i))h+=lq(i);else{if(":"!=i){if(t)return Aq;h="",c=Uq,l=0;continue}if(t&&(u.isSpecial()!=Fz(xq,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&xq[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?c=Kq:u.isSpecial()&&n&&n.scheme==u.scheme?c=Nq:u.isSpecial()?c=Yq:"/"==r[l+1]?(c=Bq,l++):(u.cannotBeABaseURL=!0,oq(u.path,""),c=t$)}break;case Uq:if(!n||n.cannotBeABaseURL&&"#"!=i)return Aq;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=Zz(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=r$;break}c="file"==n.scheme?Kq:Mq;continue;case Nq:if("/"!=i||"/"!=r[l+1]){c=Mq;continue}c=Xq,l++;break;case Bq:if("/"==i){c=Qq;break}c=e$;continue;case Mq:if(u.scheme=n.scheme,i==Tz)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Zz(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())c=Wq;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Zz(n.path),u.query="",c=n$;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Zz(n.path),u.path.length--,c=e$;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Zz(n.path),u.query=n.query,u.fragment="",c=r$}break;case Wq:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=e$;continue}c=Qq}else c=Xq;break;case Yq:if(c=Xq,"/"!=i||"/"!=eq(h,l+1))continue;l++;break;case Xq:if("/"!=i&&"\\"!=i){c=Qq;continue}break;case Qq:if("@"==i){A&&(h="%40"+h),A=!0,o=Oz(h);for(var v=0;v<o.length;v++){var p=o[v];if(":"!=p||f){var m=Vq(p,Lq);f?u.password+=m:u.username+=m}else f=!0}h=""}else if(i==Tz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(A&&""==h)return"Invalid authority";l-=Oz(h).length+1,h="",c=jq}else h+=i;break;case jq:case Hq:if(t&&"file"==u.scheme){c=qq;continue}if(":"!=i||d){if(i==Tz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return dq;if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(h))return a;if(h="",c=$q,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return dq;if(a=u.parseHost(h))return a;if(h="",c=Jq,t==Hq)return}break;case Jq:if(!tq(mq,i)){if(i==Tz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=h){var y=zz(h,10);if(y>65535)return fq;u.port=u.isSpecial()&&y===xq[u.scheme]?null:y,h=""}if(t)return;c=$q;continue}return fq}h+=i;break;case Kq:if(u.scheme="file","/"==i||"\\"==i)c=zq;else{if(!n||"file"!=n.scheme){c=e$;continue}if(i==Tz)u.host=n.host,u.path=Zz(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=Zz(n.path),u.query="",c=n$;else{if("#"!=i){Gq(nq(Zz(r,l),""))||(u.host=n.host,u.path=Zz(n.path),u.shortenPath()),c=e$;continue}u.host=n.host,u.path=Zz(n.path),u.query=n.query,u.fragment="",c=r$}}break;case zq:if("/"==i||"\\"==i){c=qq;break}n&&"file"==n.scheme&&!Gq(nq(Zz(r,l),""))&&(Fq(n.path[0],!0)?oq(u.path,n.path[0]):u.host=n.host),c=e$;continue;case qq:if(i==Tz||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Fq(h))c=e$;else if(""==h){if(u.host="",t)return;c=$q}else{if(a=u.parseHost(h))return a;if("localhost"==u.host&&(u.host=""),t)return;h="",c=$q}continue}h+=i;break;case $q:if(u.isSpecial()){if(c=e$,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Tz&&(c=e$,"/"!=i))continue}else u.fragment="",c=r$;else u.query="",c=n$;break;case e$:if(i==Tz||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=lq(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||oq(u.path,"")):Oq(h)?"/"==i||"\\"==i&&u.isSpecial()||oq(u.path,""):("file"==u.scheme&&!u.path.length&&Fq(h)&&(u.host&&(u.host=""),h=eq(h,0)+":"),oq(u.path,h)),h="","file"==u.scheme&&(i==Tz||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)sq(u.path);"?"==i?(u.query="",c=n$):"#"==i&&(u.fragment="",c=r$)}else h+=Vq(i,Cq);break;case t$:"?"==i?(u.query="",c=n$):"#"==i?(u.fragment="",c=r$):i!=Tz&&(u.path[0]+=Vq(i,Dq));break;case n$:t||"#"!=i?i!=Tz&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":Vq(i,Dq)):(u.fragment="",c=r$);break;case r$:i!=Tz&&(u.fragment+=Vq(i,Iq))}l++}},parseHost:function(e){var t,n,r;if("["==eq(e,0)){if("]"!=eq(e,e.length-1))return dq;if(t=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,A=function(){return eq(e,h)};if(":"==A()){if(":"!=eq(e,1))return;h+=2,l=++c}for(;A();){if(8==c)return;if(":"!=A()){for(t=n=0;n<4&&tq(bq,A());)t=16*t+zz(A(),16),h++,n++;if("."==A()){if(0==n)return;if(h-=n,c>6)return;for(r=0;A();){if(i=null,r>0){if(!("."==A()&&r<4))return;h++}if(!tq(mq,A()))return;for(;tq(mq,A());){if(o=zz(A(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==A()){if(h++,!A())return}else if(A())return;u[c++]=t}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u}(cq(e,1,-1)),!t)return dq;this.host=t}else if(this.isSpecial()){if(e=Uz(e),tq(Eq,e))return dq;if(t=function(e){var t,n,r,i,o,a,s,u=uq(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==eq(i,0)&&(o=tq(yq,i)?16:8,i=cq(i,8==o?1:2)),""===i)a=0;else{if(!tq(10==o?_q:8==o?gq:bq,i))return e;a=zz(i,o)}oq(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=$z(256,5-t))return null}else if(a>255)return null;for(s=iq(n),r=0;r<n.length;r++)s+=n[r]*$z(256,3-r);return s}(e),null===t)return dq;this.host=t}else{if(tq(kq,e))return dq;for(t="",n=Oz(e),r=0;r<n.length;r++)t+=Vq(n[r],Dq);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return Fz(xq,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Fq(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=wq(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+nq(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw Kz(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new o$(e.path[0]).origin}catch(_6){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+wq(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Nz(e)+":",Zq)},getUsername:function(){return this.username},setUsername:function(e){var t=Oz(Nz(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Vq(t[n],Lq)}},getPassword:function(){return this.password},setPassword:function(e){var t=Oz(Nz(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Vq(t[n],Lq)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?wq(e):wq(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,jq)},getHostname:function(){var e=this.host;return null===e?"":wq(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Hq)},getPort:function(){var e=this.port;return null===e?"":Nz(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Nz(e))?this.port=null:this.parse(e,Jq))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+nq(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,$q))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Nz(e))?this.query=null:("?"==eq(e,0)&&(e=cq(e,1)),this.query="",this.parse(e,n$)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Nz(e))?("#"==eq(e,0)&&(e=cq(e,1)),this.fragment="",this.parse(e,r$)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var o$=function(e){var t=xz(this,a$),n=Mz(arguments.length,1)>1?arguments[1]:void 0,r=Xz(t,new i$(e,!1,n));Sz||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},a$=o$.prototype,s$=function(e,t){return{get:function(){return Qz(this)[e]()},set:t&&function(e){return Qz(this)[t](e)},configurable:!0,enumerable:!0}};if(Sz&&(Vz(a$,"href",s$("serialize","setHref")),Vz(a$,"origin",s$("getOrigin")),Vz(a$,"protocol",s$("getProtocol","setProtocol")),Vz(a$,"username",s$("getUsername","setUsername")),Vz(a$,"password",s$("getPassword","setPassword")),Vz(a$,"host",s$("getHost","setHost")),Vz(a$,"hostname",s$("getHostname","setHostname")),Vz(a$,"port",s$("getPort","setPort")),Vz(a$,"pathname",s$("getPathname","setPathname")),Vz(a$,"search",s$("getSearch","setSearch")),Vz(a$,"searchParams",s$("getSearchParams")),Vz(a$,"hash",s$("getHash","setHash"))),Lz(a$,"toJSON",(function(){return Qz(this).serialize()}),{enumerable:!0}),Lz(a$,"toString",(function(){return Qz(this).serialize()}),{enumerable:!0}),Jz){var u$=Jz.createObjectURL,c$=Jz.revokeObjectURL;u$&&Lz(o$,"createObjectURL",Iz(u$,Jz)),c$&&Lz(o$,"revokeObjectURL",Iz(c$,Jz))}Bz(o$,"URL"),Rz({global:!0,constructor:!0,forced:!wz,sham:!Sz},{URL:o$});var l$=In,h$=o,A$=yd,d$=Qr,f$=WJ,v$=ae("URL");l$({target:"URL",stat:!0,forced:!(f$&&h$((function(){v$.canParse()})))},{canParse:function(e){var t=A$(arguments.length,1),n=d$(e),r=t<2||void 0===arguments[1]?void 0:d$(arguments[1]);try{return!!new v$(n,r)}catch(_6){return!1}}});var p$=n(te.URL),m$={exports:{}},y$=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),g$=o,_$=ee,b$=_,E$=y$,k$=Object.isExtensible,T$=g$((function(){k$(1)}))||E$?function(e){return!!_$(e)&&((!E$||"ArrayBuffer"!=b$(e))&&(!k$||k$(e)))}:k$,R$=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),S$=In,w$=p,D$=ri,I$=ee,C$=qe,L$=zt.f,V$=Ui,x$=Mi,F$=T$,G$=R$,O$=!1,Z$=rt("meta"),P$=0,U$=function(e){L$(e,Z$,{value:{objectID:"O"+P$++,weakData:{}}})},N$=m$.exports={enable:function(){N$.enable=function(){},O$=!0;var e=V$.f,t=w$([].splice),n={};n[Z$]=1,e(n).length&&(V$.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===Z$){t(r,i,1);break}return r},S$({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:x$.f}))},fastKey:function(e,t){if(!I$(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!C$(e,Z$)){if(!F$(e))return"F";if(!t)return"E";U$(e)}return e[Z$].objectID},getWeakData:function(e,t){if(!C$(e,Z$)){if(!F$(e))return!0;if(!t)return!1;U$(e)}return e[Z$].weakData},onFreeze:function(e){return G$&&O$&&F$(e)&&!C$(e,Z$)&&U$(e),e}};D$[Z$]=!0;var B$=m$.exports,M$=In,W$=i,Y$=B$,X$=o,Q$=mn,j$=CA,H$=sd,J$=w,K$=ee,z$=Io,q$=zt.f,$$=$o.forEach,e0=I,t0=Xo.set,n0=Xo.getterFor,r0=Pi,i0=io,o0=cK,a0=Kt,s0=sd,u0=X,c0=CA,l0=dc,h0=fc,A0=id,d0=I,f0=B$.fastKey,v0=Xo.set,p0=Xo.getterFor,m0={getConstructor:function(e,t,n,r){var i=e((function(e,i){s0(e,o),v0(e,{type:t,index:r0(null),first:void 0,last:void 0,size:0}),d0||(e.size=0),u0(i)||c0(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=p0(t),s=function(e,t,n){var r,i,o=a(e),s=u(e,t);return s?s.value=n:(o.last=s={index:i=f0(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),d0?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var n,r=a(e),i=f0(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o0(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d0?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),d0?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=a0(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),o0(o,n?{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)}}),d0&&i0(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=p0(t),o=p0(r);l0(e,t,(function(e,t){v0(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?h0("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,h0(void 0,!0))}),n?"entries":"values",!n,!0),A0(t)}};(function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=W$[e],u=s&&s.prototype,c={};if(e0&&J$(s)&&(o||u.forEach&&!X$((function(){(new s).entries().next()})))){var l=(r=t((function(t,n){t0(H$(t,l),{type:e,collection:new s}),null!=n&&j$(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,h=n0(e);$$(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||Q$(l,e,(function(n,r){var i=h(this).collection;if(!t&&o&&!K$(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||q$(l,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else r=n.getConstructor(t,e,i,a),Y$.enable();z$(r,e,!1,!0),c[e]=r,M$({global:!0,forced:!0},c),o||n.setStrong(r,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),m0);var y0=te.Map,g0=Kt,_0=V,b0=Le,E0=hd,k0=X,T0=CA,R0=[].push,S0=function(e){var t,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return E0(this),(t=void 0!==a)&&b0(a),k0(e)?new this:(n=[],t?(r=0,i=g0(a,o>2?arguments[2]:void 0),T0(e,(function(e){_0(R0,n,i(e,r++))}))):T0(e,R0,{that:n}),new this(n))};In({target:"Map",stat:!0,forced:!0},{from:S0});var w0=ks,D0=function(){return new this(w0(arguments))};In({target:"Map",stat:!0,forced:!0},{of:D0});var I0=we,C0=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(I0(e)+" is not a map")},L0=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},V0=ae("Map"),x0={Map:V0,set:L0("set",2),get:L0("get",1),has:L0("has",1),remove:L0("delete",1),proto:V0.prototype},F0=C0,G0=x0.remove;In({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=F0(this),n=!0,r=0,i=arguments.length;r<i;r++)e=G0(t,arguments[r]),n=n&&e;return!!n}});var O0=C0,Z0=x0.get,P0=x0.has,U0=x0.set;In({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=O0(this);return P0(i,e)?(n=Z0(i,e),"update"in t&&(n=t.update(n,e,i),U0(i,e,n)),n):(r=t.insert(e,i),U0(i,e,r),r)}});var N0=V,B0=function(e,t,n){for(var r,i,o=n||e.next;!(r=N0(o,e)).done;)if(void 0!==(i=t(r.value)))return i},M0=function(e,t,n){return n?B0(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},W0=Kt,Y0=C0,X0=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=Y0(this),n=W0(e,arguments.length>1?arguments[1]:void 0);return!1!==X0(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var Q0=Kt,j0=C0,H0=M0,J0=x0.Map,K0=x0.set;In({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=j0(this),n=Q0(e,arguments.length>1?arguments[1]:void 0),r=new J0;return H0(t,(function(e,i){n(e,i,t)&&K0(r,i,e)})),r}});var z0=Kt,q0=C0,$0=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=q0(this),n=z0(e,arguments.length>1?arguments[1]:void 0),r=$0(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var e1=Kt,t1=C0,n1=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=t1(this),n=e1(e,arguments.length>1?arguments[1]:void 0),r=n1(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var r1=In,i1=V,o1=w,a1=Le,s1=CA,u1=x0.Map,c1=p([].push);r1({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(o1(this)?this:u1);a1(t);var r=a1(n.has),i=a1(n.get),o=a1(n.set);return s1(e,(function(e){var a=t(e);i1(r,n,a)?c1(i1(i,n,a),e):i1(o,n,a,[e])})),n}});var l1=function(e,t){return e===t||e!=e&&t!=t},h1=C0,A1=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===A1(h1(this),(function(t){if(l1(t,e))return!0}),!0)}});var d1=V,f1=CA,v1=w,p1=Le,m1=x0.Map;In({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(v1(this)?this:m1);p1(t);var r=p1(n.set);return f1(e,(function(e){d1(r,n,t(e),e)})),n}});var y1=C0,g1=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=g1(y1(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var _1=Kt,b1=C0,E1=M0,k1=x0.Map,T1=x0.set;In({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=b1(this),n=_1(e,arguments.length>1?arguments[1]:void 0),r=new k1;return E1(t,(function(e,i){T1(r,n(e,i,t),e)})),r}});var R1=Kt,S1=C0,w1=M0,D1=x0.Map,I1=x0.set;In({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=S1(this),n=R1(e,arguments.length>1?arguments[1]:void 0),r=new D1;return w1(t,(function(e,i){I1(r,i,n(e,i,t))})),r}});var C1=C0,L1=CA,V1=x0.set;In({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=C1(this),n=arguments.length,r=0;r<n;)L1(arguments[r++],(function(e,n){V1(t,e,n)}),{AS_ENTRIES:!0});return t}});var x1=Le,F1=C0,G1=M0,O1=TypeError;In({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=F1(this),n=arguments.length<2,r=n?void 0:arguments[1];if(x1(e),G1(t,(function(i,o){n?(n=!1,r=i):r=e(r,i,o,t)})),n)throw O1("Reduce of empty map with no initial value");return r}});var Z1=Kt,P1=C0,U1=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=P1(this),n=Z1(e,arguments.length>1?arguments[1]:void 0);return!0===U1(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var N1=Le,B1=C0,M1=TypeError,W1=x0.get,Y1=x0.has,X1=x0.set;In({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=B1(this),r=arguments.length;N1(t);var i=Y1(n,e);if(!i&&r<3)throw M1("Updating absent value");var o=i?W1(n,e):N1(r>2?arguments[2]:void 0)(e,n);return X1(n,e,t(o,e,n)),n}});var Q1=V,j1=Le,H1=w,J1=nn,K1=TypeError,z1=function(e,t){var n,r=J1(this),i=j1(r.get),o=j1(r.has),a=j1(r.set),s=arguments.length>2?arguments[2]:void 0;if(!H1(t)&&!H1(s))throw K1("At least one callback required");return Q1(o,r,e)?(n=Q1(i,r,e),H1(t)&&(n=t(n),Q1(a,r,e,n))):H1(s)&&(n=s(),Q1(a,r,e,n)),n};In({target:"Map",proto:!0,real:!0,forced:!0},{upsert:z1}),In({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:z1});var q1=n(y0);function $1(){$1=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Th||function(e,t,n){e[t]=n.value},i="function"==typeof Rh?Rh:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Th(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(w){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof A?t:A,a=wh(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:_(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(w){return{type:"throw",arg:w}}}e.wrap=c;var h={};function A(){}function d(){}function f(){}var v={};u(v,o,(function(){return this}));var p=Lh&&Lh(Lh(R([])));p&&p!==t&&n.call(p,o)&&(v=p);var m=f.prototype=A.prototype=wh(v);function y(e){var t;$l(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function i(r,o,a,s){var u=l(e[r],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==_l(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function _(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],$l(e).call(e,E,this),this.reset(!0)}function R(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=f,r(m,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:d,configurable:!0}),d.displayName=u(f,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 Vh?Vh(e,f):(e.__proto__=f,u(e,s,"GeneratorFunction")),e.prototype=wh(m),e},e.awrap=function(e){return{__await:e}},y(g.prototype),u(g.prototype,a,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,i,o){void 0===o&&(o=Zp);var a=new g(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return Qp(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=R,T.prototype={constructor:T,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,$l(t=this.tryEntries).call(t,k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+hm(r).call(r,1))&&(this[r]=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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function e2(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(_6){return void n(_6)}s.done?t(u):Zp.resolve(u).then(r,i)}function t2(e){return function(){var t=this,n=arguments;return new Zp((function(r,i){var o=e.apply(t,n);function a(e){e2(o,r,i,a,s,"next",e)}function s(e){e2(o,r,i,a,s,"throw",e)}a(void 0)}))}}function n2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Th(e,r.key,r)}}function i2(e,t,n){return t&&r2(e.prototype,t),n&&r2(e,n),Th(e,"prototype",{writable:!1}),e}function o2(e,t,n){return t in e?Th(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a2(e){var t;return(a2=Vh?Dm(t=Lh).call(t):function(e){return e.__proto__||Lh(e)})(e)}function s2(e,t){var n;return(s2=Vh?Dm(n=Vh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function u2(){if("undefined"==typeof Reflect||!Wm)return!1;if(Wm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Wm(Boolean,[],(function(){}))),!0}catch(b6){return!1}}function c2(e,t,n){var r;u2()?c2=Dm(r=Wm).call(r):c2=function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Dm(Function).apply(e,r));return n&&s2(i,n.prototype),i};return c2.apply(null,arguments)}function l2(e){var t="function"==typeof q1?new q1:void 0;return l2=function(e){if(null===e||(n=e,-1===TH(r=Function.toString.call(n)).call(r,"[native code]")))return e;var n,r;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 c2(e,arguments,a2(this).constructor)}return i.prototype=wh(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s2(i,e)},l2(e)}function h2(e,t){if(t&&("object"===_l(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)}var A2=__,d2=pb("iterator"),f2=!A2((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[d2]||"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"!==n||"x"!==new URL("http://x",void 0).host})),v2=S_,p2=2147483647,m2=/[^\0-\u007E]/,y2=/[.\u3002\uFF0E\uFF61]/g,g2="Overflow: input needs wider integers to process",_2=RangeError,b2=v2(y2.exec),E2=Math.floor,k2=String.fromCharCode,T2=v2("".charCodeAt),R2=v2([].join),S2=v2([].push),w2=v2("".replace),D2=v2("".split),I2=v2("".toLowerCase),C2=function(e){return e+22+75*(e<26)},L2=function(e,t,n){var r=0;for(e=n?E2(e/700):e>>1,e+=E2(e/t);e>455;)e=E2(e/35),r+=36;return E2(r+36*e/(e+38))},V2=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=T2(e,n++);if(i>=55296&&i<=56319&&n<r){var o=T2(e,n++);56320==(64512&o)?S2(t,((1023&i)<<10)+(1023&o)+65536):(S2(t,i),n--)}else S2(t,i)}return t}(e);var n,r,i=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&S2(t,k2(r));var u=t.length,c=u;for(u&&S2(t,"-");c<i;){var l=p2;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<l&&(l=r);var h=c+1;if(l-o>E2((p2-a)/h))throw _2(g2);for(a+=(l-o)*h,o=l,n=0;n<e.length;n++){if((r=e[n])<o&&++a>p2)throw _2(g2);if(r==o){for(var A=a,d=36;;){var f=d<=s?1:d>=s+26?26:d-s;if(A<f)break;var v=A-f,p=36-f;S2(t,k2(C2(f+v%p))),A=E2(v/p),d+=36}S2(t,k2(C2(A))),s=L2(a,h,c==u),a=0,c++}}a++,o++}return R2(t,"")},x2=cS,F2=u_,G2=Zb,O2=S_,Z2=_b,P2=f2,U2=wk,N2=kZ,B2=TI,M2=jG,W2=ck,Y2=VI,X2=X_,Q2=O_,j2=zk,H2=Pk,J2=Fb,K2=kb,z2=LS,q2=dw,$2=ME,e5=DV,t5=bV,n5=YI,r5=wM,i5=pb("iterator"),o5="URLSearchParams",a5=o5+"Iterator",s5=W2.set,u5=W2.getterFor(o5),c5=W2.getterFor(a5),l5=Object.getOwnPropertyDescriptor,h5=function(e){if(!Z2)return F2[e];var t=l5(F2,e);return t&&t.value},A5=h5("fetch"),d5=h5("Request"),f5=h5("Headers"),v5=d5&&d5.prototype,p5=f5&&f5.prototype,m5=F2.RegExp,y5=F2.TypeError,g5=F2.decodeURIComponent,_5=F2.encodeURIComponent,b5=O2("".charAt),E5=O2([].join),k5=O2([].push),T5=O2("".replace),R5=O2([].shift),S5=O2([].splice),w5=O2("".split),D5=O2("".slice),I5=/\+/g,C5=Array(4),L5=function(e){return C5[e-1]||(C5[e-1]=m5("((?:%[\\da-f]{2}){"+e+"})","gi"))},V5=function(e){try{return g5(e)}catch(_6){return e}},x5=function(e){var t=T5(e,I5," "),n=4;try{return g5(t)}catch(_6){for(;n;)t=T5(t,L5(n--),V5);return t}},F5=/[!'()~]|%20/g,G5={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},O5=function(e){return G5[e]},Z5=function(e){return T5(_5(e),F5,O5)},P5=M2((function(e,t){s5(this,{type:a5,iterator:e5(u5(e).entries),kind:t})}),"Iterator",(function(){var e=c5(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),U5=function(e){this.entries=[],this.url=null,void 0!==e&&(K2(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===b5(e,0)?D5(e,1):e:z2(e)))};U5.prototype={type:o5,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,u=t5(e);if(u)for(n=(t=e5(e,u)).next;!(r=G2(n,t)).done;){if(o=(i=e5(J2(r.value))).next,(a=G2(o,i)).done||(s=G2(o,i)).done||!G2(o,i).done)throw y5("Expected sequence with length 2");k5(this.entries,{key:z2(a.value),value:z2(s.value)})}else for(var c in e)Q2(e,c)&&k5(this.entries,{key:c,value:z2(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=w5(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=w5(t,"="),k5(this.entries,{key:x5(R5(n)),value:x5(E5(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],k5(n,Z5(e.key)+"="+Z5(e.value));return E5(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var N5=function(){Y2(this,B5),s5(this,new U5(arguments.length>0?arguments[0]:void 0))},B5=N5.prototype;if(N2(B5,{append:function(e,t){n5(arguments.length,2);var n=u5(this);k5(n.entries,{key:z2(e),value:z2(t)}),n.updateURL()},delete:function(e){n5(arguments.length,1);for(var t=u5(this),n=t.entries,r=z2(e),i=0;i<n.length;)n[i].key===r?S5(n,i,1):i++;t.updateURL()},get:function(e){n5(arguments.length,1);for(var t=u5(this).entries,n=z2(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){n5(arguments.length,1);for(var t=u5(this).entries,n=z2(e),r=[],i=0;i<t.length;i++)t[i].key===n&&k5(r,t[i].value);return r},has:function(e){n5(arguments.length,1);for(var t=u5(this).entries,n=z2(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){n5(arguments.length,1);for(var n,r=u5(this),i=r.entries,o=!1,a=z2(e),s=z2(t),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?S5(i,u--,1):(o=!0,n.value=s));o||k5(i,{key:a,value:s}),r.updateURL()},sort:function(){var e=u5(this);r5(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=u5(this).entries,r=j2(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new P5(this,"keys")},values:function(){return new P5(this,"values")},entries:function(){return new P5(this,"entries")}},{enumerable:!0}),U2(B5,i5,B5.entries,{name:"entries"}),U2(B5,"toString",(function(){return u5(this).serialize()}),{enumerable:!0}),B2(N5,o5),x2({global:!0,constructor:!0,forced:!P2},{URLSearchParams:N5}),!P2&&X2(f5)){var M5=O2(p5.has),W5=O2(p5.set),Y5=function(e){if(K2(e)){var t,n=e.body;if(H2(n)===o5)return t=e.headers?new f5(e.headers):new f5,M5(t,"content-type")||W5(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),q2(e,{body:$2(0,z2(n)),headers:$2(0,t)})}return e};if(X2(A5)&&x2({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return A5(e,arguments.length>1?Y5(arguments[1]):{})}}),X2(d5)){var X5=function(e){return Y2(this,v5),new d5(e,arguments.length>1?Y5(arguments[1]):{})};v5.constructor=X5,X5.prototype=v5,x2({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:X5})}}var Q5,j5=cS,H5=_b,J5=f2,K5=u_,z5=zk,q5=S_,$5=wk,e4=nJ,t4=VI,n4=O_,r4=WW,i4=function(e){var t=EJ(e),n=RJ(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=_J(i,r>2?arguments[2]:void 0));var a,s,u,c,l,h,A=IJ(t),d=0;if(!A||this===CJ&&TJ(A))for(a=SJ(t),s=n?new this(a):CJ(a);a>d;d++)h=o?i(t[d],d):t[d],wJ(s,d,h);else for(l=(c=DJ(t,A)).next,s=n?new this:[];!(u=bJ(l,c)).done;d++)h=o?kJ(c,i,[u.value,d],!0):u.value,wJ(s,d,h);return s.length=d,s},o4=_S,a4=pD.codeAt,s4=function(e){var t,n,r=[],i=D2(w2(I2(e),y2,"."),".");for(t=0;t<i.length;t++)n=i[t],S2(r,b2(m2,n)?"xn--"+V2(n):n);return R2(r,".")},u4=LS,c4=TI,l4=YI,h4={URLSearchParams:N5,getState:u5},A4=ck,d4=A4.set,f4=A4.getterFor("URL"),v4=h4.URLSearchParams,p4=h4.getState,m4=K5.URL,y4=K5.TypeError,g4=K5.parseInt,_4=Math.floor,b4=Math.pow,E4=q5("".charAt),k4=q5(/./.exec),T4=q5([].join),R4=q5(1..toString),S4=q5([].pop),w4=q5([].push),D4=q5("".replace),I4=q5([].shift),C4=q5("".split),L4=q5("".slice),V4=q5("".toLowerCase),x4=q5([].unshift),F4="Invalid scheme",G4="Invalid host",O4="Invalid port",Z4=/[a-z]/i,P4=/[\d+-.a-z]/i,U4=/\d/,N4=/^0x/i,B4=/^[0-7]+$/,M4=/^\d+$/,W4=/^[\da-f]+$/i,Y4=/[\0\t\n\r #%/:<>?@[\\\]^|]/,X4=/[\0\t\n\r #/:<>?@[\\\]^|]/,Q4=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,j4=/[\t\n\r]/g,H4=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)x4(t,e%256),e=_4(e/256);return T4(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=R4(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},J4={},K4=r4({},J4,{" ":1,'"':1,"<":1,">":1,"`":1}),z4=r4({},K4,{"#":1,"?":1,"{":1,"}":1}),q4=r4({},z4,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),$4=function(e,t){var n=a4(e,0);return n>32&&n<127&&!n4(t,e)?e:encodeURIComponent(e)},e3={ftp:21,file:null,http:80,https:443,ws:80,wss:443},t3=function(e,t){var n;return 2==e.length&&k4(Z4,E4(e,0))&&(":"==(n=E4(e,1))||!t&&"|"==n)},n3=function(e){var t;return e.length>1&&t3(L4(e,0,2))&&(2==e.length||"/"===(t=E4(e,2))||"\\"===t||"?"===t||"#"===t)},r3=function(e){return"."===e||"%2e"===V4(e)},i3={},o3={},a3={},s3={},u3={},c3={},l3={},h3={},A3={},d3={},f3={},v3={},p3={},m3={},y3={},g3={},_3={},b3={},E3={},k3={},T3={},R3=function(e,t,n){var r,i,o,a=u4(e);if(t){if(i=this.parse(a))throw y4(i);this.searchParams=null}else{if(void 0!==n&&(r=new R3(n,!0)),i=this.parse(a,null,r))throw y4(i);(o=p4(new v4)).bindURL(this),this.searchParams=o}};R3.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,u=this,c=t||i3,l=0,h="",A=!1,d=!1,f=!1;for(e=u4(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=D4(e,Q4,"")),e=D4(e,j4,""),r=i4(e);l<=r.length;){switch(i=r[l],c){case i3:if(!i||!k4(Z4,i)){if(t)return F4;c=a3;continue}h+=V4(i),c=o3;break;case o3:if(i&&(k4(P4,i)||"+"==i||"-"==i||"."==i))h+=V4(i);else{if(":"!=i){if(t)return F4;h="",c=a3,l=0;continue}if(t&&(u.isSpecial()!=n4(e3,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&e3[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?c=m3:u.isSpecial()&&n&&n.scheme==u.scheme?c=s3:u.isSpecial()?c=h3:"/"==r[l+1]?(c=u3,l++):(u.cannotBeABaseURL=!0,w4(u.path,""),c=E3)}break;case a3:if(!n||n.cannotBeABaseURL&&"#"!=i)return F4;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=o4(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=T3;break}c="file"==n.scheme?m3:c3;continue;case s3:if("/"!=i||"/"!=r[l+1]){c=c3;continue}c=A3,l++;break;case u3:if("/"==i){c=d3;break}c=b3;continue;case c3:if(u.scheme=n.scheme,i==Q5)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=o4(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())c=l3;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=o4(n.path),u.query="",c=k3;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=o4(n.path),u.path.length--,c=b3;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=o4(n.path),u.query=n.query,u.fragment="",c=T3}break;case l3:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=b3;continue}c=d3}else c=A3;break;case h3:if(c=A3,"/"!=i||"/"!=E4(h,l+1))continue;l++;break;case A3:if("/"!=i&&"\\"!=i){c=d3;continue}break;case d3:if("@"==i){A&&(h="%40"+h),A=!0,o=i4(h);for(var v=0;v<o.length;v++){var p=o[v];if(":"!=p||f){var m=$4(p,q4);f?u.password+=m:u.username+=m}else f=!0}h=""}else if(i==Q5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(A&&""==h)return"Invalid authority";l-=i4(h).length+1,h="",c=f3}else h+=i;break;case f3:case v3:if(t&&"file"==u.scheme){c=g3;continue}if(":"!=i||d){if(i==Q5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return G4;if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(h))return a;if(h="",c=_3,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return G4;if(a=u.parseHost(h))return a;if(h="",c=p3,t==v3)return}break;case p3:if(!k4(U4,i)){if(i==Q5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=h){var y=g4(h,10);if(y>65535)return O4;u.port=u.isSpecial()&&y===e3[u.scheme]?null:y,h=""}if(t)return;c=_3;continue}return O4}h+=i;break;case m3:if(u.scheme="file","/"==i||"\\"==i)c=y3;else{if(!n||"file"!=n.scheme){c=b3;continue}if(i==Q5)u.host=n.host,u.path=o4(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=o4(n.path),u.query="",c=k3;else{if("#"!=i){n3(T4(o4(r,l),""))||(u.host=n.host,u.path=o4(n.path),u.shortenPath()),c=b3;continue}u.host=n.host,u.path=o4(n.path),u.query=n.query,u.fragment="",c=T3}}break;case y3:if("/"==i||"\\"==i){c=g3;break}n&&"file"==n.scheme&&!n3(T4(o4(r,l),""))&&(t3(n.path[0],!0)?w4(u.path,n.path[0]):u.host=n.host),c=b3;continue;case g3:if(i==Q5||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&t3(h))c=b3;else if(""==h){if(u.host="",t)return;c=_3}else{if(a=u.parseHost(h))return a;if("localhost"==u.host&&(u.host=""),t)return;h="",c=_3}continue}h+=i;break;case _3:if(u.isSpecial()){if(c=b3,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Q5&&(c=b3,"/"!=i))continue}else u.fragment="",c=T3;else u.query="",c=k3;break;case b3:if(i==Q5||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=V4(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||w4(u.path,"")):r3(h)?"/"==i||"\\"==i&&u.isSpecial()||w4(u.path,""):("file"==u.scheme&&!u.path.length&&t3(h)&&(u.host&&(u.host=""),h=E4(h,0)+":"),w4(u.path,h)),h="","file"==u.scheme&&(i==Q5||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)I4(u.path);"?"==i?(u.query="",c=k3):"#"==i&&(u.fragment="",c=T3)}else h+=$4(i,z4);break;case E3:"?"==i?(u.query="",c=k3):"#"==i?(u.fragment="",c=T3):i!=Q5&&(u.path[0]+=$4(i,J4));break;case k3:t||"#"!=i?i!=Q5&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":$4(i,J4)):(u.fragment="",c=T3);break;case T3:i!=Q5&&(u.fragment+=$4(i,K4))}l++}},parseHost:function(e){var t,n,r;if("["==E4(e,0)){if("]"!=E4(e,e.length-1))return G4;if(t=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,A=function(){return E4(e,h)};if(":"==A()){if(":"!=E4(e,1))return;h+=2,l=++c}for(;A();){if(8==c)return;if(":"!=A()){for(t=n=0;n<4&&k4(W4,A());)t=16*t+g4(A(),16),h++,n++;if("."==A()){if(0==n)return;if(h-=n,c>6)return;for(r=0;A();){if(i=null,r>0){if(!("."==A()&&r<4))return;h++}if(!k4(U4,A()))return;for(;k4(U4,A());){if(o=g4(A(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==A()){if(h++,!A())return}else if(A())return;u[c++]=t}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u}(L4(e,1,-1)),!t)return G4;this.host=t}else if(this.isSpecial()){if(e=s4(e),k4(Y4,e))return G4;if(t=function(e){var t,n,r,i,o,a,s,u=C4(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==E4(i,0)&&(o=k4(N4,i)?16:8,i=L4(i,8==o?1:2)),""===i)a=0;else{if(!k4(10==o?M4:8==o?B4:W4,i))return e;a=g4(i,o)}w4(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=b4(256,5-t))return null}else if(a>255)return null;for(s=S4(n),r=0;r<n.length;r++)s+=n[r]*b4(256,3-r);return s}(e),null===t)return G4;this.host=t}else{if(k4(X4,e))return G4;for(t="",n=i4(e),r=0;r<n.length;r++)t+=$4(n[r],J4);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return n4(e3,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&t3(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=H4(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+T4(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw y4(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new S3(e.path[0]).origin}catch(_6){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+H4(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(u4(e)+":",i3)},getUsername:function(){return this.username},setUsername:function(e){var t=i4(u4(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=$4(t[n],q4)}},getPassword:function(){return this.password},setPassword:function(e){var t=i4(u4(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=$4(t[n],q4)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?H4(e):H4(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,f3)},getHostname:function(){var e=this.host;return null===e?"":H4(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,v3)},getPort:function(){var e=this.port;return null===e?"":u4(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=u4(e))?this.port=null:this.parse(e,p3))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+T4(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,_3))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=u4(e))?this.query=null:("?"==E4(e,0)&&(e=L4(e,1)),this.query="",this.parse(e,k3)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=u4(e))?("#"==E4(e,0)&&(e=L4(e,1)),this.fragment="",this.parse(e,T3)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var S3=function(e){var t=t4(this,w3),n=l4(arguments.length,1)>1?arguments[1]:void 0,r=d4(t,new R3(e,!1,n));H5||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},w3=S3.prototype,D3=function(e,t){return{get:function(){return f4(this)[e]()},set:t&&function(e){return f4(this)[t](e)},configurable:!0,enumerable:!0}};if(H5&&(e4(w3,"href",D3("serialize","setHref")),e4(w3,"origin",D3("getOrigin")),e4(w3,"protocol",D3("getProtocol","setProtocol")),e4(w3,"username",D3("getUsername","setUsername")),e4(w3,"password",D3("getPassword","setPassword")),e4(w3,"host",D3("getHost","setHost")),e4(w3,"hostname",D3("getHostname","setHostname")),e4(w3,"port",D3("getPort","setPort")),e4(w3,"pathname",D3("getPathname","setPathname")),e4(w3,"search",D3("getSearch","setSearch")),e4(w3,"searchParams",D3("getSearchParams")),e4(w3,"hash",D3("getHash","setHash"))),$5(w3,"toJSON",(function(){return f4(this).serialize()}),{enumerable:!0}),$5(w3,"toString",(function(){return f4(this).serialize()}),{enumerable:!0}),m4){var I3=m4.createObjectURL,C3=m4.revokeObjectURL;I3&&$5(S3,"createObjectURL",z5(I3,m4)),C3&&$5(S3,"revokeObjectURL",z5(C3,m4))}function L3(){var e,t,n=new Zp((function(n,r){e=n,t=r}));return n.used=!1,n.resolve=function(){return n.used=!0,e.apply(void 0,arguments)},n.reject=function(){return n.used=!0,t.apply(void 0,arguments)},n}function V3(){try{return ug(performance.now(),10)}catch(b6){return(new Date).getTime()}}c4(S3,"URL"),j5({global:!0,constructor:!0,forced:!J5,sham:!H5},{URL:S3});var x3,F3=function(){function e(){n2(this,e)}return i2(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(_6){}}},{key:"buffers",value:function(e,t){if(!e||!e.length)return[];for(var n=[],r=0,i=e.length;r<i;r++){var o=n.length;if(o&&t){var a=n[o-1],s=a[1];if(e.start(r)-s<=t){var u=e.end(r);u>s&&(a[1]=u)}else n.push([e.start(r),e.end(r)])}else n.push([e.start(r),e.end(r)])}return n}},{key:"totalLength",value:function(e){return e&&e.length?TY(e).call(e,(function(e,t){return e+(t[1]-t[0])}),0):0}},{key:"info",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t||!t.length)return{start:0,end:0,buffers:[]};for(var i=0,o=0,a=0,s=0,u=0,c=0,l=0,h=e.buffers(t,r),A=0,d=h.length;A<d;A++){var f=h[A];if(n+r>=f[0]&&n<f[1])i=f[0],o=f[1],a=A;else{if(n+r<f[0]){s=f[0],u=f[1];break}n+r>f[1]&&(c=f[0],l=f[1])}}return{start:i,end:o,index:a,buffers:h,nextStart:s,nextEnd:u,prevStart:c,prevEnd:l,currentTime:n,behind:n-i,remaining:o?o-n:0,length:e.totalLength&&e.totalLength(h)}}}]),e}(),G3="network",O3="network_timeout",Z3="demux",P3="remux",U3="media",N3="other",B3={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",OPTION:"OPTION"},M3=(o2(x3={},"manifest",{HLS:1100}),o2(x3,G3,2100),o2(x3,O3,2101),o2(x3,Z3,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400}),o2(x3,P3,{FMP4:4100,MP4:4200}),o2(x3,U3,{MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203}),o2(x3,N3,8e3),x3),W3=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=wh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Th(e,"prototype",{writable:!1}),t&&s2(e,t)}(i,e);var t,n,r=(t=i,n=u2(),function(){var e,r=a2(t);if(n){var i=a2(this).constructor;e=Wm(r,arguments,i)}else e=r.apply(this,arguments);return h2(this,e)});function i(e,t,n,o,a){var s;return n2(this,i),(s=r.call(this,a||(null==n?void 0:n.message))).errorType=e===O3?G3:e,s.originError=n,s.ext=o,s.errorCode=M3[e][t]||M3[e],s.errorMessage=s.message,s.errorCode||(s.errorType=N3,s.errorCode=M3[s.errorType]),s}return i2(i,null,[{key:"create",value:function(e,t,n,r,o){return e instanceof i?e:(e instanceof Error&&(n=e,e=""),e||(e=N3),new i(e,t,n,r,o))}},{key:"network",value:function(e){var t;return new i(null!=e&&e.isTimeout?O3:G3,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})}}]),i}(l2(Error)),Y3="undefined"!=typeof window,X3=function(){function e(t){n2(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]")}return i2(e,[{key:"debug",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).debug.apply(n,dg(t=[this._prefix,V3()]).call(t,i))}}},{key:"log",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).log.apply(n,dg(t=[this._prefix,V3()]).call(t,i))}}},{key:"warn",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).warn.apply(n,dg(t=[this._prefix,V3()]).call(t,i))}}},{key:"error",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).error.apply(n,dg(t=[this._prefix,V3()]).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}();o2(X3,"disabled",!0);var Q3=function(){try{return Y3?window.MediaSource:null}catch(b6){}}(),j3="appendBuffer",H3="removeBuffer",J3=function(){function e(t,n){var r=this;n2(this,e),o2(this,"media",null),o2(this,"mediaSource",null),o2(this,"_openPromise",L3()),o2(this,"_queue",wh(null)),o2(this,"_sourceBuffer",wh(null)),o2(this,"_mseFullFlag",{}),o2(this,"_st",0),o2(this,"_opst",0),o2(this,"_logger",null),o2(this,"_config",null),o2(this,"_url",null),o2(this,"_onSBUpdateEnd",(function(e){var t=r._queue[e];if(t){var n=t.shift();if(n){var i=V3()-r._opst;r._logger.debug("UpdateEnd",n.opName,i,n.context),n.promise.resolve({name:n.opName,context:n.context,costtime:i}),r._startQueue(e)}}})),o2(this,"_onSBUpdateError",(function(e,t){var n=r._queue[e];if(n){var i=n[0];i&&(r._logger.error("UpdateError",e,i.opName,i.context),i.promise.reject(new W3(U3,B3.MSE_APPEND_BUFFER,t)))}})),this._config=CW(e.getDefaultConfig(),n),t&&this.bindMedia(t),this._logger=new X3("MSE"),this._config.openLog&&X3.enable()}var t,n,r;return i2(e,[{key:"isOpened",get:function(){var e;return"open"===(null===(e=this.mediaSource)||void 0===e?void 0:e.readyState)}},{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:"isFull",value:function(t){return t?this._mseFullFlag[t]:this._mseFullFlag[e.VIDEO]}},{key:"updateDuration",value:function(e){var t=this;return this.mediaSource&&this.mediaSource.duration>e?Zp.resolve():this._enqueueBlockingOp((function(){t.isEnded?t._logger.debug("[debug mse] setDuration ended"):t.mediaSource&&(t.mediaSource.duration=e,t._logger.debug("[debug mse] setDuration"))}),"updateDuration")}},{key:"open",value:function(){var e=this;if(this._openPromise.used&&!this.isOpened&&this.mediaSource){var t=this.mediaSource;t.addEventListener("sourceopen",(function n(){var r=V3()-e._st;e._logger.debug("MSE OPEN",r),t.removeEventListener("sourceopen",n),e._openPromise.resolve({costtime:r})})),this._openPromise=L3()}return this._openPromise}},{key:"bindMedia",value:(r=t2($1().mark((function e(t){var n,r,i=this;return $1().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(t&&Q3){e.next=5;break}throw new Error("Param media or MediaSource does not exist");case 5:return this.media=t,n=this.mediaSource=new Q3,this._st=V3(),r=function e(){var r=V3()-i._st;i._logger.debug("MSE OPEN"),n.removeEventListener("sourceopen",e),p$.revokeObjectURL(t.src),i._openPromise.resolve({costtime:r})},n.addEventListener("sourceopen",r),this._url=p$.createObjectURL(n),t.src=this._url,e.abrupt("return",this._openPromise);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"unbindMedia",value:(n=t2($1().mark((function e(){var t,n,r,i=this;return $1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._openPromise.used||this._openPromise.resolve(),t=this.mediaSource){var o,a;if($l(o=kl(this._queue)).call(o,(function(e){var t=i._queue[e];t&&$l(t).call(t,(function(e){return e.promise.resolve}))})),n=!!this.media&&this.media.readyState>=1,r="open"===t.readyState,n&&r)try{t.endOfStream()}catch(_6){}$l(a=kl(this._sourceBuffer)).call(a,(function(e){try{t.removeSourceBuffer(i._sourceBuffer[e])}catch(_6){}}))}if(this.media){this.media.removeAttribute("src");try{this.media.load()}catch(_6){}this.media=null}this.mediaSource=null,this._openPromise=L3(),this._queue=wh(null),this._sourceBuffer=wh(null);case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"createSource",value:function(e,t){var n,r;if(!this._sourceBuffer[e]&&this.mediaSource){var i;try{i=this._sourceBuffer[e]=this.mediaSource.addSourceBuffer(t)}catch(_6){throw new W3(U3,B3.MSE_ADD_SB,_6)}i.mimeType=t,i.addEventListener("updateend",Dm(n=this._onSBUpdateEnd).call(n,this,e)),i.addEventListener("error",Dm(r=this._onSBUpdateError).call(r,this,e))}}},{key:"changeType",value:function(e,t){var n=this,r=this._sourceBuffer[e];return this.mediaSource&&r&&r.mimeType!==t&&"function"==typeof r.changeType?this._enqueueOp(e,(function(){r.changeType(t),r.mimeType=t,n._onSBUpdateEnd(e)})):Zp.resolve()}},{key:"createOrChangeSource",value:function(e,t){return this.createSource(e,t),this.changeType(e,t)}},{key:"append",value:function(e,t,n){var r=this;return t&&t.byteLength&&this._sourceBuffer[e]?this._enqueueOp(e,(function(){var i;r.mediaSource&&(r._logger.debug("MSE APPEND START",n),r._opst=V3(),null===(i=r._sourceBuffer[e])||void 0===i||i.appendBuffer(t))}),j3,n):Zp.resolve()}},{key:"remove",value:function(e,t,n,r){var i=this,o=!1;return this._mseFullFlag[e]&&(o=!0),this._enqueueOp(e,(function(){if(i.mediaSource){var o=i._sourceBuffer[e];t>=n||!o?i._onSBUpdateEnd(e):(i._opst=V3(),i._logger.debug("MSE REMOVE START",e,t,n,r),o.remove(t,n))}}),H3,r,o)}},{key:"clearBuffer",value:function(e,t){var n,r,i=this;return $l(n=kl(this._sourceBuffer)).call(n,(function(n){r=i._enqueueOp(n,(function(){if(i.mediaSource){var r=i._sourceBuffer[n];i._logger.debug("MSE clearBuffer START",n,e,t),r.remove(e,t)}}))})),r}},{key:"clearAllBuffer",value:function(){var e,t,n=this;return $l(e=kl(this._sourceBuffer)).call(e,(function(e){t=n._enqueueOp(e,(function(){if(n.mediaSource){var t=n._sourceBuffer[e];n._logger.debug("MSE clearAllBuffer START",e),t.remove(0,F3.end(F3.get(t)))}}))})),t}},{key:"clearOpQueues",value:function(e){var t;this._logger.debug("MSE clearOpQueue START");var n=this._queue[e];if(n&&n[e]&&!(n.length<5)){var r=[];$l(n).call(n,(function(e){e.context&&e.context.isinit&&r.push(e)})),this._queue[e]=hm(n).call(n,0,2),r.length>0&&(t=this._queue[e]).push.apply(t,r)}}},{key:"endOfStream",value:function(e){var t=this;return this.mediaSource&&"open"===this.mediaSource.readyState?this._enqueueBlockingOp((function(){var n=t.mediaSource;n&&"open"===n.readyState&&(t._logger.debug("MSE endOfStream START"),e?n.endOfStream(e):n.endOfStream())}),"endOfStream"):Zp.resolve()}},{key:"setLiveSeekableRange",value:function(e,t){var n=this.mediaSource;e<0||t<e||null==n||!n.setLiveSeekableRange||"open"!==n.readyState||n.setLiveSeekableRange(e,t)}},{key:"getSourceBuffer",value:function(e){return this._sourceBuffer[e]}},{key:"buffered",value:function(e){return F3.get(this._sourceBuffer[e])}},{key:"bufferStart",value:function(e){return F3.start(this.buffered(e))}},{key:"bufferEnd",value:function(e){return F3.end(this.buffered(e))}},{key:"_enqueueOp",value:function(e,t,n,r,i){var o=this;if(!this.mediaSource)return Zp.resolve();var a=this._queue[e]=this._queue[e]||[],s={exec:t,promise:L3(),opName:n,context:r};return i?(PQ(a).call(a,0,0,s),this._mseFullFlag[e]=!1,this._startQueue(e)):a.push(s),this.isOpened?1===a.length&&this._startQueue(e):this._openPromise.then((function(){1===a.length&&o._startQueue(e)})),s.promise}},{key:"_enqueueBlockingOp",value:(t=t2($1().mark((function e(t,n){var r,i,o=this;return $1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mediaSource){e.next=2;break}return e.abrupt("return",Zp.resolve());case 2:if((r=kl(this._sourceBuffer)).length){e.next=5;break}return e.abrupt("return",t());case 5:return i=[],$l(r).call(r,(function(e){var t=o._queue[e],r=L3();i.push(r),t.push({exec:function(){return r.resolve()},promise:r,opName:n}),1===t.length&&o._startQueue(e)})),e.abrupt("return",Zp.all(i).then((function(){try{return t()}finally{$l(r).call(r,(function(e){var t=o._queue[e],n=o._sourceBuffer[e];null==t||t.shift(),n&&n.updating||o._startQueue(e)}))}})));case 8:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"_startQueue",value:function(e){var t=this._queue[e];if(t){var n=t[0];if(n&&!this._mseFullFlag[e])try{n.exec()}catch(_6){var r;_6&&_6.message&&TH(r=_6.message).call(r,"SourceBuffer is full")>=0?(this._mseFullFlag[e]=!0,this._logger.error("[MSE error], context,",n.context," ,name,",n.opName,",err,SourceBuffer is full"),n.promise.reject(new W3(U3,B3.MSE_FULL,_6))):(this._logger.error(_6),n.promise.reject(new W3(U3,B3.MSE_OTHER,_6)),t.shift(),this._startQueue(e))}}}},{key:"setTimeoffset",value:function(e,t,n){var r=this;return this._enqueueOp(e,(function(){t<0&&(t+=.001),r._sourceBuffer[e].timestampOffset=t,r._onSBUpdateEnd(e)}),"setTimeoffset",n)}},{key:"abort",value:function(e,t){var n=this;return this.isOpened?this._enqueueOp(e,(function(){n._sourceBuffer[e].abort(),n._onSBUpdateEnd(e)}),"abort",t):Zp.resolve()}}],[{key:"getDefaultConfig",value:function(){return{openLog:!1}}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if(!Q3)return!1;try{return Q3.isTypeSupported(e)}catch(_6){return this._logger.error(e,_6),!1}}}]),e}();o2(J3,"VIDEO","video"),o2(J3,"AUDIO","audio");var K3={"mp4a.40.5":1,"mp4a.40.2":2},z3=.05,q3=new(function(){function e(){by(this,e),Ty(this,"_queue",[]),"undefined"!=typeof document&&(this._tempMedia=document.createElement("video"))}return ky(e,[{key:"tempMedia",get:function(){return this._tempMedia}},{key:"hasCached",get:function(){var e,t;return-1!==vQ(e=this._queue).call(e,(function(e){return 1===e.codec}))&&-1!==vQ(t=this._queue).call(t,(function(e){return 2===e.codec}))}},{key:"getCachedMedia",value:function(e){var t,n,r=vQ(t=this._queue).call(t,(function(t){return t.codec===e}));return-1!==r?PQ(n=this._queue).call(n,r,1)[0]:null}},{key:"cacheMedia",value:function(e){var t,n,r=e.codec,i=e.media,o=e.mse,a=K3[r];if(this._queue=Vl(t=this._queue).call(t,(function(e){var t;return e.mse&&!e.mse.isOpened&&e.mse.unbindMedia(),null===(t=e.mse)||void 0===t?void 0:t.isOpened})),!r||Vl(n=this._queue).call(n,(function(e){return e.codec===a})).length>2)return null==o||o.endOfStream(),void(null==o||o.unbindMedia());this._queue.push({codec:a,media:i,mse:o})}}]),e}()),$3=function(e){Ry(o,e);var t,n,r,i=Iy(o);function o(e,t){var n;return by(this,o),Ty(Dy(n=i.call(this,e,t)),"_media",void 0),Ty(Dy(n),"_isTempMedia",!1),Ty(Dy(n),"_mse",void 0),Ty(Dy(n),"_remuxer",null),Ty(Dy(n),"_codec",""),Ty(Dy(n),"_sourceCreated",!1),Ty(Dy(n),"_needInitSegment",!0),Ty(Dy(n),"_seekNoSideEffect",!1),Ty(Dy(n),"_startRendered",!1),Ty(Dy(n),"_firstTimeAppendedBuffer",!1),Ty(Dy(n),"_sampleQueue",[]),Ty(Dy(n),"_inProcessing",!1),Ty(Dy(n),"_duration",0),Ty(Dy(n),"_mediaCache",q3),Ty(Dy(n),"_resetDts",(function(){})),Ty(Dy(n),"_onCanplay",(function(){n._ready||(n._ready=!0,n.emit(MY.AUDIO_READY))})),Ty(Dy(n),"_onPlaying",(function(){n._parent.ready&&(n._audioCanAutoplay=!0,n._emitTimelineEvents(YY.PLAY_EVENT,NY.PLAYING))})),Ty(Dy(n),"_onWaiting",(function(){if(!n._seekNoSideEffect){try{for(var e,t=n._media.buffered,r=n._media.currentTime,i=0,o=0,a=t.length;o<a;o++)t.start(o)<r&&t.end(o)>r&&(i=t.end(o)-r);if(Math.abs(i)>.5)return;if(Math.abs(n._media.duration-n._media.currentTime)<.3)return n._reuseMse||n._mse.endOfStream(),void(null===(e=Dy(n))||void 0===e||e._emitTimelineEvents(YY.PLAY_EVENT,NY.ENDED))}catch(b6){}n._ready=!1,n.emit(MY.AUDIO_WAITING)}})),Ty(Dy(n),"_onSeeked",(function(){n._seekNoSideEffect||n._isLive?n._seekNoSideEffect=!1:(fW.log(n.TAG,"seeked"),n._ready||(n._media.pause(),n._ready=!0,n.emit(MY.AUDIO_READY)))})),Ty(Dy(n),"_onProgress",(function(){if(n._media.readyState<=1){var e=n._getBufferGap();e>0&&e<1&&(n._media.currentTime+=e+z3,fW.warn(n.TAG,"progress, gap=",e))}n._emitTimelineEvents(YY.PLAY_EVENT,NY.PROGRESS),n._emitTimelineEvents(YY.PLAY_EVENT,NY.DURATION_CHANGE)})),Ty(Dy(n),"_onEnded",(function(){var e;fW.log(n.TAG,"ended!"),null===(e=Dy(n))||void 0===e||e._emitTimelineEvents(YY.PLAY_EVENT,NY.ENDED)})),Ty(Dy(n),"_onOnceProgress",(function(){if(n._media.buffered.length){var e=n._media.buffered.start(0);e&&(n._media.currentTime=e+z3,fW.log(n.TAG,"start gap:",e)),n._media.removeEventListener("progress",n._onOnceProgress)}})),Ty(Dy(n),"_onError",(function(){var e;n._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,n._assembleErr("audio error: ".concat(null===(e=n._media.error)||void 0===e?void 0:e.message),3))})),Ty(Dy(n),"_appendChunk",(function(e,t){var r;if(!n.noAudio&&t.samples.length){if(n._codec||(2!==t.objectType&&5!==t.objectType?n._codec="mp4a.40.5":n._codec=t.codec,n._isTempMedia&&n._switchMedia(n._codec)),$l(r=t.samples).call(r,(function(e){e.baseMediaDecodeTime=t.baseMediaDecodeTime,n._sampleQueue.push(e)})),t.samples=[],!n._meta)return n._meta=my(my({},t),{},{exist:function(){return!0},hasSample:function(){return!0},samples:[]}),fW.warn(n.TAG,"audio set metadata",n._meta),void n._doAppendWrapper();var i,o;if(n._meta.sampleRate!==t.sampleRate)fW.warn(n.TAG,dg(i="discontinue: ".concat(n._meta.sampleRate," -> ")).call(i,t.sampleRate)),n._needInitSegment=!0,$l(o=kl(t)).call(o,(function(e){n._meta[e]=t[e]}));!n._inProcessing&&n._sampleQueue.length&&n._doAppendWrapper()}})),Ty(Dy(n),"_doAppend",function(){var e=_y(yy().mark((function e(t){var r,i,o;return yy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._remuxer||(n._remuxer=new UJ({samples:[],exist:function(){return!1}},t)),r=t.samples,n._sourceCreated){e.next=12;break}return n.analyse.addAudioMseOpenStart(),e.next=6,n._mse.open();case 6:n._sourceCreated=!0,fW.log(n.TAG,"video/mp4;codecs=".concat(n._codec)),n._mse.createSource(t.type,"video/mp4;codecs=".concat(n._codec)),n.analyse.addAudioMseOpend(),fW.log(n.TAG,"sb created!"),n._checkAutoPlay();case 12:if(i=n._remuxer.remux(n._needInitSegment),!n._needInitSegment||i.audioInitSegment){e.next=15;break}return e.abrupt("return");case 15:return n._needInitSegment=!1,o=[],i.audioInitSegment&&o.push(n._mse.append(t.type,i.audioInitSegment)),i.audioSegment&&o.push(n._mse.append(t.type,i.audioSegment)),e.abrupt("return",Zp.all(o).then((function(){return r[r.length-1].dts/1e3})).then((function(){n._firstTimeAppendedBuffer||(n._firstTimeAppendedBuffer=!0,n.analyse.addAudioFirstTimeAppended())})));case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),Ty(Dy(n),"_doPlay",(function(){n._media.play().catch((function(){}))})),Ty(Dy(n),"_doPause",(function(){n._media.pause()})),Ty(Dy(n),"_doSeek",(function(e){n._ready=!1,n._media.currentTime=e})),Ty(Dy(n),"_doChaseFrame",(function(e){var t=e.position;n._seekNoSideEffect=!0,n._media.currentTime=t})),Ty(Dy(n),"_startRender",(function(){fW.log(n.TAG,"start render"),n._startRendered=!0,n._media.play().catch((function(){}))})),n.TAG="AudioMseRender",n._reuseMse=JW().reuseMseForAudio,n._initMedia(),n}return ky(o,[{key:"isMse",get:function(){return!0}},{key:"media",get:function(){return this._media}},{key:"currentTime",get:function(){return this._media.currentTime}},{key:"buffered",get:function(){return this._media.buffered}},{key:"duration",get:function(){return Xg(this._media.duration)?1/0:this._media.duration},set:function(e){this._duration=e,this._updateDuration(e)}},{key:"audioCanAutoplay",get:function(){return this._audioCanAutoplay||this.noAudio}},{key:"_initMedia",value:function(){if(!this._reuseMse||!q3.hasCached)return fW.log(this.TAG,"init media and mse directly"),this._media=document.createElement("video"),this._media.autoplay=!0,this._mse=new J3,this._bindEvents(),this._bindMediaEvents(),void this._mse.bindMedia(this._media);fW.log(this.TAG,"bind media temporary"),this._media=q3.tempMedia,this._bindEvents(),this._isTempMedia=!0}},{key:"_switchMedia",value:function(e){var t=this._media,n=q3.getCachedMedia(K3[e]);n?(fW.warn(this.TAG,"switch to cached media for audio play! codec=".concat(e)),this._media=n.media,this._mse=n.mse,this._bindMediaEvents(),this._updateDuration(this._duration),this._media.currentTime=z3,this._sourceCreated=!0,this._audioCanAutoplay=!0,this.analyse.addAudioMseOpend()):this._initMedia(),this._media.volume=t.volume,this._media.playbackRate=t.playbackRate,this._isTempMedia=!1}},{key:"_getBufferGap",value:function(){for(var e=this.buffered,t=0,n=e.length;t<n;t++)if(!(e.end(t)<this.currentTime))return e.start(t)-this.currentTime;return 0}},{key:"canSeek",value:function(){return!0}},{key:"resume",value:function(){return this._media.play()}},{key:"pause",value:function(){return this._media.pause()}},{key:"seekNoSideEffect",value:function(e){this._doChaseFrame(e)}},{key:"dump",value:function(){}},{key:"_emitTimelineEvents",value:function(e,t,n){var r,i;null===(r=this._parent)||void 0===r||null===(i=r.emit)||void 0===i||i.call(r,e,t,n)}},{key:"_assembleErr",value:function(e,t){var n=new Error(e);return n.code=3,n.subCode=t,n}},{key:"_bindEvents",value:function(){var e=this;Cy(Sy(o.prototype),"_bindEvents",this).call(this),this._parent.on(XY.CHASE_AUDIO_FRAME,this._doChaseFrame),this._parent.on(YY.UPDATE_VOLUME,(function(t){e._media.volume=t,e._emitTimelineEvents(YY.PLAY_EVENT,NY.VOLUME_CHANGE)})),this._parent.on(YY.END_OF_STREAM,(function(){var t;e.reuseMseForAudio||(null===(t=e._mse)||void 0===t||t.endOfStream())})),this._parent.on(YY.SET_PLAYBACKRATE,(function(t){fW.log(e.TAG,"change playbackrate, ",t),e._media.playbackRate=t}))}},{key:"_bindMediaEvents",value:function(){this._media.addEventListener("canplay",this._onCanplay),this._media.addEventListener("playing",this._onPlaying),this._media.addEventListener("waiting",this._onWaiting),this._media.addEventListener("seeked",this._onSeeked),this._media.addEventListener("progress",this._onProgress),this._media.addEventListener("ended",this._onEnded),this._media.addEventListener("progress",this._onOnceProgress),this._media.addEventListener("error",this._onError)}},{key:"_updateDuration",value:(r=_y(yy().mark((function e(t){return yy().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 e.next=6,this._mse.updateDuration(t);case 6:fW.log(this.TAG,"update duration",t);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_doAppendWrapper",value:(n=_y(yy().mark((function e(){var t;return yy().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:return this._meta.samples=hm(n=this._sampleQueue).call(n),this._meta.baseMediaDecodeTime=this._meta.samples[0].baseMediaDecodeTime,this._sampleQueue=[],e.prev=3,this._inProcessing=!0,e.next=7,this._doAppend(this._meta);case 7:if(t=e.sent,this.isLive&&this._emitTimelineEvents(YY.UPDATE_SEGMENT_END,t),this._inProcessing=!1,!this._sampleQueue.length){e.next=13;break}return e.next=13,this._doAppendWrapper();case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),this._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,this._assembleErr("audio error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message),3));case 18:case"end":return e.stop()}}),e,this,[[3,15]])}))),function(){return n.apply(this,arguments)})},{key:"_checkAutoPlay",value:function(){var e=this;this._media.addEventListener("canplay",(function t(){var n=e._media.volume;e._media.volume=Math.min(n,.1);var r=e._media.play();(r=r.then?r:Zp.reject()).then((function(){fW.log(e.TAG,"auto play by checkAutoPlay!"),e._audioCanAutoplay=!0})).catch((function(){fW.warn(e.TAG,"can’t auto play!"),e._audioCanAutoplay=!1,e.emit(MY.AUDIO_NOT_ALLOWED_AUTOPLAY)})).finally((function(){e._media.volume=n,e._startRendered||(e._media.pause(),fW.log(e.TAG,"auto paused by checkAutoPlay!")),e._media.removeEventListener("canplay",t)}))}))}},{key:"_destroy",value:(t=_y(yy().mark((function e(){var t,n,r;return yy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(fW.log(this.TAG,"destroy audio render"),this._remuxer=null,this.removeAllListeners(),this._media.removeEventListener("canplay",this._onCanplay),this._media.removeEventListener("playing",this._onPlaying),this._media.removeEventListener("waiting",this._onWaiting),this._media.removeEventListener("seeked",this._onSeeked),this._media.removeEventListener("progress",this._onProgress),this._media.removeEventListener("ended",this._onEnded),this._media.removeEventListener("progress",this._onOnceProgress),this._media.removeEventListener("error",this._onError),this._reuseMse){e.next=17;break}return null===(t=this._mse)||void 0===t||t.endOfStream(),e.next=15,null===(n=this._mse)||void 0===n?void 0:n.unbindMedia();case 15:e.next=20;break;case 17:null===(r=this._mse)||void 0===r||r.clearAllBuffer(),q3.cacheMedia({codec:this._codec,media:this._media,mse:this._mse}),fW.log(this.TAG,"cache media for audio play, codec=",this._codec);case 20:this._meta&&(this._meta.duration=0),this._mse=null,this._media=null;case 23:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"isSupported",value:function(){return JW().audioWithMse&&!!window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="mp4a.40.5"')}}]),o}(QY),e9=function(){function e(t){by(this,e),this.TAG="VideoTimeRange",this._parent=t,this._baseDts=0,this._lastDuration=0,this._duration=0,this._bitrate=0,this._totalSize=0,this._buffers=[],this._currentFrameQueue=[],this._frameIndexInQueue=0,this._delayEstimateList=[],this._keyframeQueue=[]}return ky(e,[{key:"isLive",get:function(){return this._parent.isLive}},{key:"baseDts",get:function(){return this._baseDts}},{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e}},{key:"buffered",get:function(){var e=this;if(this.isLive)return{length:this._duration?1:0,start:function(){return 0},end:function(){return e._duration}};var t=this._mergeBufferRanges();return{length:t.length,start:function(e){var n=t[e];return n?n.start:0},end:function(e){var n=t[e];return n?n.end:1/0}}}},{key:"bufferStart",get:function(){var e;return(null===(e=this._buffers[0])||void 0===e?void 0:e.start)||0}},{key:"frameLength",get:function(){return this._currentFrameQueue.length}},{key:"keyFrameLength",get:function(){return this._keyframeQueue.length}},{key:"totalSize",get:function(){return this._totalSize}},{key:"bitrate",get:function(){return this._bitrate},set:function(e){this._bitrate=e}},{key:"lastDuration",get:function(){return this._lastDuration}},{key:"frames",get:function(){return this._currentFrameQueue}},{key:"getCurrentTime",value:function(e){return this._lastDuration+(e-this._baseDts)/1e3}},{key:"resetDts",value:function(e){this._baseDts=e}},{key:"_mergeBufferRanges",value:function(){var e,t=VX(e=this._buffers).call(e,(function(e,t){return e.start>t.start?1:-1})),n=t.length,r=[];if(!n)return r;for(var i={start:t[0].start,end:t[0].end},o=1;o<n;o++){var a=t[o];Math.abs(i.end-a.start)<.1?i.end=a.end:(r.push(i),i={start:a.start,end:a.end})}return r.push(i),r}},{key:"_caclBaseDts",value:function(e){-1===this._baseDts&&e&&(this._baseDts=e.dts,fW.log(this.TAG,"set baseDts: ",this._baseDts,"frame len:",this._currentFrameQueue.length))}},{key:"_updateDuration",value:function(e){for(var t=e.length,n=e[t-1],r=0;r<t;r++){var i=e[r];if(i&&i.options&&i.options.meta){var o=e[r-1]||this._currentFrameQueue[this._currentFrameQueue.length-1];o?this._lastDuration+=(o.dts-this._baseDts)/1e3:this._lastDuration=this._duration,fW.log(this.TAG,"updateBaseDts,record lastDuration:",this._lastDuration),this._baseDts=i.dts;break}}n&&(this._duration=(n.dts-this._baseDts)/1e3+this._lastDuration)}},{key:"_estimateBitRate",value:function(e){var t=e.length;if(t<=2){var n;if(this._delayEstimateList=dg(n=this._delayEstimateList).call(n,e),(t=this._delayEstimateList.length)<=30)return;e=this._delayEstimateList,this._delayEstimateList=[]}for(var r=0,i=0;i<t;i++){var o,a=e[i];r+=a.data?a.data.length:TY(o=a.units).call(o,(function(e,t){return e+t.byteLength}),0)}this._totalSize+=r;var s=r/(e[t-1].dts-e[0].dts);this._bitrate=ug(8e3*s)}},{key:"_beforeAppendVodBuffer",value:function(e){var t=this;if(e.length){for(var n=[],r=[],i=0,o=e.length;i<o;i++)e[i].keyframe&&(n.push(r),r=[]),r.push(e[i]);r.length&&n.push(r),$l(n).call(n,(function(e){return t._appendVodBuffer(e)}))}}},{key:"_appendVodBuffer",value:function(e){var t,n;if(e.length){var r,i=e[0],o=e[e.length-1],a=(i.dts-this._baseDts)/1e3,s=(o.dts-this._baseDts)/1e3;if(fW.enable)fW.log(this.TAG,dg(r="add new buffer range [".concat(a," , ")).call(r,s,"]"));Vl(t=this._buffers).call(t,(function(e){return a>=e.start&&s<=e.end})).length||(this._buffers.push({start:a,end:s,duartion:s-a,frames:hm(e).call(e)}),VX(n=this._buffers).call(n,(function(e,t){return e.start>t.start?1:-1})),this._afterAppendVodBuffer())}}},{key:"_afterAppendVodBuffer",value:function(){var e;if(Vl(e=this._buffers).call(e,(function(e){var t;return!(null!==(t=e.frames[0])&&void 0!==t&&t.keyframe)})).length){for(var t=this._buffers,n=this._buffers.length,r=[],i=this._buffers[0],o=1;o<n;o++){var a,s;if(null!==(a=t[o].frames[0])&&void 0!==a&&a.keyframe)r.push(i),i=t[o];else i.frames=dg(s=i.frames).call(s,t[o].frames),i.end=t[o].end,i.duartion=i.end-i.start}r.push(i),this._buffers=r}}},{key:"_recordKeyframes",value:function(e){var t,n,r=this;($l(e).call(e,(function(e){if(e.keyframe){var t=(e.dts-r._baseDts)/1e3;r._keyframeQueue.push({position:t,frame:e})}})),this._keyframeQueue=VX(t=this._keyframeQueue).call(t,(function(e,t){return e.position>t.position?1:-1})),this.isLive&&this._keyframeQueue.length>40)&&PQ(n=this._keyframeQueue).call(n,0,20)}},{key:"toAnnexBNalu",value:function(e){$l(e).call(e,(function(e){var t=e.units;if(t){var n=TY(t).call(t,(function(e,t){return e+4+t.byteLength}),0),r=new Uint8Array(n),i=0;$l(t).call(t,(function(e){r.set([0,0,0,1],i),i+=4,r.set(e,i),i+=e.byteLength})),e.units=null,e.data=r}}))}},{key:"append",value:function(e,t,n){var r;(n&&this.toAnnexBNalu(e),this._caclBaseDts(e[0]),t&&this._updateDuration(e),this._estimateBitRate(e),this._recordKeyframes(e),this.isLive)?this._currentFrameQueue=dg(r=this._currentFrameQueue).call(r,e):this._beforeAppendVodBuffer(e)}},{key:"updateSegmentEnd",value:function(e){var t=this._buffers[this._buffers.length-1];t&&(Math.abs(t.end-e)<.5||(t.end=e,t.duartion=e-t.start,fW.log(this.TAG,"video data lack, reset end:",e)))}},{key:"getFrame",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.isLive)return this._currentFrameQueue.shift();if(!(e=this._currentFrameQueue[this._frameIndexInQueue])){if(!(e=this._currentFrameQueue[--this._frameIndexInQueue]))return;if(!this.switchBuffer((e.dts-this._baseDts)/1e3,this._frameIndexInQueue++,t))return;return this.getFrame(++t)}return this._frameIndexInQueue++,e}},{key:"getFramesForPreciseSeek",value:function(e){var t;return Vl(t=this._currentFrameQueue).call(t,(function(t){return t.dts<=e}))}},{key:"updateFrameIndexForPreciseSeek",value:function(e){this._frameIndexInQueue=e}},{key:"switchBuffer",value:function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)>=20)){e=e||this.bufferStart;var a,s,u,c,l,h,A,d=Vl(t=this._buffers).call(t,(function(t){return t.start<e+.1&&t.end>=e+.1}))[0];if(!d){var f,v,p=$H(f=this._buffers).call(f,(function(t){return t.start>=e}));return p&&p.start-e<1?(this._currentFrameQueue=hm(v=p.frames).call(v,0),this._frameIndexInQueue=0,p):void 0}if(d.frames[0].dts>=e)return this._currentFrameQueue=hm(a=d.frames).call(a,0),this._frameIndexInQueue=0,fW.log(this.TAG,dg(s=dg(u="switch video buffer, time:".concat(e," , buffer:[")).call(u,d.start," , ")).call(s,d.end,"], index=0")),d;if(d.frames.length>o)return this._currentFrameQueue=hm(c=d.frames).call(c,0),fW.log(this.TAG,dg(l=dg(h=dg(A="switch video buffer, in the same gop and more frame got, time:".concat(e," , buffer:[")).call(A,d.start," , ")).call(h,d.end,"], index=")).call(l,o)),d;fW.log(this.TAG,dg(n=dg(r=dg(i="switch video buffer, in the same gop and no more frame got, time:".concat(e," , buffer:[")).call(i,d.start," , ")).call(r,d.end,"], index=")).call(n,o))}}},{key:"getSeekStartPosition",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if($l(t=this._keyframeQueue).call(t,(function(t){t.position<=e&&(n=t)})),n)return e-n.position<r?n:void 0}},{key:"nextFrame",value:function(){return this._currentFrameQueue[0]}},{key:"deletePassed",value:function(e){var t;this._currentFrameQueue=Vl(t=this._currentFrameQueue).call(t,(function(t){return t.dts>=e}))}},{key:"getDtsOfTime",value:function(e){var t=e-this._lastDuration;return this._baseDts+1e3*t}},{key:"clean",value:function(){this._currentFrameQueue=[]}},{key:"destroy",value:function(){this._currentFrameQueue=[],this._buffers=[]}}]),e}();function t9(e){var t;(null===(t=e.buffer)||void 0===t?void 0:t.close)&&e.buffer.close()}var n9=function(){function e(t){by(this,e),this.TAG="FrameQueue",this._parent=t,this._lastGopId=0,this._frames=[]}return ky(e,[{key:"currentTimeDts",get:function(){return this._parent.preciseVideoDts}},{key:"length",get:function(){return this._frames.length}},{key:"frames",get:function(){return this._frames}},{key:"append",value:function(e){e.info?this._frames.push(e):t9(e)}},{key:"appendVodFrame",value:function(e){this._frames.push(e)}},{key:"nextFrame",value:function(){var e,t=this._frames.length;1===this._parent.noAudio&&t>3&&(this._frames=hm(e=this._frames).call(e,t-2));return this._frames[0]}},{key:"shift",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this._frames.shift();return this.deletePassed(e),t}},{key:"deletePassed",value:function(e){var t;this._frames=Vl(t=this._frames).call(t,(function(t){return!!(t.info&&t.info.dts>e)||(t9(t),!1)}))}},{key:"empty",value:function(){var e;$l(e=this._frames).call(e,(function(e){return t9(e)})),this._frames=[]}},{key:"destroy",value:function(){this.empty(),this._lastGopId=0}}]),e}();oN("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var r9=new(function(){function e(){by(this,e),Ty(this,"_queue",[]),Ty(this,"TAG","FrameRenderCache")}return ky(e,[{key:"cacheCvs",value:function(e){this._queue.push(e),fW.log(this.TAG,"cache canvas!")}},{key:"getCachedCvs",value:function(){var e=this._queue.pop();return e&&fW.log(this.TAG,"get cached canvas!"),e}}]),e}()),i9=function(){function e(t,n){by(this,e),this.TAG="FrameRender",this.configs=CW({},t),this.parent=n,this.canvas=this.configs.canvas,this.canvas.glInstance=this,this.meta=CW({},this.configs.meta),this.frameRenderCache=r9,this._initMeta(),this._initContextGL(),this.contextGL&&(this._initProgram(),this._initBuffers(),this._initTextures())}return ky(e,[{key:"_initMeta",value:function(){this.chroma=this.meta.chromaFormat,this.height=this.meta.height,this.width=this.meta.width,this.canvas.width===this.meta.width&&this.canvas.height===this.meta.height||(this.canvas.width=this.meta.width,this.canvas.height=this.meta.height,this.parent.emitResizeEvent())}},{key:"_initContextGL",value:function(){if("2d"!==this.configs.type){for(var e=this.canvas,t=null,n=["webgl","experimental-webgl","moz-webgl","webkit-3d"],r=0;!t&&r<n.length;){var i=n[r];try{t=e.getContext(i,this.configs.glCtxOptions),fW.log("FrameRender","use=",i,this.configs.glCtxOptions);break}catch(b6){t=null}t&&"function"==typeof t.getParameter||(t=null),++r}this.contextGL=t}else this.ctx=this.canvas.getContext("2d")}},{key:"_initProgram",value:function(){var e=this.contextGL,t=["attribute vec4 vertexPos;","attribute vec4 texturePos;","attribute vec4 uTexturePos;","attribute vec4 vTexturePos;","varying vec2 textureCoord;","varying vec2 uTextureCoord;","varying vec2 vTextureCoord;","void main()","{"," gl_Position = vertexPos;"," textureCoord = texturePos.xy;"," uTextureCoord = uTexturePos.xy;"," vTextureCoord = vTexturePos.xy;","}"].join("\n"),n=["precision highp float;","varying highp vec2 textureCoord;","varying highp vec2 uTextureCoord;","varying highp vec2 vTextureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","uniform mat4 YUV2RGB;","void main(void) {"," highp float y = texture2D(ySampler, textureCoord).r;"," highp float u = texture2D(uSampler, uTextureCoord).r;"," highp float v = texture2D(vSampler, vTextureCoord).r;"," gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n"),r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,t),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+e.getShaderInfoLog(r));var i=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(i,n),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+e.getShaderInfoLog(i));var o=e.createProgram();e.attachShader(o,r),e.attachShader(o,i),e.linkProgram(o),e.getProgramParameter(o,e.LINK_STATUS)||console.log("Program failed to compile: "+e.getProgramInfoLog(o)),e.useProgram(o);var a=e.getUniformLocation(o,"YUV2RGB");e.uniformMatrix4fv(a,!1,[1.16438,0,1.59603,-.87079,1.16438,-.39176,-.81297,.52959,1.16438,2.01723,0,-1.08139,0,0,0,1]),this.shaderProgram=o}},{key:"_initBuffers",value:function(){var e=this.contextGL,t=this.shaderProgram,n=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,n),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW);var r=e.getAttribLocation(t,"vertexPos");e.enableVertexAttribArray(r),e.vertexAttribPointer(r,2,e.FLOAT,!1,0,0);var i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var o=e.getAttribLocation(t,"texturePos");e.enableVertexAttribArray(o),e.vertexAttribPointer(o,2,e.FLOAT,!1,0,0),this.texturePosBuffer=i;var a=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var s=e.getAttribLocation(t,"uTexturePos");e.enableVertexAttribArray(s),e.vertexAttribPointer(s,2,e.FLOAT,!1,0,0),this.uTexturePosBuffer=a;var u=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var c=e.getAttribLocation(t,"vTexturePos");e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0),this.vTexturePosBuffer=u}},{key:"_initTextures",value:function(){var e=this.contextGL,t=this.shaderProgram,n=this._initTexture(),r=e.getUniformLocation(t,"ySampler");e.uniform1i(r,0),this.yTextureRef=n;var i=this._initTexture(),o=e.getUniformLocation(t,"uSampler");e.uniform1i(o,1),this.uTextureRef=i;var a=this._initTexture(),s=e.getUniformLocation(t,"vSampler");e.uniform1i(s,2),this.vTextureRef=a,e.pixelStorei(e.UNPACK_ALIGNMENT,1)}},{key:"_initTexture",value:function(){var e=this.contextGL,t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),t}},{key:"_drawPictureGL",value:function(e,t,n,r,i){var o=r*n,a=i*n/2;444!==this.chroma&&422!==this.chroma||(a*=2);var s={yData:(e=new Uint8Array(e)).subarray(0,o),uData:e.subarray(o,o+a),vData:e.subarray(o+a,o+a+a)};this._drawPictureGL420(s,t,n,r,i)}},{key:"_drawPictureGL420",value:function(e,t,n,r,i){var o=this.contextGL,a=this.texturePosBuffer,s=this.uTexturePosBuffer,u=this.vTexturePosBuffer,c=this.yTextureRef,l=this.uTextureRef,h=this.vTextureRef,A=e.yData,d=e.uData,f=e.vData,v=r,p=n,m=i,y=n/2;422!==this.chroma&&444!==this.chroma||(y=n);var g=i,_=y,b=this.canvas.width/this.width,E=this.canvas.height/this.height,k=0,T=0,R=this.canvas.width,S=this.canvas.height;b<E?(S=this.height*this.canvas.width/this.width,T=ug((this.canvas.height-this.height*this.canvas.width/this.width)/2)):(R=this.width*this.canvas.height/this.height,k=ug((this.canvas.width-this.width*this.canvas.height/this.height)/2)),o.viewport(k,T,R,S);var w=new Float32Array([1,0,0,0,1,1,0,1]);o.bindBuffer(o.ARRAY_BUFFER,a),o.bufferData(o.ARRAY_BUFFER,w,o.DYNAMIC_DRAW);var D=new Float32Array([1,0,0,0,1,1,0,1]);o.bindBuffer(o.ARRAY_BUFFER,s),o.bufferData(o.ARRAY_BUFFER,D,o.DYNAMIC_DRAW);var I=new Float32Array([1,0,0,0,1,1,0,1]);o.bindBuffer(o.ARRAY_BUFFER,u),o.bufferData(o.ARRAY_BUFFER,I,o.DYNAMIC_DRAW),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,c),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,v,p,0,o.LUMINANCE,o.UNSIGNED_BYTE,A),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,l),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,m,y,0,o.LUMINANCE,o.UNSIGNED_BYTE,d),o.activeTexture(o.TEXTURE2),o.bindTexture(o.TEXTURE_2D,h),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,g,_,0,o.LUMINANCE,o.UNSIGNED_BYTE,f),o.drawArrays(o.TRIANGLE_STRIP,0,4)}},{key:"_drawPicture2d",value:function(e){if(e&&this.canvas){this.ctx||(this.ctx=this.canvas.getContext("2d"));var t=e.displayWidth||e.width,n=e.displayHeight||e.height;this.canvas.height===n&&this.canvas.width===t||(this.canvas.height=n,this.canvas.width=t);try{this.ctx.drawImage(e.dom||e,0,0,t,n)}catch(_6){console.error(this.TAG,"_drawPicture2d",e,e.dom,_6,_6.message)}}}},{key:"_resize",value:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.canvas.width=e,this.canvas.height=t,this.parent.emitResizeEvent())}},{key:"render",value:function(e,t,n,r,i){this._resize(t,n),this.contextGL?this._drawPictureGL(e,t,n,r,i):this._drawPicture2d(e)}},{key:"resetMeta",value:function(e){this.meta=CW({},e)}},{key:"updateBind",value:function(e,t){this.parent=e,this.resetMeta(t)}},{key:"destroy",value:function(e){this.parent=null,this.canvas.style.display="none",e&&(this.contextGL&&this.contextGL.clear(this.contextGL.DEPTH_BUFFER_BIT|this.contextGL.COLOR_BUFFER_BIT),r9.cacheCvs(this.canvas))}}]),e}(),o9=function(){function e(t){by(this,e),Ty(this,"_lowDecodeThreshold",JW().lowDecodeThreshold/5),this.TAG="DecodeEstimate",this._needEstimate=!0,this._parent=t,this._lastDecodeDot=0,this._lastDecodeCost=0,this._lastFrameDts=0,this._dtsDeltas=[],this._decodeCosts=[],this._lowDecodeQueue=[],this._fps=0,this._decodeFps=0,this._gopLength=0,this._webcodec=!1}return ky(e,[{key:"fps",get:function(){return this._fps}},{key:"decodeFps",get:function(){return this._decodeFps}},{key:"decodeCost",get:function(){return this._lastDecodeCost}},{key:"gopLength",get:function(){return this._gopLength}},{key:"webcodec",set:function(e){this._webcodec=e}},{key:"updateGopCount",value:function(){this._gopLength++}},{key:"needEstimateFps",value:function(){this._needEstimate=!0}},{key:"addDecodeInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{dts:0};this._estimateDecodeFps(e),this._estimateFps(e)}},{key:"resetDecodeDot",value:function(e){this._lastDecodeDot=e||0}},{key:"reset",value:function(){this._decodeCosts=[],this._lowDecodeQueue=[]}},{key:"_estimateFps",value:function(e){if(this._needEstimate)if(this._lastFrameDts){var t=e.dts-this._lastFrameDts;if(this._lastFrameDts=e.dts,!(Math.abs(t)>200)){this._dtsDeltas.push(t);var n=this._dtsDeltas.length;n<5||(this._fps=Math.ceil(1e3/this._avg(this._dtsDeltas,n)),fW.log(this.TAG,"estimate fps:",this._fps),this._needEstimate=!1)}}else this._lastFrameDts=e.dts}},{key:"_estimateDecodeFps",value:function(e){if(this._lastDecodeDot){var t=performance.now(),n=t-this._lastDecodeDot;this._lastDecodeDot=t,e.cost=n,this._lastDecodeCost=n,this._decodeCosts.push(n);var r=this._decodeCosts.length;if(!(r<5)){var i=this._avg(this._decodeCosts,r);this._decodeFps=Math.floor(1e3/i),this._decodeCosts=[],this._lowDecodeDetect()}}else this._lastDecodeDot=performance.now()}},{key:"_avg",value:function(e,t){var n=TY(e).call(e,(function(e,t){return e+=t}),0);return Math.floor(n/t)||1}},{key:"_lowDecodeDetect",value:function(){this._decodeFps?(this._decodeFps<this._fps*this._parent.playbackRate+(this.webcodec?0:3)?this._lowDecodeQueue.push(this._decodeFps):this._lowDecodeQueue.pop(),this._lowDecodeQueue.length>this._lowDecodeThreshold&&(this._lowDecodeQueue=[],fW.log(this.TAG,"解码效率过低,应该降级"),this._parent.emit(WY.DECODE_LOW_FPS))):this._parent.emit(WY.DECODE_LOW_FPS)}}]),e}(),a9=[],s9=function(){function e(t){var n=this;by(this,e),Ty(this,"_doTask",(function(){var e;null===(e=n._task)||void 0===e||e.call(n)})),this._task=t;var r=new Blob(["\n var timer;\n\n function initTimer (interval) {\n destroy()\n clearInterval(timer);\n timer = setInterval(() => {\n self.postMessage({type: 'NEXT_TICK'});\n }, interval)\n }\n\n function destroy () {\n clearInterval(timer);\n }\n\n self.onmessage = function (e) {\n var {type,interval} = e.data;\n switch (type) {\n case 'START':\n initTimer(interval);\n break;\n case 'DESTROY':\n destroy();\n break;\n }\n }\n"],{type:"application/javascript"});this._worker=a9.pop()||new Worker(p$.createObjectURL(r)),this._bindEvent()}return ky(e,[{key:"_bindEvent",value:function(){this._worker.addEventListener("message",this._doTask)}},{key:"start",value:function(e){(e=ug(e))<10&&(e=10),e>60?e=60:e>25&&(e=25),this._worker.postMessage({type:"START",interval:e})}},{key:"stop",value:function(){this._worker.postMessage({type:"DESTROY"})}},{key:"destroy",value:function(){this._worker&&(this._worker.postMessage({type:"DESTROY"}),this._worker.removeEventListener("message",this._doTask),a9.push(this._worker),fW.log("TickTimer","unbind timer event"),this._worker=null,this._task=null)}}]),e}(),u9=function(e){Ry(n,e);var t=Iy(n);function n(e,r){var i,o;return by(this,n),(o=t.call(this,e,r))._timeRange=new e9(Dy(o)),o._decodeEstimate=new o9(Dy(o)),o._frameQueue=new n9(Dy(o)),o._lastTimeupdate=0,o._renderCost=0,o._canAutoPlay=!0,o._videoDecode=!1,o._inSeeking=!1,o._frameRender=null,o._configuration=null,o._render=Dm(i=o._render).call(i,Dy(o)),o._tickTimer=new s9(o._render),o._initCanvas(e),o._bindEvents(),o}return ky(n,[{key:"canAutoPlay",get:function(){return this._canAutoPlay}},{key:"canvas",get:function(){return this._canvas}},{key:"timescale",get:function(){return 1e3}},{key:"fps",get:function(){return this._decodeEstimate.fps||this._meta&&this._meta.fpsNum/this._meta.fpsDen||24}},{key:"decodeFps",get:function(){return this._decodeEstimate.decodeFps}},{key:"decodeCost",get:function(){return this._decodeEstimate.decodeCost}},{key:"renderCost",get:function(){return this._renderCost}},{key:"totalSize",get:function(){return this._timeRange.totalSize}},{key:"bitrate",get:function(){return this._timeRange.bitrate},set:function(e){this._timeRange.bitrate=e}},{key:"gopLength",get:function(){return this._decodeEstimate.gopLength}},{key:"is540p",get:function(){return this._canvas.height<720}},{key:"buffered",get:function(){return this._timeRange.buffered}},{key:"inSeeking",get:function(){return this._inSeeking}},{key:"interval",get:function(){return Math.floor(1e3/this.fps/this.playbackRate)}},{key:"playbackRate",get:function(){return this._playbackRate||1}},{key:"baseDts",get:function(){return this._timeRange.baseDts}},{key:"currentTime",get:function(){return this._timeRange.getCurrentTime(this.preciseVideoDts)}},{key:"timelinePosition",get:function(){return this._parent.timelinePosition}},{key:"lastTimelinePosition",get:function(){return this._lastTimelinePosition||0},set:function(e){this._lastTimelinePosition=e}},{key:"audioSyncDts",get:function(){return this._audioDts||this.baseDts},set:function(e){this._audioDts=e}},{key:"preciseVideoDts",get:function(){return this.audioSyncDts+Math.floor(1e3*(this.timelinePosition-this.lastTimelinePosition))}},{key:"readyState",get:function(){var e=this._frameQueue.length||(this.currentTime?1:0);return e?e>=8?4:e>=4?3:e>=2?2:1:0}},{key:"isHevc",get:function(){return!("hev1.1.6.L93.B0"!==(this._meta||{}).codec)}},{key:"videoDecode",get:function(){return this._videoDecode}},{key:"decoderMode",get:function(){var e;return null===(e=this._decodeController)||void 0===e?void 0:e.decoderMode}},{key:"configuration",get:function(){var e,t;return this._configuration||(this._configuration=this._meta.configuration||vW(null===(e=this._meta)||void 0===e?void 0:e.sps[0],null===(t=this._meta)||void 0===t?void 0:t.pps[0])),this._configuration},set:function(e){this._configuration=e.configuration||vW(e.sps[0],e.pps[0])}},{key:"setSeekingStatus",value:function(e){this._inSeeking=e}},{key:"getDtsOfTime",value:function(e){return this._timeRange.getDtsOfTime(e)}},{key:"updateReady",value:function(){this._whenReady()}},{key:"forceRender",value:function(){this._render(!0)}},{key:"getSeekStartPosition",value:function(e,t){return this._timeRange.getSeekStartPosition(e,t)}},{key:"canSeek",value:function(){throw new Error("need override by children")}},{key:"emitResizeEvent",value:function(){null==this||this._emitTimelineEvents(YY.PLAY_EVENT,NY.RESIZE)}},{key:"_assembleErr",value:function(e,t){var n=new Error(e);return n.code=3,n.subCode=t,n}},{key:"_emitTimelineEvents",value:function(e,t,n){var r;null===(r=this._parent)||void 0===r||r.emit(e,t,n)}},{key:"_initCanvas",value:function(e){e.canvas?this._canvas=e.canvas:this._canvas=r9.getCachedCvs()||document.createElement("canvas"),this._canvas.style.margin="auto",this._canvas.style.position="absolute",this._canvas.style.pointerEvents="none"}},{key:"_bindEvents",value:function(){var e,t,r=this;Cy(Sy(n.prototype),"_bindEvents",this).call(this);var i=function(e){var t,n,i,o,a,s,u,c,l=e.width,h=e.height,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,f=r._canvas,v=f.width,p=f.height,m=h*v/p,y=l*p/v,g=l-m,_=h-y,b=g*A+"px",E=_*d+"px";r._canvas.style.left=b,r._canvas.style.top=E,fW.warn(r.TAG,dg(t=dg(n=dg(i="cvsWidth=".concat(v,", cvsHeight=")).call(i,p,", scaleCvsWidth=")).call(n,m,", scaleCvsHeight=")).call(t,y)),fW.warn(r.TAG,dg(o=dg(a=dg(s=dg(u=dg(c="cover position: deltaX=".concat(g,", deltaY=")).call(c,_,", width=")).call(u,l,", height=")).call(s,h,", pX=")).call(a,b,", pY=")).call(o,E))};this._parent.on(WY.UPDATE_VIDEO_FILLTYPE,(function(e,t){var n=t.width,o=t.height,a=r._canvas,s=a.width,u=a.height,c=!n||n/o>s/u;if(fW.warn(r.TAG,"UPDATE_VIDEO_FILLTYPE isGapX =",c,"type =",e,s,u,n,o),r._canvas.style.maxWidth="initial",r._canvas.style.maxHeight="initial","cover"===e)return c?(r._canvas.style.left=0,r._canvas.style.top=0,r._canvas.style.height="auto",r._canvas.style.width="100%",void i({width:n,height:o},0,.5)):(r._canvas.style.left=0,r._canvas.style.top=0,r._canvas.style.width="auto",r._canvas.style.height="100%",void i({width:n,height:o},.5,0));if("fill"===e)return r._canvas.style.width="100%",void(r._canvas.style.height="100%");(r._canvas.style.top=0,r._canvas.style.bottom=0,r._canvas.style.left=0,r._canvas.style.right=0,r._canvas.style.maxWidth="100%",r._canvas.style.maxHeight="100%",r._canvas.style.width="initial",r._canvas.style.height="initial",s<n&&u<o)&&(s/n>u/o?r._canvas.style.width="100%":r._canvas.style.height="100%")})),this._parent.on(WY.UPDATE_VIDEO_COVER_POSITION,i),this._parent.on(YY.SYNC_DTS,(function(e){var t,n=r._frameQueue.nextFrame(),i=n&&n.info&&n.info.dts;if(r.lastTimelinePosition=r.timelinePosition,r.noAudio){var o=r._timeRange.nextFrame();e=e||i||o&&o.dts||0}if(r.audioSyncDts=e,i&&i-e>500&&r._emitTimelineEvents(YY.PLAY_EVENT,NY.LARGE_AV_GAP,{aDts:e,vDts:i,frameLength:r._frameQueue.length,currentTime:r._parent.currentTime,duration:r._parent.duration}),fW.log(r.TAG,"audio current buffer play finish, next buffer dts=",e,"currentTime:",r._parent.currentTime,"preciseVideoDts:",r.preciseVideoDts,"next video frame dts:",i,"frame length:",r._frameQueue.length),!(r._isLive||null!==(t=r._parent)&&void 0!==t&&t.seeking)){var a=r._timeRange.nextFrame();if(a){var s=(a.dts-a.baseDts)/1e3;r._parent.currentTime-s>1&&(fW.warn(r.TAG,"丢帧!"),r.ajustSeekTime(r._parent.currentTime))}}})),this._parent.on(YY.UPDATE_GL_OPTIONS,(function(e){r._config.glCtxOptions=e})),this._parent.on(YY.UPDATE_SEGMENT_END,Dm(e=this._updateSegmentEnd).call(e,this)),this.on(WY.AUTO_RUN,Dm(t=this._startRender).call(t,this)),this._parent.on(YY.SET_PLAYBACKRATE,(function(e){r._playbackRate=e,r._startRender()}))}},{key:"ajustSeekTime",value:function(){throw new Error("need override by children")}},{key:"_resetDts",value:function(e,t){"audio"!==t&&this._timeRange.resetDts(e)}},{key:"_setMetadata",value:function(e,t){if("audio"!==e){fW.warn(this.TAG,"video set metadata"),this._meta=t;var n=t&&t.frameRate&&t.frameRate.fps;n?fW.log(this.TAG,"detect fps:",n):fW.warn(this.TAG,"no detect fps,start estimate"),this._initDecoder()}}},{key:"_initDecoder",value:function(){throw new Error("need override by children")}},{key:"_whenDecoderReady",value:function(){throw new Error("need override by children")}},{key:"_appendChunk",value:function(){throw new Error("need override by children")}},{key:"_startDecode",value:function(){throw new Error("need override by children")}},{key:"_receiveFrame",value:function(e,t){if(this._parent&&this._timeRange){var n=e.info||{};if(this._decodeEstimate.addDecodeInfo(n),!this._isLive&&((n.output||n.keyframe)&&(this.setSeekingStatus(!1),fW.warn(this.TAG,"set seeking status=",!1)),this.inSeeking))return fW.log(this.TAG,"drop frame"),void t9(e);this._isLive?this._frameQueue.append(e):this._frameQueue.appendVodFrame(e),t&&t(),this._ready||this.readyState>=1&&this._whenReady()}}},{key:"_startRender",value:function(){fW.log(this.TAG,"start render"),this._tickTimer.start(this.interval)}},{key:"_render",value:function(){throw new Error("need override by children")}},{key:"_updateSegmentEnd",value:function(){throw new Error("need override by children")}},{key:"_whenReady",value:function(){this._ready=!0,this.emit(WY.VIDEO_READY),this.noAudio&&this._emitTimelineEvents(YY.PLAY_EVENT,NY.PLAYING)}},{key:"_doPlay",value:function(){this._tickTimer.start()}},{key:"_doPause",value:function(){this._tickTimer.stop()}},{key:"_doSeek",value:function(){this._ready=!1,this._frameQueue.destroy()}},{key:"_doChaseFrame",value:function(){throw new Error("need override by children")}},{key:"destroy",value:function(e){var t,n,r,i;null===(t=this._tickTimer)||void 0===t||t.destroy(),null===(n=this._timeRange)||void 0===n||n.destroy(),null===(r=this._frameQueue)||void 0===r||r.destroy(),null===(i=this._frameRender)||void 0===i||i.destroy(e),this._tickTimer=null,this._canvas=null,this._timeRange=null,this._frameQueue=null,this._frameRender=null,this._decodeEstimate=null,this._parent=null,this.removeAllListeners()}}]),n}(QY),c9=function(e){Ry(n,e);var t=Iy(n);function n(e){var r;return by(this,n),(r=t.call(this)).TAG="VideoDecoder",r._video=r._createVideo(),r._IsInDecoding=!1,r._fps=0,r._framId=null,r._screenShotNum=0,r._allPicNum=0,r._currentBlob=null,r._basePTS=0,r._totleTime=0,r._isVideoONRun=!0,r.firstEmit=!1,r.ptsArray=[],r._currentCanvasHeight=0,r._canvasList=[],r._realFrameDuration=25,r._maxVideoHeight=e.maxVideoHeight||720,r._minFPSTime=0,r._maxFPSTime=0,r._playFailed=!1,r._isPhoneSafari=!1,r._createCanvasList(),r._bindEvents(),r}return ky(n,[{key:"_createCanvasList",value:function(){this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d",{alpha:!1});for(var e=0;e<45;e++){var t=this._createCanvas(),n=t.dom,r=t.ctx;this._canvasList.push({dom:n,ctx:r})}}},{key:"_createCanvas",value:function(){var e=document.createElement("canvas"),t=e.getContext("2d");return{dom:e,ctx:t}}},{key:"_createVideo",value:function(){var e=document.createElement("video");return e.setAttribute("muted",!0),e.setAttribute("autoplay",!0),e.setAttribute("controls",!0),e.setAttribute("webkit-playsinline",!0),e.setAttribute("playsinline",!0),e.setAttribute("x5-video-player-type","h5"),e.setAttribute("x5-video-player-type","h5-page"),e.style.position="absolute",e}},{key:"_initVideo",value:function(e,t){if(e.blobUrl&&void 0!==e.dts){var n=e.blobUrl;this._currentBlob=n,this._basePTS=e.dts,this._currentDuration=e.duration;try{fW.log(this.TAG,"_initVideo, basePTS:",e.dts),this._setVideoSrc(n,t),this._video.paused&&this._videoPlay("_initVideo")}catch(b6){console.error(this.TAG,"_initVideo, load error",b6)}}else console.error(this.TAG,"_initVideo","input info is error, blobUrl:",e.blobUrl,"dts:",e.dts)}},{key:"_setVideoSrc",value:function(e,t){try{var n=this._video;n.src=e,n.load(),n.playbackRate=2}catch(b6){console.error(this.TAG,"_setVideoSrc",b6)}}},{key:"_videoPlay",value:function(e){var t=this,n=this._video;if(fW.log(this.TAG,"_videoPlay, video is pause:",n.paused,e),n&&n.paused){var r=n.play();void 0!==r&&r.then((function(){t._playFailed=!1,fW.log(t.TAG,"_videoPlay success")})).catch((function(e){console.error(t.TAG,"_videoPlay failed,",e.message),t._playFailed=!0,t.emit(XY.PLAY_FAILED,t.firstEmit)}))}}},{key:"_removeEvents",value:function(){var e,t,n,r,i,o=this._video;o.removeEventListener("playing",Dm(e=this._onPlaying).call(e,this)),o.removeEventListener("ended",Dm(t=this._onEnded).call(t,this)),o.removeEventListener("error",Dm(n=this._onError).call(n,this)),o.removeEventListener("loadeddata",Dm(r=this._onLoadeddata).call(r,this)),o.removeEventListener("timeupdate",Dm(i=this._onTimeUpdate).call(i,this))}},{key:"_bindEvents",value:function(){var e,t,n,r,i,o,a,s=this,u=this._video;u?(document.addEventListener("visibilitychange",Dm(e=this._onVisibilityChange).call(e,this)),u.addEventListener("playing",Dm(t=this._onPlaying).call(t,this)),u.addEventListener("ended",Dm(n=this._onEnded).call(n,this)),u.addEventListener("error",Dm(r=this._onError).call(r,this)),u.addEventListener("loadeddata",Dm(i=this._onLoadeddata).call(i,this)),u.addEventListener("timeupdate",Dm(o=this._onTimeUpdate).call(o,this)),u.addEventListener("pause",(function(){fW.log("on pause, currentTime, duration:",s._vCurrentTime,s._vDuration)})),this.on("outputresolutionchange",Dm(a=this._onChange).call(a,this)),this.on("fpsreduce",(function(e){s._adaptFrameDuration(e)}))):console.error(this.TAG,"_bindEvents")}},{key:"_onTimeUpdate",value:function(){this._lastCurrentTime=this._vCurrentTime}},{key:"_onVisibilityChange",value:function(){this._isVideoONRun="visible"===document.visibilityState}},{key:"_onChange",value:function(e,t){this._width=e,this._height=t}},{key:"_onPlaying",value:function(){this._IsInDecoding&&(console.warn(this.TAG,"_onPlaying","last video not correct end"),this._framId&&(window.cancelAnimationFrame(this._framId),this._framId=null)),fW.log(this.TAG,"_onPlaying, video duration:",this._vDuration,"currentTime:",this._vCurrentTime,"_lastPts:",this._lastPts),this._isInDecoding=!0,this._lastCurrentTime=this._vCurrentTime,this.ptsArray=[],this.playingTime||(this.playingTime=!0),this._getFrame()}},{key:"_onEnded",value:function(e,t){fW.log(this.TAG,"_onEnded","current fmp4 duration is:",this._vDuration,"_isInDecoding:",this._isInDecoding,"_lastPts:",this._lastPts,"_realFrameDuration:",this._realFrameDuration,"from:",t),this._isInDecoding&&(this._isInDecoding=!1,this._lastMp4Duration=Math.min(this._vDuration,this._vCurrentTime),this._framId&&(fW.log(this.TAG,"_onEnded","cancelAnimationFrame"),window.cancelAnimationFrame(this._framId),this._framId=null),this._decodeFPS=ug(this._screenShotNum/(this._vDuration/1e3)),this.emit("fps",this._screenShotNum,this._totleTime,this._vDuration,this._metaFPS,{height:this._currentCanvasHeight,relHeight:this._video.videoHeight}),fW.log("_timePerFrame",this._totleTime/this._screenShotNum),this._timePerFrame=this._totleTime/this._screenShotNum,this._screenShotNum=0,this._allPicNum=0,this._totleTime=0,this._currentBlob&&(p$.revokeObjectURL(this._currentBlob),this._currentBlob=null,this._basePTS=0),this.emit(XY.FRAGMENT_END,this._decodeFPS,this._video.duration))}},{key:"_onError",value:function(){this._isInDecoding=!1;var e=this._video;console.error("video error:",e.error.code,e.error.message),this.emit("error",e.error,this.firstEmit)}},{key:"_onLoadeddata",value:function(){var e=this,t=this._video;t.currentTime=.001,this.firstEmit||(this._playFailed?(t.style.visibility="hidden",this.emit(XY.APPEND_VIDEO,t),Lg((function(){fW.log(e.TAG,"onloadeddata, setTimeout firstEmit:",e.firstEmit),e._getFirstFrame()}),40)):(fW.log(this.TAG,"onloadeddata, firstEmit:",this.firstEmit),this._getFirstFrame()))}},{key:"_getFirstFrame",value:function(){this.firstTime=kG();var e=this._vCurrentTime,t=this._basePTS+e,n=this._getImageData(t).imageData;this.firstEmit=!0,this.emit(XY.FIRST_FRAME,n,t)}},{key:"_getFrame",value:function(){var e,t=this._video,n=t.videoWidth,r=t.videoHeight;if(this._allPicNum++,this._isInDecoding){if(n||r){var i,o,a,s=this._vCurrentTime,u=this._basePTS+s;if(this.ptsArray.push(u),this._lastCurrentTime&&this._lastCurrentTime===this._vDuration&&(fW.log(this.TAG,"_getFrame, video ended, lastCurrentTime",this._lastCurrentTime,"duration:",this._vDuration,"isInDecoding:",this._isInDecoding),this._onEnded(null,"getFrame")),this._lastPts)if(u<=this._lastPts)return void(this._framId=window.requestAnimationFrame(Dm(o=this._getFrame).call(o,this)));if(this._lastPts&&u-this._lastPts<this._realFrameDuration)return void(this._framId=window.requestAnimationFrame(Dm(a=this._getFrame).call(a,this)));this._screenShotNum++;var c,l=null,h=kG();try{l=(c=this._getImageData(u)).imageData}catch(b6){console.error(b6,c,this._canvasList.length)}this._lastPts=u;var A=kG()-h;return this._totleTime+=A,this.emit(XY.DECODED,l,u),void(this._framId=window.requestAnimationFrame(Dm(i=this._getFrame).call(i,this)))}this._framId=window.requestAnimationFrame(Dm(e=this._getFrame).call(e,this))}else this._framId&&(window.cancelAnimationFrame(this._framId),this._framId=null)}},{key:"_getImageData",value:function(){var e,t=this._video,n=t.videoWidth,r=t.videoHeight,i=n,o=r;this._width&&this._height&&(i=this._width,o=this._height),o>this._maxVideoHeight&&(o=this._maxVideoHeight,i=ug(o*(n/r))),(e=this._canvasList.shift())||(console.warn(this.TAG,"_getImageData, _canvansList length is 0"),e=this._createCanvas()),e.width=i,e.height=o;var a=e.dom,s=e.ctx;if(this._currentCanvasHeight=o,!a)return{imageData:e};a.width!==i&&(a.width=i,a.height=o);try{r&&n&&i&&o&&s.drawImage(t,0,0,n,r,0,0,i,o)}catch(b6){console.error(this.TAG,"_getImageData, drawImage:",b6)}return{imageData:e}}},{key:"_adaptFrameDuration",value:function(e){e<15?this._minFPSTime++:this._minFPSTime=0,e>30?this._maxFPSTime++:this._maxFPSTime=0,this._minFPSTime>0&&this._decodeFPS<15&&(this._realFrameDuration-=this._timePerFrame,this._realFrameDuration<15&&(this._realFrameDuration=15),this._minFPSTime=0),this._maxFPSTime>0&&this._decodeFPS>30&&(this._realFrameDuration+=this._timePerFrame,this._maxFPSTime=0)}},{key:"_vDuration",get:function(){return ug(1e3*this._video.duration)}},{key:"_vCurrentTime",get:function(){return ug(1e3*this._video.currentTime)}},{key:"_reset",value:function(){this._isInDecoding=!1,this._lastPts=0,this._screenShotNum=0,this._allPicNum=0,this._totleTime=0}},{key:"reStartDecode",value:function(){this._video.pause(),this._reset();var e=this._currentBlob,t=this._basePTS;this._framId&&(window.cancelAnimationFrame(this._framId),this._framId=null),this._initVideo({blobUrl:e,dts:t})}},{key:"doSeek",value:function(e){if(this._isInDecoding){if(e<=0)return;var t=this._vCurrentTime/1e3+e>=this._vDuration/1e3?this._vDuration/1e3:this._vCurrentTime/1e3+1;console.error("doSeek",t),this._video.currentTime=t}}},{key:"pause",value:function(){this._isInDecoding&&this._video.pause()}},{key:"play",value:function(){if(this._isInDecoding&&this._video.paused)return fW.log("video play",this._vCurrentTime),this._video.play()}},{key:"startDecode",value:function(e,t,n){this._initVideo(e,n),this._metaFPS=t}},{key:"stopDecode",value:function(){this._video.paused||(this._video.pause(),this._reset())}},{key:"canPlayType",value:function(e){return this._video.canPlayType(e)}},{key:"destroy",value:function(){this._isInDecoding=!1,window.cancelAnimationFrame(this._framId),this._video.pause(),this._removeEvents()}},{key:"videoWidth",get:function(){return this._video?this._video.videoWidth:0}},{key:"videoHeight",get:function(){return this._video?this._video.videoHeight:0}}]),n}(lY),l9=[{base:720,level:1},{base:540,level:2},{base:360,level:3},{base:280,level:4}],h9=function(e){Ry(n,e);var t=Iy(n);function n(e,r){var i,o;return by(this,n),(o=t.call(this)).TAG="VideoDecoderController",o._decoder=new c9(e),o._remux=new NJ,o._bindEvents(),o._isInit=!1,o._isDataReady=!1,o._ready=!1,o._blobURLList=[],o._isInDecoding=!1,o._mediaSegmentReady=!1,o._parent=r,o._isDecodePause=!1,o._playSuccess=!0,o._isVideoOnRun=!0,o._startDts=0,o._fDuration=0,o._minFPSTime=0,o._lastPts=0,o._frameLengthPerFragment=0,o._gopBufferLength=0,o._maxGopDuration=0,o._minGopDuration=0,o._currentLevel=-1,o._endLevel=e.endLevel||2,o.currentFragmentDuration=0,o._handleKeyFrameVideo=Dm(i=o._handleKeyFrameVideo).call(i,Dy(o)),o}return ky(n,[{key:"_bindEvents",value:function(){var e,t,n,r,i,o,a,s=this;document.addEventListener("visibilitychange",Dm(e=this._onVisibilityChange).call(e,this)),this._decoder.on(XY.APPEND_VIDEO,Dm(t=this._onAppendVideo).call(t,this)),this._decoder.on(XY.PLAY_FAILED,Dm(n=this._onPlayFailed).call(n,this)),this._decoder.on("error",Dm(r=this._onError).call(r,this)),this._decoder.on(XY.DECODED,Dm(i=this._onDecoded).call(i,this)),this._decoder.on(XY.FIRST_FRAME,Dm(o=this._onFirstFrame).call(o,this)),this._decoder.on(XY.FRAGMENT_END,Dm(a=this._onFragmentEnd).call(a,this)),this._decoder.on("fps",(function(){for(var e,t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=dg(e=[s._metaFPS]).call(e,r,[s._frameLengthPerFragment]);s.emit.apply(s,dg(t=["fps"]).call(t,Vy(o)))})),this.on("keyFrame",this._handleKeyFrameVideo)}},{key:"_onRemuxed",value:function(e){var t={blobUrl:this._createBlobURL(e),dts:this.currentFragmentDts,duration:this.currentFragmentDuration,frameDuration:Math.floor(1e3/this._metaFPS)};this._recordGopDuration(this.currentFragmentDuration),this._pushBlob(t),fW.log(this.TAG,"_onRemuxed","maxgopduration:",this._maxGopDuration,"_gopBufferLength:",this._gopBufferLength),!this._isDataReady&&this._gopBufferLength>=this._maxGopDuration&&this._checkDataReady()}},{key:"_onPlayFailed",value:function(e){this._isInDecoding=!1,this._parent.emit(XY.PLAY_FAILED,e)}},{key:"_onAppendVideo",value:function(e){this._parent.emit(XY.APPEND_VIDEO,e)}},{key:"_onVisibilityChange",value:function(){this._isVideoOnRun="visible"===document.visibilityState}},{key:"_onDecoded",value:function(e,t){this._frameLengthPerFragment++;var n=this._buildFrameInfo(e,t);this._parent.emit(XY.DECODED,n),this._lastPts=t}},{key:"_onFirstFrame",value:function(e,t){var n=this._buildFrameInfo(e,t);this._parent.emit(XY.FIRST_FRAME,n)}},{key:"_onFragmentEnd",value:function(e,t){var n=this;fW.log(this.TAG,"_onFragmentEnd ,_isDecodePause:",this._isDecodePause,"decodeFPS:",e),e&&this._reduceResolution(e),this._isInDecoding=!1,this._inDecodeId=-1,this._currentInfo=null,this._frameLengthPerFragment=0,this._getBlobLength()&&!this._isDecodePause?this.startDecode():this.loadNextHandle=hG((function(){n._getBlobLength()&&!n._isDecodePause&&n._isVideoOnRun&&!n._isInDecoding&&(fW.log(n.TAG,"_onFragmentEnd, setInterval start next mp4 decode"),n.startDecode(),clearInterval(n.loadNextHandle))}))}},{key:"_onError",value:function(e,t){this._isInDecoding=!1,this._parent.emit("error",e,t)}},{key:"_checkReady",value:function(){this._isDataReady&&this._isInit&&(this.ready=!0,fW.log(this.TAG,"checkReady trigger ready"),this._parent.emit(XY.READY))}},{key:"_checkDataReady",value:function(){this._isDataReady=!0,this._checkReady()}},{key:"_reduceResolution",value:function(e){if(fW.log(this.TAG,"_reduceResolution","currentLevel:",this._currentLevel,"endLevel:",this._endLevel),this._videoHeight>720&&(fW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS"),this._parent.emit(WY.DECODE_LOW_FPS)),e&&e<20?(this._minFPSTime++,this._decoder.emit("fpsreduce",e)):this._minFPSTime=0,this._currentLevel>=this._endLevel)return fW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS",this._currentLevel,this._endLevel),void this._parent.emit(WY.DECODE_LOW_FPS);if(this._minFPSTime>2){var t,n=this._videoWidth,r=this._videoHeight;if(t=this._findLevel(r,this._currentLevel)){if(this._currentLevel=t.level,4===this._currentLevel)return fW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS, _currentLevel: ",this._currentLevel),void this._parent.emit(WY.DECODE_LOW_FPS);this.width=t.base*(n/r),this.height=t.base,this._decoder.emit("outputresolutionchange",this.width,this.height)}this._minFPSTime=0}}},{key:"_findLevel",value:function(e,t){return $H(l9).call(l9,(function(n){return n.base<e&&n.level>t}))}},{key:"_buildFrameInfo",value:function(e,t){try{var n=e.width,r=e.height;return{msg:"DECODED",width:n,height:r,buffer:e,yLinesize:n,uvLinesize:n/2,info:{baseDts:void 0,dts:t,gopId:0,isGop:void 0,key:!1,pts:t},type:"rgb"}}catch(b6){fW.log(this.TAG,b6)}}},{key:"_pushBlob",value:function(e){fW.log("push blob",e.dts,e.duration),e&&e.duration&&(this._gopBufferLength+=e.duration),this._blobURLList.push(e)}},{key:"_shiftBlob",value:function(){var e=this._blobURLList.shift();return e&&e.duration&&(this._gopBufferLength-=e.duration),e}},{key:"_filterBlob",value:function(e){var t,n=this;this._blobURLList=Vl(t=this._blobURLList).call(t,(function(t){return t.dts<e&&(p$.revokeObjectURL(t.blobUrl),t.duration&&(n._gopBufferLength-=t.duration)),t.dts>=e}))}},{key:"_emptyBlobList",value:function(){this._blobURLList=[],this._gopBufferLength=0}},{key:"_getBlobLength",value:function(){return this._blobURLList.length}},{key:"_handleKeyFrameVideo",value:function(e){try{var t=this._parent._timeRange.frames||[];if(this._parent._timeRange.clean(),!t.length)return;var n=t[0].dts,r=t[t.length-1].dts,i=n-this.endDts;fW.log(this.TAG,"_handleKeyFrameVideo","startDts:",n,"endDts:",r,"samples length:",t.length),this.endDts&&i>Math.floor(1e3/this._metaFPS)+1&&fW.log(this.TAG,"_handleKeyFrame, keyFrame dts:",n,"sample length:",t.length,"endDts:",r,"delay:",i);var o=r-n;if(this._fDuration||(this._fDuration=o),o<1500)return void fW.log(this.TAG,"_handleKeyFrame gopDuration :",o,"sample length:",t.length,"gopStartDts:",n,"gopEndDts:",r);if(this.firstDts||(this.firstDts=t[0].dts),this.currentFragmentDts=t[0].dts,this.currentFragmentDuration=this._getFragmentDuration(t),this.endDts=r,this.currentFragmentDts<this._startDts)return console.warn(this.TAG,"_handleKeyFrameVideo","currentFragmentDts < this._startDts",this.currentFragmentDts,this._startDts),void(t=[]);this.startRemux(t),t=[]}catch(b6){console.error(this.TAG,"_handleKeyFrameVideo",b6)}}},{key:"_getFragmentDuration",value:function(e){var t=0,n=0;return e[0].keyframe||console.error(this.TAG,"_getFragmentDuration","gop firstFrame is not keyframe"),$l(e).call(e,(function(r,i){r.keyframe&&i&&(t+=e[i-1].dts-e[n].dts,n=i)})),t+=e[e.length-1].dts-e[n].dts}},{key:"_createBlobURL",value:function(e){if(e){var t=new window.Blob([e.buffer],{type:"video/mp4"});return p$.createObjectURL(t)}}},{key:"_recordGopDuration",value:function(e){var t=e;this._minGopDuration||(this._minGopDuration=t),t>this._maxGopDuration&&(this._maxGopDuration=t),t<this._minGopDuration&&(this._minGopDuration=t)}},{key:"checkMaxFrames",value:function(e){"number"==typeof e&&(this._isDecodePause=e>40,this._playSuccess&&this._isDecodePause&&this._decoder.pause())}},{key:"checkMinFrames",value:function(e){var t=this;if("number"==typeof e&&(this._isDecodePause=!(e<25),!this._isDecodePause)){var n=this._decoder.play();void 0!==n?n.then((function(){t._playSuccess=!0})).catch((function(){t._playSuccess=!1})):Lg((function(){t._playSuccess=!0}),20)}}},{key:"frameRendend",value:function(e){if(e.dom){if(e.dom.width=0,e.dom.height=0,this._decoder._canvasList.length>40)return;this._decoder._canvasList.push(e)}else fW.error(this.TAG,"_onRendend","imageObj. is error",e)}},{key:"checkValidBlob",value:function(e){this._filterBlob(e)}},{key:"chaseVideoFrame",value:function(e){fW.log(this.TAG,e,e.frame.dts,this.currentFragmentDts);var t=e.frame.dts;if(this._startDts=t,t===this.currentFragmentDts){if(fW.log(this.TAG,"_onChaseFrame","_inDecodeId:",this._inDecodeId,"currentFragmentDts:",this.currentFragmentDts),this._inDecodeId>0&&this._inDecodeId<t)return fW.log(this.TAG,"_onChaseFrame, _inDecodeId > 0 && _inDecodeId < startDts, _inDecodeId:",this._inDecodeId,"startDts:",t),this.stopDecode(),this._filterBlob(t),void this.startDecode();if(this._inDecodeId===t)return fW.log(this.TAG,"_onChaseFrame, _inDecodeId === startDts, startDts:",t),this.stopDecode(),void this.reStrartDecode(this._currentInfo);-1===this._inDecodeId&&(fW.log(this.TAG,"_onChaseFrame","_inDecodeId==-1"),this.startDecode())}t>this.currentFragmentDts&&(fW.log(this.TAG,"_onChaseFrame, startDts > currentFragmentDts, startDts:",t,"currentFragmentDts:",this.currentFragmentDts),this.stopDecode(),this._emptyBlobList()),t<this.currentFragmentDts&&(fW.log(this.TAG,"_onChaseFrame, startDts < currentFragmentDts, startDts:",t,"currentFragmentDts:",this.currentFragmentDts),t>this._inDecodeId&&(this._filterBlob(t),this.stopDecode(),this.startDecode()))}},{key:"init",value:function(e){this._isInit||(this._metaFPS=e.fpsNum/e.fpsDen||25,this._videoWidth=e.width,this._videoHeight=e.height,this._width=this._videoWidth,this._height=this._videoHeight,this._frameDuration=ug(1e3/this._metaFPS),this._isInit=!0,fW.log("".concat(this.TAG," has inited")),this._isInit=!0,this._checkReady())}},{key:"reStrartDecode",value:function(e){if(e)try{fW.log(this.TAG,"reStrartDecode"),this._isInDecoding=!0,this._inDecodeId=e.dts,this._currentInfo=e,this._decoder.startDecode(e,this._metaFPS,this._startTime),this._startTime=0}catch(b6){console.error("load error",b6)}}},{key:"stopDecode",value:function(){this._isInDecoding=!1,this._inDecodeId=-1,this._currentInfo=null,this._frameLengthPerFragment=0,this._decoder.stopDecode()}},{key:"startDecode",value:function(){if(this._isInDecoding)fW.log(this.TAG,"startDecode","this decoder is in decoding");else{var e=this._getBlobLength();if(this._decoder&&e){fW.log(this.TAG,"startDecode","blob url length:",e);var t=this._shiftBlob()||{};try{fW.log(this.TAG,"startDecode",t.dts,t.duration),this._isInDecoding=!0,this._inDecodeId=t.dts,this._currentInfo=t,this._decoder.startDecode(t,this._metaFPS)}catch(b6){console.error(this.TAG,"startDecode","load error",b6)}}}}},{key:"canSeek",value:function(e){var t=e.frame.dts;return!!(this.currentFragmentDts>=t&&this._isInDecoding)&&(this._inDecodeId!==t&&this._inDecodeId<t)}},{key:"startRemux",value:function(e){if(fW.log("startRemux samples length:",e.length),e.length){var t=this._parent._meta;t.samples=e;var n=this._remux.remux(t).videoSegment;this._onRemuxed(n)}else console.error("frame length is 0")}},{key:"canPlayType",value:function(e){if(this._decoder)try{return this._decoder.canPlayType('video/mp4;codecs="'+e.codec+'"')}catch(b6){console.error(b6)}}},{key:"destroy",value:function(){this._blobURLList=[],this._decoder.destroy()}},{key:"empty",value:function(){if(fW.log("empty"),this._decoder){var e=this._decoder._canvasList;return fW.log(this.TAG,"empty >>>>>>>>>>>>>>>>>>length:",e.length),$l(e).call(e,(function(e){e.dom&&(fW.log("clear >>>>>>>>>>>>>>>>>>"),e.dom.width=0,e.dom.height=0,e.dom=null)})),e.length}}},{key:"isIDLE",get:function(){return fW.log(this.TAG,"isIDEL","blob length:",this._getBlobLength(),"_isInDecoding:",this._isInDecoding,"isVideoOnRun:",this._isVideoOnRun,"_isDecodePause",this._isDecodePause),!this._getBlobLength()&&!this._isInDecoding&&this._isVideoOnRun}},{key:"ready",get:function(){return this._ready},set:function(e){this._ready=e}},{key:"remux",get:function(){return this._remux}},{key:"isInit",get:function(){return this._isInit}}]),n}(lY),A9=function(e){Ry(n,e);var t=Iy(n);function n(e,r){var i;return by(this,n),(i=t.call(this,e,r)).TAG="VideoRenderFromVideo",i._videoDecodeController=new h9(e,Dy(i)),i._canAutoPlay=!0,i._videoDecode=e.videoDecode,i._chaseToFrame=null,i}return ky(n,[{key:"videoDecode",get:function(){return this._videoDecode},set:function(e){this._videoDecode=e}},{key:"_bindEvents",value:function(){var e,t,r,i,o,a,s,u,c,l=this;Cy(Sy(n.prototype),"_bindEvents",this).call(this),this.on("keyFrame",Dm(e=this._onKeyFrame).call(e,this)),this.on(XY.READY,Dm(t=this._onReady).call(t,this)),this.on(XY.DECODED,Dm(r=this._onDecoded).call(r,this)),this.on(XY.PLAY_FAILED,Dm(i=this._onPlayFailed).call(i,this)),this.on("error",Dm(o=this._onError).call(o,this)),this.on(XY.APPEND_VIDEO,Dm(a=this._onAppendVideo).call(a,this)),this.on(XY.FIRST_FRAME,Dm(s=this._onFirstFrame).call(s,this)),this._parent.on(XY.CHASE_VIDEO_FRAME,Dm(u=this._onChaseVideoFrame).call(u,this)),this._parent.on(YY.SYNC_DTS,Dm(c=this._onTimeLineSyncDTS).call(c,this)),window.addEventListener("unload",(function(){l._empty()}))}},{key:"_onTimeLineSyncDTS",value:function(e){this._videoDecodeController.checkValidBlob(e)}},{key:"_onChaseVideoFrame",value:function(e){this._doChaseVideoFrame(e)}},{key:"_onAppendVideo",value:function(e){try{this._parent._parent.appendChild(e)}catch(b6){cosole.error(this.TAG,"onAppendVideo",b6)}}},{key:"_onKeyFrame",value:function(){fW.log(this.TAG,"_onKeyFrame, keyframe"),this._videoDecodeController.emit("keyFrame")}},{key:"_onError",value:function(e,t){console.error(this.TAG,"decoder error",e,t),t||this._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,this._assembleErr(e&&e.message))}},{key:"_onReady",value:function(){if(!this._frameRender){var e=CW(this._config,{meta:this._meta,canvas:this._canvas,type:"2d"});try{this._frameRender=new i9(e,this)}catch(b6){this._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,this._assembleErr(b6&&b6.message))}}this._startDecode()}},{key:"_onFirstFrame",value:function(e){fW.log(this.TAG,"onFirstFrame"),this._receiveFrame(e),this._firstFrame=!0}},{key:"_onDecoded",value:function(e){var t=this;if(this._inChaseFrame){if(this.chaseFrameAfter++,1===this.chaseFrameAfter&&this._chaseToFrame){if(this._parent.emit(XY.CHASE_VIDEO_FRAME_END,this._chaseToFrame),this._frameQueue.length){var n=this._frameQueue.frames;$l(n).call(n,(function(e){t._videoDecodeController.frameRendend(e.buffer)}))}this._frameQueue.empty(),this._videoDecodeController.checkMinFrames(this._frameQueue.length),this._timeRange.deletePassed(this._chaseToFrame.frame.dts),this._inChaseFrame=!1,this._chaseToFrame=null,console.warn(this.TAG,"onDecoded","_inChaseFrame end")}}else this.chaseFrameAfter=0;this._receiveFrame(e)}},{key:"_onPlayFailed",value:function(e){console.warn(this.TAG,"onPlayFailed, this._ready:",this._ready,",firstEmit:",e,",frame length:",this._frameQueue.length),this._ready||e||this._whenReady(),this._canAutoPlay=!1}},{key:"canSeek",value:function(e){return this._videoDecodeController.canSeek(e)}},{key:"_initDecoder",value:function(){this._isInit||(fW.log(this.TAG,"_initDecoder"),this._videoDecodeController.isInit||this._videoDecodeController.init(this._meta),this._isInit=!0)}},{key:"_receiveFrame",value:function(e){Cy(Sy(n.prototype),"_receiveFrame",this).call(this,e),this._videoDecodeController.checkMaxFrames(this._frameQueue._frames.length)}},{key:"_setMetadata",value:function(e){fW.warn(this.TAG,"video set metadata",e),this._meta=e;var t=e.fpsNum/e.fpsDen;t?fW.log(this.TAG,"detect fps:",t):fW.warn(this.TAG,"no detect fps,start estimate"),this._initDecoder(e)}},{key:"_doChaseVideoFrame",value:function(e){this._inChaseFrame=!0,this._chaseToFrame=e,this._videoDecodeController.chaseVideoFrame(e)}},{key:"_appendChunk",value:function(e){var t;this._meta||this._setMetadata(e);for(var n=hm(t=e.samples).call(t),r=n.length,i=0;i<r;i++){var o=n.shift();o.keyframe&&this.emit("keyFrame"),this._timeRange.append([o],this.noAudio,!1)}}},{key:"_startDecode",value:function(){this._videoDecodeController.startDecode()}},{key:"_checkToDecode",value:function(){this._startDecode()}},{key:"_startRender",value:function(){fW.log(this.TAG,"_startRender interval",this.interval),this._tickTimer.start(this.interval)}},{key:"_render",value:function(e){var t=this,n=this._frameQueue.nextFrame(),r=this.preciseVideoDts;if(n&&this._timeRange){var i=n.info;if(!i)return this._frameQueue.shift(),void console.error("not info");this._renderDts=i.dts;var o=i.dts-r;if(o<-150){this.lastPrecise;var a=this._frameQueue.frames,s=this._getDeleteFrames(a,r),u=s.deleteFrames,c=s.useFrames;return PQ(a).call(a,0),$l(c).call(c,(function(e){a.push(e)})),$l(u).call(u,(function(e){t._videoDecodeController.frameRendend(e.buffer)})),this._videoDecodeController.emit("renderDelay",o,this._frameQueue._frames.length),void this._videoDecodeController.checkMinFrames(this._frameQueue.length)}if(!(!e&&o>30&&o<6e4)){var l,h,A,d,f,v;if(Math.abs(this._lastTimeupdate-i.dts)>250&&(this._emitTimelineEvents(YY.PLAY_EVENT,NY.TIMEUPDATE),this._lastTimeupdate=i.dts),fW.long)fW.log(this.TAG,dg(l=dg(h=dg(A=dg(d=dg(f=dg(v="render delay:".concat(o," , timelinePosition:")).call(v,r," , dts:")).call(f,i.dts," , cost:")).call(d,i.cost," , gopID:")).call(A,i.gopId," , rest:")).call(h,this._frameQueue.length,", buffer frame:")).call(l,this._timeRange.frameLength));var p=performance.now();this._frameRender.render(n.buffer,n.width,n.height,n.yLinesize,n.uvLinesize),this.hasFirstFrame||e||(this.hasFirstFrame=!0,this._parent.emit(YY.PLAY_EVENT,"firstframe")),this._videoDecodeController.frameRendend(n.buffer),this._frameQueue.shift(),this._videoDecodeController.checkMinFrames(this._frameQueue.length),this._videoDecodeController.emit("renderDelay",o,this._frameQueue._frames.length),this._renderCost=performance.now()-p,e||(this.lastTime&&(this.lastPrecise,kG(),this.lastTime),this.lastFrameinfo=i.dts,this.lastPrecise=r,this.lastTime=kG(),this.lastAudioTime=this._parent.audioRender.currentTime)}}else{if(this._videoDecodeController.checkMinFrames(this._frameQueue._frames.length),this._parent._paused)return;if(!this._firstFrame)return void fW.log(this.TAG,"_render","not first frame return");var m=this._videoDecodeController;if(fW.log(this.TAG,",lack frame, _inDecoding:",this._videoDecodeController._isInDecoding,this._videoDecodeController._isDecodePause,",_frameQueue.length:",this._frameQueue.length),!this._frameQueue.length&&m.isIDLE){this._ready=!1;var y=this._parent.audioRender;console.warn(this.TAG,"trigger video waiting vdecode, preciseVideoDts:",r,y.currentTime,y.duration,y.buffered.end(0),y.baseDts),this.emit(WY.VIDEO_WAITING)}this._checkToDecode()}}},{key:"_updateSegmentEnd",value:function(){}},{key:"_destroy",value:function(e){this._empty(),Cy(Sy(n.prototype),"destroy",this).call(this,e),this._videoDecodeController.destroy()}},{key:"_doPause",value:function(){fW.log(this.TAG,">>>>>>>>doPause"),this._tickTimer.stop()}},{key:"_getDeleteFrames",value:function(e,t){var n=[],r=[];return $l(e).call(e,(function(e){e.info&&e.info.dts>t?r.push(e):e.info&&e.info.dts<=t&&n.push(e)})),{deleteFrames:n,useFrames:r}}},{key:"_empty",value:function(){var e;this._videoDecodeController&&(this._videoDecodeController.empty(),$l(e=this._frameQueue.frames).call(e,(function(e){e.buffer&&e.buffer.dom&&(e.buffer.dom.width=0,e.buffer.dom.height=0,e.buffer.dom=null)})))}}]),n}(u9),d9=function(e){Ry(n,e);var t=Iy(n);function n(e){var r;return by(this,n),Ty(Dy(r=t.call(this)),"_parent",null),Ty(Dy(r),"_decoderReady",!1),Ty(Dy(r),"_inDecoding",!1),Ty(Dy(r),"_toDecodeFirstframe",!0),Ty(Dy(r),"_id",(new Date).getMilliseconds()),Ty(Dy(r),"_workerErrorCallback",null),Ty(Dy(r),"_workerMessageCallback",null),Ty(Dy(r),"_decoderWorker",null),r._parent=e,r}return ky(n,[{key:"analyse",get:function(){return this._parent.analyse}},{key:"inDecoding",get:function(){return this._inDecoding}},{key:"decoderMode",get:function(){return this._decoderMode}},{key:"decoderReady",get:function(){return this._decoderReady}},{key:"needToDecode",get:function(){return this._inDecoding?0:this._continueDecodeThreshold}},{key:"maxDecodeOnce",get:function(){return this._maxDecodeOnce}},{key:"meta",get:function(){var e;return null===(e=this._parent)||void 0===e?void 0:e._meta},set:function(e){this._parent&&(this._parent._meta=e)}},{key:"init",value:function(e,t){this._workerMessageCallback=e,this._workerErrorCallback=t,this._initWorker()}},{key:"_initWorker",value:function(){throw new Error("need override by children")}},{key:"checkToDecode",value:function(e){this.webcodec?e<=this.needToDecode&&this.doDecode():!this._inDecoding&&e<=this.needToDecode&&this.doDecode()}},{key:"doDecode",value:function(){var e=this,t=this._getFramesToDecode();t&&t.length&&this.meta&&(this._toDecodeFirstframe&&(this._toDecodeFirstframe=!1,this.analyse.addFirstFrameToDecode()),this._avccpushed||this._initDecoderWithConfiguration(this._decoderWorker,this.meta),fW.enable&&fW.log(this.TAG,"doDecode ".concat(t.length," frames")),$l(t).call(t,(function(t){e._doDecodeInternal(t)})),this._inDecoding=!0,this._decoderWorker.postMessage({msg:"finish_flag"}))}},{key:"preciseSeek",value:function(e){var t,n,r,i,o=this,a=1e3*e,s=null===(t=this._parent)||void 0===t||null===(n=t._timeRange)||void 0===n?void 0:n.getFramesForPreciseSeek(a),u=s.length;u<this.maxDecodeOnce?this.doDecode():(null===(r=this._parent)||void 0===r||null===(i=r._timeRange)||void 0===i||i.updateFrameIndexForPreciseSeek(u),fW.enable&&fW.log(this.TAG,"doDecode ".concat(s.length," frames for precise seek")),$l(s).call(s,(function(e,t){o._doDecodeInternal(e,!0,t>=u-6)})),this._inDecoding=!0,this._decoderWorker.postMessage({msg:"finish_flag"}))}},{key:"_getFramesToDecode",value:function(){var e=this._parent,t=e._timeRange,n=e._decodeEstimate;if(this._decoderReady&&t){var r=t.frameLength;if(r){var i=this._toDecodeFirstframe?JW().maxDecodeOnceFirstTime:this.maxDecodeOnce;1===r&&n.resetDecodeDot(performance.now());for(var o=[];i>0;){var a=t&&t.getFrame();if(!a)break;o.push(a),a.gopId&&a.gopId-1==0&&n.updateGopCount(),i--}return o}}}},{key:"_doDecodeInternal",value:function(e,t,n){var r;null!=e&&e.meta&&(this.meta=e.meta,fW.warn(this.TAG,"detect metadata! flush decoder"),this._initDecoderWithConfiguration(this.__decoderWorker,e.meta));var i={dts:e.dts,pts:e.pts||e.dts+e.cts,keyframe:e.keyframe,gopId:e.gopId,id:this._id};t&&(i.preciseSeek=!0,i.output=n);var o=hm(r=e.data).call(r);this._decoderWorker.postMessage({msg:"decode",data:o,info:i},[o.buffer])}},{key:"_initDecoderWithConfiguration",value:function(){throw new Error("need override by children")}},{key:"flushDecoder",value:function(){this._decoderWorker.postMessage({msg:"flush"})}},{key:"destroy",value:function(){throw new Error("need override by children")}}]),n}(lY),f9="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPW51bGwsdD1bXSxzPTAsYT0hMTtzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLChmdW5jdGlvbihvKXtzd2l0Y2goby5kYXRhLm1zZyl7Y2FzZSJjb25maWd1cmF0aW9uIjplPW5ldyBzZWxmLlZpZGVvRGVjb2Rlcih7b3V0cHV0OmZ1bmN0aW9uKG8pe2E9ITAscyYmY2xlYXJUaW1lb3V0KHMpO3ZhciBuPXQuc2hpZnQoKTtuP3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkRFQ09ERUQiLHdpZHRoOm8uZGlzcGxheVdpZHRoLGhlaWdodDpvLmRpc3BsYXlIZWlnaHQsaW5mbzpuLGJ1ZmZlcjpvfSxbb10pOm8uY2xvc2UoKSxlLmRlY29kZVF1ZXVlU2l6ZT09PXQubGVuZ3RoJiZzZWxmLnBvc3RNZXNzYWdlKHt0eXBlOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KX0sZXJyb3I6ZnVuY3Rpb24oZSl7Y29uc29sZS5sb2coIltXZWJjb2RlY1dvcmtlcl06IixlKSwiQ29kZWMgcmVjbGFpbWVkIGR1ZSB0byBpbmFjdGl2aXR5LiIhPT1lLm1lc3NhZ2UmJnNlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkZBSUxFRCIsbWVzc2FnZTplJiZlLm1lc3NhZ2V9KX19KSxzZWxmLlZpZGVvRGVjb2Rlci5pc0NvbmZpZ1N1cHBvcnRlZChvLmRhdGEuZGF0YSkudGhlbigoZnVuY3Rpb24odCl7dC5zdXBwb3J0ZWQmJihlLmNvbmZpZ3VyZShvLmRhdGEuZGF0YSksY29uc29sZS5sb2coIltXZWJjb2RlY1dvcmtlcl06IiwiaXNDb25maWdTdXBwb3J0ZWQiLHQpKX0pKS50aGVuKChmdW5jdGlvbigpe3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkRFQ09ERVJfUkVBRFkifSkscz1zZXRUaW1lb3V0KChmdW5jdGlvbigpe2F8fHNlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkZBSUxFRCIsbWVzc2FnZToibm8gZnJhbWUgb3V0cHV0In0pfSksMmUzKX0pKS5jYXRjaCgoZnVuY3Rpb24oZSl7c2VsZi5wb3N0TWVzc2FnZSh7dHlwZToiRkFJTEVEIixtZXNzYWdlOmUmJmUubWVzc2FnZX0pfSkpO2JyZWFrO2Nhc2UiZGVjb2RlIjp2YXIgbj1vLmRhdGEuZGF0YSxpPW8uZGF0YS5pbmZvO3QucHVzaChpKTt2YXIgZD1uLmJ5dGVMZW5ndGgtNCxjPW5ldyBEYXRhVmlldyhuZXcgQXJyYXlCdWZmZXIoNCkpO2Muc2V0VWludDMyKDAsZCwhMSksbi5zZXQobmV3IFVpbnQ4QXJyYXkoYy5idWZmZXIpLDApLGkua2V5ZnJhbWUmJmUuZmx1c2goKTt2YXIgcj1uZXcgc2VsZi5FbmNvZGVkVmlkZW9DaHVuayh7dHlwZTppLmtleWZyYW1lPyJrZXkiOiJkZWx0YSIsdGltZXN0YW1wOmkucHRzLGRhdGE6bn0pO2UuZGVjb2RlKHIpO2JyZWFrO2Nhc2UiZGVzdHJveSI6ZSYmKGUuZmx1c2goKSxlLmNsb3NlKCkpLGNsZWFyVGltZW91dChzKTticmVhaztjYXNlImNoZWNrRGVjb2RlIjpzZWxmLnBvc3RNZXNzYWdlKHt0eXBlOiJDSEVDS19UT19ERUNPREUiLGRhdGE6MD09PU1hdGguYWJzKGUuZGVjb2RlUXVldWVTaXplLXQubGVuZ3RoKX0pfX0pKX0oKTsK",v9="undefined"!=typeof window&&window.Blob&&new Blob([atob(f9)],{type:"text/javascript;charset=utf-8"});function p9(){var e=v9&&(p$||window.webkitURL).createObjectURL(v9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+f9,{type:"module"})}finally{e&&(p$||window.webkitURL).revokeObjectURL(e)}}var m9=JW().maxDecodeOnceWebcodec,y9=function(e){Ry(n,e);var t=Iy(n);function n(){var e,r;by(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ty(Dy(r=t.call.apply(t,dg(e=[this]).call(e,o))),"TAG","WebCodecController"),Ty(Dy(r),"_decoderMode",5),Ty(Dy(r),"_maxDecodeOnce",m9),Ty(Dy(r),"_continueDecodeThreshold",m9/2),Ty(Dy(r),"_avccpushed",!1),r}return ky(n,[{key:"webcodec",get:function(){return!0}},{key:"needToDecode",get:function(){return this._inDecoding?(this._checkToDecode(),0):this._continueDecodeThreshold}},{key:"_initWorker",value:function(){var e=this;fW.log(this.TAG,"start init webcodec worker");var t=new p9;t.onMessage=function(t){var n,r;switch(t.data.type){case"DECODER_READY":fW.log(e.TAG,"webcodec worker ready "),e._decoderReady=!0,e._workerMessageCallback({type:"DECODER_READY"});break;case"DECODED":if(e._inDecoding=!0,(null===(n=t.data)||void 0===n||null===(r=n.info)||void 0===r?void 0:r.id)!==e._id)return;e._workerMessageCallback({type:"RECEIVE_FRAME",data:t.data});break;case"BATCH_FINISH_FLAG":if(e._inDecoding=!1,!e._workerMessageCallback)return;e._workerMessageCallback({type:"BATCH_FINISH"});break;case"CHECK_TO_DECODE":e._inDecoding=t.data.data;break;case"FAILED":e._whenError(t.data.message)}},t.onError=function(t){var n,r,i=null===(n=e._parent)||void 0===n||null===(r=n._parent)||void 0===r?void 0:r._parent;i&&i.removeChild(i.querySelector("canvas")),e._whenError(t.message)},t.addEventListener("message",t.onMessage),t.addEventListener("error",t.onError),this._decoderWorker=t,this._initDecoderWithConfiguration(t,this._parent.configuration)}},{key:"_whenError",value:function(e){n.canUse=!1,this._workerErrorCallback(e)}},{key:"_initDecoderWithConfiguration",value:function(e,t){e.postMessage({msg:"configuration",data:{codec:this._parent._meta.codec,codedHeight:this._parent._meta.height,codedWidth:this._parent._meta.width,description:t}}),this._avccpushed=!0}},{key:"_checkToDecode",value:function(){this._decoderWorker.postMessage({msg:"checkDecode"})}},{key:"destroy",value:function(){var e=this._decoderWorker;e.removeEventListener("message",e.onMessage),e.removeEventListener("error",e.onError),e.postMessage({msg:"destroy"}),e.terminate(),this._decoderWorker=null}}],[{key:"isSupported",value:function(){return JW().h264WithWebcodec&&!!window.VideoDecoder&&!1!==n.canUse}}]),n}(d9),g9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD0zMTQ1NzI4LGluaXRUcz0wLERlY29kZXI9ZnVuY3Rpb24oZSl7dGhpcy5pbml0ZWQ9ITEsdGhpcy5pbmZvSWQ9MCx0aGlzLnNlbGY9ZSx0aGlzLm1ldGE9dGhpcy5zZWxmLm1ldGEsdGhpcy50cz0wLHRoaXMuaW5mb2xpc3Q9W10sZS5wYXJfYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkPXRoaXMuYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkLmJpbmQodGhpcyksZS5wYXJfYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPXRoaXMuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkLmJpbmQodGhpcyl9LGRlY29kZXI7ZnVuY3Rpb24gb25Qb3N0UnVuKCl7KGRlY29kZXI9bmV3IERlY29kZXIodGhpcykpLmluaXQoKX1EZWNvZGVyLnByb3RvdHlwZS50b1U4QXJyYXk9ZnVuY3Rpb24oZSx0KXtyZXR1cm4gTW9kdWxlLkhFQVBVOC5zdWJhcnJheShlLGUrdCl9LERlY29kZXIucHJvdG90eXBlLmluaXQ9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5SW5pdCgwLDEpLHRoaXMub2Zmc2V0PU1vZHVsZS5fYnJvYWR3YXlDcmVhdGVTdHJlYW0oTUFYX1NUUkVBTV9CVUZGRVJfTEVOR1RIKX0sRGVjb2Rlci5wcm90b3R5cGUuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPWZ1bmN0aW9uKGUsdCxvLG4saSl7dmFyIHM9dGhpcy5pbmZvbGlzdC5zaGlmdCgpLHI9byxhPW8vMixjPXQsZD10LzI7aWYoIXRoaXMubWV0YXx8NDQ0IT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdCYmNDIyIT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdHx8KGE9byksIXN8fCFzLnByZWNpc2VTZWVrfHxzLm91dHB1dCl7dmFyIGY9dGhpcy50b1U4QXJyYXkoZSxjKnIrZCphKjIpLHU9bmV3IFVpbnQ4QXJyYXkoZi5sZW5ndGgpO3Uuc2V0KGYpO3ZhciBsPXUuYnVmZmVyO3RoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVEIix3aWR0aDp0LGhlaWdodDpvLHlMaW5lc2l6ZTpjLHV2TGluZXNpemU6ZCxpbmZvOnMsYnVmZmVyOmx9LFtsXSl9fSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXtpZighdGhpcy5pbml0ZWQpe3RoaXMuaW5pdGVkPSEwO3ZhciBlPTA7aW5pdFRzJiYoZT1wZXJmb3JtYW5jZS5ub3coKS1pbml0VHMpLHRoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVSX1JFQURZIixjb3N0OmV9KX19LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlLHQpe3ZhciBvPXBhcnNlSW50KChuZXcgRGF0ZSkuZ2V0VGltZSgpKSxuPW8tMWU5Kk1hdGguZmxvb3Ioby8xZTkpO3RoaXMuaW5mb2xpc3QucHVzaCh0KSx0JiZ0LmtleWZyYW1lJiYodGhpcy5pbmZvbGlzdD1bdF0sTW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKG4pKSxNb2R1bGUuSEVBUFU4LnNldChlLHRoaXMub2Zmc2V0KSxNb2R1bGUuX2Jyb2Fkd2F5UGxheVN0cmVhbShlLmxlbmd0aCx0aGlzLmluZm9JZCl9LERlY29kZXIucHJvdG90eXBlLmZsdXNoPWZ1bmN0aW9uKCl7TW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKCl9LERlY29kZXIucHJvdG90eXBlLmRlc3Ryb3k9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5RXhpdCgpfSxEZWNvZGVyLnByb3RvdHlwZS51cGRhdGVNZXRhPWZ1bmN0aW9uKGUpe3RoaXMubWV0YT1lfTt2YXIgV0FTTV9DRE5fUEFUSF9QUkVGSVg9IiI7ZnVuY3Rpb24gaW5pdChlKXtXQVNNX0NETl9QQVRIX1BSRUZJWD1lLnNwbGl0KCIvIikuc2xpY2UoMCwtMSkuam9pbigiLyIpLGluaXRUcz1wZXJmb3JtYW5jZS5ub3coKTt2YXIgdD0vYXNtLy50ZXN0KGUpO2RlY29kZXJ8fChzZWxmLmltcG9ydFNjcmlwdHM/bmV3IFByb21pc2UoKGZ1bmN0aW9uKHQsbyl7c2VsZi5jb25zb2xlfHwoc2VsZi5jb25zb2xlPXtsb2c6ZnVuY3Rpb24oKXt9LHdhcm46ZnVuY3Rpb24oKXt9LGluZm86ZnVuY3Rpb24oKXt9LGVycm9yOmZ1bmN0aW9uKCl7fX0pO3RyeXtzZWxmLmltcG9ydFNjcmlwdHMoZSksdCgpfWNhdGNoKG4pe2lmKG4ubWVzc2FnZS5pbmNsdWRlcygiTW9kdWxlIHNjcmlwdHMgZG9uJ3Qgc3VwcG9ydCBpbXBvcnRTY3JpcHRzIikpcmV0dXJuIHQoc2hpbUltcG9ydFNjcmlwdHMoZSkpO28obil9fSkpOnNoaW1JbXBvcnRTY3JpcHRzKGUpKS50aGVuKChmdW5jdGlvbigpe3JldHVybiB0Pyhjb25zb2xlLmxvZygiYXV0byBpbnN0YW5jZSBEZWNvZGVyISIpLG5ldyBQcm9taXNlKChmdW5jdGlvbihlLHQpe3NldFRpbWVvdXQoKGZ1bmN0aW9uKCl7dHJ5e29uUG9zdFJ1bi5jYWxsKHNlbGYpLGUoKX1jYXRjaChvKXt0KG8pfX0pKX0pKSk6c2VsZi5tP3NlbGYubSh7aW5zdGFudGlhdGVXYXNtOmZ1bmN0aW9uKGUsdCl7ZmV0Y2goIiIuY29uY2F0KFdBU01fQ0ROX1BBVEhfUFJFRklYLCIvZGVjb2Rlci53YXNtLmpzIikpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiBlLmFycmF5QnVmZmVyKCl9KSkudGhlbigoZnVuY3Rpb24odCl7cmV0dXJuIFdlYkFzc2VtYmx5Lmluc3RhbnRpYXRlKHQsZSl9KSkudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIHQoZS5pbnN0YW5jZSl9KSl9fSkudGhlbigoZnVuY3Rpb24oZSl7c2VsZi5Nb2R1bGU9ZSxvblBvc3RSdW4uY2FsbChzZWxmKX0pKTpuZXcgUHJvbWlzZSgoZnVuY3Rpb24oZSx0KXthZGRPblBvc3RSdW4ob25Qb3N0UnVuLmJpbmQoc2VsZikpLE1vZHVsZS5vblJ1bnRpbWVJbml0aWFsaXplZD1mdW5jdGlvbigpe2UoKX0sTW9kdWxlLm9uQWJvcnQ9ZnVuY3Rpb24oZSl7dChlJiZlLm1lc3NhZ2U/ZTpuZXcgRXJyb3IoIndhc20gaW5pdCBlcnJvciIpKX0sc2V0VGltZW91dCgoZnVuY3Rpb24oKXt0KG5ldyBFcnJvcigid2FzbSBsb2FkIHRpbWVvdXQiKSl9KSw2ZTMpfSkpfSkpLmNhdGNoKChmdW5jdGlvbihlKXtzZWxmLnBvc3RNZXNzYWdlKHttc2c6IklOSVRfRkFJTEVEIixsb2c6ZS5tZXNzYWdlfSl9KSl9c2VsZi5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7dmFyIHQ9ZS5kYXRhO2lmKHQubXNnKXtpZigiaW5pdCIhPT10Lm1zZyYmInByZWxvYWQiIT09dC5tc2cmJiFkZWNvZGVyKXJldHVybjtzd2l0Y2godC5tc2cpe2Nhc2UicHJlbG9hZCI6aW5pdCh0LnVybCk7YnJlYWs7Y2FzZSJpbml0IjpzZWxmLm1ldGE9dC5tZXRhLGluaXQodC51cmwpO2JyZWFrO2Nhc2UidXBkYXRlbWV0YSI6c2VsZi5tZXRhPXQubWV0YSxkZWNvZGVyLnVwZGF0ZU1ldGEodC5tZXRhKTticmVhaztjYXNlImluaXREZWNvZGVyIjpkZWNvZGVyLmRlY29kZSh0LmRhdGEpO2JyZWFrO2Nhc2UiZGVjb2RlIjpkZWNvZGVyLmRlY29kZSh0LmRhdGEsdC5pbmZvKTticmVhaztjYXNlImZsdXNoIjpkZWNvZGVyLmZsdXNoKCk7YnJlYWs7Y2FzZSJmaW5pc2hfZmxhZyI6c2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KTticmVhaztjYXNlImRlc3RvcnkiOmRlY29kZXIuZGVzdHJveSgpfX1lbHNlIHNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiRVJST1I6aW52YWxpZCBtZXNzYWdlIn0pfX0pKCk7Cg==",_9="undefined"!=typeof window&&window.Blob&&new Blob([atob(g9)],{type:"text/javascript;charset=utf-8"});function b9(){var e=_9&&(p$||window.webkitURL).createObjectURL(_9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+g9,{type:"module"})}finally{e&&(p$||window.webkitURL).revokeObjectURL(e)}}var E9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD01MjQyODgwLEJBVENIX0RFQ09ERV9TSVpFPTgsaW5pdFRzPTAsRGVjb2Rlcj1mdW5jdGlvbihlKXt0aGlzLmluaXRlZD0hMSx0aGlzLmluZm9JZD0wLHRoaXMuc2VsZj1lLHRoaXMubWV0YT1lLm1ldGEsdGhpcy50cz0wLHRoaXMuaW5mb2xpc3Q9W10sZS5wYXJfYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkPXRoaXMuYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkLmJpbmQodGhpcyksZS5wYXJfYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPXRoaXMuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkLmJpbmQodGhpcyl9LGRlY29kZXI7ZnVuY3Rpb24gb25Qb3N0UnVuKCl7KGRlY29kZXI9bmV3IERlY29kZXIodGhpcykpLmluaXQoKX1EZWNvZGVyLnByb3RvdHlwZS50b1U4QXJyYXk9ZnVuY3Rpb24oZSx0KXtyZXR1cm4gTW9kdWxlLkhFQVBVOC5zdWJhcnJheShlLGUrdCl9LERlY29kZXIucHJvdG90eXBlLmluaXQ9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5SW5pdCgwLDIpLHRoaXMuc3RyZWFtQnVmZmVyUHRyPU1vZHVsZS5fYnJvYWR3YXlDcmVhdGVTdHJlYW0oTUFYX1NUUkVBTV9CVUZGRVJfTEVOR1RIKSx0aGlzLnN0cmVhbUJ1ZmZlcj10aGlzLnRvVThBcnJheSh0aGlzLnN0cmVhbUJ1ZmZlclB0cixNQVhfU1RSRUFNX0JVRkZFUl9MRU5HVEgpLHRoaXMuYnVmZmVyU2l6ZXNQdHI9TW9kdWxlLl9tYWxsb2MoNCpCQVRDSF9ERUNPREVfU0laRSksdGhpcy5idWZmZXJTaXplcz10aGlzLnRvVThBcnJheSh0aGlzLmJ1ZmZlclNpemVzUHRyLDQqQkFUQ0hfREVDT0RFX1NJWkUpLHRoaXMuc3RyZWFtQnVmZmVyT2Zmc2V0PTAsdGhpcy5mcmFtZUxlbnNPZmZzZXQ9MCx0aGlzLmZyYW1lTGVuc0J1ZmZlcj1uZXcgVWludDMyQXJyYXkoQkFUQ0hfREVDT0RFX1NJWkUpfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uUGljdHVyZURlY29kZWQ9ZnVuY3Rpb24oZSx0LHIpe3ZhciBzPXRoaXMuaW5mb2xpc3Quc2hpZnQoKSxvPXIsaT1yLzIsbj10LGY9dC8yOyF0aGlzLm1ldGF8fDQ0NCE9PXRoaXMubWV0YS5jaHJvbWFGb3JtYXQmJjQyMiE9PXRoaXMubWV0YS5jaHJvbWFGb3JtYXR8fChpPXIpO3ZhciBhPXRoaXMudG9VOEFycmF5KGUsbipvK2YqaSoyKSxjPW5ldyBVaW50OEFycmF5KGEubGVuZ3RoKTtjLnNldChhKTt2YXIgZD1jLmJ1ZmZlcjt0aGlzLnNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiREVDT0RFRCIsd2lkdGg6dCxoZWlnaHQ6cix5TGluZXNpemU6bix1dkxpbmVzaXplOmYsaW5mbzpzLGJ1ZmZlcjpkfSxbZF0pfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXtpZighdGhpcy5pbml0ZWQpe3RoaXMuaW5pdGVkPSEwO3ZhciBlPTA7aW5pdFRzJiYoZT1wZXJmb3JtYW5jZS5ub3coKS1pbml0VHMpLHRoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVSX1JFQURZIixjb3N0OmV9KX19LERlY29kZXIucHJvdG90eXBlLnN0b3JlQnVmZmVyPWZ1bmN0aW9uKGUsdCl7dCYmdC5rZXlmcmFtZSYmdGhpcy5mbHVzaCgpLHRoaXMuaW5mb2xpc3QucHVzaCh0KSx0aGlzLnN0cmVhbUJ1ZmZlci5zZXQoZSx0aGlzLnN0cmVhbUJ1ZmZlck9mZnNldCksdGhpcy5mcmFtZUxlbnNCdWZmZXJbdGhpcy5mcmFtZUxlbnNPZmZzZXRdPWUubGVuZ3RoLHRoaXMuc3RyZWFtQnVmZmVyT2Zmc2V0Kz1lLmxlbmd0aCx0aGlzLmZyYW1lTGVuc09mZnNldCs9MSx0aGlzLmJhdGNoRGVjb2RlKCl9LERlY29kZXIucHJvdG90eXBlLmJhdGNoRGVjb2RlPWZ1bmN0aW9uKGUpeyh0aGlzLmZyYW1lTGVuc09mZnNldD49QkFUQ0hfREVDT0RFX1NJWkV8fGUmJnRoaXMuZnJhbWVMZW5zT2Zmc2V0KSYmKHRoaXMuYnVmZmVyU2l6ZXMuc2V0KG5ldyBVaW50OEFycmF5KHRoaXMuZnJhbWVMZW5zQnVmZmVyLmJ1ZmZlciksMCksTW9kdWxlLl9icm9hZHdheVBsYXlTdHJlYW0xKHRoaXMuYnVmZmVyU2l6ZXNQdHIsdGhpcy5mcmFtZUxlbnNPZmZzZXQpLHRoaXMuZnJhbWVMZW5zT2Zmc2V0PTAsdGhpcy5zdHJlYW1CdWZmZXJPZmZzZXQ9MCl9LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlKXt0aGlzLnN0cmVhbUJ1ZmZlci5zZXQoZSksTW9kdWxlLl9icm9hZHdheVBsYXlTdHJlYW0oZS5sZW5ndGgsMCl9LERlY29kZXIucHJvdG90eXBlLmZsdXNoPWZ1bmN0aW9uKCl7dGhpcy5iYXRjaERlY29kZSghMCksTW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKCl9LERlY29kZXIucHJvdG90eXBlLmRlc3Ryb3k9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5RXhpdCgpfSxEZWNvZGVyLnByb3RvdHlwZS51cGRhdGVNZXRhPWZ1bmN0aW9uKGUpe3RoaXMubWV0YT1lfTt2YXIgV0FTTV9DRE5fUEFUSF9QUkVGSVg9IiI7ZnVuY3Rpb24gaW5pdChlKXsoV0FTTV9DRE5fUEFUSF9QUkVGSVg9ZS5zcGxpdCgiLyIpLnNsaWNlKDAsLTEpLmpvaW4oIi8iKSxpbml0VHM9cGVyZm9ybWFuY2Uubm93KCksZGVjb2Rlcil8fChzZWxmLmltcG9ydFNjcmlwdHM/bmV3IFByb21pc2UoKGZ1bmN0aW9uKHQscil7c2VsZi5jb25zb2xlfHwoc2VsZi5jb25zb2xlPXtsb2c6ZnVuY3Rpb24oKXt9LHdhcm46ZnVuY3Rpb24oKXt9LGluZm86ZnVuY3Rpb24oKXt9LGVycm9yOmZ1bmN0aW9uKCl7fX0pO3RyeXtzZWxmLmltcG9ydFNjcmlwdHMoZSksdCgpfWNhdGNoKHMpe2lmKHMubWVzc2FnZS5pbmNsdWRlcygiTW9kdWxlIHNjcmlwdHMgZG9uJ3Qgc3VwcG9ydCBpbXBvcnRTY3JpcHRzIikpcmV0dXJuIHQoc2hpbUltcG9ydFNjcmlwdHMoZSkpO3Iocyl9fSkpOnNoaW1JbXBvcnRTY3JpcHRzKGUpKS50aGVuKChmdW5jdGlvbigpe3JldHVybiBmZXRjaChXQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIud29ya2VyLmpzIikudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUuYmxvYigpfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiBzZWxmLm0oe2xvY2F0ZUZpbGU6ZnVuY3Rpb24odCl7cmV0dXJuL1wud29ya2VyXC5qcyQvLnRlc3QodCk/VVJMLmNyZWF0ZU9iamVjdFVSTChlKTovXC53YXNtJC8udGVzdCh0KT9XQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIud2FzbSI6L1wubWVtJC8udGVzdCh0KT9XQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIuanMubWVtIjp2b2lkIDB9LG1haW5TY3JpcHRVcmxPckJsb2I6V0FTTV9DRE5fUEFUSF9QUkVGSVgrIi9kZWNvZGVyLmpzIn0pfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3NlbGYuTW9kdWxlPWUsb25Qb3N0UnVuLmNhbGwoc2VsZil9KSl9KSkuY2F0Y2goKGZ1bmN0aW9uKGUpe3NlbGYucG9zdE1lc3NhZ2Uoe21zZzoiSU5JVF9GQUlMRUQiLGxvZzplLm1lc3NhZ2V9KX0pKX1zZWxmLm9ubWVzc2FnZT1mdW5jdGlvbihlKXt2YXIgdD1lLmRhdGE7aWYoImluaXQiPT09dC5tc2d8fCJwcmVsb2FkIj09PXQubXNnfHxkZWNvZGVyKXN3aXRjaCh0Lm1zZyl7Y2FzZSJwcmVsb2FkIjppbml0KHQudXJsKSxCQVRDSF9ERUNPREVfU0laRT10LmJhdGNoRGVjb2RlQ291bnQ7YnJlYWs7Y2FzZSJpbml0IjpzZWxmLm1ldGE9dC5tZXRhLEJBVENIX0RFQ09ERV9TSVpFPXQuYmF0Y2hEZWNvZGVDb3VudCxpbml0KHQudXJsKTticmVhaztjYXNlInVwZGF0ZW1ldGEiOnNlbGYubWV0YT10Lm1ldGEsZGVjb2Rlci51cGRhdGVNZXRhKHQubWV0YSk7YnJlYWs7Y2FzZSJpbml0RGVjb2RlciI6ZGVjb2Rlci5mcmFtZUxlbnNPZmZzZXQmJmRlY29kZXIuYmF0Y2hEZWNvZGUoITApLGRlY29kZXIuZmx1c2goKSxkZWNvZGVyLmRlY29kZSh0LmRhdGEpO2JyZWFrO2Nhc2UiZGVjb2RlIjpkZWNvZGVyLnN0b3JlQnVmZmVyKHQuZGF0YSx0LmluZm8pO2JyZWFrO2Nhc2UiZmx1c2giOmRlY29kZXIuZmx1c2goKTticmVhaztjYXNlImZpbmlzaF9mbGFnIjpzZWxmLnBvc3RNZXNzYWdlKHttc2c6IkJBVENIX0ZJTklTSF9GTEFHIn0pO2JyZWFrO2Nhc2UiZGVzdG9yeSI6ZGVjb2Rlci5kZXN0cm95KCl9fX0pKCk7Cg==",k9="undefined"!=typeof window&&window.Blob&&new Blob([atob(E9)],{type:"text/javascript;charset=utf-8"});function T9(){var e=k9&&(p$||window.webkitURL).createObjectURL(k9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+E9,{type:"module"})}finally{e&&(p$||window.webkitURL).revokeObjectURL(e)}}var R9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD0xMDQ4NTc2LGluaXRUcz0wLERlY29kZXI9ZnVuY3Rpb24oZSl7dGhpcy5pbml0ZWQ9ITEsdGhpcy5zZWxmPWUsdGhpcy5tZXRhPWUubWV0YSx0aGlzLmluZm9saXN0PVtdLGUucGFyX2Jyb2Fkd2F5T25Ccm9hZHdheUluaXRlZD10aGlzLmJyb2Fkd2F5T25Ccm9hZHdheUluaXRlZC5iaW5kKHRoaXMpLGUucGFyX2Jyb2Fkd2F5T25QaWN0dXJlRGVjb2RlZD10aGlzLmJyb2Fkd2F5T25QaWN0dXJlRGVjb2RlZC5iaW5kKHRoaXMpfSxkZWNvZGVyO2Z1bmN0aW9uIG9uUG9zdFJ1bigpeyhkZWNvZGVyPW5ldyBEZWNvZGVyKHRoaXMpKS5pbml0KCl9RGVjb2Rlci5wcm90b3R5cGUudG9VOEFycmF5PWZ1bmN0aW9uKGUsdCl7cmV0dXJuIE1vZHVsZS5IRUFQVTguc3ViYXJyYXkoZSxlK3QpfSxEZWNvZGVyLnByb3RvdHlwZS5pbml0PWZ1bmN0aW9uKCl7TW9kdWxlLl9icm9hZHdheUluaXQoKSx0aGlzLnN0cmVhbUJ1ZmZlcj10aGlzLnRvVThBcnJheShNb2R1bGUuX2Jyb2Fkd2F5Q3JlYXRlU3RyZWFtKE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSCwwKSxNQVhfU1RSRUFNX0JVRkZFUl9MRU5HVEgpfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uUGljdHVyZURlY29kZWQ9ZnVuY3Rpb24oZSx0LG8saSxuLHMscil7dmFyIGE9dGhpcy5pbmZvbGlzdFswXTtpZighYXx8IWEua2V5ZnJhbWV8fHIpe3ZhciBjPU9iamVjdC5hc3NpZ24oe30sdGhpcy5pbmZvbGlzdC5zaGlmdCgpKSxkPW8sZj1vLzI7IXRoaXMubWV0YXx8NDQ0IT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdCYmNDIyIT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdHx8KGY9byk7dmFyIHU9dGhpcy50b1U4QXJyYXkoZSxpKmQrbipmKjIpLGw9bmV3IFVpbnQ4QXJyYXkodS5sZW5ndGgpO2wuc2V0KHUpO3ZhciBtPWwuYnVmZmVyO3RoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVEIix3aWR0aDp0LGhlaWdodDpvLHlMaW5lc2l6ZTppLHV2TGluZXNpemU6bixpbmZvOmMsYnVmZmVyOm19LFttXSl9fSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXt0aGlzLmluaXRlZD0hMDt2YXIgZT0wO2luaXRUcyYmKGU9cGVyZm9ybWFuY2Uubm93KCktaW5pdFRzKSx0aGlzLnNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiREVDT0RFUl9SRUFEWSIsY29zdDplfSl9LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlLHQpe3QmJnRoaXMuaW5mb2xpc3QucHVzaCh0KSx0JiZ0LmtleWZyYW1lJiYodGhpcy5pbmZvbGlzdD1bdF0pLHRoaXMuc3RyZWFtQnVmZmVyLnNldChlKSxNb2R1bGUuX2Jyb2Fkd2F5UGxheVN0cmVhbShlLmxlbmd0aCwwKX0sRGVjb2Rlci5wcm90b3R5cGUuZGVzdHJveT1mdW5jdGlvbigpe01vZHVsZS5fYnJvYWR3YXlFeGl0KCl9LERlY29kZXIucHJvdG90eXBlLnVwZGF0ZU1ldGE9ZnVuY3Rpb24oZSl7dGhpcy5tZXRhPWV9O3ZhciBXQVNNX0NETl9QQVRIX1BSRUZJWD0iIjtmdW5jdGlvbiBpbml0KGUpe1dBU01fQ0ROX1BBVEhfUFJFRklYPWUuc3BsaXQoIi8iKS5zbGljZSgwLC0xKS5qb2luKCIvIiksaW5pdFRzPXBlcmZvcm1hbmNlLm5vdygpO3ZhciB0PS9hc20vLnRlc3QoZSk7ZGVjb2Rlcnx8KHNlbGYuaW1wb3J0U2NyaXB0cz9uZXcgUHJvbWlzZSgoZnVuY3Rpb24odCxvKXtzZWxmLmNvbnNvbGV8fChzZWxmLmNvbnNvbGU9e2xvZzpmdW5jdGlvbigpe30sd2FybjpmdW5jdGlvbigpe30saW5mbzpmdW5jdGlvbigpe30sZXJyb3I6ZnVuY3Rpb24oKXt9fSk7dHJ5e3NlbGYuaW1wb3J0U2NyaXB0cyhlKSx0KCl9Y2F0Y2goaSl7aWYoaS5tZXNzYWdlLmluY2x1ZGVzKCJNb2R1bGUgc2NyaXB0cyBkb24ndCBzdXBwb3J0IGltcG9ydFNjcmlwdHMiKSlyZXR1cm4gdChzaGltSW1wb3J0U2NyaXB0cyhlKSk7byhpKX19KSk6c2hpbUltcG9ydFNjcmlwdHMoZSkpLnRoZW4oKGZ1bmN0aW9uKCl7cmV0dXJuIHQ/KGNvbnNvbGUubG9nKCJhdXRvIGluc3RhbmNlIERlY29kZXIhIiksbmV3IFByb21pc2UoKGZ1bmN0aW9uKGUsdCl7c2V0VGltZW91dCgoZnVuY3Rpb24oKXt0cnl7b25Qb3N0UnVuLmNhbGwoc2VsZiksZSgpfWNhdGNoKG8pe3Qobyl9fSkpfSkpKTpzZWxmLm0oe2luc3RhbnRpYXRlV2FzbTpmdW5jdGlvbihlLHQpe2ZldGNoKCIiLmNvbmNhdChXQVNNX0NETl9QQVRIX1BSRUZJWCwiL2RlY29kZXIud2FzbS5qcyIpKS50aGVuKChmdW5jdGlvbihlKXtyZXR1cm4gZS5hcnJheUJ1ZmZlcigpfSkpLnRoZW4oKGZ1bmN0aW9uKHQpe3JldHVybiBXZWJBc3NlbWJseS5pbnN0YW50aWF0ZSh0LGUpfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiB0KGUuaW5zdGFuY2UpfSkpfX0pLnRoZW4oKGZ1bmN0aW9uKGUpe3NlbGYuTW9kdWxlPWUsb25Qb3N0UnVuLmNhbGwoc2VsZil9KSl9KSkuY2F0Y2goKGZ1bmN0aW9uKGUpe3NlbGYucG9zdE1lc3NhZ2Uoe21zZzoiSU5JVF9GQUlMRUQiLGxvZzplLm1lc3NhZ2V9KX0pKX1zZWxmLm9ubWVzc2FnZT1mdW5jdGlvbihlKXt2YXIgdD1lLmRhdGE7aWYoImluaXQiPT09dC5tc2d8fCJwcmVsb2FkIj09PXQubXNnfHxkZWNvZGVyKXN3aXRjaCh0Lm1zZyl7Y2FzZSJwcmVsb2FkIjppbml0KHQudXJsKTticmVhaztjYXNlImluaXQiOnNlbGYubWV0YT10Lm1ldGEsc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJMT0ciLGxvZzoid29ya2VyIGluaXRlZCJ9KSxpbml0KHQudXJsKTticmVhaztjYXNlInVwZGF0ZW1ldGEiOnNlbGYubWV0YT10Lm1ldGEsZGVjb2Rlci51cGRhdGVNZXRhKHQubWV0YSk7YnJlYWs7Y2FzZSJpbml0RGVjb2RlciI6ZGVjb2Rlci5kZWNvZGUodC5kYXRhKTticmVhaztjYXNlImRlY29kZSI6ZGVjb2Rlci5kZWNvZGUodC5kYXRhLHQuaW5mbyk7YnJlYWs7Y2FzZSJmaW5pc2hfZmxhZyI6c2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KTticmVhaztjYXNlImRlc3RvcnkiOmRlY29kZXIuZGVzdHJveSgpfX19KSgpOwo=",S9="undefined"!=typeof window&&window.Blob&&new Blob([atob(R9)],{type:"text/javascript;charset=utf-8"});function w9(){var e=S9&&(p$||window.webkitURL).createObjectURL(S9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+R9,{type:"module"})}finally{e&&(p$||window.webkitURL).revokeObjectURL(e)}}var D9=new(function(){function e(){by(this,e),Ty(this,"_queue",[]),Ty(this,"_pendingDecoder",null),Ty(this,"TAG","DecoderCache")}return ky(e,[{key:"genDecoder",value:function(e){return this._initDecoder(e)}},{key:"_initDecoder",value:function(e){var t=this,n=JW(),r=n.preloadDecoder,i=n.maxDecodeOnceWasm;e=e||r;var o,a,s=KW(),u=s.H264_DECODER_URL,c=s.H265_SIMD_DECODER_URL,l=s.H265_DECODER_URL,h=s.H265_THREAD_DECODER_URL,A=1;if("h265"===e&&(zW()?(o=new b9,a=c,A=2):qW()&&JW().canUseThreadMode?(o=new T9,a=h,A=1):(o=new b9,a=l,A=3)),"h264"===e&&(o=new w9,a=u,A=3),!o)return Zp.resolve();var d,f,v,p=((v=new Zp((function(e,t){d=e,f=t}))).resolve=d,v.reject=f,v);o.postMessage({msg:"preload",batchDecodeCount:i,url:a}),this._pendingDecoder=o,o.id=kG()+ug(1e3*Math.random()),o.isHevc="h265"===e,o.using=!1,o.ready=!1,fW.log(this.TAG,"start init decoder worker, id=",o.id,"hevc=",o.isHevc,"mode=",A);var m=function e(n){t._pendingDecoder=null;var r=n.data.msg;switch("DECODER_READY"!==r&&"INIT_FAILED"!==r||(o.removeEventListener("message",e),o.removeEventListener("error",y)),r){case"DECODER_READY":fW.log(t.TAG,"decoder worker inited!, id=",o.id,"cost:",n.data.cost),o.ready=!0,o.using||t._queue.push(o),p.resolve();break;case"INIT_FAILED":fW.log(t.TAG,"decoder worker init failed!",n.data.log),p.reject(n.data.log)}},y=function e(t){o.removeEventListener("message",m),o.removeEventListener("error",e),p.reject(null==t?void 0:t.message)};return o.addEventListener("message",m),o.addEventListener("error",y),p}},{key:"cacheDecoder",value:function(e){var t;e.using=!1,e.ready=!0,e.id||(e.id=kG()+ug(1e3*Math.random())),this._queue.push(e),fW.log(this.TAG,"cache decoder, id=",e.id),"h265"===JW().preloadDecoder&&1===Vl(t=this._queue).call(t,(function(e){return!e.using&&e.isHevc})).length&&this.genDecoder("h265")}},{key:"getCachedDecoder",value:function(e){var t,n,r,i,o=vQ(t=this._queue).call(t,(function(t){return!t.using&&t.isHevc===e}));-1!==o&&(r=PQ(i=this._queue).call(i,o,1)[0]);if(!r&&this._pendingDecoder&&(r=this._pendingDecoder,this._pendingDecoder=null),r)return r.using=!0,fW.warn(this.TAG,dg(n="get cached decoder, id=".concat(r.id,", ready=")).call(n,r.ready)),r}}]),e}()),I9=JW().maxDecodeOnceWasm,C9=function(e){Ry(n,e);var t=Iy(n);function n(){var e,r;by(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ty(Dy(r=t.call.apply(t,dg(e=[this]).call(e,o))),"TAG","WasmController"),Ty(Dy(r),"_avccpushed",!1),Ty(Dy(r),"_maxDecodeOnce",I9),Ty(Dy(r),"_continueDecodeThreshold",I9/2),Ty(Dy(r),"_wasmInitCost",0),Ty(Dy(r),"_threadSupported",qW()&&JW().canUseThreadMode),Ty(Dy(r),"_simdSuppported",zW()),Ty(Dy(r),"_decoderMode",window.WebAssembly?3:4),r}return ky(n,[{key:"wasmInitCost",get:function(){var e;return null===(e=this._decoderWorker)||void 0===e?void 0:e._wasmInitCost}},{key:"isHevc",get:function(){var e;return null===(e=this._parent)||void 0===e?void 0:e.isHevc}},{key:"_selectDecodeWorker",value:function(){this.analyse.addWasmInit();var e,t=KW(),n=t.H264_DECODER_URL,r=t.H265_DECODER_URL,i=t.H265_THREAD_DECODER_URL,o=t.H265_SIMD_DECODER_URL,a=t.ASM_H264_DECODER_URL,s=t.ASM_H265_DECODER_URL;return fW.log(this.TAG,"start init wasm worker:",performance.now(),"hevc:",this.isHevc,"decoderMode:",this._decoderMode),this.isHevc?(e=1===this._decoderMode?i:2===this._decoderMode?o:3===this._decoderMode?r:s)?{decoder:1===this._decoderMode?new T9:new b9,url:e}:void this._workerErrorCallback("no found decoder url, decodeMode:".concat(this._decoderMode)):(e=4===this._decoderMode?a:n)?{decoder:new w9,url:e}:void this._workerErrorCallback("no found decoder url, decodeMode:".concat(this._decoderMode))}},{key:"_initWorker",value:function(){this.isHevc&&(this._threadSupported&&(this._decoderMode=1),this._simdSuppported&&(this._decoderMode=2)),this._initDecodeWorkerInternal()}},{key:"_initDecodeWorkerInternal",value:function(){var e=D9.getCachedDecoder(this.isHevc);if(e)return fW.warn(this.TAG,"select decoder from cache"),this.analyse.addWasmInit(),this._avccpushed=!1,this._bindWorkerEvent(e),this._decoderWorker=e,void(e.ready&&(this._decoderReady=!0,this._initDecoderWithConfiguration(e,this.meta),this._workerMessageCallback({type:"DECODER_READY",data:e}),fW.log(this.TAG,"decoder ready!")));var t=this._selectDecodeWorker()||{},n=t.decoder,r=t.url;n&&(this._avccpushed=!1,this._bindWorkerEvent(n),n.isHevc=this.isHevc,n.postMessage({msg:"init",meta:this.meta,batchDecodeCount:I9,url:r}),this._decoderWorker=n)}},{key:"_bindWorkerEvent",value:function(e){var t=this,n=function(n,r){fW.log(t.TAG,"worker failed: ",n,r),t._terminateWorker(e),t._decoderWorker=null,!1===JW().wasmFallbackToAsm||4===t._decoderMode?t._workerErrorCallback(n):(t._decoderMode=1===t._decoderMode||2===t._decoderMode?3:4,t._initDecodeWorkerInternal())};e._onMessage=function(r){var i,o;switch(r.data.msg){case"DECODER_READY":if(fW.log(t.TAG,"wasm worker ready!","cost:",r.data.cost),t._decoderReady=!0,e._wasmInitCost=ug(r.data.cost),!t.meta)return;t._avccpushed||t._initDecoderWithConfiguration(e,t.meta),t.emit(WY.VIDEO_DECODER_INIT,e),t._workerMessageCallback({type:"DECODER_READY",data:e});break;case"DECODED":if(t._inDecoding=!0,(null===(i=r.data)||void 0===i||null===(o=i.info)||void 0===o?void 0:o.id)!==t._id)return;t._workerMessageCallback({type:"RECEIVE_FRAME",data:r.data});break;case"BATCH_FINISH_FLAG":if(t._inDecoding=!1,!t._workerMessageCallback)return;t._workerMessageCallback({type:"BATCH_FINISH"});break;case"INIT_FAILED":n(r.data.log,1)}},e._onError=function(e){n(e.message,2)},e.addEventListener("message",e._onMessage),e.addEventListener("error",e._onError)}},{key:"_initDecoderWithConfiguration",value:function(e,t){var n;fW.log(this.TAG,"init decoder with configuration"),this._avccpushed=!0,e.postMessage({msg:"updatemeta",meta:t});var r=t.rawVps||t.vps[0],i=t.rawSps||t.sps[0],o=t.rawPps||t.pps[0],a=Vl(n=[r,i,o]).call(n,Boolean),s=TY(a).call(a,(function(e,t){return e+(t.byteLength+4)}),0),u=new Uint8Array(s),c=0;$l(a).call(a,(function(e){u.set([0,0,0,1],c),c+=4,u.set(e,c),c+=e.byteLength})),e.postMessage({msg:"initDecoder",data:u})}},{key:"destroy",value:function(){if(this._decoderWorker)return JW().reuseWasmDecoder?(this._offWorkerBind(this._decoderWorker),void D9.cacheDecoder(this._decoderWorker)):void this._terminateWorker(this._decoderWorker)}},{key:"_offWorkerBind",value:function(e){e.removeEventListener("message",e._onMessage),e.removeEventListener("error",e._onError),e.postMessage({msg:"flush"}),e._onMessage=null,e._onError=null,fW.log(this.TAG,"flush decoder and unbind worker event")}},{key:"_terminateWorker",value:function(e){this._offWorkerBind(e),e.postMessage({msg:"destroy"}),e.terminate(),fW.log(this.TAG,"destroy decoder worker")}}]),n}(d9),L9=function(e){Ry(n,e);var t=Iy(n);function n(){var e,r;by(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ty(Dy(r=t.call.apply(t,dg(e=[this]).call(e,o))),"TAG","VideoRenderWithDecoder"),Ty(Dy(r),"_hideRenderFlag",0),Ty(Dy(r),"_recentMeta",null),Ty(Dy(r),"_inChaseFrame",!1),Ty(Dy(r),"_decoderErrorCallback",(function(e){r._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,r._assembleErr(e,1))})),Ty(Dy(r),"_decoderMessageCallback",(function(e){var t,n,i,o=e.type,a=e.data;switch(o){case"DECODER_READY":if(r.analyse.addWasmReady(),!r._frameRender){var s=CW(r._config,{meta:r._meta,canvas:r._canvas,type:r._decodeController.webcodec?"2d":""});try{r._canvas.glInstance?(r._frameRender=r._canvas.glInstance,r._frameRender.updateBind(Dy(r),r._meta),fW.warn(r.TAG,"reuse canvas and context")):(r._frameRender=new i9(s,Dy(r)),fW.log(r.TAG,"create frameRender with config",s))}catch(b6){r._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,r._assembleErr(b6&&b6.message,2))}}r._startDecode();break;case"RECEIVE_FRAME":if(r._inChaseFrame&&(null===(t=r._decodeController)||void 0===t||!t.webcodec))return;r._receiveFrame(a);break;case"BATCH_FINISH":null===(n=Dy(r))||void 0===n||n._decodeEstimate.resetDecodeDot(),r._inChaseFrame&&(r._inChaseFrame=!1,r._frameQueue.empty()),r._ready||r.inSeeking||null===(i=r._decodeController)||void 0===i||!i.decoderReady||r._startDecode()}})),r}return ky(n,[{key:"wasmInitCost",get:function(){var e;return null===(e=this._decodeController)||void 0===e?void 0:e.wasmInitCost}},{key:"hevcThread",get:function(){return 1===this.decodeMode}},{key:"lowlatency",get:function(){return this._parent.lowlatency}},{key:"nextFrameTime",get:function(){var e=this._frameQueue.nextFrame();return(e&&e.info&&e.info.dts||0)/1e3}},{key:"ajustSeekTime",value:function(e,t){var n;fW.log(this.TAG,"ajust seek time: ",e),this._frameQueue.empty(),null===(n=this._decodeController)||void 0===n||n.flushDecoder(),this._switchVideoBuffer(e,t)}},{key:"canSeek",value:function(){return!0}},{key:"_appendChunk",value:function(e){var t;if(!this.noVideo&&this._timeRange){if(this._meta){if(this._recentMeta.width!==e.width||this._recentMeta.height!==e.height){var n,r,i;fW.warn(this.TAG,dg(n=dg(r=dg(i="metadata changed! width: ".concat(this._recentMeta.width," -> ")).call(i,e.width,", height: ")).call(r,this._recentMeta.height," -> ")).call(n,e.height));var o=e.samples[0];o&&(this._recentMeta=o.meta=CW({},e,{samples:null}))}}else{this._emitTimelineEvents(YY.PLAY_EVENT,NY.LOADEDMETADATA),this._recentMeta=this._meta=CW({},e,{samples:null}),fW.warn(this.TAG,"video set metadata",this._meta,"configuration:",this.configuration);var a=e.fpsNum/e.fpsDen;a?fW.log(this.TAG,"detect fps:",a):fW.warn(this.TAG,"no detect fps,start estimate"),this._selectDecoder(),this._initDecoder()}if(this._timeRange.append(e.samples,this._isLive&&this.noAudio,!this.videoDecode),e.samples=[],!this.inSeeking){var s;if(this.isLive||this._timeRange.frameLength||this._switchVideoBuffer(this._parent.currentTime),!this._ready&&null!==(t=this._decodeController)&&void 0!==t&&t.decoderReady)!this.noAudio&&null!==(s=this._decodeController)&&void 0!==s&&s.inDecoding||this._startDecode();this.noAudio&&this._emitTimelineEvents(YY.PLAY_EVENT,NY.DURATION_CHANGE)}}}},{key:"_selectDecoder",value:function(){if(!this.isHevc&&y9.isSupported())return this._decodeController=new y9(this),void(this._decodeEstimate.webcodec=!0);this._decodeController=new C9(this)}},{key:"_initDecoder",value:function(){var e;null===(e=this._decodeController)||void 0===e||e.init(this._decoderMessageCallback,this._decoderErrorCallback)}},{key:"_startDecode",value:function(){var e;null===(e=this._decodeController)||void 0===e||e.doDecode()}},{key:"_switchVideoBuffer",value:function(e,t){var n=this._timeRange.switchBuffer(e);if(n){var r;if(this.noAudio&&this._parent.emit(YY.SYNC_DTS,this.getDtsOfTime(n.start)),t)return void(null===(r=this._decodeController)||void 0===r||r.preciseSeek(e));this._startDecode(t)}}},{key:"_checkToDecode",value:function(){var e;this.inSeeking||null===(e=this._decodeController)||void 0===e||e.checkToDecode(this._frameQueue.length)}},{key:"_render",value:function(e){var t;if(!this.noVideo){var n=this._frameQueue&&this._frameQueue.nextFrame();if(n){var r=n.info;if(!r)return this._frameQueue.shift(),void console.error("not info");this._renderDts=r.dts;var i=r.dts-this.preciseVideoDts;if(!(!e&&i>0&&i<6e4)){var o,a,s,u,c,l;if(this._frameQueue.shift(this.preciseVideoDts),Math.abs(this._lastTimeupdate-r.dts)>250&&(this._emitTimelineEvents(YY.PLAY_EVENT,NY.TIMEUPDATE,{pts:r.originPts/90}),this._lastTimeupdate=r.dts),fW.long)fW.log(this.TAG,dg(o=dg(a=dg(s=dg(u=dg(c=dg(l="render delay:".concat(i," , timelinePosition:")).call(l,this.preciseVideoDts," , dts:")).call(c,r.dts," , cost:")).call(u,r.cost," , gopID:")).call(s,r.gopId," , rest:")).call(a,this._frameQueue.length,", buffer frame:")).call(o,this._timeRange.frameLength));var h=performance.now();this._hideRenderFlag++,("visible"===document.visibilityState||this._hideRenderFlag%15)&&this._frameRender.render(n.buffer,n.width,n.height,n.yLinesize,n.uvLinesize),null!==(t=this._decodeController)&&void 0!==t&&t.webcodec&&n.buffer.close(),this._renderCost=performance.now()-h,this._checkToDecode()}}else{var A;if(fW.log(this.TAG,"lack frame, ","inDecoding:",null===(A=this._decodeController)||void 0===A?void 0:A.inDecoding),this._checkToDecode(),this.noAudio){var d;if(!this.isLive&&Math.abs(this.currentTime-this.duration)<.5)return null==this||this._emitTimelineEvents(YY.PLAY_EVENT,NY.TIMEUPDATE),null==this||this._emitTimelineEvents(YY.PLAY_EVENT,NY.ENDED),void(null===(d=this._timeRange)||void 0===d||d.clean());this._timeRange.frameLength||(this._ready=!1,this.emit(WY.VIDEO_WAITING))}}}}},{key:"_updateSegmentEnd",value:function(e){var t;null===(t=this._timeRange)||void 0===t||t.updateSegmentEnd(e)}},{key:"_doChaseFrame",value:function(e){var t=e.frame;this._inChaseFrame=!0,this._timeRange.deletePassed(t.dts),this._frameQueue.empty(),this.noAudio&&this._parent.emit(YY.SYNC_DTS,t.dts)}},{key:"_destroy",value:function(e){var t;fW.log(this.TAG,"destroy video render"),Cy(Sy(n.prototype),"destroy",this).call(this,e),null===(t=this._decodeController)||void 0===t||t.destroy(),this._decodeController=null}}]),n}(u9),V9=.1,x9=function(e){Ry(n,e);var t=Iy(n);function n(e,r){var i;return by(this,n),(i=t.call(this)).TAG="TimeLine",i._parent=r,i._seeking=!1,i.audioRender=$3.isSupported()?new $3(e,Dy(i)):new aQ(e,Dy(i)),i.videoRender=new L9(e,Dy(i)),i._readyStatus={audio:!1,video:!1},i._paused=!0,i._switchToMultiWorker=!1,i._lowdecodeEmited=!1,i._startPlayed=!1,i._emitReady=!1,i._lastSeekTime=1e-4,i._singleTrack=-1,i._bindEvent(),i._decodeVideo=e.video,i}return ky(n,[{key:"analyse",get:function(){return this._parent.analyse}},{key:"ready",get:function(){return this._readyStatus.video&&this._readyStatus.audio}},{key:"played",get:function(){var e=this;return{length:this.currentTime?1:0,start:function(){return 0},end:function(){return e.currentTime}}}},{key:"noAudio",get:function(){return 1===this._singleTrack||2===this._singleTrack}},{key:"isLive",get:function(){return this._parent.live}},{key:"seeking",get:function(){return this._seeking}},{key:"decodeFps",get:function(){return this.videoRender.decodeFps}},{key:"decodeCost",get:function(){return this.videoRender.decodeCost}},{key:"renderCost",get:function(){return this.videoRender.renderCost}},{key:"wasmInitCost",get:function(){return this.videoRender.wasmInitCost}},{key:"fps",get:function(){return this.videoRender.fps}},{key:"totalSize",get:function(){return this.videoRender.totalSize}},{key:"bitrate",get:function(){return this.videoRender.bitrate}},{key:"gopLength",get:function(){return this.videoRender.gopLength}},{key:"currentTime",get:function(){return this.noAudio?this.paused?this.videoRender.nextFrameTime:this.videoRender.currentTime:this.audioRender.currentTime}},{key:"timelinePosition",get:function(){return this.noAudio?performance.now()/1e3:this.audioRender.currentTime}},{key:"canvas",get:function(){return this.videoRender.canvas}},{key:"readyState",get:function(){return this.videoRender.readyState}},{key:"buffered",get:function(){var e=this;return this.noAudio?this.videoRender.buffered:this.isLive?this.audioRender.buffered:{length:this.audioRender.buffered.length,start:function(t){return Math.max(e.audioRender.buffered.start(t),e.videoRender.buffered.start(t))},end:function(t){return Math.min(e.audioRender.buffered.end(t),e.videoRender.buffered.end(t))}}}},{key:"duration",get:function(){return this.noAudio?this.videoRender.duration:this.isLive?this.audioRender.duration:Math.min(this.audioRender.duration,this.videoRender.duration)}},{key:"paused",get:function(){return this._paused},set:function(e){this._paused=e}},{key:"lowlatency",get:function(){return this._parent.lowlatency}},{key:"decoderMode",get:function(){return this.videoRender.decoderMode}},{key:"currentAudioCanAutoplay",get:function(){return this.audioRender.audioCanAutoplay}},{key:"_getController",value:function(e,t){return e?new A9(t,this):new L9(t,this)}},{key:"_checkInBuffer",value:function(){for(var e=this.buffered,t=0,n=e.length;t<n;t++)if(e.start(t)<=this.currentTime+V9&&e.end(t)>=this.currentTime)return!0;return!1}},{key:"_resetReadyStatus",value:function(){this._readyStatus.audio=!1,this._readyStatus.video=!1}},{key:"_bindEvent",value:function(){var e=this;this.on(XY.REMUX,(function(t){e.videoRender.setRemux(t)})),this.on(XY.CHASE_VIDEO_FRAME_END,(function(t){e.emit(XY.CHASE_AUDIO_FRAME,t)})),this.audioRender.on(MY.AUDIO_READY,(function(){fW.log(e.TAG,"audio ready! seeking=",e._seeking),e._seeking&&Lg((function(){try{var t=e.videoRender.getSeekStartPosition(e.currentTime,1/0);if(e.audioRender.isMse&&t)return JW().preciseSeek>e.duration&&e.currentTime>V9?(e.audioRender.seekNoSideEffect({position:e.currentTime+V9}),void e.videoRender.ajustSeekTime(e.currentTime,!0)):(e.audioRender.seekNoSideEffect({position:t.position+V9}),void e.videoRender.ajustSeekTime(t.position));e.videoRender.ajustSeekTime(e.currentTime)}catch(b6){}}),10),e._readyStatus.video&&e._startRender(),e._readyStatus.audio=!0,e._startPlayed||e.analyse.addAudioReady()})),this.audioRender.on(MY.AUDIO_NOT_ALLOWED_AUTOPLAY,(function(){e._emitReady&&e.pause()})),this.audioRender.on(MY.AUDIO_WAITING,(function(){!e.noAudio&&e.currentTime&&(fW.warn(e.TAG,"lack data, audio waiting,currentTime:",e.currentTime),e.emit(YY.PLAY_EVENT,NY.TIMEUPDATE),e.emit(YY.PLAY_EVENT,NY.WAITING),e.emit(YY.DO_PAUSE),e._readyStatus.audio=!1)})),this.videoRender.on(WY.VIDEO_WAITING,(function(){fW.warn(e.TAG,"lack data, video waiting"),e.emit(YY.PLAY_EVENT,NY.WAITING),e.emit(YY.DO_PAUSE),e._readyStatus.video=!1})),this.videoRender.on(WY.VIDEO_READY,(function(){fW.log(e.TAG,"video ready!"),e._startPlayed||e.analyse.addVideoReady(),e._readyStatus.audio&&e._startRender("video"),e._readyStatus.video=!0})),this.videoRender.on(WY.DECODE_LOW_FPS,(function(){e.currentTime<2||(e.analyse.increaseLowDecodeCount(),e._lowdecodeEmited||(rY++,e._lowdecodeEmited=!0),e.emit(YY.PLAY_EVENT,NY.LOW_DECODE))})),this.on(YY.SINGLE_TRACK,(function(t){e._singleTrack=t,1!==t&&2!==t||(e._readyStatus.audio=!0),3===t&&(e._readyStatus.video=!0),e.emit(YY.SYNC_DTS,0)})),this.on(YY.DESTROY,(function(){e.removeAllListeners(),e.videoRender=null,e.audioRender=null})),this.on(YY.DO_PLAY,(function(){e.emit(YY.START_RENDER),e._paused=!1,e._lastSeekTime=1e-4,e.noAudio&&e.emit(YY.SYNC_DTS,0)}))}},{key:"_startRender",value:function(e){if(!this._parent.error&&this.videoRender){if(this.noAudio&&this.emit(YY.SYNC_DTS,0),this.videoRender.forceRender(),!this.isLive&&this._paused&&this.seeking&&this._checkInBuffer())return fW.log(this.TAG,"set seeking = false"),this._seeking=!1,this.emit(YY.PLAY_EVENT,NY.SEEKED),void fW.groupEnd();this._startPlayed||(this.analyse.addFirstframe(),this.emit(YY.PLAY_EVENT,NY.LOADEDDATA),this.emit(YY.PLAY_EVENT,NY.FIRST_FRAME),this._startPlayed=!0),fW.log(this.TAG,"emit canplay"),this.emit(YY.PLAY_EVENT,NY.CANPLAY),this._parent.autoplay?(fW.warn(this.TAG,"startRender: time=",this.currentTime,"paused:",this.paused,"seeking:",this.seeking),this.emit(YY.START_RENDER,e)):(this._parent.autoplay=!0,this.emit(YY.PLAY_EVENT,NY.PAUSE)),this.emit(YY.READY),this._emitReady=!0,this._seeking&&this._checkInBuffer()&&(fW.log(this.TAG,"set seeking = false"),this._seeking=!1,this.emit(YY.PLAY_EVENT,NY.SEEKED),fW.groupEnd())}}},{key:"_checkHlsTracks",value:function(e){if(!(null==e?void 0:e.samples[0])){if(!this.buffered.length){var t=new Error("lack video sample");t.code=3,this.emit(YY.PLAY_EVENT,NY.ERROR,t)}return!1}return!0}},{key:"appendBuffer",value:function(e,t){this.emit(YY.APPEND_CHUNKS,e,t),this.noAudio&&this._seeking&&this.videoRender.ajustSeekTime(this.currentTime)}},{key:"play",value:function(){var e=this;return new Zp((function(t,n){var r=e.currentAudioCanAutoplay;e.noAudio?r=!0:e.audioRender&&e.audioRender.resume().then((function(){var t;if(fW.log(e.TAG,dg(t="audio render resumed, pause status: ".concat(e._paused,", audioCanAutoplay:")).call(t,e.currentAudioCanAutoplay)),e._paused||!e.currentAudioCanAutoplay)return r=!1,void e.emit(YY.DO_PAUSE);r=!0})).catch((function(){})),Lg((function(){var i;return fW.log(e.TAG,dg(i="play() timer done, resumed=".concat(r,", paused=")).call(i,e.paused)),r?e.videoRender&&!e.videoRender.canAutoPlay?(console.warn("video render an't autoplay"),e.pause(),void t()):(e._paused=!1,void t()):e.paused?void 0:(fW.log(e.TAG,"audioCtx can't autoplay"),e.pause(),void n({name:"NotAllowedError"}))}),e.audioRender.isMse?10:60)}))}},{key:"pause",value:function(){this._paused||!this.ready&&!this._seeking||(this.emit(YY.DO_PAUSE),this._paused=!0,this.emit(YY.PLAY_EVENT,NY.PAUSE))}},{key:"seek",value:function(e){var t=this;if(this._seeking&&fW.groupEnd(),this.isLive){if(this.currentTime<V9||!this.currentAudioCanAutoplay||this.paused)return;var n=this.videoRender.getSeekStartPosition(e,this._parent.preloadTime+1);if(n){if(n.position<this.currentTime)return;var r=this.audioRender.canSeek(n.position),i=this.videoRender.canSeek(n);if(!r||!i)return void fW.log(this.TAG,"seek, !!!!!!!!!can not seek, audioCanSeek:",r,"videoCanSeek:",i);fW.warn(this.TAG,"seek, chase frame to time: ",n.position,"currentTime:",this.currentTime,"duration:",this.duration),this.videoRender.videoDecode?(this.audioRender.doPause(),n.position=n.position-1.5,this.emit(XY.CHASE_VIDEO_FRAME,n)):this.emit(YY.CHASE_FRAME,n)}}else this._lastSeekTime!==e&&(e&&Math.abs(this._lastSeekTime-e)<=.2||(this._lastSeekTime=e,e>=this.duration&&(e=this.duration-1),e<0&&(e=0),fW.group(this.TAG,"start seek to:".concat(e,", set seeking status=true")),this._seeking=!0,this.videoRender.setSeekingStatus(!0),this.noAudio?(this.emit(YY.SYNC_DTS,this.videoRender.getDtsOfTime(e)),this.videoRender.ajustSeekTime(e)):this._resetReadyStatus(),this.emit(YY.DO_SEEK,e),new Zp((function(e){t.emit(YY.PLAY_EVENT,NY.SEEKING),e()}))))}}]),n}(lY),F9=I,G9=p,O9=di,Z9=z,P9=G9(x.f),U9=G9([].push),N9=function(e){return function(t){for(var n,r=Z9(t),i=O9(r),o=i.length,a=0,s=[];o>a;)n=i[a++],F9&&!P9(r,n)||U9(s,e?[n,r[n]]:r[n]);return s}},B9={entries:N9(!0),values:N9(!1)}.entries;In({target:"Object",stat:!0},{entries:function(e){return B9(e)}});var M9=n(te.Object.entries),W9=_b,Y9=S_,X9=WS,Q9=sR,j9=Y9(tR.f),H9=Y9([].push),J9=function(e){return function(t){for(var n,r=Q9(t),i=X9(r),o=i.length,a=0,s=[];o>a;)n=i[a++],W9&&!j9(r,n)||H9(s,e?[n,r[n]]:r[n]);return s}},K9={entries:J9(!0),values:J9(!1)}.entries;cS({target:"Object",stat:!0},{entries:function(e){return K9(e)}});var z9=cS,q9=S_,$9=aT,e6=iF,t6=function(e){var t=lJ(hJ(this)),n="",r=cJ(e);if(r<0||r==1/0)throw AJ("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},n6=__,r6=RangeError,i6=String,o6=Math.floor,a6=q9(t6),s6=q9("".slice),u6=q9(1..toFixed),c6=function(e,t,n){return 0===t?n:t%2==1?c6(e,t-1,n*e):c6(e*e,t/2,n)},l6=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=o6(i/1e7)},h6=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=o6(r/t),r=r%t*1e7},A6=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=i6(e[t]);n=""===n?r:n+a6("0",7-r.length)+r}return n};z9({target:"Number",proto:!0,forced:n6((function(){return"0.000"!==u6(8e-5,3)||"1"!==u6(.9,0)||"1.25"!==u6(1.255,2)||"1000000000000000128"!==u6(0xde0b6b3a7640080,0)}))||!n6((function(){u6({})}))},{toFixed:function(e){var t,n,r,i,o=e6(this),a=$9(e),s=[0,0,0,0,0,0],u="",c="0";if(a<0||a>20)throw r6("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return i6(o);if(o<0&&(u="-",o=-o),o>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(o*c6(2,69,1))-69)<0?o*c6(2,-t,1):o/c6(2,t,1),n*=4503599627370496,(t=52-t)>0){for(l6(s,0,n),r=a;r>=7;)l6(s,1e7,0),r-=7;for(l6(s,c6(10,r,1),0),r=t-1;r>=23;)h6(s,1<<23),r-=23;h6(s,1<<r),l6(s,1,1),h6(s,2),c=A6(s)}else l6(s,0,n),l6(s,1<<-t,0),c=A6(s)+a6("0",a);return c=a>0?u+((i=c.length)<=a?"0."+a6("0",a-i)+c:s6(c,0,i-a)+"."+s6(c,i-a)):u+c}});var d6={FIRST_DATA:1,AUDIO_MSE_OPEN_START:2,AUDIO_MSE_OPEND:3,AUDIO_FIRSTTIME_APPENDED:4,AUDIO_READY:5,WASM_WORKER_INIT:6,WASM_WORKER_READY:7,FIRST_FRAME_TODECODE:8,VIDEO_READY:9,FIRST_FRAME:10,WAITIGN:11,SEEKING:12,SEEKED:13},f6=M9(d6),v6=function(){function e(){by(this,e),Ty(this,"_dot",[]),Ty(this,"_currentLowDecodeCount",0)}return ky(e,[{key:"getBootStats",value:function(){var e,t,n=(null===(t=this._dot[0])||void 0===t?void 0:t.dot)||0;return zg(e=this._dot).call(e,(function(e){return{action:Vl(f6).call(f6,(function(t){return t[1]===e.action}))[0][1],dot:ug(e.dot-n)}}))}},{key:"getStats",value:function(e){var t,n=this.getBootStats();return{bootStats:n,bitrate:Math.abs(e.bitrate/1e3),decodeFps:e.decodeFps,fps:e.fps,playbackRate:e.playbackRate,firstframe:null===(t=Vl(n).call(n,(function(e){return 10===e.action}))[0])||void 0===t?void 0:t.dot,width:e.videoWidth,height:e.videoHeight,decoderMode:e.decoderMode,vv:nY,lowdecodeVV:rY,h265FailureRate:Number((100*iY).toFixed(2)),currentLowDecodeCount:this._currentLowDecodeCount}}},{key:"seekElapses",value:function(){for(var e=this.getBootStats(),t=[],n=0,r=0,i=e.length;r<i;r++){var o=e[r];o.action===d6.SEEKING&&(n=o.dot),o.action===d6.SEEKED&&t.push(o.dot-n)}return t}},{key:"addFirstData",value:function(){this._dot.push({action:d6.FIRST_DATA,dot:this._getTimestap()})}},{key:"addAudioBoundMedia",value:function(){this._dot.push({action:d6.AUDIO_BOUND_MEDIA,dot:this._getTimestap()})}},{key:"addAudioMseOpenStart",value:function(){this._dot.push({action:d6.AUDIO_MSE_OPEN_START,dot:this._getTimestap()})}},{key:"addAudioMseOpend",value:function(){this._dot.push({action:d6.AUDIO_MSE_OPEND,dot:this._getTimestap()})}},{key:"addAudioFirstTimeAppended",value:function(){this._dot.push({action:d6.AUDIO_FIRSTTIME_APPENDED,dot:this._getTimestap()})}},{key:"addAudioReady",value:function(){this._dot.push({action:d6.AUDIO_READY,dot:this._getTimestap()})}},{key:"addWasmInit",value:function(){this._dot.push({action:d6.WASM_WORKER_INIT,dot:this._getTimestap()})}},{key:"addWasmReady",value:function(){this._dot.push({action:d6.WASM_WORKER_READY,dot:this._getTimestap()})}},{key:"addFirstFrameToDecode",value:function(){this._dot.push({action:d6.FIRST_FRAME_TODECODE,dot:this._getTimestap()})}},{key:"addVideoReady",value:function(){this._dot.push({action:d6.VIDEO_READY,dot:this._getTimestap()})}},{key:"addFirstframe",value:function(){this._dot.push({action:d6.FIRST_FRAME,dot:this._getTimestap()})}},{key:"addWaiting",value:function(){this._dot.push({action:d6.WAITIGN,dot:this._getTimestap()})}},{key:"addSeeking",value:function(){this._dot.push({action:d6.SEEKING,dot:this._getTimestap()})}},{key:"addSeeked",value:function(){this._dot.push({action:d6.SEEKED,dot:this._getTimestap()})}},{key:"_getTimestap",value:function(){return performance.now()}},{key:"increaseLowDecodeCount",value:function(){this._currentLowDecodeCount++}},{key:"reset",value:function(){this._currentLowDecodeCount=0,this._dot=[]}}]),e}(),p6=1,m6=2,y6=3,g6=function(e){Ry(n,e);var t=Iy(n);function n(){var e,r,i,o,a,s,u,c;return by(this,n),(i=t.call(this)).TAG="XGVideo",i._proxyProps(),i._isLive=!0,i._vMeta=null,i._aMeta=null,i._resizeObserver=null,i._eventsBackup=[],i._hevc="h265"===JW().preloadDecoder,i._hevc||(i._degradeVideo=document.createElement("video")),i._debounceSeek=(o=Dm(e=i._seek).call(e,Dy(i)),a=300,s=kG(),u=null,c=!0,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=kG();c&&(s=kG(),c=!1,o.apply(void 0,t)),r-s>a?(s=r,o.apply(void 0,t)):(u&&window.clearTimeout(u),u=Lg((function(){o.apply(void 0,t)}),a))}),i._onTouchEnd=Dm(r=i._onTouchEnd).call(r,Dy(i)),i.analyse=new v6,i}return ky(n,[{key:"_proxyProps",value:function(){var e,t=this;$l(e=Uy(n.prototype)).call(e,(function(e){if(/^__/.test(e)){var n=e.replace("__","");Th(t,n,{get:function(){try{return this[e]}catch(b6){}return 0},set:function(t){try{this[e]=t}catch(b6){}}})}}))}},{key:"addEventListener",value:function(e,t,r){Cy(Sy(n.prototype),"addEventListener",this).call(this,e,t,r),this._degradeVideo&&this._eventsBackup.push([e,t,r])}},{key:"removeEventListener",value:function(e,t,r){var i;(Cy(Sy(n.prototype),"removeEventListener",this).call(this,e,t,r),this._degradeVideo)&&(this._eventsBackup=Vl(i=this._eventsBackup).call(i,(function(n){return!(n.eventName===e&&n.handler===t&&n.capture===r)})))}},{key:"setAttribute",value:function(e,t){var r;Cy(Sy(n.prototype),"setAttribute",this).call(this,e,t),"src"!==e&&(null===(r=this._degradeVideo)||void 0===r||r.setAttribute(e,t))}},{key:"_init",value:function(){this.analyse.reset(),this.timeline=new x9({volume:this.volume,canvas:this.querySelector("canvas"),videoContext:this.videoContext,videoDecode:this.videoDecode,maxVideoHeight:this.getAttribute("maxVideoHeight"),endLevel:ug(this.getAttribute("endLevel"))},this),fW.log(this.TAG,"timeline init"),this._noSleep=new fG,this._logFirstFrame=!1,this._playRequest=null,this._degradeVideoUserGestured=!1,this._bindEvents(),this._vMeta&&!this.videoDecode&&this.setVideoMeta(this._vMeta),this._glCtxOptions&&(this.glCtxOptions=this._glCtxOptions),this.timeline&&(this.innerDegrade&&this.timeline.emit(YY.INNER_DEGRADE),this.timeline.emit(YY.SET_PLAY_MODE,this._isLive?"LIVE":"VOD"),this.timeline.emit(YY.SET_PLAYBACKRATE,this.playbackRate),this.muted=this.muted)}},{key:"_bindEvents",value:function(){var e=this;this.timeline.on(YY.PLAY_EVENT,(function(t,n){var r;t===NY.LOADEDDATA&&(e.querySelector("canvas")||(fW.log(e.TAG,"_bindEvents, appendChild canvas"),e.appendChild(e.canvas)),e.canvas.style.display="block",null===(r=e.timeline)||void 0===r||r.emit(YY.SET_PLAYBACKRATE,e.playbackRate));if(t!==NY.LOADEDMETADATA&&t!==NY.RESIZE||Zp.resolve().then((function(){e.updateVideoPostion()})),t===NY.ERROR){if(fW.warn(e.TAG,"detect error:",null==n?void 0:n.message),e.pause(),e._disabled(!0),e.innerDegrade||5===e.decoderMode)return e.degradeInfo={decodeFps:e.decodeFps,bitrate:e.bitrate,wasmInitCost:e.wasmInitCost,fps:e.fps,url:e.src,msg:null==n?void 0:n.message,decoderMode:e.decoderMode},void e._innerDispatchEvent("lowdecode");e._err=n}if(t===NY.LOW_DECODE)return e._disabled(),e.degradeInfo={decodeFps:e.decodeFps,bitrate:e.bitrate,wasmInitCost:e.wasmInitCost,fps:e.fps,url:e.src,decoderMode:e.decoderMode},void e._innerDispatchEvent(BY[t],e.degradeInfo);if(t===NY.LARGE_AV_GAP&&(e.unsyncInfo=n),t===NY.ENDED){if(e.paused)return;e.pause()}t===NY.PROGRESS&&e._noSleep.toPlay(),t===NY.WAITING&&e.analyse.addWaiting(),t===NY.SEEKING&&e.analyse.addSeeking(),t===NY.SEEKED&&e.analyse.addSeeked(),e._innerDispatchEvent(BY[t],n)}))}},{key:"_disabled",value:function(e){(this.innerDegrade||e)&&(e?JW().disabledWhenErrorOccur&&aY(1):JW().evaluateVVCount||(this.decodeFps/this.fps<=.6&&this.bitrate<2e6?aY(1):aY(2)))}},{key:"degrade",value:function(e){var t,r=this;!!this.querySelector("canvas")?this.replaceChild(this._degradeVideo,this.canvas):this.appendChild(this._degradeVideo),this.destroy(),$l(t=this._eventsBackup).call(t,(function(e){var t,i=Ly(e,3),o=i[0],a=i[1],s=i[2];Cy(Sy(n.prototype),"removeEventListener",r).call(r,o,a,s),null===(t=r._degradeVideo)||void 0===t||t.addEventListener(o,a,s)})),this._eventsBackup=[],e&&(this._degradeVideo.muted=!1,this._degradeVideo.src=e,this._degradeVideo.load())}},{key:"disconnectedCallback",value:function(){fW.log(this.TAG,"video disconnected"),document.removeEventListener("touchend",this._onTouchEnd,!0),this.destroy(!0),this._resizeObserver&&this._resizeObserver.disconnect(this)}},{key:"connectedCallback",value:function(){var e=this;fW.log(this.TAG,"video connected to document",performance.now()),this.timeline||this._init(),this.style.width="100%",this.style.height="100%",this.style.position="absolute",this.style.left="0px",this.style.top="0px",document.addEventListener("touchend",this._onTouchEnd,!0),ResizeObserver&&(this._resizeObserver=new ResizeObserver((function(t){var n;null!==(n=e.timeline)&&void 0!==n&&n.ready&&e.updateVideoPostion()})),this._resizeObserver.observe(this))}},{key:"_onTouchEnd",value:function(){pG(),this._degradeVideoInteract(),this._noSleep&&this._noSleep.enable()}},{key:"_degradeVideoInteract",value:function(){var e=this;if(this._degradeVideo&&(1===this.innerDegrade||3===this.innerDegrade)){if(this._degradeVideoUserGestured)return;var t=this._degradeVideo.play();t&&t.then((function(){e._degradeVideo.pause(),e._degradeVideoUserGestured=!0})).catch((function(e){console.log("degrade video: ",e.message)}))}}},{key:"play",value:function(e){var t,n,r=this;if(this.timeline){fW.log(this.TAG,dg(t=dg(n="play() called, ready:".concat(this.timeline.ready,", paused:")).call(n,this.timeline.paused,", force:")).call(t,e)),this._degradeVideoInteract();var i=0;if(this.timeline.ready&&this.timeline.paused||e){if(e=e||this._isLive,this._playRequest=null,!e)return this.timeline.emit(YY.DO_PLAY),this._innerDispatchEvent("play"),Zp.resolve();this.destroy(),this._init(),i=Lg((function(){try{r._innerDispatchEvent("waiting")}catch(b6){}}),300)}return this._playRequest||!this.timeline.ready||this.timeline.paused?(fW.log(this.TAG,"request play!"),this._playRequest=this._playRequest||new Zp((function(e,t){r.timeline._paused=!1,r._innerDispatchEvent("play"),r._noSleep.enable(),r.timeline.once("ready",(function(){fW.log(r.TAG,"timeline emit ready"),clearTimeout(i),r.timeline.play().then(e).catch(t).finally((function(){r._playRequest=null}))}))})),this.autoplay=!0,this._playRequest):Zp.resolve()}}},{key:"pause",value:function(){this._playRequest=null,this.timeline&&this.timeline.pause();try{this._noSleep.disable(),(e=lG||(lG=document.querySelector("#hackAudioPP")))&&e.pause()}catch(b6){}var e}},{key:"load",value:function(){}},{key:"appendBuffer",value:function(e,t){if(this.timeline&&!this._err){if(!this._logFirstFrame){var n=e&&e.samples[0],r=t&&t.samples[0];if(!n&&!r)return;if(n||r){var i,o,a,s=(null==e?void 0:e.duration)/((null==e?void 0:e.formatTimescale)||1/0),u=(null==t?void 0:t.duration)/((null==t?void 0:t.formatTimescale)||1/0);fW.warn(this.TAG,dg(i=dg(o=dg(a="video firstDts:".concat(n&&n.dts," , audio firstDts:")).call(a,r&&r.dts," videoTrack.duration=")).call(o,s,", audioTrack.duration=")).call(i,u)),this._logFirstFrame=!0,(s||u)&&(this.setPlayMode("VOD"),this.timeline.emit(YY.SET_PLAY_MODE,this._isLive?"LIVE":"VOD"),this.duration=Math.min(s||u,u||s)),this.analyse.addFirstData()}this.lowlatency&&(fW.warn(this.TAG,"single track! type=",p6),this.timeline.emit(YY.SINGLE_TRACK,p6)),t.exist()||(fW.warn(this.TAG,"single track! type=",m6),this.timeline.emit(YY.SINGLE_TRACK,m6)),e.exist()||(fW.warn(this.TAG,"single track! type=",y6),this.timeline.emit(YY.SINGLE_TRACK,y6))}var c,l;if(e.formatTimescale)$l(c=e.samples).call(c,(function(t){t.dts=Math.floor(t.dts/e.formatTimescale*1e3),t.pts=Math.floor(t.pts/e.formatTimescale*1e3)}));if(t.formatTimescale)$l(l=t.samples).call(l,(function(e){e.dts=Math.floor(e.dts/t.formatTimescale*1e3),e.pts=Math.floor(e.pts/t.formatTimescale*1e3)}));this.timeline.appendBuffer(e,t)}}},{key:"setAudioMeta",value:function(e){this._aMeta=e,this.timeline.emit(YY.SET_METADATA,"audio",e)}},{key:"setVideoMeta",value:function(e){!this._isLive&&this._vMeta||(this.timeline.emit(YY.SET_METADATA,"video",e),this._vMeta=e)}},{key:"setDecodeMode",value:function(e){this.setAttribute("decodeMode",e)}},{key:"setPlayMode",value:function(e){this._isLive="LIVE"===e}},{key:"endOfStream",value:function(){var e;this.currentTime&&(null===(e=this.timeline)||void 0===e||e.emit(YY.END_OF_STREAM))}},{key:"updateVideoPostion",value:function(){var e;null===(e=this.timeline)||void 0===e||e.emit(WY.UPDATE_VIDEO_FILLTYPE,this.xgfillType,this.containerLayout)}},{key:"_innerDispatchEvent",value:function(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))}},{key:"destroy",value:function(e){this.timeline&&(this._noSleep.destroy(),fW.log(this.TAG,"call destroy"),this.timeline.emit(YY.DESTROY,e),this.querySelector("video")&&this.removeChild(this.querySelector("video")),this.timeline=null,this._err=null,this._noSleep=null,this._eventsBackup=null)}},{key:"updateObjectPosition",value:function(e,t){var n;(this.timeline.emit(WY.UPDATE_VIDEO_COVER_POSITION,this.containerLayout,e,t),this._degradeVideo)&&(this._degradeVideo.style.objectPosition=dg(n="".concat(100*e,"% ")).call(n,100*t,"%"))}},{key:"setVideoDecode",value:function(){fW.log(this.TAG,"set videoDecode",this.videoDecode),this.videoDecode&&this.timeline&&this.timeline.videoRender&&(this.timeline.videoRender.videoDecode=this.videoDecode)}},{key:"live",get:function(){return this._isLive}},{key:"lowlatency",get:function(){return"true"===this.getAttribute("lowlatency")},set:function(e){this.setAttribute("lowlatency",e)}},{key:"autoplay",get:function(){return"true"===this.getAttribute("autoplay")},set:function(e){this.setAttribute("autoplay",e)}},{key:"__canvas",get:function(){return this.timeline.canvas}},{key:"__ended",get:function(){return Math.abs(this.currentTime-this.duration)<.5}},{key:"__width",get:function(){return this.getAttribute("width")||this.videoWidth},set:function(e){var t="number"==typeof e?"".concat(e,"px"):e;this.setAttribute("width",t),this.canvas.width=e}},{key:"__height",get:function(){return this.getAttribute("height")},set:function(e){var t="number"==typeof e?"".concat(e,"px"):e;this.setAttribute("height",t),this.canvas.height=e}},{key:"__videoWidth",get:function(){return this.canvas.width}},{key:"__videoHeight",get:function(){return this.canvas.height}},{key:"__volume",get:function(){return Number(this.getAttribute("volume"))},set:function(e){e<=0&&(e=0),e>=1&&(e=1),this.setAttribute("volume",e),this.muted||this.timeline.emit(YY.UPDATE_VOLUME,e)}},{key:"__muted",get:function(){return"true"===this.getAttribute("muted")},set:function(e){this.setAttribute("muted",e),this._degradeVideoInteract(),this._noSleep.enable(),this.timeline.emit(YY.UPDATE_VOLUME,e?0:this.volume)}},{key:"__currentTime",get:function(){if(!this.timeline)return 0;var e=this.timeline.currentTime,t=this.timeline.duration;return Math.min(e,t)},set:function(e){this._debounceSeek(e)}},{key:"_seek",value:function(e){this.timeline&&(this.buffered.length||this.play(),this.paused&&!this._isLive&&0===e&&this.play(),this.timeline.seek(Number(e)))}},{key:"__duration",get:function(){return this._isLive?1/0:this.timeline.duration},set:function(e){this.timeline.emit(YY.SET_VIDEO_DURATION,e),this._innerDispatchEvent("durationchange")}},{key:"__seeking",get:function(){return this.timeline.seeking}},{key:"__paused",get:function(){return this.timeline.paused}},{key:"__fps",get:function(){return this.timeline.fps}},{key:"__decodeFps",get:function(){return this.timeline.decodeFps}},{key:"__decodeCost",get:function(){return ug(this.timeline.decodeCost)}},{key:"__renderCost",get:function(){return this.timeline.renderCost}},{key:"__wasmInitCost",get:function(){return this.timeline.wasmInitCost}},{key:"__totalSize",get:function(){return this.timeline.totalSize}},{key:"__bitrate",get:function(){return this.timeline.bitrate}},{key:"__gopLength",get:function(){return this.timeline.gopLength}},{key:"__readyState",get:function(){return this.timeline.readyState}},{key:"__buffered",get:function(){return this.timeline.buffered}},{key:"__decoderMode",get:function(){return this.timeline.decoderMode}},{key:"src",get:function(){return this.getAttribute("src")||""},set:function(e){fW.log(this.TAG,"set src ",e),this.setAttribute("src",e),this._vMeta=null,this.play(!0),this.timeline||this._init(),this._innerDispatchEvent("loadstart"),nY++}},{key:"currentSrc",get:function(){return this.getAttribute("src")||""}},{key:"playbackRate",get:function(){return Mg(this.getAttribute("playbackrate")||1)},set:function(e){var t;this.setAttribute("playbackrate",e),null===(t=this.timeline)||void 0===t||t.emit(YY.SET_PLAYBACKRATE,e)}},{key:"networkState",get:function(){return 1}},{key:"preloadTime",get:function(){var e=this.getAttribute("preloadtime");if(e){var t=Yg(e);if(t>0&&!Xg(t))return t}return 1/0},set:function(e){e&&Number(e)>0&&this.setAttribute("preloadtime",e)}},{key:"innerDegrade",get:function(){var e=this.getAttribute("innerdegrade");return ug(e)}},{key:"__glCtxOptions",set:function(e){this._glCtxOptions=e,this.timeline.emit(YY.UPDATE_GL_OPTIONS,e)}},{key:"__error",get:function(){return this._err},set:function(e){this.timeline.emit(YY.PLAY_EVENT,NY.ERROR,e)}},{key:"degradeVideo",get:function(){return this._degradeVideo}},{key:"degradeInfo",get:function(){return this._deradeInfo},set:function(e){this._deradeInfo=e}},{key:"unsyncInfo",get:function(){return this._unsyncInfo},set:function(e){this._unsyncInfo=e}},{key:"xgfillType",get:function(){return this.parentNode.getAttribute("data-xgfill")}},{key:"containerLayout",get:function(){var e=this.parentNode;return{width:e.clientWidth,height:e.clientHeight}}},{key:"videoDecode",get:function(){return"7"===this.getAttribute("decodeMode")}},{key:"audioMedia",get:function(){var e,t;return null===(e=this.timeline)||void 0===e||null===(t=e.audioRender)||void 0===t?void 0:t.media}},{key:"getStats",value:function(){return this.analyse.getStats(this)}},{key:"getSeekElapses",value:function(){return this.analyse.seekElapses()}},{key:"dump",value:function(){var e,t,n=this.buffered;return console.log(n),zg(e=a_(t=new Array(n.length)).call(t,0)).call(e,(function(e,t){return[n.start(t),n.end(t)]}))}}],[{key:"version",get:function(){return"0.1.16"}},{key:"init",value:function(e){var t=e.h264Url,r=e.h264AsmUrl,i=e.h265AsmUrl,o=e.h265Url,a=e.h265ThreadUrl,s=e.h265SimdUrl;n.h264Url=t,n.h265Url=o,n.h265AsmUrl=i,n.h264AsmUrl=r,n.h265ThreadUrl=a,n.h265SimdUrl=s}},{key:"getDecodeCapacity",value:function(){return JW()}},{key:"getDeviceCapacity",value:function(){return{simd:QW,thread:qW(),nbCpu:navigator.hardwareConcurrency}}},{key:"setDecodeCapacity",value:function(e){jW=CW({},jW,e),e.preloadDecoder&&D9.genDecoder().catch((function(){}))}},{key:"genDecoder",value:function(e){return D9.genDecoder(e)}},{key:"cleanDisabled",value:function(){uY()}},{key:"isSupported",value:function(){return!!function(){if("undefined"==typeof customElements)return!1;if($W)return!0;var e=!1,t=!1;try{var n=new(window.AudioContext||window.webkitAudioContext);n.close(),n=null,e=!0}catch(b6){}try{for(var r=document.createElement("canvas"),i=["webgl","experimental-webgl","moz-webgl","webkit-3d"],o=0;o<i.length;o++){var a=r.getContext(i[o]);if(a){a=null,r=null,t=!0;break}}$W=e&&t&&!!WebAssembly,localStorage.setItem("_sds",$W?1:0)}catch(b6){}return $W}()&&!1===sY()}}]),n}("undefined"!=typeof HTMLElement?HTMLElement:function(){});Ty(g6,"decoderCache",D9);g6.init({h264Url:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/decoder/1.1.1/h264/decoder.js",h264AsmUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/decoder/1.1.1/h264/decoder_asm.js",h265Url:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/base/decoder.js",h265SimdUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/high/decoder_1656041798666.js",h265ThreadUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/main/decoder.js",h265AsmUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/high/decoder_asm.js"}),g6.setEleName=function(e){!function(e){XW=e}(e);var t=function(e){Ry(n,e);var t=Iy(n);function n(){return by(this,n),t.apply(this,arguments)}return ky(n)}(g6);customElements.get(HW())||customElements.define(HW(),t)};try{customElements.get(HW())||customElements.define(HW(),g6)}catch(b6){}VePlayer.register("plugin:xgvideo",{XGVideoPlugin:g6}),e.XGVideoPlugin=g6}));